@everymatrix/casino-header-controller-nd 1.50.0 → 1.52.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 (29) hide show
  1. package/components/{CasinoHamburgerMenuNd-BnENP9MM.cjs → CasinoHamburgerMenuNd-BZ67WYAG.cjs} +3 -3
  2. package/components/{CasinoHamburgerMenuNd-Bs3cob6Z.js → CasinoHamburgerMenuNd-zaMLQqFG.js} +294 -285
  3. package/components/{CasinoHeaderControllerNd-geqjLjIz.js → CasinoHeaderControllerNd-1rDV2VOr.js} +49 -43
  4. package/components/CasinoHeaderControllerNd-CPfJUdB_.cjs +1 -0
  5. package/components/{PlayerAccountBalanceModalNd-D9D6AWYC.js → PlayerAccountBalanceModalNd-BhOHwnw5.js} +81 -70
  6. package/components/PlayerAccountBalanceModalNd-DtlIScQl.cjs +13 -0
  7. package/components/{PlayerDeposit-Dok-qi_l.cjs → PlayerDeposit-CB-HaILi.cjs} +1 -1
  8. package/components/{PlayerDeposit-DNfu5HDn.js → PlayerDeposit-wVbCjsPY.js} +32 -32
  9. package/es2015/casino-header-controller-nd.cjs +1 -1
  10. package/es2015/casino-header-controller-nd.js +1 -1
  11. package/package.json +3 -2
  12. package/stencil/{gamification-dropdown-498ae904-DpZf5Exb.cjs → gamification-dropdown-456bb56a-BNBBLNsh.cjs} +1 -1
  13. package/stencil/{gamification-dropdown-498ae904-Dvuugqyp.js → gamification-dropdown-456bb56a-BdUyUmVP.js} +1 -1
  14. package/stencil/gamification-dropdown-DiubO5ew.cjs +1 -0
  15. package/stencil/{gamification-dropdown-Dx5S6y_S.js → gamification-dropdown-Dz6DNlrv.js} +1 -1
  16. package/stencil/{gamification-dropdown_4-CtZI21hk.cjs → gamification-dropdown_4-BEPN8PGr.cjs} +2 -2
  17. package/stencil/{gamification-dropdown_4-De9Z-Zt_.js → gamification-dropdown_4-BkIgVyzQ.js} +4 -4
  18. package/stencil/{index-0ad2daf0-BKeWSFX3.js → index-171550cf-BERgCb0j.js} +199 -191
  19. package/stencil/index-171550cf-Dl1Iozjj.cjs +1 -0
  20. package/stencil/{player-elevate-card-BQnhai7H.cjs → player-elevate-card-B9D3G-JZ.cjs} +1 -1
  21. package/stencil/{player-elevate-card-DgFw98B3.js → player-elevate-card-ClnI63vD.js} +2 -2
  22. package/stencil/{player-elevate-card-items-7f8f7bd8-DYuv0i85.cjs → player-elevate-card-items-2078bd83-BXFKNOJZ.cjs} +1 -1
  23. package/stencil/{player-elevate-card-items-7f8f7bd8-BNjjXUCI.js → player-elevate-card-items-2078bd83-Bbsxz5tr.js} +1 -1
  24. package/stencil/{player-elevate-pointcard-DidFBWJW.cjs → player-elevate-pointcard-CBAMD0_H.cjs} +1 -1
  25. package/stencil/{player-elevate-pointcard-DlzEmeiG.js → player-elevate-pointcard-EE4MG3CK.js} +2 -2
  26. package/components/CasinoHeaderControllerNd-CJwIkZaD.cjs +0 -1
  27. package/components/PlayerAccountBalanceModalNd-CSPJovW9.cjs +0 -13
  28. package/stencil/gamification-dropdown-D8vUxPGk.cjs +0 -1
  29. package/stencil/index-0ad2daf0-BHol-vm2.cjs +0 -1
@@ -1,11 +1,11 @@
1
- import { b as K, $ as V, S as X, i as Z, f as D, c as $, s as ee, d as te, g as _, h as L, B as k, j as d, M as P, l as S, m as p, C as E, D as j, r as T, v as ie, K as ae, w as se, z as M, n as re, F as ne, G as z, J as oe } from "./CasinoHamburgerMenuNd-Bs3cob6Z.js";
2
- function A(a, e) {
1
+ import { b as K, $ as V, S as X, i as Z, f as b, c as $, s as ee, d as te, g as _, h as L, B as k, j as d, M as P, l as S, m as p, C as E, D as z, r as T, v as ie, K as ae, w as se, z as M, n as re, F as ne, G as A, J as oe } from "./CasinoHamburgerMenuNd-zaMLQqFG.js";
2
+ function W(a, e) {
3
3
  K(a, e);
4
4
  }
5
5
  function le(a) {
6
6
  V.set(a);
7
7
  }
8
- const W = {
8
+ const j = {
9
9
  en: {
10
10
  titleDeposit: "Deposit",
11
11
  loading: "Loading, please wait ..."
@@ -48,24 +48,24 @@ const W = {
48
48
  }
49
49
  };
50
50
  function ce(a) {
51
- te(a, "svelte-141ijwb", "button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}");
51
+ te(a, "svelte-lvm6lo", "button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}");
52
52
  }
53
53
  function de(a) {
54
54
  let e, i, n, s, l, m, c, u, y, o, r = (
55
55
  /*$_*/
56
56
  a[4]("titleDeposit") + ""
57
- ), h, b, v;
57
+ ), h, D, v;
58
58
  return {
59
59
  c() {
60
60
  e = _("div"), i = M("svg"), n = M("defs"), s = M("style"), l = k(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), m = M("g"), c = M("g"), u = M("path"), y = L(), o = _("h2"), h = k(r), d(u, "class", "aaa"), d(u, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), d(u, "transform", "translate(15 15) rotate(180)"), d(c, "transform", "translate(20 158)"), d(m, "transform", "translate(-20 -158)"), d(i, "xmlns", "http://www.w3.org/2000/svg"), d(i, "width", "15"), d(i, "height", "15"), d(i, "viewBox", "0 0 15 15"), d(o, "class", "DepositTitleMobile"), d(e, "class", "MenuReturnButton");
61
61
  },
62
62
  m(g, C) {
63
- S(g, e, C), p(e, i), p(i, n), p(n, s), p(s, l), p(i, m), p(m, c), p(c, u), p(e, y), p(e, o), p(o, h), b || (v = re(
63
+ S(g, e, C), p(e, i), p(i, n), p(n, s), p(s, l), p(i, m), p(m, c), p(c, u), p(e, y), p(e, o), p(o, h), D || (v = re(
64
64
  e,
65
65
  "click",
66
66
  /*click_handler*/
67
67
  a[17]
68
- ), b = !0);
68
+ ), D = !0);
69
69
  },
70
70
  p(g, C) {
71
71
  C & /*$_*/
@@ -73,7 +73,7 @@ function de(a) {
73
73
  g[4]("titleDeposit") + "") && E(h, r);
74
74
  },
75
75
  d(g) {
76
- g && T(e), b = !1, v();
76
+ g && T(e), D = !1, v();
77
77
  }
78
78
  };
79
79
  }
@@ -81,7 +81,7 @@ function he(a) {
81
81
  let e, i, n;
82
82
  return {
83
83
  c() {
84
- e = _("div"), i = _("iframe"), z(i.src, n = /*iframeUrl*/
84
+ e = _("div"), i = _("iframe"), A(i.src, n = /*iframeUrl*/
85
85
  a[3]) || d(i, "src", n), d(i, "title", "Deposit Iframe"), d(e, "class", "DepositIframeWrapper");
86
86
  },
87
87
  m(s, l) {
@@ -89,7 +89,7 @@ function he(a) {
89
89
  },
90
90
  p(s, l) {
91
91
  l & /*iframeUrl*/
92
- 8 && !z(i.src, n = /*iframeUrl*/
92
+ 8 && !A(i.src, n = /*iframeUrl*/
93
93
  s[3]) && d(i, "src", n);
94
94
  },
95
95
  d(s) {
@@ -160,8 +160,8 @@ function ue(a) {
160
160
  r[2]
161
161
  );
162
162
  },
163
- i: j,
164
- o: j,
163
+ i: z,
164
+ o: z,
165
165
  d(r) {
166
166
  r && T(e), c && c.d(), o.d(), a[18](null);
167
167
  }
@@ -170,18 +170,18 @@ function ue(a) {
170
170
  function ge(a, e, i) {
171
171
  let n, s;
172
172
  ie(a, oe, (t) => i(4, s = t));
173
- let { endpoint: l = "" } = e, { session: m = "" } = e, { playerid: c = "" } = e, { lang: u = "en" } = e, { hasdefaultamount: y = "" } = e, { clientstyling: o = "" } = e, { clientstylingurl: r = "" } = e, { translationurl: h = "" } = e, { playercurrency: b = "" } = e, { shortcashierenabled: v = "false" } = e, g, C = window.navigator.userAgent, R = ae(C) !== "PC", B = !0, F, x = 0, U = "";
173
+ let { endpoint: l = "" } = e, { session: m = "" } = e, { playerid: c = "" } = e, { lang: u = "en" } = e, { hasdefaultamount: y = "" } = e, { clientstyling: o = "" } = e, { clientstylingurl: r = "" } = e, { translationurl: h = "" } = e, { playercurrency: D = "" } = e, { shortcashierenabled: v = "false" } = e, g, C = window.navigator.userAgent, R = ae(C) !== "PC", B = !0, F, x = 0, U = "";
174
174
  const G = () => {
175
175
  fetch(h).then((w) => w.json()).then((w) => {
176
176
  Object.keys(w).forEach((f) => {
177
- A(f, w[f]);
177
+ W(f, w[f]);
178
178
  });
179
179
  }).catch((w) => {
180
180
  console.log(w);
181
181
  });
182
182
  };
183
- Object.keys(W).forEach((t) => {
184
- A(t, W[t]);
183
+ Object.keys(j).forEach((t) => {
184
+ W(t, j[t]);
185
185
  });
186
186
  const H = () => {
187
187
  window.postMessage({ type: "GoToPreviousRoute", isMobile: R }, window.location.href);
@@ -189,7 +189,7 @@ function ge(a, e, i) {
189
189
  if (t.data) {
190
190
  switch (t.data.type) {
191
191
  case "ProfileDetailsData":
192
- i(7, b = t.data.profileDetails.currency);
192
+ i(7, D = t.data.profileDetails.currency);
193
193
  break;
194
194
  }
195
195
  switch (t.data["MMFE:setQuickDepositHeight"] && i(2, F = t.data["MMFE:setQuickDepositHeight"].toString() + "px"), t.data["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), t.data.redirect) {
@@ -221,7 +221,7 @@ function ge(a, e, i) {
221
221
  }, N = () => {
222
222
  let t = new URL(`${l}/v1/player/${c}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);
223
223
  if (t.searchParams.append("language", u), n && t.searchParams.append("isShortCashier", v), y)
224
- switch (b) {
224
+ switch (D) {
225
225
  case "USD":
226
226
  x = 0.4;
227
227
  break;
@@ -233,7 +233,7 @@ function ge(a, e, i) {
233
233
  method: "POST",
234
234
  headers: {
235
235
  "X-SessionId": m,
236
- currency: b || "EUR",
236
+ currency: D || "EUR",
237
237
  amount: x,
238
238
  cashierMode: "Default",
239
239
  IsShortCashier: v,
@@ -274,7 +274,7 @@ function ge(a, e, i) {
274
274
  });
275
275
  }
276
276
  return a.$$set = (t) => {
277
- "endpoint" in t && i(8, l = t.endpoint), "session" in t && i(9, m = t.session), "playerid" in t && i(10, c = t.playerid), "lang" in t && i(11, u = t.lang), "hasdefaultamount" in t && i(12, y = t.hasdefaultamount), "clientstyling" in t && i(13, o = t.clientstyling), "clientstylingurl" in t && i(14, r = t.clientstylingurl), "translationurl" in t && i(15, h = t.translationurl), "playercurrency" in t && i(7, b = t.playercurrency), "shortcashierenabled" in t && i(16, v = t.shortcashierenabled);
277
+ "endpoint" in t && i(8, l = t.endpoint), "session" in t && i(9, m = t.session), "playerid" in t && i(10, c = t.playerid), "lang" in t && i(11, u = t.lang), "hasdefaultamount" in t && i(12, y = t.hasdefaultamount), "clientstyling" in t && i(13, o = t.clientstyling), "clientstylingurl" in t && i(14, r = t.clientstylingurl), "translationurl" in t && i(15, h = t.translationurl), "playercurrency" in t && i(7, D = t.playercurrency), "shortcashierenabled" in t && i(16, v = t.shortcashierenabled);
278
278
  }, a.$$.update = () => {
279
279
  a.$$.dirty & /*lang*/
280
280
  2048 && u && O(), a.$$.dirty & /*shortcashierenabled*/
@@ -282,7 +282,7 @@ function ge(a, e, i) {
282
282
  16385 && r && g && Q(), a.$$.dirty & /*clientstyling, customStylingContainer*/
283
283
  8193 && o && g && q(), a.$$.dirty & /*translationurl*/
284
284
  32768 && h && G(), a.$$.dirty & /*session, playerid, endpoint, playercurrency, lang, shortcashierenabled*/
285
- 69504 && m && c && l && b && u && v && N();
285
+ 69504 && m && c && l && D && u && v && N();
286
286
  }, [
287
287
  g,
288
288
  B,
@@ -291,7 +291,7 @@ function ge(a, e, i) {
291
291
  s,
292
292
  R,
293
293
  H,
294
- b,
294
+ D,
295
295
  l,
296
296
  m,
297
297
  c,
@@ -332,61 +332,61 @@ class me extends X {
332
332
  return this.$$.ctx[8];
333
333
  }
334
334
  set endpoint(e) {
335
- this.$$set({ endpoint: e }), D();
335
+ this.$$set({ endpoint: e }), b();
336
336
  }
337
337
  get session() {
338
338
  return this.$$.ctx[9];
339
339
  }
340
340
  set session(e) {
341
- this.$$set({ session: e }), D();
341
+ this.$$set({ session: e }), b();
342
342
  }
343
343
  get playerid() {
344
344
  return this.$$.ctx[10];
345
345
  }
346
346
  set playerid(e) {
347
- this.$$set({ playerid: e }), D();
347
+ this.$$set({ playerid: e }), b();
348
348
  }
349
349
  get lang() {
350
350
  return this.$$.ctx[11];
351
351
  }
352
352
  set lang(e) {
353
- this.$$set({ lang: e }), D();
353
+ this.$$set({ lang: e }), b();
354
354
  }
355
355
  get hasdefaultamount() {
356
356
  return this.$$.ctx[12];
357
357
  }
358
358
  set hasdefaultamount(e) {
359
- this.$$set({ hasdefaultamount: e }), D();
359
+ this.$$set({ hasdefaultamount: e }), b();
360
360
  }
361
361
  get clientstyling() {
362
362
  return this.$$.ctx[13];
363
363
  }
364
364
  set clientstyling(e) {
365
- this.$$set({ clientstyling: e }), D();
365
+ this.$$set({ clientstyling: e }), b();
366
366
  }
367
367
  get clientstylingurl() {
368
368
  return this.$$.ctx[14];
369
369
  }
370
370
  set clientstylingurl(e) {
371
- this.$$set({ clientstylingurl: e }), D();
371
+ this.$$set({ clientstylingurl: e }), b();
372
372
  }
373
373
  get translationurl() {
374
374
  return this.$$.ctx[15];
375
375
  }
376
376
  set translationurl(e) {
377
- this.$$set({ translationurl: e }), D();
377
+ this.$$set({ translationurl: e }), b();
378
378
  }
379
379
  get playercurrency() {
380
380
  return this.$$.ctx[7];
381
381
  }
382
382
  set playercurrency(e) {
383
- this.$$set({ playercurrency: e }), D();
383
+ this.$$set({ playercurrency: e }), b();
384
384
  }
385
385
  get shortcashierenabled() {
386
386
  return this.$$.ctx[16];
387
387
  }
388
388
  set shortcashierenabled(e) {
389
- this.$$set({ shortcashierenabled: e }), D();
389
+ this.$$set({ shortcashierenabled: e }), b();
390
390
  }
391
391
  }
392
392
  $(me, { endpoint: {}, session: {}, playerid: {}, lang: {}, hasdefaultamount: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, playercurrency: {}, shortcashierenabled: {} }, [], [], !0);
@@ -1 +1 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoHeaderControllerNd-CJwIkZaD.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller-nd")&&customElements.define("casino-header-controller-nd",t.element)})}
1
+ "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoHeaderControllerNd-CPfJUdB_.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller-nd")&&customElements.define("casino-header-controller-nd",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-geqjLjIz.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-1rDV2VOr.js").then(({ default: t }) => {
14
14
  !customElements.get("casino-header-controller-nd") && customElements.define("casino-header-controller-nd", t.element);
15
15
  });
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-header-controller-nd",
3
- "version": "1.50.0",
3
+ "version": "1.52.0",
4
4
  "type": "module",
5
5
  "main": "es2015/casino-header-controller-nd.cjs",
6
6
  "module": "es2015/casino-header-controller-nd.js",
@@ -22,6 +22,7 @@
22
22
  "dependencies": {
23
23
  "@everymatrix/casino-hamburger-menu-nd": "1.45.7",
24
24
  "@everymatrix/player-account-balance-modal-nd": "1.45.7",
25
- "@everymatrix/player-deposit": "1.45.7"
25
+ "@everymatrix/player-deposit": "1.45.7",
26
+ "@everymatrix/gamification-dropdown": "*"
26
27
  }
27
28
  }
@@ -1 +1 @@
1
- "use strict";var p=(e,t,i)=>new Promise((n,a)=>{var o=r=>{try{l(i.next(r))}catch(d){a(d)}},c=r=>{try{l(i.throw(r))}catch(d){a(d)}},l=r=>r.done?n(r.value):Promise.resolve(r.value).then(o,c);l((i=i.apply(e,t)).next())});const s=require("./index-0ad2daf0-BHol-vm2.cjs"),m="en";let h={en:{gamificationNoPoints:"No points"},de:{gamificationNoPoints:"No points"},ro:{gamificationNoPoints:"No points"},fr:{gamificationNoPoints:"No points"},ar:{gamificationNoPoints:"No points"},hr:{gamificationNoPoints:"No points"}};const g=e=>new Promise(t=>{fetch(e).then(i=>i.json()).then(i=>{Object.keys(i).forEach(n=>{h[n]||(h[n]={});for(let a in i[n])h[n][a]=i[n][a]}),t(!0)})}),u=(e,t)=>{const i=t;return h[i!==void 0&&i in h?i:m][e]},y=":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}",w=y,f=class{constructor(e){s.registerInstance(this,e),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{i.innerHTML=n,setTimeout(()=>{this.stylingContainer.prepend(i)},1)}).catch(n=>{console.log("error ",n)})},this.navigateToGamification=()=>{window.postMessage({type:"NavigateToGamification"},window.location.href),this.isOpen=!1},this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick))},this.handleDropdownClick=t=>{t.stopPropagation(),this.isOpen=!this.isOpen,this.isOpen?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)},this.endpoint=void 0,this.language="en",this.session="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.stylingAppends=!1,this.loyaltyPoints=void 0}handleNewTranslations(){this.isLoading=!0,g(this.translationUrl).then(()=>{this.isLoading=!1})}componentWillLoad(){return p(this,null,function*(){if(this.translationUrl.length>2&&(yield g(this.translationUrl)),this.endpoint&&this.language)return this.fetchPointsData()})}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}fetchPointsData(){let e=new URL(`${this.endpoint}/v1/elevate/playerInfo`);e.searchParams.append("language",this.language);const t=new Headers;t.append("X-SessionId",this.session);const i={method:"GET",headers:t};return new Promise((n,a)=>{this.isLoading=!0,fetch(e.href,i).then(o=>o.json()).then(o=>{var c,l;this.loyaltyPoints=(l=(c=o==null?void 0:o.data)===null||c===void 0?void 0:c.level)===null||l===void 0?void 0:l.loyaltyPoints,n(!0)}).catch(o=>{console.error(o),a(o)}).finally(()=>{this.isLoading=!1})})}render(){return this.isLoading?null:s.h("div",{ref:e=>this.stylingContainer=e,class:"GamificationDropdownContainer"},s.h("button",{class:`GamificationDropdownButton ${this.isOpen?"IsOpen":""}`,type:"button",onClick:e=>this.handleDropdownClick(e),title:typeof this.loyaltyPoints=="number"?String(this.loyaltyPoints):u("gamificationNoPoints",this.language)},typeof this.loyaltyPoints=="number"?`${this.loyaltyPoints} XP`:"...",s.h("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},s.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},s.h("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),this.isOpen&&s.h("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},s.h("player-elevate-loyaltycard",{endpoint:this.endpoint,session:this.session,language:this.language,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling})))}get el(){return s.getElement(this)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};f.style=w;exports.GamificationDropdown=f;
1
+ "use strict";var p=(e,t,i)=>new Promise((n,a)=>{var o=r=>{try{l(i.next(r))}catch(d){a(d)}},c=r=>{try{l(i.throw(r))}catch(d){a(d)}},l=r=>r.done?n(r.value):Promise.resolve(r.value).then(o,c);l((i=i.apply(e,t)).next())});const s=require("./index-171550cf-Dl1Iozjj.cjs"),m="en";let h={en:{gamificationNoPoints:"No points"},de:{gamificationNoPoints:"No points"},ro:{gamificationNoPoints:"No points"},fr:{gamificationNoPoints:"No points"},ar:{gamificationNoPoints:"No points"},hr:{gamificationNoPoints:"No points"}};const g=e=>new Promise(t=>{fetch(e).then(i=>i.json()).then(i=>{Object.keys(i).forEach(n=>{h[n]||(h[n]={});for(let a in i[n])h[n][a]=i[n][a]}),t(!0)})}),u=(e,t)=>{const i=t;return h[i!==void 0&&i in h?i:m][e]},y=":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}",w=y,f=class{constructor(e){s.registerInstance(this,e),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{i.innerHTML=n,setTimeout(()=>{this.stylingContainer.prepend(i)},1)}).catch(n=>{console.log("error ",n)})},this.navigateToGamification=()=>{window.postMessage({type:"NavigateToGamification"},window.location.href),this.isOpen=!1},this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick))},this.handleDropdownClick=t=>{t.stopPropagation(),this.isOpen=!this.isOpen,this.isOpen?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)},this.endpoint=void 0,this.language="en",this.session="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.stylingAppends=!1,this.loyaltyPoints=void 0}handleNewTranslations(){this.isLoading=!0,g(this.translationUrl).then(()=>{this.isLoading=!1})}componentWillLoad(){return p(this,null,function*(){if(this.translationUrl.length>2&&(yield g(this.translationUrl)),this.endpoint&&this.language)return this.fetchPointsData()})}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}fetchPointsData(){let e=new URL(`${this.endpoint}/v1/elevate/playerInfo`);e.searchParams.append("language",this.language);const t=new Headers;t.append("X-SessionId",this.session);const i={method:"GET",headers:t};return new Promise((n,a)=>{this.isLoading=!0,fetch(e.href,i).then(o=>o.json()).then(o=>{var c,l;this.loyaltyPoints=(l=(c=o==null?void 0:o.data)===null||c===void 0?void 0:c.level)===null||l===void 0?void 0:l.loyaltyPoints,n(!0)}).catch(o=>{console.error(o),a(o)}).finally(()=>{this.isLoading=!1})})}render(){return this.isLoading?null:s.h("div",{ref:e=>this.stylingContainer=e,class:"GamificationDropdownContainer"},s.h("button",{class:`GamificationDropdownButton ${this.isOpen?"IsOpen":""}`,type:"button",onClick:e=>this.handleDropdownClick(e),title:typeof this.loyaltyPoints=="number"?String(this.loyaltyPoints):u("gamificationNoPoints",this.language)},typeof this.loyaltyPoints=="number"?`${this.loyaltyPoints} XP`:"...",s.h("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},s.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},s.h("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),this.isOpen&&s.h("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},s.h("player-elevate-loyaltycard",{endpoint:this.endpoint,session:this.session,language:this.language,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling})))}get el(){return s.getElement(this)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};f.style=w;exports.GamificationDropdown=f;
@@ -14,7 +14,7 @@ var p = (e, i, t) => new Promise((n, s) => {
14
14
  }, a = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(o, c);
15
15
  a((t = t.apply(e, i)).next());
16
16
  });
17
- import { r as f, h as r, g as m } from "./index-0ad2daf0-BKeWSFX3.js";
17
+ import { r as f, h as r, g as m } from "./index-171550cf-BERgCb0j.js";
18
18
  const y = "en";
19
19
  let h = {
20
20
  en: {
@@ -0,0 +1 @@
1
+ "use strict";var s=(n,a,t)=>new Promise((d,o)=>{var y=e=>{try{l(t.next(e))}catch(r){o(r)}},g=e=>{try{l(t.throw(e))}catch(r){o(r)}},l=e=>e.done?d(e.value):Promise.resolve(e.value).then(y,g);l((t=t.apply(n,a)).next())});const p=require("./index-171550cf-Dl1Iozjj.cjs"),c=require("./app-globals-0f993ce5-sCt45RkC.cjs");var i=typeof document!="undefined"?document.currentScript:null,u=()=>{const n=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:i&&i.tagName.toUpperCase()==="SCRIPT"&&i.src||new URL("stencil/gamification-dropdown-DiubO5ew.cjs",document.baseURI).href,a={};return n!==""&&(a.resourcesUrl=new URL(".",n).href),p.promiseResolve(a)};u().then(n=>s(exports,null,function*(){return yield c.globalScripts(),p.bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{endpoint:[513],language:[513],session:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isOpen:[32],isLoading:[32],stylingAppends:[32],loyaltyPoints:[32]},null,{translationUrl:["handleNewTranslations"]}],[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"],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"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}]]],["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"],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-pointcard",[[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],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"]}]]]],n)}));
@@ -14,7 +14,7 @@ var o = (a, n, t) => new Promise((s, i) => {
14
14
  }, l = (e) => e.done ? s(e.value) : Promise.resolve(e.value).then(p, d);
15
15
  l((t = t.apply(a, n)).next());
16
16
  });
17
- import { b as y, p as g } from "./index-0ad2daf0-BKeWSFX3.js";
17
+ import { b as y, p as g } from "./index-171550cf-BERgCb0j.js";
18
18
  import { g as v } from "./app-globals-0f993ce5-D-kw1sls.js";
19
19
  var c = () => {
20
20
  const a = import.meta.url, n = {};
@@ -1,4 +1,4 @@
1
- "use strict";var f=(e,t,a)=>new Promise((n,l)=>{var i=d=>{try{s(a.next(d))}catch(p){l(p)}},v=d=>{try{s(a.throw(d))}catch(p){l(p)}},s=d=>d.done?n(d.value):Promise.resolve(d.value).then(i,v);s((a=a.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./gamification-dropdown-498ae904-DpZf5Exb.cjs"),r=require("./index-0ad2daf0-BHol-vm2.cjs"),o=require("./player-elevate-card-items-7f8f7bd8-DYuv0i85.cjs"),B=(e,t)=>new Promise(a=>{fetch(e).then(n=>n.json()).then(n=>{Object.keys(n).forEach(l=>{t[l]=t[l]?t[l]:{};for(let i in n[l])t[l][i]=n[l][i]}),a(!0)})}),M=":host{display:block}",R=M,L=class{constructor(e){r.registerInstance(this,e),this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),a=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{a.innerHTML=n,setTimeout(()=>{this.el.prepend(a)},1)}).catch(n=>{console.log("error ",n)})},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}componentWillLoad(){return f(this,null,function*(){const e=[];if(this.translationUrl){const t=B(this.translationUrl,this.targetTranslations);e.push(t)}return yield Promise.all(e)})}render(){return r.h("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},r.h("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return r.getElement(this)}};L.style=R;function x(e){o.requiredArgs(1,arguments);var t=o.toDate(e);return t.setHours(0,0,0,0),t}var O=864e5;function N(e,t){o.requiredArgs(2,arguments);var a=x(e),n=x(t),l=a.getTime()-o.getTimezoneOffsetInMilliseconds(a),i=n.getTime()-o.getTimezoneOffsetInMilliseconds(n);return Math.round((l-i)/O)}var q=6e4,W=36e5;function b(e,t){return o.requiredArgs(2,arguments),o.toDate(e).getTime()-o.toDate(t).getTime()}var m={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},$="trunc";function E(e){return e?m[e]:m[$]}function z(e,t,a){o.requiredArgs(2,arguments);var n=b(e,t)/W;return E(a==null?void 0:a.roundingMethod)(n)}function U(e,t,a){o.requiredArgs(2,arguments);var n=b(e,t)/q;return E(a==null?void 0:a.roundingMethod)(n)}function F(e,t){o.requiredArgs(2,arguments);var a=o.toDate(e),n=o.toDate(t);return a.getTime()<n.getTime()}function j(e,t){const a=e.querySelector("#total_level"),n=17,l=6.5,i=a.getBBox().width,v=t>1?1:t,s=v*i-n<0?0:v*i-n,d=e.querySelector("#current_level"),p=e.querySelector("#filter_current_level"),h=e.querySelector("#circle_current_level");a.setAttribute("viewbox",`0 0 ${s} 28`),d.setAttribute("width",`${s}`),h.setAttribute("cx",`${s<l?l:s}`),p.setAttribute("x",`${s-8}`);const g=e.querySelector("#lock"),P=e.querySelector("#filter_heart_ball"),C=e.querySelector("#filter_ball"),S=e.querySelector("#filter_heart"),k=e.querySelector("#filter_lock"),y=e.querySelector("#paint0_linear_ball"),u=e.querySelector("#paint1_linear_lock"),T=e.querySelector("#lock_box"),A=e.querySelector("#heart_box"),D=10,c=i-D;g.setAttribute("cx",`${c}`),u.setAttribute("x1",`${c}`),u.setAttribute("x2",`${c}`),y.setAttribute("x1",`${c-6}`),y.setAttribute("x2",`${c-6+11.2}`),k.setAttribute("x",`${c-6}`),S.setAttribute("x",`${c-6-2}`),C.setAttribute("x",`${c-6-2-2}`),P.setAttribute("x",`${c-6-2-2-4}`),T.setAttribute("x",`${c-6}`),A.setAttribute("x",`${c-6}`),a.parentElement.style.opacity="1"}const H=`:host {
1
+ "use strict";var f=(e,t,a)=>new Promise((n,l)=>{var i=d=>{try{s(a.next(d))}catch(p){l(p)}},v=d=>{try{s(a.throw(d))}catch(p){l(p)}},s=d=>d.done?n(d.value):Promise.resolve(d.value).then(i,v);s((a=a.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./gamification-dropdown-456bb56a-BNBBLNsh.cjs"),r=require("./index-171550cf-Dl1Iozjj.cjs"),o=require("./player-elevate-card-items-2078bd83-BXFKNOJZ.cjs"),B=(e,t)=>new Promise(a=>{fetch(e).then(n=>n.json()).then(n=>{Object.keys(n).forEach(l=>{t[l]=t[l]?t[l]:{};for(let i in n[l])t[l][i]=n[l][i]}),a(!0)})}),M=":host{display:block}",R=M,b=class{constructor(e){r.registerInstance(this,e),this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),a=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{a.innerHTML=n,setTimeout(()=>{this.el.prepend(a)},1)}).catch(n=>{console.log("error ",n)})},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}componentWillLoad(){return f(this,null,function*(){const e=[];if(this.translationUrl){const t=B(this.translationUrl,this.targetTranslations);e.push(t)}return yield Promise.all(e)})}render(){return r.h("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},r.h("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return r.getElement(this)}};b.style=R;function x(e){o.requiredArgs(1,arguments);var t=o.toDate(e);return t.setHours(0,0,0,0),t}var O=864e5;function N(e,t){o.requiredArgs(2,arguments);var a=x(e),n=x(t),l=a.getTime()-o.getTimezoneOffsetInMilliseconds(a),i=n.getTime()-o.getTimezoneOffsetInMilliseconds(n);return Math.round((l-i)/O)}var q=6e4,W=36e5;function L(e,t){return o.requiredArgs(2,arguments),o.toDate(e).getTime()-o.toDate(t).getTime()}var m={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},$="trunc";function E(e){return e?m[e]:m[$]}function z(e,t,a){o.requiredArgs(2,arguments);var n=L(e,t)/W;return E(a==null?void 0:a.roundingMethod)(n)}function U(e,t,a){o.requiredArgs(2,arguments);var n=L(e,t)/q;return E(a==null?void 0:a.roundingMethod)(n)}function F(e,t){o.requiredArgs(2,arguments);var a=o.toDate(e),n=o.toDate(t);return a.getTime()<n.getTime()}function j(e,t){const a=e.querySelector("#total_level"),n=17,l=6.5,i=a.getBBox().width,v=t>1?1:t,s=v*i-n<0?0:v*i-n,d=e.querySelector("#current_level"),p=e.querySelector("#filter_current_level"),h=e.querySelector("#circle_current_level");a.setAttribute("viewbox",`0 0 ${s} 28`),d.setAttribute("width",`${s}`),h.setAttribute("cx",`${s<l?l:s}`),p.setAttribute("x",`${s-8}`);const g=e.querySelector("#lock"),P=e.querySelector("#filter_heart_ball"),C=e.querySelector("#filter_ball"),S=e.querySelector("#filter_heart"),k=e.querySelector("#filter_lock"),y=e.querySelector("#paint0_linear_ball"),u=e.querySelector("#paint1_linear_lock"),T=e.querySelector("#lock_box"),A=e.querySelector("#heart_box"),D=10,c=i-D;g.setAttribute("cx",`${c}`),u.setAttribute("x1",`${c}`),u.setAttribute("x2",`${c}`),y.setAttribute("x1",`${c-6}`),y.setAttribute("x2",`${c-6+11.2}`),k.setAttribute("x",`${c-6}`),S.setAttribute("x",`${c-6-2}`),C.setAttribute("x",`${c-6-2-2}`),P.setAttribute("x",`${c-6-2-2-4}`),T.setAttribute("x",`${c-6}`),A.setAttribute("x",`${c-6}`),a.parentElement.style.opacity="1"}const H=`:host {
2
2
  display: block;
3
3
  width: 360px;
4
4
  height: 230px;
@@ -189,4 +189,4 @@
189
189
  text-align: right;
190
190
  font-weight: bold;
191
191
  color: var(--emw--color-red, #9e595f);
192
- }`,G=H,w=class{constructor(e){r.registerInstance(this,e),this.playerElevateLeveLoaded=r.createEvent(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,a)=>fetch(e.href,{method:"GET"}).then(n=>n.json()).then(n=>{this.levels=n.data,t(!0)}).catch(n=>{a(n)}))}calcuatePointsToBeExpired(e){let t="";if(!e||!e.aboutToExpire||e.aboutToExpire.length==0||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort((s,d)=>F(new Date(s.expireTime),new Date(d.expireTime))?-1:1);const a=e.aboutToExpire[0],n=N(new Date(a.expireTime),new Date);let l=0,i=0,v=n===0?"pointsToBeExpiredDay":"pointsToBeExpired";return n==0&&(l=z(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),v=l>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour"),l==0&&(i=U(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),v=i>1?"pointsToBeExpiredMinutes":"pointsToBeExpiredMinute"),t=o.translateWithParams(v,{expirationPoints:a.points,expireDay:Math.max(n,l,i)}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{var l,i,v;if(!n.success){console.error("Exception when fetch user elevateinfo, ",n.errorCode,n.errorMessage),a(!0);return}let s=n.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=((l=s.spendableWallet)===null||l===void 0?void 0:l.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const d=(i=n.data.spendableWallet)===null||i===void 0?void 0:i.total,p=(v=n.data.loyaltyWallet)===null||v===void 0?void 0:v.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:d,loyaltyWalletTotal:p});let h=this.calcuatePointsToBeExpired(d),g=this.calcuatePointsToBeExpired(p);(h||g)&&this.playerElevateLeveLoaded.emit({pointExpireString:h,xpExpireString:g}),t(this.playerElevateLevel)}).catch(n=>{console.log("error ",n),a(!0)}))}setLoyaltyProgress(e){j(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(t=>{if(console.log("elevate-init",t),this.initLevelProgressbar(),!this.levels)return;this.levels.sort((l,i)=>l.firstEntryPoints>i.firstEntryPoints?1:-1);const a=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach((l,i)=>{a>l.firstEntryPoints&&(n=i)}),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})})}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return r.getElement(this)}static get watchers(){return{params:["onParamsChanged"]}}};w.style=G;const X=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:11px;margin-left:5px}}@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:5px}.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}",K=X,I=class{constructor(e){r.registerInstance(this,e),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=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),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,t;return!((e=this.playerElevateLevel)===null||e===void 0)&&e.nextLevel?(t=this.playerElevateLevel)===null||t===void 0?void 0:t.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let t=(e=this.playerElevateLevel)===null||e===void 0?void 0:e.nextLevel;if(this.playerElevateLevel&&t){const a=(t.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return o.translateWithParams("tipsForNextLevel",{pointsToReach:a,levelName:t.name,lang:this.language})}return""}render(){const e=r.getAssetPath("../static/card-ground.svg"),t=r.getAssetPath("../static/card-ground-over.svg");return r.h("div",{key:"2b0944f8317a94621e1bc65bbbb3726654b8963b",class:`ElevateCardWrapper ${this.theme}`},r.h("div",{key:"c6d4dbba143435b4485d7fde91ab0a48a2f6688b",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},r.h("general-styling-wrapper",{key:"e47a4efe925eb35d4449c6ff33a0afef9d284e55",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o.TRANSLATIONS,translationUrl:this.translationUrl}),r.h("player-elevate-card-data",{key:"a560991893305894ddd41756cd7b3c32d0ef9e03",params:this.paramProxy}),r.h("div",{key:"ceb8b71386f84f54518a3694535aa16c2c3d3951",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},r.h("div",{key:"1df9647c3de42e74adee0f8895511442118ae381",class:"Content Row"},this.playerElevateLevel&&r.h(r.Fragment,{key:"569bcd5fc3c578d2e6cc7442d28444e29688660c"},r.h("div",{key:"aa40032bff99c5462b906e4427232ca2d4019017",class:"PlayerImg"},r.h(o.PlayerAvatar,{key:"7a2d535b0c2029c90b9f1c123f9feebafca6bdde",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),r.h("div",{key:"90999da8fc2a3102eac235fcbc8afbec2a2bbdf8",class:`LevelInfo ${this.playerElevateLevel.name}`},r.h(o.PlayerElevateLoyaltyLevel,{key:"67e8bf370b1b77e776fb6d955ae63928fd1338d8",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),r.h("div",{key:"1e0fefc6a23f4aeeef5e19828399fe1229a3fc81",class:"PointsRange"},r.h(o.PlayerPoints,{key:"dd176e624cde3b6f517101d7702a15465305174d",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),r.h(o.PlayerPoints,{key:"6cddb64c92545803d08fbbc513cc951b2691a42e",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),this.pointExpireString&&r.h("div",{key:"6ead0fa321a73f2f4ae69e1c424037b739c85994",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),r.h(o.PlayerLoyaltyProcess,{key:"53c623e1852fd47fddec758159c4bf6e82be1aaa"}),r.h("div",{key:"99894852a3f1751e80010fff0c1a841562963f6e",class:"NextLevelTip"},this.getNextLevelTips())))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};I.style=K;exports.gamification_dropdown=_.GamificationDropdown;exports.general_styling_wrapper=L;exports.player_elevate_card_data=w;exports.player_elevate_loyaltycard=I;
192
+ }`,G=H,w=class{constructor(e){r.registerInstance(this,e),this.playerElevateLeveLoaded=r.createEvent(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,a)=>fetch(e.href,{method:"GET"}).then(n=>n.json()).then(n=>{this.levels=n.data,t(!0)}).catch(n=>{a(n)}))}calcuatePointsToBeExpired(e){let t="";if(!e||!e.aboutToExpire||e.aboutToExpire.length==0||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort((s,d)=>F(new Date(s.expireTime),new Date(d.expireTime))?-1:1);const a=e.aboutToExpire[0],n=N(new Date(a.expireTime),new Date);let l=0,i=0,v=n===0?"pointsToBeExpiredDay":"pointsToBeExpired";return n<=0&&(l=z(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),v=l>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour",l<=0&&(i=U(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),v=i>1?"pointsToBeExpiredMinutes":"pointsToBeExpiredMinute")),t=o.translateWithParams(v,{expirationPoints:a.points,expireDay:Math.max(n,l,i)}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{var l,i,v;if(!n.success){console.error("Exception when fetch user elevateinfo, ",n.errorCode,n.errorMessage),a(!0);return}let s=n.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=((l=s.spendableWallet)===null||l===void 0?void 0:l.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const d=(i=n.data.spendableWallet)===null||i===void 0?void 0:i.total,p=(v=n.data.loyaltyWallet)===null||v===void 0?void 0:v.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:d,loyaltyWalletTotal:p});let h=this.calcuatePointsToBeExpired(d),g=this.calcuatePointsToBeExpired(p);(h||g)&&this.playerElevateLeveLoaded.emit({pointExpireString:h,xpExpireString:g}),t(this.playerElevateLevel)}).catch(n=>{console.log("error ",n),a(!0)}))}setLoyaltyProgress(e){j(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(t=>{if(console.log("elevate-init",t),this.initLevelProgressbar(),!this.levels)return;this.levels.sort((l,i)=>l.firstEntryPoints>i.firstEntryPoints?1:-1);const a=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach((l,i)=>{a>l.firstEntryPoints&&(n=i)}),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})})}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return r.getElement(this)}static get watchers(){return{params:["onParamsChanged"]}}};w.style=G;const X=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:11px;margin-left:5px}}@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:5px}.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}",K=X,I=class{constructor(e){r.registerInstance(this,e),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=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),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,t;return!((e=this.playerElevateLevel)===null||e===void 0)&&e.nextLevel?(t=this.playerElevateLevel)===null||t===void 0?void 0:t.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let t=(e=this.playerElevateLevel)===null||e===void 0?void 0:e.nextLevel;if(this.playerElevateLevel&&t){const a=(t.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return o.translateWithParams("tipsForNextLevel",{pointsToReach:a,levelName:t.name,lang:this.language})}return""}render(){const e=r.getAssetPath("../static/card-ground.svg"),t=r.getAssetPath("../static/card-ground-over.svg");return r.h("div",{key:"2b0944f8317a94621e1bc65bbbb3726654b8963b",class:`ElevateCardWrapper ${this.theme}`},r.h("div",{key:"c6d4dbba143435b4485d7fde91ab0a48a2f6688b",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},r.h("general-styling-wrapper",{key:"e47a4efe925eb35d4449c6ff33a0afef9d284e55",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o.TRANSLATIONS,translationUrl:this.translationUrl}),r.h("player-elevate-card-data",{key:"a560991893305894ddd41756cd7b3c32d0ef9e03",params:this.paramProxy}),r.h("div",{key:"ceb8b71386f84f54518a3694535aa16c2c3d3951",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},r.h("div",{key:"1df9647c3de42e74adee0f8895511442118ae381",class:"Content Row"},this.playerElevateLevel&&r.h(r.Fragment,{key:"569bcd5fc3c578d2e6cc7442d28444e29688660c"},r.h("div",{key:"aa40032bff99c5462b906e4427232ca2d4019017",class:"PlayerImg"},r.h(o.PlayerAvatar,{key:"7a2d535b0c2029c90b9f1c123f9feebafca6bdde",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),r.h("div",{key:"90999da8fc2a3102eac235fcbc8afbec2a2bbdf8",class:`LevelInfo ${this.playerElevateLevel.name}`},r.h(o.PlayerElevateLoyaltyLevel,{key:"67e8bf370b1b77e776fb6d955ae63928fd1338d8",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),r.h("div",{key:"1e0fefc6a23f4aeeef5e19828399fe1229a3fc81",class:"PointsRange"},r.h(o.PlayerPoints,{key:"dd176e624cde3b6f517101d7702a15465305174d",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),r.h(o.PlayerPoints,{key:"6cddb64c92545803d08fbbc513cc951b2691a42e",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),this.pointExpireString&&r.h("div",{key:"6ead0fa321a73f2f4ae69e1c424037b739c85994",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),r.h(o.PlayerLoyaltyProcess,{key:"53c623e1852fd47fddec758159c4bf6e82be1aaa"}),r.h("div",{key:"99894852a3f1751e80010fff0c1a841562963f6e",class:"NextLevelTip"},this.getNextLevelTips())))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};I.style=K;exports.gamification_dropdown=_.GamificationDropdown;exports.general_styling_wrapper=b;exports.player_elevate_card_data=w;exports.player_elevate_loyaltycard=I;
@@ -14,9 +14,9 @@ var m = (e, t, a) => new Promise((n, r) => {
14
14
  }, o = (s) => s.done ? n(s.value) : Promise.resolve(s.value).then(l, d);
15
15
  o((a = a.apply(e, t)).next());
16
16
  });
17
- import { G as pe } from "./gamification-dropdown-498ae904-Dvuugqyp.js";
18
- import { r as u, h as i, g as P, c as O, a as L, F as N } from "./index-0ad2daf0-BKeWSFX3.js";
19
- import { t as k, T as $, P as W, a as z, b, c as U, r as p, g as E, d as h } from "./player-elevate-card-items-7f8f7bd8-BNjjXUCI.js";
17
+ import { G as pe } from "./gamification-dropdown-456bb56a-BdUyUmVP.js";
18
+ import { r as u, h as i, g as P, c as O, a as L, F as N } from "./index-171550cf-BERgCb0j.js";
19
+ import { t as k, T as $, P as W, a as z, b, c as U, r as p, g as E, d as h } from "./player-elevate-card-items-2078bd83-Bbsxz5tr.js";
20
20
  const q = (e, t) => new Promise((a) => {
21
21
  fetch(e).then((n) => n.json()).then((n) => {
22
22
  Object.keys(n).forEach((r) => {
@@ -334,7 +334,7 @@ const te = `:host {
334
334
  e.aboutToExpire.sort((o, s) => Z(new Date(o.expireTime), new Date(s.expireTime)) ? -1 : 1);
335
335
  const a = e.aboutToExpire[0], n = X(new Date(a.expireTime), /* @__PURE__ */ new Date());
336
336
  let r = 0, l = 0, d = n === 0 ? "pointsToBeExpiredDay" : "pointsToBeExpired";
337
- return n == 0 && (r = Q(new Date(a.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), d = r > 1 ? "pointsToBeExpiredHours" : "pointsToBeExpiredHour"), r == 0 && (l = V(new Date(a.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), d = l > 1 ? "pointsToBeExpiredMinutes" : "pointsToBeExpiredMinute"), t = k(d, {
337
+ return n <= 0 && (r = Q(new Date(a.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), d = r > 1 ? "pointsToBeExpiredHours" : "pointsToBeExpiredHour", r <= 0 && (l = V(new Date(a.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), d = l > 1 ? "pointsToBeExpiredMinutes" : "pointsToBeExpiredMinute")), t = k(d, {
338
338
  expirationPoints: a.points,
339
339
  expireDay: Math.max(n, r, l)
340
340
  }), t;