@carbon/ibmdotcom-services 1.10.0-alpha.4826 → 1.10.0-rc.0

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.
@@ -59,6 +59,31 @@ var _localeNameDefault = 'United States — English';
59
59
  */
60
60
 
61
61
  var _endpoint = "".concat(_proxy).concat(_host, "/common/js/dynamicnav/www/countrylist/jsononly");
62
+ /**
63
+ * Tracking of the country list fetch
64
+ *
65
+ * @type {{}}
66
+ * @private
67
+ */
68
+
69
+
70
+ var _listFetch = {};
71
+ /**
72
+ * Number of times to retry the fetch before failing
73
+ *
74
+ * @type {number}
75
+ * @private
76
+ */
77
+
78
+ var _timeoutRetries = 50;
79
+ /**
80
+ * Tracks the number of attempts for the fetch
81
+ *
82
+ * @type {number}
83
+ * @private
84
+ */
85
+
86
+ var _attempt = 0;
62
87
  /**
63
88
  * Configuration for axios
64
89
  *
@@ -66,7 +91,6 @@ var _endpoint = "".concat(_proxy).concat(_host, "/common/js/dynamicnav/www/count
66
91
  * @private
67
92
  */
68
93
 
69
-
70
94
  var _axiosConfig = {
71
95
  headers: {
72
96
  'Content-Type': 'application/json; charset=utf-8'
@@ -131,8 +155,6 @@ function _getLocaleFromDDO() {
131
155
 
132
156
  function _getLocaleFromDDO2() {
133
157
  _getLocaleFromDDO2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
134
- var _ddoLocal$page, _ddoLocal$page$pageIn;
135
-
136
158
  var ddoLocal, pageInfoIBM;
137
159
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
138
160
  while (1) {
@@ -144,7 +166,7 @@ function _getLocaleFromDDO2() {
144
166
  case 2:
145
167
  ddoLocal = _context5.sent;
146
168
 
147
- if (!(ddoLocal === null || ddoLocal === void 0 ? void 0 : (_ddoLocal$page = ddoLocal.page) === null || _ddoLocal$page === void 0 ? void 0 : (_ddoLocal$page$pageIn = _ddoLocal$page.pageInfo) === null || _ddoLocal$page$pageIn === void 0 ? void 0 : _ddoLocal$page$pageIn.ibm)) {
169
+ if (!(ddoLocal && ddoLocal.page && ddoLocal.page.pageInfo)) {
148
170
  _context5.next = 10;
149
171
  break;
150
172
  }
@@ -153,17 +175,19 @@ function _getLocaleFromDDO2() {
153
175
 
154
176
  if (ddoLocal.page.pageInfo.language) {
155
177
  pageInfoIBM.lc = ddoLocal.page.pageInfo.language.substring(0, 2).toLowerCase();
156
- } // Set proper CC for us to use.
157
-
178
+ }
158
179
 
159
- if (pageInfoIBM.country) {
160
- pageInfoIBM.cc = pageInfoIBM.country.toLowerCase().trim(); // If there are multiple countries use just the first one for the CC value
180
+ if (pageInfoIBM) {
181
+ // Set proper CC for us to use.
182
+ if (pageInfoIBM.country) {
183
+ pageInfoIBM.cc = pageInfoIBM.country.toLowerCase().trim(); // If there are multiple countries use just the first one for the CC value
161
184
 
162
- if (pageInfoIBM.cc.indexOf(',') > -1) pageInfoIBM.cc = pageInfoIBM.cc.substring(0, pageInfoIBM.cc.indexOf(',')).trim(); // Gb will be uk elsewhere
185
+ if (pageInfoIBM.cc.indexOf(',') > -1) pageInfoIBM.cc = pageInfoIBM.cc.substring(0, pageInfoIBM.cc.indexOf(',')).trim(); // Gb will be uk elsewhere
163
186
 
164
- if (pageInfoIBM.cc === 'gb') pageInfoIBM.cc = 'uk'; // Map worldwide (ZZ) pages to US
187
+ if (pageInfoIBM.cc === 'gb') pageInfoIBM.cc = 'uk'; // Map worldwide (ZZ) pages to US
165
188
 
166
- if (pageInfoIBM.cc === 'zz') pageInfoIBM.cc = 'us';
189
+ if (pageInfoIBM.cc === 'zz') pageInfoIBM.cc = 'us';
190
+ }
167
191
  }
168
192
 
169
193
  if (!(!pageInfoIBM.lc || !pageInfoIBM.cc)) {
@@ -487,17 +511,28 @@ var LocaleAPI = /*#__PURE__*/function () {
487
511
  var _getList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref) {
488
512
  var _this = this;
489
513
 
490
- var cc, lc;
514
+ var cc, lc, key, cachedRequest;
491
515
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
492
516
  while (1) {
493
517
  switch (_context4.prev = _context4.next) {
494
518
  case 0:
495
519
  cc = _ref.cc, lc = _ref.lc;
496
- return _context4.abrupt("return", new Promise(function (resolve, reject) {
520
+ key = "".concat(lc, "-").concat(cc);
521
+ cachedRequest = _requestsList[key];
522
+
523
+ if (!cachedRequest) {
524
+ _context4.next = 5;
525
+ break;
526
+ }
527
+
528
+ return _context4.abrupt("return", cachedRequest);
529
+
530
+ case 5:
531
+ return _context4.abrupt("return", _requestsList[key] = new Promise(function (resolve, reject) {
497
532
  _this.fetchList(cc, lc, resolve, reject);
498
533
  }));
499
534
 
500
- case 2:
535
+ case 6:
501
536
  case "end":
502
537
  return _context4.stop();
503
538
  }
@@ -529,21 +564,28 @@ var LocaleAPI = /*#__PURE__*/function () {
529
564
 
530
565
  if (sessionList) {
531
566
  resolve(sessionList);
532
- } else {
533
- var key = "".concat(lc, "-").concat(cc);
534
-
535
- if (!_requestsList[key]) {
536
- var url = "".concat(_endpoint, "/").concat(cc).concat(lc, "-utf8.json");
537
- _requestsList[key] = axios.get(url, _axiosConfig).then(function (response) {
538
- var data = response.data;
539
- sessionStorage.setItem("".concat(_sessionListKey, "-").concat(cc, "-").concat(lc), JSON.stringify(data));
540
- return data;
541
- });
567
+ } else if (_listFetch["".concat(cc, "-").concat(lc)]) {
568
+ _attempt++;
569
+
570
+ if (_attempt < _timeoutRetries) {
571
+ setTimeout(function () {
572
+ _this2.fetchList(cc, lc, resolve, reject);
573
+ }, 100);
574
+ } else {
575
+ reject();
542
576
  }
543
-
544
- _requestsList[key].then(resolve, function (error) {
577
+ } else {
578
+ var url = "".concat(_endpoint, "/").concat(cc).concat(lc, "-utf8.json");
579
+ _attempt = 0;
580
+ _listFetch["".concat(cc, "-").concat(lc)] = true;
581
+ axios.get(url, _axiosConfig).then(function (response) {
582
+ sessionStorage.setItem("".concat(_sessionListKey, "-").concat(cc, "-").concat(lc), JSON.stringify(response.data));
583
+ _listFetch["".concat(cc, "-").concat(lc)] = false;
584
+ resolve(response.data);
585
+ }).catch(function () {
545
586
  if (cc === _localeDefault.cc && lc === _localeDefault.lc) {
546
- reject(error);
587
+ _listFetch["".concat(cc, "-").concat(lc)] = false;
588
+ reject();
547
589
  } else {
548
590
  _this2.fetchList(_localeDefault.cc, _localeDefault.lc, resolve, reject);
549
591
  }
@@ -46,6 +46,30 @@ var _endpoint = "".concat(_host, "/common/v18/js/data/jsononly");
46
46
 
47
47
 
48
48
  var _sessionTranslationKey = 'dds-translation';
49
+ /**
50
+ * Tracking of the translation fetch
51
+ *
52
+ * @type {{}}
53
+ * @private
54
+ */
55
+
56
+ var _translationFetch = {};
57
+ /**
58
+ * Number of times to retry the fetch before failing
59
+ *
60
+ * @type {number}
61
+ * @private
62
+ */
63
+
64
+ var _timeoutRetries = 50;
65
+ /**
66
+ * Tracks the number of attempts for the fetch
67
+ *
68
+ * @type {number}
69
+ * @private
70
+ */
71
+
72
+ var _attempt = 0;
49
73
  /**
50
74
  * The cache for in-flight or resolved requests for the i18n data, keyed by the initiating locale.
51
75
  *
@@ -105,7 +129,7 @@ var TranslationAPI = /*#__PURE__*/function () {
105
129
  var _getTranslation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(codes) {
106
130
  var _this = this;
107
131
 
108
- var lang, country, locale;
132
+ var lang, country, locale, key, cachedRequest;
109
133
  return _regeneratorRuntime.wrap(function _callee$(_context) {
110
134
  while (1) {
111
135
  switch (_context.prev = _context.next) {
@@ -133,11 +157,22 @@ var TranslationAPI = /*#__PURE__*/function () {
133
157
  country = locale.cc;
134
158
 
135
159
  case 12:
136
- return _context.abrupt("return", new Promise(function (resolve, reject) {
160
+ key = "".concat(lang, "-").concat(country);
161
+ cachedRequest = _requestsTranslation[key];
162
+
163
+ if (!cachedRequest) {
164
+ _context.next = 16;
165
+ break;
166
+ }
167
+
168
+ return _context.abrupt("return", cachedRequest);
169
+
170
+ case 16:
171
+ return _context.abrupt("return", _requestsTranslation[key] = new Promise(function (resolve, reject) {
137
172
  _this.fetchTranslation(lang, country, resolve, reject);
138
173
  }));
139
174
 
140
- case 13:
175
+ case 17:
141
176
  case "end":
142
177
  return _context.stop();
143
178
  }
@@ -169,32 +204,42 @@ var TranslationAPI = /*#__PURE__*/function () {
169
204
 
170
205
  if (sessionTranslation) {
171
206
  resolve(sessionTranslation);
207
+ } else if (_translationFetch["".concat(country, "-").concat(lang)]) {
208
+ _attempt++;
209
+
210
+ if (_attempt < _timeoutRetries) {
211
+ setTimeout(function () {
212
+ _this2.fetchTranslation(lang, country, resolve, reject);
213
+ }, 100);
214
+ } else {
215
+ reject();
216
+ }
172
217
  } else {
173
- var key = "".concat(lang, "-").concat(country);
174
-
175
- if (!_requestsTranslation[key]) {
176
- var proxy = '';
177
-
178
- if (root.location) {
179
- var currenthost = "".concat(root.location.protocol, "//").concat(root.location.host);
180
- proxy = currenthost !== _host ? _proxy : '';
181
- }
218
+ var proxy = '';
182
219
 
183
- var url = "".concat(proxy).concat(_endpoint, "/").concat(country).concat(lang, ".json");
184
- _requestsTranslation[key] = axios.get(url, {
185
- headers: {
186
- 'Content-Type': 'text/plain',
187
- origin: _host
188
- }
189
- }).then(function (response) {
190
- return _this2.transformData(response.data);
191
- }).then(function (data) {
192
- sessionStorage.setItem("".concat(_sessionTranslationKey, "-").concat(country, "-").concat(lang), JSON.stringify(data));
193
- return data;
194
- });
220
+ if (root.location) {
221
+ var currenthost = "".concat(root.location.protocol, "//").concat(root.location.host);
222
+ proxy = currenthost !== _host ? _proxy : '';
195
223
  }
196
224
 
197
- _requestsTranslation[key].then(resolve, reject);
225
+ var url = "".concat(proxy).concat(_endpoint, "/").concat(country).concat(lang, ".json");
226
+ _attempt = 0;
227
+ _translationFetch["".concat(country, "-").concat(lang)] = true;
228
+ axios.get(url, {
229
+ headers: {
230
+ 'Content-Type': 'text/plain',
231
+ origin: _host
232
+ }
233
+ }).then(function (response) {
234
+ var data = _this2.transformData(response.data);
235
+
236
+ sessionStorage.setItem("".concat(_sessionTranslationKey, "-").concat(country, "-").concat(lang), JSON.stringify(data));
237
+ _translationFetch["".concat(country, "-").concat(lang)] = false;
238
+ resolve(data);
239
+ }).catch(function (error) {
240
+ _translationFetch["".concat(country, "-").concat(lang)] = false;
241
+ reject(error);
242
+ });
198
243
  }
199
244
  }
200
245
  /**
@@ -70,6 +70,31 @@ var _localeNameDefault = 'United States — English';
70
70
  */
71
71
 
72
72
  var _endpoint = "".concat(_proxy).concat(_host, "/common/js/dynamicnav/www/countrylist/jsononly");
73
+ /**
74
+ * Tracking of the country list fetch
75
+ *
76
+ * @type {{}}
77
+ * @private
78
+ */
79
+
80
+
81
+ var _listFetch = {};
82
+ /**
83
+ * Number of times to retry the fetch before failing
84
+ *
85
+ * @type {number}
86
+ * @private
87
+ */
88
+
89
+ var _timeoutRetries = 50;
90
+ /**
91
+ * Tracks the number of attempts for the fetch
92
+ *
93
+ * @type {number}
94
+ * @private
95
+ */
96
+
97
+ var _attempt = 0;
73
98
  /**
74
99
  * Configuration for axios
75
100
  *
@@ -77,7 +102,6 @@ var _endpoint = "".concat(_proxy).concat(_host, "/common/js/dynamicnav/www/count
77
102
  * @private
78
103
  */
79
104
 
80
-
81
105
  var _axiosConfig = {
82
106
  headers: {
83
107
  'Content-Type': 'application/json; charset=utf-8'
@@ -142,8 +166,6 @@ function _getLocaleFromDDO() {
142
166
 
143
167
  function _getLocaleFromDDO2() {
144
168
  _getLocaleFromDDO2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
145
- var _ddoLocal$page, _ddoLocal$page$pageIn;
146
-
147
169
  var ddoLocal, pageInfoIBM;
148
170
  return _regenerator.default.wrap(function _callee5$(_context5) {
149
171
  while (1) {
@@ -155,7 +177,7 @@ function _getLocaleFromDDO2() {
155
177
  case 2:
156
178
  ddoLocal = _context5.sent;
157
179
 
158
- if (!(ddoLocal === null || ddoLocal === void 0 ? void 0 : (_ddoLocal$page = ddoLocal.page) === null || _ddoLocal$page === void 0 ? void 0 : (_ddoLocal$page$pageIn = _ddoLocal$page.pageInfo) === null || _ddoLocal$page$pageIn === void 0 ? void 0 : _ddoLocal$page$pageIn.ibm)) {
180
+ if (!(ddoLocal && ddoLocal.page && ddoLocal.page.pageInfo)) {
159
181
  _context5.next = 10;
160
182
  break;
161
183
  }
@@ -164,17 +186,19 @@ function _getLocaleFromDDO2() {
164
186
 
165
187
  if (ddoLocal.page.pageInfo.language) {
166
188
  pageInfoIBM.lc = ddoLocal.page.pageInfo.language.substring(0, 2).toLowerCase();
167
- } // Set proper CC for us to use.
168
-
189
+ }
169
190
 
170
- if (pageInfoIBM.country) {
171
- pageInfoIBM.cc = pageInfoIBM.country.toLowerCase().trim(); // If there are multiple countries use just the first one for the CC value
191
+ if (pageInfoIBM) {
192
+ // Set proper CC for us to use.
193
+ if (pageInfoIBM.country) {
194
+ pageInfoIBM.cc = pageInfoIBM.country.toLowerCase().trim(); // If there are multiple countries use just the first one for the CC value
172
195
 
173
- if (pageInfoIBM.cc.indexOf(',') > -1) pageInfoIBM.cc = pageInfoIBM.cc.substring(0, pageInfoIBM.cc.indexOf(',')).trim(); // Gb will be uk elsewhere
196
+ if (pageInfoIBM.cc.indexOf(',') > -1) pageInfoIBM.cc = pageInfoIBM.cc.substring(0, pageInfoIBM.cc.indexOf(',')).trim(); // Gb will be uk elsewhere
174
197
 
175
- if (pageInfoIBM.cc === 'gb') pageInfoIBM.cc = 'uk'; // Map worldwide (ZZ) pages to US
198
+ if (pageInfoIBM.cc === 'gb') pageInfoIBM.cc = 'uk'; // Map worldwide (ZZ) pages to US
176
199
 
177
- if (pageInfoIBM.cc === 'zz') pageInfoIBM.cc = 'us';
200
+ if (pageInfoIBM.cc === 'zz') pageInfoIBM.cc = 'us';
201
+ }
178
202
  }
179
203
 
180
204
  if (!(!pageInfoIBM.lc || !pageInfoIBM.cc)) {
@@ -499,17 +523,28 @@ var LocaleAPI = /*#__PURE__*/function () {
499
523
  var _getList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref) {
500
524
  var _this = this;
501
525
 
502
- var cc, lc;
526
+ var cc, lc, key, cachedRequest;
503
527
  return _regenerator.default.wrap(function _callee4$(_context4) {
504
528
  while (1) {
505
529
  switch (_context4.prev = _context4.next) {
506
530
  case 0:
507
531
  cc = _ref.cc, lc = _ref.lc;
508
- return _context4.abrupt("return", new Promise(function (resolve, reject) {
532
+ key = "".concat(lc, "-").concat(cc);
533
+ cachedRequest = _requestsList[key];
534
+
535
+ if (!cachedRequest) {
536
+ _context4.next = 5;
537
+ break;
538
+ }
539
+
540
+ return _context4.abrupt("return", cachedRequest);
541
+
542
+ case 5:
543
+ return _context4.abrupt("return", _requestsList[key] = new Promise(function (resolve, reject) {
509
544
  _this.fetchList(cc, lc, resolve, reject);
510
545
  }));
511
546
 
512
- case 2:
547
+ case 6:
513
548
  case "end":
514
549
  return _context4.stop();
515
550
  }
@@ -541,21 +576,29 @@ var LocaleAPI = /*#__PURE__*/function () {
541
576
 
542
577
  if (sessionList) {
543
578
  resolve(sessionList);
544
- } else {
545
- var key = "".concat(lc, "-").concat(cc);
546
-
547
- if (!_requestsList[key]) {
548
- var url = "".concat(_endpoint, "/").concat(cc).concat(lc, "-utf8.json");
549
- _requestsList[key] = _axios.default.get(url, _axiosConfig).then(function (response) {
550
- var data = response.data;
551
- sessionStorage.setItem("".concat(_sessionListKey, "-").concat(cc, "-").concat(lc), JSON.stringify(data));
552
- return data;
553
- });
579
+ } else if (_listFetch["".concat(cc, "-").concat(lc)]) {
580
+ _attempt++;
581
+
582
+ if (_attempt < _timeoutRetries) {
583
+ setTimeout(function () {
584
+ _this2.fetchList(cc, lc, resolve, reject);
585
+ }, 100);
586
+ } else {
587
+ reject();
554
588
  }
555
-
556
- _requestsList[key].then(resolve, function (error) {
589
+ } else {
590
+ var url = "".concat(_endpoint, "/").concat(cc).concat(lc, "-utf8.json");
591
+ _attempt = 0;
592
+ _listFetch["".concat(cc, "-").concat(lc)] = true;
593
+
594
+ _axios.default.get(url, _axiosConfig).then(function (response) {
595
+ sessionStorage.setItem("".concat(_sessionListKey, "-").concat(cc, "-").concat(lc), JSON.stringify(response.data));
596
+ _listFetch["".concat(cc, "-").concat(lc)] = false;
597
+ resolve(response.data);
598
+ }).catch(function () {
557
599
  if (cc === _localeDefault.cc && lc === _localeDefault.lc) {
558
- reject(error);
600
+ _listFetch["".concat(cc, "-").concat(lc)] = false;
601
+ reject();
559
602
  } else {
560
603
  _this2.fetchList(_localeDefault.cc, _localeDefault.lc, resolve, reject);
561
604
  }
@@ -54,6 +54,30 @@ var _endpoint = "".concat(_host, "/common/v18/js/data/jsononly");
54
54
 
55
55
 
56
56
  var _sessionTranslationKey = 'dds-translation';
57
+ /**
58
+ * Tracking of the translation fetch
59
+ *
60
+ * @type {{}}
61
+ * @private
62
+ */
63
+
64
+ var _translationFetch = {};
65
+ /**
66
+ * Number of times to retry the fetch before failing
67
+ *
68
+ * @type {number}
69
+ * @private
70
+ */
71
+
72
+ var _timeoutRetries = 50;
73
+ /**
74
+ * Tracks the number of attempts for the fetch
75
+ *
76
+ * @type {number}
77
+ * @private
78
+ */
79
+
80
+ var _attempt = 0;
57
81
  /**
58
82
  * The cache for in-flight or resolved requests for the i18n data, keyed by the initiating locale.
59
83
  *
@@ -113,7 +137,7 @@ var TranslationAPI = /*#__PURE__*/function () {
113
137
  var _getTranslation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(codes) {
114
138
  var _this = this;
115
139
 
116
- var lang, country, locale;
140
+ var lang, country, locale, key, cachedRequest;
117
141
  return _regenerator.default.wrap(function _callee$(_context) {
118
142
  while (1) {
119
143
  switch (_context.prev = _context.next) {
@@ -141,11 +165,22 @@ var TranslationAPI = /*#__PURE__*/function () {
141
165
  country = locale.cc;
142
166
 
143
167
  case 12:
144
- return _context.abrupt("return", new Promise(function (resolve, reject) {
168
+ key = "".concat(lang, "-").concat(country);
169
+ cachedRequest = _requestsTranslation[key];
170
+
171
+ if (!cachedRequest) {
172
+ _context.next = 16;
173
+ break;
174
+ }
175
+
176
+ return _context.abrupt("return", cachedRequest);
177
+
178
+ case 16:
179
+ return _context.abrupt("return", _requestsTranslation[key] = new Promise(function (resolve, reject) {
145
180
  _this.fetchTranslation(lang, country, resolve, reject);
146
181
  }));
147
182
 
148
- case 13:
183
+ case 17:
149
184
  case "end":
150
185
  return _context.stop();
151
186
  }
@@ -177,32 +212,43 @@ var TranslationAPI = /*#__PURE__*/function () {
177
212
 
178
213
  if (sessionTranslation) {
179
214
  resolve(sessionTranslation);
215
+ } else if (_translationFetch["".concat(country, "-").concat(lang)]) {
216
+ _attempt++;
217
+
218
+ if (_attempt < _timeoutRetries) {
219
+ setTimeout(function () {
220
+ _this2.fetchTranslation(lang, country, resolve, reject);
221
+ }, 100);
222
+ } else {
223
+ reject();
224
+ }
180
225
  } else {
181
- var key = "".concat(lang, "-").concat(country);
226
+ var proxy = '';
182
227
 
183
- if (!_requestsTranslation[key]) {
184
- var proxy = '';
185
-
186
- if (_windowOrGlobal.default.location) {
187
- var currenthost = "".concat(_windowOrGlobal.default.location.protocol, "//").concat(_windowOrGlobal.default.location.host);
188
- proxy = currenthost !== _host ? _proxy : '';
189
- }
190
-
191
- var url = "".concat(proxy).concat(_endpoint, "/").concat(country).concat(lang, ".json");
192
- _requestsTranslation[key] = _axios.default.get(url, {
193
- headers: {
194
- 'Content-Type': 'text/plain',
195
- origin: _host
196
- }
197
- }).then(function (response) {
198
- return _this2.transformData(response.data);
199
- }).then(function (data) {
200
- sessionStorage.setItem("".concat(_sessionTranslationKey, "-").concat(country, "-").concat(lang), JSON.stringify(data));
201
- return data;
202
- });
228
+ if (_windowOrGlobal.default.location) {
229
+ var currenthost = "".concat(_windowOrGlobal.default.location.protocol, "//").concat(_windowOrGlobal.default.location.host);
230
+ proxy = currenthost !== _host ? _proxy : '';
203
231
  }
204
232
 
205
- _requestsTranslation[key].then(resolve, reject);
233
+ var url = "".concat(proxy).concat(_endpoint, "/").concat(country).concat(lang, ".json");
234
+ _attempt = 0;
235
+ _translationFetch["".concat(country, "-").concat(lang)] = true;
236
+
237
+ _axios.default.get(url, {
238
+ headers: {
239
+ 'Content-Type': 'text/plain',
240
+ origin: _host
241
+ }
242
+ }).then(function (response) {
243
+ var data = _this2.transformData(response.data);
244
+
245
+ sessionStorage.setItem("".concat(_sessionTranslationKey, "-").concat(country, "-").concat(lang), JSON.stringify(data));
246
+ _translationFetch["".concat(country, "-").concat(lang)] = false;
247
+ resolve(data);
248
+ }).catch(function (error) {
249
+ _translationFetch["".concat(country, "-").concat(lang)] = false;
250
+ reject(error);
251
+ });
206
252
  }
207
253
  }
208
254
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibmdotcom-services",
3
3
  "description": "IBM.com Library Services",
4
- "version": "1.10.0-alpha.4826+cc21319",
4
+ "version": "1.10.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -34,7 +34,7 @@
34
34
  "jsdoc": "rimraf docs && jsdoc -c ./jsdoc.json ./README.md"
35
35
  },
36
36
  "dependencies": {
37
- "@carbon/ibmdotcom-utilities": "1.10.0-alpha.4826+cc21319",
37
+ "@carbon/ibmdotcom-utilities": "1.10.0-rc.0",
38
38
  "axios": "^0.19.0",
39
39
  "jsonp": "^0.2.1",
40
40
  "window-or-global": "^1.0.1"
@@ -85,5 +85,5 @@
85
85
  "release": {
86
86
  "branch": "master"
87
87
  },
88
- "gitHead": "cc21319f644b8d87dde2b7450adb71f08b37e943"
88
+ "gitHead": "ff19a13cb26757e941b7fcc7cb19692e77580522"
89
89
  }
@@ -3168,6 +3168,31 @@
3168
3168
  */
3169
3169
 
3170
3170
  var _endpoint$1 = "".concat(_proxy).concat(_host, "/common/js/dynamicnav/www/countrylist/jsononly");
3171
+ /**
3172
+ * Tracking of the country list fetch
3173
+ *
3174
+ * @type {{}}
3175
+ * @private
3176
+ */
3177
+
3178
+
3179
+ var _listFetch = {};
3180
+ /**
3181
+ * Number of times to retry the fetch before failing
3182
+ *
3183
+ * @type {number}
3184
+ * @private
3185
+ */
3186
+
3187
+ var _timeoutRetries$1 = 50;
3188
+ /**
3189
+ * Tracks the number of attempts for the fetch
3190
+ *
3191
+ * @type {number}
3192
+ * @private
3193
+ */
3194
+
3195
+ var _attempt = 0;
3171
3196
  /**
3172
3197
  * Configuration for axios
3173
3198
  *
@@ -3175,7 +3200,6 @@
3175
3200
  * @private
3176
3201
  */
3177
3202
 
3178
-
3179
3203
  var _axiosConfig = {
3180
3204
  headers: {
3181
3205
  'Content-Type': 'application/json; charset=utf-8'
@@ -3240,8 +3264,6 @@
3240
3264
 
3241
3265
  function _getLocaleFromDDO2() {
3242
3266
  _getLocaleFromDDO2 = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee5() {
3243
- var _ddoLocal$page, _ddoLocal$page$pageIn;
3244
-
3245
3267
  var ddoLocal, pageInfoIBM;
3246
3268
  return regenerator.wrap(function _callee5$(_context5) {
3247
3269
  while (1) {
@@ -3253,7 +3275,7 @@
3253
3275
  case 2:
3254
3276
  ddoLocal = _context5.sent;
3255
3277
 
3256
- if (!(ddoLocal === null || ddoLocal === void 0 ? void 0 : (_ddoLocal$page = ddoLocal.page) === null || _ddoLocal$page === void 0 ? void 0 : (_ddoLocal$page$pageIn = _ddoLocal$page.pageInfo) === null || _ddoLocal$page$pageIn === void 0 ? void 0 : _ddoLocal$page$pageIn.ibm)) {
3278
+ if (!(ddoLocal && ddoLocal.page && ddoLocal.page.pageInfo)) {
3257
3279
  _context5.next = 10;
3258
3280
  break;
3259
3281
  }
@@ -3262,17 +3284,19 @@
3262
3284
 
3263
3285
  if (ddoLocal.page.pageInfo.language) {
3264
3286
  pageInfoIBM.lc = ddoLocal.page.pageInfo.language.substring(0, 2).toLowerCase();
3265
- } // Set proper CC for us to use.
3266
-
3287
+ }
3267
3288
 
3268
- if (pageInfoIBM.country) {
3269
- pageInfoIBM.cc = pageInfoIBM.country.toLowerCase().trim(); // If there are multiple countries use just the first one for the CC value
3289
+ if (pageInfoIBM) {
3290
+ // Set proper CC for us to use.
3291
+ if (pageInfoIBM.country) {
3292
+ pageInfoIBM.cc = pageInfoIBM.country.toLowerCase().trim(); // If there are multiple countries use just the first one for the CC value
3270
3293
 
3271
- if (pageInfoIBM.cc.indexOf(',') > -1) pageInfoIBM.cc = pageInfoIBM.cc.substring(0, pageInfoIBM.cc.indexOf(',')).trim(); // Gb will be uk elsewhere
3294
+ if (pageInfoIBM.cc.indexOf(',') > -1) pageInfoIBM.cc = pageInfoIBM.cc.substring(0, pageInfoIBM.cc.indexOf(',')).trim(); // Gb will be uk elsewhere
3272
3295
 
3273
- if (pageInfoIBM.cc === 'gb') pageInfoIBM.cc = 'uk'; // Map worldwide (ZZ) pages to US
3296
+ if (pageInfoIBM.cc === 'gb') pageInfoIBM.cc = 'uk'; // Map worldwide (ZZ) pages to US
3274
3297
 
3275
- if (pageInfoIBM.cc === 'zz') pageInfoIBM.cc = 'us';
3298
+ if (pageInfoIBM.cc === 'zz') pageInfoIBM.cc = 'us';
3299
+ }
3276
3300
  }
3277
3301
 
3278
3302
  if (!(!pageInfoIBM.lc || !pageInfoIBM.cc)) {
@@ -3596,17 +3620,28 @@
3596
3620
  var _getList = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4(_ref) {
3597
3621
  var _this = this;
3598
3622
 
3599
- var cc, lc;
3623
+ var cc, lc, key, cachedRequest;
3600
3624
  return regenerator.wrap(function _callee4$(_context4) {
3601
3625
  while (1) {
3602
3626
  switch (_context4.prev = _context4.next) {
3603
3627
  case 0:
3604
3628
  cc = _ref.cc, lc = _ref.lc;
3605
- return _context4.abrupt("return", new Promise(function (resolve, reject) {
3629
+ key = "".concat(lc, "-").concat(cc);
3630
+ cachedRequest = _requestsList[key];
3631
+
3632
+ if (!cachedRequest) {
3633
+ _context4.next = 5;
3634
+ break;
3635
+ }
3636
+
3637
+ return _context4.abrupt("return", cachedRequest);
3638
+
3639
+ case 5:
3640
+ return _context4.abrupt("return", _requestsList[key] = new Promise(function (resolve, reject) {
3606
3641
  _this.fetchList(cc, lc, resolve, reject);
3607
3642
  }));
3608
3643
 
3609
- case 2:
3644
+ case 6:
3610
3645
  case "end":
3611
3646
  return _context4.stop();
3612
3647
  }
@@ -3638,21 +3673,28 @@
3638
3673
 
3639
3674
  if (sessionList) {
3640
3675
  resolve(sessionList);
3641
- } else {
3642
- var key = "".concat(lc, "-").concat(cc);
3643
-
3644
- if (!_requestsList[key]) {
3645
- var url = "".concat(_endpoint$1, "/").concat(cc).concat(lc, "-utf8.json");
3646
- _requestsList[key] = axios$1.get(url, _axiosConfig).then(function (response) {
3647
- var data = response.data;
3648
- sessionStorage.setItem("".concat(_sessionListKey, "-").concat(cc, "-").concat(lc), JSON.stringify(data));
3649
- return data;
3650
- });
3651
- }
3676
+ } else if (_listFetch["".concat(cc, "-").concat(lc)]) {
3677
+ _attempt++;
3652
3678
 
3653
- _requestsList[key].then(resolve, function (error) {
3679
+ if (_attempt < _timeoutRetries$1) {
3680
+ setTimeout(function () {
3681
+ _this2.fetchList(cc, lc, resolve, reject);
3682
+ }, 100);
3683
+ } else {
3684
+ reject();
3685
+ }
3686
+ } else {
3687
+ var url = "".concat(_endpoint$1, "/").concat(cc).concat(lc, "-utf8.json");
3688
+ _attempt = 0;
3689
+ _listFetch["".concat(cc, "-").concat(lc)] = true;
3690
+ axios$1.get(url, _axiosConfig).then(function (response) {
3691
+ sessionStorage.setItem("".concat(_sessionListKey, "-").concat(cc, "-").concat(lc), JSON.stringify(response.data));
3692
+ _listFetch["".concat(cc, "-").concat(lc)] = false;
3693
+ resolve(response.data);
3694
+ }).catch(function () {
3654
3695
  if (cc === _localeDefault.cc && lc === _localeDefault.lc) {
3655
- reject(error);
3696
+ _listFetch["".concat(cc, "-").concat(lc)] = false;
3697
+ reject();
3656
3698
  } else {
3657
3699
  _this2.fetchList(_localeDefault.cc, _localeDefault.lc, resolve, reject);
3658
3700
  }
@@ -4635,6 +4677,30 @@
4635
4677
 
4636
4678
 
4637
4679
  var _sessionTranslationKey = 'dds-translation';
4680
+ /**
4681
+ * Tracking of the translation fetch
4682
+ *
4683
+ * @type {{}}
4684
+ * @private
4685
+ */
4686
+
4687
+ var _translationFetch = {};
4688
+ /**
4689
+ * Number of times to retry the fetch before failing
4690
+ *
4691
+ * @type {number}
4692
+ * @private
4693
+ */
4694
+
4695
+ var _timeoutRetries$2 = 50;
4696
+ /**
4697
+ * Tracks the number of attempts for the fetch
4698
+ *
4699
+ * @type {number}
4700
+ * @private
4701
+ */
4702
+
4703
+ var _attempt$1 = 0;
4638
4704
  /**
4639
4705
  * The cache for in-flight or resolved requests for the i18n data, keyed by the initiating locale.
4640
4706
  *
@@ -4694,7 +4760,7 @@
4694
4760
  var _getTranslation = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(codes) {
4695
4761
  var _this = this;
4696
4762
 
4697
- var lang, country, locale;
4763
+ var lang, country, locale, key, cachedRequest;
4698
4764
  return regenerator.wrap(function _callee$(_context) {
4699
4765
  while (1) {
4700
4766
  switch (_context.prev = _context.next) {
@@ -4722,11 +4788,22 @@
4722
4788
  country = locale.cc;
4723
4789
 
4724
4790
  case 12:
4725
- return _context.abrupt("return", new Promise(function (resolve, reject) {
4791
+ key = "".concat(lang, "-").concat(country);
4792
+ cachedRequest = _requestsTranslation[key];
4793
+
4794
+ if (!cachedRequest) {
4795
+ _context.next = 16;
4796
+ break;
4797
+ }
4798
+
4799
+ return _context.abrupt("return", cachedRequest);
4800
+
4801
+ case 16:
4802
+ return _context.abrupt("return", _requestsTranslation[key] = new Promise(function (resolve, reject) {
4726
4803
  _this.fetchTranslation(lang, country, resolve, reject);
4727
4804
  }));
4728
4805
 
4729
- case 13:
4806
+ case 17:
4730
4807
  case "end":
4731
4808
  return _context.stop();
4732
4809
  }
@@ -4758,32 +4835,42 @@
4758
4835
 
4759
4836
  if (sessionTranslation) {
4760
4837
  resolve(sessionTranslation);
4761
- } else {
4762
- var key = "".concat(lang, "-").concat(country);
4838
+ } else if (_translationFetch["".concat(country, "-").concat(lang)]) {
4839
+ _attempt$1++;
4763
4840
 
4764
- if (!_requestsTranslation[key]) {
4765
- var proxy = '';
4766
-
4767
- if (lib.location) {
4768
- var currenthost = "".concat(lib.location.protocol, "//").concat(lib.location.host);
4769
- proxy = currenthost !== _host$4 ? _proxy$1 : '';
4770
- }
4841
+ if (_attempt$1 < _timeoutRetries$2) {
4842
+ setTimeout(function () {
4843
+ _this2.fetchTranslation(lang, country, resolve, reject);
4844
+ }, 100);
4845
+ } else {
4846
+ reject();
4847
+ }
4848
+ } else {
4849
+ var proxy = '';
4771
4850
 
4772
- var url = "".concat(proxy).concat(_endpoint$5, "/").concat(country).concat(lang, ".json");
4773
- _requestsTranslation[key] = axios$1.get(url, {
4774
- headers: {
4775
- 'Content-Type': 'text/plain',
4776
- origin: _host$4
4777
- }
4778
- }).then(function (response) {
4779
- return _this2.transformData(response.data);
4780
- }).then(function (data) {
4781
- sessionStorage.setItem("".concat(_sessionTranslationKey, "-").concat(country, "-").concat(lang), JSON.stringify(data));
4782
- return data;
4783
- });
4851
+ if (lib.location) {
4852
+ var currenthost = "".concat(lib.location.protocol, "//").concat(lib.location.host);
4853
+ proxy = currenthost !== _host$4 ? _proxy$1 : '';
4784
4854
  }
4785
4855
 
4786
- _requestsTranslation[key].then(resolve, reject);
4856
+ var url = "".concat(proxy).concat(_endpoint$5, "/").concat(country).concat(lang, ".json");
4857
+ _attempt$1 = 0;
4858
+ _translationFetch["".concat(country, "-").concat(lang)] = true;
4859
+ axios$1.get(url, {
4860
+ headers: {
4861
+ 'Content-Type': 'text/plain',
4862
+ origin: _host$4
4863
+ }
4864
+ }).then(function (response) {
4865
+ var data = _this2.transformData(response.data);
4866
+
4867
+ sessionStorage.setItem("".concat(_sessionTranslationKey, "-").concat(country, "-").concat(lang), JSON.stringify(data));
4868
+ _translationFetch["".concat(country, "-").concat(lang)] = false;
4869
+ resolve(data);
4870
+ }).catch(function (error) {
4871
+ _translationFetch["".concat(country, "-").concat(lang)] = false;
4872
+ reject(error);
4873
+ });
4787
4874
  }
4788
4875
  }
4789
4876
  /**
@@ -4843,7 +4930,7 @@
4843
4930
  */
4844
4931
 
4845
4932
 
4846
- var _timeoutRetries$1 = 50;
4933
+ var _timeoutRetries$3 = 50;
4847
4934
  /**
4848
4935
  * Tracks the number of attempts for the script ready loop
4849
4936
  *
@@ -4851,7 +4938,7 @@
4851
4938
  * @private
4852
4939
  */
4853
4940
 
4854
- var _attempt = 0;
4941
+ var _attempt$2 = 0;
4855
4942
  /**
4856
4943
  * Tracks the script status
4857
4944
  *
@@ -4877,9 +4964,9 @@
4877
4964
  _scriptLoading = false;
4878
4965
  resolve();
4879
4966
  } else if (_scriptLoading) {
4880
- _attempt++;
4967
+ _attempt$2++;
4881
4968
 
4882
- if (_attempt < _timeoutRetries$1) {
4969
+ if (_attempt$2 < _timeoutRetries$3) {
4883
4970
  setTimeout(function () {
4884
4971
  _scriptReady(resolve, reject);
4885
4972
  }, 100);
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).IBMDotcomServices={})}(this,function(e){"use strict";var t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e,t){return e(t={exports:{}},t.exports),t.exports}var i=a(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?function(e){return i(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":i(e)})(e)}function n(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=n=function(e){return t(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(r)}e.exports=n}),c="object"===("undefined"==typeof self?"undefined":i(self))&&self.self===self&&self||"object"===i(o)&&o.global===o&&o||o,s=process&&"true"===process.env.SCROLL_TRACKING||!1,u=process?"production":"development",f=function(){function e(){t(this,e)}return r(e,null,[{key:"registerEvent",value:function(e){c.ibmStats&&c.ibmStats.event(e)}},{key:"initAll",value:function(){this.initScrollTracker(),this.initDynamicTabs(),this.initModals()}},{key:"initScrollTracker",value:function(){if(s){var e=0,t=0,n=!1,r=this.registerEvent;c.addEventListener("scroll",function(){n=!0}),setInterval(function(){n&&(n=!1,(t=Math.floor(c.pageYOffset/400))>e&&r({type:"element",primaryCategory:"SCROLL DISTANCE",eventName:400*(e=t),executionPath:c.innerWidth,execPathReturnCode:c.innerHeight}))},50)}}},{key:"initDynamicTabs",value:function(){var e=this.triggerTabSelected.bind(this);c.document.addEventListener("tab-selected",function(t){e(t.target.id,t.detail.item.innerText)})}},{key:"triggerTabSelected",value:function(e,t){try{this.registerEvent({type:"element",primaryCategory:"WIDGET",eventName:"CLICK",eventCategoryGroup:"TABS DYNAMIC",executionPath:e,targetTitle:t})}catch(e){"production"!==u&&console.error("Error triggering tab event:",e)}}},{key:"initModals",value:function(){var e=this.triggerModalHide.bind(this);c.document.addEventListener("modal-hidden",function(t){e(t.target.id,t.detail.launchingElement.innerText)});var t=this.triggerModalShow.bind(this);c.document.addEventListener("modal-shown",function(e){t(e.target.id,e.detail.launchingElement.innerText)})}},{key:"triggerModalHide",value:function(e,t){try{this.registerEvent({type:"element",primaryCategory:"WIDGET",eventName:"HIDE",eventCategoryGroup:"SHOWHIDE",executionPath:e,targetTitle:t})}catch(e){"production"!==u&&console.error("Error triggering modal hide event:",e)}}},{key:"triggerModalShow",value:function(e,t){try{this.registerEvent({type:"element",primaryCategory:"WIDGET",eventName:"SHOW",eventCategoryGroup:"SHOWHIDE",executionPath:e,targetTitle:t})}catch(e){"production"!==u&&console.error("Error triggering modal show event:",e)}}},{key:"videoPlayerStats",value:function(e){var t="",n=Math.floor(e.currentTime),r=Math.floor(e.duration),o=Math.floor(n/r*100);switch(e.playerState){case 0:t="launched";break;case 1:t="paused";break;case 2:t="played";break;case 3:t="ended";break;case 99:t="error"}if(0===n&&(n="start",o="0"),(n>=r||3===e.playerState)&&(n="end",o="100"),"end"!==n||1!==e.playerState){var a={type:"video",primaryCategory:"VIDEO",eventName:e.title,eventCategoryGroup:e.playerType,executionPath:e.videoId,execPathReturnCode:t,eventVidStatus:e.playerState,eventVidTimeStamp:n,eventVidLength:r,eventVidPlayed:o+"%"};try{this.registerEvent(a)}catch(e){"production"!==u&&console.error("Error firing video metrics:",e)}}}}]),e}(),l=a(function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),i=new L(r||[]);return a._invoke=function(e,t,n){var r=l;return function(o,a){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw a;return O()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=T(i,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=f(e,t,n);if("normal"===s.type){if(r=n.done?h:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(e,n,i),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function m(){}function y(){}function g(){}var w={};w[a]=function(){return this};var b=Object.getPrototypeOf,x=b&&b(b(R([])));x&&x!==n&&r.call(x,a)&&(w=x);var E=g.prototype=m.prototype=Object.create(w);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function k(e){var t;this._invoke=function(n,o){function a(){return new Promise(function(t,a){!function t(n,o,a,c){var s=f(e[n],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"===i(l)&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,a,c)},function(e){t("throw",e,a,c)}):Promise.resolve(l).then(function(e){u.value=e,a(u)},function(e){return t("throw",e,a,c)})}c(s.arg)}(n,o,t,a)})}return t=t?t.then(a,a):a()}}function T(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=f(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function R(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}return{next:O}}function O(){return{value:t,done:!0}}return y.prototype=E.constructor=g,g.constructor=y,g[s]=y.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},S(k.prototype),k.prototype[c]=function(){return this},e.AsyncIterator=k,e.async=function(t,n,r,o){var a=new k(u(t,n,r,o));return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},S(E),E[s]="Generator",E[a]=function(){return this},E.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=R,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}});function p(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var d=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){p(a,r,o,i,c,"next",e)}function c(e){p(a,r,o,i,c,"throw",e)}i(void 0)})}},h="dds.v1.10.0";var v,m=50;function y(){return v||(v=new Promise(function(e,t){var n=0;!function r(){c.digitalData&&c.digitalData.page&&c.digitalData.page.isDataLayerReady?e():++n<m?setTimeout(function(){r()},100):t(new Error("Timeout polling for digital data object."))}()})),v}var g=function(){function e(){t(this,e)}return r(e,null,[{key:"isReady",value:function(){return y()}},{key:"getAll",value:function(){var e=d(l.mark(function e(){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then(function(){return c.digitalData}).catch(function(){return null});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"setVersion",value:function(){var e=d(l.mark(function e(){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then(function(){c.digitalData.page.pageInfo.version=h});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"getLanguage",value:function(){var e=d(l.mark(function e(){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then(function(){return c.digitalData.page.pageInfo.language});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}]),e}(),w=!1;var b=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var x=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var E=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var S=function(e){return b(e)||x(e)||E()},k=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},T=Object.prototype.toString;function C(e){return"[object Array]"===T.call(e)}function A(e){return null!==e&&"object"===i(e)}function L(e){return"[object Function]"===T.call(e)}function R(e,t){if(null!=e)if("object"!==i(e)&&(e=[e]),C(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var O={isArray:C,isArrayBuffer:function(e){return"[object ArrayBuffer]"===T.call(e)},isBuffer:function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:A,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===T.call(e)},isFile:function(e){return"[object File]"===T.call(e)},isBlob:function(e){return"[object Blob]"===T.call(e)},isFunction:L,isStream:function(e){return A(e)&&L(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:R,merge:function e(){var t={};function n(n,r){"object"===i(t[r])&&"object"===i(n)?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)R(arguments[r],n);return t},deepMerge:function e(){var t={};function n(n,r){"object"===i(t[r])&&"object"===i(n)?t[r]=e(t[r],n):"object"===i(n)?t[r]=e({},n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)R(arguments[r],n);return t},extend:function(e,t,n){return R(t,function(t,r){e[r]=n&&"function"==typeof t?k(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}};function I(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var P=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(O.isURLSearchParams(t))r=t.toString();else{var o=[];O.forEach(t,function(e,t){null!=e&&(O.isArray(e)?t+="[]":e=[e],O.forEach(e,function(e){O.isDate(e)?e=e.toISOString():O.isObject(e)&&(e=JSON.stringify(e)),o.push(I(t)+"="+I(e))}))}),r=o.join("&")}if(r){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e};function N(){this.handlers=[]}N.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},N.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},N.prototype.forEach=function(e){O.forEach(this.handlers,function(t){null!==t&&e(t)})};var j=N,_=function(e,t,n){return O.forEach(n,function(n){e=n(e,t)}),e},D=function(e){return!(!e||!e.__CANCEL__)},U=function(e,t){O.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})},B=function(e,t,n,r,o){return function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}(new Error(e),t,n,r,o)},M=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],H=O.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=O.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},F=O.isStandardBrowserEnv()?{write:function(e,t,n,r,o,a){var i=[];i.push(e+"="+encodeURIComponent(t)),O.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),O.isString(r)&&i.push("path="+r),O.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},q=function(e){return new Promise(function(t,n){var r=e.data,o=e.headers;O.isFormData(r)&&delete o["Content-Type"];var a=new XMLHttpRequest;if(e.auth){var i=e.auth.username||"",c=e.auth.password||"";o.Authorization="Basic "+btoa(i+":"+c)}if(a.open(e.method.toUpperCase(),P(e.url,e.params,e.paramsSerializer),!0),a.timeout=e.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var r,o,i,c,s,u="getAllResponseHeaders"in a?(r=a.getAllResponseHeaders(),s={},r?(O.forEach(r.split("\n"),function(e){if(c=e.indexOf(":"),o=O.trim(e.substr(0,c)).toLowerCase(),i=O.trim(e.substr(c+1)),o){if(s[o]&&M.indexOf(o)>=0)return;s[o]="set-cookie"===o?(s[o]?s[o]:[]).concat([i]):s[o]?s[o]+", "+i:i}}),s):s):null,f={data:e.responseType&&"text"!==e.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:u,config:e,request:a};!function(e,t,n){var r=n.config.validateStatus;!r||r(n.status)?e(n):t(B("Request failed with status code "+n.status,n.config,null,n.request,n))}(t,n,f),a=null}},a.onabort=function(){a&&(n(B("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(B("Network Error",e,null,a)),a=null},a.ontimeout=function(){n(B("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",a)),a=null},O.isStandardBrowserEnv()){var s=F,u=(e.withCredentials||H(e.url))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;u&&(o[e.xsrfHeaderName]=u)}if("setRequestHeader"in a&&O.forEach(o,function(e,t){void 0===r&&"content-type"===t.toLowerCase()?delete o[t]:a.setRequestHeader(t,e)}),e.withCredentials&&(a.withCredentials=!0),e.responseType)try{a.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&a.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){a&&(a.abort(),n(e),a=null)}),void 0===r&&(r=null),a.send(r)})},G={"Content-Type":"application/x-www-form-urlencoded"};function J(e,t){!O.isUndefined(e)&&O.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var V,z={adapter:("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)?V=q:"undefined"!=typeof XMLHttpRequest&&(V=q),V),transformRequest:[function(e,t){return U(t,"Accept"),U(t,"Content-Type"),O.isFormData(e)||O.isArrayBuffer(e)||O.isBuffer(e)||O.isStream(e)||O.isFile(e)||O.isBlob(e)?e:O.isArrayBufferView(e)?e.buffer:O.isURLSearchParams(e)?(J(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):O.isObject(e)?(J(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};z.headers={common:{Accept:"application/json, text/plain, */*"}},O.forEach(["delete","get","head"],function(e){z.headers[e]={}}),O.forEach(["post","put","patch"],function(e){z.headers[e]=O.merge(G)});var W=z;function Y(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var X=function(e){var t,n,r;return Y(e),e.baseURL&&(r=e.url,!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r))&&(e.url=(t=e.baseURL,(n=e.url)?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t)),e.headers=e.headers||{},e.data=_(e.data,e.headers,e.transformRequest),e.headers=O.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),O.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||W.adapter)(e).then(function(t){return Y(e),t.data=_(t.data,t.headers,e.transformResponse),t},function(t){return D(t)||(Y(e),t&&t.response&&(t.response.data=_(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})},K=function(e,t){t=t||{};var n={};return O.forEach(["url","method","params","data"],function(e){void 0!==t[e]&&(n[e]=t[e])}),O.forEach(["headers","auth","proxy"],function(r){O.isObject(t[r])?n[r]=O.deepMerge(e[r],t[r]):void 0!==t[r]?n[r]=t[r]:O.isObject(e[r])?n[r]=O.deepMerge(e[r]):void 0!==e[r]&&(n[r]=e[r])}),O.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])}),n};function $(e){this.defaults=e,this.interceptors={request:new j,response:new j}}$.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=K(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[X,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},$.prototype.getUri=function(e){return e=K(this.defaults,e),P(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},O.forEach(["delete","get","head","options"],function(e){$.prototype[e]=function(t,n){return this.request(O.merge(n||{},{method:e,url:t}))}}),O.forEach(["post","put","patch"],function(e){$.prototype[e]=function(t,n,r){return this.request(O.merge(r||{},{method:e,url:t,data:n}))}});var Z=$;function Q(e){this.message=e}Q.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Q.prototype.__CANCEL__=!0;var ee=Q;function te(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new ee(e),t(n.reason))})}te.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},te.source=function(){var e;return{token:new te(function(t){e=t}),cancel:e}};var ne=te;function re(e){var t=new Z(e),n=k(Z.prototype.request,t);return O.extend(n,Z.prototype,t),O.extend(n,t),n}var oe=re(W);oe.Axios=Z,oe.create=function(e){return re(K(oe.defaults,e))},oe.Cancel=ee,oe.CancelToken=ne,oe.isCancel=D,oe.all=function(e){return Promise.all(e)},oe.spread=function(e){return function(t){return e.apply(null,t)}};var ae=oe,ie=oe;ae.default=ie;var ce=ae;function se(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var ue=process&&process.env.GEO_API||"https://api.www.s81c.com/webmaster/dbip/";function fe(){return le.apply(this,arguments)}function le(){var e;return e=l.mark(function e(){var t,n;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ce.get(ue,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then(function(e){return e.data});case 2:return t=e.sent,n=t&&t.country,e.abrupt("return",n);case 5:case"end":return e.stop()}},e)}),(le=function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){se(a,r,o,i,c,"next",e)}function c(e){se(a,r,o,i,c,"throw",e)}i(void 0)})}).apply(this,arguments)}var pe=a(function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function a(t,n,a){if("undefined"!=typeof document){"number"==typeof(a=e({path:"/"},o.defaults,a)).expires&&(a.expires=new Date(1*new Date+864e5*a.expires)),a.expires=a.expires?a.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in a)a[s]&&(c+="; "+s,!0!==a[s]&&(c+="="+a[s].split(";")[0]));return document.cookie=t+"="+n+c}}function i(e,n){if("undefined"!=typeof document){for(var o={},a=document.cookie?document.cookie.split("; "):[],i=0;i<a.length;i++){var c=a[i].split("="),s=c.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var u=t(c[0]);if(s=(r.read||r)(s,u)||t(s),n)try{s=JSON.parse(s)}catch(e){}if(o[u]=s,e===u)break}catch(e){}}return e?o[e]:o}}return o.set=a,o.get=function(e){return i(e,!1)},o.getJSON=function(e){return i(e,!0)},o.remove=function(t,n){a(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}(function(){})},e.exports=n()});function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var he,ve=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"get",value:function(){var e,t,n=pe.get("ipcInfo");if(n)return decodeURIComponent(n).split(";").map(function(n){var r=n.split("=");"cc"===r[0]&&(e=r[1]),"lc"===r[0]&&(t=r[1])}),{cc:e,lc:t}}},{key:"set",value:function(e){var t=e.cc,n=e.lc,r="cc=".concat(t,";lc=").concat(n);pe.set("ipcInfo",encodeURIComponent(r),{expires:365},{secure:!0})}}],(n=null)&&de(t.prototype,n),r&&de(t,r),e}(),me=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://www.ibm.com",ye="www.ibm.com"===(null===(he=c.location)||void 0===he?void 0:he.host)?"":process&&(process.env.REACT_APP_CORS_PROXY||process.env.CORS_PROXY)||"",ge={lc:"en",cc:"us"},we="".concat(ye).concat(me,"/common/js/dynamicnav/www/countrylist/jsononly"),be={headers:{"Content-Type":"application/json; charset=utf-8"}},xe=function(){if(c.document.documentElement.lang){var e=c.document.documentElement.lang.toLowerCase();if(-1===e.indexOf("-"))return ge;var t=e.split("-");return{cc:t[1],lc:t[0]}}return ge},Ee={};function Se(){return ke.apply(this,arguments)}function ke(){return(ke=d(l.mark(function e(){var t,n,r,o;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g.getAll();case 2:if(!(null==(r=e.sent)?void 0:null===(t=r.page)||void 0===t?void 0:null===(n=t.pageInfo)||void 0===n?void 0:n.ibm)){e.next=10;break}if(o=r.page.pageInfo.ibm,r.page.pageInfo.language&&(o.lc=r.page.pageInfo.language.substring(0,2).toLowerCase()),o.country&&(o.cc=o.country.toLowerCase().trim(),o.cc.indexOf(",")>-1&&(o.cc=o.cc.substring(0,o.cc.indexOf(",")).trim()),"gb"===o.cc&&(o.cc="uk"),"zz"===o.cc&&(o.cc="us")),o.lc&&o.cc){e.next=9;break}return e.abrupt("return",!1);case 9:return e.abrupt("return",{cc:o.cc,lc:o.lc});case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Te=function(){function e(){t(this,e)}return r(e,null,[{key:"clearCache",value:function(){Object.keys(Ee).forEach(function(e){return delete Ee[e]});for(var e=0;e<sessionStorage.length;++e){var t=sessionStorage.key(e);0===t.indexOf("dds-countrylist")&&sessionStorage.removeItem(t)}}},{key:"getLocale",value:function(){var e=d(l.mark(function e(){var t,n,r,o,a,i,s;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=ve.get(),e.next=3,this.getLang();case 3:if(!(n=e.sent)){e.next=10;break}return e.next=7,this.getList(n);case 7:return e.abrupt("return",n);case 10:if(!(t&&t.cc&&t.lc)){e.next=16;break}return e.next=13,this.getList(t);case 13:return e.abrupt("return",t);case 16:return e.next=18,fe();case 18:if(r=e.sent,o=c.navigator.language,a=o.split("-")[0],!r||!a){e.next=28;break}return e.next=24,this.getList({cc:r,lc:a});case 24:return i=e.sent,s=this.verifyLocale(r,a,i),ve.set(s),e.abrupt("return",s);case 28:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"getLang",value:function(){var e=d(l.mark(function e(){var t;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Se();case 2:if(!(t=e.sent)){e.next=7;break}return e.abrupt("return",t);case 7:return e.abrupt("return",xe());case 8:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}()},{key:"getLangDisplay",value:function(){var e=d(l.mark(function e(t){var n,r,o,a;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}e.t0=t,e.next=7;break;case 4:return e.next=6,this.getLang();case 6:e.t0=e.sent;case 7:return n=e.t0,e.next=10,this.getList(n);case 10:if(r=e.sent,o=[],r.regionList.forEach(function(e){o=o.concat(e.countryList)}),!(a=o.filter(function(e){if(-1!==e.locale.findIndex(function(e){return e[0]==="".concat(n.lc,"-").concat(n.cc)})){var t,r=e.locale.filter(function(e){return e.includes("".concat(n.lc,"-").concat(n.cc))});return(t=e.locale).splice.apply(t,[0,e.locale.length].concat(S(r))),e}})).length){e.next=18;break}return e.abrupt("return","".concat(a[0].name," — ").concat(a[0].locale[0][1]));case 18:return e.abrupt("return","United States — English");case 19:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getList",value:function(){var e=d(l.mark(function e(t){var n,r,o=this;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.cc,r=t.lc,e.abrupt("return",new Promise(function(e,t){o.fetchList(n,r,e,t)}));case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},{key:"fetchList",value:function(e,t,n,r){var o=this,a=JSON.parse(sessionStorage.getItem("".concat("dds-countrylist","-").concat(e,"-").concat(t)));if(a)n(a);else{var i="".concat(t,"-").concat(e);if(!Ee[i]){var c="".concat(we,"/").concat(e).concat(t,"-utf8.json");Ee[i]=ce.get(c,be).then(function(n){var r=n.data;return sessionStorage.setItem("".concat("dds-countrylist","-").concat(e,"-").concat(t),JSON.stringify(r)),r})}Ee[i].then(n,function(a){e===ge.cc&&t===ge.lc?r(a):o.fetchList(ge.cc,ge.lc,n,r)})}}},{key:"verifyLocale",value:function(e,t,n){var r,o;return!(n&&n.regionList.forEach(function(n){return n.countryList.forEach(function(n){var a=n.locale[0][0].split("-"),i=a[1],c=a[0];i===e&&c===t?o={cc:e,lc:t}:i!==e||r||(r=c)})}))&&r&&(o={cc:e,lc:r}),o}}]),e}(),Ce=process&&process.env.MARKETING_SEARCH_HOST||"https://www.ibm.com",Ae=process&&process.env.MARKETING_SEARCH_VERSION||"v3",Le="".concat(Ce,"/marketplace/api/search/").concat(Ae,"/combined_suggestions"),Re=function(){function e(){t(this,e)}return r(e,null,[{key:"getResults",value:function(){var e=d(l.mark(function e(t){var n;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return"en","us",n="".concat(Le,"?locale=").concat("en","-").concat("us","&q=").concat(encodeURIComponent(t)),e.next=5,ce.get(n,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then(function(e){return e.data});case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),Oe=1e3,Ie=60*Oe,Pe=60*Ie,Ne=24*Pe,je=365.25*Ne,_e=function(e,t){t=t||{};var n=i(e);if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*je;case"days":case"day":case"d":return n*Ne;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Pe;case"minutes":case"minute":case"mins":case"min":case"m":return n*Ie;case"seconds":case"second":case"secs":case"sec":case"s":return n*Oe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&!1===isNaN(e))return t.long?function(e){return De(e,Ne,"day")||De(e,Pe,"hour")||De(e,Ie,"minute")||De(e,Oe,"second")||e+" ms"}(e):function(e){if(e>=Ne)return Math.round(e/Ne)+"d";if(e>=Pe)return Math.round(e/Pe)+"h";if(e>=Ie)return Math.round(e/Ie)+"m";if(e>=Oe)return Math.round(e/Oe)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function De(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var Ue=a(function(e,t){var n;function r(e){function r(){if(r.enabled){var e=r,o=+new Date,a=o-(n||o);e.diff=a,e.prev=n,e.curr=o,n=o;for(var i=new Array(arguments.length),c=0;c<i.length;c++)i[c]=arguments[c];i[0]=t.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var s=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;s++;var o=t.formatters[r];if("function"==typeof o){var a=i[s];n=o.call(e,a),i.splice(s,1),s--}return n}),t.formatArgs.call(e,i),(r.log||t.log||console.log.bind(console)).apply(e,i)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(e=n[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=_e,t.names=[],t.skips=[],t.formatters={}}),Be=(Ue.coerce,Ue.disable,Ue.enable,Ue.enabled,Ue.humanize,Ue.names,Ue.skips,Ue.formatters,a(function(e,t){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=Ue).log=function(){return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(a=o))}),e.splice(a,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())})),Me=(Be.log,Be.formatArgs,Be.save,Be.load,Be.useColors,Be.storage,Be.colors,Be("jsonp")),He=function(e,t,n){"function"==typeof t&&(n=t,t={});t||(t={});var r,o,a=t.prefix||"__jp",i=t.name||a+Fe++,c=t.param||"callback",s=null!=t.timeout?t.timeout:6e4,u=encodeURIComponent,f=document.getElementsByTagName("script")[0]||document.head;s&&(o=setTimeout(function(){l(),n&&n(new Error("Timeout"))},s));function l(){r.parentNode&&r.parentNode.removeChild(r),window[i]=qe,o&&clearTimeout(o)}return window[i]=function(e){Me("jsonp got",e),l(),n&&n(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+c+"="+u(i)).replace("?&","?"),Me('jsonp req "%s"',e),(r=document.createElement("script")).src=e,f.parentNode.insertBefore(r,f),function(){window[i]&&l()}},Fe=0;function qe(){}var Ge,Je=process&&process.env.PROFILE_HOST||"https://idaas.iam.ibm.com",Ve=process&&process.env.PROFILE_VERSION||"v1",ze="".concat(Je,"/").concat(Ve,"/mgmt/idaas/user/status/"),We=function(){function e(){t(this,e)}return r(e,null,[{key:"getUserStatus",value:function(){var e=ze;return new Promise(function(t,n){return He(e,null,function(e,r){return e?n(e):t(r)})})}},{key:"monitorUserStatus",value:function(e){return He(ze,null,e)}}]),e}(),Ye=process&&process.env.SEARCH_TYPEAHEAD_HOST||"https://www-api.ibm.com",Xe=process&&process.env.SEARCH_TYPEAHEAD_VERSION||"v1",Ke="".concat(Ye,"/search/typeahead/").concat(Xe),$e=function(){function e(){t(this,e)}return r(e,null,[{key:"getResults",value:function(){var e=d(l.mark(function e(t){var n,r,o;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te.getLang();case 2:return n=e.sent,r=["lang=".concat(n.lc),"cc=".concat(n.cc),"query=".concat(encodeURIComponent(t))].join("&"),o="".concat(Ke,"?").concat(r),e.next=7,ce.get(o,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then(function(e){return e.data.response});case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),Ze=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://www.ibm.com",Qe="www.ibm.com"===(null===(Ge=c.location)||void 0===Ge?void 0:Ge.host)?"":process&&(process.env.REACT_APP_CORS_PROXY||process.env.CORS_PROXY)||"",et="".concat(Ze,"/common/v18/js/data/jsononly"),tt={},nt=function(){function e(){t(this,e)}return r(e,null,[{key:"clearCache",value:function(){Object.keys(tt).forEach(function(e){return delete tt[e]});for(var e=0;e<sessionStorage.length;++e){var t=sessionStorage.key(e);0===t.indexOf("dds-translation")&&sessionStorage.removeItem(t)}}},{key:"getTranslation",value:function(){var e=d(l.mark(function e(t){var n,r,o,a=this;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n="en",r="us",!(t&&t.lc&&t.cc)){e.next=7;break}n=t.lc,r=t.cc,e.next=12;break;case 7:return e.next=9,Te.getLocale();case 9:o=e.sent,n=o.lc,r=o.cc;case 12:return e.abrupt("return",new Promise(function(e,t){a.fetchTranslation(n,r,e,t)}));case 13:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},{key:"fetchTranslation",value:function(e,t,n,r){var o=this,a=JSON.parse(sessionStorage.getItem("".concat("dds-translation","-").concat(t,"-").concat(e)));if(a)n(a);else{var i="".concat(e,"-").concat(t);if(!tt[i]){var s="";if(c.location)s="".concat(c.location.protocol,"//").concat(c.location.host)!==Ze?Qe:"";var u="".concat(s).concat(et,"/").concat(t).concat(e,".json");tt[i]=ce.get(u,{headers:{"Content-Type":"text/plain",origin:Ze}}).then(function(e){return o.transformData(e.data)}).then(function(n){return sessionStorage.setItem("".concat("dds-translation","-").concat(t,"-").concat(e),JSON.stringify(n)),n})}tt[i].then(n,r)}}},{key:"transformData",value:function(e){return e.footerMenu.push(e.socialFollow),e}}]),e}(),rt=process.env.KALTURA_PARTNER_ID||1773841,ot=process.env.KALTURA_UICONF_ID||27941801,at="https://cdnapisec.kaltura.com/p/".concat(rt,"/sp/").concat(rt,"00/embedIframeJs/uiconf_id/").concat(ot,"/partner_id/").concat(rt),it="https://cdnsecakmi.kaltura.com/p/".concat(rt,"/thumbnail/entry_id/"),ct=50,st=0,ut=!1;function ft(e,t){c.kWidget?(ut=!1,e()):ut?++st<ct?setTimeout(function(){ft(e,t)},100):t():(!function(){ut=!0;var e=document.createElement("script");e.src=at,e.async=!0,document.body.appendChild(e)}(),ft(e,t))}var lt={},pt=function(){function e(){t(this,e)}return r(e,null,[{key:"checkScript",value:function(){return new Promise(function(e,t){ft(e,t)})}},{key:"getThumbnailUrl",value:function(e){var t=e.videoId,n=e.height,r=e.width,o=it+t;return n&&(o+="/height/".concat(n)),r&&(o+="/width/".concat(r)),o}},{key:"embedVideo",value:function(){var e=d(l.mark(function e(t,n,r){var o;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.fireEvent,e.next=3,this.checkScript().then(function(){var e=new Promise(function(e){c.kWidget.embed({targetId:n,wid:"_"+rt,uiconf_id:ot,entry_id:t,flashvars:{autoPlay:r,titleLabel:{plugin:!0,align:"left",text:"{mediaProxy.entry.name}"}},readyCallback:function(n){var r=document.getElementById(n);r.addJsListener("playerPaused",function(){o({playerState:1,kdp:r,videoId:t})}),r.addJsListener("playerPlayed",function(){o({playerState:2,kdp:r,videoId:t})}),r.addJsListener("playerPlayEnd",function(){o({playerState:3,kdp:r,videoId:t})}),e(r)}})});return{kWidget:function(){return e}}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"fireEvent",value:function(e){var t=e.playerState,n=e.kdp,r=e.videoId,o=Math.round(n.evaluate("{video.player.currentTime}"));2===t&&0===o&&(t=0);var a={playerType:"kaltura",title:n.evaluate("{mediaProxy.entry.name}"),currentTime:o,duration:n.evaluate("{mediaProxy.entry.duration}"),playerState:t,videoId:r};f.videoPlayerStats(a)}},{key:"api",value:function(){var e=d(l.mark(function e(t){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.checkScript().then(function(){return lt&&lt[t]?lt[t]:new Promise(function(e){return new c.kWidget.api({wid:"_"+rt}).doRequest({service:"media",action:"get",entryId:t},function(t){lt[t.id]=t,e(t)})})});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getVideoDuration",value:function(e){var t=Math.floor(e/1e3%60),n=Math.floor(e/6e4%60),r=Math.floor(e/36e5%24);return r=r>0?r+":":"",t=t<10?"0"+t:t,e&&"("+r+n+":"+t+")"}}]),e}();e.AnalyticsAPI=f,e.DDOAPI=g,e.LocaleAPI=Te,e.MarketingSearchAPI=Re,e.ProfileAPI=We,e.SearchTypeaheadAPI=$e,e.TranslationAPI=nt,e.VideoPlayerAPI=pt,e.globalInit=function(){w||(w=!0,g.setVersion().catch(function(e){console.error("Error setting the version of the library in the DDO:",e)}),f.initAll())},Object.defineProperty(e,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).IBMDotcomServices={})}(this,function(e){"use strict";var t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e,t){return e(t={exports:{}},t.exports),t.exports}var i=a(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?function(e){return i(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":i(e)})(e)}function n(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=n=function(e){return t(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(r)}e.exports=n}),c="object"===("undefined"==typeof self?"undefined":i(self))&&self.self===self&&self||"object"===i(o)&&o.global===o&&o||o,s=process&&"true"===process.env.SCROLL_TRACKING||!1,u=process?"production":"development",f=function(){function e(){t(this,e)}return r(e,null,[{key:"registerEvent",value:function(e){c.ibmStats&&c.ibmStats.event(e)}},{key:"initAll",value:function(){this.initScrollTracker(),this.initDynamicTabs(),this.initModals()}},{key:"initScrollTracker",value:function(){if(s){var e=0,t=0,n=!1,r=this.registerEvent;c.addEventListener("scroll",function(){n=!0}),setInterval(function(){n&&(n=!1,(t=Math.floor(c.pageYOffset/400))>e&&r({type:"element",primaryCategory:"SCROLL DISTANCE",eventName:400*(e=t),executionPath:c.innerWidth,execPathReturnCode:c.innerHeight}))},50)}}},{key:"initDynamicTabs",value:function(){var e=this.triggerTabSelected.bind(this);c.document.addEventListener("tab-selected",function(t){e(t.target.id,t.detail.item.innerText)})}},{key:"triggerTabSelected",value:function(e,t){try{this.registerEvent({type:"element",primaryCategory:"WIDGET",eventName:"CLICK",eventCategoryGroup:"TABS DYNAMIC",executionPath:e,targetTitle:t})}catch(e){"production"!==u&&console.error("Error triggering tab event:",e)}}},{key:"initModals",value:function(){var e=this.triggerModalHide.bind(this);c.document.addEventListener("modal-hidden",function(t){e(t.target.id,t.detail.launchingElement.innerText)});var t=this.triggerModalShow.bind(this);c.document.addEventListener("modal-shown",function(e){t(e.target.id,e.detail.launchingElement.innerText)})}},{key:"triggerModalHide",value:function(e,t){try{this.registerEvent({type:"element",primaryCategory:"WIDGET",eventName:"HIDE",eventCategoryGroup:"SHOWHIDE",executionPath:e,targetTitle:t})}catch(e){"production"!==u&&console.error("Error triggering modal hide event:",e)}}},{key:"triggerModalShow",value:function(e,t){try{this.registerEvent({type:"element",primaryCategory:"WIDGET",eventName:"SHOW",eventCategoryGroup:"SHOWHIDE",executionPath:e,targetTitle:t})}catch(e){"production"!==u&&console.error("Error triggering modal show event:",e)}}},{key:"videoPlayerStats",value:function(e){var t="",n=Math.floor(e.currentTime),r=Math.floor(e.duration),o=Math.floor(n/r*100);switch(e.playerState){case 0:t="launched";break;case 1:t="paused";break;case 2:t="played";break;case 3:t="ended";break;case 99:t="error"}if(0===n&&(n="start",o="0"),(n>=r||3===e.playerState)&&(n="end",o="100"),"end"!==n||1!==e.playerState){var a={type:"video",primaryCategory:"VIDEO",eventName:e.title,eventCategoryGroup:e.playerType,executionPath:e.videoId,execPathReturnCode:t,eventVidStatus:e.playerState,eventVidTimeStamp:n,eventVidLength:r,eventVidPlayed:o+"%"};try{this.registerEvent(a)}catch(e){"production"!==u&&console.error("Error firing video metrics:",e)}}}}]),e}(),l=a(function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),i=new L(r||[]);return a._invoke=function(e,t,n){var r=l;return function(o,a){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw a;return O()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=T(i,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=f(e,t,n);if("normal"===s.type){if(r=n.done?h:p,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(e,n,i),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l="suspendedStart",p="suspendedYield",d="executing",h="completed",m={};function v(){}function y(){}function g(){}var w={};w[a]=function(){return this};var b=Object.getPrototypeOf,x=b&&b(b(R([])));x&&x!==n&&r.call(x,a)&&(w=x);var E=g.prototype=v.prototype=Object.create(w);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function k(e){var t;this._invoke=function(n,o){function a(){return new Promise(function(t,a){!function t(n,o,a,c){var s=f(e[n],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"===i(l)&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,a,c)},function(e){t("throw",e,a,c)}):Promise.resolve(l).then(function(e){u.value=e,a(u)},function(e){return t("throw",e,a,c)})}c(s.arg)}(n,o,t,a)})}return t=t?t.then(a,a):a()}}function T(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=f(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function R(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}return{next:O}}function O(){return{value:t,done:!0}}return y.prototype=E.constructor=g,g.constructor=y,g[s]=y.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},S(k.prototype),k.prototype[c]=function(){return this},e.AsyncIterator=k,e.async=function(t,n,r,o){var a=new k(u(t,n,r,o));return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},S(E),E[s]="Generator",E[a]=function(){return this},E.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=R,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}});function p(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var d=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){p(a,r,o,i,c,"next",e)}function c(e){p(a,r,o,i,c,"throw",e)}i(void 0)})}},h="dds.v1.10.0";var m,v=50;function y(){return m||(m=new Promise(function(e,t){var n=0;!function r(){c.digitalData&&c.digitalData.page&&c.digitalData.page.isDataLayerReady?e():++n<v?setTimeout(function(){r()},100):t(new Error("Timeout polling for digital data object."))}()})),m}var g=function(){function e(){t(this,e)}return r(e,null,[{key:"isReady",value:function(){return y()}},{key:"getAll",value:function(){var e=d(l.mark(function e(){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then(function(){return c.digitalData}).catch(function(){return null});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"setVersion",value:function(){var e=d(l.mark(function e(){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then(function(){c.digitalData.page.pageInfo.version=h});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"getLanguage",value:function(){var e=d(l.mark(function e(){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then(function(){return c.digitalData.page.pageInfo.language});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}]),e}(),w=!1;var b=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var x=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var E=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var S=function(e){return b(e)||x(e)||E()},k=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},T=Object.prototype.toString;function C(e){return"[object Array]"===T.call(e)}function A(e){return null!==e&&"object"===i(e)}function L(e){return"[object Function]"===T.call(e)}function R(e,t){if(null!=e)if("object"!==i(e)&&(e=[e]),C(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var O={isArray:C,isArrayBuffer:function(e){return"[object ArrayBuffer]"===T.call(e)},isBuffer:function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:A,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===T.call(e)},isFile:function(e){return"[object File]"===T.call(e)},isBlob:function(e){return"[object Blob]"===T.call(e)},isFunction:L,isStream:function(e){return A(e)&&L(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:R,merge:function e(){var t={};function n(n,r){"object"===i(t[r])&&"object"===i(n)?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)R(arguments[r],n);return t},deepMerge:function e(){var t={};function n(n,r){"object"===i(t[r])&&"object"===i(n)?t[r]=e(t[r],n):"object"===i(n)?t[r]=e({},n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)R(arguments[r],n);return t},extend:function(e,t,n){return R(t,function(t,r){e[r]=n&&"function"==typeof t?k(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}};function I(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var P=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(O.isURLSearchParams(t))r=t.toString();else{var o=[];O.forEach(t,function(e,t){null!=e&&(O.isArray(e)?t+="[]":e=[e],O.forEach(e,function(e){O.isDate(e)?e=e.toISOString():O.isObject(e)&&(e=JSON.stringify(e)),o.push(I(t)+"="+I(e))}))}),r=o.join("&")}if(r){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e};function N(){this.handlers=[]}N.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},N.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},N.prototype.forEach=function(e){O.forEach(this.handlers,function(t){null!==t&&e(t)})};var j=N,_=function(e,t,n){return O.forEach(n,function(n){e=n(e,t)}),e},D=function(e){return!(!e||!e.__CANCEL__)},U=function(e,t){O.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})},B=function(e,t,n,r,o){return function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}(new Error(e),t,n,r,o)},M=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],H=O.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=O.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},F=O.isStandardBrowserEnv()?{write:function(e,t,n,r,o,a){var i=[];i.push(e+"="+encodeURIComponent(t)),O.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),O.isString(r)&&i.push("path="+r),O.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},q=function(e){return new Promise(function(t,n){var r=e.data,o=e.headers;O.isFormData(r)&&delete o["Content-Type"];var a=new XMLHttpRequest;if(e.auth){var i=e.auth.username||"",c=e.auth.password||"";o.Authorization="Basic "+btoa(i+":"+c)}if(a.open(e.method.toUpperCase(),P(e.url,e.params,e.paramsSerializer),!0),a.timeout=e.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var r,o,i,c,s,u="getAllResponseHeaders"in a?(r=a.getAllResponseHeaders(),s={},r?(O.forEach(r.split("\n"),function(e){if(c=e.indexOf(":"),o=O.trim(e.substr(0,c)).toLowerCase(),i=O.trim(e.substr(c+1)),o){if(s[o]&&M.indexOf(o)>=0)return;s[o]="set-cookie"===o?(s[o]?s[o]:[]).concat([i]):s[o]?s[o]+", "+i:i}}),s):s):null,f={data:e.responseType&&"text"!==e.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:u,config:e,request:a};!function(e,t,n){var r=n.config.validateStatus;!r||r(n.status)?e(n):t(B("Request failed with status code "+n.status,n.config,null,n.request,n))}(t,n,f),a=null}},a.onabort=function(){a&&(n(B("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(B("Network Error",e,null,a)),a=null},a.ontimeout=function(){n(B("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",a)),a=null},O.isStandardBrowserEnv()){var s=F,u=(e.withCredentials||H(e.url))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;u&&(o[e.xsrfHeaderName]=u)}if("setRequestHeader"in a&&O.forEach(o,function(e,t){void 0===r&&"content-type"===t.toLowerCase()?delete o[t]:a.setRequestHeader(t,e)}),e.withCredentials&&(a.withCredentials=!0),e.responseType)try{a.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&a.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){a&&(a.abort(),n(e),a=null)}),void 0===r&&(r=null),a.send(r)})},G={"Content-Type":"application/x-www-form-urlencoded"};function J(e,t){!O.isUndefined(e)&&O.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var V,z={adapter:("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)?V=q:"undefined"!=typeof XMLHttpRequest&&(V=q),V),transformRequest:[function(e,t){return U(t,"Accept"),U(t,"Content-Type"),O.isFormData(e)||O.isArrayBuffer(e)||O.isBuffer(e)||O.isStream(e)||O.isFile(e)||O.isBlob(e)?e:O.isArrayBufferView(e)?e.buffer:O.isURLSearchParams(e)?(J(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):O.isObject(e)?(J(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};z.headers={common:{Accept:"application/json, text/plain, */*"}},O.forEach(["delete","get","head"],function(e){z.headers[e]={}}),O.forEach(["post","put","patch"],function(e){z.headers[e]=O.merge(G)});var W=z;function Y(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var X=function(e){var t,n,r;return Y(e),e.baseURL&&(r=e.url,!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r))&&(e.url=(t=e.baseURL,(n=e.url)?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t)),e.headers=e.headers||{},e.data=_(e.data,e.headers,e.transformRequest),e.headers=O.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),O.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||W.adapter)(e).then(function(t){return Y(e),t.data=_(t.data,t.headers,e.transformResponse),t},function(t){return D(t)||(Y(e),t&&t.response&&(t.response.data=_(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})},K=function(e,t){t=t||{};var n={};return O.forEach(["url","method","params","data"],function(e){void 0!==t[e]&&(n[e]=t[e])}),O.forEach(["headers","auth","proxy"],function(r){O.isObject(t[r])?n[r]=O.deepMerge(e[r],t[r]):void 0!==t[r]?n[r]=t[r]:O.isObject(e[r])?n[r]=O.deepMerge(e[r]):void 0!==e[r]&&(n[r]=e[r])}),O.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])}),n};function $(e){this.defaults=e,this.interceptors={request:new j,response:new j}}$.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=K(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[X,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},$.prototype.getUri=function(e){return e=K(this.defaults,e),P(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},O.forEach(["delete","get","head","options"],function(e){$.prototype[e]=function(t,n){return this.request(O.merge(n||{},{method:e,url:t}))}}),O.forEach(["post","put","patch"],function(e){$.prototype[e]=function(t,n,r){return this.request(O.merge(r||{},{method:e,url:t,data:n}))}});var Z=$;function Q(e){this.message=e}Q.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Q.prototype.__CANCEL__=!0;var ee=Q;function te(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new ee(e),t(n.reason))})}te.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},te.source=function(){var e;return{token:new te(function(t){e=t}),cancel:e}};var ne=te;function re(e){var t=new Z(e),n=k(Z.prototype.request,t);return O.extend(n,Z.prototype,t),O.extend(n,t),n}var oe=re(W);oe.Axios=Z,oe.create=function(e){return re(K(oe.defaults,e))},oe.Cancel=ee,oe.CancelToken=ne,oe.isCancel=D,oe.all=function(e){return Promise.all(e)},oe.spread=function(e){return function(t){return e.apply(null,t)}};var ae=oe,ie=oe;ae.default=ie;var ce=ae;function se(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var ue=process&&process.env.GEO_API||"https://api.www.s81c.com/webmaster/dbip/";function fe(){return le.apply(this,arguments)}function le(){var e;return e=l.mark(function e(){var t,n;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ce.get(ue,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then(function(e){return e.data});case 2:return t=e.sent,n=t&&t.country,e.abrupt("return",n);case 5:case"end":return e.stop()}},e)}),(le=function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){se(a,r,o,i,c,"next",e)}function c(e){se(a,r,o,i,c,"throw",e)}i(void 0)})}).apply(this,arguments)}var pe=a(function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function a(t,n,a){if("undefined"!=typeof document){"number"==typeof(a=e({path:"/"},o.defaults,a)).expires&&(a.expires=new Date(1*new Date+864e5*a.expires)),a.expires=a.expires?a.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in a)a[s]&&(c+="; "+s,!0!==a[s]&&(c+="="+a[s].split(";")[0]));return document.cookie=t+"="+n+c}}function i(e,n){if("undefined"!=typeof document){for(var o={},a=document.cookie?document.cookie.split("; "):[],i=0;i<a.length;i++){var c=a[i].split("="),s=c.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var u=t(c[0]);if(s=(r.read||r)(s,u)||t(s),n)try{s=JSON.parse(s)}catch(e){}if(o[u]=s,e===u)break}catch(e){}}return e?o[e]:o}}return o.set=a,o.get=function(e){return i(e,!1)},o.getJSON=function(e){return i(e,!0)},o.remove=function(t,n){a(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}(function(){})},e.exports=n()});function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var he,me=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"get",value:function(){var e,t,n=pe.get("ipcInfo");if(n)return decodeURIComponent(n).split(";").map(function(n){var r=n.split("=");"cc"===r[0]&&(e=r[1]),"lc"===r[0]&&(t=r[1])}),{cc:e,lc:t}}},{key:"set",value:function(e){var t=e.cc,n=e.lc,r="cc=".concat(t,";lc=").concat(n);pe.set("ipcInfo",encodeURIComponent(r),{expires:365},{secure:!0})}}],(n=null)&&de(t.prototype,n),r&&de(t,r),e}(),ve=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://www.ibm.com",ye="www.ibm.com"===(null===(he=c.location)||void 0===he?void 0:he.host)?"":process&&(process.env.REACT_APP_CORS_PROXY||process.env.CORS_PROXY)||"",ge={lc:"en",cc:"us"},we="".concat(ye).concat(ve,"/common/js/dynamicnav/www/countrylist/jsononly"),be={},xe=0,Ee={headers:{"Content-Type":"application/json; charset=utf-8"}},Se=function(){if(c.document.documentElement.lang){var e=c.document.documentElement.lang.toLowerCase();if(-1===e.indexOf("-"))return ge;var t=e.split("-");return{cc:t[1],lc:t[0]}}return ge},ke={};function Te(){return Ce.apply(this,arguments)}function Ce(){return(Ce=d(l.mark(function e(){var t,n;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g.getAll();case 2:if(!((t=e.sent)&&t.page&&t.page.pageInfo)){e.next=10;break}if(n=t.page.pageInfo.ibm,t.page.pageInfo.language&&(n.lc=t.page.pageInfo.language.substring(0,2).toLowerCase()),n&&n.country&&(n.cc=n.country.toLowerCase().trim(),n.cc.indexOf(",")>-1&&(n.cc=n.cc.substring(0,n.cc.indexOf(",")).trim()),"gb"===n.cc&&(n.cc="uk"),"zz"===n.cc&&(n.cc="us")),n.lc&&n.cc){e.next=9;break}return e.abrupt("return",!1);case 9:return e.abrupt("return",{cc:n.cc,lc:n.lc});case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ae=function(){function e(){t(this,e)}return r(e,null,[{key:"clearCache",value:function(){Object.keys(ke).forEach(function(e){return delete ke[e]});for(var e=0;e<sessionStorage.length;++e){var t=sessionStorage.key(e);0===t.indexOf("dds-countrylist")&&sessionStorage.removeItem(t)}}},{key:"getLocale",value:function(){var e=d(l.mark(function e(){var t,n,r,o,a,i,s;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=me.get(),e.next=3,this.getLang();case 3:if(!(n=e.sent)){e.next=10;break}return e.next=7,this.getList(n);case 7:return e.abrupt("return",n);case 10:if(!(t&&t.cc&&t.lc)){e.next=16;break}return e.next=13,this.getList(t);case 13:return e.abrupt("return",t);case 16:return e.next=18,fe();case 18:if(r=e.sent,o=c.navigator.language,a=o.split("-")[0],!r||!a){e.next=28;break}return e.next=24,this.getList({cc:r,lc:a});case 24:return i=e.sent,s=this.verifyLocale(r,a,i),me.set(s),e.abrupt("return",s);case 28:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"getLang",value:function(){var e=d(l.mark(function e(){var t;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te();case 2:if(!(t=e.sent)){e.next=7;break}return e.abrupt("return",t);case 7:return e.abrupt("return",Se());case 8:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}()},{key:"getLangDisplay",value:function(){var e=d(l.mark(function e(t){var n,r,o,a;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}e.t0=t,e.next=7;break;case 4:return e.next=6,this.getLang();case 6:e.t0=e.sent;case 7:return n=e.t0,e.next=10,this.getList(n);case 10:if(r=e.sent,o=[],r.regionList.forEach(function(e){o=o.concat(e.countryList)}),!(a=o.filter(function(e){if(-1!==e.locale.findIndex(function(e){return e[0]==="".concat(n.lc,"-").concat(n.cc)})){var t,r=e.locale.filter(function(e){return e.includes("".concat(n.lc,"-").concat(n.cc))});return(t=e.locale).splice.apply(t,[0,e.locale.length].concat(S(r))),e}})).length){e.next=18;break}return e.abrupt("return","".concat(a[0].name," — ").concat(a[0].locale[0][1]));case 18:return e.abrupt("return","United States — English");case 19:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getList",value:function(){var e=d(l.mark(function e(t){var n,r,o,a,i=this;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.cc,r=t.lc,o="".concat(r,"-").concat(n),!(a=ke[o])){e.next=5;break}return e.abrupt("return",a);case 5:return e.abrupt("return",ke[o]=new Promise(function(e,t){i.fetchList(n,r,e,t)}));case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},{key:"fetchList",value:function(e,t,n,r){var o=this,a=JSON.parse(sessionStorage.getItem("".concat("dds-countrylist","-").concat(e,"-").concat(t)));if(a)n(a);else if(be["".concat(e,"-").concat(t)])++xe<50?setTimeout(function(){o.fetchList(e,t,n,r)},100):r();else{var i="".concat(we,"/").concat(e).concat(t,"-utf8.json");xe=0,be["".concat(e,"-").concat(t)]=!0,ce.get(i,Ee).then(function(r){sessionStorage.setItem("".concat("dds-countrylist","-").concat(e,"-").concat(t),JSON.stringify(r.data)),be["".concat(e,"-").concat(t)]=!1,n(r.data)}).catch(function(){e===ge.cc&&t===ge.lc?(be["".concat(e,"-").concat(t)]=!1,r()):o.fetchList(ge.cc,ge.lc,n,r)})}}},{key:"verifyLocale",value:function(e,t,n){var r,o;return!(n&&n.regionList.forEach(function(n){return n.countryList.forEach(function(n){var a=n.locale[0][0].split("-"),i=a[1],c=a[0];i===e&&c===t?o={cc:e,lc:t}:i!==e||r||(r=c)})}))&&r&&(o={cc:e,lc:r}),o}}]),e}(),Le=process&&process.env.MARKETING_SEARCH_HOST||"https://www.ibm.com",Re=process&&process.env.MARKETING_SEARCH_VERSION||"v3",Oe="".concat(Le,"/marketplace/api/search/").concat(Re,"/combined_suggestions"),Ie=function(){function e(){t(this,e)}return r(e,null,[{key:"getResults",value:function(){var e=d(l.mark(function e(t){var n;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return"en","us",n="".concat(Oe,"?locale=").concat("en","-").concat("us","&q=").concat(encodeURIComponent(t)),e.next=5,ce.get(n,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then(function(e){return e.data});case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),Pe=1e3,Ne=60*Pe,je=60*Ne,_e=24*je,De=365.25*_e,Ue=function(e,t){t=t||{};var n=i(e);if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*De;case"days":case"day":case"d":return n*_e;case"hours":case"hour":case"hrs":case"hr":case"h":return n*je;case"minutes":case"minute":case"mins":case"min":case"m":return n*Ne;case"seconds":case"second":case"secs":case"sec":case"s":return n*Pe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&!1===isNaN(e))return t.long?function(e){return Be(e,_e,"day")||Be(e,je,"hour")||Be(e,Ne,"minute")||Be(e,Pe,"second")||e+" ms"}(e):function(e){if(e>=_e)return Math.round(e/_e)+"d";if(e>=je)return Math.round(e/je)+"h";if(e>=Ne)return Math.round(e/Ne)+"m";if(e>=Pe)return Math.round(e/Pe)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Be(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var Me=a(function(e,t){var n;function r(e){function r(){if(r.enabled){var e=r,o=+new Date,a=o-(n||o);e.diff=a,e.prev=n,e.curr=o,n=o;for(var i=new Array(arguments.length),c=0;c<i.length;c++)i[c]=arguments[c];i[0]=t.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var s=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;s++;var o=t.formatters[r];if("function"==typeof o){var a=i[s];n=o.call(e,a),i.splice(s,1),s--}return n}),t.formatArgs.call(e,i),(r.log||t.log||console.log.bind(console)).apply(e,i)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(e=n[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Ue,t.names=[],t.skips=[],t.formatters={}}),He=(Me.coerce,Me.disable,Me.enable,Me.enabled,Me.humanize,Me.names,Me.skips,Me.formatters,a(function(e,t){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=Me).log=function(){return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(a=o))}),e.splice(a,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())})),Fe=(He.log,He.formatArgs,He.save,He.load,He.useColors,He.storage,He.colors,He("jsonp")),qe=function(e,t,n){"function"==typeof t&&(n=t,t={});t||(t={});var r,o,a=t.prefix||"__jp",i=t.name||a+Ge++,c=t.param||"callback",s=null!=t.timeout?t.timeout:6e4,u=encodeURIComponent,f=document.getElementsByTagName("script")[0]||document.head;s&&(o=setTimeout(function(){l(),n&&n(new Error("Timeout"))},s));function l(){r.parentNode&&r.parentNode.removeChild(r),window[i]=Je,o&&clearTimeout(o)}return window[i]=function(e){Fe("jsonp got",e),l(),n&&n(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+c+"="+u(i)).replace("?&","?"),Fe('jsonp req "%s"',e),(r=document.createElement("script")).src=e,f.parentNode.insertBefore(r,f),function(){window[i]&&l()}},Ge=0;function Je(){}var Ve,ze=process&&process.env.PROFILE_HOST||"https://idaas.iam.ibm.com",We=process&&process.env.PROFILE_VERSION||"v1",Ye="".concat(ze,"/").concat(We,"/mgmt/idaas/user/status/"),Xe=function(){function e(){t(this,e)}return r(e,null,[{key:"getUserStatus",value:function(){var e=Ye;return new Promise(function(t,n){return qe(e,null,function(e,r){return e?n(e):t(r)})})}},{key:"monitorUserStatus",value:function(e){return qe(Ye,null,e)}}]),e}(),Ke=process&&process.env.SEARCH_TYPEAHEAD_HOST||"https://www-api.ibm.com",$e=process&&process.env.SEARCH_TYPEAHEAD_VERSION||"v1",Ze="".concat(Ke,"/search/typeahead/").concat($e),Qe=function(){function e(){t(this,e)}return r(e,null,[{key:"getResults",value:function(){var e=d(l.mark(function e(t){var n,r,o;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ae.getLang();case 2:return n=e.sent,r=["lang=".concat(n.lc),"cc=".concat(n.cc),"query=".concat(encodeURIComponent(t))].join("&"),o="".concat(Ze,"?").concat(r),e.next=7,ce.get(o,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then(function(e){return e.data.response});case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),et=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://www.ibm.com",tt="www.ibm.com"===(null===(Ve=c.location)||void 0===Ve?void 0:Ve.host)?"":process&&(process.env.REACT_APP_CORS_PROXY||process.env.CORS_PROXY)||"",nt="".concat(et,"/common/v18/js/data/jsononly"),rt={},ot=0,at={},it=function(){function e(){t(this,e)}return r(e,null,[{key:"clearCache",value:function(){Object.keys(at).forEach(function(e){return delete at[e]});for(var e=0;e<sessionStorage.length;++e){var t=sessionStorage.key(e);0===t.indexOf("dds-translation")&&sessionStorage.removeItem(t)}}},{key:"getTranslation",value:function(){var e=d(l.mark(function e(t){var n,r,o,a,i,c=this;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n="en",r="us",!(t&&t.lc&&t.cc)){e.next=7;break}n=t.lc,r=t.cc,e.next=12;break;case 7:return e.next=9,Ae.getLocale();case 9:o=e.sent,n=o.lc,r=o.cc;case 12:if(a="".concat(n,"-").concat(r),!(i=at[a])){e.next=16;break}return e.abrupt("return",i);case 16:return e.abrupt("return",at[a]=new Promise(function(e,t){c.fetchTranslation(n,r,e,t)}));case 17:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},{key:"fetchTranslation",value:function(e,t,n,r){var o=this,a=JSON.parse(sessionStorage.getItem("".concat("dds-translation","-").concat(t,"-").concat(e)));if(a)n(a);else if(rt["".concat(t,"-").concat(e)])++ot<50?setTimeout(function(){o.fetchTranslation(e,t,n,r)},100):r();else{var i="";if(c.location)i="".concat(c.location.protocol,"//").concat(c.location.host)!==et?tt:"";var s="".concat(i).concat(nt,"/").concat(t).concat(e,".json");ot=0,rt["".concat(t,"-").concat(e)]=!0,ce.get(s,{headers:{"Content-Type":"text/plain",origin:et}}).then(function(r){var a=o.transformData(r.data);sessionStorage.setItem("".concat("dds-translation","-").concat(t,"-").concat(e),JSON.stringify(a)),rt["".concat(t,"-").concat(e)]=!1,n(a)}).catch(function(n){rt["".concat(t,"-").concat(e)]=!1,r(n)})}}},{key:"transformData",value:function(e){return e.footerMenu.push(e.socialFollow),e}}]),e}(),ct=process.env.KALTURA_PARTNER_ID||1773841,st=process.env.KALTURA_UICONF_ID||27941801,ut="https://cdnapisec.kaltura.com/p/".concat(ct,"/sp/").concat(ct,"00/embedIframeJs/uiconf_id/").concat(st,"/partner_id/").concat(ct),ft="https://cdnsecakmi.kaltura.com/p/".concat(ct,"/thumbnail/entry_id/"),lt=50,pt=0,dt=!1;function ht(e,t){c.kWidget?(dt=!1,e()):dt?++pt<lt?setTimeout(function(){ht(e,t)},100):t():(!function(){dt=!0;var e=document.createElement("script");e.src=ut,e.async=!0,document.body.appendChild(e)}(),ht(e,t))}var mt={},vt=function(){function e(){t(this,e)}return r(e,null,[{key:"checkScript",value:function(){return new Promise(function(e,t){ht(e,t)})}},{key:"getThumbnailUrl",value:function(e){var t=e.videoId,n=e.height,r=e.width,o=ft+t;return n&&(o+="/height/".concat(n)),r&&(o+="/width/".concat(r)),o}},{key:"embedVideo",value:function(){var e=d(l.mark(function e(t,n,r){var o;return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.fireEvent,e.next=3,this.checkScript().then(function(){var e=new Promise(function(e){c.kWidget.embed({targetId:n,wid:"_"+ct,uiconf_id:st,entry_id:t,flashvars:{autoPlay:r,titleLabel:{plugin:!0,align:"left",text:"{mediaProxy.entry.name}"}},readyCallback:function(n){var r=document.getElementById(n);r.addJsListener("playerPaused",function(){o({playerState:1,kdp:r,videoId:t})}),r.addJsListener("playerPlayed",function(){o({playerState:2,kdp:r,videoId:t})}),r.addJsListener("playerPlayEnd",function(){o({playerState:3,kdp:r,videoId:t})}),e(r)}})});return{kWidget:function(){return e}}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"fireEvent",value:function(e){var t=e.playerState,n=e.kdp,r=e.videoId,o=Math.round(n.evaluate("{video.player.currentTime}"));2===t&&0===o&&(t=0);var a={playerType:"kaltura",title:n.evaluate("{mediaProxy.entry.name}"),currentTime:o,duration:n.evaluate("{mediaProxy.entry.duration}"),playerState:t,videoId:r};f.videoPlayerStats(a)}},{key:"api",value:function(){var e=d(l.mark(function e(t){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.checkScript().then(function(){return mt&&mt[t]?mt[t]:new Promise(function(e){return new c.kWidget.api({wid:"_"+ct}).doRequest({service:"media",action:"get",entryId:t},function(t){mt[t.id]=t,e(t)})})});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getVideoDuration",value:function(e){var t=Math.floor(e/1e3%60),n=Math.floor(e/6e4%60),r=Math.floor(e/36e5%24);return r=r>0?r+":":"",t=t<10?"0"+t:t,e&&"("+r+n+":"+t+")"}}]),e}();e.AnalyticsAPI=f,e.DDOAPI=g,e.LocaleAPI=Ae,e.MarketingSearchAPI=Ie,e.ProfileAPI=Xe,e.SearchTypeaheadAPI=Qe,e.TranslationAPI=it,e.VideoPlayerAPI=vt,e.globalInit=function(){w||(w=!0,g.setVersion().catch(function(e){console.error("Error setting the version of the library in the DDO:",e)}),f.initAll())},Object.defineProperty(e,"__esModule",{value:!0})});