@aws-amplify/analytics 5.2.15 → 5.2.16-size-improvement.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/aws-amplify-analytics.js +195 -1460
  2. package/dist/aws-amplify-analytics.js.map +1 -1
  3. package/dist/aws-amplify-analytics.min.js +4 -4
  4. package/dist/aws-amplify-analytics.min.js.map +1 -1
  5. package/lib/Analytics.d.ts +2 -2
  6. package/lib/Analytics.js.map +1 -1
  7. package/lib/types/Analytics.d.ts +1 -0
  8. package/lib/types/Providers/AWSKinesisProvider.d.ts +5 -0
  9. package/lib/types/Providers/AWSKinesisProvider.js +3 -0
  10. package/lib/types/Providers/AWSKinesisProvider.js.map +1 -0
  11. package/lib/types/Providers/AmazonPersonalizeProvider.d.ts +1 -1
  12. package/lib-esm/Analytics.d.ts +2 -2
  13. package/lib-esm/Analytics.js +1 -47
  14. package/lib-esm/Analytics.js.map +1 -1
  15. package/lib-esm/Providers/AWSKinesisFirehoseProvider.js +1 -13
  16. package/lib-esm/Providers/AWSKinesisFirehoseProvider.js.map +1 -1
  17. package/lib-esm/Providers/AWSKinesisProvider.js +1 -36
  18. package/lib-esm/Providers/AWSKinesisProvider.js.map +1 -1
  19. package/lib-esm/Providers/AWSPinpointProvider.js +1 -58
  20. package/lib-esm/Providers/AWSPinpointProvider.js.map +1 -1
  21. package/lib-esm/Providers/AmazonPersonalizeProvider.js +1 -36
  22. package/lib-esm/Providers/AmazonPersonalizeProvider.js.map +1 -1
  23. package/lib-esm/Providers/EventBuffer.js +1 -56
  24. package/lib-esm/Providers/EventBuffer.js.map +1 -1
  25. package/lib-esm/trackers/EventTracker.js +1 -36
  26. package/lib-esm/trackers/EventTracker.js.map +1 -1
  27. package/lib-esm/trackers/PageViewTracker.js +1 -36
  28. package/lib-esm/trackers/PageViewTracker.js.map +1 -1
  29. package/lib-esm/trackers/SessionTracker-rn.js +1 -36
  30. package/lib-esm/trackers/SessionTracker-rn.js.map +1 -1
  31. package/lib-esm/trackers/SessionTracker.js +1 -36
  32. package/lib-esm/trackers/SessionTracker.js.map +1 -1
  33. package/lib-esm/types/Analytics.d.ts +1 -0
  34. package/lib-esm/types/Providers/AWSKinesisProvider.d.ts +5 -0
  35. package/lib-esm/types/Providers/AWSKinesisProvider.js +1 -0
  36. package/lib-esm/types/Providers/AWSKinesisProvider.js.map +1 -0
  37. package/lib-esm/types/Providers/AmazonPersonalizeProvider.d.ts +1 -1
  38. package/lib-esm/utils/MethodEmbed.js +1 -20
  39. package/lib-esm/utils/MethodEmbed.js.map +1 -1
  40. package/package.json +4 -4
  41. package/src/Analytics.ts +11 -3
  42. package/src/types/Analytics.ts +1 -0
  43. package/src/types/Providers/AWSKinesisProvider.ts +5 -0
  44. package/src/types/Providers/AmazonPersonalizeProvider.ts +1 -1
@@ -62689,10 +62689,11 @@ module.exports = function(module) {
62689
62689
  __webpack_require__.r(__webpack_exports__);
62690
62690
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnalyticsClass", function() { return AnalyticsClass; });
62691
62691
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Analytics", function() { return Analytics; });
62692
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
62693
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
62694
- /* harmony import */ var _Providers_AWSPinpointProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Providers/AWSPinpointProvider */ "./lib-esm/Providers/AWSPinpointProvider.js");
62695
- /* harmony import */ var _trackers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./trackers */ "./lib-esm/trackers/index.js");
62692
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
62693
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
62694
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
62695
+ /* harmony import */ var _Providers_AWSPinpointProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Providers/AWSPinpointProvider */ "./lib-esm/Providers/AWSPinpointProvider.js");
62696
+ /* harmony import */ var _trackers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./trackers */ "./lib-esm/trackers/index.js");
62696
62697
  /*
62697
62698
  * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
62698
62699
  *
@@ -62705,173 +62706,15 @@ __webpack_require__.r(__webpack_exports__);
62705
62706
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
62706
62707
  * and limitations under the License.
62707
62708
  */
62708
- var __assign = undefined && undefined.__assign || function () {
62709
- __assign = Object.assign || function (t) {
62710
- for (var s, i = 1, n = arguments.length; i < n; i++) {
62711
- s = arguments[i];
62712
-
62713
- for (var p in s) {
62714
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
62715
- }
62716
- }
62717
-
62718
- return t;
62719
- };
62720
-
62721
- return __assign.apply(this, arguments);
62722
- };
62723
-
62724
- var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
62725
- function adopt(value) {
62726
- return value instanceof P ? value : new P(function (resolve) {
62727
- resolve(value);
62728
- });
62729
- }
62730
-
62731
- return new (P || (P = Promise))(function (resolve, reject) {
62732
- function fulfilled(value) {
62733
- try {
62734
- step(generator.next(value));
62735
- } catch (e) {
62736
- reject(e);
62737
- }
62738
- }
62739
-
62740
- function rejected(value) {
62741
- try {
62742
- step(generator["throw"](value));
62743
- } catch (e) {
62744
- reject(e);
62745
- }
62746
- }
62747
-
62748
- function step(result) {
62749
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
62750
- }
62751
-
62752
- step((generator = generator.apply(thisArg, _arguments || [])).next());
62753
- });
62754
- };
62755
-
62756
- var __generator = undefined && undefined.__generator || function (thisArg, body) {
62757
- var _ = {
62758
- label: 0,
62759
- sent: function sent() {
62760
- if (t[0] & 1) throw t[1];
62761
- return t[1];
62762
- },
62763
- trys: [],
62764
- ops: []
62765
- },
62766
- f,
62767
- y,
62768
- t,
62769
- g;
62770
- return g = {
62771
- next: verb(0),
62772
- "throw": verb(1),
62773
- "return": verb(2)
62774
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
62775
- return this;
62776
- }), g;
62777
-
62778
- function verb(n) {
62779
- return function (v) {
62780
- return step([n, v]);
62781
- };
62782
- }
62783
-
62784
- function step(op) {
62785
- if (f) throw new TypeError("Generator is already executing.");
62786
-
62787
- while (_) {
62788
- try {
62789
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
62790
- if (y = 0, t) op = [op[0] & 2, t.value];
62791
-
62792
- switch (op[0]) {
62793
- case 0:
62794
- case 1:
62795
- t = op;
62796
- break;
62797
-
62798
- case 4:
62799
- _.label++;
62800
- return {
62801
- value: op[1],
62802
- done: false
62803
- };
62804
-
62805
- case 5:
62806
- _.label++;
62807
- y = op[1];
62808
- op = [0];
62809
- continue;
62810
-
62811
- case 7:
62812
- op = _.ops.pop();
62813
-
62814
- _.trys.pop();
62815
-
62816
- continue;
62817
-
62818
- default:
62819
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
62820
- _ = 0;
62821
- continue;
62822
- }
62823
-
62824
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
62825
- _.label = op[1];
62826
- break;
62827
- }
62828
-
62829
- if (op[0] === 6 && _.label < t[1]) {
62830
- _.label = t[1];
62831
- t = op;
62832
- break;
62833
- }
62834
-
62835
- if (t && _.label < t[2]) {
62836
- _.label = t[2];
62837
-
62838
- _.ops.push(op);
62839
-
62840
- break;
62841
- }
62842
-
62843
- if (t[2]) _.ops.pop();
62844
-
62845
- _.trys.pop();
62846
-
62847
- continue;
62848
- }
62849
-
62850
- op = body.call(thisArg, _);
62851
- } catch (e) {
62852
- op = [6, e];
62853
- y = 0;
62854
- } finally {
62855
- f = t = 0;
62856
- }
62857
- }
62858
-
62859
- if (op[0] & 5) throw op[1];
62860
- return {
62861
- value: op[0] ? op[1] : void 0,
62862
- done: true
62863
- };
62864
- }
62865
- };
62866
62709
 
62867
62710
 
62868
62711
 
62869
62712
 
62870
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AnalyticsClass');
62713
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AnalyticsClass');
62871
62714
  var AMPLIFY_SYMBOL = typeof Symbol !== 'undefined' && typeof Symbol["for"] === 'function' ? Symbol["for"]('amplify_default') : '@@amplify_default';
62872
62715
 
62873
62716
  var dispatchAnalyticsEvent = function dispatchAnalyticsEvent(event, data, message) {
62874
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].dispatch('analytics', {
62717
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].dispatch('analytics', {
62875
62718
  event: event,
62876
62719
  data: data,
62877
62720
  message: message
@@ -62879,9 +62722,9 @@ var dispatchAnalyticsEvent = function dispatchAnalyticsEvent(event, data, messag
62879
62722
  };
62880
62723
 
62881
62724
  var trackers = {
62882
- pageView: _trackers__WEBPACK_IMPORTED_MODULE_2__["PageViewTracker"],
62883
- event: _trackers__WEBPACK_IMPORTED_MODULE_2__["EventTracker"],
62884
- session: _trackers__WEBPACK_IMPORTED_MODULE_2__["SessionTracker"]
62725
+ pageView: _trackers__WEBPACK_IMPORTED_MODULE_3__["PageViewTracker"],
62726
+ event: _trackers__WEBPACK_IMPORTED_MODULE_3__["EventTracker"],
62727
+ session: _trackers__WEBPACK_IMPORTED_MODULE_3__["SessionTracker"]
62885
62728
  };
62886
62729
  var _instance = null;
62887
62730
  /**
@@ -62902,9 +62745,9 @@ function () {
62902
62745
  this._trackers = {};
62903
62746
  _instance = this;
62904
62747
  this.record = this.record.bind(this);
62905
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].listen('auth', listener);
62906
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].listen('storage', listener);
62907
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].listen('analytics', listener);
62748
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].listen('auth', listener);
62749
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].listen('storage', listener);
62750
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].listen('analytics', listener);
62908
62751
  }
62909
62752
 
62910
62753
  AnalyticsClass.prototype.getModuleName = function () {
@@ -62921,7 +62764,7 @@ function () {
62921
62764
 
62922
62765
  if (!config) return this._config;
62923
62766
  logger.debug('configure Analytics', config);
62924
- var amplifyConfig = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Parser"].parseMobilehubConfig(config);
62767
+ var amplifyConfig = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Parser"].parseMobilehubConfig(config);
62925
62768
  this._config = Object.assign({}, this._config, amplifyConfig.Analytics, config);
62926
62769
 
62927
62770
  if (this._config['disabled']) {
@@ -62936,14 +62779,14 @@ function () {
62936
62779
  this._pluggables.forEach(function (pluggable) {
62937
62780
  // for backward compatibility
62938
62781
  var providerConfig = pluggable.getProviderName() === 'AWSPinpoint' && !_this._config['AWSPinpoint'] ? _this._config : _this._config[pluggable.getProviderName()];
62939
- pluggable.configure(__assign({
62782
+ pluggable.configure(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
62940
62783
  disabled: _this._config['disabled'],
62941
62784
  autoSessionRecord: _this._config['autoSessionRecord']
62942
62785
  }, providerConfig));
62943
62786
  });
62944
62787
 
62945
62788
  if (this._pluggables.length === 0) {
62946
- this.addPluggable(new _Providers_AWSPinpointProvider__WEBPACK_IMPORTED_MODULE_1__["AWSPinpointProvider"]());
62789
+ this.addPluggable(new _Providers_AWSPinpointProvider__WEBPACK_IMPORTED_MODULE_2__["AWSPinpointProvider"]());
62947
62790
  }
62948
62791
 
62949
62792
  dispatchAnalyticsEvent('configured', null, "The Analytics category has been configured successfully");
@@ -62963,7 +62806,7 @@ function () {
62963
62806
 
62964
62807
  var providerConfig = pluggable.getProviderName() === 'AWSPinpoint' && !this._config['AWSPinpoint'] ? this._config : this._config[pluggable.getProviderName()];
62965
62808
 
62966
- var config = __assign({
62809
+ var config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
62967
62810
  disabled: this._config['disabled']
62968
62811
  }, providerConfig);
62969
62812
 
@@ -63039,9 +62882,9 @@ function () {
63039
62882
 
63040
62883
 
63041
62884
  AnalyticsClass.prototype.startSession = function (provider) {
63042
- return __awaiter(this, void 0, void 0, function () {
62885
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
63043
62886
  var params;
63044
- return __generator(this, function (_a) {
62887
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63045
62888
  params = {
63046
62889
  event: {
63047
62890
  name: '_session.start'
@@ -63062,9 +62905,9 @@ function () {
63062
62905
 
63063
62906
 
63064
62907
  AnalyticsClass.prototype.stopSession = function (provider) {
63065
- return __awaiter(this, void 0, void 0, function () {
62908
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
63066
62909
  var params;
63067
- return __generator(this, function (_a) {
62910
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63068
62911
  params = {
63069
62912
  event: {
63070
62913
  name: '_session.stop'
@@ -63079,9 +62922,9 @@ function () {
63079
62922
  };
63080
62923
 
63081
62924
  AnalyticsClass.prototype.record = function (event, providerOrAttributes, metrics) {
63082
- return __awaiter(this, void 0, void 0, function () {
62925
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
63083
62926
  var params;
63084
- return __generator(this, function (_a) {
62927
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63085
62928
  params = null; // this is just for compatibility, going to be deprecated
63086
62929
 
63087
62930
  if (typeof event === 'string') {
@@ -63108,10 +62951,10 @@ function () {
63108
62951
  };
63109
62952
 
63110
62953
  AnalyticsClass.prototype.updateEndpoint = function (attrs, provider) {
63111
- return __awaiter(this, void 0, void 0, function () {
62954
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
63112
62955
  var event;
63113
- return __generator(this, function (_a) {
63114
- event = __assign(__assign({}, attrs), {
62956
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
62957
+ event = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, attrs), {
63115
62958
  name: '_update_endpoint'
63116
62959
  });
63117
62960
  return [2
@@ -63218,9 +63061,9 @@ var authEvent = function authEvent(payload) {
63218
63061
  }
63219
63062
 
63220
63063
  var recordAuthEvent = function recordAuthEvent(eventName) {
63221
- return __awaiter(void 0, void 0, void 0, function () {
63064
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(void 0, void 0, void 0, function () {
63222
63065
  var err_1;
63223
- return __generator(this, function (_a) {
63066
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63224
63067
  switch (_a.label) {
63225
63068
  case 0:
63226
63069
  if (!(authConfigured && analyticsConfigured)) return [3
@@ -63317,7 +63160,7 @@ var sendEvents = function sendEvents() {
63317
63160
  };
63318
63161
 
63319
63162
  var Analytics = new AnalyticsClass();
63320
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Amplify"].register(Analytics);
63163
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].register(Analytics);
63321
63164
 
63322
63165
  /***/ }),
63323
63166
 
@@ -63331,11 +63174,12 @@ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Amplify"].register(Analytics);
63331
63174
  "use strict";
63332
63175
  __webpack_require__.r(__webpack_exports__);
63333
63176
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AWSKinesisFirehoseProvider", function() { return AWSKinesisFirehoseProvider; });
63334
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63335
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
63336
- /* harmony import */ var _AWSKinesisProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AWSKinesisProvider */ "./lib-esm/Providers/AWSKinesisProvider.js");
63337
- /* harmony import */ var _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-firehose */ "../../node_modules/@aws-sdk/client-firehose/dist/es/index.js");
63338
- /* harmony import */ var _aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-sdk/util-utf8-browser */ "../../node_modules/@aws-sdk/util-utf8-browser/dist/es/index.js");
63177
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
63178
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63179
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
63180
+ /* harmony import */ var _AWSKinesisProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AWSKinesisProvider */ "./lib-esm/Providers/AWSKinesisProvider.js");
63181
+ /* harmony import */ var _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-sdk/client-firehose */ "../../node_modules/@aws-sdk/client-firehose/dist/es/index.js");
63182
+ /* harmony import */ var _aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @aws-sdk/util-utf8-browser */ "../../node_modules/@aws-sdk/util-utf8-browser/dist/es/index.js");
63339
63183
  /*
63340
63184
  * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
63341
63185
  *
@@ -63348,42 +63192,17 @@ __webpack_require__.r(__webpack_exports__);
63348
63192
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
63349
63193
  * and limitations under the License.
63350
63194
  */
63351
- var __extends = undefined && undefined.__extends || function () {
63352
- var _extendStatics = function extendStatics(d, b) {
63353
- _extendStatics = Object.setPrototypeOf || {
63354
- __proto__: []
63355
- } instanceof Array && function (d, b) {
63356
- d.__proto__ = b;
63357
- } || function (d, b) {
63358
- for (var p in b) {
63359
- if (b.hasOwnProperty(p)) d[p] = b[p];
63360
- }
63361
- };
63362
-
63363
- return _extendStatics(d, b);
63364
- };
63365
-
63366
- return function (d, b) {
63367
- _extendStatics(d, b);
63368
-
63369
- function __() {
63370
- this.constructor = d;
63371
- }
63372
-
63373
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
63374
- };
63375
- }();
63376
63195
 
63377
63196
 
63378
63197
 
63379
63198
 
63380
63199
 
63381
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AWSKineisFirehoseProvider');
63200
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AWSKineisFirehoseProvider');
63382
63201
 
63383
63202
  var AWSKinesisFirehoseProvider =
63384
63203
  /** @class */
63385
63204
  function (_super) {
63386
- __extends(AWSKinesisFirehoseProvider, _super);
63205
+ Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AWSKinesisFirehoseProvider, _super);
63387
63206
 
63388
63207
  function AWSKinesisFirehoseProvider(config) {
63389
63208
  return _super.call(this, config) || this;
@@ -63423,7 +63242,7 @@ function (_super) {
63423
63242
  }
63424
63243
 
63425
63244
  var bufferData = data && typeof data !== 'string' ? JSON.stringify(data) : data;
63426
- var Data = Object(_aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_3__["fromUtf8"])(bufferData);
63245
+ var Data = Object(_aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_4__["fromUtf8"])(bufferData);
63427
63246
  var record = {
63428
63247
  Data: Data
63429
63248
  };
@@ -63432,7 +63251,7 @@ function (_super) {
63432
63251
  Object.keys(records).map(function (streamName) {
63433
63252
  logger.debug('putting records to kinesis', streamName, 'with records', records[streamName]);
63434
63253
 
63435
- _this._kinesisFirehose.send(new _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_2__["PutRecordBatchCommand"]({
63254
+ _this._kinesisFirehose.send(new _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_3__["PutRecordBatchCommand"]({
63436
63255
  Records: records[streamName],
63437
63256
  DeliveryStreamName: streamName
63438
63257
  })).then(function (res) {
@@ -63458,7 +63277,7 @@ function (_super) {
63458
63277
 
63459
63278
  AWSKinesisFirehoseProvider.prototype._initFirehose = function (region, credentials) {
63460
63279
  logger.debug('initialize kinesis firehose with credentials', credentials);
63461
- this._kinesisFirehose = new _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_2__["FirehoseClient"]({
63280
+ this._kinesisFirehose = new _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_3__["FirehoseClient"]({
63462
63281
  apiVersion: '2015-08-04',
63463
63282
  region: region,
63464
63283
  credentials: credentials
@@ -63467,7 +63286,7 @@ function (_super) {
63467
63286
  };
63468
63287
 
63469
63288
  return AWSKinesisFirehoseProvider;
63470
- }(_AWSKinesisProvider__WEBPACK_IMPORTED_MODULE_1__["AWSKinesisProvider"]);
63289
+ }(_AWSKinesisProvider__WEBPACK_IMPORTED_MODULE_2__["AWSKinesisProvider"]);
63471
63290
 
63472
63291
 
63473
63292
  /**
@@ -63488,10 +63307,11 @@ function (_super) {
63488
63307
  "use strict";
63489
63308
  __webpack_require__.r(__webpack_exports__);
63490
63309
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AWSKinesisProvider", function() { return AWSKinesisProvider; });
63491
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63492
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
63493
- /* harmony import */ var _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-sdk/client-kinesis */ "../../node_modules/@aws-sdk/client-kinesis/dist/es/index.js");
63494
- /* harmony import */ var _aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/util-utf8-browser */ "../../node_modules/@aws-sdk/util-utf8-browser/dist/es/index.js");
63310
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
63311
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63312
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
63313
+ /* harmony import */ var _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-kinesis */ "../../node_modules/@aws-sdk/client-kinesis/dist/es/index.js");
63314
+ /* harmony import */ var _aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-sdk/util-utf8-browser */ "../../node_modules/@aws-sdk/util-utf8-browser/dist/es/index.js");
63495
63315
  /*
63496
63316
  * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
63497
63317
  *
@@ -63504,153 +63324,11 @@ __webpack_require__.r(__webpack_exports__);
63504
63324
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
63505
63325
  * and limitations under the License.
63506
63326
  */
63507
- var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
63508
- function adopt(value) {
63509
- return value instanceof P ? value : new P(function (resolve) {
63510
- resolve(value);
63511
- });
63512
- }
63513
-
63514
- return new (P || (P = Promise))(function (resolve, reject) {
63515
- function fulfilled(value) {
63516
- try {
63517
- step(generator.next(value));
63518
- } catch (e) {
63519
- reject(e);
63520
- }
63521
- }
63522
-
63523
- function rejected(value) {
63524
- try {
63525
- step(generator["throw"](value));
63526
- } catch (e) {
63527
- reject(e);
63528
- }
63529
- }
63530
-
63531
- function step(result) {
63532
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
63533
- }
63534
-
63535
- step((generator = generator.apply(thisArg, _arguments || [])).next());
63536
- });
63537
- };
63538
-
63539
- var __generator = undefined && undefined.__generator || function (thisArg, body) {
63540
- var _ = {
63541
- label: 0,
63542
- sent: function sent() {
63543
- if (t[0] & 1) throw t[1];
63544
- return t[1];
63545
- },
63546
- trys: [],
63547
- ops: []
63548
- },
63549
- f,
63550
- y,
63551
- t,
63552
- g;
63553
- return g = {
63554
- next: verb(0),
63555
- "throw": verb(1),
63556
- "return": verb(2)
63557
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
63558
- return this;
63559
- }), g;
63560
-
63561
- function verb(n) {
63562
- return function (v) {
63563
- return step([n, v]);
63564
- };
63565
- }
63566
-
63567
- function step(op) {
63568
- if (f) throw new TypeError("Generator is already executing.");
63569
-
63570
- while (_) {
63571
- try {
63572
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
63573
- if (y = 0, t) op = [op[0] & 2, t.value];
63574
-
63575
- switch (op[0]) {
63576
- case 0:
63577
- case 1:
63578
- t = op;
63579
- break;
63580
-
63581
- case 4:
63582
- _.label++;
63583
- return {
63584
- value: op[1],
63585
- done: false
63586
- };
63587
-
63588
- case 5:
63589
- _.label++;
63590
- y = op[1];
63591
- op = [0];
63592
- continue;
63593
-
63594
- case 7:
63595
- op = _.ops.pop();
63596
-
63597
- _.trys.pop();
63598
-
63599
- continue;
63600
-
63601
- default:
63602
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
63603
- _ = 0;
63604
- continue;
63605
- }
63606
-
63607
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
63608
- _.label = op[1];
63609
- break;
63610
- }
63611
-
63612
- if (op[0] === 6 && _.label < t[1]) {
63613
- _.label = t[1];
63614
- t = op;
63615
- break;
63616
- }
63617
-
63618
- if (t && _.label < t[2]) {
63619
- _.label = t[2];
63620
-
63621
- _.ops.push(op);
63622
-
63623
- break;
63624
- }
63625
-
63626
- if (t[2]) _.ops.pop();
63627
-
63628
- _.trys.pop();
63629
-
63630
- continue;
63631
- }
63632
-
63633
- op = body.call(thisArg, _);
63634
- } catch (e) {
63635
- op = [6, e];
63636
- y = 0;
63637
- } finally {
63638
- f = t = 0;
63639
- }
63640
- }
63641
-
63642
- if (op[0] & 5) throw op[1];
63643
- return {
63644
- value: op[0] ? op[1] : void 0,
63645
- done: true
63646
- };
63647
- }
63648
- };
63649
63327
 
63650
63328
 
63651
63329
 
63652
63330
 
63653
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AWSKinesisProvider'); // events buffer
63331
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AWSKinesisProvider'); // events buffer
63654
63332
 
63655
63333
  var BUFFER_SIZE = 1000;
63656
63334
  var FLUSH_SIZE = 100;
@@ -63733,9 +63411,9 @@ function () {
63733
63411
 
63734
63412
 
63735
63413
  AWSKinesisProvider.prototype.record = function (params) {
63736
- return __awaiter(this, void 0, void 0, function () {
63414
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
63737
63415
  var credentials;
63738
- return __generator(this, function (_a) {
63416
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63739
63417
  switch (_a.label) {
63740
63418
  case 0:
63741
63419
  return [4
@@ -63840,7 +63518,7 @@ function () {
63840
63518
  }
63841
63519
 
63842
63520
  var bufferData = evt.data && typeof evt.data !== 'string' ? JSON.stringify(evt.data) : evt.data;
63843
- var Data = Object(_aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_2__["fromUtf8"])(bufferData);
63521
+ var Data = Object(_aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_3__["fromUtf8"])(bufferData);
63844
63522
  var PartitionKey = evt.partitionKey || 'partition-' + credentials.identityId;
63845
63523
  var record = {
63846
63524
  Data: Data,
@@ -63849,9 +63527,9 @@ function () {
63849
63527
  records[streamName].push(record);
63850
63528
  });
63851
63529
  Object.keys(records).map(function (streamName) {
63852
- return __awaiter(_this, void 0, void 0, function () {
63530
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
63853
63531
  var command, err_1;
63854
- return __generator(this, function (_a) {
63532
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63855
63533
  switch (_a.label) {
63856
63534
  case 0:
63857
63535
  logger.debug('putting records to kinesis with records', records[streamName]);
@@ -63860,7 +63538,7 @@ function () {
63860
63538
  case 1:
63861
63539
  _a.trys.push([1, 3,, 4]);
63862
63540
 
63863
- command = new _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_1__["PutRecordsCommand"]({
63541
+ command = new _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_2__["PutRecordsCommand"]({
63864
63542
  Records: records[streamName],
63865
63543
  StreamName: streamName
63866
63544
  });
@@ -63909,10 +63587,10 @@ function () {
63909
63587
 
63910
63588
  AWSKinesisProvider.prototype._initKinesis = function (region, endpoint, credentials) {
63911
63589
  logger.debug('initialize kinesis with credentials', credentials);
63912
- this._kinesis = new _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_1__["KinesisClient"]({
63590
+ this._kinesis = new _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_2__["KinesisClient"]({
63913
63591
  region: region,
63914
63592
  credentials: credentials,
63915
- customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["getAmplifyUserAgent"])(),
63593
+ customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])(),
63916
63594
  endpoint: endpoint
63917
63595
  });
63918
63596
  return true;
@@ -63926,10 +63604,10 @@ function () {
63926
63604
  AWSKinesisProvider.prototype._getCredentials = function () {
63927
63605
  var _this = this;
63928
63606
 
63929
- return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].get().then(function (credentials) {
63607
+ return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].get().then(function (credentials) {
63930
63608
  if (!credentials) return null;
63931
63609
  logger.debug('set credentials for analytics', _this._config.credentials);
63932
- return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].shear(credentials);
63610
+ return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].shear(credentials);
63933
63611
  })["catch"](function (err) {
63934
63612
  logger.debug('ensure credentials error', err);
63935
63613
  return null;
@@ -63958,14 +63636,15 @@ function () {
63958
63636
  "use strict";
63959
63637
  __webpack_require__.r(__webpack_exports__);
63960
63638
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AWSPinpointProvider", function() { return AWSPinpointProvider; });
63961
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63962
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
63963
- /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "../../node_modules/@aws-sdk/client-pinpoint/dist/es/index.js");
63964
- /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/cache */ "@aws-amplify/cache");
63965
- /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2__);
63966
- /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uuid */ "../../node_modules/uuid/index.js");
63967
- /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(uuid__WEBPACK_IMPORTED_MODULE_3__);
63968
- /* harmony import */ var _EventBuffer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./EventBuffer */ "./lib-esm/Providers/EventBuffer.js");
63639
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
63640
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63641
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
63642
+ /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "../../node_modules/@aws-sdk/client-pinpoint/dist/es/index.js");
63643
+ /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-amplify/cache */ "@aws-amplify/cache");
63644
+ /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_cache__WEBPACK_IMPORTED_MODULE_3__);
63645
+ /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid */ "../../node_modules/uuid/index.js");
63646
+ /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(uuid__WEBPACK_IMPORTED_MODULE_4__);
63647
+ /* harmony import */ var _EventBuffer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./EventBuffer */ "./lib-esm/Providers/EventBuffer.js");
63969
63648
  function _typeof(obj) {
63970
63649
  "@babel/helpers - typeof";
63971
63650
 
@@ -63989,177 +63668,6 @@ function _typeof(obj) {
63989
63668
  */
63990
63669
 
63991
63670
 
63992
- var __assign = undefined && undefined.__assign || function () {
63993
- __assign = Object.assign || function (t) {
63994
- for (var s, i = 1, n = arguments.length; i < n; i++) {
63995
- s = arguments[i];
63996
-
63997
- for (var p in s) {
63998
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
63999
- }
64000
- }
64001
-
64002
- return t;
64003
- };
64004
-
64005
- return __assign.apply(this, arguments);
64006
- };
64007
-
64008
- var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
64009
- function adopt(value) {
64010
- return value instanceof P ? value : new P(function (resolve) {
64011
- resolve(value);
64012
- });
64013
- }
64014
-
64015
- return new (P || (P = Promise))(function (resolve, reject) {
64016
- function fulfilled(value) {
64017
- try {
64018
- step(generator.next(value));
64019
- } catch (e) {
64020
- reject(e);
64021
- }
64022
- }
64023
-
64024
- function rejected(value) {
64025
- try {
64026
- step(generator["throw"](value));
64027
- } catch (e) {
64028
- reject(e);
64029
- }
64030
- }
64031
-
64032
- function step(result) {
64033
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
64034
- }
64035
-
64036
- step((generator = generator.apply(thisArg, _arguments || [])).next());
64037
- });
64038
- };
64039
-
64040
- var __generator = undefined && undefined.__generator || function (thisArg, body) {
64041
- var _ = {
64042
- label: 0,
64043
- sent: function sent() {
64044
- if (t[0] & 1) throw t[1];
64045
- return t[1];
64046
- },
64047
- trys: [],
64048
- ops: []
64049
- },
64050
- f,
64051
- y,
64052
- t,
64053
- g;
64054
- return g = {
64055
- next: verb(0),
64056
- "throw": verb(1),
64057
- "return": verb(2)
64058
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
64059
- return this;
64060
- }), g;
64061
-
64062
- function verb(n) {
64063
- return function (v) {
64064
- return step([n, v]);
64065
- };
64066
- }
64067
-
64068
- function step(op) {
64069
- if (f) throw new TypeError("Generator is already executing.");
64070
-
64071
- while (_) {
64072
- try {
64073
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
64074
- if (y = 0, t) op = [op[0] & 2, t.value];
64075
-
64076
- switch (op[0]) {
64077
- case 0:
64078
- case 1:
64079
- t = op;
64080
- break;
64081
-
64082
- case 4:
64083
- _.label++;
64084
- return {
64085
- value: op[1],
64086
- done: false
64087
- };
64088
-
64089
- case 5:
64090
- _.label++;
64091
- y = op[1];
64092
- op = [0];
64093
- continue;
64094
-
64095
- case 7:
64096
- op = _.ops.pop();
64097
-
64098
- _.trys.pop();
64099
-
64100
- continue;
64101
-
64102
- default:
64103
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
64104
- _ = 0;
64105
- continue;
64106
- }
64107
-
64108
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
64109
- _.label = op[1];
64110
- break;
64111
- }
64112
-
64113
- if (op[0] === 6 && _.label < t[1]) {
64114
- _.label = t[1];
64115
- t = op;
64116
- break;
64117
- }
64118
-
64119
- if (t && _.label < t[2]) {
64120
- _.label = t[2];
64121
-
64122
- _.ops.push(op);
64123
-
64124
- break;
64125
- }
64126
-
64127
- if (t[2]) _.ops.pop();
64128
-
64129
- _.trys.pop();
64130
-
64131
- continue;
64132
- }
64133
-
64134
- op = body.call(thisArg, _);
64135
- } catch (e) {
64136
- op = [6, e];
64137
- y = 0;
64138
- } finally {
64139
- f = t = 0;
64140
- }
64141
- }
64142
-
64143
- if (op[0] & 5) throw op[1];
64144
- return {
64145
- value: op[0] ? op[1] : void 0,
64146
- done: true
64147
- };
64148
- }
64149
- };
64150
-
64151
- var __rest = undefined && undefined.__rest || function (s, e) {
64152
- var t = {};
64153
-
64154
- for (var p in s) {
64155
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
64156
- }
64157
-
64158
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
64159
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
64160
- }
64161
- return t;
64162
- };
64163
63671
 
64164
63672
 
64165
63673
 
@@ -64169,13 +63677,13 @@ var __rest = undefined && undefined.__rest || function (s, e) {
64169
63677
  var AMPLIFY_SYMBOL = typeof Symbol !== 'undefined' && typeof Symbol["for"] === 'function' ? Symbol["for"]('amplify_default') : '@@amplify_default';
64170
63678
 
64171
63679
  var dispatchAnalyticsEvent = function dispatchAnalyticsEvent(event, data) {
64172
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].dispatch('analytics', {
63680
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].dispatch('analytics', {
64173
63681
  event: event,
64174
63682
  data: data
64175
63683
  }, 'Analytics', AMPLIFY_SYMBOL);
64176
63684
  };
64177
63685
 
64178
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AWSPinpointProvider');
63686
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AWSPinpointProvider');
64179
63687
  var RETRYABLE_CODES = [429, 500];
64180
63688
  var ACCEPTED_CODES = [202];
64181
63689
  var FORBIDDEN_CODE = 403;
@@ -64205,7 +63713,7 @@ function () {
64205
63713
  this._config.flushSize = this._config.flushSize || FLUSH_SIZE;
64206
63714
  this._config.flushInterval = this._config.flushInterval || FLUSH_INTERVAL;
64207
63715
  this._config.resendLimit = this._config.resendLimit || RESEND_LIMIT;
64208
- this._clientInfo = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ClientDevice"].clientInfo();
63716
+ this._clientInfo = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ClientDevice"].clientInfo();
64209
63717
  }
64210
63718
  /**
64211
63719
  * get the category of the plugin
@@ -64266,9 +63774,9 @@ function () {
64266
63774
 
64267
63775
 
64268
63776
  AWSPinpointProvider.prototype.record = function (params, handlers) {
64269
- return __awaiter(this, void 0, void 0, function () {
63777
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64270
63778
  var credentials, timestamp;
64271
- return __generator(this, function (_a) {
63779
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64272
63780
  switch (_a.label) {
64273
63781
  case 0:
64274
63782
  logger.debug('_public record', params);
@@ -64292,7 +63800,7 @@ function () {
64292
63800
 
64293
63801
  this._generateSession(params);
64294
63802
 
64295
- params.event.eventId = Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
63803
+ params.event.eventId = Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64296
63804
  Object.assign(params, {
64297
63805
  timestamp: timestamp,
64298
63806
  config: this._config
@@ -64315,9 +63823,9 @@ function () {
64315
63823
  };
64316
63824
 
64317
63825
  AWSPinpointProvider.prototype._sendEndpointUpdate = function (endpointObject) {
64318
- return __awaiter(this, void 0, void 0, function () {
63826
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64319
63827
  var next;
64320
- return __generator(this, function (_a) {
63828
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64321
63829
  switch (_a.label) {
64322
63830
  case 0:
64323
63831
  if (this._endpointUpdateInProgress) {
@@ -64370,14 +63878,14 @@ function () {
64370
63878
  };
64371
63879
 
64372
63880
  AWSPinpointProvider.prototype._generateSession = function (params) {
64373
- this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
63881
+ this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64374
63882
  var event = params.event;
64375
63883
 
64376
63884
  switch (event.name) {
64377
63885
  case SESSION_START:
64378
63886
  // refresh the session id and session start time
64379
63887
  this._sessionStartTimestamp = new Date().getTime();
64380
- this._sessionId = Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
63888
+ this._sessionId = Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64381
63889
  event.session = {
64382
63890
  Id: this._sessionId,
64383
63891
  StartTimestamp: new Date(this._sessionStartTimestamp).toISOString()
@@ -64387,7 +63895,7 @@ function () {
64387
63895
  case SESSION_STOP:
64388
63896
  var stopTimestamp = new Date().getTime();
64389
63897
  this._sessionStartTimestamp = this._sessionStartTimestamp || new Date().getTime();
64390
- this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
63898
+ this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64391
63899
  event.session = {
64392
63900
  Id: this._sessionId,
64393
63901
  Duration: stopTimestamp - this._sessionStartTimestamp,
@@ -64400,7 +63908,7 @@ function () {
64400
63908
 
64401
63909
  default:
64402
63910
  this._sessionStartTimestamp = this._sessionStartTimestamp || new Date().getTime();
64403
- this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
63911
+ this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64404
63912
  event.session = {
64405
63913
  Id: this._sessionId,
64406
63914
  StartTimestamp: new Date(this._sessionStartTimestamp).toISOString()
@@ -64409,9 +63917,9 @@ function () {
64409
63917
  };
64410
63918
 
64411
63919
  AWSPinpointProvider.prototype._send = function (params, handlers) {
64412
- return __awaiter(this, void 0, void 0, function () {
63920
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64413
63921
  var event;
64414
- return __generator(this, function (_a) {
63922
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64415
63923
  event = params.event;
64416
63924
 
64417
63925
  switch (event.name) {
@@ -64475,15 +63983,15 @@ function () {
64475
63983
  };
64476
63984
 
64477
63985
  AWSPinpointProvider.prototype._pinpointPutEvents = function (params, handlers) {
64478
- return __awaiter(this, void 0, void 0, function () {
63986
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64479
63987
  var eventId, endpointId, eventParams, command, data, _a, _b, _c, _d, StatusCode, Message, err_1;
64480
63988
 
64481
- return __generator(this, function (_e) {
63989
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_e) {
64482
63990
  switch (_e.label) {
64483
63991
  case 0:
64484
63992
  eventId = params.event.eventId, endpointId = params.config.endpointId;
64485
63993
  eventParams = this._generateBatchItemContext(params);
64486
- command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__["PutEventsCommand"](eventParams);
63994
+ command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["PutEventsCommand"](eventParams);
64487
63995
  _e.label = 1;
64488
63996
 
64489
63997
  case 1:
@@ -64564,7 +64072,7 @@ function () {
64564
64072
  region: region,
64565
64073
  service: MOBILE_SERVICE_NAME
64566
64074
  };
64567
- var requestUrl = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Signer"].signUrl(request, accessInfo, serviceInfo, null);
64075
+ var requestUrl = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Signer"].signUrl(request, accessInfo, serviceInfo, null);
64568
64076
  var success = navigator.sendBeacon(requestUrl, body);
64569
64077
 
64570
64078
  if (success) {
@@ -64589,15 +64097,15 @@ function () {
64589
64097
  };
64590
64098
 
64591
64099
  AWSPinpointProvider.prototype._updateEndpoint = function (endpointObject) {
64592
- return __awaiter(this, void 0, void 0, function () {
64100
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64593
64101
  var params, handlers, config, event, appId, endpointId, request, update_params, command, data, err_2, failureData;
64594
- return __generator(this, function (_a) {
64102
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64595
64103
  switch (_a.label) {
64596
64104
  case 0:
64597
64105
  params = endpointObject.params, handlers = endpointObject.handlers;
64598
64106
  config = params.config, event = params.event;
64599
64107
  appId = config.appId, endpointId = config.endpointId;
64600
- request = this._endpointRequest(config, _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["JS"].transferKeyToLowerCase(event, [], ['attributes', 'userAttributes', 'Attributes', 'UserAttributes']));
64108
+ request = this._endpointRequest(config, _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].transferKeyToLowerCase(event, [], ['attributes', 'userAttributes', 'Attributes', 'UserAttributes']));
64601
64109
  update_params = {
64602
64110
  ApplicationId: appId,
64603
64111
  EndpointId: endpointId,
@@ -64608,7 +64116,7 @@ function () {
64608
64116
  case 1:
64609
64117
  _a.trys.push([1, 3,, 4]);
64610
64118
 
64611
- command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__["UpdateEndpointCommand"](update_params);
64119
+ command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["UpdateEndpointCommand"](update_params);
64612
64120
  return [4
64613
64121
  /*yield*/
64614
64122
  , this.pinpointClient.send(command)];
@@ -64646,9 +64154,9 @@ function () {
64646
64154
  };
64647
64155
 
64648
64156
  AWSPinpointProvider.prototype._handleEndpointUpdateFailure = function (failureData) {
64649
- return __awaiter(this, void 0, void 0, function () {
64157
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64650
64158
  var err, endpointObject, statusCode, exponential;
64651
- return __generator(this, function (_a) {
64159
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64652
64160
  err = failureData.err, endpointObject = failureData.endpointObject;
64653
64161
  statusCode = err.$metadata && err.$metadata.httpStatusCode;
64654
64162
  logger.debug('updateEndpoint error', err);
@@ -64723,9 +64231,9 @@ function () {
64723
64231
 
64724
64232
 
64725
64233
  AWSPinpointProvider.prototype._initClients = function (credentials) {
64726
- return __awaiter(this, void 0, void 0, function () {
64234
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64727
64235
  var identityId, region;
64728
- return __generator(this, function (_a) {
64236
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64729
64237
  logger.debug('init clients');
64730
64238
 
64731
64239
  if (this.pinpointClient && this._config.credentials && this._config.credentials.sessionToken === credentials.sessionToken && this._config.credentials.identityId === credentials.identityId) {
@@ -64739,10 +64247,10 @@ function () {
64739
64247
  this._config.credentials = credentials;
64740
64248
  region = this._config.region;
64741
64249
  logger.debug('init clients with credentials', credentials);
64742
- this.pinpointClient = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__["PinpointClient"]({
64250
+ this.pinpointClient = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["PinpointClient"]({
64743
64251
  region: region,
64744
64252
  credentials: credentials,
64745
- customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["getAmplifyUserAgent"])()
64253
+ customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])()
64746
64254
  }); // TODO: remove this middleware once a long term fix is implemented by aws-sdk-js team.
64747
64255
 
64748
64256
  this.pinpointClient.middlewareStack.addRelativeTo(function (next) {
@@ -64777,7 +64285,7 @@ function () {
64777
64285
  };
64778
64286
 
64779
64287
  AWSPinpointProvider.prototype._bufferExists = function () {
64780
- return this._buffer && this._buffer instanceof _EventBuffer__WEBPACK_IMPORTED_MODULE_4__["default"];
64288
+ return this._buffer && this._buffer instanceof _EventBuffer__WEBPACK_IMPORTED_MODULE_5__["default"];
64781
64289
  };
64782
64290
 
64783
64291
  AWSPinpointProvider.prototype._initBuffer = function () {
@@ -64785,7 +64293,7 @@ function () {
64785
64293
  this._flushBuffer();
64786
64294
  }
64787
64295
 
64788
- this._buffer = new _EventBuffer__WEBPACK_IMPORTED_MODULE_4__["default"](this.pinpointClient, this._config); // if the first endpoint update hasn't yet resolved pause the buffer to
64296
+ this._buffer = new _EventBuffer__WEBPACK_IMPORTED_MODULE_5__["default"](this.pinpointClient, this._config); // if the first endpoint update hasn't yet resolved pause the buffer to
64789
64297
  // prevent race conditions. It will be resumed as soon as that request succeeds
64790
64298
 
64791
64299
  if (this._endpointGenerating) {
@@ -64824,24 +64332,24 @@ function () {
64824
64332
  };
64825
64333
 
64826
64334
  AWSPinpointProvider.prototype._getEndpointId = function (cacheKey) {
64827
- return __awaiter(this, void 0, void 0, function () {
64335
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64828
64336
  var endpointId, ttl, expiration;
64829
- return __generator(this, function (_a) {
64337
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64830
64338
  switch (_a.label) {
64831
64339
  case 0:
64832
64340
  return [4
64833
64341
  /*yield*/
64834
- , _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2___default.a.getItem(cacheKey)];
64342
+ , _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_3___default.a.getItem(cacheKey)];
64835
64343
 
64836
64344
  case 1:
64837
64345
  endpointId = _a.sent();
64838
64346
  logger.debug('endpointId from cache', endpointId, 'type', _typeof(endpointId));
64839
64347
 
64840
64348
  if (!endpointId) {
64841
- endpointId = Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
64349
+ endpointId = Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64842
64350
  ttl = 1000 * 60 * 60 * 24 * 365 * 100;
64843
64351
  expiration = new Date().getTime() + ttl;
64844
- _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2___default.a.setItem(cacheKey, endpointId, {
64352
+ _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_3___default.a.setItem(cacheKey, endpointId, {
64845
64353
  expires: expiration,
64846
64354
  priority: 1
64847
64355
  });
@@ -64882,22 +64390,22 @@ function () {
64882
64390
  appVersionName = clientContext.appVersionName,
64883
64391
  appVersionCode = clientContext.appVersionCode,
64884
64392
  appPackageName = clientContext.appPackageName,
64885
- demographicByClientContext = __rest(clientContext, ["clientId", "appTitle", "appVersionName", "appVersionCode", "appPackageName"]);
64393
+ demographicByClientContext = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(clientContext, ["clientId", "appTitle", "appVersionName", "appVersionCode", "appPackageName"]);
64886
64394
 
64887
64395
  var channelType = event.address ? clientInfo.platform === 'android' ? 'GCM' : 'APNS' : undefined;
64888
64396
 
64889
- var tmp = __assign(__assign(__assign({
64397
+ var tmp = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
64890
64398
  channelType: channelType,
64891
- requestId: Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])(),
64399
+ requestId: Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])(),
64892
64400
  effectiveDate: new Date().toISOString()
64893
64401
  }, defaultEndpointConfig), event), {
64894
- attributes: __assign(__assign({}, defaultEndpointConfig.attributes), event.attributes),
64895
- demographic: __assign(__assign(__assign(__assign({}, demographicByClientInfo), demographicByClientContext), defaultEndpointConfig.demographic), event.demographic),
64896
- location: __assign(__assign({}, defaultEndpointConfig.location), event.location),
64897
- metrics: __assign(__assign({}, defaultEndpointConfig.metrics), event.metrics),
64402
+ attributes: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultEndpointConfig.attributes), event.attributes),
64403
+ demographic: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, demographicByClientInfo), demographicByClientContext), defaultEndpointConfig.demographic), event.demographic),
64404
+ location: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultEndpointConfig.location), event.location),
64405
+ metrics: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultEndpointConfig.metrics), event.metrics),
64898
64406
  user: {
64899
64407
  userId: event.userId || defaultEndpointConfig.userId || credentials.identityId,
64900
- userAttributes: __assign(__assign({}, defaultEndpointConfig.userAttributes), event.userAttributes)
64408
+ userAttributes: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultEndpointConfig.userAttributes), event.userAttributes)
64901
64409
  }
64902
64410
  }); // eliminate unnecessary params
64903
64411
 
@@ -64908,9 +64416,9 @@ function () {
64908
64416
  session = tmp.session,
64909
64417
  eventId = tmp.eventId,
64910
64418
  immediate = tmp.immediate,
64911
- ret = __rest(tmp, ["userId", "userAttributes", "name", "session", "eventId", "immediate"]);
64419
+ ret = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(tmp, ["userId", "userAttributes", "name", "session", "eventId", "immediate"]);
64912
64420
 
64913
- return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["JS"].transferKeyToUpperCase(ret, [], ['metrics', 'userAttributes', 'attributes']);
64421
+ return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].transferKeyToUpperCase(ret, [], ['metrics', 'userAttributes', 'attributes']);
64914
64422
  };
64915
64423
 
64916
64424
  AWSPinpointProvider.prototype._eventError = function (err) {
@@ -64919,16 +64427,16 @@ function () {
64919
64427
  };
64920
64428
 
64921
64429
  AWSPinpointProvider.prototype._getCredentials = function () {
64922
- return __awaiter(this, void 0, void 0, function () {
64430
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64923
64431
  var credentials, err_3;
64924
- return __generator(this, function (_a) {
64432
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64925
64433
  switch (_a.label) {
64926
64434
  case 0:
64927
64435
  _a.trys.push([0, 2,, 3]);
64928
64436
 
64929
64437
  return [4
64930
64438
  /*yield*/
64931
- , _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].get()];
64439
+ , _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].get()];
64932
64440
 
64933
64441
  case 1:
64934
64442
  credentials = _a.sent();
@@ -64938,7 +64446,7 @@ function () {
64938
64446
  logger.debug('set credentials for analytics', credentials);
64939
64447
  return [2
64940
64448
  /*return*/
64941
- , _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].shear(credentials)];
64449
+ , _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].shear(credentials)];
64942
64450
 
64943
64451
  case 2:
64944
64452
  err_3 = _a.sent();
@@ -65337,16 +64845,17 @@ __webpack_require__.r(__webpack_exports__);
65337
64845
  "use strict";
65338
64846
  __webpack_require__.r(__webpack_exports__);
65339
64847
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AmazonPersonalizeProvider", function() { return AmazonPersonalizeProvider; });
65340
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
65341
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
65342
- /* harmony import */ var _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-sdk/client-personalize-events */ "../../node_modules/@aws-sdk/client-personalize-events/dist/es/index.js");
65343
- /* harmony import */ var _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AmazonPersonalizeHelper */ "./lib-esm/Providers/AmazonPersonalizeHelper/index.js");
65344
- /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/get */ "../../node_modules/lodash/get.js");
65345
- /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_3__);
65346
- /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isEmpty */ "../../node_modules/lodash/isEmpty.js");
65347
- /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4__);
65348
- /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");
65349
- /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_5__);
64848
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
64849
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
64850
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
64851
+ /* harmony import */ var _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-personalize-events */ "../../node_modules/@aws-sdk/client-personalize-events/dist/es/index.js");
64852
+ /* harmony import */ var _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AmazonPersonalizeHelper */ "./lib-esm/Providers/AmazonPersonalizeHelper/index.js");
64853
+ /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/get */ "../../node_modules/lodash/get.js");
64854
+ /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_4__);
64855
+ /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/isEmpty */ "../../node_modules/lodash/isEmpty.js");
64856
+ /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__);
64857
+ /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");
64858
+ /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_6__);
65350
64859
  /*
65351
64860
  * Copyright 2019-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
65352
64861
  *
@@ -65359,156 +64868,14 @@ __webpack_require__.r(__webpack_exports__);
65359
64868
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
65360
64869
  * and limitations under the License.
65361
64870
  */
65362
- var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
65363
- function adopt(value) {
65364
- return value instanceof P ? value : new P(function (resolve) {
65365
- resolve(value);
65366
- });
65367
- }
65368
64871
 
65369
- return new (P || (P = Promise))(function (resolve, reject) {
65370
- function fulfilled(value) {
65371
- try {
65372
- step(generator.next(value));
65373
- } catch (e) {
65374
- reject(e);
65375
- }
65376
- }
65377
64872
 
65378
- function rejected(value) {
65379
- try {
65380
- step(generator["throw"](value));
65381
- } catch (e) {
65382
- reject(e);
65383
- }
65384
- }
65385
64873
 
65386
- function step(result) {
65387
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
65388
- }
65389
64874
 
65390
- step((generator = generator.apply(thisArg, _arguments || [])).next());
65391
- });
65392
- };
65393
-
65394
- var __generator = undefined && undefined.__generator || function (thisArg, body) {
65395
- var _ = {
65396
- label: 0,
65397
- sent: function sent() {
65398
- if (t[0] & 1) throw t[1];
65399
- return t[1];
65400
- },
65401
- trys: [],
65402
- ops: []
65403
- },
65404
- f,
65405
- y,
65406
- t,
65407
- g;
65408
- return g = {
65409
- next: verb(0),
65410
- "throw": verb(1),
65411
- "return": verb(2)
65412
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
65413
- return this;
65414
- }), g;
65415
-
65416
- function verb(n) {
65417
- return function (v) {
65418
- return step([n, v]);
65419
- };
65420
- }
65421
-
65422
- function step(op) {
65423
- if (f) throw new TypeError("Generator is already executing.");
65424
-
65425
- while (_) {
65426
- try {
65427
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
65428
- if (y = 0, t) op = [op[0] & 2, t.value];
65429
-
65430
- switch (op[0]) {
65431
- case 0:
65432
- case 1:
65433
- t = op;
65434
- break;
65435
-
65436
- case 4:
65437
- _.label++;
65438
- return {
65439
- value: op[1],
65440
- done: false
65441
- };
65442
-
65443
- case 5:
65444
- _.label++;
65445
- y = op[1];
65446
- op = [0];
65447
- continue;
65448
-
65449
- case 7:
65450
- op = _.ops.pop();
65451
-
65452
- _.trys.pop();
65453
-
65454
- continue;
65455
-
65456
- default:
65457
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
65458
- _ = 0;
65459
- continue;
65460
- }
65461
-
65462
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
65463
- _.label = op[1];
65464
- break;
65465
- }
65466
-
65467
- if (op[0] === 6 && _.label < t[1]) {
65468
- _.label = t[1];
65469
- t = op;
65470
- break;
65471
- }
65472
-
65473
- if (t && _.label < t[2]) {
65474
- _.label = t[2];
65475
-
65476
- _.ops.push(op);
65477
-
65478
- break;
65479
- }
65480
-
65481
- if (t[2]) _.ops.pop();
65482
-
65483
- _.trys.pop();
65484
-
65485
- continue;
65486
- }
65487
-
65488
- op = body.call(thisArg, _);
65489
- } catch (e) {
65490
- op = [6, e];
65491
- y = 0;
65492
- } finally {
65493
- f = t = 0;
65494
- }
65495
- }
65496
-
65497
- if (op[0] & 5) throw op[1];
65498
- return {
65499
- value: op[0] ? op[1] : void 0,
65500
- done: true
65501
- };
65502
- }
65503
- };
65504
64875
 
65505
64876
 
65506
64877
 
65507
-
65508
-
65509
-
65510
-
65511
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AmazonPersonalizeProvider'); // events buffer
64878
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AmazonPersonalizeProvider'); // events buffer
65512
64879
 
65513
64880
  var FLUSH_SIZE = 5;
65514
64881
  var FLUSH_SIZE_THRESHHOLD = 10;
@@ -65524,13 +64891,13 @@ function () {
65524
64891
  this._config = config ? config : {};
65525
64892
  this._config.flushSize = this._config.flushSize > 0 && this._config.flushSize <= FLUSH_SIZE_THRESHHOLD ? this._config.flushSize : FLUSH_SIZE;
65526
64893
  this._config.flushInterval = this._config.flushInterval || FLUSH_INTERVAL;
65527
- this._sessionManager = new _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_2__["SessionInfoManager"]();
64894
+ this._sessionManager = new _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_3__["SessionInfoManager"]();
65528
64895
 
65529
- if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(this._config.trackingId)) {
64896
+ if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(this._config.trackingId)) {
65530
64897
  this._sessionInfo = this._sessionManager.retrieveSessionInfo(this._config.trackingId);
65531
64898
  }
65532
64899
 
65533
- this._isBrowser = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["JS"].browserOrNode().isBrowser; // flush event buffer
64900
+ this._isBrowser = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser; // flush event buffer
65534
64901
 
65535
64902
  this._setupTimer();
65536
64903
  }
@@ -65555,10 +64922,10 @@ function () {
65555
64922
 
65556
64923
 
65557
64924
  AmazonPersonalizeProvider.prototype.record = function (params) {
65558
- return __awaiter(this, void 0, void 0, function () {
64925
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
65559
64926
  var credentials, _a, eventType, properties, requestParams, isLoaded;
65560
64927
 
65561
- return __generator(this, function (_b) {
64928
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
65562
64929
  switch (_b.label) {
65563
64930
  case 0:
65564
64931
  return [4
@@ -65583,7 +64950,7 @@ function () {
65583
64950
  return [2
65584
64951
  /*return*/
65585
64952
  ];
65586
- } else if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(params.event.userId)) {
64953
+ } else if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(params.event.userId)) {
65587
64954
  this._sessionManager.updateSessionInfo(params.event.userId, this._sessionInfo);
65588
64955
  }
65589
64956
 
@@ -65594,7 +64961,7 @@ function () {
65594
64961
  if (!this._isBrowser) return [3
65595
64962
  /*break*/
65596
64963
  , 5];
65597
- if (!!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(lodash_get__WEBPACK_IMPORTED_MODULE_3___default()(requestParams, 'eventData.properties.domElementId', null))) return [3
64964
+ if (!!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(lodash_get__WEBPACK_IMPORTED_MODULE_4___default()(requestParams, 'eventData.properties.domElementId', null))) return [3
65598
64965
  /*break*/
65599
64966
  , 3];
65600
64967
  return [4
@@ -65605,7 +64972,7 @@ function () {
65605
64972
  isLoaded = _b.sent();
65606
64973
 
65607
64974
  if (isLoaded) {
65608
- new _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_2__["MediaAutoTrack"](requestParams, this);
64975
+ new _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_3__["MediaAutoTrack"](requestParams, this);
65609
64976
  } else {
65610
64977
  logger.debug('Cannot find the media element.');
65611
64978
  }
@@ -65697,7 +65064,7 @@ function () {
65697
65064
  var conf = config ? config : {};
65698
65065
  this._config = Object.assign({}, this._config, conf);
65699
65066
 
65700
- if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(this._config.trackingId)) {
65067
+ if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(this._config.trackingId)) {
65701
65068
  this._sessionInfo = this._sessionManager.retrieveSessionInfo(this._config.trackingId);
65702
65069
  }
65703
65070
 
@@ -65772,7 +65139,7 @@ function () {
65772
65139
  // @ts-ignore
65773
65140
  payload_1.eventList.push(event);
65774
65141
  });
65775
- var command = new _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_1__["PutEventsCommand"](payload_1);
65142
+ var command = new _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_2__["PutEventsCommand"](payload_1);
65776
65143
 
65777
65144
  this._personalize.send(command, function (err) {
65778
65145
  if (err) logger.debug('Failed to call putEvents in Personalize', err);else logger.debug('Put events');
@@ -65823,7 +65190,7 @@ function () {
65823
65190
  group.push(currRequestParams);
65824
65191
  preCred = cred;
65825
65192
  } else {
65826
- if (lodash_isEqual__WEBPACK_IMPORTED_MODULE_5___default()(sessionInfo, this._sessionInfo) && cred.sessionToken === preCred.sessionToken && cred.identityId === preCred.identityId) {
65193
+ if (lodash_isEqual__WEBPACK_IMPORTED_MODULE_6___default()(sessionInfo, this._sessionInfo) && cred.sessionToken === preCred.sessionToken && cred.identityId === preCred.identityId) {
65827
65194
  logger.debug('no change for cred, put event in the same group');
65828
65195
  group.push(currRequestParams);
65829
65196
  } else {
@@ -65876,10 +65243,10 @@ function () {
65876
65243
  this._config.credentials = credentials;
65877
65244
  var region = config.region;
65878
65245
  logger.debug('initialize personalize with credentials', credentials);
65879
- this._personalize = new _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_1__["PersonalizeEventsClient"]({
65246
+ this._personalize = new _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_2__["PersonalizeEventsClient"]({
65880
65247
  region: region,
65881
65248
  credentials: credentials,
65882
- customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["getAmplifyUserAgent"])()
65249
+ customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])()
65883
65250
  });
65884
65251
  return true;
65885
65252
  };
@@ -65891,10 +65258,10 @@ function () {
65891
65258
 
65892
65259
  AmazonPersonalizeProvider.prototype._getCredentials = function () {
65893
65260
  var that = this;
65894
- return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].get().then(function (credentials) {
65261
+ return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].get().then(function (credentials) {
65895
65262
  if (!credentials) return null;
65896
65263
  logger.debug('set credentials for analytics', that._config.credentials);
65897
- return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].shear(credentials);
65264
+ return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].shear(credentials);
65898
65265
  })["catch"](function (err) {
65899
65266
  logger.debug('ensure credentials error', err);
65900
65267
  return null;
@@ -65922,192 +65289,16 @@ function () {
65922
65289
 
65923
65290
  "use strict";
65924
65291
  __webpack_require__.r(__webpack_exports__);
65925
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
65926
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
65927
- /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "../../node_modules/@aws-sdk/client-pinpoint/dist/es/index.js");
65928
- /* harmony import */ var _utils_AppUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/AppUtils */ "./lib-esm/utils/AppUtils.js");
65929
- var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
65930
- function adopt(value) {
65931
- return value instanceof P ? value : new P(function (resolve) {
65932
- resolve(value);
65933
- });
65934
- }
65935
-
65936
- return new (P || (P = Promise))(function (resolve, reject) {
65937
- function fulfilled(value) {
65938
- try {
65939
- step(generator.next(value));
65940
- } catch (e) {
65941
- reject(e);
65942
- }
65943
- }
65944
-
65945
- function rejected(value) {
65946
- try {
65947
- step(generator["throw"](value));
65948
- } catch (e) {
65949
- reject(e);
65950
- }
65951
- }
65952
-
65953
- function step(result) {
65954
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
65955
- }
65956
-
65957
- step((generator = generator.apply(thisArg, _arguments || [])).next());
65958
- });
65959
- };
65960
-
65961
- var __generator = undefined && undefined.__generator || function (thisArg, body) {
65962
- var _ = {
65963
- label: 0,
65964
- sent: function sent() {
65965
- if (t[0] & 1) throw t[1];
65966
- return t[1];
65967
- },
65968
- trys: [],
65969
- ops: []
65970
- },
65971
- f,
65972
- y,
65973
- t,
65974
- g;
65975
- return g = {
65976
- next: verb(0),
65977
- "throw": verb(1),
65978
- "return": verb(2)
65979
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
65980
- return this;
65981
- }), g;
65982
-
65983
- function verb(n) {
65984
- return function (v) {
65985
- return step([n, v]);
65986
- };
65987
- }
65988
-
65989
- function step(op) {
65990
- if (f) throw new TypeError("Generator is already executing.");
65991
-
65992
- while (_) {
65993
- try {
65994
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
65995
- if (y = 0, t) op = [op[0] & 2, t.value];
65996
-
65997
- switch (op[0]) {
65998
- case 0:
65999
- case 1:
66000
- t = op;
66001
- break;
66002
-
66003
- case 4:
66004
- _.label++;
66005
- return {
66006
- value: op[1],
66007
- done: false
66008
- };
66009
-
66010
- case 5:
66011
- _.label++;
66012
- y = op[1];
66013
- op = [0];
66014
- continue;
66015
-
66016
- case 7:
66017
- op = _.ops.pop();
66018
-
66019
- _.trys.pop();
66020
-
66021
- continue;
66022
-
66023
- default:
66024
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
66025
- _ = 0;
66026
- continue;
66027
- }
66028
-
66029
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
66030
- _.label = op[1];
66031
- break;
66032
- }
66033
-
66034
- if (op[0] === 6 && _.label < t[1]) {
66035
- _.label = t[1];
66036
- t = op;
66037
- break;
66038
- }
66039
-
66040
- if (t && _.label < t[2]) {
66041
- _.label = t[2];
66042
-
66043
- _.ops.push(op);
66044
-
66045
- break;
66046
- }
66047
-
66048
- if (t[2]) _.ops.pop();
66049
-
66050
- _.trys.pop();
66051
-
66052
- continue;
66053
- }
66054
-
66055
- op = body.call(thisArg, _);
66056
- } catch (e) {
66057
- op = [6, e];
66058
- y = 0;
66059
- } finally {
66060
- f = t = 0;
66061
- }
66062
- }
66063
-
66064
- if (op[0] & 5) throw op[1];
66065
- return {
66066
- value: op[0] ? op[1] : void 0,
66067
- done: true
66068
- };
66069
- }
66070
- };
66071
-
66072
- var __read = undefined && undefined.__read || function (o, n) {
66073
- var m = typeof Symbol === "function" && o[Symbol.iterator];
66074
- if (!m) return o;
66075
- var i = m.call(o),
66076
- r,
66077
- ar = [],
66078
- e;
66079
-
66080
- try {
66081
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
66082
- ar.push(r.value);
66083
- }
66084
- } catch (error) {
66085
- e = {
66086
- error: error
66087
- };
66088
- } finally {
66089
- try {
66090
- if (r && !r.done && (m = i["return"])) m.call(i);
66091
- } finally {
66092
- if (e) throw e.error;
66093
- }
66094
- }
66095
-
66096
- return ar;
66097
- };
66098
-
66099
- var __spread = undefined && undefined.__spread || function () {
66100
- for (var ar = [], i = 0; i < arguments.length; i++) {
66101
- ar = ar.concat(__read(arguments[i]));
66102
- }
66103
-
66104
- return ar;
66105
- };
65292
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
65293
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
65294
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
65295
+ /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "../../node_modules/@aws-sdk/client-pinpoint/dist/es/index.js");
65296
+ /* harmony import */ var _utils_AppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/AppUtils */ "./lib-esm/utils/AppUtils.js");
66106
65297
 
66107
65298
 
66108
65299
 
66109
65300
 
66110
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('EventsBuffer');
65301
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('EventsBuffer');
66111
65302
  var RETRYABLE_CODES = [429, 500];
66112
65303
  var ACCEPTED_CODES = [202];
66113
65304
 
@@ -66177,7 +65368,7 @@ function () {
66177
65368
  // the OS may restrict access to the network in the background
66178
65369
 
66179
65370
 
66180
- if (this._pause || !bufferLength || !Object(_utils_AppUtils__WEBPACK_IMPORTED_MODULE_2__["isAppInForeground"])()) {
65371
+ if (this._pause || !bufferLength || !Object(_utils_AppUtils__WEBPACK_IMPORTED_MODULE_3__["isAppInForeground"])()) {
66181
65372
  return;
66182
65373
  }
66183
65374
 
@@ -66190,9 +65381,9 @@ function () {
66190
65381
  };
66191
65382
 
66192
65383
  EventsBuffer.prototype._putEvents = function (buffer) {
66193
- return __awaiter(this, void 0, void 0, function () {
65384
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
66194
65385
  var eventMap, batchEventParams, command, data, err_1;
66195
- return __generator(this, function (_a) {
65386
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
66196
65387
  switch (_a.label) {
66197
65388
  case 0:
66198
65389
  eventMap = this._bufferToMap(buffer);
@@ -66202,7 +65393,7 @@ function () {
66202
65393
  case 1:
66203
65394
  _a.trys.push([1, 3,, 4]);
66204
65395
 
66205
- command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__["PutEventsCommand"](batchEventParams);
65396
+ command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["PutEventsCommand"](batchEventParams);
66206
65397
  return [4
66207
65398
  /*yield*/
66208
65399
  , this._client.send(command)];
@@ -66288,7 +65479,7 @@ function () {
66288
65479
  var Results = data.EventsResponse.Results;
66289
65480
  var retryableEvents = [];
66290
65481
  Object.entries(Results).forEach(function (_a) {
66291
- var _b = __read(_a, 2),
65482
+ var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2),
66292
65483
  endpointId = _b[0],
66293
65484
  endpointValues = _b[1];
66294
65485
 
@@ -66296,7 +65487,7 @@ function () {
66296
65487
  Object.entries(responses).forEach(function (_a) {
66297
65488
  var _b, _c;
66298
65489
 
66299
- var _d = __read(_a, 2),
65490
+ var _d = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2),
66300
65491
  eventId = _d[0],
66301
65492
  _e = _d[1],
66302
65493
  StatusCode = _e.StatusCode,
@@ -66358,15 +65549,15 @@ function () {
66358
65549
  logger.debug("no retry attempts remaining for event " + eventId + " : " + name);
66359
65550
  }); // add the events to the front of the buffer
66360
65551
 
66361
- (_a = this._buffer).unshift.apply(_a, __spread(eligibleEvents));
65552
+ (_a = this._buffer).unshift.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(eligibleEvents));
66362
65553
  }; // convert buffer to map, i.e. { eventId1: { params, handler }, eventId2: { params, handlers } }
66363
65554
  // this allows us to easily access the handlers after receiving a batch response
66364
65555
 
66365
65556
 
66366
65557
  EventsBuffer.prototype._bufferToMap = function (buffer) {
66367
65558
  return buffer.reduce(function (acc, curVal) {
66368
- var _a = __read(Object.entries(curVal), 1),
66369
- _b = __read(_a[0], 2),
65559
+ var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(Object.entries(curVal), 1),
65560
+ _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a[0], 2),
66370
65561
  key = _b[0],
66371
65562
  value = _b[1];
66372
65563
 
@@ -66464,9 +65655,10 @@ __webpack_require__.r(__webpack_exports__);
66464
65655
  "use strict";
66465
65656
  __webpack_require__.r(__webpack_exports__);
66466
65657
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventTracker", function() { return EventTracker; });
66467
- /* harmony import */ var _vendor_dom_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../vendor/dom-utils */ "./lib-esm/vendor/dom-utils/index.js");
66468
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
66469
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
65658
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
65659
+ /* harmony import */ var _vendor_dom_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vendor/dom-utils */ "./lib-esm/vendor/dom-utils/index.js");
65660
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
65661
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__);
66470
65662
  /*
66471
65663
  * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
66472
65664
  *
@@ -66479,152 +65671,10 @@ __webpack_require__.r(__webpack_exports__);
66479
65671
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
66480
65672
  * and limitations under the License.
66481
65673
  */
66482
- var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
66483
- function adopt(value) {
66484
- return value instanceof P ? value : new P(function (resolve) {
66485
- resolve(value);
66486
- });
66487
- }
66488
-
66489
- return new (P || (P = Promise))(function (resolve, reject) {
66490
- function fulfilled(value) {
66491
- try {
66492
- step(generator.next(value));
66493
- } catch (e) {
66494
- reject(e);
66495
- }
66496
- }
66497
-
66498
- function rejected(value) {
66499
- try {
66500
- step(generator["throw"](value));
66501
- } catch (e) {
66502
- reject(e);
66503
- }
66504
- }
66505
-
66506
- function step(result) {
66507
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
66508
- }
66509
-
66510
- step((generator = generator.apply(thisArg, _arguments || [])).next());
66511
- });
66512
- };
66513
65674
 
66514
- var __generator = undefined && undefined.__generator || function (thisArg, body) {
66515
- var _ = {
66516
- label: 0,
66517
- sent: function sent() {
66518
- if (t[0] & 1) throw t[1];
66519
- return t[1];
66520
- },
66521
- trys: [],
66522
- ops: []
66523
- },
66524
- f,
66525
- y,
66526
- t,
66527
- g;
66528
- return g = {
66529
- next: verb(0),
66530
- "throw": verb(1),
66531
- "return": verb(2)
66532
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
66533
- return this;
66534
- }), g;
66535
-
66536
- function verb(n) {
66537
- return function (v) {
66538
- return step([n, v]);
66539
- };
66540
- }
66541
65675
 
66542
- function step(op) {
66543
- if (f) throw new TypeError("Generator is already executing.");
66544
-
66545
- while (_) {
66546
- try {
66547
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
66548
- if (y = 0, t) op = [op[0] & 2, t.value];
66549
-
66550
- switch (op[0]) {
66551
- case 0:
66552
- case 1:
66553
- t = op;
66554
- break;
66555
-
66556
- case 4:
66557
- _.label++;
66558
- return {
66559
- value: op[1],
66560
- done: false
66561
- };
66562
-
66563
- case 5:
66564
- _.label++;
66565
- y = op[1];
66566
- op = [0];
66567
- continue;
66568
-
66569
- case 7:
66570
- op = _.ops.pop();
66571
-
66572
- _.trys.pop();
66573
-
66574
- continue;
66575
-
66576
- default:
66577
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
66578
- _ = 0;
66579
- continue;
66580
- }
66581
-
66582
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
66583
- _.label = op[1];
66584
- break;
66585
- }
66586
65676
 
66587
- if (op[0] === 6 && _.label < t[1]) {
66588
- _.label = t[1];
66589
- t = op;
66590
- break;
66591
- }
66592
-
66593
- if (t && _.label < t[2]) {
66594
- _.label = t[2];
66595
-
66596
- _.ops.push(op);
66597
-
66598
- break;
66599
- }
66600
-
66601
- if (t[2]) _.ops.pop();
66602
-
66603
- _.trys.pop();
66604
-
66605
- continue;
66606
- }
66607
-
66608
- op = body.call(thisArg, _);
66609
- } catch (e) {
66610
- op = [6, e];
66611
- y = 0;
66612
- } finally {
66613
- f = t = 0;
66614
- }
66615
- }
66616
-
66617
- if (op[0] & 5) throw op[1];
66618
- return {
66619
- value: op[0] ? op[1] : void 0,
66620
- done: true
66621
- };
66622
- }
66623
- };
66624
-
66625
-
66626
-
66627
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('EventTracker');
65677
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["ConsoleLogger"]('EventTracker');
66628
65678
  var defaultOpts = {
66629
65679
  enable: false,
66630
65680
  events: ['click'],
@@ -66636,7 +65686,7 @@ var EventTracker =
66636
65686
  /** @class */
66637
65687
  function () {
66638
65688
  function EventTracker(tracker, opts) {
66639
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser || !window.addEventListener) {
65689
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["JS"].browserOrNode().isBrowser || !window.addEventListener) {
66640
65690
  logger.debug('not in the supported web environment');
66641
65691
  return;
66642
65692
  }
@@ -66663,7 +65713,7 @@ function () {
66663
65713
  var selector_1 = '[' + this._config.selectorPrefix + 'on]';
66664
65714
 
66665
65715
  this._config.events.forEach(function (evt) {
66666
- _this._delegates[evt] = Object(_vendor_dom_utils__WEBPACK_IMPORTED_MODULE_0__["delegate"])(document, evt, selector_1, _this._trackFunc, {
65716
+ _this._delegates[evt] = Object(_vendor_dom_utils__WEBPACK_IMPORTED_MODULE_1__["delegate"])(document, evt, selector_1, _this._trackFunc, {
66667
65717
  composed: true,
66668
65718
  useCapture: true
66669
65719
  });
@@ -66674,10 +65724,10 @@ function () {
66674
65724
  };
66675
65725
 
66676
65726
  EventTracker.prototype._trackFunc = function (event, element) {
66677
- return __awaiter(this, void 0, void 0, function () {
65727
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
66678
65728
  var customAttrs, events, eventName, attrs, defaultAttrs, _a, attributes;
66679
65729
 
66680
- return __generator(this, function (_b) {
65730
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
66681
65731
  switch (_b.label) {
66682
65732
  case 0:
66683
65733
  customAttrs = {};
@@ -66762,9 +65812,10 @@ function () {
66762
65812
  "use strict";
66763
65813
  __webpack_require__.r(__webpack_exports__);
66764
65814
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageViewTracker", function() { return PageViewTracker; });
66765
- /* harmony import */ var _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/MethodEmbed */ "./lib-esm/utils/MethodEmbed.js");
66766
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
66767
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
65815
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
65816
+ /* harmony import */ var _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/MethodEmbed */ "./lib-esm/utils/MethodEmbed.js");
65817
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
65818
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__);
66768
65819
  /*
66769
65820
  * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
66770
65821
  *
@@ -66777,156 +65828,14 @@ __webpack_require__.r(__webpack_exports__);
66777
65828
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
66778
65829
  * and limitations under the License.
66779
65830
  */
66780
- var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
66781
- function adopt(value) {
66782
- return value instanceof P ? value : new P(function (resolve) {
66783
- resolve(value);
66784
- });
66785
- }
66786
-
66787
- return new (P || (P = Promise))(function (resolve, reject) {
66788
- function fulfilled(value) {
66789
- try {
66790
- step(generator.next(value));
66791
- } catch (e) {
66792
- reject(e);
66793
- }
66794
- }
66795
-
66796
- function rejected(value) {
66797
- try {
66798
- step(generator["throw"](value));
66799
- } catch (e) {
66800
- reject(e);
66801
- }
66802
- }
66803
-
66804
- function step(result) {
66805
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
66806
- }
66807
-
66808
- step((generator = generator.apply(thisArg, _arguments || [])).next());
66809
- });
66810
- };
66811
-
66812
- var __generator = undefined && undefined.__generator || function (thisArg, body) {
66813
- var _ = {
66814
- label: 0,
66815
- sent: function sent() {
66816
- if (t[0] & 1) throw t[1];
66817
- return t[1];
66818
- },
66819
- trys: [],
66820
- ops: []
66821
- },
66822
- f,
66823
- y,
66824
- t,
66825
- g;
66826
- return g = {
66827
- next: verb(0),
66828
- "throw": verb(1),
66829
- "return": verb(2)
66830
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
66831
- return this;
66832
- }), g;
66833
-
66834
- function verb(n) {
66835
- return function (v) {
66836
- return step([n, v]);
66837
- };
66838
- }
66839
-
66840
- function step(op) {
66841
- if (f) throw new TypeError("Generator is already executing.");
66842
-
66843
- while (_) {
66844
- try {
66845
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
66846
- if (y = 0, t) op = [op[0] & 2, t.value];
66847
-
66848
- switch (op[0]) {
66849
- case 0:
66850
- case 1:
66851
- t = op;
66852
- break;
66853
-
66854
- case 4:
66855
- _.label++;
66856
- return {
66857
- value: op[1],
66858
- done: false
66859
- };
66860
-
66861
- case 5:
66862
- _.label++;
66863
- y = op[1];
66864
- op = [0];
66865
- continue;
66866
-
66867
- case 7:
66868
- op = _.ops.pop();
66869
-
66870
- _.trys.pop();
66871
-
66872
- continue;
66873
-
66874
- default:
66875
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
66876
- _ = 0;
66877
- continue;
66878
- }
66879
-
66880
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
66881
- _.label = op[1];
66882
- break;
66883
- }
66884
-
66885
- if (op[0] === 6 && _.label < t[1]) {
66886
- _.label = t[1];
66887
- t = op;
66888
- break;
66889
- }
66890
-
66891
- if (t && _.label < t[2]) {
66892
- _.label = t[2];
66893
-
66894
- _.ops.push(op);
66895
-
66896
- break;
66897
- }
66898
-
66899
- if (t[2]) _.ops.pop();
66900
-
66901
- _.trys.pop();
66902
-
66903
- continue;
66904
- }
66905
-
66906
- op = body.call(thisArg, _);
66907
- } catch (e) {
66908
- op = [6, e];
66909
- y = 0;
66910
- } finally {
66911
- f = t = 0;
66912
- }
66913
- }
66914
-
66915
- if (op[0] & 5) throw op[1];
66916
- return {
66917
- value: op[0] ? op[1] : void 0,
66918
- done: true
66919
- };
66920
- }
66921
- };
66922
65831
 
66923
65832
 
66924
65833
 
66925
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('PageViewTracker');
65834
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["ConsoleLogger"]('PageViewTracker');
66926
65835
  var PREV_URL_KEY = 'aws-amplify-analytics-prevUrl';
66927
65836
 
66928
65837
  var getUrl = function getUrl() {
66929
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser) return '';else return window.location.origin + window.location.pathname;
65838
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["JS"].browserOrNode().isBrowser) return '';else return window.location.origin + window.location.pathname;
66930
65839
  };
66931
65840
 
66932
65841
  var defaultOpts = {
@@ -66974,13 +65883,13 @@ function () {
66974
65883
  };
66975
65884
 
66976
65885
  PageViewTracker.prototype._pageViewTrackDefault = function () {
66977
- return __awaiter(this, void 0, void 0, function () {
65886
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
66978
65887
  var url, customAttrs, _a, attributes;
66979
65888
 
66980
- return __generator(this, function (_b) {
65889
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
66981
65890
  switch (_b.label) {
66982
65891
  case 0:
66983
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser || !window.addEventListener || !window.sessionStorage) {
65892
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["JS"].browserOrNode().isBrowser || !window.addEventListener || !window.sessionStorage) {
66984
65893
  logger.debug('not in the supported web enviroment');
66985
65894
  return [2
66986
65895
  /*return*/
@@ -67031,13 +65940,13 @@ function () {
67031
65940
  };
67032
65941
 
67033
65942
  PageViewTracker.prototype._trackFunc = function () {
67034
- return __awaiter(this, void 0, void 0, function () {
65943
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
67035
65944
  var url, customAttrs, _a, attributes;
67036
65945
 
67037
- return __generator(this, function (_b) {
65946
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
67038
65947
  switch (_b.label) {
67039
65948
  case 0:
67040
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser || !window.addEventListener || !history.pushState || !window.sessionStorage) {
65949
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["JS"].browserOrNode().isBrowser || !window.addEventListener || !history.pushState || !window.sessionStorage) {
67041
65950
  logger.debug('not in the supported web enviroment');
67042
65951
  return [2
67043
65952
  /*return*/
@@ -67088,22 +65997,22 @@ function () {
67088
65997
  };
67089
65998
 
67090
65999
  PageViewTracker.prototype._pageViewTrackSPA = function () {
67091
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser || !window.addEventListener || !history.pushState) {
66000
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["JS"].browserOrNode().isBrowser || !window.addEventListener || !history.pushState) {
67092
66001
  logger.debug('not in the supported web enviroment');
67093
66002
  return;
67094
66003
  }
67095
66004
 
67096
66005
  if (this._config.enable && !this._hasEnabled) {
67097
- _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_0__["MethodEmbed"].add(history, 'pushState', this._trackFunc);
67098
- _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_0__["MethodEmbed"].add(history, 'replaceState', this._trackFunc);
66006
+ _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_1__["MethodEmbed"].add(history, 'pushState', this._trackFunc);
66007
+ _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_1__["MethodEmbed"].add(history, 'replaceState', this._trackFunc);
67099
66008
  window.addEventListener('popstate', this._trackFunc);
67100
66009
 
67101
66010
  this._trackFunc();
67102
66011
 
67103
66012
  this._hasEnabled = true;
67104
66013
  } else {
67105
- _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_0__["MethodEmbed"].remove(history, 'pushState');
67106
- _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_0__["MethodEmbed"].remove(history, 'replaceState');
66014
+ _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_1__["MethodEmbed"].remove(history, 'pushState');
66015
+ _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_1__["MethodEmbed"].remove(history, 'replaceState');
67107
66016
  window.removeEventListener('popstate', this._trackFunc);
67108
66017
  this._hasEnabled = false;
67109
66018
  }
@@ -67131,8 +66040,9 @@ function () {
67131
66040
  "use strict";
67132
66041
  __webpack_require__.r(__webpack_exports__);
67133
66042
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SessionTracker", function() { return SessionTracker; });
67134
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
67135
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
66043
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
66044
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
66045
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
67136
66046
  /*
67137
66047
  * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
67138
66048
  *
@@ -67145,152 +66055,10 @@ __webpack_require__.r(__webpack_exports__);
67145
66055
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
67146
66056
  * and limitations under the License.
67147
66057
  */
67148
- var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
67149
- function adopt(value) {
67150
- return value instanceof P ? value : new P(function (resolve) {
67151
- resolve(value);
67152
- });
67153
- }
67154
-
67155
- return new (P || (P = Promise))(function (resolve, reject) {
67156
- function fulfilled(value) {
67157
- try {
67158
- step(generator.next(value));
67159
- } catch (e) {
67160
- reject(e);
67161
- }
67162
- }
67163
-
67164
- function rejected(value) {
67165
- try {
67166
- step(generator["throw"](value));
67167
- } catch (e) {
67168
- reject(e);
67169
- }
67170
- }
67171
-
67172
- function step(result) {
67173
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
67174
- }
67175
-
67176
- step((generator = generator.apply(thisArg, _arguments || [])).next());
67177
- });
67178
- };
67179
-
67180
- var __generator = undefined && undefined.__generator || function (thisArg, body) {
67181
- var _ = {
67182
- label: 0,
67183
- sent: function sent() {
67184
- if (t[0] & 1) throw t[1];
67185
- return t[1];
67186
- },
67187
- trys: [],
67188
- ops: []
67189
- },
67190
- f,
67191
- y,
67192
- t,
67193
- g;
67194
- return g = {
67195
- next: verb(0),
67196
- "throw": verb(1),
67197
- "return": verb(2)
67198
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
67199
- return this;
67200
- }), g;
67201
-
67202
- function verb(n) {
67203
- return function (v) {
67204
- return step([n, v]);
67205
- };
67206
- }
67207
-
67208
- function step(op) {
67209
- if (f) throw new TypeError("Generator is already executing.");
67210
-
67211
- while (_) {
67212
- try {
67213
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
67214
- if (y = 0, t) op = [op[0] & 2, t.value];
67215
-
67216
- switch (op[0]) {
67217
- case 0:
67218
- case 1:
67219
- t = op;
67220
- break;
67221
-
67222
- case 4:
67223
- _.label++;
67224
- return {
67225
- value: op[1],
67226
- done: false
67227
- };
67228
-
67229
- case 5:
67230
- _.label++;
67231
- y = op[1];
67232
- op = [0];
67233
- continue;
67234
-
67235
- case 7:
67236
- op = _.ops.pop();
67237
-
67238
- _.trys.pop();
67239
-
67240
- continue;
66058
+ // the session tracker for web
67241
66059
 
67242
- default:
67243
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
67244
- _ = 0;
67245
- continue;
67246
- }
67247
-
67248
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
67249
- _.label = op[1];
67250
- break;
67251
- }
67252
-
67253
- if (op[0] === 6 && _.label < t[1]) {
67254
- _.label = t[1];
67255
- t = op;
67256
- break;
67257
- }
67258
-
67259
- if (t && _.label < t[2]) {
67260
- _.label = t[2];
67261
-
67262
- _.ops.push(op);
67263
-
67264
- break;
67265
- }
67266
66060
 
67267
- if (t[2]) _.ops.pop();
67268
-
67269
- _.trys.pop();
67270
-
67271
- continue;
67272
- }
67273
-
67274
- op = body.call(thisArg, _);
67275
- } catch (e) {
67276
- op = [6, e];
67277
- y = 0;
67278
- } finally {
67279
- f = t = 0;
67280
- }
67281
- }
67282
-
67283
- if (op[0] & 5) throw op[1];
67284
- return {
67285
- value: op[0] ? op[1] : void 0,
67286
- done: true
67287
- };
67288
- }
67289
- }; // the session tracker for web
67290
-
67291
-
67292
-
67293
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('SessionTracker');
66061
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('SessionTracker');
67294
66062
  var defaultOpts = {
67295
66063
  enable: false,
67296
66064
  provider: 'AWSPinpoint'
@@ -67310,7 +66078,7 @@ function () {
67310
66078
  }
67311
66079
 
67312
66080
  SessionTracker.prototype._envCheck = function () {
67313
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["JS"].browserOrNode().isBrowser) {
66081
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser) {
67314
66082
  return false;
67315
66083
  }
67316
66084
 
@@ -67337,10 +66105,10 @@ function () {
67337
66105
  };
67338
66106
 
67339
66107
  SessionTracker.prototype._trackFunc = function () {
67340
- return __awaiter(this, void 0, void 0, function () {
66108
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
67341
66109
  var customAttrs, _a, attributes;
67342
66110
 
67343
- return __generator(this, function (_b) {
66111
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
67344
66112
  switch (_b.label) {
67345
66113
  case 0:
67346
66114
  if (!(typeof this._config.attributes === 'function')) return [3
@@ -67408,10 +66176,10 @@ function () {
67408
66176
 
67409
66177
 
67410
66178
  SessionTracker.prototype._sendInitialEvent = function () {
67411
- return __awaiter(this, void 0, void 0, function () {
66179
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
67412
66180
  var customAttrs, _a, attributes;
67413
66181
 
67414
- return __generator(this, function (_b) {
66182
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
67415
66183
  switch (_b.label) {
67416
66184
  case 0:
67417
66185
  if (initialEventSent) {
@@ -67547,6 +66315,7 @@ var isAppInForeground = function isAppInForeground() {
67547
66315
  "use strict";
67548
66316
  __webpack_require__.r(__webpack_exports__);
67549
66317
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MethodEmbed", function() { return MethodEmbed; });
66318
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
67550
66319
  /*
67551
66320
  * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
67552
66321
  *
@@ -67559,40 +66328,6 @@ __webpack_require__.r(__webpack_exports__);
67559
66328
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
67560
66329
  * and limitations under the License.
67561
66330
  */
67562
- var __read = undefined && undefined.__read || function (o, n) {
67563
- var m = typeof Symbol === "function" && o[Symbol.iterator];
67564
- if (!m) return o;
67565
- var i = m.call(o),
67566
- r,
67567
- ar = [],
67568
- e;
67569
-
67570
- try {
67571
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
67572
- ar.push(r.value);
67573
- }
67574
- } catch (error) {
67575
- e = {
67576
- error: error
67577
- };
67578
- } finally {
67579
- try {
67580
- if (r && !r.done && (m = i["return"])) m.call(i);
67581
- } finally {
67582
- if (e) throw e.error;
67583
- }
67584
- }
67585
-
67586
- return ar;
67587
- };
67588
-
67589
- var __spread = undefined && undefined.__spread || function () {
67590
- for (var ar = [], i = 0; i < arguments.length; i++) {
67591
- ar = ar.concat(__read(arguments[i]));
67592
- }
67593
-
67594
- return ar;
67595
- };
67596
66331
 
67597
66332
  var lists = [];
67598
66333
 
@@ -67623,7 +66358,7 @@ function () {
67623
66358
  args[_i] = arguments[_i];
67624
66359
  }
67625
66360
 
67626
- return methodOverride(_this._originalMethod.apply(_this, __spread(args)));
66361
+ return methodOverride(_this._originalMethod.apply(_this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args)));
67627
66362
  };
67628
66363
  };
67629
66364