@everymatrix/casino-header-controller-nd 1.50.1 → 1.52.1

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 (28) hide show
  1. package/components/{CasinoHamburgerMenuNd-hHBgAJIy.cjs → CasinoHamburgerMenuNd-Bf-SulOR.cjs} +1 -1
  2. package/components/{CasinoHamburgerMenuNd-DXHMzvrj.js → CasinoHamburgerMenuNd-Bqf9XfUx.js} +4 -1
  3. package/components/CasinoHeaderControllerNd-B4BPBBGp.cjs +1 -0
  4. package/components/{CasinoHeaderControllerNd-ONyb70X5.js → CasinoHeaderControllerNd-Bo8vQzwB.js} +49 -43
  5. package/components/{PlayerAccountBalanceModalNd-D8pssL4n.js → PlayerAccountBalanceModalNd-B7Kj6tQQ.js} +81 -70
  6. package/components/PlayerAccountBalanceModalNd-DASITiS-.cjs +13 -0
  7. package/components/{PlayerDeposit-HWZAJAWI.cjs → PlayerDeposit-CbsNwNAY.cjs} +1 -1
  8. package/components/{PlayerDeposit-Buvi-7s6.js → PlayerDeposit-TqxwYhJD.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-Dvuugqyp.js → gamification-dropdown-456bb56a-CldmfDdk.js} +1 -1
  13. package/stencil/{gamification-dropdown-498ae904-DpZf5Exb.cjs → gamification-dropdown-456bb56a-ClnsHPoT.cjs} +1 -1
  14. package/stencil/{gamification-dropdown-B-tH3KS1.cjs → gamification-dropdown-CnrQK1ei.cjs} +1 -1
  15. package/stencil/{gamification-dropdown-Dx5S6y_S.js → gamification-dropdown-FVqK4we0.js} +1 -1
  16. package/stencil/{gamification-dropdown_4-De9Z-Zt_.js → gamification-dropdown_4-BZffGACN.js} +6 -6
  17. package/stencil/{gamification-dropdown_4-CtZI21hk.cjs → gamification-dropdown_4-DNV5b4s7.cjs} +2 -2
  18. package/stencil/index-171550cf-BY--MwdX.cjs +1 -0
  19. package/stencil/{index-0ad2daf0-BKeWSFX3.js → index-171550cf-CVTOm2AV.js} +199 -191
  20. package/stencil/{player-elevate-card-DgFw98B3.js → player-elevate-card-CGn57laL.js} +2 -2
  21. package/stencil/{player-elevate-card-BQnhai7H.cjs → player-elevate-card-CW-95gEJ.cjs} +1 -1
  22. package/stencil/{player-elevate-card-items-7f8f7bd8-DYuv0i85.cjs → player-elevate-card-items-2078bd83-DSxFMBLz.cjs} +1 -1
  23. package/stencil/{player-elevate-card-items-7f8f7bd8-BNjjXUCI.js → player-elevate-card-items-2078bd83-DvW50KrW.js} +1 -1
  24. package/stencil/{player-elevate-pointcard-DidFBWJW.cjs → player-elevate-pointcard-DVgy3cq3.cjs} +1 -1
  25. package/stencil/{player-elevate-pointcard-DlzEmeiG.js → player-elevate-pointcard-teAW1AOh.js} +2 -2
  26. package/components/CasinoHeaderControllerNd-Q4h3hRty.cjs +0 -1
  27. package/components/PlayerAccountBalanceModalNd-Bz1io_Hk.cjs +0 -13
  28. 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-DXHMzvrj.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-Bqf9XfUx.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-Q4h3hRty.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-B4BPBBGp.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-ONyb70X5.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-Bo8vQzwB.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.1",
3
+ "version": "1.52.1",
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
  }
@@ -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-CVTOm2AV.js";
18
18
  const y = "en";
19
19
  let h = {
20
20
  en: {
@@ -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-BY--MwdX.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 +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-0ad2daf0-BHol-vm2.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-B-tH3KS1.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)}));
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-BY--MwdX.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-CnrQK1ei.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-CVTOm2AV.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 = {};
@@ -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-CldmfDdk.js";
18
+ import { r as u, h as i, g as P, c as O, a as b, F as N } from "./index-171550cf-CVTOm2AV.js";
19
+ import { t as k, T as $, P as W, a as z, b as L, c as U, r as p, g as E, d as h } from "./player-elevate-card-items-2078bd83-DvW50KrW.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;
@@ -448,8 +448,8 @@ const re = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
448
448
  return "";
449
449
  }
450
450
  render() {
451
- const e = L("../static/card-ground.svg"), t = L("../static/card-ground-over.svg");
452
- return i("div", { key: "2b0944f8317a94621e1bc65bbbb3726654b8963b", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "c6d4dbba143435b4485d7fde91ab0a48a2f6688b", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "e47a4efe925eb35d4449c6ff33a0afef9d284e55", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: $, translationUrl: this.translationUrl }), i("player-elevate-card-data", { key: "a560991893305894ddd41756cd7b3c32d0ef9e03", params: this.paramProxy }), i("div", { key: "ceb8b71386f84f54518a3694535aa16c2c3d3951", class: "OuterCover Inner", style: { backgroundImage: `url(${t}` } }, i("div", { key: "1df9647c3de42e74adee0f8895511442118ae381", class: "Content Row" }, this.playerElevateLevel && i(N, { key: "569bcd5fc3c578d2e6cc7442d28444e29688660c" }, i("div", { key: "aa40032bff99c5462b906e4427232ca2d4019017", class: "PlayerImg" }, i(W, { key: "7a2d535b0c2029c90b9f1c123f9feebafca6bdde", onlyBadge: !0, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), i("div", { key: "90999da8fc2a3102eac235fcbc8afbec2a2bbdf8", class: `LevelInfo ${this.playerElevateLevel.name}` }, i(z, { key: "67e8bf370b1b77e776fb6d955ae63928fd1338d8", hideInfo: !0, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), i("div", { key: "1e0fefc6a23f4aeeef5e19828399fe1229a3fc81", class: "PointsRange" }, i(b, { key: "dd176e624cde3b6f517101d7702a15465305174d", loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), i(b, { key: "6cddb64c92545803d08fbbc513cc951b2691a42e", loyaltyPoints: this.getNextLevelPoints(), language: this.language })), this.pointExpireString && i("div", { key: "6ead0fa321a73f2f4ae69e1c424037b739c85994", class: "PointsInfo ExpirationPoints" }, this.pointExpireString, " "), i(U, { key: "53c623e1852fd47fddec758159c4bf6e82be1aaa" }), i("div", { key: "99894852a3f1751e80010fff0c1a841562963f6e", class: "NextLevelTip" }, this.getNextLevelTips())))))));
451
+ const e = b("../static/card-ground.svg"), t = b("../static/card-ground-over.svg");
452
+ return i("div", { key: "2b0944f8317a94621e1bc65bbbb3726654b8963b", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "c6d4dbba143435b4485d7fde91ab0a48a2f6688b", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "e47a4efe925eb35d4449c6ff33a0afef9d284e55", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: $, translationUrl: this.translationUrl }), i("player-elevate-card-data", { key: "a560991893305894ddd41756cd7b3c32d0ef9e03", params: this.paramProxy }), i("div", { key: "ceb8b71386f84f54518a3694535aa16c2c3d3951", class: "OuterCover Inner", style: { backgroundImage: `url(${t}` } }, i("div", { key: "1df9647c3de42e74adee0f8895511442118ae381", class: "Content Row" }, this.playerElevateLevel && i(N, { key: "569bcd5fc3c578d2e6cc7442d28444e29688660c" }, i("div", { key: "aa40032bff99c5462b906e4427232ca2d4019017", class: "PlayerImg" }, i(W, { key: "7a2d535b0c2029c90b9f1c123f9feebafca6bdde", onlyBadge: !0, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), i("div", { key: "90999da8fc2a3102eac235fcbc8afbec2a2bbdf8", class: `LevelInfo ${this.playerElevateLevel.name}` }, i(z, { key: "67e8bf370b1b77e776fb6d955ae63928fd1338d8", hideInfo: !0, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), i("div", { key: "1e0fefc6a23f4aeeef5e19828399fe1229a3fc81", class: "PointsRange" }, i(L, { key: "dd176e624cde3b6f517101d7702a15465305174d", loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), i(L, { key: "6cddb64c92545803d08fbbc513cc951b2691a42e", loyaltyPoints: this.getNextLevelPoints(), language: this.language })), i(U, { key: "08817ca979ea784aeb735579b0d52e5150eb0852" }), i("div", { key: "be9a1b40a8145d5e6d329d8e9f047296e84dd24b", class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && i("div", { key: "f9cbb7d06e34717cb9f74cb8d2e506e49969e775", class: "PointsInfo ExpirationPoints" }, this.pointExpireString, " ")))))));
453
453
  }
454
454
  static get watchers() {
455
455
  return {
@@ -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-ClnsHPoT.cjs"),r=require("./index-171550cf-BY--MwdX.cjs"),o=require("./player-elevate-card-items-2078bd83-DSxFMBLz.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,m=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)}};m.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 b={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?b[e]:b[$]}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})),r.h(o.PlayerLoyaltyProcess,{key:"08817ca979ea784aeb735579b0d52e5150eb0852"}),r.h("div",{key:"be9a1b40a8145d5e6d329d8e9f047296e84dd24b",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&r.h("div",{key:"f9cbb7d06e34717cb9f74cb8d2e506e49969e775",class:"PointsInfo ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};I.style=K;exports.gamification_dropdown=_.GamificationDropdown;exports.general_styling_wrapper=m;exports.player_elevate_card_data=w;exports.player_elevate_loyaltycard=I;
@@ -0,0 +1 @@
1
+ "use strict";var Fe=Object.defineProperty;var ee=Object.getOwnPropertySymbols;var He=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var te=(e,t,s)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,se=(e,t)=>{for(var s in t||(t={}))He.call(t,s)&&te(e,s,t[s]);if(ee)for(var s of ee(t))Ne.call(t,s)&&te(e,s,t[s]);return e};var U=(e,t,s)=>new Promise((r,n)=>{var l=a=>{try{i(s.next(a))}catch($){n($)}},o=a=>{try{i(s.throw(a))}catch($){n($)}},i=a=>a.done?r(a.value):Promise.resolve(a.value).then(l,o);i((s=s.apply(e,t)).next())});const qe="gamification-dropdown",_={allRenderFn:!1,appendChildSlotFix:!1,asyncLoading:!0,asyncQueue:!1,attachStyles:!0,cloneNodeFix:!1,cmpDidLoad:!1,cmpDidRender:!0,cmpDidUnload:!1,cmpDidUpdate:!1,cmpShouldUpdate:!1,cmpWillLoad:!0,cmpWillRender:!1,cmpWillUpdate:!1,connectedCallback:!1,constructableCSS:!0,cssAnnotations:!0,devTools:!1,disconnectedCallback:!1,element:!1,event:!0,experimentalScopedSlotChanges:!1,experimentalSlotFixes:!1,formAssociated:!1,hasRenderFn:!0,hostListener:!0,hostListenerTarget:!0,hostListenerTargetBody:!1,hostListenerTargetDocument:!1,hostListenerTargetParent:!1,hostListenerTargetWindow:!0,hotModuleReplacement:!1,hydrateClientSide:!1,hydrateServerSide:!1,hydratedAttribute:!1,hydratedClass:!0,hydratedSelectorName:"hydrated",initializeNextTick:!1,invisiblePrehydration:!0,isDebug:!1,isDev:!1,isTesting:!1,lazyLoad:!0,lifecycle:!0,lifecycleDOMEvents:!1,member:!0,method:!1,mode:!1,observeAttribute:!0,profile:!1,prop:!0,propBoolean:!1,propMutable:!1,propNumber:!1,propString:!0,reflect:!0,scoped:!1,scopedSlotTextContentFix:!1,scriptDataOpts:!1,shadowDelegatesFocus:!1,shadowDom:!0,slot:!0,slotChildNodesFix:!1,slotRelocation:!0,state:!0,style:!0,svg:!0,taskQueue:!0,transformTagName:!1,updatable:!0,vdomAttribute:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomPropOrAttr:!0,vdomRef:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,vdomXlink:!1,watchCallback:!0};var De=Object.defineProperty,Ie=(e,t)=>{for(var s in t)De(e,s,{get:t[s],enumerable:!0})},X=new WeakMap,x=e=>X.get(e),Be=(e,t)=>X.set(t.$lazyInstance$=e,t),ze=(e,t)=>{const s={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return s.$onReadyPromise$=new Promise(r=>s.$onReadyResolve$=r),e["s-p"]=[],e["s-rc"]=[],X.set(e,s)},re=(e,t)=>t in e,b=(e,t)=>(0,console.error)(e,t),I=new Map,We=(e,t,s)=>{const r=e.$tagName$.replace(/-/g,"_"),n=e.$lazyBundleId$;if(!n)return;const l=I.get(n);if(l)return l[r];{const o=i=>(I.set(n,i),i[r]);switch(n){case"gamification-dropdown_4":return Promise.resolve().then(()=>require("./gamification-dropdown_4-DNV5b4s7.cjs")).then(o,b);case"player-elevate-card":return Promise.resolve().then(()=>require("./player-elevate-card-CW-95gEJ.cjs")).then(o,b);case"player-elevate-pointcard":return Promise.resolve().then(()=>require("./player-elevate-pointcard-DVgy3cq3.cjs")).then(o,b)}}return import(`./${n}.entry.js`).then(o=>(I.set(n,o),o[r]),b)},F=new Map,Me="{visibility:hidden}.hydrated{visibility:inherit}",ue="slot-fb{display:contents}slot-fb[hidden]{display:none}",P=typeof window!="undefined"?window:{},m=P.document||{head:{}},g={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,r)=>e.addEventListener(t,s,r),rel:(e,t,s,r)=>e.removeEventListener(t,s,r),ce:(e,t)=>new CustomEvent(e,t)},Ge=(()=>{let e=!1;try{m.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch(t){}return e})(),pe=e=>Promise.resolve(e),ve=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch(e){}return!1})(),B=!1,ne=[],he=[],Xe=(e,t)=>s=>{e.push(s),B||(B=!0,g.$flags$&4?Q(z):g.raf(z))},le=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(s){b(s)}e.length=0},z=()=>{le(ne),le(he),(B=ne.length>0)&&g.raf(z)},Q=e=>pe().then(e),Qe=Xe(he),Ye=e=>{const t=new URL(e,g.$resourcesUrl$);return t.origin!==P.location.origin?t.href:t.pathname},ae={},Je="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml",Ze=e=>e!=null,Y=e=>(e=typeof e,e==="object"||e==="function");function ge(e){var t,s,r;return(r=(s=(t=e.head)==null?void 0:t.querySelector('meta[name="csp-nonce"]'))==null?void 0:s.getAttribute("content"))!=null?r:void 0}var Ve={};Ie(Ve,{err:()=>ye,map:()=>et,ok:()=>W,unwrap:()=>tt,unwrapErr:()=>st});var W=e=>({isOk:!0,isErr:!1,value:e}),ye=e=>({isOk:!1,isErr:!0,value:e});function et(e,t){if(e.isOk){const s=t(e.value);return s instanceof Promise?s.then(r=>W(r)):W(s)}if(e.isErr){const s=e.value;return ye(s)}throw"should never get here"}var tt=e=>{if(e.isOk)return e.value;throw e.value},st=e=>{if(e.isErr)return e.value;throw e.value},E=(e,t="")=>()=>{},rt=(e,t)=>()=>{},J=(e,t,...s)=>{let r=null,n=null,l=null,o=!1,i=!1;const a=[],$=d=>{for(let f=0;f<d.length;f++)r=d[f],Array.isArray(r)?$(r):r!=null&&typeof r!="boolean"&&((o=typeof e!="function"&&!Y(r))&&(r=String(r)),o&&i?a[a.length-1].$text$+=r:a.push(o?H(null,r):r),i=o)};if($(s),t){t.key&&(n=t.key),t.name&&(l=t.name);{const d=t.className||t.class;d&&(t.class=typeof d!="object"?d:Object.keys(d).filter(f=>d[f]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,a,at);const c=H(e,null);return c.$attrs$=t,a.length>0&&(c.$children$=a),c.$key$=n,c.$name$=l,c},H=(e,t)=>{const s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s.$name$=null,s},nt={},lt=e=>e&&e.$tag$===nt,at={forEach:(e,t)=>e.map(oe).forEach(t),map:(e,t)=>e.map(oe).map(t).map(ot)},oe=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),ot=e=>{if(typeof e.vtag=="function"){const s=se({},e.vattrs);return e.vkey&&(s.key=e.vkey),e.vname&&(s.name=e.vname),J(e.vtag,s,...e.vchildren||[])}const t=H(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},it=(e,t)=>e!=null&&!Y(e)&&t&1?String(e):e,me=e=>x(e).$hostElement$,$t=(e,t,s)=>{const r=me(e);return{emit:n=>Se(r,t,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:n})}},Se=(e,t,s)=>{const r=g.ce(t,s);return e.dispatchEvent(r),r},ie=new WeakMap,ct=(e,t,s)=>{let r=F.get(e);ve&&s?(r=r||new CSSStyleSheet,typeof r=="string"?r=t:r.replaceSync(t)):r=t,F.set(e,r)},ft=(e,t,s)=>{var r;const n=be(t),l=F.get(n);if(e=e.nodeType===11?e:m,l)if(typeof l=="string"){e=e.head||e;let o=ie.get(e),i;if(o||ie.set(e,o=new Set),!o.has(n)){{i=m.createElement("style"),i.innerHTML=l;const a=(r=g.$nonce$)!=null?r:ge(m);if(a!=null&&i.setAttribute("nonce",a),!(t.$flags$&1))if(e.nodeName==="HEAD"){const $=e.querySelectorAll("link[rel=preconnect]"),c=$.length>0?$[$.length-1].nextSibling:e.querySelector("style");e.insertBefore(i,c)}else if("host"in e)if(ve){const $=new CSSStyleSheet;$.replaceSync(l),e.adoptedStyleSheets=[$,...e.adoptedStyleSheets]}else{const $=e.querySelector("style");$?$.innerHTML=l+$.innerHTML:e.prepend(i)}else e.append(i);t.$flags$&1&&e.nodeName!=="HEAD"&&e.insertBefore(i,null)}t.$flags$&4&&(i.innerHTML+=ue),o&&o.add(n)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n},dt=e=>{const t=e.$cmpMeta$,s=e.$hostElement$,r=t.$flags$,n=E("attachStyles",t.$tagName$),l=ft(s.shadowRoot?s.shadowRoot:s.getRootNode(),t);r&10&&r&2&&(s["s-sc"]=l,s.classList.add(l+"-h")),n()},be=(e,t)=>"sc-"+e.$tagName$,$e=(e,t,s,r,n,l)=>{if(s!==r){let o=re(e,t),i=t.toLowerCase();if(t==="class"){const a=e.classList,$=ce(s),c=ce(r);a.remove(...$.filter(d=>d&&!c.includes(d))),a.add(...c.filter(d=>d&&!$.includes(d)))}else if(t==="style"){for(const a in s)(!r||r[a]==null)&&(a.includes("-")?e.style.removeProperty(a):e.style[a]="");for(const a in r)(!s||r[a]!==s[a])&&(a.includes("-")?e.style.setProperty(a,r[a]):e.style[a]=r[a])}else if(t!=="key")if(t==="ref")r&&r(e);else if(!o&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):re(P,i)?t=i.slice(2):t=i[2]+t.slice(3),s||r){const a=t.endsWith(ke);t=t.replace(pt,""),s&&g.rel(e,t,s,a),r&&g.ael(e,t,r,a)}}else{const a=Y(r);if((o||a&&r!==null)&&!n)try{if(e.tagName.includes("-"))e[t]=r;else{const $=r==null?"":r;t==="list"?o=!1:(s==null||e[t]!=$)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=$:e.setAttribute(t,$))}}catch($){}r==null||r===!1?(r!==!1||e.getAttribute(t)==="")&&e.removeAttribute(t):(!o||l&4||n)&&!a&&(r=r===!0?"":r,e.setAttribute(t,r))}}},ut=/\s/,ce=e=>e?e.split(ut):[],ke="Capture",pt=new RegExp(ke+"$"),Te=(e,t,s)=>{const r=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,n=e&&e.$attrs$||ae,l=t.$attrs$||ae;for(const o of fe(Object.keys(n)))o in l||$e(r,o,n[o],void 0,s,t.$flags$);for(const o of fe(Object.keys(l)))$e(r,o,n[o],l[o],s,t.$flags$)};function fe(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var w,M,R,N=!1,q=!1,K=!1,S=!1,D=(e,t,s,r)=>{var n;const l=t.$children$[s];let o=0,i,a,$;if(N||(K=!0,l.$tag$==="slot"&&(w&&r.classList.add(w+"-s"),l.$flags$|=l.$children$?2:1)),l.$text$!==null)i=l.$elm$=m.createTextNode(l.$text$);else if(l.$flags$&1)i=l.$elm$=m.createTextNode("");else{if(S||(S=l.$tag$==="svg"),i=l.$elm$=m.createElementNS(S?Je:Ke,!N&&_.slotRelocation&&l.$flags$&2?"slot-fb":l.$tag$),S&&l.$tag$==="foreignObject"&&(S=!1),Te(null,l,S),!!i.getRootNode().querySelector("body")&&_.scoped&&Ze(w)&&i["s-si"]!==w&&i.classList.add(i["s-si"]=w),l.$children$)for(o=0;o<l.$children$.length;++o)a=D(e,l,o,i),a&&i.appendChild(a);l.$tag$==="svg"?S=!1:i.tagName==="foreignObject"&&(S=!0)}return i["s-hn"]=R,l.$flags$&3&&(i["s-sr"]=!0,i["s-cr"]=M,i["s-sn"]=l.$name$||"",i["s-rf"]=(n=l.$attrs$)==null?void 0:n.ref,$=e&&e.$children$&&e.$children$[s],$&&$.$tag$===l.$tag$&&e.$elm$&&O(e.$elm$,!1)),i},O=(e,t)=>{g.$flags$|=1;const s=Array.from(e.childNodes);if(e["s-sr"]&&_.experimentalSlotFixes){let r=e;for(;r=r.nextSibling;)r&&r["s-sn"]===e["s-sn"]&&r["s-sh"]===R&&s.push(r)}for(let r=s.length-1;r>=0;r--){const n=s[r];n["s-hn"]!==R&&n["s-ol"]&&(L(xe(n),n,Z(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,K=!0),t&&O(n,t)}g.$flags$&=-2},Ee=(e,t,s,r,n,l)=>{let o=e["s-cr"]&&e["s-cr"].parentNode||e,i;for(o.shadowRoot&&o.tagName===R&&(o=o.shadowRoot);n<=l;++n)r[n]&&(i=D(null,s,n,e),i&&(r[n].$elm$=i,L(o,i,Z(t))))},Le=(e,t,s)=>{for(let r=t;r<=s;++r){const n=e[r];if(n){const l=n.$elm$;_e(n),l&&(q=!0,l["s-ol"]?l["s-ol"].remove():O(l,!0),l.remove())}}},vt=(e,t,s,r,n=!1)=>{let l=0,o=0,i=0,a=0,$=t.length-1,c=t[0],d=t[$],f=r.length-1,u=r[0],v=r[f],h,y;for(;l<=$&&o<=f;)if(c==null)c=t[++l];else if(d==null)d=t[--$];else if(u==null)u=r[++o];else if(v==null)v=r[--f];else if(C(c,u,n))A(c,u,n),c=t[++l],u=r[++o];else if(C(d,v,n))A(d,v,n),d=t[--$],v=r[--f];else if(C(c,v,n))(c.$tag$==="slot"||v.$tag$==="slot")&&O(c.$elm$.parentNode,!1),A(c,v,n),L(e,c.$elm$,d.$elm$.nextSibling),c=t[++l],v=r[--f];else if(C(d,u,n))(c.$tag$==="slot"||v.$tag$==="slot")&&O(d.$elm$.parentNode,!1),A(d,u,n),L(e,d.$elm$,c.$elm$),d=t[--$],u=r[++o];else{for(i=-1,a=l;a<=$;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===u.$key$){i=a;break}i>=0?(y=t[i],y.$tag$!==u.$tag$?h=D(t&&t[o],s,i,e):(A(y,u,n),t[i]=void 0,h=y.$elm$),u=r[++o]):(h=D(t&&t[o],s,o,e),u=r[++o]),h&&L(xe(c.$elm$),h,Z(c.$elm$))}l>$?Ee(e,r[f+1]==null?null:r[f+1].$elm$,s,r,o,f):o>f&&Le(t,l,$)},C=(e,t,s=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?"$nodeId$"in e&&s&&e.$elm$.nodeType!==8?!1:e.$name$===t.$name$:s?!0:e.$key$===t.$key$:!1,Z=e=>e&&e["s-ol"]||e,xe=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,A=(e,t,s=!1)=>{const r=t.$elm$=e.$elm$,n=e.$children$,l=t.$children$,o=t.$tag$,i=t.$text$;let a;i===null?(S=o==="svg"?!0:o==="foreignObject"?!1:S,o==="slot"&&!N||Te(e,t,S),n!==null&&l!==null?vt(r,n,t,l,s):l!==null?(e.$text$!==null&&(r.textContent=""),Ee(r,null,t,l,0,l.length-1)):!s&&_.updatable&&n!==null&&Le(n,0,n.length-1),S&&o==="svg"&&(S=!1)):(a=r["s-cr"])?a.parentNode.textContent=i:e.$text$!==i&&(r.data=i)},we=e=>{const t=e.childNodes;for(const s of t)if(s.nodeType===1){if(s["s-sr"]){const r=s["s-sn"];s.hidden=!1;for(const n of t)if(n!==s){if(n["s-hn"]!==s["s-hn"]||r!==""){if(n.nodeType===1&&(r===n.getAttribute("slot")||r===n["s-sn"])||n.nodeType===3&&r===n["s-sn"]){s.hidden=!0;break}}else if(n.nodeType===1||n.nodeType===3&&n.textContent.trim()!==""){s.hidden=!0;break}}}we(s)}},T=[],Ae=e=>{let t,s,r;for(const n of e.childNodes){if(n["s-sr"]&&(t=n["s-cr"])&&t.parentNode){s=t.parentNode.childNodes;const l=n["s-sn"];for(r=s.length-1;r>=0;r--)if(t=s[r],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==n["s-hn"]&&!_.experimentalSlotFixes)if(de(t,l)){let o=T.find(i=>i.$nodeToRelocate$===t);q=!0,t["s-sn"]=t["s-sn"]||l,o?(o.$nodeToRelocate$["s-sh"]=n["s-hn"],o.$slotRefNode$=n):(t["s-sh"]=n["s-hn"],T.push({$slotRefNode$:n,$nodeToRelocate$:t})),t["s-sr"]&&T.map(i=>{de(i.$nodeToRelocate$,t["s-sn"])&&(o=T.find(a=>a.$nodeToRelocate$===t),o&&!i.$slotRefNode$&&(i.$slotRefNode$=o.$slotRefNode$))})}else T.some(o=>o.$nodeToRelocate$===t)||T.push({$nodeToRelocate$:t})}n.nodeType===1&&Ae(n)}},de=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",_e=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(_e)},L=(e,t,s)=>e==null?void 0:e.insertBefore(t,s),ht=(e,t,s=!1)=>{var r,n,l,o;const i=e.$hostElement$,a=e.$cmpMeta$,$=e.$vnode$||H(null,null),c=lt(t)?t:J(null,null,t);if(R=i.tagName,a.$attrsToReflect$&&(c.$attrs$=c.$attrs$||{},a.$attrsToReflect$.map(([d,f])=>c.$attrs$[f]=i[d])),s&&c.$attrs$)for(const d of Object.keys(c.$attrs$))i.hasAttribute(d)&&!["key","ref","style","class"].includes(d)&&(c.$attrs$[d]=i[d]);c.$tag$=null,c.$flags$|=4,e.$vnode$=c,c.$elm$=$.$elm$=i.shadowRoot||i,w=i["s-sc"],N=(a.$flags$&1)!==0,M=i["s-cr"],q=!1,A($,c,s);{if(g.$flags$|=1,K){Ae(c.$elm$);for(const d of T){const f=d.$nodeToRelocate$;if(!f["s-ol"]){const u=m.createTextNode("");u["s-nr"]=f,L(f.parentNode,f["s-ol"]=u,f)}}for(const d of T){const f=d.$nodeToRelocate$,u=d.$slotRefNode$;if(u){const v=u.parentNode;let h=u.nextSibling;{let y=(r=f["s-ol"])==null?void 0:r.previousSibling;for(;y;){let p=(n=y["s-nr"])!=null?n:null;if(p&&p["s-sn"]===f["s-sn"]&&v===p.parentNode){for(p=p.nextSibling;p===f||p!=null&&p["s-sr"];)p=p==null?void 0:p.nextSibling;if(!p||!p["s-nr"]){h=p;break}}y=y.previousSibling}}(!h&&v!==f.parentNode||f.nextSibling!==h)&&f!==h&&(!f["s-hn"]&&f["s-ol"]&&(f["s-hn"]=f["s-ol"].parentNode.nodeName),L(v,f,h),f.nodeType===1&&(f.hidden=(l=f["s-ih"])!=null?l:!1)),f&&typeof u["s-rf"]=="function"&&u["s-rf"](f)}else f.nodeType===1&&(s&&(f["s-ih"]=(o=f.hidden)!=null?o:!1),f.hidden=!0)}}q&&we(c.$elm$),g.$flags$&=-2,T.length=0}M=void 0},Pe=(e,t)=>{t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise(s=>e.$onRenderResolve$=s))},V=(e,t)=>{if(e.$flags$|=16,e.$flags$&4){e.$flags$|=512;return}return Pe(e,e.$ancestorComponent$),Qe(()=>gt(e,t))},gt=(e,t)=>{const s=e.$hostElement$,r=E("scheduleUpdate",e.$cmpMeta$.$tagName$),n=e.$lazyInstance$;if(!n)throw new Error(`Can't render component <${s.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map(([o,i])=>G(n,o,i)),e.$queuedListeners$=void 0),l=G(n,"componentWillLoad")),r(),yt(l,()=>St(e,n,t))},yt=(e,t)=>mt(e)?e.then(t).catch(s=>{console.error(s),t()}):t(),mt=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",St=(e,t,s)=>U(exports,null,function*(){var r;const n=e.$hostElement$,l=E("update",e.$cmpMeta$.$tagName$),o=n["s-rc"];s&&dt(e);const i=E("render",e.$cmpMeta$.$tagName$);bt(e,t,n,s),o&&(o.map(a=>a()),n["s-rc"]=void 0),i(),l();{const a=(r=n["s-p"])!=null?r:[],$=()=>kt(e);a.length===0?$():(Promise.all(a).then($),e.$flags$|=4,a.length=0)}}),bt=(e,t,s,r)=>{try{t=t.render&&t.render(),e.$flags$&=-17,e.$flags$|=2,ht(e,t,r)}catch(n){b(n,e.$hostElement$)}return null},kt=e=>{const t=e.$cmpMeta$.$tagName$,s=e.$hostElement$,r=E("postUpdate",t),n=e.$lazyInstance$,l=e.$ancestorComponent$;G(n,"componentDidRender"),e.$flags$&64?r():(e.$flags$|=64,Oe(s),r(),e.$onReadyResolve$(s),l||Re()),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&Q(()=>V(e,!1)),e.$flags$&=-517},Re=e=>{Oe(m.documentElement),Q(()=>Se(P,"appload",{detail:{namespace:qe}}))},G=(e,t,s)=>{if(e&&e[t])try{return e[t](s)}catch(r){b(r)}},Oe=e=>{var t;return e.classList.add((t=_.hydratedSelectorName)!=null?t:"hydrated")},Tt=(e,t)=>x(e).$instanceValues$.get(t),Et=(e,t,s,r)=>{const n=x(e);if(!n)throw new Error(`Couldn't find host element for "${r.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const l=n.$hostElement$,o=n.$instanceValues$.get(t),i=n.$flags$,a=n.$lazyInstance$;s=it(s,r.$members$[t][0]);const $=Number.isNaN(o)&&Number.isNaN(s),c=s!==o&&!$;if((!(i&8)||o===void 0)&&c&&(n.$instanceValues$.set(t,s),a)){if(r.$watchers$&&i&128){const d=r.$watchers$[t];d&&d.map(f=>{try{a[f](s,o,t)}catch(u){b(u,l)}})}(i&18)===2&&V(n,!1)}},je=(e,t,s)=>{var r,n;const l=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);const o=Object.entries((r=t.$members$)!=null?r:{});if(o.map(([i,[a]])=>{(a&31||s&2&&a&32)&&Object.defineProperty(l,i,{get(){return Tt(this,i)},set($){Et(this,i,$,t)},configurable:!0,enumerable:!0})}),s&1){const i=new Map;l.attributeChangedCallback=function(a,$,c){g.jmp(()=>{var d;const f=i.get(a);if(this.hasOwnProperty(f))c=this[f],delete this[f];else{if(l.hasOwnProperty(f)&&typeof this[f]=="number"&&this[f]==c)return;if(f==null){const u=x(this),v=u==null?void 0:u.$flags$;if(v&&!(v&8)&&v&128&&c!==$){const h=u.$lazyInstance$,y=(d=t.$watchers$)==null?void 0:d[a];y==null||y.forEach(p=>{h[p]!=null&&h[p].call(h,c,$,a)})}return}}this[f]=c===null&&typeof this[f]=="boolean"?!1:c})},e.observedAttributes=Array.from(new Set([...Object.keys((n=t.$watchers$)!=null?n:{}),...o.filter(([a,$])=>$[0]&15).map(([a,$])=>{var c;const d=$[1]||a;return i.set(d,a),$[0]&512&&((c=t.$attrsToReflect$)==null||c.push([a,d])),d})]))}}return e},Lt=(e,t,s,r)=>U(exports,null,function*(){let n;if(!(t.$flags$&32)){if(t.$flags$|=32,s.$lazyBundleId$){const a=We(s);if(a&&"then"in a){const c=rt();n=yield a,c()}else n=a;if(!n)throw new Error(`Constructor for "${s.$tagName$}#${t.$modeName$}" was not found`);n.isProxied||(s.$watchers$=n.watchers,je(n,s,2),n.isProxied=!0);const $=E("createInstance",s.$tagName$);t.$flags$|=8;try{new n(t)}catch(c){b(c)}t.$flags$&=-9,t.$flags$|=128,$()}else{n=e.constructor;const a=e.localName;customElements.whenDefined(a).then(()=>t.$flags$|=128)}if(n&&n.style){let a;typeof n.style=="string"&&(a=n.style);const $=be(s);if(!F.has($)){const c=E("registerStyles",s.$tagName$);ct($,a,!!(s.$flags$&1)),c()}}}const l=t.$ancestorComponent$,o=()=>V(t,!0);l&&l["s-rc"]?l["s-rc"].push(o):o()}),xt=e=>{},wt=e=>{if(!(g.$flags$&1)){const t=x(e),s=t.$cmpMeta$,r=E("connectedCallback",s.$tagName$);if(t.$flags$&1)Ue(e,t,s.$listeners$),t!=null&&t.$lazyInstance$||t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>xt());else{t.$flags$|=1,s.$flags$&12&&At(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Pe(t,t.$ancestorComponent$=n);break}}s.$members$&&Object.entries(s.$members$).map(([n,[l]])=>{if(l&31&&e.hasOwnProperty(n)){const o=e[n];delete e[n],e[n]=o}}),Lt(e,t,s)}r()}},At=e=>{const t=e["s-cr"]=m.createComment("");t["s-cn"]=!0,L(e,t,e.firstChild)},_t=e=>{},Pt=e=>U(exports,null,function*(){if(!(g.$flags$&1)){const t=x(e);t.$rmListeners$&&(t.$rmListeners$.map(s=>s()),t.$rmListeners$=void 0),t!=null&&t.$lazyInstance$||t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>_t())}}),Rt=(e,t={})=>{var s;const r=E(),n=[],l=t.exclude||[],o=P.customElements,i=m.head,a=i.querySelector("meta[charset]"),$=m.createElement("style"),c=[];let d,f=!0;Object.assign(g,t),g.$resourcesUrl$=new URL(t.resourcesUrl||"./",m.baseURI).href;let u=!1;if(e.map(v=>{v[1].map(h=>{var y;const p={$flags$:h[0],$tagName$:h[1],$members$:h[2],$listeners$:h[3]};p.$flags$&4&&(u=!0),p.$members$=h[2],p.$listeners$=h[3],p.$attrsToReflect$=[],p.$watchers$=(y=h[4])!=null?y:{};const j=p.$tagName$,Ce=class extends HTMLElement{constructor(k){if(super(k),this.hasRegisteredEventListeners=!1,k=this,ze(k,p),p.$flags$&1){if(!k.shadowRoot)k.attachShadow({mode:"open"});else if(k.shadowRoot.mode!=="open")throw new Error(`Unable to re-use existing shadow root for ${p.$tagName$}! Mode is set to ${k.shadowRoot.mode} but Stencil only supports open shadow roots.`)}}connectedCallback(){const k=x(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Ue(this,k,p.$listeners$)),d&&(clearTimeout(d),d=null),f?c.push(this):g.jmp(()=>wt(this))}disconnectedCallback(){g.jmp(()=>Pt(this))}componentOnReady(){return x(this).$onReadyPromise$}};p.$lazyBundleId$=v[0],!l.includes(j)&&!o.get(j)&&(n.push(j),o.define(j,je(Ce,p,1)))})}),n.length>0&&(u&&($.textContent+=ue),$.textContent+=n.sort()+Me,$.innerHTML.length)){$.setAttribute("data-styles","");const v=(s=g.$nonce$)!=null?s:ge(m);v!=null&&$.setAttribute("nonce",v),i.insertBefore($,a?a.nextSibling:i.firstChild)}f=!1,c.length?c.map(v=>v.connectedCallback()):g.jmp(()=>d=setTimeout(Re,30)),r()},Ot=(e,t)=>t,Ue=(e,t,s,r)=>{s&&s.map(([n,l,o])=>{const i=Ut(e,n),a=jt(t,o),$=Ct(n);g.ael(i,l,a,$),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>g.rel(i,l,a,$))})},jt=(e,t)=>s=>{var r;try{e.$flags$&256?(r=e.$lazyInstance$)==null||r[t](s):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,s])}catch(n){b(n)}},Ut=(e,t)=>t&8?P:e,Ct=e=>Ge?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0;exports.Fragment=Ot;exports.bootstrapLazy=Rt;exports.createEvent=$t;exports.getAssetPath=Ye;exports.getElement=me;exports.h=J;exports.promiseResolve=pe;exports.registerInstance=Be;