@everymatrix/general-player-login-form-nd 1.86.2 → 1.86.3
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/{GeneralPlayerLoginFormNd-CRhH59_Q.js → GeneralPlayerLoginFormNd-CIFY-TEP.js} +764 -785
- package/components/GeneralPlayerLoginFormNd-CqDYJZQ_.cjs +18 -0
- package/components/{GeneralPlayerLoginFormNd-2zAEC5xl.js → GeneralPlayerLoginFormNd-CwjcsknB.js} +743 -764
- package/components/{GeneralPlayerSmsVerificationForm-E8wW2iv1.js → GeneralPlayerSmsVerificationForm-CfwXVDVq.js} +25 -25
- package/components/{GeneralPlayerSmsVerificationForm-twswR9Vh.js → GeneralPlayerSmsVerificationForm-DX_5tHlq.js} +21 -21
- package/components/{GeneralPlayerSmsVerificationForm-458aJWpZ.cjs → GeneralPlayerSmsVerificationForm-eWh4GS2q.cjs} +1 -1
- package/es2015/general-player-login-form-nd.cjs +1 -1
- package/es2015/general-player-login-form-nd.js +1 -1
- package/esnext/general-player-login-form-nd.js +1 -1
- package/package.json +1 -1
- package/components/GeneralPlayerLoginFormNd-CvfNpsrG.cjs +0 -18
|
@@ -14,7 +14,7 @@ var D = (o, e, i) => new Promise((a, r) => {
|
|
|
14
14
|
}, c = (d) => d.done ? a(d.value) : Promise.resolve(d.value).then(s, m);
|
|
15
15
|
c((i = i.apply(o, e)).next());
|
|
16
16
|
});
|
|
17
|
-
import { $ as Y, a as $, b as ee, S as te, i as ie,
|
|
17
|
+
import { $ as Y, a as $, b as ee, S as te, i as ie, f as M, c as oe, s as re, d as ne, e as w, g as z, t as k, h as y, j as R, k as l, l as J, m as L, n as E, o as G, p as P, r as ae, q as se, u as le, v as de, w as ce, x as ue, y as me, z as fe } from "./GeneralPlayerLoginFormNd-CIFY-TEP.js";
|
|
18
18
|
function ve({ withLocale: o, translations: e }) {
|
|
19
19
|
Y.subscribe((i) => {
|
|
20
20
|
i == null && ($.set(e), Y.set(o));
|
|
@@ -131,7 +131,7 @@ const W = {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
function ge(o) {
|
|
134
|
-
|
|
134
|
+
ne(o, "svelte-c25n4u", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.Title{font-size:14px;margin:0;padding-bottom:20px}.Field{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;padding-bottom:30px;position:relative}.Field label{font-size:14px;font-weight:300;padding-bottom:5px}.Field input,.Field select{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.Field.InvalidField input{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.Field.Hidden{display:none}.LoginSMSHint{margin-top:20px}.InvalidInput{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:10px;line-height:10px}.ErrorMessage{margin:0 0 15px 0;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.Button{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.Button[disabled]{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-100, #E6E6E6);cursor:not-allowed}.Button.SmsVerificationResend{background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8));color:var(--emw--registration-typography, var(--emw--color-contrast, #07072A))}");
|
|
135
135
|
}
|
|
136
136
|
function pe(o) {
|
|
137
137
|
let e = (
|
|
@@ -143,7 +143,7 @@ function pe(o) {
|
|
|
143
143
|
i = k(e);
|
|
144
144
|
},
|
|
145
145
|
m(a, r) {
|
|
146
|
-
|
|
146
|
+
R(a, i, r);
|
|
147
147
|
},
|
|
148
148
|
p(a, r) {
|
|
149
149
|
r & /*$_*/
|
|
@@ -151,7 +151,7 @@ function pe(o) {
|
|
|
151
151
|
a[5]("errorTitle") + "") && E(i, e);
|
|
152
152
|
},
|
|
153
153
|
d(a) {
|
|
154
|
-
a &&
|
|
154
|
+
a && P(i);
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
}
|
|
@@ -165,7 +165,7 @@ function ye(o) {
|
|
|
165
165
|
i = k(e);
|
|
166
166
|
},
|
|
167
167
|
m(a, r) {
|
|
168
|
-
|
|
168
|
+
R(a, i, r);
|
|
169
169
|
},
|
|
170
170
|
p(a, r) {
|
|
171
171
|
r & /*$_*/
|
|
@@ -173,7 +173,7 @@ function ye(o) {
|
|
|
173
173
|
a[5]("title") + "") && E(i, e);
|
|
174
174
|
},
|
|
175
175
|
d(a) {
|
|
176
|
-
a &&
|
|
176
|
+
a && P(i);
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
179
|
}
|
|
@@ -187,7 +187,7 @@ function Q(o) {
|
|
|
187
187
|
e = w("p"), a = k(i), y(e, "class", "InvalidInput");
|
|
188
188
|
},
|
|
189
189
|
m(r, s) {
|
|
190
|
-
|
|
190
|
+
R(r, e, s), l(e, a);
|
|
191
191
|
},
|
|
192
192
|
p(r, s) {
|
|
193
193
|
s & /*$_*/
|
|
@@ -195,7 +195,7 @@ function Q(o) {
|
|
|
195
195
|
r[5]("smsCodeError") + "") && E(a, i);
|
|
196
196
|
},
|
|
197
197
|
d(r) {
|
|
198
|
-
r &&
|
|
198
|
+
r && P(e);
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
201
|
}
|
|
@@ -209,7 +209,7 @@ function X(o) {
|
|
|
209
209
|
e = w("p"), a = k(i), y(e, "class", "SmsVerificationResendMessage");
|
|
210
210
|
},
|
|
211
211
|
m(r, s) {
|
|
212
|
-
|
|
212
|
+
R(r, e, s), l(e, a);
|
|
213
213
|
},
|
|
214
214
|
p(r, s) {
|
|
215
215
|
s & /*$_*/
|
|
@@ -217,7 +217,7 @@ function X(o) {
|
|
|
217
217
|
r[5]("resendMessage") + "") && E(a, i);
|
|
218
218
|
},
|
|
219
219
|
d(r) {
|
|
220
|
-
r &&
|
|
220
|
+
r && P(e);
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
}
|
|
@@ -234,7 +234,7 @@ function Z(o) {
|
|
|
234
234
|
), m = k(")"), y(e, "class", "SmsVerificationResendTimer");
|
|
235
235
|
},
|
|
236
236
|
m(c, d) {
|
|
237
|
-
|
|
237
|
+
R(c, e, d), l(e, i), l(e, r), l(e, s), l(e, m);
|
|
238
238
|
},
|
|
239
239
|
p(c, d) {
|
|
240
240
|
d & /*secondsLeft*/
|
|
@@ -247,7 +247,7 @@ function Z(o) {
|
|
|
247
247
|
);
|
|
248
248
|
},
|
|
249
249
|
d(c) {
|
|
250
|
-
c &&
|
|
250
|
+
c && P(e);
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
253
|
}
|
|
@@ -283,7 +283,7 @@ function he(o) {
|
|
|
283
283
|
o[3], y(e, "class", "Container SmsVerificationContainer");
|
|
284
284
|
},
|
|
285
285
|
m(n, p) {
|
|
286
|
-
|
|
286
|
+
R(n, e, p), l(e, i), S.m(i, null), l(e, a), l(e, r), l(r, s), l(s, c), l(s, d), l(s, b), l(r, T), l(r, u), J(
|
|
287
287
|
u,
|
|
288
288
|
/*smsCode*/
|
|
289
289
|
o[1]
|
|
@@ -319,7 +319,7 @@ function he(o) {
|
|
|
319
319
|
32 && m !== (m = /*$_*/
|
|
320
320
|
n[5]("code") + "") && E(c, m), p & /*smsCode*/
|
|
321
321
|
2 && u.value !== /*smsCode*/
|
|
322
|
-
n[1] &&
|
|
322
|
+
n[1] && J(
|
|
323
323
|
u,
|
|
324
324
|
/*smsCode*/
|
|
325
325
|
n[1]
|
|
@@ -336,16 +336,16 @@ function he(o) {
|
|
|
336
336
|
8 && (f.disabled = /*timer*/
|
|
337
337
|
n[3]);
|
|
338
338
|
},
|
|
339
|
-
i:
|
|
340
|
-
o:
|
|
339
|
+
i: G,
|
|
340
|
+
o: G,
|
|
341
341
|
d(n) {
|
|
342
|
-
n &&
|
|
342
|
+
n && P(e), S.d(), v && v.d(), g && g.d(), t && t.d(), o[20](null), N = !1, ae(H);
|
|
343
343
|
}
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
346
|
function be(o, e, i) {
|
|
347
347
|
let a;
|
|
348
|
-
|
|
348
|
+
se(o, fe, (t) => i(5, a = t));
|
|
349
349
|
let { endpoint: r = "" } = e, { tokenid: s = "" } = e, { playerid: m = "" } = e, { smstemplate: c = "Please use this code {0} to activate your accout" } = e, { number: d = "" } = e, { mbsource: b } = e, { clientstyling: T = "" } = e, { clientstylingurl: u = "" } = e, { translationurl: F = "" } = e, C, I = !0, j = !1, _, h, x = +localStorage.getItem("smsTimer") || 0, B = Date.now() / 1e3 - x, f = 60 - Math.floor(B);
|
|
350
350
|
const V = { numeric: /^[0-9]{0,6}$/ };
|
|
351
351
|
ve({ withLocale: "en", translations: {} });
|
|
@@ -418,7 +418,7 @@ function be(o, e, i) {
|
|
|
418
418
|
}, A = (t) => {
|
|
419
419
|
!V.numeric.test(t.key) && t.keyCode !== 8 && t.keyCode !== 9 && t.keyCode !== 46 && t.preventDefault();
|
|
420
420
|
};
|
|
421
|
-
|
|
421
|
+
le(() => {
|
|
422
422
|
if (!m || !d) {
|
|
423
423
|
let t = JSON.parse(localStorage.getItem("playerData"));
|
|
424
424
|
i(10, m = t.playerid), i(11, d = t.number);
|
|
@@ -431,7 +431,7 @@ function be(o, e, i) {
|
|
|
431
431
|
}
|
|
432
432
|
const v = (t) => A(t);
|
|
433
433
|
function g(t) {
|
|
434
|
-
|
|
434
|
+
ce[t ? "unshift" : "push"](() => {
|
|
435
435
|
h = t, i(0, h);
|
|
436
436
|
});
|
|
437
437
|
}
|
|
@@ -440,9 +440,9 @@ function be(o, e, i) {
|
|
|
440
440
|
}, o.$$.update = () => {
|
|
441
441
|
o.$$.dirty & /*tokenid, playerid, endpoint*/
|
|
442
442
|
5632, o.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
443
|
-
32769 && T && h &&
|
|
444
|
-
65537 && u && h &&
|
|
445
|
-
16385 && b && h &&
|
|
443
|
+
32769 && T && h && ue(h, T), o.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
444
|
+
65537 && u && h && me(h, u), o.$$.dirty & /*mbsource, customStylingContainer*/
|
|
445
|
+
16385 && b && h && de(h, `${b}.Style`), o.$$.dirty & /*translationurl*/
|
|
446
446
|
131072 && F && U();
|
|
447
447
|
}, [
|
|
448
448
|
h,
|
|
@@ -475,7 +475,7 @@ class Se extends te {
|
|
|
475
475
|
e,
|
|
476
476
|
be,
|
|
477
477
|
he,
|
|
478
|
-
|
|
478
|
+
re,
|
|
479
479
|
{
|
|
480
480
|
endpoint: 12,
|
|
481
481
|
tokenid: 9,
|
|
@@ -545,7 +545,7 @@ class Se extends te {
|
|
|
545
545
|
this.$$set({ translationurl: e }), M();
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
oe(Se, { endpoint: {}, tokenid: {}, playerid: {}, smstemplate: {}, number: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
|
|
549
549
|
export {
|
|
550
550
|
Se as default
|
|
551
551
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as D, a as Z, b as $, S as ee, i as te, f as M,
|
|
1
|
+
import { $ as D, a as Z, b as $, S as ee, i as te, f as M, c as ie, s as oe, d as re, e as k, g as z, t as S, h as v, j as R, k as s, l as Y, m as L, n as E, o as J, p as P, r as ne, q as ae, u as se, v as le, w as de, x as ce, y as ue, z as me } from "./GeneralPlayerLoginFormNd-CwjcsknB.js";
|
|
2
2
|
function fe({ withLocale: o, translations: e }) {
|
|
3
3
|
D.subscribe((i) => {
|
|
4
4
|
i == null && (Z.set(e), D.set(o));
|
|
@@ -127,7 +127,7 @@ function ge(o) {
|
|
|
127
127
|
i = S(e);
|
|
128
128
|
},
|
|
129
129
|
m(a, r) {
|
|
130
|
-
|
|
130
|
+
R(a, i, r);
|
|
131
131
|
},
|
|
132
132
|
p(a, r) {
|
|
133
133
|
r & /*$_*/
|
|
@@ -135,7 +135,7 @@ function ge(o) {
|
|
|
135
135
|
a[5]("errorTitle") + "") && E(i, e);
|
|
136
136
|
},
|
|
137
137
|
d(a) {
|
|
138
|
-
a &&
|
|
138
|
+
a && P(i);
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
}
|
|
@@ -149,7 +149,7 @@ function pe(o) {
|
|
|
149
149
|
i = S(e);
|
|
150
150
|
},
|
|
151
151
|
m(a, r) {
|
|
152
|
-
|
|
152
|
+
R(a, i, r);
|
|
153
153
|
},
|
|
154
154
|
p(a, r) {
|
|
155
155
|
r & /*$_*/
|
|
@@ -157,7 +157,7 @@ function pe(o) {
|
|
|
157
157
|
a[5]("title") + "") && E(i, e);
|
|
158
158
|
},
|
|
159
159
|
d(a) {
|
|
160
|
-
a &&
|
|
160
|
+
a && P(i);
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
}
|
|
@@ -171,7 +171,7 @@ function W(o) {
|
|
|
171
171
|
e = k("p"), a = S(i), v(e, "class", "InvalidInput");
|
|
172
172
|
},
|
|
173
173
|
m(r, l) {
|
|
174
|
-
|
|
174
|
+
R(r, e, l), s(e, a);
|
|
175
175
|
},
|
|
176
176
|
p(r, l) {
|
|
177
177
|
l & /*$_*/
|
|
@@ -179,7 +179,7 @@ function W(o) {
|
|
|
179
179
|
r[5]("smsCodeError") + "") && E(a, i);
|
|
180
180
|
},
|
|
181
181
|
d(r) {
|
|
182
|
-
r &&
|
|
182
|
+
r && P(e);
|
|
183
183
|
}
|
|
184
184
|
};
|
|
185
185
|
}
|
|
@@ -193,7 +193,7 @@ function Q(o) {
|
|
|
193
193
|
e = k("p"), a = S(i), v(e, "class", "SmsVerificationResendMessage");
|
|
194
194
|
},
|
|
195
195
|
m(r, l) {
|
|
196
|
-
|
|
196
|
+
R(r, e, l), s(e, a);
|
|
197
197
|
},
|
|
198
198
|
p(r, l) {
|
|
199
199
|
l & /*$_*/
|
|
@@ -201,7 +201,7 @@ function Q(o) {
|
|
|
201
201
|
r[5]("resendMessage") + "") && E(a, i);
|
|
202
202
|
},
|
|
203
203
|
d(r) {
|
|
204
|
-
r &&
|
|
204
|
+
r && P(e);
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
207
|
}
|
|
@@ -218,7 +218,7 @@ function X(o) {
|
|
|
218
218
|
), g = S(")"), v(e, "class", "SmsVerificationResendTimer");
|
|
219
219
|
},
|
|
220
220
|
m(p, h) {
|
|
221
|
-
|
|
221
|
+
R(p, e, h), s(e, i), s(e, r), s(e, l), s(e, g);
|
|
222
222
|
},
|
|
223
223
|
p(p, h) {
|
|
224
224
|
h & /*secondsLeft*/
|
|
@@ -231,7 +231,7 @@ function X(o) {
|
|
|
231
231
|
);
|
|
232
232
|
},
|
|
233
233
|
d(p) {
|
|
234
|
-
p &&
|
|
234
|
+
p && P(e);
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
237
|
}
|
|
@@ -267,7 +267,7 @@ function ye(o) {
|
|
|
267
267
|
o[3], v(e, "class", "Container SmsVerificationContainer");
|
|
268
268
|
},
|
|
269
269
|
m(n, f) {
|
|
270
|
-
|
|
270
|
+
R(n, e, f), s(e, i), b.m(i, null), s(e, a), s(e, r), s(r, l), s(l, p), s(l, h), s(l, _), s(r, T), s(r, d), Y(
|
|
271
271
|
d,
|
|
272
272
|
/*smsCode*/
|
|
273
273
|
o[1]
|
|
@@ -303,7 +303,7 @@ function ye(o) {
|
|
|
303
303
|
32 && g !== (g = /*$_*/
|
|
304
304
|
n[5]("code") + "") && E(p, g), f & /*smsCode*/
|
|
305
305
|
2 && d.value !== /*smsCode*/
|
|
306
|
-
n[1] &&
|
|
306
|
+
n[1] && Y(
|
|
307
307
|
d,
|
|
308
308
|
/*smsCode*/
|
|
309
309
|
n[1]
|
|
@@ -320,16 +320,16 @@ function ye(o) {
|
|
|
320
320
|
8 && (c.disabled = /*timer*/
|
|
321
321
|
n[3]);
|
|
322
322
|
},
|
|
323
|
-
i:
|
|
324
|
-
o:
|
|
323
|
+
i: J,
|
|
324
|
+
o: J,
|
|
325
325
|
d(n) {
|
|
326
|
-
n &&
|
|
326
|
+
n && P(e), b.d(), u && u.d(), m && m.d(), t && t.d(), o[20](null), N = !1, ne(H);
|
|
327
327
|
}
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
function he(o, e, i) {
|
|
331
331
|
let a;
|
|
332
|
-
ae(o,
|
|
332
|
+
ae(o, me, (t) => i(5, a = t));
|
|
333
333
|
let { endpoint: r = "" } = e, { tokenid: l = "" } = e, { playerid: g = "" } = e, { smstemplate: p = "Please use this code {0} to activate your accout" } = e, { number: h = "" } = e, { mbsource: _ } = e, { clientstyling: T = "" } = e, { clientstylingurl: d = "" } = e, { translationurl: F = "" } = e, C, I = !0, j = !1, w, y, x = +localStorage.getItem("smsTimer") || 0, B = Date.now() / 1e3 - x, c = 60 - Math.floor(B);
|
|
334
334
|
const V = { numeric: /^[0-9]{0,6}$/ };
|
|
335
335
|
fe({ withLocale: "en", translations: {} });
|
|
@@ -415,7 +415,7 @@ function he(o, e, i) {
|
|
|
415
415
|
}
|
|
416
416
|
const u = (t) => A(t);
|
|
417
417
|
function m(t) {
|
|
418
|
-
|
|
418
|
+
de[t ? "unshift" : "push"](() => {
|
|
419
419
|
y = t, i(0, y);
|
|
420
420
|
});
|
|
421
421
|
}
|
|
@@ -426,7 +426,7 @@ function he(o, e, i) {
|
|
|
426
426
|
5632, o.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
427
427
|
32769 && T && y && ce(y, T), o.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
428
428
|
65537 && d && y && ue(y, d), o.$$.dirty & /*mbsource, customStylingContainer*/
|
|
429
|
-
16385 && _ && y &&
|
|
429
|
+
16385 && _ && y && le(y, `${_}.Style`), o.$$.dirty & /*translationurl*/
|
|
430
430
|
131072 && F && U();
|
|
431
431
|
}, [
|
|
432
432
|
y,
|
|
@@ -459,7 +459,7 @@ class be extends ee {
|
|
|
459
459
|
e,
|
|
460
460
|
he,
|
|
461
461
|
ye,
|
|
462
|
-
|
|
462
|
+
oe,
|
|
463
463
|
{
|
|
464
464
|
endpoint: 12,
|
|
465
465
|
tokenid: 9,
|
|
@@ -529,7 +529,7 @@ class be extends ee {
|
|
|
529
529
|
this.$$set({ translationurl: e }), M();
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
|
|
532
|
+
ie(be, { endpoint: {}, tokenid: {}, playerid: {}, smstemplate: {}, number: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
|
|
533
533
|
export {
|
|
534
534
|
be as default
|
|
535
535
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var V=(r,t,i)=>new Promise((s,o)=>{var l=d=>{try{c(i.next(d))}catch(h){o(h)}},m=d=>{try{c(i.throw(d))}catch(h){o(h)}},c=d=>d.done?s(d.value):Promise.resolve(d.value).then(l,m);c((i=i.apply(r,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GeneralPlayerLoginFormNd-CvfNpsrG.cjs");function L({withLocale:r,translations:t}){e.$locale.subscribe(i=>{i==null&&(e.$dictionary.set(t),e.$locale.set(r))})}function R(r,t){e.addMessages(r,t)}const B={en:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"},"zh-hk":{title:"请输入您在号码上收到的验证码",errorTitle:"您的代码无效,您可以重新发送代码并重试",code:"短信代码",smsCodeError:"短信验证码无效,请重新发送验证码",resendMessage:"新的验证码已发送至您的手机号码",activate:"激活账户",resend:"重发"},fr:{title:"Veuillez entrer le code de vérification que vous avez reçu sur votre numéro",errorTitle:"Votre code n'était pas valide, vous pouvez renvoyer le code et réessayer",code:"Code SMS",smsCodeError:"Code sms invalide, vous pouvez renvoyer le code",resendMessage:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone.",activate:"Activer le compte",resend:"Renvoyer"},tr:{title:"Please enter the verification code you received on your number",errorTitle:"Kodunuz geçersizdi, kodu tekrar gönderip tekrar deneyebilirsiniz",code:"SMS kodu",smsCodeError:"Geçersiz sms kodu, kodu tekrar gönderebilirsiniz",resendMessage:"Telefon numaranıza yeni bir doğrulama kodu gönderildi.",activate:"Aktif hesap",resend:"Yeniden gönder",loginSMSHint:"Telefon numaranıza yeni bir doğrulama kodu gönderildi"},ro:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Un nou cod de verificare a fost trimis catre numarul dumneavoastra.",activate:"Activate Account",resend:"Resend"},es:{title:"Por favor ingrese su código de verificación enviado por mensaje de texto a su número de telefono",errorTitle:"Su código es invalido",code:"Código SMS",smsCodeError:"Código SMS invalido",resendMessage:"Un nuevo codigo de verificación ha sido enviado a tu número celular.",activate:"Activar Cuenta",resend:"Reenviar"},pt:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Um novo código de verificação foi enviado para o seu número de telefone.",activate:"Activate Account",resend:"Resend"},hr:{title:"Unesite verifikacijski kod koji ste primili na svoj broj telefona",errorTitle:"Vaš kod je nevažeći",code:"Sms kod",smsCodeError:"Nevažeći sms kod",resendMessage:"Novi verifkacijski kod poslan je na vaš broj telefona.",activate:"Aktiviraj račun",resend:"Ponovno pošalji",loginSMSHint:"Novi verifkacijski kod poslan je na vaš broj telefona"},"pt-br":{title:"Por favor, insira o código de verificação que você recebeu no seu número de celular",errorTitle:"Código inválido,vôce pode reenviar o código e tentar novamente",code:"Código SMS",smsCodeError:"Código SMS inválido,vôce pode reenviar o código",resendMessage:"Um novo código de verificação foi enviado para o seu número de celular.",activate:"Ativar conta",resend:"Reenviar",loginSMSHint:"Um novo código de verificação foi enviado para o seu número de celular."},"es-mx":{title:"Por favor ingrese el código de verificación que recibió en su número móvil",errorTitle:"Código inválido,Puede enviar el código e intentar de nuevo",code:"Código SMS",smsCodeError:"Código SMS inválido,Puede reenviar el código",resendMessage:"Un nuevo código de verificación ha sido enviado a su número móvil .",activate:"Activar Cuenta",resend:"Reenviar",loginSMSHint:"Un nuevo código de verificación ha sido enviado a su número móvil ."},"en-us":{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"}};function q(r){e.append_styles(r,"svelte-c25n4u","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.Title{font-size:14px;margin:0;padding-bottom:20px}.Field{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;padding-bottom:30px;position:relative}.Field label{font-size:14px;font-weight:300;padding-bottom:5px}.Field input,.Field select{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.Field.InvalidField input{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.Field.Hidden{display:none}.LoginSMSHint{margin-top:20px}.InvalidInput{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:10px;line-height:10px}.ErrorMessage{margin:0 0 15px 0;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.Button{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.Button[disabled]{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-100, #E6E6E6);cursor:not-allowed}.Button.SmsVerificationResend{background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8));color:var(--emw--registration-typography, var(--emw--color-contrast, #07072A))}")}function D(r){let t=r[5]("errorTitle")+"",i;return{c(){i=e.text(t)},m(s,o){e.insert(s,i,o)},p(s,o){o&32&&t!==(t=s[5]("errorTitle")+"")&&e.set_data(i,t)},d(s){s&&e.detach(i)}}}function Y(r){let t=r[5]("title")+"",i;return{c(){i=e.text(t)},m(s,o){e.insert(s,i,o)},p(s,o){o&32&&t!==(t=s[5]("title")+"")&&e.set_data(i,t)},d(s){s&&e.detach(i)}}}function N(r){let t,i=r[5]("smsCodeError")+"",s;return{c(){t=e.element("p"),s=e.text(i),e.attr(t,"class","InvalidInput")},m(o,l){e.insert(o,t,l),e.append(t,s)},p(o,l){l&32&&i!==(i=o[5]("smsCodeError")+"")&&e.set_data(s,i)},d(o){o&&e.detach(t)}}}function U(r){let t,i=r[5]("resendMessage")+"",s;return{c(){t=e.element("p"),s=e.text(i),e.attr(t,"class","SmsVerificationResendMessage")},m(o,l){e.insert(o,t,l),e.append(t,s)},p(o,l){l&32&&i!==(i=o[5]("resendMessage")+"")&&e.set_data(s,i)},d(o){o&&e.detach(t)}}}function H(r){let t,i,s=r[4]<10?"0":"",o,l,m;return{c(){t=e.element("span"),i=e.text("(0:"),o=e.text(s),l=e.text(r[4]),m=e.text(")"),e.attr(t,"class","SmsVerificationResendTimer")},m(c,d){e.insert(c,t,d),e.append(t,i),e.append(t,o),e.append(t,l),e.append(t,m)},p(c,d){d&16&&s!==(s=c[4]<10?"0":"")&&e.set_data(o,s),d&16&&e.set_data(l,c[4])},d(c){c&&e.detach(t)}}}function G(r){let t,i,s,o,l,m=r[5]("code")+"",c,d,h,_,u,w,k,E,C,S,y=r[5]("activate")+"",F,j,p,T=r[5]("resend")+"",A,P,x,z;function I(a,g){return a[2]?Y:D}let M=I(r),b=M(r),f=!r[2]&&N(r),v=r[3]&&U(r),n=r[3]&&H(r);return{c(){t=e.element("div"),i=e.element("h3"),b.c(),s=e.space(),o=e.element("div"),l=e.element("label"),c=e.text(m),d=e.text(":"),h=e.element("span"),h.textContent="*",_=e.space(),u=e.element("input"),w=e.space(),f&&f.c(),E=e.space(),v&&v.c(),C=e.space(),S=e.element("button"),F=e.text(y),j=e.space(),p=e.element("button"),A=e.text(T),P=e.space(),n&&n.c(),e.attr(i,"class","Title"),e.attr(h,"class","FormRequired"),e.attr(l,"for","SmsCode"),e.attr(u,"type","text"),e.attr(u,"id","SmsCode"),e.attr(u,"inputmode","numeric"),e.attr(u,"pattern","[0-9]*"),e.attr(u,"maxlength","6"),e.attr(o,"class",k="Field SmsVerificationField "+(r[2]?"":"InvalidField")),e.attr(S,"class","Button SmsVerificationValidate"),e.attr(p,"class","Button SmsVerificationResend"),p.disabled=r[3],e.attr(t,"class","Container SmsVerificationContainer")},m(a,g){e.insert(a,t,g),e.append(t,i),b.m(i,null),e.append(t,s),e.append(t,o),e.append(o,l),e.append(l,c),e.append(l,d),e.append(l,h),e.append(o,_),e.append(o,u),e.set_input_value(u,r[1]),e.append(o,w),f&&f.m(o,null),e.append(t,E),v&&v.m(t,null),e.append(t,C),e.append(t,S),e.append(S,F),e.append(t,j),e.append(t,p),e.append(p,A),e.append(p,P),n&&n.m(p,null),r[20](t),x||(z=[e.listen(u,"input",r[18]),e.listen(u,"keydown",r[19]),e.listen(S,"click",r[6]),e.listen(p,"click",r[7])],x=!0)},p(a,[g]){M===(M=I(a))&&b?b.p(a,g):(b.d(1),b=M(a),b&&(b.c(),b.m(i,null))),g&32&&m!==(m=a[5]("code")+"")&&e.set_data(c,m),g&2&&u.value!==a[1]&&e.set_input_value(u,a[1]),a[2]?f&&(f.d(1),f=null):f?f.p(a,g):(f=N(a),f.c(),f.m(o,null)),g&4&&k!==(k="Field SmsVerificationField "+(a[2]?"":"InvalidField"))&&e.attr(o,"class",k),a[3]?v?v.p(a,g):(v=U(a),v.c(),v.m(t,C)):v&&(v.d(1),v=null),g&32&&y!==(y=a[5]("activate")+"")&&e.set_data(F,y),g&32&&T!==(T=a[5]("resend")+"")&&e.set_data(A,T),a[3]?n?n.p(a,g):(n=H(a),n.c(),n.m(p,null)):n&&(n.d(1),n=null),g&8&&(p.disabled=a[3])},i:e.noop,o:e.noop,d(a){a&&e.detach(t),b.d(),f&&f.d(),v&&v.d(),n&&n.d(),r[20](null),x=!1,e.run_all(z)}}}function J(r,t,i){let s;e.component_subscribe(r,e.$format,n=>i(5,s=n));let{endpoint:o=""}=t,{tokenid:l=""}=t,{playerid:m=""}=t,{smstemplate:c="Please use this code {0} to activate your accout"}=t,{number:d=""}=t,{mbsource:h}=t,{clientstyling:_=""}=t,{clientstylingurl:u=""}=t,{translationurl:w=""}=t,k,E=!0,C=!1,S,y,F=+localStorage.getItem("smsTimer")||0,j=Date.now()/1e3-F,p=60-Math.floor(j);const T={numeric:/^[0-9]{0,6}$/};L({withLocale:"en",translations:{}});const A=()=>{fetch(w).then(a=>a.json()).then(a=>{Object.keys(a).forEach(g=>{R(g,a[g])})}).catch(a=>{console.log(a)})};Object.keys(B).forEach(n=>{R(n,B[n])});const P=()=>V(this,null,function*(){try{if((yield fetch(`${o}/v1/player/${m}/activateSMS?tokenId=${l}&validationCode=${k}`,{headers:{"Content-Type":"application/json",accept:"application/json"}})).ok)i(2,E=!0),window.postMessage({type:"SmsHasBeenValidated"},window.location.href);else throw window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Could not activate user"}},window.location.href),i(2,E=!1),new Error("Could not activate user")}catch(n){console.log(n)}}),x=()=>V(this,null,function*(){localStorage.setItem("smsTimer",JSON.stringify(Math.floor(Date.now()/1e3))),I();try{const n=yield fetch(`${o}/v1/player/sms/token`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify({userId:m,messageTemplate:c,destination:d})}),a=yield n.json();if(n.ok)i(9,l=a.id),C=!1,z();else throw C=!0,new Error("Failed to fetch")}catch(n){C=!0,console.error(n)}}),z=()=>{p>0?i(4,p--,p):(clearInterval(S),i(3,S=!1),i(4,p=60))},I=()=>{j<60&&i(3,S=setInterval(()=>{z()},1e3))},M=n=>{!T.numeric.test(n.key)&&n.keyCode!==8&&n.keyCode!==9&&n.keyCode!==46&&n.preventDefault()};e.onMount(()=>{if(!m||!d){let n=JSON.parse(localStorage.getItem("playerData"));i(10,m=n.playerid),i(11,d=n.number)}return I(),()=>{}});function b(){k=this.value,i(1,k)}const f=n=>M(n);function v(n){e.binding_callbacks[n?"unshift":"push"](()=>{y=n,i(0,y)})}return r.$$set=n=>{"endpoint"in n&&i(12,o=n.endpoint),"tokenid"in n&&i(9,l=n.tokenid),"playerid"in n&&i(10,m=n.playerid),"smstemplate"in n&&i(13,c=n.smstemplate),"number"in n&&i(11,d=n.number),"mbsource"in n&&i(14,h=n.mbsource),"clientstyling"in n&&i(15,_=n.clientstyling),"clientstylingurl"in n&&i(16,u=n.clientstylingurl),"translationurl"in n&&i(17,w=n.translationurl)},r.$$.update=()=>{r.$$.dirty&5632,r.$$.dirty&32769&&_&&y&&e.setClientStyling(y,_),r.$$.dirty&65537&&u&&y&&e.setClientStylingURL(y,u),r.$$.dirty&16385&&h&&y&&e.setStreamStyling(y,`${h}.Style`),r.$$.dirty&131072&&w&&A()},[y,k,E,S,p,s,P,x,M,l,m,d,o,c,h,_,u,w,b,f,v]}class O extends e.SvelteComponent{constructor(t){super(),e.init(this,t,J,G,e.safe_not_equal,{endpoint:12,tokenid:9,playerid:10,smstemplate:13,number:11,mbsource:14,clientstyling:15,clientstylingurl:16,translationurl:17},q)}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get tokenid(){return this.$$.ctx[9]}set tokenid(t){this.$$set({tokenid:t}),e.flush()}get playerid(){return this.$$.ctx[10]}set playerid(t){this.$$set({playerid:t}),e.flush()}get smstemplate(){return this.$$.ctx[13]}set smstemplate(t){this.$$set({smstemplate:t}),e.flush()}get number(){return this.$$.ctx[11]}set number(t){this.$$set({number:t}),e.flush()}get mbsource(){return this.$$.ctx[14]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get clientstyling(){return this.$$.ctx[15]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[16]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[17]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}}e.create_custom_element(O,{endpoint:{},tokenid:{},playerid:{},smstemplate:{},number:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);exports.default=O;
|
|
1
|
+
"use strict";var V=(r,t,i)=>new Promise((s,o)=>{var l=d=>{try{c(i.next(d))}catch(h){o(h)}},m=d=>{try{c(i.throw(d))}catch(h){o(h)}},c=d=>d.done?s(d.value):Promise.resolve(d.value).then(l,m);c((i=i.apply(r,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GeneralPlayerLoginFormNd-CqDYJZQ_.cjs");function L({withLocale:r,translations:t}){e.$locale.subscribe(i=>{i==null&&(e.$dictionary.set(t),e.$locale.set(r))})}function R(r,t){e.addMessages(r,t)}const B={en:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"},"zh-hk":{title:"请输入您在号码上收到的验证码",errorTitle:"您的代码无效,您可以重新发送代码并重试",code:"短信代码",smsCodeError:"短信验证码无效,请重新发送验证码",resendMessage:"新的验证码已发送至您的手机号码",activate:"激活账户",resend:"重发"},fr:{title:"Veuillez entrer le code de vérification que vous avez reçu sur votre numéro",errorTitle:"Votre code n'était pas valide, vous pouvez renvoyer le code et réessayer",code:"Code SMS",smsCodeError:"Code sms invalide, vous pouvez renvoyer le code",resendMessage:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone.",activate:"Activer le compte",resend:"Renvoyer"},tr:{title:"Please enter the verification code you received on your number",errorTitle:"Kodunuz geçersizdi, kodu tekrar gönderip tekrar deneyebilirsiniz",code:"SMS kodu",smsCodeError:"Geçersiz sms kodu, kodu tekrar gönderebilirsiniz",resendMessage:"Telefon numaranıza yeni bir doğrulama kodu gönderildi.",activate:"Aktif hesap",resend:"Yeniden gönder",loginSMSHint:"Telefon numaranıza yeni bir doğrulama kodu gönderildi"},ro:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Un nou cod de verificare a fost trimis catre numarul dumneavoastra.",activate:"Activate Account",resend:"Resend"},es:{title:"Por favor ingrese su código de verificación enviado por mensaje de texto a su número de telefono",errorTitle:"Su código es invalido",code:"Código SMS",smsCodeError:"Código SMS invalido",resendMessage:"Un nuevo codigo de verificación ha sido enviado a tu número celular.",activate:"Activar Cuenta",resend:"Reenviar"},pt:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Um novo código de verificação foi enviado para o seu número de telefone.",activate:"Activate Account",resend:"Resend"},hr:{title:"Unesite verifikacijski kod koji ste primili na svoj broj telefona",errorTitle:"Vaš kod je nevažeći",code:"Sms kod",smsCodeError:"Nevažeći sms kod",resendMessage:"Novi verifkacijski kod poslan je na vaš broj telefona.",activate:"Aktiviraj račun",resend:"Ponovno pošalji",loginSMSHint:"Novi verifkacijski kod poslan je na vaš broj telefona"},"pt-br":{title:"Por favor, insira o código de verificação que você recebeu no seu número de celular",errorTitle:"Código inválido,vôce pode reenviar o código e tentar novamente",code:"Código SMS",smsCodeError:"Código SMS inválido,vôce pode reenviar o código",resendMessage:"Um novo código de verificação foi enviado para o seu número de celular.",activate:"Ativar conta",resend:"Reenviar",loginSMSHint:"Um novo código de verificação foi enviado para o seu número de celular."},"es-mx":{title:"Por favor ingrese el código de verificación que recibió en su número móvil",errorTitle:"Código inválido,Puede enviar el código e intentar de nuevo",code:"Código SMS",smsCodeError:"Código SMS inválido,Puede reenviar el código",resendMessage:"Un nuevo código de verificación ha sido enviado a su número móvil .",activate:"Activar Cuenta",resend:"Reenviar",loginSMSHint:"Un nuevo código de verificación ha sido enviado a su número móvil ."},"en-us":{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"}};function q(r){e.append_styles(r,"svelte-c25n4u","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.Title{font-size:14px;margin:0;padding-bottom:20px}.Field{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;padding-bottom:30px;position:relative}.Field label{font-size:14px;font-weight:300;padding-bottom:5px}.Field input,.Field select{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.Field.InvalidField input{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.Field.Hidden{display:none}.LoginSMSHint{margin-top:20px}.InvalidInput{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:10px;line-height:10px}.ErrorMessage{margin:0 0 15px 0;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.Button{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.Button[disabled]{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-100, #E6E6E6);cursor:not-allowed}.Button.SmsVerificationResend{background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8));color:var(--emw--registration-typography, var(--emw--color-contrast, #07072A))}")}function D(r){let t=r[5]("errorTitle")+"",i;return{c(){i=e.text(t)},m(s,o){e.insert(s,i,o)},p(s,o){o&32&&t!==(t=s[5]("errorTitle")+"")&&e.set_data(i,t)},d(s){s&&e.detach(i)}}}function Y(r){let t=r[5]("title")+"",i;return{c(){i=e.text(t)},m(s,o){e.insert(s,i,o)},p(s,o){o&32&&t!==(t=s[5]("title")+"")&&e.set_data(i,t)},d(s){s&&e.detach(i)}}}function N(r){let t,i=r[5]("smsCodeError")+"",s;return{c(){t=e.element("p"),s=e.text(i),e.attr(t,"class","InvalidInput")},m(o,l){e.insert(o,t,l),e.append(t,s)},p(o,l){l&32&&i!==(i=o[5]("smsCodeError")+"")&&e.set_data(s,i)},d(o){o&&e.detach(t)}}}function U(r){let t,i=r[5]("resendMessage")+"",s;return{c(){t=e.element("p"),s=e.text(i),e.attr(t,"class","SmsVerificationResendMessage")},m(o,l){e.insert(o,t,l),e.append(t,s)},p(o,l){l&32&&i!==(i=o[5]("resendMessage")+"")&&e.set_data(s,i)},d(o){o&&e.detach(t)}}}function H(r){let t,i,s=r[4]<10?"0":"",o,l,m;return{c(){t=e.element("span"),i=e.text("(0:"),o=e.text(s),l=e.text(r[4]),m=e.text(")"),e.attr(t,"class","SmsVerificationResendTimer")},m(c,d){e.insert(c,t,d),e.append(t,i),e.append(t,o),e.append(t,l),e.append(t,m)},p(c,d){d&16&&s!==(s=c[4]<10?"0":"")&&e.set_data(o,s),d&16&&e.set_data(l,c[4])},d(c){c&&e.detach(t)}}}function G(r){let t,i,s,o,l,m=r[5]("code")+"",c,d,h,_,u,w,k,E,C,S,y=r[5]("activate")+"",F,j,p,T=r[5]("resend")+"",A,P,x,z;function I(a,g){return a[2]?Y:D}let M=I(r),b=M(r),f=!r[2]&&N(r),v=r[3]&&U(r),n=r[3]&&H(r);return{c(){t=e.element("div"),i=e.element("h3"),b.c(),s=e.space(),o=e.element("div"),l=e.element("label"),c=e.text(m),d=e.text(":"),h=e.element("span"),h.textContent="*",_=e.space(),u=e.element("input"),w=e.space(),f&&f.c(),E=e.space(),v&&v.c(),C=e.space(),S=e.element("button"),F=e.text(y),j=e.space(),p=e.element("button"),A=e.text(T),P=e.space(),n&&n.c(),e.attr(i,"class","Title"),e.attr(h,"class","FormRequired"),e.attr(l,"for","SmsCode"),e.attr(u,"type","text"),e.attr(u,"id","SmsCode"),e.attr(u,"inputmode","numeric"),e.attr(u,"pattern","[0-9]*"),e.attr(u,"maxlength","6"),e.attr(o,"class",k="Field SmsVerificationField "+(r[2]?"":"InvalidField")),e.attr(S,"class","Button SmsVerificationValidate"),e.attr(p,"class","Button SmsVerificationResend"),p.disabled=r[3],e.attr(t,"class","Container SmsVerificationContainer")},m(a,g){e.insert(a,t,g),e.append(t,i),b.m(i,null),e.append(t,s),e.append(t,o),e.append(o,l),e.append(l,c),e.append(l,d),e.append(l,h),e.append(o,_),e.append(o,u),e.set_input_value(u,r[1]),e.append(o,w),f&&f.m(o,null),e.append(t,E),v&&v.m(t,null),e.append(t,C),e.append(t,S),e.append(S,F),e.append(t,j),e.append(t,p),e.append(p,A),e.append(p,P),n&&n.m(p,null),r[20](t),x||(z=[e.listen(u,"input",r[18]),e.listen(u,"keydown",r[19]),e.listen(S,"click",r[6]),e.listen(p,"click",r[7])],x=!0)},p(a,[g]){M===(M=I(a))&&b?b.p(a,g):(b.d(1),b=M(a),b&&(b.c(),b.m(i,null))),g&32&&m!==(m=a[5]("code")+"")&&e.set_data(c,m),g&2&&u.value!==a[1]&&e.set_input_value(u,a[1]),a[2]?f&&(f.d(1),f=null):f?f.p(a,g):(f=N(a),f.c(),f.m(o,null)),g&4&&k!==(k="Field SmsVerificationField "+(a[2]?"":"InvalidField"))&&e.attr(o,"class",k),a[3]?v?v.p(a,g):(v=U(a),v.c(),v.m(t,C)):v&&(v.d(1),v=null),g&32&&y!==(y=a[5]("activate")+"")&&e.set_data(F,y),g&32&&T!==(T=a[5]("resend")+"")&&e.set_data(A,T),a[3]?n?n.p(a,g):(n=H(a),n.c(),n.m(p,null)):n&&(n.d(1),n=null),g&8&&(p.disabled=a[3])},i:e.noop,o:e.noop,d(a){a&&e.detach(t),b.d(),f&&f.d(),v&&v.d(),n&&n.d(),r[20](null),x=!1,e.run_all(z)}}}function J(r,t,i){let s;e.component_subscribe(r,e.$format,n=>i(5,s=n));let{endpoint:o=""}=t,{tokenid:l=""}=t,{playerid:m=""}=t,{smstemplate:c="Please use this code {0} to activate your accout"}=t,{number:d=""}=t,{mbsource:h}=t,{clientstyling:_=""}=t,{clientstylingurl:u=""}=t,{translationurl:w=""}=t,k,E=!0,C=!1,S,y,F=+localStorage.getItem("smsTimer")||0,j=Date.now()/1e3-F,p=60-Math.floor(j);const T={numeric:/^[0-9]{0,6}$/};L({withLocale:"en",translations:{}});const A=()=>{fetch(w).then(a=>a.json()).then(a=>{Object.keys(a).forEach(g=>{R(g,a[g])})}).catch(a=>{console.log(a)})};Object.keys(B).forEach(n=>{R(n,B[n])});const P=()=>V(this,null,function*(){try{if((yield fetch(`${o}/v1/player/${m}/activateSMS?tokenId=${l}&validationCode=${k}`,{headers:{"Content-Type":"application/json",accept:"application/json"}})).ok)i(2,E=!0),window.postMessage({type:"SmsHasBeenValidated"},window.location.href);else throw window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Could not activate user"}},window.location.href),i(2,E=!1),new Error("Could not activate user")}catch(n){console.log(n)}}),x=()=>V(this,null,function*(){localStorage.setItem("smsTimer",JSON.stringify(Math.floor(Date.now()/1e3))),I();try{const n=yield fetch(`${o}/v1/player/sms/token`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify({userId:m,messageTemplate:c,destination:d})}),a=yield n.json();if(n.ok)i(9,l=a.id),C=!1,z();else throw C=!0,new Error("Failed to fetch")}catch(n){C=!0,console.error(n)}}),z=()=>{p>0?i(4,p--,p):(clearInterval(S),i(3,S=!1),i(4,p=60))},I=()=>{j<60&&i(3,S=setInterval(()=>{z()},1e3))},M=n=>{!T.numeric.test(n.key)&&n.keyCode!==8&&n.keyCode!==9&&n.keyCode!==46&&n.preventDefault()};e.onMount(()=>{if(!m||!d){let n=JSON.parse(localStorage.getItem("playerData"));i(10,m=n.playerid),i(11,d=n.number)}return I(),()=>{}});function b(){k=this.value,i(1,k)}const f=n=>M(n);function v(n){e.binding_callbacks[n?"unshift":"push"](()=>{y=n,i(0,y)})}return r.$$set=n=>{"endpoint"in n&&i(12,o=n.endpoint),"tokenid"in n&&i(9,l=n.tokenid),"playerid"in n&&i(10,m=n.playerid),"smstemplate"in n&&i(13,c=n.smstemplate),"number"in n&&i(11,d=n.number),"mbsource"in n&&i(14,h=n.mbsource),"clientstyling"in n&&i(15,_=n.clientstyling),"clientstylingurl"in n&&i(16,u=n.clientstylingurl),"translationurl"in n&&i(17,w=n.translationurl)},r.$$.update=()=>{r.$$.dirty&5632,r.$$.dirty&32769&&_&&y&&e.setClientStyling(y,_),r.$$.dirty&65537&&u&&y&&e.setClientStylingURL(y,u),r.$$.dirty&16385&&h&&y&&e.setStreamStyling(y,`${h}.Style`),r.$$.dirty&131072&&w&&A()},[y,k,E,S,p,s,P,x,M,l,m,d,o,c,h,_,u,w,b,f,v]}class O extends e.SvelteComponent{constructor(t){super(),e.init(this,t,J,G,e.safe_not_equal,{endpoint:12,tokenid:9,playerid:10,smstemplate:13,number:11,mbsource:14,clientstyling:15,clientstylingurl:16,translationurl:17},q)}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get tokenid(){return this.$$.ctx[9]}set tokenid(t){this.$$set({tokenid:t}),e.flush()}get playerid(){return this.$$.ctx[10]}set playerid(t){this.$$set({playerid:t}),e.flush()}get smstemplate(){return this.$$.ctx[13]}set smstemplate(t){this.$$set({smstemplate:t}),e.flush()}get number(){return this.$$.ctx[11]}set number(t){this.$$set({number:t}),e.flush()}get mbsource(){return this.$$.ctx[14]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get clientstyling(){return this.$$.ctx[15]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[16]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[17]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}}e.create_custom_element(O,{endpoint:{},tokenid:{},playerid:{},smstemplate:{},number:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);exports.default=O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if(typeof window!="undefined"){let t=function(e){return function(...r){try{return e.apply(this,r)}catch(n){if(n instanceof DOMException&&n.message.includes("has already been used with this registry")||n.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw n}}};customElements.define=t(customElements.define),Promise.resolve().then(()=>require("../components/GeneralPlayerLoginFormNd-
|
|
1
|
+
"use strict";if(typeof window!="undefined"){let t=function(e){return function(...r){try{return e.apply(this,r)}catch(n){if(n instanceof DOMException&&n.message.includes("has already been used with this registry")||n.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw n}}};customElements.define=t(customElements.define),Promise.resolve().then(()=>require("../components/GeneralPlayerLoginFormNd-CqDYJZQ_.cjs")).then(e=>e.GeneralPlayerLoginFormNd_ce).then(({default:e})=>{!customElements.get("general-player-login-form-nd")&&customElements.define("general-player-login-form-nd",e.element)})}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/GeneralPlayerLoginFormNd-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/GeneralPlayerLoginFormNd-CIFY-TEP.js").then((e) => e.G).then(({ default: e }) => {
|
|
14
14
|
!customElements.get("general-player-login-form-nd") && customElements.define("general-player-login-form-nd", e.element);
|
|
15
15
|
});
|
|
16
16
|
}
|