contentful 9.2.7 → 9.2.9

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.
@@ -4344,7 +4344,7 @@ CombinedStream.prototype._emitError = function(err) {
4344
4344
 
4345
4345
  "use strict";
4346
4346
  __webpack_require__.r(__webpack_exports__);
4347
- /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/contentful-resolve-response/node_modules/fast-copy/dist/esm/index.mjs");
4347
+ /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.esm.js");
4348
4348
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
4349
4349
 
4350
4350
  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
@@ -4498,420 +4498,6 @@ var resolveResponse = function resolveResponse(response, options) {
4498
4498
 
4499
4499
  /* harmony default export */ __webpack_exports__["default"] = (resolveResponse);
4500
4500
 
4501
- /***/ }),
4502
-
4503
- /***/ "../node_modules/contentful-resolve-response/node_modules/fast-copy/dist/esm/index.mjs":
4504
- /*!*********************************************************************************************!*\
4505
- !*** ../node_modules/contentful-resolve-response/node_modules/fast-copy/dist/esm/index.mjs ***!
4506
- \*********************************************************************************************/
4507
- /*! exports provided: copyStrict, createCopier, createStrictCopier, default */
4508
- /***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
4509
-
4510
- "use strict";
4511
- __webpack_require__.r(__webpack_exports__);
4512
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyStrict", function() { return copyStrict; });
4513
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCopier", function() { return createCopier; });
4514
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStrictCopier", function() { return createStrictCopier; });
4515
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return index; });
4516
- var toStringFunction = Function.prototype.toString;
4517
- var create = Object.create;
4518
- var toStringObject = Object.prototype.toString;
4519
- /**
4520
- * @classdesc Fallback cache for when WeakMap is not natively supported
4521
- */
4522
- var LegacyCache = /** @class */ (function () {
4523
- function LegacyCache() {
4524
- this._keys = [];
4525
- this._values = [];
4526
- }
4527
- LegacyCache.prototype.has = function (key) {
4528
- return !!~this._keys.indexOf(key);
4529
- };
4530
- LegacyCache.prototype.get = function (key) {
4531
- return this._values[this._keys.indexOf(key)];
4532
- };
4533
- LegacyCache.prototype.set = function (key, value) {
4534
- this._keys.push(key);
4535
- this._values.push(value);
4536
- };
4537
- return LegacyCache;
4538
- }());
4539
- function createCacheLegacy() {
4540
- return new LegacyCache();
4541
- }
4542
- function createCacheModern() {
4543
- return new WeakMap();
4544
- }
4545
- /**
4546
- * Get a new cache object to prevent circular references.
4547
- */
4548
- var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
4549
- /**
4550
- * Get an empty version of the object with the same prototype it has.
4551
- */
4552
- function getCleanClone(prototype) {
4553
- if (!prototype) {
4554
- return create(null);
4555
- }
4556
- var Constructor = prototype.constructor;
4557
- if (Constructor === Object) {
4558
- return prototype === Object.prototype ? {} : create(prototype);
4559
- }
4560
- if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
4561
- try {
4562
- return new Constructor();
4563
- }
4564
- catch (_a) { }
4565
- }
4566
- return create(prototype);
4567
- }
4568
- function getRegExpFlagsLegacy(regExp) {
4569
- var flags = '';
4570
- if (regExp.global) {
4571
- flags += 'g';
4572
- }
4573
- if (regExp.ignoreCase) {
4574
- flags += 'i';
4575
- }
4576
- if (regExp.multiline) {
4577
- flags += 'm';
4578
- }
4579
- if (regExp.unicode) {
4580
- flags += 'u';
4581
- }
4582
- if (regExp.sticky) {
4583
- flags += 'y';
4584
- }
4585
- return flags;
4586
- }
4587
- function getRegExpFlagsModern(regExp) {
4588
- return regExp.flags;
4589
- }
4590
- /**
4591
- * Get the flags to apply to the copied regexp.
4592
- */
4593
- var getRegExpFlags = /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;
4594
- function getTagLegacy(value) {
4595
- var type = toStringObject.call(value);
4596
- return type.substring(8, type.length - 1);
4597
- }
4598
- function getTagModern(value) {
4599
- return value[Symbol.toStringTag] || getTagLegacy(value);
4600
- }
4601
- /**
4602
- * Get the tag of the value passed, so that the correct copier can be used.
4603
- */
4604
- var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
4605
-
4606
- var defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
4607
- var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
4608
- var SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';
4609
- function getStrictPropertiesModern(object) {
4610
- return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
4611
- }
4612
- /**
4613
- * Get the properites used when copying objects strictly. This includes both keys and symbols.
4614
- */
4615
- var getStrictProperties = SUPPORTS_SYMBOL
4616
- ? getStrictPropertiesModern
4617
- : getOwnPropertyNames;
4618
- /**
4619
- * Striclty copy all properties contained on the object.
4620
- */
4621
- function copyOwnPropertiesStrict(value, clone, state) {
4622
- var properties = getStrictProperties(value);
4623
- for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
4624
- property = properties[index];
4625
- if (property === 'callee' || property === 'caller') {
4626
- continue;
4627
- }
4628
- descriptor = getOwnPropertyDescriptor(value, property);
4629
- if (!descriptor) {
4630
- // In extra edge cases where the property descriptor cannot be retrived, fall back to
4631
- // the loose assignment.
4632
- clone[property] = state.copier(value[property], state);
4633
- continue;
4634
- }
4635
- // Only clone the value if actually a value, not a getter / setter.
4636
- if (!descriptor.get && !descriptor.set) {
4637
- descriptor.value = state.copier(descriptor.value, state);
4638
- }
4639
- try {
4640
- defineProperty(clone, property, descriptor);
4641
- }
4642
- catch (error) {
4643
- // Tee above can fail on node in edge cases, so fall back to the loose assignment.
4644
- clone[property] = descriptor.value;
4645
- }
4646
- }
4647
- return clone;
4648
- }
4649
- /**
4650
- * Deeply copy the indexed values in the array.
4651
- */
4652
- function copyArrayLoose(array, state) {
4653
- var clone = new state.Constructor();
4654
- // set in the cache immediately to be able to reuse the object recursively
4655
- state.cache.set(array, clone);
4656
- for (var index = 0, length_2 = array.length; index < length_2; ++index) {
4657
- clone[index] = state.copier(array[index], state);
4658
- }
4659
- return clone;
4660
- }
4661
- /**
4662
- * Deeply copy the indexed values in the array, as well as any custom properties.
4663
- */
4664
- function copyArrayStrict(array, state) {
4665
- var clone = new state.Constructor();
4666
- // set in the cache immediately to be able to reuse the object recursively
4667
- state.cache.set(array, clone);
4668
- return copyOwnPropertiesStrict(array, clone, state);
4669
- }
4670
- /**
4671
- * Copy the contents of the ArrayBuffer.
4672
- */
4673
- function copyArrayBuffer(arrayBuffer, _state) {
4674
- return arrayBuffer.slice(0);
4675
- }
4676
- /**
4677
- * Create a new Blob with the contents of the original.
4678
- */
4679
- function copyBlob(blob, _state) {
4680
- return blob.slice(0, blob.size, blob.type);
4681
- }
4682
- /**
4683
- * Create a new DataView with the contents of the original.
4684
- */
4685
- function copyDataView(dataView, state) {
4686
- return new state.Constructor(copyArrayBuffer(dataView.buffer));
4687
- }
4688
- /**
4689
- * Create a new Date based on the time of the original.
4690
- */
4691
- function copyDate(date, state) {
4692
- return new state.Constructor(date.getTime());
4693
- }
4694
- /**
4695
- * Deeply copy the keys and values of the original.
4696
- */
4697
- function copyMapLoose(map, state) {
4698
- var clone = new state.Constructor();
4699
- // set in the cache immediately to be able to reuse the object recursively
4700
- state.cache.set(map, clone);
4701
- map.forEach(function (value, key) {
4702
- clone.set(key, state.copier(value, state));
4703
- });
4704
- return clone;
4705
- }
4706
- /**
4707
- * Deeply copy the keys and values of the original, as well as any custom properties.
4708
- */
4709
- function copyMapStrict(map, state) {
4710
- return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
4711
- }
4712
- function copyObjectLooseLegacy(object, state) {
4713
- var clone = getCleanClone(state.prototype);
4714
- // set in the cache immediately to be able to reuse the object recursively
4715
- state.cache.set(object, clone);
4716
- for (var key in object) {
4717
- if (hasOwnProperty.call(object, key)) {
4718
- clone[key] = state.copier(object[key], state);
4719
- }
4720
- }
4721
- return clone;
4722
- }
4723
- function copyObjectLooseModern(object, state) {
4724
- var clone = getCleanClone(state.prototype);
4725
- // set in the cache immediately to be able to reuse the object recursively
4726
- state.cache.set(object, clone);
4727
- for (var key in object) {
4728
- if (hasOwnProperty.call(object, key)) {
4729
- clone[key] = state.copier(object[key], state);
4730
- }
4731
- }
4732
- var symbols = getOwnPropertySymbols(object);
4733
- for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
4734
- symbol = symbols[index];
4735
- if (propertyIsEnumerable.call(object, symbol)) {
4736
- clone[symbol] = state.copier(object[symbol], state);
4737
- }
4738
- }
4739
- return clone;
4740
- }
4741
- /**
4742
- * Deeply copy the properties (keys and symbols) and values of the original.
4743
- */
4744
- var copyObjectLoose = SUPPORTS_SYMBOL
4745
- ? copyObjectLooseModern
4746
- : copyObjectLooseLegacy;
4747
- /**
4748
- * Deeply copy the properties (keys and symbols) and values of the original, as well
4749
- * as any hidden or non-enumerable properties.
4750
- */
4751
- function copyObjectStrict(object, state) {
4752
- var clone = getCleanClone(state.prototype);
4753
- // set in the cache immediately to be able to reuse the object recursively
4754
- state.cache.set(object, clone);
4755
- return copyOwnPropertiesStrict(object, clone, state);
4756
- }
4757
- /**
4758
- * Create a new primitive wrapper from the value of the original.
4759
- */
4760
- function copyPrimitiveWrapper(primitiveObject, state) {
4761
- return new state.Constructor(primitiveObject.valueOf());
4762
- }
4763
- /**
4764
- * Create a new RegExp based on the value and flags of the original.
4765
- */
4766
- function copyRegExp(regExp, state) {
4767
- var clone = new state.Constructor(regExp.source, getRegExpFlags(regExp));
4768
- clone.lastIndex = regExp.lastIndex;
4769
- return clone;
4770
- }
4771
- /**
4772
- * Return the original value (an identity function).
4773
- *
4774
- * @note
4775
- * THis is used for objects that cannot be copied, such as WeakMap.
4776
- */
4777
- function copySelf(value, _state) {
4778
- return value;
4779
- }
4780
- /**
4781
- * Deeply copy the values of the original.
4782
- */
4783
- function copySetLoose(set, state) {
4784
- var clone = new state.Constructor();
4785
- // set in the cache immediately to be able to reuse the object recursively
4786
- state.cache.set(set, clone);
4787
- set.forEach(function (value) {
4788
- clone.add(state.copier(value, state));
4789
- });
4790
- return clone;
4791
- }
4792
- /**
4793
- * Deeply copy the values of the original, as well as any custom properties.
4794
- */
4795
- function copySetStrict(set, state) {
4796
- return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
4797
- }
4798
-
4799
- var isArray = Array.isArray;
4800
- var assign = Object.assign, getPrototypeOf = Object.getPrototypeOf;
4801
- var DEFAULT_LOOSE_OPTIONS = {
4802
- array: copyArrayLoose,
4803
- arrayBuffer: copyArrayBuffer,
4804
- blob: copyBlob,
4805
- dataView: copyDataView,
4806
- date: copyDate,
4807
- error: copySelf,
4808
- map: copyMapLoose,
4809
- object: copyObjectLoose,
4810
- regExp: copyRegExp,
4811
- set: copySetLoose,
4812
- };
4813
- var DEFAULT_STRICT_OPTIONS = assign({}, DEFAULT_LOOSE_OPTIONS, {
4814
- array: copyArrayStrict,
4815
- map: copyMapStrict,
4816
- object: copyObjectStrict,
4817
- set: copySetStrict,
4818
- });
4819
- /**
4820
- * Get the copiers used for each specific object tag.
4821
- */
4822
- function getTagSpecificCopiers(options) {
4823
- return {
4824
- Arguments: options.object,
4825
- Array: options.array,
4826
- ArrayBuffer: options.arrayBuffer,
4827
- Blob: options.blob,
4828
- Boolean: copyPrimitiveWrapper,
4829
- DataView: options.dataView,
4830
- Date: options.date,
4831
- Error: options.error,
4832
- Float32Array: options.arrayBuffer,
4833
- Float64Array: options.arrayBuffer,
4834
- Int8Array: options.arrayBuffer,
4835
- Int16Array: options.arrayBuffer,
4836
- Int32Array: options.arrayBuffer,
4837
- Map: options.map,
4838
- Number: copyPrimitiveWrapper,
4839
- Object: options.object,
4840
- Promise: copySelf,
4841
- RegExp: options.regExp,
4842
- Set: options.set,
4843
- String: copyPrimitiveWrapper,
4844
- WeakMap: copySelf,
4845
- WeakSet: copySelf,
4846
- Uint8Array: options.arrayBuffer,
4847
- Uint8ClampedArray: options.arrayBuffer,
4848
- Uint16Array: options.arrayBuffer,
4849
- Uint32Array: options.arrayBuffer,
4850
- Uint64Array: options.arrayBuffer,
4851
- };
4852
- }
4853
- /**
4854
- * Create a custom copier based on the object-specific copy methods passed.
4855
- */
4856
- function createCopier(options) {
4857
- var normalizedOptions = assign({}, DEFAULT_LOOSE_OPTIONS, options);
4858
- var tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);
4859
- var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
4860
- function copier(value, state) {
4861
- state.prototype = state.Constructor = undefined;
4862
- if (!value || typeof value !== 'object') {
4863
- return value;
4864
- }
4865
- if (state.cache.has(value)) {
4866
- return state.cache.get(value);
4867
- }
4868
- state.prototype = value.__proto__ || getPrototypeOf(value);
4869
- state.Constructor = state.prototype && state.prototype.constructor;
4870
- // plain objects
4871
- if (!state.Constructor || state.Constructor === Object) {
4872
- return object(value, state);
4873
- }
4874
- // arrays
4875
- if (isArray(value)) {
4876
- return array(value, state);
4877
- }
4878
- var tagSpecificCopier = tagSpecificCopiers[getTag(value)];
4879
- if (tagSpecificCopier) {
4880
- return tagSpecificCopier(value, state);
4881
- }
4882
- return typeof value.then === 'function' ? value : object(value, state);
4883
- }
4884
- return function copy(value) {
4885
- return copier(value, {
4886
- Constructor: undefined,
4887
- cache: createCache(),
4888
- copier: copier,
4889
- prototype: undefined,
4890
- });
4891
- };
4892
- }
4893
- /**
4894
- * Create a custom copier based on the object-specific copy methods passed, defaulting to the
4895
- * same internals as `copyStrict`.
4896
- */
4897
- function createStrictCopier(options) {
4898
- return createCopier(assign({}, DEFAULT_STRICT_OPTIONS, options));
4899
- }
4900
- /**
4901
- * Copy an value deeply as much as possible, where strict recreation of object properties
4902
- * are maintained. All properties (including non-enumerable ones) are copied with their
4903
- * original property descriptors on both objects and arrays.
4904
- */
4905
- var copyStrict = createStrictCopier({});
4906
- /**
4907
- * Copy an value deeply as much as possible.
4908
- */
4909
- var index = createCopier({});
4910
-
4911
-
4912
- //# sourceMappingURL=index.mjs.map
4913
-
4914
-
4915
4501
  /***/ }),
4916
4502
 
4917
4503
  /***/ "../node_modules/contentful-sdk-core/dist/index.es-modules.js":
@@ -4930,7 +4516,7 @@ __webpack_require__.r(__webpack_exports__);
4930
4516
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "freezeSys", function() { return freezeSys; });
4931
4517
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUserAgentHeader", function() { return getUserAgentHeader; });
4932
4518
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toPlainObject", function() { return toPlainObject; });
4933
- /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/contentful-sdk-core/node_modules/fast-copy/dist/esm/index.mjs");
4519
+ /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.esm.js");
4934
4520
  /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ "../node_modules/qs/lib/index.js");
4935
4521
  /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
4936
4522
  /* harmony import */ var lodash_isstring__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash.isstring */ "../node_modules/lodash.isstring/index.js");
@@ -4947,17 +4533,14 @@ __webpack_require__.r(__webpack_exports__);
4947
4533
 
4948
4534
  function ownKeys(object, enumerableOnly) {
4949
4535
  var keys = Object.keys(object);
4950
-
4951
4536
  if (Object.getOwnPropertySymbols) {
4952
4537
  var symbols = Object.getOwnPropertySymbols(object);
4953
4538
  enumerableOnly && (symbols = symbols.filter(function (sym) {
4954
4539
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
4955
4540
  })), keys.push.apply(keys, symbols);
4956
4541
  }
4957
-
4958
4542
  return keys;
4959
4543
  }
4960
-
4961
4544
  function _objectSpread2(target) {
4962
4545
  for (var i = 1; i < arguments.length; i++) {
4963
4546
  var source = null != arguments[i] ? arguments[i] : {};
@@ -4967,10 +4550,8 @@ function _objectSpread2(target) {
4967
4550
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
4968
4551
  });
4969
4552
  }
4970
-
4971
4553
  return target;
4972
4554
  }
4973
-
4974
4555
  function _typeof(obj) {
4975
4556
  "@babel/helpers - typeof";
4976
4557
 
@@ -4980,61 +4561,47 @@ function _typeof(obj) {
4980
4561
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
4981
4562
  }, _typeof(obj);
4982
4563
  }
4983
-
4984
4564
  function _wrapRegExp() {
4985
4565
  _wrapRegExp = function (re, groups) {
4986
4566
  return new BabelRegExp(re, void 0, groups);
4987
4567
  };
4988
-
4989
4568
  var _super = RegExp.prototype,
4990
- _groups = new WeakMap();
4991
-
4569
+ _groups = new WeakMap();
4992
4570
  function BabelRegExp(re, flags, groups) {
4993
4571
  var _this = new RegExp(re, flags);
4994
-
4995
4572
  return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);
4996
4573
  }
4997
-
4998
4574
  function buildGroups(result, re) {
4999
4575
  var g = _groups.get(re);
5000
-
5001
4576
  return Object.keys(g).reduce(function (groups, name) {
5002
4577
  var i = g[name];
5003
4578
  if ("number" == typeof i) groups[name] = result[i];else {
5004
4579
  for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) k++;
5005
-
5006
4580
  groups[name] = result[i[k]];
5007
4581
  }
5008
4582
  return groups;
5009
4583
  }, Object.create(null));
5010
4584
  }
5011
-
5012
4585
  return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
5013
4586
  var result = _super.exec.call(this, str);
5014
-
5015
4587
  return result && (result.groups = buildGroups(result, this)), result;
5016
4588
  }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
5017
4589
  if ("string" == typeof substitution) {
5018
4590
  var groups = _groups.get(this);
5019
-
5020
4591
  return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
5021
4592
  return "$" + groups[name];
5022
4593
  }));
5023
4594
  }
5024
-
5025
4595
  if ("function" == typeof substitution) {
5026
4596
  var _this = this;
5027
-
5028
4597
  return _super[Symbol.replace].call(this, str, function () {
5029
4598
  var args = arguments;
5030
4599
  return "object" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);
5031
4600
  });
5032
4601
  }
5033
-
5034
4602
  return _super[Symbol.replace].call(this, str, substitution);
5035
4603
  }, _wrapRegExp.apply(this, arguments);
5036
4604
  }
5037
-
5038
4605
  function _defineProperty(obj, key, value) {
5039
4606
  if (key in obj) {
5040
4607
  Object.defineProperty(obj, key, {
@@ -5046,15 +4613,12 @@ function _defineProperty(obj, key, value) {
5046
4613
  } else {
5047
4614
  obj[key] = value;
5048
4615
  }
5049
-
5050
4616
  return obj;
5051
4617
  }
5052
-
5053
4618
  function _inherits(subClass, superClass) {
5054
4619
  if (typeof superClass !== "function" && superClass !== null) {
5055
4620
  throw new TypeError("Super expression must either be null or a function");
5056
4621
  }
5057
-
5058
4622
  subClass.prototype = Object.create(superClass && superClass.prototype, {
5059
4623
  constructor: {
5060
4624
  value: subClass,
@@ -5067,7 +4631,6 @@ function _inherits(subClass, superClass) {
5067
4631
  });
5068
4632
  if (superClass) _setPrototypeOf(subClass, superClass);
5069
4633
  }
5070
-
5071
4634
  function _setPrototypeOf(o, p) {
5072
4635
  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
5073
4636
  o.__proto__ = p;
@@ -5075,29 +4638,22 @@ function _setPrototypeOf(o, p) {
5075
4638
  };
5076
4639
  return _setPrototypeOf(o, p);
5077
4640
  }
5078
-
5079
4641
  function _slicedToArray(arr, i) {
5080
4642
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
5081
4643
  }
5082
-
5083
4644
  function _arrayWithHoles(arr) {
5084
4645
  if (Array.isArray(arr)) return arr;
5085
4646
  }
5086
-
5087
4647
  function _iterableToArrayLimit(arr, i) {
5088
4648
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
5089
-
5090
4649
  if (_i == null) return;
5091
4650
  var _arr = [];
5092
4651
  var _n = true;
5093
4652
  var _d = false;
5094
-
5095
4653
  var _s, _e;
5096
-
5097
4654
  try {
5098
4655
  for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
5099
4656
  _arr.push(_s.value);
5100
-
5101
4657
  if (i && _arr.length === i) break;
5102
4658
  }
5103
4659
  } catch (err) {
@@ -5110,10 +4666,8 @@ function _iterableToArrayLimit(arr, i) {
5110
4666
  if (_d) throw _e;
5111
4667
  }
5112
4668
  }
5113
-
5114
4669
  return _arr;
5115
4670
  }
5116
-
5117
4671
  function _unsupportedIterableToArray(o, minLen) {
5118
4672
  if (!o) return;
5119
4673
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -5122,29 +4676,21 @@ function _unsupportedIterableToArray(o, minLen) {
5122
4676
  if (n === "Map" || n === "Set") return Array.from(o);
5123
4677
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
5124
4678
  }
5125
-
5126
4679
  function _arrayLikeToArray(arr, len) {
5127
4680
  if (len == null || len > arr.length) len = arr.length;
5128
-
5129
4681
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
5130
-
5131
4682
  return arr2;
5132
4683
  }
5133
-
5134
4684
  function _nonIterableRest() {
5135
4685
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5136
4686
  }
5137
-
5138
4687
  function _createForOfIteratorHelper(o, allowArrayLike) {
5139
4688
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
5140
-
5141
4689
  if (!it) {
5142
4690
  if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
5143
4691
  if (it) o = it;
5144
4692
  var i = 0;
5145
-
5146
4693
  var F = function () {};
5147
-
5148
4694
  return {
5149
4695
  s: F,
5150
4696
  n: function () {
@@ -5162,13 +4708,11 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
5162
4708
  f: F
5163
4709
  };
5164
4710
  }
5165
-
5166
4711
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5167
4712
  }
5168
-
5169
4713
  var normalCompletion = true,
5170
- didErr = false,
5171
- err;
4714
+ didErr = false,
4715
+ err;
5172
4716
  return {
5173
4717
  s: function () {
5174
4718
  it = it.call(o);
@@ -5218,25 +4762,19 @@ function noop() {
5218
4762
  var PERCENTAGE_REGEX = /*#__PURE__*/_wrapRegExp(/(\d+)(%)/, {
5219
4763
  value: 1
5220
4764
  });
5221
-
5222
4765
  function calculateLimit(type) {
5223
4766
  var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 7;
5224
4767
  var limit = max;
5225
-
5226
4768
  if (PERCENTAGE_REGEX.test(type)) {
5227
4769
  var _type$match;
5228
-
5229
4770
  var groups = (_type$match = type.match(PERCENTAGE_REGEX)) === null || _type$match === void 0 ? void 0 : _type$match.groups;
5230
-
5231
4771
  if (groups && groups.value) {
5232
4772
  var percentage = parseInt(groups.value) / 100;
5233
4773
  limit = Math.round(max * percentage);
5234
4774
  }
5235
4775
  }
5236
-
5237
4776
  return Math.min(30, Math.max(1, limit));
5238
4777
  }
5239
-
5240
4778
  function createThrottle(limit, logger) {
5241
4779
  logger('info', "Throttle request to ".concat(limit, "/s"));
5242
4780
  return p_throttle__WEBPACK_IMPORTED_MODULE_3___default()({
@@ -5245,11 +4783,10 @@ function createThrottle(limit, logger) {
5245
4783
  strict: false
5246
4784
  });
5247
4785
  }
5248
-
5249
4786
  var rateLimitThrottle = (function (axiosInstance) {
5250
4787
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'auto';
5251
4788
  var _axiosInstance$defaul = axiosInstance.defaults.logHandler,
5252
- logHandler = _axiosInstance$defaul === void 0 ? noop : _axiosInstance$defaul;
4789
+ logHandler = _axiosInstance$defaul === void 0 ? noop : _axiosInstance$defaul;
5253
4790
  var limit = lodash_isstring__WEBPACK_IMPORTED_MODULE_2___default()(type) ? calculateLimit(type) : calculateLimit('auto', type);
5254
4791
  var throttle = createThrottle(limit, logHandler);
5255
4792
  var isCalculated = false;
@@ -5264,12 +4801,10 @@ var rateLimitThrottle = (function (axiosInstance) {
5264
4801
  if (!isCalculated && lodash_isstring__WEBPACK_IMPORTED_MODULE_2___default()(type) && (type === 'auto' || PERCENTAGE_REGEX.test(type)) && response.headers && response.headers['x-contentful-ratelimit-second-limit']) {
5265
4802
  var rawLimit = parseInt(response.headers['x-contentful-ratelimit-second-limit']);
5266
4803
  var nextLimit = calculateLimit(type, rawLimit);
5267
-
5268
4804
  if (nextLimit !== limit) {
5269
4805
  if (requestInterceptorId) {
5270
4806
  axiosInstance.interceptors.request.eject(requestInterceptorId);
5271
4807
  }
5272
-
5273
4808
  limit = nextLimit;
5274
4809
  throttle = createThrottle(nextLimit, logHandler);
5275
4810
  requestInterceptorId = axiosInstance.interceptors.request.use(function (config) {
@@ -5280,10 +4815,8 @@ var rateLimitThrottle = (function (axiosInstance) {
5280
4815
  return Promise.reject(error);
5281
4816
  });
5282
4817
  }
5283
-
5284
4818
  isCalculated = true;
5285
4819
  }
5286
-
5287
4820
  return response;
5288
4821
  }, function (error) {
5289
4822
  return Promise.reject(error);
@@ -5299,18 +4832,16 @@ var delay = function delay(ms) {
5299
4832
  setTimeout(resolve, ms);
5300
4833
  });
5301
4834
  };
5302
-
5303
4835
  var defaultWait = function defaultWait(attempts) {
5304
4836
  return Math.pow(Math.SQRT2, attempts);
5305
4837
  };
5306
-
5307
4838
  function rateLimit(instance) {
5308
4839
  var maxRetry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
5309
4840
  var _instance$defaults = instance.defaults,
5310
- _instance$defaults$re = _instance$defaults.responseLogger,
5311
- responseLogger = _instance$defaults$re === void 0 ? noop : _instance$defaults$re,
5312
- _instance$defaults$re2 = _instance$defaults.requestLogger,
5313
- requestLogger = _instance$defaults$re2 === void 0 ? noop : _instance$defaults$re2;
4841
+ _instance$defaults$re = _instance$defaults.responseLogger,
4842
+ responseLogger = _instance$defaults$re === void 0 ? noop : _instance$defaults$re,
4843
+ _instance$defaults$re2 = _instance$defaults.requestLogger,
4844
+ requestLogger = _instance$defaults$re2 === void 0 ? noop : _instance$defaults$re2;
5314
4845
  instance.interceptors.request.use(function (config) {
5315
4846
  requestLogger(config);
5316
4847
  return config;
@@ -5325,23 +4856,22 @@ function rateLimit(instance) {
5325
4856
  }, function (error) {
5326
4857
  var response = error.response;
5327
4858
  var config = error.config;
5328
- responseLogger(error); // Do not retry if it is disabled or no request config exists (not an axios error)
5329
-
4859
+ responseLogger(error);
4860
+ // Do not retry if it is disabled or no request config exists (not an axios error)
5330
4861
  if (!config || !instance.defaults.retryOnError) {
5331
4862
  return Promise.reject(error);
5332
- } // Retried already for max attempts
5333
-
4863
+ }
5334
4864
 
4865
+ // Retried already for max attempts
5335
4866
  var doneAttempts = config.attempts || 1;
5336
-
5337
4867
  if (doneAttempts > maxRetry) {
5338
4868
  error.attempts = config.attempts;
5339
4869
  return Promise.reject(error);
5340
4870
  }
5341
-
5342
4871
  var retryErrorType = null;
5343
- var wait = defaultWait(doneAttempts); // Errors without response did not receive anything from the server
4872
+ var wait = defaultWait(doneAttempts);
5344
4873
 
4874
+ // Errors without response did not receive anything from the server
5345
4875
  if (!response) {
5346
4876
  retryErrorType = 'Connection';
5347
4877
  } else if (response.status >= 500 && response.status < 600) {
@@ -5349,30 +4879,29 @@ function rateLimit(instance) {
5349
4879
  retryErrorType = "Server ".concat(response.status);
5350
4880
  } else if (response.status === 429) {
5351
4881
  // 429 errors are exceeded rate limit exceptions
5352
- retryErrorType = 'Rate limit'; // all headers are lowercased by axios https://github.com/mzabriskie/axios/issues/413
5353
-
4882
+ retryErrorType = 'Rate limit';
4883
+ // all headers are lowercased by axios https://github.com/mzabriskie/axios/issues/413
5354
4884
  if (response.headers && error.response.headers['x-contentful-ratelimit-reset']) {
5355
4885
  wait = response.headers['x-contentful-ratelimit-reset'];
5356
4886
  }
5357
4887
  }
5358
-
5359
4888
  if (retryErrorType) {
5360
4889
  // convert to ms and add jitter
5361
4890
  wait = Math.floor(wait * 1000 + Math.random() * 200 + 500);
5362
- instance.defaults.logHandler('warning', "".concat(retryErrorType, " error occurred. Waiting for ").concat(wait, " ms before retrying...")); // increase attempts counter
4891
+ instance.defaults.logHandler('warning', "".concat(retryErrorType, " error occurred. Waiting for ").concat(wait, " ms before retrying..."));
5363
4892
 
4893
+ // increase attempts counter
5364
4894
  config.attempts = doneAttempts + 1;
4895
+
5365
4896
  /* Somehow between the interceptor and retrying the request the httpAgent/httpsAgent gets transformed from an Agent-like object
5366
4897
  to a regular object, causing failures on retries after rate limits. Removing these properties here fixes the error, but retry
5367
4898
  requests still use the original http/httpsAgent property */
5368
-
5369
4899
  delete config.httpAgent;
5370
4900
  delete config.httpsAgent;
5371
4901
  return delay(wait).then(function () {
5372
4902
  return instance(config);
5373
4903
  });
5374
4904
  }
5375
-
5376
4905
  return Promise.reject(error);
5377
4906
  });
5378
4907
  }
@@ -5388,9 +4917,10 @@ function asyncToken(instance, getToken) {
5388
4917
  });
5389
4918
  }
5390
4919
 
4920
+ // Matches 'sub.host:port' or 'host:port' and extracts hostname and port
5391
4921
  // Also enforces toplevel domain specified, no spaces and no protocol
5392
-
5393
4922
  var HOST_REGEX = /^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;
4923
+
5394
4924
  /**
5395
4925
  * Create pre configured axios instance
5396
4926
  * @private
@@ -5398,7 +4928,6 @@ var HOST_REGEX = /^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;
5398
4928
  * @param {CreateHttpClientParams} options - Initialization parameters for the HTTP client
5399
4929
  * @return {ContentfulAxiosInstance} Initialized axios instance
5400
4930
  */
5401
-
5402
4931
  function createHttpClient(axios, options) {
5403
4932
  var defaultConfig = {
5404
4933
  insecure: false,
@@ -5413,7 +4942,6 @@ function createHttpClient(axios, options) {
5413
4942
  console.error(data);
5414
4943
  return;
5415
4944
  }
5416
-
5417
4945
  console.log("[".concat(level, "] ").concat(data));
5418
4946
  },
5419
4947
  // Passed to axios
@@ -5428,56 +4956,47 @@ function createHttpClient(axios, options) {
5428
4956
  maxContentLength: 1073741824,
5429
4957
  // 1GB
5430
4958
  maxBodyLength: 1073741824 // 1GB
5431
-
5432
4959
  };
5433
4960
 
5434
4961
  var config = _objectSpread2(_objectSpread2({}, defaultConfig), options);
5435
-
5436
4962
  if (!config.accessToken) {
5437
4963
  var missingAccessTokenError = new TypeError('Expected parameter accessToken');
5438
4964
  config.logHandler('error', missingAccessTokenError);
5439
4965
  throw missingAccessTokenError;
5440
- } // Construct axios baseURL option
5441
-
4966
+ }
5442
4967
 
4968
+ // Construct axios baseURL option
5443
4969
  var protocol = config.insecure ? 'http' : 'https';
5444
4970
  var space = config.space ? "".concat(config.space, "/") : '';
5445
4971
  var hostname = config.defaultHostname;
5446
4972
  var port = config.insecure ? 80 : 443;
5447
-
5448
4973
  if (config.host && HOST_REGEX.test(config.host)) {
5449
4974
  var parsed = config.host.split(':');
5450
-
5451
4975
  if (parsed.length === 2) {
5452
-
5453
4976
  var _parsed = _slicedToArray(parsed, 2);
5454
-
5455
4977
  hostname = _parsed[0];
5456
4978
  port = _parsed[1];
5457
4979
  } else {
5458
4980
  hostname = parsed[0];
5459
4981
  }
5460
- } // Ensure that basePath does start but not end with a slash
5461
-
4982
+ }
5462
4983
 
4984
+ // Ensure that basePath does start but not end with a slash
5463
4985
  if (config.basePath) {
5464
4986
  config.basePath = "/".concat(config.basePath.split('/').filter(Boolean).join('/'));
5465
4987
  }
5466
-
5467
4988
  var baseURL = options.baseURL || "".concat(protocol, "://").concat(hostname, ":").concat(port).concat(config.basePath, "/spaces/").concat(space);
5468
-
5469
4989
  if (!config.headers.Authorization && typeof config.accessToken !== 'function') {
5470
4990
  config.headers.Authorization = 'Bearer ' + config.accessToken;
5471
- } // Set these headers only for node because browsers don't like it when you
4991
+ }
4992
+
4993
+ // Set these headers only for node because browsers don't like it when you
5472
4994
  // override user-agent or accept-encoding.
5473
4995
  // The SDKs should set their own X-Contentful-User-Agent.
5474
-
5475
-
5476
4996
  if (isNode()) {
5477
4997
  config.headers['user-agent'] = 'node.js/' + getNodeVersion();
5478
4998
  config.headers['Accept-Encoding'] = 'gzip';
5479
4999
  }
5480
-
5481
5000
  var axiosOptions = {
5482
5001
  // Axios
5483
5002
  baseURL: baseURL,
@@ -5498,6 +5017,7 @@ function createHttpClient(axios, options) {
5498
5017
  };
5499
5018
  var instance = axios.create(axiosOptions);
5500
5019
  instance.httpClientParams = options;
5020
+
5501
5021
  /**
5502
5022
  * Creates a new axios instance with the same default base parameters as the
5503
5023
  * current one, and with any overrides passed to the newParams object
@@ -5508,41 +5028,34 @@ function createHttpClient(axios, options) {
5508
5028
  * @param {CreateHttpClientParams} httpClientParams - Initialization parameters for the HTTP client
5509
5029
  * @return {ContentfulAxiosInstance} Initialized axios instance
5510
5030
  */
5511
-
5512
5031
  instance.cloneWithNewParams = function (newParams) {
5513
5032
  return createHttpClient(axios, _objectSpread2(_objectSpread2({}, Object(fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(options)), newParams));
5514
5033
  };
5034
+
5515
5035
  /**
5516
5036
  * Apply interceptors.
5517
5037
  * Please note that the order of interceptors is important
5518
5038
  */
5519
5039
 
5520
-
5521
5040
  if (config.onBeforeRequest) {
5522
5041
  instance.interceptors.request.use(config.onBeforeRequest);
5523
5042
  }
5524
-
5525
5043
  if (typeof config.accessToken === 'function') {
5526
5044
  asyncToken(instance, config.accessToken);
5527
5045
  }
5528
-
5529
5046
  if (config.throttle) {
5530
5047
  rateLimitThrottle(instance, config.throttle);
5531
5048
  }
5532
-
5533
5049
  rateLimit(instance, config.retryLimit);
5534
-
5535
5050
  if (config.onError) {
5536
5051
  instance.interceptors.response.use(function (response) {
5537
5052
  return response;
5538
5053
  }, config.onError);
5539
5054
  }
5540
-
5541
5055
  return instance;
5542
5056
  }
5543
5057
 
5544
5058
  /* eslint-disable @typescript-eslint/no-explicit-any */
5545
-
5546
5059
  /**
5547
5060
  * Creates request parameters configuration by parsing an existing query object
5548
5061
  * @private
@@ -5565,22 +5078,19 @@ function enforceObjPath(obj, path) {
5565
5078
  err.message = "Required property ".concat(path, " missing from:\n\n").concat(JSON.stringify(obj), "\n\n");
5566
5079
  throw err;
5567
5080
  }
5568
-
5569
5081
  return true;
5570
5082
  }
5571
5083
 
5572
5084
  // copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
5085
+
5573
5086
  function deepFreeze(object) {
5574
5087
  var propNames = Object.getOwnPropertyNames(object);
5575
-
5576
5088
  var _iterator = _createForOfIteratorHelper(propNames),
5577
- _step;
5578
-
5089
+ _step;
5579
5090
  try {
5580
5091
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
5581
5092
  var name = _step.value;
5582
5093
  var value = object[name];
5583
-
5584
5094
  if (value && _typeof(value) === 'object') {
5585
5095
  deepFreeze(value);
5586
5096
  }
@@ -5590,10 +5100,8 @@ function deepFreeze(object) {
5590
5100
  } finally {
5591
5101
  _iterator.f();
5592
5102
  }
5593
-
5594
5103
  return Object.freeze(object);
5595
5104
  }
5596
-
5597
5105
  function freezeSys(obj) {
5598
5106
  deepFreeze(obj.sys || {});
5599
5107
  return obj;
@@ -5601,18 +5109,15 @@ function freezeSys(obj) {
5601
5109
 
5602
5110
  function getBrowserOS() {
5603
5111
  var win = getWindow();
5604
-
5605
5112
  if (!win) {
5606
5113
  return null;
5607
5114
  }
5608
-
5609
- var userAgent = win.navigator.userAgent; // TODO: platform is deprecated.
5610
-
5115
+ var userAgent = win.navigator.userAgent;
5116
+ // TODO: platform is deprecated.
5611
5117
  var platform = win.navigator.platform;
5612
5118
  var macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];
5613
5119
  var windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];
5614
5120
  var iosPlatforms = ['iPhone', 'iPad', 'iPod'];
5615
-
5616
5121
  if (macosPlatforms.indexOf(platform) !== -1) {
5617
5122
  return 'macOS';
5618
5123
  } else if (iosPlatforms.indexOf(platform) !== -1) {
@@ -5624,10 +5129,8 @@ function getBrowserOS() {
5624
5129
  } else if (/Linux/.test(platform)) {
5625
5130
  return 'Linux';
5626
5131
  }
5627
-
5628
5132
  return null;
5629
5133
  }
5630
-
5631
5134
  function getNodeOS() {
5632
5135
  var platform = process.platform || 'linux';
5633
5136
  var version = process.version || '0.0.0';
@@ -5641,32 +5144,24 @@ function getNodeOS() {
5641
5144
  sunos: 'Linux',
5642
5145
  win32: 'Windows'
5643
5146
  };
5644
-
5645
5147
  if (platform in platformMap) {
5646
5148
  return "".concat(platformMap[platform] || 'Linux', "/").concat(version);
5647
5149
  }
5648
-
5649
5150
  return null;
5650
5151
  }
5651
-
5652
5152
  function getUserAgentHeader(sdk, application, integration, feature) {
5653
5153
  var headerParts = [];
5654
-
5655
5154
  if (application) {
5656
5155
  headerParts.push("app ".concat(application));
5657
5156
  }
5658
-
5659
5157
  if (integration) {
5660
5158
  headerParts.push("integration ".concat(integration));
5661
5159
  }
5662
-
5663
5160
  if (feature) {
5664
5161
  headerParts.push('feature ' + feature);
5665
5162
  }
5666
-
5667
5163
  headerParts.push("sdk ".concat(sdk));
5668
5164
  var platform = null;
5669
-
5670
5165
  try {
5671
5166
  if (isReactNative()) {
5672
5167
  platform = getBrowserOS();
@@ -5681,11 +5176,9 @@ function getUserAgentHeader(sdk, application, integration, feature) {
5681
5176
  } catch (e) {
5682
5177
  platform = null;
5683
5178
  }
5684
-
5685
5179
  if (platform) {
5686
5180
  headerParts.push("os ".concat(platform));
5687
5181
  }
5688
-
5689
5182
  return "".concat(headerParts.filter(function (item) {
5690
5183
  return item !== '';
5691
5184
  }).join('; '), ";");
@@ -5697,7 +5190,6 @@ function getUserAgentHeader(sdk, application, integration, feature) {
5697
5190
  * @param data - Any plain JSON response returned from the API
5698
5191
  * @return Enhanced object with toPlainObject method
5699
5192
  */
5700
-
5701
5193
  function toPlainObject(data) {
5702
5194
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
5703
5195
  // @ts-expect-error
@@ -5721,18 +5213,17 @@ function toPlainObject(data) {
5721
5213
  */
5722
5214
  function errorHandler(errorResponse) {
5723
5215
  var config = errorResponse.config,
5724
- response = errorResponse.response;
5725
- var errorName; // Obscure the Management token
5216
+ response = errorResponse.response;
5217
+ var errorName;
5726
5218
 
5219
+ // Obscure the Management token
5727
5220
  if (config && config.headers && config.headers['Authorization']) {
5728
5221
  var token = "...".concat(config.headers['Authorization'].toString().substr(-5));
5729
5222
  config.headers['Authorization'] = "Bearer ".concat(token);
5730
5223
  }
5731
-
5732
5224
  if (!lodash_isplainobject__WEBPACK_IMPORTED_MODULE_4___default()(response) || !lodash_isplainobject__WEBPACK_IMPORTED_MODULE_4___default()(config)) {
5733
5225
  throw errorResponse;
5734
5226
  }
5735
-
5736
5227
  var data = response === null || response === void 0 ? void 0 : response.data;
5737
5228
  var errorData = {
5738
5229
  status: response === null || response === void 0 ? void 0 : response.status,
@@ -5740,7 +5231,6 @@ function errorHandler(errorResponse) {
5740
5231
  message: '',
5741
5232
  details: {}
5742
5233
  };
5743
-
5744
5234
  if (lodash_isplainobject__WEBPACK_IMPORTED_MODULE_4___default()(config)) {
5745
5235
  errorData.request = {
5746
5236
  url: config.url,
@@ -5749,458 +5239,36 @@ function errorHandler(errorResponse) {
5749
5239
  payloadData: config.data
5750
5240
  };
5751
5241
  }
5752
-
5753
5242
  if (data && lodash_isplainobject__WEBPACK_IMPORTED_MODULE_4___default()(data)) {
5754
5243
  if ('requestId' in data) {
5755
5244
  errorData.requestId = data.requestId || 'UNKNOWN';
5756
5245
  }
5757
-
5758
5246
  if ('message' in data) {
5759
5247
  errorData.message = data.message || '';
5760
5248
  }
5761
-
5762
5249
  if ('details' in data) {
5763
5250
  errorData.details = data.details || {};
5764
5251
  }
5765
-
5766
5252
  if ('sys' in data) {
5767
5253
  if ('id' in data.sys) {
5768
5254
  errorName = data.sys.id;
5769
5255
  }
5770
5256
  }
5771
5257
  }
5772
-
5773
5258
  var error = new Error();
5774
5259
  error.name = errorName && errorName !== 'Unknown' ? errorName : "".concat(response === null || response === void 0 ? void 0 : response.status, " ").concat(response === null || response === void 0 ? void 0 : response.statusText);
5775
-
5776
5260
  try {
5777
5261
  error.message = JSON.stringify(errorData, null, ' ');
5778
5262
  } catch (_unused) {
5779
5263
  var _errorData$message;
5780
-
5781
5264
  error.message = (_errorData$message = errorData === null || errorData === void 0 ? void 0 : errorData.message) !== null && _errorData$message !== void 0 ? _errorData$message : '';
5782
5265
  }
5783
-
5784
5266
  throw error;
5785
5267
  }
5786
5268
 
5787
5269
 
5788
5270
 
5789
5271
 
5790
- /***/ }),
5791
-
5792
- /***/ "../node_modules/contentful-sdk-core/node_modules/fast-copy/dist/esm/index.mjs":
5793
- /*!*************************************************************************************!*\
5794
- !*** ../node_modules/contentful-sdk-core/node_modules/fast-copy/dist/esm/index.mjs ***!
5795
- \*************************************************************************************/
5796
- /*! exports provided: copyStrict, createCopier, createStrictCopier, default */
5797
- /***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
5798
-
5799
- "use strict";
5800
- __webpack_require__.r(__webpack_exports__);
5801
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyStrict", function() { return copyStrict; });
5802
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCopier", function() { return createCopier; });
5803
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStrictCopier", function() { return createStrictCopier; });
5804
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return index; });
5805
- var toStringFunction = Function.prototype.toString;
5806
- var create = Object.create;
5807
- var toStringObject = Object.prototype.toString;
5808
- /**
5809
- * @classdesc Fallback cache for when WeakMap is not natively supported
5810
- */
5811
- var LegacyCache = /** @class */ (function () {
5812
- function LegacyCache() {
5813
- this._keys = [];
5814
- this._values = [];
5815
- }
5816
- LegacyCache.prototype.has = function (key) {
5817
- return !!~this._keys.indexOf(key);
5818
- };
5819
- LegacyCache.prototype.get = function (key) {
5820
- return this._values[this._keys.indexOf(key)];
5821
- };
5822
- LegacyCache.prototype.set = function (key, value) {
5823
- this._keys.push(key);
5824
- this._values.push(value);
5825
- };
5826
- return LegacyCache;
5827
- }());
5828
- function createCacheLegacy() {
5829
- return new LegacyCache();
5830
- }
5831
- function createCacheModern() {
5832
- return new WeakMap();
5833
- }
5834
- /**
5835
- * Get a new cache object to prevent circular references.
5836
- */
5837
- var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
5838
- /**
5839
- * Get an empty version of the object with the same prototype it has.
5840
- */
5841
- function getCleanClone(prototype) {
5842
- if (!prototype) {
5843
- return create(null);
5844
- }
5845
- var Constructor = prototype.constructor;
5846
- if (Constructor === Object) {
5847
- return prototype === Object.prototype ? {} : create(prototype);
5848
- }
5849
- if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
5850
- try {
5851
- return new Constructor();
5852
- }
5853
- catch (_a) { }
5854
- }
5855
- return create(prototype);
5856
- }
5857
- function getRegExpFlagsLegacy(regExp) {
5858
- var flags = '';
5859
- if (regExp.global) {
5860
- flags += 'g';
5861
- }
5862
- if (regExp.ignoreCase) {
5863
- flags += 'i';
5864
- }
5865
- if (regExp.multiline) {
5866
- flags += 'm';
5867
- }
5868
- if (regExp.unicode) {
5869
- flags += 'u';
5870
- }
5871
- if (regExp.sticky) {
5872
- flags += 'y';
5873
- }
5874
- return flags;
5875
- }
5876
- function getRegExpFlagsModern(regExp) {
5877
- return regExp.flags;
5878
- }
5879
- /**
5880
- * Get the flags to apply to the copied regexp.
5881
- */
5882
- var getRegExpFlags = /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;
5883
- function getTagLegacy(value) {
5884
- var type = toStringObject.call(value);
5885
- return type.substring(8, type.length - 1);
5886
- }
5887
- function getTagModern(value) {
5888
- return value[Symbol.toStringTag] || getTagLegacy(value);
5889
- }
5890
- /**
5891
- * Get the tag of the value passed, so that the correct copier can be used.
5892
- */
5893
- var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
5894
-
5895
- var defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
5896
- var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
5897
- var SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';
5898
- function getStrictPropertiesModern(object) {
5899
- return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
5900
- }
5901
- /**
5902
- * Get the properites used when copying objects strictly. This includes both keys and symbols.
5903
- */
5904
- var getStrictProperties = SUPPORTS_SYMBOL
5905
- ? getStrictPropertiesModern
5906
- : getOwnPropertyNames;
5907
- /**
5908
- * Striclty copy all properties contained on the object.
5909
- */
5910
- function copyOwnPropertiesStrict(value, clone, state) {
5911
- var properties = getStrictProperties(value);
5912
- for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
5913
- property = properties[index];
5914
- if (property === 'callee' || property === 'caller') {
5915
- continue;
5916
- }
5917
- descriptor = getOwnPropertyDescriptor(value, property);
5918
- if (!descriptor) {
5919
- // In extra edge cases where the property descriptor cannot be retrived, fall back to
5920
- // the loose assignment.
5921
- clone[property] = state.copier(value[property], state);
5922
- continue;
5923
- }
5924
- // Only clone the value if actually a value, not a getter / setter.
5925
- if (!descriptor.get && !descriptor.set) {
5926
- descriptor.value = state.copier(descriptor.value, state);
5927
- }
5928
- try {
5929
- defineProperty(clone, property, descriptor);
5930
- }
5931
- catch (error) {
5932
- // Tee above can fail on node in edge cases, so fall back to the loose assignment.
5933
- clone[property] = descriptor.value;
5934
- }
5935
- }
5936
- return clone;
5937
- }
5938
- /**
5939
- * Deeply copy the indexed values in the array.
5940
- */
5941
- function copyArrayLoose(array, state) {
5942
- var clone = new state.Constructor();
5943
- // set in the cache immediately to be able to reuse the object recursively
5944
- state.cache.set(array, clone);
5945
- for (var index = 0, length_2 = array.length; index < length_2; ++index) {
5946
- clone[index] = state.copier(array[index], state);
5947
- }
5948
- return clone;
5949
- }
5950
- /**
5951
- * Deeply copy the indexed values in the array, as well as any custom properties.
5952
- */
5953
- function copyArrayStrict(array, state) {
5954
- var clone = new state.Constructor();
5955
- // set in the cache immediately to be able to reuse the object recursively
5956
- state.cache.set(array, clone);
5957
- return copyOwnPropertiesStrict(array, clone, state);
5958
- }
5959
- /**
5960
- * Copy the contents of the ArrayBuffer.
5961
- */
5962
- function copyArrayBuffer(arrayBuffer, _state) {
5963
- return arrayBuffer.slice(0);
5964
- }
5965
- /**
5966
- * Create a new Blob with the contents of the original.
5967
- */
5968
- function copyBlob(blob, _state) {
5969
- return blob.slice(0, blob.size, blob.type);
5970
- }
5971
- /**
5972
- * Create a new DataView with the contents of the original.
5973
- */
5974
- function copyDataView(dataView, state) {
5975
- return new state.Constructor(copyArrayBuffer(dataView.buffer));
5976
- }
5977
- /**
5978
- * Create a new Date based on the time of the original.
5979
- */
5980
- function copyDate(date, state) {
5981
- return new state.Constructor(date.getTime());
5982
- }
5983
- /**
5984
- * Deeply copy the keys and values of the original.
5985
- */
5986
- function copyMapLoose(map, state) {
5987
- var clone = new state.Constructor();
5988
- // set in the cache immediately to be able to reuse the object recursively
5989
- state.cache.set(map, clone);
5990
- map.forEach(function (value, key) {
5991
- clone.set(key, state.copier(value, state));
5992
- });
5993
- return clone;
5994
- }
5995
- /**
5996
- * Deeply copy the keys and values of the original, as well as any custom properties.
5997
- */
5998
- function copyMapStrict(map, state) {
5999
- return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
6000
- }
6001
- function copyObjectLooseLegacy(object, state) {
6002
- var clone = getCleanClone(state.prototype);
6003
- // set in the cache immediately to be able to reuse the object recursively
6004
- state.cache.set(object, clone);
6005
- for (var key in object) {
6006
- if (hasOwnProperty.call(object, key)) {
6007
- clone[key] = state.copier(object[key], state);
6008
- }
6009
- }
6010
- return clone;
6011
- }
6012
- function copyObjectLooseModern(object, state) {
6013
- var clone = getCleanClone(state.prototype);
6014
- // set in the cache immediately to be able to reuse the object recursively
6015
- state.cache.set(object, clone);
6016
- for (var key in object) {
6017
- if (hasOwnProperty.call(object, key)) {
6018
- clone[key] = state.copier(object[key], state);
6019
- }
6020
- }
6021
- var symbols = getOwnPropertySymbols(object);
6022
- for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
6023
- symbol = symbols[index];
6024
- if (propertyIsEnumerable.call(object, symbol)) {
6025
- clone[symbol] = state.copier(object[symbol], state);
6026
- }
6027
- }
6028
- return clone;
6029
- }
6030
- /**
6031
- * Deeply copy the properties (keys and symbols) and values of the original.
6032
- */
6033
- var copyObjectLoose = SUPPORTS_SYMBOL
6034
- ? copyObjectLooseModern
6035
- : copyObjectLooseLegacy;
6036
- /**
6037
- * Deeply copy the properties (keys and symbols) and values of the original, as well
6038
- * as any hidden or non-enumerable properties.
6039
- */
6040
- function copyObjectStrict(object, state) {
6041
- var clone = getCleanClone(state.prototype);
6042
- // set in the cache immediately to be able to reuse the object recursively
6043
- state.cache.set(object, clone);
6044
- return copyOwnPropertiesStrict(object, clone, state);
6045
- }
6046
- /**
6047
- * Create a new primitive wrapper from the value of the original.
6048
- */
6049
- function copyPrimitiveWrapper(primitiveObject, state) {
6050
- return new state.Constructor(primitiveObject.valueOf());
6051
- }
6052
- /**
6053
- * Create a new RegExp based on the value and flags of the original.
6054
- */
6055
- function copyRegExp(regExp, state) {
6056
- var clone = new state.Constructor(regExp.source, getRegExpFlags(regExp));
6057
- clone.lastIndex = regExp.lastIndex;
6058
- return clone;
6059
- }
6060
- /**
6061
- * Return the original value (an identity function).
6062
- *
6063
- * @note
6064
- * THis is used for objects that cannot be copied, such as WeakMap.
6065
- */
6066
- function copySelf(value, _state) {
6067
- return value;
6068
- }
6069
- /**
6070
- * Deeply copy the values of the original.
6071
- */
6072
- function copySetLoose(set, state) {
6073
- var clone = new state.Constructor();
6074
- // set in the cache immediately to be able to reuse the object recursively
6075
- state.cache.set(set, clone);
6076
- set.forEach(function (value) {
6077
- clone.add(state.copier(value, state));
6078
- });
6079
- return clone;
6080
- }
6081
- /**
6082
- * Deeply copy the values of the original, as well as any custom properties.
6083
- */
6084
- function copySetStrict(set, state) {
6085
- return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
6086
- }
6087
-
6088
- var isArray = Array.isArray;
6089
- var assign = Object.assign, getPrototypeOf = Object.getPrototypeOf;
6090
- var DEFAULT_LOOSE_OPTIONS = {
6091
- array: copyArrayLoose,
6092
- arrayBuffer: copyArrayBuffer,
6093
- blob: copyBlob,
6094
- dataView: copyDataView,
6095
- date: copyDate,
6096
- error: copySelf,
6097
- map: copyMapLoose,
6098
- object: copyObjectLoose,
6099
- regExp: copyRegExp,
6100
- set: copySetLoose,
6101
- };
6102
- var DEFAULT_STRICT_OPTIONS = assign({}, DEFAULT_LOOSE_OPTIONS, {
6103
- array: copyArrayStrict,
6104
- map: copyMapStrict,
6105
- object: copyObjectStrict,
6106
- set: copySetStrict,
6107
- });
6108
- /**
6109
- * Get the copiers used for each specific object tag.
6110
- */
6111
- function getTagSpecificCopiers(options) {
6112
- return {
6113
- Arguments: options.object,
6114
- Array: options.array,
6115
- ArrayBuffer: options.arrayBuffer,
6116
- Blob: options.blob,
6117
- Boolean: copyPrimitiveWrapper,
6118
- DataView: options.dataView,
6119
- Date: options.date,
6120
- Error: options.error,
6121
- Float32Array: options.arrayBuffer,
6122
- Float64Array: options.arrayBuffer,
6123
- Int8Array: options.arrayBuffer,
6124
- Int16Array: options.arrayBuffer,
6125
- Int32Array: options.arrayBuffer,
6126
- Map: options.map,
6127
- Number: copyPrimitiveWrapper,
6128
- Object: options.object,
6129
- Promise: copySelf,
6130
- RegExp: options.regExp,
6131
- Set: options.set,
6132
- String: copyPrimitiveWrapper,
6133
- WeakMap: copySelf,
6134
- WeakSet: copySelf,
6135
- Uint8Array: options.arrayBuffer,
6136
- Uint8ClampedArray: options.arrayBuffer,
6137
- Uint16Array: options.arrayBuffer,
6138
- Uint32Array: options.arrayBuffer,
6139
- Uint64Array: options.arrayBuffer,
6140
- };
6141
- }
6142
- /**
6143
- * Create a custom copier based on the object-specific copy methods passed.
6144
- */
6145
- function createCopier(options) {
6146
- var normalizedOptions = assign({}, DEFAULT_LOOSE_OPTIONS, options);
6147
- var tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);
6148
- var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
6149
- function copier(value, state) {
6150
- state.prototype = state.Constructor = undefined;
6151
- if (!value || typeof value !== 'object') {
6152
- return value;
6153
- }
6154
- if (state.cache.has(value)) {
6155
- return state.cache.get(value);
6156
- }
6157
- state.prototype = value.__proto__ || getPrototypeOf(value);
6158
- state.Constructor = state.prototype && state.prototype.constructor;
6159
- // plain objects
6160
- if (!state.Constructor || state.Constructor === Object) {
6161
- return object(value, state);
6162
- }
6163
- // arrays
6164
- if (isArray(value)) {
6165
- return array(value, state);
6166
- }
6167
- var tagSpecificCopier = tagSpecificCopiers[getTag(value)];
6168
- if (tagSpecificCopier) {
6169
- return tagSpecificCopier(value, state);
6170
- }
6171
- return typeof value.then === 'function' ? value : object(value, state);
6172
- }
6173
- return function copy(value) {
6174
- return copier(value, {
6175
- Constructor: undefined,
6176
- cache: createCache(),
6177
- copier: copier,
6178
- prototype: undefined,
6179
- });
6180
- };
6181
- }
6182
- /**
6183
- * Create a custom copier based on the object-specific copy methods passed, defaulting to the
6184
- * same internals as `copyStrict`.
6185
- */
6186
- function createStrictCopier(options) {
6187
- return createCopier(assign({}, DEFAULT_STRICT_OPTIONS, options));
6188
- }
6189
- /**
6190
- * Copy an value deeply as much as possible, where strict recreation of object properties
6191
- * are maintained. All properties (including non-enumerable ones) are copied with their
6192
- * original property descriptors on both objects and arrays.
6193
- */
6194
- var copyStrict = createStrictCopier({});
6195
- /**
6196
- * Copy an value deeply as much as possible.
6197
- */
6198
- var index = createCopier({});
6199
-
6200
-
6201
- //# sourceMappingURL=index.mjs.map
6202
-
6203
-
6204
5272
  /***/ }),
6205
5273
 
6206
5274
  /***/ "../node_modules/debug/src/browser.js":
@@ -10201,6 +9269,7 @@ var stringify = function stringify(
10201
9269
  object,
10202
9270
  prefix,
10203
9271
  generateArrayPrefix,
9272
+ commaRoundTrip,
10204
9273
  strictNullHandling,
10205
9274
  skipNulls,
10206
9275
  encoder,
@@ -10265,7 +9334,7 @@ var stringify = function stringify(
10265
9334
  for (var i = 0; i < valuesArray.length; ++i) {
10266
9335
  valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
10267
9336
  }
10268
- return [formatter(keyValue) + '=' + valuesJoined];
9337
+ return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
10269
9338
  }
10270
9339
  return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
10271
9340
  }
@@ -10289,6 +9358,8 @@ var stringify = function stringify(
10289
9358
  objKeys = sort ? keys.sort(sort) : keys;
10290
9359
  }
10291
9360
 
9361
+ var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;
9362
+
10292
9363
  for (var j = 0; j < objKeys.length; ++j) {
10293
9364
  var key = objKeys[j];
10294
9365
  var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
@@ -10298,8 +9369,8 @@ var stringify = function stringify(
10298
9369
  }
10299
9370
 
10300
9371
  var keyPrefix = isArray(obj)
10301
- ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
10302
- : prefix + (allowDots ? '.' + key : '[' + key + ']');
9372
+ ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
9373
+ : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
10303
9374
 
10304
9375
  sideChannel.set(object, step);
10305
9376
  var valueSideChannel = getSideChannel();
@@ -10308,6 +9379,7 @@ var stringify = function stringify(
10308
9379
  value,
10309
9380
  keyPrefix,
10310
9381
  generateArrayPrefix,
9382
+ commaRoundTrip,
10311
9383
  strictNullHandling,
10312
9384
  skipNulls,
10313
9385
  encoder,
@@ -10404,6 +9476,10 @@ module.exports = function (object, opts) {
10404
9476
  }
10405
9477
 
10406
9478
  var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
9479
+ if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
9480
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
9481
+ }
9482
+ var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
10407
9483
 
10408
9484
  if (!objKeys) {
10409
9485
  objKeys = Object.keys(obj);
@@ -10424,6 +9500,7 @@ module.exports = function (object, opts) {
10424
9500
  obj[key],
10425
9501
  key,
10426
9502
  generateArrayPrefix,
9503
+ commaRoundTrip,
10427
9504
  options.strictNullHandling,
10428
9505
  options.skipNulls,
10429
9506
  options.encode ? options.encoder : null,
@@ -10936,7 +10013,7 @@ function createClient(params) {
10936
10013
  environment: 'master'
10937
10014
  };
10938
10015
  const config = _objectSpread(_objectSpread({}, defaultConfig), params);
10939
- const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.7"}`, config.application, config.integration);
10016
+ const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.9"}`, config.application, config.integration);
10940
10017
  config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {
10941
10018
  'Content-Type': 'application/vnd.contentful.delivery.v1+json',
10942
10019
  'X-Contentful-User-Agent': userAgentHeader