@everymatrix/player-profile-info 1.87.27 → 1.87.29

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,434 @@
1
+ import { a as W, $ as G, S as J, i as Q, s as V, f as u, b as Y, n as R, d as k, c as E, e as Z, g as $, h as ee, o as ie, j as w, k as te, l as se, m as X, p as j, t as ne, q as S, r as f, u as oe, v as ae, w as re, x as ce } from "./PlayerProfileInfo-BxKthCGQ.js";
2
+ function le(t, e) {
3
+ W(t, e);
4
+ }
5
+ function be(t) {
6
+ G.set(t);
7
+ }
8
+ const me = {
9
+ en: {
10
+ btnEnableBiometrics: "Enable biometrics",
11
+ btnDisableBiometrics: "Disable biometrics",
12
+ successEnableBiometrics: "Biometric authentication enabled.",
13
+ successDisableBiometrics: "Biometric authentication disabled.",
14
+ errorMessage: "Biometrics update failed"
15
+ },
16
+ "zh-hk": {
17
+ btnEnableBiometrics: "Enable biometrics",
18
+ btnDisableBiometrics: "Disable biometrics",
19
+ successEnableBiometrics: "Biometric authentication enabled.",
20
+ successDisableBiometrics: "Biometric authentication disabled.",
21
+ errorMessage: "Biometrics update failed"
22
+ },
23
+ fr: {
24
+ btnEnableBiometrics: "Enable biometrics",
25
+ btnDisableBiometrics: "Disable biometrics",
26
+ successEnableBiometrics: "Biometric authentication enabled.",
27
+ successDisableBiometrics: "Biometric authentication disabled.",
28
+ errorMessage: "Biometrics update failed"
29
+ },
30
+ tr: {
31
+ btnEnableBiometrics: "Enable biometrics",
32
+ btnDisableBiometrics: "Disable biometrics",
33
+ successEnableBiometrics: "Biometric authentication enabled.",
34
+ successDisableBiometrics: "Biometric authentication disabled.",
35
+ errorMessage: "Biometrics update failed"
36
+ },
37
+ ro: {
38
+ btnEnableBiometrics: "Enable biometrics",
39
+ btnDisableBiometrics: "Disable biometrics",
40
+ successEnableBiometrics: "Biometric authentication enabled.",
41
+ successDisableBiometrics: "Biometric authentication disabled.",
42
+ errorMessage: "Biometrics update failed"
43
+ },
44
+ es: {
45
+ btnEnableBiometrics: "Enable biometrics",
46
+ btnDisableBiometrics: "Disable biometrics",
47
+ successEnableBiometrics: "Biometric authentication enabled.",
48
+ successDisableBiometrics: "Biometric authentication disabled.",
49
+ errorMessage: "Biometrics update failed"
50
+ },
51
+ pt: {
52
+ btnEnableBiometrics: "Enable biometrics",
53
+ btnDisableBiometrics: "Disable biometrics",
54
+ successEnableBiometrics: "Biometric authentication enabled.",
55
+ successDisableBiometrics: "Biometric authentication disabled.",
56
+ errorMessage: "Biometrics update failed"
57
+ },
58
+ hr: {
59
+ btnEnableBiometrics: "Omogući biometriju",
60
+ btnDisableBiometrics: "Onemogući biometriju",
61
+ successEnableBiometrics: "Biometric authentication enabled.",
62
+ successDisableBiometrics: "Biometric authentication disabled.",
63
+ errorMessage: "Biometrics update failed"
64
+ },
65
+ "pt-br": {
66
+ btnEnableBiometrics: "Enable biometrics",
67
+ btnDisableBiometrics: "Disable biometrics",
68
+ successEnableBiometrics: "Biometric authentication enabled.",
69
+ successDisableBiometrics: "Biometric authentication disabled.",
70
+ errorMessage: "Biometrics update failed"
71
+ },
72
+ "es-mx": {
73
+ btnEnableBiometrics: "Enable biometrics",
74
+ btnDisableBiometrics: "Disable biometrics",
75
+ successEnableBiometrics: "Biometric authentication enabled.",
76
+ successDisableBiometrics: "Biometric authentication disabled.",
77
+ errorMessage: "Biometrics update failed"
78
+ },
79
+ "en-us": {
80
+ btnEnableBiometrics: "Enable biometrics",
81
+ btnDisableBiometrics: "Disable biometrics",
82
+ successEnableBiometrics: "Biometric authentication enabled.",
83
+ successDisableBiometrics: "Biometric authentication disabled.",
84
+ errorMessage: "Biometrics update failed"
85
+ }
86
+ };
87
+ function ue(t, e, i) {
88
+ return window.emMessageBus && (e = window.emMessageBus.subscribe(t, i)), e;
89
+ }
90
+ function de(t) {
91
+ Y(t, "svelte-4r3z7g", '*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.toggle-content{display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:transparent;border:none;border-radius:20px;cursor:pointer;gap:10px}.toggle-content:disabled{cursor:not-allowed}.toggle-content .skip-switch{display:inline-flex;align-items:center;position:relative;height:20px;vertical-align:middle;transition:opacity 0.2s}.toggle-content .skip-switch.disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}.toggle-content .skip-switch.checked .skip-switch-core{border-color:var(--emw--color-primary, #22b04e);background:var(--emw--color-primary, #22b04e)}.toggle-content .skip-switch.checked .skip-switch-core::after{transform:translateX(14px)}.toggle-content .skip-switch .skip-switch-input{position:absolute;width:0;height:0;opacity:0;margin:0}.toggle-content .skip-switch .skip-switch-core{width:34px;height:20px;border-radius:20px;border:1px solid var(--emw--color-gray-300, #ababab);background:var(--emw--color-gray-300, #ababab);position:relative;cursor:pointer;transition:background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1)}.toggle-content .skip-switch .skip-switch-core::after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;background:#fff;border-radius:50%;transform:translateX(0);transition:transform 0.25s cubic-bezier(0.22, 1, 0.36, 1)}.skip-switch.shake{animation:shake 0.4s ease}@keyframes shake{0%{transform:translateX(0)}20%{transform:translateX(-3px)}40%{transform:translateX(3px)}60%{transform:translateX(-3px)}80%{transform:translateX(3px)}100%{transform:translateX(0)}}.BiometricsToggle{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));border:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));color:var(--emw--button-typography, var(--emw--color-white, #ffffff));cursor:pointer;border-radius:5px;width:100%;height:50px;display:flex;align-items:center;justify-content:center;font-size:16px;text-transform:uppercase;transition-duration:0.3s;box-sizing:border-box}.BiometricsToggle:disabled{opacity:0.6;cursor:not-allowed}');
92
+ }
93
+ function z(t) {
94
+ let e;
95
+ function i(c, a) {
96
+ if (
97
+ /*mode*/
98
+ c[1] === "button"
99
+ )
100
+ return fe;
101
+ if (
102
+ /*mode*/
103
+ c[1] === "switch"
104
+ )
105
+ return ge;
106
+ }
107
+ let o = i(t), s = o && o(t);
108
+ return {
109
+ c() {
110
+ e = w("div"), s && s.c();
111
+ },
112
+ m(c, a) {
113
+ E(c, e, a), s && s.m(e, null), t[17](e);
114
+ },
115
+ p(c, a) {
116
+ o === (o = i(c)) && s ? s.p(c, a) : (s && s.d(1), s = o && o(c), s && (s.c(), s.m(e, null)));
117
+ },
118
+ d(c) {
119
+ c && k(e), s && s.d(), t[17](null);
120
+ }
121
+ };
122
+ }
123
+ function ge(t) {
124
+ let e, i, o, s, c;
125
+ return {
126
+ c() {
127
+ e = w("button"), i = w("div"), i.innerHTML = '<input type="checkbox" class="skip-switch-input"/> <span class="skip-switch-core"></span>', S(i, "class", "skip-switch"), f(
128
+ i,
129
+ "checked",
130
+ /*biometricsEnabled*/
131
+ t[4]
132
+ ), f(
133
+ i,
134
+ "disabled",
135
+ /*isUpdatingBiometrics*/
136
+ t[5] || /*isLoading*/
137
+ t[2]
138
+ ), f(
139
+ i,
140
+ "shake",
141
+ /*shake*/
142
+ t[6]
143
+ ), S(e, "class", "toggle-content"), e.disabled = o = /*isUpdatingBiometrics*/
144
+ t[5] || /*isLoading*/
145
+ t[2];
146
+ },
147
+ m(a, r) {
148
+ E(a, e, r), X(e, i), s || (c = j(
149
+ e,
150
+ "click",
151
+ /*toggleBiometrics*/
152
+ t[8]
153
+ ), s = !0);
154
+ },
155
+ p(a, r) {
156
+ r & /*biometricsEnabled*/
157
+ 16 && f(
158
+ i,
159
+ "checked",
160
+ /*biometricsEnabled*/
161
+ a[4]
162
+ ), r & /*isUpdatingBiometrics, isLoading*/
163
+ 36 && f(
164
+ i,
165
+ "disabled",
166
+ /*isUpdatingBiometrics*/
167
+ a[5] || /*isLoading*/
168
+ a[2]
169
+ ), r & /*shake*/
170
+ 64 && f(
171
+ i,
172
+ "shake",
173
+ /*shake*/
174
+ a[6]
175
+ ), r & /*isUpdatingBiometrics, isLoading*/
176
+ 36 && o !== (o = /*isUpdatingBiometrics*/
177
+ a[5] || /*isLoading*/
178
+ a[2]) && (e.disabled = o);
179
+ },
180
+ d(a) {
181
+ a && k(e), s = !1, c();
182
+ }
183
+ };
184
+ }
185
+ function fe(t) {
186
+ let e, i = (
187
+ /*biometricsEnabled*/
188
+ (t[4] ? (
189
+ /*$_*/
190
+ t[7]("btnDisableBiometrics")
191
+ ) : (
192
+ /*$_*/
193
+ t[7]("btnEnableBiometrics")
194
+ )) + ""
195
+ ), o, s, c, a;
196
+ return {
197
+ c() {
198
+ e = w("button"), o = ne(i), S(e, "class", "BiometricsToggle"), e.disabled = s = /*isUpdatingBiometrics*/
199
+ t[5] || /*isLoading*/
200
+ t[2];
201
+ },
202
+ m(r, l) {
203
+ E(r, e, l), X(e, o), c || (a = j(
204
+ e,
205
+ "click",
206
+ /*click_handler*/
207
+ t[16]
208
+ ), c = !0);
209
+ },
210
+ p(r, l) {
211
+ l & /*biometricsEnabled, $_*/
212
+ 144 && i !== (i = /*biometricsEnabled*/
213
+ (r[4] ? (
214
+ /*$_*/
215
+ r[7]("btnDisableBiometrics")
216
+ ) : (
217
+ /*$_*/
218
+ r[7]("btnEnableBiometrics")
219
+ )) + "") && se(o, i), l & /*isUpdatingBiometrics, isLoading*/
220
+ 36 && s !== (s = /*isUpdatingBiometrics*/
221
+ r[5] || /*isLoading*/
222
+ r[2]) && (e.disabled = s);
223
+ },
224
+ d(r) {
225
+ r && k(e), c = !1, a();
226
+ }
227
+ };
228
+ }
229
+ function he(t) {
230
+ let e, i = (
231
+ /*isNativeApp*/
232
+ t[0] && z(t)
233
+ );
234
+ return {
235
+ c() {
236
+ i && i.c(), e = Z();
237
+ },
238
+ m(o, s) {
239
+ i && i.m(o, s), E(o, e, s);
240
+ },
241
+ p(o, [s]) {
242
+ /*isNativeApp*/
243
+ o[0] ? i ? i.p(o, s) : (i = z(o), i.c(), i.m(e.parentNode, e)) : i && (i.d(1), i = null);
244
+ },
245
+ i: R,
246
+ o: R,
247
+ d(o) {
248
+ o && k(e), i && i.d(o);
249
+ }
250
+ };
251
+ }
252
+ function Be(t, e, i) {
253
+ let o;
254
+ $(t, ee, (n) => i(7, o = n));
255
+ let { lang: s = "en" } = e, { clientstyling: c = "" } = e, { clientstylingurl: a = "" } = e, { mbsource: r } = e, { translationurl: l = "" } = e, { isNativeApp: B = !1 } = e, { mode: T = "button" } = e, { isFromLogin: p = !1 } = e, { isLoading: L = !1 } = e, m, C, h, d = null, y = !1, g = !1, _ = !1;
256
+ const D = (n) => {
257
+ Object.keys(n).forEach((b) => {
258
+ le(b, n[b]);
259
+ });
260
+ }, F = () => {
261
+ fetch(l).then((b) => b.json()).then((b) => {
262
+ D(b);
263
+ }).catch((b) => {
264
+ console.log(b);
265
+ });
266
+ };
267
+ D(me);
268
+ const U = () => {
269
+ be(s);
270
+ }, N = {
271
+ BIOMETRICS_RESPONSE: 3e3,
272
+ SHAKE_DURATION: 500
273
+ };
274
+ let M = !1;
275
+ const H = () => {
276
+ i(6, M = !0), setTimeout(
277
+ () => {
278
+ i(6, M = !1);
279
+ },
280
+ N.SHAKE_DURATION
281
+ );
282
+ }, v = () => {
283
+ d && clearTimeout(d), d = setTimeout(
284
+ () => {
285
+ i(5, g = !1), H(), I("error", o("errorMessage"));
286
+ },
287
+ N.BIOMETRICS_RESPONSE
288
+ );
289
+ }, A = async () => {
290
+ g || (i(5, g = !0), _ = !0, window.postMessage({
291
+ type: "ToggleBiometrics",
292
+ data: `${!y}`,
293
+ isFromLogin: p
294
+ }), v());
295
+ }, x = (n) => {
296
+ n.data?.type === "NativeAppReady" && (i(0, B = !0), O()), n.data?.type === "BiometricsStatus" && (i(4, y = n.data.status || !1), i(5, g = !1), d && (clearTimeout(d), d = null), _ && (p || I("success", o(y ? "successEnableBiometrics" : "successDisableBiometrics"))), _ = !1);
297
+ }, O = () => {
298
+ i(5, g = !0), window.postMessage({ type: "GetBiometricsStatus" }), v();
299
+ }, q = () => {
300
+ window.postMessage({ type: "CheckNativeApp" });
301
+ }, I = (n, b) => {
302
+ window.postMessage(
303
+ {
304
+ type: "WidgetNotification",
305
+ data: {
306
+ type: n,
307
+ message: b,
308
+ config: { clearBefore: !0 }
309
+ }
310
+ },
311
+ window.location.href
312
+ );
313
+ };
314
+ ie(() => (window.addEventListener("message", x), B === !0 ? O() : q(), () => {
315
+ window.removeEventListener("message", x), h && h.unsubscribe(), d && clearTimeout(d);
316
+ }));
317
+ const P = () => A();
318
+ function K(n) {
319
+ te[n ? "unshift" : "push"](() => {
320
+ m = n, i(3, m);
321
+ });
322
+ }
323
+ return t.$$set = (n) => {
324
+ "lang" in n && i(9, s = n.lang), "clientstyling" in n && i(10, c = n.clientstyling), "clientstylingurl" in n && i(11, a = n.clientstylingurl), "mbsource" in n && i(12, r = n.mbsource), "translationurl" in n && i(13, l = n.translationurl), "isNativeApp" in n && i(0, B = n.isNativeApp), "mode" in n && i(1, T = n.mode), "isFromLogin" in n && i(14, p = n.isFromLogin), "isLoading" in n && i(2, L = n.isLoading);
325
+ }, t.$$.update = () => {
326
+ t.$$.dirty & /*lang*/
327
+ 512 && s && U(), t.$$.dirty & /*clientstyling, customStylingContainer*/
328
+ 1032 && c && m && oe(m, c), t.$$.dirty & /*clientstylingurl, customStylingContainer*/
329
+ 2056 && a && m && ae(m, a), t.$$.dirty & /*mbsource, customStylingContainer*/
330
+ 4104 && r && m && re(m, `${r}.Style`, C), t.$$.dirty & /*translationurl*/
331
+ 8192 && l && F(), t.$$.dirty & /*mbsource, translationurl, translationSubscription*/
332
+ 45056 && r && !l && i(15, h = ue(`${r}.Translation`, h, D));
333
+ }, [
334
+ B,
335
+ T,
336
+ L,
337
+ m,
338
+ y,
339
+ g,
340
+ M,
341
+ o,
342
+ A,
343
+ s,
344
+ c,
345
+ a,
346
+ r,
347
+ l,
348
+ p,
349
+ h,
350
+ P,
351
+ K
352
+ ];
353
+ }
354
+ class pe extends J {
355
+ constructor(e) {
356
+ super(), Q(
357
+ this,
358
+ e,
359
+ Be,
360
+ he,
361
+ V,
362
+ {
363
+ lang: 9,
364
+ clientstyling: 10,
365
+ clientstylingurl: 11,
366
+ mbsource: 12,
367
+ translationurl: 13,
368
+ isNativeApp: 0,
369
+ mode: 1,
370
+ isFromLogin: 14,
371
+ isLoading: 2
372
+ },
373
+ de
374
+ );
375
+ }
376
+ get lang() {
377
+ return this.$$.ctx[9];
378
+ }
379
+ set lang(e) {
380
+ this.$$set({ lang: e }), u();
381
+ }
382
+ get clientstyling() {
383
+ return this.$$.ctx[10];
384
+ }
385
+ set clientstyling(e) {
386
+ this.$$set({ clientstyling: e }), u();
387
+ }
388
+ get clientstylingurl() {
389
+ return this.$$.ctx[11];
390
+ }
391
+ set clientstylingurl(e) {
392
+ this.$$set({ clientstylingurl: e }), u();
393
+ }
394
+ get mbsource() {
395
+ return this.$$.ctx[12];
396
+ }
397
+ set mbsource(e) {
398
+ this.$$set({ mbsource: e }), u();
399
+ }
400
+ get translationurl() {
401
+ return this.$$.ctx[13];
402
+ }
403
+ set translationurl(e) {
404
+ this.$$set({ translationurl: e }), u();
405
+ }
406
+ get isNativeApp() {
407
+ return this.$$.ctx[0];
408
+ }
409
+ set isNativeApp(e) {
410
+ this.$$set({ isNativeApp: e }), u();
411
+ }
412
+ get mode() {
413
+ return this.$$.ctx[1];
414
+ }
415
+ set mode(e) {
416
+ this.$$set({ mode: e }), u();
417
+ }
418
+ get isFromLogin() {
419
+ return this.$$.ctx[14];
420
+ }
421
+ set isFromLogin(e) {
422
+ this.$$set({ isFromLogin: e }), u();
423
+ }
424
+ get isLoading() {
425
+ return this.$$.ctx[2];
426
+ }
427
+ set isLoading(e) {
428
+ this.$$set({ isLoading: e }), u();
429
+ }
430
+ }
431
+ ce(pe, { lang: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {}, isNativeApp: { type: "Boolean" }, mode: {}, isFromLogin: { type: "Boolean" }, isLoading: { type: "Boolean" } }, [], [], !0);
432
+ export {
433
+ pe as default
434
+ };