@aws-amplify/analytics 5.2.23-unstable.2 → 5.2.23-unstable.7

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.
@@ -410,8 +410,12 @@ __webpack_require__.r(__webpack_exports__);
410
410
  /* harmony import */ var _whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./whatwgEncodingApi */ "../../node_modules/@aws-crypto/crc32/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js");
411
411
 
412
412
 
413
- const fromUtf8 = (input) => typeof TextEncoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["fromUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["fromUtf8"])(input);
414
- const toUtf8 = (input) => typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
413
+ var fromUtf8 = function (input) {
414
+ return typeof TextEncoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["fromUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["fromUtf8"])(input);
415
+ };
416
+ var toUtf8 = function (input) {
417
+ return typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
418
+ };
415
419
 
416
420
 
417
421
  /***/ }),
@@ -427,44 +431,44 @@ const toUtf8 = (input) => typeof TextDecoder === "function" ? Object(_whatwgEnco
427
431
  __webpack_require__.r(__webpack_exports__);
428
432
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromUtf8", function() { return fromUtf8; });
429
433
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toUtf8", function() { return toUtf8; });
430
- const fromUtf8 = (input) => {
431
- const bytes = [];
432
- for (let i = 0, len = input.length; i < len; i++) {
433
- const value = input.charCodeAt(i);
434
+ var fromUtf8 = function (input) {
435
+ var bytes = [];
436
+ for (var i = 0, len = input.length; i < len; i++) {
437
+ var value = input.charCodeAt(i);
434
438
  if (value < 0x80) {
435
439
  bytes.push(value);
436
440
  }
437
441
  else if (value < 0x800) {
438
- bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);
442
+ bytes.push((value >> 6) | 192, (value & 63) | 128);
439
443
  }
440
444
  else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {
441
- const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);
442
- bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);
445
+ var surrogatePair = 0x10000 + ((value & 1023) << 10) + (input.charCodeAt(++i) & 1023);
446
+ bytes.push((surrogatePair >> 18) | 240, ((surrogatePair >> 12) & 63) | 128, ((surrogatePair >> 6) & 63) | 128, (surrogatePair & 63) | 128);
443
447
  }
444
448
  else {
445
- bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);
449
+ bytes.push((value >> 12) | 224, ((value >> 6) & 63) | 128, (value & 63) | 128);
446
450
  }
447
451
  }
448
452
  return Uint8Array.from(bytes);
449
453
  };
450
- const toUtf8 = (input) => {
451
- let decoded = "";
452
- for (let i = 0, len = input.length; i < len; i++) {
453
- const byte = input[i];
454
+ var toUtf8 = function (input) {
455
+ var decoded = "";
456
+ for (var i = 0, len = input.length; i < len; i++) {
457
+ var byte = input[i];
454
458
  if (byte < 0x80) {
455
459
  decoded += String.fromCharCode(byte);
456
460
  }
457
- else if (0b11000000 <= byte && byte < 0b11100000) {
458
- const nextByte = input[++i];
459
- decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));
461
+ else if (192 <= byte && byte < 224) {
462
+ var nextByte = input[++i];
463
+ decoded += String.fromCharCode(((byte & 31) << 6) | (nextByte & 63));
460
464
  }
461
- else if (0b11110000 <= byte && byte < 0b101101101) {
462
- const surrogatePair = [byte, input[++i], input[++i], input[++i]];
463
- const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%");
465
+ else if (240 <= byte && byte < 365) {
466
+ var surrogatePair = [byte, input[++i], input[++i], input[++i]];
467
+ var encoded = "%" + surrogatePair.map(function (byteValue) { return byteValue.toString(16); }).join("%");
464
468
  decoded += decodeURIComponent(encoded);
465
469
  }
466
470
  else {
467
- decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));
471
+ decoded += String.fromCharCode(((byte & 15) << 12) | ((input[++i] & 63) << 6) | (input[++i] & 63));
468
472
  }
469
473
  }
470
474
  return decoded;
@@ -1056,8 +1060,12 @@ __webpack_require__.r(__webpack_exports__);
1056
1060
  /* harmony import */ var _whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./whatwgEncodingApi */ "../../node_modules/@aws-crypto/sha256-browser/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js");
1057
1061
 
1058
1062
 
1059
- const fromUtf8 = (input) => typeof TextEncoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["fromUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["fromUtf8"])(input);
1060
- const toUtf8 = (input) => typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
1063
+ var fromUtf8 = function (input) {
1064
+ return typeof TextEncoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["fromUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["fromUtf8"])(input);
1065
+ };
1066
+ var toUtf8 = function (input) {
1067
+ return typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
1068
+ };
1061
1069
 
1062
1070
 
1063
1071
  /***/ }),
@@ -1073,44 +1081,44 @@ const toUtf8 = (input) => typeof TextDecoder === "function" ? Object(_whatwgEnco
1073
1081
  __webpack_require__.r(__webpack_exports__);
1074
1082
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromUtf8", function() { return fromUtf8; });
1075
1083
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toUtf8", function() { return toUtf8; });
1076
- const fromUtf8 = (input) => {
1077
- const bytes = [];
1078
- for (let i = 0, len = input.length; i < len; i++) {
1079
- const value = input.charCodeAt(i);
1084
+ var fromUtf8 = function (input) {
1085
+ var bytes = [];
1086
+ for (var i = 0, len = input.length; i < len; i++) {
1087
+ var value = input.charCodeAt(i);
1080
1088
  if (value < 0x80) {
1081
1089
  bytes.push(value);
1082
1090
  }
1083
1091
  else if (value < 0x800) {
1084
- bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);
1092
+ bytes.push((value >> 6) | 192, (value & 63) | 128);
1085
1093
  }
1086
1094
  else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {
1087
- const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);
1088
- bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);
1095
+ var surrogatePair = 0x10000 + ((value & 1023) << 10) + (input.charCodeAt(++i) & 1023);
1096
+ bytes.push((surrogatePair >> 18) | 240, ((surrogatePair >> 12) & 63) | 128, ((surrogatePair >> 6) & 63) | 128, (surrogatePair & 63) | 128);
1089
1097
  }
1090
1098
  else {
1091
- bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);
1099
+ bytes.push((value >> 12) | 224, ((value >> 6) & 63) | 128, (value & 63) | 128);
1092
1100
  }
1093
1101
  }
1094
1102
  return Uint8Array.from(bytes);
1095
1103
  };
1096
- const toUtf8 = (input) => {
1097
- let decoded = "";
1098
- for (let i = 0, len = input.length; i < len; i++) {
1099
- const byte = input[i];
1104
+ var toUtf8 = function (input) {
1105
+ var decoded = "";
1106
+ for (var i = 0, len = input.length; i < len; i++) {
1107
+ var byte = input[i];
1100
1108
  if (byte < 0x80) {
1101
1109
  decoded += String.fromCharCode(byte);
1102
1110
  }
1103
- else if (0b11000000 <= byte && byte < 0b11100000) {
1104
- const nextByte = input[++i];
1105
- decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));
1111
+ else if (192 <= byte && byte < 224) {
1112
+ var nextByte = input[++i];
1113
+ decoded += String.fromCharCode(((byte & 31) << 6) | (nextByte & 63));
1106
1114
  }
1107
- else if (0b11110000 <= byte && byte < 0b101101101) {
1108
- const surrogatePair = [byte, input[++i], input[++i], input[++i]];
1109
- const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%");
1115
+ else if (240 <= byte && byte < 365) {
1116
+ var surrogatePair = [byte, input[++i], input[++i], input[++i]];
1117
+ var encoded = "%" + surrogatePair.map(function (byteValue) { return byteValue.toString(16); }).join("%");
1110
1118
  decoded += decodeURIComponent(encoded);
1111
1119
  }
1112
1120
  else {
1113
- decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));
1121
+ decoded += String.fromCharCode(((byte & 15) << 12) | ((input[++i] & 63) << 6) | (input[++i] & 63));
1114
1122
  }
1115
1123
  }
1116
1124
  return decoded;
@@ -1647,8 +1655,12 @@ __webpack_require__.r(__webpack_exports__);
1647
1655
  /* harmony import */ var _whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./whatwgEncodingApi */ "../../node_modules/@aws-crypto/sha256-js/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js");
1648
1656
 
1649
1657
 
1650
- const fromUtf8 = (input) => typeof TextEncoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["fromUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["fromUtf8"])(input);
1651
- const toUtf8 = (input) => typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
1658
+ var fromUtf8 = function (input) {
1659
+ return typeof TextEncoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["fromUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["fromUtf8"])(input);
1660
+ };
1661
+ var toUtf8 = function (input) {
1662
+ return typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
1663
+ };
1652
1664
 
1653
1665
 
1654
1666
  /***/ }),
@@ -1664,44 +1676,44 @@ const toUtf8 = (input) => typeof TextDecoder === "function" ? Object(_whatwgEnco
1664
1676
  __webpack_require__.r(__webpack_exports__);
1665
1677
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromUtf8", function() { return fromUtf8; });
1666
1678
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toUtf8", function() { return toUtf8; });
1667
- const fromUtf8 = (input) => {
1668
- const bytes = [];
1669
- for (let i = 0, len = input.length; i < len; i++) {
1670
- const value = input.charCodeAt(i);
1679
+ var fromUtf8 = function (input) {
1680
+ var bytes = [];
1681
+ for (var i = 0, len = input.length; i < len; i++) {
1682
+ var value = input.charCodeAt(i);
1671
1683
  if (value < 0x80) {
1672
1684
  bytes.push(value);
1673
1685
  }
1674
1686
  else if (value < 0x800) {
1675
- bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);
1687
+ bytes.push((value >> 6) | 192, (value & 63) | 128);
1676
1688
  }
1677
1689
  else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {
1678
- const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);
1679
- bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);
1690
+ var surrogatePair = 0x10000 + ((value & 1023) << 10) + (input.charCodeAt(++i) & 1023);
1691
+ bytes.push((surrogatePair >> 18) | 240, ((surrogatePair >> 12) & 63) | 128, ((surrogatePair >> 6) & 63) | 128, (surrogatePair & 63) | 128);
1680
1692
  }
1681
1693
  else {
1682
- bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);
1694
+ bytes.push((value >> 12) | 224, ((value >> 6) & 63) | 128, (value & 63) | 128);
1683
1695
  }
1684
1696
  }
1685
1697
  return Uint8Array.from(bytes);
1686
1698
  };
1687
- const toUtf8 = (input) => {
1688
- let decoded = "";
1689
- for (let i = 0, len = input.length; i < len; i++) {
1690
- const byte = input[i];
1699
+ var toUtf8 = function (input) {
1700
+ var decoded = "";
1701
+ for (var i = 0, len = input.length; i < len; i++) {
1702
+ var byte = input[i];
1691
1703
  if (byte < 0x80) {
1692
1704
  decoded += String.fromCharCode(byte);
1693
1705
  }
1694
- else if (0b11000000 <= byte && byte < 0b11100000) {
1695
- const nextByte = input[++i];
1696
- decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));
1706
+ else if (192 <= byte && byte < 224) {
1707
+ var nextByte = input[++i];
1708
+ decoded += String.fromCharCode(((byte & 31) << 6) | (nextByte & 63));
1697
1709
  }
1698
- else if (0b11110000 <= byte && byte < 0b101101101) {
1699
- const surrogatePair = [byte, input[++i], input[++i], input[++i]];
1700
- const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%");
1710
+ else if (240 <= byte && byte < 365) {
1711
+ var surrogatePair = [byte, input[++i], input[++i], input[++i]];
1712
+ var encoded = "%" + surrogatePair.map(function (byteValue) { return byteValue.toString(16); }).join("%");
1701
1713
  decoded += decodeURIComponent(encoded);
1702
1714
  }
1703
1715
  else {
1704
- decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));
1716
+ decoded += String.fromCharCode(((byte & 15) << 12) | ((input[++i] & 63) << 6) | (input[++i] & 63));
1705
1717
  }
1706
1718
  }
1707
1719
  return decoded;
@@ -56179,7 +56191,7 @@ function calculateBodyLength(body) {
56179
56191
  "use strict";
56180
56192
  __webpack_require__.r(__webpack_exports__);
56181
56193
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "locateWindow", function() { return locateWindow; });
56182
- const fallbackWindow = {};
56194
+ var fallbackWindow = {};
56183
56195
  function locateWindow() {
56184
56196
  if (typeof window !== "undefined") {
56185
56197
  return window;