@vpdev2/metakyc-sdk 1.0.59 → 1.0.60
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/components/CreateApplicantForm.d.ts.map +1 -1
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +431 -431
- package/dist/index.js.map +1 -1
- package/dist/types/form-config.d.ts +4 -0
- package/dist/types/form-config.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var re = (e, t, n) =>
|
|
4
|
-
import
|
|
1
|
+
var vt = Object.defineProperty;
|
|
2
|
+
var kt = (e, t, n) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var re = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import wt from "axios";
|
|
5
5
|
import * as nt from "react";
|
|
6
|
-
import ge, { createContext as
|
|
7
|
-
import { jsx as r, jsxs as s, Fragment as
|
|
6
|
+
import ge, { createContext as Nt, useState as b, useMemo as Ee, useEffect as ne, useContext as St, useRef as ee, useCallback as Q, forwardRef as Ue, createElement as Qe } from "react";
|
|
7
|
+
import { jsx as r, jsxs as s, Fragment as dt } from "react/jsx-runtime";
|
|
8
8
|
import { createPortal as Ve } from "react-dom";
|
|
9
|
-
import { useForm as
|
|
9
|
+
import { useForm as Ct, Controller as Pe } from "react-hook-form";
|
|
10
10
|
import { z as Se } from "zod";
|
|
11
|
-
var G = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(G || {}), qe = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(qe || {}), xe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(xe || {}),
|
|
11
|
+
var G = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(G || {}), qe = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(qe || {}), xe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(xe || {}), At = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.RepresentativeKYC = 1] = "RepresentativeKYC", e[e.ManualRiskCriteria = 2] = "ManualRiskCriteria", e[e.UploadDocumentReview = 3] = "UploadDocumentReview", e[e.AdminReview = 4] = "AdminReview", e))(At || {}), Et = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(Et || {}), De = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(De || {}), Fe = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(Fe || {}), It = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(It || {}), Rt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(Rt || {}), fe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(fe || {}), Pt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Pt || {}), Ke = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ke || {}), Dt = /* @__PURE__ */ ((e) => (e[e.Image = 0] = "Image", e[e.Video = 1] = "Video", e[e.PDF = 2] = "PDF", e[e.OfficePDF = 3] = "OfficePDF", e[e.Custom = 4] = "Custom", e))(Dt || {}), Ft = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Ft || {}), Lt = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Lt || {}), Ie = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Decimal = 2] = "Decimal", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Ie || {}), Tt = /* @__PURE__ */ ((e) => (e[e.Text = 0] = "Text", e[e.Radio = 1] = "Radio", e[e.Checkbox = 2] = "Checkbox", e[e.Dropdown = 3] = "Dropdown", e[e.Country = 4] = "Country", e))(Tt || {}), Mt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Mt || {}), he = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(he || {}), Ot = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(Ot || {});
|
|
12
12
|
const Le = {
|
|
13
13
|
Nationality: 10,
|
|
14
14
|
Address: 20,
|
|
@@ -38,7 +38,7 @@ const Le = {
|
|
|
38
38
|
defaultLanguage: { label: "Default Language", type: "select" },
|
|
39
39
|
educationLevel: { label: "Education Level", type: "text" },
|
|
40
40
|
occupation: { label: "Occupation", type: "text" }
|
|
41
|
-
},
|
|
41
|
+
}, zt = [
|
|
42
42
|
"firstName",
|
|
43
43
|
"lastName",
|
|
44
44
|
"email",
|
|
@@ -64,7 +64,7 @@ const Le = {
|
|
|
64
64
|
{ value: "NO", label: "Norwegian" }
|
|
65
65
|
];
|
|
66
66
|
var ce = /* @__PURE__ */ ((e) => (e.Default = "default", e.Corporate = "corporate", e.Fintech = "fintech", e.Healthcare = "healthcare", e.Modern = "modern", e.Minimal = "minimal", e))(ce || {});
|
|
67
|
-
const
|
|
67
|
+
const $t = {
|
|
68
68
|
timeout: 3e4,
|
|
69
69
|
retries: 3,
|
|
70
70
|
locale: "en",
|
|
@@ -72,7 +72,7 @@ const zt = {
|
|
|
72
72
|
pattern: "host-controller"
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
class
|
|
75
|
+
class Bt {
|
|
76
76
|
constructor(t) {
|
|
77
77
|
this.config = t;
|
|
78
78
|
}
|
|
@@ -113,10 +113,10 @@ class $t {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
class Ne extends Error {
|
|
116
|
-
constructor(n, a, i, o,
|
|
116
|
+
constructor(n, a, i, o, c) {
|
|
117
117
|
super(n);
|
|
118
118
|
re(this, "response");
|
|
119
|
-
this.code = a, this.details = i, this.validationErrors = o, this.name = "MetaKYCError", this.response =
|
|
119
|
+
this.code = a, this.details = i, this.validationErrors = o, this.name = "MetaKYCError", this.response = c, Object.setPrototypeOf(this, Ne.prototype);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
class ze {
|
|
@@ -169,12 +169,12 @@ class ze {
|
|
|
169
169
|
return t instanceof Ne;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
class
|
|
172
|
+
class _t {
|
|
173
173
|
constructor(t) {
|
|
174
174
|
re(this, "axiosInstance");
|
|
175
175
|
re(this, "endpointBuilder");
|
|
176
176
|
re(this, "config");
|
|
177
|
-
this.config = {
|
|
177
|
+
this.config = { ...$t, ...t }, this.endpointBuilder = new Bt(this.config.endpoints), this.axiosInstance = wt.create({
|
|
178
178
|
baseURL: this.config.baseUrl,
|
|
179
179
|
timeout: this.config.timeout,
|
|
180
180
|
headers: {
|
|
@@ -264,7 +264,7 @@ class Bt {
|
|
|
264
264
|
return this.axiosInstance;
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
class
|
|
267
|
+
class Ht {
|
|
268
268
|
constructor(t) {
|
|
269
269
|
this.httpClient = t;
|
|
270
270
|
}
|
|
@@ -383,7 +383,7 @@ class _t {
|
|
|
383
383
|
)).result;
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
class
|
|
386
|
+
class Ut {
|
|
387
387
|
constructor(t) {
|
|
388
388
|
this.httpClient = t;
|
|
389
389
|
}
|
|
@@ -410,7 +410,7 @@ class Ht {
|
|
|
410
410
|
)).result;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
class
|
|
413
|
+
class jt {
|
|
414
414
|
constructor(t) {
|
|
415
415
|
this.httpClient = t;
|
|
416
416
|
}
|
|
@@ -438,7 +438,7 @@ class Ut {
|
|
|
438
438
|
await this.httpClient.post("UploadDocument", "ReviewUploadDocument", t);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
class
|
|
441
|
+
class qt {
|
|
442
442
|
constructor(t) {
|
|
443
443
|
this.httpClient = t;
|
|
444
444
|
}
|
|
@@ -464,7 +464,7 @@ class jt {
|
|
|
464
464
|
)).result;
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
class
|
|
467
|
+
class Kt {
|
|
468
468
|
constructor(t) {
|
|
469
469
|
this.httpClient = t;
|
|
470
470
|
}
|
|
@@ -486,7 +486,7 @@ class qt {
|
|
|
486
486
|
await this.httpClient.get("Applicant", "PassOverview", { applicantId: t });
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
class
|
|
489
|
+
class Wt {
|
|
490
490
|
constructor(t) {
|
|
491
491
|
this.httpClient = t;
|
|
492
492
|
}
|
|
@@ -521,7 +521,7 @@ class Kt {
|
|
|
521
521
|
)).result;
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
class
|
|
524
|
+
class Yt {
|
|
525
525
|
constructor(t) {
|
|
526
526
|
this.httpClient = t;
|
|
527
527
|
}
|
|
@@ -576,7 +576,7 @@ class Wt {
|
|
|
576
576
|
return this.identityCompanyRequest(n);
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
class
|
|
579
|
+
class Qt {
|
|
580
580
|
constructor(t) {
|
|
581
581
|
this.httpClient = t;
|
|
582
582
|
}
|
|
@@ -612,7 +612,7 @@ class Yt {
|
|
|
612
612
|
)).result;
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
class
|
|
615
|
+
class Gt {
|
|
616
616
|
constructor(t) {
|
|
617
617
|
this.httpClient = t;
|
|
618
618
|
}
|
|
@@ -697,7 +697,7 @@ const ue = {
|
|
|
697
697
|
textMuted: "#9ca3af"
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
},
|
|
700
|
+
}, Vt = {
|
|
701
701
|
name: "Corporate",
|
|
702
702
|
logo: {
|
|
703
703
|
url: "",
|
|
@@ -730,7 +730,7 @@ const ue = {
|
|
|
730
730
|
cardPadding: "1.5rem",
|
|
731
731
|
inputHeight: "2.5rem"
|
|
732
732
|
}
|
|
733
|
-
},
|
|
733
|
+
}, Zt = {
|
|
734
734
|
name: "Fintech",
|
|
735
735
|
logo: {
|
|
736
736
|
url: "",
|
|
@@ -763,7 +763,7 @@ const ue = {
|
|
|
763
763
|
cardPadding: "2rem",
|
|
764
764
|
inputHeight: "3rem"
|
|
765
765
|
}
|
|
766
|
-
},
|
|
766
|
+
}, Jt = {
|
|
767
767
|
name: "Healthcare",
|
|
768
768
|
logo: {
|
|
769
769
|
url: "",
|
|
@@ -805,7 +805,7 @@ const ue = {
|
|
|
805
805
|
textSecondary: "#CBD5E1"
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
|
-
},
|
|
808
|
+
}, Xt = {
|
|
809
809
|
name: "Modern",
|
|
810
810
|
logo: {
|
|
811
811
|
url: "",
|
|
@@ -838,7 +838,7 @@ const ue = {
|
|
|
838
838
|
cardPadding: "2rem",
|
|
839
839
|
inputHeight: "3rem"
|
|
840
840
|
}
|
|
841
|
-
},
|
|
841
|
+
}, er = {
|
|
842
842
|
name: "Minimal",
|
|
843
843
|
logo: {
|
|
844
844
|
url: "",
|
|
@@ -871,18 +871,18 @@ const ue = {
|
|
|
871
871
|
cardPadding: "1.25rem",
|
|
872
872
|
inputHeight: "2.25rem"
|
|
873
873
|
}
|
|
874
|
-
},
|
|
874
|
+
}, tr = {
|
|
875
875
|
[ce.Default]: ue,
|
|
876
|
-
[ce.Corporate]:
|
|
877
|
-
[ce.Fintech]:
|
|
878
|
-
[ce.Healthcare]:
|
|
879
|
-
[ce.Modern]:
|
|
880
|
-
[ce.Minimal]:
|
|
876
|
+
[ce.Corporate]: Vt,
|
|
877
|
+
[ce.Fintech]: Zt,
|
|
878
|
+
[ce.Healthcare]: Jt,
|
|
879
|
+
[ce.Modern]: Xt,
|
|
880
|
+
[ce.Minimal]: er
|
|
881
881
|
};
|
|
882
882
|
function $e(e) {
|
|
883
|
-
return
|
|
883
|
+
return tr[e] || ue;
|
|
884
884
|
}
|
|
885
|
-
class
|
|
885
|
+
class rr {
|
|
886
886
|
constructor(t) {
|
|
887
887
|
this.httpClient = t;
|
|
888
888
|
}
|
|
@@ -908,12 +908,12 @@ class tr {
|
|
|
908
908
|
try {
|
|
909
909
|
const i = typeof n.result.applicantFormPages == "string" ? JSON.parse(n.result.applicantFormPages) : n.result.applicantFormPages;
|
|
910
910
|
Array.isArray(i) && i.length > 0 && (a.applicantFormPages = i.map((o) => {
|
|
911
|
-
const
|
|
911
|
+
const c = !o._v || o._v < 4;
|
|
912
912
|
return {
|
|
913
913
|
...o,
|
|
914
914
|
fields: (o.fields || []).map((d) => ({
|
|
915
915
|
...d,
|
|
916
|
-
colSpan:
|
|
916
|
+
colSpan: c ? d.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, d.colSpan ?? 4))
|
|
917
917
|
}))
|
|
918
918
|
};
|
|
919
919
|
}));
|
|
@@ -958,7 +958,7 @@ class tr {
|
|
|
958
958
|
} : a;
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
class
|
|
961
|
+
class nr {
|
|
962
962
|
constructor() {
|
|
963
963
|
re(this, "listeners", /* @__PURE__ */ new Map());
|
|
964
964
|
}
|
|
@@ -1003,9 +1003,9 @@ class rr {
|
|
|
1003
1003
|
this.listeners.delete(t);
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
|
-
class
|
|
1006
|
+
class ar {
|
|
1007
1007
|
constructor() {
|
|
1008
|
-
re(this, "events", new
|
|
1008
|
+
re(this, "events", new nr());
|
|
1009
1009
|
re(this, "_applicantId", null);
|
|
1010
1010
|
re(this, "_progress", null);
|
|
1011
1011
|
re(this, "_error", null);
|
|
@@ -1143,7 +1143,7 @@ class nr {
|
|
|
1143
1143
|
this.events.clear();
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
|
-
class
|
|
1146
|
+
class ir {
|
|
1147
1147
|
constructor() {
|
|
1148
1148
|
re(this, "handlers", /* @__PURE__ */ new Map());
|
|
1149
1149
|
}
|
|
@@ -1184,11 +1184,11 @@ class ar {
|
|
|
1184
1184
|
return a.submitData(n);
|
|
1185
1185
|
}
|
|
1186
1186
|
}
|
|
1187
|
-
class
|
|
1188
|
-
constructor(t, n, a, i, o,
|
|
1187
|
+
class sr {
|
|
1188
|
+
constructor(t, n, a, i, o, c, d, u) {
|
|
1189
1189
|
re(this, "state");
|
|
1190
1190
|
re(this, "stepRouter");
|
|
1191
|
-
this.applicantService = t, this.questionnaireService = n, this.uploadDocumentService = a, this.appropriatenessTestService = i, this.overviewService = o, this.riskScoringService =
|
|
1191
|
+
this.applicantService = t, this.questionnaireService = n, this.uploadDocumentService = a, this.appropriatenessTestService = i, this.overviewService = o, this.riskScoringService = c, this.investorCategorizationService = u, this.state = new ar(), this.stepRouter = new ir(), this.registerStepHandlers();
|
|
1192
1192
|
}
|
|
1193
1193
|
/**
|
|
1194
1194
|
* Register all step handlers
|
|
@@ -1328,7 +1328,7 @@ class ir {
|
|
|
1328
1328
|
return this.stepRouter;
|
|
1329
1329
|
}
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1331
|
+
function ut(e, t) {
|
|
1332
1332
|
return new Promise((n, a) => {
|
|
1333
1333
|
if (t && document.getElementById(t)) {
|
|
1334
1334
|
n();
|
|
@@ -1345,7 +1345,7 @@ function sn(e) {
|
|
|
1345
1345
|
const t = document.getElementById(e);
|
|
1346
1346
|
t && t.remove();
|
|
1347
1347
|
}
|
|
1348
|
-
class
|
|
1348
|
+
class or {
|
|
1349
1349
|
constructor(t) {
|
|
1350
1350
|
re(this, "sdk", null);
|
|
1351
1351
|
re(this, "config");
|
|
@@ -1355,7 +1355,7 @@ class sr {
|
|
|
1355
1355
|
* Load Sumsub SDK
|
|
1356
1356
|
*/
|
|
1357
1357
|
async loadSDK() {
|
|
1358
|
-
await
|
|
1358
|
+
await ut(
|
|
1359
1359
|
"https://cdn.sumsub.com/websdk/v2/production/websdk.js",
|
|
1360
1360
|
"sumsub-sdk"
|
|
1361
1361
|
);
|
|
@@ -1400,7 +1400,7 @@ class sr {
|
|
|
1400
1400
|
this.sdk && this.sdk.on("idCheck.onError", t);
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
|
-
class
|
|
1403
|
+
class lr {
|
|
1404
1404
|
constructor(t) {
|
|
1405
1405
|
re(this, "sdk", null);
|
|
1406
1406
|
re(this, "config");
|
|
@@ -1410,7 +1410,7 @@ class or {
|
|
|
1410
1410
|
* Load Onfido SDK
|
|
1411
1411
|
*/
|
|
1412
1412
|
async loadSDK() {
|
|
1413
|
-
await
|
|
1413
|
+
await ut(
|
|
1414
1414
|
"https://sdk.onfido.com/v12.0.0/onfido.min.js",
|
|
1415
1415
|
"onfido-sdk"
|
|
1416
1416
|
);
|
|
@@ -1466,7 +1466,7 @@ class or {
|
|
|
1466
1466
|
this.sdk && (this.sdk.tearDown(), this.sdk = null);
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
|
-
class
|
|
1469
|
+
class cr {
|
|
1470
1470
|
constructor(t) {
|
|
1471
1471
|
re(this, "sardineContext", null);
|
|
1472
1472
|
re(this, "config");
|
|
@@ -1526,7 +1526,7 @@ class lr {
|
|
|
1526
1526
|
try {
|
|
1527
1527
|
if (await this.loadSDK(), !window._Sardine)
|
|
1528
1528
|
throw new Error("SardinAI SDK not available after loading");
|
|
1529
|
-
const t = this.getSardineHost(), { clientId: n, environment: a, flow: i, enableBiometrics: o, enablePortScanning:
|
|
1529
|
+
const t = this.getSardineHost(), { clientId: n, environment: a, flow: i, enableBiometrics: o, enablePortScanning: c } = this.config;
|
|
1530
1530
|
this.sardineContext = window._Sardine.createContext({
|
|
1531
1531
|
clientId: n,
|
|
1532
1532
|
sessionKey: this.sessionKey,
|
|
@@ -1537,7 +1537,7 @@ class lr {
|
|
|
1537
1537
|
parentElement: document.body,
|
|
1538
1538
|
enableBiometrics: o !== !1,
|
|
1539
1539
|
// Default true
|
|
1540
|
-
enablePortScanning:
|
|
1540
|
+
enablePortScanning: c === !0,
|
|
1541
1541
|
// Default false
|
|
1542
1542
|
region: this.config.region,
|
|
1543
1543
|
// Callback for device response (deprecated but kept for compatibility)
|
|
@@ -1617,11 +1617,11 @@ class Me {
|
|
|
1617
1617
|
static createProvider(t, n) {
|
|
1618
1618
|
switch (t) {
|
|
1619
1619
|
case fe.Sumsub:
|
|
1620
|
-
return new sr(n);
|
|
1621
|
-
case fe.Onfido:
|
|
1622
1620
|
return new or(n);
|
|
1623
|
-
case fe.
|
|
1621
|
+
case fe.Onfido:
|
|
1624
1622
|
return new lr(n);
|
|
1623
|
+
case fe.SardinAI:
|
|
1624
|
+
return new cr(n);
|
|
1625
1625
|
default:
|
|
1626
1626
|
throw new Error(`Unsupported identity provider: ${t}`);
|
|
1627
1627
|
}
|
|
@@ -1660,7 +1660,7 @@ class Me {
|
|
|
1660
1660
|
}
|
|
1661
1661
|
}
|
|
1662
1662
|
}
|
|
1663
|
-
class
|
|
1663
|
+
class dr {
|
|
1664
1664
|
constructor(t) {
|
|
1665
1665
|
re(this, "currentTheme", ue);
|
|
1666
1666
|
re(this, "customStyleElement", null);
|
|
@@ -1786,9 +1786,9 @@ class cr {
|
|
|
1786
1786
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1787
1787
|
}
|
|
1788
1788
|
}
|
|
1789
|
-
const
|
|
1790
|
-
const [n, a] = b(null), i = ge.useRef(!1), o = ge.useRef(!1),
|
|
1791
|
-
const u = new
|
|
1789
|
+
const mt = Nt(null), on = ({ config: e, children: t }) => {
|
|
1790
|
+
const [n, a] = b(null), i = ge.useRef(!1), o = ge.useRef(!1), c = Ee(() => {
|
|
1791
|
+
const u = new _t(e), p = new Ht(u), x = new Ut(u), N = new jt(u), m = new qt(u), y = new Kt(u), h = new Wt(u), C = new Yt(u), F = new Qt(u), k = new Gt(u), $ = new rr(u), A = new dr();
|
|
1792
1792
|
return {
|
|
1793
1793
|
httpClient: u,
|
|
1794
1794
|
applicantService: p,
|
|
@@ -1805,19 +1805,19 @@ const ut = wt(null), on = ({ config: e, children: t }) => {
|
|
|
1805
1805
|
};
|
|
1806
1806
|
}, [e]), d = Ee(() => ({
|
|
1807
1807
|
config: e,
|
|
1808
|
-
...
|
|
1808
|
+
...c,
|
|
1809
1809
|
currentTheme: n,
|
|
1810
|
-
createOrchestrator: () => new
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1810
|
+
createOrchestrator: () => new sr(
|
|
1811
|
+
c.applicantService,
|
|
1812
|
+
c.questionnaireService,
|
|
1813
|
+
c.uploadDocumentService,
|
|
1814
|
+
c.appropriatenessTestService,
|
|
1815
|
+
c.overviewService,
|
|
1816
|
+
c.riskScoringService,
|
|
1817
|
+
c.identityService,
|
|
1818
|
+
c.investorCategorizationService
|
|
1819
1819
|
)
|
|
1820
|
-
}), [e,
|
|
1820
|
+
}), [e, c, n]);
|
|
1821
1821
|
return ne(() => ((async () => {
|
|
1822
1822
|
if (i.current || o.current) {
|
|
1823
1823
|
console.log("[MetaKYC] Theme already loading or loaded, skipping...");
|
|
@@ -1826,28 +1826,28 @@ const ut = wt(null), on = ({ config: e, children: t }) => {
|
|
|
1826
1826
|
i.current = !0;
|
|
1827
1827
|
try {
|
|
1828
1828
|
if (e.theme) {
|
|
1829
|
-
console.log("[MetaKYC] Applying static theme from config"),
|
|
1829
|
+
console.log("[MetaKYC] Applying static theme from config"), c.themeManager.applyTheme(e.theme), a(c.themeManager.getCurrentTheme()), o.current = !0;
|
|
1830
1830
|
return;
|
|
1831
1831
|
}
|
|
1832
1832
|
console.log("[MetaKYC] Fetching theme from backend...");
|
|
1833
|
-
const p = await
|
|
1834
|
-
|
|
1833
|
+
const p = await c.themeService.getThemeConfiguration();
|
|
1834
|
+
c.themeManager.applyTheme(p), a(c.themeManager.getCurrentTheme()), o.current = !0, console.log("[MetaKYC] Theme loaded and applied", p);
|
|
1835
1835
|
} catch (p) {
|
|
1836
|
-
console.warn("[MetaKYC] Failed to load theme, using default:", p), a(
|
|
1836
|
+
console.warn("[MetaKYC] Failed to load theme, using default:", p), a(c.themeManager.getCurrentTheme()), o.current = !0;
|
|
1837
1837
|
} finally {
|
|
1838
1838
|
i.current = !1;
|
|
1839
1839
|
}
|
|
1840
1840
|
})(), () => {
|
|
1841
|
-
|
|
1842
|
-
}), []), /* @__PURE__ */ r(
|
|
1841
|
+
c.themeManager.cleanup();
|
|
1842
|
+
}), []), /* @__PURE__ */ r(mt.Provider, { value: d, children: t });
|
|
1843
1843
|
};
|
|
1844
1844
|
function ye() {
|
|
1845
|
-
const e =
|
|
1845
|
+
const e = St(mt);
|
|
1846
1846
|
if (!e)
|
|
1847
1847
|
throw new Error("useMetaKYC must be used within a MetaKYCProvider");
|
|
1848
1848
|
return e;
|
|
1849
1849
|
}
|
|
1850
|
-
async function
|
|
1850
|
+
async function ur(e) {
|
|
1851
1851
|
return new Promise((t, n) => {
|
|
1852
1852
|
const a = new FileReader();
|
|
1853
1853
|
a.readAsDataURL(e), a.onload = () => {
|
|
@@ -1883,14 +1883,14 @@ const Oe = {
|
|
|
1883
1883
|
APPLICANT_ID: "metakyc_applicant_id",
|
|
1884
1884
|
WORKFLOW_STATE: "metakyc_workflow_state"
|
|
1885
1885
|
};
|
|
1886
|
-
function
|
|
1886
|
+
function mr(e) {
|
|
1887
1887
|
try {
|
|
1888
1888
|
localStorage.setItem(Oe.APPLICANT_ID, e.toString());
|
|
1889
1889
|
} catch (t) {
|
|
1890
1890
|
console.warn("Failed to save applicant ID to storage:", t);
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function pr() {
|
|
1894
1894
|
try {
|
|
1895
1895
|
const e = localStorage.getItem(Oe.APPLICANT_ID);
|
|
1896
1896
|
return e ? parseInt(e, 10) : null;
|
|
@@ -1898,14 +1898,14 @@ function mr() {
|
|
|
1898
1898
|
return console.warn("Failed to retrieve applicant ID from storage:", e), null;
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
|
-
function
|
|
1901
|
+
function hr() {
|
|
1902
1902
|
try {
|
|
1903
1903
|
localStorage.removeItem(Oe.APPLICANT_ID);
|
|
1904
1904
|
} catch (e) {
|
|
1905
1905
|
console.warn("Failed to clear applicant ID from storage:", e);
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function gr(e) {
|
|
1909
1909
|
try {
|
|
1910
1910
|
localStorage.setItem(Oe.WORKFLOW_STATE, JSON.stringify(e));
|
|
1911
1911
|
} catch (t) {
|
|
@@ -1920,7 +1920,7 @@ function un() {
|
|
|
1920
1920
|
return console.warn("Failed to retrieve workflow state from storage:", e), null;
|
|
1921
1921
|
}
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1923
|
+
function yr() {
|
|
1924
1924
|
try {
|
|
1925
1925
|
localStorage.removeItem(Oe.WORKFLOW_STATE);
|
|
1926
1926
|
} catch (e) {
|
|
@@ -1928,15 +1928,15 @@ function gr() {
|
|
|
1928
1928
|
}
|
|
1929
1929
|
}
|
|
1930
1930
|
function mn() {
|
|
1931
|
-
|
|
1931
|
+
hr(), yr();
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1934
|
-
const { createOrchestrator: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [
|
|
1933
|
+
function fr(e) {
|
|
1934
|
+
const { createOrchestrator: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [c, d] = b(null), u = ee(null), p = e || pr();
|
|
1935
1935
|
ne(() => {
|
|
1936
1936
|
u.current || (u.current = t());
|
|
1937
1937
|
}, [t]), ne(() => {
|
|
1938
1938
|
var A;
|
|
1939
|
-
n && p && (
|
|
1939
|
+
n && p && (mr(p), gr({
|
|
1940
1940
|
applicantId: p,
|
|
1941
1941
|
currentStepOrder: (A = n.currentStep) == null ? void 0 : A.order,
|
|
1942
1942
|
status: n.status,
|
|
@@ -2030,7 +2030,7 @@ function yr(e) {
|
|
|
2030
2030
|
nextWorkflowKey: n == null ? void 0 : n.nextWorkflowKey,
|
|
2031
2031
|
hasWorkflowChanged: $,
|
|
2032
2032
|
isLoading: i,
|
|
2033
|
-
error:
|
|
2033
|
+
error: c,
|
|
2034
2034
|
isComplete: (n == null ? void 0 : n.status) === xe.Finished,
|
|
2035
2035
|
isOnHold: (n == null ? void 0 : n.status) === xe.OnHold,
|
|
2036
2036
|
refreshProgress: y,
|
|
@@ -2040,8 +2040,8 @@ function yr(e) {
|
|
|
2040
2040
|
orchestrator: u.current
|
|
2041
2041
|
};
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2044
|
-
const { questionnaireService: t, applicantService: n } = ye(), [a, i] = b(null), [o,
|
|
2043
|
+
function xr(e) {
|
|
2044
|
+
const { questionnaireService: t, applicantService: n } = ye(), [a, i] = b(null), [o, c] = b({}), [d, u] = b(!1), [p, x] = b(!1), [N, m] = b(null), y = ee(!1), h = ee(null), C = Q(async () => {
|
|
2045
2045
|
var k, $;
|
|
2046
2046
|
if (e) {
|
|
2047
2047
|
if (y.current) {
|
|
@@ -2063,7 +2063,7 @@ function fr(e) {
|
|
|
2063
2063
|
const R = g.text.trim().toLowerCase();
|
|
2064
2064
|
j.has(R) && (J[g.id] = j.get(R));
|
|
2065
2065
|
}
|
|
2066
|
-
|
|
2066
|
+
c(J);
|
|
2067
2067
|
}
|
|
2068
2068
|
h.current = e;
|
|
2069
2069
|
} catch (A) {
|
|
@@ -2099,8 +2099,8 @@ function fr(e) {
|
|
|
2099
2099
|
submit: F
|
|
2100
2100
|
};
|
|
2101
2101
|
}
|
|
2102
|
-
function
|
|
2103
|
-
const { uploadDocumentService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [
|
|
2102
|
+
function br(e) {
|
|
2103
|
+
const { uploadDocumentService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [c, d] = b(!1), [u, p] = b(0), [x, N] = b(null), m = ee(!1), y = ee(null), h = Q(async () => {
|
|
2104
2104
|
if (e) {
|
|
2105
2105
|
if (m.current) {
|
|
2106
2106
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
@@ -2136,7 +2136,7 @@ function xr(e) {
|
|
|
2136
2136
|
return {
|
|
2137
2137
|
uploadDocument: n,
|
|
2138
2138
|
isLoading: i,
|
|
2139
|
-
isSubmitting:
|
|
2139
|
+
isSubmitting: c,
|
|
2140
2140
|
uploadProgress: u,
|
|
2141
2141
|
error: x,
|
|
2142
2142
|
load: h,
|
|
@@ -2144,7 +2144,7 @@ function xr(e) {
|
|
|
2144
2144
|
};
|
|
2145
2145
|
}
|
|
2146
2146
|
function pn(e) {
|
|
2147
|
-
const { appropriatenessTestService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [
|
|
2147
|
+
const { appropriatenessTestService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [c, d] = b(!1), [u, p] = b(null), [x, N] = b(null), m = ee(!1), y = ee(null), h = Q(async () => {
|
|
2148
2148
|
if (e) {
|
|
2149
2149
|
if (m.current) {
|
|
2150
2150
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
@@ -2182,14 +2182,14 @@ function pn(e) {
|
|
|
2182
2182
|
test: n,
|
|
2183
2183
|
result: x,
|
|
2184
2184
|
isLoading: i,
|
|
2185
|
-
isSubmitting:
|
|
2185
|
+
isSubmitting: c,
|
|
2186
2186
|
error: u,
|
|
2187
2187
|
load: h,
|
|
2188
2188
|
submit: C
|
|
2189
2189
|
};
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2192
|
-
const { overviewService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [
|
|
2191
|
+
function vr(e) {
|
|
2192
|
+
const { overviewService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [c, d] = b(!1), [u, p] = b(null), x = ee(!1), N = ee(null), m = Q(async () => {
|
|
2193
2193
|
if (e) {
|
|
2194
2194
|
if (x.current) {
|
|
2195
2195
|
console.log("[Overview] Load already in progress, skipping...");
|
|
@@ -2224,16 +2224,16 @@ function br(e) {
|
|
|
2224
2224
|
return {
|
|
2225
2225
|
overview: n,
|
|
2226
2226
|
isLoading: i,
|
|
2227
|
-
isSubmitting:
|
|
2227
|
+
isSubmitting: c,
|
|
2228
2228
|
error: u,
|
|
2229
2229
|
load: m,
|
|
2230
2230
|
passOverview: y
|
|
2231
2231
|
};
|
|
2232
2232
|
}
|
|
2233
|
-
function
|
|
2233
|
+
function kr(e) {
|
|
2234
2234
|
const { identityService: t } = ye(), [n, a] = b(
|
|
2235
2235
|
null
|
|
2236
|
-
), [i, o] = b(!1), [
|
|
2236
|
+
), [i, o] = b(!1), [c, d] = b(null), u = ee(!1), p = Q(
|
|
2237
2237
|
async (m, y) => {
|
|
2238
2238
|
if (e) {
|
|
2239
2239
|
if (u.current) {
|
|
@@ -2310,14 +2310,14 @@ function vr(e) {
|
|
|
2310
2310
|
provider: (n == null ? void 0 : n.provider) || null,
|
|
2311
2311
|
token: (n == null ? void 0 : n.publicProviderTokenObject) || null,
|
|
2312
2312
|
isLoading: i,
|
|
2313
|
-
error:
|
|
2313
|
+
error: c,
|
|
2314
2314
|
requestIdentity: p,
|
|
2315
2315
|
requestCompanyIdentity: x,
|
|
2316
2316
|
restartIdentity: N
|
|
2317
2317
|
};
|
|
2318
2318
|
}
|
|
2319
|
-
function
|
|
2320
|
-
const { riskScoringService: t, applicantService: n } = ye(), [a, i] = b(null), [o,
|
|
2319
|
+
function wr(e) {
|
|
2320
|
+
const { riskScoringService: t, applicantService: n } = ye(), [a, i] = b(null), [o, c] = b({}), [d, u] = b(!1), [p, x] = b(!1), [N, m] = b(null), [y, h] = b(null), C = ee(!1), F = ee(null), k = Q(async () => {
|
|
2321
2321
|
var A;
|
|
2322
2322
|
if (e) {
|
|
2323
2323
|
if (C.current) {
|
|
@@ -2339,7 +2339,7 @@ function kr(e) {
|
|
|
2339
2339
|
)];
|
|
2340
2340
|
R.length > 0 && (E[g.riskCriteriaId] = R);
|
|
2341
2341
|
}
|
|
2342
|
-
|
|
2342
|
+
c(E);
|
|
2343
2343
|
}
|
|
2344
2344
|
F.current = e;
|
|
2345
2345
|
} catch (I) {
|
|
@@ -2377,16 +2377,16 @@ function kr(e) {
|
|
|
2377
2377
|
submit: $
|
|
2378
2378
|
};
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2381
|
-
const { applicantService: e, config: t } = ye(), [n, a] = b(!1), [i, o] = b(null),
|
|
2380
|
+
function Nr() {
|
|
2381
|
+
const { applicantService: e, config: t } = ye(), [n, a] = b(!1), [i, o] = b(null), c = ee(!1), d = ee(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(y) {
|
|
2382
2382
|
const h = Math.random() * 16 | 0;
|
|
2383
2383
|
return (y === "x" ? h : h & 3 | 8).toString(16);
|
|
2384
2384
|
}), p = Q(
|
|
2385
2385
|
async (y) => {
|
|
2386
2386
|
var h;
|
|
2387
|
-
if (
|
|
2387
|
+
if (c.current)
|
|
2388
2388
|
throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
|
|
2389
|
-
|
|
2389
|
+
c.current = !0, a(!0), o(null);
|
|
2390
2390
|
try {
|
|
2391
2391
|
if (y.applicantAdditionalDatas || (y.applicantAdditionalDatas = []), (h = t.identityProviders) != null && h.sardinai) {
|
|
2392
2392
|
const F = u();
|
|
@@ -2399,7 +2399,7 @@ function wr() {
|
|
|
2399
2399
|
} catch (C) {
|
|
2400
2400
|
throw o(C), C;
|
|
2401
2401
|
} finally {
|
|
2402
|
-
a(!1),
|
|
2402
|
+
a(!1), c.current = !1;
|
|
2403
2403
|
}
|
|
2404
2404
|
},
|
|
2405
2405
|
[e, t]
|
|
@@ -2458,7 +2458,7 @@ const V = ({
|
|
|
2458
2458
|
isLoading: a = !1,
|
|
2459
2459
|
disabled: i,
|
|
2460
2460
|
className: o,
|
|
2461
|
-
...
|
|
2461
|
+
...c
|
|
2462
2462
|
}) => {
|
|
2463
2463
|
const d = "inline-flex items-center justify-center rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed", u = {
|
|
2464
2464
|
primary: "bg-primary-500 text-white hover:bg-primary-600 focus:ring-primary-500",
|
|
@@ -2476,7 +2476,7 @@ const V = ({
|
|
|
2476
2476
|
{
|
|
2477
2477
|
className: oe(d, u[t], p[n], o),
|
|
2478
2478
|
disabled: i || a,
|
|
2479
|
-
...
|
|
2479
|
+
...c,
|
|
2480
2480
|
children: [
|
|
2481
2481
|
a && /* @__PURE__ */ s(
|
|
2482
2482
|
"svg",
|
|
@@ -2513,10 +2513,10 @@ const V = ({
|
|
|
2513
2513
|
}
|
|
2514
2514
|
);
|
|
2515
2515
|
}, me = Ue(
|
|
2516
|
-
({ label: e, error: t, helperText: n, leftIcon: a, rightIcon: i, className: o, ...
|
|
2516
|
+
({ label: e, error: t, helperText: n, leftIcon: a, rightIcon: i, className: o, ...c }, d) => /* @__PURE__ */ s("div", { className: "w-full", children: [
|
|
2517
2517
|
e && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
2518
2518
|
e,
|
|
2519
|
-
|
|
2519
|
+
c.required && /* @__PURE__ */ r("span", { className: "text-danger-500 ml-1", children: "*" })
|
|
2520
2520
|
] }),
|
|
2521
2521
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
2522
2522
|
a && /* @__PURE__ */ r("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: a }),
|
|
@@ -2534,7 +2534,7 @@ const V = ({
|
|
|
2534
2534
|
i ? "pr-10" : "",
|
|
2535
2535
|
o
|
|
2536
2536
|
),
|
|
2537
|
-
...
|
|
2537
|
+
...c
|
|
2538
2538
|
}
|
|
2539
2539
|
),
|
|
2540
2540
|
i && /* @__PURE__ */ r("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: i })
|
|
@@ -2632,7 +2632,7 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2632
2632
|
}
|
|
2633
2633
|
) });
|
|
2634
2634
|
}, He = Ue(
|
|
2635
|
-
({ label: e, error: t, helperText: n, options: a, placeholder: i, className: o, style:
|
|
2635
|
+
({ label: e, error: t, helperText: n, options: a, placeholder: i, className: o, style: c, ...d }, u) => /* @__PURE__ */ s("div", { className: "w-full", children: [
|
|
2636
2636
|
e && /* @__PURE__ */ s(
|
|
2637
2637
|
"label",
|
|
2638
2638
|
{
|
|
@@ -2660,7 +2660,7 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2660
2660
|
color: "var(--metakyc-text-primary, #111827)",
|
|
2661
2661
|
borderColor: t ? "var(--metakyc-error, #ef4444)" : "var(--metakyc-border, #d1d5db)",
|
|
2662
2662
|
// ring color via outline on focus
|
|
2663
|
-
...
|
|
2663
|
+
...c
|
|
2664
2664
|
},
|
|
2665
2665
|
...d,
|
|
2666
2666
|
children: [
|
|
@@ -2698,14 +2698,14 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2698
2698
|
] })
|
|
2699
2699
|
);
|
|
2700
2700
|
He.displayName = "Select";
|
|
2701
|
-
const it = 280,
|
|
2701
|
+
const it = 280, Sr = ({
|
|
2702
2702
|
label: e,
|
|
2703
2703
|
value: t,
|
|
2704
2704
|
onChange: n,
|
|
2705
2705
|
options: a,
|
|
2706
2706
|
placeholder: i = "Select...",
|
|
2707
2707
|
disabled: o = !1,
|
|
2708
|
-
required:
|
|
2708
|
+
required: c = !1
|
|
2709
2709
|
}) => {
|
|
2710
2710
|
const [d, u] = b(!1), [p, x] = b(""), [N, m] = b(null), y = ee(null), h = ee(null), C = ee(null), F = Q(() => {
|
|
2711
2711
|
if (!h.current) return null;
|
|
@@ -2854,7 +2854,7 @@ const it = 280, Nr = ({
|
|
|
2854
2854
|
style: { color: "var(--metakyc-text-primary, #374151)" },
|
|
2855
2855
|
children: [
|
|
2856
2856
|
e,
|
|
2857
|
-
|
|
2857
|
+
c && /* @__PURE__ */ r("span", { style: { color: "var(--metakyc-error, #ef4444)", marginLeft: "4px" }, children: "*" })
|
|
2858
2858
|
]
|
|
2859
2859
|
}
|
|
2860
2860
|
),
|
|
@@ -2944,7 +2944,7 @@ const it = 280, Nr = ({
|
|
|
2944
2944
|
options: a,
|
|
2945
2945
|
placeholder: i = "Select...",
|
|
2946
2946
|
value: o,
|
|
2947
|
-
onChange:
|
|
2947
|
+
onChange: c,
|
|
2948
2948
|
disabled: d = !1,
|
|
2949
2949
|
required: u = !1,
|
|
2950
2950
|
className: p
|
|
@@ -2992,7 +2992,7 @@ const it = 280, Nr = ({
|
|
|
2992
2992
|
const g = a.filter(
|
|
2993
2993
|
(S) => S.label.toLowerCase().includes(m.toLowerCase()) || S.value.toLowerCase().includes(m.toLowerCase())
|
|
2994
2994
|
), R = (D = a.find((S) => S.value === o)) == null ? void 0 : D.label, P = (S, H) => {
|
|
2995
|
-
d || H || (
|
|
2995
|
+
d || H || (c(S), J());
|
|
2996
2996
|
}, z = k.current ? getComputedStyle(k.current) : null, _ = (z == null ? void 0 : z.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", O = (z == null ? void 0 : z.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", M = (z == null ? void 0 : z.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", Z = (z == null ? void 0 : z.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", w = (z == null ? void 0 : z.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", U = (z == null ? void 0 : z.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", te = (z == null ? void 0 : z.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", B = x && h && /* @__PURE__ */ s(
|
|
2997
2997
|
"div",
|
|
2998
2998
|
{
|
|
@@ -3141,14 +3141,14 @@ const it = 280, Nr = ({
|
|
|
3141
3141
|
);
|
|
3142
3142
|
};
|
|
3143
3143
|
We.displayName = "SearchableSelect";
|
|
3144
|
-
const
|
|
3144
|
+
const Cr = ({
|
|
3145
3145
|
label: e,
|
|
3146
3146
|
error: t,
|
|
3147
3147
|
accept: n,
|
|
3148
3148
|
multiple: a = !1,
|
|
3149
3149
|
maxSize: i,
|
|
3150
3150
|
onChange: o,
|
|
3151
|
-
value:
|
|
3151
|
+
value: c = [],
|
|
3152
3152
|
className: d
|
|
3153
3153
|
}) => {
|
|
3154
3154
|
const [u, p] = b(!1), x = ee(null), N = (k) => {
|
|
@@ -3159,7 +3159,7 @@ const Sr = ({
|
|
|
3159
3159
|
alert(`Some files exceed the maximum size of ${I}`);
|
|
3160
3160
|
return;
|
|
3161
3161
|
}
|
|
3162
|
-
o == null || o(a ? [...
|
|
3162
|
+
o == null || o(a ? [...c, ...$] : [$[0]]);
|
|
3163
3163
|
}, m = (k) => {
|
|
3164
3164
|
k.preventDefault(), p(!0);
|
|
3165
3165
|
}, y = () => {
|
|
@@ -3170,7 +3170,7 @@ const Sr = ({
|
|
|
3170
3170
|
var k;
|
|
3171
3171
|
(k = x.current) == null || k.click();
|
|
3172
3172
|
}, F = (k) => {
|
|
3173
|
-
const $ =
|
|
3173
|
+
const $ = c.filter((A, I) => I !== k);
|
|
3174
3174
|
o == null || o($);
|
|
3175
3175
|
};
|
|
3176
3176
|
return /* @__PURE__ */ s("div", { className: oe("w-full", d), children: [
|
|
@@ -3230,7 +3230,7 @@ const Sr = ({
|
|
|
3230
3230
|
]
|
|
3231
3231
|
}
|
|
3232
3232
|
),
|
|
3233
|
-
|
|
3233
|
+
c.length > 0 && /* @__PURE__ */ r("div", { className: "mt-3 space-y-2", children: c.map((k, $) => /* @__PURE__ */ s(
|
|
3234
3234
|
"div",
|
|
3235
3235
|
{
|
|
3236
3236
|
className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
|
|
@@ -3283,7 +3283,7 @@ const Sr = ({
|
|
|
3283
3283
|
)) }),
|
|
3284
3284
|
t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm text-danger-500", children: t })
|
|
3285
3285
|
] });
|
|
3286
|
-
},
|
|
3286
|
+
}, Ar = Ue(
|
|
3287
3287
|
({ countryCode: e = "+1", onCountryCodeChange: t, className: n, ...a }, i) => /* @__PURE__ */ s("div", { className: "w-full", children: [
|
|
3288
3288
|
a.label && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
3289
3289
|
a.label,
|
|
@@ -3318,28 +3318,28 @@ const Sr = ({
|
|
|
3318
3318
|
a.error && /* @__PURE__ */ r("p", { className: "mt-1 text-sm text-danger-500", children: a.error })
|
|
3319
3319
|
] })
|
|
3320
3320
|
);
|
|
3321
|
-
|
|
3321
|
+
Ar.displayName = "PhoneInput";
|
|
3322
3322
|
/**
|
|
3323
3323
|
* @license lucide-react v0.574.0 - ISC
|
|
3324
3324
|
*
|
|
3325
3325
|
* This source code is licensed under the ISC license.
|
|
3326
3326
|
* See the LICENSE file in the root directory of this source tree.
|
|
3327
3327
|
*/
|
|
3328
|
-
const
|
|
3328
|
+
const pt = (...e) => e.filter((t, n, a) => !!t && t.trim() !== "" && a.indexOf(t) === n).join(" ").trim();
|
|
3329
3329
|
/**
|
|
3330
3330
|
* @license lucide-react v0.574.0 - ISC
|
|
3331
3331
|
*
|
|
3332
3332
|
* This source code is licensed under the ISC license.
|
|
3333
3333
|
* See the LICENSE file in the root directory of this source tree.
|
|
3334
3334
|
*/
|
|
3335
|
-
const
|
|
3335
|
+
const Er = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3336
3336
|
/**
|
|
3337
3337
|
* @license lucide-react v0.574.0 - ISC
|
|
3338
3338
|
*
|
|
3339
3339
|
* This source code is licensed under the ISC license.
|
|
3340
3340
|
* See the LICENSE file in the root directory of this source tree.
|
|
3341
3341
|
*/
|
|
3342
|
-
const
|
|
3342
|
+
const Ir = (e) => e.replace(
|
|
3343
3343
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
3344
3344
|
(t, n, a) => a ? a.toUpperCase() : n.toLowerCase()
|
|
3345
3345
|
);
|
|
@@ -3350,7 +3350,7 @@ const Er = (e) => e.replace(
|
|
|
3350
3350
|
* See the LICENSE file in the root directory of this source tree.
|
|
3351
3351
|
*/
|
|
3352
3352
|
const ot = (e) => {
|
|
3353
|
-
const t =
|
|
3353
|
+
const t = Ir(e);
|
|
3354
3354
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
3355
3355
|
};
|
|
3356
3356
|
/**
|
|
@@ -3359,7 +3359,7 @@ const ot = (e) => {
|
|
|
3359
3359
|
* This source code is licensed under the ISC license.
|
|
3360
3360
|
* See the LICENSE file in the root directory of this source tree.
|
|
3361
3361
|
*/
|
|
3362
|
-
var
|
|
3362
|
+
var Rr = {
|
|
3363
3363
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3364
3364
|
width: 24,
|
|
3365
3365
|
height: 24,
|
|
@@ -3376,7 +3376,7 @@ var Ir = {
|
|
|
3376
3376
|
* This source code is licensed under the ISC license.
|
|
3377
3377
|
* See the LICENSE file in the root directory of this source tree.
|
|
3378
3378
|
*/
|
|
3379
|
-
const
|
|
3379
|
+
const Pr = (e) => {
|
|
3380
3380
|
for (const t in e)
|
|
3381
3381
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
3382
3382
|
return !0;
|
|
@@ -3388,7 +3388,7 @@ const Rr = (e) => {
|
|
|
3388
3388
|
* This source code is licensed under the ISC license.
|
|
3389
3389
|
* See the LICENSE file in the root directory of this source tree.
|
|
3390
3390
|
*/
|
|
3391
|
-
const
|
|
3391
|
+
const Dr = Ue(
|
|
3392
3392
|
({
|
|
3393
3393
|
color: e = "currentColor",
|
|
3394
3394
|
size: t = 24,
|
|
@@ -3396,23 +3396,23 @@ const Pr = Ue(
|
|
|
3396
3396
|
absoluteStrokeWidth: a,
|
|
3397
3397
|
className: i = "",
|
|
3398
3398
|
children: o,
|
|
3399
|
-
iconNode:
|
|
3399
|
+
iconNode: c,
|
|
3400
3400
|
...d
|
|
3401
3401
|
}, u) => Qe(
|
|
3402
3402
|
"svg",
|
|
3403
3403
|
{
|
|
3404
3404
|
ref: u,
|
|
3405
|
-
...
|
|
3405
|
+
...Rr,
|
|
3406
3406
|
width: t,
|
|
3407
3407
|
height: t,
|
|
3408
3408
|
stroke: e,
|
|
3409
3409
|
strokeWidth: a ? Number(n) * 24 / Number(t) : n,
|
|
3410
|
-
className:
|
|
3411
|
-
...!o && !
|
|
3410
|
+
className: pt("lucide", i),
|
|
3411
|
+
...!o && !Pr(d) && { "aria-hidden": "true" },
|
|
3412
3412
|
...d
|
|
3413
3413
|
},
|
|
3414
3414
|
[
|
|
3415
|
-
...
|
|
3415
|
+
...c.map(([p, x]) => Qe(p, x)),
|
|
3416
3416
|
...Array.isArray(o) ? o : [o]
|
|
3417
3417
|
]
|
|
3418
3418
|
)
|
|
@@ -3423,13 +3423,13 @@ const Pr = Ue(
|
|
|
3423
3423
|
* This source code is licensed under the ISC license.
|
|
3424
3424
|
* See the LICENSE file in the root directory of this source tree.
|
|
3425
3425
|
*/
|
|
3426
|
-
const
|
|
3426
|
+
const ht = (e, t) => {
|
|
3427
3427
|
const n = Ue(
|
|
3428
|
-
({ className: a, ...i }, o) => Qe(
|
|
3428
|
+
({ className: a, ...i }, o) => Qe(Dr, {
|
|
3429
3429
|
ref: o,
|
|
3430
3430
|
iconNode: t,
|
|
3431
|
-
className:
|
|
3432
|
-
`lucide-${
|
|
3431
|
+
className: pt(
|
|
3432
|
+
`lucide-${Er(ot(e))}`,
|
|
3433
3433
|
`lucide-${e}`,
|
|
3434
3434
|
a
|
|
3435
3435
|
),
|
|
@@ -3444,15 +3444,15 @@ const pt = (e, t) => {
|
|
|
3444
3444
|
* This source code is licensed under the ISC license.
|
|
3445
3445
|
* See the LICENSE file in the root directory of this source tree.
|
|
3446
3446
|
*/
|
|
3447
|
-
const
|
|
3447
|
+
const Fr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], gt = ht("chevron-left", Fr);
|
|
3448
3448
|
/**
|
|
3449
3449
|
* @license lucide-react v0.574.0 - ISC
|
|
3450
3450
|
*
|
|
3451
3451
|
* This source code is licensed under the ISC license.
|
|
3452
3452
|
* See the LICENSE file in the root directory of this source tree.
|
|
3453
3453
|
*/
|
|
3454
|
-
const
|
|
3455
|
-
function
|
|
3454
|
+
const Lr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], yt = ht("chevron-right", Lr);
|
|
3455
|
+
function Tr(e, t) {
|
|
3456
3456
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
3457
3457
|
if (e.isRequired && n)
|
|
3458
3458
|
return e.errorMessage || "This field is required";
|
|
@@ -3481,9 +3481,9 @@ function Lr(e, t) {
|
|
|
3481
3481
|
}
|
|
3482
3482
|
return null;
|
|
3483
3483
|
}
|
|
3484
|
-
function
|
|
3484
|
+
function Mr(e) {
|
|
3485
3485
|
const t = e.flatMap(
|
|
3486
|
-
(a, i) => (a.questions ?? []).map((o,
|
|
3486
|
+
(a, i) => (a.questions ?? []).map((o, c) => ({ question: o, groupIndex: i, qIdx: c }))
|
|
3487
3487
|
), n = /* @__PURE__ */ new Map();
|
|
3488
3488
|
for (const a of t) {
|
|
3489
3489
|
const i = a.question.pageNumber != null && a.question.pageNumber > 0 ? a.question.pageNumber : 1;
|
|
@@ -3491,17 +3491,17 @@ function Tr(e) {
|
|
|
3491
3491
|
}
|
|
3492
3492
|
return Array.from(n.entries()).sort(([a], [i]) => a - i).map(([, a]) => a);
|
|
3493
3493
|
}
|
|
3494
|
-
const
|
|
3494
|
+
const Or = ({
|
|
3495
3495
|
applicantId: e,
|
|
3496
3496
|
onComplete: t,
|
|
3497
3497
|
onBack: n
|
|
3498
3498
|
}) => {
|
|
3499
|
-
const { questionnaire: a, initialAnswers: i, isLoading: o, isSubmitting:
|
|
3499
|
+
const { questionnaire: a, initialAnswers: i, isLoading: o, isSubmitting: c, error: d, submit: u } = xr(e), [p, x] = b({}), [N, m] = b({}), [y, h] = b(0);
|
|
3500
3500
|
ge.useEffect(() => {
|
|
3501
3501
|
i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && x(i);
|
|
3502
3502
|
}, [i]);
|
|
3503
3503
|
const C = Ee(
|
|
3504
|
-
() => a ?
|
|
3504
|
+
() => a ? Mr(a.questionGroups) : [],
|
|
3505
3505
|
[a]
|
|
3506
3506
|
), F = y === C.length - 1, k = C[y] ?? [], $ = Q((E, g) => {
|
|
3507
3507
|
x((R) => ({ ...R, [E]: g })), m((R) => {
|
|
@@ -3511,7 +3511,7 @@ const Mr = ({
|
|
|
3511
3511
|
}, []), A = Q(() => {
|
|
3512
3512
|
const E = {};
|
|
3513
3513
|
for (const { question: g } of k) {
|
|
3514
|
-
const R =
|
|
3514
|
+
const R = Tr(g, p[g.id] ?? []);
|
|
3515
3515
|
R && (E[g.id] = R);
|
|
3516
3516
|
}
|
|
3517
3517
|
return m((g) => ({ ...g, ...E })), Object.keys(E).length === 0;
|
|
@@ -3566,7 +3566,7 @@ const Mr = ({
|
|
|
3566
3566
|
] })
|
|
3567
3567
|
] }),
|
|
3568
3568
|
/* @__PURE__ */ r(W, { className: "space-y-6", children: k.map(({ question: E }) => /* @__PURE__ */ r(
|
|
3569
|
-
|
|
3569
|
+
zr,
|
|
3570
3570
|
{
|
|
3571
3571
|
question: E,
|
|
3572
3572
|
value: p[E.id] ?? [],
|
|
@@ -3584,7 +3584,7 @@ const Mr = ({
|
|
|
3584
3584
|
onClick: j,
|
|
3585
3585
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3586
3586
|
children: [
|
|
3587
|
-
/* @__PURE__ */ r(
|
|
3587
|
+
/* @__PURE__ */ r(gt, { size: 14 }),
|
|
3588
3588
|
y > 0 ? "Previous" : "Back"
|
|
3589
3589
|
]
|
|
3590
3590
|
}
|
|
@@ -3593,7 +3593,7 @@ const Mr = ({
|
|
|
3593
3593
|
V,
|
|
3594
3594
|
{
|
|
3595
3595
|
type: "button",
|
|
3596
|
-
isLoading:
|
|
3596
|
+
isLoading: c,
|
|
3597
3597
|
onClick: J,
|
|
3598
3598
|
children: "Continue"
|
|
3599
3599
|
}
|
|
@@ -3605,16 +3605,16 @@ const Mr = ({
|
|
|
3605
3605
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3606
3606
|
children: [
|
|
3607
3607
|
"Next",
|
|
3608
|
-
/* @__PURE__ */ r(
|
|
3608
|
+
/* @__PURE__ */ r(yt, { size: 14 })
|
|
3609
3609
|
]
|
|
3610
3610
|
}
|
|
3611
3611
|
)
|
|
3612
3612
|
] }),
|
|
3613
3613
|
d && /* @__PURE__ */ r("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: d.message }) })
|
|
3614
3614
|
] }) : null;
|
|
3615
|
-
},
|
|
3616
|
-
var
|
|
3617
|
-
const o = (((
|
|
3615
|
+
}, zr = ({ question: e, value: t, error: n, onChange: a }) => {
|
|
3616
|
+
var c;
|
|
3617
|
+
const o = (((c = e.defaultAnswers) == null ? void 0 : c.length) ?? 0) > 0 ? e.showAsDropdown ? e.canMultipleAnswer ? "multi-select" : "single-select" : e.canMultipleAnswer ? "checkbox" : "radio" : "text";
|
|
3618
3618
|
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
3619
3619
|
/* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
3620
3620
|
e.text,
|
|
@@ -3719,19 +3719,19 @@ const Mr = ({
|
|
|
3719
3719
|
] }),
|
|
3720
3720
|
n && o === "text" && null
|
|
3721
3721
|
] });
|
|
3722
|
-
},
|
|
3722
|
+
}, $r = ({
|
|
3723
3723
|
applicantId: e,
|
|
3724
3724
|
onComplete: t,
|
|
3725
3725
|
onBack: n
|
|
3726
3726
|
}) => {
|
|
3727
|
-
const { uploadDocument: a, isLoading: i, isSubmitting: o, error:
|
|
3727
|
+
const { uploadDocument: a, isLoading: i, isSubmitting: o, error: c, submit: d } = br(e), [u, p] = b({}), x = async (N) => {
|
|
3728
3728
|
if (N.preventDefault(), !a) return;
|
|
3729
3729
|
const m = await Promise.all(
|
|
3730
3730
|
a.uploadDocumentFiles.map(async (h) => {
|
|
3731
3731
|
const C = u[h.id] || [], F = await Promise.all(
|
|
3732
3732
|
C.map(async (k) => ({
|
|
3733
3733
|
fileName: k.name,
|
|
3734
|
-
fileData: await
|
|
3734
|
+
fileData: await ur(k)
|
|
3735
3735
|
}))
|
|
3736
3736
|
);
|
|
3737
3737
|
return {
|
|
@@ -3746,16 +3746,16 @@ const Mr = ({
|
|
|
3746
3746
|
};
|
|
3747
3747
|
await d(y), t == null || t();
|
|
3748
3748
|
};
|
|
3749
|
-
return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(be, { className: "my-8" }) }) }) :
|
|
3749
|
+
return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(be, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
|
|
3750
3750
|
"Error loading document requirements: ",
|
|
3751
|
-
|
|
3751
|
+
c.message
|
|
3752
3752
|
] }) }) }) : a ? /* @__PURE__ */ r("form", { onSubmit: x, children: /* @__PURE__ */ s(K, { children: [
|
|
3753
3753
|
/* @__PURE__ */ s(de, { children: [
|
|
3754
3754
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.displayName }),
|
|
3755
3755
|
a.subtitle && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: a.subtitle })
|
|
3756
3756
|
] }),
|
|
3757
3757
|
/* @__PURE__ */ r(W, { className: "space-y-6", children: a.uploadDocumentFiles.map((N) => /* @__PURE__ */ r(
|
|
3758
|
-
|
|
3758
|
+
Cr,
|
|
3759
3759
|
{
|
|
3760
3760
|
label: N.displayName,
|
|
3761
3761
|
accept: N.allowedTypes,
|
|
@@ -3773,13 +3773,13 @@ const Mr = ({
|
|
|
3773
3773
|
/* @__PURE__ */ r(V, { type: "submit", isLoading: o, children: "Continue" })
|
|
3774
3774
|
] })
|
|
3775
3775
|
] }) }) : null;
|
|
3776
|
-
},
|
|
3777
|
-
const { overview: a, isLoading: i, isSubmitting: o, error:
|
|
3776
|
+
}, Br = ({ applicantId: e, onComplete: t, onBack: n }) => {
|
|
3777
|
+
const { overview: a, isLoading: i, isSubmitting: o, error: c, passOverview: d } = vr(e), u = async () => {
|
|
3778
3778
|
await d(), t == null || t();
|
|
3779
3779
|
};
|
|
3780
|
-
return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(be, { className: "my-8" }) }) }) :
|
|
3780
|
+
return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(be, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
|
|
3781
3781
|
"Error loading overview: ",
|
|
3782
|
-
|
|
3782
|
+
c.message
|
|
3783
3783
|
] }) }) }) : a ? /* @__PURE__ */ s(K, { children: [
|
|
3784
3784
|
/* @__PURE__ */ s(de, { children: [
|
|
3785
3785
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.title || "Overview" }),
|
|
@@ -3810,7 +3810,7 @@ const Mr = ({
|
|
|
3810
3810
|
] })
|
|
3811
3811
|
] }) : null;
|
|
3812
3812
|
};
|
|
3813
|
-
function
|
|
3813
|
+
function _r(e, t) {
|
|
3814
3814
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
3815
3815
|
if (e.isRequired && n)
|
|
3816
3816
|
return e.errorMessage || `${e.displayName} is required`;
|
|
@@ -3840,32 +3840,32 @@ function Br(e, t) {
|
|
|
3840
3840
|
}
|
|
3841
3841
|
return null;
|
|
3842
3842
|
}
|
|
3843
|
-
function
|
|
3843
|
+
function Hr(e) {
|
|
3844
3844
|
const t = /* @__PURE__ */ new Map();
|
|
3845
3845
|
return e.forEach((n, a) => {
|
|
3846
3846
|
const i = n.pageNumber != null && n.pageNumber > 0 ? n.pageNumber : 1;
|
|
3847
3847
|
t.has(i) || t.set(i, []), t.get(i).push({ criterion: n, idx: a });
|
|
3848
3848
|
}), Array.from(t.entries()).sort(([n], [a]) => n - a).map(([, n]) => n);
|
|
3849
3849
|
}
|
|
3850
|
-
function
|
|
3850
|
+
function Ur(e) {
|
|
3851
3851
|
return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
|
|
3852
3852
|
}
|
|
3853
|
-
const
|
|
3853
|
+
const jr = ({
|
|
3854
3854
|
applicantId: e,
|
|
3855
3855
|
onComplete: t,
|
|
3856
3856
|
onBack: n
|
|
3857
3857
|
}) => {
|
|
3858
|
-
const { criteria: a, initialAnswers: i, isLoading: o, isSubmitting:
|
|
3858
|
+
const { criteria: a, initialAnswers: i, isLoading: o, isSubmitting: c, error: d, submit: u } = wr(e), [p, x] = b({}), [N, m] = b({}), [y, h] = b(0), [C, F] = b(!1);
|
|
3859
3859
|
ge.useEffect(() => {
|
|
3860
3860
|
i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && x(i);
|
|
3861
3861
|
}, [i]);
|
|
3862
3862
|
const k = Ee(
|
|
3863
|
-
() => a && a.length > 0 ?
|
|
3863
|
+
() => a && a.length > 0 ? Hr(a) : [],
|
|
3864
3864
|
[a]
|
|
3865
3865
|
), $ = y === k.length - 1, A = k[y] ?? [];
|
|
3866
3866
|
ge.useEffect(() => {
|
|
3867
|
-
!o && a && a.length === 0 && !C && !
|
|
3868
|
-
}, [o, a, C,
|
|
3867
|
+
!o && a && a.length === 0 && !C && !c && (F(!0), u({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
|
|
3868
|
+
}, [o, a, C, c, u, e, t]);
|
|
3869
3869
|
const I = Q((R, P) => {
|
|
3870
3870
|
x((z) => ({ ...z, [R]: P })), m((z) => {
|
|
3871
3871
|
const _ = { ...z };
|
|
@@ -3874,7 +3874,7 @@ const Ur = ({
|
|
|
3874
3874
|
}, []), j = Q(() => {
|
|
3875
3875
|
const R = {};
|
|
3876
3876
|
for (const { criterion: P } of A) {
|
|
3877
|
-
const z =
|
|
3877
|
+
const z = _r(P, p[P.id] ?? []);
|
|
3878
3878
|
z && (R[P.id] = z);
|
|
3879
3879
|
}
|
|
3880
3880
|
return m((P) => ({ ...P, ...R })), Object.keys(R).length === 0;
|
|
@@ -3929,7 +3929,7 @@ const Ur = ({
|
|
|
3929
3929
|
] })
|
|
3930
3930
|
] }),
|
|
3931
3931
|
/* @__PURE__ */ r(W, { className: "space-y-6", children: A.map(({ criterion: R }) => /* @__PURE__ */ r(
|
|
3932
|
-
|
|
3932
|
+
qr,
|
|
3933
3933
|
{
|
|
3934
3934
|
criterion: R,
|
|
3935
3935
|
value: p[R.id] ?? [],
|
|
@@ -3947,12 +3947,12 @@ const Ur = ({
|
|
|
3947
3947
|
onClick: E,
|
|
3948
3948
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3949
3949
|
children: [
|
|
3950
|
-
/* @__PURE__ */ r(
|
|
3950
|
+
/* @__PURE__ */ r(gt, { size: 14 }),
|
|
3951
3951
|
y > 0 ? "Previous" : "Back"
|
|
3952
3952
|
]
|
|
3953
3953
|
}
|
|
3954
3954
|
),
|
|
3955
|
-
$ ? /* @__PURE__ */ r(V, { type: "button", isLoading:
|
|
3955
|
+
$ ? /* @__PURE__ */ r(V, { type: "button", isLoading: c, onClick: g, children: "Continue" }) : /* @__PURE__ */ s(
|
|
3956
3956
|
V,
|
|
3957
3957
|
{
|
|
3958
3958
|
type: "button",
|
|
@@ -3960,15 +3960,15 @@ const Ur = ({
|
|
|
3960
3960
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3961
3961
|
children: [
|
|
3962
3962
|
"Next",
|
|
3963
|
-
/* @__PURE__ */ r(
|
|
3963
|
+
/* @__PURE__ */ r(yt, { size: 14 })
|
|
3964
3964
|
]
|
|
3965
3965
|
}
|
|
3966
3966
|
)
|
|
3967
3967
|
] }),
|
|
3968
3968
|
d && /* @__PURE__ */ r("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: d.message }) })
|
|
3969
3969
|
] }) : null;
|
|
3970
|
-
},
|
|
3971
|
-
const i =
|
|
3970
|
+
}, qr = ({ criterion: e, value: t, error: n, onChange: a }) => {
|
|
3971
|
+
const i = Ur(e), o = e.valueDataType === Ie.Integer || e.valueDataType === Ie.Decimal || e.valueDataType === Ie.DigitOnly;
|
|
3972
3972
|
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
3973
3973
|
/* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
3974
3974
|
e.displayName,
|
|
@@ -3980,20 +3980,20 @@ const Ur = ({
|
|
|
3980
3980
|
me,
|
|
3981
3981
|
{
|
|
3982
3982
|
value: t[0] ?? "",
|
|
3983
|
-
onChange: (
|
|
3983
|
+
onChange: (c) => a([c.target.value]),
|
|
3984
3984
|
type: o ? "number" : "text",
|
|
3985
3985
|
placeholder: "Enter your answer…",
|
|
3986
3986
|
error: n,
|
|
3987
3987
|
required: e.isRequired,
|
|
3988
3988
|
min: e.min,
|
|
3989
3989
|
max: e.max,
|
|
3990
|
-
onKeyDown: (
|
|
3991
|
-
e.valueDataType === Ie.DigitOnly && ["e", "E", "+", "-", "."].includes(
|
|
3990
|
+
onKeyDown: (c) => {
|
|
3991
|
+
e.valueDataType === Ie.DigitOnly && ["e", "E", "+", "-", "."].includes(c.key) && c.preventDefault();
|
|
3992
3992
|
}
|
|
3993
3993
|
}
|
|
3994
3994
|
),
|
|
3995
3995
|
i === "radio" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
3996
|
-
(e.defaultValues ?? []).map((
|
|
3996
|
+
(e.defaultValues ?? []).map((c) => /* @__PURE__ */ s(
|
|
3997
3997
|
"label",
|
|
3998
3998
|
{
|
|
3999
3999
|
className: "metakyc-option-label",
|
|
@@ -4003,8 +4003,8 @@ const Ur = ({
|
|
|
4003
4003
|
"input",
|
|
4004
4004
|
{
|
|
4005
4005
|
type: "radio",
|
|
4006
|
-
checked: t[0] ===
|
|
4007
|
-
onChange: () => a([
|
|
4006
|
+
checked: t[0] === c,
|
|
4007
|
+
onChange: () => a([c]),
|
|
4008
4008
|
className: "metakyc-option-input",
|
|
4009
4009
|
style: {
|
|
4010
4010
|
width: "16px",
|
|
@@ -4021,15 +4021,15 @@ const Ur = ({
|
|
|
4021
4021
|
}
|
|
4022
4022
|
}
|
|
4023
4023
|
),
|
|
4024
|
-
/* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children:
|
|
4024
|
+
/* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: c })
|
|
4025
4025
|
]
|
|
4026
4026
|
},
|
|
4027
|
-
|
|
4027
|
+
c
|
|
4028
4028
|
)),
|
|
4029
4029
|
n && /* @__PURE__ */ r("p", { className: "text-sm text-danger-500", children: n })
|
|
4030
4030
|
] }),
|
|
4031
4031
|
i === "checkbox" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
4032
|
-
(e.defaultValues ?? []).map((
|
|
4032
|
+
(e.defaultValues ?? []).map((c) => /* @__PURE__ */ s(
|
|
4033
4033
|
"label",
|
|
4034
4034
|
{
|
|
4035
4035
|
className: "metakyc-option-label",
|
|
@@ -4039,9 +4039,9 @@ const Ur = ({
|
|
|
4039
4039
|
"input",
|
|
4040
4040
|
{
|
|
4041
4041
|
type: "checkbox",
|
|
4042
|
-
checked: t.includes(
|
|
4042
|
+
checked: t.includes(c),
|
|
4043
4043
|
onChange: (d) => {
|
|
4044
|
-
d.target.checked ? a([...t,
|
|
4044
|
+
d.target.checked ? a([...t, c]) : a(t.filter((u) => u !== c));
|
|
4045
4045
|
},
|
|
4046
4046
|
className: "metakyc-option-input",
|
|
4047
4047
|
style: {
|
|
@@ -4059,10 +4059,10 @@ const Ur = ({
|
|
|
4059
4059
|
}
|
|
4060
4060
|
}
|
|
4061
4061
|
),
|
|
4062
|
-
/* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children:
|
|
4062
|
+
/* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: c })
|
|
4063
4063
|
]
|
|
4064
4064
|
},
|
|
4065
|
-
|
|
4065
|
+
c
|
|
4066
4066
|
)),
|
|
4067
4067
|
n && /* @__PURE__ */ r("p", { className: "text-sm text-danger-500", children: n })
|
|
4068
4068
|
] }),
|
|
@@ -4070,7 +4070,7 @@ const Ur = ({
|
|
|
4070
4070
|
He,
|
|
4071
4071
|
{
|
|
4072
4072
|
value: t[0] ?? "",
|
|
4073
|
-
onChange: (
|
|
4073
|
+
onChange: (c) => a([c.target.value]),
|
|
4074
4074
|
options: [
|
|
4075
4075
|
{ value: "US", label: "United States" },
|
|
4076
4076
|
{ value: "GB", label: "United Kingdom" },
|
|
@@ -4084,12 +4084,12 @@ const Ur = ({
|
|
|
4084
4084
|
}
|
|
4085
4085
|
)
|
|
4086
4086
|
] });
|
|
4087
|
-
},
|
|
4087
|
+
}, Kr = ({
|
|
4088
4088
|
applicantId: e,
|
|
4089
4089
|
onComplete: t,
|
|
4090
4090
|
onBack: n
|
|
4091
4091
|
}) => {
|
|
4092
|
-
const { investorCategorizationService: a } = ye(), [i, o] = b(null), [
|
|
4092
|
+
const { investorCategorizationService: a } = ye(), [i, o] = b(null), [c, d] = b(!1), [u, p] = b(null);
|
|
4093
4093
|
return /* @__PURE__ */ r("form", { onSubmit: async (N) => {
|
|
4094
4094
|
if (N.preventDefault(), i === null) {
|
|
4095
4095
|
p("Please select an investor type");
|
|
@@ -4215,19 +4215,19 @@ const Ur = ({
|
|
|
4215
4215
|
V,
|
|
4216
4216
|
{
|
|
4217
4217
|
type: "submit",
|
|
4218
|
-
isLoading:
|
|
4218
|
+
isLoading: c,
|
|
4219
4219
|
disabled: i === null,
|
|
4220
4220
|
children: "Submit"
|
|
4221
4221
|
}
|
|
4222
4222
|
)
|
|
4223
4223
|
] })
|
|
4224
4224
|
] }) });
|
|
4225
|
-
},
|
|
4225
|
+
}, Wr = ({
|
|
4226
4226
|
applicantId: e,
|
|
4227
4227
|
onComplete: t,
|
|
4228
4228
|
onBack: n
|
|
4229
4229
|
}) => {
|
|
4230
|
-
const { appropriatenessTestService: a } = ye(), [i, o] = b(null), [
|
|
4230
|
+
const { appropriatenessTestService: a } = ye(), [i, o] = b(null), [c, d] = b(!0), [u, p] = b(!1), [x, N] = b(null), [m, y] = b({}), [h, C] = b(0), [F, k] = b(!1), [$, A] = b(!1), [I, j] = b(0);
|
|
4231
4231
|
ne(() => {
|
|
4232
4232
|
(async () => {
|
|
4233
4233
|
try {
|
|
@@ -4329,7 +4329,7 @@ const Ur = ({
|
|
|
4329
4329
|
Failed to reload test data. Please refresh the page.`);
|
|
4330
4330
|
}
|
|
4331
4331
|
};
|
|
4332
|
-
if (
|
|
4332
|
+
if (c)
|
|
4333
4333
|
return /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
|
|
4334
4334
|
/* @__PURE__ */ r(be, { className: "my-8" }),
|
|
4335
4335
|
/* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
|
|
@@ -4504,13 +4504,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4504
4504
|
)
|
|
4505
4505
|
] })
|
|
4506
4506
|
] });
|
|
4507
|
-
},
|
|
4507
|
+
}, Yr = ({
|
|
4508
4508
|
applicantId: e,
|
|
4509
4509
|
onComplete: t,
|
|
4510
4510
|
onBack: n
|
|
4511
4511
|
}) => {
|
|
4512
4512
|
var Z, w, U, te;
|
|
4513
|
-
const { applicantService: a, baseInformationService: i, config: o } = ye(), { identityData:
|
|
4513
|
+
const { applicantService: a, baseInformationService: i, config: o } = ye(), { identityData: c, provider: d, token: u, isLoading: p, error: x, requestIdentity: N, restartIdentity: m } = kr(e), [y, h] = b(null), [C, F] = b(null), [k, $] = b([]), [A, I] = b(!0), [j, J] = b(!1), [E, g] = b(null), [R, P] = b(!1), z = ge.useRef(!1), _ = Ct({
|
|
4514
4514
|
defaultValues: {
|
|
4515
4515
|
street: "",
|
|
4516
4516
|
streetNumber: "",
|
|
@@ -4558,8 +4558,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4558
4558
|
}
|
|
4559
4559
|
})();
|
|
4560
4560
|
}, [e]), ne(() => {
|
|
4561
|
-
|
|
4562
|
-
}, [
|
|
4561
|
+
c && !j && (console.log("[Identity] Identity data already loaded, showing provider"), J(!0));
|
|
4562
|
+
}, [c, j]), ne(() => {
|
|
4563
4563
|
if (u) {
|
|
4564
4564
|
if (u.expiresAt) {
|
|
4565
4565
|
const B = new Date(u.expiresAt).getTime();
|
|
@@ -4716,7 +4716,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4716
4716
|
/* @__PURE__ */ r(V, { type: "button", onClick: M, disabled: p, children: p ? "Restarting..." : "Restart Verification" })
|
|
4717
4717
|
] })
|
|
4718
4718
|
] });
|
|
4719
|
-
if (j &&
|
|
4719
|
+
if (j && c) {
|
|
4720
4720
|
const B = d;
|
|
4721
4721
|
return u != null && u.url ? /* @__PURE__ */ s(K, { children: [
|
|
4722
4722
|
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
@@ -5040,14 +5040,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5040
5040
|
] }),
|
|
5041
5041
|
/* @__PURE__ */ s(pe, { className: "flex justify-center gap-4", children: [
|
|
5042
5042
|
d.type === "success" && i && /* @__PURE__ */ r(V, { onClick: i, size: "lg", children: "Continue" }),
|
|
5043
|
-
d.type === "error" && /* @__PURE__ */ s(
|
|
5043
|
+
d.type === "error" && /* @__PURE__ */ s(dt, { children: [
|
|
5044
5044
|
o && /* @__PURE__ */ r(V, { variant: "outline", onClick: o, children: "Contact Support" }),
|
|
5045
5045
|
i && /* @__PURE__ */ r(V, { onClick: i, children: "Try Again" })
|
|
5046
5046
|
] }),
|
|
5047
5047
|
d.type === "pending" && /* @__PURE__ */ r("div", { className: "text-center", children: /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
|
|
5048
5048
|
] })
|
|
5049
5049
|
] });
|
|
5050
|
-
},
|
|
5050
|
+
}, Qr = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ r("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ r(
|
|
5051
5051
|
"img",
|
|
5052
5052
|
{
|
|
5053
5053
|
src: e.url,
|
|
@@ -5067,11 +5067,11 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5067
5067
|
subtitle: t,
|
|
5068
5068
|
className: n = ""
|
|
5069
5069
|
}) => {
|
|
5070
|
-
const { currentTheme: a } = ye(), i = e || (a == null ? void 0 : a.title) || "", o = !!(a != null && a.logo && a.logo.visible && a.logo.url),
|
|
5071
|
-
return !o && !
|
|
5070
|
+
const { currentTheme: a } = ye(), i = e || (a == null ? void 0 : a.title) || "", o = !!(a != null && a.logo && a.logo.visible && a.logo.url), c = !!i;
|
|
5071
|
+
return !o && !c ? null : /* @__PURE__ */ s("div", { className: `metakyc-header ${n}`, children: [
|
|
5072
5072
|
/* @__PURE__ */ s("div", { className: "metakyc-header-title flex items-center text-xl font-bold text-gray-900 dark:text-white", children: [
|
|
5073
|
-
o && /* @__PURE__ */ r(
|
|
5074
|
-
o &&
|
|
5073
|
+
o && /* @__PURE__ */ r(Qr, { config: a.logo }),
|
|
5074
|
+
o && c && /* @__PURE__ */ r(
|
|
5075
5075
|
"span",
|
|
5076
5076
|
{
|
|
5077
5077
|
className: "text-gray-400 dark:text-gray-500 mx-3",
|
|
@@ -5079,7 +5079,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5079
5079
|
children: "|"
|
|
5080
5080
|
}
|
|
5081
5081
|
),
|
|
5082
|
-
|
|
5082
|
+
c && /* @__PURE__ */ r("span", { children: i })
|
|
5083
5083
|
] }),
|
|
5084
5084
|
t && /* @__PURE__ */ r("p", { className: "text-sm text-gray-600 dark:text-gray-400 mt-1", children: t })
|
|
5085
5085
|
] });
|
|
@@ -5099,9 +5099,9 @@ const _e = {
|
|
|
5099
5099
|
padding: 0,
|
|
5100
5100
|
display: "inline-block",
|
|
5101
5101
|
verticalAlign: "middle"
|
|
5102
|
-
},
|
|
5102
|
+
}, ct = ({ helpText: e, children: t }) => {
|
|
5103
5103
|
const [n, a] = ge.useState(!1);
|
|
5104
|
-
if (!e) return /* @__PURE__ */ r(
|
|
5104
|
+
if (!e) return /* @__PURE__ */ r(dt, { children: t });
|
|
5105
5105
|
const i = n ? /* @__PURE__ */ r(
|
|
5106
5106
|
"div",
|
|
5107
5107
|
{
|
|
@@ -5221,35 +5221,35 @@ const _e = {
|
|
|
5221
5221
|
onCancel: a
|
|
5222
5222
|
}) => {
|
|
5223
5223
|
var Je, Xe, et, tt;
|
|
5224
|
-
const { config: i, baseInformationService: o, currentTheme:
|
|
5224
|
+
const { config: i, baseInformationService: o, currentTheme: c } = ye(), { createApplicant: d, isLoading: u } = Nr(), p = e || ((Je = i.applicantForm) == null ? void 0 : Je.workflowKey);
|
|
5225
5225
|
if (!p)
|
|
5226
5226
|
throw new Error(
|
|
5227
5227
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
5228
5228
|
);
|
|
5229
5229
|
const x = t || ((Xe = i.applicantForm) == null ? void 0 : Xe.externalRefId) || "", N = ((et = i.applicantForm) == null ? void 0 : et.email) || "", m = Ee(
|
|
5230
|
-
() =>
|
|
5231
|
-
[
|
|
5230
|
+
() => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
|
|
5231
|
+
[c == null ? void 0 : c.applicantFormPages]
|
|
5232
5232
|
), y = Ee(() => {
|
|
5233
|
-
const
|
|
5234
|
-
if (T) for (const L of T)
|
|
5233
|
+
const l = new Set(je), T = c == null ? void 0 : c.applicantFormRequiredFields;
|
|
5234
|
+
if (T) for (const L of T) l.add(L);
|
|
5235
5235
|
if (m)
|
|
5236
5236
|
for (const L of m)
|
|
5237
5237
|
for (const f of L.fields)
|
|
5238
|
-
!f.isCustom && f.name && f.required &&
|
|
5239
|
-
return Array.from(
|
|
5240
|
-
}, [
|
|
5238
|
+
!f.isCustom && f.name && f.required && l.add(f.name);
|
|
5239
|
+
return Array.from(l);
|
|
5240
|
+
}, [c == null ? void 0 : c.applicantFormRequiredFields, m]), h = Ee(() => {
|
|
5241
5241
|
var L;
|
|
5242
5242
|
if (m) {
|
|
5243
5243
|
const f = m.flatMap((q) => q.fields).filter((q) => !q.isCustom && q.name).map((q) => q.name), v = new Set(f);
|
|
5244
5244
|
for (const q of je) v.add(q);
|
|
5245
5245
|
return Array.from(v);
|
|
5246
5246
|
}
|
|
5247
|
-
let
|
|
5248
|
-
(L = i.applicantForm) != null && L.visibleFields ?
|
|
5249
|
-
const T = new Set(
|
|
5247
|
+
let l;
|
|
5248
|
+
(L = i.applicantForm) != null && L.visibleFields ? l = i.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? l = c.applicantFormVisibleFields : l = zt;
|
|
5249
|
+
const T = new Set(l);
|
|
5250
5250
|
for (const f of je) T.add(f);
|
|
5251
5251
|
return Array.from(T);
|
|
5252
|
-
}, [(tt = i.applicantForm) == null ? void 0 : tt.visibleFields,
|
|
5252
|
+
}, [(tt = i.applicantForm) == null ? void 0 : tt.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields, m]), C = /* @__PURE__ */ new Set([
|
|
5253
5253
|
"country",
|
|
5254
5254
|
"nationality",
|
|
5255
5255
|
"taxCountry",
|
|
@@ -5258,30 +5258,30 @@ const _e = {
|
|
|
5258
5258
|
"otherNationality"
|
|
5259
5259
|
]), F = Ee(() => {
|
|
5260
5260
|
var T, L;
|
|
5261
|
-
const
|
|
5261
|
+
const l = /* @__PURE__ */ new Set();
|
|
5262
5262
|
if (m)
|
|
5263
5263
|
for (const f of m)
|
|
5264
5264
|
for (const v of f.fields)
|
|
5265
|
-
!v.isCustom && v.name && C.has(v.name) &&
|
|
5265
|
+
!v.isCustom && v.name && C.has(v.name) && l.add(v.countriesType ?? ((T = Te[v.name]) == null ? void 0 : T.countriesType));
|
|
5266
5266
|
else
|
|
5267
5267
|
for (const f of h)
|
|
5268
|
-
C.has(f) &&
|
|
5269
|
-
return
|
|
5268
|
+
C.has(f) && l.add((L = Te[f]) == null ? void 0 : L.countriesType);
|
|
5269
|
+
return l.size === 0 && l.add(void 0), Array.from(l);
|
|
5270
5270
|
}, [h, m]), [k, $] = b({}), [A, I] = b(!0), j = ee(!1), J = ee(/* @__PURE__ */ new Set());
|
|
5271
5271
|
ne(() => {
|
|
5272
5272
|
if (j.current || F.length === 0) return;
|
|
5273
|
-
const
|
|
5273
|
+
const l = F.filter((L) => {
|
|
5274
5274
|
const f = L != null ? String(L) : "all";
|
|
5275
5275
|
return !J.current.has(f);
|
|
5276
5276
|
});
|
|
5277
|
-
if (
|
|
5277
|
+
if (l.length === 0) {
|
|
5278
5278
|
I(!1);
|
|
5279
5279
|
return;
|
|
5280
5280
|
}
|
|
5281
5281
|
j.current = !0, I(!0), (async () => {
|
|
5282
5282
|
try {
|
|
5283
5283
|
const L = await Promise.all(
|
|
5284
|
-
|
|
5284
|
+
l.map(async (f) => {
|
|
5285
5285
|
const v = f != null ? String(f) : "all", q = await o.getCountries("", i.locale || "en", f), ae = /* @__PURE__ */ new Set(), ie = q.map((se) => ({ value: se.abbreviation3 || se.abbreviation, label: se.name })).filter((se) => !se.value || ae.has(se.value) ? !1 : (ae.add(se.value), !0));
|
|
5286
5286
|
return J.current.add(v), [v, ie];
|
|
5287
5287
|
})
|
|
@@ -5294,9 +5294,9 @@ const _e = {
|
|
|
5294
5294
|
}
|
|
5295
5295
|
})();
|
|
5296
5296
|
}, [F]);
|
|
5297
|
-
const E = (
|
|
5297
|
+
const E = (l, T) => {
|
|
5298
5298
|
var v;
|
|
5299
|
-
const L = T ?? ((v = Te[
|
|
5299
|
+
const L = T ?? ((v = Te[l]) == null ? void 0 : v.countriesType), f = L != null ? String(L) : "all";
|
|
5300
5300
|
return k[f] || [];
|
|
5301
5301
|
}, [g, R] = b({
|
|
5302
5302
|
workflowKey: p,
|
|
@@ -5323,10 +5323,10 @@ const _e = {
|
|
|
5323
5323
|
educationLevel: "",
|
|
5324
5324
|
occupation: "",
|
|
5325
5325
|
taxNumber: ""
|
|
5326
|
-
}), [P, z] = b({}), [_, O] = b(0), [M, Z] = b({}), [w, U] = b(null), [te, B] = b(!1), D = (
|
|
5326
|
+
}), [P, z] = b({}), [_, O] = b(0), [M, Z] = b({}), [w, U] = b(null), [te, B] = b(!1), D = (l, T) => R((L) => ({ ...L, [l]: T })), S = (l, T) => z((L) => ({ ...L, [l]: T })), H = (l) => !l.conditionalOn || P[l.conditionalOn] === "true", X = m && _ < m.length - 1 ? _ + 1 : -1, Y = m && _ > 0 ? _ - 1 : -1, we = (l) => {
|
|
5327
5327
|
var L;
|
|
5328
5328
|
const T = {};
|
|
5329
|
-
for (const f of
|
|
5329
|
+
for (const f of l.fields)
|
|
5330
5330
|
if (f.isCustom) {
|
|
5331
5331
|
if (f.customType === "paragraph" || f.customType === "br" || f.customType === "link") continue;
|
|
5332
5332
|
if (f.required && f.paramName) {
|
|
@@ -5343,12 +5343,12 @@ const _e = {
|
|
|
5343
5343
|
return T;
|
|
5344
5344
|
}, ve = async () => {
|
|
5345
5345
|
if (!m) return;
|
|
5346
|
-
const
|
|
5347
|
-
if (
|
|
5346
|
+
const l = m[_];
|
|
5347
|
+
if (l.conditionalOn && !H(l)) {
|
|
5348
5348
|
Z({}), X >= 0 ? O(X) : await Ce();
|
|
5349
5349
|
return;
|
|
5350
5350
|
}
|
|
5351
|
-
const T = we(
|
|
5351
|
+
const T = we(l);
|
|
5352
5352
|
if (Object.keys(T).length > 0) {
|
|
5353
5353
|
Z(T);
|
|
5354
5354
|
return;
|
|
@@ -5356,11 +5356,11 @@ const _e = {
|
|
|
5356
5356
|
Z({}), X >= 0 ? O(X) : await Ce();
|
|
5357
5357
|
}, Ce = async () => {
|
|
5358
5358
|
if (m) {
|
|
5359
|
-
let
|
|
5359
|
+
let l = {};
|
|
5360
5360
|
for (const T of m)
|
|
5361
|
-
H(T) && (
|
|
5362
|
-
if (Object.keys(
|
|
5363
|
-
Z(
|
|
5361
|
+
H(T) && (l = { ...l, ...we(T) });
|
|
5362
|
+
if (Object.keys(l).length > 0) {
|
|
5363
|
+
Z(l);
|
|
5364
5364
|
return;
|
|
5365
5365
|
}
|
|
5366
5366
|
}
|
|
@@ -5370,7 +5370,7 @@ const _e = {
|
|
|
5370
5370
|
U("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
|
|
5371
5371
|
return;
|
|
5372
5372
|
}
|
|
5373
|
-
const
|
|
5373
|
+
const l = {
|
|
5374
5374
|
workflowKey: g.workflowKey,
|
|
5375
5375
|
externalRefId: g.externalRefId.trim()
|
|
5376
5376
|
};
|
|
@@ -5380,19 +5380,19 @@ const _e = {
|
|
|
5380
5380
|
for (const v of f.fields)
|
|
5381
5381
|
if (!v.isCustom && v.name) {
|
|
5382
5382
|
const q = v.name, ae = g[q];
|
|
5383
|
-
Be(ae) || (
|
|
5383
|
+
Be(ae) || (l[q] = ae);
|
|
5384
5384
|
}
|
|
5385
5385
|
}
|
|
5386
5386
|
for (const f of je)
|
|
5387
|
-
if (
|
|
5387
|
+
if (l[f] === void 0) {
|
|
5388
5388
|
const v = g[f];
|
|
5389
|
-
Be(v) || (
|
|
5389
|
+
Be(v) || (l[f] = v);
|
|
5390
5390
|
}
|
|
5391
5391
|
} else
|
|
5392
5392
|
h.forEach((f) => {
|
|
5393
5393
|
if (f === "externalRefId") return;
|
|
5394
5394
|
const v = g[f];
|
|
5395
|
-
Be(v) || (
|
|
5395
|
+
Be(v) || (l[f] = v);
|
|
5396
5396
|
});
|
|
5397
5397
|
const T = [];
|
|
5398
5398
|
if (m) {
|
|
@@ -5405,17 +5405,17 @@ const _e = {
|
|
|
5405
5405
|
}
|
|
5406
5406
|
}
|
|
5407
5407
|
}
|
|
5408
|
-
T.length > 0 && (
|
|
5409
|
-
const L = await d(
|
|
5408
|
+
T.length > 0 && (l.applicantAdditionalDatas = T);
|
|
5409
|
+
const L = await d(l);
|
|
5410
5410
|
n(L.applicantId);
|
|
5411
|
-
} catch (
|
|
5412
|
-
console.error("Error creating applicant:",
|
|
5411
|
+
} catch (l) {
|
|
5412
|
+
console.error("Error creating applicant:", l), U(l.message || "Failed to create applicant");
|
|
5413
5413
|
} finally {
|
|
5414
5414
|
B(!1);
|
|
5415
5415
|
}
|
|
5416
|
-
},
|
|
5416
|
+
}, ft = async (l) => {
|
|
5417
5417
|
var T;
|
|
5418
|
-
|
|
5418
|
+
l.preventDefault();
|
|
5419
5419
|
for (const L of y)
|
|
5420
5420
|
if (Be(g[L])) {
|
|
5421
5421
|
const f = ((T = Te[L]) == null ? void 0 : T.label) || L;
|
|
@@ -5423,22 +5423,22 @@ const _e = {
|
|
|
5423
5423
|
return;
|
|
5424
5424
|
}
|
|
5425
5425
|
await Ce();
|
|
5426
|
-
}, Ze = (
|
|
5426
|
+
}, Ze = (l, T, L, f) => {
|
|
5427
5427
|
var rt;
|
|
5428
|
-
const v = Te[
|
|
5428
|
+
const v = Te[l];
|
|
5429
5429
|
if (!v) return null;
|
|
5430
|
-
const q = y.includes(
|
|
5430
|
+
const q = y.includes(l), ae = M[l], ie = L || v.label, se = T ?? l, ke = { required: q };
|
|
5431
5431
|
switch (v.type) {
|
|
5432
5432
|
case "select":
|
|
5433
|
-
if (
|
|
5434
|
-
const le = E(
|
|
5433
|
+
if (l === "country" || l === "nationality" || l === "taxCountry" || l === "countryOfBirth" || l === "mobileCountryCode") {
|
|
5434
|
+
const le = E(l, f);
|
|
5435
5435
|
return /* @__PURE__ */ r(
|
|
5436
5436
|
We,
|
|
5437
5437
|
{
|
|
5438
5438
|
...ke,
|
|
5439
5439
|
label: ie,
|
|
5440
|
-
value: g[
|
|
5441
|
-
onChange: (Re) => D(
|
|
5440
|
+
value: g[l] || "",
|
|
5441
|
+
onChange: (Re) => D(l, Re),
|
|
5442
5442
|
options: [{ value: "", label: `Select ${ie.toLowerCase()}...` }, ...le],
|
|
5443
5443
|
disabled: A,
|
|
5444
5444
|
error: ae
|
|
@@ -5446,14 +5446,14 @@ const _e = {
|
|
|
5446
5446
|
se
|
|
5447
5447
|
);
|
|
5448
5448
|
}
|
|
5449
|
-
if (
|
|
5449
|
+
if (l === "salutation")
|
|
5450
5450
|
return /* @__PURE__ */ r(
|
|
5451
5451
|
We,
|
|
5452
5452
|
{
|
|
5453
5453
|
...ke,
|
|
5454
5454
|
label: ie,
|
|
5455
|
-
value: ((rt = g[
|
|
5456
|
-
onChange: (le) => D(
|
|
5455
|
+
value: ((rt = g[l]) == null ? void 0 : rt.toString()) || "",
|
|
5456
|
+
onChange: (le) => D(l, le ? Number(le) : null),
|
|
5457
5457
|
options: [
|
|
5458
5458
|
{ value: "", label: "Select salutation..." },
|
|
5459
5459
|
{ value: Ke.Male.toString(), label: "Male" },
|
|
@@ -5464,15 +5464,15 @@ const _e = {
|
|
|
5464
5464
|
},
|
|
5465
5465
|
se
|
|
5466
5466
|
);
|
|
5467
|
-
if (
|
|
5468
|
-
const le =
|
|
5467
|
+
if (l === "defaultLanguage") {
|
|
5468
|
+
const le = c != null && c.allowedLanguages && c.allowedLanguages.length > 0 ? at.filter((Re) => c.allowedLanguages.includes(Re.value)) : at;
|
|
5469
5469
|
return /* @__PURE__ */ r(
|
|
5470
5470
|
We,
|
|
5471
5471
|
{
|
|
5472
5472
|
...ke,
|
|
5473
5473
|
label: ie,
|
|
5474
|
-
value: g[
|
|
5475
|
-
onChange: (Re) => D(
|
|
5474
|
+
value: g[l] || "",
|
|
5475
|
+
onChange: (Re) => D(l, Re),
|
|
5476
5476
|
options: [{ value: "", label: "Select language..." }, ...le],
|
|
5477
5477
|
error: ae
|
|
5478
5478
|
},
|
|
@@ -5481,15 +5481,15 @@ const _e = {
|
|
|
5481
5481
|
}
|
|
5482
5482
|
return null;
|
|
5483
5483
|
case "multiselect":
|
|
5484
|
-
if (
|
|
5485
|
-
const le = E(
|
|
5484
|
+
if (l === "otherNationality") {
|
|
5485
|
+
const le = E(l, f);
|
|
5486
5486
|
return /* @__PURE__ */ r(
|
|
5487
|
-
|
|
5487
|
+
Sr,
|
|
5488
5488
|
{
|
|
5489
5489
|
...ke,
|
|
5490
5490
|
label: ie,
|
|
5491
|
-
value: g[
|
|
5492
|
-
onChange: (Re) => D(
|
|
5491
|
+
value: g[l] || [],
|
|
5492
|
+
onChange: (Re) => D(l, Re),
|
|
5493
5493
|
options: le,
|
|
5494
5494
|
placeholder: "Select other nationalities...",
|
|
5495
5495
|
disabled: A
|
|
@@ -5505,8 +5505,8 @@ const _e = {
|
|
|
5505
5505
|
...ke,
|
|
5506
5506
|
type: "date",
|
|
5507
5507
|
label: ie,
|
|
5508
|
-
value: g[
|
|
5509
|
-
onChange: (le) => D(
|
|
5508
|
+
value: g[l] || "",
|
|
5509
|
+
onChange: (le) => D(l, le.target.value),
|
|
5510
5510
|
error: ae
|
|
5511
5511
|
},
|
|
5512
5512
|
se
|
|
@@ -5518,8 +5518,8 @@ const _e = {
|
|
|
5518
5518
|
...ke,
|
|
5519
5519
|
type: "email",
|
|
5520
5520
|
label: ie,
|
|
5521
|
-
value: g[
|
|
5522
|
-
onChange: (le) => D(
|
|
5521
|
+
value: g[l] || "",
|
|
5522
|
+
onChange: (le) => D(l, le.target.value),
|
|
5523
5523
|
error: ae
|
|
5524
5524
|
},
|
|
5525
5525
|
se
|
|
@@ -5531,8 +5531,8 @@ const _e = {
|
|
|
5531
5531
|
...ke,
|
|
5532
5532
|
type: "tel",
|
|
5533
5533
|
label: ie,
|
|
5534
|
-
value: g[
|
|
5535
|
-
onChange: (le) => D(
|
|
5534
|
+
value: g[l] || "",
|
|
5535
|
+
onChange: (le) => D(l, le.target.value),
|
|
5536
5536
|
error: ae
|
|
5537
5537
|
},
|
|
5538
5538
|
se
|
|
@@ -5544,16 +5544,16 @@ const _e = {
|
|
|
5544
5544
|
...ke,
|
|
5545
5545
|
type: "text",
|
|
5546
5546
|
label: ie,
|
|
5547
|
-
value: g[
|
|
5548
|
-
onChange: (le) => D(
|
|
5547
|
+
value: g[l] || "",
|
|
5548
|
+
onChange: (le) => D(l, le.target.value),
|
|
5549
5549
|
error: ae
|
|
5550
5550
|
},
|
|
5551
5551
|
se
|
|
5552
5552
|
);
|
|
5553
5553
|
}
|
|
5554
|
-
},
|
|
5555
|
-
if (
|
|
5556
|
-
const v =
|
|
5554
|
+
}, xt = (l, T) => {
|
|
5555
|
+
if (l.customType === "paragraph") {
|
|
5556
|
+
const v = l.displayText || l.label || "";
|
|
5557
5557
|
return /* @__PURE__ */ r(
|
|
5558
5558
|
"p",
|
|
5559
5559
|
{
|
|
@@ -5569,14 +5569,14 @@ const _e = {
|
|
|
5569
5569
|
`custom-${T}`
|
|
5570
5570
|
);
|
|
5571
5571
|
}
|
|
5572
|
-
if (
|
|
5572
|
+
if (l.customType === "br")
|
|
5573
5573
|
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${T}`);
|
|
5574
|
-
if (
|
|
5575
|
-
const v =
|
|
5574
|
+
if (l.customType === "link") {
|
|
5575
|
+
const v = l.displayText || l.label || l.linkText || l.linkUrl || "";
|
|
5576
5576
|
return /* @__PURE__ */ r("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
|
|
5577
5577
|
"a",
|
|
5578
5578
|
{
|
|
5579
|
-
href:
|
|
5579
|
+
href: l.linkUrl || "#",
|
|
5580
5580
|
target: "_blank",
|
|
5581
5581
|
rel: "noopener noreferrer",
|
|
5582
5582
|
style: {
|
|
@@ -5595,9 +5595,9 @@ const _e = {
|
|
|
5595
5595
|
}
|
|
5596
5596
|
) }, `custom-${T}`);
|
|
5597
5597
|
}
|
|
5598
|
-
if (!
|
|
5599
|
-
const L = M[
|
|
5600
|
-
if (
|
|
5598
|
+
if (!l.paramName) return null;
|
|
5599
|
+
const L = M[l.paramName], f = l.displayText || l.label || l.paramName;
|
|
5600
|
+
if (l.customType === "checkbox")
|
|
5601
5601
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
|
|
5602
5602
|
/* @__PURE__ */ s(
|
|
5603
5603
|
"label",
|
|
@@ -5609,8 +5609,8 @@ const _e = {
|
|
|
5609
5609
|
"input",
|
|
5610
5610
|
{
|
|
5611
5611
|
type: "checkbox",
|
|
5612
|
-
checked: P[
|
|
5613
|
-
onChange: (v) => S(
|
|
5612
|
+
checked: P[l.paramName] === "true",
|
|
5613
|
+
onChange: (v) => S(l.paramName, v.target.checked ? "true" : "false"),
|
|
5614
5614
|
className: "metakyc-option-input",
|
|
5615
5615
|
style: _e
|
|
5616
5616
|
}
|
|
@@ -5622,7 +5622,7 @@ const _e = {
|
|
|
5622
5622
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
5623
5623
|
children: [
|
|
5624
5624
|
f,
|
|
5625
|
-
|
|
5625
|
+
l.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5626
5626
|
]
|
|
5627
5627
|
}
|
|
5628
5628
|
)
|
|
@@ -5631,7 +5631,7 @@ const _e = {
|
|
|
5631
5631
|
),
|
|
5632
5632
|
L && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: L })
|
|
5633
5633
|
] }, `custom-${T}`);
|
|
5634
|
-
if (
|
|
5634
|
+
if (l.customType === "link_checkbox")
|
|
5635
5635
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
|
|
5636
5636
|
/* @__PURE__ */ s(
|
|
5637
5637
|
"label",
|
|
@@ -5643,8 +5643,8 @@ const _e = {
|
|
|
5643
5643
|
"input",
|
|
5644
5644
|
{
|
|
5645
5645
|
type: "checkbox",
|
|
5646
|
-
checked: P[
|
|
5647
|
-
onChange: (v) => S(
|
|
5646
|
+
checked: P[l.paramName] === "true",
|
|
5647
|
+
onChange: (v) => S(l.paramName, v.target.checked ? "true" : "false"),
|
|
5648
5648
|
className: "metakyc-option-input",
|
|
5649
5649
|
style: { ..._e, alignSelf: "flex-start", marginTop: "2px" }
|
|
5650
5650
|
}
|
|
@@ -5657,19 +5657,19 @@ const _e = {
|
|
|
5657
5657
|
children: [
|
|
5658
5658
|
f,
|
|
5659
5659
|
" ",
|
|
5660
|
-
|
|
5660
|
+
l.linkUrl && /* @__PURE__ */ r(
|
|
5661
5661
|
"a",
|
|
5662
5662
|
{
|
|
5663
|
-
href:
|
|
5663
|
+
href: l.linkUrl,
|
|
5664
5664
|
target: "_blank",
|
|
5665
5665
|
rel: "noopener noreferrer",
|
|
5666
5666
|
className: "underline",
|
|
5667
5667
|
style: { color: "var(--metakyc-primary, #2563eb)" },
|
|
5668
5668
|
onClick: (v) => v.stopPropagation(),
|
|
5669
|
-
children:
|
|
5669
|
+
children: l.linkText || l.linkUrl
|
|
5670
5670
|
}
|
|
5671
5671
|
),
|
|
5672
|
-
|
|
5672
|
+
l.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5673
5673
|
]
|
|
5674
5674
|
}
|
|
5675
5675
|
)
|
|
@@ -5678,8 +5678,8 @@ const _e = {
|
|
|
5678
5678
|
),
|
|
5679
5679
|
L && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: L })
|
|
5680
5680
|
] }, `custom-${T}`);
|
|
5681
|
-
if (
|
|
5682
|
-
const v = (P[
|
|
5681
|
+
if (l.customType === "group_checkbox") {
|
|
5682
|
+
const v = (P[l.paramName] || "").split(",").filter(Boolean);
|
|
5683
5683
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
5684
5684
|
/* @__PURE__ */ s(
|
|
5685
5685
|
"div",
|
|
@@ -5688,12 +5688,12 @@ const _e = {
|
|
|
5688
5688
|
style: { color: "var(--metakyc-text-primary, #111827)" },
|
|
5689
5689
|
children: [
|
|
5690
5690
|
f,
|
|
5691
|
-
|
|
5691
|
+
l.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5692
5692
|
]
|
|
5693
5693
|
}
|
|
5694
5694
|
),
|
|
5695
|
-
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (
|
|
5696
|
-
const ae =
|
|
5695
|
+
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (l.options || []).map((q) => {
|
|
5696
|
+
const ae = l.singleSelect ? P[l.paramName] === q.value : v.includes(q.value);
|
|
5697
5697
|
return /* @__PURE__ */ s(
|
|
5698
5698
|
"label",
|
|
5699
5699
|
{
|
|
@@ -5706,11 +5706,11 @@ const _e = {
|
|
|
5706
5706
|
type: "checkbox",
|
|
5707
5707
|
checked: ae,
|
|
5708
5708
|
onChange: (ie) => {
|
|
5709
|
-
if (
|
|
5710
|
-
S(
|
|
5709
|
+
if (l.singleSelect)
|
|
5710
|
+
S(l.paramName, ie.target.checked ? q.value : "");
|
|
5711
5711
|
else {
|
|
5712
5712
|
const se = ie.target.checked ? [...v, q.value] : v.filter((ke) => ke !== q.value);
|
|
5713
|
-
S(
|
|
5713
|
+
S(l.paramName, se.join(","));
|
|
5714
5714
|
}
|
|
5715
5715
|
},
|
|
5716
5716
|
className: "metakyc-option-input",
|
|
@@ -5733,7 +5733,7 @@ const _e = {
|
|
|
5733
5733
|
L && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: L })
|
|
5734
5734
|
] }, `custom-${T}`);
|
|
5735
5735
|
}
|
|
5736
|
-
return
|
|
5736
|
+
return l.customType === "radio_group" ? /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
5737
5737
|
/* @__PURE__ */ s(
|
|
5738
5738
|
"div",
|
|
5739
5739
|
{
|
|
@@ -5741,11 +5741,11 @@ const _e = {
|
|
|
5741
5741
|
style: { color: "var(--metakyc-text-primary, #111827)" },
|
|
5742
5742
|
children: [
|
|
5743
5743
|
f,
|
|
5744
|
-
|
|
5744
|
+
l.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5745
5745
|
]
|
|
5746
5746
|
}
|
|
5747
5747
|
),
|
|
5748
|
-
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (
|
|
5748
|
+
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (l.options || []).map((v) => /* @__PURE__ */ s(
|
|
5749
5749
|
"label",
|
|
5750
5750
|
{
|
|
5751
5751
|
className: "metakyc-option-label",
|
|
@@ -5755,9 +5755,9 @@ const _e = {
|
|
|
5755
5755
|
"input",
|
|
5756
5756
|
{
|
|
5757
5757
|
type: "radio",
|
|
5758
|
-
checked: P[
|
|
5759
|
-
onChange: () => S(
|
|
5760
|
-
name: `radio-group-${
|
|
5758
|
+
checked: P[l.paramName] === v.value,
|
|
5759
|
+
onChange: () => S(l.paramName, v.value),
|
|
5760
|
+
name: `radio-group-${l.paramName}-${T}`,
|
|
5761
5761
|
className: "metakyc-option-input",
|
|
5762
5762
|
style: _e
|
|
5763
5763
|
}
|
|
@@ -5779,18 +5779,18 @@ const _e = {
|
|
|
5779
5779
|
me,
|
|
5780
5780
|
{
|
|
5781
5781
|
type: "text",
|
|
5782
|
-
label: `${f}${
|
|
5783
|
-
value: P[
|
|
5784
|
-
onChange: (v) => S(
|
|
5785
|
-
required:
|
|
5782
|
+
label: `${f}${l.required ? " *" : ""}`,
|
|
5783
|
+
value: P[l.paramName] || "",
|
|
5784
|
+
onChange: (v) => S(l.paramName, v.target.value),
|
|
5785
|
+
required: l.required,
|
|
5786
5786
|
error: L
|
|
5787
5787
|
},
|
|
5788
5788
|
`custom-${T}`
|
|
5789
5789
|
);
|
|
5790
|
-
},
|
|
5791
|
-
const L = H(
|
|
5790
|
+
}, bt = (l, T) => {
|
|
5791
|
+
const L = H(l);
|
|
5792
5792
|
return /* @__PURE__ */ s("div", { className: "space-y-4", children: [
|
|
5793
|
-
|
|
5793
|
+
l.conditionalOn && /* @__PURE__ */ r(ct, { helpText: l.conditionalHelpText, children: /* @__PURE__ */ s(
|
|
5794
5794
|
"label",
|
|
5795
5795
|
{
|
|
5796
5796
|
className: "metakyc-option-label",
|
|
@@ -5801,7 +5801,7 @@ const _e = {
|
|
|
5801
5801
|
{
|
|
5802
5802
|
type: "checkbox",
|
|
5803
5803
|
checked: L,
|
|
5804
|
-
onChange: (f) => S(
|
|
5804
|
+
onChange: (f) => S(l.conditionalOn, f.target.checked ? "true" : "false"),
|
|
5805
5805
|
className: "metakyc-option-input",
|
|
5806
5806
|
style: _e
|
|
5807
5807
|
}
|
|
@@ -5811,15 +5811,15 @@ const _e = {
|
|
|
5811
5811
|
{
|
|
5812
5812
|
className: "metakyc-option-text",
|
|
5813
5813
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", fontWeight: 500 },
|
|
5814
|
-
children:
|
|
5814
|
+
children: l.conditionalOn
|
|
5815
5815
|
}
|
|
5816
5816
|
)
|
|
5817
5817
|
]
|
|
5818
5818
|
}
|
|
5819
|
-
),
|
|
5820
|
-
L && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children:
|
|
5819
|
+
) }),
|
|
5820
|
+
L && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: l.fields.map((f, v) => {
|
|
5821
5821
|
const q = f.colSpan === 1 ? "col-span-1" : f.colSpan === 2 ? "col-span-2" : f.colSpan === 3 ? "col-span-3" : "col-span-4", ae = f.isCustom ? `custom-${v}-${f.paramName}` : `builtin-${f.name}-${v}`;
|
|
5822
|
-
return /* @__PURE__ */ r("div", { className: q, children: /* @__PURE__ */ r(
|
|
5822
|
+
return /* @__PURE__ */ r("div", { className: q, children: /* @__PURE__ */ r(ct, { helpText: f.helpText, children: f.isCustom ? xt(f, v) : Ze(f.name, ae, f.displayText, f.countriesType) }) }, ae);
|
|
5823
5823
|
}) })
|
|
5824
5824
|
] });
|
|
5825
5825
|
};
|
|
@@ -5829,33 +5829,33 @@ const _e = {
|
|
|
5829
5829
|
/* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
|
|
5830
5830
|
] }) }) });
|
|
5831
5831
|
if (m) {
|
|
5832
|
-
const
|
|
5832
|
+
const l = m[_] ?? m[0], T = Y === -1, L = X === -1, f = m.length, v = H(l), q = Object.values(M);
|
|
5833
5833
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(K, { children: [
|
|
5834
|
-
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (
|
|
5834
|
+
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
5835
5835
|
/* @__PURE__ */ s(W, { children: [
|
|
5836
|
-
(
|
|
5837
|
-
|
|
5836
|
+
(l.title || l.subtitle || l.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
|
|
5837
|
+
l.title && /* @__PURE__ */ r(
|
|
5838
5838
|
"h3",
|
|
5839
5839
|
{
|
|
5840
5840
|
className: "font-semibold text-base",
|
|
5841
5841
|
style: { color: "var(--metakyc-text-primary, #111827)" },
|
|
5842
|
-
children:
|
|
5842
|
+
children: l.title
|
|
5843
5843
|
}
|
|
5844
5844
|
),
|
|
5845
|
-
|
|
5845
|
+
l.subtitle && /* @__PURE__ */ r(
|
|
5846
5846
|
"p",
|
|
5847
5847
|
{
|
|
5848
5848
|
className: "text-sm mt-0.5",
|
|
5849
5849
|
style: { color: "var(--metakyc-text-secondary, #6b7280)" },
|
|
5850
|
-
children:
|
|
5850
|
+
children: l.subtitle
|
|
5851
5851
|
}
|
|
5852
5852
|
),
|
|
5853
|
-
|
|
5853
|
+
l.description && l.description !== l.subtitle && /* @__PURE__ */ r(
|
|
5854
5854
|
"p",
|
|
5855
5855
|
{
|
|
5856
5856
|
className: "text-xs mt-1",
|
|
5857
5857
|
style: { color: "var(--metakyc-text-secondary, #6b7280)" },
|
|
5858
|
-
children:
|
|
5858
|
+
children: l.description
|
|
5859
5859
|
}
|
|
5860
5860
|
)
|
|
5861
5861
|
] }),
|
|
@@ -5882,7 +5882,7 @@ const _e = {
|
|
|
5882
5882
|
f
|
|
5883
5883
|
] })
|
|
5884
5884
|
] }),
|
|
5885
|
-
|
|
5885
|
+
bt(l)
|
|
5886
5886
|
] }),
|
|
5887
5887
|
/* @__PURE__ */ s(pe, { className: "flex justify-between", children: [
|
|
5888
5888
|
/* @__PURE__ */ s("div", { children: [
|
|
@@ -5906,21 +5906,21 @@ const _e = {
|
|
|
5906
5906
|
type: "button",
|
|
5907
5907
|
isLoading: te || u,
|
|
5908
5908
|
onClick: L ? Ce : ve,
|
|
5909
|
-
children: L ?
|
|
5909
|
+
children: L ? l.conditionalOn && !v ? "Skip & Submit" : "Submit" : l.conditionalOn && !v ? "Skip" : "Next"
|
|
5910
5910
|
}
|
|
5911
5911
|
)
|
|
5912
5912
|
] })
|
|
5913
5913
|
] }) });
|
|
5914
5914
|
}
|
|
5915
|
-
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit:
|
|
5916
|
-
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (
|
|
5915
|
+
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: ft, children: /* @__PURE__ */ s(K, { children: [
|
|
5916
|
+
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
5917
5917
|
/* @__PURE__ */ s(W, { children: [
|
|
5918
5918
|
w && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ s("p", { className: "text-red-600 text-sm", children: [
|
|
5919
5919
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
5920
5920
|
" ",
|
|
5921
5921
|
w
|
|
5922
5922
|
] }) }),
|
|
5923
|
-
/* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: h.map((
|
|
5923
|
+
/* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: h.map((l) => /* @__PURE__ */ r("div", { className: "col-span-4", children: Ze(l) }, l)) })
|
|
5924
5924
|
] }),
|
|
5925
5925
|
/* @__PURE__ */ s(pe, { className: "flex justify-between", children: [
|
|
5926
5926
|
a && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: a, disabled: te || u, children: "Cancel" }),
|
|
@@ -5936,7 +5936,7 @@ const _e = {
|
|
|
5936
5936
|
}) => {
|
|
5937
5937
|
const {
|
|
5938
5938
|
progress: o,
|
|
5939
|
-
currentStep:
|
|
5939
|
+
currentStep: c,
|
|
5940
5940
|
steps: d,
|
|
5941
5941
|
workflowKey: u,
|
|
5942
5942
|
nextWorkflowKey: p,
|
|
@@ -5945,7 +5945,7 @@ const _e = {
|
|
|
5945
5945
|
error: m,
|
|
5946
5946
|
moveBack: y,
|
|
5947
5947
|
refreshProgress: h
|
|
5948
|
-
} =
|
|
5948
|
+
} = fr(e), [C, F] = ge.useState(!1);
|
|
5949
5949
|
if (ge.useEffect(() => {
|
|
5950
5950
|
m && n && n(m);
|
|
5951
5951
|
}, [m, n]), ge.useEffect(() => {
|
|
@@ -6006,7 +6006,7 @@ const _e = {
|
|
|
6006
6006
|
}
|
|
6007
6007
|
}
|
|
6008
6008
|
) });
|
|
6009
|
-
if (!
|
|
6009
|
+
if (!c)
|
|
6010
6010
|
return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${i || ""}`, children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
|
|
6011
6011
|
/* @__PURE__ */ r(be, { className: "my-8" }),
|
|
6012
6012
|
/* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: o.status === xe.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
|
|
@@ -6035,7 +6035,7 @@ const _e = {
|
|
|
6035
6035
|
return "";
|
|
6036
6036
|
}
|
|
6037
6037
|
}, $ = () => {
|
|
6038
|
-
const I = d.filter((g) => g.visibility !== !1), j = I.findIndex((g) => g.order ===
|
|
6038
|
+
const I = d.filter((g) => g.visibility !== !1), j = I.findIndex((g) => g.order === c.order), J = j >= 0 ? j + 1 : 1, E = I.length;
|
|
6039
6039
|
return /* @__PURE__ */ s("div", { className: "mb-6", children: [
|
|
6040
6040
|
/* @__PURE__ */ s("div", { className: "flex items-start justify-between mb-4", children: [
|
|
6041
6041
|
/* @__PURE__ */ r(Ge, {}),
|
|
@@ -6047,7 +6047,7 @@ const _e = {
|
|
|
6047
6047
|
] })
|
|
6048
6048
|
] }),
|
|
6049
6049
|
/* @__PURE__ */ r("div", { className: "flex items-center", children: I.map((g, R) => {
|
|
6050
|
-
const P = R < j, z = g.order ===
|
|
6050
|
+
const P = R < j, z = g.order === c.order;
|
|
6051
6051
|
return /* @__PURE__ */ s(ge.Fragment, { children: [
|
|
6052
6052
|
/* @__PURE__ */ s("div", { className: "flex items-center", children: [
|
|
6053
6053
|
/* @__PURE__ */ r(
|
|
@@ -6083,24 +6083,24 @@ const _e = {
|
|
|
6083
6083
|
onComplete: async () => {
|
|
6084
6084
|
await h();
|
|
6085
6085
|
},
|
|
6086
|
-
onBack:
|
|
6086
|
+
onBack: c.order > 0 ? y : void 0
|
|
6087
6087
|
};
|
|
6088
|
-
switch (
|
|
6088
|
+
switch (c.action) {
|
|
6089
6089
|
case G.Questionaries:
|
|
6090
|
-
return /* @__PURE__ */ r(
|
|
6090
|
+
return /* @__PURE__ */ r(Or, { ...I });
|
|
6091
6091
|
case G.UploadDocument:
|
|
6092
|
-
return /* @__PURE__ */ r(zr, { ...I });
|
|
6093
|
-
case G.Overview:
|
|
6094
6092
|
return /* @__PURE__ */ r($r, { ...I });
|
|
6093
|
+
case G.Overview:
|
|
6094
|
+
return /* @__PURE__ */ r(Br, { ...I });
|
|
6095
6095
|
case G.IdentitySdk:
|
|
6096
|
-
return /* @__PURE__ */ r(
|
|
6096
|
+
return /* @__PURE__ */ r(Yr, { ...I });
|
|
6097
6097
|
case G.RiskScoring:
|
|
6098
|
-
return /* @__PURE__ */ r(
|
|
6098
|
+
return /* @__PURE__ */ r(jr, { ...I });
|
|
6099
6099
|
case G.AdditionalData:
|
|
6100
6100
|
case G.InvestorCategorization:
|
|
6101
|
-
return /* @__PURE__ */ r(qr, { ...I });
|
|
6102
|
-
case G.AppropriatenessTest:
|
|
6103
6101
|
return /* @__PURE__ */ r(Kr, { ...I });
|
|
6102
|
+
case G.AppropriatenessTest:
|
|
6103
|
+
return /* @__PURE__ */ r(Wr, { ...I });
|
|
6104
6104
|
case G.ManualReview:
|
|
6105
6105
|
return /* @__PURE__ */ r(
|
|
6106
6106
|
lt,
|
|
@@ -6116,11 +6116,11 @@ const _e = {
|
|
|
6116
6116
|
/* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(be, {}) }),
|
|
6117
6117
|
/* @__PURE__ */ s("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
|
|
6118
6118
|
"Processing step: ",
|
|
6119
|
-
|
|
6119
|
+
c.title || c.name
|
|
6120
6120
|
] }),
|
|
6121
6121
|
/* @__PURE__ */ s("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
|
|
6122
6122
|
"Action type: ",
|
|
6123
|
-
G[
|
|
6123
|
+
G[c.action]
|
|
6124
6124
|
] })
|
|
6125
6125
|
] }) });
|
|
6126
6126
|
}
|
|
@@ -6180,15 +6180,15 @@ function bn(e) {
|
|
|
6180
6180
|
const vn = Se.any();
|
|
6181
6181
|
export {
|
|
6182
6182
|
at as ALLOWED_LANGUAGES,
|
|
6183
|
-
|
|
6183
|
+
At as ApplicantProgressOnHoldReason,
|
|
6184
6184
|
xe as ApplicantProgressStatus,
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6185
|
+
Ht as ApplicantService,
|
|
6186
|
+
It as ApplicantStatus,
|
|
6187
|
+
Lt as AppropriatenessQuestionType,
|
|
6188
|
+
qt as AppropriatenessTestService,
|
|
6189
|
+
Wr as AppropriatenessTestStep,
|
|
6190
6190
|
Ae as Badge,
|
|
6191
|
-
|
|
6191
|
+
Qt as BaseInformationService,
|
|
6192
6192
|
V as Button,
|
|
6193
6193
|
K as Card,
|
|
6194
6194
|
W as CardContent,
|
|
@@ -6196,101 +6196,101 @@ export {
|
|
|
6196
6196
|
de as CardHeader,
|
|
6197
6197
|
Le as CountriesType,
|
|
6198
6198
|
hn as CreateApplicantForm,
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6199
|
+
Mt as CriteriaBuiltInType,
|
|
6200
|
+
zt as DEFAULT_VISIBLE_FIELDS,
|
|
6201
|
+
Ft as DocumentReviewStatus,
|
|
6202
|
+
Bt as EndpointBuilder,
|
|
6203
6203
|
ze as ErrorHandler,
|
|
6204
|
-
|
|
6204
|
+
nr as EventEmitter,
|
|
6205
6205
|
Te as FIELD_METADATA,
|
|
6206
|
-
|
|
6207
|
-
|
|
6206
|
+
Dt as FileType,
|
|
6207
|
+
Cr as FileUpload,
|
|
6208
6208
|
Ke as GenderType,
|
|
6209
6209
|
Ge as Header,
|
|
6210
|
-
|
|
6210
|
+
_t as HttpClient,
|
|
6211
6211
|
Me as IdentityProviderManager,
|
|
6212
|
-
|
|
6212
|
+
Yt as IdentityService,
|
|
6213
6213
|
fe as IdentityVerificationProvider,
|
|
6214
|
-
|
|
6214
|
+
Yr as IdentityVerificationStep,
|
|
6215
6215
|
me as Input,
|
|
6216
|
-
|
|
6217
|
-
|
|
6216
|
+
Gt as InvestorCategorizationService,
|
|
6217
|
+
Kr as InvestorCategorizationStep,
|
|
6218
6218
|
he as InvestorCategorizationType,
|
|
6219
|
-
|
|
6220
|
-
|
|
6219
|
+
Ot as InvestorCategoryType,
|
|
6220
|
+
Rt as KycProcessStatus,
|
|
6221
6221
|
De as KycStatus,
|
|
6222
6222
|
lt as KycStatusDisplay,
|
|
6223
6223
|
gn as KycWorkflow,
|
|
6224
|
-
|
|
6225
|
-
|
|
6224
|
+
Qr as Logo,
|
|
6225
|
+
mt as MetaKYCContext,
|
|
6226
6226
|
Ne as MetaKYCError,
|
|
6227
6227
|
on as MetaKYCProvider,
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6228
|
+
Sr as MultiSelect,
|
|
6229
|
+
lr as OnfidoProvider,
|
|
6230
|
+
Kt as OverviewService,
|
|
6231
|
+
Br as OverviewStep,
|
|
6232
|
+
Ar as PhoneInput,
|
|
6233
|
+
Ut as QuestionnaireService,
|
|
6234
|
+
Or as QuestionnaireStep,
|
|
6235
6235
|
Fe as ReviewStatus,
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6236
|
+
Tt as RiskCriteriaType,
|
|
6237
|
+
Et as RiskLevel,
|
|
6238
|
+
Wt as RiskScoringService,
|
|
6239
|
+
jr as RiskScoringStep,
|
|
6240
|
+
cr as SardinAIProvider,
|
|
6241
6241
|
We as SearchableSelect,
|
|
6242
6242
|
He as Select,
|
|
6243
6243
|
be as Spinner,
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6244
|
+
ir as StepRouter,
|
|
6245
|
+
or as SumsubProvider,
|
|
6246
|
+
dr as ThemeManager,
|
|
6247
6247
|
ce as ThemePreset,
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6248
|
+
rr as ThemeService,
|
|
6249
|
+
jt as UploadDocumentService,
|
|
6250
|
+
$r as UploadDocumentStep,
|
|
6251
|
+
Pt as UserType,
|
|
6252
6252
|
Ie as ValueDataType,
|
|
6253
|
-
|
|
6253
|
+
sr as WorkflowOrchestrator,
|
|
6254
6254
|
qe as WorkflowResultType,
|
|
6255
|
-
|
|
6255
|
+
ar as WorkflowState,
|
|
6256
6256
|
G as WorkflowStepAction,
|
|
6257
6257
|
vn as appropriatenessTestSchema,
|
|
6258
6258
|
mn as clearAllStorage,
|
|
6259
|
-
|
|
6260
|
-
|
|
6259
|
+
hr as clearApplicantId,
|
|
6260
|
+
yr as clearWorkflowState,
|
|
6261
6261
|
oe as cn,
|
|
6262
|
-
|
|
6263
|
-
|
|
6262
|
+
Vt as corporateTheme,
|
|
6263
|
+
$t as defaultConfig,
|
|
6264
6264
|
ue as defaultTheme,
|
|
6265
|
-
|
|
6266
|
-
|
|
6265
|
+
ur as fileToBase64,
|
|
6266
|
+
Zt as fintechTheme,
|
|
6267
6267
|
Ye as formatFileSize,
|
|
6268
6268
|
bn as generateAppropriatenessSchema,
|
|
6269
6269
|
yn as generateQuestionnaireSchema,
|
|
6270
6270
|
xn as generateRiskScoringSchema,
|
|
6271
6271
|
fn as generateUploadDocumentSchema,
|
|
6272
6272
|
dn as getAcceptString,
|
|
6273
|
-
|
|
6273
|
+
pr as getApplicantId,
|
|
6274
6274
|
$e as getThemePreset,
|
|
6275
6275
|
un as getWorkflowState,
|
|
6276
|
-
|
|
6276
|
+
Jt as healthcareTheme,
|
|
6277
6277
|
an as isScriptLoaded,
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6278
|
+
ut as loadScript,
|
|
6279
|
+
er as minimalTheme,
|
|
6280
|
+
Xt as modernTheme,
|
|
6281
6281
|
sn as removeScript,
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6282
|
+
mr as saveApplicantId,
|
|
6283
|
+
gr as saveWorkflowState,
|
|
6284
|
+
tr as themePresets,
|
|
6285
|
+
Nr as useApplicant,
|
|
6286
6286
|
pn as useAppropriatenessTest,
|
|
6287
|
-
|
|
6288
|
-
|
|
6287
|
+
kr as useIdentityVerification,
|
|
6288
|
+
fr as useKycWorkflow,
|
|
6289
6289
|
ye as useMetaKYC,
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6290
|
+
vr as useOverview,
|
|
6291
|
+
xr as useQuestionnaire,
|
|
6292
|
+
wr as useRiskScoring,
|
|
6293
|
+
br as useUploadDocument,
|
|
6294
6294
|
ln as validateFileSize,
|
|
6295
6295
|
cn as validateFileType
|
|
6296
6296
|
};
|