@everymatrix/player-kyc-verification 1.29.1 → 1.29.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/player-kyc-verification.cjs.entry.js +28 -2
- package/dist/collection/components/player-kyc-verification/player-kyc-verification.css +13 -10
- package/dist/collection/components/player-kyc-verification/player-kyc-verification.js +1 -1
- package/dist/collection/utils/locale.utils.js +26 -0
- package/dist/components/player-kyc-verification.js +28 -2
- package/dist/esm/player-kyc-verification.entry.js +28 -2
- package/dist/player-kyc-verification/p-78aa8429.entry.js +1 -0
- package/dist/player-kyc-verification/player-kyc-verification.esm.js +1 -1
- package/package.json +1 -1
- package/dist/player-kyc-verification/p-28c876fe.entry.js +0 -1
|
@@ -96,6 +96,32 @@ let TRANSLATIONS = {
|
|
|
96
96
|
chooseDocument: 'Odaberite Dokument',
|
|
97
97
|
kycTitle: 'Verifikacija računa',
|
|
98
98
|
kycDescription: 'Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.',
|
|
99
|
+
},
|
|
100
|
+
'pt-br': {
|
|
101
|
+
'Loading': 'Carregando, espere por favor…',
|
|
102
|
+
'noVerificationRequired': 'Não há necessidade de verificação para sua conta no momento',
|
|
103
|
+
'verificationComplete': 'Verificação completa',
|
|
104
|
+
'verificationFailed': 'Verificação de falha',
|
|
105
|
+
'verificationExpired': 'A verificação expirou',
|
|
106
|
+
'fileSizeExceeded': 'Tamanho máximo do arquivo excedido. O tamanho máximo do arquivo é: 50 MB',
|
|
107
|
+
'uploading': 'Carregando...',
|
|
108
|
+
'successUpload': 'Seu documento foi carregado e será analisado em breve',
|
|
109
|
+
'successUploadMultipleFiles': 'Seus documentos foram enviados e serão revisados em breve',
|
|
110
|
+
'failedUpload': 'Falha no upload do arquivo, tente novamente',
|
|
111
|
+
'chooseDocument': 'Escolha um arquivo'
|
|
112
|
+
},
|
|
113
|
+
'es-mx': {
|
|
114
|
+
'Loading': 'Cargando, espere por favor…',
|
|
115
|
+
'noVerificationRequired': 'No hay verificación requerida para su cuenta al momento',
|
|
116
|
+
'verificationComplete': 'Verificación completa',
|
|
117
|
+
'verificationFailed': 'Verificación fallo',
|
|
118
|
+
'verificationExpired': 'Verificación expiro',
|
|
119
|
+
'fileSizeExceeded': 'Tamaño máximo de archivo se excedió. El tamaño máximo del archivo es: 50mb',
|
|
120
|
+
'uploading': 'Cargando ...',
|
|
121
|
+
'successUpload': 'Su documento ha sido cargado y será revisado en breve',
|
|
122
|
+
'successUploadMultipleFiles': 'Sus documento han sido cargados y serán revisado en breve',
|
|
123
|
+
'failedUpload': 'La carga del archivo falló, por favor intente de nuevo',
|
|
124
|
+
'chooseDocument': 'Elija un archivo'
|
|
99
125
|
}
|
|
100
126
|
};
|
|
101
127
|
const getTranslations = (url) => {
|
|
@@ -125,7 +151,7 @@ const translate = (key, customLang, values) => {
|
|
|
125
151
|
return translation;
|
|
126
152
|
};
|
|
127
153
|
|
|
128
|
-
const playerKycVerificationCss = "
|
|
154
|
+
const playerKycVerificationCss = ":host {\n font-family: inherit;\n}\n\nbutton, select {\n font-family: inherit;\n}\n\n.ModalContainer {\n container-type: inline-size;\n}\n\n.player-kyc-verification-widget {\n padding: 20px;\n align-items: center;\n}\n.player-kyc-verification-widget h2 {\n margin: 4px;\n}\n.player-kyc-verification-widget .widget-description {\n margin: 24px 0px;\n}\n.player-kyc-verification-widget .verification-types {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 34px;\n}\n.player-kyc-verification-widget .verification-types .verification-box {\n transition: height 0.3s, border-color 0.3s;\n border: solid 1px var(--emfe-w-color-gray-100, #E6E6E6);\n border-radius: 2px;\n display: flex;\n flex-direction: column;\n padding: 0px 14px;\n border-width: 2px 2px 8px 2px;\n align-self: start;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box {\n flex-shrink: 0;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header {\n display: flex;\n padding: 14px 0px;\n justify-content: space-between;\n cursor: pointer;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon {\n flex-grow: 1;\n display: flex;\n justify-content: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon svg {\n height: 24px;\n width: 24px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-title {\n flex-grow: 1;\n font-size: 18px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon {\n flex-grow: 10;\n width: 14px;\n height: 14px;\n display: flex;\n justify-content: flex-end;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon svg {\n width: 20px;\n height: 22px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content {\n display: none;\n flex-grow: 1;\n border-top: 0.4px solid var(--emfe-w-color-gray-100, #E6E6E6);\n padding: 10px 0px;\n flex-grow: 1;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .upload-status {\n text-align: center;\n padding: 20px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown {\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown svg {\n margin: 16px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .nice-select {\n cursor: pointer;\n width: 100%;\n height: 30px;\n padding: 4px 14px;\n font-size: 14px;\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n border-radius: 2px;\n background-color: var(--emfe-w-color-white, #FFFFFF);\n color: #333;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n padding-right: 30px;\n background-repeat: no-repeat;\n background-position: right 10px center;\n background-image: url('data:image/svg+xml;charset=utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><path fill=\"%23333\" d=\"M10 18.4l-6.5-6.5h13z\"/><path fill=\"%23333\" d=\"M10 1.6l6.5 6.5H3.5z\"/></svg>');\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: var(--emfe-w-color-error var(--emfe-w-color-red, #FD2839));\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content .verification-status {\n margin: 12px 0px 16px;\n font-size: 18px;\n text-align: center;\n color: var(--emfe-w-color-gray-150, #828282);\n}\n\n@container (min-width: 700px) {\n .player-kyc-verification-widget {\n padding: 100px 60px;\n }\n}\n@container (max-width: 700px) {\n .player-kyc-verification-widget h2 {\n margin: 4px;\n text-align: center;\n }\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: 1fr;\n grid-gap: 16px;\n }\n}\n@container (max-width: 1240px) and (min-width: 701px) {\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: repeat(2, 1fr);\n }\n}";
|
|
129
155
|
|
|
130
156
|
const PlayerKycVerificationWidget = class {
|
|
131
157
|
constructor(hostRef) {
|
|
@@ -405,7 +431,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
405
431
|
return (index.h("div", null, index.h("hr", { style: { margin: '5px' } }), index.h("iframe", { src: flowInfo.url, frameborder: "0", height: "400px", width: "100%", allowfullScreen: true })));
|
|
406
432
|
}
|
|
407
433
|
else {
|
|
408
|
-
return (index.h("div", { class: "box box-content" }, index.h(index.Fragment, null, isVerified ? (index.h("div", { class: "verification-status" }, translate('verificationComplete', this.language))) : isFailedOrExpired ? (index.h("div", { class: "verification-status" }, status === 'Failed' ? translate('verificationFailed', this.language) : translate('verificationExpired', this.language))) : documents.length > 0 ? (index.h("div", { class: "documents-dropdown" }, index.h("select", { class: "nice-select", onChange: (event) => this.handleOptionChange(event, verificationType.type) }, index.h("option", { value: "", selected: true, disabled: true, hidden: true }, translate('chooseDocument', this.language)), documents.map((doc) => (index.h("option", { selected: optionChosen == doc.code ? true : false, value: doc.code }, doc.type.replace(/([A-Z])/g, ' $1'))))), ((_a = documents.find((e) => e.code == optionChosen)) === null || _a === void 0 ? void 0 : _a.statusUploaded) ? (index.h("div", { class: "upload-status" }, (_b = documents.find((e) => e.code == optionChosen)) === null || _b === void 0 ? void 0 : _b.statusUploaded)) : (index.h("div", { class: "upload-button" }, optionChosen ? (index.h("label", null, index.h("input", { type: "file", accept: "*", multiple: true, onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), index.h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, index.h("circle", { cx: "50", cy: "50", r: "40", fill: "#
|
|
434
|
+
return (index.h("div", { class: "box box-content" }, index.h(index.Fragment, null, isVerified ? (index.h("div", { class: "verification-status" }, translate('verificationComplete', this.language))) : isFailedOrExpired ? (index.h("div", { class: "verification-status" }, status === 'Failed' ? translate('verificationFailed', this.language) : translate('verificationExpired', this.language))) : documents.length > 0 ? (index.h("div", { class: "documents-dropdown" }, index.h("select", { class: "nice-select", onChange: (event) => this.handleOptionChange(event, verificationType.type) }, index.h("option", { value: "", selected: true, disabled: true, hidden: true }, translate('chooseDocument', this.language)), documents.map((doc) => (index.h("option", { selected: optionChosen == doc.code ? true : false, value: doc.code }, doc.type.replace(/([A-Z])/g, ' $1'))))), ((_a = documents.find((e) => e.code == optionChosen)) === null || _a === void 0 ? void 0 : _a.statusUploaded) ? (index.h("div", { class: "upload-status" }, (_b = documents.find((e) => e.code == optionChosen)) === null || _b === void 0 ? void 0 : _b.statusUploaded)) : (index.h("div", { class: "upload-button" }, optionChosen ? (index.h("label", null, index.h("input", { type: "file", accept: "*", multiple: true, onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), index.h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, index.h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), index.h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }), index.h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))) : null)));
|
|
409
435
|
}
|
|
410
436
|
}
|
|
411
437
|
render() {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");
|
|
2
1
|
:host {
|
|
3
|
-
font-family:
|
|
2
|
+
font-family: inherit;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
button, select {
|
|
6
|
+
font-family: inherit;
|
|
4
7
|
}
|
|
5
8
|
|
|
6
9
|
.ModalContainer {
|
|
@@ -25,7 +28,7 @@
|
|
|
25
28
|
}
|
|
26
29
|
.player-kyc-verification-widget .verification-types .verification-box {
|
|
27
30
|
transition: height 0.3s, border-color 0.3s;
|
|
28
|
-
border: solid
|
|
31
|
+
border: solid 1px var(--emfe-w-color-gray-100, #E6E6E6);
|
|
29
32
|
border-radius: 2px;
|
|
30
33
|
display: flex;
|
|
31
34
|
flex-direction: column;
|
|
@@ -70,7 +73,7 @@
|
|
|
70
73
|
.player-kyc-verification-widget .verification-types .verification-box .box-content {
|
|
71
74
|
display: none;
|
|
72
75
|
flex-grow: 1;
|
|
73
|
-
border-top: 0.4px solid #
|
|
76
|
+
border-top: 0.4px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
74
77
|
padding: 10px 0px;
|
|
75
78
|
flex-grow: 1;
|
|
76
79
|
}
|
|
@@ -94,9 +97,9 @@
|
|
|
94
97
|
height: 30px;
|
|
95
98
|
padding: 4px 14px;
|
|
96
99
|
font-size: 14px;
|
|
97
|
-
border: 1px solid #
|
|
100
|
+
border: 1px solid var(--emfe-w-color-gray-150, #828282);
|
|
98
101
|
border-radius: 2px;
|
|
99
|
-
background-color: #
|
|
102
|
+
background-color: var(--emfe-w-color-white, #FFFFFF);
|
|
100
103
|
color: #333;
|
|
101
104
|
appearance: none;
|
|
102
105
|
-webkit-appearance: none;
|
|
@@ -107,14 +110,14 @@
|
|
|
107
110
|
background-image: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="%23333" d="M10 18.4l-6.5-6.5h13z"/><path fill="%23333" d="M10 1.6l6.5 6.5H3.5z"/></svg>');
|
|
108
111
|
}
|
|
109
112
|
.player-kyc-verification-widget .verification-types .verification-box.expanded {
|
|
110
|
-
border-color: green;
|
|
113
|
+
border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));
|
|
111
114
|
min-height: 120px;
|
|
112
115
|
}
|
|
113
116
|
.player-kyc-verification-widget .verification-types .verification-box.failed {
|
|
114
|
-
border-color: #
|
|
117
|
+
border-color: var(--emfe-w-color-error var(--emfe-w-color-red, #FD2839));
|
|
115
118
|
}
|
|
116
119
|
.player-kyc-verification-widget .verification-types .verification-box.success {
|
|
117
|
-
border-color: green;
|
|
120
|
+
border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));
|
|
118
121
|
}
|
|
119
122
|
.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content {
|
|
120
123
|
display: flex;
|
|
@@ -125,7 +128,7 @@
|
|
|
125
128
|
margin: 12px 0px 16px;
|
|
126
129
|
font-size: 18px;
|
|
127
130
|
text-align: center;
|
|
128
|
-
color: #
|
|
131
|
+
color: var(--emfe-w-color-gray-150, #828282);
|
|
129
132
|
}
|
|
130
133
|
|
|
131
134
|
@container (min-width: 700px) {
|
|
@@ -307,7 +307,7 @@ export class PlayerKycVerificationWidget {
|
|
|
307
307
|
((_a = documents.find((e) => e.code == optionChosen)) === null || _a === void 0 ? void 0 : _a.statusUploaded) ? (h("div", { class: "upload-status" }, (_b = documents.find((e) => e.code == optionChosen)) === null || _b === void 0 ? void 0 : _b.statusUploaded)) : (h("div", { class: "upload-button" }, optionChosen ? (h("label", null,
|
|
308
308
|
h("input", { type: "file", accept: "*", multiple: true, onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }),
|
|
309
309
|
h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" },
|
|
310
|
-
h("circle", { cx: "50", cy: "50", r: "40", fill: "#
|
|
310
|
+
h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }),
|
|
311
311
|
h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }),
|
|
312
312
|
h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))) : null)));
|
|
313
313
|
}
|
|
@@ -90,6 +90,32 @@ let TRANSLATIONS = {
|
|
|
90
90
|
chooseDocument: 'Odaberite Dokument',
|
|
91
91
|
kycTitle: 'Verifikacija računa',
|
|
92
92
|
kycDescription: 'Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.',
|
|
93
|
+
},
|
|
94
|
+
'pt-br': {
|
|
95
|
+
'Loading': 'Carregando, espere por favor…',
|
|
96
|
+
'noVerificationRequired': 'Não há necessidade de verificação para sua conta no momento',
|
|
97
|
+
'verificationComplete': 'Verificação completa',
|
|
98
|
+
'verificationFailed': 'Verificação de falha',
|
|
99
|
+
'verificationExpired': 'A verificação expirou',
|
|
100
|
+
'fileSizeExceeded': 'Tamanho máximo do arquivo excedido. O tamanho máximo do arquivo é: 50 MB',
|
|
101
|
+
'uploading': 'Carregando...',
|
|
102
|
+
'successUpload': 'Seu documento foi carregado e será analisado em breve',
|
|
103
|
+
'successUploadMultipleFiles': 'Seus documentos foram enviados e serão revisados em breve',
|
|
104
|
+
'failedUpload': 'Falha no upload do arquivo, tente novamente',
|
|
105
|
+
'chooseDocument': 'Escolha um arquivo'
|
|
106
|
+
},
|
|
107
|
+
'es-mx': {
|
|
108
|
+
'Loading': 'Cargando, espere por favor…',
|
|
109
|
+
'noVerificationRequired': 'No hay verificación requerida para su cuenta al momento',
|
|
110
|
+
'verificationComplete': 'Verificación completa',
|
|
111
|
+
'verificationFailed': 'Verificación fallo',
|
|
112
|
+
'verificationExpired': 'Verificación expiro',
|
|
113
|
+
'fileSizeExceeded': 'Tamaño máximo de archivo se excedió. El tamaño máximo del archivo es: 50mb',
|
|
114
|
+
'uploading': 'Cargando ...',
|
|
115
|
+
'successUpload': 'Su documento ha sido cargado y será revisado en breve',
|
|
116
|
+
'successUploadMultipleFiles': 'Sus documento han sido cargados y serán revisado en breve',
|
|
117
|
+
'failedUpload': 'La carga del archivo falló, por favor intente de nuevo',
|
|
118
|
+
'chooseDocument': 'Elija un archivo'
|
|
93
119
|
}
|
|
94
120
|
};
|
|
95
121
|
export const getTranslations = (url) => {
|
|
@@ -92,6 +92,32 @@ let TRANSLATIONS = {
|
|
|
92
92
|
chooseDocument: 'Odaberite Dokument',
|
|
93
93
|
kycTitle: 'Verifikacija računa',
|
|
94
94
|
kycDescription: 'Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.',
|
|
95
|
+
},
|
|
96
|
+
'pt-br': {
|
|
97
|
+
'Loading': 'Carregando, espere por favor…',
|
|
98
|
+
'noVerificationRequired': 'Não há necessidade de verificação para sua conta no momento',
|
|
99
|
+
'verificationComplete': 'Verificação completa',
|
|
100
|
+
'verificationFailed': 'Verificação de falha',
|
|
101
|
+
'verificationExpired': 'A verificação expirou',
|
|
102
|
+
'fileSizeExceeded': 'Tamanho máximo do arquivo excedido. O tamanho máximo do arquivo é: 50 MB',
|
|
103
|
+
'uploading': 'Carregando...',
|
|
104
|
+
'successUpload': 'Seu documento foi carregado e será analisado em breve',
|
|
105
|
+
'successUploadMultipleFiles': 'Seus documentos foram enviados e serão revisados em breve',
|
|
106
|
+
'failedUpload': 'Falha no upload do arquivo, tente novamente',
|
|
107
|
+
'chooseDocument': 'Escolha um arquivo'
|
|
108
|
+
},
|
|
109
|
+
'es-mx': {
|
|
110
|
+
'Loading': 'Cargando, espere por favor…',
|
|
111
|
+
'noVerificationRequired': 'No hay verificación requerida para su cuenta al momento',
|
|
112
|
+
'verificationComplete': 'Verificación completa',
|
|
113
|
+
'verificationFailed': 'Verificación fallo',
|
|
114
|
+
'verificationExpired': 'Verificación expiro',
|
|
115
|
+
'fileSizeExceeded': 'Tamaño máximo de archivo se excedió. El tamaño máximo del archivo es: 50mb',
|
|
116
|
+
'uploading': 'Cargando ...',
|
|
117
|
+
'successUpload': 'Su documento ha sido cargado y será revisado en breve',
|
|
118
|
+
'successUploadMultipleFiles': 'Sus documento han sido cargados y serán revisado en breve',
|
|
119
|
+
'failedUpload': 'La carga del archivo falló, por favor intente de nuevo',
|
|
120
|
+
'chooseDocument': 'Elija un archivo'
|
|
95
121
|
}
|
|
96
122
|
};
|
|
97
123
|
const getTranslations = (url) => {
|
|
@@ -121,7 +147,7 @@ const translate = (key, customLang, values) => {
|
|
|
121
147
|
return translation;
|
|
122
148
|
};
|
|
123
149
|
|
|
124
|
-
const playerKycVerificationCss = "
|
|
150
|
+
const playerKycVerificationCss = ":host {\n font-family: inherit;\n}\n\nbutton, select {\n font-family: inherit;\n}\n\n.ModalContainer {\n container-type: inline-size;\n}\n\n.player-kyc-verification-widget {\n padding: 20px;\n align-items: center;\n}\n.player-kyc-verification-widget h2 {\n margin: 4px;\n}\n.player-kyc-verification-widget .widget-description {\n margin: 24px 0px;\n}\n.player-kyc-verification-widget .verification-types {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 34px;\n}\n.player-kyc-verification-widget .verification-types .verification-box {\n transition: height 0.3s, border-color 0.3s;\n border: solid 1px var(--emfe-w-color-gray-100, #E6E6E6);\n border-radius: 2px;\n display: flex;\n flex-direction: column;\n padding: 0px 14px;\n border-width: 2px 2px 8px 2px;\n align-self: start;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box {\n flex-shrink: 0;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header {\n display: flex;\n padding: 14px 0px;\n justify-content: space-between;\n cursor: pointer;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon {\n flex-grow: 1;\n display: flex;\n justify-content: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon svg {\n height: 24px;\n width: 24px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-title {\n flex-grow: 1;\n font-size: 18px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon {\n flex-grow: 10;\n width: 14px;\n height: 14px;\n display: flex;\n justify-content: flex-end;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon svg {\n width: 20px;\n height: 22px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content {\n display: none;\n flex-grow: 1;\n border-top: 0.4px solid var(--emfe-w-color-gray-100, #E6E6E6);\n padding: 10px 0px;\n flex-grow: 1;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .upload-status {\n text-align: center;\n padding: 20px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown {\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown svg {\n margin: 16px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .nice-select {\n cursor: pointer;\n width: 100%;\n height: 30px;\n padding: 4px 14px;\n font-size: 14px;\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n border-radius: 2px;\n background-color: var(--emfe-w-color-white, #FFFFFF);\n color: #333;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n padding-right: 30px;\n background-repeat: no-repeat;\n background-position: right 10px center;\n background-image: url('data:image/svg+xml;charset=utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><path fill=\"%23333\" d=\"M10 18.4l-6.5-6.5h13z\"/><path fill=\"%23333\" d=\"M10 1.6l6.5 6.5H3.5z\"/></svg>');\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: var(--emfe-w-color-error var(--emfe-w-color-red, #FD2839));\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content .verification-status {\n margin: 12px 0px 16px;\n font-size: 18px;\n text-align: center;\n color: var(--emfe-w-color-gray-150, #828282);\n}\n\n@container (min-width: 700px) {\n .player-kyc-verification-widget {\n padding: 100px 60px;\n }\n}\n@container (max-width: 700px) {\n .player-kyc-verification-widget h2 {\n margin: 4px;\n text-align: center;\n }\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: 1fr;\n grid-gap: 16px;\n }\n}\n@container (max-width: 1240px) and (min-width: 701px) {\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: repeat(2, 1fr);\n }\n}";
|
|
125
151
|
|
|
126
152
|
const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
127
153
|
constructor() {
|
|
@@ -403,7 +429,7 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
403
429
|
return (h("div", null, h("hr", { style: { margin: '5px' } }), h("iframe", { src: flowInfo.url, frameborder: "0", height: "400px", width: "100%", allowfullScreen: true })));
|
|
404
430
|
}
|
|
405
431
|
else {
|
|
406
|
-
return (h("div", { class: "box box-content" }, h(Fragment, null, isVerified ? (h("div", { class: "verification-status" }, translate('verificationComplete', this.language))) : isFailedOrExpired ? (h("div", { class: "verification-status" }, status === 'Failed' ? translate('verificationFailed', this.language) : translate('verificationExpired', this.language))) : documents.length > 0 ? (h("div", { class: "documents-dropdown" }, h("select", { class: "nice-select", onChange: (event) => this.handleOptionChange(event, verificationType.type) }, h("option", { value: "", selected: true, disabled: true, hidden: true }, translate('chooseDocument', this.language)), documents.map((doc) => (h("option", { selected: optionChosen == doc.code ? true : false, value: doc.code }, doc.type.replace(/([A-Z])/g, ' $1'))))), ((_a = documents.find((e) => e.code == optionChosen)) === null || _a === void 0 ? void 0 : _a.statusUploaded) ? (h("div", { class: "upload-status" }, (_b = documents.find((e) => e.code == optionChosen)) === null || _b === void 0 ? void 0 : _b.statusUploaded)) : (h("div", { class: "upload-button" }, optionChosen ? (h("label", null, h("input", { type: "file", accept: "*", multiple: true, onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { cx: "50", cy: "50", r: "40", fill: "#
|
|
432
|
+
return (h("div", { class: "box box-content" }, h(Fragment, null, isVerified ? (h("div", { class: "verification-status" }, translate('verificationComplete', this.language))) : isFailedOrExpired ? (h("div", { class: "verification-status" }, status === 'Failed' ? translate('verificationFailed', this.language) : translate('verificationExpired', this.language))) : documents.length > 0 ? (h("div", { class: "documents-dropdown" }, h("select", { class: "nice-select", onChange: (event) => this.handleOptionChange(event, verificationType.type) }, h("option", { value: "", selected: true, disabled: true, hidden: true }, translate('chooseDocument', this.language)), documents.map((doc) => (h("option", { selected: optionChosen == doc.code ? true : false, value: doc.code }, doc.type.replace(/([A-Z])/g, ' $1'))))), ((_a = documents.find((e) => e.code == optionChosen)) === null || _a === void 0 ? void 0 : _a.statusUploaded) ? (h("div", { class: "upload-status" }, (_b = documents.find((e) => e.code == optionChosen)) === null || _b === void 0 ? void 0 : _b.statusUploaded)) : (h("div", { class: "upload-button" }, optionChosen ? (h("label", null, h("input", { type: "file", accept: "*", multiple: true, onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }), h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))) : null)));
|
|
407
433
|
}
|
|
408
434
|
}
|
|
409
435
|
render() {
|
|
@@ -92,6 +92,32 @@ let TRANSLATIONS = {
|
|
|
92
92
|
chooseDocument: 'Odaberite Dokument',
|
|
93
93
|
kycTitle: 'Verifikacija računa',
|
|
94
94
|
kycDescription: 'Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.',
|
|
95
|
+
},
|
|
96
|
+
'pt-br': {
|
|
97
|
+
'Loading': 'Carregando, espere por favor…',
|
|
98
|
+
'noVerificationRequired': 'Não há necessidade de verificação para sua conta no momento',
|
|
99
|
+
'verificationComplete': 'Verificação completa',
|
|
100
|
+
'verificationFailed': 'Verificação de falha',
|
|
101
|
+
'verificationExpired': 'A verificação expirou',
|
|
102
|
+
'fileSizeExceeded': 'Tamanho máximo do arquivo excedido. O tamanho máximo do arquivo é: 50 MB',
|
|
103
|
+
'uploading': 'Carregando...',
|
|
104
|
+
'successUpload': 'Seu documento foi carregado e será analisado em breve',
|
|
105
|
+
'successUploadMultipleFiles': 'Seus documentos foram enviados e serão revisados em breve',
|
|
106
|
+
'failedUpload': 'Falha no upload do arquivo, tente novamente',
|
|
107
|
+
'chooseDocument': 'Escolha um arquivo'
|
|
108
|
+
},
|
|
109
|
+
'es-mx': {
|
|
110
|
+
'Loading': 'Cargando, espere por favor…',
|
|
111
|
+
'noVerificationRequired': 'No hay verificación requerida para su cuenta al momento',
|
|
112
|
+
'verificationComplete': 'Verificación completa',
|
|
113
|
+
'verificationFailed': 'Verificación fallo',
|
|
114
|
+
'verificationExpired': 'Verificación expiro',
|
|
115
|
+
'fileSizeExceeded': 'Tamaño máximo de archivo se excedió. El tamaño máximo del archivo es: 50mb',
|
|
116
|
+
'uploading': 'Cargando ...',
|
|
117
|
+
'successUpload': 'Su documento ha sido cargado y será revisado en breve',
|
|
118
|
+
'successUploadMultipleFiles': 'Sus documento han sido cargados y serán revisado en breve',
|
|
119
|
+
'failedUpload': 'La carga del archivo falló, por favor intente de nuevo',
|
|
120
|
+
'chooseDocument': 'Elija un archivo'
|
|
95
121
|
}
|
|
96
122
|
};
|
|
97
123
|
const getTranslations = (url) => {
|
|
@@ -121,7 +147,7 @@ const translate = (key, customLang, values) => {
|
|
|
121
147
|
return translation;
|
|
122
148
|
};
|
|
123
149
|
|
|
124
|
-
const playerKycVerificationCss = "
|
|
150
|
+
const playerKycVerificationCss = ":host {\n font-family: inherit;\n}\n\nbutton, select {\n font-family: inherit;\n}\n\n.ModalContainer {\n container-type: inline-size;\n}\n\n.player-kyc-verification-widget {\n padding: 20px;\n align-items: center;\n}\n.player-kyc-verification-widget h2 {\n margin: 4px;\n}\n.player-kyc-verification-widget .widget-description {\n margin: 24px 0px;\n}\n.player-kyc-verification-widget .verification-types {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 34px;\n}\n.player-kyc-verification-widget .verification-types .verification-box {\n transition: height 0.3s, border-color 0.3s;\n border: solid 1px var(--emfe-w-color-gray-100, #E6E6E6);\n border-radius: 2px;\n display: flex;\n flex-direction: column;\n padding: 0px 14px;\n border-width: 2px 2px 8px 2px;\n align-self: start;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box {\n flex-shrink: 0;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header {\n display: flex;\n padding: 14px 0px;\n justify-content: space-between;\n cursor: pointer;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon {\n flex-grow: 1;\n display: flex;\n justify-content: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon svg {\n height: 24px;\n width: 24px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-title {\n flex-grow: 1;\n font-size: 18px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon {\n flex-grow: 10;\n width: 14px;\n height: 14px;\n display: flex;\n justify-content: flex-end;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon svg {\n width: 20px;\n height: 22px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content {\n display: none;\n flex-grow: 1;\n border-top: 0.4px solid var(--emfe-w-color-gray-100, #E6E6E6);\n padding: 10px 0px;\n flex-grow: 1;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .upload-status {\n text-align: center;\n padding: 20px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown {\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown svg {\n margin: 16px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .nice-select {\n cursor: pointer;\n width: 100%;\n height: 30px;\n padding: 4px 14px;\n font-size: 14px;\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n border-radius: 2px;\n background-color: var(--emfe-w-color-white, #FFFFFF);\n color: #333;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n padding-right: 30px;\n background-repeat: no-repeat;\n background-position: right 10px center;\n background-image: url('data:image/svg+xml;charset=utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><path fill=\"%23333\" d=\"M10 18.4l-6.5-6.5h13z\"/><path fill=\"%23333\" d=\"M10 1.6l6.5 6.5H3.5z\"/></svg>');\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: var(--emfe-w-color-error var(--emfe-w-color-red, #FD2839));\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content .verification-status {\n margin: 12px 0px 16px;\n font-size: 18px;\n text-align: center;\n color: var(--emfe-w-color-gray-150, #828282);\n}\n\n@container (min-width: 700px) {\n .player-kyc-verification-widget {\n padding: 100px 60px;\n }\n}\n@container (max-width: 700px) {\n .player-kyc-verification-widget h2 {\n margin: 4px;\n text-align: center;\n }\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: 1fr;\n grid-gap: 16px;\n }\n}\n@container (max-width: 1240px) and (min-width: 701px) {\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: repeat(2, 1fr);\n }\n}";
|
|
125
151
|
|
|
126
152
|
const PlayerKycVerificationWidget = class {
|
|
127
153
|
constructor(hostRef) {
|
|
@@ -401,7 +427,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
401
427
|
return (h("div", null, h("hr", { style: { margin: '5px' } }), h("iframe", { src: flowInfo.url, frameborder: "0", height: "400px", width: "100%", allowfullScreen: true })));
|
|
402
428
|
}
|
|
403
429
|
else {
|
|
404
|
-
return (h("div", { class: "box box-content" }, h(Fragment, null, isVerified ? (h("div", { class: "verification-status" }, translate('verificationComplete', this.language))) : isFailedOrExpired ? (h("div", { class: "verification-status" }, status === 'Failed' ? translate('verificationFailed', this.language) : translate('verificationExpired', this.language))) : documents.length > 0 ? (h("div", { class: "documents-dropdown" }, h("select", { class: "nice-select", onChange: (event) => this.handleOptionChange(event, verificationType.type) }, h("option", { value: "", selected: true, disabled: true, hidden: true }, translate('chooseDocument', this.language)), documents.map((doc) => (h("option", { selected: optionChosen == doc.code ? true : false, value: doc.code }, doc.type.replace(/([A-Z])/g, ' $1'))))), ((_a = documents.find((e) => e.code == optionChosen)) === null || _a === void 0 ? void 0 : _a.statusUploaded) ? (h("div", { class: "upload-status" }, (_b = documents.find((e) => e.code == optionChosen)) === null || _b === void 0 ? void 0 : _b.statusUploaded)) : (h("div", { class: "upload-button" }, optionChosen ? (h("label", null, h("input", { type: "file", accept: "*", multiple: true, onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { cx: "50", cy: "50", r: "40", fill: "#
|
|
430
|
+
return (h("div", { class: "box box-content" }, h(Fragment, null, isVerified ? (h("div", { class: "verification-status" }, translate('verificationComplete', this.language))) : isFailedOrExpired ? (h("div", { class: "verification-status" }, status === 'Failed' ? translate('verificationFailed', this.language) : translate('verificationExpired', this.language))) : documents.length > 0 ? (h("div", { class: "documents-dropdown" }, h("select", { class: "nice-select", onChange: (event) => this.handleOptionChange(event, verificationType.type) }, h("option", { value: "", selected: true, disabled: true, hidden: true }, translate('chooseDocument', this.language)), documents.map((doc) => (h("option", { selected: optionChosen == doc.code ? true : false, value: doc.code }, doc.type.replace(/([A-Z])/g, ' $1'))))), ((_a = documents.find((e) => e.code == optionChosen)) === null || _a === void 0 ? void 0 : _a.statusUploaded) ? (h("div", { class: "upload-status" }, (_b = documents.find((e) => e.code == optionChosen)) === null || _b === void 0 ? void 0 : _b.statusUploaded)) : (h("div", { class: "upload-button" }, optionChosen ? (h("label", null, h("input", { type: "file", accept: "*", multiple: true, onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }), h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))) : null)));
|
|
405
431
|
}
|
|
406
432
|
}
|
|
407
433
|
render() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as i,F as o}from"./p-1f2596d0.js";const n=["de","en","hr"];let t={en:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Account Verification",kycDescription:"We require some documents to protect your account and to comply with legal and license requirements."},de:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Account-Verifizierung",kycDescription:"Wir benötigen einige Dokumente, um Ihr Konto zu schützen und den rechtlichen und Lizenzanforderungen zu entsprechen."},ro:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Verificarea contului",kycDescription:"Avem nevoie de câteva documente pentru a proteja contul dvs. și pentru a respecta cerințele legale și de licență."},fr:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Vérification de compte",kycDescription:"Nous avons besoin de certains documents pour protéger votre compte et pour nous conformer aux exigences légales et de licence."},ar:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"التحقق من الحساب",kycDescription:"نحتاج إلى بعض الوثائق لحماية حسابك والامتثال للمتطلبات القانونية والترخيص."},hr:{loading:"Učitavanje, molimo pričekajte ...",noVerificationRequired:"Trenutačno nije potrebna provjera vašeg računa.",verificationComplete:"Provjera dovršena",verificationFailed:"Provjera nije uspjela",verificationExpired:"Provjera je istekla",fileSizeExceeded:"Premašena je maksimalna veličina datoteke. Maksimalna veličina datoteke je: 50mb",uploading:"Prijenos…",successUpload:"Vaš dokument je učitan i uskoro će biti pregledan",successUploadMultipleFiles:"Vaši su dokumenti učitani i uskoro će biti pregledani",failedUpload:"Prijenos nije uspio pokušajte ponovo",chooseDocument:"Odaberite Dokument",kycTitle:"Verifikacija računa",kycDescription:"Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva."},"pt-br":{Loading:"Carregando, espere por favor…",noVerificationRequired:"Não há necessidade de verificação para sua conta no momento",verificationComplete:"Verificação completa",verificationFailed:"Verificação de falha",verificationExpired:"A verificação expirou",fileSizeExceeded:"Tamanho máximo do arquivo excedido. O tamanho máximo do arquivo é: 50 MB",uploading:"Carregando...",successUpload:"Seu documento foi carregado e será analisado em breve",successUploadMultipleFiles:"Seus documentos foram enviados e serão revisados em breve",failedUpload:"Falha no upload do arquivo, tente novamente",chooseDocument:"Escolha um arquivo"},"es-mx":{Loading:"Cargando, espere por favor…",noVerificationRequired:"No hay verificación requerida para su cuenta al momento",verificationComplete:"Verificación completa",verificationFailed:"Verificación fallo",verificationExpired:"Verificación expiro",fileSizeExceeded:"Tamaño máximo de archivo se excedió. El tamaño máximo del archivo es: 50mb",uploading:"Cargando ...",successUpload:"Su documento ha sido cargado y será revisado en breve",successUploadMultipleFiles:"Sus documento han sido cargados y serán revisado en breve",failedUpload:"La carga del archivo falló, por favor intente de nuevo",chooseDocument:"Elija un archivo"}};const a=e=>new Promise((i=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((i=>{for(let o in e[i])t[i][o]=e[i][o]})),i(!0)}))})),r=(e,i,o)=>{const a=i;let r=t[void 0!==a&&n.includes(a)?a:"en"][e];if(void 0!==o)for(const[e,i]of Object.entries(o.values)){const o=new RegExp(`{${e}}`,"g");r=r.replace(o,i)}return r},s=class{constructor(i){e(this,i),this.userId="",this.session="",this.endpoint="",this.translationUrl="",this.clientStyling="",this.verifiedIcon="",this.failedIcon="",this.defaultIcon="",this.clientStylingUrl="",this.verificationType=[],this.isLoading=!1,this.stylingAppends=!1,this.selectedFiles=null,this.uploadSizeExceeded=!1,this.expandedOnDesktop=!1,this.scriptInjected=!1,this.MAX_UPLOAD_SIZE=5e7,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{i.innerHTML=e,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((e=>{console.log("error ",e)}))}}handleNewTranslations(){this.isLoading=!0,a(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await a(this.translationUrl)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentDidLoad(){window.innerWidth>700&&(this.expandedOnDesktop=!0);try{let e=new URL(`${this.endpoint}/v2/player/${this.userId}/verification/GetKYCCustomerStatus`);const i={method:"POST",headers:{"X-SessionId":this.session,"Content-Type":"application/json"},body:JSON.stringify({})};fetch(e.href,i).then((e=>{if(200===e.status)return e.json();throw new Error("HTTP status "+e.status)})).then((e=>{this.verificationType=e.verifications})).catch((e=>{console.error(e)}))}catch(e){console.error("Error fetching verification types:",e)}}handleOptionChange(e,i){const o=e.target;this.selectedOption=o.value,this.verificationType=this.verificationType.map((e=>(e.type===i&&(e.optionChosen=o.value),e)))}handleDocumentsStatus(e,i,o){this.verificationType=this.verificationType.map((n=>{if(n.type===e){const e=n.documents.find((e=>e.code===o));e&&(e.statusUploaded=i)}return n}))}toggleVerificationType(e,i){this.expandedOnDesktop=!1,this.verificationType=this.verificationType.map((o=>{var n;return o.type===e&&(null===(n=o.flowInfo)||void 0===n?void 0:n.type)==i&&(o.expanded=!o.expanded),o}))}checkFileSize(e){let i=0;return Object.keys(e).forEach((o=>{i+=e[o].size})),i<=this.MAX_UPLOAD_SIZE}handleFileSelection(e,i,o){if(this.selectedFiles=e,this.selectedFiles)if(this.checkFileSize(this.selectedFiles)){const e={method:"POST",headers:{"Content-Type":"application/json","X-SessionId":this.session},body:JSON.stringify({DocumentCode:i})};fetch(`${this.endpoint}/v1/player/${this.userId}/verification/GetKYCVerificationDocumentUploadUrl`,e).then((e=>{if(e.ok)return this.uploadingStatus=r("uploading",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i),e.json()})).then((e=>{const n=new FormData,t=this.selectedFiles;for(let e=0;e<t.length;e++)n.append("files",t[e]);fetch(e.Url,{method:"POST",body:n}).then((e=>{e.ok?(this.uploadingStatus=r(this.selectedFiles.length>1?"successUploadMultipleFiles":"successUpload",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i)):(this.uploadingStatus=r("failedUpload",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i),console.error("File upload error:",e.status))})).catch((e=>{console.error("File upload error:",e)}))})).catch((e=>{console.error("File upload error:",e)}))}else console.error(r("fileSizeExceeded",this.language)),this.uploadingStatus=r("fileSizeExceeded",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i),this.uploadSizeExceeded=!0}importScript(e){return new Promise(((i,o)=>{fetch(e).then((e=>e.text())).then((e=>{if(new Function(e)(),this.scriptInjected)i(!0);else{const e=document.createElement("script");e.src="https://test.insic.de/frontend3/static/js/avs-loader.min.js",document.head.appendChild(e),this.scriptInjected=!0,i(!0)}})).catch((e=>{o(e)}))}))}renderVerificationTypeBox(e){this.expandedOnDesktop&&(e.expanded=!0);let o=e.expanded,n=e.type.replace(/([A-Z])/g," $1"),t=e.optionChosen,a=e.status,r=e.documents,s=e.flowInfo;const c="Verified"===a,l="Failed"===a||"Expired"===a;return i("div",{class:`verification-box ${o?"expanded":""} ${l?"failed":""} ${c?"success":""}`},i("div",{class:"box box-header "+(o?"expanded":""),onClick:()=>{var i;return this.toggleVerificationType(e.type,null===(i=e.flowInfo)||void 0===i?void 0:i.type)}},i("div",{class:"box-icon"},i("div",null,c?this.verifiedIcon?i("img",{class:"CustomVerifiedIcon",src:this.verifiedIcon,alt:""}):i("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"#388D79"}),i("circle",{cx:"50",cy:"50",r:"34",fill:"none",stroke:"#fff","stroke-width":"12px"}),i("polyline",{points:"30,50 45,63 70,35",fill:"none",stroke:"#fff","stroke-width":"8px"})):l?this.failedIcon?i("img",{class:"CustomFailedIcon",src:this.failedIcon,alt:""}):i("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"red"}),i("line",{x1:"30",y1:"30",x2:"70",y2:"70",stroke:"#fff","stroke-width":"10px"}),i("line",{x1:"30",y1:"70",x2:"70",y2:"30",stroke:"#fff","stroke-width":"10px"})):this.defaultIcon?i("img",{class:"CustomDefaultIcon",src:this.defaultIcon,alt:""}):i("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M4 4V20C4 21.1046 4.89543 22 6 22L18 22C19.1046 22 20 21.1046 20 20V8.34162C20 7.8034 19.7831 7.28789 19.3982 6.91161L14.9579 2.56999C14.5842 2.20459 14.0824 2 13.5597 2L6 2C4.89543 2 4 2.89543 4 4Z",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M9 13H15",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M9 17H12",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M14 2V6C14 7.10457 14.8954 8 16 8H20",stroke:"#000000","stroke-width":"2","stroke-linejoin":"round"})))),i("div",{class:"box-title"},n),i("div",{class:"chevron-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:o?"M6 15l6-6 6 6":"M6 9l6 6 6-6"})))),o?this.renderExpandedContent(e,t,a,r,s,c,l):i("div",{class:"box box-content"},i("div",{id:"__avs-wrapper"})))}renderExpandedContent(e,n,t,a,s,c,l){var d,p;return"Widget"===(null==s?void 0:s.type)||"Redirect"===(null==s?void 0:s.type)&&"Manual"!==e.vendorName?i("div",null,i("hr",{style:{margin:"5px"}}),i("iframe",{src:s.url,frameborder:"0",height:"400px",width:"100%",allowfullScreen:!0})):i("div",{class:"box box-content"},i(o,null,c?i("div",{class:"verification-status"},r("verificationComplete",this.language)):l?i("div",{class:"verification-status"},r("Failed"===t?"verificationFailed":"verificationExpired",this.language)):a.length>0?i("div",{class:"documents-dropdown"},i("select",{class:"nice-select",onChange:i=>this.handleOptionChange(i,e.type)},i("option",{value:"",selected:!0,disabled:!0,hidden:!0},r("chooseDocument",this.language)),a.map((e=>i("option",{selected:n==e.code,value:e.code},e.type.replace(/([A-Z])/g," $1"))))),(null===(d=a.find((e=>e.code==n)))||void 0===d?void 0:d.statusUploaded)?i("div",{class:"upload-status"},null===(p=a.find((e=>e.code==n)))||void 0===p?void 0:p.statusUploaded):i("div",{class:"upload-button"},n?i("label",null,i("input",{type:"file",accept:"*",multiple:!0,onChange:i=>this.handleFileSelection(i.target.files,this.selectedOption,e.type),style:{display:"none"}}),i("svg",{width:"100",height:"100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))"}),i("line",{x1:"30",y1:"50",x2:"70",y2:"50",stroke:"white","stroke-width":"6"}),i("line",{x1:"50",y1:"30",x2:"50",y2:"70",stroke:"white","stroke-width":"6"}))):null)):null))}render(){return this.isLoading?i("div",null,i("p",null,r("loading",this.language))):0===this.verificationType.length?i("div",{style:{padding:"24px",fontSize:"18px"}},r("noVerificationRequired",this.language)):i("div",{class:"ModalContainer",ref:e=>this.stylingContainer=e},i("div",{class:"player-kyc-verification-widget"},i("h2",null,r("kycTitle",this.language)),i("div",{class:"widget-description"},r("kycDescription",this.language)),i("div",{class:"verification-types"},this.verificationType.map((e=>e?this.renderVerificationTypeBox(e):null)))))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};s.style=':host {\n font-family: inherit;\n}\n\nbutton, select {\n font-family: inherit;\n}\n\n.ModalContainer {\n container-type: inline-size;\n}\n\n.player-kyc-verification-widget {\n padding: 20px;\n align-items: center;\n}\n.player-kyc-verification-widget h2 {\n margin: 4px;\n}\n.player-kyc-verification-widget .widget-description {\n margin: 24px 0px;\n}\n.player-kyc-verification-widget .verification-types {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 34px;\n}\n.player-kyc-verification-widget .verification-types .verification-box {\n transition: height 0.3s, border-color 0.3s;\n border: solid 1px var(--emfe-w-color-gray-100, #E6E6E6);\n border-radius: 2px;\n display: flex;\n flex-direction: column;\n padding: 0px 14px;\n border-width: 2px 2px 8px 2px;\n align-self: start;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box {\n flex-shrink: 0;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header {\n display: flex;\n padding: 14px 0px;\n justify-content: space-between;\n cursor: pointer;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon {\n flex-grow: 1;\n display: flex;\n justify-content: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon svg {\n height: 24px;\n width: 24px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-title {\n flex-grow: 1;\n font-size: 18px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon {\n flex-grow: 10;\n width: 14px;\n height: 14px;\n display: flex;\n justify-content: flex-end;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon svg {\n width: 20px;\n height: 22px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content {\n display: none;\n flex-grow: 1;\n border-top: 0.4px solid var(--emfe-w-color-gray-100, #E6E6E6);\n padding: 10px 0px;\n flex-grow: 1;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .upload-status {\n text-align: center;\n padding: 20px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown {\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown svg {\n margin: 16px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .nice-select {\n cursor: pointer;\n width: 100%;\n height: 30px;\n padding: 4px 14px;\n font-size: 14px;\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n border-radius: 2px;\n background-color: var(--emfe-w-color-white, #FFFFFF);\n color: #333;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n padding-right: 30px;\n background-repeat: no-repeat;\n background-position: right 10px center;\n background-image: url(\'data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="%23333" d="M10 18.4l-6.5-6.5h13z"/><path fill="%23333" d="M10 1.6l6.5 6.5H3.5z"/></svg>\');\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: var(--emfe-w-color-error var(--emfe-w-color-red, #FD2839));\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content .verification-status {\n margin: 12px 0px 16px;\n font-size: 18px;\n text-align: center;\n color: var(--emfe-w-color-gray-150, #828282);\n}\n\n@container (min-width: 700px) {\n .player-kyc-verification-widget {\n padding: 100px 60px;\n }\n}\n@container (max-width: 700px) {\n .player-kyc-verification-widget h2 {\n margin: 4px;\n text-align: center;\n }\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: 1fr;\n grid-gap: 16px;\n }\n}\n@container (max-width: 1240px) and (min-width: 701px) {\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: repeat(2, 1fr);\n }\n}';export{s as player_kyc_verification}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as i}from"./p-1f2596d0.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-
|
|
1
|
+
import{p as e,b as i}from"./p-1f2596d0.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-78aa8429",[[1,"player-kyc-verification",{userId:[1,"user-id"],session:[1],language:[1],endpoint:[1],translationUrl:[1,"translation-url"],clientStyling:[1,"client-styling"],verifiedIcon:[1,"verified-icon"],failedIcon:[1,"failed-icon"],defaultIcon:[1,"default-icon"],clientStylingUrl:[1,"client-styling-url"],verificationType:[32],isLoading:[32],stylingAppends:[32],selectedFiles:[32],uploadingStatus:[32],uploadSizeExceeded:[32],selectedOption:[32],expandedOnDesktop:[32]}]]]],e)));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as i,F as t}from"./p-1f2596d0.js";const n=["de","en","hr"];let o={en:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Account Verification",kycDescription:"We require some documents to protect your account and to comply with legal and license requirements."},de:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Account-Verifizierung",kycDescription:"Wir benötigen einige Dokumente, um Ihr Konto zu schützen und den rechtlichen und Lizenzanforderungen zu entsprechen."},ro:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Verificarea contului",kycDescription:"Avem nevoie de câteva documente pentru a proteja contul dvs. și pentru a respecta cerințele legale și de licență."},fr:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Vérification de compte",kycDescription:"Nous avons besoin de certains documents pour protéger votre compte et pour nous conformer aux exigences légales et de licence."},ar:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"التحقق من الحساب",kycDescription:"نحتاج إلى بعض الوثائق لحماية حسابك والامتثال للمتطلبات القانونية والترخيص."},hr:{loading:"Učitavanje, molimo pričekajte ...",noVerificationRequired:"Trenutačno nije potrebna provjera vašeg računa.",verificationComplete:"Provjera dovršena",verificationFailed:"Provjera nije uspjela",verificationExpired:"Provjera je istekla",fileSizeExceeded:"Premašena je maksimalna veličina datoteke. Maksimalna veličina datoteke je: 50mb",uploading:"Prijenos…",successUpload:"Vaš dokument je učitan i uskoro će biti pregledan",successUploadMultipleFiles:"Vaši su dokumenti učitani i uskoro će biti pregledani",failedUpload:"Prijenos nije uspio pokušajte ponovo",chooseDocument:"Odaberite Dokument",kycTitle:"Verifikacija računa",kycDescription:"Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva."}};const a=e=>new Promise((i=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((i=>{for(let t in e[i])o[i][t]=e[i][t]})),i(!0)}))})),r=(e,i,t)=>{const a=i;let r=o[void 0!==a&&n.includes(a)?a:"en"][e];if(void 0!==t)for(const[e,i]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");r=r.replace(t,i)}return r},s=class{constructor(i){e(this,i),this.userId="",this.session="",this.endpoint="",this.translationUrl="",this.clientStyling="",this.verifiedIcon="",this.failedIcon="",this.defaultIcon="",this.clientStylingUrl="",this.verificationType=[],this.isLoading=!1,this.stylingAppends=!1,this.selectedFiles=null,this.uploadSizeExceeded=!1,this.expandedOnDesktop=!1,this.scriptInjected=!1,this.MAX_UPLOAD_SIZE=5e7,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{i.innerHTML=e,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((e=>{console.log("error ",e)}))}}handleNewTranslations(){this.isLoading=!0,a(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await a(this.translationUrl)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentDidLoad(){window.innerWidth>700&&(this.expandedOnDesktop=!0);try{let e=new URL(`${this.endpoint}/v2/player/${this.userId}/verification/GetKYCCustomerStatus`);const i={method:"POST",headers:{"X-SessionId":this.session,"Content-Type":"application/json"},body:JSON.stringify({})};fetch(e.href,i).then((e=>{if(200===e.status)return e.json();throw new Error("HTTP status "+e.status)})).then((e=>{this.verificationType=e.verifications})).catch((e=>{console.error(e)}))}catch(e){console.error("Error fetching verification types:",e)}}handleOptionChange(e,i){const t=e.target;this.selectedOption=t.value,this.verificationType=this.verificationType.map((e=>(e.type===i&&(e.optionChosen=t.value),e)))}handleDocumentsStatus(e,i,t){this.verificationType=this.verificationType.map((n=>{if(n.type===e){const e=n.documents.find((e=>e.code===t));e&&(e.statusUploaded=i)}return n}))}toggleVerificationType(e,i){this.expandedOnDesktop=!1,this.verificationType=this.verificationType.map((t=>{var n;return t.type===e&&(null===(n=t.flowInfo)||void 0===n?void 0:n.type)==i&&(t.expanded=!t.expanded),t}))}checkFileSize(e){let i=0;return Object.keys(e).forEach((t=>{i+=e[t].size})),i<=this.MAX_UPLOAD_SIZE}handleFileSelection(e,i,t){if(this.selectedFiles=e,this.selectedFiles)if(this.checkFileSize(this.selectedFiles)){const e={method:"POST",headers:{"Content-Type":"application/json","X-SessionId":this.session},body:JSON.stringify({DocumentCode:i})};fetch(`${this.endpoint}/v1/player/${this.userId}/verification/GetKYCVerificationDocumentUploadUrl`,e).then((e=>{if(e.ok)return this.uploadingStatus=r("uploading",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,i),e.json()})).then((e=>{const n=new FormData,o=this.selectedFiles;for(let e=0;e<o.length;e++)n.append("files",o[e]);fetch(e.Url,{method:"POST",body:n}).then((e=>{e.ok?(this.uploadingStatus=r(this.selectedFiles.length>1?"successUploadMultipleFiles":"successUpload",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,i)):(this.uploadingStatus=r("failedUpload",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,i),console.error("File upload error:",e.status))})).catch((e=>{console.error("File upload error:",e)}))})).catch((e=>{console.error("File upload error:",e)}))}else console.error(r("fileSizeExceeded",this.language)),this.uploadingStatus=r("fileSizeExceeded",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,i),this.uploadSizeExceeded=!0}importScript(e){return new Promise(((i,t)=>{fetch(e).then((e=>e.text())).then((e=>{if(new Function(e)(),this.scriptInjected)i(!0);else{const e=document.createElement("script");e.src="https://test.insic.de/frontend3/static/js/avs-loader.min.js",document.head.appendChild(e),this.scriptInjected=!0,i(!0)}})).catch((e=>{t(e)}))}))}renderVerificationTypeBox(e){this.expandedOnDesktop&&(e.expanded=!0);let t=e.expanded,n=e.type.replace(/([A-Z])/g," $1"),o=e.optionChosen,a=e.status,r=e.documents,s=e.flowInfo;const c="Verified"===a,l="Failed"===a||"Expired"===a;return i("div",{class:`verification-box ${t?"expanded":""} ${l?"failed":""} ${c?"success":""}`},i("div",{class:"box box-header "+(t?"expanded":""),onClick:()=>{var i;return this.toggleVerificationType(e.type,null===(i=e.flowInfo)||void 0===i?void 0:i.type)}},i("div",{class:"box-icon"},i("div",null,c?this.verifiedIcon?i("img",{class:"CustomVerifiedIcon",src:this.verifiedIcon,alt:""}):i("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"#388D79"}),i("circle",{cx:"50",cy:"50",r:"34",fill:"none",stroke:"#fff","stroke-width":"12px"}),i("polyline",{points:"30,50 45,63 70,35",fill:"none",stroke:"#fff","stroke-width":"8px"})):l?this.failedIcon?i("img",{class:"CustomFailedIcon",src:this.failedIcon,alt:""}):i("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"red"}),i("line",{x1:"30",y1:"30",x2:"70",y2:"70",stroke:"#fff","stroke-width":"10px"}),i("line",{x1:"30",y1:"70",x2:"70",y2:"30",stroke:"#fff","stroke-width":"10px"})):this.defaultIcon?i("img",{class:"CustomDefaultIcon",src:this.defaultIcon,alt:""}):i("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M4 4V20C4 21.1046 4.89543 22 6 22L18 22C19.1046 22 20 21.1046 20 20V8.34162C20 7.8034 19.7831 7.28789 19.3982 6.91161L14.9579 2.56999C14.5842 2.20459 14.0824 2 13.5597 2L6 2C4.89543 2 4 2.89543 4 4Z",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M9 13H15",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M9 17H12",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M14 2V6C14 7.10457 14.8954 8 16 8H20",stroke:"#000000","stroke-width":"2","stroke-linejoin":"round"})))),i("div",{class:"box-title"},n),i("div",{class:"chevron-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:t?"M6 15l6-6 6 6":"M6 9l6 6 6-6"})))),t?this.renderExpandedContent(e,o,a,r,s,c,l):i("div",{class:"box box-content"},i("div",{id:"__avs-wrapper"})))}renderExpandedContent(e,n,o,a,s,c,l){var d,p;return"Widget"===(null==s?void 0:s.type)||"Redirect"===(null==s?void 0:s.type)&&"Manual"!==e.vendorName?i("div",null,i("hr",{style:{margin:"5px"}}),i("iframe",{src:s.url,frameborder:"0",height:"400px",width:"100%",allowfullScreen:!0})):i("div",{class:"box box-content"},i(t,null,c?i("div",{class:"verification-status"},r("verificationComplete",this.language)):l?i("div",{class:"verification-status"},r("Failed"===o?"verificationFailed":"verificationExpired",this.language)):a.length>0?i("div",{class:"documents-dropdown"},i("select",{class:"nice-select",onChange:i=>this.handleOptionChange(i,e.type)},i("option",{value:"",selected:!0,disabled:!0,hidden:!0},r("chooseDocument",this.language)),a.map((e=>i("option",{selected:n==e.code,value:e.code},e.type.replace(/([A-Z])/g," $1"))))),(null===(d=a.find((e=>e.code==n)))||void 0===d?void 0:d.statusUploaded)?i("div",{class:"upload-status"},null===(p=a.find((e=>e.code==n)))||void 0===p?void 0:p.statusUploaded):i("div",{class:"upload-button"},n?i("label",null,i("input",{type:"file",accept:"*",multiple:!0,onChange:i=>this.handleFileSelection(i.target.files,this.selectedOption,e.type),style:{display:"none"}}),i("svg",{width:"100",height:"100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"#388D79"}),i("line",{x1:"30",y1:"50",x2:"70",y2:"50",stroke:"white","stroke-width":"6"}),i("line",{x1:"50",y1:"30",x2:"50",y2:"70",stroke:"white","stroke-width":"6"}))):null)):null))}render(){return this.isLoading?i("div",null,i("p",null,r("loading",this.language))):0===this.verificationType.length?i("div",{style:{padding:"24px",fontSize:"18px"}},r("noVerificationRequired",this.language)):i("div",{class:"ModalContainer",ref:e=>this.stylingContainer=e},i("div",{class:"player-kyc-verification-widget"},i("h2",null,r("kycTitle",this.language)),i("div",{class:"widget-description"},r("kycDescription",this.language)),i("div",{class:"verification-types"},this.verificationType.map((e=>e?this.renderVerificationTypeBox(e):null)))))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};s.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");\n:host {\n font-family: "Roboto", sans-serif;\n}\n\n.ModalContainer {\n container-type: inline-size;\n}\n\n.player-kyc-verification-widget {\n padding: 20px;\n align-items: center;\n}\n.player-kyc-verification-widget h2 {\n margin: 4px;\n}\n.player-kyc-verification-widget .widget-description {\n margin: 24px 0px;\n}\n.player-kyc-verification-widget .verification-types {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 34px;\n}\n.player-kyc-verification-widget .verification-types .verification-box {\n transition: height 0.3s, border-color 0.3s;\n border: solid 1.4px #b5b5b5;\n border-radius: 2px;\n display: flex;\n flex-direction: column;\n padding: 0px 14px;\n border-width: 2px 2px 8px 2px;\n align-self: start;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box {\n flex-shrink: 0;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header {\n display: flex;\n padding: 14px 0px;\n justify-content: space-between;\n cursor: pointer;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon {\n flex-grow: 1;\n display: flex;\n justify-content: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon svg {\n height: 24px;\n width: 24px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-title {\n flex-grow: 1;\n font-size: 18px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon {\n flex-grow: 10;\n width: 14px;\n height: 14px;\n display: flex;\n justify-content: flex-end;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon svg {\n width: 20px;\n height: 22px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content {\n display: none;\n flex-grow: 1;\n border-top: 0.4px solid #bcbcbc;\n padding: 10px 0px;\n flex-grow: 1;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .upload-status {\n text-align: center;\n padding: 20px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown {\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown svg {\n margin: 16px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .nice-select {\n cursor: pointer;\n width: 100%;\n height: 30px;\n padding: 4px 14px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 2px;\n background-color: #fff;\n color: #333;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n padding-right: 30px;\n background-repeat: no-repeat;\n background-position: right 10px center;\n background-image: url(\'data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="%23333" d="M10 18.4l-6.5-6.5h13z"/><path fill="%23333" d="M10 1.6l6.5 6.5H3.5z"/></svg>\');\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded {\n border-color: green;\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: #d42323;\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: green;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content .verification-status {\n margin: 12px 0px 16px;\n font-size: 18px;\n text-align: center;\n color: #9b9b9b;\n}\n\n@container (min-width: 700px) {\n .player-kyc-verification-widget {\n padding: 100px 60px;\n }\n}\n@container (max-width: 700px) {\n .player-kyc-verification-widget h2 {\n margin: 4px;\n text-align: center;\n }\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: 1fr;\n grid-gap: 16px;\n }\n}\n@container (max-width: 1240px) and (min-width: 701px) {\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: repeat(2, 1fr);\n }\n}';export{s as player_kyc_verification}
|