@indfnd/utils 0.1.40 → 0.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.41](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.40...v0.1.41) (2026-03-24)
6
+
7
+
8
+ ### Features
9
+
10
+ * 修改token逻辑 ([8109018](http://git.inspur.com/imp-ec/ind-front/ind-utils/commit/81090187f9ede0e90635b73056318d3e5f899396))
11
+
5
12
  ### [0.1.40](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.39...v0.1.40) (2026-03-19)
6
13
 
7
14
 
@@ -3885,7 +3885,7 @@ var compactQueue = function compactQueue2(queue) {
3885
3885
  }
3886
3886
  };
3887
3887
  var arrayToObject = function arrayToObject2(source, options) {
3888
- var obj = options && options.plainObjects ? { __proto__: null } : {};
3888
+ var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
3889
3889
  for (var i = 0; i < source.length; ++i) {
3890
3890
  if (typeof source[i] !== "undefined") {
3891
3891
  obj[i] = source[i];
@@ -3897,7 +3897,7 @@ var merge = function merge2(target, source, options) {
3897
3897
  if (!source) {
3898
3898
  return target;
3899
3899
  }
3900
- if (typeof source !== "object" && typeof source !== "function") {
3900
+ if (typeof source !== "object") {
3901
3901
  if (isArray$3(target)) {
3902
3902
  target.push(source);
3903
3903
  } else if (target && typeof target === "object") {
@@ -3947,7 +3947,7 @@ var assign = function assignSingleSource(target, source) {
3947
3947
  return acc;
3948
3948
  }, target);
3949
3949
  };
3950
- var decode = function(str, defaultDecoder, charset) {
3950
+ var decode = function(str, decoder, charset) {
3951
3951
  var strWithoutPlus = str.replace(/\+/g, " ");
3952
3952
  if (charset === "iso-8859-1") {
3953
3953
  return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
@@ -3958,7 +3958,6 @@ var decode = function(str, defaultDecoder, charset) {
3958
3958
  return strWithoutPlus;
3959
3959
  }
3960
3960
  };
3961
- var limit = 1024;
3962
3961
  var encode = function encode2(str, defaultEncoder, charset, kind, format) {
3963
3962
  if (str.length === 0) {
3964
3963
  return str;
@@ -3975,32 +3974,27 @@ var encode = function encode2(str, defaultEncoder, charset, kind, format) {
3975
3974
  });
3976
3975
  }
3977
3976
  var out = "";
3978
- for (var j = 0; j < string.length; j += limit) {
3979
- var segment = string.length >= limit ? string.slice(j, j + limit) : string;
3980
- var arr = [];
3981
- for (var i = 0; i < segment.length; ++i) {
3982
- var c = segment.charCodeAt(i);
3983
- if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats$2.RFC1738 && (c === 40 || c === 41)) {
3984
- arr[arr.length] = segment.charAt(i);
3985
- continue;
3986
- }
3987
- if (c < 128) {
3988
- arr[arr.length] = hexTable[c];
3989
- continue;
3990
- }
3991
- if (c < 2048) {
3992
- arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63];
3993
- continue;
3994
- }
3995
- if (c < 55296 || c >= 57344) {
3996
- arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
3997
- continue;
3998
- }
3999
- i += 1;
4000
- c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023);
4001
- arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
3977
+ for (var i = 0; i < string.length; ++i) {
3978
+ var c = string.charCodeAt(i);
3979
+ if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats$2.RFC1738 && (c === 40 || c === 41)) {
3980
+ out += string.charAt(i);
3981
+ continue;
3982
+ }
3983
+ if (c < 128) {
3984
+ out = out + hexTable[c];
3985
+ continue;
3986
+ }
3987
+ if (c < 2048) {
3988
+ out = out + (hexTable[192 | c >> 6] + hexTable[128 | c & 63]);
3989
+ continue;
3990
+ }
3991
+ if (c < 55296 || c >= 57344) {
3992
+ out = out + (hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]);
3993
+ continue;
4002
3994
  }
4003
- out += arr.join("");
3995
+ i += 1;
3996
+ c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i) & 1023);
3997
+ out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
4004
3998
  }
4005
3999
  return out;
4006
4000
  };
@@ -4083,17 +4077,12 @@ var defaultFormat = formats$1["default"];
4083
4077
  var defaults$1 = {
4084
4078
  addQueryPrefix: false,
4085
4079
  allowDots: false,
4086
- allowEmptyArrays: false,
4087
- arrayFormat: "indices",
4088
4080
  charset: "utf-8",
4089
4081
  charsetSentinel: false,
4090
- commaRoundTrip: false,
4091
4082
  delimiter: "&",
4092
4083
  encode: true,
4093
- encodeDotInKeys: false,
4094
4084
  encoder: utils$1.encode,
4095
4085
  encodeValuesOnly: false,
4096
- filter: void 0,
4097
4086
  format: defaultFormat,
4098
4087
  formatter: formats$1.formatters[defaultFormat],
4099
4088
  indices: false,
@@ -4107,7 +4096,7 @@ var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
4107
4096
  return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
4108
4097
  };
4109
4098
  var sentinel = {};
4110
- var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate2, format, formatter, encodeValuesOnly, charset, sideChannel2) {
4099
+ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter2, sort, allowDots, serializeDate2, format, formatter, encodeValuesOnly, charset, sideChannel2) {
4111
4100
  var obj = object;
4112
4101
  var tmpSc = sideChannel2;
4113
4102
  var step = 0;
@@ -4167,19 +4156,14 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
4167
4156
  var keys = Object.keys(obj);
4168
4157
  objKeys = sort ? keys.sort(sort) : keys;
4169
4158
  }
4170
- var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix);
4171
- var adjustedPrefix = commaRoundTrip && isArray$2(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
4172
- if (allowEmptyArrays && isArray$2(obj) && obj.length === 0) {
4173
- return adjustedPrefix + "[]";
4174
- }
4159
+ var adjustedPrefix = commaRoundTrip && isArray$2(obj) && obj.length === 1 ? prefix + "[]" : prefix;
4175
4160
  for (var j = 0; j < objKeys.length; ++j) {
4176
4161
  var key = objKeys[j];
4177
- var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key];
4162
+ var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
4178
4163
  if (skipNulls && value === null) {
4179
4164
  continue;
4180
4165
  }
4181
- var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key);
4182
- var keyPrefix = isArray$2(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]");
4166
+ var keyPrefix = isArray$2(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + key : "[" + key + "]");
4183
4167
  sideChannel2.set(object, step);
4184
4168
  var valueSideChannel = getSideChannel2();
4185
4169
  valueSideChannel.set(sentinel, sideChannel2);
@@ -4188,10 +4172,8 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
4188
4172
  keyPrefix,
4189
4173
  generateArrayPrefix,
4190
4174
  commaRoundTrip,
4191
- allowEmptyArrays,
4192
4175
  strictNullHandling,
4193
4176
  skipNulls,
4194
- encodeDotInKeys,
4195
4177
  generateArrayPrefix === "comma" && encodeValuesOnly && isArray$2(obj) ? null : encoder,
4196
4178
  filter2,
4197
4179
  sort,
@@ -4210,12 +4192,6 @@ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
4210
4192
  if (!opts) {
4211
4193
  return defaults$1;
4212
4194
  }
4213
- if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
4214
- throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
4215
- }
4216
- if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") {
4217
- throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
4218
- }
4219
4195
  if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
4220
4196
  throw new TypeError("Encoder has to be a function.");
4221
4197
  }
@@ -4235,29 +4211,13 @@ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
4235
4211
  if (typeof opts.filter === "function" || isArray$2(opts.filter)) {
4236
4212
  filter2 = opts.filter;
4237
4213
  }
4238
- var arrayFormat;
4239
- if (opts.arrayFormat in arrayPrefixGenerators) {
4240
- arrayFormat = opts.arrayFormat;
4241
- } else if ("indices" in opts) {
4242
- arrayFormat = opts.indices ? "indices" : "repeat";
4243
- } else {
4244
- arrayFormat = defaults$1.arrayFormat;
4245
- }
4246
- if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
4247
- throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
4248
- }
4249
- var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults$1.allowDots : !!opts.allowDots;
4250
4214
  return {
4251
4215
  addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
4252
- allowDots,
4253
- allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults$1.allowEmptyArrays,
4254
- arrayFormat,
4216
+ allowDots: typeof opts.allowDots === "undefined" ? defaults$1.allowDots : !!opts.allowDots,
4255
4217
  charset,
4256
4218
  charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults$1.charsetSentinel,
4257
- commaRoundTrip: !!opts.commaRoundTrip,
4258
4219
  delimiter: typeof opts.delimiter === "undefined" ? defaults$1.delimiter : opts.delimiter,
4259
4220
  encode: typeof opts.encode === "boolean" ? opts.encode : defaults$1.encode,
4260
- encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults$1.encodeDotInKeys,
4261
4221
  encoder: typeof opts.encoder === "function" ? opts.encoder : defaults$1.encoder,
4262
4222
  encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
4263
4223
  filter: filter2,
@@ -4285,8 +4245,19 @@ var stringify_1 = function(object, opts) {
4285
4245
  if (typeof obj !== "object" || obj === null) {
4286
4246
  return "";
4287
4247
  }
4288
- var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
4289
- var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip;
4248
+ var arrayFormat;
4249
+ if (opts && opts.arrayFormat in arrayPrefixGenerators) {
4250
+ arrayFormat = opts.arrayFormat;
4251
+ } else if (opts && "indices" in opts) {
4252
+ arrayFormat = opts.indices ? "indices" : "repeat";
4253
+ } else {
4254
+ arrayFormat = "indices";
4255
+ }
4256
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
4257
+ if (opts && "commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
4258
+ throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
4259
+ }
4260
+ var commaRoundTrip = generateArrayPrefix === "comma" && opts && opts.commaRoundTrip;
4290
4261
  if (!objKeys) {
4291
4262
  objKeys = Object.keys(obj);
4292
4263
  }
@@ -4296,19 +4267,16 @@ var stringify_1 = function(object, opts) {
4296
4267
  var sideChannel2 = getSideChannel2();
4297
4268
  for (var i = 0; i < objKeys.length; ++i) {
4298
4269
  var key = objKeys[i];
4299
- var value = obj[key];
4300
- if (options.skipNulls && value === null) {
4270
+ if (options.skipNulls && obj[key] === null) {
4301
4271
  continue;
4302
4272
  }
4303
4273
  pushToArray(keys, stringify$1(
4304
- value,
4274
+ obj[key],
4305
4275
  key,
4306
4276
  generateArrayPrefix,
4307
4277
  commaRoundTrip,
4308
- options.allowEmptyArrays,
4309
4278
  options.strictNullHandling,
4310
4279
  options.skipNulls,
4311
- options.encodeDotInKeys,
4312
4280
  options.encode ? options.encoder : null,
4313
4281
  options.filter,
4314
4282
  options.sort,
@@ -4337,39 +4305,31 @@ var has = Object.prototype.hasOwnProperty;
4337
4305
  var isArray$1 = Array.isArray;
4338
4306
  var defaults = {
4339
4307
  allowDots: false,
4340
- allowEmptyArrays: false,
4341
4308
  allowPrototypes: false,
4342
4309
  allowSparse: false,
4343
4310
  arrayLimit: 20,
4344
4311
  charset: "utf-8",
4345
4312
  charsetSentinel: false,
4346
4313
  comma: false,
4347
- decodeDotInKeys: false,
4348
4314
  decoder: utils.decode,
4349
4315
  delimiter: "&",
4350
4316
  depth: 5,
4351
- duplicates: "combine",
4352
4317
  ignoreQueryPrefix: false,
4353
4318
  interpretNumericEntities: false,
4354
4319
  parameterLimit: 1e3,
4355
4320
  parseArrays: true,
4356
4321
  plainObjects: false,
4357
- strictDepth: false,
4358
- strictNullHandling: false,
4359
- throwOnLimitExceeded: false
4322
+ strictNullHandling: false
4360
4323
  };
4361
4324
  var interpretNumericEntities = function(str) {
4362
4325
  return str.replace(/&#(\d+);/g, function($0, numberStr) {
4363
4326
  return String.fromCharCode(parseInt(numberStr, 10));
4364
4327
  });
4365
4328
  };
4366
- var parseArrayValue = function(val, options, currentArrayLength) {
4329
+ var parseArrayValue = function(val, options) {
4367
4330
  if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
4368
4331
  return val.split(",");
4369
4332
  }
4370
- if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
4371
- throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
4372
- }
4373
4333
  return val;
4374
4334
  };
4375
4335
  var isoSentinel = "utf8=%26%2310003%3B";
@@ -4377,15 +4337,8 @@ var charsetSentinel = "utf8=%E2%9C%93";
4377
4337
  var parseValues = function parseQueryStringValues(str, options) {
4378
4338
  var obj = { __proto__: null };
4379
4339
  var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
4380
- cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
4381
- var limit2 = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
4382
- var parts = cleanStr.split(
4383
- options.delimiter,
4384
- options.throwOnLimitExceeded ? limit2 + 1 : limit2
4385
- );
4386
- if (options.throwOnLimitExceeded && parts.length > limit2) {
4387
- throw new RangeError("Parameter limit exceeded. Only " + limit2 + " parameter" + (limit2 === 1 ? "" : "s") + " allowed.");
4388
- }
4340
+ var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
4341
+ var parts = cleanStr.split(options.delimiter, limit);
4389
4342
  var skipIndex = -1;
4390
4343
  var i;
4391
4344
  var charset = options.charset;
@@ -4409,63 +4362,51 @@ var parseValues = function parseQueryStringValues(str, options) {
4409
4362
  var part = parts[i];
4410
4363
  var bracketEqualsPos = part.indexOf("]=");
4411
4364
  var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
4412
- var key;
4413
- var val;
4365
+ var key, val;
4414
4366
  if (pos === -1) {
4415
4367
  key = options.decoder(part, defaults.decoder, charset, "key");
4416
4368
  val = options.strictNullHandling ? null : "";
4417
4369
  } else {
4418
4370
  key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
4419
4371
  val = utils.maybeMap(
4420
- parseArrayValue(
4421
- part.slice(pos + 1),
4422
- options,
4423
- isArray$1(obj[key]) ? obj[key].length : 0
4424
- ),
4372
+ parseArrayValue(part.slice(pos + 1), options),
4425
4373
  function(encodedVal) {
4426
4374
  return options.decoder(encodedVal, defaults.decoder, charset, "value");
4427
4375
  }
4428
4376
  );
4429
4377
  }
4430
4378
  if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
4431
- val = interpretNumericEntities(String(val));
4379
+ val = interpretNumericEntities(val);
4432
4380
  }
4433
4381
  if (part.indexOf("[]=") > -1) {
4434
4382
  val = isArray$1(val) ? [val] : val;
4435
4383
  }
4436
- var existing = has.call(obj, key);
4437
- if (existing && options.duplicates === "combine") {
4384
+ if (has.call(obj, key)) {
4438
4385
  obj[key] = utils.combine(obj[key], val);
4439
- } else if (!existing || options.duplicates === "last") {
4386
+ } else {
4440
4387
  obj[key] = val;
4441
4388
  }
4442
4389
  }
4443
4390
  return obj;
4444
4391
  };
4445
4392
  var parseObject = function(chain, val, options, valuesParsed) {
4446
- var currentArrayLength = 0;
4447
- if (chain.length > 0 && chain[chain.length - 1] === "[]") {
4448
- var parentKey = chain.slice(0, -1).join("");
4449
- currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
4450
- }
4451
- var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
4393
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
4452
4394
  for (var i = chain.length - 1; i >= 0; --i) {
4453
4395
  var obj;
4454
4396
  var root = chain[i];
4455
4397
  if (root === "[]" && options.parseArrays) {
4456
- obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine([], leaf);
4398
+ obj = [].concat(leaf);
4457
4399
  } else {
4458
- obj = options.plainObjects ? { __proto__: null } : {};
4400
+ obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
4459
4401
  var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
4460
- var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot;
4461
- var index = parseInt(decodedRoot, 10);
4462
- if (!options.parseArrays && decodedRoot === "") {
4402
+ var index = parseInt(cleanRoot, 10);
4403
+ if (!options.parseArrays && cleanRoot === "") {
4463
4404
  obj = { 0: leaf };
4464
- } else if (!isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
4405
+ } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
4465
4406
  obj = [];
4466
4407
  obj[index] = leaf;
4467
- } else if (decodedRoot !== "__proto__") {
4468
- obj[decodedRoot] = leaf;
4408
+ } else if (cleanRoot !== "__proto__") {
4409
+ obj[cleanRoot] = leaf;
4469
4410
  }
4470
4411
  }
4471
4412
  leaf = obj;
@@ -4501,9 +4442,6 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesPars
4501
4442
  keys.push(segment[1]);
4502
4443
  }
4503
4444
  if (segment) {
4504
- if (options.strictDepth === true) {
4505
- throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true");
4506
- }
4507
4445
  keys.push("[" + key.slice(segment.index) + "]");
4508
4446
  }
4509
4447
  return parseObject(keys, val, options, valuesParsed);
@@ -4512,58 +4450,39 @@ var normalizeParseOptions = function normalizeParseOptions2(opts) {
4512
4450
  if (!opts) {
4513
4451
  return defaults;
4514
4452
  }
4515
- if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
4516
- throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
4517
- }
4518
- if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") {
4519
- throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
4520
- }
4521
- if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") {
4453
+ if (opts.decoder !== null && opts.decoder !== void 0 && typeof opts.decoder !== "function") {
4522
4454
  throw new TypeError("Decoder has to be a function.");
4523
4455
  }
4524
4456
  if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
4525
4457
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
4526
4458
  }
4527
- if (typeof opts.throwOnLimitExceeded !== "undefined" && typeof opts.throwOnLimitExceeded !== "boolean") {
4528
- throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
4529
- }
4530
4459
  var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
4531
- var duplicates = typeof opts.duplicates === "undefined" ? defaults.duplicates : opts.duplicates;
4532
- if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") {
4533
- throw new TypeError("The duplicates option must be either combine, first, or last");
4534
- }
4535
- var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
4536
4460
  return {
4537
- allowDots,
4538
- allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
4461
+ allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots,
4539
4462
  allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
4540
4463
  allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
4541
4464
  arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
4542
4465
  charset,
4543
4466
  charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
4544
4467
  comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
4545
- decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
4546
4468
  decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
4547
4469
  delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
4548
4470
  depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
4549
- duplicates,
4550
4471
  ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
4551
4472
  interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
4552
4473
  parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
4553
4474
  parseArrays: opts.parseArrays !== false,
4554
4475
  plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects,
4555
- strictDepth: typeof opts.strictDepth === "boolean" ? !!opts.strictDepth : defaults.strictDepth,
4556
- strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling,
4557
- throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === "boolean" ? opts.throwOnLimitExceeded : false
4476
+ strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
4558
4477
  };
4559
4478
  };
4560
4479
  var parse$1 = function(str, opts) {
4561
4480
  var options = normalizeParseOptions(opts);
4562
4481
  if (str === "" || str === null || typeof str === "undefined") {
4563
- return options.plainObjects ? { __proto__: null } : {};
4482
+ return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
4564
4483
  }
4565
4484
  var tempObj = typeof str === "string" ? parseValues(str, options) : str;
4566
- var obj = options.plainObjects ? { __proto__: null } : {};
4485
+ var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
4567
4486
  var keys = Object.keys(tempObj);
4568
4487
  for (var i = 0; i < keys.length; ++i) {
4569
4488
  var key = keys[i];
@@ -4583,7 +4502,6 @@ var lib = {
4583
4502
  parse,
4584
4503
  stringify: stringify2
4585
4504
  };
4586
- var qs = lib;
4587
4505
  function getUrlParams() {
4588
4506
  const url = location.search;
4589
4507
  const theRequest = new Object();
@@ -4750,7 +4668,7 @@ function requestInterceptors(config2) {
4750
4668
  const contentType = getContentType(config2.headers);
4751
4669
  if (config2.method === "post") {
4752
4670
  if (contentType === CONTENT_TYPE.form) {
4753
- config2.data = qs.stringify(config2.data);
4671
+ config2.data = lib.stringify(config2.data);
4754
4672
  }
4755
4673
  }
4756
4674
  return config2;
@@ -10412,22 +10330,22 @@ var lodash = { exports: {} };
10412
10330
  var snakeCase = createCompounder(function(result2, word, index) {
10413
10331
  return result2 + (index ? "_" : "") + word.toLowerCase();
10414
10332
  });
10415
- function split(string, separator, limit2) {
10416
- if (limit2 && typeof limit2 != "number" && isIterateeCall(string, separator, limit2)) {
10417
- separator = limit2 = undefined$12;
10333
+ function split(string, separator, limit) {
10334
+ if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
10335
+ separator = limit = undefined$12;
10418
10336
  }
10419
- limit2 = limit2 === undefined$12 ? MAX_ARRAY_LENGTH : limit2 >>> 0;
10420
- if (!limit2) {
10337
+ limit = limit === undefined$12 ? MAX_ARRAY_LENGTH : limit >>> 0;
10338
+ if (!limit) {
10421
10339
  return [];
10422
10340
  }
10423
10341
  string = toString3(string);
10424
10342
  if (string && (typeof separator == "string" || separator != null && !isRegExp3(separator))) {
10425
10343
  separator = baseToString(separator);
10426
10344
  if (!separator && hasUnicode(string)) {
10427
- return castSlice(stringToArray(string), 0, limit2);
10345
+ return castSlice(stringToArray(string), 0, limit);
10428
10346
  }
10429
10347
  }
10430
- return string.split(separator, limit2);
10348
+ return string.split(separator, limit);
10431
10349
  }
10432
10350
  var startCase = createCompounder(function(result2, word, index) {
10433
10351
  return result2 + (index ? " " : "") + upperFirst(word);