@everymatrix/player-account-menu 1.62.2 → 1.62.4
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.
- package/components/{PlayerAccountMenu-BGRz6KTv.js → PlayerAccountMenu-BgGcSgoi.js} +108 -108
- package/components/PlayerAccountMenu-BoLe3ne3.cjs +1 -0
- package/components/{PlayerAccountMenu-TnbHljzy.js → PlayerAccountMenu-zMNLr7SZ.js} +130 -130
- package/es2015/player-account-menu.cjs +1 -1
- package/es2015/player-account-menu.js +1 -1
- package/esnext/player-account-menu.js +1 -1
- package/package.json +1 -1
- package/components/PlayerAccountMenu-CMGxMyjj.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as me, $ as ye, c as ge, S as pe, i as de, s as fe, f as C, b as he, n as S, d as F, e as L, g as
|
|
1
|
+
import { a as me, $ as ye, c as ge, S as pe, i as de, s as fe, f as C, b as he, n as S, d as F, e as L, g as A, h as Ae, j as N, o as be, k as Pe, l as H, m as $, p as a, q as I, r as m, t as y, u as z, v as W, w as Me, x as O, y as B, z as Q, A as we, B as ve, C as _e, D as xe } from "./GeneralLogout-AfFowssF.js";
|
|
2
2
|
import "../stencil/ui-skeleton-4ifa-7wH.js";
|
|
3
3
|
function V(n, e) {
|
|
4
4
|
me(n, e);
|
|
@@ -69,7 +69,7 @@ function J(n, e, t) {
|
|
|
69
69
|
return l[37] = e[t], l;
|
|
70
70
|
}
|
|
71
71
|
function Ce(n) {
|
|
72
|
-
let e, t, l, o, s,
|
|
72
|
+
let e, t, l, o, s, g, f, b, v, P, h, M, u = (
|
|
73
73
|
/*isMobile*/
|
|
74
74
|
n[12] && Le(n)
|
|
75
75
|
), c = (
|
|
@@ -78,32 +78,32 @@ function Ce(n) {
|
|
|
78
78
|
), p = H(
|
|
79
79
|
/*menuItems*/
|
|
80
80
|
n[7]
|
|
81
|
-
),
|
|
81
|
+
), i = [];
|
|
82
82
|
for (let d = 0; d < p.length; d += 1)
|
|
83
|
-
|
|
83
|
+
i[d] = K(Z(n, p, d));
|
|
84
84
|
let x = !/*isMobile*/
|
|
85
85
|
n[12] && Ee(n);
|
|
86
86
|
return {
|
|
87
87
|
c() {
|
|
88
|
-
e =
|
|
88
|
+
e = A("div"), t = A("div"), u && u.c(), l = I(), o = A("p"), s = W(
|
|
89
89
|
/*profileUsername*/
|
|
90
90
|
n[9]
|
|
91
|
-
),
|
|
91
|
+
), g = I(), f = A("p"), b = W(
|
|
92
92
|
/*profileEmail*/
|
|
93
93
|
n[10]
|
|
94
|
-
), v = I(), c && c.c(), P = I(),
|
|
95
|
-
for (let d = 0; d <
|
|
96
|
-
|
|
97
|
-
M = I(), x && x.c(),
|
|
98
|
-
(n[12] ? "PlayerAccountMenuHeaderMobile" : "")),
|
|
94
|
+
), v = I(), c && c.c(), P = I(), h = A("div");
|
|
95
|
+
for (let d = 0; d < i.length; d += 1)
|
|
96
|
+
i[d].c();
|
|
97
|
+
M = I(), x && x.c(), y(o, "class", "PlayerAccountMenuUser"), y(o, "translate", "no"), y(f, "class", "PlayerAccountMenuEmail"), y(f, "translate", "no"), y(t, "class", "PlayerAccountMenuHeader " + /*isMobile*/
|
|
98
|
+
(n[12] ? "PlayerAccountMenuHeaderMobile" : "")), y(h, "class", "PlayerAccountMenuList"), y(e, "class", "PlayerAccountMenuContainer " + /*isMobile*/
|
|
99
99
|
(n[12] ? "PlayerAccountMobileContainer" : "") + " " + /*mediaQuery*/
|
|
100
100
|
(n[13].matches && /*isMobile*/
|
|
101
101
|
n[12] ? "PlayerAccountTabletContainer" : ""));
|
|
102
102
|
},
|
|
103
103
|
m(d, _) {
|
|
104
|
-
L(d, e, _), a(e, t), u && u.m(t, null), a(t, l), a(t, o), a(o, s), a(t,
|
|
105
|
-
for (let w = 0; w <
|
|
106
|
-
|
|
104
|
+
L(d, e, _), a(e, t), u && u.m(t, null), a(t, l), a(t, o), a(o, s), a(t, g), a(t, f), a(f, b), a(t, v), c && c.m(t, null), a(e, P), a(e, h);
|
|
105
|
+
for (let w = 0; w < i.length; w += 1)
|
|
106
|
+
i[w] && i[w].m(h, null);
|
|
107
107
|
a(e, M), x && x.m(e, null);
|
|
108
108
|
},
|
|
109
109
|
p(d, _) {
|
|
@@ -130,22 +130,22 @@ function Ce(n) {
|
|
|
130
130
|
let w;
|
|
131
131
|
for (w = 0; w < p.length; w += 1) {
|
|
132
132
|
const E = Z(d, p, w);
|
|
133
|
-
|
|
133
|
+
i[w] ? i[w].p(E, _) : (i[w] = K(E), i[w].c(), i[w].m(h, null));
|
|
134
134
|
}
|
|
135
|
-
for (; w <
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
for (; w < i.length; w += 1)
|
|
136
|
+
i[w].d(1);
|
|
137
|
+
i.length = p.length;
|
|
138
138
|
}
|
|
139
139
|
/*isMobile*/
|
|
140
140
|
d[12] || x.p(d, _);
|
|
141
141
|
},
|
|
142
142
|
d(d) {
|
|
143
|
-
d && F(e), u && u.d(), c && c.d(), $(
|
|
143
|
+
d && F(e), u && u.d(), c && c.d(), $(i, d), x && x.d();
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
function Fe(n) {
|
|
148
|
-
let e, t, l, o, s,
|
|
148
|
+
let e, t, l, o, s, g, f, b, v, P, h = (
|
|
149
149
|
/*isMobile*/
|
|
150
150
|
n[12] && Be()
|
|
151
151
|
), M = H(Array(18)), u = [];
|
|
@@ -153,51 +153,51 @@ function Fe(n) {
|
|
|
153
153
|
u[c] = Y(J(n, M, c));
|
|
154
154
|
return {
|
|
155
155
|
c() {
|
|
156
|
-
e =
|
|
156
|
+
e = A("div"), t = A("div"), h && h.c(), l = I(), o = A("ui-skeleton"), s = I(), g = A("ui-skeleton"), f = I(), b = A("div");
|
|
157
157
|
for (let c = 0; c < u.length; c += 1)
|
|
158
158
|
u[c].c();
|
|
159
|
-
v = I(), P =
|
|
160
|
-
(n[12] ? "PlayerAccountMenuHeaderMobile" : "")),
|
|
159
|
+
v = I(), P = A("div"), P.innerHTML = '<ui-skeleton structure="rectangle" width="auto" height="60px"></ui-skeleton>', m(o, "structure", "title"), m(o, "width", "100px"), m(o, "height", "20px"), m(o, "margin-top", "10px"), m(g, "structure", "text"), m(g, "width", "200px"), m(g, "height", "20px"), y(t, "class", "PlayerAccountMenuHeader " + /*isMobile*/
|
|
160
|
+
(n[12] ? "PlayerAccountMenuHeaderMobile" : "")), y(b, "class", "PlayerAccountMenuList"), y(P, "class", "skeletonLogOut"), y(e, "class", "PlayerAccountMenuContainer " + /*isMobile*/
|
|
161
161
|
(n[12] ? "PlayerAccountMobileContainer" : "") + " " + /*mediaQuery*/
|
|
162
162
|
(n[13].matches && /*isMobile*/
|
|
163
163
|
n[12] ? "PlayerAccountTabletContainer" : ""));
|
|
164
164
|
},
|
|
165
165
|
m(c, p) {
|
|
166
|
-
L(c, e, p), a(e, t),
|
|
167
|
-
for (let
|
|
168
|
-
u[
|
|
166
|
+
L(c, e, p), a(e, t), h && h.m(t, null), a(t, l), a(t, o), a(t, s), a(t, g), a(e, f), a(e, b);
|
|
167
|
+
for (let i = 0; i < u.length; i += 1)
|
|
168
|
+
u[i] && u[i].m(b, null);
|
|
169
169
|
a(e, v), a(e, P);
|
|
170
170
|
},
|
|
171
171
|
p(c, p) {
|
|
172
172
|
if (p[0] & /*isMobile*/
|
|
173
173
|
4096) {
|
|
174
174
|
M = H(Array(18));
|
|
175
|
-
let
|
|
176
|
-
for (
|
|
177
|
-
const x = J(c, M,
|
|
178
|
-
u[
|
|
175
|
+
let i;
|
|
176
|
+
for (i = 0; i < M.length; i += 1) {
|
|
177
|
+
const x = J(c, M, i);
|
|
178
|
+
u[i] ? u[i].p(x, p) : (u[i] = Y(x), u[i].c(), u[i].m(b, null));
|
|
179
179
|
}
|
|
180
|
-
for (;
|
|
181
|
-
u[
|
|
180
|
+
for (; i < u.length; i += 1)
|
|
181
|
+
u[i].d(1);
|
|
182
182
|
u.length = M.length;
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
185
|
d(c) {
|
|
186
|
-
c && F(e),
|
|
186
|
+
c && F(e), h && h.d(), $(u, c);
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
190
|
function Le(n) {
|
|
191
|
-
let e, t, l, o, s,
|
|
191
|
+
let e, t, l, o, s, g, f, b, v, P, h = (
|
|
192
192
|
/*$_*/
|
|
193
193
|
n[11]("title") + ""
|
|
194
194
|
), M, u, c;
|
|
195
195
|
return {
|
|
196
196
|
c() {
|
|
197
|
-
e =
|
|
197
|
+
e = A("div"), t = B("svg"), l = B("defs"), o = B("style"), s = W(".aaa{fill:var(--emw--color-white, #FFFFFF);}"), g = B("g"), f = B("g"), b = B("path"), v = I(), P = A("h3"), M = W(h), y(b, "class", "aaa"), y(b, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), y(b, "transform", "translate(15 15) rotate(180)"), y(f, "transform", "translate(20 158)"), y(g, "transform", "translate(-20 -158)"), y(t, "xmlns", "http://www.w3.org/2000/svg"), y(t, "width", "15"), y(t, "height", "15"), y(t, "viewBox", "0 0 15 15"), y(P, "class", "PlayerAccountMenuCategoryTitle"), y(e, "class", "PlayerAccountMenuCategoryWrapper");
|
|
198
198
|
},
|
|
199
|
-
m(p,
|
|
200
|
-
L(p, e,
|
|
199
|
+
m(p, i) {
|
|
200
|
+
L(p, e, i), a(e, t), a(t, l), a(l, o), a(o, s), a(t, g), a(g, f), a(f, b), a(e, v), a(e, P), a(P, M), u || (c = [
|
|
201
201
|
O(
|
|
202
202
|
t,
|
|
203
203
|
"click",
|
|
@@ -212,10 +212,10 @@ function Le(n) {
|
|
|
212
212
|
)
|
|
213
213
|
], u = !0);
|
|
214
214
|
},
|
|
215
|
-
p(p,
|
|
216
|
-
|
|
217
|
-
2048 &&
|
|
218
|
-
p[11]("title") + "") && z(M,
|
|
215
|
+
p(p, i) {
|
|
216
|
+
i[0] & /*$_*/
|
|
217
|
+
2048 && h !== (h = /*$_*/
|
|
218
|
+
p[11]("title") + "") && z(M, h);
|
|
219
219
|
},
|
|
220
220
|
d(p) {
|
|
221
221
|
p && F(e), u = !1, Me(c);
|
|
@@ -226,7 +226,7 @@ function Te(n) {
|
|
|
226
226
|
let e, t;
|
|
227
227
|
return {
|
|
228
228
|
c() {
|
|
229
|
-
e =
|
|
229
|
+
e = A("div"), t = A("general-logout"), m(
|
|
230
230
|
t,
|
|
231
231
|
"endpoint",
|
|
232
232
|
/*endpoint*/
|
|
@@ -251,7 +251,7 @@ function Te(n) {
|
|
|
251
251
|
"mbsource",
|
|
252
252
|
/*mbsource*/
|
|
253
253
|
n[4]
|
|
254
|
-
),
|
|
254
|
+
), y(e, "class", "PlayerAccountLogOutArea");
|
|
255
255
|
},
|
|
256
256
|
m(l, o) {
|
|
257
257
|
L(l, e, o), a(e, t);
|
|
@@ -295,10 +295,10 @@ function Te(n) {
|
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
297
|
function K(n) {
|
|
298
|
-
let e, t, l, o, s,
|
|
298
|
+
let e, t, l, o, s, g, f = (
|
|
299
299
|
/*menuItem*/
|
|
300
300
|
n[40].label + ""
|
|
301
|
-
), b, v, P,
|
|
301
|
+
), b, v, P, h, M;
|
|
302
302
|
function u() {
|
|
303
303
|
return (
|
|
304
304
|
/*click_handler*/
|
|
@@ -310,29 +310,29 @@ function K(n) {
|
|
|
310
310
|
}
|
|
311
311
|
return {
|
|
312
312
|
c() {
|
|
313
|
-
e =
|
|
313
|
+
e = A("div"), t = A("p"), l = A("img"), s = I(), g = A("span"), b = W(f), v = I(), y(l, "class", "PlayerAccountMenuItemIcon " + /*isMobile*/
|
|
314
314
|
(n[12] ? "PlayerAccountMenuItemIconMobile" : "")), Q(l.src, o = /*menuItem*/
|
|
315
|
-
n[40].img) ||
|
|
315
|
+
n[40].img) || y(l, "src", o), y(g, "class", "PlayerAccountMenuItemTitle"), y(t, "class", "PlayerAccountMenuItemWrapper"), y(e, "class", P = "PlayerAccountMenuItemBox " + /*selectedItem*/
|
|
316
316
|
(n[8] === /*menuItem*/
|
|
317
317
|
n[40].id && !/*isMobile*/
|
|
318
318
|
n[12] ? "PlayerAccountMenuActiveItemBox" : ""));
|
|
319
319
|
},
|
|
320
320
|
m(c, p) {
|
|
321
|
-
L(c, e, p), a(e, t), a(t, l), a(t, s), a(t,
|
|
321
|
+
L(c, e, p), a(e, t), a(t, l), a(t, s), a(t, g), a(g, b), a(e, v), h || (M = O(e, "click", u), h = !0);
|
|
322
322
|
},
|
|
323
323
|
p(c, p) {
|
|
324
324
|
n = c, p[0] & /*menuItems*/
|
|
325
325
|
128 && !Q(l.src, o = /*menuItem*/
|
|
326
|
-
n[40].img) &&
|
|
327
|
-
128 &&
|
|
328
|
-
n[40].label + "") && z(b,
|
|
326
|
+
n[40].img) && y(l, "src", o), p[0] & /*menuItems*/
|
|
327
|
+
128 && f !== (f = /*menuItem*/
|
|
328
|
+
n[40].label + "") && z(b, f), p[0] & /*selectedItem, menuItems*/
|
|
329
329
|
384 && P !== (P = "PlayerAccountMenuItemBox " + /*selectedItem*/
|
|
330
330
|
(n[8] === /*menuItem*/
|
|
331
331
|
n[40].id && !/*isMobile*/
|
|
332
|
-
n[12] ? "PlayerAccountMenuActiveItemBox" : "")) &&
|
|
332
|
+
n[12] ? "PlayerAccountMenuActiveItemBox" : "")) && y(e, "class", P);
|
|
333
333
|
},
|
|
334
334
|
d(c) {
|
|
335
|
-
c && F(e),
|
|
335
|
+
c && F(e), h = !1, M();
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
}
|
|
@@ -340,7 +340,7 @@ function Ee(n) {
|
|
|
340
340
|
let e, t;
|
|
341
341
|
return {
|
|
342
342
|
c() {
|
|
343
|
-
e =
|
|
343
|
+
e = A("div"), t = A("general-logout"), m(
|
|
344
344
|
t,
|
|
345
345
|
"endpoint",
|
|
346
346
|
/*endpoint*/
|
|
@@ -365,7 +365,7 @@ function Ee(n) {
|
|
|
365
365
|
"mbsource",
|
|
366
366
|
/*mbsource*/
|
|
367
367
|
n[4]
|
|
368
|
-
),
|
|
368
|
+
), y(e, "class", "PlayerAccountLogOutArea");
|
|
369
369
|
},
|
|
370
370
|
m(l, o) {
|
|
371
371
|
L(l, e, o), a(e, t);
|
|
@@ -412,7 +412,7 @@ function Be(n) {
|
|
|
412
412
|
let e;
|
|
413
413
|
return {
|
|
414
414
|
c() {
|
|
415
|
-
e =
|
|
415
|
+
e = A("div"), e.innerHTML = '<ui-skeleton structure="title" width="30px" height="30px"></ui-skeleton> <ui-skeleton structure="text" width="150px" height="30px"></ui-skeleton>', y(e, "class", "PlayerAccountMenuCategoryWrapper");
|
|
416
416
|
},
|
|
417
417
|
m(t, l) {
|
|
418
418
|
L(t, e, l);
|
|
@@ -426,7 +426,7 @@ function We(n) {
|
|
|
426
426
|
let e;
|
|
427
427
|
return {
|
|
428
428
|
c() {
|
|
429
|
-
e =
|
|
429
|
+
e = A("ui-skeleton"), m(e, "structure", "circle"), m(e, "size", "20px");
|
|
430
430
|
},
|
|
431
431
|
m(t, l) {
|
|
432
432
|
L(t, e, l);
|
|
@@ -441,26 +441,26 @@ function Y(n) {
|
|
|
441
441
|
n[12] && We();
|
|
442
442
|
return {
|
|
443
443
|
c() {
|
|
444
|
-
e =
|
|
444
|
+
e = A("div"), s && s.c(), t = I(), l = A("ui-skeleton"), o = I(), m(l, "structure", "rectangle"), m(l, "width", "100%"), m(
|
|
445
445
|
l,
|
|
446
446
|
"height",
|
|
447
447
|
/*isMobile*/
|
|
448
448
|
n[12] ? "120px" : "20px"
|
|
449
|
-
),
|
|
449
|
+
), y(e, "class", "PlayerAccountItemWrap " + /*isMobile*/
|
|
450
450
|
(n[12] ? "PlayerAccountItemWrapMobile" : ""));
|
|
451
451
|
},
|
|
452
|
-
m(
|
|
453
|
-
L(
|
|
452
|
+
m(g, f) {
|
|
453
|
+
L(g, e, f), s && s.m(e, null), a(e, t), a(e, l), a(e, o);
|
|
454
454
|
},
|
|
455
455
|
p: S,
|
|
456
|
-
d(
|
|
457
|
-
|
|
456
|
+
d(g) {
|
|
457
|
+
g && F(e), s && s.d();
|
|
458
458
|
}
|
|
459
459
|
};
|
|
460
460
|
}
|
|
461
461
|
function He(n) {
|
|
462
462
|
let e;
|
|
463
|
-
function t(s,
|
|
463
|
+
function t(s, g) {
|
|
464
464
|
return (
|
|
465
465
|
/*skeletonLoading*/
|
|
466
466
|
s[6] ? Fe : Ce
|
|
@@ -469,13 +469,13 @@ function He(n) {
|
|
|
469
469
|
let l = t(n), o = l(n);
|
|
470
470
|
return {
|
|
471
471
|
c() {
|
|
472
|
-
e =
|
|
472
|
+
e = A("div"), o.c();
|
|
473
473
|
},
|
|
474
|
-
m(s,
|
|
475
|
-
L(s, e,
|
|
474
|
+
m(s, g) {
|
|
475
|
+
L(s, e, g), o.m(e, null), n[26](e);
|
|
476
476
|
},
|
|
477
|
-
p(s,
|
|
478
|
-
l === (l = t(s)) && o ? o.p(s,
|
|
477
|
+
p(s, g) {
|
|
478
|
+
l === (l = t(s)) && o ? o.p(s, g) : (o.d(1), o = l(s), o && (o.c(), o.m(e, null)));
|
|
479
479
|
},
|
|
480
480
|
i: S,
|
|
481
481
|
o: S,
|
|
@@ -486,8 +486,8 @@ function He(n) {
|
|
|
486
486
|
}
|
|
487
487
|
function ze(n, e, t) {
|
|
488
488
|
let l;
|
|
489
|
-
Ae(n, we, (
|
|
490
|
-
let { endpoint: o = "" } = e, { cmsendpoint: s = "" } = e, { env:
|
|
489
|
+
Ae(n, we, (r) => t(11, l = r));
|
|
490
|
+
let { endpoint: o = "" } = e, { cmsendpoint: s = "" } = e, { env: g = "" } = e, { session: f = "" } = e, { playerid: b = "" } = e, { lang: v = "en" } = e, { userroles: P = "" } = e, { clientstyling: h = "" } = e, { clientstylingurl: M = "" } = e, { translationurl: u = "" } = e, { activemenuitem: c = "" } = e, { mbsource: p } = e, i = !1, x = !1, d = !0, _, w = [], E, D = window.navigator.userAgent, ee = N(D) !== "PC", j = "", U = "";
|
|
491
491
|
const te = window.matchMedia("(min-width: 768px)"), ne = () => {
|
|
492
492
|
fetch(u).then((k) => k.json()).then((k) => {
|
|
493
493
|
Object.keys(k).forEach((T) => {
|
|
@@ -497,37 +497,37 @@ function ze(n, e, t) {
|
|
|
497
497
|
console.error(k);
|
|
498
498
|
});
|
|
499
499
|
};
|
|
500
|
-
Object.keys(X).forEach((
|
|
501
|
-
V(
|
|
500
|
+
Object.keys(X).forEach((r) => {
|
|
501
|
+
V(r, X[r]);
|
|
502
502
|
});
|
|
503
|
-
const R = (
|
|
504
|
-
if (
|
|
505
|
-
switch (
|
|
503
|
+
const R = (r) => {
|
|
504
|
+
if (r.data)
|
|
505
|
+
switch (r.data.type) {
|
|
506
506
|
case "UserSessionID":
|
|
507
|
-
t(0,
|
|
507
|
+
t(0, f = r.data.session);
|
|
508
508
|
break;
|
|
509
509
|
}
|
|
510
510
|
}, le = () => {
|
|
511
|
-
let
|
|
512
|
-
if (
|
|
513
|
-
return
|
|
511
|
+
let r = N(D);
|
|
512
|
+
if (r)
|
|
513
|
+
return r === "PC" ? "dk" : "mtWeb";
|
|
514
514
|
}, oe = () => {
|
|
515
|
-
const
|
|
516
|
-
|
|
515
|
+
const r = new URL(`${s}/${v}/profile-menu?env=${g}`);
|
|
516
|
+
r.searchParams.append("device", le()), fetch(r.href).then((k) => k.json()).then((k) => {
|
|
517
517
|
t(7, w = k), G();
|
|
518
518
|
}).catch((k) => {
|
|
519
519
|
console.error("Error getting menu items", k);
|
|
520
520
|
}).finally(() => {
|
|
521
|
-
t(23,
|
|
521
|
+
t(23, i = !0);
|
|
522
522
|
});
|
|
523
|
-
},
|
|
524
|
-
let
|
|
525
|
-
|
|
523
|
+
}, re = () => {
|
|
524
|
+
let r = new URL(`${o}/v1/player/${b}/profile`);
|
|
525
|
+
r.searchParams.append("userRoles", P);
|
|
526
526
|
let k = {
|
|
527
527
|
method: "GET",
|
|
528
|
-
headers: { "X-SessionID":
|
|
528
|
+
headers: { "X-SessionID": f }
|
|
529
529
|
};
|
|
530
|
-
fetch(
|
|
530
|
+
fetch(r.href, k).then((T) => T.json()).then(
|
|
531
531
|
(T) => {
|
|
532
532
|
t(9, j = T.username), t(10, U = T.email);
|
|
533
533
|
},
|
|
@@ -537,43 +537,43 @@ function ze(n, e, t) {
|
|
|
537
537
|
).finally(() => {
|
|
538
538
|
t(24, x = !0);
|
|
539
539
|
});
|
|
540
|
-
}, q = (
|
|
541
|
-
window.postMessage({ type: "ChangeAccountPage", page:
|
|
540
|
+
}, q = (r) => {
|
|
541
|
+
window.postMessage({ type: "ChangeAccountPage", page: r }, window.location.href), t(8, E = r.id);
|
|
542
542
|
}, G = () => {
|
|
543
|
-
t(8, E = w.find((
|
|
544
|
-
},
|
|
543
|
+
t(8, E = w.find((r) => r.path.includes(c))?.id);
|
|
544
|
+
}, ie = () => {
|
|
545
545
|
ke(v);
|
|
546
546
|
}, ae = () => {
|
|
547
|
-
|
|
547
|
+
re();
|
|
548
548
|
}, ce = () => {
|
|
549
549
|
window.postMessage({ type: "GoToHomepage" }, window.location.href);
|
|
550
550
|
};
|
|
551
551
|
be(() => (window.addEventListener("message", R, !1), () => {
|
|
552
552
|
window.removeEventListener("message", R);
|
|
553
553
|
}));
|
|
554
|
-
const se = (
|
|
555
|
-
function ue(
|
|
556
|
-
Pe[
|
|
557
|
-
_ =
|
|
554
|
+
const se = (r) => q(r);
|
|
555
|
+
function ue(r) {
|
|
556
|
+
Pe[r ? "unshift" : "push"](() => {
|
|
557
|
+
_ = r, t(5, _);
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
return n.$$set = (
|
|
561
|
-
"endpoint" in
|
|
560
|
+
return n.$$set = (r) => {
|
|
561
|
+
"endpoint" in r && t(1, o = r.endpoint), "cmsendpoint" in r && t(16, s = r.cmsendpoint), "env" in r && t(17, g = r.env), "session" in r && t(0, f = r.session), "playerid" in r && t(18, b = r.playerid), "lang" in r && t(19, v = r.lang), "userroles" in r && t(20, P = r.userroles), "clientstyling" in r && t(2, h = r.clientstyling), "clientstylingurl" in r && t(3, M = r.clientstylingurl), "translationurl" in r && t(21, u = r.translationurl), "activemenuitem" in r && t(22, c = r.activemenuitem), "mbsource" in r && t(4, p = r.mbsource);
|
|
562
562
|
}, n.$$.update = () => {
|
|
563
563
|
n.$$.dirty[0] & /*menuLoaded, playerInfoLoaded*/
|
|
564
|
-
25165824 && t(6, d = !
|
|
565
|
-
524288 && v &&
|
|
566
|
-
786435 && o &&
|
|
567
|
-
720896 && s && v &&
|
|
564
|
+
25165824 && t(6, d = !i || !x), n.$$.dirty[0] & /*lang*/
|
|
565
|
+
524288 && v && ie(), n.$$.dirty[0] & /*endpoint, session, playerid, lang*/
|
|
566
|
+
786435 && o && f && b && v && ae(), n.$$.dirty[0] & /*cmsendpoint, lang, env*/
|
|
567
|
+
720896 && s && v && g && oe(), n.$$.dirty[0] & /*activemenuitem*/
|
|
568
568
|
4194304 && c && G(), n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
|
|
569
|
-
36 &&
|
|
569
|
+
36 && h && _ && ve(_, h), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
|
|
570
570
|
40 && M && _ && _e(_, M), n.$$.dirty[0] & /*mbsource, customStylingContainer*/
|
|
571
571
|
48 && p && _ && xe(_, `${p}.Style`), n.$$.dirty[0] & /*translationurl*/
|
|
572
572
|
2097152 && u && ne();
|
|
573
573
|
}, [
|
|
574
|
-
A,
|
|
575
|
-
o,
|
|
576
574
|
f,
|
|
575
|
+
o,
|
|
576
|
+
h,
|
|
577
577
|
M,
|
|
578
578
|
p,
|
|
579
579
|
_,
|
|
@@ -588,13 +588,13 @@ function ze(n, e, t) {
|
|
|
588
588
|
q,
|
|
589
589
|
ce,
|
|
590
590
|
s,
|
|
591
|
-
|
|
591
|
+
g,
|
|
592
592
|
b,
|
|
593
593
|
v,
|
|
594
594
|
P,
|
|
595
595
|
u,
|
|
596
596
|
c,
|
|
597
|
-
|
|
597
|
+
i,
|
|
598
598
|
x,
|
|
599
599
|
se,
|
|
600
600
|
ue
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GeneralLogout-CADV1Q8l.cjs");require("../stencil/ui-skeleton-CCXvjIzA.cjs");function E(l,t){e.addMessages(l,t)}function J(l){e.$locale.set(l)}const B={en:{title:"My Account"},"zh-hk":{title:"我的帳戶"},fr:{title:"Mon compte"},tr:{title:"Hesabım"},ro:{title:"Contul meu"},es:{title:"Mi Cuenta"},pt:{title:"Minha Conta"},hr:{title:"Moj račun"},"pt-br":{title:"Minha conta"},"es-mx":{title:"Mi cuenta"},"en-us":{title:"My Account"}};if(typeof window!="undefined"){let l=function(t){return function(...n){try{return t.apply(this,n)}catch(a){if(a instanceof DOMException&&a.message.includes("has already been used with this registry")||a.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw a}}};customElements.define=l(customElements.define),Promise.resolve().then(()=>require("./GeneralLogout-CADV1Q8l.cjs")).then(t=>t.GeneralLogout_ce).then(({default:t})=>{!customElements.get("general-logout")&&customElements.define("general-logout",t.element)})}function K(l){e.append_styles(l,"svelte-io9slc",".PlayerAccountMenuContainer{color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF));position:relative;height:100vh;display:flex;flex-direction:column;border-right:2px solid #58586b;animation-name:fadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.3s}.PlayerAccountMenuContainer .PlayerAccountMenuItemWrapper{margin:0;word-break:break-all;display:flex;align-items:center}.PlayerAccountMenuContainer .PlayerAccountMenuItemWrapper span{display:flex;align-items:center}.PlayerAccountMenuContainer .skeletonLogOut{width:100%}.PlayerAccountMenuHeader{color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF));flex-grow:0;padding:30px 20px}.PlayerAccountMenuHeader .PlayerAccountMenuUser{margin-bottom:5px;font-size:18px}.PlayerAccountMenuHeader .PlayerAccountMenuEmail{font-size:14px;text-overflow:ellipsis;overflow:hidden}.PlayerAccountMenuHeader p{font-weight:300}.PlayerAccountMenuHeaderMobile{color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF))}.PlayerAccountMenuItemBox{padding:16px 20px;font-size:16px;line-height:16px;display:inline-flex;width:100%;box-sizing:border-box;align-items:center;cursor:pointer}.PlayerAccountMenuItemBox .PlayerAccountMenuItemTitle{margin-left:20px}.PlayerAccountMenuItemBox:not(:last-child){border-bottom:1px solid var(--emw--color-gray-150, #828282)}.PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon{width:20px;height:20px;padding-top:unset}.PlayerAccountMenuItemBox .PlayerAccountMenuItemIconMobile{width:30px;height:30px;padding-top:15px}.PlayerAccountMenuList{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--color-gray-100, #E6E6E6) var(--emw--color-gray-300, #58586B);min-height:900px}.PlayerAccountMenuList::-webkit-scrollbar{width:6px}.PlayerAccountMenuList::-webkit-scrollbar-track{background:var(--emw--color-gray-300, #58586B)}.PlayerAccountMenuList::-webkit-scrollbar-thumb{background:var(--emw--color-gray-100, #E6E6E6)}.PlayerAccountItemWrap{display:flex;gap:20px;padding:16px 20px}.PlayerAccountItemWrap.PlayerAccountItemWrapMobile{flex-wrap:wrap;flex:0 0 33.3333%;padding:0;gap:10px}.PlayerAccountItemWrap.PlayerAccountItemWrapMobile ui-skeleton{width:100%}.PlayerAccountItemWrap ui-skeleton:last-child{flex:1}.PlayerAccountLogOutArea{background:var(--emw--color-gray-300, #58586B);color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF));width:100%;flex-grow:0;border-top:1px solid var(--emw--color-gray-150, #828282)}.PlayerAccountMenuActiveItemBox{background:var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C));color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF))}.PlayerAccountMobileContainer{height:unset}.PlayerAccountMobileContainer .PlayerAccountMenuCategoryWrapper{display:flex;align-items:center;gap:10px;margin-bottom:18px}.PlayerAccountMobileContainer .PlayerAccountMenuCategoryTitle{margin:0;font-weight:600}.PlayerAccountMobileContainer .PlayerAccountMenuItemTitle{margin-left:0;text-transform:capitalize;line-height:14px}.PlayerAccountMobileContainer .PlayerAccountMenuEmail{margin:0}.PlayerAccountMobileContainer .PlayerAccountMenuList{display:grid;grid-template-columns:calc(33% - 6.66px) calc(33% - 6.66px) calc(33% - 6.66px);column-gap:10px;row-gap:10px;padding:0 20px 20px}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox{border:1px solid var(--emw--color-gray-300, #58586B);border-radius:5px;height:auto;justify-content:center;padding-bottom:calc(100% - 22px);position:relative}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox.PlayerAccountMenuActiveItemBox{background:var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C));border-bottom:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C))}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon{width:30px}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper{display:flex;align-items:center;justify-content:space-between;flex-flow:column;gap:6px;position:absolute;top:0;bottom:0;left:0;right:0}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle{font-size:11px;padding:0 5px 15px 5px;font-weight:400;word-break:break-word;text-align:center;color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF))}.PlayerAccountMobileContainer .PlayerAccountLogOutArea{position:absolute;right:18px;top:56px;bottom:unset;background:transparent;width:48px;border-top:0}.PlayerAccountTabletContainer .PlayerAccountMenuHeader{padding:30px 40px}.PlayerAccountTabletContainer .PlayerAccountMenuCategoryTitle{font-size:32px}.PlayerAccountTabletContainer .PlayerAccountMenuUser{font-size:26px}.PlayerAccountTabletContainer .PlayerAccountMenuEmail{font-size:20px}.PlayerAccountTabletContainer .PlayerAccountMenuList{column-gap:20px;row-gap:20px;padding:0 40px 40px;grid-template-columns:calc(33% - 11px) calc(33% - 11px) calc(33% - 11px)}.PlayerAccountTabletContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon{width:80px}.PlayerAccountTabletContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper{gap:28px}.PlayerAccountTabletContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle{font-size:24px}.PlayerAccountTabletContainer .PlayerAccountLogOutArea{right:54px;top:72px}@keyframes fadeIn{0%{opacity:0.01}1%{opacity:0}50%{opacity:0}100%{opacity:1}}")}function W(l,t,n){const a=l.slice();return a[40]=t[n],a}function H(l,t,n){const a=l.slice();return a[37]=t[n],a}function Y(l){let t,n,a,o,s,m,g,f,b,_,y,h,u=l[12]&&ee(l),c=l[12]&&te(l),p=e.ensure_array_like(l[7]),i=[];for(let d=0;d<p.length;d+=1)i[d]=S(W(l,p,d));let v=!l[12]&&ne(l);return{c(){t=e.element("div"),n=e.element("div"),u&&u.c(),a=e.space(),o=e.element("p"),s=e.text(l[9]),m=e.space(),g=e.element("p"),f=e.text(l[10]),b=e.space(),c&&c.c(),_=e.space(),y=e.element("div");for(let d=0;d<i.length;d+=1)i[d].c();h=e.space(),v&&v.c(),e.attr(o,"class","PlayerAccountMenuUser"),e.attr(o,"translate","no"),e.attr(g,"class","PlayerAccountMenuEmail"),e.attr(g,"translate","no"),e.attr(n,"class","PlayerAccountMenuHeader "+(l[12]?"PlayerAccountMenuHeaderMobile":"")),e.attr(y,"class","PlayerAccountMenuList"),e.attr(t,"class","PlayerAccountMenuContainer "+(l[12]?"PlayerAccountMobileContainer":"")+" "+(l[13].matches&&l[12]?"PlayerAccountTabletContainer":""))},m(d,P){e.insert(d,t,P),e.append(t,n),u&&u.m(n,null),e.append(n,a),e.append(n,o),e.append(o,s),e.append(n,m),e.append(n,g),e.append(g,f),e.append(n,b),c&&c.m(n,null),e.append(t,_),e.append(t,y);for(let A=0;A<i.length;A+=1)i[A]&&i[A].m(y,null);e.append(t,h),v&&v.m(t,null)},p(d,P){if(d[12]&&u.p(d,P),P[0]&512&&e.set_data(s,d[9]),P[0]&1024&&e.set_data(f,d[10]),d[12]&&c.p(d,P),P[0]&20864){p=e.ensure_array_like(d[7]);let A;for(A=0;A<p.length;A+=1){const x=W(d,p,A);i[A]?i[A].p(x,P):(i[A]=S(x),i[A].c(),i[A].m(y,null))}for(;A<i.length;A+=1)i[A].d(1);i.length=p.length}d[12]||v.p(d,P)},d(d){d&&e.detach(t),u&&u.d(),c&&c.d(),e.destroy_each(i,d),v&&v.d()}}}function $(l){let t,n,a,o,s,m,g,f,b,_,y=l[12]&&le(),h=e.ensure_array_like(Array(18)),u=[];for(let c=0;c<h.length;c+=1)u[c]=z(H(l,h,c));return{c(){t=e.element("div"),n=e.element("div"),y&&y.c(),a=e.space(),o=e.element("ui-skeleton"),s=e.space(),m=e.element("ui-skeleton"),g=e.space(),f=e.element("div");for(let c=0;c<u.length;c+=1)u[c].c();b=e.space(),_=e.element("div"),_.innerHTML='<ui-skeleton structure="rectangle" width="auto" height="60px"></ui-skeleton>',e.set_custom_element_data(o,"structure","title"),e.set_custom_element_data(o,"width","100px"),e.set_custom_element_data(o,"height","20px"),e.set_custom_element_data(o,"margin-top","10px"),e.set_custom_element_data(m,"structure","text"),e.set_custom_element_data(m,"width","200px"),e.set_custom_element_data(m,"height","20px"),e.attr(n,"class","PlayerAccountMenuHeader "+(l[12]?"PlayerAccountMenuHeaderMobile":"")),e.attr(f,"class","PlayerAccountMenuList"),e.attr(_,"class","skeletonLogOut"),e.attr(t,"class","PlayerAccountMenuContainer "+(l[12]?"PlayerAccountMobileContainer":"")+" "+(l[13].matches&&l[12]?"PlayerAccountTabletContainer":""))},m(c,p){e.insert(c,t,p),e.append(t,n),y&&y.m(n,null),e.append(n,a),e.append(n,o),e.append(n,s),e.append(n,m),e.append(t,g),e.append(t,f);for(let i=0;i<u.length;i+=1)u[i]&&u[i].m(f,null);e.append(t,b),e.append(t,_)},p(c,p){if(p[0]&4096){h=e.ensure_array_like(Array(18));let i;for(i=0;i<h.length;i+=1){const v=H(c,h,i);u[i]?u[i].p(v,p):(u[i]=z(v),u[i].c(),u[i].m(f,null))}for(;i<u.length;i+=1)u[i].d(1);u.length=h.length}},d(c){c&&e.detach(t),y&&y.d(),e.destroy_each(u,c)}}}function ee(l){let t,n,a,o,s,m,g,f,b,_,y=l[11]("title")+"",h,u,c;return{c(){t=e.element("div"),n=e.svg_element("svg"),a=e.svg_element("defs"),o=e.svg_element("style"),s=e.text(".aaa{fill:var(--emw--color-white, #FFFFFF);}"),m=e.svg_element("g"),g=e.svg_element("g"),f=e.svg_element("path"),b=e.space(),_=e.element("h3"),h=e.text(y),e.attr(f,"class","aaa"),e.attr(f,"d","M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"),e.attr(f,"transform","translate(15 15) rotate(180)"),e.attr(g,"transform","translate(20 158)"),e.attr(m,"transform","translate(-20 -158)"),e.attr(n,"xmlns","http://www.w3.org/2000/svg"),e.attr(n,"width","15"),e.attr(n,"height","15"),e.attr(n,"viewBox","0 0 15 15"),e.attr(_,"class","PlayerAccountMenuCategoryTitle"),e.attr(t,"class","PlayerAccountMenuCategoryWrapper")},m(p,i){e.insert(p,t,i),e.append(t,n),e.append(n,a),e.append(a,o),e.append(o,s),e.append(n,m),e.append(m,g),e.append(g,f),e.append(t,b),e.append(t,_),e.append(_,h),u||(c=[e.listen(n,"click",l[15]),e.listen(_,"click",l[15])],u=!0)},p(p,i){i[0]&2048&&y!==(y=p[11]("title")+"")&&e.set_data(h,y)},d(p){p&&e.detach(t),u=!1,e.run_all(c)}}}function te(l){let t,n;return{c(){t=e.element("div"),n=e.element("general-logout"),e.set_custom_element_data(n,"endpoint",l[1]),e.set_custom_element_data(n,"session",l[0]),e.set_custom_element_data(n,"buttonlocation","PlayerAccountMenu"),e.set_custom_element_data(n,"clientstyling",l[2]),e.set_custom_element_data(n,"clientstylingurl",l[3]),e.set_custom_element_data(n,"mbsource",l[4]),e.attr(t,"class","PlayerAccountLogOutArea")},m(a,o){e.insert(a,t,o),e.append(t,n)},p(a,o){o[0]&2&&e.set_custom_element_data(n,"endpoint",a[1]),o[0]&1&&e.set_custom_element_data(n,"session",a[0]),o[0]&4&&e.set_custom_element_data(n,"clientstyling",a[2]),o[0]&8&&e.set_custom_element_data(n,"clientstylingurl",a[3]),o[0]&16&&e.set_custom_element_data(n,"mbsource",a[4])},d(a){a&&e.detach(t)}}}function S(l){let t,n,a,o,s,m,g=l[40].label+"",f,b,_,y,h;function u(){return l[25](l[40])}return{c(){t=e.element("div"),n=e.element("p"),a=e.element("img"),s=e.space(),m=e.element("span"),f=e.text(g),b=e.space(),e.attr(a,"class","PlayerAccountMenuItemIcon "+(l[12]?"PlayerAccountMenuItemIconMobile":"")),e.src_url_equal(a.src,o=l[40].img)||e.attr(a,"src",o),e.attr(m,"class","PlayerAccountMenuItemTitle"),e.attr(n,"class","PlayerAccountMenuItemWrapper"),e.attr(t,"class",_="PlayerAccountMenuItemBox "+(l[8]===l[40].id&&!l[12]?"PlayerAccountMenuActiveItemBox":""))},m(c,p){e.insert(c,t,p),e.append(t,n),e.append(n,a),e.append(n,s),e.append(n,m),e.append(m,f),e.append(t,b),y||(h=e.listen(t,"click",u),y=!0)},p(c,p){l=c,p[0]&128&&!e.src_url_equal(a.src,o=l[40].img)&&e.attr(a,"src",o),p[0]&128&&g!==(g=l[40].label+"")&&e.set_data(f,g),p[0]&384&&_!==(_="PlayerAccountMenuItemBox "+(l[8]===l[40].id&&!l[12]?"PlayerAccountMenuActiveItemBox":""))&&e.attr(t,"class",_)},d(c){c&&e.detach(t),y=!1,h()}}}function ne(l){let t,n;return{c(){t=e.element("div"),n=e.element("general-logout"),e.set_custom_element_data(n,"endpoint",l[1]),e.set_custom_element_data(n,"session",l[0]),e.set_custom_element_data(n,"buttonlocation","PlayerAccountMenu"),e.set_custom_element_data(n,"clientstyling",l[2]),e.set_custom_element_data(n,"clientstylingurl",l[3]),e.set_custom_element_data(n,"mbsource",l[4]),e.attr(t,"class","PlayerAccountLogOutArea")},m(a,o){e.insert(a,t,o),e.append(t,n)},p(a,o){o[0]&2&&e.set_custom_element_data(n,"endpoint",a[1]),o[0]&1&&e.set_custom_element_data(n,"session",a[0]),o[0]&4&&e.set_custom_element_data(n,"clientstyling",a[2]),o[0]&8&&e.set_custom_element_data(n,"clientstylingurl",a[3]),o[0]&16&&e.set_custom_element_data(n,"mbsource",a[4])},d(a){a&&e.detach(t)}}}function le(l){let t;return{c(){t=e.element("div"),t.innerHTML='<ui-skeleton structure="title" width="30px" height="30px"></ui-skeleton> <ui-skeleton structure="text" width="150px" height="30px"></ui-skeleton>',e.attr(t,"class","PlayerAccountMenuCategoryWrapper")},m(n,a){e.insert(n,t,a)},d(n){n&&e.detach(t)}}}function ae(l){let t;return{c(){t=e.element("ui-skeleton"),e.set_custom_element_data(t,"structure","circle"),e.set_custom_element_data(t,"size","20px")},m(n,a){e.insert(n,t,a)},d(n){n&&e.detach(t)}}}function z(l){let t,n,a,o,s=!l[12]&&ae();return{c(){t=e.element("div"),s&&s.c(),n=e.space(),a=e.element("ui-skeleton"),o=e.space(),e.set_custom_element_data(a,"structure","rectangle"),e.set_custom_element_data(a,"width","100%"),e.set_custom_element_data(a,"height",l[12]?"120px":"20px"),e.attr(t,"class","PlayerAccountItemWrap "+(l[12]?"PlayerAccountItemWrapMobile":""))},m(m,g){e.insert(m,t,g),s&&s.m(t,null),e.append(t,n),e.append(t,a),e.append(t,o)},p:e.noop,d(m){m&&e.detach(t),s&&s.d()}}}function oe(l){let t;function n(s,m){return s[6]?$:Y}let a=n(l),o=a(l);return{c(){t=e.element("div"),o.c()},m(s,m){e.insert(s,t,m),o.m(t,null),l[26](t)},p(s,m){a===(a=n(s))&&o?o.p(s,m):(o.d(1),o=a(s),o&&(o.c(),o.m(t,null)))},i:e.noop,o:e.noop,d(s){s&&e.detach(t),o.d(),l[26](null)}}}function re(l,t,n){let a;e.component_subscribe(l,e.$format,r=>n(11,a=r));let{endpoint:o=""}=t,{cmsendpoint:s=""}=t,{env:m=""}=t,{session:g=""}=t,{playerid:f=""}=t,{lang:b="en"}=t,{userroles:_=""}=t,{clientstyling:y=""}=t,{clientstylingurl:h=""}=t,{translationurl:u=""}=t,{activemenuitem:c=""}=t,{mbsource:p}=t,i=!1,v=!1,d=!0,P,A=[],x,k=window.navigator.userAgent,D=e.getDevice(k)!=="PC",I="",C="";const j=window.matchMedia("(min-width: 768px)"),U=()=>{fetch(u).then(M=>M.json()).then(M=>{Object.keys(M).forEach(w=>{E(w,M[w])})}).catch(M=>{console.error(M)})};Object.keys(B).forEach(r=>{E(r,B[r])});const F=r=>{if(r.data)switch(r.data.type){case"UserSessionID":n(0,g=r.data.session);break}},q=()=>{let r=e.getDevice(k);if(r)return r==="PC"?"dk":"mtWeb"},R=()=>{const r=new URL(`${s}/${b}/profile-menu?env=${m}`);r.searchParams.append("device",q()),fetch(r.href).then(M=>M.json()).then(M=>{n(7,A=M),T()}).catch(M=>{console.error("Error getting menu items",M)}).finally(()=>{n(23,i=!0)})},G=()=>{let r=new URL(`${o}/v1/player/${f}/profile`);r.searchParams.append("userRoles",_);let M={method:"GET",headers:{"X-SessionID":g}};fetch(r.href,M).then(w=>w.json()).then(w=>{n(9,I=w.username),n(10,C=w.email)},w=>{console.error(w)}).finally(()=>{n(24,v=!0)})},L=r=>{window.postMessage({type:"ChangeAccountPage",page:r},window.location.href),n(8,x=r.id)},T=()=>{var r;n(8,x=(r=A.find(M=>M.path.includes(c)))==null?void 0:r.id)},N=()=>{J(b)},Q=()=>{G()},V=()=>{window.postMessage({type:"GoToHomepage"},window.location.href)};e.onMount(()=>(window.addEventListener("message",F,!1),()=>{window.removeEventListener("message",F)}));const X=r=>L(r);function Z(r){e.binding_callbacks[r?"unshift":"push"](()=>{P=r,n(5,P)})}return l.$$set=r=>{"endpoint"in r&&n(1,o=r.endpoint),"cmsendpoint"in r&&n(16,s=r.cmsendpoint),"env"in r&&n(17,m=r.env),"session"in r&&n(0,g=r.session),"playerid"in r&&n(18,f=r.playerid),"lang"in r&&n(19,b=r.lang),"userroles"in r&&n(20,_=r.userroles),"clientstyling"in r&&n(2,y=r.clientstyling),"clientstylingurl"in r&&n(3,h=r.clientstylingurl),"translationurl"in r&&n(21,u=r.translationurl),"activemenuitem"in r&&n(22,c=r.activemenuitem),"mbsource"in r&&n(4,p=r.mbsource)},l.$$.update=()=>{l.$$.dirty[0]&25165824&&n(6,d=!i||!v),l.$$.dirty[0]&524288&&b&&N(),l.$$.dirty[0]&786435&&o&&g&&f&&b&&Q(),l.$$.dirty[0]&720896&&s&&b&&m&&R(),l.$$.dirty[0]&4194304&&c&&T(),l.$$.dirty[0]&36&&y&&P&&e.setClientStyling(P,y),l.$$.dirty[0]&40&&h&&P&&e.setClientStylingURL(P,h),l.$$.dirty[0]&48&&p&&P&&e.setStreamStyling(P,`${p}.Style`),l.$$.dirty[0]&2097152&&u&&U()},[g,o,y,h,p,P,d,A,x,I,C,a,D,j,L,V,s,m,f,b,_,u,c,i,v,X,Z]}class O extends e.SvelteComponent{constructor(t){super(),e.init(this,t,re,oe,e.safe_not_equal,{endpoint:1,cmsendpoint:16,env:17,session:0,playerid:18,lang:19,userroles:20,clientstyling:2,clientstylingurl:3,translationurl:21,activemenuitem:22,mbsource:4},K,[-1,-1])}get endpoint(){return this.$$.ctx[1]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get cmsendpoint(){return this.$$.ctx[16]}set cmsendpoint(t){this.$$set({cmsendpoint:t}),e.flush()}get env(){return this.$$.ctx[17]}set env(t){this.$$set({env:t}),e.flush()}get session(){return this.$$.ctx[0]}set session(t){this.$$set({session:t}),e.flush()}get playerid(){return this.$$.ctx[18]}set playerid(t){this.$$set({playerid:t}),e.flush()}get lang(){return this.$$.ctx[19]}set lang(t){this.$$set({lang:t}),e.flush()}get userroles(){return this.$$.ctx[20]}set userroles(t){this.$$set({userroles:t}),e.flush()}get clientstyling(){return this.$$.ctx[2]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[3]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[21]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get activemenuitem(){return this.$$.ctx[22]}set activemenuitem(t){this.$$set({activemenuitem:t}),e.flush()}get mbsource(){return this.$$.ctx[4]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}}e.create_custom_element(O,{endpoint:{},cmsendpoint:{},env:{},session:{},playerid:{},lang:{},userroles:{},clientstyling:{},clientstylingurl:{},translationurl:{},activemenuitem:{},mbsource:{}},[],[],!0);exports.default=O;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as me, $ as ye, S as ge, i as pe, f as C, s as de, c as fe, b as he, n as S, d as F, e as L, g as
|
|
1
|
+
import { a as me, $ as ye, S as ge, i as pe, f as C, s as de, c as fe, b as he, n as S, d as F, e as L, g as A, h as Ae, j as N, o as be, k as Pe, l as H, m as $, p as a, q as I, r as m, t as y, u as z, v as W, w as Me, x as O, y as B, z as Q, A as we, B as ve, C as _e, D as xe } from "./GeneralLogout-Dft2a1Gy.js";
|
|
2
2
|
import "../stencil/ui-skeleton-Bk5dn5mu.js";
|
|
3
3
|
function V(n, e) {
|
|
4
4
|
me(n, e);
|
|
@@ -69,7 +69,7 @@ function J(n, e, t) {
|
|
|
69
69
|
return l[37] = e[t], l;
|
|
70
70
|
}
|
|
71
71
|
function Ce(n) {
|
|
72
|
-
let e, t, l,
|
|
72
|
+
let e, t, l, o, s, g, f, b, v, P, h, M, u = (
|
|
73
73
|
/*isMobile*/
|
|
74
74
|
n[12] && Le(n)
|
|
75
75
|
), c = (
|
|
@@ -78,32 +78,32 @@ function Ce(n) {
|
|
|
78
78
|
), p = H(
|
|
79
79
|
/*menuItems*/
|
|
80
80
|
n[7]
|
|
81
|
-
),
|
|
81
|
+
), i = [];
|
|
82
82
|
for (let d = 0; d < p.length; d += 1)
|
|
83
|
-
|
|
83
|
+
i[d] = K(Z(n, p, d));
|
|
84
84
|
let k = !/*isMobile*/
|
|
85
85
|
n[12] && Ee(n);
|
|
86
86
|
return {
|
|
87
87
|
c() {
|
|
88
|
-
e =
|
|
88
|
+
e = A("div"), t = A("div"), u && u.c(), l = I(), o = A("p"), s = W(
|
|
89
89
|
/*profileUsername*/
|
|
90
90
|
n[9]
|
|
91
|
-
),
|
|
91
|
+
), g = I(), f = A("p"), b = W(
|
|
92
92
|
/*profileEmail*/
|
|
93
93
|
n[10]
|
|
94
|
-
), v = I(), c && c.c(), P = I(),
|
|
95
|
-
for (let d = 0; d <
|
|
96
|
-
|
|
97
|
-
M = I(), k && k.c(),
|
|
98
|
-
(n[12] ? "PlayerAccountMenuHeaderMobile" : "")),
|
|
94
|
+
), v = I(), c && c.c(), P = I(), h = A("div");
|
|
95
|
+
for (let d = 0; d < i.length; d += 1)
|
|
96
|
+
i[d].c();
|
|
97
|
+
M = I(), k && k.c(), y(o, "class", "PlayerAccountMenuUser"), y(o, "translate", "no"), y(f, "class", "PlayerAccountMenuEmail"), y(f, "translate", "no"), y(t, "class", "PlayerAccountMenuHeader " + /*isMobile*/
|
|
98
|
+
(n[12] ? "PlayerAccountMenuHeaderMobile" : "")), y(h, "class", "PlayerAccountMenuList"), y(e, "class", "PlayerAccountMenuContainer " + /*isMobile*/
|
|
99
99
|
(n[12] ? "PlayerAccountMobileContainer" : "") + " " + /*mediaQuery*/
|
|
100
100
|
(n[13].matches && /*isMobile*/
|
|
101
101
|
n[12] ? "PlayerAccountTabletContainer" : ""));
|
|
102
102
|
},
|
|
103
103
|
m(d, _) {
|
|
104
|
-
L(d, e, _), a(e, t), u && u.m(t, null), a(t, l), a(t,
|
|
105
|
-
for (let w = 0; w <
|
|
106
|
-
|
|
104
|
+
L(d, e, _), a(e, t), u && u.m(t, null), a(t, l), a(t, o), a(o, s), a(t, g), a(t, f), a(f, b), a(t, v), c && c.m(t, null), a(e, P), a(e, h);
|
|
105
|
+
for (let w = 0; w < i.length; w += 1)
|
|
106
|
+
i[w] && i[w].m(h, null);
|
|
107
107
|
a(e, M), k && k.m(e, null);
|
|
108
108
|
},
|
|
109
109
|
p(d, _) {
|
|
@@ -130,22 +130,22 @@ function Ce(n) {
|
|
|
130
130
|
let w;
|
|
131
131
|
for (w = 0; w < p.length; w += 1) {
|
|
132
132
|
const E = Z(d, p, w);
|
|
133
|
-
|
|
133
|
+
i[w] ? i[w].p(E, _) : (i[w] = K(E), i[w].c(), i[w].m(h, null));
|
|
134
134
|
}
|
|
135
|
-
for (; w <
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
for (; w < i.length; w += 1)
|
|
136
|
+
i[w].d(1);
|
|
137
|
+
i.length = p.length;
|
|
138
138
|
}
|
|
139
139
|
/*isMobile*/
|
|
140
140
|
d[12] || k.p(d, _);
|
|
141
141
|
},
|
|
142
142
|
d(d) {
|
|
143
|
-
d && F(e), u && u.d(), c && c.d(), $(
|
|
143
|
+
d && F(e), u && u.d(), c && c.d(), $(i, d), k && k.d();
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
function Fe(n) {
|
|
148
|
-
let e, t, l,
|
|
148
|
+
let e, t, l, o, s, g, f, b, v, P, h = (
|
|
149
149
|
/*isMobile*/
|
|
150
150
|
n[12] && Be()
|
|
151
151
|
), M = H(Array(18)), u = [];
|
|
@@ -153,51 +153,51 @@ function Fe(n) {
|
|
|
153
153
|
u[c] = Y(J(n, M, c));
|
|
154
154
|
return {
|
|
155
155
|
c() {
|
|
156
|
-
e =
|
|
156
|
+
e = A("div"), t = A("div"), h && h.c(), l = I(), o = A("ui-skeleton"), s = I(), g = A("ui-skeleton"), f = I(), b = A("div");
|
|
157
157
|
for (let c = 0; c < u.length; c += 1)
|
|
158
158
|
u[c].c();
|
|
159
|
-
v = I(), P =
|
|
160
|
-
(n[12] ? "PlayerAccountMenuHeaderMobile" : "")),
|
|
159
|
+
v = I(), P = A("div"), P.innerHTML = '<ui-skeleton structure="rectangle" width="auto" height="60px"></ui-skeleton>', m(o, "structure", "title"), m(o, "width", "100px"), m(o, "height", "20px"), m(o, "margin-top", "10px"), m(g, "structure", "text"), m(g, "width", "200px"), m(g, "height", "20px"), y(t, "class", "PlayerAccountMenuHeader " + /*isMobile*/
|
|
160
|
+
(n[12] ? "PlayerAccountMenuHeaderMobile" : "")), y(b, "class", "PlayerAccountMenuList"), y(P, "class", "skeletonLogOut"), y(e, "class", "PlayerAccountMenuContainer " + /*isMobile*/
|
|
161
161
|
(n[12] ? "PlayerAccountMobileContainer" : "") + " " + /*mediaQuery*/
|
|
162
162
|
(n[13].matches && /*isMobile*/
|
|
163
163
|
n[12] ? "PlayerAccountTabletContainer" : ""));
|
|
164
164
|
},
|
|
165
165
|
m(c, p) {
|
|
166
|
-
L(c, e, p), a(e, t),
|
|
167
|
-
for (let
|
|
168
|
-
u[
|
|
166
|
+
L(c, e, p), a(e, t), h && h.m(t, null), a(t, l), a(t, o), a(t, s), a(t, g), a(e, f), a(e, b);
|
|
167
|
+
for (let i = 0; i < u.length; i += 1)
|
|
168
|
+
u[i] && u[i].m(b, null);
|
|
169
169
|
a(e, v), a(e, P);
|
|
170
170
|
},
|
|
171
171
|
p(c, p) {
|
|
172
172
|
if (p[0] & /*isMobile*/
|
|
173
173
|
4096) {
|
|
174
174
|
M = H(Array(18));
|
|
175
|
-
let
|
|
176
|
-
for (
|
|
177
|
-
const k = J(c, M,
|
|
178
|
-
u[
|
|
175
|
+
let i;
|
|
176
|
+
for (i = 0; i < M.length; i += 1) {
|
|
177
|
+
const k = J(c, M, i);
|
|
178
|
+
u[i] ? u[i].p(k, p) : (u[i] = Y(k), u[i].c(), u[i].m(b, null));
|
|
179
179
|
}
|
|
180
|
-
for (;
|
|
181
|
-
u[
|
|
180
|
+
for (; i < u.length; i += 1)
|
|
181
|
+
u[i].d(1);
|
|
182
182
|
u.length = M.length;
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
185
|
d(c) {
|
|
186
|
-
c && F(e),
|
|
186
|
+
c && F(e), h && h.d(), $(u, c);
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
190
|
function Le(n) {
|
|
191
|
-
let e, t, l,
|
|
191
|
+
let e, t, l, o, s, g, f, b, v, P, h = (
|
|
192
192
|
/*$_*/
|
|
193
193
|
n[11]("title") + ""
|
|
194
194
|
), M, u, c;
|
|
195
195
|
return {
|
|
196
196
|
c() {
|
|
197
|
-
e =
|
|
197
|
+
e = A("div"), t = B("svg"), l = B("defs"), o = B("style"), s = W(".aaa{fill:var(--emw--color-white, #FFFFFF);}"), g = B("g"), f = B("g"), b = B("path"), v = I(), P = A("h3"), M = W(h), y(b, "class", "aaa"), y(b, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), y(b, "transform", "translate(15 15) rotate(180)"), y(f, "transform", "translate(20 158)"), y(g, "transform", "translate(-20 -158)"), y(t, "xmlns", "http://www.w3.org/2000/svg"), y(t, "width", "15"), y(t, "height", "15"), y(t, "viewBox", "0 0 15 15"), y(P, "class", "PlayerAccountMenuCategoryTitle"), y(e, "class", "PlayerAccountMenuCategoryWrapper");
|
|
198
198
|
},
|
|
199
|
-
m(p,
|
|
200
|
-
L(p, e,
|
|
199
|
+
m(p, i) {
|
|
200
|
+
L(p, e, i), a(e, t), a(t, l), a(l, o), a(o, s), a(t, g), a(g, f), a(f, b), a(e, v), a(e, P), a(P, M), u || (c = [
|
|
201
201
|
O(
|
|
202
202
|
t,
|
|
203
203
|
"click",
|
|
@@ -212,10 +212,10 @@ function Le(n) {
|
|
|
212
212
|
)
|
|
213
213
|
], u = !0);
|
|
214
214
|
},
|
|
215
|
-
p(p,
|
|
216
|
-
|
|
217
|
-
2048 &&
|
|
218
|
-
p[11]("title") + "") && z(M,
|
|
215
|
+
p(p, i) {
|
|
216
|
+
i[0] & /*$_*/
|
|
217
|
+
2048 && h !== (h = /*$_*/
|
|
218
|
+
p[11]("title") + "") && z(M, h);
|
|
219
219
|
},
|
|
220
220
|
d(p) {
|
|
221
221
|
p && F(e), u = !1, Me(c);
|
|
@@ -226,7 +226,7 @@ function Te(n) {
|
|
|
226
226
|
let e, t;
|
|
227
227
|
return {
|
|
228
228
|
c() {
|
|
229
|
-
e =
|
|
229
|
+
e = A("div"), t = A("general-logout"), m(
|
|
230
230
|
t,
|
|
231
231
|
"endpoint",
|
|
232
232
|
/*endpoint*/
|
|
@@ -251,37 +251,37 @@ function Te(n) {
|
|
|
251
251
|
"mbsource",
|
|
252
252
|
/*mbsource*/
|
|
253
253
|
n[4]
|
|
254
|
-
),
|
|
254
|
+
), y(e, "class", "PlayerAccountLogOutArea");
|
|
255
255
|
},
|
|
256
|
-
m(l,
|
|
257
|
-
L(l, e,
|
|
256
|
+
m(l, o) {
|
|
257
|
+
L(l, e, o), a(e, t);
|
|
258
258
|
},
|
|
259
|
-
p(l,
|
|
260
|
-
|
|
259
|
+
p(l, o) {
|
|
260
|
+
o[0] & /*endpoint*/
|
|
261
261
|
2 && m(
|
|
262
262
|
t,
|
|
263
263
|
"endpoint",
|
|
264
264
|
/*endpoint*/
|
|
265
265
|
l[1]
|
|
266
|
-
),
|
|
266
|
+
), o[0] & /*session*/
|
|
267
267
|
1 && m(
|
|
268
268
|
t,
|
|
269
269
|
"session",
|
|
270
270
|
/*session*/
|
|
271
271
|
l[0]
|
|
272
|
-
),
|
|
272
|
+
), o[0] & /*clientstyling*/
|
|
273
273
|
4 && m(
|
|
274
274
|
t,
|
|
275
275
|
"clientstyling",
|
|
276
276
|
/*clientstyling*/
|
|
277
277
|
l[2]
|
|
278
|
-
),
|
|
278
|
+
), o[0] & /*clientstylingurl*/
|
|
279
279
|
8 && m(
|
|
280
280
|
t,
|
|
281
281
|
"clientstylingurl",
|
|
282
282
|
/*clientstylingurl*/
|
|
283
283
|
l[3]
|
|
284
|
-
),
|
|
284
|
+
), o[0] & /*mbsource*/
|
|
285
285
|
16 && m(
|
|
286
286
|
t,
|
|
287
287
|
"mbsource",
|
|
@@ -295,10 +295,10 @@ function Te(n) {
|
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
297
|
function K(n) {
|
|
298
|
-
let e, t, l,
|
|
298
|
+
let e, t, l, o, s, g, f = (
|
|
299
299
|
/*menuItem*/
|
|
300
300
|
n[40].label + ""
|
|
301
|
-
), b, v, P,
|
|
301
|
+
), b, v, P, h, M;
|
|
302
302
|
function u() {
|
|
303
303
|
return (
|
|
304
304
|
/*click_handler*/
|
|
@@ -310,29 +310,29 @@ function K(n) {
|
|
|
310
310
|
}
|
|
311
311
|
return {
|
|
312
312
|
c() {
|
|
313
|
-
e =
|
|
314
|
-
(n[12] ? "PlayerAccountMenuItemIconMobile" : "")), Q(l.src,
|
|
315
|
-
n[40].img) ||
|
|
313
|
+
e = A("div"), t = A("p"), l = A("img"), s = I(), g = A("span"), b = W(f), v = I(), y(l, "class", "PlayerAccountMenuItemIcon " + /*isMobile*/
|
|
314
|
+
(n[12] ? "PlayerAccountMenuItemIconMobile" : "")), Q(l.src, o = /*menuItem*/
|
|
315
|
+
n[40].img) || y(l, "src", o), y(g, "class", "PlayerAccountMenuItemTitle"), y(t, "class", "PlayerAccountMenuItemWrapper"), y(e, "class", P = "PlayerAccountMenuItemBox " + /*selectedItem*/
|
|
316
316
|
(n[8] === /*menuItem*/
|
|
317
317
|
n[40].id && !/*isMobile*/
|
|
318
318
|
n[12] ? "PlayerAccountMenuActiveItemBox" : ""));
|
|
319
319
|
},
|
|
320
320
|
m(c, p) {
|
|
321
|
-
L(c, e, p), a(e, t), a(t, l), a(t, s), a(t,
|
|
321
|
+
L(c, e, p), a(e, t), a(t, l), a(t, s), a(t, g), a(g, b), a(e, v), h || (M = O(e, "click", u), h = !0);
|
|
322
322
|
},
|
|
323
323
|
p(c, p) {
|
|
324
324
|
n = c, p[0] & /*menuItems*/
|
|
325
|
-
128 && !Q(l.src,
|
|
326
|
-
n[40].img) &&
|
|
327
|
-
128 &&
|
|
328
|
-
n[40].label + "") && z(b,
|
|
325
|
+
128 && !Q(l.src, o = /*menuItem*/
|
|
326
|
+
n[40].img) && y(l, "src", o), p[0] & /*menuItems*/
|
|
327
|
+
128 && f !== (f = /*menuItem*/
|
|
328
|
+
n[40].label + "") && z(b, f), p[0] & /*selectedItem, menuItems*/
|
|
329
329
|
384 && P !== (P = "PlayerAccountMenuItemBox " + /*selectedItem*/
|
|
330
330
|
(n[8] === /*menuItem*/
|
|
331
331
|
n[40].id && !/*isMobile*/
|
|
332
|
-
n[12] ? "PlayerAccountMenuActiveItemBox" : "")) &&
|
|
332
|
+
n[12] ? "PlayerAccountMenuActiveItemBox" : "")) && y(e, "class", P);
|
|
333
333
|
},
|
|
334
334
|
d(c) {
|
|
335
|
-
c && F(e),
|
|
335
|
+
c && F(e), h = !1, M();
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
}
|
|
@@ -340,7 +340,7 @@ function Ee(n) {
|
|
|
340
340
|
let e, t;
|
|
341
341
|
return {
|
|
342
342
|
c() {
|
|
343
|
-
e =
|
|
343
|
+
e = A("div"), t = A("general-logout"), m(
|
|
344
344
|
t,
|
|
345
345
|
"endpoint",
|
|
346
346
|
/*endpoint*/
|
|
@@ -365,37 +365,37 @@ function Ee(n) {
|
|
|
365
365
|
"mbsource",
|
|
366
366
|
/*mbsource*/
|
|
367
367
|
n[4]
|
|
368
|
-
),
|
|
368
|
+
), y(e, "class", "PlayerAccountLogOutArea");
|
|
369
369
|
},
|
|
370
|
-
m(l,
|
|
371
|
-
L(l, e,
|
|
370
|
+
m(l, o) {
|
|
371
|
+
L(l, e, o), a(e, t);
|
|
372
372
|
},
|
|
373
|
-
p(l,
|
|
374
|
-
|
|
373
|
+
p(l, o) {
|
|
374
|
+
o[0] & /*endpoint*/
|
|
375
375
|
2 && m(
|
|
376
376
|
t,
|
|
377
377
|
"endpoint",
|
|
378
378
|
/*endpoint*/
|
|
379
379
|
l[1]
|
|
380
|
-
),
|
|
380
|
+
), o[0] & /*session*/
|
|
381
381
|
1 && m(
|
|
382
382
|
t,
|
|
383
383
|
"session",
|
|
384
384
|
/*session*/
|
|
385
385
|
l[0]
|
|
386
|
-
),
|
|
386
|
+
), o[0] & /*clientstyling*/
|
|
387
387
|
4 && m(
|
|
388
388
|
t,
|
|
389
389
|
"clientstyling",
|
|
390
390
|
/*clientstyling*/
|
|
391
391
|
l[2]
|
|
392
|
-
),
|
|
392
|
+
), o[0] & /*clientstylingurl*/
|
|
393
393
|
8 && m(
|
|
394
394
|
t,
|
|
395
395
|
"clientstylingurl",
|
|
396
396
|
/*clientstylingurl*/
|
|
397
397
|
l[3]
|
|
398
|
-
),
|
|
398
|
+
), o[0] & /*mbsource*/
|
|
399
399
|
16 && m(
|
|
400
400
|
t,
|
|
401
401
|
"mbsource",
|
|
@@ -412,7 +412,7 @@ function Be(n) {
|
|
|
412
412
|
let e;
|
|
413
413
|
return {
|
|
414
414
|
c() {
|
|
415
|
-
e =
|
|
415
|
+
e = A("div"), e.innerHTML = '<ui-skeleton structure="title" width="30px" height="30px"></ui-skeleton> <ui-skeleton structure="text" width="150px" height="30px"></ui-skeleton>', y(e, "class", "PlayerAccountMenuCategoryWrapper");
|
|
416
416
|
},
|
|
417
417
|
m(t, l) {
|
|
418
418
|
L(t, e, l);
|
|
@@ -426,7 +426,7 @@ function We(n) {
|
|
|
426
426
|
let e;
|
|
427
427
|
return {
|
|
428
428
|
c() {
|
|
429
|
-
e =
|
|
429
|
+
e = A("ui-skeleton"), m(e, "structure", "circle"), m(e, "size", "20px");
|
|
430
430
|
},
|
|
431
431
|
m(t, l) {
|
|
432
432
|
L(t, e, l);
|
|
@@ -437,57 +437,57 @@ function We(n) {
|
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
439
|
function Y(n) {
|
|
440
|
-
let e, t, l,
|
|
440
|
+
let e, t, l, o, s = !/*isMobile*/
|
|
441
441
|
n[12] && We();
|
|
442
442
|
return {
|
|
443
443
|
c() {
|
|
444
|
-
e =
|
|
444
|
+
e = A("div"), s && s.c(), t = I(), l = A("ui-skeleton"), o = I(), m(l, "structure", "rectangle"), m(l, "width", "100%"), m(
|
|
445
445
|
l,
|
|
446
446
|
"height",
|
|
447
447
|
/*isMobile*/
|
|
448
448
|
n[12] ? "120px" : "20px"
|
|
449
|
-
),
|
|
449
|
+
), y(e, "class", "PlayerAccountItemWrap " + /*isMobile*/
|
|
450
450
|
(n[12] ? "PlayerAccountItemWrapMobile" : ""));
|
|
451
451
|
},
|
|
452
|
-
m(
|
|
453
|
-
L(
|
|
452
|
+
m(g, f) {
|
|
453
|
+
L(g, e, f), s && s.m(e, null), a(e, t), a(e, l), a(e, o);
|
|
454
454
|
},
|
|
455
455
|
p: S,
|
|
456
|
-
d(
|
|
457
|
-
|
|
456
|
+
d(g) {
|
|
457
|
+
g && F(e), s && s.d();
|
|
458
458
|
}
|
|
459
459
|
};
|
|
460
460
|
}
|
|
461
461
|
function He(n) {
|
|
462
462
|
let e;
|
|
463
|
-
function t(s,
|
|
463
|
+
function t(s, g) {
|
|
464
464
|
return (
|
|
465
465
|
/*skeletonLoading*/
|
|
466
466
|
s[6] ? Fe : Ce
|
|
467
467
|
);
|
|
468
468
|
}
|
|
469
|
-
let l = t(n),
|
|
469
|
+
let l = t(n), o = l(n);
|
|
470
470
|
return {
|
|
471
471
|
c() {
|
|
472
|
-
e =
|
|
472
|
+
e = A("div"), o.c();
|
|
473
473
|
},
|
|
474
|
-
m(s,
|
|
475
|
-
L(s, e,
|
|
474
|
+
m(s, g) {
|
|
475
|
+
L(s, e, g), o.m(e, null), n[26](e);
|
|
476
476
|
},
|
|
477
|
-
p(s,
|
|
478
|
-
l === (l = t(s)) &&
|
|
477
|
+
p(s, g) {
|
|
478
|
+
l === (l = t(s)) && o ? o.p(s, g) : (o.d(1), o = l(s), o && (o.c(), o.m(e, null)));
|
|
479
479
|
},
|
|
480
480
|
i: S,
|
|
481
481
|
o: S,
|
|
482
482
|
d(s) {
|
|
483
|
-
s && F(e),
|
|
483
|
+
s && F(e), o.d(), n[26](null);
|
|
484
484
|
}
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
487
|
function ze(n, e, t) {
|
|
488
488
|
let l;
|
|
489
|
-
Ae(n, we, (
|
|
490
|
-
let { endpoint:
|
|
489
|
+
Ae(n, we, (r) => t(11, l = r));
|
|
490
|
+
let { endpoint: o = "" } = e, { cmsendpoint: s = "" } = e, { env: g = "" } = e, { session: f = "" } = e, { playerid: b = "" } = e, { lang: v = "en" } = e, { userroles: P = "" } = e, { clientstyling: h = "" } = e, { clientstylingurl: M = "" } = e, { translationurl: u = "" } = e, { activemenuitem: c = "" } = e, { mbsource: p } = e, i = !1, k = !1, d = !0, _, w = [], E, D = window.navigator.userAgent, ee = N(D) !== "PC", j = "", U = "";
|
|
491
491
|
const te = window.matchMedia("(min-width: 768px)"), ne = () => {
|
|
492
492
|
fetch(u).then((x) => x.json()).then((x) => {
|
|
493
493
|
Object.keys(x).forEach((T) => {
|
|
@@ -497,37 +497,37 @@ function ze(n, e, t) {
|
|
|
497
497
|
console.error(x);
|
|
498
498
|
});
|
|
499
499
|
};
|
|
500
|
-
Object.keys(X).forEach((
|
|
501
|
-
V(
|
|
500
|
+
Object.keys(X).forEach((r) => {
|
|
501
|
+
V(r, X[r]);
|
|
502
502
|
});
|
|
503
|
-
const R = (
|
|
504
|
-
if (
|
|
505
|
-
switch (
|
|
503
|
+
const R = (r) => {
|
|
504
|
+
if (r.data)
|
|
505
|
+
switch (r.data.type) {
|
|
506
506
|
case "UserSessionID":
|
|
507
|
-
t(0,
|
|
507
|
+
t(0, f = r.data.session);
|
|
508
508
|
break;
|
|
509
509
|
}
|
|
510
510
|
}, le = () => {
|
|
511
|
-
let
|
|
512
|
-
if (
|
|
513
|
-
return
|
|
511
|
+
let r = N(D);
|
|
512
|
+
if (r)
|
|
513
|
+
return r === "PC" ? "dk" : "mtWeb";
|
|
514
514
|
}, oe = () => {
|
|
515
|
-
const
|
|
516
|
-
|
|
515
|
+
const r = new URL(`${s}/${v}/profile-menu?env=${g}`);
|
|
516
|
+
r.searchParams.append("device", le()), fetch(r.href).then((x) => x.json()).then((x) => {
|
|
517
517
|
t(7, w = x), G();
|
|
518
518
|
}).catch((x) => {
|
|
519
519
|
console.error("Error getting menu items", x);
|
|
520
520
|
}).finally(() => {
|
|
521
|
-
t(23,
|
|
521
|
+
t(23, i = !0);
|
|
522
522
|
});
|
|
523
|
-
},
|
|
524
|
-
let
|
|
525
|
-
|
|
523
|
+
}, re = () => {
|
|
524
|
+
let r = new URL(`${o}/v1/player/${b}/profile`);
|
|
525
|
+
r.searchParams.append("userRoles", P);
|
|
526
526
|
let x = {
|
|
527
527
|
method: "GET",
|
|
528
|
-
headers: { "X-SessionID":
|
|
528
|
+
headers: { "X-SessionID": f }
|
|
529
529
|
};
|
|
530
|
-
fetch(
|
|
530
|
+
fetch(r.href, x).then((T) => T.json()).then(
|
|
531
531
|
(T) => {
|
|
532
532
|
t(9, j = T.username), t(10, U = T.email);
|
|
533
533
|
},
|
|
@@ -537,44 +537,44 @@ function ze(n, e, t) {
|
|
|
537
537
|
).finally(() => {
|
|
538
538
|
t(24, k = !0);
|
|
539
539
|
});
|
|
540
|
-
}, q = (
|
|
541
|
-
window.postMessage({ type: "ChangeAccountPage", page:
|
|
540
|
+
}, q = (r) => {
|
|
541
|
+
window.postMessage({ type: "ChangeAccountPage", page: r }, window.location.href), t(8, E = r.id);
|
|
542
542
|
}, G = () => {
|
|
543
|
-
var
|
|
544
|
-
t(8, E = (
|
|
545
|
-
},
|
|
543
|
+
var r;
|
|
544
|
+
t(8, E = (r = w.find((x) => x.path.includes(c))) == null ? void 0 : r.id);
|
|
545
|
+
}, ie = () => {
|
|
546
546
|
ke(v);
|
|
547
547
|
}, ae = () => {
|
|
548
|
-
|
|
548
|
+
re();
|
|
549
549
|
}, ce = () => {
|
|
550
550
|
window.postMessage({ type: "GoToHomepage" }, window.location.href);
|
|
551
551
|
};
|
|
552
552
|
be(() => (window.addEventListener("message", R, !1), () => {
|
|
553
553
|
window.removeEventListener("message", R);
|
|
554
554
|
}));
|
|
555
|
-
const se = (
|
|
556
|
-
function ue(
|
|
557
|
-
Pe[
|
|
558
|
-
_ =
|
|
555
|
+
const se = (r) => q(r);
|
|
556
|
+
function ue(r) {
|
|
557
|
+
Pe[r ? "unshift" : "push"](() => {
|
|
558
|
+
_ = r, t(5, _);
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
|
-
return n.$$set = (
|
|
562
|
-
"endpoint" in
|
|
561
|
+
return n.$$set = (r) => {
|
|
562
|
+
"endpoint" in r && t(1, o = r.endpoint), "cmsendpoint" in r && t(16, s = r.cmsendpoint), "env" in r && t(17, g = r.env), "session" in r && t(0, f = r.session), "playerid" in r && t(18, b = r.playerid), "lang" in r && t(19, v = r.lang), "userroles" in r && t(20, P = r.userroles), "clientstyling" in r && t(2, h = r.clientstyling), "clientstylingurl" in r && t(3, M = r.clientstylingurl), "translationurl" in r && t(21, u = r.translationurl), "activemenuitem" in r && t(22, c = r.activemenuitem), "mbsource" in r && t(4, p = r.mbsource);
|
|
563
563
|
}, n.$$.update = () => {
|
|
564
564
|
n.$$.dirty[0] & /*menuLoaded, playerInfoLoaded*/
|
|
565
|
-
25165824 && t(6, d = !
|
|
566
|
-
524288 && v &&
|
|
567
|
-
786435 &&
|
|
568
|
-
720896 && s && v &&
|
|
565
|
+
25165824 && t(6, d = !i || !k), n.$$.dirty[0] & /*lang*/
|
|
566
|
+
524288 && v && ie(), n.$$.dirty[0] & /*endpoint, session, playerid, lang*/
|
|
567
|
+
786435 && o && f && b && v && ae(), n.$$.dirty[0] & /*cmsendpoint, lang, env*/
|
|
568
|
+
720896 && s && v && g && oe(), n.$$.dirty[0] & /*activemenuitem*/
|
|
569
569
|
4194304 && c && G(), n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
|
|
570
|
-
36 &&
|
|
570
|
+
36 && h && _ && ve(_, h), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
|
|
571
571
|
40 && M && _ && _e(_, M), n.$$.dirty[0] & /*mbsource, customStylingContainer*/
|
|
572
572
|
48 && p && _ && xe(_, `${p}.Style`), n.$$.dirty[0] & /*translationurl*/
|
|
573
573
|
2097152 && u && ne();
|
|
574
574
|
}, [
|
|
575
|
-
A,
|
|
576
|
-
i,
|
|
577
575
|
f,
|
|
576
|
+
o,
|
|
577
|
+
h,
|
|
578
578
|
M,
|
|
579
579
|
p,
|
|
580
580
|
_,
|
|
@@ -589,13 +589,13 @@ function ze(n, e, t) {
|
|
|
589
589
|
q,
|
|
590
590
|
ce,
|
|
591
591
|
s,
|
|
592
|
-
|
|
592
|
+
g,
|
|
593
593
|
b,
|
|
594
594
|
v,
|
|
595
595
|
P,
|
|
596
596
|
u,
|
|
597
597
|
c,
|
|
598
|
-
|
|
598
|
+
i,
|
|
599
599
|
k,
|
|
600
600
|
se,
|
|
601
601
|
ue
|
|
@@ -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/PlayerAccountMenu-
|
|
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/PlayerAccountMenu-BoLe3ne3.cjs")).then(({default:t})=>{!customElements.get("player-account-menu")&&customElements.define("player-account-menu",t.element)})}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/PlayerAccountMenu-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/PlayerAccountMenu-zMNLr7SZ.js").then(({ default: t }) => {
|
|
14
14
|
!customElements.get("player-account-menu") && customElements.define("player-account-menu", t.element);
|
|
15
15
|
});
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GeneralLogout-CADV1Q8l.cjs");require("../stencil/ui-skeleton-CCXvjIzA.cjs");function E(l,t){e.addMessages(l,t)}function J(l){e.$locale.set(l)}const B={en:{title:"My Account"},"zh-hk":{title:"我的帳戶"},fr:{title:"Mon compte"},tr:{title:"Hesabım"},ro:{title:"Contul meu"},es:{title:"Mi Cuenta"},pt:{title:"Minha Conta"},hr:{title:"Moj račun"},"pt-br":{title:"Minha conta"},"es-mx":{title:"Mi cuenta"},"en-us":{title:"My Account"}};if(typeof window!="undefined"){let l=function(t){return function(...n){try{return t.apply(this,n)}catch(a){if(a instanceof DOMException&&a.message.includes("has already been used with this registry")||a.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw a}}};customElements.define=l(customElements.define),Promise.resolve().then(()=>require("./GeneralLogout-CADV1Q8l.cjs")).then(t=>t.GeneralLogout_ce).then(({default:t})=>{!customElements.get("general-logout")&&customElements.define("general-logout",t.element)})}function K(l){e.append_styles(l,"svelte-io9slc",".PlayerAccountMenuContainer{color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF));position:relative;height:100vh;display:flex;flex-direction:column;border-right:2px solid #58586b;animation-name:fadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.3s}.PlayerAccountMenuContainer .PlayerAccountMenuItemWrapper{margin:0;word-break:break-all;display:flex;align-items:center}.PlayerAccountMenuContainer .PlayerAccountMenuItemWrapper span{display:flex;align-items:center}.PlayerAccountMenuContainer .skeletonLogOut{width:100%}.PlayerAccountMenuHeader{color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF));flex-grow:0;padding:30px 20px}.PlayerAccountMenuHeader .PlayerAccountMenuUser{margin-bottom:5px;font-size:18px}.PlayerAccountMenuHeader .PlayerAccountMenuEmail{font-size:14px;text-overflow:ellipsis;overflow:hidden}.PlayerAccountMenuHeader p{font-weight:300}.PlayerAccountMenuHeaderMobile{color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF))}.PlayerAccountMenuItemBox{padding:16px 20px;font-size:16px;line-height:16px;display:inline-flex;width:100%;box-sizing:border-box;align-items:center;cursor:pointer}.PlayerAccountMenuItemBox .PlayerAccountMenuItemTitle{margin-left:20px}.PlayerAccountMenuItemBox:not(:last-child){border-bottom:1px solid var(--emw--color-gray-150, #828282)}.PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon{width:20px;height:20px;padding-top:unset}.PlayerAccountMenuItemBox .PlayerAccountMenuItemIconMobile{width:30px;height:30px;padding-top:15px}.PlayerAccountMenuList{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--color-gray-100, #E6E6E6) var(--emw--color-gray-300, #58586B);min-height:900px}.PlayerAccountMenuList::-webkit-scrollbar{width:6px}.PlayerAccountMenuList::-webkit-scrollbar-track{background:var(--emw--color-gray-300, #58586B)}.PlayerAccountMenuList::-webkit-scrollbar-thumb{background:var(--emw--color-gray-100, #E6E6E6)}.PlayerAccountItemWrap{display:flex;gap:20px;padding:16px 20px}.PlayerAccountItemWrap.PlayerAccountItemWrapMobile{flex-wrap:wrap;flex:0 0 33.3333%;padding:0;gap:10px}.PlayerAccountItemWrap.PlayerAccountItemWrapMobile ui-skeleton{width:100%}.PlayerAccountItemWrap ui-skeleton:last-child{flex:1}.PlayerAccountLogOutArea{background:var(--emw--color-gray-300, #58586B);color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF));width:100%;flex-grow:0;border-top:1px solid var(--emw--color-gray-150, #828282)}.PlayerAccountMenuActiveItemBox{background:var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C));color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF))}.PlayerAccountMobileContainer{height:unset}.PlayerAccountMobileContainer .PlayerAccountMenuCategoryWrapper{display:flex;align-items:center;gap:10px;margin-bottom:18px}.PlayerAccountMobileContainer .PlayerAccountMenuCategoryTitle{margin:0;font-weight:600}.PlayerAccountMobileContainer .PlayerAccountMenuItemTitle{margin-left:0;text-transform:capitalize;line-height:14px}.PlayerAccountMobileContainer .PlayerAccountMenuEmail{margin:0}.PlayerAccountMobileContainer .PlayerAccountMenuList{display:grid;grid-template-columns:calc(33% - 6.66px) calc(33% - 6.66px) calc(33% - 6.66px);column-gap:10px;row-gap:10px;padding:0 20px 20px}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox{border:1px solid var(--emw--color-gray-300, #58586B);border-radius:5px;height:auto;justify-content:center;padding-bottom:calc(100% - 22px);position:relative}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox.PlayerAccountMenuActiveItemBox{background:var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C));border-bottom:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C))}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon{width:30px}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper{display:flex;align-items:center;justify-content:space-between;flex-flow:column;gap:6px;position:absolute;top:0;bottom:0;left:0;right:0}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle{font-size:11px;padding:0 5px 15px 5px;font-weight:400;word-break:break-word;text-align:center;color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF))}.PlayerAccountMobileContainer .PlayerAccountLogOutArea{position:absolute;right:18px;top:56px;bottom:unset;background:transparent;width:48px;border-top:0}.PlayerAccountTabletContainer .PlayerAccountMenuHeader{padding:30px 40px}.PlayerAccountTabletContainer .PlayerAccountMenuCategoryTitle{font-size:32px}.PlayerAccountTabletContainer .PlayerAccountMenuUser{font-size:26px}.PlayerAccountTabletContainer .PlayerAccountMenuEmail{font-size:20px}.PlayerAccountTabletContainer .PlayerAccountMenuList{column-gap:20px;row-gap:20px;padding:0 40px 40px;grid-template-columns:calc(33% - 11px) calc(33% - 11px) calc(33% - 11px)}.PlayerAccountTabletContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon{width:80px}.PlayerAccountTabletContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper{gap:28px}.PlayerAccountTabletContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle{font-size:24px}.PlayerAccountTabletContainer .PlayerAccountLogOutArea{right:54px;top:72px}@keyframes fadeIn{0%{opacity:0.01}1%{opacity:0}50%{opacity:0}100%{opacity:1}}")}function W(l,t,n){const a=l.slice();return a[40]=t[n],a}function H(l,t,n){const a=l.slice();return a[37]=t[n],a}function Y(l){let t,n,a,r,s,m,y,f,b,_,g,h,u=l[12]&&ee(l),c=l[12]&&te(l),p=e.ensure_array_like(l[7]),i=[];for(let d=0;d<p.length;d+=1)i[d]=S(W(l,p,d));let v=!l[12]&&ne(l);return{c(){t=e.element("div"),n=e.element("div"),u&&u.c(),a=e.space(),r=e.element("p"),s=e.text(l[9]),m=e.space(),y=e.element("p"),f=e.text(l[10]),b=e.space(),c&&c.c(),_=e.space(),g=e.element("div");for(let d=0;d<i.length;d+=1)i[d].c();h=e.space(),v&&v.c(),e.attr(r,"class","PlayerAccountMenuUser"),e.attr(y,"class","PlayerAccountMenuEmail"),e.attr(n,"class","PlayerAccountMenuHeader "+(l[12]?"PlayerAccountMenuHeaderMobile":"")),e.attr(g,"class","PlayerAccountMenuList"),e.attr(t,"class","PlayerAccountMenuContainer "+(l[12]?"PlayerAccountMobileContainer":"")+" "+(l[13].matches&&l[12]?"PlayerAccountTabletContainer":""))},m(d,P){e.insert(d,t,P),e.append(t,n),u&&u.m(n,null),e.append(n,a),e.append(n,r),e.append(r,s),e.append(n,m),e.append(n,y),e.append(y,f),e.append(n,b),c&&c.m(n,null),e.append(t,_),e.append(t,g);for(let A=0;A<i.length;A+=1)i[A]&&i[A].m(g,null);e.append(t,h),v&&v.m(t,null)},p(d,P){if(d[12]&&u.p(d,P),P[0]&512&&e.set_data(s,d[9]),P[0]&1024&&e.set_data(f,d[10]),d[12]&&c.p(d,P),P[0]&20864){p=e.ensure_array_like(d[7]);let A;for(A=0;A<p.length;A+=1){const x=W(d,p,A);i[A]?i[A].p(x,P):(i[A]=S(x),i[A].c(),i[A].m(g,null))}for(;A<i.length;A+=1)i[A].d(1);i.length=p.length}d[12]||v.p(d,P)},d(d){d&&e.detach(t),u&&u.d(),c&&c.d(),e.destroy_each(i,d),v&&v.d()}}}function $(l){let t,n,a,r,s,m,y,f,b,_,g=l[12]&&le(),h=e.ensure_array_like(Array(18)),u=[];for(let c=0;c<h.length;c+=1)u[c]=z(H(l,h,c));return{c(){t=e.element("div"),n=e.element("div"),g&&g.c(),a=e.space(),r=e.element("ui-skeleton"),s=e.space(),m=e.element("ui-skeleton"),y=e.space(),f=e.element("div");for(let c=0;c<u.length;c+=1)u[c].c();b=e.space(),_=e.element("div"),_.innerHTML='<ui-skeleton structure="rectangle" width="auto" height="60px"></ui-skeleton>',e.set_custom_element_data(r,"structure","title"),e.set_custom_element_data(r,"width","100px"),e.set_custom_element_data(r,"height","20px"),e.set_custom_element_data(r,"margin-top","10px"),e.set_custom_element_data(m,"structure","text"),e.set_custom_element_data(m,"width","200px"),e.set_custom_element_data(m,"height","20px"),e.attr(n,"class","PlayerAccountMenuHeader "+(l[12]?"PlayerAccountMenuHeaderMobile":"")),e.attr(f,"class","PlayerAccountMenuList"),e.attr(_,"class","skeletonLogOut"),e.attr(t,"class","PlayerAccountMenuContainer "+(l[12]?"PlayerAccountMobileContainer":"")+" "+(l[13].matches&&l[12]?"PlayerAccountTabletContainer":""))},m(c,p){e.insert(c,t,p),e.append(t,n),g&&g.m(n,null),e.append(n,a),e.append(n,r),e.append(n,s),e.append(n,m),e.append(t,y),e.append(t,f);for(let i=0;i<u.length;i+=1)u[i]&&u[i].m(f,null);e.append(t,b),e.append(t,_)},p(c,p){if(p[0]&4096){h=e.ensure_array_like(Array(18));let i;for(i=0;i<h.length;i+=1){const v=H(c,h,i);u[i]?u[i].p(v,p):(u[i]=z(v),u[i].c(),u[i].m(f,null))}for(;i<u.length;i+=1)u[i].d(1);u.length=h.length}},d(c){c&&e.detach(t),g&&g.d(),e.destroy_each(u,c)}}}function ee(l){let t,n,a,r,s,m,y,f,b,_,g=l[11]("title")+"",h,u,c;return{c(){t=e.element("div"),n=e.svg_element("svg"),a=e.svg_element("defs"),r=e.svg_element("style"),s=e.text(".aaa{fill:var(--emw--color-white, #FFFFFF);}"),m=e.svg_element("g"),y=e.svg_element("g"),f=e.svg_element("path"),b=e.space(),_=e.element("h3"),h=e.text(g),e.attr(f,"class","aaa"),e.attr(f,"d","M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"),e.attr(f,"transform","translate(15 15) rotate(180)"),e.attr(y,"transform","translate(20 158)"),e.attr(m,"transform","translate(-20 -158)"),e.attr(n,"xmlns","http://www.w3.org/2000/svg"),e.attr(n,"width","15"),e.attr(n,"height","15"),e.attr(n,"viewBox","0 0 15 15"),e.attr(_,"class","PlayerAccountMenuCategoryTitle"),e.attr(t,"class","PlayerAccountMenuCategoryWrapper")},m(p,i){e.insert(p,t,i),e.append(t,n),e.append(n,a),e.append(a,r),e.append(r,s),e.append(n,m),e.append(m,y),e.append(y,f),e.append(t,b),e.append(t,_),e.append(_,h),u||(c=[e.listen(n,"click",l[15]),e.listen(_,"click",l[15])],u=!0)},p(p,i){i[0]&2048&&g!==(g=p[11]("title")+"")&&e.set_data(h,g)},d(p){p&&e.detach(t),u=!1,e.run_all(c)}}}function te(l){let t,n;return{c(){t=e.element("div"),n=e.element("general-logout"),e.set_custom_element_data(n,"endpoint",l[1]),e.set_custom_element_data(n,"session",l[0]),e.set_custom_element_data(n,"buttonlocation","PlayerAccountMenu"),e.set_custom_element_data(n,"clientstyling",l[2]),e.set_custom_element_data(n,"clientstylingurl",l[3]),e.set_custom_element_data(n,"mbsource",l[4]),e.attr(t,"class","PlayerAccountLogOutArea")},m(a,r){e.insert(a,t,r),e.append(t,n)},p(a,r){r[0]&2&&e.set_custom_element_data(n,"endpoint",a[1]),r[0]&1&&e.set_custom_element_data(n,"session",a[0]),r[0]&4&&e.set_custom_element_data(n,"clientstyling",a[2]),r[0]&8&&e.set_custom_element_data(n,"clientstylingurl",a[3]),r[0]&16&&e.set_custom_element_data(n,"mbsource",a[4])},d(a){a&&e.detach(t)}}}function S(l){let t,n,a,r,s,m,y=l[40].label+"",f,b,_,g,h;function u(){return l[25](l[40])}return{c(){t=e.element("div"),n=e.element("p"),a=e.element("img"),s=e.space(),m=e.element("span"),f=e.text(y),b=e.space(),e.attr(a,"class","PlayerAccountMenuItemIcon "+(l[12]?"PlayerAccountMenuItemIconMobile":"")),e.src_url_equal(a.src,r=l[40].img)||e.attr(a,"src",r),e.attr(m,"class","PlayerAccountMenuItemTitle"),e.attr(n,"class","PlayerAccountMenuItemWrapper"),e.attr(t,"class",_="PlayerAccountMenuItemBox "+(l[8]===l[40].id&&!l[12]?"PlayerAccountMenuActiveItemBox":""))},m(c,p){e.insert(c,t,p),e.append(t,n),e.append(n,a),e.append(n,s),e.append(n,m),e.append(m,f),e.append(t,b),g||(h=e.listen(t,"click",u),g=!0)},p(c,p){l=c,p[0]&128&&!e.src_url_equal(a.src,r=l[40].img)&&e.attr(a,"src",r),p[0]&128&&y!==(y=l[40].label+"")&&e.set_data(f,y),p[0]&384&&_!==(_="PlayerAccountMenuItemBox "+(l[8]===l[40].id&&!l[12]?"PlayerAccountMenuActiveItemBox":""))&&e.attr(t,"class",_)},d(c){c&&e.detach(t),g=!1,h()}}}function ne(l){let t,n;return{c(){t=e.element("div"),n=e.element("general-logout"),e.set_custom_element_data(n,"endpoint",l[1]),e.set_custom_element_data(n,"session",l[0]),e.set_custom_element_data(n,"buttonlocation","PlayerAccountMenu"),e.set_custom_element_data(n,"clientstyling",l[2]),e.set_custom_element_data(n,"clientstylingurl",l[3]),e.set_custom_element_data(n,"mbsource",l[4]),e.attr(t,"class","PlayerAccountLogOutArea")},m(a,r){e.insert(a,t,r),e.append(t,n)},p(a,r){r[0]&2&&e.set_custom_element_data(n,"endpoint",a[1]),r[0]&1&&e.set_custom_element_data(n,"session",a[0]),r[0]&4&&e.set_custom_element_data(n,"clientstyling",a[2]),r[0]&8&&e.set_custom_element_data(n,"clientstylingurl",a[3]),r[0]&16&&e.set_custom_element_data(n,"mbsource",a[4])},d(a){a&&e.detach(t)}}}function le(l){let t;return{c(){t=e.element("div"),t.innerHTML='<ui-skeleton structure="title" width="30px" height="30px"></ui-skeleton> <ui-skeleton structure="text" width="150px" height="30px"></ui-skeleton>',e.attr(t,"class","PlayerAccountMenuCategoryWrapper")},m(n,a){e.insert(n,t,a)},d(n){n&&e.detach(t)}}}function ae(l){let t;return{c(){t=e.element("ui-skeleton"),e.set_custom_element_data(t,"structure","circle"),e.set_custom_element_data(t,"size","20px")},m(n,a){e.insert(n,t,a)},d(n){n&&e.detach(t)}}}function z(l){let t,n,a,r,s=!l[12]&&ae();return{c(){t=e.element("div"),s&&s.c(),n=e.space(),a=e.element("ui-skeleton"),r=e.space(),e.set_custom_element_data(a,"structure","rectangle"),e.set_custom_element_data(a,"width","100%"),e.set_custom_element_data(a,"height",l[12]?"120px":"20px"),e.attr(t,"class","PlayerAccountItemWrap "+(l[12]?"PlayerAccountItemWrapMobile":""))},m(m,y){e.insert(m,t,y),s&&s.m(t,null),e.append(t,n),e.append(t,a),e.append(t,r)},p:e.noop,d(m){m&&e.detach(t),s&&s.d()}}}function oe(l){let t;function n(s,m){return s[6]?$:Y}let a=n(l),r=a(l);return{c(){t=e.element("div"),r.c()},m(s,m){e.insert(s,t,m),r.m(t,null),l[26](t)},p(s,m){a===(a=n(s))&&r?r.p(s,m):(r.d(1),r=a(s),r&&(r.c(),r.m(t,null)))},i:e.noop,o:e.noop,d(s){s&&e.detach(t),r.d(),l[26](null)}}}function re(l,t,n){let a;e.component_subscribe(l,e.$format,o=>n(11,a=o));let{endpoint:r=""}=t,{cmsendpoint:s=""}=t,{env:m=""}=t,{session:y=""}=t,{playerid:f=""}=t,{lang:b="en"}=t,{userroles:_=""}=t,{clientstyling:g=""}=t,{clientstylingurl:h=""}=t,{translationurl:u=""}=t,{activemenuitem:c=""}=t,{mbsource:p}=t,i=!1,v=!1,d=!0,P,A=[],x,k=window.navigator.userAgent,D=e.getDevice(k)!=="PC",I="",C="";const j=window.matchMedia("(min-width: 768px)"),U=()=>{fetch(u).then(M=>M.json()).then(M=>{Object.keys(M).forEach(w=>{E(w,M[w])})}).catch(M=>{console.error(M)})};Object.keys(B).forEach(o=>{E(o,B[o])});const F=o=>{if(o.data)switch(o.data.type){case"UserSessionID":n(0,y=o.data.session);break}},q=()=>{let o=e.getDevice(k);if(o)return o==="PC"?"dk":"mtWeb"},R=()=>{const o=new URL(`${s}/${b}/profile-menu?env=${m}`);o.searchParams.append("device",q()),fetch(o.href).then(M=>M.json()).then(M=>{n(7,A=M),T()}).catch(M=>{console.error("Error getting menu items",M)}).finally(()=>{n(23,i=!0)})},G=()=>{let o=new URL(`${r}/v1/player/${f}/profile`);o.searchParams.append("userRoles",_);let M={method:"GET",headers:{"X-SessionID":y}};fetch(o.href,M).then(w=>w.json()).then(w=>{n(9,I=w.username),n(10,C=w.email)},w=>{console.error(w)}).finally(()=>{n(24,v=!0)})},L=o=>{window.postMessage({type:"ChangeAccountPage",page:o},window.location.href),n(8,x=o.id)},T=()=>{var o;n(8,x=(o=A.find(M=>M.path.includes(c)))==null?void 0:o.id)},N=()=>{J(b)},Q=()=>{G()},V=()=>{window.postMessage({type:"GoToHomepage"},window.location.href)};e.onMount(()=>(window.addEventListener("message",F,!1),()=>{window.removeEventListener("message",F)}));const X=o=>L(o);function Z(o){e.binding_callbacks[o?"unshift":"push"](()=>{P=o,n(5,P)})}return l.$$set=o=>{"endpoint"in o&&n(1,r=o.endpoint),"cmsendpoint"in o&&n(16,s=o.cmsendpoint),"env"in o&&n(17,m=o.env),"session"in o&&n(0,y=o.session),"playerid"in o&&n(18,f=o.playerid),"lang"in o&&n(19,b=o.lang),"userroles"in o&&n(20,_=o.userroles),"clientstyling"in o&&n(2,g=o.clientstyling),"clientstylingurl"in o&&n(3,h=o.clientstylingurl),"translationurl"in o&&n(21,u=o.translationurl),"activemenuitem"in o&&n(22,c=o.activemenuitem),"mbsource"in o&&n(4,p=o.mbsource)},l.$$.update=()=>{l.$$.dirty[0]&25165824&&n(6,d=!i||!v),l.$$.dirty[0]&524288&&b&&N(),l.$$.dirty[0]&786435&&r&&y&&f&&b&&Q(),l.$$.dirty[0]&720896&&s&&b&&m&&R(),l.$$.dirty[0]&4194304&&c&&T(),l.$$.dirty[0]&36&&g&&P&&e.setClientStyling(P,g),l.$$.dirty[0]&40&&h&&P&&e.setClientStylingURL(P,h),l.$$.dirty[0]&48&&p&&P&&e.setStreamStyling(P,`${p}.Style`),l.$$.dirty[0]&2097152&&u&&U()},[y,r,g,h,p,P,d,A,x,I,C,a,D,j,L,V,s,m,f,b,_,u,c,i,v,X,Z]}class O extends e.SvelteComponent{constructor(t){super(),e.init(this,t,re,oe,e.safe_not_equal,{endpoint:1,cmsendpoint:16,env:17,session:0,playerid:18,lang:19,userroles:20,clientstyling:2,clientstylingurl:3,translationurl:21,activemenuitem:22,mbsource:4},K,[-1,-1])}get endpoint(){return this.$$.ctx[1]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get cmsendpoint(){return this.$$.ctx[16]}set cmsendpoint(t){this.$$set({cmsendpoint:t}),e.flush()}get env(){return this.$$.ctx[17]}set env(t){this.$$set({env:t}),e.flush()}get session(){return this.$$.ctx[0]}set session(t){this.$$set({session:t}),e.flush()}get playerid(){return this.$$.ctx[18]}set playerid(t){this.$$set({playerid:t}),e.flush()}get lang(){return this.$$.ctx[19]}set lang(t){this.$$set({lang:t}),e.flush()}get userroles(){return this.$$.ctx[20]}set userroles(t){this.$$set({userroles:t}),e.flush()}get clientstyling(){return this.$$.ctx[2]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[3]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[21]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get activemenuitem(){return this.$$.ctx[22]}set activemenuitem(t){this.$$set({activemenuitem:t}),e.flush()}get mbsource(){return this.$$.ctx[4]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}}e.create_custom_element(O,{endpoint:{},cmsendpoint:{},env:{},session:{},playerid:{},lang:{},userroles:{},clientstyling:{},clientstylingurl:{},translationurl:{},activemenuitem:{},mbsource:{}},[],[],!0);exports.default=O;
|