@everymatrix/casino-engagement-suite-challenges-list 1.43.4 → 1.45.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.
Files changed (56) hide show
  1. package/dist/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.esm.js +1 -1
  2. package/dist/casino-engagement-suite-challenges-list/p-7fd72b22.js +2 -0
  3. package/dist/casino-engagement-suite-challenges-list/p-dd67e263.entry.js +1 -0
  4. package/dist/casino-engagement-suite-challenges-list/p-e1255160.js +1 -0
  5. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  6. package/dist/cjs/casino-engagement-suite-challenges-list.cjs.js +17 -11
  7. package/dist/cjs/casino-engagement-suite-challenges-list_2.cjs.entry.js +444 -466
  8. package/dist/cjs/index-97488095.js +1316 -0
  9. package/dist/cjs/loader.cjs.js +7 -13
  10. package/dist/collection/collection-manifest.json +3 -3
  11. package/dist/collection/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.css +112 -111
  12. package/dist/collection/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.js +480 -524
  13. package/dist/collection/components/casino-engagement-suite-challenges-list/index.js +1 -0
  14. package/dist/collection/models/challenge.js +18 -18
  15. package/dist/collection/renders/ChallengesHistory.js +31 -47
  16. package/dist/collection/utils/locale.utils.js +26 -26
  17. package/dist/collection/utils/utils.js +3 -0
  18. package/dist/esm/app-globals-0f993ce5.js +3 -0
  19. package/dist/esm/casino-engagement-suite-challenges-list.js +14 -11
  20. package/dist/esm/casino-engagement-suite-challenges-list_2.entry.js +444 -466
  21. package/dist/esm/index-00eb432b.js +1288 -0
  22. package/dist/esm/loader.js +7 -13
  23. package/dist/stencil.config.dev.js +17 -0
  24. package/dist/stencil.config.js +14 -19
  25. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-list/.stencil/packages/stencil/casino-engagement-suite-challenges-list/stencil.config.d.ts +2 -0
  26. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-list/.stencil/packages/stencil/casino-engagement-suite-challenges-list/stencil.config.dev.d.ts +2 -0
  27. package/dist/types/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.d.ts +81 -81
  28. package/dist/types/components/casino-engagement-suite-challenges-list/index.d.ts +1 -0
  29. package/dist/types/components.d.ts +19 -2
  30. package/dist/types/models/challenge.d.ts +65 -65
  31. package/dist/types/stencil-public-runtime.d.ts +142 -33
  32. package/dist/types/utils/utils.d.ts +1 -0
  33. package/loader/cdn.js +1 -3
  34. package/loader/index.cjs.js +1 -3
  35. package/loader/index.d.ts +13 -1
  36. package/loader/index.es2017.js +1 -3
  37. package/loader/index.js +1 -3
  38. package/loader/package.json +1 -0
  39. package/package.json +12 -2
  40. package/dist/casino-engagement-suite-challenges-list/p-2061b71e.entry.js +0 -1
  41. package/dist/casino-engagement-suite-challenges-list/p-fad4589e.js +0 -1
  42. package/dist/cjs/index-0a011384.js +0 -1336
  43. package/dist/components/casino-engagement-suite-challenges-list.d.ts +0 -11
  44. package/dist/components/casino-engagement-suite-challenges-list.js +0 -2650
  45. package/dist/components/casino-engagement-suite-progress-bar.js +0 -6
  46. package/dist/components/casino-engagement-suite-progress-bar2.js +0 -107
  47. package/dist/components/index.d.ts +0 -26
  48. package/dist/components/index.js +0 -1
  49. package/dist/esm/index-ddf7e990.js +0 -1309
  50. package/dist/esm/polyfills/core-js.js +0 -11
  51. package/dist/esm/polyfills/css-shim.js +0 -1
  52. package/dist/esm/polyfills/dom.js +0 -79
  53. package/dist/esm/polyfills/es5-html-element.js +0 -1
  54. package/dist/esm/polyfills/index.js +0 -34
  55. package/dist/esm/polyfills/system.js +0 -6
  56. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-challenges-list/.stencil/packages/casino-engagement-suite-challenges-list/stencil.config.d.ts +0 -2
@@ -1,67 +1,67 @@
1
- import { h, r as registerInstance, c as createEvent, g as getElement } from './index-ddf7e990.js';
1
+ import { h, r as registerInstance, c as createEvent, g as getElement } from './index-00eb432b.js';
2
2
 
3
3
  var ChallengeRewardType;
4
4
  (function (ChallengeRewardType) {
5
- ChallengeRewardType[ChallengeRewardType["FreeSpins"] = 0] = "FreeSpins";
6
- ChallengeRewardType[ChallengeRewardType["LuckyWheel"] = 1] = "LuckyWheel";
7
- ChallengeRewardType[ChallengeRewardType["Leaderboard"] = 2] = "Leaderboard";
8
- ChallengeRewardType[ChallengeRewardType["Challenge"] = 3] = "Challenge";
9
- ChallengeRewardType[ChallengeRewardType["Custom"] = 4] = "Custom";
5
+ ChallengeRewardType[ChallengeRewardType["FreeSpins"] = 0] = "FreeSpins";
6
+ ChallengeRewardType[ChallengeRewardType["LuckyWheel"] = 1] = "LuckyWheel";
7
+ ChallengeRewardType[ChallengeRewardType["Leaderboard"] = 2] = "Leaderboard";
8
+ ChallengeRewardType[ChallengeRewardType["Challenge"] = 3] = "Challenge";
9
+ ChallengeRewardType[ChallengeRewardType["Custom"] = 4] = "Custom";
10
10
  })(ChallengeRewardType || (ChallengeRewardType = {}));
11
11
  var ChallengeHistoryLevelStatus;
12
12
  (function (ChallengeHistoryLevelStatus) {
13
- ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Completed"] = 0] = "Completed";
14
- ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Expired"] = 1] = "Expired";
15
- ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Forfeited"] = 2] = "Forfeited";
13
+ ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Completed"] = 0] = "Completed";
14
+ ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Expired"] = 1] = "Expired";
15
+ ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Forfeited"] = 2] = "Forfeited";
16
16
  })(ChallengeHistoryLevelStatus || (ChallengeHistoryLevelStatus = {}));
17
17
  var ChallengeLevelProgressStatus;
18
18
  (function (ChallengeLevelProgressStatus) {
19
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Closed"] = 0] = "Closed";
20
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["InProgress"] = 1] = "InProgress";
21
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Fillup"] = 2] = "Fillup";
22
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Completed"] = 3] = "Completed";
19
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Closed"] = 0] = "Closed";
20
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["InProgress"] = 1] = "InProgress";
21
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Fillup"] = 2] = "Fillup";
22
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Completed"] = 3] = "Completed";
23
23
  })(ChallengeLevelProgressStatus || (ChallengeLevelProgressStatus = {}));
24
24
  var ChallengeProgressStatus;
25
25
  (function (ChallengeProgressStatus) {
26
- ChallengeProgressStatus[ChallengeProgressStatus["Started"] = 0] = "Started";
27
- ChallengeProgressStatus[ChallengeProgressStatus["InProgress"] = 1] = "InProgress";
28
- ChallengeProgressStatus[ChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
29
- ChallengeProgressStatus[ChallengeProgressStatus["Completed"] = 3] = "Completed";
30
- ChallengeProgressStatus[ChallengeProgressStatus["Expired"] = 4] = "Expired";
31
- ChallengeProgressStatus[ChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
26
+ ChallengeProgressStatus[ChallengeProgressStatus["Started"] = 0] = "Started";
27
+ ChallengeProgressStatus[ChallengeProgressStatus["InProgress"] = 1] = "InProgress";
28
+ ChallengeProgressStatus[ChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
29
+ ChallengeProgressStatus[ChallengeProgressStatus["Completed"] = 3] = "Completed";
30
+ ChallengeProgressStatus[ChallengeProgressStatus["Expired"] = 4] = "Expired";
31
+ ChallengeProgressStatus[ChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
32
32
  })(ChallengeProgressStatus || (ChallengeProgressStatus = {}));
33
33
 
34
34
  const DEFAULT_LANGUAGE = 'en';
35
35
  const SUPPORTED_LANGUAGES = ['en'];
36
36
  const TRANSLATIONS = {
37
- en: {
38
- missions: 'Missions',
39
- join: 'Join',
40
- unjoin: 'Unjoin',
41
- new: 'new',
42
- noMissions: 'No Missions yet',
43
- tryOtherGames: 'Try winning Missions as rewards or launching other booster games',
44
- tooltip: 'Mission where your real money bets contribute towards the level progress to achieve the level reward',
45
- history: 'History',
46
- level: 'Level',
47
- status: 'Status',
48
- time: 'Time',
49
- loading: 'Loading...',
50
- completed: 'Completed',
51
- expired: 'Expired',
52
- forfeited: 'Forfeited',
53
- noHistory: 'No missions’ history available (last 30 days)',
54
- freeSpins: 'Free Spins',
55
- luckyWheel: 'Lucky Wheel',
56
- leaderboard: 'Leaderboard',
57
- mission: 'Mission',
58
- missionHasBeenForfeited: 'The mission has been canceled.',
59
- support: 'Please, contact support.'
60
- }
37
+ en: {
38
+ missions: 'Missions',
39
+ join: 'Join',
40
+ unjoin: 'Unjoin',
41
+ new: 'new',
42
+ noMissions: 'No Missions yet',
43
+ tryOtherGames: 'Try winning Missions as rewards or launching other booster games',
44
+ tooltip: 'Mission where your real money bets contribute towards the level progress to achieve the level reward',
45
+ history: 'History',
46
+ level: 'Level',
47
+ status: 'Status',
48
+ time: 'Time',
49
+ loading: 'Loading...',
50
+ completed: 'Completed',
51
+ expired: 'Expired',
52
+ forfeited: 'Forfeited',
53
+ noHistory: 'No missions’ history available (last 30 days)',
54
+ freeSpins: 'Free Spins',
55
+ luckyWheel: 'Lucky Wheel',
56
+ leaderboard: 'Leaderboard',
57
+ mission: 'Mission',
58
+ missionHasBeenForfeited: 'The mission has been canceled.',
59
+ support: 'Please, contact support.'
60
+ }
61
61
  };
62
62
  const translate = (key, customLang) => {
63
- const lang = customLang;
64
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
63
+ const lang = customLang;
64
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
65
65
  };
66
66
 
67
67
  function _typeof(o) {
@@ -449,7 +449,7 @@ function addLeadingZeros(number, targetLength) {
449
449
  *
450
450
  * Letters marked by * are not implemented but reserved by Unicode standard.
451
451
  */
452
- var formatters$1 = {
452
+ var formatters$2 = {
453
453
  // Year
454
454
  y: function y(date, token) {
455
455
  // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
@@ -515,6 +515,7 @@ var formatters$1 = {
515
515
  return addLeadingZeros(fractionalSeconds, token.length);
516
516
  }
517
517
  };
518
+ const formatters$3 = formatters$2;
518
519
 
519
520
  var dayPeriodEnum = {
520
521
  am: 'am',
@@ -608,7 +609,7 @@ var formatters = {
608
609
  unit: 'year'
609
610
  });
610
611
  }
611
- return formatters$1.y(date, token);
612
+ return formatters$3.y(date, token);
612
613
  },
613
614
  // Local week-numbering year
614
615
  Y: function Y(date, token, localize, options) {
@@ -730,7 +731,7 @@ var formatters = {
730
731
  switch (token) {
731
732
  case 'M':
732
733
  case 'MM':
733
- return formatters$1.M(date, token);
734
+ return formatters$3.M(date, token);
734
735
  // 1st, 2nd, ..., 12th
735
736
  case 'Mo':
736
737
  return localize.ordinalNumber(month + 1, {
@@ -820,7 +821,7 @@ var formatters = {
820
821
  unit: 'date'
821
822
  });
822
823
  }
823
- return formatters$1.d(date, token);
824
+ return formatters$3.d(date, token);
824
825
  },
825
826
  // Day of year
826
827
  D: function D(date, token, localize) {
@@ -1100,7 +1101,7 @@ var formatters = {
1100
1101
  unit: 'hour'
1101
1102
  });
1102
1103
  }
1103
- return formatters$1.h(date, token);
1104
+ return formatters$3.h(date, token);
1104
1105
  },
1105
1106
  // Hour [0-23]
1106
1107
  H: function H(date, token, localize) {
@@ -1109,7 +1110,7 @@ var formatters = {
1109
1110
  unit: 'hour'
1110
1111
  });
1111
1112
  }
1112
- return formatters$1.H(date, token);
1113
+ return formatters$3.H(date, token);
1113
1114
  },
1114
1115
  // Hour [0-11]
1115
1116
  K: function K(date, token, localize) {
@@ -1139,7 +1140,7 @@ var formatters = {
1139
1140
  unit: 'minute'
1140
1141
  });
1141
1142
  }
1142
- return formatters$1.m(date, token);
1143
+ return formatters$3.m(date, token);
1143
1144
  },
1144
1145
  // Second
1145
1146
  s: function s(date, token, localize) {
@@ -1148,11 +1149,11 @@ var formatters = {
1148
1149
  unit: 'second'
1149
1150
  });
1150
1151
  }
1151
- return formatters$1.s(date, token);
1152
+ return formatters$3.s(date, token);
1152
1153
  },
1153
1154
  // Fraction of second
1154
1155
  S: function S(date, token) {
1155
- return formatters$1.S(date, token);
1156
+ return formatters$3.S(date, token);
1156
1157
  },
1157
1158
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1158
1159
  X: function X(date, token, _localize, options) {
@@ -1280,6 +1281,7 @@ function formatTimezone(offset, dirtyDelimiter) {
1280
1281
  var minutes = addLeadingZeros(absOffset % 60, 2);
1281
1282
  return sign + hours + delimiter + minutes;
1282
1283
  }
1284
+ const formatters$1 = formatters;
1283
1285
 
1284
1286
  var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
1285
1287
  switch (pattern) {
@@ -1360,6 +1362,7 @@ var longFormatters = {
1360
1362
  p: timeLongFormatter,
1361
1363
  P: dateTimeLongFormatter
1362
1364
  };
1365
+ const longFormatters$1 = longFormatters;
1363
1366
 
1364
1367
  var protectedDayOfYearTokens = ['D', 'DD'];
1365
1368
  var protectedWeekYearTokens = ['YY', 'YYYY'];
@@ -1463,6 +1466,7 @@ var formatDistance = function formatDistance(token, count, options) {
1463
1466
  }
1464
1467
  return result;
1465
1468
  };
1469
+ const formatDistance$1 = formatDistance;
1466
1470
 
1467
1471
  function buildFormatLongFn(args) {
1468
1472
  return function () {
@@ -1506,6 +1510,7 @@ var formatLong = {
1506
1510
  defaultWidth: 'full'
1507
1511
  })
1508
1512
  };
1513
+ const formatLong$1 = formatLong;
1509
1514
 
1510
1515
  var formatRelativeLocale = {
1511
1516
  lastWeek: "'last' eeee 'at' p",
@@ -1518,6 +1523,7 @@ var formatRelativeLocale = {
1518
1523
  var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
1519
1524
  return formatRelativeLocale[token];
1520
1525
  };
1526
+ const formatRelative$1 = formatRelative;
1521
1527
 
1522
1528
  function buildLocalizeFn(args) {
1523
1529
  return function (dirtyIndex, options) {
@@ -1679,6 +1685,7 @@ var localize = {
1679
1685
  defaultFormattingWidth: 'wide'
1680
1686
  })
1681
1687
  };
1688
+ const localize$1 = localize;
1682
1689
 
1683
1690
  function buildMatchFn(args) {
1684
1691
  return function (string) {
@@ -1836,6 +1843,7 @@ var match = {
1836
1843
  defaultParseWidth: 'any'
1837
1844
  })
1838
1845
  };
1846
+ const match$1 = match;
1839
1847
 
1840
1848
  /**
1841
1849
  * @type {Locale}
@@ -1848,16 +1856,17 @@ var match = {
1848
1856
  */
1849
1857
  var locale = {
1850
1858
  code: 'en-US',
1851
- formatDistance: formatDistance,
1852
- formatLong: formatLong,
1853
- formatRelative: formatRelative,
1854
- localize: localize,
1855
- match: match,
1859
+ formatDistance: formatDistance$1,
1860
+ formatLong: formatLong$1,
1861
+ formatRelative: formatRelative$1,
1862
+ localize: localize$1,
1863
+ match: match$1,
1856
1864
  options: {
1857
1865
  weekStartsOn: 0 /* Sunday */,
1858
1866
  firstWeekContainsDate: 1
1859
1867
  }
1860
1868
  };
1869
+ const defaultLocale = locale;
1861
1870
 
1862
1871
  // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
1863
1872
  // (one of the certain letters followed by `o`)
@@ -2175,7 +2184,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
2175
2184
  requiredArgs(2, arguments);
2176
2185
  var formatStr = String(dirtyFormatStr);
2177
2186
  var defaultOptions = getDefaultOptions();
2178
- var locale$1 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : locale;
2187
+ var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
2179
2188
  var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
2180
2189
 
2181
2190
  // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
@@ -2188,10 +2197,10 @@ function format(dirtyDate, dirtyFormatStr, options) {
2188
2197
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
2189
2198
  throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
2190
2199
  }
2191
- if (!locale$1.localize) {
2200
+ if (!locale.localize) {
2192
2201
  throw new RangeError('locale must contain localize property');
2193
2202
  }
2194
- if (!locale$1.formatLong) {
2203
+ if (!locale.formatLong) {
2195
2204
  throw new RangeError('locale must contain formatLong property');
2196
2205
  }
2197
2206
  var originalDate = toDate(dirtyDate);
@@ -2207,14 +2216,14 @@ function format(dirtyDate, dirtyFormatStr, options) {
2207
2216
  var formatterOptions = {
2208
2217
  firstWeekContainsDate: firstWeekContainsDate,
2209
2218
  weekStartsOn: weekStartsOn,
2210
- locale: locale$1,
2219
+ locale: locale,
2211
2220
  _originalDate: originalDate
2212
2221
  };
2213
2222
  var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
2214
2223
  var firstCharacter = substring[0];
2215
2224
  if (firstCharacter === 'p' || firstCharacter === 'P') {
2216
- var longFormatter = longFormatters[firstCharacter];
2217
- return longFormatter(substring, locale$1.formatLong);
2225
+ var longFormatter = longFormatters$1[firstCharacter];
2226
+ return longFormatter(substring, locale.formatLong);
2218
2227
  }
2219
2228
  return substring;
2220
2229
  }).join('').match(formattingTokensRegExp).map(function (substring) {
@@ -2226,7 +2235,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
2226
2235
  if (firstCharacter === "'") {
2227
2236
  return cleanEscapedString(substring);
2228
2237
  }
2229
- var formatter = formatters[firstCharacter];
2238
+ var formatter = formatters$1[firstCharacter];
2230
2239
  if (formatter) {
2231
2240
  if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
2232
2241
  throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
@@ -2234,7 +2243,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
2234
2243
  if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
2235
2244
  throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
2236
2245
  }
2237
- return formatter(utcDate, substring, locale$1.localize, formatterOptions);
2246
+ return formatter(utcDate, substring, locale.localize, formatterOptions);
2238
2247
  }
2239
2248
  if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
2240
2249
  throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
@@ -2252,440 +2261,409 @@ function cleanEscapedString(input) {
2252
2261
  }
2253
2262
 
2254
2263
  const getHistoryLoaderTemplate = (lang) => {
2255
- return h("div", { class: "HistoryLoader" },
2256
- h("casino-engagement-suite-progress-bar", { indeterminate: true }),
2257
- h("span", null, translate('loading', lang)));
2264
+ return h("div", { class: "HistoryLoader" },
2265
+ h("casino-engagement-suite-progress-bar", { indeterminate: true }),
2266
+ h("span", null, translate('loading', lang)));
2258
2267
  };
2259
2268
  const getRewardNameByType = (type, lang) => {
2260
- switch (type) {
2261
- case 0: return translate('freeSpins', lang);
2262
- case 1: return translate('luckyWheel', lang);
2263
- case 2: return translate('leaderboard', lang);
2264
- case 3: return translate('mission', lang);
2265
- }
2269
+ switch (type) {
2270
+ case 0: return translate('freeSpins', lang);
2271
+ case 1: return translate('luckyWheel', lang);
2272
+ case 2: return translate('leaderboard', lang);
2273
+ case 3: return translate('mission', lang);
2274
+ }
2266
2275
  };
2267
2276
  const getLevelStatusString = (status, lang) => {
2268
- switch (status) {
2269
- case ChallengeHistoryLevelStatus.Completed: return translate('completed', lang);
2270
- case ChallengeHistoryLevelStatus.Expired: return translate('expired', lang);
2271
- case ChallengeHistoryLevelStatus.Forfeited: return translate('forfeited', lang);
2272
- default: return status;
2273
- }
2277
+ switch (status) {
2278
+ case ChallengeHistoryLevelStatus.Completed: return translate('completed', lang);
2279
+ case ChallengeHistoryLevelStatus.Expired: return translate('expired', lang);
2280
+ case ChallengeHistoryLevelStatus.Forfeited: return translate('forfeited', lang);
2281
+ default: return status;
2282
+ }
2274
2283
  };
2275
2284
  const showRewards = (level) => {
2276
- return !!level.Rewards && level.Status === ChallengeHistoryLevelStatus.Completed;
2285
+ return !!level.Rewards && level.Status === ChallengeHistoryLevelStatus.Completed;
2277
2286
  };
2278
2287
  const getRewardTemplate = (reward, lang) => {
2279
- const isCustom = reward.Type === ChallengeRewardType.Custom;
2280
- const rewardName = isCustom ? reward.RewardDescription : getRewardNameByType(reward.Type, lang);
2281
- const isRewarded = isCustom || reward.IsRewarded;
2282
- return h("div", { class: `HistoryRewardsItem ${isRewarded || isCustom ? 'IsRewarded' : 'IsNotRewarded'}` },
2283
- h("span", { class: "HistoryRewardsItemName" }, rewardName),
2284
- !isCustom && h("div", { class: "HistoryRewardStatusIcon" }));
2288
+ const isCustom = reward.Type === ChallengeRewardType.Custom;
2289
+ const rewardName = isCustom ? reward.RewardDescription : getRewardNameByType(reward.Type, lang);
2290
+ const isRewarded = isCustom || reward.IsRewarded;
2291
+ return h("div", { class: `HistoryRewardsItem ${isRewarded || isCustom ? 'IsRewarded' : 'IsNotRewarded'}` },
2292
+ h("span", { class: "HistoryRewardsItemName" }, rewardName),
2293
+ !isCustom && h("div", { class: `EngagementSuiteIconButton ${isRewarded ? 'Check' : 'Close'}` }));
2285
2294
  };
2286
2295
  const getHistoryLevelRewardsTemplate = (level, lang) => {
2287
- return h("div", { class: "HistoryRewardsList" },
2288
- h("img", { class: "HistoryRewardsIcon", src: "https://static.everymatrix.com/gic/img/engagement-suite/cup-reward-list.svg", alt: "Reward" }),
2289
- Object.values(level.Rewards).map(reward => getRewardTemplate(reward, lang)));
2296
+ return h("div", { class: "HistoryRewardsList" },
2297
+ h("div", { class: "EngagementSuiteIconButton CupRewardList" }),
2298
+ Object.values(level.Rewards).map(reward => getRewardTemplate(reward, lang)));
2290
2299
  };
2291
2300
  const getHistoryLevelTemplate = (level, index, lang) => {
2292
- return h("div", { class: "HistoryLevelInfo" },
2293
- h("span", { class: "Level" }, `${translate('level', lang)} ${index + 1}`),
2294
- h("span", { class: "Status" }, getLevelStatusString(level.Status, lang)),
2295
- h("span", { class: "Time" }, format(new Date(level.Time), 'LLL d, yyyy HH:mm:ss')));
2301
+ return h("div", { class: "HistoryLevelInfo" },
2302
+ h("span", { class: "Level" }, `${translate('level', lang)} ${index + 1}`),
2303
+ h("span", { class: "Status" }, getLevelStatusString(level.Status, lang)),
2304
+ h("span", { class: "Time" }, format(new Date(level.Time), 'LLL d, yyyy HH:mm:ss')));
2296
2305
  };
2297
2306
  const getChallengesHistoryTemplate = (histories, openedHistoryIds, toggleChallengeHistory, lang) => {
2298
- if (histories.length === 0) {
2299
- return h("p", { class: "HistoryEmptyMessage" }, translate('noHistory', lang));
2300
- }
2301
- return h("div", { class: "HistoryList" }, histories.map((history) => {
2302
- return h("div", { key: history.ProgressId, class: `HistoryListItem ${openedHistoryIds.includes(history.ProgressId) ? 'Opened' : 'Closed'}` },
2303
- h("header", { class: "HistoryListItemHeader", "data-id": history.ProgressId, onClick: toggleChallengeHistory },
2304
- history.Name,
2305
- h("button", { class: "HistoryListItemButton" })),
2306
- h("div", { class: "HistoryListItemBody" },
2307
- h("div", null, history.Levels.map((level, index) => {
2308
- return h("div", { class: "HistoryListItemLevelCard" },
2309
- getHistoryLevelTemplate(level, index, lang),
2310
- showRewards(level) && getHistoryLevelRewardsTemplate(level, lang));
2311
- }))));
2312
- }));
2307
+ if (histories.length === 0) {
2308
+ return h("p", { class: "HistoryEmptyMessage" }, translate('noHistory', lang));
2309
+ }
2310
+ return h("div", { class: "HistoryList" }, histories.map((history) => {
2311
+ return h("div", { key: history.ProgressId, class: `HistoryListItem ${openedHistoryIds.includes(history.ProgressId) ? 'Opened' : 'Closed'}` },
2312
+ h("header", { class: "HistoryListItemHeader", "data-id": history.ProgressId, onClick: toggleChallengeHistory },
2313
+ history.Name,
2314
+ h("button", { class: "EngagementSuiteIconButton ArrowDown" })),
2315
+ h("div", { class: "HistoryListItemBody" },
2316
+ h("div", null, history.Levels.map((level, index) => {
2317
+ return h("div", { class: "HistoryListItemLevelCard" },
2318
+ getHistoryLevelTemplate(level, index, lang),
2319
+ showRewards(level) && getHistoryLevelRewardsTemplate(level, lang));
2320
+ }))));
2321
+ }));
2313
2322
  };
2314
2323
 
2315
- const casinoEngagementSuiteChallengesListCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengesIconButton{width:16px;height:16px;cursor:pointer}.ChallengesIconButton img{width:100%;height:100%}.ChallengesListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:14px;font-weight:500;line-height:14px}.HistoryList,.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.HistoryList::-webkit-scrollbar,.ChallengesListWrapper::-webkit-scrollbar{display:none}.ChallengesList{display:flex;flex-direction:column;row-gap:12px;padding:12px 19px 0}.ChallengeCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:6px;position:relative;cursor:pointer}.ChallengeJoinButton.Joined::before,.ChallengeCard.InProgress::before{content:\"\";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px}.ForfeitedChallengeCard{cursor:default}.ChallengeName,.ForfeitedChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:\"Montserrat\", sans-serif;line-height:22px;font-weight:700;font-size:18px;word-break:break-word}.ForfeitedChallengeName,.ForfeitedChallengeMessage{color:var(--emw--color-primary, #8F8B9C)}.ForfeitedChallengeInfo{margin-top:14px;display:flex;gap:4px}.ForfeitedChallengeMessage{font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:15px}.ChallengeJoinButton{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:14px;font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.ChallengeJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengesListEmpty{padding:20px 32px}.ChallengesListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:600;font-size:20px;line-height:24px;font-family:\"Montserrat\", sans-serif;color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:12px;line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:10px;line-height:10px;font-weight:700;font-family:\"Montserrat\", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengesTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.ChallengesTooltipBackdrop .ChallengesTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.ChallengesTooltipBackdrop .ChallengesTooltip .ChallengesIconButton{top:12px;right:6px;position:absolute}.Tabs::after,.HistoryCols::after,.HistoryListItem.Opened .HistoryListItemBody::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.TabsWrapper{padding:0 20px;margin:8px 0}.TabsWrapper .Tabs{display:flex;position:relative}.TabsWrapper .Tabs .Tab{padding:9px 16px 7px;font-weight:500;font-size:12px;line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.TabsWrapper .Tabs .Tab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.HistoryWrapper{padding:0 20px;display:flex;flex-direction:column;height:100%;overflow:hidden}.HistoryWrapper .HistoryEmptyMessage{margin-top:8px;font-size:var(--emw--font-size-x-small, 14px);color:var(--emw--color-gray-100, #BBB9C3);line-height:30px}.HistoryWrapper .HistoryCols{padding:12px 0;position:relative;display:flex}.HistoryWrapper .HistoryCols .HistoryColName{padding:0 5px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-100, #BBB9C3)}.HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:90px}.HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:100px}.HistoryWrapper .HistoryLoader{display:flex;flex-direction:column;justify-content:center;align-items:center;height:inherit;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-primary, #8F8B9C)}.HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:8px;width:100px}.HistoryWrapper .HistoryListItem{margin-top:8px}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemButton{transform:rotate(180deg)}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:8px;grid-template-rows:1fr}.HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:16px 0;display:flex;justify-content:space-between;align-items:center;color:var(--emw--color-typography, #FFFFFF);font-size:var(--emw--font-size-small, 14px)}.HistoryWrapper .HistoryListItem .HistoryListItemButton{transition:transform 0.3s ease-out;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/arrow-down.svg) no-repeat}.HistoryWrapper .HistoryListItem .HistoryListItemBody{position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody>div{overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px 5px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo{display:flex;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-100, #BBB9C3)}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:90px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:100px}.HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:var(--emw--font-size-x-small, 10px);font-weight:var(--emw--font-weight-bold, 700)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardStatusIcon,.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsIcon{height:14px;width:14px}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem{display:flex;align-items:center;gap:2px;color:var(--emw--color-typography, #FFF)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem .HistoryRewardStatusIcon{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/check.svg) no-repeat}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded{color:var(--emw--color-background, #666178)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded .HistoryRewardStatusIcon{background-image:url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg)}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:16px;line-height:16px}.ChallengesListPopup.Tablet .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesIconButton{width:24px;height:24px}.ChallengesListPopup.Tablet .ChallengesList,.ChallengesListPopup.Desktop .ChallengesList{padding:20px 24px 0;row-gap:20px}.ChallengesListPopup.Tablet .ChallengesListEmpty,.ChallengesListPopup.Desktop .ChallengesListEmpty{padding:40px 65px}.ChallengesListPopup.Tablet .ChallengesListEmpty h2,.ChallengesListPopup.Desktop .ChallengesListEmpty h2{margin-bottom:32px;font-size:var(--emw--size-large, 24px);line-height:29px}.ChallengesListPopup.Tablet .ChallengesListEmpty p,.ChallengesListPopup.Desktop .ChallengesListEmpty p{font-size:var(--emw--font-size-small, 16px);line-height:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Tablet .ForfeitedChallengeName,.ChallengesListPopup.Desktop .ChallengeName,.ChallengesListPopup.Desktop .ForfeitedChallengeName{line-height:27px;font-size:22px}.ChallengesListPopup.Tablet .ForfeitedChallengeMessage,.ChallengesListPopup.Desktop .ForfeitedChallengeMessage{font-size:var(--emw--font-size-small, 14px);line-height:16px}.ChallengesListPopup.Tablet .ChallengeJoinButton,.ChallengesListPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:14px;line-height:14px}.ChallengesListPopup.Tablet .ChallengesTooltipBackdrop,.ChallengesListPopup.Desktop .ChallengesTooltipBackdrop{padding:90px 75px 0}.ChallengesListPopup.Tablet .ChallengesTooltip,.ChallengesListPopup.Desktop .ChallengesTooltip{padding:60px 65px;font-size:16px;line-height:20px}.ChallengesListPopup.Tablet .ChallengesTooltip .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesTooltip .ChallengesIconButton{top:24px;right:24px}.ChallengesListPopup.Tablet .TabsWrapper,.ChallengesListPopup.Desktop .TabsWrapper{padding:0 24px;margin:20px 0}.ChallengesListPopup.Tablet .TabsWrapper .Tabs .Tab,.ChallengesListPopup.Desktop .TabsWrapper .Tabs .Tab{font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper,.ChallengesListPopup.Desktop .HistoryWrapper{padding:0 24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryEmptyMessage,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryEmptyMessage{margin-top:20px;font-size:var(--emw--font-size-small, 16px);line-height:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName{padding:0 12px;font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader{font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:10px;width:150px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem{margin-top:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemHeader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemHeader{cursor:pointer;padding:17px 5px;font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemButton,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemButton{width:24px;height:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo{font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:12px;gap:12px;font-size:var(--emw--font-size-small, 14px);align-items:flex-end}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsIcon,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsIcon{height:24px;flex-basis:24px}";
2324
+ const casinoEngagementSuiteChallengesListCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.CupRewardList{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/cup-reward-list.svg) no-repeat}.EngagementSuiteIconButton.Check{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/check.svg) no-repeat}.EngagementSuiteIconButton.ArrowDown{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/arrow-down.svg) no-repeat}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengesListPopupHeader .EngagementSuiteIconButton{cursor:pointer}.ChallengesListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.HistoryList,.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.HistoryList::-webkit-scrollbar,.ChallengesListWrapper::-webkit-scrollbar{display:none}.ChallengesList{display:flex;flex-direction:column;row-gap:12px;padding:12px 19px 0}.ChallengeCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.EngagementSuiteButton.Active::before,.ChallengeCard.InProgress::before{content:\"\";position:absolute;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px}.ForfeitedChallengeCard{cursor:default}.ChallengeName,.ForfeitedChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word}.ForfeitedChallengeName,.ForfeitedChallengeMessage{color:var(--emw--color-gray-150, #8F8B9C)}.ForfeitedChallengeInfo{margin-top:14px;display:flex;gap:4px}.ForfeitedChallengeMessage{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:15px}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengesListEmpty{padding:20px 32px}.ChallengesListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowChallengeLabel{display:inline-flex}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.EngagementSuiteTabs::after,.HistoryCols::after,.HistoryListItem.Opened .HistoryListItemBody::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.EngagementSuiteTabsWrapper{padding:0 20px;margin:8px 0}.EngagementSuiteTabsWrapper .EngagementSuiteTabs{display:flex;position:relative}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.HistoryWrapper{padding:0 20px;display:flex;flex-direction:column;height:100%;overflow:hidden}.HistoryWrapper .HistoryEmptyMessage{margin-top:8px;font-size:var(--emw--font-size-small, 14px);color:var(--emw--color-secondary, #BBB9C3);line-height:30px}.HistoryWrapper .HistoryCols{padding:12px 0;position:relative;display:flex}.HistoryWrapper .HistoryCols .HistoryColName{padding:0 5px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:90px}.HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:100px}.HistoryWrapper .HistoryLoader{display:flex;flex-direction:column;justify-content:center;align-items:center;height:inherit;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-150, #8F8B9C)}.HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:8px;width:100px}.HistoryWrapper .HistoryListItem{margin-top:8px}.HistoryWrapper .HistoryListItem.Opened .EngagementSuiteIconButton.ArrowDown{transform:rotate(180deg)}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:8px;grid-template-rows:1fr}.HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:16px 0;display:flex;justify-content:space-between;align-items:center;color:var(--emw--color-typography, #FFFFFF);font-size:var(--emw--font-size-small, 14px)}.HistoryWrapper .HistoryListItem .EngagementSuiteIconButton.ArrowDown{transition:transform 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody{position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody>div{overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px 5px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo{display:flex;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:90px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:100px}.HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:var(--emw--font-size-x-small, 10px);font-weight:var(--emw--font-weight-bold, 700)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton{height:14px;width:14px}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem{display:flex;align-items:center;gap:2px;color:var(--emw--color-typography, #FFF)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded{color:var(--emw--color-gray-300, #666178)}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.ChallengesListPopup.Tablet .EngagementSuiteIconButton.ArrowDown,.ChallengesListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Tablet .ChallengesListPopupHeader .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .EngagementSuiteIconButton.ArrowDown,.ChallengesListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .ChallengesListPopupHeader .EngagementSuiteIconButton{width:24px;height:24px}.ChallengesListPopup.Tablet .ChallengesList,.ChallengesListPopup.Desktop .ChallengesList{padding:20px 24px 0;row-gap:20px}.ChallengesListPopup.Tablet .ChallengesListEmpty,.ChallengesListPopup.Desktop .ChallengesListEmpty{padding:40px 65px}.ChallengesListPopup.Tablet .ChallengesListEmpty h2,.ChallengesListPopup.Desktop .ChallengesListEmpty h2{margin-bottom:32px;font-size:var(--emw--font-size-large-plus, 24px);line-height:29px}.ChallengesListPopup.Tablet .ChallengesListEmpty p,.ChallengesListPopup.Desktop .ChallengesListEmpty p{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Tablet .ForfeitedChallengeName,.ChallengesListPopup.Desktop .ChallengeName,.ChallengesListPopup.Desktop .ForfeitedChallengeName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.ChallengesListPopup.Tablet .ForfeitedChallengeMessage,.ChallengesListPopup.Desktop .ForfeitedChallengeMessage{font-size:var(--emw--font-size-small, 14px);line-height:16px}.ChallengesListPopup.Tablet .EngagementSuiteButton,.ChallengesListPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengesListPopup.Tablet .EngagementSuiteTooltipBackdrop,.ChallengesListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.ChallengesListPopup.Tablet .EngagementSuiteTooltip,.ChallengesListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.ChallengesListPopup.Tablet .EngagementSuiteTabsWrapper,.ChallengesListPopup.Desktop .EngagementSuiteTabsWrapper{padding:0 24px;margin:20px 0}.ChallengesListPopup.Tablet .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab,.ChallengesListPopup.Desktop .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper,.ChallengesListPopup.Desktop .HistoryWrapper{padding:0 24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryEmptyMessage,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryEmptyMessage{margin-top:20px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName{padding:0 12px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:10px;width:150px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem{margin-top:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemHeader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemHeader{cursor:pointer;padding:17px 5px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:12px;gap:12px;font-size:var(--emw--font-size-small, 14px);align-items:flex-end}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton.CupRewardList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton.CupRewardList{height:24px;flex-basis:24px}";
2325
+ const CasinoEngagementSuiteChallengesListStyle0 = casinoEngagementSuiteChallengesListCss;
2316
2326
 
2317
2327
  const CasinoEngagementSuiteChallengesList = class {
2318
- constructor(hostRef) {
2319
- registerInstance(this, hostRef);
2320
- this.close = createEvent(this, "close", 7);
2321
- this.resetNewChallengeLabel = createEvent(this, "resetNewChallengeLabel", 7);
2322
- /**
2323
- * Client custom styling via string
2324
- */
2325
- this.clientStyling = '';
2326
- /**
2327
- * Client custom styling via url
2328
- */
2329
- this.clientStylingUrl = '';
2330
- /**
2331
- * Language of the widget
2332
- */
2333
- this.language = 'en';
2334
- /**
2335
- * User's device type
2336
- */
2337
- this.device = 'Mobile';
2338
- /**
2339
- * List of challenges
2340
- */
2341
- this.challenges = [];
2342
- /**
2343
- *Paused Challenge Ids
2344
- */
2345
- this.pausedChallengeIds = [];
2346
- this.tooltip = false;
2347
- this.timers = {};
2348
- this.limitStylingAppends = false;
2349
- this.activeTab = 1;
2350
- this.historyLoading = false;
2351
- this.openedHistoryIds = [];
2352
- this.setClientStyling = () => {
2353
- let sheet = document.createElement('style');
2354
- sheet.innerHTML = this.clientStyling;
2355
- this.host.prepend(sheet);
2356
- };
2357
- this.setClientStylingURL = () => {
2358
- let url = new URL(this.clientStylingUrl);
2359
- let cssFile = document.createElement('style');
2360
- fetch(url.href)
2361
- .then((res) => res.text())
2362
- .then((data) => {
2363
- cssFile.innerHTML = data;
2364
- setTimeout(() => { this.host.prepend(cssFile); }, 1);
2365
- })
2366
- .catch((err) => {
2367
- console.log('Error ', err);
2368
- });
2369
- };
2370
- this.handleTabChange = (e) => {
2371
- this.activeTab = +(e.target.getAttribute('data-index'));
2372
- if (this.activeTab === 2) {
2373
- this.sendHistoryRequest();
2374
- }
2375
- };
2376
- this.toggleChallengeHistory = (ev) => {
2377
- const id = ev.currentTarget.getAttribute('data-id');
2378
- const index = this.openedHistoryIds.findIndex(historyId => historyId === id);
2379
- if (index > -1) {
2380
- this.openedHistoryIds.splice(index, 1);
2381
- }
2382
- else {
2383
- this.openedHistoryIds.push(id);
2384
- }
2385
- this.openedHistoryIds = [...this.openedHistoryIds];
2386
- };
2387
- this.handleCloseClick = () => {
2388
- this.close.emit();
2389
- this.tooltip = false;
2390
- this.resetNewChallengeLabel.emit('list');
2391
- };
2392
- this.handleChallengeClick = (ev) => {
2393
- const id = ev.currentTarget.getAttribute('data-id');
2394
- window.postMessage({ type: 'ChallengeClick', id });
2395
- };
2396
- this.showTooltip = () => {
2397
- this.tooltip = true;
2398
- };
2399
- this.hideTooltip = () => {
2400
- this.tooltip = false;
2401
- };
2402
- this.changeChallengeStatus = (e) => {
2403
- var _a, _b;
2404
- e.stopPropagation();
2405
- const id = e.currentTarget.getAttribute('data-id');
2406
- if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
2407
- window.postMessage({
2408
- type: 'ShowConfirmationModal',
2409
- ProgressToDeactivate: id,
2410
- });
2411
- return;
2412
- }
2413
- if (((_b = this.inProgressChallenges) === null || _b === void 0 ? void 0 : _b.length) > 0) {
2328
+ constructor(hostRef) {
2329
+ registerInstance(this, hostRef);
2330
+ this.close = createEvent(this, "close", 7);
2331
+ this.resetNewChallengeLabel = createEvent(this, "resetNewChallengeLabel", 7);
2332
+ this.setClientStyling = () => {
2333
+ let sheet = document.createElement('style');
2334
+ sheet.innerHTML = this.clientStyling;
2335
+ this.host.prepend(sheet);
2336
+ };
2337
+ this.setClientStylingURL = () => {
2338
+ let url = new URL(this.clientStylingUrl);
2339
+ let cssFile = document.createElement('style');
2340
+ fetch(url.href)
2341
+ .then((res) => res.text())
2342
+ .then((data) => {
2343
+ cssFile.innerHTML = data;
2344
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
2345
+ })
2346
+ .catch((err) => {
2347
+ console.log('Error ', err);
2348
+ });
2349
+ };
2350
+ this.handleTabChange = (e) => {
2351
+ this.activeTab = +(e.target.getAttribute('data-index'));
2352
+ if (this.activeTab === 2) {
2353
+ this.sendHistoryRequest();
2354
+ }
2355
+ };
2356
+ this.toggleChallengeHistory = (ev) => {
2357
+ const id = ev.currentTarget.getAttribute('data-id');
2358
+ const index = this.openedHistoryIds.findIndex(historyId => historyId === id);
2359
+ if (index > -1) {
2360
+ this.openedHistoryIds.splice(index, 1);
2361
+ }
2362
+ else {
2363
+ this.openedHistoryIds.push(id);
2364
+ }
2365
+ this.openedHistoryIds = [...this.openedHistoryIds];
2366
+ };
2367
+ this.handleCloseClick = () => {
2368
+ this.close.emit();
2369
+ this.tooltip = false;
2370
+ this.resetNewChallengeLabel.emit('list');
2371
+ };
2372
+ this.handleChallengeClick = (ev) => {
2373
+ const id = ev.currentTarget.getAttribute('data-id');
2374
+ window.postMessage({ type: 'ChallengeClick', id });
2375
+ };
2376
+ this.showTooltip = () => {
2377
+ this.tooltip = true;
2378
+ };
2379
+ this.hideTooltip = () => {
2380
+ this.tooltip = false;
2381
+ };
2382
+ this.changeChallengeStatus = (e) => {
2383
+ var _a, _b;
2384
+ e.stopPropagation();
2385
+ const id = e.currentTarget.getAttribute('data-id');
2386
+ if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
2387
+ window.postMessage({
2388
+ type: 'ShowConfirmationModal',
2389
+ ProgressToDeactivate: id,
2390
+ });
2391
+ return;
2392
+ }
2393
+ if (((_b = this.inProgressChallenges) === null || _b === void 0 ? void 0 : _b.length) > 0) {
2394
+ window.postMessage({
2395
+ type: 'ShowConfirmationModal',
2396
+ ProgressToActivate: id,
2397
+ ProgressToDeactivate: this.inProgressChallenges[0],
2398
+ });
2399
+ return;
2400
+ }
2401
+ window.postMessage({
2402
+ type: 'ChallengeJoinRequest',
2403
+ data: {
2404
+ ProgressToActivate: id,
2405
+ },
2406
+ });
2407
+ };
2408
+ this.clientStyling = '';
2409
+ this.clientStylingUrl = '';
2410
+ this.language = 'en';
2411
+ this.device = 'Mobile';
2412
+ this.challenges = [];
2413
+ this.isJoiningToChallenge = undefined;
2414
+ this.inProgressChallenges = undefined;
2415
+ this.pausedChallengeIds = [];
2416
+ this.tooltip = false;
2417
+ this.timers = {};
2418
+ this.limitStylingAppends = false;
2419
+ this.activeTab = 1;
2420
+ this.historyLoading = false;
2421
+ this.challengesHistory = undefined;
2422
+ this.openedHistoryIds = [];
2423
+ }
2424
+ handleEvent(e) {
2425
+ const { type } = e === null || e === void 0 ? void 0 : e.data;
2426
+ if (type === 'ChallengesHistoryResponse') {
2427
+ this.openedHistoryIds = [];
2428
+ this.challengesHistory = e.data.data || [];
2429
+ this.historyLoading = false;
2430
+ }
2431
+ if (type === 'BarChallengesClick') {
2432
+ this.activeTab = 1;
2433
+ this.openedHistoryIds = [];
2434
+ }
2435
+ }
2436
+ challengesPropHandler(value) {
2437
+ if (!this.interval && value.length) {
2438
+ this.updateTimers();
2439
+ this.startCountdown();
2440
+ }
2441
+ if (this.interval && !value.length) {
2442
+ clearInterval(this.interval);
2443
+ }
2444
+ }
2445
+ componentWillLoad() {
2446
+ this.challengesPropHandler(this.challenges);
2447
+ }
2448
+ componentDidRender() {
2449
+ if (!this.limitStylingAppends && this.host) {
2450
+ if (this.clientStyling)
2451
+ this.setClientStyling();
2452
+ if (this.clientStylingUrl)
2453
+ this.setClientStylingURL();
2454
+ this.limitStylingAppends = true;
2455
+ }
2456
+ }
2457
+ disconnectedCallback() {
2458
+ this.interval && clearInterval(this.interval);
2459
+ }
2460
+ sendHistoryRequest() {
2461
+ this.historyLoading = true;
2414
2462
  window.postMessage({
2415
- type: 'ShowConfirmationModal',
2416
- ProgressToActivate: id,
2417
- ProgressToDeactivate: this.inProgressChallenges[0],
2463
+ type: 'ChallengesHistoryRequest'
2418
2464
  });
2419
- return;
2420
- }
2421
- window.postMessage({
2422
- type: 'ChallengeJoinRequest',
2423
- data: {
2424
- ProgressToActivate: id,
2425
- },
2426
- });
2427
- };
2428
- }
2429
- handleEvent(e) {
2430
- const { type } = e === null || e === void 0 ? void 0 : e.data;
2431
- if (type === 'ChallengesHistoryResponse') {
2432
- this.openedHistoryIds = [];
2433
- this.challengesHistory = e.data.data || [];
2434
- this.historyLoading = false;
2435
- }
2436
- if (type === 'BarChallengesClick') {
2437
- this.activeTab = 1;
2438
- this.openedHistoryIds = [];
2439
2465
  }
2440
- }
2441
- challengesPropHandler(value) {
2442
- if (!this.interval && value.length) {
2443
- this.updateTimers();
2444
- this.startCountdown();
2466
+ startCountdown() {
2467
+ this.interval = setInterval(() => {
2468
+ this.updateTimers();
2469
+ }, 1000);
2445
2470
  }
2446
- if (this.interval && !value.length) {
2447
- clearInterval(this.interval);
2471
+ updateTimers() {
2472
+ const now = new Date().getTime();
2473
+ this.timers = this.challenges.filter(challenge => challenge.Status !== ChallengeProgressStatus.Expired).reduce((acc, challenge) => {
2474
+ const expirationDate = new Date(challenge.ExpirationTime).getTime();
2475
+ const diff = expirationDate - now;
2476
+ let countdown = '00h:00m:00s';
2477
+ if (diff < 1) {
2478
+ this.removeChallenge(challenge.Id);
2479
+ }
2480
+ else {
2481
+ const { days, hours, minutes, seconds } = {
2482
+ days: String(Math.floor(diff / (1000 * 60 * 60 * 24))).padStart(2, '0'),
2483
+ hours: String(Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
2484
+ minutes: String(Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
2485
+ seconds: String(Math.floor((diff % (1000 * 60)) / 1000)).padStart(2, '0')
2486
+ };
2487
+ countdown = days === '00'
2488
+ ? `${hours}h:${minutes}m:${seconds}s`
2489
+ : `${days}d:${hours}h:${minutes}m`;
2490
+ }
2491
+ return Object.assign(Object.assign({}, acc), { [challenge.Id]: countdown });
2492
+ }, {});
2448
2493
  }
2449
- }
2450
- componentWillLoad() {
2451
- this.challengesPropHandler(this.challenges);
2452
- }
2453
- componentDidRender() {
2454
- if (!this.limitStylingAppends && this.host) {
2455
- if (this.clientStyling)
2456
- this.setClientStyling();
2457
- if (this.clientStylingUrl)
2458
- this.setClientStylingURL();
2459
- this.limitStylingAppends = true;
2494
+ removeChallenge(id) {
2495
+ const index = this.challenges.findIndex(challenge => challenge.Id === id);
2496
+ if (index > -1) {
2497
+ this.challenges.splice(index, 1);
2498
+ window.postMessage({ type: 'ChallengeHasExpired', id });
2499
+ }
2460
2500
  }
2461
- }
2462
- disconnectedCallback() {
2463
- this.interval && clearInterval(this.interval);
2464
- }
2465
- sendHistoryRequest() {
2466
- this.historyLoading = true;
2467
- window.postMessage({
2468
- type: 'ChallengesHistoryRequest'
2469
- });
2470
- }
2471
- startCountdown() {
2472
- this.interval = setInterval(() => {
2473
- this.updateTimers();
2474
- }, 1000);
2475
- }
2476
- updateTimers() {
2477
- const now = new Date().getTime();
2478
- this.timers = this.challenges.filter(challenge => challenge.Status !== ChallengeProgressStatus.Expired).reduce((acc, challenge) => {
2479
- const expirationDate = new Date(challenge.ExpirationTime).getTime();
2480
- const diff = expirationDate - now;
2481
- let countdown = '00h:00m:00s';
2482
- if (diff < 1) {
2483
- this.removeChallenge(challenge.Id);
2484
- }
2485
- else {
2486
- const { days, hours, minutes, seconds } = {
2487
- days: String(Math.floor(diff / (1000 * 60 * 60 * 24))).padStart(2, '0'),
2488
- hours: String(Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
2489
- minutes: String(Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
2490
- seconds: String(Math.floor((diff % (1000 * 60)) / 1000)).padStart(2, '0')
2501
+ getChallengeClasses(challenge) {
2502
+ return {
2503
+ ChallengeCard: true,
2504
+ InProgress: challenge.Status === ChallengeProgressStatus.InProgress
2505
+ && !this.pausedChallengeIds.includes(challenge.ChallengeId),
2506
+ Completed: this.isChallengeCompleted(challenge),
2507
+ Paused: this.isChallengePaused(challenge)
2491
2508
  };
2492
- countdown = days === '00'
2493
- ? `${hours}h:${minutes}m:${seconds}s`
2494
- : `${days}d:${hours}h:${minutes}m`;
2495
- }
2496
- return Object.assign(Object.assign({}, acc), { [challenge.Id]: countdown });
2497
- }, {});
2498
- }
2499
- removeChallenge(id) {
2500
- const index = this.challenges.findIndex(challenge => challenge.Id === id);
2501
- if (index > -1) {
2502
- this.challenges.splice(index, 1);
2503
- window.postMessage({ type: 'ChallengeHasExpired', id });
2504
2509
  }
2505
- }
2506
- getChallengeClasses(challenge) {
2507
- return {
2508
- ChallengeCard: true,
2509
- InProgress: challenge.Status === ChallengeProgressStatus.InProgress
2510
- && !this.pausedChallengeIds.includes(challenge.ChallengeId),
2511
- Completed: this.isChallengeCompleted(challenge),
2512
- Paused: this.isChallengePaused(challenge)
2513
- };
2514
- }
2515
- isChallengePaused(challenge) {
2516
- return (challenge.Status === ChallengeProgressStatus.Started
2517
- && challenge.LevelProgresses[0].ProgressPercentage > 0)
2518
- || this.pausedChallengeIds.includes(challenge.ChallengeId);
2519
- }
2520
- isChallengeCompleted(challenge) {
2521
- return challenge.Status === ChallengeProgressStatus.Completed
2522
- || (challenge.Status === ChallengeProgressStatus.PendingLevelReward
2523
- && challenge.LevelProgresses.every(progress => progress.ProgressPercentage === 100));
2524
- }
2525
- getChallengeProgress(challenge) {
2526
- if (challenge.Status === ChallengeProgressStatus.Completed) {
2527
- return 100;
2528
- }
2529
- if (this.isChallengePaused(challenge)
2530
- || challenge.Status === ChallengeProgressStatus.PendingLevelReward
2531
- || challenge.Status === ChallengeProgressStatus.InProgress) {
2532
- const activeLevel = challenge.LevelProgresses
2533
- .find(level => level.ProgressStatus === ChallengeLevelProgressStatus.InProgress);
2534
- const completedLevel = challenge.LevelProgresses
2535
- .filter(level => level.ProgressStatus === ChallengeLevelProgressStatus.Fillup ||
2536
- level.ProgressStatus === ChallengeLevelProgressStatus.Completed).slice(-1)[0];
2537
- /**
2538
- * It is possible that Paused/InProgress challenge
2539
- * doesn't have InProgress, Fillup or Completed level
2540
- * because level becomes InProgress after user's bet.
2541
- * In this case should be displayed progress of the next level (0%)
2542
- */
2543
- return activeLevel ? activeLevel.ProgressPercentage
2544
- : (completedLevel ? completedLevel.ProgressPercentage : 0);
2545
- }
2546
- return -1;
2547
- }
2548
- getChallengeHeaderTemplate(challenge) {
2549
- const { Id } = challenge;
2550
- const inProgressChallenge = challenge.Status === ChallengeProgressStatus.InProgress
2551
- || challenge.Status === ChallengeProgressStatus.PendingLevelReward;
2552
- return h("div", { class: "ChallengeCardHeader" }, h("div", { class: "ChallengeName" }, challenge.ChallengePresentation.PresentationName), challenge.Status !== ChallengeProgressStatus.Completed ? (h("button", { class: `${inProgressChallenge ?
2553
- 'ChallengeJoinButton Joined' : 'ChallengeJoinButton'} ${this.isJoiningToChallenge ||
2554
- this.pausedChallengeIds.includes(challenge.ChallengeId) ?
2555
- 'Disabled' : ''}`, onClick: this.changeChallengeStatus, "data-id": Id }, inProgressChallenge
2556
- ? translate('unjoin', this.language)
2557
- : translate('join', this.language))) : null);
2558
- }
2559
- getChallengeTemplate(challenge) {
2560
- const isForfeitedChallenge = challenge.Status === ChallengeProgressStatus.Forfeited;
2561
- const challengeProgress = this.getChallengeProgress(challenge);
2562
- const countdown = this.timers[challenge.Id];
2563
- const progressTemplate = challengeProgress > -1
2564
- ? h("casino-engagement-suite-progress-bar", { class: this.device, value: challengeProgress, disabled: this.isChallengePaused(challenge) }, h("span", { slot: "Title", class: "ChallengeCountdown" }, countdown))
2565
- : h("span", { class: "ChallengeCountdown" }, countdown);
2566
- return isForfeitedChallenge ? (this.getForfeitedChallengeTemplate(challenge)) : (h("div", { class: this.getChallengeClasses(challenge), onClick: this.handleChallengeClick, key: challenge.Id, "data-id": challenge.Id }, this.getChallengeHeaderTemplate(challenge), progressTemplate, h("div", { class: `ChallengeLabel ${challenge.IsNew ? 'ShowChallengeLabel' : ''}` }, h("span", null, translate('new', this.language)))));
2567
- }
2568
- getForfeitedChallengeTemplate(challenge) {
2569
- return h("div", { class: "ChallengeCard ForfeitedChallengeCard" }, h("div", { class: "ForfeitedChallengeName" }, challenge.ChallengePresentation.PresentationName), h("div", { class: "ForfeitedChallengeInfo" }, h("div", null, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/alert-circle.svg", alt: "Forfeited" })), h("div", { class: "ForfeitedChallengeMessage" }, h("div", null, translate('missionHasBeenForfeited', this.language)), h("div", null, translate('support', this.language)))));
2570
- }
2571
- getHeaderTemplate() {
2572
- return h("header", { class: "ChallengesListPopupHeader" }, h("button", { onClick: this.showTooltip, class: "ChallengesIconButton" }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/help.svg", alt: "Show tooltip" })), h("div", { class: "ChallengesListPopupHeaderName" }, translate('missions', this.language)), h("button", { class: "ChallengesIconButton", onClick: this.handleCloseClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close missions list" })));
2573
- }
2574
- getListTabTemplate() {
2575
- if (this.challenges.length) {
2576
- return h("div", { class: "ChallengesListWrapper" }, h("div", { class: "ChallengesList" }, [...this.challenges]
2577
- .sort(challenge => challenge.Status === ChallengeProgressStatus.InProgress ? -1 : 0)
2578
- .map(challenge => this.getChallengeTemplate(challenge))));
2510
+ isChallengePaused(challenge) {
2511
+ return (challenge.Status === ChallengeProgressStatus.Started
2512
+ && challenge.LevelProgresses[0].ProgressPercentage > 0)
2513
+ || this.pausedChallengeIds.includes(challenge.ChallengeId);
2579
2514
  }
2580
- else {
2581
- return h("div", { class: "ChallengesListEmpty" }, h("h2", null, translate('noMissions', this.language)), h("p", null, translate('tryOtherGames', this.language)));
2515
+ isChallengeCompleted(challenge) {
2516
+ return challenge.Status === ChallengeProgressStatus.Completed
2517
+ || (challenge.Status === ChallengeProgressStatus.PendingLevelReward
2518
+ && challenge.LevelProgresses.every(progress => progress.ProgressPercentage === 100));
2582
2519
  }
2583
- }
2584
- getTooltipTemplate() {
2585
- return h("div", { class: "ChallengesTooltipBackdrop" }, h("div", { class: "ChallengesTooltip" }, h("button", { class: "ChallengesIconButton", onClick: this.hideTooltip }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), translate('tooltip', this.language)));
2586
- }
2587
- getHistoryTabTemplate() {
2588
- return h("div", { class: "HistoryWrapper" }, h("div", { class: "HistoryCols" }, h("div", { class: "HistoryColName Level" }, translate('level', this.language)), h("div", { class: "HistoryColName Status" }, translate('status', this.language)), h("div", { class: "HistoryColName Time" }, translate('time', this.language))), this.historyLoading
2589
- ? getHistoryLoaderTemplate(this.language)
2590
- : getChallengesHistoryTemplate(this.challengesHistory, this.openedHistoryIds, this.toggleChallengeHistory, this.language));
2591
- }
2592
- getTabsTemplate() {
2593
- return h("div", { class: "TabsWrapper" }, h("div", { class: "Tabs" }, h("div", { "data-index": "1", onClick: this.handleTabChange, class: `Tab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('missions', this.language)), h("div", { "data-index": "2", onClick: this.handleTabChange, class: `Tab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('history', this.language))));
2594
- }
2595
- getTabsContentTemplate() {
2596
- return this.activeTab === 1
2597
- ? this.getListTabTemplate()
2598
- : this.getHistoryTabTemplate();
2599
- }
2600
- render() {
2601
- return h("div", { class: `ChallengesListPopup ${this.device}` }, this.getHeaderTemplate(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.tooltip && this.getTooltipTemplate());
2602
- }
2603
- get host() { return getElement(this); }
2604
- static get watchers() { return {
2605
- "challenges": ["challengesPropHandler"]
2606
- }; }
2520
+ getChallengeProgress(challenge) {
2521
+ if (challenge.Status === ChallengeProgressStatus.Completed) {
2522
+ return 100;
2523
+ }
2524
+ if (this.isChallengePaused(challenge)
2525
+ || challenge.Status === ChallengeProgressStatus.PendingLevelReward
2526
+ || challenge.Status === ChallengeProgressStatus.InProgress) {
2527
+ const activeLevel = challenge.LevelProgresses
2528
+ .find(level => level.ProgressStatus === ChallengeLevelProgressStatus.InProgress);
2529
+ const completedLevel = challenge.LevelProgresses
2530
+ .filter(level => level.ProgressStatus === ChallengeLevelProgressStatus.Fillup ||
2531
+ level.ProgressStatus === ChallengeLevelProgressStatus.Completed).slice(-1)[0];
2532
+ /**
2533
+ * It is possible that Paused/InProgress challenge
2534
+ * doesn't have InProgress, Fillup or Completed level
2535
+ * because level becomes InProgress after user's bet.
2536
+ * In this case should be displayed progress of the next level (0%)
2537
+ */
2538
+ return activeLevel ? activeLevel.ProgressPercentage
2539
+ : (completedLevel ? completedLevel.ProgressPercentage : 0);
2540
+ }
2541
+ return -1;
2542
+ }
2543
+ getChallengeHeaderTemplate(challenge) {
2544
+ const { Id } = challenge;
2545
+ const inProgressChallenge = challenge.Status === ChallengeProgressStatus.InProgress
2546
+ || challenge.Status === ChallengeProgressStatus.PendingLevelReward;
2547
+ return h("div", { class: "ChallengeCardHeader" }, h("div", { class: "ChallengeName" }, challenge.ChallengePresentation.PresentationName), challenge.Status !== ChallengeProgressStatus.Completed ? (h("button", { class: `${inProgressChallenge ?
2548
+ 'EngagementSuiteButton Active' : 'EngagementSuiteButton'} ${this.isJoiningToChallenge ||
2549
+ this.pausedChallengeIds.includes(challenge.ChallengeId) ?
2550
+ 'Disabled' : ''}`, onClick: this.changeChallengeStatus, "data-id": Id }, inProgressChallenge
2551
+ ? translate('unjoin', this.language)
2552
+ : translate('join', this.language))) : null);
2553
+ }
2554
+ getChallengeTemplate(challenge) {
2555
+ const isForfeitedChallenge = challenge.Status === ChallengeProgressStatus.Forfeited;
2556
+ const challengeProgress = this.getChallengeProgress(challenge);
2557
+ const countdown = this.timers[challenge.Id];
2558
+ const progressTemplate = challengeProgress > -1
2559
+ ? h("casino-engagement-suite-progress-bar", { clientStylingUrl: this.clientStylingUrl, class: this.device, value: challengeProgress, disabled: this.isChallengePaused(challenge) }, h("span", { slot: "Title", class: "ChallengeCountdown" }, countdown))
2560
+ : h("span", { class: "ChallengeCountdown" }, countdown);
2561
+ return isForfeitedChallenge ? (this.getForfeitedChallengeTemplate(challenge)) : (h("div", { class: this.getChallengeClasses(challenge), onClick: this.handleChallengeClick, key: challenge.Id, "data-id": challenge.Id }, this.getChallengeHeaderTemplate(challenge), progressTemplate, h("div", { class: `ChallengeLabel ${challenge.IsNew ? 'ShowChallengeLabel' : ''}` }, h("span", null, translate('new', this.language)))));
2562
+ }
2563
+ getForfeitedChallengeTemplate(challenge) {
2564
+ return h("div", { class: "ChallengeCard ForfeitedChallengeCard" }, h("div", { class: "ForfeitedChallengeName" }, challenge.ChallengePresentation.PresentationName), h("div", { class: "ForfeitedChallengeInfo" }, h("div", null, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/alert-circle.svg", alt: "Forfeited" })), h("div", { class: "ForfeitedChallengeMessage" }, h("div", null, translate('missionHasBeenForfeited', this.language)), h("div", null, translate('support', this.language)))));
2565
+ }
2566
+ getHeaderTemplate() {
2567
+ return h("header", { class: "ChallengesListPopupHeader" }, h("button", { onClick: this.showTooltip, class: "EngagementSuiteIconButton Help" }), h("div", { class: "ChallengesListPopupHeaderName" }, translate('missions', this.language)), h("button", { class: "EngagementSuiteIconButton Close", onClick: this.handleCloseClick }));
2568
+ }
2569
+ getListTabTemplate() {
2570
+ if (this.challenges.length) {
2571
+ return h("div", { class: "ChallengesListWrapper" }, h("div", { class: "ChallengesList" }, [...this.challenges]
2572
+ .sort(challenge => challenge.Status === ChallengeProgressStatus.InProgress ? -1 : 0)
2573
+ .map(challenge => this.getChallengeTemplate(challenge))));
2574
+ }
2575
+ else {
2576
+ return h("div", { class: "ChallengesListEmpty" }, h("h2", null, translate('noMissions', this.language)), h("p", null, translate('tryOtherGames', this.language)));
2577
+ }
2578
+ }
2579
+ getTooltipTemplate() {
2580
+ return h("div", { class: "EngagementSuiteTooltipBackdrop" }, h("div", { class: "EngagementSuiteTooltip" }, h("button", { class: "EngagementSuiteIconButton Close", onClick: this.hideTooltip }), translate('tooltip', this.language)));
2581
+ }
2582
+ getHistoryTabTemplate() {
2583
+ return h("div", { class: "HistoryWrapper" }, h("div", { class: "HistoryCols" }, h("div", { class: "HistoryColName Level" }, translate('level', this.language)), h("div", { class: "HistoryColName Status" }, translate('status', this.language)), h("div", { class: "HistoryColName Time" }, translate('time', this.language))), this.historyLoading
2584
+ ? getHistoryLoaderTemplate(this.language)
2585
+ : getChallengesHistoryTemplate(this.challengesHistory, this.openedHistoryIds, this.toggleChallengeHistory, this.language));
2586
+ }
2587
+ getTabsTemplate() {
2588
+ return h("div", { class: "EngagementSuiteTabsWrapper" }, h("div", { class: "EngagementSuiteTabs" }, h("div", { "data-index": "1", onClick: this.handleTabChange, class: `EngagementSuiteTab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('missions', this.language)), h("div", { "data-index": "2", onClick: this.handleTabChange, class: `EngagementSuiteTab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('history', this.language))));
2589
+ }
2590
+ getTabsContentTemplate() {
2591
+ return this.activeTab === 1
2592
+ ? this.getListTabTemplate()
2593
+ : this.getHistoryTabTemplate();
2594
+ }
2595
+ render() {
2596
+ return h("div", { key: '50b676f6394d813aa946ed1fd85e9612ba04a7a1', class: `ChallengesListPopup ${this.device}` }, this.getHeaderTemplate(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.tooltip && this.getTooltipTemplate());
2597
+ }
2598
+ get host() { return getElement(this); }
2599
+ static get watchers() { return {
2600
+ "challenges": ["challengesPropHandler"]
2601
+ }; }
2607
2602
  };
2608
- CasinoEngagementSuiteChallengesList.style = casinoEngagementSuiteChallengesListCss;
2603
+ CasinoEngagementSuiteChallengesList.style = CasinoEngagementSuiteChallengesListStyle0;
2609
2604
 
2610
- const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
2605
+ const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:var(--emw--font-size-small, 14px);line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-gray-300, #666178);border-radius:var(--emw--border-radius-small, 4px);position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-gray-300, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
2606
+ const CasinoEngagementSuiteProgressBarStyle0 = casinoEngagementSuiteProgressBarCss;
2611
2607
 
2612
2608
  const CasinoEngagementSuiteProgressBar = class {
2613
- constructor(hostRef) {
2614
- registerInstance(this, hostRef);
2615
- /**
2616
- * Value for the widget
2617
- */
2618
- this.value = 0;
2619
- /**
2620
- * Shows disabled styles
2621
- */
2622
- this.disabled = false;
2623
- /**
2624
- * Hide percent value
2625
- */
2626
- this.hidePercent = false;
2627
- /**
2628
- * Constantly animates
2629
- */
2630
- this.indeterminate = false;
2631
- /**
2632
- * Client custom styling via string
2633
- */
2634
- this.clientStyling = '';
2635
- /**
2636
- * Client custom styling via url
2637
- */
2638
- this.clientStylingUrl = '';
2639
- this.limitStylingAppends = false;
2640
- this.setClientStyling = () => {
2641
- let sheet = document.createElement('style');
2642
- sheet.innerHTML = this.clientStyling;
2643
- this.host.prepend(sheet);
2644
- };
2645
- this.setClientStylingURL = () => {
2646
- let url = new URL(this.clientStylingUrl);
2647
- let cssFile = document.createElement('style');
2648
- fetch(url.href)
2649
- .then((res) => res.text())
2650
- .then((data) => {
2651
- cssFile.innerHTML = data;
2652
- setTimeout(() => { this.host.prepend(cssFile); }, 1);
2653
- })
2654
- .catch((err) => {
2655
- console.log('Error ', err);
2656
- });
2657
- };
2658
- }
2659
- componentDidRender() {
2660
- if (!this.limitStylingAppends && this.host) {
2661
- if (this.clientStyling)
2662
- this.setClientStyling();
2663
- if (this.clientStylingUrl)
2664
- this.setClientStylingURL();
2665
- this.limitStylingAppends = true;
2609
+ constructor(hostRef) {
2610
+ registerInstance(this, hostRef);
2611
+ this.setClientStyling = () => {
2612
+ let sheet = document.createElement('style');
2613
+ sheet.innerHTML = this.clientStyling;
2614
+ this.host.prepend(sheet);
2615
+ };
2616
+ this.setClientStylingURL = () => {
2617
+ let url = new URL(this.clientStylingUrl);
2618
+ let cssFile = document.createElement('style');
2619
+ fetch(url.href)
2620
+ .then((res) => res.text())
2621
+ .then((data) => {
2622
+ cssFile.innerHTML = data;
2623
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
2624
+ })
2625
+ .catch((err) => {
2626
+ console.log('Error ', err);
2627
+ });
2628
+ };
2629
+ this.value = 0;
2630
+ this.disabled = false;
2631
+ this.hidePercent = false;
2632
+ this.indeterminate = false;
2633
+ this.clientStyling = '';
2634
+ this.clientStylingUrl = '';
2635
+ this.limitStylingAppends = false;
2666
2636
  }
2667
- }
2668
- getProgressBarClasses() {
2669
- return {
2670
- ProgressBar: true,
2671
- Completed: this.value === 100,
2672
- Disabled: this.disabled,
2673
- HidePercent: this.hidePercent || this.indeterminate
2674
- };
2675
- }
2676
- getProgressBarLineTemplate() {
2677
- if (this.indeterminate) {
2678
- return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
2637
+ componentDidRender() {
2638
+ if (!this.limitStylingAppends && this.host) {
2639
+ if (this.clientStyling)
2640
+ this.setClientStyling();
2641
+ if (this.clientStylingUrl)
2642
+ this.setClientStylingURL();
2643
+ this.limitStylingAppends = true;
2644
+ }
2679
2645
  }
2680
- else {
2681
- return h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
2646
+ getProgressBarClasses() {
2647
+ return {
2648
+ ProgressBar: true,
2649
+ Completed: this.value === 100,
2650
+ Disabled: this.disabled,
2651
+ HidePercent: this.hidePercent || this.indeterminate
2652
+ };
2682
2653
  }
2683
- }
2684
- render() {
2685
- return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
2686
- }
2687
- get host() { return getElement(this); }
2654
+ getProgressBarLineTemplate() {
2655
+ if (this.indeterminate) {
2656
+ return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
2657
+ }
2658
+ else {
2659
+ return h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
2660
+ }
2661
+ }
2662
+ render() {
2663
+ return h("div", { key: 'ecce3a26a92d2e090c1db84bdc1bdbeb505080ed', class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { key: '649fe1103d222200f2a1ad3b5967e37da1f1ab3d', class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { key: '49dc180eedd823f0027f75099813fb9d91bcd938', name: "Title" }, h("div", { key: 'e6e59da3fe7bbcb37e118e7fd23a8ff35587aca5' })), h("slot", { key: '3dc8e5fd1dbc8c268b9c76e393b751cb53605e7e', name: "Percent" }, h("div", { key: '6a9e880f3ee3c4f26e8577c69be5db5f8e2d10ad', class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { key: '141106e77caad7b04bb199f911e87c0c6f0adc2d', class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
2664
+ }
2665
+ get host() { return getElement(this); }
2688
2666
  };
2689
- CasinoEngagementSuiteProgressBar.style = casinoEngagementSuiteProgressBarCss;
2667
+ CasinoEngagementSuiteProgressBar.style = CasinoEngagementSuiteProgressBarStyle0;
2690
2668
 
2691
2669
  export { CasinoEngagementSuiteChallengesList as casino_engagement_suite_challenges_list, CasinoEngagementSuiteProgressBar as casino_engagement_suite_progress_bar };