@everymatrix/player-account-menu-nd 1.55.0 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,695 @@
1
+ import { a as de, $ as ge, S as ye, i as pe, f as C, s as fe, c as he, b as Ae, n as O, d as F, e as L, g as h, h as be, j as V, o as Me, k as Pe, l as H, m as ee, p as a, q as k, r as g, t as d, u as W, v as z, w as we, x as D, y as T, z as X, A as ve, B as xe, C as _e, D as ke } from "./GeneralLogout-BbFRw_PP.js";
2
+ import "../stencil/ui-skeleton-DlfwJJb1.js";
3
+ function Z(n, e) {
4
+ de(n, e);
5
+ }
6
+ function Ce(n) {
7
+ ge.set(n);
8
+ }
9
+ const Q = {
10
+ en: {
11
+ title: "My Account"
12
+ },
13
+ "zh-hk": {
14
+ title: "我的帳戶"
15
+ },
16
+ fr: {
17
+ title: "Mon compte"
18
+ },
19
+ tr: {
20
+ title: "Hesabım"
21
+ },
22
+ ro: {
23
+ title: "Contul meu"
24
+ },
25
+ es: {
26
+ title: "Mi Cuenta"
27
+ },
28
+ pt: {
29
+ title: "Minha Conta"
30
+ },
31
+ hr: {
32
+ title: "Moj račun"
33
+ },
34
+ "pt-br": {
35
+ title: "Minha conta"
36
+ },
37
+ "es-mx": {
38
+ title: "Mi cuenta"
39
+ },
40
+ "en-us": {
41
+ title: "My Account"
42
+ }
43
+ };
44
+ if (typeof window != "undefined") {
45
+ let n = function(e) {
46
+ return function(...t) {
47
+ try {
48
+ return e.apply(this, t);
49
+ } catch (l) {
50
+ if (l instanceof DOMException && l.message.includes("has already been used with this registry") || l.message.includes("Cannot define multiple custom elements with the same tag name"))
51
+ return !1;
52
+ throw l;
53
+ }
54
+ };
55
+ };
56
+ customElements.define = n(customElements.define), import("./GeneralLogout-BbFRw_PP.js").then((e) => e.G).then(({ default: e }) => {
57
+ !customElements.get("general-logout") && customElements.define("general-logout", e.element);
58
+ });
59
+ }
60
+ function Ie(n) {
61
+ Ae(n, "svelte-7x6kyy", '.PlayerAccountMenuContainer{color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF));position:relative;height:100vh;display:flex;flex-direction:column;padding:0 15px;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%;border-radius:20px;overflow:hidden}.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:var(--emw--font-size-large, 20px);color:var(--emw--pam-color-secondary, var(--emw--color-secondary, #E98B10))}.PlayerAccountMenuHeader .PlayerAccountMenuEmail{font-size:var(--emw--font-size-small, 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:var(--emw--font-size-medium, 16px);line-height:16px;display:inline-flex;width:100%;box-sizing:border-box;align-items:center;border-radius:var(--emw--border-radius-medium, 20px);border:2px solid transparent;cursor:pointer;transition:all 0.3s linear}.PlayerAccountMenuItemBox:hover{transition:all 0.3s linear;background:rgba(35, 176, 78, 0.3);border:2px solid var(--emw--pam-color-primary, var(--emw--color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 20px);color:var(--emw--color-white, #FFFFFF)}.PlayerAccountMenuItemBox .PlayerAccountMenuItemTitle{margin-left:20px}.PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon{width:20px;height:20px;padding-top:unset}.PlayerAccountMenuItemBox .PlayerAccountMenuItemIconMobile{width:30px;height:30px;padding-top:15px}.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{padding:5px;width:100%;box-sizing:border-box}.PlayerAccountItemWrap ui-skeleton:last-child{flex:1}.PlayerAccountLogOutArea{background-color:rgba(253, 40, 57, 0.3);color:var(--emw--color-white, #FFFFFF);border-radius:var(--emw--border-radius-medium, 20px);width:100%;flex-grow:0}.PlayerAccountMenuActiveItemBox{background:rgba(35, 176, 78, 0.3);color:var(--emw--pam-color-primary, var(--emw--color-primary, #23B04E));border:2px solid var(--emw--pam-color-primary, var(--emw--color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 20px);transition:all 0.3s linear}.PlayerAccountMobileContainer{height:unset;padding:0}.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:flex;flex-direction:column;align-items:flex-start;margin:0px 15px;min-height:900px}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox{background:rgba(35, 176, 78, 0.3);color:var(--emw--pam-color-primary, var(--emw--color-primary, #23B04E));border:2px solid var(--emw--pam-color-primary, var(--emw--color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 20px);height:60px;margin:5px 0;align-items:flex-start;position:relative}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox.PlayerAccountMenuActiveItemBox{background:var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C))}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon{width:20px;padding:0 10px 0 15px}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox::after{content:"";display:inline-block;width:15px;height:15px;background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2215%22 height=%2215%22 viewBox=%220 0 15 15%22%3E%3Cdefs%3E%3Cstyle%3E.aaa%7Bfill:var(--emw--color-white,%20%23FFFFFF);%7D%3C/style%3E%3C/defs%3E%3Cg transform=%22translate(-20%20-158)%22%3E%3Cg transform=%22translate(20%20158)%22%3E%3Cpath class=%22aaa%22 d=%22M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z%22 transform=%22translate(15%2015)%20rotate(180)%22%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E");background-size:contain;transform:scaleX(-1);background-repeat:no-repeat;position:absolute;right:15px;top:22px}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper{display:flex;justify-items:center;align-items:center;flex-flow:row;gap:6px;position:absolute;top:0;bottom:0;left:0;right:0}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle{font-size:var(--emw--font-size-medium, 16px);line-height:16px;font-weight:400;word-break:break-word;text-align:left;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;color:var(--emw--pam-color-secondary, var(--emw--color-secondary, #E98B10))}.PlayerAccountTabletContainer .PlayerAccountMenuEmail{font-size:18px}.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,.PlayerAccountTabletContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIconMobile{width:30px}.PlayerAccountTabletContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper{gap:12px}.PlayerAccountTabletContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle{font-size:var(--emw--font-size-large, 20px)}.PlayerAccountTabletContainer .PlayerAccountLogOutArea{right:54px;top:72px}@keyframes fadeIn{0%{opacity:0.01}1%{opacity:0}50%{opacity:0}100%{opacity:1}}');
62
+ }
63
+ function J(n, e, t) {
64
+ const l = n.slice();
65
+ return l[41] = e[t], l;
66
+ }
67
+ function K(n, e, t) {
68
+ const l = n.slice();
69
+ return l[38] = e[t], l;
70
+ }
71
+ function Fe(n) {
72
+ let e, t, l, i, s, m, A, M, v, P, b, w, u = (
73
+ /*isMobile*/
74
+ n[11] && Ee(n)
75
+ ), c = (
76
+ /*isMobile*/
77
+ n[11] && Be(n)
78
+ ), y = H(
79
+ /*menuItems*/
80
+ n[6]
81
+ ), o = [];
82
+ for (let p = 0; p < y.length; p += 1)
83
+ o[p] = Y(J(n, y, p));
84
+ let _ = !/*isMobile*/
85
+ n[11] && Te(n);
86
+ return {
87
+ c() {
88
+ e = h("div"), t = h("div"), u && u.c(), l = k(), i = h("p"), s = z(
89
+ /*profileUsername*/
90
+ n[8]
91
+ ), m = k(), A = h("p"), M = z(
92
+ /*profileEmail*/
93
+ n[9]
94
+ ), v = k(), c && c.c(), P = k(), b = h("div");
95
+ for (let p = 0; p < o.length; p += 1)
96
+ o[p].c();
97
+ w = k(), _ && _.c(), d(i, "class", "PlayerAccountMenuUser"), d(A, "class", "PlayerAccountMenuEmail"), d(t, "class", "PlayerAccountMenuHeader " + /*isMobile*/
98
+ (n[11] ? "PlayerAccountMenuHeaderMobile" : "")), d(b, "class", "PlayerAccountMenuList"), d(e, "class", "PlayerAccountMenuContainer " + /*isMobile*/
99
+ (n[11] ? "PlayerAccountMobileContainer" : "") + " " + /*mediaQuery*/
100
+ (n[12].matches && /*isMobile*/
101
+ n[11] ? "PlayerAccountTabletContainer" : ""));
102
+ },
103
+ m(p, I) {
104
+ L(p, e, I), a(e, t), u && u.m(t, null), a(t, l), a(t, i), a(i, s), a(t, m), a(t, A), a(A, M), a(t, v), c && c.m(t, null), a(e, P), a(e, b);
105
+ for (let f = 0; f < o.length; f += 1)
106
+ o[f] && o[f].m(b, null);
107
+ a(e, w), _ && _.m(e, null);
108
+ },
109
+ p(p, I) {
110
+ if (
111
+ /*isMobile*/
112
+ p[11] && u.p(p, I), I[0] & /*profileUsername*/
113
+ 256 && W(
114
+ s,
115
+ /*profileUsername*/
116
+ p[8]
117
+ ), I[0] & /*profileEmail*/
118
+ 512 && W(
119
+ M,
120
+ /*profileEmail*/
121
+ p[9]
122
+ ), /*isMobile*/
123
+ p[11] && c.p(p, I), I[0] & /*selectedItem, menuItems, isMobile, openAccountSection*/
124
+ 10432
125
+ ) {
126
+ y = H(
127
+ /*menuItems*/
128
+ p[6]
129
+ );
130
+ let f;
131
+ for (f = 0; f < y.length; f += 1) {
132
+ const B = J(p, y, f);
133
+ o[f] ? o[f].p(B, I) : (o[f] = Y(B), o[f].c(), o[f].m(b, null));
134
+ }
135
+ for (; f < o.length; f += 1)
136
+ o[f].d(1);
137
+ o.length = y.length;
138
+ }
139
+ /*isMobile*/
140
+ p[11] || _.p(p, I);
141
+ },
142
+ d(p) {
143
+ p && F(e), u && u.d(), c && c.d(), ee(o, p), _ && _.d();
144
+ }
145
+ };
146
+ }
147
+ function Le(n) {
148
+ let e, t, l, i, s, m, A, M, v, P, b = (
149
+ /*isMobile*/
150
+ n[11] && ze()
151
+ ), w = H(Array(18)), u = [];
152
+ for (let c = 0; c < w.length; c += 1)
153
+ u[c] = $(K(n, w, c));
154
+ return {
155
+ c() {
156
+ e = h("div"), t = h("div"), b && b.c(), l = k(), i = h("ui-skeleton"), s = k(), m = h("ui-skeleton"), A = k(), M = h("div");
157
+ for (let c = 0; c < u.length; c += 1)
158
+ u[c].c();
159
+ v = k(), P = h("div"), P.innerHTML = '<ui-skeleton structure="rectangle" width="auto" height="60px"></ui-skeleton>', g(i, "structure", "title"), g(i, "width", "100px"), g(i, "height", "20px"), g(i, "margin-top", "20px"), g(m, "structure", "text"), g(m, "width", "200px"), g(m, "height", "20px"), d(t, "class", "PlayerAccountMenuHeader " + /*isMobile*/
160
+ (n[11] ? "PlayerAccountMenuHeaderMobile" : "")), d(M, "class", "PlayerAccountMenuList"), d(P, "class", "skeletonLogOut"), d(e, "class", "PlayerAccountMenuContainer " + /*isMobile*/
161
+ (n[11] ? "PlayerAccountMobileContainer" : "") + " " + /*mediaQuery*/
162
+ (n[12].matches && /*isMobile*/
163
+ n[11] ? "PlayerAccountTabletContainer" : ""));
164
+ },
165
+ m(c, y) {
166
+ L(c, e, y), a(e, t), b && b.m(t, null), a(t, l), a(t, i), a(t, s), a(t, m), a(e, A), a(e, M);
167
+ for (let o = 0; o < u.length; o += 1)
168
+ u[o] && u[o].m(M, null);
169
+ a(e, v), a(e, P);
170
+ },
171
+ p(c, y) {
172
+ if (y[0] & /*isMobile*/
173
+ 2048) {
174
+ w = H(Array(18));
175
+ let o;
176
+ for (o = 0; o < w.length; o += 1) {
177
+ const _ = K(c, w, o);
178
+ u[o] ? u[o].p(_, y) : (u[o] = $(_), u[o].c(), u[o].m(M, null));
179
+ }
180
+ for (; o < u.length; o += 1)
181
+ u[o].d(1);
182
+ u.length = w.length;
183
+ }
184
+ },
185
+ d(c) {
186
+ c && F(e), b && b.d(), ee(u, c);
187
+ }
188
+ };
189
+ }
190
+ function Ee(n) {
191
+ let e, t, l, i, s, m, A, M, v, P, b = (
192
+ /*$_*/
193
+ n[10]("title") + ""
194
+ ), w, u, c;
195
+ return {
196
+ c() {
197
+ e = h("div"), t = T("svg"), l = T("defs"), i = T("style"), s = z(".aaa{fill:var(--emw--color-white, #FFFFFF);}"), m = T("g"), A = T("g"), M = T("path"), v = k(), P = h("h3"), w = z(b), d(M, "class", "aaa"), d(M, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), d(M, "transform", "translate(15 15) rotate(180)"), d(A, "transform", "translate(20 158)"), d(m, "transform", "translate(-20 -158)"), d(t, "xmlns", "http://www.w3.org/2000/svg"), d(t, "width", "15"), d(t, "height", "15"), d(t, "viewBox", "0 0 15 15"), d(P, "class", "PlayerAccountMenuCategoryTitle"), d(e, "class", "PlayerAccountMenuCategoryWrapper");
198
+ },
199
+ m(y, o) {
200
+ L(y, e, o), a(e, t), a(t, l), a(l, i), a(i, s), a(t, m), a(m, A), a(A, M), a(e, v), a(e, P), a(P, w), u || (c = [
201
+ D(
202
+ t,
203
+ "click",
204
+ /*goToHome*/
205
+ n[14]
206
+ ),
207
+ D(
208
+ P,
209
+ "click",
210
+ /*goToHome*/
211
+ n[14]
212
+ )
213
+ ], u = !0);
214
+ },
215
+ p(y, o) {
216
+ o[0] & /*$_*/
217
+ 1024 && b !== (b = /*$_*/
218
+ y[10]("title") + "") && W(w, b);
219
+ },
220
+ d(y) {
221
+ y && F(e), u = !1, we(c);
222
+ }
223
+ };
224
+ }
225
+ function Be(n) {
226
+ let e, t;
227
+ return {
228
+ c() {
229
+ e = h("div"), t = h("general-logout"), g(
230
+ t,
231
+ "endpoint",
232
+ /*endpoint*/
233
+ n[1]
234
+ ), g(
235
+ t,
236
+ "session",
237
+ /*session*/
238
+ n[0]
239
+ ), g(t, "buttonlocation", "PlayerAccountMenu"), g(
240
+ t,
241
+ "clientstyling",
242
+ /*clientstyling*/
243
+ n[2]
244
+ ), g(
245
+ t,
246
+ "clientstylingurl",
247
+ /*clientstylingurl*/
248
+ n[3]
249
+ ), d(e, "class", "PlayerAccountLogOutArea");
250
+ },
251
+ m(l, i) {
252
+ L(l, e, i), a(e, t);
253
+ },
254
+ p(l, i) {
255
+ i[0] & /*endpoint*/
256
+ 2 && g(
257
+ t,
258
+ "endpoint",
259
+ /*endpoint*/
260
+ l[1]
261
+ ), i[0] & /*session*/
262
+ 1 && g(
263
+ t,
264
+ "session",
265
+ /*session*/
266
+ l[0]
267
+ ), i[0] & /*clientstyling*/
268
+ 4 && g(
269
+ t,
270
+ "clientstyling",
271
+ /*clientstyling*/
272
+ l[2]
273
+ ), i[0] & /*clientstylingurl*/
274
+ 8 && g(
275
+ t,
276
+ "clientstylingurl",
277
+ /*clientstylingurl*/
278
+ l[3]
279
+ );
280
+ },
281
+ d(l) {
282
+ l && F(e);
283
+ }
284
+ };
285
+ }
286
+ function Y(n) {
287
+ let e, t, l, i, s, m, A = (
288
+ /*menuItem*/
289
+ n[41].label + ""
290
+ ), M, v, P, b, w;
291
+ function u() {
292
+ return (
293
+ /*click_handler*/
294
+ n[26](
295
+ /*menuItem*/
296
+ n[41]
297
+ )
298
+ );
299
+ }
300
+ return {
301
+ c() {
302
+ e = h("div"), t = h("p"), l = h("img"), s = k(), m = h("span"), M = z(A), v = k(), d(l, "class", "PlayerAccountMenuItemIcon " + /*isMobile*/
303
+ (n[11] ? "PlayerAccountMenuItemIconMobile" : "")), X(l.src, i = /*menuItem*/
304
+ n[41].img) || d(l, "src", i), d(m, "class", "PlayerAccountMenuItemTitle"), d(t, "class", "PlayerAccountMenuItemWrapper"), d(e, "class", P = "PlayerAccountMenuItemBox " + /*selectedItem*/
305
+ (n[7] === /*menuItem*/
306
+ n[41].id && !/*isMobile*/
307
+ n[11] ? "PlayerAccountMenuActiveItemBox" : ""));
308
+ },
309
+ m(c, y) {
310
+ L(c, e, y), a(e, t), a(t, l), a(t, s), a(t, m), a(m, M), a(e, v), b || (w = D(e, "click", u), b = !0);
311
+ },
312
+ p(c, y) {
313
+ n = c, y[0] & /*menuItems*/
314
+ 64 && !X(l.src, i = /*menuItem*/
315
+ n[41].img) && d(l, "src", i), y[0] & /*menuItems*/
316
+ 64 && A !== (A = /*menuItem*/
317
+ n[41].label + "") && W(M, A), y[0] & /*selectedItem, menuItems*/
318
+ 192 && P !== (P = "PlayerAccountMenuItemBox " + /*selectedItem*/
319
+ (n[7] === /*menuItem*/
320
+ n[41].id && !/*isMobile*/
321
+ n[11] ? "PlayerAccountMenuActiveItemBox" : "")) && d(e, "class", P);
322
+ },
323
+ d(c) {
324
+ c && F(e), b = !1, w();
325
+ }
326
+ };
327
+ }
328
+ function Te(n) {
329
+ let e, t;
330
+ return {
331
+ c() {
332
+ e = h("div"), t = h("general-logout"), g(
333
+ t,
334
+ "endpoint",
335
+ /*endpoint*/
336
+ n[1]
337
+ ), g(
338
+ t,
339
+ "session",
340
+ /*session*/
341
+ n[0]
342
+ ), g(t, "buttonlocation", "PlayerAccountMenu"), g(
343
+ t,
344
+ "clientstyling",
345
+ /*clientstyling*/
346
+ n[2]
347
+ ), g(
348
+ t,
349
+ "clientstylingurl",
350
+ /*clientstylingurl*/
351
+ n[3]
352
+ ), d(e, "class", "PlayerAccountLogOutArea");
353
+ },
354
+ m(l, i) {
355
+ L(l, e, i), a(e, t);
356
+ },
357
+ p(l, i) {
358
+ i[0] & /*endpoint*/
359
+ 2 && g(
360
+ t,
361
+ "endpoint",
362
+ /*endpoint*/
363
+ l[1]
364
+ ), i[0] & /*session*/
365
+ 1 && g(
366
+ t,
367
+ "session",
368
+ /*session*/
369
+ l[0]
370
+ ), i[0] & /*clientstyling*/
371
+ 4 && g(
372
+ t,
373
+ "clientstyling",
374
+ /*clientstyling*/
375
+ l[2]
376
+ ), i[0] & /*clientstylingurl*/
377
+ 8 && g(
378
+ t,
379
+ "clientstylingurl",
380
+ /*clientstylingurl*/
381
+ l[3]
382
+ );
383
+ },
384
+ d(l) {
385
+ l && F(e);
386
+ }
387
+ };
388
+ }
389
+ function ze(n) {
390
+ let e;
391
+ return {
392
+ c() {
393
+ e = h("div"), e.innerHTML = '<ui-skeleton structure="title" width="30px" height="40px"></ui-skeleton> <ui-skeleton structure="text" width="150px" height="40px"></ui-skeleton>', d(e, "class", "PlayerAccountMenuCategoryWrapper");
394
+ },
395
+ m(t, l) {
396
+ L(t, e, l);
397
+ },
398
+ d(t) {
399
+ t && F(e);
400
+ }
401
+ };
402
+ }
403
+ function He(n) {
404
+ let e;
405
+ return {
406
+ c() {
407
+ e = h("ui-skeleton"), g(e, "structure", "circle"), g(e, "size", "20px");
408
+ },
409
+ m(t, l) {
410
+ L(t, e, l);
411
+ },
412
+ d(t) {
413
+ t && F(e);
414
+ }
415
+ };
416
+ }
417
+ function $(n) {
418
+ let e, t, l, i, s = !/*isMobile*/
419
+ n[11] && He();
420
+ return {
421
+ c() {
422
+ e = h("div"), s && s.c(), t = k(), l = h("ui-skeleton"), i = k(), g(l, "structure", "rectangle"), g(l, "width", "100%"), g(
423
+ l,
424
+ "height",
425
+ /*isMobile*/
426
+ n[11] ? "60px" : "20px"
427
+ ), d(e, "class", "PlayerAccountItemWrap " + /*isMobile*/
428
+ (n[11] ? "PlayerAccountItemWrapMobile" : ""));
429
+ },
430
+ m(m, A) {
431
+ L(m, e, A), s && s.m(e, null), a(e, t), a(e, l), a(e, i);
432
+ },
433
+ p: O,
434
+ d(m) {
435
+ m && F(e), s && s.d();
436
+ }
437
+ };
438
+ }
439
+ function We(n) {
440
+ let e;
441
+ function t(s, m) {
442
+ return (
443
+ /*skeletonLoading*/
444
+ s[5] ? Le : Fe
445
+ );
446
+ }
447
+ let l = t(n), i = l(n);
448
+ return {
449
+ c() {
450
+ e = h("div"), i.c();
451
+ },
452
+ m(s, m) {
453
+ L(s, e, m), i.m(e, null), n[27](e);
454
+ },
455
+ p(s, m) {
456
+ l === (l = t(s)) && i ? i.p(s, m) : (i.d(1), i = l(s), i && (i.c(), i.m(e, null)));
457
+ },
458
+ i: O,
459
+ o: O,
460
+ d(s) {
461
+ s && F(e), i.d(), n[27](null);
462
+ }
463
+ };
464
+ }
465
+ function Se(n, e, t) {
466
+ let l;
467
+ be(n, ve, (r) => t(10, l = r));
468
+ let { endpoint: i = "" } = e, { cmsendpoint: s = "" } = e, { env: m = "" } = e, { session: A = "" } = e, { playerid: M = "" } = e, { lang: v = "en" } = e, { selecteditem: P = "" } = e, { userroles: b = "" } = e, { clientstyling: w = "" } = e, { clientstylingurl: u = "" } = e, { mbsource: c } = e, { translationurl: y = "" } = e, { activemenuitem: o = "" } = e, _ = !1, p = !1, I = !0, f, B = [], S, U = window.navigator.userAgent, te = V(U) !== "PC", j = "", R = "";
469
+ const ne = window.matchMedia("(min-width: 768px)"), le = () => {
470
+ fetch(y).then((x) => x.json()).then((x) => {
471
+ Object.keys(x).forEach((E) => {
472
+ Z(E, x[E]);
473
+ });
474
+ }).catch((x) => {
475
+ console.error(x);
476
+ });
477
+ };
478
+ Object.keys(Q).forEach((r) => {
479
+ Z(r, Q[r]);
480
+ });
481
+ const N = (r) => {
482
+ if (r.data)
483
+ switch (r.data.type) {
484
+ case "AccountMenuDetails":
485
+ availableMenuItemsArray = r.data.accountMenuInfo;
486
+ break;
487
+ case "UserSessionID":
488
+ t(0, A = r.data.session);
489
+ break;
490
+ }
491
+ }, re = () => {
492
+ let r = V(U);
493
+ if (r)
494
+ return r === "PC" ? "dk" : "mtWeb";
495
+ }, ie = () => {
496
+ const r = new URL(`${s}/${v}/profile-menu?env=${m}`);
497
+ r.searchParams.append("device", re()), fetch(r.href).then((x) => x.json()).then((x) => {
498
+ t(6, B = x), G();
499
+ }).catch((x) => {
500
+ console.error("Error getting menu items", x);
501
+ }).finally(() => {
502
+ t(24, _ = !0);
503
+ });
504
+ }, oe = () => {
505
+ let r = new URL(`${i}/v1/player/${M}/profile`);
506
+ r.searchParams.append("userRoles", b);
507
+ let x = {
508
+ method: "GET",
509
+ headers: { "X-SessionID": A }
510
+ };
511
+ fetch(r.href, x).then((E) => E.json()).then(
512
+ (E) => {
513
+ t(8, j = E.username), t(9, R = E.email);
514
+ },
515
+ (E) => {
516
+ console.error(E);
517
+ }
518
+ ).finally(() => {
519
+ t(25, p = !0);
520
+ });
521
+ }, q = (r) => {
522
+ window.postMessage({ type: "ChangeAccountPage", page: r }, window.location.href), t(7, S = r.id);
523
+ }, G = () => {
524
+ var r;
525
+ t(7, S = (r = B.find((x) => x.path.includes(o))) == null ? void 0 : r.id);
526
+ }, ae = () => {
527
+ window.postMessage({ type: "GoToHomepage" }, window.location.href);
528
+ }, ce = () => {
529
+ Ce(v);
530
+ }, se = () => {
531
+ oe();
532
+ };
533
+ Me(() => (window.addEventListener("message", N, !1), () => {
534
+ window.removeEventListener("message", N);
535
+ }));
536
+ const ue = (r) => q(r);
537
+ function me(r) {
538
+ Pe[r ? "unshift" : "push"](() => {
539
+ f = r, t(4, f);
540
+ });
541
+ }
542
+ return n.$$set = (r) => {
543
+ "endpoint" in r && t(1, i = r.endpoint), "cmsendpoint" in r && t(15, s = r.cmsendpoint), "env" in r && t(16, m = r.env), "session" in r && t(0, A = r.session), "playerid" in r && t(17, M = r.playerid), "lang" in r && t(18, v = r.lang), "selecteditem" in r && t(19, P = r.selecteditem), "userroles" in r && t(20, b = r.userroles), "clientstyling" in r && t(2, w = r.clientstyling), "clientstylingurl" in r && t(3, u = r.clientstylingurl), "mbsource" in r && t(21, c = r.mbsource), "translationurl" in r && t(22, y = r.translationurl), "activemenuitem" in r && t(23, o = r.activemenuitem);
544
+ }, n.$$.update = () => {
545
+ n.$$.dirty[0] & /*menuLoaded, playerInfoLoaded*/
546
+ 50331648 && t(5, I = !_ || !p), n.$$.dirty[0] & /*lang*/
547
+ 262144 && v && ce(), n.$$.dirty[0] & /*endpoint, session, playerid, lang*/
548
+ 393219 && i && A && M && v && se(), n.$$.dirty[0] & /*cmsendpoint, lang, env*/
549
+ 360448 && s && v && m && ie(), n.$$.dirty[0] & /*activemenuitem*/
550
+ 8388608 && o && G(), n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
551
+ 20 && w && f && xe(f, w), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
552
+ 24 && u && f && _e(f, u), n.$$.dirty[0] & /*mbsource, customStylingContainer*/
553
+ 2097168 && c && f && ke(f, `${c}.Style`), n.$$.dirty[0] & /*translationurl*/
554
+ 4194304 && y && le();
555
+ }, [
556
+ A,
557
+ i,
558
+ w,
559
+ u,
560
+ f,
561
+ I,
562
+ B,
563
+ S,
564
+ j,
565
+ R,
566
+ l,
567
+ te,
568
+ ne,
569
+ q,
570
+ ae,
571
+ s,
572
+ m,
573
+ M,
574
+ v,
575
+ P,
576
+ b,
577
+ c,
578
+ y,
579
+ o,
580
+ _,
581
+ p,
582
+ ue,
583
+ me
584
+ ];
585
+ }
586
+ class Oe extends ye {
587
+ constructor(e) {
588
+ super(), pe(
589
+ this,
590
+ e,
591
+ Se,
592
+ We,
593
+ fe,
594
+ {
595
+ endpoint: 1,
596
+ cmsendpoint: 15,
597
+ env: 16,
598
+ session: 0,
599
+ playerid: 17,
600
+ lang: 18,
601
+ selecteditem: 19,
602
+ userroles: 20,
603
+ clientstyling: 2,
604
+ clientstylingurl: 3,
605
+ mbsource: 21,
606
+ translationurl: 22,
607
+ activemenuitem: 23
608
+ },
609
+ Ie,
610
+ [-1, -1]
611
+ );
612
+ }
613
+ get endpoint() {
614
+ return this.$$.ctx[1];
615
+ }
616
+ set endpoint(e) {
617
+ this.$$set({ endpoint: e }), C();
618
+ }
619
+ get cmsendpoint() {
620
+ return this.$$.ctx[15];
621
+ }
622
+ set cmsendpoint(e) {
623
+ this.$$set({ cmsendpoint: e }), C();
624
+ }
625
+ get env() {
626
+ return this.$$.ctx[16];
627
+ }
628
+ set env(e) {
629
+ this.$$set({ env: e }), C();
630
+ }
631
+ get session() {
632
+ return this.$$.ctx[0];
633
+ }
634
+ set session(e) {
635
+ this.$$set({ session: e }), C();
636
+ }
637
+ get playerid() {
638
+ return this.$$.ctx[17];
639
+ }
640
+ set playerid(e) {
641
+ this.$$set({ playerid: e }), C();
642
+ }
643
+ get lang() {
644
+ return this.$$.ctx[18];
645
+ }
646
+ set lang(e) {
647
+ this.$$set({ lang: e }), C();
648
+ }
649
+ get selecteditem() {
650
+ return this.$$.ctx[19];
651
+ }
652
+ set selecteditem(e) {
653
+ this.$$set({ selecteditem: e }), C();
654
+ }
655
+ get userroles() {
656
+ return this.$$.ctx[20];
657
+ }
658
+ set userroles(e) {
659
+ this.$$set({ userroles: e }), C();
660
+ }
661
+ get clientstyling() {
662
+ return this.$$.ctx[2];
663
+ }
664
+ set clientstyling(e) {
665
+ this.$$set({ clientstyling: e }), C();
666
+ }
667
+ get clientstylingurl() {
668
+ return this.$$.ctx[3];
669
+ }
670
+ set clientstylingurl(e) {
671
+ this.$$set({ clientstylingurl: e }), C();
672
+ }
673
+ get mbsource() {
674
+ return this.$$.ctx[21];
675
+ }
676
+ set mbsource(e) {
677
+ this.$$set({ mbsource: e }), C();
678
+ }
679
+ get translationurl() {
680
+ return this.$$.ctx[22];
681
+ }
682
+ set translationurl(e) {
683
+ this.$$set({ translationurl: e }), C();
684
+ }
685
+ get activemenuitem() {
686
+ return this.$$.ctx[23];
687
+ }
688
+ set activemenuitem(e) {
689
+ this.$$set({ activemenuitem: e }), C();
690
+ }
691
+ }
692
+ he(Oe, { endpoint: {}, cmsendpoint: {}, env: {}, session: {}, playerid: {}, lang: {}, selecteditem: {}, userroles: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {}, activemenuitem: {} }, [], [], !0);
693
+ export {
694
+ Oe as default
695
+ };