@aws-amplify/notifications 0.2.4-in-app-messaging.7286 → 1.0.1-next.7206

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 (27) hide show
  1. package/dist/aws-amplify-notifications.js +597 -1112
  2. package/dist/aws-amplify-notifications.js.map +1 -1
  3. package/dist/aws-amplify-notifications.min.js +1 -1
  4. package/dist/aws-amplify-notifications.min.js.map +1 -1
  5. package/lib/InAppMessaging/InAppMessaging.js +22 -82
  6. package/lib/InAppMessaging/InAppMessaging.js.map +1 -1
  7. package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.js +29 -78
  8. package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.js.map +1 -1
  9. package/lib/InAppMessaging/Providers/AWSPinpointProvider/utils.js +6 -24
  10. package/lib/InAppMessaging/Providers/AWSPinpointProvider/utils.js.map +1 -1
  11. package/lib/InAppMessaging/SessionTracker/SessionTracker.js +2 -4
  12. package/lib/InAppMessaging/SessionTracker/SessionTracker.js.map +1 -1
  13. package/lib/InAppMessaging/SessionTracker/SessionTracker.native.js +2 -4
  14. package/lib/InAppMessaging/SessionTracker/SessionTracker.native.js.map +1 -1
  15. package/lib/InAppMessaging/SessionTracker/index.js +2 -4
  16. package/lib/InAppMessaging/SessionTracker/index.js.map +1 -1
  17. package/lib/Notifications.js +3 -16
  18. package/lib/Notifications.js.map +1 -1
  19. package/lib-esm/InAppMessaging/InAppMessaging.js +1 -58
  20. package/lib-esm/InAppMessaging/InAppMessaging.js.map +1 -1
  21. package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.js +1 -47
  22. package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.js.map +1 -1
  23. package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/utils.js +1 -16
  24. package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/utils.js.map +1 -1
  25. package/lib-esm/Notifications.js +1 -11
  26. package/lib-esm/Notifications.js.map +1 -1
  27. package/package.json +5 -5
@@ -1591,6 +1591,292 @@ function stubFalse() {
1591
1591
  module.exports = stubFalse;
1592
1592
 
1593
1593
 
1594
+ /***/ }),
1595
+
1596
+ /***/ "../../node_modules/tslib/tslib.es6.js":
1597
+ /*!********************************************************!*\
1598
+ !*** /root/amplify-js/node_modules/tslib/tslib.es6.js ***!
1599
+ \********************************************************/
1600
+ /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn */
1601
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1602
+
1603
+ "use strict";
1604
+ __webpack_require__.r(__webpack_exports__);
1605
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
1606
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
1607
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
1608
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
1609
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
1610
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
1611
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
1612
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
1613
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__createBinding", function() { return __createBinding; });
1614
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
1615
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
1616
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
1617
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
1618
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; });
1619
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArray", function() { return __spreadArray; });
1620
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
1621
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
1622
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
1623
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
1624
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
1625
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
1626
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
1627
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldGet", function() { return __classPrivateFieldGet; });
1628
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldSet", function() { return __classPrivateFieldSet; });
1629
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldIn", function() { return __classPrivateFieldIn; });
1630
+ /******************************************************************************
1631
+ Copyright (c) Microsoft Corporation.
1632
+
1633
+ Permission to use, copy, modify, and/or distribute this software for any
1634
+ purpose with or without fee is hereby granted.
1635
+
1636
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1637
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1638
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1639
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1640
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1641
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1642
+ PERFORMANCE OF THIS SOFTWARE.
1643
+ ***************************************************************************** */
1644
+ /* global Reflect, Promise */
1645
+
1646
+ var extendStatics = function(d, b) {
1647
+ extendStatics = Object.setPrototypeOf ||
1648
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1649
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1650
+ return extendStatics(d, b);
1651
+ };
1652
+
1653
+ function __extends(d, b) {
1654
+ if (typeof b !== "function" && b !== null)
1655
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1656
+ extendStatics(d, b);
1657
+ function __() { this.constructor = d; }
1658
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1659
+ }
1660
+
1661
+ var __assign = function() {
1662
+ __assign = Object.assign || function __assign(t) {
1663
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1664
+ s = arguments[i];
1665
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1666
+ }
1667
+ return t;
1668
+ }
1669
+ return __assign.apply(this, arguments);
1670
+ }
1671
+
1672
+ function __rest(s, e) {
1673
+ var t = {};
1674
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1675
+ t[p] = s[p];
1676
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1677
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1678
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1679
+ t[p[i]] = s[p[i]];
1680
+ }
1681
+ return t;
1682
+ }
1683
+
1684
+ function __decorate(decorators, target, key, desc) {
1685
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1686
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1687
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1688
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1689
+ }
1690
+
1691
+ function __param(paramIndex, decorator) {
1692
+ return function (target, key) { decorator(target, key, paramIndex); }
1693
+ }
1694
+
1695
+ function __metadata(metadataKey, metadataValue) {
1696
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
1697
+ }
1698
+
1699
+ function __awaiter(thisArg, _arguments, P, generator) {
1700
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1701
+ return new (P || (P = Promise))(function (resolve, reject) {
1702
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1703
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1704
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1705
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1706
+ });
1707
+ }
1708
+
1709
+ function __generator(thisArg, body) {
1710
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1711
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1712
+ function verb(n) { return function (v) { return step([n, v]); }; }
1713
+ function step(op) {
1714
+ if (f) throw new TypeError("Generator is already executing.");
1715
+ while (_) try {
1716
+ 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;
1717
+ if (y = 0, t) op = [op[0] & 2, t.value];
1718
+ switch (op[0]) {
1719
+ case 0: case 1: t = op; break;
1720
+ case 4: _.label++; return { value: op[1], done: false };
1721
+ case 5: _.label++; y = op[1]; op = [0]; continue;
1722
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
1723
+ default:
1724
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1725
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1726
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1727
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1728
+ if (t[2]) _.ops.pop();
1729
+ _.trys.pop(); continue;
1730
+ }
1731
+ op = body.call(thisArg, _);
1732
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1733
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1734
+ }
1735
+ }
1736
+
1737
+ var __createBinding = Object.create ? (function(o, m, k, k2) {
1738
+ if (k2 === undefined) k2 = k;
1739
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1740
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1741
+ desc = { enumerable: true, get: function() { return m[k]; } };
1742
+ }
1743
+ Object.defineProperty(o, k2, desc);
1744
+ }) : (function(o, m, k, k2) {
1745
+ if (k2 === undefined) k2 = k;
1746
+ o[k2] = m[k];
1747
+ });
1748
+
1749
+ function __exportStar(m, o) {
1750
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
1751
+ }
1752
+
1753
+ function __values(o) {
1754
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1755
+ if (m) return m.call(o);
1756
+ if (o && typeof o.length === "number") return {
1757
+ next: function () {
1758
+ if (o && i >= o.length) o = void 0;
1759
+ return { value: o && o[i++], done: !o };
1760
+ }
1761
+ };
1762
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1763
+ }
1764
+
1765
+ function __read(o, n) {
1766
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
1767
+ if (!m) return o;
1768
+ var i = m.call(o), r, ar = [], e;
1769
+ try {
1770
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
1771
+ }
1772
+ catch (error) { e = { error: error }; }
1773
+ finally {
1774
+ try {
1775
+ if (r && !r.done && (m = i["return"])) m.call(i);
1776
+ }
1777
+ finally { if (e) throw e.error; }
1778
+ }
1779
+ return ar;
1780
+ }
1781
+
1782
+ /** @deprecated */
1783
+ function __spread() {
1784
+ for (var ar = [], i = 0; i < arguments.length; i++)
1785
+ ar = ar.concat(__read(arguments[i]));
1786
+ return ar;
1787
+ }
1788
+
1789
+ /** @deprecated */
1790
+ function __spreadArrays() {
1791
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
1792
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
1793
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1794
+ r[k] = a[j];
1795
+ return r;
1796
+ }
1797
+
1798
+ function __spreadArray(to, from, pack) {
1799
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1800
+ if (ar || !(i in from)) {
1801
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1802
+ ar[i] = from[i];
1803
+ }
1804
+ }
1805
+ return to.concat(ar || Array.prototype.slice.call(from));
1806
+ }
1807
+
1808
+ function __await(v) {
1809
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
1810
+ }
1811
+
1812
+ function __asyncGenerator(thisArg, _arguments, generator) {
1813
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1814
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
1815
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
1816
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
1817
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
1818
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1819
+ function fulfill(value) { resume("next", value); }
1820
+ function reject(value) { resume("throw", value); }
1821
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
1822
+ }
1823
+
1824
+ function __asyncDelegator(o) {
1825
+ var i, p;
1826
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1827
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
1828
+ }
1829
+
1830
+ function __asyncValues(o) {
1831
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1832
+ var m = o[Symbol.asyncIterator], i;
1833
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
1834
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
1835
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
1836
+ }
1837
+
1838
+ function __makeTemplateObject(cooked, raw) {
1839
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
1840
+ return cooked;
1841
+ };
1842
+
1843
+ var __setModuleDefault = Object.create ? (function(o, v) {
1844
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1845
+ }) : function(o, v) {
1846
+ o["default"] = v;
1847
+ };
1848
+
1849
+ function __importStar(mod) {
1850
+ if (mod && mod.__esModule) return mod;
1851
+ var result = {};
1852
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1853
+ __setModuleDefault(result, mod);
1854
+ return result;
1855
+ }
1856
+
1857
+ function __importDefault(mod) {
1858
+ return (mod && mod.__esModule) ? mod : { default: mod };
1859
+ }
1860
+
1861
+ function __classPrivateFieldGet(receiver, state, kind, f) {
1862
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
1863
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1864
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1865
+ }
1866
+
1867
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
1868
+ if (kind === "m") throw new TypeError("Private method is not writable");
1869
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
1870
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1871
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1872
+ }
1873
+
1874
+ function __classPrivateFieldIn(state, receiver) {
1875
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
1876
+ return typeof state === "function" ? receiver === state : state.has(receiver);
1877
+ }
1878
+
1879
+
1594
1880
  /***/ }),
1595
1881
 
1596
1882
  /***/ "../../node_modules/uuid/index.js":
@@ -1927,13 +2213,14 @@ module.exports = function(module) {
1927
2213
 
1928
2214
  "use strict";
1929
2215
  __webpack_require__.r(__webpack_exports__);
1930
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
1931
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
1932
- /* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/flatten */ "../../node_modules/lodash/flatten.js");
1933
- /* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_flatten__WEBPACK_IMPORTED_MODULE_1__);
1934
- /* harmony import */ var _Providers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Providers */ "./lib-esm/InAppMessaging/Providers/index.js");
1935
- /* harmony import */ var _eventListeners__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eventListeners */ "./lib-esm/InAppMessaging/eventListeners.js");
1936
- /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./types */ "./lib-esm/InAppMessaging/types.js");
2216
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
2217
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
2218
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
2219
+ /* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/flatten */ "../../node_modules/lodash/flatten.js");
2220
+ /* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_flatten__WEBPACK_IMPORTED_MODULE_2__);
2221
+ /* harmony import */ var _Providers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Providers */ "./lib-esm/InAppMessaging/Providers/index.js");
2222
+ /* harmony import */ var _eventListeners__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./eventListeners */ "./lib-esm/InAppMessaging/eventListeners.js");
2223
+ /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./types */ "./lib-esm/InAppMessaging/types.js");
1937
2224
  /*
1938
2225
  * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1939
2226
  *
@@ -1946,177 +2233,6 @@ __webpack_require__.r(__webpack_exports__);
1946
2233
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
1947
2234
  * and limitations under the License.
1948
2235
  */
1949
- var __assign = undefined && undefined.__assign || function () {
1950
- __assign = Object.assign || function (t) {
1951
- for (var s, i = 1, n = arguments.length; i < n; i++) {
1952
- s = arguments[i];
1953
-
1954
- for (var p in s) {
1955
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1956
- }
1957
- }
1958
-
1959
- return t;
1960
- };
1961
-
1962
- return __assign.apply(this, arguments);
1963
- };
1964
-
1965
- var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
1966
- function adopt(value) {
1967
- return value instanceof P ? value : new P(function (resolve) {
1968
- resolve(value);
1969
- });
1970
- }
1971
-
1972
- return new (P || (P = Promise))(function (resolve, reject) {
1973
- function fulfilled(value) {
1974
- try {
1975
- step(generator.next(value));
1976
- } catch (e) {
1977
- reject(e);
1978
- }
1979
- }
1980
-
1981
- function rejected(value) {
1982
- try {
1983
- step(generator["throw"](value));
1984
- } catch (e) {
1985
- reject(e);
1986
- }
1987
- }
1988
-
1989
- function step(result) {
1990
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1991
- }
1992
-
1993
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1994
- });
1995
- };
1996
-
1997
- var __generator = undefined && undefined.__generator || function (thisArg, body) {
1998
- var _ = {
1999
- label: 0,
2000
- sent: function sent() {
2001
- if (t[0] & 1) throw t[1];
2002
- return t[1];
2003
- },
2004
- trys: [],
2005
- ops: []
2006
- },
2007
- f,
2008
- y,
2009
- t,
2010
- g;
2011
- return g = {
2012
- next: verb(0),
2013
- "throw": verb(1),
2014
- "return": verb(2)
2015
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
2016
- return this;
2017
- }), g;
2018
-
2019
- function verb(n) {
2020
- return function (v) {
2021
- return step([n, v]);
2022
- };
2023
- }
2024
-
2025
- function step(op) {
2026
- if (f) throw new TypeError("Generator is already executing.");
2027
-
2028
- while (_) {
2029
- try {
2030
- 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;
2031
- if (y = 0, t) op = [op[0] & 2, t.value];
2032
-
2033
- switch (op[0]) {
2034
- case 0:
2035
- case 1:
2036
- t = op;
2037
- break;
2038
-
2039
- case 4:
2040
- _.label++;
2041
- return {
2042
- value: op[1],
2043
- done: false
2044
- };
2045
-
2046
- case 5:
2047
- _.label++;
2048
- y = op[1];
2049
- op = [0];
2050
- continue;
2051
-
2052
- case 7:
2053
- op = _.ops.pop();
2054
-
2055
- _.trys.pop();
2056
-
2057
- continue;
2058
-
2059
- default:
2060
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
2061
- _ = 0;
2062
- continue;
2063
- }
2064
-
2065
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
2066
- _.label = op[1];
2067
- break;
2068
- }
2069
-
2070
- if (op[0] === 6 && _.label < t[1]) {
2071
- _.label = t[1];
2072
- t = op;
2073
- break;
2074
- }
2075
-
2076
- if (t && _.label < t[2]) {
2077
- _.label = t[2];
2078
-
2079
- _.ops.push(op);
2080
-
2081
- break;
2082
- }
2083
-
2084
- if (t[2]) _.ops.pop();
2085
-
2086
- _.trys.pop();
2087
-
2088
- continue;
2089
- }
2090
-
2091
- op = body.call(thisArg, _);
2092
- } catch (e) {
2093
- op = [6, e];
2094
- y = 0;
2095
- } finally {
2096
- f = t = 0;
2097
- }
2098
- }
2099
-
2100
- if (op[0] & 5) throw op[1];
2101
- return {
2102
- value: op[0] ? op[1] : void 0,
2103
- done: true
2104
- };
2105
- }
2106
- };
2107
-
2108
- var __rest = undefined && undefined.__rest || function (s, e) {
2109
- var t = {};
2110
-
2111
- for (var p in s) {
2112
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
2113
- }
2114
-
2115
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2116
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
2117
- }
2118
- return t;
2119
- };
2120
2236
 
2121
2237
 
2122
2238
 
@@ -2124,14 +2240,10 @@ var __rest = undefined && undefined.__rest || function (s, e) {
2124
2240
 
2125
2241
 
2126
2242
  var STORAGE_KEY_SUFFIX = '_inAppMessages';
2127
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('Notifications.InAppMessaging');
2128
-
2129
- var InAppMessaging =
2130
- /** @class */
2131
- function () {
2243
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('Notifications.InAppMessaging');
2244
+ var InAppMessaging = /** @class */function () {
2132
2245
  function InAppMessaging() {
2133
2246
  var _this = this;
2134
-
2135
2247
  this.config = {};
2136
2248
  this.listeningForAnalyticEvents = false;
2137
2249
  this.pluggables = [];
@@ -2140,67 +2252,51 @@ function () {
2140
2252
  * Configure InAppMessaging
2141
2253
  * @param {Object} config - InAppMessaging configuration object
2142
2254
  */
2143
-
2144
2255
  this.configure = function (_a) {
2145
2256
  if (_a === void 0) {
2146
2257
  _a = {};
2147
2258
  }
2148
-
2149
2259
  var _b = _a.listenForAnalyticsEvents,
2150
- listenForAnalyticsEvents = _b === void 0 ? true : _b,
2151
- config = __rest(_a, ["listenForAnalyticsEvents"]);
2152
-
2153
- _this.config = __assign(__assign({}, _this.config), config);
2260
+ listenForAnalyticsEvents = _b === void 0 ? true : _b,
2261
+ config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(_a, ["listenForAnalyticsEvents"]);
2262
+ _this.config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, _this.config), config);
2154
2263
  logger.debug('configure InAppMessaging', _this.config);
2155
-
2156
2264
  _this.pluggables.forEach(function (pluggable) {
2157
2265
  pluggable.configure(_this.config[pluggable.getProviderName()]);
2158
2266
  });
2159
-
2160
2267
  if (_this.pluggables.length === 0) {
2161
- _this.addPluggable(new _Providers__WEBPACK_IMPORTED_MODULE_2__["AWSPinpointProvider"]());
2268
+ _this.addPluggable(new _Providers__WEBPACK_IMPORTED_MODULE_3__["AWSPinpointProvider"]());
2162
2269
  }
2163
-
2164
2270
  if (listenForAnalyticsEvents && !_this.listeningForAnalyticEvents) {
2165
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].listen('analytics', _this.analyticsListener);
2271
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].listen('analytics', _this.analyticsListener);
2166
2272
  _this.listeningForAnalyticEvents = true;
2167
2273
  }
2168
-
2169
2274
  return _this.config;
2170
2275
  };
2171
2276
  /**
2172
2277
  * Get a plugin from added plugins
2173
2278
  * @param {string} providerName - the name of the plugin to get
2174
2279
  */
2175
-
2176
-
2177
2280
  this.getPluggable = function (providerName) {
2178
2281
  var _a;
2179
-
2180
2282
  var pluggable = (_a = _this.pluggables.find(function (pluggable) {
2181
2283
  return pluggable.getProviderName() === providerName;
2182
2284
  })) !== null && _a !== void 0 ? _a : null;
2183
-
2184
2285
  if (!pluggable) {
2185
2286
  logger.debug("No plugin found with name " + providerName);
2186
2287
  }
2187
-
2188
2288
  return pluggable;
2189
2289
  };
2190
2290
  /**
2191
2291
  * Add plugin into InAppMessaging
2192
2292
  * @param {InAppMessagingProvider} pluggable - an instance of the plugin
2193
2293
  */
2194
-
2195
-
2196
2294
  this.addPluggable = function (pluggable) {
2197
2295
  if (pluggable && pluggable.getCategory() === 'Notifications' && pluggable.getSubCategory() === 'InAppMessaging') {
2198
2296
  if (_this.getPluggable(pluggable.getProviderName())) {
2199
2297
  throw new Error("Pluggable " + pluggable.getProviderName() + " has already been added.");
2200
2298
  }
2201
-
2202
2299
  _this.pluggables.push(pluggable);
2203
-
2204
2300
  pluggable.configure(_this.config[pluggable.getProviderName()]);
2205
2301
  }
2206
2302
  };
@@ -2208,13 +2304,10 @@ function () {
2208
2304
  * Remove a plugin from added plugins
2209
2305
  * @param {string} providerName - the name of the plugin to remove
2210
2306
  */
2211
-
2212
-
2213
2307
  this.removePluggable = function (providerName) {
2214
2308
  var index = _this.pluggables.findIndex(function (pluggable) {
2215
2309
  return pluggable.getProviderName() === providerName;
2216
2310
  });
2217
-
2218
2311
  if (index === -1) {
2219
2312
  logger.debug("No plugin found with name " + providerName);
2220
2313
  } else {
@@ -2226,44 +2319,28 @@ function () {
2226
2319
  * @param {string} provider
2227
2320
  * @returns - Array of available map resources
2228
2321
  */
2229
-
2230
-
2231
2322
  this.syncMessages = function () {
2232
2323
  return Promise.all(_this.pluggables.map(function (pluggable) {
2233
- return __awaiter(_this, void 0, void 0, function () {
2324
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2234
2325
  var messages, key, err_1;
2235
- return __generator(this, function (_a) {
2326
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
2236
2327
  switch (_a.label) {
2237
2328
  case 0:
2238
2329
  _a.trys.push([0, 3,, 4]);
2239
-
2240
- return [4
2241
- /*yield*/
2242
- , pluggable.getInAppMessages()];
2243
-
2330
+ return [4 /*yield*/, pluggable.getInAppMessages()];
2244
2331
  case 1:
2245
2332
  messages = _a.sent();
2246
2333
  key = "" + pluggable.getProviderName() + STORAGE_KEY_SUFFIX;
2247
- return [4
2248
- /*yield*/
2249
- , this.setMessages(key, messages)];
2250
-
2334
+ return [4 /*yield*/, this.setMessages(key, messages)];
2251
2335
  case 2:
2252
2336
  _a.sent();
2253
-
2254
- return [3
2255
- /*break*/
2256
- , 4];
2257
-
2337
+ return [3 /*break*/, 4];
2258
2338
  case 3:
2259
2339
  err_1 = _a.sent();
2260
2340
  logger.error('Failed to sync messages', err_1);
2261
2341
  throw err_1;
2262
-
2263
2342
  case 4:
2264
- return [2
2265
- /*return*/
2266
- ];
2343
+ return [2 /*return*/];
2267
2344
  }
2268
2345
  });
2269
2346
  });
@@ -2272,22 +2349,16 @@ function () {
2272
2349
 
2273
2350
  this.clearMessages = function () {
2274
2351
  return Promise.all(_this.pluggables.map(function (pluggable) {
2275
- return __awaiter(_this, void 0, void 0, function () {
2352
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2276
2353
  var key;
2277
- return __generator(this, function (_a) {
2354
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
2278
2355
  switch (_a.label) {
2279
2356
  case 0:
2280
2357
  key = "" + pluggable.getProviderName() + STORAGE_KEY_SUFFIX;
2281
- return [4
2282
- /*yield*/
2283
- , this.removeMessages(key)];
2284
-
2358
+ return [4 /*yield*/, this.removeMessages(key)];
2285
2359
  case 1:
2286
2360
  _a.sent();
2287
-
2288
- return [2
2289
- /*return*/
2290
- ];
2361
+ return [2 /*return*/];
2291
2362
  }
2292
2363
  });
2293
2364
  });
@@ -2295,48 +2366,34 @@ function () {
2295
2366
  };
2296
2367
 
2297
2368
  this.dispatchEvent = function (event) {
2298
- return __awaiter(_this, void 0, void 0, function () {
2369
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2299
2370
  var messages, flattenedMessages;
2300
-
2301
2371
  var _this = this;
2302
-
2303
- return __generator(this, function (_a) {
2372
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
2304
2373
  switch (_a.label) {
2305
2374
  case 0:
2306
- return [4
2307
- /*yield*/
2308
- , Promise.all(this.pluggables.map(function (pluggable) {
2309
- return __awaiter(_this, void 0, void 0, function () {
2375
+ return [4 /*yield*/, Promise.all(this.pluggables.map(function (pluggable) {
2376
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2310
2377
  var key, messages;
2311
- return __generator(this, function (_a) {
2378
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
2312
2379
  switch (_a.label) {
2313
2380
  case 0:
2314
2381
  key = "" + pluggable.getProviderName() + STORAGE_KEY_SUFFIX;
2315
- return [4
2316
- /*yield*/
2317
- , this.getMessages(key)];
2318
-
2382
+ return [4 /*yield*/, this.getMessages(key)];
2319
2383
  case 1:
2320
2384
  messages = _a.sent();
2321
- return [2
2322
- /*return*/
2323
- , pluggable.processInAppMessages(messages, event)];
2385
+ return [2 /*return*/, pluggable.processInAppMessages(messages, event)];
2324
2386
  }
2325
2387
  });
2326
2388
  });
2327
2389
  }))];
2328
-
2329
2390
  case 1:
2330
2391
  messages = _a.sent();
2331
- flattenedMessages = lodash_flatten__WEBPACK_IMPORTED_MODULE_1___default()(messages);
2332
-
2392
+ flattenedMessages = lodash_flatten__WEBPACK_IMPORTED_MODULE_2___default()(messages);
2333
2393
  if (flattenedMessages.length) {
2334
- Object(_eventListeners__WEBPACK_IMPORTED_MODULE_3__["notifyMessageInteractionEventListeners"])(this.conflictHandler(flattenedMessages), _types__WEBPACK_IMPORTED_MODULE_4__["InAppMessageInteractionEvent"].MESSAGE_RECEIVED);
2394
+ Object(_eventListeners__WEBPACK_IMPORTED_MODULE_4__["notifyMessageInteractionEventListeners"])(this.conflictHandler(flattenedMessages), _types__WEBPACK_IMPORTED_MODULE_5__["InAppMessageInteractionEvent"].MESSAGE_RECEIVED);
2335
2395
  }
2336
-
2337
- return [2
2338
- /*return*/
2339
- ];
2396
+ return [2 /*return*/];
2340
2397
  }
2341
2398
  });
2342
2399
  });
@@ -2344,33 +2401,22 @@ function () {
2344
2401
 
2345
2402
  this.identifyUser = function (userId, userInfo) {
2346
2403
  return Promise.all(_this.pluggables.map(function (pluggable) {
2347
- return __awaiter(_this, void 0, void 0, function () {
2404
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2348
2405
  var err_2;
2349
- return __generator(this, function (_a) {
2406
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
2350
2407
  switch (_a.label) {
2351
2408
  case 0:
2352
2409
  _a.trys.push([0, 2,, 3]);
2353
-
2354
- return [4
2355
- /*yield*/
2356
- , pluggable.identifyUser(userId, userInfo)];
2357
-
2410
+ return [4 /*yield*/, pluggable.identifyUser(userId, userInfo)];
2358
2411
  case 1:
2359
2412
  _a.sent();
2360
-
2361
- return [3
2362
- /*break*/
2363
- , 3];
2364
-
2413
+ return [3 /*break*/, 3];
2365
2414
  case 2:
2366
2415
  err_2 = _a.sent();
2367
2416
  logger.error('Failed to identify user', err_2);
2368
2417
  throw err_2;
2369
-
2370
2418
  case 3:
2371
- return [2
2372
- /*return*/
2373
- ];
2419
+ return [2 /*return*/];
2374
2420
  }
2375
2421
  });
2376
2422
  });
@@ -2378,226 +2424,148 @@ function () {
2378
2424
  };
2379
2425
 
2380
2426
  this.onMessageReceived = function (handler) {
2381
- return Object(_eventListeners__WEBPACK_IMPORTED_MODULE_3__["addMessageInteractionEventListener"])(handler, _types__WEBPACK_IMPORTED_MODULE_4__["InAppMessageInteractionEvent"].MESSAGE_RECEIVED);
2427
+ return Object(_eventListeners__WEBPACK_IMPORTED_MODULE_4__["addMessageInteractionEventListener"])(handler, _types__WEBPACK_IMPORTED_MODULE_5__["InAppMessageInteractionEvent"].MESSAGE_RECEIVED);
2382
2428
  };
2383
-
2384
2429
  this.onMessageDisplayed = function (handler) {
2385
- return Object(_eventListeners__WEBPACK_IMPORTED_MODULE_3__["addMessageInteractionEventListener"])(handler, _types__WEBPACK_IMPORTED_MODULE_4__["InAppMessageInteractionEvent"].MESSAGE_DISPLAYED);
2430
+ return Object(_eventListeners__WEBPACK_IMPORTED_MODULE_4__["addMessageInteractionEventListener"])(handler, _types__WEBPACK_IMPORTED_MODULE_5__["InAppMessageInteractionEvent"].MESSAGE_DISPLAYED);
2386
2431
  };
2387
-
2388
2432
  this.onMessageDismissed = function (handler) {
2389
- return Object(_eventListeners__WEBPACK_IMPORTED_MODULE_3__["addMessageInteractionEventListener"])(handler, _types__WEBPACK_IMPORTED_MODULE_4__["InAppMessageInteractionEvent"].MESSAGE_DISMISSED);
2433
+ return Object(_eventListeners__WEBPACK_IMPORTED_MODULE_4__["addMessageInteractionEventListener"])(handler, _types__WEBPACK_IMPORTED_MODULE_5__["InAppMessageInteractionEvent"].MESSAGE_DISMISSED);
2390
2434
  };
2391
-
2392
2435
  this.onMessageActionTaken = function (handler) {
2393
- return Object(_eventListeners__WEBPACK_IMPORTED_MODULE_3__["addMessageInteractionEventListener"])(handler, _types__WEBPACK_IMPORTED_MODULE_4__["InAppMessageInteractionEvent"].MESSAGE_ACTION_TAKEN);
2436
+ return Object(_eventListeners__WEBPACK_IMPORTED_MODULE_4__["addMessageInteractionEventListener"])(handler, _types__WEBPACK_IMPORTED_MODULE_5__["InAppMessageInteractionEvent"].MESSAGE_ACTION_TAKEN);
2394
2437
  };
2395
-
2396
2438
  this.notifyMessageInteraction = function (message, event) {
2397
- Object(_eventListeners__WEBPACK_IMPORTED_MODULE_3__["notifyMessageInteractionEventListeners"])(message, event);
2439
+ Object(_eventListeners__WEBPACK_IMPORTED_MODULE_4__["notifyMessageInteractionEventListeners"])(message, event);
2398
2440
  };
2399
-
2400
2441
  this.setConflictHandler = function (handler) {
2401
2442
  _this.conflictHandler = handler;
2402
2443
  };
2403
-
2404
2444
  this.analyticsListener = function (_a) {
2405
2445
  var payload = _a.payload;
2406
2446
  var event = payload.event,
2407
- data = payload.data;
2408
-
2447
+ data = payload.data;
2409
2448
  switch (event) {
2410
2449
  case 'record':
2411
2450
  {
2412
2451
  _this.dispatchEvent(data);
2413
-
2414
2452
  break;
2415
2453
  }
2416
-
2417
2454
  default:
2418
2455
  break;
2419
2456
  }
2420
2457
  };
2421
-
2422
2458
  this.syncStorage = function () {
2423
- return __awaiter(_this, void 0, void 0, function () {
2459
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2424
2460
  var storage, err_3;
2425
- return __generator(this, function (_a) {
2461
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
2426
2462
  switch (_a.label) {
2427
2463
  case 0:
2428
2464
  storage = this.config.storage;
2429
2465
  _a.label = 1;
2430
-
2431
2466
  case 1:
2432
2467
  _a.trys.push([1, 4,, 5]);
2433
-
2434
- if (!(typeof storage.sync === 'function')) return [3
2435
- /*break*/
2436
- , 3];
2437
- return [4
2438
- /*yield*/
2439
- , storage.sync()];
2440
-
2468
+ if (!(typeof storage.sync === 'function')) return [3 /*break*/, 3];
2469
+ return [4 /*yield*/, storage.sync()];
2441
2470
  case 2:
2442
2471
  _a.sent();
2443
-
2444
2472
  _a.label = 3;
2445
-
2446
2473
  case 3:
2447
2474
  this.storageSynced = true;
2448
- return [3
2449
- /*break*/
2450
- , 5];
2451
-
2475
+ return [3 /*break*/, 5];
2452
2476
  case 4:
2453
2477
  err_3 = _a.sent();
2454
2478
  logger.error('Failed to sync storage', err_3);
2455
- return [3
2456
- /*break*/
2457
- , 5];
2458
-
2479
+ return [3 /*break*/, 5];
2459
2480
  case 5:
2460
- return [2
2461
- /*return*/
2462
- ];
2481
+ return [2 /*return*/];
2463
2482
  }
2464
2483
  });
2465
2484
  });
2466
2485
  };
2467
2486
 
2468
2487
  this.getMessages = function (key) {
2469
- return __awaiter(_this, void 0, void 0, function () {
2488
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2470
2489
  var storage, storedMessages, err_4;
2471
- return __generator(this, function (_a) {
2490
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
2472
2491
  switch (_a.label) {
2473
2492
  case 0:
2474
2493
  _a.trys.push([0, 3,, 4]);
2475
-
2476
- if (!!this.storageSynced) return [3
2477
- /*break*/
2478
- , 2];
2479
- return [4
2480
- /*yield*/
2481
- , this.syncStorage()];
2482
-
2494
+ if (!!this.storageSynced) return [3 /*break*/, 2];
2495
+ return [4 /*yield*/, this.syncStorage()];
2483
2496
  case 1:
2484
2497
  _a.sent();
2485
-
2486
2498
  _a.label = 2;
2487
-
2488
2499
  case 2:
2489
2500
  storage = this.config.storage;
2490
2501
  storedMessages = storage.getItem(key);
2491
- return [2
2492
- /*return*/
2493
- , storedMessages ? JSON.parse(storedMessages) : []];
2494
-
2502
+ return [2 /*return*/, storedMessages ? JSON.parse(storedMessages) : []];
2495
2503
  case 3:
2496
2504
  err_4 = _a.sent();
2497
2505
  logger.error('Failed to retrieve in-app messages from storage', err_4);
2498
- return [3
2499
- /*break*/
2500
- , 4];
2501
-
2506
+ return [3 /*break*/, 4];
2502
2507
  case 4:
2503
- return [2
2504
- /*return*/
2505
- ];
2508
+ return [2 /*return*/];
2506
2509
  }
2507
2510
  });
2508
2511
  });
2509
2512
  };
2510
2513
 
2511
2514
  this.setMessages = function (key, messages) {
2512
- return __awaiter(_this, void 0, void 0, function () {
2515
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2513
2516
  var storage, err_5;
2514
- return __generator(this, function (_a) {
2517
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
2515
2518
  switch (_a.label) {
2516
2519
  case 0:
2517
2520
  if (!messages) {
2518
- return [2
2519
- /*return*/
2520
- ];
2521
+ return [2 /*return*/];
2521
2522
  }
2522
2523
 
2523
2524
  _a.label = 1;
2524
-
2525
2525
  case 1:
2526
2526
  _a.trys.push([1, 4,, 5]);
2527
-
2528
- if (!!this.storageSynced) return [3
2529
- /*break*/
2530
- , 3];
2531
- return [4
2532
- /*yield*/
2533
- , this.syncStorage()];
2534
-
2527
+ if (!!this.storageSynced) return [3 /*break*/, 3];
2528
+ return [4 /*yield*/, this.syncStorage()];
2535
2529
  case 2:
2536
2530
  _a.sent();
2537
-
2538
2531
  _a.label = 3;
2539
-
2540
2532
  case 3:
2541
2533
  storage = this.config.storage;
2542
2534
  storage.setItem(key, JSON.stringify(messages));
2543
- return [3
2544
- /*break*/
2545
- , 5];
2546
-
2535
+ return [3 /*break*/, 5];
2547
2536
  case 4:
2548
2537
  err_5 = _a.sent();
2549
2538
  logger.error('Failed to store in-app messages', err_5);
2550
- return [3
2551
- /*break*/
2552
- , 5];
2553
-
2539
+ return [3 /*break*/, 5];
2554
2540
  case 5:
2555
- return [2
2556
- /*return*/
2557
- ];
2541
+ return [2 /*return*/];
2558
2542
  }
2559
2543
  });
2560
2544
  });
2561
2545
  };
2562
2546
 
2563
2547
  this.removeMessages = function (key) {
2564
- return __awaiter(_this, void 0, void 0, function () {
2548
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2565
2549
  var storage, err_6;
2566
- return __generator(this, function (_a) {
2550
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
2567
2551
  switch (_a.label) {
2568
2552
  case 0:
2569
2553
  _a.trys.push([0, 3,, 4]);
2570
-
2571
- if (!!this.storageSynced) return [3
2572
- /*break*/
2573
- , 2];
2574
- return [4
2575
- /*yield*/
2576
- , this.syncStorage()];
2577
-
2554
+ if (!!this.storageSynced) return [3 /*break*/, 2];
2555
+ return [4 /*yield*/, this.syncStorage()];
2578
2556
  case 1:
2579
2557
  _a.sent();
2580
-
2581
2558
  _a.label = 2;
2582
-
2583
2559
  case 2:
2584
2560
  storage = this.config.storage;
2585
2561
  storage.removeItem(key);
2586
- return [3
2587
- /*break*/
2588
- , 4];
2589
-
2562
+ return [3 /*break*/, 4];
2590
2563
  case 3:
2591
2564
  err_6 = _a.sent();
2592
2565
  logger.error('Failed to remove in-app messages from storage', err_6);
2593
- return [3
2594
- /*break*/
2595
- , 4];
2596
-
2566
+ return [3 /*break*/, 4];
2597
2567
  case 4:
2598
- return [2
2599
- /*return*/
2600
- ];
2568
+ return [2 /*return*/];
2601
2569
  }
2602
2570
  });
2603
2571
  });
@@ -2608,33 +2576,28 @@ function () {
2608
2576
  // this function assumes that messages processed by providers already filters out expired messages
2609
2577
  var sorted = messages.sort(function (a, b) {
2610
2578
  var _a, _b;
2611
-
2612
2579
  var endDateA = (_a = a.metadata) === null || _a === void 0 ? void 0 : _a.endDate;
2613
- var endDateB = (_b = b.metadata) === null || _b === void 0 ? void 0 : _b.endDate; // if both message end dates are falsy or have the same date string, treat them as equal
2614
-
2580
+ var endDateB = (_b = b.metadata) === null || _b === void 0 ? void 0 : _b.endDate;
2581
+ // if both message end dates are falsy or have the same date string, treat them as equal
2615
2582
  if (endDateA === endDateB) {
2616
2583
  return 0;
2617
- } // if only message A has an end date, treat it as closer to expiry
2618
-
2619
-
2584
+ }
2585
+ // if only message A has an end date, treat it as closer to expiry
2620
2586
  if (endDateA && !endDateB) {
2621
2587
  return -1;
2622
- } // if only message B has an end date, treat it as closer to expiry
2623
-
2624
-
2588
+ }
2589
+ // if only message B has an end date, treat it as closer to expiry
2625
2590
  if (!endDateA && endDateB) {
2626
2591
  return 1;
2627
- } // otherwise, compare them
2628
-
2629
-
2592
+ }
2593
+ // otherwise, compare them
2630
2594
  return new Date(endDateA) < new Date(endDateB) ? -1 : 1;
2631
- }); // always return the top sorted
2632
-
2595
+ });
2596
+ // always return the top sorted
2633
2597
  return sorted[0];
2634
2598
  };
2635
-
2636
2599
  this.config = {
2637
- storage: new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["StorageHelper"]().getStorage()
2600
+ storage: new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["StorageHelper"]().getStorage()
2638
2601
  };
2639
2602
  this.setConflictHandler(this.defaultConflictHandler);
2640
2603
  }
@@ -2642,15 +2605,11 @@ function () {
2642
2605
  * Get the name of this module
2643
2606
  * @returns {string} name of this module
2644
2607
  */
2645
-
2646
-
2647
2608
  InAppMessaging.prototype.getModuleName = function () {
2648
2609
  return 'InAppMessaging';
2649
2610
  };
2650
-
2651
2611
  return InAppMessaging;
2652
2612
  }();
2653
-
2654
2613
  /* harmony default export */ __webpack_exports__["default"] = (InAppMessaging);
2655
2614
 
2656
2615
  /***/ }),
@@ -2664,19 +2623,20 @@ function () {
2664
2623
 
2665
2624
  "use strict";
2666
2625
  __webpack_require__.r(__webpack_exports__);
2667
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
2668
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
2669
- /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/cache */ "@aws-amplify/cache");
2670
- /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_cache__WEBPACK_IMPORTED_MODULE_1__);
2671
- /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "@aws-sdk/client-pinpoint");
2672
- /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__);
2673
- /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uuid */ "../../node_modules/uuid/index.js");
2674
- /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(uuid__WEBPACK_IMPORTED_MODULE_3__);
2675
- /* harmony import */ var _eventListeners__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../eventListeners */ "./lib-esm/InAppMessaging/eventListeners.js");
2676
- /* harmony import */ var _SessionTracker__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../SessionTracker */ "./lib-esm/InAppMessaging/SessionTracker/index.js");
2677
- /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../types */ "./lib-esm/InAppMessaging/types.js");
2678
- /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./types */ "./lib-esm/InAppMessaging/Providers/AWSPinpointProvider/types.js");
2679
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils */ "./lib-esm/InAppMessaging/Providers/AWSPinpointProvider/utils.js");
2626
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
2627
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
2628
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
2629
+ /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/cache */ "@aws-amplify/cache");
2630
+ /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2__);
2631
+ /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "@aws-sdk/client-pinpoint");
2632
+ /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_3__);
2633
+ /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid */ "../../node_modules/uuid/index.js");
2634
+ /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(uuid__WEBPACK_IMPORTED_MODULE_4__);
2635
+ /* harmony import */ var _eventListeners__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../eventListeners */ "./lib-esm/InAppMessaging/eventListeners.js");
2636
+ /* harmony import */ var _SessionTracker__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SessionTracker */ "./lib-esm/InAppMessaging/SessionTracker/index.js");
2637
+ /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../types */ "./lib-esm/InAppMessaging/types.js");
2638
+ /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./types */ "./lib-esm/InAppMessaging/Providers/AWSPinpointProvider/types.js");
2639
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils */ "./lib-esm/InAppMessaging/Providers/AWSPinpointProvider/utils.js");
2680
2640
  /*
2681
2641
  * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2682
2642
  *
@@ -2689,164 +2649,6 @@ __webpack_require__.r(__webpack_exports__);
2689
2649
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
2690
2650
  * and limitations under the License.
2691
2651
  */
2692
- var __assign = undefined && undefined.__assign || function () {
2693
- __assign = Object.assign || function (t) {
2694
- for (var s, i = 1, n = arguments.length; i < n; i++) {
2695
- s = arguments[i];
2696
-
2697
- for (var p in s) {
2698
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
2699
- }
2700
- }
2701
-
2702
- return t;
2703
- };
2704
-
2705
- return __assign.apply(this, arguments);
2706
- };
2707
-
2708
- var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
2709
- function adopt(value) {
2710
- return value instanceof P ? value : new P(function (resolve) {
2711
- resolve(value);
2712
- });
2713
- }
2714
-
2715
- return new (P || (P = Promise))(function (resolve, reject) {
2716
- function fulfilled(value) {
2717
- try {
2718
- step(generator.next(value));
2719
- } catch (e) {
2720
- reject(e);
2721
- }
2722
- }
2723
-
2724
- function rejected(value) {
2725
- try {
2726
- step(generator["throw"](value));
2727
- } catch (e) {
2728
- reject(e);
2729
- }
2730
- }
2731
-
2732
- function step(result) {
2733
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
2734
- }
2735
-
2736
- step((generator = generator.apply(thisArg, _arguments || [])).next());
2737
- });
2738
- };
2739
-
2740
- var __generator = undefined && undefined.__generator || function (thisArg, body) {
2741
- var _ = {
2742
- label: 0,
2743
- sent: function sent() {
2744
- if (t[0] & 1) throw t[1];
2745
- return t[1];
2746
- },
2747
- trys: [],
2748
- ops: []
2749
- },
2750
- f,
2751
- y,
2752
- t,
2753
- g;
2754
- return g = {
2755
- next: verb(0),
2756
- "throw": verb(1),
2757
- "return": verb(2)
2758
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
2759
- return this;
2760
- }), g;
2761
-
2762
- function verb(n) {
2763
- return function (v) {
2764
- return step([n, v]);
2765
- };
2766
- }
2767
-
2768
- function step(op) {
2769
- if (f) throw new TypeError("Generator is already executing.");
2770
-
2771
- while (_) {
2772
- try {
2773
- 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;
2774
- if (y = 0, t) op = [op[0] & 2, t.value];
2775
-
2776
- switch (op[0]) {
2777
- case 0:
2778
- case 1:
2779
- t = op;
2780
- break;
2781
-
2782
- case 4:
2783
- _.label++;
2784
- return {
2785
- value: op[1],
2786
- done: false
2787
- };
2788
-
2789
- case 5:
2790
- _.label++;
2791
- y = op[1];
2792
- op = [0];
2793
- continue;
2794
-
2795
- case 7:
2796
- op = _.ops.pop();
2797
-
2798
- _.trys.pop();
2799
-
2800
- continue;
2801
-
2802
- default:
2803
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
2804
- _ = 0;
2805
- continue;
2806
- }
2807
-
2808
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
2809
- _.label = op[1];
2810
- break;
2811
- }
2812
-
2813
- if (op[0] === 6 && _.label < t[1]) {
2814
- _.label = t[1];
2815
- t = op;
2816
- break;
2817
- }
2818
-
2819
- if (t && _.label < t[2]) {
2820
- _.label = t[2];
2821
-
2822
- _.ops.push(op);
2823
-
2824
- break;
2825
- }
2826
-
2827
- if (t[2]) _.ops.pop();
2828
-
2829
- _.trys.pop();
2830
-
2831
- continue;
2832
- }
2833
-
2834
- op = body.call(thisArg, _);
2835
- } catch (e) {
2836
- op = [6, e];
2837
- y = 0;
2838
- } finally {
2839
- f = t = 0;
2840
- }
2841
- }
2842
-
2843
- if (op[0] & 5) throw op[1];
2844
- return {
2845
- value: op[0] ? op[1] : void 0,
2846
- done: true
2847
- };
2848
- }
2849
- };
2850
2652
 
2851
2653
 
2852
2654
 
@@ -2859,147 +2661,101 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
2859
2661
 
2860
2662
  var MESSAGE_DAILY_COUNT_KEY = 'pinpointProvider_inAppMessages_dailyCount';
2861
2663
  var MESSAGE_TOTAL_COUNT_KEY = 'pinpointProvider_inAppMessages_totalCount';
2862
-
2863
- var AWSPinpointProvider =
2864
- /** @class */
2865
- function () {
2664
+ var AWSPinpointProvider = /** @class */function () {
2866
2665
  function AWSPinpointProvider() {
2867
2666
  var _this = this;
2868
-
2869
2667
  var _a;
2870
-
2871
2668
  this.config = {};
2872
2669
  this.configured = false;
2873
2670
  this.endpointInitialized = false;
2874
2671
  this.initialized = false;
2875
-
2876
2672
  this.configure = function (config) {
2877
2673
  if (config === void 0) {
2878
2674
  config = {};
2879
2675
  }
2880
-
2881
- _this.config = __assign(__assign({}, _this.config), config);
2882
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].debug('configure AWSPinpointProvider', _this.config); // some configuration steps should not be re-run even if provider is re-configured for some reason
2883
-
2676
+ _this.config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, _this.config), config);
2677
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].debug('configure AWSPinpointProvider', _this.config);
2678
+ // some configuration steps should not be re-run even if provider is re-configured for some reason
2884
2679
  if (!_this.configured) {
2885
- _this.sessionTracker = new _SessionTracker__WEBPACK_IMPORTED_MODULE_5__["default"](_this.sessionStateChangeHandler);
2886
-
2887
- _this.sessionTracker.start(); // wire up default Pinpoint message event handling
2888
-
2889
-
2890
- Object(_eventListeners__WEBPACK_IMPORTED_MODULE_4__["addMessageInteractionEventListener"])(function (message) {
2891
- _this.recordMessageEvent(message, _types__WEBPACK_IMPORTED_MODULE_7__["AWSPinpointMessageEvent"].MESSAGE_DISPLAYED);
2892
- }, _types__WEBPACK_IMPORTED_MODULE_6__["InAppMessageInteractionEvent"].MESSAGE_DISPLAYED);
2893
- Object(_eventListeners__WEBPACK_IMPORTED_MODULE_4__["addMessageInteractionEventListener"])(function (message) {
2894
- _this.recordMessageEvent(message, _types__WEBPACK_IMPORTED_MODULE_7__["AWSPinpointMessageEvent"].MESSAGE_DISMISSED);
2895
- }, _types__WEBPACK_IMPORTED_MODULE_6__["InAppMessageInteractionEvent"].MESSAGE_DISMISSED);
2896
- Object(_eventListeners__WEBPACK_IMPORTED_MODULE_4__["addMessageInteractionEventListener"])(function (message) {
2897
- _this.recordMessageEvent(message, _types__WEBPACK_IMPORTED_MODULE_7__["AWSPinpointMessageEvent"].MESSAGE_ACTION_TAKEN);
2898
- }, _types__WEBPACK_IMPORTED_MODULE_6__["InAppMessageInteractionEvent"].MESSAGE_ACTION_TAKEN);
2680
+ _this.sessionTracker = new _SessionTracker__WEBPACK_IMPORTED_MODULE_6__["default"](_this.sessionStateChangeHandler);
2681
+ _this.sessionTracker.start();
2682
+ // wire up default Pinpoint message event handling
2683
+ Object(_eventListeners__WEBPACK_IMPORTED_MODULE_5__["addMessageInteractionEventListener"])(function (message) {
2684
+ _this.recordMessageEvent(message, _types__WEBPACK_IMPORTED_MODULE_8__["AWSPinpointMessageEvent"].MESSAGE_DISPLAYED);
2685
+ }, _types__WEBPACK_IMPORTED_MODULE_7__["InAppMessageInteractionEvent"].MESSAGE_DISPLAYED);
2686
+ Object(_eventListeners__WEBPACK_IMPORTED_MODULE_5__["addMessageInteractionEventListener"])(function (message) {
2687
+ _this.recordMessageEvent(message, _types__WEBPACK_IMPORTED_MODULE_8__["AWSPinpointMessageEvent"].MESSAGE_DISMISSED);
2688
+ }, _types__WEBPACK_IMPORTED_MODULE_7__["InAppMessageInteractionEvent"].MESSAGE_DISMISSED);
2689
+ Object(_eventListeners__WEBPACK_IMPORTED_MODULE_5__["addMessageInteractionEventListener"])(function (message) {
2690
+ _this.recordMessageEvent(message, _types__WEBPACK_IMPORTED_MODULE_8__["AWSPinpointMessageEvent"].MESSAGE_ACTION_TAKEN);
2691
+ }, _types__WEBPACK_IMPORTED_MODULE_7__["InAppMessageInteractionEvent"].MESSAGE_ACTION_TAKEN);
2899
2692
  }
2900
-
2901
2693
  _this.configured = true;
2902
- Object(_utils__WEBPACK_IMPORTED_MODULE_8__["dispatchInAppMessagingEvent"])('pinpointProvider_configured', null);
2694
+ Object(_utils__WEBPACK_IMPORTED_MODULE_9__["dispatchInAppMessagingEvent"])('pinpointProvider_configured', null);
2903
2695
  return _this.config;
2904
2696
  };
2905
-
2906
2697
  this.getInAppMessages = function () {
2907
- return __awaiter(_this, void 0, void 0, function () {
2698
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2908
2699
  var _a, appId, endpointId, pinpointClient, input, command, response, messages, err_1;
2909
-
2910
- return __generator(this, function (_b) {
2700
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
2911
2701
  switch (_b.label) {
2912
2702
  case 0:
2913
- if (!!this.initialized) return [3
2914
- /*break*/
2915
- , 2];
2916
- return [4
2917
- /*yield*/
2918
- , this.init()];
2919
-
2703
+ if (!!this.initialized) return [3 /*break*/, 2];
2704
+ return [4 /*yield*/, this.init()];
2920
2705
  case 1:
2921
2706
  _b.sent();
2922
-
2923
2707
  _b.label = 2;
2924
-
2925
2708
  case 2:
2926
2709
  // There is no way to granuarly reconcile the filter memoization as the keys are composited from a message id and
2927
2710
  // event properties thus opting to just clear them out when getting messages rather than leave potentially
2928
2711
  // obsolete entries that will no longer serve any purpose.
2929
- Object(_utils__WEBPACK_IMPORTED_MODULE_8__["clearMemo"])();
2712
+ Object(_utils__WEBPACK_IMPORTED_MODULE_9__["clearMemo"])();
2930
2713
  _b.label = 3;
2931
-
2932
2714
  case 3:
2933
2715
  _b.trys.push([3, 6,, 7]);
2934
-
2935
- return [4
2936
- /*yield*/
2937
- , this.updateEndpoint()];
2938
-
2716
+ return [4 /*yield*/, this.updateEndpoint()];
2939
2717
  case 4:
2940
2718
  _b.sent();
2941
-
2942
2719
  _a = this.config, appId = _a.appId, endpointId = _a.endpointId, pinpointClient = _a.pinpointClient;
2943
2720
  input = {
2944
2721
  ApplicationId: appId,
2945
2722
  EndpointId: endpointId
2946
2723
  };
2947
- command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["GetInAppMessagesCommand"](input);
2948
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].debug('getting in-app messages', input);
2949
- return [4
2950
- /*yield*/
2951
- , pinpointClient.send(command)];
2952
-
2724
+ command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_3__["GetInAppMessagesCommand"](input);
2725
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].debug('getting in-app messages', input);
2726
+ return [4 /*yield*/, pinpointClient.send(command)];
2953
2727
  case 5:
2954
2728
  response = _b.sent();
2955
2729
  messages = response.InAppMessagesResponse.InAppMessageCampaigns;
2956
- Object(_utils__WEBPACK_IMPORTED_MODULE_8__["dispatchInAppMessagingEvent"])('getInAppMessages', messages);
2957
- return [2
2958
- /*return*/
2959
- , messages];
2960
-
2730
+ Object(_utils__WEBPACK_IMPORTED_MODULE_9__["dispatchInAppMessagingEvent"])('getInAppMessages', messages);
2731
+ return [2 /*return*/, messages];
2961
2732
  case 6:
2962
2733
  err_1 = _b.sent();
2963
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].error('Error getting in-app messages', err_1);
2734
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].error('Error getting in-app messages', err_1);
2964
2735
  throw err_1;
2965
-
2966
2736
  case 7:
2967
- return [2
2968
- /*return*/
2969
- ];
2737
+ return [2 /*return*/];
2970
2738
  }
2971
2739
  });
2972
2740
  });
2973
2741
  };
2974
2742
 
2975
2743
  this.processInAppMessages = function (messages, event) {
2976
- return __awaiter(_this, void 0, void 0, function () {
2744
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
2977
2745
  var highestPrioritySeen;
2978
-
2979
2746
  var _this = this;
2980
-
2981
- return __generator(this, function (_a) {
2747
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
2982
2748
  switch (_a.label) {
2983
2749
  case 0:
2984
- if (!!this.initialized) return [3
2985
- /*break*/
2986
- , 2];
2987
- return [4
2988
- /*yield*/
2989
- , this.init()];
2990
-
2750
+ if (!!this.initialized) return [3 /*break*/, 2];
2751
+ return [4 /*yield*/, this.init()];
2991
2752
  case 1:
2992
2753
  _a.sent();
2993
-
2994
2754
  _a.label = 2;
2995
-
2996
2755
  case 2:
2997
- return [2
2998
- /*return*/
2999
- , this.normalizeMessages(messages.reduce(function (acc, message) {
3000
- var messageQualifies = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["matchesEventType"])(message, event) && Object(_utils__WEBPACK_IMPORTED_MODULE_8__["matchesAttributes"])(message, event) && Object(_utils__WEBPACK_IMPORTED_MODULE_8__["matchesMetrics"])(message, event) && Object(_utils__WEBPACK_IMPORTED_MODULE_8__["isBeforeEndDate"])(message) && _this.isBelowCap(message); // filter all qualifying messages returning only those that are of (relative) highest priority
3001
-
3002
-
2756
+ return [2 /*return*/, this.normalizeMessages(messages.reduce(function (acc, message) {
2757
+ var messageQualifies = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["matchesEventType"])(message, event) && Object(_utils__WEBPACK_IMPORTED_MODULE_9__["matchesAttributes"])(message, event) && Object(_utils__WEBPACK_IMPORTED_MODULE_9__["matchesMetrics"])(message, event) && Object(_utils__WEBPACK_IMPORTED_MODULE_9__["isBeforeEndDate"])(message) && _this.isBelowCap(message);
2758
+ // filter all qualifying messages returning only those that are of (relative) highest priority
3003
2759
  if (messageQualifies) {
3004
2760
  // have not yet encountered message with priority
3005
2761
  if (!highestPrioritySeen) {
@@ -3010,249 +2766,172 @@ function () {
3010
2766
  } else {
3011
2767
  // this message also has no priority, so just add this message to accumulator
3012
2768
  acc.push(message);
3013
- } // have previously encountered message with priority, so only messages with priority matter now
3014
-
2769
+ }
2770
+ // have previously encountered message with priority, so only messages with priority matter now
3015
2771
  } else if (message.Priority) {
3016
2772
  // this message has higher priority (lower number), so reset the accumulator with this message only
3017
2773
  if (message.Priority < highestPrioritySeen) {
3018
2774
  highestPrioritySeen = message.Priority;
3019
- return [message]; // this message has the same priority, so just add this message to accumulator
2775
+ return [message];
2776
+ // this message has the same priority, so just add this message to accumulator
3020
2777
  } else if (message.Priority === highestPrioritySeen) {
3021
2778
  acc.push(message);
3022
2779
  }
3023
2780
  }
3024
2781
  }
3025
-
3026
2782
  return acc;
3027
2783
  }, []))];
3028
2784
  }
3029
2785
  });
3030
2786
  });
3031
2787
  };
3032
-
3033
2788
  this.identifyUser = function (userId, userInfo) {
3034
- return __awaiter(_this, void 0, void 0, function () {
2789
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
3035
2790
  var err_2;
3036
- return __generator(this, function (_a) {
2791
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
3037
2792
  switch (_a.label) {
3038
2793
  case 0:
3039
- if (!!this.initialized) return [3
3040
- /*break*/
3041
- , 2];
3042
- return [4
3043
- /*yield*/
3044
- , this.init()];
3045
-
2794
+ if (!!this.initialized) return [3 /*break*/, 2];
2795
+ return [4 /*yield*/, this.init()];
3046
2796
  case 1:
3047
2797
  _a.sent();
3048
-
3049
2798
  _a.label = 2;
3050
-
3051
2799
  case 2:
3052
2800
  _a.trys.push([2, 4,, 5]);
3053
-
3054
- return [4
3055
- /*yield*/
3056
- , this.updateEndpoint(userId, userInfo)];
3057
-
2801
+ return [4 /*yield*/, this.updateEndpoint(userId, userInfo)];
3058
2802
  case 3:
3059
2803
  _a.sent();
3060
-
3061
- return [3
3062
- /*break*/
3063
- , 5];
3064
-
2804
+ return [3 /*break*/, 5];
3065
2805
  case 4:
3066
2806
  err_2 = _a.sent();
3067
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].error('Error identifying user', err_2);
2807
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].error('Error identifying user', err_2);
3068
2808
  throw err_2;
3069
-
3070
2809
  case 5:
3071
- return [2
3072
- /*return*/
3073
- ];
2810
+ return [2 /*return*/];
3074
2811
  }
3075
2812
  });
3076
2813
  });
3077
2814
  };
3078
2815
 
3079
2816
  this.init = function () {
3080
- return __awaiter(_this, void 0, void 0, function () {
2817
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
3081
2818
  var _a, endpointId, storage, providerName, _b, err_3;
3082
-
3083
- return __generator(this, function (_c) {
2819
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_c) {
3084
2820
  switch (_c.label) {
3085
2821
  case 0:
3086
2822
  _a = this.config, endpointId = _a.endpointId, storage = _a.storage;
3087
2823
  providerName = this.getProviderName();
3088
2824
  _c.label = 1;
3089
-
3090
2825
  case 1:
3091
2826
  _c.trys.push([1, 6,, 7]);
3092
-
3093
- if (!(typeof storage.sync === 'function')) return [3
3094
- /*break*/
3095
- , 3];
3096
- return [4
3097
- /*yield*/
3098
- , storage.sync()];
3099
-
2827
+ if (!(typeof storage.sync === 'function')) return [3 /*break*/, 3];
2828
+ return [4 /*yield*/, storage.sync()];
3100
2829
  case 2:
3101
2830
  _c.sent();
3102
-
3103
2831
  _c.label = 3;
3104
-
3105
2832
  case 3:
3106
- if (!!endpointId) return [3
3107
- /*break*/
3108
- , 5];
2833
+ if (!!endpointId) return [3 /*break*/, 5];
3109
2834
  _b = this.config;
3110
- return [4
3111
- /*yield*/
3112
- , this.getEndpointId()];
3113
-
2835
+ return [4 /*yield*/, this.getEndpointId()];
3114
2836
  case 4:
3115
2837
  _b.endpointId = _c.sent();
3116
2838
  _c.label = 5;
3117
-
3118
2839
  case 5:
3119
2840
  this.initialized = true;
3120
- return [3
3121
- /*break*/
3122
- , 7];
3123
-
2841
+ return [3 /*break*/, 7];
3124
2842
  case 6:
3125
2843
  err_3 = _c.sent();
3126
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].error("Failed to initialize " + providerName, err_3);
3127
- return [3
3128
- /*break*/
3129
- , 7];
3130
-
2844
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].error("Failed to initialize " + providerName, err_3);
2845
+ return [3 /*break*/, 7];
3131
2846
  case 7:
3132
- return [2
3133
- /*return*/
3134
- ];
2847
+ return [2 /*return*/];
3135
2848
  }
3136
2849
  });
3137
2850
  });
3138
2851
  };
3139
2852
 
3140
2853
  this.initPinpointClient = function () {
3141
- return __awaiter(_this, void 0, void 0, function () {
2854
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
3142
2855
  var _a, appId, credentials, pinpointClient, region;
3143
-
3144
- return __generator(this, function (_b) {
2856
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
3145
2857
  _a = this.config, appId = _a.appId, credentials = _a.credentials, pinpointClient = _a.pinpointClient, region = _a.region;
3146
-
3147
2858
  if (!appId || !credentials || !region) {
3148
2859
  throw new Error('One or more of credentials, appId or region is not configured');
3149
2860
  }
3150
-
3151
2861
  if (pinpointClient) {
3152
2862
  pinpointClient.destroy();
3153
2863
  }
3154
-
3155
- this.config.pinpointClient = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["PinpointClient"]({
2864
+ this.config.pinpointClient = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_3__["PinpointClient"]({
3156
2865
  region: region,
3157
2866
  credentials: credentials,
3158
- customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["getAmplifyUserAgent"])()
2867
+ customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])()
3159
2868
  });
3160
- return [2
3161
- /*return*/
3162
- ];
2869
+ return [2 /*return*/];
3163
2870
  });
3164
2871
  });
3165
2872
  };
3166
2873
 
3167
2874
  this.getEndpointId = function () {
3168
- return __awaiter(_this, void 0, void 0, function () {
2875
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
3169
2876
  var appId, cacheKey, cachedEndpointId, endpointId, ttl, expiration;
3170
- return __generator(this, function (_a) {
2877
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
3171
2878
  switch (_a.label) {
3172
2879
  case 0:
3173
2880
  appId = this.config.appId;
3174
2881
  cacheKey = this.getSubCategory() + ":" + this.getProviderName() + ":" + appId;
3175
- return [4
3176
- /*yield*/
3177
- , _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_1___default.a.getItem(cacheKey)];
3178
-
2882
+ return [4 /*yield*/, _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2___default.a.getItem(cacheKey)];
3179
2883
  case 1:
3180
- cachedEndpointId = _a.sent(); // Found in cache, just return it
3181
-
2884
+ cachedEndpointId = _a.sent();
2885
+ // Found in cache, just return it
3182
2886
  if (cachedEndpointId) {
3183
- return [2
3184
- /*return*/
3185
- , cachedEndpointId];
2887
+ return [2 /*return*/, cachedEndpointId];
3186
2888
  }
3187
-
3188
- endpointId = Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v4"])();
2889
+ endpointId = Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v4"])();
3189
2890
  ttl = 1000 * 60 * 60 * 24 * 365 * 100;
3190
2891
  expiration = new Date().getTime() + ttl;
3191
- _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_1___default.a.setItem(cacheKey, endpointId, {
2892
+ _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2___default.a.setItem(cacheKey, endpointId, {
3192
2893
  expires: expiration,
3193
2894
  priority: 1
3194
2895
  });
3195
- return [2
3196
- /*return*/
3197
- , endpointId];
2896
+ return [2 /*return*/, endpointId];
3198
2897
  }
3199
2898
  });
3200
2899
  });
3201
2900
  };
3202
-
3203
2901
  this.updateEndpoint = function (userId, userInfo) {
3204
2902
  if (userId === void 0) {
3205
2903
  userId = null;
3206
2904
  }
3207
-
3208
2905
  if (userInfo === void 0) {
3209
2906
  userInfo = null;
3210
2907
  }
3211
-
3212
- return __awaiter(_this, void 0, void 0, function () {
2908
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
3213
2909
  var _a, appId, credentials, endpointId, _b, endpointInfo, pinpointClient, currentCredentials, credentialsUpdated, _c, address, attributes, demographic, location_1, metrics, optOut, _d, appVersion, make, model, platform, version, input, command, err_4;
3214
-
3215
2910
  var _e;
3216
-
3217
- return __generator(this, function (_f) {
2911
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_f) {
3218
2912
  switch (_f.label) {
3219
2913
  case 0:
3220
2914
  _a = this.config, appId = _a.appId, credentials = _a.credentials, endpointId = _a.endpointId, _b = _a.endpointInfo, endpointInfo = _b === void 0 ? {} : _b, pinpointClient = _a.pinpointClient;
3221
- return [4
3222
- /*yield*/
3223
- , this.getCredentials()];
3224
-
2915
+ return [4 /*yield*/, this.getCredentials()];
3225
2916
  case 1:
3226
2917
  currentCredentials = _f.sent();
3227
2918
  credentialsUpdated = !credentials || Object.keys(currentCredentials).some(function (key) {
3228
2919
  return currentCredentials[key] !== credentials[key];
3229
- }); // If endpoint is already initialized, and nothing else is changing, just early return
3230
-
2920
+ });
2921
+ // If endpoint is already initialized, and nothing else is changing, just early return
3231
2922
  if (this.endpointInitialized && !credentialsUpdated && !userId && !userInfo) {
3232
- return [2
3233
- /*return*/
3234
- ];
3235
- } // Update credentials
3236
-
3237
-
2923
+ return [2 /*return*/];
2924
+ }
2925
+ // Update credentials
3238
2926
  this.config.credentials = currentCredentials;
3239
2927
  _f.label = 2;
3240
-
3241
2928
  case 2:
3242
2929
  _f.trys.push([2, 6,, 7]);
3243
-
3244
- if (!(!pinpointClient || credentialsUpdated)) return [3
3245
- /*break*/
3246
- , 4];
3247
- return [4
3248
- /*yield*/
3249
- , this.initPinpointClient()];
3250
-
2930
+ if (!(!pinpointClient || credentialsUpdated)) return [3 /*break*/, 4];
2931
+ return [4 /*yield*/, this.initPinpointClient()];
3251
2932
  case 3:
3252
2933
  _f.sent();
3253
-
3254
2934
  _f.label = 4;
3255
-
3256
2935
  case 4:
3257
2936
  _c = userInfo !== null && userInfo !== void 0 ? userInfo : {}, address = _c.address, attributes = _c.attributes, demographic = _c.demographic, location_1 = _c.location, metrics = _c.metrics, optOut = _c.optOut;
3258
2937
  _d = this.clientInfo, appVersion = _d.appVersion, make = _d.make, model = _d.model, platform = _d.platform, version = _d.version;
@@ -3260,20 +2939,20 @@ function () {
3260
2939
  ApplicationId: appId,
3261
2940
  EndpointId: endpointId,
3262
2941
  EndpointRequest: {
3263
- RequestId: Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v4"])(),
2942
+ RequestId: Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v4"])(),
3264
2943
  EffectiveDate: new Date().toISOString(),
3265
- ChannelType: _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["ChannelType"].IN_APP,
2944
+ ChannelType: _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_3__["ChannelType"].IN_APP,
3266
2945
  Address: address !== null && address !== void 0 ? address : endpointInfo.address,
3267
- Attributes: __assign(__assign({}, endpointInfo.attributes), attributes),
3268
- Demographic: __assign({
2946
+ Attributes: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, endpointInfo.attributes), attributes),
2947
+ Demographic: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
3269
2948
  AppVersion: appVersion,
3270
2949
  Make: make,
3271
2950
  Model: model,
3272
2951
  ModelVersion: version,
3273
2952
  Platform: platform
3274
- }, Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["transferKeyToUpperCase"])(__assign(__assign({}, endpointInfo.demographic), demographic))),
3275
- Location: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["transferKeyToUpperCase"])(__assign(__assign({}, endpointInfo.location), location_1)),
3276
- Metrics: __assign(__assign({}, endpointInfo.metrics), metrics),
2953
+ }, Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["transferKeyToUpperCase"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, endpointInfo.demographic), demographic))),
2954
+ Location: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["transferKeyToUpperCase"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, endpointInfo.location), location_1)),
2955
+ Metrics: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, endpointInfo.metrics), metrics),
3277
2956
  OptOut: optOut !== null && optOut !== void 0 ? optOut : endpointInfo.optOut,
3278
2957
  User: {
3279
2958
  UserId: (_e = userId !== null && userId !== void 0 ? userId : endpointInfo.userId) !== null && _e !== void 0 ? _e : currentCredentials.identityId,
@@ -3281,70 +2960,44 @@ function () {
3281
2960
  }
3282
2961
  }
3283
2962
  };
3284
- command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["UpdateEndpointCommand"](input);
3285
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].debug('updating endpoint', input);
3286
- return [4
3287
- /*yield*/
3288
- , this.config.pinpointClient.send(command)];
3289
-
2963
+ command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_3__["UpdateEndpointCommand"](input);
2964
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].debug('updating endpoint', input);
2965
+ return [4 /*yield*/, this.config.pinpointClient.send(command)];
3290
2966
  case 5:
3291
2967
  _f.sent();
3292
-
3293
2968
  this.endpointInitialized = true;
3294
- return [3
3295
- /*break*/
3296
- , 7];
3297
-
2969
+ return [3 /*break*/, 7];
3298
2970
  case 6:
3299
2971
  err_4 = _f.sent();
3300
2972
  throw err_4;
3301
-
3302
2973
  case 7:
3303
- return [2
3304
- /*return*/
3305
- ];
2974
+ return [2 /*return*/];
3306
2975
  }
3307
2976
  });
3308
2977
  });
3309
2978
  };
3310
2979
 
3311
2980
  this.getCredentials = function () {
3312
- return __awaiter(_this, void 0, void 0, function () {
2981
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
3313
2982
  var credentials, err_5;
3314
- return __generator(this, function (_a) {
2983
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
3315
2984
  switch (_a.label) {
3316
2985
  case 0:
3317
2986
  _a.trys.push([0, 2,, 3]);
3318
-
3319
- return [4
3320
- /*yield*/
3321
- , _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].get()];
3322
-
2987
+ return [4 /*yield*/, _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].get()];
3323
2988
  case 1:
3324
2989
  credentials = _a.sent();
3325
-
3326
2990
  if (!credentials) {
3327
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].debug('no credentials found');
3328
- return [2
3329
- /*return*/
3330
- , null];
2991
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].debug('no credentials found');
2992
+ return [2 /*return*/, null];
3331
2993
  }
3332
-
3333
- return [2
3334
- /*return*/
3335
- , _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].shear(credentials)];
3336
-
2994
+ return [2 /*return*/, _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].shear(credentials)];
3337
2995
  case 2:
3338
2996
  err_5 = _a.sent();
3339
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].error('Error getting credentials:', err_5);
3340
- return [2
3341
- /*return*/
3342
- , null];
3343
-
2997
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].error('Error getting credentials:', err_5);
2998
+ return [2 /*return*/, null];
3344
2999
  case 3:
3345
- return [2
3346
- /*return*/
3347
- ];
3000
+ return [2 /*return*/];
3348
3001
  }
3349
3002
  });
3350
3003
  });
@@ -3356,53 +3009,44 @@ function () {
3356
3009
  _this.sessionMessageCountMap = {};
3357
3010
  }
3358
3011
  };
3359
-
3360
3012
  this.isBelowCap = function (_a) {
3361
3013
  var CampaignId = _a.CampaignId,
3362
- SessionCap = _a.SessionCap,
3363
- DailyCap = _a.DailyCap,
3364
- TotalCap = _a.TotalCap;
3365
-
3014
+ SessionCap = _a.SessionCap,
3015
+ DailyCap = _a.DailyCap,
3016
+ TotalCap = _a.TotalCap;
3366
3017
  var _b = _this.getMessageCounts(CampaignId),
3367
- sessionCount = _b.sessionCount,
3368
- dailyCount = _b.dailyCount,
3369
- totalCount = _b.totalCount;
3370
-
3018
+ sessionCount = _b.sessionCount,
3019
+ dailyCount = _b.dailyCount,
3020
+ totalCount = _b.totalCount;
3371
3021
  return (!SessionCap || sessionCount < SessionCap) && (!DailyCap || dailyCount < DailyCap) && (!TotalCap || totalCount < TotalCap);
3372
- }; // Use the current session count in memory or initialize as empty count
3373
-
3374
-
3022
+ };
3023
+ // Use the current session count in memory or initialize as empty count
3375
3024
  this.getSessionCount = function (messageId) {
3376
3025
  return _this.sessionMessageCountMap[messageId] || 0;
3377
3026
  };
3378
-
3379
3027
  this.getDailyCount = function () {
3380
3028
  var storage = _this.config.storage;
3381
- var today = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["getStartOfDay"])();
3382
- var item = storage.getItem(MESSAGE_DAILY_COUNT_KEY); // Parse stored count or initialize as empty count
3383
-
3029
+ var today = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStartOfDay"])();
3030
+ var item = storage.getItem(MESSAGE_DAILY_COUNT_KEY);
3031
+ // Parse stored count or initialize as empty count
3384
3032
  var counter = item ? JSON.parse(item) : {
3385
3033
  count: 0,
3386
3034
  lastCountTimestamp: today
3387
- }; // If the stored counter timestamp is today, use it as the count, otherwise reset to 0
3388
-
3035
+ };
3036
+ // If the stored counter timestamp is today, use it as the count, otherwise reset to 0
3389
3037
  return counter.lastCountTimestamp === today ? counter.count : 0;
3390
3038
  };
3391
-
3392
3039
  this.getTotalCountMap = function () {
3393
3040
  var storage = _this.config.storage;
3394
- var item = storage.getItem(MESSAGE_TOTAL_COUNT_KEY); // Parse stored count map or initialize as empty
3395
-
3041
+ var item = storage.getItem(MESSAGE_TOTAL_COUNT_KEY);
3042
+ // Parse stored count map or initialize as empty
3396
3043
  return item ? JSON.parse(item) : {};
3397
3044
  };
3398
-
3399
3045
  this.getTotalCount = function (messageId) {
3400
- var countMap = _this.getTotalCountMap(); // Return stored count or initialize as empty count
3401
-
3402
-
3046
+ var countMap = _this.getTotalCountMap();
3047
+ // Return stored count or initialize as empty count
3403
3048
  return countMap[messageId] || 0;
3404
3049
  };
3405
-
3406
3050
  this.getMessageCounts = function (messageId) {
3407
3051
  try {
3408
3052
  return {
@@ -3411,58 +3055,46 @@ function () {
3411
3055
  totalCount: _this.getTotalCount(messageId)
3412
3056
  };
3413
3057
  } catch (err) {
3414
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].error('Failed to get message counts from storage', err);
3058
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].error('Failed to get message counts from storage', err);
3415
3059
  }
3416
3060
  };
3417
-
3418
3061
  this.setSessionCount = function (messageId, count) {
3419
3062
  _this.sessionMessageCountMap[messageId] = count;
3420
3063
  };
3421
-
3422
3064
  this.setDailyCount = function (count) {
3423
3065
  var storage = _this.config.storage;
3424
3066
  var dailyCount = {
3425
3067
  count: count,
3426
- lastCountTimestamp: Object(_utils__WEBPACK_IMPORTED_MODULE_8__["getStartOfDay"])()
3068
+ lastCountTimestamp: Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStartOfDay"])()
3427
3069
  };
3428
-
3429
3070
  try {
3430
3071
  storage.setItem(MESSAGE_DAILY_COUNT_KEY, JSON.stringify(dailyCount));
3431
3072
  } catch (err) {
3432
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].error('Failed to save daily message count to storage', err);
3073
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].error('Failed to save daily message count to storage', err);
3433
3074
  }
3434
3075
  };
3435
-
3436
3076
  this.setTotalCountMap = function (countMap) {
3437
3077
  var storage = _this.config.storage;
3438
-
3439
3078
  try {
3440
3079
  storage.setItem(MESSAGE_TOTAL_COUNT_KEY, JSON.stringify(countMap));
3441
3080
  } catch (err) {
3442
- _utils__WEBPACK_IMPORTED_MODULE_8__["logger"].error('Failed to save total count to storage', err);
3081
+ _utils__WEBPACK_IMPORTED_MODULE_9__["logger"].error('Failed to save total count to storage', err);
3443
3082
  }
3444
3083
  };
3445
-
3446
3084
  this.setTotalCount = function (messageId, count) {
3447
3085
  var _a;
3448
-
3449
- var updatedMap = __assign(__assign({}, _this.getTotalCountMap()), (_a = {}, _a[messageId] = count, _a));
3450
-
3086
+ var updatedMap = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, _this.getTotalCountMap()), (_a = {}, _a[messageId] = count, _a));
3451
3087
  _this.setTotalCountMap(updatedMap);
3452
3088
  };
3453
-
3454
3089
  this.incrementCounts = function (messageId) {
3455
- return __awaiter(_this, void 0, void 0, function () {
3090
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
3456
3091
  var _a, sessionCount, dailyCount, totalCount;
3457
-
3458
- return __generator(this, function (_b) {
3092
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
3459
3093
  _a = this.getMessageCounts(messageId), sessionCount = _a.sessionCount, dailyCount = _a.dailyCount, totalCount = _a.totalCount;
3460
3094
  this.setSessionCount(messageId, sessionCount + 1);
3461
3095
  this.setDailyCount(dailyCount + 1);
3462
3096
  this.setTotalCount(messageId, totalCount + 1);
3463
- return [2
3464
- /*return*/
3465
- ];
3097
+ return [2 /*return*/];
3466
3098
  });
3467
3099
  });
3468
3100
  };
@@ -3470,51 +3102,34 @@ function () {
3470
3102
  this.normalizeMessages = function (messages) {
3471
3103
  return messages.map(function (message) {
3472
3104
  var CampaignId = message.CampaignId,
3473
- InAppMessage = message.InAppMessage;
3105
+ InAppMessage = message.InAppMessage;
3474
3106
  return {
3475
3107
  id: CampaignId,
3476
- content: Object(_utils__WEBPACK_IMPORTED_MODULE_8__["extractContent"])(message),
3477
- layout: Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpretLayout"])(InAppMessage.Layout),
3478
- metadata: Object(_utils__WEBPACK_IMPORTED_MODULE_8__["extractMetadata"])(message)
3108
+ content: Object(_utils__WEBPACK_IMPORTED_MODULE_9__["extractContent"])(message),
3109
+ layout: Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpretLayout"])(InAppMessage.Layout),
3110
+ metadata: Object(_utils__WEBPACK_IMPORTED_MODULE_9__["extractMetadata"])(message)
3479
3111
  };
3480
3112
  });
3481
3113
  };
3482
-
3483
3114
  this.recordMessageEvent = function (message, event) {
3484
- return __awaiter(_this, void 0, void 0, function () {
3485
- return __generator(this, function (_a) {
3115
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
3116
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
3486
3117
  switch (_a.label) {
3487
3118
  case 0:
3488
- if (!!this.initialized) return [3
3489
- /*break*/
3490
- , 2];
3491
- return [4
3492
- /*yield*/
3493
- , this.init()];
3494
-
3119
+ if (!!this.initialized) return [3 /*break*/, 2];
3120
+ return [4 /*yield*/, this.init()];
3495
3121
  case 1:
3496
3122
  _a.sent();
3497
-
3498
3123
  _a.label = 2;
3499
-
3500
3124
  case 2:
3501
- Object(_utils__WEBPACK_IMPORTED_MODULE_8__["recordAnalyticsEvent"])(event, message);
3502
- if (!(event === _types__WEBPACK_IMPORTED_MODULE_7__["AWSPinpointMessageEvent"].MESSAGE_DISPLAYED)) return [3
3503
- /*break*/
3504
- , 4];
3505
- return [4
3506
- /*yield*/
3507
- , this.incrementCounts(message.id)];
3508
-
3125
+ Object(_utils__WEBPACK_IMPORTED_MODULE_9__["recordAnalyticsEvent"])(event, message);
3126
+ if (!(event === _types__WEBPACK_IMPORTED_MODULE_8__["AWSPinpointMessageEvent"].MESSAGE_DISPLAYED)) return [3 /*break*/, 4];
3127
+ return [4 /*yield*/, this.incrementCounts(message.id)];
3509
3128
  case 3:
3510
3129
  _a.sent();
3511
-
3512
3130
  _a.label = 4;
3513
-
3514
3131
  case 4:
3515
- return [2
3516
- /*return*/
3517
- ];
3132
+ return [2 /*return*/];
3518
3133
  }
3519
3134
  });
3520
3135
  });
@@ -3522,41 +3137,33 @@ function () {
3522
3137
 
3523
3138
  this.sessionMessageCountMap = {};
3524
3139
  this.config = {
3525
- storage: new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["StorageHelper"]().getStorage()
3140
+ storage: new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["StorageHelper"]().getStorage()
3526
3141
  };
3527
- this.clientInfo = (_a = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ClientDevice"].clientInfo()) !== null && _a !== void 0 ? _a : {};
3142
+ this.clientInfo = (_a = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ClientDevice"].clientInfo()) !== null && _a !== void 0 ? _a : {};
3528
3143
  }
3529
3144
  /**
3530
3145
  * get the category of the plugin
3531
3146
  */
3532
-
3533
-
3534
3147
  AWSPinpointProvider.prototype.getCategory = function () {
3535
3148
  return AWSPinpointProvider.category;
3536
3149
  };
3537
3150
  /**
3538
3151
  * get the sub-category of the plugin
3539
3152
  */
3540
-
3541
-
3542
3153
  AWSPinpointProvider.prototype.getSubCategory = function () {
3543
3154
  return AWSPinpointProvider.subCategory;
3544
3155
  };
3545
3156
  /**
3546
3157
  * get provider name of the plugin
3547
3158
  */
3548
-
3549
-
3550
3159
  AWSPinpointProvider.prototype.getProviderName = function () {
3551
3160
  return AWSPinpointProvider.providerName;
3552
3161
  };
3553
-
3554
3162
  AWSPinpointProvider.category = 'Notifications';
3555
3163
  AWSPinpointProvider.subCategory = 'InAppMessaging';
3556
3164
  AWSPinpointProvider.providerName = 'AWSPinpoint';
3557
3165
  return AWSPinpointProvider;
3558
3166
  }();
3559
-
3560
3167
  /* harmony default export */ __webpack_exports__["default"] = (AWSPinpointProvider);
3561
3168
 
3562
3169
  /***/ }),
@@ -3584,7 +3191,6 @@ __webpack_require__.r(__webpack_exports__);
3584
3191
  * and limitations under the License.
3585
3192
  */
3586
3193
  var AWSPinpointMessageEvent;
3587
-
3588
3194
  (function (AWSPinpointMessageEvent) {
3589
3195
  AWSPinpointMessageEvent["MESSAGE_DISPLAYED"] = "_inapp.message_displayed";
3590
3196
  AWSPinpointMessageEvent["MESSAGE_DISMISSED"] = "_inapp.message_dismissed";
@@ -3616,12 +3222,13 @@ __webpack_require__.r(__webpack_exports__);
3616
3222
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpretLayout", function() { return interpretLayout; });
3617
3223
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractContent", function() { return extractContent; });
3618
3224
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractMetadata", function() { return extractMetadata; });
3619
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
3620
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
3621
- /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "@aws-sdk/client-pinpoint");
3622
- /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__);
3623
- /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isEmpty */ "../../node_modules/lodash/isEmpty.js");
3624
- /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
3225
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
3226
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
3227
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
3228
+ /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "@aws-sdk/client-pinpoint");
3229
+ /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__);
3230
+ /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isEmpty */ "../../node_modules/lodash/isEmpty.js");
3231
+ /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3__);
3625
3232
  /*
3626
3233
  * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3627
3234
  *
@@ -3634,32 +3241,6 @@ __webpack_require__.r(__webpack_exports__);
3634
3241
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
3635
3242
  * and limitations under the License.
3636
3243
  */
3637
- var __read = undefined && undefined.__read || function (o, n) {
3638
- var m = typeof Symbol === "function" && o[Symbol.iterator];
3639
- if (!m) return o;
3640
- var i = m.call(o),
3641
- r,
3642
- ar = [],
3643
- e;
3644
-
3645
- try {
3646
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
3647
- ar.push(r.value);
3648
- }
3649
- } catch (error) {
3650
- e = {
3651
- error: error
3652
- };
3653
- } finally {
3654
- try {
3655
- if (r && !r.done && (m = i["return"])) m.call(i);
3656
- } finally {
3657
- if (e) throw e.error;
3658
- }
3659
- }
3660
-
3661
- return ar;
3662
- };
3663
3244
 
3664
3245
 
3665
3246
 
@@ -3669,9 +3250,9 @@ var DELIVERY_TYPE = 'IN_APP_MESSAGE';
3669
3250
  var eventNameMemo = {};
3670
3251
  var eventAttributesMemo = {};
3671
3252
  var eventMetricsMemo = {};
3672
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AWSPinpointProvider');
3253
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AWSPinpointProvider');
3673
3254
  var dispatchInAppMessagingEvent = function dispatchInAppMessagingEvent(event, data, message) {
3674
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].dispatch('inAppMessaging', {
3255
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].dispatch('inAppMessaging', {
3675
3256
  event: event,
3676
3257
  data: data,
3677
3258
  message: message
@@ -3682,11 +3263,10 @@ var recordAnalyticsEvent = function recordAnalyticsEvent(event, message) {
3682
3263
  logger.debug('Unable to record analytics event - no InAppMessage was received');
3683
3264
  return;
3684
3265
  }
3685
-
3686
- if (_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Amplify"].Analytics && typeof _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Amplify"].Analytics.record === 'function') {
3266
+ if (_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].Analytics && typeof _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].Analytics.record === 'function') {
3687
3267
  var id = message.id,
3688
- metadata = message.metadata;
3689
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Amplify"].Analytics.record({
3268
+ metadata = message.metadata;
3269
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].Analytics.record({
3690
3270
  name: event,
3691
3271
  attributes: {
3692
3272
  campaign_id: id,
@@ -3705,88 +3285,68 @@ var getStartOfDay = function getStartOfDay() {
3705
3285
  };
3706
3286
  var matchesEventType = function matchesEventType(_a, _b) {
3707
3287
  var CampaignId = _a.CampaignId,
3708
- Schedule = _a.Schedule;
3288
+ Schedule = _a.Schedule;
3709
3289
  var eventType = _b.name;
3710
-
3711
3290
  var _c;
3712
-
3713
3291
  var EventType = ((_c = Schedule === null || Schedule === void 0 ? void 0 : Schedule.EventFilter) === null || _c === void 0 ? void 0 : _c.Dimensions).EventType;
3714
3292
  var memoKey = CampaignId + ":" + eventType;
3715
-
3716
3293
  if (!eventNameMemo.hasOwnProperty(memoKey)) {
3717
3294
  eventNameMemo[memoKey] = !!(EventType === null || EventType === void 0 ? void 0 : EventType.Values.includes(eventType));
3718
3295
  }
3719
-
3720
3296
  return eventNameMemo[memoKey];
3721
3297
  };
3722
3298
  var matchesAttributes = function matchesAttributes(_a, _b) {
3723
3299
  var CampaignId = _a.CampaignId,
3724
- Schedule = _a.Schedule;
3300
+ Schedule = _a.Schedule;
3725
3301
  var attributes = _b.attributes;
3726
-
3727
3302
  var _c;
3728
-
3729
3303
  var Attributes = ((_c = Schedule === null || Schedule === void 0 ? void 0 : Schedule.EventFilter) === null || _c === void 0 ? void 0 : _c.Dimensions).Attributes;
3730
-
3731
- if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(Attributes)) {
3304
+ if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(Attributes)) {
3732
3305
  // if message does not have attributes defined it does not matter what attributes are on the event
3733
3306
  return true;
3734
3307
  }
3735
-
3736
- if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(attributes)) {
3308
+ if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(attributes)) {
3737
3309
  // if message does have attributes but the event does not then it always fails the check
3738
3310
  return false;
3739
3311
  }
3740
-
3741
3312
  var memoKey = CampaignId + ":" + JSON.stringify(attributes);
3742
-
3743
3313
  if (!eventAttributesMemo.hasOwnProperty(memoKey)) {
3744
3314
  eventAttributesMemo[memoKey] = Object.entries(Attributes).every(function (_a) {
3745
- var _b = __read(_a, 2),
3746
- key = _b[0],
3747
- Values = _b[1].Values;
3748
-
3315
+ var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2),
3316
+ key = _b[0],
3317
+ Values = _b[1].Values;
3749
3318
  return Values.includes(attributes[key]);
3750
3319
  });
3751
3320
  }
3752
-
3753
3321
  return eventAttributesMemo[memoKey];
3754
3322
  };
3755
3323
  var matchesMetrics = function matchesMetrics(_a, _b) {
3756
3324
  var CampaignId = _a.CampaignId,
3757
- Schedule = _a.Schedule;
3325
+ Schedule = _a.Schedule;
3758
3326
  var metrics = _b.metrics;
3759
-
3760
3327
  var _c;
3761
-
3762
3328
  var Metrics = ((_c = Schedule === null || Schedule === void 0 ? void 0 : Schedule.EventFilter) === null || _c === void 0 ? void 0 : _c.Dimensions).Metrics;
3763
-
3764
- if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(Metrics)) {
3329
+ if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(Metrics)) {
3765
3330
  // if message does not have metrics defined it does not matter what metrics are on the event
3766
3331
  return true;
3767
3332
  }
3768
-
3769
- if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(metrics)) {
3333
+ if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(metrics)) {
3770
3334
  // if message does have metrics but the event does not then it always fails the check
3771
3335
  return false;
3772
3336
  }
3773
-
3774
3337
  var memoKey = CampaignId + ":" + JSON.stringify(metrics);
3775
-
3776
3338
  if (!eventMetricsMemo.hasOwnProperty(memoKey)) {
3777
3339
  eventMetricsMemo[memoKey] = Object.entries(Metrics).every(function (_a) {
3778
- var _b = __read(_a, 2),
3779
- key = _b[0],
3780
- _c = _b[1],
3781
- ComparisonOperator = _c.ComparisonOperator,
3782
- Value = _c.Value;
3783
-
3784
- var compare = getComparator(ComparisonOperator); // if there is some unknown comparison operator, treat as a comparison failure
3785
-
3340
+ var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2),
3341
+ key = _b[0],
3342
+ _c = _b[1],
3343
+ ComparisonOperator = _c.ComparisonOperator,
3344
+ Value = _c.Value;
3345
+ var compare = getComparator(ComparisonOperator);
3346
+ // if there is some unknown comparison operator, treat as a comparison failure
3786
3347
  return compare ? compare(Value, metrics[key]) : false;
3787
3348
  });
3788
3349
  }
3789
-
3790
3350
  return eventMetricsMemo[memoKey];
3791
3351
  };
3792
3352
  var getComparator = function getComparator(operator) {
@@ -3795,89 +3355,72 @@ var getComparator = function getComparator(operator) {
3795
3355
  return function (metricsVal, eventVal) {
3796
3356
  return metricsVal === eventVal;
3797
3357
  };
3798
-
3799
3358
  case 'GREATER_THAN':
3800
3359
  return function (metricsVal, eventVal) {
3801
3360
  return metricsVal < eventVal;
3802
3361
  };
3803
-
3804
3362
  case 'GREATER_THAN_OR_EQUAL':
3805
3363
  return function (metricsVal, eventVal) {
3806
3364
  return metricsVal <= eventVal;
3807
3365
  };
3808
-
3809
3366
  case 'LESS_THAN':
3810
3367
  return function (metricsVal, eventVal) {
3811
3368
  return metricsVal > eventVal;
3812
3369
  };
3813
-
3814
3370
  case 'LESS_THAN_OR_EQUAL':
3815
3371
  return function (metricsVal, eventVal) {
3816
3372
  return metricsVal >= eventVal;
3817
3373
  };
3818
-
3819
3374
  default:
3820
3375
  return null;
3821
3376
  }
3822
3377
  };
3823
3378
  var isBeforeEndDate = function isBeforeEndDate(_a) {
3824
3379
  var Schedule = _a.Schedule;
3825
-
3826
3380
  if (!(Schedule === null || Schedule === void 0 ? void 0 : Schedule.EndDate)) {
3827
3381
  return true;
3828
3382
  }
3829
-
3830
3383
  return new Date() < new Date(Schedule.EndDate);
3831
3384
  };
3832
3385
  var isQuietTime = function isQuietTime(message) {
3833
3386
  var Schedule = message.Schedule;
3834
-
3835
3387
  if (!(Schedule === null || Schedule === void 0 ? void 0 : Schedule.QuietTime)) {
3836
3388
  return false;
3837
3389
  }
3838
-
3839
3390
  var pattern = /^[0-2]\d:[0-5]\d$/; // basic sanity check, not a fully featured HH:MM validation
3840
-
3841
3391
  var _a = Schedule.QuietTime,
3842
- Start = _a.Start,
3843
- End = _a.End;
3844
-
3392
+ Start = _a.Start,
3393
+ End = _a.End;
3845
3394
  if (!Start || !End || Start === End || !pattern.test(Start) || !pattern.test(End)) {
3846
3395
  return false;
3847
3396
  }
3848
-
3849
3397
  var now = new Date();
3850
3398
  var start = new Date(now);
3851
3399
  var end = new Date(now);
3852
-
3853
- var _b = __read(Start.split(':'), 2),
3854
- startHours = _b[0],
3855
- startMinutes = _b[1];
3856
-
3857
- var _c = __read(End.split(':'), 2),
3858
- endHours = _c[0],
3859
- endMinutes = _c[1];
3860
-
3400
+ var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(Start.split(':'), 2),
3401
+ startHours = _b[0],
3402
+ startMinutes = _b[1];
3403
+ var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(End.split(':'), 2),
3404
+ endHours = _c[0],
3405
+ endMinutes = _c[1];
3861
3406
  start.setHours(Number.parseInt(startHours, 10), Number.parseInt(startMinutes, 10), 0, 0);
3862
- end.setHours(Number.parseInt(endHours, 10), Number.parseInt(endMinutes, 10), 0, 0); // if quiet time includes midnight, bump the end time to the next day
3863
-
3407
+ end.setHours(Number.parseInt(endHours, 10), Number.parseInt(endMinutes, 10), 0, 0);
3408
+ // if quiet time includes midnight, bump the end time to the next day
3864
3409
  if (start > end) {
3865
3410
  end.setDate(end.getDate() + 1);
3866
3411
  }
3867
-
3868
3412
  var isQuietTime = now >= start && now <= end;
3869
-
3870
3413
  if (isQuietTime) {
3871
3414
  logger.debug('message filtered due to quiet time', message);
3872
3415
  }
3873
-
3874
3416
  return isQuietTime;
3875
3417
  };
3876
3418
  var clearMemo = function clearMemo() {
3877
3419
  eventNameMemo = {};
3878
3420
  eventAttributesMemo = {};
3879
3421
  eventMetricsMemo = {};
3880
- }; // in the pinpoint console when a message is created with a Modal or Full Screen layout,
3422
+ };
3423
+ // in the pinpoint console when a message is created with a Modal or Full Screen layout,
3881
3424
  // it is assigned a layout value of MOBILE_FEED or OVERLAYS respectively in the message payload.
3882
3425
  // In the future, Pinpoint will be updating the layout values in the aforementioned scenario
3883
3426
  // to MODAL and FULL_SCREEN.
@@ -3886,35 +3429,29 @@ var clearMemo = function clearMemo() {
3886
3429
  // - 1. the usage of MOBILE_FEED and OVERLAYS as values for message layouts are not leaked
3887
3430
  // outside the Pinpoint provider
3888
3431
  // - 2. Amplify correctly handles the legacy layout values from Pinpoint after they are updated
3889
-
3890
3432
  var interpretLayout = function interpretLayout(layout) {
3891
- if (layout === _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__["Layout"].MOBILE_FEED) {
3433
+ if (layout === _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["Layout"].MOBILE_FEED) {
3892
3434
  return 'MODAL';
3893
3435
  }
3894
-
3895
- if (layout === _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__["Layout"].OVERLAYS) {
3436
+ if (layout === _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["Layout"].OVERLAYS) {
3896
3437
  return 'FULL_SCREEN';
3897
- } // cast as PinpointInAppMessage['InAppMessage']['Layout'] allows `string` as a value
3898
-
3899
-
3438
+ }
3439
+ // cast as PinpointInAppMessage['InAppMessage']['Layout'] allows `string` as a value
3900
3440
  return layout;
3901
3441
  };
3902
3442
  var extractContent = function extractContent(_a) {
3903
3443
  var message = _a.InAppMessage;
3904
-
3905
3444
  var _b, _c;
3906
-
3907
3445
  return (_c = (_b = message === null || message === void 0 ? void 0 : message.Content) === null || _b === void 0 ? void 0 : _b.map(function (content) {
3908
3446
  var BackgroundColor = content.BackgroundColor,
3909
- BodyConfig = content.BodyConfig,
3910
- HeaderConfig = content.HeaderConfig,
3911
- ImageUrl = content.ImageUrl,
3912
- PrimaryBtn = content.PrimaryBtn,
3913
- SecondaryBtn = content.SecondaryBtn;
3447
+ BodyConfig = content.BodyConfig,
3448
+ HeaderConfig = content.HeaderConfig,
3449
+ ImageUrl = content.ImageUrl,
3450
+ PrimaryBtn = content.PrimaryBtn,
3451
+ SecondaryBtn = content.SecondaryBtn;
3914
3452
  var defaultPrimaryButton = PrimaryBtn === null || PrimaryBtn === void 0 ? void 0 : PrimaryBtn.DefaultConfig;
3915
3453
  var defaultSecondaryButton = SecondaryBtn === null || SecondaryBtn === void 0 ? void 0 : SecondaryBtn.DefaultConfig;
3916
3454
  var extractedContent = {};
3917
-
3918
3455
  if (BackgroundColor) {
3919
3456
  extractedContent.container = {
3920
3457
  style: {
@@ -3922,7 +3459,6 @@ var extractContent = function extractContent(_a) {
3922
3459
  }
3923
3460
  };
3924
3461
  }
3925
-
3926
3462
  if (HeaderConfig) {
3927
3463
  extractedContent.header = {
3928
3464
  content: HeaderConfig.Header,
@@ -3932,7 +3468,6 @@ var extractContent = function extractContent(_a) {
3932
3468
  }
3933
3469
  };
3934
3470
  }
3935
-
3936
3471
  if (BodyConfig) {
3937
3472
  extractedContent.body = {
3938
3473
  content: BodyConfig.Body,
@@ -3942,13 +3477,11 @@ var extractContent = function extractContent(_a) {
3942
3477
  }
3943
3478
  };
3944
3479
  }
3945
-
3946
3480
  if (ImageUrl) {
3947
3481
  extractedContent.image = {
3948
3482
  src: ImageUrl
3949
3483
  };
3950
3484
  }
3951
-
3952
3485
  if (defaultPrimaryButton) {
3953
3486
  extractedContent.primaryButton = {
3954
3487
  title: defaultPrimaryButton.Text,
@@ -3961,7 +3494,6 @@ var extractContent = function extractContent(_a) {
3961
3494
  }
3962
3495
  };
3963
3496
  }
3964
-
3965
3497
  if (defaultSecondaryButton) {
3966
3498
  extractedContent.secondaryButton = {
3967
3499
  title: defaultSecondaryButton.Text,
@@ -3974,15 +3506,14 @@ var extractContent = function extractContent(_a) {
3974
3506
  }
3975
3507
  };
3976
3508
  }
3977
-
3978
3509
  return extractedContent;
3979
3510
  })) !== null && _c !== void 0 ? _c : [];
3980
3511
  };
3981
3512
  var extractMetadata = function extractMetadata(_a) {
3982
3513
  var InAppMessage = _a.InAppMessage,
3983
- Priority = _a.Priority,
3984
- Schedule = _a.Schedule,
3985
- TreatmentId = _a.TreatmentId;
3514
+ Priority = _a.Priority,
3515
+ Schedule = _a.Schedule,
3516
+ TreatmentId = _a.TreatmentId;
3986
3517
  return {
3987
3518
  customData: InAppMessage === null || InAppMessage === void 0 ? void 0 : InAppMessage.CustomConfig,
3988
3519
  endDate: Schedule === null || Schedule === void 0 ? void 0 : Schedule.EndDate,
@@ -4047,12 +3578,11 @@ __webpack_require__.r(__webpack_exports__);
4047
3578
  * and limitations under the License.
4048
3579
  */
4049
3580
 
4050
- // Per https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
4051
3581
 
3582
+ // Per https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
4052
3583
  var hidden;
4053
3584
  var visibilityChange;
4054
3585
  var isBrowser = Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["browserOrNode"])().isBrowser;
4055
-
4056
3586
  if (isBrowser && document) {
4057
3587
  if (typeof document.hidden !== 'undefined') {
4058
3588
  hidden = 'hidden';
@@ -4065,66 +3595,48 @@ if (isBrowser && document) {
4065
3595
  visibilityChange = 'webkitvisibilitychange';
4066
3596
  }
4067
3597
  }
4068
-
4069
3598
  var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('InAppMessagingSessionTracker');
4070
-
4071
- var SessionTracker =
4072
- /** @class */
4073
- function () {
3599
+ var SessionTracker = /** @class */function () {
4074
3600
  function SessionTracker(sessionStateChangeHandler) {
4075
3601
  var _this = this;
4076
-
4077
3602
  if (sessionStateChangeHandler === void 0) {
4078
3603
  sessionStateChangeHandler = lodash_noop__WEBPACK_IMPORTED_MODULE_1___default.a;
4079
3604
  }
4080
-
4081
3605
  this.start = function () {
4082
3606
  if (isBrowser) {
4083
3607
  document === null || document === void 0 ? void 0 : document.addEventListener(visibilityChange, _this.visibilityChangeHandler);
4084
3608
  }
4085
-
4086
3609
  return _this.getSessionState();
4087
3610
  };
4088
-
4089
3611
  this.end = function () {
4090
3612
  if (isBrowser) {
4091
3613
  document === null || document === void 0 ? void 0 : document.removeEventListener(visibilityChange, _this.visibilityChangeHandler);
4092
3614
  }
4093
-
4094
3615
  return _this.getSessionState();
4095
3616
  };
4096
-
4097
3617
  this.getSessionState = function () {
4098
3618
  if (isBrowser && document && !document[hidden]) {
4099
3619
  return 'started';
4100
- } // If, for any reason, document is undefined the session will never start
4101
-
4102
-
3620
+ }
3621
+ // If, for any reason, document is undefined the session will never start
4103
3622
  return 'ended';
4104
3623
  };
4105
-
4106
3624
  this.visibilityChangeHandler = function () {
4107
3625
  if (!isBrowser || !document) {
4108
3626
  return;
4109
3627
  }
4110
-
4111
3628
  if (document[hidden]) {
4112
3629
  logger.debug('App is now hidden');
4113
-
4114
3630
  _this.sessionStateChangeHandler('ended');
4115
3631
  } else {
4116
3632
  logger.debug('App is now visible');
4117
-
4118
3633
  _this.sessionStateChangeHandler('started');
4119
3634
  }
4120
3635
  };
4121
-
4122
3636
  this.sessionStateChangeHandler = sessionStateChangeHandler;
4123
3637
  }
4124
-
4125
3638
  return SessionTracker;
4126
3639
  }();
4127
-
4128
3640
  /* harmony default export */ __webpack_exports__["default"] = (SessionTracker);
4129
3641
 
4130
3642
  /***/ }),
@@ -4182,7 +3694,6 @@ __webpack_require__.r(__webpack_exports__);
4182
3694
  */
4183
3695
  var _a;
4184
3696
 
4185
-
4186
3697
  var onMessageActionListeners = (_a = {}, _a[_types__WEBPACK_IMPORTED_MODULE_0__["InAppMessageInteractionEvent"].MESSAGE_RECEIVED] = new Set(), _a[_types__WEBPACK_IMPORTED_MODULE_0__["InAppMessageInteractionEvent"].MESSAGE_DISPLAYED] = new Set(), _a[_types__WEBPACK_IMPORTED_MODULE_0__["InAppMessageInteractionEvent"].MESSAGE_DISMISSED] = new Set(), _a[_types__WEBPACK_IMPORTED_MODULE_0__["InAppMessageInteractionEvent"].MESSAGE_ACTION_TAKEN] = new Set(), _a);
4187
3698
  var notifyMessageInteractionEventListeners = function notifyMessageInteractionEventListeners(message, event) {
4188
3699
  onMessageActionListeners[event].forEach(function (listener) {
@@ -4249,7 +3760,6 @@ __webpack_require__.r(__webpack_exports__);
4249
3760
  __webpack_require__.r(__webpack_exports__);
4250
3761
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InAppMessageInteractionEvent", function() { return InAppMessageInteractionEvent; });
4251
3762
  var InAppMessageInteractionEvent;
4252
-
4253
3763
  (function (InAppMessageInteractionEvent) {
4254
3764
  InAppMessageInteractionEvent["MESSAGE_RECEIVED"] = "MESSAGE_RECEIVED_EVENT";
4255
3765
  InAppMessageInteractionEvent["MESSAGE_DISPLAYED"] = "MESSAGE_DISPLAYED_EVENT";
@@ -4268,9 +3778,10 @@ var InAppMessageInteractionEvent;
4268
3778
 
4269
3779
  "use strict";
4270
3780
  __webpack_require__.r(__webpack_exports__);
4271
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
4272
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
4273
- /* harmony import */ var _InAppMessaging__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InAppMessaging */ "./lib-esm/InAppMessaging/index.js");
3781
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
3782
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
3783
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
3784
+ /* harmony import */ var _InAppMessaging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./InAppMessaging */ "./lib-esm/InAppMessaging/index.js");
4274
3785
  /*
4275
3786
  * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4276
3787
  *
@@ -4283,60 +3794,35 @@ __webpack_require__.r(__webpack_exports__);
4283
3794
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
4284
3795
  * and limitations under the License.
4285
3796
  */
4286
- var __assign = undefined && undefined.__assign || function () {
4287
- __assign = Object.assign || function (t) {
4288
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4289
- s = arguments[i];
4290
3797
 
4291
- for (var p in s) {
4292
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
4293
- }
4294
- }
4295
3798
 
4296
- return t;
4297
- };
4298
3799
 
4299
- return __assign.apply(this, arguments);
4300
- };
4301
-
4302
-
4303
-
4304
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('Notifications');
4305
-
4306
- var NotificationsClass =
4307
- /** @class */
4308
- function () {
3800
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('Notifications');
3801
+ var NotificationsClass = /** @class */function () {
4309
3802
  function NotificationsClass() {
4310
3803
  var _this = this;
4311
-
4312
3804
  this.config = {};
4313
3805
  /**
4314
3806
  * Configure Notifications
4315
3807
  * @param {Object} config - Notifications configuration object
4316
3808
  */
4317
-
4318
3809
  this.configure = function (_a) {
4319
3810
  var config = (_a === void 0 ? {} : _a).Notifications;
4320
- _this.config = __assign(__assign({}, _this.config), config);
4321
- logger.debug('configure Notifications', config); // Configure sub-categories
4322
-
3811
+ _this.config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, _this.config), config);
3812
+ logger.debug('configure Notifications', config);
3813
+ // Configure sub-categories
4323
3814
  _this.inAppMessaging.configure(_this.config.InAppMessaging);
4324
-
4325
3815
  return _this.config;
4326
3816
  };
4327
-
4328
- this.inAppMessaging = new _InAppMessaging__WEBPACK_IMPORTED_MODULE_1__["default"]();
3817
+ this.inAppMessaging = new _InAppMessaging__WEBPACK_IMPORTED_MODULE_2__["default"]();
4329
3818
  }
4330
3819
  /**
4331
3820
  * Get the name of the module category
4332
3821
  * @returns {string} name of the module category
4333
3822
  */
4334
-
4335
-
4336
3823
  NotificationsClass.prototype.getModuleName = function () {
4337
3824
  return 'Notifications';
4338
3825
  };
4339
-
4340
3826
  Object.defineProperty(NotificationsClass.prototype, "InAppMessaging", {
4341
3827
  get: function get() {
4342
3828
  return this.inAppMessaging;
@@ -4346,10 +3832,9 @@ function () {
4346
3832
  });
4347
3833
  return NotificationsClass;
4348
3834
  }();
4349
-
4350
3835
  var Notifications = new NotificationsClass();
4351
3836
  /* harmony default export */ __webpack_exports__["default"] = (Notifications);
4352
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Amplify"].register(Notifications);
3837
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].register(Notifications);
4353
3838
 
4354
3839
  /***/ }),
4355
3840