@everymatrix/bonus-elevate-shop 1.94.76 → 1.94.78

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 (30) hide show
  1. package/dist/bonus-elevate-shop/bonus-elevate-shop.esm.js +1 -1
  2. package/dist/bonus-elevate-shop/bonus-elevate-shop_6.entry.js +1 -0
  3. package/dist/bonus-elevate-shop/{index-4bbe8850.js → index-19906d91.js} +2 -2
  4. package/dist/bonus-elevate-shop/{player-elevate-card-items-3e027a1b.js → player-elevate-card-items-1afa5433.js} +1 -1
  5. package/dist/bonus-elevate-shop/player-elevate-card.entry.js +1 -1
  6. package/dist/bonus-elevate-shop/player-elevate-loyaltycard.entry.js +1 -1
  7. package/dist/bonus-elevate-shop/player-rakeback-card.entry.js +1 -1
  8. package/dist/cjs/bonus-elevate-shop.cjs.js +2 -2
  9. package/dist/cjs/{bonus-elevate-shop_5.cjs.entry.js → bonus-elevate-shop_6.cjs.entry.js} +197 -5
  10. package/dist/cjs/{index-0c2bfc7d.js → index-3a5c4d6d.js} +3 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/{player-elevate-card-items-5f944325.js → player-elevate-card-items-4c0278e8.js} +1 -1
  13. package/dist/cjs/player-elevate-card.cjs.entry.js +2 -2
  14. package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +2 -2
  15. package/dist/cjs/player-rakeback-card.cjs.entry.js +1 -1
  16. package/dist/collection/collection-manifest.json +6 -0
  17. package/dist/collection/components/bonus-elevate-shop/bonus-elevate-shop.js +7 -4
  18. package/dist/collection/renders/renderGifts.js +4 -0
  19. package/dist/esm/bonus-elevate-shop.js +3 -3
  20. package/dist/esm/{bonus-elevate-shop_5.entry.js → bonus-elevate-shop_6.entry.js} +197 -6
  21. package/dist/esm/{index-4bbe8850.js → index-19906d91.js} +3 -3
  22. package/dist/esm/loader.js +3 -3
  23. package/dist/esm/{player-elevate-card-items-3e027a1b.js → player-elevate-card-items-1afa5433.js} +1 -1
  24. package/dist/esm/player-elevate-card.entry.js +2 -2
  25. package/dist/esm/player-elevate-loyaltycard.entry.js +2 -2
  26. package/dist/esm/player-rakeback-card.entry.js +1 -1
  27. package/dist/types/components/bonus-elevate-shop/bonus-elevate-shop.d.ts +1 -0
  28. package/dist/types/renders/renderGifts.d.ts +1 -0
  29. package/package.json +1 -1
  30. package/dist/bonus-elevate-shop/bonus-elevate-shop_5.entry.js +0 -1
@@ -1,6 +1,6 @@
1
- import { h, r as registerInstance, c as createEvent, g as getElement, a as getAssetPath, F as Fragment } from './index-4bbe8850.js';
1
+ import { h, r as registerInstance, c as createEvent, g as getElement, a as getAssetPath, F as Fragment, H as Host } from './index-19906d91.js';
2
2
  import { t as translateWithParams, T as TRANSLATIONS$1, a as translate$1 } from './locale.utils-10bf5b6c.js';
3
- import { r as requiredArgs, t as toDate, g as getTimezoneOffsetInMilliseconds, P as PlayerAvatar, a as PlayerPoints } from './player-elevate-card-items-3e027a1b.js';
3
+ import { r as requiredArgs, t as toDate, g as getTimezoneOffsetInMilliseconds, P as PlayerAvatar, a as PlayerPoints } from './player-elevate-card-items-1afa5433.js';
4
4
 
5
5
  const getUrl = (path, params = {}) => {
6
6
  return path + '?' + Object.keys(params).map(key => `${key}=${params[key]}`).join('&');
@@ -87,6 +87,21 @@ const renderGifts = (gifts, locale, redeem) => {
87
87
  h("div", { class: `AvaliableWrap RedeemButton ${statusData.extraClass}`, onClick: statusData.onClick }, locale.redeemGift))));
88
88
  })));
89
89
  };
90
+ const renderGiftsSkeleton = () => {
91
+ return (h("div", { class: "Gifts FlexLayout" }, Array.from({ length: 3 })
92
+ .map(() => (h("div", { class: "Gift" },
93
+ h("div", { class: "ImgContainer" },
94
+ h("ui-skeleton", { structure: "image", width: "100%", height: "100%", "border-radius": "5px" })),
95
+ h("div", { class: "InfoContainer" },
96
+ h("div", null,
97
+ h("div", { class: "Point" },
98
+ h("ui-skeleton", { structure: "text", width: "100%", height: "16px" })),
99
+ h("div", { class: "Title" },
100
+ h("ui-skeleton", { structure: "text", width: "100%", height: "16px" })),
101
+ h("div", { class: "Description" },
102
+ h("ui-skeleton", { structure: "text", width: "100%", height: "16px" }))),
103
+ h("ui-skeleton", { structure: "rectangle", width: "100%", height: "34px" })))))));
104
+ };
90
105
 
91
106
  const bonusElevateShopCss = ":host{display:block}svg circle{shape-rendering:crispEdges}.MainContainer{max-width:420px}.MainContainer player-elevate-pointcard{width:100%;height:220px}.MainContainer .ShopBottom{display:flex;flex-direction:row;justify-content:space-between}.Gifts{display:flex;justify-content:space-between;padding:15px;padding-left:-8px;padding-right:-8px;flex:0 0 45.1282051282%;flex-wrap:wrap;justify-content:flex-start;background:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black-150, #000000);font-weight:500;gap:10px;margin-top:-100px;position:relative;min-height:200px}.InfoContainer{display:flex;margin-top:17px;justify-content:space-between;flex-direction:column}.Gift{display:block;margin-bottom:10px;padding:8px;box-shadow:0px 18px 45px 0px var(--emw--color-black-150, rgba(167, 167, 167, 0.2));border-radius:11px;background:var(--emw--color-white, #FFFFFF)}.Gift .ImgContainer{width:160px;height:107px;border-radius:11px;box-shadow:0px 2px 6px 0px var(--emw--color-black-200, rgba(0, 0, 0, 0.2509803922));cursor:pointer;background-size:cover;background-position:center center;background-repeat:no-repeat}.Gift .Point{font-size:20px}.Gift .Title,.Gift .Description{padding-left:3px}.Gift .Title{font-size:14px;margin-top:10px}.Gift .Description{font-size:12px;color:var(--emw--color-black-100, #767171)}.Gift .AvaliableWrap{align-self:self-end}.Gift .AvaliableWrap.active{cursor:pointer}.Gift .AvaliableWrap.deactive{cursor:not-allowed}.Gift .AvaliableWrap span svg{width:var(--emw--elevate-avaliable-button-size, 46px)}.RedeemButton{width:100%;padding:5px 0px;border:2px solid var(--emw--button-border-color, rgba(8, 59, 23, 0.1098039216));text-align:center;color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-bold, 700);line-height:var(--emw--font-size-medium, 14px);text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 10px)}.RedeemButton.active{background:var(--emw--color-primary, #18CE51)}.RedeemButton.active:hover{background:var(--mmw--color-main-button-hover, #24B24E)}.RedeemButton.deactive{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843))}.NoContent{font-size:16px;color:var(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
92
107
  const BonusElevateShopStyle0 = bonusElevateShopCss;
@@ -156,6 +171,7 @@ const BonusElevateShop = class {
156
171
  if (res.success) {
157
172
  this.redeemGiftButton.emit();
158
173
  window.postMessage({ type: 'BEEGiftRedeem', itemId: id }, window.location.href);
174
+ await this.updateGifts();
159
175
  }
160
176
  else {
161
177
  window.postMessage({ type: 'BEEGiftRedeemFailed', itemId: id, err: res }, window.location.href);
@@ -163,7 +179,7 @@ const BonusElevateShop = class {
163
179
  }
164
180
  loadGifts(renderer) {
165
181
  if (this.isLoading) {
166
- return h("div", { class: "Loading" }, this.locale.loading);
182
+ return renderGiftsSkeleton();
167
183
  }
168
184
  else {
169
185
  if (this.gifts.length === 0) {
@@ -220,11 +236,12 @@ const BonusElevateShop = class {
220
236
  this.locale = Object.assign(Object.assign({}, translation['en']), translation[this.language]);
221
237
  }
222
238
  render() {
223
- return (h("main", { key: 'b3500b7f2d9ce92a6516f34d9e589538f888900a', class: "MainContainer" }, h("general-styling-wrapper", { key: '038ebd20a7676c1f2c44fa5decf2377ab0abed76', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: translation, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-pointcard", { key: 'dfe15faf5ffe2c6bc0d03d863159829fc85c1053', endpoint: this.endpoint, session: this.session, language: this.language, mbSource: this.mbSource, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), this.loadGifts(renderGifts.bind(this, this.gifts, this.locale, this.redeemGiftConfirm.bind(this))), h("div", { key: 'c77f4d76ed3383f2b58153eb7bfe3b5e1b922456', class: "ShopBottom" }, h("bonus-pagination-nav", { key: 'a383af9908f5eb3359c0c8d570c9b1edf50b3027', total: this.total, offset: this.offset, limit: this.limit, tableId: this.shopListId, "nav-item-account": 7, arrowsActive: false, "display-page-numbers": "true" }), h("general-input", { key: 'd4fb9240d952d8793e07b84a92ab35e84ca283b1', type: "dropdown", name: "pageLimits", displayName: this.locale.perPage, defaultValue: this.limit, validation: { mandatory: false }, options: this.pageLimitSelectOptions, emitValue: true, language: this.language, mbSource: this.mbSource, "client-styling-url": this.clientStylingUrl }))));
239
+ return (h("main", { key: 'e75f7ac6d1103d98d05196572b51bd84edf944ae', class: "MainContainer" }, h("general-styling-wrapper", { key: 'df22fe495b3fe624dc300cb60f0a46b06b735c17', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: translation, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-pointcard", { key: 'bceb900d830076400f385f82f964d9cfc1fd35b2', endpoint: this.endpoint, session: this.session, language: this.language, mbSource: this.mbSource, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), this.loadGifts(renderGifts.bind(this, this.gifts, this.locale, this.redeemGiftConfirm.bind(this))), h("div", { key: '9caecc74dc57353be54380068e20fa4f616b972a', class: "ShopBottom" }, h("bonus-pagination-nav", { key: '0be13e148c594b4cd130ed6c908bf73739c801cb', total: this.total, offset: this.offset, limit: this.limit, tableId: this.shopListId, "nav-item-account": 7, arrowsActive: false, "display-page-numbers": "true" }), h("general-input", { key: '4d7ed8b887731323d1c5e14d33fc76b8ac7c7ec6', type: "dropdown", name: "pageLimits", displayName: this.locale.perPage, defaultValue: this.limit, validation: { mandatory: false }, options: this.pageLimitSelectOptions, emitValue: true, language: this.language, mbSource: this.mbSource, "client-styling-url": this.clientStylingUrl }))));
224
240
  }
225
241
  handleMessage(message) {
226
242
  if (message.data.type === 'bee-redeem-confirmed' && message.data.id) {
227
- this.redeemGift(message.data.id);
243
+ this.isLoading = true;
244
+ this.redeemGift(message.data.id).finally(() => { this.isLoading = false; });
228
245
  }
229
246
  }
230
247
  async componentDidLoad() {
@@ -1193,4 +1210,178 @@ const PlayerElevatePointcard = class {
1193
1210
  };
1194
1211
  PlayerElevatePointcard.style = PlayerElevatePointcardStyle0;
1195
1212
 
1196
- export { BonusElevateShop as bonus_elevate_shop, BonusPaginationNav as bonus_pagination_nav, GeneralStylingWrapper as general_styling_wrapper, PlayerElevateCardData as player_elevate_card_data, PlayerElevatePointcard as player_elevate_pointcard };
1213
+ const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
1214
+ const UiSkeletonStyle0 = uiSkeletonCss;
1215
+
1216
+ const UiSkeleton = class {
1217
+ constructor(hostRef) {
1218
+ registerInstance(this, hostRef);
1219
+ this.stylingValue = {
1220
+ width: this.handleStylingProps(this.width),
1221
+ height: this.handleStylingProps(this.height),
1222
+ borderRadius: this.handleStylingProps(this.borderRadius),
1223
+ marginBottom: this.handleStylingProps(this.marginBottom),
1224
+ marginTop: this.handleStylingProps(this.marginTop),
1225
+ marginLeft: this.handleStylingProps(this.marginLeft),
1226
+ marginRight: this.handleStylingProps(this.marginRight),
1227
+ size: this.handleStylingProps(this.size),
1228
+ };
1229
+ this.structure = undefined;
1230
+ this.width = 'unset';
1231
+ this.height = 'unset';
1232
+ this.borderRadius = 'unset';
1233
+ this.marginBottom = 'unset';
1234
+ this.marginTop = 'unset';
1235
+ this.marginLeft = 'unset';
1236
+ this.marginRight = 'unset';
1237
+ this.animation = true;
1238
+ this.rows = 0;
1239
+ this.size = '100%';
1240
+ }
1241
+ handleStructureChange(newValue, oldValue) {
1242
+ if (oldValue !== newValue) {
1243
+ this.handleStructure(newValue);
1244
+ }
1245
+ }
1246
+ handleStylingProps(value) {
1247
+ switch (typeof value) {
1248
+ case 'number':
1249
+ return value === 0 ? 0 : `${value}px`;
1250
+ case 'undefined':
1251
+ return 'unset';
1252
+ case 'string':
1253
+ if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
1254
+ value.endsWith('px') ||
1255
+ value.endsWith('%')) {
1256
+ return value;
1257
+ }
1258
+ else {
1259
+ return 'unset';
1260
+ }
1261
+ default:
1262
+ return 'unset';
1263
+ }
1264
+ }
1265
+ handleStructure(structure) {
1266
+ switch (structure) {
1267
+ case 'logo':
1268
+ return this.renderLogo();
1269
+ case 'image':
1270
+ return this.renderImage();
1271
+ case 'title':
1272
+ return this.renderTitle();
1273
+ case 'text':
1274
+ return this.renderText();
1275
+ case 'rectangle':
1276
+ return this.renderRectangle();
1277
+ case 'circle':
1278
+ return this.renderCircle();
1279
+ default:
1280
+ return null;
1281
+ }
1282
+ }
1283
+ renderLogo() {
1284
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonLogo ' + (this.animation ? 'Skeleton' : '') })));
1285
+ }
1286
+ renderImage() {
1287
+ return h("div", { class: 'SkeletonImage ' + (this.animation ? 'Skeleton' : '') });
1288
+ }
1289
+ renderTitle() {
1290
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonTitle ' + (this.animation ? 'Skeleton' : '') })));
1291
+ }
1292
+ renderText() {
1293
+ return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class: 'SkeletonText ' + (this.animation ? 'Skeleton' : '') })))));
1294
+ }
1295
+ renderRectangle() {
1296
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonRectangle ' + (this.animation ? 'Skeleton' : '') })));
1297
+ }
1298
+ renderCircle() {
1299
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonCircle ' + (this.animation ? 'Skeleton' : '') })));
1300
+ }
1301
+ render() {
1302
+ let styleBlock = '';
1303
+ switch (this.structure) {
1304
+ case 'logo':
1305
+ styleBlock = `
1306
+ :host {
1307
+ --emw-skeleton-logo-width: ${this.stylingValue.width};
1308
+ --emw-skeleton-logo-height: ${this.stylingValue.height};
1309
+ --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
1310
+ --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
1311
+ --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
1312
+ --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
1313
+ --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
1314
+ }
1315
+ `;
1316
+ break;
1317
+ case 'image':
1318
+ styleBlock = `
1319
+ :host {
1320
+ --emw-skeleton-image-width: ${this.stylingValue.width};
1321
+ --emw-skeleton-image-height: ${this.stylingValue.height};
1322
+ --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
1323
+ --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
1324
+ --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
1325
+ --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
1326
+ --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
1327
+ }
1328
+ `;
1329
+ break;
1330
+ case 'title':
1331
+ styleBlock = `
1332
+ :host {
1333
+ --emw-skeleton-title-width: ${this.stylingValue.width};
1334
+ --emw-skeleton-title-height: ${this.stylingValue.height};
1335
+ --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
1336
+ --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
1337
+ --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
1338
+ --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
1339
+ --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
1340
+ }
1341
+ `;
1342
+ break;
1343
+ case 'text':
1344
+ styleBlock = `
1345
+ :host {
1346
+ --emw-skeleton-text-width: ${this.stylingValue.width};
1347
+ --emw-skeleton-text-height: ${this.stylingValue.height};
1348
+ --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
1349
+ --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
1350
+ --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
1351
+ --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
1352
+ --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
1353
+ }
1354
+ `;
1355
+ break;
1356
+ case 'rectangle':
1357
+ styleBlock = `
1358
+ :host {
1359
+ --emw-skeleton-rectangle-width: ${this.stylingValue.width};
1360
+ --emw-skeleton-rectangle-height: ${this.stylingValue.height};
1361
+ --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
1362
+ --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
1363
+ --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
1364
+ --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
1365
+ --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
1366
+ }
1367
+ `;
1368
+ break;
1369
+ case 'circle':
1370
+ styleBlock = `
1371
+ :host {
1372
+ --emw-skeleton-circle-size: ${this.stylingValue.size};
1373
+ }
1374
+ `;
1375
+ break;
1376
+ default:
1377
+ styleBlock = '';
1378
+ }
1379
+ return (h(Host, { key: 'c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8' }, h("style", { key: '9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19' }, styleBlock), this.handleStructure(this.structure)));
1380
+ }
1381
+ static get watchers() { return {
1382
+ "structure": ["handleStructureChange"]
1383
+ }; }
1384
+ };
1385
+ UiSkeleton.style = UiSkeletonStyle0;
1386
+
1387
+ export { BonusElevateShop as bonus_elevate_shop, BonusPaginationNav as bonus_pagination_nav, GeneralStylingWrapper as general_styling_wrapper, PlayerElevateCardData as player_elevate_card_data, PlayerElevatePointcard as player_elevate_pointcard, UiSkeleton as ui_skeleton };
@@ -49,10 +49,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
49
49
  }
50
50
  switch(bundleId) {
51
51
 
52
- case 'bonus-elevate-shop_5':
52
+ case 'bonus-elevate-shop_6':
53
53
  return import(
54
54
  /* webpackMode: "lazy" */
55
- './bonus-elevate-shop_5.entry.js').then(processMod, consoleError);
55
+ './bonus-elevate-shop_6.entry.js').then(processMod, consoleError);
56
56
  case 'player-elevate-card':
57
57
  return import(
58
58
  /* webpackMode: "lazy" */
@@ -1605,4 +1605,4 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1605
1605
  // src/runtime/nonce.ts
1606
1606
  var setNonce = (nonce) => plt.$nonce$ = nonce;
1607
1607
 
1608
- export { Fragment as F, getAssetPath as a, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
1608
+ export { Fragment as F, Host as H, getAssetPath as a, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-4bbe8850.js';
2
- export { s as setNonce } from './index-4bbe8850.js';
1
+ import { b as bootstrapLazy } from './index-19906d91.js';
2
+ export { s as setNonce } from './index-19906d91.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["bonus-elevate-shop_5",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"bonus-pagination-nav",{"total":[1538],"limit":[1538],"offset":[1538],"tableId":[1537,"table-id"],"language":[1537],"translationUrl":[513,"translation-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"displayPageNumbers":[1540,"display-page-numbers"],"displayRangeOfTotal":[1540,"display-range-of-total"],"navItemAccount":[1538,"nav-item-account"],"endPageIndex":[32],"pagesArray":[32],"currentPage":[32],"showAsEllipsisMid":[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"mbSource":["handleMbSourceChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard",[[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
8
+ return bootstrapLazy([["bonus-elevate-shop_6",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"bonus-pagination-nav",{"total":[1538],"limit":[1538],"offset":[1538],"tableId":[1537,"table-id"],"language":[1537],"translationUrl":[513,"translation-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"displayPageNumbers":[1540,"display-page-numbers"],"displayRangeOfTotal":[1540,"display-range-of-total"],"navItemAccount":[1538,"nav-item-account"],"endPageIndex":[32],"pagesArray":[32],"currentPage":[32],"showAsEllipsisMid":[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"mbSource":["handleMbSourceChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard",[[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,4 +1,4 @@
1
- import { h, a as getAssetPath } from './index-4bbe8850.js';
1
+ import { h, a as getAssetPath } from './index-19906d91.js';
2
2
  import { a as translate } from './locale.utils-10bf5b6c.js';
3
3
 
4
4
  function _typeof(o) {
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-4bbe8850.js';
2
- import { P as PlayerAvatar, a as PlayerPoints, b as PlayerNameDiv, c as PlayerElevateLoyaltyLevel, d as PlayerLoyaltyProcess, e as PlayerElevateCardRedeem } from './player-elevate-card-items-3e027a1b.js';
1
+ import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-19906d91.js';
2
+ import { P as PlayerAvatar, a as PlayerPoints, b as PlayerNameDiv, c as PlayerElevateLoyaltyLevel, d as PlayerLoyaltyProcess, e as PlayerElevateCardRedeem } from './player-elevate-card-items-1afa5433.js';
3
3
  import { T as TRANSLATIONS } from './locale.utils-10bf5b6c.js';
4
4
 
5
5
  const playerElevateCardCss = "@container (max-width: 270px) {\n .Card .Inner {\n flex-direction: column;\n }\n .Card .Inner .Content {\n padding: 9px;\n }\n .Inner .Row .ExpirationPoints {\n order: 1;\n }\n}\n.Card .PlayerImg {\n order: 0;\n}\n.Card .ExpirationPoints {\n order: 3;\n}\n.Card .LevelInfo {\n order: 2;\n}\n.Card .Inner .Row .PlayerImg {\n flex-direction: column;\n}\n.Card .Inner .Row .PointsInfo {\n width: 100%;\n text-align: center;\n display: flex;\n flex-direction: column;\n max-height: 50%;\n}\n.Card .Inner .PlayerAvatar .Badge {\n background-size: contain;\n background-repeat: no-repeat;\n position: absolute;\n right: 5px;\n bottom: -5px;\n width: 40%;\n height: 40%;\n overflow: visible;\n}\n.Card .Inner .Row .ExpirationPoints {\n text-align: left;\n color: var(--emw--color-red, red);\n}\n.Card .Inner .Row .Points {\n text-wrap: nowrap;\n}\n.Card .Inner .LevelInfo .ElevateLevel {\n flex-direction: column;\n}\n.Card .Inner .LevelInfo .ElevateLevel .LevelName {\n width: calc(100% - 20px);\n text-align: left;\n font-size: 13px;\n padding-left: 20px;\n margin: 10px 0;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpirationDate {\n text-align: center;\n font-size: smaller;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpireTime {\n margin-left: 5px;\n}";
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-4bbe8850.js';
2
- import { P as PlayerAvatar, a as PlayerPoints, d as PlayerLoyaltyProcess, L as LoyaltyLevelExpireDay } from './player-elevate-card-items-3e027a1b.js';
1
+ import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-19906d91.js';
2
+ import { P as PlayerAvatar, a as PlayerPoints, d as PlayerLoyaltyProcess, L as LoyaltyLevelExpireDay } from './player-elevate-card-items-1afa5433.js';
3
3
  import { t as translateWithParams, T as TRANSLATIONS } from './locale.utils-10bf5b6c.js';
4
4
 
5
5
  const playerElevateLoyaltycardCss = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:6px;margin-left:0px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:0px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}";
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-4bbe8850.js';
1
+ import { r as registerInstance, h } from './index-19906d91.js';
2
2
  import { a as translate, t as translateWithParams, T as TRANSLATIONS } from './locale.utils-10bf5b6c.js';
3
3
 
4
4
  const playerRakebackCardCss = ":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0deg)}}.RakebackCard{border:2px solid var(--em-color-border-primary, #003E5C);padding:32px;border-radius:var(--emw--border-radius-medium, 12px);overflow:hidden;font-family:inherit}.RakebackCard .RakebackCardContent .RakebackTitle{font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--em-color-text-secondary, #727672)}.RakebackCard .RakebackCardContent .RakebackDetails{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo{display:flex;flex-wrap:wrap;align-items:center;gap:0 17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh{width:52px;height:52px;cursor:pointer}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh.RakebackLoading{animation:rotate 0.5s linear infinite}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer{color:var(--em-color-text-primary, #fff);display:flex;align-items:center;gap:8px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackNum{display:inline-block;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-2x-large, 36px)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackCurrency{display:inline-block;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);margin-top:14px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton{font-family:inherit;cursor:pointer;width:90px;height:34px;border-radius:var(--emw--border-radius-large, 99px);border:2px solid var(--em-color-border-success, #083B17);display:flex;justify-content:center;align-items:center;color:var(--em-color-text-primary, #fff);background:linear-gradient(180deg, var(--em-color-gradient-1, #24B24E) 0%, var(--em-color-gradient-1, #24B24E) 100%)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton.disabled{cursor:not-allowed;opacity:0.4}.RakebackCard .RakebackCardContent .RakebackCoolOff,.RakebackCard .RakebackCardContent .RakebackError{margin-top:8px;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);color:var(--em-color-text-error, #FF7A73);text-align:center}";
@@ -4,6 +4,7 @@ import { TLocale } from '../../utils/translation';
4
4
  import "../../../../../../dist/packages/stencil/general-styling-wrapper/dist/types/index";
5
5
  import "../../../../../../dist/packages/stencil/player-elevate-card/dist/types/index";
6
6
  import "../../../../../../dist/packages/stencil/bonus-pagination-nav/dist/types/index";
7
+ import "../../../../../../dist/packages/stencil/ui-skeleton/dist/types/index";
7
8
  export declare class BonusElevateShop {
8
9
  /**
9
10
  * User Session
@@ -1,3 +1,4 @@
1
1
  import { Gift } from "../utils/types";
2
2
  import { TLocale } from "../utils/translation";
3
3
  export declare const renderGifts: (gifts: Gift[], locale: TLocale, redeem: Function) => any;
4
+ export declare const renderGiftsSkeleton: () => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/bonus-elevate-shop",
3
- "version": "1.94.76",
3
+ "version": "1.94.78",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{h as e,r as t,c as n,g as i,a,F as r}from"./index-4bbe8850.js";import{t as s,T as o,a as l}from"./locale.utils-10bf5b6c.js";import{r as d,t as h,g as c,P as g,a as p}from"./player-elevate-card-items-3e027a1b.js";async function v(e,t={},n={}){const{endpoint:i,language:a,session:r}=this,s=t;n.method&&"GET"!==n.method||(s.language=a);const o=((e,t={})=>e+"?"+Object.keys(t).map((e=>`${e}=${t[e]}`)).join("&"))(`${i}${e}`,s);n.headers||(n.headers={}),n.headers["x-SessionId"]=r;const l=await(async(e,t={})=>{let n;n=await fetch(e,t),n=await n.text();try{n=JSON.parse(n)}catch(e){console.error(e)}return n})(o,n);return l}const f={en:{Points:"Coins",Point:"Coin",loading:"Loading",noContent:"No Content",redeemGift:"Redeem Gift",perPage:"Per Page"},tr:{Points:"Coin",Point:"Coin",loading:"Yükleniyor",noContent:"İçerik Yok",redeemGift:"Hediye Al",perPage:"Sayfa Başına"}},b=(t,n,i)=>e("div",{class:"Gifts FlexLayout"},t.map((t=>{var a;const r=((e,t)=>{switch(e.available){case"true":return{extraClass:" active",onClick:()=>t(e.id)};case"false":return{extraClass:" deactive",onClick:()=>{}}}})(t,i),s=t.presentation;return e("div",{class:"Gift"},e("div",{class:"ImgContainer",onClick:()=>window.postMessage({type:"BEEShopImgClicked",itemId:t.id},window.location.href),style:Object.assign({},(o=(null===(a=s.assets)||void 0===a?void 0:a.length)>0?s.assets[0]:"",o?{backgroundImage:`url('${o}')`}:{}))}),e("div",{class:"InfoContainer"},e("div",null,e("div",{class:"Point"},t.points," ",1===t.points?n.Point:n.Points),e("div",{class:"Title"},(null==s?void 0:s.displayName)||t.displayName),e("div",{class:"Description"},(null==s?void 0:s.description)||"")),e("div",{class:`AvaliableWrap RedeemButton ${r.extraClass}`,onClick:r.onClick},n.redeemGift)));var o}))),u=class{constructor(e){t(this,e),this.redeemGiftButton=n(this,"redeemGiftButton",7),this.bindedHandler=this.handleMessage.bind(this),this.isInitialized=!1,this.session=void 0,this.endpoint=void 0,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.limit=10,this.navItemAccount=5,this.pageLimitOptions="10,25,50",this.locale=f.en,this.gifts=[],this.total=0,this.offset=0,this.shopListId="elevateShopList",this.isLoading=!0,this.pageLimitSelectOptions=[]}async onPropsChange(){this.isInitialized&&this.updateGifts()}async updateGifts(){if(this.isLoading=!0,this.session){const{data:e,total:t}=await v.bind(this,"/v1/elevate/shop",{pagination:`offset=${this.offset},limit=${this.limit}`}).call();this.gifts=e||[],this.total=t}else this.gifts=[],this.total=0;this.isLoading=!1}redeemGiftConfirm(e){const t=this.gifts.filter((t=>t.id===e))[0];window.postMessage({type:"BEERedeemConfirm",shopItem:t},window.location.href)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}async redeemGift(e){const t=await v.bind(this,"/v1/elevate/redeem",{},{method:"PUT",body:JSON.stringify({giftID:e}),headers:{"Content-Type":"application/json-patch+json"}}).call();t.success?(this.redeemGiftButton.emit(),window.postMessage({type:"BEEGiftRedeem",itemId:e},window.location.href)):window.postMessage({type:"BEEGiftRedeemFailed",itemId:e,err:t},window.location.href)}loadGifts(t){return this.isLoading?e("div",{class:"Loading"},this.locale.loading):0===this.gifts.length?e("div",{class:"NoContent"},this.locale.noContent):t()}setLimit(){try{const e=this.pageLimitOptions.split(",").map((e=>parseInt(e)));e.includes(this.limit)||(this.limit=e[0])}catch(e){console.error("Error when parse PageLimitOptions",e),this.limit=10}}onPageLimitChangedHandler(e){var t;this.isInitialized&&"pageLimits"===(null===(t=e.detail)||void 0===t?void 0:t.name)&&(this.limit=parseInt(e.detail.value||"10"),this.offset=0,this.updateGifts())}reloadPageByTypeHandler(e){var t;if((null===(t=e.detail)||void 0===t?void 0:t.tableId)!=this.shopListId)return;const{limit:n,offset:i}=e.detail;this.limit=n,this.offset=i||0,this.updateGifts()}componentWillLoad(){this.setLimit(),this.pageLimitSelectOptions=this.pageLimitOptions.split(",").map((e=>({label:e,value:e})))}componentWillRender(){this.locale=Object.assign(Object.assign({},f.en),f[this.language])}render(){return e("main",{key:"b3500b7f2d9ce92a6516f34d9e589538f888900a",class:"MainContainer"},e("general-styling-wrapper",{key:"038ebd20a7676c1f2c44fa5decf2377ab0abed76",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:f,translationUrl:this.translationUrl,mbSource:this.mbSource}),e("player-elevate-pointcard",{key:"dfe15faf5ffe2c6bc0d03d863159829fc85c1053",endpoint:this.endpoint,session:this.session,language:this.language,mbSource:this.mbSource,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),this.loadGifts(b.bind(this,this.gifts,this.locale,this.redeemGiftConfirm.bind(this))),e("div",{key:"c77f4d76ed3383f2b58153eb7bfe3b5e1b922456",class:"ShopBottom"},e("bonus-pagination-nav",{key:"a383af9908f5eb3359c0c8d570c9b1edf50b3027",total:this.total,offset:this.offset,limit:this.limit,tableId:this.shopListId,"nav-item-account":7,arrowsActive:!1,"display-page-numbers":"true"}),e("general-input",{key:"d4fb9240d952d8793e07b84a92ab35e84ca283b1",type:"dropdown",name:"pageLimits",displayName:this.locale.perPage,defaultValue:this.limit,validation:{mandatory:!1},options:this.pageLimitSelectOptions,emitValue:!0,language:this.language,mbSource:this.mbSource,"client-styling-url":this.clientStylingUrl})))}handleMessage(e){"bee-redeem-confirmed"===e.data.type&&e.data.id&&this.redeemGift(e.data.id)}async componentDidLoad(){this.updateGifts(),this.isInitialized=!0,window.addEventListener("message",this.bindedHandler,!1)}static get assetsDirs(){return["static"]}static get watchers(){return{endpoint:["onPropsChange"],language:["onPropsChange"],session:["onPropsChange"]}}};u.style=":host{display:block}svg circle{shape-rendering:crispEdges}.MainContainer{max-width:420px}.MainContainer player-elevate-pointcard{width:100%;height:220px}.MainContainer .ShopBottom{display:flex;flex-direction:row;justify-content:space-between}.Gifts{display:flex;justify-content:space-between;padding:15px;padding-left:-8px;padding-right:-8px;flex:0 0 45.1282051282%;flex-wrap:wrap;justify-content:flex-start;background:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black-150, #000000);font-weight:500;gap:10px;margin-top:-100px;position:relative;min-height:200px}.InfoContainer{display:flex;margin-top:17px;justify-content:space-between;flex-direction:column}.Gift{display:block;margin-bottom:10px;padding:8px;box-shadow:0px 18px 45px 0px var(--emw--color-black-150, rgba(167, 167, 167, 0.2));border-radius:11px;background:var(--emw--color-white, #FFFFFF)}.Gift .ImgContainer{width:160px;height:107px;border-radius:11px;box-shadow:0px 2px 6px 0px var(--emw--color-black-200, rgba(0, 0, 0, 0.2509803922));cursor:pointer;background-size:cover;background-position:center center;background-repeat:no-repeat}.Gift .Point{font-size:20px}.Gift .Title,.Gift .Description{padding-left:3px}.Gift .Title{font-size:14px;margin-top:10px}.Gift .Description{font-size:12px;color:var(--emw--color-black-100, #767171)}.Gift .AvaliableWrap{align-self:self-end}.Gift .AvaliableWrap.active{cursor:pointer}.Gift .AvaliableWrap.deactive{cursor:not-allowed}.Gift .AvaliableWrap span svg{width:var(--emw--elevate-avaliable-button-size, 46px)}.RedeemButton{width:100%;padding:5px 0px;border:2px solid var(--emw--button-border-color, rgba(8, 59, 23, 0.1098039216));text-align:center;color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-bold, 700);line-height:var(--emw--font-size-medium, 14px);text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 10px)}.RedeemButton.active{background:var(--emw--color-primary, #18CE51)}.RedeemButton.active:hover{background:var(--mmw--color-main-button-hover, #24B24E)}.RedeemButton.deactive{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843))}.NoContent{font-size:16px;color:var(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";const w=["pt-br","en","es-mx","hu","hr"],m={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},x=(e,t,n)=>{const i=t;let a=m[void 0!==i&&w.includes(i)?i:"en"][e];if(void 0!==n)for(const[e,t]of Object.entries(n.values)){const n=new RegExp(`{${e}}`,"g");a=a.replace(n,t)}return a},y=class{constructor(e){t(this,e),this.reloadPageEmitter=n(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=5,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(e){this.limit=e.detail.limit?e.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==e.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(e){"..."==e||0==e||parseInt(e.toString(),10)>this.endPageIndex+1||(this.currentPage=e,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return e("ul",{class:"PaginationArea"},this.pagesArray.map((t=>e("li",{class:"PageItem "+(this.currentPage==t?"Active":""),onClick:()=>{this.goTo(t)}},t))))}renderStylingWrapper(){return e("general-styling-wrapper",{targetTranslations:m,translationUrl:this.translationUrl})}generateNavItemsByType(e,t){if(this.endPageIndex<e)return Array.from({length:this.endPageIndex+1},((e,t)=>t+1));let n=[],i=Math.floor(e/2);const a=this.endPageIndex+1;return t?this.currentPage<i||this.currentPage>a-i+1?(n=Array.from({length:i},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i},((e,t)=>this.endPageIndex-1+t)))):this.currentPage==i?(n=Array.from({length:i+1},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i-1},((e,t)=>this.endPageIndex+t)))):this.currentPage==a-i+1?(n=Array.from({length:i-1},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i+1},((e,t)=>this.endPageIndex-2+t)))):(n=[1,"..."],n=n.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),n=n.concat(["...",a])):this.currentPage<=e-i?(n=Array.from({length:e-1},((e,t)=>t+1)),n.push("...")):this.currentPage>a-(e-i)?(n=Array.from({length:e-1},((t,n)=>a-(e-2)+n)),n.unshift("...")):(n=Array.from({length:e-2},((e,t)=>this.currentPage+t-i+1)),n.push("..."),n.unshift("...")),n}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return e("div",{key:"77610598f3ce40796b8d486fd27725fc68b61878",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&e("span",{key:"879bd2f268a18ea3c9cb2bb706d23c8db0634592",class:"PageOfMessage"},x("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),e("div",{key:"590af1c2fcb70d782b318c505deb507a8376e13b",class:"PageNavigation"},this.arrowsActive&&e("div",{key:"2d4746e889a43d6199ad7f305676d79bdbaa4f04",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},x("firstPage",this.language)),this.secondaryArrowsActive&&e("span",{key:"89b588abdf7b77e3cdc00f44bbad27c432146f97",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},x("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&e("span",{key:"097710df72de15cd1b0c03dfb2ac7870c99e12c0",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},x("nextPage",this.language)),this.arrowsActive&&e("div",{key:"a61296f3e627bc012545618c0fda239a1356da1f",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",x("lastPage",this.language)," "),this.renderStylingWrapper()))}};y.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emw--color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emw--color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emw--color-primary, #f5f1f1);background-color:var(--emw--color-secondary, #8c8989);border-radius:0.3rem}";const P="__WIDGET_GLOBAL_STYLE_CACHE__";function C(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function k(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function I(e,t,n,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return n=function(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{e&&(n.innerHTML=t,e.appendChild(n))}))}(e,t),n;window[P]||(window[P]={}),n=function(e,t){return window.emMessageBus.subscribe(t,(n=>{if(!e)return;const i=e.getRootNode(),a=window[P];let r=a[t]&&a[t].sheet;r?a[t].refCount=a[t].refCount+1:(r=new CSSStyleSheet,r.replaceSync(n),a[t]={sheet:r,refCount:1});const s=i.adoptedStyleSheets||[];s.includes(r)||(i.adoptedStyleSheets=[...s,r])}))}(e,t);const a=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[P][t]){const e=window[P][t];e.refCount>1?e.refCount=e.refCount-1:delete window[P][t]}a()},n}const L=class{constructor(e){t(this,e),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(this.mbSource&&I(this.el,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&C(this.el,this.clientStyling),this.clientStylingUrl&&k(this.el,this.clientStylingUrl),this.stylingAppends=!0)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleMbSourceChange(e,t){e!=t&&I(this.el,`${this.mbSource}.Style`,this.stylingSubscription)}handleClientStylingChange(e,t){e!=t&&C(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&k(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&C(this.el,this.clientStyling),this.clientStylingUrl&&k(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const i=(t=this.translationUrl,n=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{n[e]=n[e]||{},Object.keys(t[e]).forEach((i=>{if(!n.en[i])return;const a=n.en[i];"object"==typeof t[e][i]?(n[e][i]=n[e][i]||Object.assign({},a),Object.keys(t[e][i]).forEach((a=>{n[e][i][a]=t[e][i][a]}))):n[e][i]=t[e][i]||Object.assign({},a)}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(i)}var t,n;return await Promise.all(e)}render(){return e("div",{key:"e660ceb69f5e848c788c3924fc814c0fa7a777a2",class:"StyleShell"},e("slot",{key:"35014b6c0c32532af11e6a629ba9b13942504d21",name:"mainContent"}))}get el(){return i(this)}static get watchers(){return{mbSource:["handleMbSourceChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};function E(e){d(1,arguments);var t=h(e);return t.setHours(0,0,0,0),t}function S(e,t){return d(2,arguments),h(e).getTime()-h(t).getTime()}L.style=":host{display:block}";var A={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function B(e){return e?A[e]:A.trunc}const D=class{constructor(e){t(this,e),this.playerElevateLeveLoaded=n(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,t(!0)})).catch((e=>{n(e)}))))}calcuatePointsToBeExpired(e,t){let n="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return n;e.aboutToExpire.sort(((e,t)=>function(e,t){d(2,arguments);var n=h(e),i=h(t);return n.getTime()<i.getTime()}(new Date(e.expireTime),new Date(t.expireTime))?-1:1));const i=e.aboutToExpire[0],a=function(e,t){d(2,arguments);var n=E(e),i=E(t),a=n.getTime()-c(n),r=i.getTime()-c(i);return Math.round((a-r)/864e5)}(new Date(i.expireTime),new Date);let r=0,o=0,l=0===a?`${t}Day`:t;return a<=0&&(r=function(e,t,n){d(2,arguments);var i=S(e,t)/36e5;return B(null==n?void 0:n.roundingMethod)(i)}(new Date(i.expireTime),new Date,{roundingMethod:"floor"}),l=r>1?`${t}Hours`:`${t}Hour`,r<=0&&(o=function(e,t,n){d(2,arguments);var i=S(e,t)/6e4;return B(null==n?void 0:n.roundingMethod)(i)}(new Date(i.expireTime),new Date,{roundingMethod:"floor"}),l=o>1?`${t}Minutes`:`${t}Minute`)),n=s(l,{expirationPoints:i.points,expireDay:Math.max(a,r,o),lang:this.params.language}),n}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var i,a,r,s,o;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void n(!0);window.postMessage({type:"UpdateGamificationXp",points:null===(a=null===(i=e.data)||void 0===i?void 0:i.level)||void 0===a?void 0:a.loyaltyPoints},window.location.href);let l=e.data;this.playerElevateLevel=l.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(r=l.spendableWallet)||void 0===r?void 0:r.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const d=null===(s=e.data.spendableWallet)||void 0===s?void 0:s.total,h=null===(o=e.data.loyaltyWallet)||void 0===o?void 0:o.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:d,loyaltyWalletTotal:h});let c=this.calcuatePointsToBeExpired(d,"coinsToBeExpired"),g=this.calcuatePointsToBeExpired(h,"pointsToBeExpired");(c||g)&&this.playerElevateLeveLoaded.emit({pointExpireString:c,xpExpireString:g}),t(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),n(!0)}))))}setLoyaltyProgress(e){!function(e,t){const n=e.querySelector("#total_level"),i=n.getBBox().width,a=t>1?1:t,r=a*i-17<0?0:a*i-17,s=e.querySelector("#current_level"),o=e.querySelector("#filter_current_level"),l=e.querySelector("#circle_current_level");n.setAttribute("viewbox",`0 0 ${r} 28`),s.setAttribute("width",`${r}`),l.setAttribute("cx",`${r<6.5?6.5:r}`),o.setAttribute("x",""+(r-8));const d=e.querySelector("#lock"),h=e.querySelector("#filter_heart_ball"),c=e.querySelector("#filter_ball"),g=e.querySelector("#filter_heart"),p=e.querySelector("#filter_lock"),v=e.querySelector("#paint0_linear_ball"),f=e.querySelector("#paint1_linear_lock"),b=e.querySelector("#lock_box"),u=e.querySelector("#heart_box"),w=i-10;d.setAttribute("cx",`${w}`),f.setAttribute("x1",`${w}`),f.setAttribute("x2",`${w}`),v.setAttribute("x1",""+(w-6)),v.setAttribute("x2",""+(w-6+11.2)),p.setAttribute("x",""+(w-6)),g.setAttribute("x",""+(w-6-2)),c.setAttribute("x",""+(w-6-2-2)),h.setAttribute("x",""+(w-6-2-2-4)),b.setAttribute("x",""+(w-6)),u.setAttribute("x",""+(w-6)),n.parentElement.style.opacity="1"}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,t)=>e.firstEntryPoints>t.firstEntryPoints?1:-1));const t=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach(((e,i)=>{t>e.firstEntryPoints&&(n=i)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return i(this)}static get watchers(){return{params:["onParamsChanged"]}}};D.style=':host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emw--color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emw--color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: "";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emw--elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: var(--emw--border-radius-medium, 10px);\n background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emw--color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emw--color-red, #9e595f);\n}';const R=class{constructor(e){t(this,e),this.isPointDetailCard="earningRule"===this.buttonType,this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.mbSource=void 0,this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal,this.elevateSPTotal=e.detail.loyaltyWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const t=a("../static/card-ground.svg"),n=a("../static/card-ground-over.svg");return e("div",{key:"45aa5be359b46d5503a8310daa4db2029a8c59b8",class:`ElevateCardWrapper ${this.theme}`},e("div",{key:"0d1773bd9eb0913ede4eeedfc93f22967aa133d6",class:"PointsCard Outer ",style:{backgroundImage:`url(${t}`}},e("general-styling-wrapper",{key:"cfb35c5220633e39e25b11f0be5b6fc5cc73df5c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o,translationUrl:this.translationUrl,mbSource:this.mbSource}),e("player-elevate-card-data",{key:"25206c4deb6e51e3ea60259d4fee3452df8253d6",params:this.paramProxy}),e("div",{key:"c14ee3498a1a584b7f484fe2ef6a204c337d2b27",class:"OuterCover Inner",style:{backgroundImage:`url(${n}`}},e("div",{key:"dd7e0528034013d889f1f9bfbacf7928d2b4d1e9",class:"Content Row"},this.playerElevateLevel&&e(r,{key:"20b36f112f735446a6219b61e012e4568f199717"},e("div",{key:"3705136c1ee509484f43b7268b23cfbe273f727c",class:"PlayerImg"},e(g,{key:"b81cbcff0528acd3253a676e0a64141c6414fc2a",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),e("div",{key:"311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58",class:`LevelInfo ${this.playerElevateLevel.name}`},e("div",{key:"ba1744b3b9cee03a424093df96454ff68d04aec1",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:l("spendablePoints",this.language)),e("div",{key:"6b554d17a0f74684e23549365fb06f6079ba7239",class:"PointsTxt SPPoints"},e(p,{key:"a4c479500b38337c51a451aa3f482f195a2c827f",spendablePoints:this.playerElevateLevel.spendablePoints<=0?0:this.playerElevateLevel.spendablePoints,language:this.language}),e("a",{key:"896780fe3b4556d7eccbaac6eb5c1a715952bab0",class:"TC",onClick:()=>{this.onDetailsClick()}},l("termAndConditions",this.language))),this.pointExpireString&&e("div",{key:"e8556ee3033e9a1365fc8912321ae2b42f200bbe",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};R.style=":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}";export{u as bonus_elevate_shop,y as bonus_pagination_nav,L as general_styling_wrapper,D as player_elevate_card_data,R as player_elevate_pointcard}