@stellar/stellar-sdk 13.0.0 → 13.1.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 (51) hide show
  1. package/CHANGELOG.md +14 -4
  2. package/README.md +1 -1
  3. package/dist/stellar-sdk-minimal.js +426 -71
  4. package/dist/stellar-sdk-minimal.min.js +1 -1
  5. package/dist/stellar-sdk-no-axios.js +1022 -228
  6. package/dist/stellar-sdk-no-axios.min.js +1 -1
  7. package/dist/stellar-sdk-no-eventsource.js +149 -142
  8. package/dist/stellar-sdk-no-eventsource.min.js +1 -1
  9. package/dist/stellar-sdk.js +745 -299
  10. package/dist/stellar-sdk.min.js +1 -1
  11. package/lib/friendbot/index.d.ts +1 -0
  12. package/lib/horizon/call_builder.d.ts +1 -1
  13. package/lib/horizon/horizon_api.d.ts +13 -0
  14. package/lib/horizon/horizon_axios_client.js +1 -1
  15. package/lib/horizon/server.d.ts +5 -0
  16. package/lib/horizon/server.js +80 -59
  17. package/lib/minimal/friendbot/index.d.ts +1 -0
  18. package/lib/minimal/horizon/call_builder.d.ts +1 -1
  19. package/lib/minimal/horizon/horizon_api.d.ts +13 -0
  20. package/lib/minimal/horizon/horizon_axios_client.js +1 -1
  21. package/lib/minimal/horizon/server.d.ts +5 -0
  22. package/lib/minimal/horizon/server.js +80 -59
  23. package/lib/minimal/rpc/api.d.ts +2 -1
  24. package/lib/minimal/rpc/axios.js +1 -1
  25. package/lib/minimal/rpc/parsers.js +1 -0
  26. package/lib/minimal/rpc/server.js +27 -8
  27. package/lib/no-axios/friendbot/index.d.ts +1 -0
  28. package/lib/no-axios/horizon/call_builder.d.ts +1 -1
  29. package/lib/no-axios/horizon/horizon_api.d.ts +13 -0
  30. package/lib/no-axios/horizon/horizon_axios_client.js +1 -1
  31. package/lib/no-axios/horizon/server.d.ts +5 -0
  32. package/lib/no-axios/horizon/server.js +80 -59
  33. package/lib/no-axios/rpc/api.d.ts +2 -1
  34. package/lib/no-axios/rpc/axios.js +1 -1
  35. package/lib/no-axios/rpc/parsers.js +1 -0
  36. package/lib/no-axios/rpc/server.js +27 -8
  37. package/lib/no-eventsource/friendbot/index.d.ts +1 -0
  38. package/lib/no-eventsource/horizon/call_builder.d.ts +1 -1
  39. package/lib/no-eventsource/horizon/horizon_api.d.ts +13 -0
  40. package/lib/no-eventsource/horizon/horizon_axios_client.js +1 -1
  41. package/lib/no-eventsource/horizon/server.d.ts +5 -0
  42. package/lib/no-eventsource/horizon/server.js +80 -59
  43. package/lib/no-eventsource/rpc/api.d.ts +2 -1
  44. package/lib/no-eventsource/rpc/axios.js +1 -1
  45. package/lib/no-eventsource/rpc/parsers.js +1 -0
  46. package/lib/no-eventsource/rpc/server.js +27 -8
  47. package/lib/rpc/api.d.ts +2 -1
  48. package/lib/rpc/axios.js +1 -1
  49. package/lib/rpc/parsers.js +1 -0
  50. package/lib/rpc/server.js +27 -8
  51. package/package.json +10 -10
@@ -27730,7 +27730,7 @@ var http_client = __webpack_require__(9983);
27730
27730
  function horizon_axios_client_typeof(o) { "@babel/helpers - typeof"; return horizon_axios_client_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, horizon_axios_client_typeof(o); }
27731
27731
 
27732
27732
 
27733
- var version = "13.0.0";
27733
+ var version = "13.1.0";
27734
27734
  var SERVER_TIME_MAP = {};
27735
27735
  var AxiosClient = (0,http_client/* create */.vt)({
27736
27736
  headers: {
@@ -29116,28 +29116,49 @@ var HorizonServer = function () {
29116
29116
  }
29117
29117
  return feeStats;
29118
29118
  }())
29119
+ }, {
29120
+ key: "root",
29121
+ value: (function () {
29122
+ var _root = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee4() {
29123
+ var cb;
29124
+ return server_regeneratorRuntime().wrap(function _callee4$(_context4) {
29125
+ while (1) switch (_context4.prev = _context4.next) {
29126
+ case 0:
29127
+ cb = new CallBuilder(URI_default()(this.serverURL));
29128
+ return _context4.abrupt("return", cb.call());
29129
+ case 2:
29130
+ case "end":
29131
+ return _context4.stop();
29132
+ }
29133
+ }, _callee4, this);
29134
+ }));
29135
+ function root() {
29136
+ return _root.apply(this, arguments);
29137
+ }
29138
+ return root;
29139
+ }())
29119
29140
  }, {
29120
29141
  key: "submitTransaction",
29121
29142
  value: (function () {
29122
- var _submitTransaction = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee4(transaction) {
29143
+ var _submitTransaction = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee5(transaction) {
29123
29144
  var opts,
29124
29145
  tx,
29125
- _args4 = arguments;
29126
- return server_regeneratorRuntime().wrap(function _callee4$(_context4) {
29127
- while (1) switch (_context4.prev = _context4.next) {
29146
+ _args5 = arguments;
29147
+ return server_regeneratorRuntime().wrap(function _callee5$(_context5) {
29148
+ while (1) switch (_context5.prev = _context5.next) {
29128
29149
  case 0:
29129
- opts = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {
29150
+ opts = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {
29130
29151
  skipMemoRequiredCheck: false
29131
29152
  };
29132
29153
  if (opts.skipMemoRequiredCheck) {
29133
- _context4.next = 4;
29154
+ _context5.next = 4;
29134
29155
  break;
29135
29156
  }
29136
- _context4.next = 4;
29157
+ _context5.next = 4;
29137
29158
  return this.checkMemoRequired(transaction);
29138
29159
  case 4:
29139
29160
  tx = encodeURIComponent(transaction.toEnvelope().toXDR().toString("base64"));
29140
- return _context4.abrupt("return", horizon_axios_client.post(URI_default()(this.serverURL).segment("transactions").toString(), "tx=".concat(tx), {
29161
+ return _context5.abrupt("return", horizon_axios_client.post(URI_default()(this.serverURL).segment("transactions").toString(), "tx=".concat(tx), {
29141
29162
  timeout: SUBMIT_TRANSACTION_TIMEOUT
29142
29163
  }).then(function (response) {
29143
29164
  if (!response.data.result_xdr) {
@@ -29248,9 +29269,9 @@ var HorizonServer = function () {
29248
29269
  }));
29249
29270
  case 6:
29250
29271
  case "end":
29251
- return _context4.stop();
29272
+ return _context5.stop();
29252
29273
  }
29253
- }, _callee4, this);
29274
+ }, _callee5, this);
29254
29275
  }));
29255
29276
  function submitTransaction(_x2) {
29256
29277
  return _submitTransaction.apply(this, arguments);
@@ -29260,25 +29281,25 @@ var HorizonServer = function () {
29260
29281
  }, {
29261
29282
  key: "submitAsyncTransaction",
29262
29283
  value: (function () {
29263
- var _submitAsyncTransaction = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee5(transaction) {
29284
+ var _submitAsyncTransaction = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee6(transaction) {
29264
29285
  var opts,
29265
29286
  tx,
29266
- _args5 = arguments;
29267
- return server_regeneratorRuntime().wrap(function _callee5$(_context5) {
29268
- while (1) switch (_context5.prev = _context5.next) {
29287
+ _args6 = arguments;
29288
+ return server_regeneratorRuntime().wrap(function _callee6$(_context6) {
29289
+ while (1) switch (_context6.prev = _context6.next) {
29269
29290
  case 0:
29270
- opts = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {
29291
+ opts = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {
29271
29292
  skipMemoRequiredCheck: false
29272
29293
  };
29273
29294
  if (opts.skipMemoRequiredCheck) {
29274
- _context5.next = 4;
29295
+ _context6.next = 4;
29275
29296
  break;
29276
29297
  }
29277
- _context5.next = 4;
29298
+ _context6.next = 4;
29278
29299
  return this.checkMemoRequired(transaction);
29279
29300
  case 4:
29280
29301
  tx = encodeURIComponent(transaction.toEnvelope().toXDR().toString("base64"));
29281
- return _context5.abrupt("return", horizon_axios_client.post(URI_default()(this.serverURL).segment("transactions_async").toString(), "tx=".concat(tx)).then(function (response) {
29302
+ return _context6.abrupt("return", horizon_axios_client.post(URI_default()(this.serverURL).segment("transactions_async").toString(), "tx=".concat(tx)).then(function (response) {
29282
29303
  return response.data;
29283
29304
  }).catch(function (response) {
29284
29305
  if (response instanceof Error) {
@@ -29288,9 +29309,9 @@ var HorizonServer = function () {
29288
29309
  }));
29289
29310
  case 6:
29290
29311
  case "end":
29291
- return _context5.stop();
29312
+ return _context6.stop();
29292
29313
  }
29293
- }, _callee5, this);
29314
+ }, _callee6, this);
29294
29315
  }));
29295
29316
  function submitAsyncTransaction(_x3) {
29296
29317
  return _submitAsyncTransaction.apply(this, arguments);
@@ -29375,21 +29396,21 @@ var HorizonServer = function () {
29375
29396
  }, {
29376
29397
  key: "loadAccount",
29377
29398
  value: (function () {
29378
- var _loadAccount = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee6(accountId) {
29399
+ var _loadAccount = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee7(accountId) {
29379
29400
  var res;
29380
- return server_regeneratorRuntime().wrap(function _callee6$(_context6) {
29381
- while (1) switch (_context6.prev = _context6.next) {
29401
+ return server_regeneratorRuntime().wrap(function _callee7$(_context7) {
29402
+ while (1) switch (_context7.prev = _context7.next) {
29382
29403
  case 0:
29383
- _context6.next = 2;
29404
+ _context7.next = 2;
29384
29405
  return this.accounts().accountId(accountId).call();
29385
29406
  case 2:
29386
- res = _context6.sent;
29387
- return _context6.abrupt("return", new AccountResponse(res));
29407
+ res = _context7.sent;
29408
+ return _context7.abrupt("return", new AccountResponse(res));
29388
29409
  case 4:
29389
29410
  case "end":
29390
- return _context6.stop();
29411
+ return _context7.stop();
29391
29412
  }
29392
- }, _callee6, this);
29413
+ }, _callee7, this);
29393
29414
  }));
29394
29415
  function loadAccount(_x4) {
29395
29416
  return _loadAccount.apply(this, arguments);
@@ -29404,88 +29425,88 @@ var HorizonServer = function () {
29404
29425
  }, {
29405
29426
  key: "checkMemoRequired",
29406
29427
  value: (function () {
29407
- var _checkMemoRequired = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee7(transaction) {
29428
+ var _checkMemoRequired = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee8(transaction) {
29408
29429
  var destinations, i, operation, destination, account;
29409
- return server_regeneratorRuntime().wrap(function _callee7$(_context7) {
29410
- while (1) switch (_context7.prev = _context7.next) {
29430
+ return server_regeneratorRuntime().wrap(function _callee8$(_context8) {
29431
+ while (1) switch (_context8.prev = _context8.next) {
29411
29432
  case 0:
29412
29433
  if (transaction instanceof lib.FeeBumpTransaction) {
29413
29434
  transaction = transaction.innerTransaction;
29414
29435
  }
29415
29436
  if (!(transaction.memo.type !== "none")) {
29416
- _context7.next = 3;
29437
+ _context8.next = 3;
29417
29438
  break;
29418
29439
  }
29419
- return _context7.abrupt("return");
29440
+ return _context8.abrupt("return");
29420
29441
  case 3:
29421
29442
  destinations = new Set();
29422
29443
  i = 0;
29423
29444
  case 5:
29424
29445
  if (!(i < transaction.operations.length)) {
29425
- _context7.next = 36;
29446
+ _context8.next = 36;
29426
29447
  break;
29427
29448
  }
29428
29449
  operation = transaction.operations[i];
29429
- _context7.t0 = operation.type;
29430
- _context7.next = _context7.t0 === "payment" ? 10 : _context7.t0 === "pathPaymentStrictReceive" ? 10 : _context7.t0 === "pathPaymentStrictSend" ? 10 : _context7.t0 === "accountMerge" ? 10 : 11;
29450
+ _context8.t0 = operation.type;
29451
+ _context8.next = _context8.t0 === "payment" ? 10 : _context8.t0 === "pathPaymentStrictReceive" ? 10 : _context8.t0 === "pathPaymentStrictSend" ? 10 : _context8.t0 === "accountMerge" ? 10 : 11;
29431
29452
  break;
29432
29453
  case 10:
29433
- return _context7.abrupt("break", 12);
29454
+ return _context8.abrupt("break", 12);
29434
29455
  case 11:
29435
- return _context7.abrupt("continue", 33);
29456
+ return _context8.abrupt("continue", 33);
29436
29457
  case 12:
29437
29458
  destination = operation.destination;
29438
29459
  if (!destinations.has(destination)) {
29439
- _context7.next = 15;
29460
+ _context8.next = 15;
29440
29461
  break;
29441
29462
  }
29442
- return _context7.abrupt("continue", 33);
29463
+ return _context8.abrupt("continue", 33);
29443
29464
  case 15:
29444
29465
  destinations.add(destination);
29445
29466
  if (!destination.startsWith("M")) {
29446
- _context7.next = 18;
29467
+ _context8.next = 18;
29447
29468
  break;
29448
29469
  }
29449
- return _context7.abrupt("continue", 33);
29470
+ return _context8.abrupt("continue", 33);
29450
29471
  case 18:
29451
- _context7.prev = 18;
29452
- _context7.next = 21;
29472
+ _context8.prev = 18;
29473
+ _context8.next = 21;
29453
29474
  return this.loadAccount(destination);
29454
29475
  case 21:
29455
- account = _context7.sent;
29476
+ account = _context8.sent;
29456
29477
  if (!(account.data_attr["config.memo_required"] === ACCOUNT_REQUIRES_MEMO)) {
29457
- _context7.next = 24;
29478
+ _context8.next = 24;
29458
29479
  break;
29459
29480
  }
29460
29481
  throw new errors/* AccountRequiresMemoError */.Cu("account requires memo", destination, i);
29461
29482
  case 24:
29462
- _context7.next = 33;
29483
+ _context8.next = 33;
29463
29484
  break;
29464
29485
  case 26:
29465
- _context7.prev = 26;
29466
- _context7.t1 = _context7["catch"](18);
29467
- if (!(_context7.t1 instanceof errors/* AccountRequiresMemoError */.Cu)) {
29468
- _context7.next = 30;
29486
+ _context8.prev = 26;
29487
+ _context8.t1 = _context8["catch"](18);
29488
+ if (!(_context8.t1 instanceof errors/* AccountRequiresMemoError */.Cu)) {
29489
+ _context8.next = 30;
29469
29490
  break;
29470
29491
  }
29471
- throw _context7.t1;
29492
+ throw _context8.t1;
29472
29493
  case 30:
29473
- if (_context7.t1 instanceof errors/* NotFoundError */.m_) {
29474
- _context7.next = 32;
29494
+ if (_context8.t1 instanceof errors/* NotFoundError */.m_) {
29495
+ _context8.next = 32;
29475
29496
  break;
29476
29497
  }
29477
- throw _context7.t1;
29498
+ throw _context8.t1;
29478
29499
  case 32:
29479
- return _context7.abrupt("continue", 33);
29500
+ return _context8.abrupt("continue", 33);
29480
29501
  case 33:
29481
29502
  i += 1;
29482
- _context7.next = 5;
29503
+ _context8.next = 5;
29483
29504
  break;
29484
29505
  case 36:
29485
29506
  case "end":
29486
- return _context7.stop();
29507
+ return _context8.stop();
29487
29508
  }
29488
- }, _callee7, this, [[18, 26]]);
29509
+ }, _callee8, this, [[18, 26]]);
29489
29510
  }));
29490
29511
  function checkMemoRequired(_x5) {
29491
29512
  return _checkMemoRequired.apply(this, arguments);
@@ -30720,7 +30741,7 @@ function buildURL_encode(val) {
30720
30741
  *
30721
30742
  * @param {string} url The base of the url (e.g., http://www.google.com)
30722
30743
  * @param {object} [params] The params to be appended
30723
- * @param {?object} options
30744
+ * @param {?(object|Function)} options
30724
30745
  *
30725
30746
  * @returns {string} The formatted url
30726
30747
  */
@@ -30732,6 +30753,12 @@ function buildURL(url, params, options) {
30732
30753
 
30733
30754
  const _encode = options && options.encode || buildURL_encode;
30734
30755
 
30756
+ if (utils.isFunction(options)) {
30757
+ options = {
30758
+ serialize: options
30759
+ };
30760
+ }
30761
+
30735
30762
  const serializeFn = options && options.serialize;
30736
30763
 
30737
30764
  let serializedParams;
@@ -31819,71 +31846,18 @@ const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));
31819
31846
  ;// ./node_modules/axios/lib/helpers/isURLSameOrigin.js
31820
31847
 
31821
31848
 
31849
+ /* harmony default export */ const isURLSameOrigin = (platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
31850
+ url = new URL(url, platform.origin);
31822
31851
 
31823
-
31824
-
31825
- /* harmony default export */ const isURLSameOrigin = (platform.hasStandardBrowserEnv ?
31826
-
31827
- // Standard browser envs have full support of the APIs needed to test
31828
- // whether the request URL is of the same origin as current location.
31829
- (function standardBrowserEnv() {
31830
- const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
31831
- const urlParsingNode = document.createElement('a');
31832
- let originURL;
31833
-
31834
- /**
31835
- * Parse a URL to discover its components
31836
- *
31837
- * @param {String} url The URL to be parsed
31838
- * @returns {Object}
31839
- */
31840
- function resolveURL(url) {
31841
- let href = url;
31842
-
31843
- if (msie) {
31844
- // IE needs attribute set twice to normalize properties
31845
- urlParsingNode.setAttribute('href', href);
31846
- href = urlParsingNode.href;
31847
- }
31848
-
31849
- urlParsingNode.setAttribute('href', href);
31850
-
31851
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
31852
- return {
31853
- href: urlParsingNode.href,
31854
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
31855
- host: urlParsingNode.host,
31856
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
31857
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
31858
- hostname: urlParsingNode.hostname,
31859
- port: urlParsingNode.port,
31860
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
31861
- urlParsingNode.pathname :
31862
- '/' + urlParsingNode.pathname
31863
- };
31864
- }
31865
-
31866
- originURL = resolveURL(window.location.href);
31867
-
31868
- /**
31869
- * Determine if a URL shares the same origin as the current location
31870
- *
31871
- * @param {String} requestURL The URL to test
31872
- * @returns {boolean} True if URL shares the same origin, otherwise false
31873
- */
31874
- return function isURLSameOrigin(requestURL) {
31875
- const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
31876
- return (parsed.protocol === originURL.protocol &&
31877
- parsed.host === originURL.host);
31878
- };
31879
- })() :
31880
-
31881
- // Non standard browser envs (web workers, react-native) lack needed support.
31882
- (function nonStandardBrowserEnv() {
31883
- return function isURLSameOrigin() {
31884
- return true;
31885
- };
31886
- })());
31852
+ return (
31853
+ origin.protocol === url.protocol &&
31854
+ origin.host === url.host &&
31855
+ (isMSIE || origin.port === url.port)
31856
+ );
31857
+ })(
31858
+ new URL(platform.origin),
31859
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
31860
+ ) : () => true);
31887
31861
 
31888
31862
  ;// ./node_modules/axios/lib/helpers/cookies.js
31889
31863
 
@@ -32008,7 +31982,7 @@ function mergeConfig(config1, config2) {
32008
31982
  config2 = config2 || {};
32009
31983
  const config = {};
32010
31984
 
32011
- function getMergedValue(target, source, caseless) {
31985
+ function getMergedValue(target, source, prop, caseless) {
32012
31986
  if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
32013
31987
  return utils.merge.call({caseless}, target, source);
32014
31988
  } else if (utils.isPlainObject(source)) {
@@ -32020,11 +31994,11 @@ function mergeConfig(config1, config2) {
32020
31994
  }
32021
31995
 
32022
31996
  // eslint-disable-next-line consistent-return
32023
- function mergeDeepProperties(a, b, caseless) {
31997
+ function mergeDeepProperties(a, b, prop , caseless) {
32024
31998
  if (!utils.isUndefined(b)) {
32025
- return getMergedValue(a, b, caseless);
31999
+ return getMergedValue(a, b, prop , caseless);
32026
32000
  } else if (!utils.isUndefined(a)) {
32027
- return getMergedValue(undefined, a, caseless);
32001
+ return getMergedValue(undefined, a, prop , caseless);
32028
32002
  }
32029
32003
  }
32030
32004
 
@@ -32082,7 +32056,7 @@ function mergeConfig(config1, config2) {
32082
32056
  socketPath: defaultToConfig2,
32083
32057
  responseEncoding: defaultToConfig2,
32084
32058
  validateStatus: mergeDirectKeys,
32085
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
32059
+ headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
32086
32060
  };
32087
32061
 
32088
32062
  utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
@@ -32887,7 +32861,7 @@ function dispatchRequest(config) {
32887
32861
  }
32888
32862
 
32889
32863
  ;// ./node_modules/axios/lib/env/data.js
32890
- const VERSION = "1.7.7";
32864
+ const VERSION = "1.7.9";
32891
32865
  ;// ./node_modules/axios/lib/helpers/validator.js
32892
32866
 
32893
32867
 
@@ -32943,6 +32917,14 @@ validators.transitional = function transitional(validator, version, message) {
32943
32917
  };
32944
32918
  };
32945
32919
 
32920
+ validators.spelling = function spelling(correctSpelling) {
32921
+ return (value, opt) => {
32922
+ // eslint-disable-next-line no-console
32923
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
32924
+ return true;
32925
+ }
32926
+ };
32927
+
32946
32928
  /**
32947
32929
  * Assert object's properties type
32948
32930
  *
@@ -33024,9 +33006,9 @@ class Axios {
33024
33006
  return await this._request(configOrUrl, config);
33025
33007
  } catch (err) {
33026
33008
  if (err instanceof Error) {
33027
- let dummy;
33009
+ let dummy = {};
33028
33010
 
33029
- Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
33011
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
33030
33012
 
33031
33013
  // slice off the Error: ... line
33032
33014
  const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
@@ -33081,6 +33063,11 @@ class Axios {
33081
33063
  }
33082
33064
  }
33083
33065
 
33066
+ validator.assertOptions(config, {
33067
+ baseUrl: Axios_validators.spelling('baseURL'),
33068
+ withXsrfToken: Axios_validators.spelling('withXSRFToken')
33069
+ }, true);
33070
+
33084
33071
  // Set config.method
33085
33072
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
33086
33073
 
@@ -33754,7 +33741,7 @@ var lib = __webpack_require__(356);
33754
33741
  var http_client = __webpack_require__(9983);
33755
33742
  ;// ./src/rpc/axios.ts
33756
33743
 
33757
- var version = "13.0.0";
33744
+ var version = "13.1.0";
33758
33745
  var AxiosClient = (0,http_client/* create */.vt)({
33759
33746
  headers: {
33760
33747
  'X-Client-Name': 'js-soroban-client',
@@ -34505,7 +34492,7 @@ var RpcServer = function () {
34505
34492
  key: "requestAirdrop",
34506
34493
  value: (function () {
34507
34494
  var _requestAirdrop = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee22(address, friendbotUrl) {
34508
- var account, response, meta, sequence, _error$response, _error$response$detai;
34495
+ var account, response, meta, txMeta, sequence, _error$response, _error$response$detai;
34509
34496
  return server_regeneratorRuntime().wrap(function _callee22$(_context22) {
34510
34497
  while (1) switch (_context22.prev = _context22.next) {
34511
34498
  case 0:
@@ -34532,28 +34519,47 @@ var RpcServer = function () {
34532
34519
  return axios.post("".concat(friendbotUrl, "?addr=").concat(encodeURIComponent(account)));
34533
34520
  case 12:
34534
34521
  response = _context22.sent;
34522
+ if (response.data.result_meta_xdr) {
34523
+ _context22.next = 22;
34524
+ break;
34525
+ }
34526
+ _context22.next = 16;
34527
+ return this.getTransaction(response.data.hash);
34528
+ case 16:
34529
+ txMeta = _context22.sent;
34530
+ if (!(txMeta.status !== api/* Api */.j.GetTransactionStatus.SUCCESS)) {
34531
+ _context22.next = 19;
34532
+ break;
34533
+ }
34534
+ throw new Error("Funding account ".concat(address, " failed"));
34535
+ case 19:
34536
+ meta = txMeta.resultMetaXdr;
34537
+ _context22.next = 23;
34538
+ break;
34539
+ case 22:
34535
34540
  meta = lib.xdr.TransactionMeta.fromXDR(response.data.result_meta_xdr, 'base64');
34541
+ case 23:
34536
34542
  sequence = findCreatedAccountSequenceInTransactionMeta(meta);
34537
34543
  return _context22.abrupt("return", new lib.Account(account, sequence));
34538
- case 18:
34539
- _context22.prev = 18;
34544
+ case 27:
34545
+ _context22.prev = 27;
34540
34546
  _context22.t1 = _context22["catch"](9);
34541
34547
  if (!(((_error$response = _context22.t1.response) === null || _error$response === void 0 ? void 0 : _error$response.status) === 400)) {
34542
- _context22.next = 23;
34548
+ _context22.next = 32;
34543
34549
  break;
34544
34550
  }
34545
34551
  if (!((_error$response$detai = _context22.t1.response.detail) !== null && _error$response$detai !== void 0 && _error$response$detai.includes('createAccountAlreadyExist'))) {
34546
- _context22.next = 23;
34552
+ _context22.next = 32;
34547
34553
  break;
34548
34554
  }
34549
34555
  return _context22.abrupt("return", this.getAccount(account));
34550
- case 23:
34556
+ case 32:
34551
34557
  throw _context22.t1;
34552
- case 24:
34558
+ case 33:
34553
34559
  case "end":
34554
34560
  return _context22.stop();
34555
34561
  }
34556
- }, _callee22, this, [[9, 18]]);
34562
+ }, _callee22, this, [[9, 27]]);
34557
34563
  }));
34558
34564
  function requestAirdrop(_x21, _x22) {
34559
34565
  return _requestAirdrop.apply(this, arguments);
@@ -34766,6 +34772,7 @@ function parseRawEvents(raw) {
34766
34772
  var _raw$events;
34767
34773
  return {
34768
34774
  latestLedger: raw.latestLedger,
34775
+ cursor: raw.cursor,
34769
34776
  events: ((_raw$events = raw.events) !== null && _raw$events !== void 0 ? _raw$events : []).map(function (evt) {
34770
34777
  var clone = _objectSpread({}, evt);
34771
34778
  delete clone.contractId;
@@ -41014,6 +41021,101 @@ module.exports = {
41014
41021
  }
41015
41022
 
41016
41023
 
41024
+ /***/ }),
41025
+
41026
+ /***/ 3144:
41027
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
41028
+
41029
+ "use strict";
41030
+
41031
+
41032
+ var bind = __webpack_require__(6743);
41033
+
41034
+ var $apply = __webpack_require__(1002);
41035
+ var $call = __webpack_require__(76);
41036
+ var $reflectApply = __webpack_require__(7119);
41037
+
41038
+ /** @type {import('./actualApply')} */
41039
+ module.exports = $reflectApply || bind.call($call, $apply);
41040
+
41041
+
41042
+ /***/ }),
41043
+
41044
+ /***/ 2205:
41045
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
41046
+
41047
+ "use strict";
41048
+
41049
+
41050
+ var bind = __webpack_require__(6743);
41051
+ var $apply = __webpack_require__(1002);
41052
+ var actualApply = __webpack_require__(3144);
41053
+
41054
+ /** @type {import('./applyBind')} */
41055
+ module.exports = function applyBind() {
41056
+ return actualApply(bind, $apply, arguments);
41057
+ };
41058
+
41059
+
41060
+ /***/ }),
41061
+
41062
+ /***/ 1002:
41063
+ /***/ ((module) => {
41064
+
41065
+ "use strict";
41066
+
41067
+
41068
+ /** @type {import('./functionApply')} */
41069
+ module.exports = Function.prototype.apply;
41070
+
41071
+
41072
+ /***/ }),
41073
+
41074
+ /***/ 76:
41075
+ /***/ ((module) => {
41076
+
41077
+ "use strict";
41078
+
41079
+
41080
+ /** @type {import('./functionCall')} */
41081
+ module.exports = Function.prototype.call;
41082
+
41083
+
41084
+ /***/ }),
41085
+
41086
+ /***/ 3126:
41087
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
41088
+
41089
+ "use strict";
41090
+
41091
+
41092
+ var bind = __webpack_require__(6743);
41093
+ var $TypeError = __webpack_require__(9675);
41094
+
41095
+ var $call = __webpack_require__(76);
41096
+ var $actualApply = __webpack_require__(3144);
41097
+
41098
+ /** @type {import('.')} */
41099
+ module.exports = function callBindBasic(args) {
41100
+ if (args.length < 1 || typeof args[0] !== 'function') {
41101
+ throw new $TypeError('a function is required');
41102
+ }
41103
+ return $actualApply(bind, $call, args);
41104
+ };
41105
+
41106
+
41107
+ /***/ }),
41108
+
41109
+ /***/ 7119:
41110
+ /***/ ((module) => {
41111
+
41112
+ "use strict";
41113
+
41114
+
41115
+ /** @type {import('./reflectApply')} */
41116
+ module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
41117
+
41118
+
41017
41119
  /***/ }),
41018
41120
 
41019
41121
  /***/ 8075:
@@ -41045,34 +41147,23 @@ module.exports = function callBoundIntrinsic(name, allowMissing) {
41045
41147
  "use strict";
41046
41148
 
41047
41149
 
41048
- var bind = __webpack_require__(6743);
41049
- var GetIntrinsic = __webpack_require__(453);
41050
41150
  var setFunctionLength = __webpack_require__(6897);
41051
41151
 
41052
- var $TypeError = __webpack_require__(9675);
41053
- var $apply = GetIntrinsic('%Function.prototype.apply%');
41054
- var $call = GetIntrinsic('%Function.prototype.call%');
41055
- var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
41056
-
41057
41152
  var $defineProperty = __webpack_require__(655);
41058
- var $max = GetIntrinsic('%Math.max%');
41153
+
41154
+ var callBindBasic = __webpack_require__(3126);
41155
+ var applyBind = __webpack_require__(2205);
41059
41156
 
41060
41157
  module.exports = function callBind(originalFunction) {
41061
- if (typeof originalFunction !== 'function') {
41062
- throw new $TypeError('a function is required');
41063
- }
41064
- var func = $reflectApply(bind, $call, arguments);
41158
+ var func = callBindBasic(arguments);
41159
+ var adjustedLength = originalFunction.length - (arguments.length - 1);
41065
41160
  return setFunctionLength(
41066
41161
  func,
41067
- 1 + $max(0, originalFunction.length - (arguments.length - 1)),
41162
+ 1 + (adjustedLength > 0 ? adjustedLength : 0),
41068
41163
  true
41069
41164
  );
41070
41165
  };
41071
41166
 
41072
- var applyBind = function applyBind() {
41073
- return $reflectApply(bind, $apply, arguments);
41074
- };
41075
-
41076
41167
  if ($defineProperty) {
41077
41168
  $defineProperty(module.exports, 'apply', { value: applyBind });
41078
41169
  } else {
@@ -41080,6 +41171,32 @@ if ($defineProperty) {
41080
41171
  }
41081
41172
 
41082
41173
 
41174
+ /***/ }),
41175
+
41176
+ /***/ 6556:
41177
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
41178
+
41179
+ "use strict";
41180
+
41181
+
41182
+ var GetIntrinsic = __webpack_require__(453);
41183
+
41184
+ var callBindBasic = __webpack_require__(3126);
41185
+
41186
+ /** @type {(thisArg: string, searchString: string, position?: number) => number} */
41187
+ var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);
41188
+
41189
+ /** @type {import('.')} */
41190
+ module.exports = function callBoundIntrinsic(name, allowMissing) {
41191
+ // eslint-disable-next-line no-extra-parens
41192
+ var intrinsic = /** @type {Parameters<typeof callBindBasic>[0][0]} */ (GetIntrinsic(name, !!allowMissing));
41193
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
41194
+ return callBindBasic([intrinsic]);
41195
+ }
41196
+ return intrinsic;
41197
+ };
41198
+
41199
+
41083
41200
  /***/ }),
41084
41201
 
41085
41202
  /***/ 41:
@@ -41146,16 +41263,45 @@ module.exports = function defineDataProperty(
41146
41263
 
41147
41264
  /***/ }),
41148
41265
 
41149
- /***/ 655:
41266
+ /***/ 7176:
41150
41267
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
41151
41268
 
41152
41269
  "use strict";
41153
41270
 
41154
41271
 
41155
- var GetIntrinsic = __webpack_require__(453);
41272
+ var callBind = __webpack_require__(3126);
41273
+ var gOPD = __webpack_require__(5795);
41274
+
41275
+ // eslint-disable-next-line no-extra-parens, no-proto
41276
+ var hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
41277
+
41278
+ // eslint-disable-next-line no-extra-parens
41279
+ var desc = hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
41280
+
41281
+ var $Object = Object;
41282
+ var $getPrototypeOf = $Object.getPrototypeOf;
41283
+
41284
+ /** @type {import('./get')} */
41285
+ module.exports = desc && typeof desc.get === 'function'
41286
+ ? callBind([desc.get])
41287
+ : typeof $getPrototypeOf === 'function'
41288
+ ? /** @type {import('./get')} */ function getDunder(value) {
41289
+ // eslint-disable-next-line eqeqeq
41290
+ return $getPrototypeOf(value == null ? value : $Object(value));
41291
+ }
41292
+ : false;
41293
+
41294
+
41295
+ /***/ }),
41296
+
41297
+ /***/ 655:
41298
+ /***/ ((module) => {
41299
+
41300
+ "use strict";
41301
+
41156
41302
 
41157
41303
  /** @type {import('.')} */
41158
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
41304
+ var $defineProperty = Object.defineProperty || false;
41159
41305
  if ($defineProperty) {
41160
41306
  try {
41161
41307
  $defineProperty({}, 'a', { value: 1 });
@@ -41252,6 +41398,18 @@ module.exports = TypeError;
41252
41398
  module.exports = URIError;
41253
41399
 
41254
41400
 
41401
+ /***/ }),
41402
+
41403
+ /***/ 9612:
41404
+ /***/ ((module) => {
41405
+
41406
+ "use strict";
41407
+
41408
+
41409
+ /** @type {import('.')} */
41410
+ module.exports = Object;
41411
+
41412
+
41255
41413
  /***/ }),
41256
41414
 
41257
41415
  /***/ 7007:
@@ -42445,6 +42603,8 @@ module.exports = Function.prototype.bind || implementation;
42445
42603
 
42446
42604
  var undefined;
42447
42605
 
42606
+ var $Object = __webpack_require__(9612);
42607
+
42448
42608
  var $Error = __webpack_require__(9383);
42449
42609
  var $EvalError = __webpack_require__(1237);
42450
42610
  var $RangeError = __webpack_require__(9290);
@@ -42453,6 +42613,12 @@ var $SyntaxError = __webpack_require__(8068);
42453
42613
  var $TypeError = __webpack_require__(9675);
42454
42614
  var $URIError = __webpack_require__(5345);
42455
42615
 
42616
+ var abs = __webpack_require__(1514);
42617
+ var floor = __webpack_require__(8968);
42618
+ var max = __webpack_require__(6188);
42619
+ var min = __webpack_require__(8002);
42620
+ var pow = __webpack_require__(5880);
42621
+
42456
42622
  var $Function = Function;
42457
42623
 
42458
42624
  // eslint-disable-next-line consistent-return
@@ -42462,14 +42628,8 @@ var getEvalledConstructor = function (expressionSyntax) {
42462
42628
  } catch (e) {}
42463
42629
  };
42464
42630
 
42465
- var $gOPD = Object.getOwnPropertyDescriptor;
42466
- if ($gOPD) {
42467
- try {
42468
- $gOPD({}, '');
42469
- } catch (e) {
42470
- $gOPD = null; // this is IE 8, which has a broken gOPD
42471
- }
42472
- }
42631
+ var $gOPD = __webpack_require__(5795);
42632
+ var $defineProperty = __webpack_require__(655);
42473
42633
 
42474
42634
  var throwTypeError = function () {
42475
42635
  throw new $TypeError();
@@ -42492,13 +42652,14 @@ var ThrowTypeError = $gOPD
42492
42652
  : throwTypeError;
42493
42653
 
42494
42654
  var hasSymbols = __webpack_require__(4039)();
42495
- var hasProto = __webpack_require__(24)();
42655
+ var getDunderProto = __webpack_require__(7176);
42496
42656
 
42497
- var getProto = Object.getPrototypeOf || (
42498
- hasProto
42499
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
42500
- : null
42501
- );
42657
+ var getProto = (typeof Reflect === 'function' && Reflect.getPrototypeOf)
42658
+ || $Object.getPrototypeOf
42659
+ || getDunderProto;
42660
+
42661
+ var $apply = __webpack_require__(1002);
42662
+ var $call = __webpack_require__(76);
42502
42663
 
42503
42664
  var needsEval = {};
42504
42665
 
@@ -42545,7 +42706,8 @@ var INTRINSICS = {
42545
42706
  '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
42546
42707
  '%Math%': Math,
42547
42708
  '%Number%': Number,
42548
- '%Object%': Object,
42709
+ '%Object%': $Object,
42710
+ '%Object.getOwnPropertyDescriptor%': $gOPD,
42549
42711
  '%parseFloat%': parseFloat,
42550
42712
  '%parseInt%': parseInt,
42551
42713
  '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
@@ -42571,7 +42733,16 @@ var INTRINSICS = {
42571
42733
  '%URIError%': $URIError,
42572
42734
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
42573
42735
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
42574
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
42736
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,
42737
+
42738
+ '%Function.prototype.call%': $call,
42739
+ '%Function.prototype.apply%': $apply,
42740
+ '%Object.defineProperty%': $defineProperty,
42741
+ '%Math.abs%': abs,
42742
+ '%Math.floor%': floor,
42743
+ '%Math.max%': max,
42744
+ '%Math.min%': min,
42745
+ '%Math.pow%': pow
42575
42746
  };
42576
42747
 
42577
42748
  if (getProto) {
@@ -42666,11 +42837,11 @@ var LEGACY_ALIASES = {
42666
42837
 
42667
42838
  var bind = __webpack_require__(6743);
42668
42839
  var hasOwn = __webpack_require__(9957);
42669
- var $concat = bind.call(Function.call, Array.prototype.concat);
42670
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
42671
- var $replace = bind.call(Function.call, String.prototype.replace);
42672
- var $strSlice = bind.call(Function.call, String.prototype.slice);
42673
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
42840
+ var $concat = bind.call($call, Array.prototype.concat);
42841
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
42842
+ var $replace = bind.call($call, String.prototype.replace);
42843
+ var $strSlice = bind.call($call, String.prototype.slice);
42844
+ var $exec = bind.call($call, RegExp.prototype.exec);
42674
42845
 
42675
42846
  /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
42676
42847
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
@@ -42802,6 +42973,18 @@ module.exports = function GetIntrinsic(name, allowMissing) {
42802
42973
  };
42803
42974
 
42804
42975
 
42976
+ /***/ }),
42977
+
42978
+ /***/ 6549:
42979
+ /***/ ((module) => {
42980
+
42981
+ "use strict";
42982
+
42983
+
42984
+ /** @type {import('./gOPD')} */
42985
+ module.exports = Object.getOwnPropertyDescriptor;
42986
+
42987
+
42805
42988
  /***/ }),
42806
42989
 
42807
42990
  /***/ 5795:
@@ -42810,9 +42993,8 @@ module.exports = function GetIntrinsic(name, allowMissing) {
42810
42993
  "use strict";
42811
42994
 
42812
42995
 
42813
- var GetIntrinsic = __webpack_require__(453);
42814
-
42815
- var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
42996
+ /** @type {import('.')} */
42997
+ var $gOPD = __webpack_require__(6549);
42816
42998
 
42817
42999
  if ($gOPD) {
42818
43000
  try {
@@ -42856,29 +43038,6 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
42856
43038
  module.exports = hasPropertyDescriptors;
42857
43039
 
42858
43040
 
42859
- /***/ }),
42860
-
42861
- /***/ 24:
42862
- /***/ ((module) => {
42863
-
42864
- "use strict";
42865
-
42866
-
42867
- var test = {
42868
- __proto__: null,
42869
- foo: {}
42870
- };
42871
-
42872
- var $Object = Object;
42873
-
42874
- /** @type {import('.')} */
42875
- module.exports = function hasProto() {
42876
- // @ts-expect-error: TS errors on an inherited property for some reason
42877
- return { __proto__: test }.foo === test.foo
42878
- && !(test instanceof $Object);
42879
- };
42880
-
42881
-
42882
43041
  /***/ }),
42883
43042
 
42884
43043
  /***/ 4039:
@@ -42890,6 +43049,7 @@ module.exports = function hasProto() {
42890
43049
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
42891
43050
  var hasSymbolSham = __webpack_require__(1333);
42892
43051
 
43052
+ /** @type {import('.')} */
42893
43053
  module.exports = function hasNativeSymbols() {
42894
43054
  if (typeof origSymbol !== 'function') { return false; }
42895
43055
  if (typeof Symbol !== 'function') { return false; }
@@ -42908,11 +43068,13 @@ module.exports = function hasNativeSymbols() {
42908
43068
  "use strict";
42909
43069
 
42910
43070
 
43071
+ /** @type {import('./shams')} */
42911
43072
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
42912
43073
  module.exports = function hasSymbols() {
42913
43074
  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
42914
43075
  if (typeof Symbol.iterator === 'symbol') { return true; }
42915
43076
 
43077
+ /** @type {{ [k in symbol]?: unknown }} */
42916
43078
  var obj = {};
42917
43079
  var sym = Symbol('test');
42918
43080
  var symObj = Object(sym);
@@ -42931,7 +43093,7 @@ module.exports = function hasSymbols() {
42931
43093
 
42932
43094
  var symVal = 42;
42933
43095
  obj[sym] = symVal;
42934
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
43096
+ for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
42935
43097
  if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
42936
43098
 
42937
43099
  if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
@@ -42942,7 +43104,8 @@ module.exports = function hasSymbols() {
42942
43104
  if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
42943
43105
 
42944
43106
  if (typeof Object.getOwnPropertyDescriptor === 'function') {
42945
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
43107
+ // eslint-disable-next-line no-extra-parens
43108
+ var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
42946
43109
  if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
42947
43110
  }
42948
43111
 
@@ -43155,35 +43318,46 @@ if (typeof Object.create === 'function') {
43155
43318
 
43156
43319
 
43157
43320
  var hasToStringTag = __webpack_require__(9092)();
43158
- var callBound = __webpack_require__(8075);
43321
+ var callBound = __webpack_require__(6556);
43159
43322
 
43160
43323
  var $toString = callBound('Object.prototype.toString');
43161
43324
 
43325
+ /** @type {import('.')} */
43162
43326
  var isStandardArguments = function isArguments(value) {
43163
- if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
43327
+ if (
43328
+ hasToStringTag
43329
+ && value
43330
+ && typeof value === 'object'
43331
+ && Symbol.toStringTag in value
43332
+ ) {
43164
43333
  return false;
43165
43334
  }
43166
43335
  return $toString(value) === '[object Arguments]';
43167
43336
  };
43168
43337
 
43338
+ /** @type {import('.')} */
43169
43339
  var isLegacyArguments = function isArguments(value) {
43170
43340
  if (isStandardArguments(value)) {
43171
43341
  return true;
43172
43342
  }
43173
- return value !== null &&
43174
- typeof value === 'object' &&
43175
- typeof value.length === 'number' &&
43176
- value.length >= 0 &&
43177
- $toString(value) !== '[object Array]' &&
43178
- $toString(value.callee) === '[object Function]';
43343
+ return value !== null
43344
+ && typeof value === 'object'
43345
+ && 'length' in value
43346
+ && typeof value.length === 'number'
43347
+ && value.length >= 0
43348
+ && $toString(value) !== '[object Array]'
43349
+ && 'callee' in value
43350
+ && $toString(value.callee) === '[object Function]';
43179
43351
  };
43180
43352
 
43181
43353
  var supportsStandardArguments = (function () {
43182
43354
  return isStandardArguments(arguments);
43183
43355
  }());
43184
43356
 
43357
+ // @ts-expect-error TODO make this not error
43185
43358
  isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
43186
43359
 
43360
+ /** @type {import('.')} */
43187
43361
  module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
43188
43362
 
43189
43363
 
@@ -43358,6 +43532,66 @@ module.exports = function isTypedArray(value) {
43358
43532
  };
43359
43533
 
43360
43534
 
43535
+ /***/ }),
43536
+
43537
+ /***/ 1514:
43538
+ /***/ ((module) => {
43539
+
43540
+ "use strict";
43541
+
43542
+
43543
+ /** @type {import('./abs')} */
43544
+ module.exports = Math.abs;
43545
+
43546
+
43547
+ /***/ }),
43548
+
43549
+ /***/ 8968:
43550
+ /***/ ((module) => {
43551
+
43552
+ "use strict";
43553
+
43554
+
43555
+ /** @type {import('./abs')} */
43556
+ module.exports = Math.floor;
43557
+
43558
+
43559
+ /***/ }),
43560
+
43561
+ /***/ 6188:
43562
+ /***/ ((module) => {
43563
+
43564
+ "use strict";
43565
+
43566
+
43567
+ /** @type {import('./max')} */
43568
+ module.exports = Math.max;
43569
+
43570
+
43571
+ /***/ }),
43572
+
43573
+ /***/ 8002:
43574
+ /***/ ((module) => {
43575
+
43576
+ "use strict";
43577
+
43578
+
43579
+ /** @type {import('./min')} */
43580
+ module.exports = Math.min;
43581
+
43582
+
43583
+ /***/ }),
43584
+
43585
+ /***/ 5880:
43586
+ /***/ ((module) => {
43587
+
43588
+ "use strict";
43589
+
43590
+
43591
+ /** @type {import('./pow')} */
43592
+ module.exports = Math.pow;
43593
+
43594
+
43361
43595
  /***/ }),
43362
43596
 
43363
43597
  /***/ 8859:
@@ -44074,7 +44308,8 @@ var parseValues = function parseQueryStringValues(str, options) {
44074
44308
  var bracketEqualsPos = part.indexOf(']=');
44075
44309
  var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
44076
44310
 
44077
- var key, val;
44311
+ var key;
44312
+ var val;
44078
44313
  if (pos === -1) {
44079
44314
  key = options.decoder(part, defaults.decoder, charset, 'key');
44080
44315
  val = options.strictNullHandling ? null : '';
@@ -44089,7 +44324,7 @@ var parseValues = function parseQueryStringValues(str, options) {
44089
44324
  }
44090
44325
 
44091
44326
  if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
44092
- val = interpretNumericEntities(val);
44327
+ val = interpretNumericEntities(String(val));
44093
44328
  }
44094
44329
 
44095
44330
  if (part.indexOf('[]=') > -1) {
@@ -44119,7 +44354,7 @@ var parseObject = function (chain, val, options, valuesParsed) {
44119
44354
  ? []
44120
44355
  : [].concat(leaf);
44121
44356
  } else {
44122
- obj = options.plainObjects ? Object.create(null) : {};
44357
+ obj = options.plainObjects ? { __proto__: null } : {};
44123
44358
  var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
44124
44359
  var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
44125
44360
  var index = parseInt(decodedRoot, 10);
@@ -44261,11 +44496,11 @@ module.exports = function (str, opts) {
44261
44496
  var options = normalizeParseOptions(opts);
44262
44497
 
44263
44498
  if (str === '' || str === null || typeof str === 'undefined') {
44264
- return options.plainObjects ? Object.create(null) : {};
44499
+ return options.plainObjects ? { __proto__: null } : {};
44265
44500
  }
44266
44501
 
44267
44502
  var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
44268
- var obj = options.plainObjects ? Object.create(null) : {};
44503
+ var obj = options.plainObjects ? { __proto__: null } : {};
44269
44504
 
44270
44505
  // Iterate over the keys and setup the new object
44271
44506
 
@@ -44326,11 +44561,13 @@ var defaults = {
44326
44561
  arrayFormat: 'indices',
44327
44562
  charset: 'utf-8',
44328
44563
  charsetSentinel: false,
44564
+ commaRoundTrip: false,
44329
44565
  delimiter: '&',
44330
44566
  encode: true,
44331
44567
  encodeDotInKeys: false,
44332
44568
  encoder: utils.encode,
44333
44569
  encodeValuesOnly: false,
44570
+ filter: void undefined,
44334
44571
  format: defaultFormat,
44335
44572
  formatter: formats.formatters[defaultFormat],
44336
44573
  // deprecated
@@ -44442,7 +44679,7 @@ var stringify = function stringify(
44442
44679
  objKeys = sort ? keys.sort(sort) : keys;
44443
44680
  }
44444
44681
 
44445
- var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix;
44682
+ var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix);
44446
44683
 
44447
44684
  var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
44448
44685
 
@@ -44452,13 +44689,15 @@ var stringify = function stringify(
44452
44689
 
44453
44690
  for (var j = 0; j < objKeys.length; ++j) {
44454
44691
  var key = objKeys[j];
44455
- var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
44692
+ var value = typeof key === 'object' && key && typeof key.value !== 'undefined'
44693
+ ? key.value
44694
+ : obj[key];
44456
44695
 
44457
44696
  if (skipNulls && value === null) {
44458
44697
  continue;
44459
44698
  }
44460
44699
 
44461
- var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
44700
+ var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key);
44462
44701
  var keyPrefix = isArray(obj)
44463
44702
  ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix
44464
44703
  : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
@@ -44549,7 +44788,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
44549
44788
  arrayFormat: arrayFormat,
44550
44789
  charset: charset,
44551
44790
  charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
44552
- commaRoundTrip: opts.commaRoundTrip,
44791
+ commaRoundTrip: !!opts.commaRoundTrip,
44553
44792
  delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
44554
44793
  encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
44555
44794
  encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
@@ -44600,12 +44839,13 @@ module.exports = function (object, opts) {
44600
44839
  var sideChannel = getSideChannel();
44601
44840
  for (var i = 0; i < objKeys.length; ++i) {
44602
44841
  var key = objKeys[i];
44842
+ var value = obj[key];
44603
44843
 
44604
- if (options.skipNulls && obj[key] === null) {
44844
+ if (options.skipNulls && value === null) {
44605
44845
  continue;
44606
44846
  }
44607
44847
  pushToArray(keys, stringify(
44608
- obj[key],
44848
+ value,
44609
44849
  key,
44610
44850
  generateArrayPrefix,
44611
44851
  commaRoundTrip,
@@ -44685,7 +44925,7 @@ var compactQueue = function compactQueue(queue) {
44685
44925
  };
44686
44926
 
44687
44927
  var arrayToObject = function arrayToObject(source, options) {
44688
- var obj = options && options.plainObjects ? Object.create(null) : {};
44928
+ var obj = options && options.plainObjects ? { __proto__: null } : {};
44689
44929
  for (var i = 0; i < source.length; ++i) {
44690
44930
  if (typeof source[i] !== 'undefined') {
44691
44931
  obj[i] = source[i];
@@ -44701,11 +44941,14 @@ var merge = function merge(target, source, options) {
44701
44941
  return target;
44702
44942
  }
44703
44943
 
44704
- if (typeof source !== 'object') {
44944
+ if (typeof source !== 'object' && typeof source !== 'function') {
44705
44945
  if (isArray(target)) {
44706
44946
  target.push(source);
44707
44947
  } else if (target && typeof target === 'object') {
44708
- if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
44948
+ if (
44949
+ (options && (options.plainObjects || options.allowPrototypes))
44950
+ || !has.call(Object.prototype, source)
44951
+ ) {
44709
44952
  target[source] = true;
44710
44953
  }
44711
44954
  } else {
@@ -44759,7 +45002,7 @@ var assign = function assignSingleSource(target, source) {
44759
45002
  }, target);
44760
45003
  };
44761
45004
 
44762
- var decode = function (str, decoder, charset) {
45005
+ var decode = function (str, defaultDecoder, charset) {
44763
45006
  var strWithoutPlus = str.replace(/\+/g, ' ');
44764
45007
  if (charset === 'iso-8859-1') {
44765
45008
  // unescape never throws, no try...catch needed:
@@ -48868,137 +49111,340 @@ module.exports = Sha512
48868
49111
 
48869
49112
  /***/ }),
48870
49113
 
48871
- /***/ 920:
49114
+ /***/ 4803:
48872
49115
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
48873
49116
 
48874
49117
  "use strict";
48875
49118
 
48876
49119
 
48877
- var GetIntrinsic = __webpack_require__(453);
48878
- var callBound = __webpack_require__(8075);
48879
49120
  var inspect = __webpack_require__(8859);
48880
49121
 
48881
49122
  var $TypeError = __webpack_require__(9675);
48882
- var $WeakMap = GetIntrinsic('%WeakMap%', true);
48883
- var $Map = GetIntrinsic('%Map%', true);
48884
-
48885
- var $weakMapGet = callBound('WeakMap.prototype.get', true);
48886
- var $weakMapSet = callBound('WeakMap.prototype.set', true);
48887
- var $weakMapHas = callBound('WeakMap.prototype.has', true);
48888
- var $mapGet = callBound('Map.prototype.get', true);
48889
- var $mapSet = callBound('Map.prototype.set', true);
48890
- var $mapHas = callBound('Map.prototype.has', true);
48891
49123
 
48892
49124
  /*
48893
49125
  * This function traverses the list returning the node corresponding to the given key.
48894
49126
  *
48895
- * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
49127
+ * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
49128
+ * By doing so, all the recently used nodes can be accessed relatively quickly.
48896
49129
  */
48897
- /** @type {import('.').listGetNode} */
48898
- var listGetNode = function (list, key) { // eslint-disable-line consistent-return
49130
+ /** @type {import('./list.d.ts').listGetNode} */
49131
+ // eslint-disable-next-line consistent-return
49132
+ var listGetNode = function (list, key, isDelete) {
48899
49133
  /** @type {typeof list | NonNullable<(typeof list)['next']>} */
48900
49134
  var prev = list;
48901
49135
  /** @type {(typeof list)['next']} */
48902
49136
  var curr;
48903
- for (; (curr = prev.next) !== null; prev = curr) {
49137
+ // eslint-disable-next-line eqeqeq
49138
+ for (; (curr = prev.next) != null; prev = curr) {
48904
49139
  if (curr.key === key) {
48905
49140
  prev.next = curr.next;
48906
- // eslint-disable-next-line no-extra-parens
48907
- curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
48908
- list.next = curr; // eslint-disable-line no-param-reassign
49141
+ if (!isDelete) {
49142
+ // eslint-disable-next-line no-extra-parens
49143
+ curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
49144
+ list.next = curr; // eslint-disable-line no-param-reassign
49145
+ }
48909
49146
  return curr;
48910
49147
  }
48911
49148
  }
48912
49149
  };
48913
49150
 
48914
- /** @type {import('.').listGet} */
49151
+ /** @type {import('./list.d.ts').listGet} */
48915
49152
  var listGet = function (objects, key) {
49153
+ if (!objects) {
49154
+ return void undefined;
49155
+ }
48916
49156
  var node = listGetNode(objects, key);
48917
49157
  return node && node.value;
48918
49158
  };
48919
- /** @type {import('.').listSet} */
49159
+ /** @type {import('./list.d.ts').listSet} */
48920
49160
  var listSet = function (objects, key, value) {
48921
49161
  var node = listGetNode(objects, key);
48922
49162
  if (node) {
48923
49163
  node.value = value;
48924
49164
  } else {
48925
49165
  // Prepend the new node to the beginning of the list
48926
- objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
49166
+ objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
48927
49167
  key: key,
48928
49168
  next: objects.next,
48929
49169
  value: value
48930
49170
  });
48931
49171
  }
48932
49172
  };
48933
- /** @type {import('.').listHas} */
49173
+ /** @type {import('./list.d.ts').listHas} */
48934
49174
  var listHas = function (objects, key) {
49175
+ if (!objects) {
49176
+ return false;
49177
+ }
48935
49178
  return !!listGetNode(objects, key);
48936
49179
  };
49180
+ /** @type {import('./list.d.ts').listDelete} */
49181
+ // eslint-disable-next-line consistent-return
49182
+ var listDelete = function (objects, key) {
49183
+ if (objects) {
49184
+ return listGetNode(objects, key, true);
49185
+ }
49186
+ };
48937
49187
 
48938
49188
  /** @type {import('.')} */
48939
- module.exports = function getSideChannel() {
48940
- /** @type {WeakMap<object, unknown>} */ var $wm;
48941
- /** @type {Map<object, unknown>} */ var $m;
48942
- /** @type {import('.').RootNode<unknown>} */ var $o;
49189
+ module.exports = function getSideChannelList() {
49190
+ /** @typedef {ReturnType<typeof getSideChannelList>} Channel */
49191
+ /** @typedef {Parameters<Channel['get']>[0]} K */
49192
+ /** @typedef {Parameters<Channel['set']>[1]} V */
49193
+
49194
+ /** @type {import('./list.d.ts').RootNode<V, K> | undefined} */ var $o;
48943
49195
 
48944
- /** @type {import('.').Channel} */
49196
+ /** @type {Channel} */
48945
49197
  var channel = {
48946
49198
  assert: function (key) {
48947
49199
  if (!channel.has(key)) {
48948
49200
  throw new $TypeError('Side channel does not contain ' + inspect(key));
48949
49201
  }
48950
49202
  },
48951
- get: function (key) { // eslint-disable-line consistent-return
48952
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
48953
- if ($wm) {
48954
- return $weakMapGet($wm, key);
48955
- }
48956
- } else if ($Map) {
48957
- if ($m) {
48958
- return $mapGet($m, key);
48959
- }
48960
- } else {
48961
- if ($o) { // eslint-disable-line no-lonely-if
48962
- return listGet($o, key);
48963
- }
49203
+ 'delete': function (key) {
49204
+ var root = $o && $o.next;
49205
+ var deletedNode = listDelete($o, key);
49206
+ if (deletedNode && root && root === deletedNode) {
49207
+ $o = void undefined;
48964
49208
  }
49209
+ return !!deletedNode;
49210
+ },
49211
+ get: function (key) {
49212
+ return listGet($o, key);
48965
49213
  },
48966
49214
  has: function (key) {
48967
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
48968
- if ($wm) {
48969
- return $weakMapHas($wm, key);
48970
- }
48971
- } else if ($Map) {
48972
- if ($m) {
48973
- return $mapHas($m, key);
48974
- }
48975
- } else {
48976
- if ($o) { // eslint-disable-line no-lonely-if
48977
- return listHas($o, key);
49215
+ return listHas($o, key);
49216
+ },
49217
+ set: function (key, value) {
49218
+ if (!$o) {
49219
+ // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
49220
+ $o = {
49221
+ next: void undefined
49222
+ };
49223
+ }
49224
+ // eslint-disable-next-line no-extra-parens
49225
+ listSet(/** @type {NonNullable<typeof $o>} */ ($o), key, value);
49226
+ }
49227
+ };
49228
+ // @ts-expect-error TODO: figure out why this is erroring
49229
+ return channel;
49230
+ };
49231
+
49232
+
49233
+ /***/ }),
49234
+
49235
+ /***/ 507:
49236
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
49237
+
49238
+ "use strict";
49239
+
49240
+
49241
+ var GetIntrinsic = __webpack_require__(453);
49242
+ var callBound = __webpack_require__(6556);
49243
+ var inspect = __webpack_require__(8859);
49244
+
49245
+ var $TypeError = __webpack_require__(9675);
49246
+ var $Map = GetIntrinsic('%Map%', true);
49247
+
49248
+ /** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
49249
+ var $mapGet = callBound('Map.prototype.get', true);
49250
+ /** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
49251
+ var $mapSet = callBound('Map.prototype.set', true);
49252
+ /** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
49253
+ var $mapHas = callBound('Map.prototype.has', true);
49254
+ /** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
49255
+ var $mapDelete = callBound('Map.prototype.delete', true);
49256
+ /** @type {<K, V>(thisArg: Map<K, V>) => number} */
49257
+ var $mapSize = callBound('Map.prototype.size', true);
49258
+
49259
+ /** @type {import('.')} */
49260
+ module.exports = !!$Map && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
49261
+ /** @typedef {ReturnType<typeof getSideChannelMap>} Channel */
49262
+ /** @typedef {Parameters<Channel['get']>[0]} K */
49263
+ /** @typedef {Parameters<Channel['set']>[1]} V */
49264
+
49265
+ /** @type {Map<K, V> | undefined} */ var $m;
49266
+
49267
+ /** @type {Channel} */
49268
+ var channel = {
49269
+ assert: function (key) {
49270
+ if (!channel.has(key)) {
49271
+ throw new $TypeError('Side channel does not contain ' + inspect(key));
49272
+ }
49273
+ },
49274
+ 'delete': function (key) {
49275
+ if ($m) {
49276
+ var result = $mapDelete($m, key);
49277
+ if ($mapSize($m) === 0) {
49278
+ $m = void undefined;
48978
49279
  }
49280
+ return result;
49281
+ }
49282
+ return false;
49283
+ },
49284
+ get: function (key) { // eslint-disable-line consistent-return
49285
+ if ($m) {
49286
+ return $mapGet($m, key);
49287
+ }
49288
+ },
49289
+ has: function (key) {
49290
+ if ($m) {
49291
+ return $mapHas($m, key);
48979
49292
  }
48980
49293
  return false;
48981
49294
  },
48982
49295
  set: function (key, value) {
48983
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
48984
- if (!$wm) {
48985
- $wm = new $WeakMap();
49296
+ if (!$m) {
49297
+ // @ts-expect-error TS can't handle narrowing a variable inside a closure
49298
+ $m = new $Map();
49299
+ }
49300
+ $mapSet($m, key, value);
49301
+ }
49302
+ };
49303
+
49304
+ // @ts-expect-error TODO: figure out why TS is erroring here
49305
+ return channel;
49306
+ };
49307
+
49308
+
49309
+ /***/ }),
49310
+
49311
+ /***/ 2271:
49312
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
49313
+
49314
+ "use strict";
49315
+
49316
+
49317
+ var GetIntrinsic = __webpack_require__(453);
49318
+ var callBound = __webpack_require__(6556);
49319
+ var inspect = __webpack_require__(8859);
49320
+ var getSideChannelMap = __webpack_require__(507);
49321
+
49322
+ var $TypeError = __webpack_require__(9675);
49323
+ var $WeakMap = GetIntrinsic('%WeakMap%', true);
49324
+
49325
+ /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
49326
+ var $weakMapGet = callBound('WeakMap.prototype.get', true);
49327
+ /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
49328
+ var $weakMapSet = callBound('WeakMap.prototype.set', true);
49329
+ /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
49330
+ var $weakMapHas = callBound('WeakMap.prototype.has', true);
49331
+ /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
49332
+ var $weakMapDelete = callBound('WeakMap.prototype.delete', true);
49333
+
49334
+ /** @type {import('.')} */
49335
+ module.exports = $WeakMap
49336
+ ? /** @type {Exclude<import('.'), false>} */ function getSideChannelWeakMap() {
49337
+ /** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel */
49338
+ /** @typedef {Parameters<Channel['get']>[0]} K */
49339
+ /** @typedef {Parameters<Channel['set']>[1]} V */
49340
+
49341
+ /** @type {WeakMap<K & object, V> | undefined} */ var $wm;
49342
+ /** @type {Channel | undefined} */ var $m;
49343
+
49344
+ /** @type {Channel} */
49345
+ var channel = {
49346
+ assert: function (key) {
49347
+ if (!channel.has(key)) {
49348
+ throw new $TypeError('Side channel does not contain ' + inspect(key));
48986
49349
  }
48987
- $weakMapSet($wm, key, value);
48988
- } else if ($Map) {
48989
- if (!$m) {
48990
- $m = new $Map();
49350
+ },
49351
+ 'delete': function (key) {
49352
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
49353
+ if ($wm) {
49354
+ return $weakMapDelete($wm, key);
49355
+ }
49356
+ } else if (getSideChannelMap) {
49357
+ if ($m) {
49358
+ return $m['delete'](key);
49359
+ }
48991
49360
  }
48992
- $mapSet($m, key, value);
48993
- } else {
48994
- if (!$o) {
48995
- // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
48996
- $o = { key: {}, next: null };
49361
+ return false;
49362
+ },
49363
+ get: function (key) {
49364
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
49365
+ if ($wm) {
49366
+ return $weakMapGet($wm, key);
49367
+ }
49368
+ }
49369
+ return $m && $m.get(key);
49370
+ },
49371
+ has: function (key) {
49372
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
49373
+ if ($wm) {
49374
+ return $weakMapHas($wm, key);
49375
+ }
49376
+ }
49377
+ return !!$m && $m.has(key);
49378
+ },
49379
+ set: function (key, value) {
49380
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
49381
+ if (!$wm) {
49382
+ $wm = new $WeakMap();
49383
+ }
49384
+ $weakMapSet($wm, key, value);
49385
+ } else if (getSideChannelMap) {
49386
+ if (!$m) {
49387
+ $m = getSideChannelMap();
49388
+ }
49389
+ // eslint-disable-next-line no-extra-parens
49390
+ /** @type {NonNullable<typeof $m>} */ ($m).set(key, value);
48997
49391
  }
48998
- listSet($o, key, value);
48999
49392
  }
49393
+ };
49394
+
49395
+ // @ts-expect-error TODO: figure out why this is erroring
49396
+ return channel;
49397
+ }
49398
+ : getSideChannelMap;
49399
+
49400
+
49401
+ /***/ }),
49402
+
49403
+ /***/ 920:
49404
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
49405
+
49406
+ "use strict";
49407
+
49408
+
49409
+ var $TypeError = __webpack_require__(9675);
49410
+ var inspect = __webpack_require__(8859);
49411
+ var getSideChannelList = __webpack_require__(4803);
49412
+ var getSideChannelMap = __webpack_require__(507);
49413
+ var getSideChannelWeakMap = __webpack_require__(2271);
49414
+
49415
+ var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
49416
+
49417
+ /** @type {import('.')} */
49418
+ module.exports = function getSideChannel() {
49419
+ /** @typedef {ReturnType<typeof getSideChannel>} Channel */
49420
+
49421
+ /** @type {Channel | undefined} */ var $channelData;
49422
+
49423
+ /** @type {Channel} */
49424
+ var channel = {
49425
+ assert: function (key) {
49426
+ if (!channel.has(key)) {
49427
+ throw new $TypeError('Side channel does not contain ' + inspect(key));
49428
+ }
49429
+ },
49430
+ 'delete': function (key) {
49431
+ return !!$channelData && $channelData['delete'](key);
49432
+ },
49433
+ get: function (key) {
49434
+ return $channelData && $channelData.get(key);
49435
+ },
49436
+ has: function (key) {
49437
+ return !!$channelData && $channelData.has(key);
49438
+ },
49439
+ set: function (key, value) {
49440
+ if (!$channelData) {
49441
+ $channelData = makeChannel();
49442
+ }
49443
+
49444
+ $channelData.set(key, value);
49000
49445
  }
49001
49446
  };
49447
+ // @ts-expect-error TODO: figure out why this is erroring
49002
49448
  return channel;
49003
49449
  };
49004
49450