@everymatrix/general-player-login-form 1.50.0 → 1.51.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.
- package/components/GeneralPlayerLoginForm-BoIsFJsw.cjs +5 -0
- package/components/{GeneralPlayerLoginForm-wzCy2Toc.js → GeneralPlayerLoginForm-DnwXmexh.js} +290 -271
- package/components/{GeneralPlayerSmsVerificationForm-BfpIoHHZ.js → GeneralPlayerSmsVerificationForm-B6d2Y3hF.js} +51 -41
- package/components/GeneralPlayerSmsVerificationForm-BmimxoUw.cjs +1 -0
- package/es2015/general-player-login-form.cjs +1 -1
- package/es2015/general-player-login-form.js +1 -1
- package/package.json +1 -1
- package/components/GeneralPlayerLoginForm-DTLlwtoG.cjs +0 -5
- package/components/GeneralPlayerSmsVerificationForm-Z8IyL9KL.cjs +0 -1
|
@@ -14,7 +14,7 @@ var Y = (o, e, i) => new Promise((n, r) => {
|
|
|
14
14
|
}, c = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(a, m);
|
|
15
15
|
c((i = i.apply(o, e)).next());
|
|
16
16
|
});
|
|
17
|
-
import { $ as J, a as ee, b as te, S as ie, i as oe, f as E, c as re, s as ne, d as ae, e as w, g as
|
|
17
|
+
import { $ as J, a as ee, b as te, S as ie, i as oe, f as E, c as re, s as ne, d as ae, e as w, g as z, t as k, h as p, j as H, k as l, l as G, m as q, n as C, o as K, p as N, r as se, q as le, u as de, v as ce, w as ue } from "./GeneralPlayerLoginForm-DnwXmexh.js";
|
|
18
18
|
function me({ withLocale: o, translations: e }) {
|
|
19
19
|
J.subscribe((i) => {
|
|
20
20
|
i == null && (ee.set(e), J.set(o));
|
|
@@ -118,6 +118,16 @@ const Q = {
|
|
|
118
118
|
activate: "Activar Cuenta",
|
|
119
119
|
resend: "Reenviar",
|
|
120
120
|
loginSMSHint: "Un nuevo código de verificación ha sido enviado a su número móvil ."
|
|
121
|
+
},
|
|
122
|
+
"en-us": {
|
|
123
|
+
title: "Please enter the verification code you received on your number",
|
|
124
|
+
errorTitle: "Your code was invalid, you can resend the code and try again",
|
|
125
|
+
code: "Sms code",
|
|
126
|
+
smsCodeError: "Invalid sms code, you can resend the code",
|
|
127
|
+
resendMessage: "A new verification code has been sent to your phone number.",
|
|
128
|
+
activate: "Activate Account",
|
|
129
|
+
resend: "Resend",
|
|
130
|
+
loginSMSHint: "A new verification code has been sent to your phone number"
|
|
121
131
|
}
|
|
122
132
|
};
|
|
123
133
|
function fe(o) {
|
|
@@ -130,10 +140,10 @@ function ve(o) {
|
|
|
130
140
|
), i;
|
|
131
141
|
return {
|
|
132
142
|
c() {
|
|
133
|
-
i =
|
|
143
|
+
i = k(e);
|
|
134
144
|
},
|
|
135
145
|
m(n, r) {
|
|
136
|
-
|
|
146
|
+
H(n, i, r);
|
|
137
147
|
},
|
|
138
148
|
p(n, r) {
|
|
139
149
|
r & /*$_*/
|
|
@@ -141,7 +151,7 @@ function ve(o) {
|
|
|
141
151
|
n[5]("errorTitle") + "") && C(i, e);
|
|
142
152
|
},
|
|
143
153
|
d(n) {
|
|
144
|
-
n &&
|
|
154
|
+
n && N(i);
|
|
145
155
|
}
|
|
146
156
|
};
|
|
147
157
|
}
|
|
@@ -152,10 +162,10 @@ function ge(o) {
|
|
|
152
162
|
), i;
|
|
153
163
|
return {
|
|
154
164
|
c() {
|
|
155
|
-
i =
|
|
165
|
+
i = k(e);
|
|
156
166
|
},
|
|
157
167
|
m(n, r) {
|
|
158
|
-
|
|
168
|
+
H(n, i, r);
|
|
159
169
|
},
|
|
160
170
|
p(n, r) {
|
|
161
171
|
r & /*$_*/
|
|
@@ -163,7 +173,7 @@ function ge(o) {
|
|
|
163
173
|
n[5]("title") + "") && C(i, e);
|
|
164
174
|
},
|
|
165
175
|
d(n) {
|
|
166
|
-
n &&
|
|
176
|
+
n && N(i);
|
|
167
177
|
}
|
|
168
178
|
};
|
|
169
179
|
}
|
|
@@ -174,10 +184,10 @@ function X(o) {
|
|
|
174
184
|
), n;
|
|
175
185
|
return {
|
|
176
186
|
c() {
|
|
177
|
-
e = w("p"), n =
|
|
187
|
+
e = w("p"), n = k(i), p(e, "class", "InvalidInput");
|
|
178
188
|
},
|
|
179
189
|
m(r, a) {
|
|
180
|
-
|
|
190
|
+
H(r, e, a), l(e, n);
|
|
181
191
|
},
|
|
182
192
|
p(r, a) {
|
|
183
193
|
a & /*$_*/
|
|
@@ -185,7 +195,7 @@ function X(o) {
|
|
|
185
195
|
r[5]("smsCodeError") + "") && C(n, i);
|
|
186
196
|
},
|
|
187
197
|
d(r) {
|
|
188
|
-
r &&
|
|
198
|
+
r && N(e);
|
|
189
199
|
}
|
|
190
200
|
};
|
|
191
201
|
}
|
|
@@ -196,10 +206,10 @@ function Z(o) {
|
|
|
196
206
|
), n;
|
|
197
207
|
return {
|
|
198
208
|
c() {
|
|
199
|
-
e = w("p"), n =
|
|
209
|
+
e = w("p"), n = k(i), p(e, "class", "SmsVerificationResendMessage");
|
|
200
210
|
},
|
|
201
211
|
m(r, a) {
|
|
202
|
-
|
|
212
|
+
H(r, e, a), l(e, n);
|
|
203
213
|
},
|
|
204
214
|
p(r, a) {
|
|
205
215
|
a & /*$_*/
|
|
@@ -207,7 +217,7 @@ function Z(o) {
|
|
|
207
217
|
r[5]("resendMessage") + "") && C(n, i);
|
|
208
218
|
},
|
|
209
219
|
d(r) {
|
|
210
|
-
r &&
|
|
220
|
+
r && N(e);
|
|
211
221
|
}
|
|
212
222
|
};
|
|
213
223
|
}
|
|
@@ -218,13 +228,13 @@ function $(o) {
|
|
|
218
228
|
), r, a, m;
|
|
219
229
|
return {
|
|
220
230
|
c() {
|
|
221
|
-
e = w("span"), i =
|
|
231
|
+
e = w("span"), i = k("(0:"), r = k(n), a = k(
|
|
222
232
|
/*secondsLeft*/
|
|
223
233
|
o[4]
|
|
224
|
-
), m =
|
|
234
|
+
), m = k(")"), p(e, "class", "SmsVerificationResendTimer");
|
|
225
235
|
},
|
|
226
236
|
m(c, d) {
|
|
227
|
-
|
|
237
|
+
H(c, e, d), l(e, i), l(e, r), l(e, a), l(e, m);
|
|
228
238
|
},
|
|
229
239
|
p(c, d) {
|
|
230
240
|
d & /*secondsLeft*/
|
|
@@ -237,7 +247,7 @@ function $(o) {
|
|
|
237
247
|
);
|
|
238
248
|
},
|
|
239
249
|
d(c) {
|
|
240
|
-
c &&
|
|
250
|
+
c && N(e);
|
|
241
251
|
}
|
|
242
252
|
};
|
|
243
253
|
}
|
|
@@ -245,10 +255,10 @@ function pe(o) {
|
|
|
245
255
|
let e, i, n, r, a, m = (
|
|
246
256
|
/*$_*/
|
|
247
257
|
o[5]("code") + ""
|
|
248
|
-
), c, d, y, F, u, j, _,
|
|
258
|
+
), c, d, y, F, u, j, _, I, M, h, R = (
|
|
249
259
|
/*$_*/
|
|
250
260
|
o[5]("activate") + ""
|
|
251
|
-
),
|
|
261
|
+
), V, T, S, P = (
|
|
252
262
|
/*$_*/
|
|
253
263
|
o[5]("resend") + ""
|
|
254
264
|
), D, L, U, B;
|
|
@@ -258,7 +268,7 @@ function pe(o) {
|
|
|
258
268
|
t[2] ? ge : ve
|
|
259
269
|
);
|
|
260
270
|
}
|
|
261
|
-
let
|
|
271
|
+
let A = O(o), b = A(o), f = !/*isSmsValid*/
|
|
262
272
|
o[2] && X(o), v = (
|
|
263
273
|
/*timer*/
|
|
264
274
|
o[3] && Z(o)
|
|
@@ -268,16 +278,16 @@ function pe(o) {
|
|
|
268
278
|
);
|
|
269
279
|
return {
|
|
270
280
|
c() {
|
|
271
|
-
e = w("div"), i = w("h3"), b.c(), n =
|
|
272
|
-
o[2] ? "" : "InvalidField")), p(h, "class", "Button SmsVerificationValidate"), p(
|
|
281
|
+
e = w("div"), i = w("h3"), b.c(), n = z(), r = w("div"), a = w("label"), c = k(m), d = k(":"), y = w("span"), y.textContent = "*", F = z(), u = w("input"), j = z(), f && f.c(), I = z(), v && v.c(), M = z(), h = w("button"), V = k(R), T = z(), S = w("button"), D = k(P), L = z(), g && g.c(), p(i, "class", "Title"), p(y, "class", "FormRequired"), p(a, "for", "SmsCode"), p(u, "type", "text"), p(u, "id", "SmsCode"), p(u, "inputmode", "numeric"), p(u, "pattern", "[0-9]*"), p(u, "maxlength", "6"), p(r, "class", _ = "Field SmsVerificationField " + (/*isSmsValid*/
|
|
282
|
+
o[2] ? "" : "InvalidField")), p(h, "class", "Button SmsVerificationValidate"), p(S, "class", "Button SmsVerificationResend"), S.disabled = /*timer*/
|
|
273
283
|
o[3], p(e, "class", "Container SmsVerificationContainer");
|
|
274
284
|
},
|
|
275
285
|
m(t, s) {
|
|
276
|
-
|
|
286
|
+
H(t, e, s), l(e, i), b.m(i, null), l(e, n), l(e, r), l(r, a), l(a, c), l(a, d), l(a, y), l(r, F), l(r, u), G(
|
|
277
287
|
u,
|
|
278
288
|
/*smsCode*/
|
|
279
289
|
o[1]
|
|
280
|
-
), l(r, j), f && f.m(r, null), l(e,
|
|
290
|
+
), l(r, j), f && f.m(r, null), l(e, I), v && v.m(e, null), l(e, M), l(e, h), l(h, V), l(e, T), l(e, S), l(S, D), l(S, L), g && g.m(S, null), o[19](e), U || (B = [
|
|
281
291
|
q(
|
|
282
292
|
u,
|
|
283
293
|
"input",
|
|
@@ -297,7 +307,7 @@ function pe(o) {
|
|
|
297
307
|
o[6]
|
|
298
308
|
),
|
|
299
309
|
q(
|
|
300
|
-
|
|
310
|
+
S,
|
|
301
311
|
"click",
|
|
302
312
|
/*resendCode*/
|
|
303
313
|
o[7]
|
|
@@ -305,7 +315,7 @@ function pe(o) {
|
|
|
305
315
|
], U = !0);
|
|
306
316
|
},
|
|
307
317
|
p(t, [s]) {
|
|
308
|
-
|
|
318
|
+
A === (A = O(t)) && b ? b.p(t, s) : (b.d(1), b = A(t), b && (b.c(), b.m(i, null))), s & /*$_*/
|
|
309
319
|
32 && m !== (m = /*$_*/
|
|
310
320
|
t[5]("code") + "") && C(c, m), s & /*smsCode*/
|
|
311
321
|
2 && u.value !== /*smsCode*/
|
|
@@ -318,26 +328,26 @@ function pe(o) {
|
|
|
318
328
|
4 && _ !== (_ = "Field SmsVerificationField " + (/*isSmsValid*/
|
|
319
329
|
t[2] ? "" : "InvalidField")) && p(r, "class", _), /*timer*/
|
|
320
330
|
t[3] ? v ? v.p(t, s) : (v = Z(t), v.c(), v.m(e, M)) : v && (v.d(1), v = null), s & /*$_*/
|
|
321
|
-
32 &&
|
|
322
|
-
t[5]("activate") + "") && C(
|
|
331
|
+
32 && R !== (R = /*$_*/
|
|
332
|
+
t[5]("activate") + "") && C(V, R), s & /*$_*/
|
|
323
333
|
32 && P !== (P = /*$_*/
|
|
324
334
|
t[5]("resend") + "") && C(D, P), /*timer*/
|
|
325
|
-
t[3] ? g ? g.p(t, s) : (g = $(t), g.c(), g.m(
|
|
326
|
-
8 && (
|
|
335
|
+
t[3] ? g ? g.p(t, s) : (g = $(t), g.c(), g.m(S, null)) : g && (g.d(1), g = null), s & /*timer*/
|
|
336
|
+
8 && (S.disabled = /*timer*/
|
|
327
337
|
t[3]);
|
|
328
338
|
},
|
|
329
339
|
i: K,
|
|
330
340
|
o: K,
|
|
331
341
|
d(t) {
|
|
332
|
-
t &&
|
|
342
|
+
t && N(e), b.d(), f && f.d(), v && v.d(), g && g.d(), o[19](null), U = !1, se(B);
|
|
333
343
|
}
|
|
334
344
|
};
|
|
335
345
|
}
|
|
336
346
|
function ye(o, e, i) {
|
|
337
347
|
let n;
|
|
338
348
|
le(o, ue, (t) => i(5, n = t));
|
|
339
|
-
let { endpoint: r = "" } = e, { tokenid: a = "" } = e, { playerid: m = "" } = e, { smstemplate: c = "Please use this code {0} to activate your accout" } = e, { number: d = "" } = e, { clientstyling: y = "" } = e, { clientstylingurl: F = "" } = e, { translationurl: u = "" } = e, j, _ = !0,
|
|
340
|
-
const
|
|
349
|
+
let { endpoint: r = "" } = e, { tokenid: a = "" } = e, { playerid: m = "" } = e, { smstemplate: c = "Please use this code {0} to activate your accout" } = e, { number: d = "" } = e, { clientstyling: y = "" } = e, { clientstylingurl: F = "" } = e, { translationurl: u = "" } = e, j, _ = !0, I = !1, M, h, R = +localStorage.getItem("smsTimer") || 0, V = Date.now() / 1e3 - R, T = 60 - Math.floor(V);
|
|
350
|
+
const S = { numeric: /^[0-9]{0,6}$/ };
|
|
341
351
|
me({ withLocale: "en", translations: {} });
|
|
342
352
|
const P = () => {
|
|
343
353
|
fetch(u).then((s) => s.json()).then((s) => {
|
|
@@ -375,7 +385,7 @@ function ye(o, e, i) {
|
|
|
375
385
|
console.log(t);
|
|
376
386
|
}
|
|
377
387
|
}), L = () => Y(this, null, function* () {
|
|
378
|
-
localStorage.setItem("smsTimer", JSON.stringify(Math.floor(Date.now() / 1e3))),
|
|
388
|
+
localStorage.setItem("smsTimer", JSON.stringify(Math.floor(Date.now() / 1e3))), A();
|
|
379
389
|
try {
|
|
380
390
|
const t = yield fetch(`${r}/v1/player/sms/token`, {
|
|
381
391
|
method: "POST",
|
|
@@ -390,11 +400,11 @@ function ye(o, e, i) {
|
|
|
390
400
|
})
|
|
391
401
|
}), s = yield t.json();
|
|
392
402
|
if (t.ok)
|
|
393
|
-
i(9, a = s.id),
|
|
403
|
+
i(9, a = s.id), I = !1, U();
|
|
394
404
|
else
|
|
395
|
-
throw
|
|
405
|
+
throw I = !0, new Error("Failed to fetch");
|
|
396
406
|
} catch (t) {
|
|
397
|
-
|
|
407
|
+
I = !0, console.error(t);
|
|
398
408
|
}
|
|
399
409
|
}), U = () => {
|
|
400
410
|
T > 0 ? i(4, T--, T) : (clearInterval(M), i(3, M = !1), i(4, T = 60));
|
|
@@ -415,22 +425,22 @@ function ye(o, e, i) {
|
|
|
415
425
|
500
|
|
416
426
|
);
|
|
417
427
|
});
|
|
418
|
-
},
|
|
419
|
-
|
|
428
|
+
}, A = () => {
|
|
429
|
+
V < 60 && i(3, M = setInterval(
|
|
420
430
|
() => {
|
|
421
431
|
U();
|
|
422
432
|
},
|
|
423
433
|
1e3
|
|
424
434
|
));
|
|
425
435
|
}, b = (t) => {
|
|
426
|
-
!
|
|
436
|
+
!S.numeric.test(t.key) && t.keyCode !== 8 && t.keyCode !== 9 && t.keyCode !== 46 && t.preventDefault();
|
|
427
437
|
};
|
|
428
438
|
de(() => {
|
|
429
439
|
if (!m || !d) {
|
|
430
440
|
let t = JSON.parse(localStorage.getItem("playerData"));
|
|
431
441
|
i(10, m = t.playerid), i(11, d = t.number);
|
|
432
442
|
}
|
|
433
|
-
|
|
443
|
+
A();
|
|
434
444
|
});
|
|
435
445
|
function f() {
|
|
436
446
|
j = this.value, i(1, j);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var V=(r,t,i)=>new Promise((a,o)=>{var s=d=>{try{c(i.next(d))}catch(g){o(g)}},m=d=>{try{c(i.throw(d))}catch(g){o(g)}},c=d=>d.done?a(d.value):Promise.resolve(d.value).then(s,m);c((i=i.apply(r,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GeneralPlayerLoginForm-BoIsFJsw.cjs");function O({withLocale:r,translations:t}){e.$locale.subscribe(i=>{i==null&&(e.$dictionary.set(t),e.$locale.set(r))})}function U(r,t){e.addMessages(r,t)}const H={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-uutjwi","*,*::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, #D0046C));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C))}.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, #D0046C));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));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 Y(r){let t=r[5]("errorTitle")+"",i;return{c(){i=e.text(t)},m(a,o){e.insert(a,i,o)},p(a,o){o&32&&t!==(t=a[5]("errorTitle")+"")&&e.set_data(i,t)},d(a){a&&e.detach(i)}}}function G(r){let t=r[5]("title")+"",i;return{c(){i=e.text(t)},m(a,o){e.insert(a,i,o)},p(a,o){o&32&&t!==(t=a[5]("title")+"")&&e.set_data(i,t)},d(a){a&&e.detach(i)}}}function N(r){let t,i=r[5]("smsCodeError")+"",a;return{c(){t=e.element("p"),a=e.text(i),e.attr(t,"class","InvalidInput")},m(o,s){e.insert(o,t,s),e.append(t,a)},p(o,s){s&32&&i!==(i=o[5]("smsCodeError")+"")&&e.set_data(a,i)},d(o){o&&e.detach(t)}}}function L(r){let t,i=r[5]("resendMessage")+"",a;return{c(){t=e.element("p"),a=e.text(i),e.attr(t,"class","SmsVerificationResendMessage")},m(o,s){e.insert(o,t,s),e.append(t,a)},p(o,s){s&32&&i!==(i=o[5]("resendMessage")+"")&&e.set_data(a,i)},d(o){o&&e.detach(t)}}}function D(r){let t,i,a=r[4]<10?"0":"",o,s,m;return{c(){t=e.element("span"),i=e.text("(0:"),o=e.text(a),s=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,s),e.append(t,m)},p(c,d){d&16&&a!==(a=c[4]<10?"0":"")&&e.set_data(o,a),d&16&&e.set_data(s,c[4])},d(c){c&&e.detach(t)}}}function J(r){let t,i,a,o,s,m=r[5]("code")+"",c,d,g,_,u,C,S,T,k,h,E=r[5]("activate")+"",F,w,b,j=r[5]("resend")+"",z,I,A,P;function R(n,l){return n[2]?G:Y}let M=R(r),y=M(r),p=!r[2]&&N(r),f=r[3]&&L(r),v=r[3]&&D(r);return{c(){t=e.element("div"),i=e.element("h3"),y.c(),a=e.space(),o=e.element("div"),s=e.element("label"),c=e.text(m),d=e.text(":"),g=e.element("span"),g.textContent="*",_=e.space(),u=e.element("input"),C=e.space(),p&&p.c(),T=e.space(),f&&f.c(),k=e.space(),h=e.element("button"),F=e.text(E),w=e.space(),b=e.element("button"),z=e.text(j),I=e.space(),v&&v.c(),e.attr(i,"class","Title"),e.attr(g,"class","FormRequired"),e.attr(s,"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",S="Field SmsVerificationField "+(r[2]?"":"InvalidField")),e.attr(h,"class","Button SmsVerificationValidate"),e.attr(b,"class","Button SmsVerificationResend"),b.disabled=r[3],e.attr(t,"class","Container SmsVerificationContainer")},m(n,l){e.insert(n,t,l),e.append(t,i),y.m(i,null),e.append(t,a),e.append(t,o),e.append(o,s),e.append(s,c),e.append(s,d),e.append(s,g),e.append(o,_),e.append(o,u),e.set_input_value(u,r[1]),e.append(o,C),p&&p.m(o,null),e.append(t,T),f&&f.m(t,null),e.append(t,k),e.append(t,h),e.append(h,F),e.append(t,w),e.append(t,b),e.append(b,z),e.append(b,I),v&&v.m(b,null),r[19](t),A||(P=[e.listen(u,"input",r[17]),e.listen(u,"keydown",r[18]),e.listen(h,"click",r[6]),e.listen(b,"click",r[7])],A=!0)},p(n,[l]){M===(M=R(n))&&y?y.p(n,l):(y.d(1),y=M(n),y&&(y.c(),y.m(i,null))),l&32&&m!==(m=n[5]("code")+"")&&e.set_data(c,m),l&2&&u.value!==n[1]&&e.set_input_value(u,n[1]),n[2]?p&&(p.d(1),p=null):p?p.p(n,l):(p=N(n),p.c(),p.m(o,null)),l&4&&S!==(S="Field SmsVerificationField "+(n[2]?"":"InvalidField"))&&e.attr(o,"class",S),n[3]?f?f.p(n,l):(f=L(n),f.c(),f.m(t,k)):f&&(f.d(1),f=null),l&32&&E!==(E=n[5]("activate")+"")&&e.set_data(F,E),l&32&&j!==(j=n[5]("resend")+"")&&e.set_data(z,j),n[3]?v?v.p(n,l):(v=D(n),v.c(),v.m(b,null)):v&&(v.d(1),v=null),l&8&&(b.disabled=n[3])},i:e.noop,o:e.noop,d(n){n&&e.detach(t),y.d(),p&&p.d(),f&&f.d(),v&&v.d(),r[19](null),A=!1,e.run_all(P)}}}function K(r,t,i){let a;e.component_subscribe(r,e.$format,n=>i(5,a=n));let{endpoint:o=""}=t,{tokenid:s=""}=t,{playerid:m=""}=t,{smstemplate:c="Please use this code {0} to activate your accout"}=t,{number:d=""}=t,{clientstyling:g=""}=t,{clientstylingurl:_=""}=t,{translationurl:u=""}=t,C,S=!0,T=!1,k,h,E=+localStorage.getItem("smsTimer")||0,F=Date.now()/1e3-E,w=60-Math.floor(F);const b={numeric:/^[0-9]{0,6}$/};O({withLocale:"en",translations:{}});const j=()=>{fetch(u).then(l=>l.json()).then(l=>{Object.keys(l).forEach(x=>{U(x,l[x])})}).catch(l=>{console.log(l)})};Object.keys(H).forEach(n=>{U(n,H[n])});const z=()=>V(this,null,function*(){try{if((yield fetch(`${o}/v1/player/${m}/activateSMS?tokenId=${s}&validationCode=${C}`,{headers:{"Content-Type":"application/json",accept:"application/json"}})).ok)i(2,S=!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,S=!1),new Error("Could not activate user")}catch(n){console.log(n)}}),I=()=>V(this,null,function*(){localStorage.setItem("smsTimer",JSON.stringify(Math.floor(Date.now()/1e3))),M();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})}),l=yield n.json();if(n.ok)i(9,s=l.id),T=!1,A();else throw T=!0,new Error("Failed to fetch")}catch(n){T=!0,console.error(n)}}),A=()=>{w>0?i(4,w--,w):(clearInterval(k),i(3,k=!1),i(4,w=60))},P=()=>{let n=document.createElement("style");n.innerHTML=g,h.appendChild(n)},R=()=>{let n=new URL(_),l=document.createElement("style");fetch(n.href).then(x=>x.text()).then(x=>{l.innerHTML=x,setTimeout(()=>{h.appendChild(l)},1),setTimeout(()=>{},500)})},M=()=>{F<60&&i(3,k=setInterval(()=>{A()},1e3))},y=n=>{!b.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)}M()});function p(){C=this.value,i(1,C)}const f=n=>y(n);function v(n){e.binding_callbacks[n?"unshift":"push"](()=>{h=n,i(0,h)})}return r.$$set=n=>{"endpoint"in n&&i(12,o=n.endpoint),"tokenid"in n&&i(9,s=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),"clientstyling"in n&&i(14,g=n.clientstyling),"clientstylingurl"in n&&i(15,_=n.clientstylingurl),"translationurl"in n&&i(16,u=n.translationurl)},r.$$.update=()=>{r.$$.dirty&5632,r.$$.dirty&16385&&g&&h&&P(),r.$$.dirty&32769&&_&&h&&R(),r.$$.dirty&65536&&u&&j()},[h,C,S,k,w,a,z,I,y,s,m,d,o,c,g,_,u,p,f,v]}class B extends e.SvelteComponent{constructor(t){super(),e.init(this,t,K,J,e.safe_not_equal,{endpoint:12,tokenid:9,playerid:10,smstemplate:13,number:11,clientstyling:14,clientstylingurl:15,translationurl:16},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 clientstyling(){return this.$$.ctx[14]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[16]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}}e.create_custom_element(B,{endpoint:{},tokenid:{},playerid:{},smstemplate:{},number:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);exports.default=B;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if(typeof window!="undefined"){let n=function(e){return function(...r){try{return e.apply(this,r)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/GeneralPlayerLoginForm-
|
|
1
|
+
"use strict";if(typeof window!="undefined"){let n=function(e){return function(...r){try{return e.apply(this,r)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/GeneralPlayerLoginForm-BoIsFJsw.cjs")).then(e=>e.GeneralPlayerLoginForm_ce).then(({default:e})=>{!customElements.get("general-player-login-form")&&customElements.define("general-player-login-form",e.element)})}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/GeneralPlayerLoginForm-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/GeneralPlayerLoginForm-DnwXmexh.js").then((e) => e.G).then(({ default: e }) => {
|
|
14
14
|
!customElements.get("general-player-login-form") && customElements.define("general-player-login-form", e.element);
|
|
15
15
|
});
|
|
16
16
|
}
|