@vpdev2/metakyc-sdk 1.0.34 → 1.0.36
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/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +362 -282
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
1
|
+
var He = Object.defineProperty;
|
|
2
|
+
var je = (e, t, r) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var H = (e, t, r) => je(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import qe from "axios";
|
|
5
5
|
import * as Fe from "react";
|
|
6
6
|
import ie, { createContext as Ye, useState as v, useMemo as Ae, useEffect as V, useContext as We, useRef as W, useCallback as K, forwardRef as Ne, createElement as De } from "react";
|
|
7
7
|
import { jsx as a, jsxs as o, Fragment as Qe } from "react/jsx-runtime";
|
|
8
8
|
import { useForm as Ve, Controller as ye } from "react-hook-form";
|
|
9
9
|
import { z as ue } from "zod";
|
|
10
10
|
var O = /* @__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))(O || {}), Se = /* @__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))(Se || {}), le = /* @__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))(le || {}), Ge = /* @__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))(Ge || {}), Ze = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(Ze || {}), fe = /* @__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))(fe || {}), be = /* @__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))(be || {}), Je = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Je || {}), Xe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(Xe || {}), oe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(oe || {}), et = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(et || {}), Ce = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ce || {}), tt = /* @__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))(tt || {}), rt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(rt || {}), at = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(at || {}), he = /* @__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))(he || {}), nt = /* @__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))(nt || {}), st = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(st || {}), re = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(re || {}), it = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(it || {});
|
|
11
|
-
const
|
|
11
|
+
const Le = [
|
|
12
12
|
{ value: "EN", label: "English" },
|
|
13
13
|
{ value: "DE", label: "German" },
|
|
14
14
|
{ value: "FR", label: "French" },
|
|
@@ -40,7 +40,7 @@ const Pe = [
|
|
|
40
40
|
"nationality",
|
|
41
41
|
"taxCountry",
|
|
42
42
|
"taxNumber"
|
|
43
|
-
],
|
|
43
|
+
], Ir = [
|
|
44
44
|
"firstName",
|
|
45
45
|
"lastName",
|
|
46
46
|
"title",
|
|
@@ -64,7 +64,7 @@ const Pe = [
|
|
|
64
64
|
"occupation",
|
|
65
65
|
"taxNumber",
|
|
66
66
|
"externalRefId"
|
|
67
|
-
],
|
|
67
|
+
], Pe = {
|
|
68
68
|
firstName: { label: "First Name", type: "text" },
|
|
69
69
|
lastName: { label: "Last Name", type: "text" },
|
|
70
70
|
title: { label: "Title", type: "text" },
|
|
@@ -141,7 +141,7 @@ class ct {
|
|
|
141
141
|
class de extends Error {
|
|
142
142
|
constructor(r, n, s, i, l) {
|
|
143
143
|
super(r);
|
|
144
|
-
|
|
144
|
+
H(this, "response");
|
|
145
145
|
this.code = n, this.details = s, this.validationErrors = i, this.name = "MetaKYCError", this.response = l, Object.setPrototypeOf(this, de.prototype);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -197,10 +197,10 @@ class we {
|
|
|
197
197
|
}
|
|
198
198
|
class dt {
|
|
199
199
|
constructor(t) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
this.config = { ...lt, ...t }, this.endpointBuilder = new ct(this.config.endpoints), this.axiosInstance =
|
|
200
|
+
H(this, "axiosInstance");
|
|
201
|
+
H(this, "endpointBuilder");
|
|
202
|
+
H(this, "config");
|
|
203
|
+
this.config = { ...lt, ...t }, this.endpointBuilder = new ct(this.config.endpoints), this.axiosInstance = qe.create({
|
|
204
204
|
baseURL: this.config.baseUrl,
|
|
205
205
|
timeout: this.config.timeout,
|
|
206
206
|
headers: {
|
|
@@ -969,9 +969,9 @@ class At {
|
|
|
969
969
|
} : n;
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
class
|
|
972
|
+
class It {
|
|
973
973
|
constructor() {
|
|
974
|
-
|
|
974
|
+
H(this, "listeners", /* @__PURE__ */ new Map());
|
|
975
975
|
}
|
|
976
976
|
/**
|
|
977
977
|
* Subscribe to an event
|
|
@@ -1014,12 +1014,12 @@ class Et {
|
|
|
1014
1014
|
this.listeners.delete(t);
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
class
|
|
1017
|
+
class Et {
|
|
1018
1018
|
constructor() {
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1019
|
+
H(this, "events", new It());
|
|
1020
|
+
H(this, "_applicantId", null);
|
|
1021
|
+
H(this, "_progress", null);
|
|
1022
|
+
H(this, "_error", null);
|
|
1023
1023
|
}
|
|
1024
1024
|
/**
|
|
1025
1025
|
* Get current applicant ID
|
|
@@ -1156,7 +1156,7 @@ class It {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
class Rt {
|
|
1158
1158
|
constructor() {
|
|
1159
|
-
|
|
1159
|
+
H(this, "handlers", /* @__PURE__ */ new Map());
|
|
1160
1160
|
}
|
|
1161
1161
|
/**
|
|
1162
1162
|
* Register a step handler
|
|
@@ -1197,9 +1197,9 @@ class Rt {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
class Dt {
|
|
1199
1199
|
constructor(t, r, n, s, i, l, c, d) {
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
this.applicantService = t, this.questionnaireService = r, this.uploadDocumentService = n, this.appropriatenessTestService = s, this.overviewService = i, this.riskScoringService = l, this.investorCategorizationService = d, this.state = new
|
|
1200
|
+
H(this, "state");
|
|
1201
|
+
H(this, "stepRouter");
|
|
1202
|
+
this.applicantService = t, this.questionnaireService = r, this.uploadDocumentService = n, this.appropriatenessTestService = s, this.overviewService = i, this.riskScoringService = l, this.investorCategorizationService = d, this.state = new Et(), this.stepRouter = new Rt(), this.registerStepHandlers();
|
|
1203
1203
|
}
|
|
1204
1204
|
/**
|
|
1205
1205
|
* Register all step handlers
|
|
@@ -1349,7 +1349,7 @@ function Be(e, t) {
|
|
|
1349
1349
|
s.src = e, t && (s.id = t), s.async = !0, s.onload = () => r(), s.onerror = () => n(new Error(`Failed to load script: ${e}`)), document.head.appendChild(s);
|
|
1350
1350
|
});
|
|
1351
1351
|
}
|
|
1352
|
-
function
|
|
1352
|
+
function Er(e) {
|
|
1353
1353
|
return !!document.getElementById(e);
|
|
1354
1354
|
}
|
|
1355
1355
|
function Rr(e) {
|
|
@@ -1358,8 +1358,8 @@ function Rr(e) {
|
|
|
1358
1358
|
}
|
|
1359
1359
|
class Ft {
|
|
1360
1360
|
constructor(t) {
|
|
1361
|
-
|
|
1362
|
-
|
|
1361
|
+
H(this, "sdk", null);
|
|
1362
|
+
H(this, "config");
|
|
1363
1363
|
this.config = t;
|
|
1364
1364
|
}
|
|
1365
1365
|
/**
|
|
@@ -1411,10 +1411,10 @@ class Ft {
|
|
|
1411
1411
|
this.sdk && this.sdk.on("idCheck.onError", t);
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
|
-
class
|
|
1414
|
+
class Lt {
|
|
1415
1415
|
constructor(t) {
|
|
1416
|
-
|
|
1417
|
-
|
|
1416
|
+
H(this, "sdk", null);
|
|
1417
|
+
H(this, "config");
|
|
1418
1418
|
this.config = t;
|
|
1419
1419
|
}
|
|
1420
1420
|
/**
|
|
@@ -1477,11 +1477,11 @@ class Pt {
|
|
|
1477
1477
|
this.sdk && (this.sdk.tearDown(), this.sdk = null);
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
|
-
class
|
|
1480
|
+
class Pt {
|
|
1481
1481
|
constructor(t) {
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1482
|
+
H(this, "sardineContext", null);
|
|
1483
|
+
H(this, "config");
|
|
1484
|
+
H(this, "sessionKey");
|
|
1485
1485
|
this.config = t, this.sessionKey = t.sessionKey || this.generateSessionKey();
|
|
1486
1486
|
}
|
|
1487
1487
|
/**
|
|
@@ -1630,9 +1630,9 @@ class xe {
|
|
|
1630
1630
|
case oe.Sumsub:
|
|
1631
1631
|
return new Ft(r);
|
|
1632
1632
|
case oe.Onfido:
|
|
1633
|
-
return new Pt(r);
|
|
1634
|
-
case oe.SardinAI:
|
|
1635
1633
|
return new Lt(r);
|
|
1634
|
+
case oe.SardinAI:
|
|
1635
|
+
return new Pt(r);
|
|
1636
1636
|
default:
|
|
1637
1637
|
throw new Error(`Unsupported identity provider: ${t}`);
|
|
1638
1638
|
}
|
|
@@ -1673,9 +1673,9 @@ class xe {
|
|
|
1673
1673
|
}
|
|
1674
1674
|
class Mt {
|
|
1675
1675
|
constructor(t) {
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1676
|
+
H(this, "currentTheme", ee);
|
|
1677
|
+
H(this, "customStyleElement", null);
|
|
1678
|
+
H(this, "container");
|
|
1679
1679
|
this.container = t || document.documentElement;
|
|
1680
1680
|
}
|
|
1681
1681
|
/**
|
|
@@ -1798,7 +1798,7 @@ class Mt {
|
|
|
1798
1798
|
}
|
|
1799
1799
|
const Oe = Ye(null), Dr = ({ config: e, children: t }) => {
|
|
1800
1800
|
const [r, n] = v(null), s = ie.useRef(!1), i = ie.useRef(!1), l = Ae(() => {
|
|
1801
|
-
const d = new dt(e), u = new ut(d), k = new mt(d), w = new pt(d), p = new ht(d), b = new gt(d), m = new yt(d), N = new ft(d), h = new bt(d), x = new xt(d),
|
|
1801
|
+
const d = new dt(e), u = new ut(d), k = new mt(d), w = new pt(d), p = new ht(d), b = new gt(d), m = new yt(d), N = new ft(d), h = new bt(d), x = new xt(d), E = new At(d), S = new Mt();
|
|
1802
1802
|
return {
|
|
1803
1803
|
httpClient: d,
|
|
1804
1804
|
applicantService: u,
|
|
@@ -1810,7 +1810,7 @@ const Oe = Ye(null), Dr = ({ config: e, children: t }) => {
|
|
|
1810
1810
|
identityService: N,
|
|
1811
1811
|
baseInformationService: h,
|
|
1812
1812
|
investorCategorizationService: x,
|
|
1813
|
-
themeService:
|
|
1813
|
+
themeService: E,
|
|
1814
1814
|
themeManager: S
|
|
1815
1815
|
};
|
|
1816
1816
|
}, [e]), c = Ae(() => ({
|
|
@@ -1869,7 +1869,7 @@ async function Tt(e) {
|
|
|
1869
1869
|
function Fr(e, t) {
|
|
1870
1870
|
return e.size <= t;
|
|
1871
1871
|
}
|
|
1872
|
-
function
|
|
1872
|
+
function Lr(e, t) {
|
|
1873
1873
|
return t.split(",").map((n) => n.trim()).some((n) => {
|
|
1874
1874
|
if (n.endsWith("/*")) {
|
|
1875
1875
|
const s = n.slice(0, -2);
|
|
@@ -1883,7 +1883,7 @@ function Re(e) {
|
|
|
1883
1883
|
const t = 1024, r = ["Bytes", "KB", "MB", "GB"], n = Math.floor(Math.log(e) / Math.log(t));
|
|
1884
1884
|
return Math.round(e / Math.pow(t, n) * 100) / 100 + " " + r[n];
|
|
1885
1885
|
}
|
|
1886
|
-
function
|
|
1886
|
+
function Pr(e) {
|
|
1887
1887
|
return e;
|
|
1888
1888
|
}
|
|
1889
1889
|
function J(...e) {
|
|
@@ -2020,15 +2020,15 @@ function Ut(e) {
|
|
|
2020
2020
|
i(!0), c(null);
|
|
2021
2021
|
try {
|
|
2022
2022
|
await d.current.submitCurrentStep(S);
|
|
2023
|
-
const
|
|
2024
|
-
n(
|
|
2025
|
-
} catch (
|
|
2026
|
-
throw c(
|
|
2023
|
+
const I = await d.current.refreshProgress();
|
|
2024
|
+
n(I);
|
|
2025
|
+
} catch (I) {
|
|
2026
|
+
throw c(I), I;
|
|
2027
2027
|
} finally {
|
|
2028
2028
|
i(!1);
|
|
2029
2029
|
}
|
|
2030
2030
|
}
|
|
2031
|
-
}, []), x = Fe.useMemo(() => r != null && r.stepInfoList ? [...r.stepInfoList].sort((S,
|
|
2031
|
+
}, []), x = Fe.useMemo(() => r != null && r.stepInfoList ? [...r.stepInfoList].sort((S, I) => S.order - I.order) : [], [r == null ? void 0 : r.stepInfoList]), E = Fe.useMemo(() => r ? r.nextWorkflowKey && r.nextWorkflowKey !== r.workFlowKey : !1, [r]);
|
|
2032
2032
|
return {
|
|
2033
2033
|
progress: r,
|
|
2034
2034
|
applicantId: u,
|
|
@@ -2038,7 +2038,7 @@ function Ut(e) {
|
|
|
2038
2038
|
workflowResult: (r == null ? void 0 : r.workflowResult) || null,
|
|
2039
2039
|
workflowKey: r == null ? void 0 : r.workFlowKey,
|
|
2040
2040
|
nextWorkflowKey: r == null ? void 0 : r.nextWorkflowKey,
|
|
2041
|
-
hasWorkflowChanged:
|
|
2041
|
+
hasWorkflowChanged: E,
|
|
2042
2042
|
isLoading: s,
|
|
2043
2043
|
error: l,
|
|
2044
2044
|
isComplete: (r == null ? void 0 : r.status) === le.Finished,
|
|
@@ -2093,7 +2093,7 @@ function Kt(e) {
|
|
|
2093
2093
|
submit: b
|
|
2094
2094
|
};
|
|
2095
2095
|
}
|
|
2096
|
-
function
|
|
2096
|
+
function Ht(e) {
|
|
2097
2097
|
const { uploadDocumentService: t } = se(), [r, n] = v(null), [s, i] = v(!1), [l, c] = v(!1), [d, u] = v(0), [k, w] = v(null), p = W(!1), b = W(null), m = K(async () => {
|
|
2098
2098
|
if (e) {
|
|
2099
2099
|
if (p.current) {
|
|
@@ -2182,7 +2182,7 @@ function Br(e) {
|
|
|
2182
2182
|
submit: N
|
|
2183
2183
|
};
|
|
2184
2184
|
}
|
|
2185
|
-
function
|
|
2185
|
+
function jt(e) {
|
|
2186
2186
|
const { overviewService: t } = se(), [r, n] = v(null), [s, i] = v(!1), [l, c] = v(!1), [d, u] = v(null), k = W(!1), w = W(null), p = K(async () => {
|
|
2187
2187
|
if (e) {
|
|
2188
2188
|
if (k.current) {
|
|
@@ -2224,7 +2224,7 @@ function qt(e) {
|
|
|
2224
2224
|
passOverview: b
|
|
2225
2225
|
};
|
|
2226
2226
|
}
|
|
2227
|
-
function
|
|
2227
|
+
function qt(e) {
|
|
2228
2228
|
const { identityService: t } = se(), [r, n] = v(
|
|
2229
2229
|
null
|
|
2230
2230
|
), [s, i] = v(!1), [l, c] = v(null), d = W(!1), u = K(
|
|
@@ -2668,10 +2668,10 @@ const Qt = ({
|
|
|
2668
2668
|
), b = (h) => {
|
|
2669
2669
|
i || (t.includes(h) ? r(t.filter((x) => x !== h)) : r([...t, h]));
|
|
2670
2670
|
}, m = (h, x) => {
|
|
2671
|
-
x.stopPropagation(), i || r(t.filter((
|
|
2671
|
+
x.stopPropagation(), i || r(t.filter((E) => E !== h));
|
|
2672
2672
|
}, N = (h) => {
|
|
2673
2673
|
var x;
|
|
2674
|
-
return ((x = n.find((
|
|
2674
|
+
return ((x = n.find((E) => E.value === h)) == null ? void 0 : x.label) || h;
|
|
2675
2675
|
};
|
|
2676
2676
|
return /* @__PURE__ */ o("div", { className: "w-full metakyc-multiselect", ref: w, children: [
|
|
2677
2677
|
e && /* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
@@ -2810,13 +2810,13 @@ const Qt = ({
|
|
|
2810
2810
|
}) => {
|
|
2811
2811
|
const [d, u] = v(!1), k = W(null), w = (x) => {
|
|
2812
2812
|
if (!x) return;
|
|
2813
|
-
const
|
|
2814
|
-
if (s &&
|
|
2815
|
-
const
|
|
2816
|
-
alert(`Some files exceed the maximum size of ${
|
|
2813
|
+
const E = Array.from(x);
|
|
2814
|
+
if (s && E.filter((I) => I.size > s).length > 0) {
|
|
2815
|
+
const I = Re(s);
|
|
2816
|
+
alert(`Some files exceed the maximum size of ${I}`);
|
|
2817
2817
|
return;
|
|
2818
2818
|
}
|
|
2819
|
-
i == null || i(n ? [...l, ...
|
|
2819
|
+
i == null || i(n ? [...l, ...E] : [E[0]]);
|
|
2820
2820
|
}, p = (x) => {
|
|
2821
2821
|
x.preventDefault(), u(!0);
|
|
2822
2822
|
}, b = () => {
|
|
@@ -2827,8 +2827,8 @@ const Qt = ({
|
|
|
2827
2827
|
var x;
|
|
2828
2828
|
(x = k.current) == null || x.click();
|
|
2829
2829
|
}, h = (x) => {
|
|
2830
|
-
const
|
|
2831
|
-
i == null || i(
|
|
2830
|
+
const E = l.filter((S, I) => I !== x);
|
|
2831
|
+
i == null || i(E);
|
|
2832
2832
|
};
|
|
2833
2833
|
return /* @__PURE__ */ o("div", { className: J("w-full", c), children: [
|
|
2834
2834
|
e && /* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: e }),
|
|
@@ -2887,7 +2887,7 @@ const Qt = ({
|
|
|
2887
2887
|
]
|
|
2888
2888
|
}
|
|
2889
2889
|
),
|
|
2890
|
-
l.length > 0 && /* @__PURE__ */ a("div", { className: "mt-3 space-y-2", children: l.map((x,
|
|
2890
|
+
l.length > 0 && /* @__PURE__ */ a("div", { className: "mt-3 space-y-2", children: l.map((x, E) => /* @__PURE__ */ o(
|
|
2891
2891
|
"div",
|
|
2892
2892
|
{
|
|
2893
2893
|
className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
|
|
@@ -2921,7 +2921,7 @@ const Qt = ({
|
|
|
2921
2921
|
{
|
|
2922
2922
|
type: "button",
|
|
2923
2923
|
onClick: (S) => {
|
|
2924
|
-
S.stopPropagation(), h(
|
|
2924
|
+
S.stopPropagation(), h(E);
|
|
2925
2925
|
},
|
|
2926
2926
|
className: "ml-2 text-danger-500 hover:text-danger-700 focus:outline-none",
|
|
2927
2927
|
children: /* @__PURE__ */ a("svg", { className: "h-5 w-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ a(
|
|
@@ -2936,7 +2936,7 @@ const Qt = ({
|
|
|
2936
2936
|
)
|
|
2937
2937
|
]
|
|
2938
2938
|
},
|
|
2939
|
-
|
|
2939
|
+
E
|
|
2940
2940
|
)) }),
|
|
2941
2941
|
t && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-danger-500", children: t })
|
|
2942
2942
|
] });
|
|
@@ -3158,10 +3158,10 @@ const ir = ({
|
|
|
3158
3158
|
[n]
|
|
3159
3159
|
), N = p === m.length - 1, h = m[p] ?? [], x = K((D, z) => {
|
|
3160
3160
|
u((g) => ({ ...g, [D]: z })), w((g) => {
|
|
3161
|
-
const
|
|
3162
|
-
return delete
|
|
3161
|
+
const P = { ...g };
|
|
3162
|
+
return delete P[D], P;
|
|
3163
3163
|
});
|
|
3164
|
-
}, []),
|
|
3164
|
+
}, []), E = K(() => {
|
|
3165
3165
|
const D = {};
|
|
3166
3166
|
for (const { question: z } of h) {
|
|
3167
3167
|
const g = nr(z, d[z.id] ?? []);
|
|
@@ -3169,16 +3169,16 @@ const ir = ({
|
|
|
3169
3169
|
}
|
|
3170
3170
|
return w((z) => ({ ...z, ...D })), Object.keys(D).length === 0;
|
|
3171
3171
|
}, [h, d]), S = () => {
|
|
3172
|
-
|
|
3173
|
-
},
|
|
3172
|
+
E() && b((D) => D + 1);
|
|
3173
|
+
}, I = () => {
|
|
3174
3174
|
p > 0 ? b((D) => D - 1) : r == null || r();
|
|
3175
3175
|
}, Y = async () => {
|
|
3176
|
-
if (!(!
|
|
3176
|
+
if (!(!E() || !n))
|
|
3177
3177
|
try {
|
|
3178
3178
|
const D = n.questionGroups.flatMap(
|
|
3179
|
-
(g) => (g.questions ?? []).map((
|
|
3180
|
-
questionId:
|
|
3181
|
-
values: d[
|
|
3179
|
+
(g) => (g.questions ?? []).map((P) => ({
|
|
3180
|
+
questionId: P.id,
|
|
3181
|
+
values: d[P.id] ?? []
|
|
3182
3182
|
}))
|
|
3183
3183
|
), z = {
|
|
3184
3184
|
applicantId: e,
|
|
@@ -3234,7 +3234,7 @@ const ir = ({
|
|
|
3234
3234
|
{
|
|
3235
3235
|
type: "button",
|
|
3236
3236
|
variant: "outline",
|
|
3237
|
-
onClick:
|
|
3237
|
+
onClick: I,
|
|
3238
3238
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3239
3239
|
children: [
|
|
3240
3240
|
/* @__PURE__ */ a(_e, { size: 14 }),
|
|
@@ -3296,38 +3296,78 @@ const ir = ({
|
|
|
3296
3296
|
required: e.isRequired
|
|
3297
3297
|
}
|
|
3298
3298
|
),
|
|
3299
|
-
i === "radio" && /* @__PURE__ */ o("div", { className: "
|
|
3300
|
-
(e.defaultAnswers ?? []).map((c) => /* @__PURE__ */ o(
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3299
|
+
i === "radio" && /* @__PURE__ */ o("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
3300
|
+
(e.defaultAnswers ?? []).map((c) => /* @__PURE__ */ o(
|
|
3301
|
+
"label",
|
|
3302
|
+
{
|
|
3303
|
+
className: "metakyc-option-label",
|
|
3304
|
+
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
3305
|
+
children: [
|
|
3306
|
+
/* @__PURE__ */ a(
|
|
3307
|
+
"input",
|
|
3308
|
+
{
|
|
3309
|
+
type: "radio",
|
|
3310
|
+
checked: t[0] === c,
|
|
3311
|
+
onChange: () => n([c]),
|
|
3312
|
+
className: "metakyc-option-input",
|
|
3313
|
+
style: {
|
|
3314
|
+
width: "16px",
|
|
3315
|
+
height: "16px",
|
|
3316
|
+
minWidth: "16px",
|
|
3317
|
+
flexShrink: 0,
|
|
3318
|
+
flexGrow: 0,
|
|
3319
|
+
accentColor: "var(--metakyc-primary, #2563eb)",
|
|
3320
|
+
cursor: "pointer",
|
|
3321
|
+
margin: 0,
|
|
3322
|
+
padding: 0,
|
|
3323
|
+
display: "inline-block",
|
|
3324
|
+
verticalAlign: "middle"
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
),
|
|
3328
|
+
/* @__PURE__ */ a("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: c })
|
|
3329
|
+
]
|
|
3330
|
+
},
|
|
3331
|
+
c
|
|
3332
|
+
)),
|
|
3313
3333
|
r && /* @__PURE__ */ a("p", { className: "text-sm text-danger-500", children: r })
|
|
3314
3334
|
] }),
|
|
3315
|
-
(i === "checkbox" || i === "multi-select") && /* @__PURE__ */ o("div", { className: "
|
|
3316
|
-
(e.defaultAnswers ?? []).map((c) => /* @__PURE__ */ o(
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3335
|
+
(i === "checkbox" || i === "multi-select") && /* @__PURE__ */ o("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
3336
|
+
(e.defaultAnswers ?? []).map((c) => /* @__PURE__ */ o(
|
|
3337
|
+
"label",
|
|
3338
|
+
{
|
|
3339
|
+
className: "metakyc-option-label",
|
|
3340
|
+
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
3341
|
+
children: [
|
|
3342
|
+
/* @__PURE__ */ a(
|
|
3343
|
+
"input",
|
|
3344
|
+
{
|
|
3345
|
+
type: "checkbox",
|
|
3346
|
+
checked: t.includes(c),
|
|
3347
|
+
onChange: (d) => {
|
|
3348
|
+
d.target.checked ? n([...t, c]) : n(t.filter((u) => u !== c));
|
|
3349
|
+
},
|
|
3350
|
+
className: "metakyc-option-input",
|
|
3351
|
+
style: {
|
|
3352
|
+
width: "16px",
|
|
3353
|
+
height: "16px",
|
|
3354
|
+
minWidth: "16px",
|
|
3355
|
+
flexShrink: 0,
|
|
3356
|
+
flexGrow: 0,
|
|
3357
|
+
accentColor: "var(--metakyc-primary, #2563eb)",
|
|
3358
|
+
cursor: "pointer",
|
|
3359
|
+
margin: 0,
|
|
3360
|
+
padding: 0,
|
|
3361
|
+
display: "inline-block",
|
|
3362
|
+
verticalAlign: "middle"
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
),
|
|
3366
|
+
/* @__PURE__ */ a("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: c })
|
|
3367
|
+
]
|
|
3368
|
+
},
|
|
3369
|
+
c
|
|
3370
|
+
)),
|
|
3331
3371
|
r && /* @__PURE__ */ a("p", { className: "text-sm text-danger-500", children: r })
|
|
3332
3372
|
] }),
|
|
3333
3373
|
r && i === "text" && null
|
|
@@ -3337,7 +3377,7 @@ const ir = ({
|
|
|
3337
3377
|
onComplete: t,
|
|
3338
3378
|
onBack: r
|
|
3339
3379
|
}) => {
|
|
3340
|
-
const { uploadDocument: n, isLoading: s, isSubmitting: i, error: l, submit: c } =
|
|
3380
|
+
const { uploadDocument: n, isLoading: s, isSubmitting: i, error: l, submit: c } = Ht(e), [d, u] = v({}), k = async (w) => {
|
|
3341
3381
|
if (w.preventDefault(), !n) return;
|
|
3342
3382
|
const p = await Promise.all(
|
|
3343
3383
|
n.uploadDocumentFiles.map(async (m) => {
|
|
@@ -3387,7 +3427,7 @@ const ir = ({
|
|
|
3387
3427
|
] })
|
|
3388
3428
|
] }) }) : null;
|
|
3389
3429
|
}, cr = ({ applicantId: e, onComplete: t, onBack: r }) => {
|
|
3390
|
-
const { overview: n, isLoading: s, isSubmitting: i, error: l, passOverview: c } =
|
|
3430
|
+
const { overview: n, isLoading: s, isSubmitting: i, error: l, passOverview: c } = jt(e), d = async () => {
|
|
3391
3431
|
await c(), t == null || t();
|
|
3392
3432
|
};
|
|
3393
3433
|
return s ? /* @__PURE__ */ a(M, { children: /* @__PURE__ */ a(T, { children: /* @__PURE__ */ a(ce, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ a(M, { children: /* @__PURE__ */ a(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
@@ -3471,31 +3511,31 @@ const pr = ({
|
|
|
3471
3511
|
const { criteria: n, isLoading: s, isSubmitting: i, error: l, submit: c } = Yt(e), [d, u] = v({}), [k, w] = v({}), [p, b] = v(0), [m, N] = v(!1), h = Ae(
|
|
3472
3512
|
() => n && n.length > 0 ? ur(n) : [],
|
|
3473
3513
|
[n]
|
|
3474
|
-
), x = p === h.length - 1,
|
|
3514
|
+
), x = p === h.length - 1, E = h[p] ?? [];
|
|
3475
3515
|
ie.useEffect(() => {
|
|
3476
3516
|
!s && n && n.length === 0 && !m && !i && (N(!0), c({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
|
|
3477
3517
|
}, [s, n, m, i, c, e, t]);
|
|
3478
|
-
const S = K((g,
|
|
3479
|
-
u((F) => ({ ...F, [g]:
|
|
3518
|
+
const S = K((g, P) => {
|
|
3519
|
+
u((F) => ({ ...F, [g]: P })), w((F) => {
|
|
3480
3520
|
const G = { ...F };
|
|
3481
3521
|
return delete G[g], G;
|
|
3482
3522
|
});
|
|
3483
|
-
}, []),
|
|
3523
|
+
}, []), I = K(() => {
|
|
3484
3524
|
const g = {};
|
|
3485
|
-
for (const { criterion:
|
|
3486
|
-
const F = dr(
|
|
3487
|
-
F && (g[
|
|
3525
|
+
for (const { criterion: P } of E) {
|
|
3526
|
+
const F = dr(P, d[P.id] ?? []);
|
|
3527
|
+
F && (g[P.id] = F);
|
|
3488
3528
|
}
|
|
3489
|
-
return w((
|
|
3490
|
-
}, [
|
|
3491
|
-
|
|
3529
|
+
return w((P) => ({ ...P, ...g })), Object.keys(g).length === 0;
|
|
3530
|
+
}, [E, d]), Y = () => {
|
|
3531
|
+
I() && b((g) => g + 1);
|
|
3492
3532
|
}, D = () => {
|
|
3493
3533
|
p > 0 ? b((g) => g - 1) : r == null || r();
|
|
3494
3534
|
}, z = async () => {
|
|
3495
|
-
if (!(!
|
|
3535
|
+
if (!(!I() || !n))
|
|
3496
3536
|
try {
|
|
3497
3537
|
const g = n.map((F) => {
|
|
3498
|
-
const G = (d[F.id] ?? []).filter((
|
|
3538
|
+
const G = (d[F.id] ?? []).filter((j) => j && j.trim());
|
|
3499
3539
|
return G.length > 0 ? { riskCriteriaId: F.id, values: G } : null;
|
|
3500
3540
|
}).filter((F) => F !== null);
|
|
3501
3541
|
await c({ applicantId: e, criteriaValueInputs: g }), t == null || t();
|
|
@@ -3523,27 +3563,27 @@ const pr = ({
|
|
|
3523
3563
|
" of ",
|
|
3524
3564
|
h.length
|
|
3525
3565
|
] }),
|
|
3526
|
-
/* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children: h.map((g,
|
|
3566
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children: h.map((g, P) => /* @__PURE__ */ a(
|
|
3527
3567
|
"div",
|
|
3528
3568
|
{
|
|
3529
3569
|
className: "rounded-full transition-all duration-200",
|
|
3530
3570
|
style: {
|
|
3531
3571
|
height: "6px",
|
|
3532
|
-
width:
|
|
3533
|
-
backgroundColor:
|
|
3572
|
+
width: P === p ? "20px" : "6px",
|
|
3573
|
+
backgroundColor: P <= p ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
3534
3574
|
}
|
|
3535
3575
|
},
|
|
3536
|
-
|
|
3576
|
+
P
|
|
3537
3577
|
)) })
|
|
3538
3578
|
] })
|
|
3539
3579
|
] }),
|
|
3540
|
-
/* @__PURE__ */ a(T, { className: "space-y-6", children:
|
|
3580
|
+
/* @__PURE__ */ a(T, { className: "space-y-6", children: E.map(({ criterion: g }) => /* @__PURE__ */ a(
|
|
3541
3581
|
hr,
|
|
3542
3582
|
{
|
|
3543
3583
|
criterion: g,
|
|
3544
3584
|
value: d[g.id] ?? [],
|
|
3545
3585
|
error: k[g.id],
|
|
3546
|
-
onChange: (
|
|
3586
|
+
onChange: (P) => S(g.id, P)
|
|
3547
3587
|
},
|
|
3548
3588
|
g.id
|
|
3549
3589
|
)) }),
|
|
@@ -3601,38 +3641,78 @@ const pr = ({
|
|
|
3601
3641
|
}
|
|
3602
3642
|
}
|
|
3603
3643
|
),
|
|
3604
|
-
s === "radio" && /* @__PURE__ */ o("div", { className: "
|
|
3605
|
-
(e.defaultValues ?? []).map((l) => /* @__PURE__ */ o(
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3644
|
+
s === "radio" && /* @__PURE__ */ o("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
3645
|
+
(e.defaultValues ?? []).map((l) => /* @__PURE__ */ o(
|
|
3646
|
+
"label",
|
|
3647
|
+
{
|
|
3648
|
+
className: "metakyc-option-label",
|
|
3649
|
+
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
3650
|
+
children: [
|
|
3651
|
+
/* @__PURE__ */ a(
|
|
3652
|
+
"input",
|
|
3653
|
+
{
|
|
3654
|
+
type: "radio",
|
|
3655
|
+
checked: t[0] === l,
|
|
3656
|
+
onChange: () => n([l]),
|
|
3657
|
+
className: "metakyc-option-input",
|
|
3658
|
+
style: {
|
|
3659
|
+
width: "16px",
|
|
3660
|
+
height: "16px",
|
|
3661
|
+
minWidth: "16px",
|
|
3662
|
+
flexShrink: 0,
|
|
3663
|
+
flexGrow: 0,
|
|
3664
|
+
accentColor: "var(--metakyc-primary, #2563eb)",
|
|
3665
|
+
cursor: "pointer",
|
|
3666
|
+
margin: 0,
|
|
3667
|
+
padding: 0,
|
|
3668
|
+
display: "inline-block",
|
|
3669
|
+
verticalAlign: "middle"
|
|
3670
|
+
}
|
|
3671
|
+
}
|
|
3672
|
+
),
|
|
3673
|
+
/* @__PURE__ */ a("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: l })
|
|
3674
|
+
]
|
|
3675
|
+
},
|
|
3676
|
+
l
|
|
3677
|
+
)),
|
|
3618
3678
|
r && /* @__PURE__ */ a("p", { className: "text-sm text-danger-500", children: r })
|
|
3619
3679
|
] }),
|
|
3620
|
-
s === "checkbox" && /* @__PURE__ */ o("div", { className: "
|
|
3621
|
-
(e.defaultValues ?? []).map((l) => /* @__PURE__ */ o(
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3680
|
+
s === "checkbox" && /* @__PURE__ */ o("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
3681
|
+
(e.defaultValues ?? []).map((l) => /* @__PURE__ */ o(
|
|
3682
|
+
"label",
|
|
3683
|
+
{
|
|
3684
|
+
className: "metakyc-option-label",
|
|
3685
|
+
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
3686
|
+
children: [
|
|
3687
|
+
/* @__PURE__ */ a(
|
|
3688
|
+
"input",
|
|
3689
|
+
{
|
|
3690
|
+
type: "checkbox",
|
|
3691
|
+
checked: t.includes(l),
|
|
3692
|
+
onChange: (c) => {
|
|
3693
|
+
c.target.checked ? n([...t, l]) : n(t.filter((d) => d !== l));
|
|
3694
|
+
},
|
|
3695
|
+
className: "metakyc-option-input",
|
|
3696
|
+
style: {
|
|
3697
|
+
width: "16px",
|
|
3698
|
+
height: "16px",
|
|
3699
|
+
minWidth: "16px",
|
|
3700
|
+
flexShrink: 0,
|
|
3701
|
+
flexGrow: 0,
|
|
3702
|
+
accentColor: "var(--metakyc-primary, #2563eb)",
|
|
3703
|
+
cursor: "pointer",
|
|
3704
|
+
margin: 0,
|
|
3705
|
+
padding: 0,
|
|
3706
|
+
display: "inline-block",
|
|
3707
|
+
verticalAlign: "middle"
|
|
3708
|
+
}
|
|
3709
|
+
}
|
|
3710
|
+
),
|
|
3711
|
+
/* @__PURE__ */ a("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: l })
|
|
3712
|
+
]
|
|
3713
|
+
},
|
|
3714
|
+
l
|
|
3715
|
+
)),
|
|
3636
3716
|
r && /* @__PURE__ */ a("p", { className: "text-sm text-danger-500", children: r })
|
|
3637
3717
|
] }),
|
|
3638
3718
|
s === "country" && /* @__PURE__ */ a(
|
|
@@ -3796,15 +3876,15 @@ const pr = ({
|
|
|
3796
3876
|
onComplete: t,
|
|
3797
3877
|
onBack: r
|
|
3798
3878
|
}) => {
|
|
3799
|
-
const { appropriatenessTestService: n } = se(), [s, i] = v(null), [l, c] = v(!0), [d, u] = v(!1), [k, w] = v(null), [p, b] = v({}), [m, N] = v(0), [h, x] = v(!1), [
|
|
3879
|
+
const { appropriatenessTestService: n } = se(), [s, i] = v(null), [l, c] = v(!0), [d, u] = v(!1), [k, w] = v(null), [p, b] = v({}), [m, N] = v(0), [h, x] = v(!1), [E, S] = v(!1), [I, Y] = v(0);
|
|
3800
3880
|
V(() => {
|
|
3801
3881
|
(async () => {
|
|
3802
3882
|
try {
|
|
3803
3883
|
c(!0), w(null), console.log("Loading appropriateness test for applicant:", e);
|
|
3804
3884
|
const C = await n.getAppropriatenessTest(e);
|
|
3805
3885
|
if (console.log("Appropriateness test data:", C), i(C), C.waitTimeSpanForNextTry && C.waitTimeSpanForNextTry !== "00:00:00") {
|
|
3806
|
-
const
|
|
3807
|
-
|
|
3886
|
+
const q = D(C.waitTimeSpanForNextTry);
|
|
3887
|
+
q > 0 && Y(q);
|
|
3808
3888
|
}
|
|
3809
3889
|
} catch (C) {
|
|
3810
3890
|
console.error("Error loading appropriateness test:", C), w(C.message || "Failed to load appropriateness test");
|
|
@@ -3816,13 +3896,13 @@ const pr = ({
|
|
|
3816
3896
|
const D = (R) => {
|
|
3817
3897
|
const C = R.split(":").map(Number);
|
|
3818
3898
|
if (C.length === 3) {
|
|
3819
|
-
const [
|
|
3820
|
-
return
|
|
3899
|
+
const [q, f, L] = C;
|
|
3900
|
+
return q * 3600 + f * 60 + L;
|
|
3821
3901
|
}
|
|
3822
3902
|
return 0;
|
|
3823
3903
|
}, z = (R) => {
|
|
3824
|
-
const C = Math.floor(R / 60),
|
|
3825
|
-
return `${C.toString().padStart(2, "0")}:${
|
|
3904
|
+
const C = Math.floor(R / 60), q = R % 60;
|
|
3905
|
+
return `${C.toString().padStart(2, "0")}:${q.toString().padStart(2, "0")}`;
|
|
3826
3906
|
};
|
|
3827
3907
|
V(() => {
|
|
3828
3908
|
if (!h || m <= 0) return;
|
|
@@ -3831,24 +3911,24 @@ const pr = ({
|
|
|
3831
3911
|
}, 1e3);
|
|
3832
3912
|
return () => clearInterval(R);
|
|
3833
3913
|
}, [h, m]), V(() => {
|
|
3834
|
-
if (
|
|
3914
|
+
if (I <= 0) return;
|
|
3835
3915
|
const R = setInterval(() => {
|
|
3836
3916
|
Y((C) => C <= 1 ? 0 : C - 1);
|
|
3837
3917
|
}, 1e3);
|
|
3838
3918
|
return () => clearInterval(R);
|
|
3839
|
-
}, [
|
|
3840
|
-
|
|
3841
|
-
}, [
|
|
3919
|
+
}, [I]), V(() => {
|
|
3920
|
+
E && !d && F();
|
|
3921
|
+
}, [E]);
|
|
3842
3922
|
const g = () => {
|
|
3843
3923
|
s && (x(!0), N(s.testDurationSec));
|
|
3844
|
-
},
|
|
3845
|
-
b((
|
|
3846
|
-
...
|
|
3924
|
+
}, P = (R, C) => {
|
|
3925
|
+
b((q) => ({
|
|
3926
|
+
...q,
|
|
3847
3927
|
[R]: C
|
|
3848
3928
|
}));
|
|
3849
3929
|
}, F = async (R) => {
|
|
3850
3930
|
if (R && R.preventDefault(), !!s) {
|
|
3851
|
-
if (!
|
|
3931
|
+
if (!E) {
|
|
3852
3932
|
const C = s.appropriatenessQuestions.length - Object.keys(p).length;
|
|
3853
3933
|
if (C > 0) {
|
|
3854
3934
|
w(`Please answer all questions. ${C} question(s) remaining.`);
|
|
@@ -3863,19 +3943,19 @@ const pr = ({
|
|
|
3863
3943
|
value: p[f.id] || ""
|
|
3864
3944
|
// Empty string if not answered
|
|
3865
3945
|
})
|
|
3866
|
-
),
|
|
3946
|
+
), q = {
|
|
3867
3947
|
applicantId: e,
|
|
3868
3948
|
appropriatenessTestId: s.id,
|
|
3869
3949
|
appropriatenessQuestionResults: C
|
|
3870
3950
|
};
|
|
3871
|
-
console.log("Submitting appropriateness test:",
|
|
3951
|
+
console.log("Submitting appropriateness test:", q);
|
|
3872
3952
|
try {
|
|
3873
|
-
const f = await n.fillAppropriatenessTest(
|
|
3953
|
+
const f = await n.fillAppropriatenessTest(q);
|
|
3874
3954
|
console.log("Appropriateness test result:", f), f.message && (f.message.toLowerCase().includes("pass") || f.message.toLowerCase().includes("success") || f.message.toLowerCase().includes("congratulations")) ? t == null || t() : (w(f.message || "Test completed. Please check the result."), x(!1), S(!1), b({}), setTimeout(() => G(), 1e3));
|
|
3875
3955
|
} catch (f) {
|
|
3876
3956
|
if (f.code === 400 && f.message) {
|
|
3877
|
-
const
|
|
3878
|
-
console.log("Test failed:",
|
|
3957
|
+
const L = f.message;
|
|
3958
|
+
console.log("Test failed:", L), w(L), x(!1), S(!1), b({}), setTimeout(() => G(), 1500);
|
|
3879
3959
|
} else
|
|
3880
3960
|
throw f;
|
|
3881
3961
|
}
|
|
@@ -3908,7 +3988,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3908
3988
|
/* @__PURE__ */ a("p", { className: "text-danger-500 text-lg mb-4", children: "No test data available" }),
|
|
3909
3989
|
k && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: k })
|
|
3910
3990
|
] }) });
|
|
3911
|
-
if (
|
|
3991
|
+
if (I > 0)
|
|
3912
3992
|
return /* @__PURE__ */ o(M, { children: [
|
|
3913
3993
|
/* @__PURE__ */ o(te, { children: [
|
|
3914
3994
|
/* @__PURE__ */ a("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: s.displayName }),
|
|
@@ -3916,13 +3996,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3916
3996
|
] }),
|
|
3917
3997
|
/* @__PURE__ */ o(T, { className: "py-12 text-center", children: [
|
|
3918
3998
|
/* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
3919
|
-
/* @__PURE__ */ a("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: z(
|
|
3999
|
+
/* @__PURE__ */ a("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: z(I) }),
|
|
3920
4000
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
|
|
3921
4001
|
] }),
|
|
3922
4002
|
k && /* @__PURE__ */ a("div", { className: "mt-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ a("p", { className: "text-red-600 dark:text-red-400 text-sm", children: k }) })
|
|
3923
4003
|
] })
|
|
3924
4004
|
] });
|
|
3925
|
-
const
|
|
4005
|
+
const j = s.testAllowedMaxTry - s.totalFailedTries;
|
|
3926
4006
|
return h ? /* @__PURE__ */ a("form", { onSubmit: F, children: /* @__PURE__ */ o(M, { children: [
|
|
3927
4007
|
/* @__PURE__ */ a(te, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
3928
4008
|
/* @__PURE__ */ o("div", { children: [
|
|
@@ -3948,10 +4028,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3948
4028
|
" of ",
|
|
3949
4029
|
s.totalQuestionCount
|
|
3950
4030
|
] }),
|
|
3951
|
-
/* @__PURE__ */ o(pe, { variant:
|
|
3952
|
-
|
|
4031
|
+
/* @__PURE__ */ o(pe, { variant: j > 1 ? "success" : "warning", children: [
|
|
4032
|
+
j,
|
|
3953
4033
|
" attempt",
|
|
3954
|
-
|
|
4034
|
+
j !== 1 ? "s" : "",
|
|
3955
4035
|
" remaining"
|
|
3956
4036
|
] })
|
|
3957
4037
|
] }),
|
|
@@ -3968,12 +4048,12 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3968
4048
|
R.groupName && /* @__PURE__ */ a("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: R.groupName }),
|
|
3969
4049
|
/* @__PURE__ */ a("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: R.question })
|
|
3970
4050
|
] }),
|
|
3971
|
-
/* @__PURE__ */ a("div", { className: "space-y-2", children: R.answers.map((
|
|
4051
|
+
/* @__PURE__ */ a("div", { className: "space-y-2", children: R.answers.map((q, f) => /* @__PURE__ */ o(
|
|
3972
4052
|
"label",
|
|
3973
4053
|
{
|
|
3974
4054
|
className: `
|
|
3975
4055
|
flex items-center p-3 border-2 rounded-lg cursor-pointer transition-all
|
|
3976
|
-
${p[R.id] ===
|
|
4056
|
+
${p[R.id] === q ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
|
|
3977
4057
|
`,
|
|
3978
4058
|
children: [
|
|
3979
4059
|
/* @__PURE__ */ a(
|
|
@@ -3981,14 +4061,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3981
4061
|
{
|
|
3982
4062
|
type: "radio",
|
|
3983
4063
|
name: `question-${R.id}`,
|
|
3984
|
-
value:
|
|
3985
|
-
checked: p[R.id] ===
|
|
3986
|
-
onChange: (
|
|
4064
|
+
value: q,
|
|
4065
|
+
checked: p[R.id] === q,
|
|
4066
|
+
onChange: (L) => P(R.id, L.target.value),
|
|
3987
4067
|
className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500",
|
|
3988
4068
|
disabled: d
|
|
3989
4069
|
}
|
|
3990
4070
|
),
|
|
3991
|
-
/* @__PURE__ */ a("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children:
|
|
4071
|
+
/* @__PURE__ */ a("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: q })
|
|
3992
4072
|
]
|
|
3993
4073
|
},
|
|
3994
4074
|
f
|
|
@@ -3997,12 +4077,12 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3997
4077
|
},
|
|
3998
4078
|
R.id
|
|
3999
4079
|
)),
|
|
4000
|
-
k && !
|
|
4080
|
+
k && !E && /* @__PURE__ */ a("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
|
|
4001
4081
|
/* @__PURE__ */ a("strong", { children: "Error:" }),
|
|
4002
4082
|
" ",
|
|
4003
4083
|
k
|
|
4004
4084
|
] }) }),
|
|
4005
|
-
|
|
4085
|
+
E && /* @__PURE__ */ a("div", { className: "p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-yellow-700 dark:text-yellow-400 text-sm", children: [
|
|
4006
4086
|
/* @__PURE__ */ a("strong", { children: "Time's up!" }),
|
|
4007
4087
|
" Your answers are being submitted automatically."
|
|
4008
4088
|
] }) })
|
|
@@ -4024,7 +4104,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4024
4104
|
type: "submit",
|
|
4025
4105
|
isLoading: d,
|
|
4026
4106
|
disabled: Object.keys(p).length < s.totalQuestionCount,
|
|
4027
|
-
children:
|
|
4107
|
+
children: E ? "Submitting..." : "Submit Test"
|
|
4028
4108
|
}
|
|
4029
4109
|
)
|
|
4030
4110
|
] })
|
|
@@ -4050,7 +4130,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4050
4130
|
] }),
|
|
4051
4131
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4052
4132
|
/* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
|
|
4053
|
-
/* @__PURE__ */ a(pe, { variant:
|
|
4133
|
+
/* @__PURE__ */ a(pe, { variant: j > 1 ? "success" : "warning", children: j })
|
|
4054
4134
|
] })
|
|
4055
4135
|
] }),
|
|
4056
4136
|
k && /* @__PURE__ */ a("div", { className: "mb-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
|
|
@@ -4058,7 +4138,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4058
4138
|
" ",
|
|
4059
4139
|
k
|
|
4060
4140
|
] }) }),
|
|
4061
|
-
|
|
4141
|
+
j <= 0 && /* @__PURE__ */ a("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ a("p", { className: "text-red-600 dark:text-red-400", children: "You have used all your attempts. Please contact support for assistance." }) })
|
|
4062
4142
|
] }),
|
|
4063
4143
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
4064
4144
|
r && /* @__PURE__ */ a(U, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
@@ -4067,7 +4147,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4067
4147
|
{
|
|
4068
4148
|
type: "button",
|
|
4069
4149
|
onClick: g,
|
|
4070
|
-
disabled:
|
|
4150
|
+
disabled: j <= 0,
|
|
4071
4151
|
children: "Start Test"
|
|
4072
4152
|
}
|
|
4073
4153
|
)
|
|
@@ -4078,8 +4158,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4078
4158
|
onComplete: t,
|
|
4079
4159
|
onBack: r
|
|
4080
4160
|
}) => {
|
|
4081
|
-
var
|
|
4082
|
-
const { applicantService: n, baseInformationService: s, config: i } = se(), { identityData: l, provider: c, token: d, isLoading: u, error: k, requestIdentity: w, restartIdentity: p } =
|
|
4161
|
+
var q, f, L, $;
|
|
4162
|
+
const { applicantService: n, baseInformationService: s, config: i } = se(), { identityData: l, provider: c, token: d, isLoading: u, error: k, requestIdentity: w, restartIdentity: p } = qt(e), [b, m] = v(null), [N, h] = v(null), [x, E] = v([]), [S, I] = v(!0), [Y, D] = v(!1), [z, g] = v(null), [P, F] = v(!1), G = ie.useRef(!1), j = Ve({
|
|
4083
4163
|
defaultValues: {
|
|
4084
4164
|
street: "",
|
|
4085
4165
|
streetNumber: "",
|
|
@@ -4099,12 +4179,12 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4099
4179
|
]);
|
|
4100
4180
|
h(y);
|
|
4101
4181
|
const Q = /* @__PURE__ */ new Set(), X = B.filter((me) => {
|
|
4102
|
-
const
|
|
4103
|
-
return !
|
|
4182
|
+
const Ee = me.abbreviation3 || me.abbreviation;
|
|
4183
|
+
return !Ee || Q.has(Ee) ? !1 : (Q.add(Ee), !0);
|
|
4104
4184
|
});
|
|
4105
|
-
|
|
4185
|
+
E(X);
|
|
4106
4186
|
const _ = y.applicantRequestData;
|
|
4107
|
-
if (
|
|
4187
|
+
if (j.reset({
|
|
4108
4188
|
street: (_ == null ? void 0 : _.street) || "",
|
|
4109
4189
|
streetNumber: (_ == null ? void 0 : _.streetNumber) || "",
|
|
4110
4190
|
city: (_ == null ? void 0 : _.city) || "",
|
|
@@ -4123,7 +4203,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4123
4203
|
} catch (y) {
|
|
4124
4204
|
console.error("Error loading applicant data:", y);
|
|
4125
4205
|
} finally {
|
|
4126
|
-
|
|
4206
|
+
I(!1);
|
|
4127
4207
|
}
|
|
4128
4208
|
})();
|
|
4129
4209
|
}, [e]), V(() => {
|
|
@@ -4153,7 +4233,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4153
4233
|
}
|
|
4154
4234
|
}
|
|
4155
4235
|
}, [d]), V(() => {
|
|
4156
|
-
if (c !== null && d && !b && Y && !
|
|
4236
|
+
if (c !== null && d && !b && Y && !P) {
|
|
4157
4237
|
const A = c;
|
|
4158
4238
|
if (d.url) {
|
|
4159
4239
|
console.log("[Identity] Loading provider URL for user verification:", d.url), g(null);
|
|
@@ -4219,7 +4299,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4219
4299
|
console.error("[Identity] Error destroying provider:", A);
|
|
4220
4300
|
}
|
|
4221
4301
|
};
|
|
4222
|
-
}, [c, d, b, Y, t,
|
|
4302
|
+
}, [c, d, b, Y, t, P]);
|
|
4223
4303
|
const R = async () => {
|
|
4224
4304
|
try {
|
|
4225
4305
|
g(null), F(!1), await w(), D(!0);
|
|
@@ -4243,7 +4323,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4243
4323
|
"Error: ",
|
|
4244
4324
|
k.message
|
|
4245
4325
|
] }) }) });
|
|
4246
|
-
if (Y && (z ||
|
|
4326
|
+
if (Y && (z || P))
|
|
4247
4327
|
return /* @__PURE__ */ o(M, { children: [
|
|
4248
4328
|
/* @__PURE__ */ a(te, { children: /* @__PURE__ */ a("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
|
|
4249
4329
|
/* @__PURE__ */ o(T, { children: [
|
|
@@ -4267,7 +4347,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4267
4347
|
}
|
|
4268
4348
|
),
|
|
4269
4349
|
/* @__PURE__ */ o("div", { children: [
|
|
4270
|
-
/* @__PURE__ */ a("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children:
|
|
4350
|
+
/* @__PURE__ */ a("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: P ? "Session Expired" : "Verification Error" }),
|
|
4271
4351
|
/* @__PURE__ */ a("p", { className: "text-red-800 dark:text-red-200 text-sm", children: z || "Your verification session has expired and needs to be restarted." })
|
|
4272
4352
|
] })
|
|
4273
4353
|
] }) }),
|
|
@@ -4321,9 +4401,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4321
4401
|
var B, Q, X;
|
|
4322
4402
|
console.log("[Identity] Iframe loaded");
|
|
4323
4403
|
try {
|
|
4324
|
-
const _ = y.target,
|
|
4325
|
-
if (
|
|
4326
|
-
const me = ((X = (Q =
|
|
4404
|
+
const _ = y.target, Ie = _.contentDocument || ((B = _.contentWindow) == null ? void 0 : B.document);
|
|
4405
|
+
if (Ie) {
|
|
4406
|
+
const me = ((X = (Q = Ie.body) == null ? void 0 : Q.textContent) == null ? void 0 : X.toLowerCase()) || "";
|
|
4327
4407
|
(me.includes("expired") || me.includes("invalid") || me.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), F(!0), g("Your verification link has expired."));
|
|
4328
4408
|
}
|
|
4329
4409
|
} catch {
|
|
@@ -4353,7 +4433,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4353
4433
|
r && /* @__PURE__ */ a(ne, { children: /* @__PURE__ */ a(U, { variant: "outline", onClick: r, children: "Back" }) })
|
|
4354
4434
|
] });
|
|
4355
4435
|
}
|
|
4356
|
-
return /* @__PURE__ */ a("form", { onSubmit:
|
|
4436
|
+
return /* @__PURE__ */ a("form", { onSubmit: j.handleSubmit(R), children: /* @__PURE__ */ o(M, { children: [
|
|
4357
4437
|
/* @__PURE__ */ o(te, { children: [
|
|
4358
4438
|
/* @__PURE__ */ a("h2", { className: "text-2xl font-bold", children: "Review Your Information" }),
|
|
4359
4439
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please review and confirm your information before starting identity verification" })
|
|
@@ -4363,14 +4443,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4363
4443
|
/* @__PURE__ */ o("div", { children: [
|
|
4364
4444
|
/* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Name" }),
|
|
4365
4445
|
/* @__PURE__ */ o("p", { className: "mt-1 text-base", children: [
|
|
4366
|
-
(
|
|
4446
|
+
(q = N == null ? void 0 : N.applicantRequestData) == null ? void 0 : q.firstName,
|
|
4367
4447
|
" ",
|
|
4368
4448
|
(f = N == null ? void 0 : N.applicantRequestData) == null ? void 0 : f.lastName
|
|
4369
4449
|
] })
|
|
4370
4450
|
] }),
|
|
4371
4451
|
/* @__PURE__ */ o("div", { children: [
|
|
4372
4452
|
/* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Email" }),
|
|
4373
|
-
/* @__PURE__ */ a("p", { className: "mt-1 text-base", children: (
|
|
4453
|
+
/* @__PURE__ */ a("p", { className: "mt-1 text-base", children: (L = N == null ? void 0 : N.applicantRequestData) == null ? void 0 : L.email })
|
|
4374
4454
|
] }),
|
|
4375
4455
|
/* @__PURE__ */ o("div", { children: [
|
|
4376
4456
|
/* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Date of Birth" }),
|
|
@@ -4383,7 +4463,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4383
4463
|
/* @__PURE__ */ a(
|
|
4384
4464
|
ye,
|
|
4385
4465
|
{
|
|
4386
|
-
control:
|
|
4466
|
+
control: j.control,
|
|
4387
4467
|
name: "country",
|
|
4388
4468
|
render: ({ field: A }) => /* @__PURE__ */ a(
|
|
4389
4469
|
ge,
|
|
@@ -4404,7 +4484,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4404
4484
|
/* @__PURE__ */ a(
|
|
4405
4485
|
ye,
|
|
4406
4486
|
{
|
|
4407
|
-
control:
|
|
4487
|
+
control: j.control,
|
|
4408
4488
|
name: "nationality",
|
|
4409
4489
|
render: ({ field: A }) => /* @__PURE__ */ a(
|
|
4410
4490
|
ge,
|
|
@@ -4427,7 +4507,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4427
4507
|
/* @__PURE__ */ a(
|
|
4428
4508
|
ye,
|
|
4429
4509
|
{
|
|
4430
|
-
control:
|
|
4510
|
+
control: j.control,
|
|
4431
4511
|
name: "street",
|
|
4432
4512
|
render: ({ field: A }) => /* @__PURE__ */ a(ae, { ...A, label: "Street" })
|
|
4433
4513
|
}
|
|
@@ -4435,7 +4515,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4435
4515
|
/* @__PURE__ */ a(
|
|
4436
4516
|
ye,
|
|
4437
4517
|
{
|
|
4438
|
-
control:
|
|
4518
|
+
control: j.control,
|
|
4439
4519
|
name: "streetNumber",
|
|
4440
4520
|
render: ({ field: A }) => /* @__PURE__ */ a(ae, { ...A, label: "Street Number" })
|
|
4441
4521
|
}
|
|
@@ -4445,7 +4525,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4445
4525
|
/* @__PURE__ */ a(
|
|
4446
4526
|
ye,
|
|
4447
4527
|
{
|
|
4448
|
-
control:
|
|
4528
|
+
control: j.control,
|
|
4449
4529
|
name: "city",
|
|
4450
4530
|
render: ({ field: A }) => /* @__PURE__ */ a(ae, { ...A, label: "City" })
|
|
4451
4531
|
}
|
|
@@ -4453,7 +4533,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4453
4533
|
/* @__PURE__ */ a(
|
|
4454
4534
|
ye,
|
|
4455
4535
|
{
|
|
4456
|
-
control:
|
|
4536
|
+
control: j.control,
|
|
4457
4537
|
name: "zip",
|
|
4458
4538
|
render: ({ field: A }) => /* @__PURE__ */ a(ae, { ...A, label: "ZIP/Postal Code" })
|
|
4459
4539
|
}
|
|
@@ -4462,7 +4542,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4462
4542
|
/* @__PURE__ */ a(
|
|
4463
4543
|
ye,
|
|
4464
4544
|
{
|
|
4465
|
-
control:
|
|
4545
|
+
control: j.control,
|
|
4466
4546
|
name: "phonenumber",
|
|
4467
4547
|
render: ({ field: A }) => /* @__PURE__ */ a(ae, { ...A, label: "Phone Number", type: "tel" })
|
|
4468
4548
|
}
|
|
@@ -4658,27 +4738,27 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4658
4738
|
onSuccess: r,
|
|
4659
4739
|
onCancel: n
|
|
4660
4740
|
}) => {
|
|
4661
|
-
var R, C,
|
|
4662
|
-
const { config: s, baseInformationService: i, currentTheme: l } = se(), { createApplicant: c, isLoading: d } = Wt(), [u, k] = v([]), [w, p] = v(!0), [b, m] = v(!1), [N, h] = v(null), x = W(!1),
|
|
4741
|
+
var R, C, q;
|
|
4742
|
+
const { config: s, baseInformationService: i, currentTheme: l } = se(), { createApplicant: c, isLoading: d } = Wt(), [u, k] = v([]), [w, p] = v(!0), [b, m] = v(!1), [N, h] = v(null), x = W(!1), E = W(!1), S = e || ((R = s.applicantForm) == null ? void 0 : R.workflowKey);
|
|
4663
4743
|
if (!S)
|
|
4664
4744
|
throw new Error(
|
|
4665
4745
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
4666
4746
|
);
|
|
4667
|
-
const
|
|
4668
|
-
const f = new Set(Y),
|
|
4669
|
-
if (
|
|
4670
|
-
for (const $ of
|
|
4747
|
+
const I = t || ((C = s.applicantForm) == null ? void 0 : C.externalRefId) || "", Y = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"], D = ie.useMemo(() => {
|
|
4748
|
+
const f = new Set(Y), L = l == null ? void 0 : l.applicantFormRequiredFields;
|
|
4749
|
+
if (L && L.length > 0)
|
|
4750
|
+
for (const $ of L)
|
|
4671
4751
|
f.add($);
|
|
4672
4752
|
return Array.from(f);
|
|
4673
4753
|
}, [l == null ? void 0 : l.applicantFormRequiredFields]), z = ie.useMemo(() => {
|
|
4674
4754
|
var $;
|
|
4675
4755
|
let f;
|
|
4676
4756
|
($ = s.applicantForm) != null && $.visibleFields ? f = s.applicantForm.visibleFields : l != null && l.applicantFormVisibleFields && l.applicantFormVisibleFields.length > 0 ? f = l.applicantFormVisibleFields : f = ot;
|
|
4677
|
-
const
|
|
4757
|
+
const L = new Set(f);
|
|
4678
4758
|
for (const A of Y)
|
|
4679
|
-
|
|
4680
|
-
return Array.from(
|
|
4681
|
-
}, [(
|
|
4759
|
+
L.add(A);
|
|
4760
|
+
return Array.from(L);
|
|
4761
|
+
}, [(q = s.applicantForm) == null ? void 0 : q.visibleFields, l == null ? void 0 : l.applicantFormVisibleFields]), [g, P] = v({
|
|
4682
4762
|
workflowKey: S,
|
|
4683
4763
|
firstName: "",
|
|
4684
4764
|
lastName: "",
|
|
@@ -4686,7 +4766,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4686
4766
|
email: "",
|
|
4687
4767
|
dateOfBirth: "",
|
|
4688
4768
|
phonenumber: "",
|
|
4689
|
-
externalRefId:
|
|
4769
|
+
externalRefId: I,
|
|
4690
4770
|
// Set from config or prop
|
|
4691
4771
|
mobileCountryCode: "",
|
|
4692
4772
|
street: "",
|
|
@@ -4707,28 +4787,28 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4707
4787
|
});
|
|
4708
4788
|
V(() => {
|
|
4709
4789
|
(async () => {
|
|
4710
|
-
if (x.current ||
|
|
4790
|
+
if (x.current || E.current) {
|
|
4711
4791
|
console.log("[CreateApplicant] Countries already loading or loaded, skipping...");
|
|
4712
4792
|
return;
|
|
4713
4793
|
}
|
|
4714
4794
|
x.current = !0, p(!0);
|
|
4715
4795
|
try {
|
|
4716
|
-
const
|
|
4796
|
+
const L = await i.getCountries("", s.locale || "en"), $ = /* @__PURE__ */ new Set(), A = L.map((y) => ({
|
|
4717
4797
|
value: y.abbreviation3 || y.abbreviation,
|
|
4718
4798
|
label: y.name
|
|
4719
4799
|
})).filter((y) => !y.value || $.has(y.value) ? !1 : ($.add(y.value), !0));
|
|
4720
|
-
k(A),
|
|
4721
|
-
} catch (
|
|
4722
|
-
console.error("Failed to load countries:",
|
|
4800
|
+
k(A), E.current = !0;
|
|
4801
|
+
} catch (L) {
|
|
4802
|
+
console.error("Failed to load countries:", L);
|
|
4723
4803
|
} finally {
|
|
4724
4804
|
p(!1), x.current = !1;
|
|
4725
4805
|
}
|
|
4726
4806
|
})();
|
|
4727
4807
|
}, []);
|
|
4728
|
-
const F = (f,
|
|
4729
|
-
|
|
4808
|
+
const F = (f, L) => {
|
|
4809
|
+
P(($) => ({ ...$, [f]: L }));
|
|
4730
4810
|
}, G = async (f) => {
|
|
4731
|
-
var
|
|
4811
|
+
var L;
|
|
4732
4812
|
f.preventDefault(), m(!0), h(null);
|
|
4733
4813
|
try {
|
|
4734
4814
|
if (!g.externalRefId || g.externalRefId.trim() === "") {
|
|
@@ -4738,7 +4818,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4738
4818
|
for (const y of D) {
|
|
4739
4819
|
const B = g[y];
|
|
4740
4820
|
if (B == null || B === "" || Array.isArray(B) && B.length === 0) {
|
|
4741
|
-
const X = ((
|
|
4821
|
+
const X = ((L = Pe[y]) == null ? void 0 : L.label) || y;
|
|
4742
4822
|
h(`${X} is required.`), m(!1);
|
|
4743
4823
|
return;
|
|
4744
4824
|
}
|
|
@@ -4762,20 +4842,20 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4762
4842
|
} finally {
|
|
4763
4843
|
m(!1);
|
|
4764
4844
|
}
|
|
4765
|
-
},
|
|
4845
|
+
}, j = (f) => {
|
|
4766
4846
|
var A;
|
|
4767
|
-
const
|
|
4768
|
-
switch (
|
|
4847
|
+
const L = Pe[f], $ = D.includes(f);
|
|
4848
|
+
switch (L.type) {
|
|
4769
4849
|
case "select":
|
|
4770
4850
|
if (f === "country" || f === "nationality" || f === "taxCountry" || f === "countryOfBirth")
|
|
4771
4851
|
return /* @__PURE__ */ a(
|
|
4772
4852
|
ge,
|
|
4773
4853
|
{
|
|
4774
|
-
label:
|
|
4854
|
+
label: L.label,
|
|
4775
4855
|
value: g[f] || "",
|
|
4776
4856
|
onChange: (y) => F(f, y.target.value),
|
|
4777
4857
|
options: [
|
|
4778
|
-
{ value: "", label: `Select ${
|
|
4858
|
+
{ value: "", label: `Select ${L.label.toLowerCase()}...` },
|
|
4779
4859
|
...u
|
|
4780
4860
|
],
|
|
4781
4861
|
disabled: w,
|
|
@@ -4787,7 +4867,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4787
4867
|
return /* @__PURE__ */ a(
|
|
4788
4868
|
ge,
|
|
4789
4869
|
{
|
|
4790
|
-
label:
|
|
4870
|
+
label: L.label,
|
|
4791
4871
|
value: ((A = g[f]) == null ? void 0 : A.toString()) || "",
|
|
4792
4872
|
onChange: (y) => F(f, y.target.value ? Number(y.target.value) : null),
|
|
4793
4873
|
options: [
|
|
@@ -4801,11 +4881,11 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4801
4881
|
f
|
|
4802
4882
|
);
|
|
4803
4883
|
if (f === "defaultLanguage") {
|
|
4804
|
-
const y = l != null && l.allowedLanguages && l.allowedLanguages.length > 0 ?
|
|
4884
|
+
const y = l != null && l.allowedLanguages && l.allowedLanguages.length > 0 ? Le.filter((B) => l.allowedLanguages.includes(B.value)) : Le;
|
|
4805
4885
|
return /* @__PURE__ */ a(
|
|
4806
4886
|
ge,
|
|
4807
4887
|
{
|
|
4808
|
-
label:
|
|
4888
|
+
label: L.label,
|
|
4809
4889
|
value: g[f] || "",
|
|
4810
4890
|
onChange: (B) => F(f, B.target.value),
|
|
4811
4891
|
options: [
|
|
@@ -4822,7 +4902,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4822
4902
|
return f === "otherNationality" ? /* @__PURE__ */ a(
|
|
4823
4903
|
Qt,
|
|
4824
4904
|
{
|
|
4825
|
-
label:
|
|
4905
|
+
label: L.label,
|
|
4826
4906
|
value: g[f] || [],
|
|
4827
4907
|
onChange: (y) => F(f, y),
|
|
4828
4908
|
options: u,
|
|
@@ -4837,7 +4917,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4837
4917
|
ae,
|
|
4838
4918
|
{
|
|
4839
4919
|
type: "date",
|
|
4840
|
-
label:
|
|
4920
|
+
label: L.label,
|
|
4841
4921
|
value: g[f] || "",
|
|
4842
4922
|
onChange: (y) => F(f, y.target.value),
|
|
4843
4923
|
required: $
|
|
@@ -4849,7 +4929,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4849
4929
|
ae,
|
|
4850
4930
|
{
|
|
4851
4931
|
type: "email",
|
|
4852
|
-
label:
|
|
4932
|
+
label: L.label,
|
|
4853
4933
|
value: g[f] || "",
|
|
4854
4934
|
onChange: (y) => F(f, y.target.value),
|
|
4855
4935
|
required: $
|
|
@@ -4861,7 +4941,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4861
4941
|
ae,
|
|
4862
4942
|
{
|
|
4863
4943
|
type: "tel",
|
|
4864
|
-
label:
|
|
4944
|
+
label: L.label,
|
|
4865
4945
|
value: g[f] || "",
|
|
4866
4946
|
onChange: (y) => F(f, y.target.value),
|
|
4867
4947
|
required: $
|
|
@@ -4874,7 +4954,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4874
4954
|
ae,
|
|
4875
4955
|
{
|
|
4876
4956
|
type: "text",
|
|
4877
|
-
label:
|
|
4957
|
+
label: L.label,
|
|
4878
4958
|
value: g[f] || "",
|
|
4879
4959
|
onChange: (y) => F(f, y.target.value),
|
|
4880
4960
|
required: $
|
|
@@ -4900,7 +4980,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4900
4980
|
" ",
|
|
4901
4981
|
N
|
|
4902
4982
|
] }) }),
|
|
4903
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: z.map((f) =>
|
|
4983
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: z.map((f) => j(f)) })
|
|
4904
4984
|
] }),
|
|
4905
4985
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
4906
4986
|
n && /* @__PURE__ */ a(U, { type: "button", variant: "outline", onClick: n, disabled: b || d, children: "Cancel" }),
|
|
@@ -4991,8 +5071,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4991
5071
|
/* @__PURE__ */ a(ce, { className: "my-8" }),
|
|
4992
5072
|
/* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: i.status === le.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
|
|
4993
5073
|
] }) }) });
|
|
4994
|
-
const x = (
|
|
4995
|
-
switch (
|
|
5074
|
+
const x = (I) => {
|
|
5075
|
+
switch (I) {
|
|
4996
5076
|
case O.Overview:
|
|
4997
5077
|
return "Overview";
|
|
4998
5078
|
case O.Questionaries:
|
|
@@ -5014,8 +5094,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5014
5094
|
default:
|
|
5015
5095
|
return "";
|
|
5016
5096
|
}
|
|
5017
|
-
},
|
|
5018
|
-
const
|
|
5097
|
+
}, E = () => {
|
|
5098
|
+
const I = c.filter((g) => g.visibility !== !1), Y = I.findIndex((g) => g.order === l.order), D = Y >= 0 ? Y + 1 : 1, z = I.length;
|
|
5019
5099
|
return /* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
5020
5100
|
/* @__PURE__ */ o("div", { className: "flex items-start justify-between mb-4", children: [
|
|
5021
5101
|
/* @__PURE__ */ a(Ke, {}),
|
|
@@ -5026,8 +5106,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5026
5106
|
z
|
|
5027
5107
|
] })
|
|
5028
5108
|
] }),
|
|
5029
|
-
/* @__PURE__ */ a("div", { className: "flex items-center", children:
|
|
5030
|
-
const F =
|
|
5109
|
+
/* @__PURE__ */ a("div", { className: "flex items-center", children: I.map((g, P) => {
|
|
5110
|
+
const F = P < Y, G = g.order === l.order;
|
|
5031
5111
|
return /* @__PURE__ */ o(ie.Fragment, { children: [
|
|
5032
5112
|
/* @__PURE__ */ o("div", { className: "flex items-center", children: [
|
|
5033
5113
|
/* @__PURE__ */ a(
|
|
@@ -5037,18 +5117,18 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5037
5117
|
w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium
|
|
5038
5118
|
${F || G ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
|
|
5039
5119
|
`,
|
|
5040
|
-
children:
|
|
5120
|
+
children: P + 1
|
|
5041
5121
|
}
|
|
5042
5122
|
),
|
|
5043
5123
|
/* @__PURE__ */ a(
|
|
5044
5124
|
"span",
|
|
5045
5125
|
{
|
|
5046
5126
|
className: `ml-2 text-sm ${G ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
|
|
5047
|
-
children: g.displayName || g.name || x(g.action) || `Step ${
|
|
5127
|
+
children: g.displayName || g.name || x(g.action) || `Step ${P + 1}`
|
|
5048
5128
|
}
|
|
5049
5129
|
)
|
|
5050
5130
|
] }),
|
|
5051
|
-
|
|
5131
|
+
P < I.length - 1 && /* @__PURE__ */ a(
|
|
5052
5132
|
"div",
|
|
5053
5133
|
{
|
|
5054
5134
|
className: `flex-1 h-0.5 mx-4 ${F ? "bg-primary-500" : "bg-gray-200 dark:bg-gray-700"}`
|
|
@@ -5058,7 +5138,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5058
5138
|
}) })
|
|
5059
5139
|
] });
|
|
5060
5140
|
}, S = () => {
|
|
5061
|
-
const
|
|
5141
|
+
const I = {
|
|
5062
5142
|
applicantId: e,
|
|
5063
5143
|
onComplete: async () => {
|
|
5064
5144
|
await m();
|
|
@@ -5067,20 +5147,20 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5067
5147
|
};
|
|
5068
5148
|
switch (l.action) {
|
|
5069
5149
|
case O.Questionaries:
|
|
5070
|
-
return /* @__PURE__ */ a(ir, { ...
|
|
5150
|
+
return /* @__PURE__ */ a(ir, { ...I });
|
|
5071
5151
|
case O.UploadDocument:
|
|
5072
|
-
return /* @__PURE__ */ a(lr, { ...
|
|
5152
|
+
return /* @__PURE__ */ a(lr, { ...I });
|
|
5073
5153
|
case O.Overview:
|
|
5074
|
-
return /* @__PURE__ */ a(cr, { ...
|
|
5154
|
+
return /* @__PURE__ */ a(cr, { ...I });
|
|
5075
5155
|
case O.IdentitySdk:
|
|
5076
|
-
return /* @__PURE__ */ a(fr, { ...
|
|
5156
|
+
return /* @__PURE__ */ a(fr, { ...I });
|
|
5077
5157
|
case O.RiskScoring:
|
|
5078
|
-
return /* @__PURE__ */ a(pr, { ...
|
|
5158
|
+
return /* @__PURE__ */ a(pr, { ...I });
|
|
5079
5159
|
case O.AdditionalData:
|
|
5080
5160
|
case O.InvestorCategorization:
|
|
5081
|
-
return /* @__PURE__ */ a(gr, { ...
|
|
5161
|
+
return /* @__PURE__ */ a(gr, { ...I });
|
|
5082
5162
|
case O.AppropriatenessTest:
|
|
5083
|
-
return /* @__PURE__ */ a(yr, { ...
|
|
5163
|
+
return /* @__PURE__ */ a(yr, { ...I });
|
|
5084
5164
|
case O.ManualReview:
|
|
5085
5165
|
return /* @__PURE__ */ a(
|
|
5086
5166
|
Te,
|
|
@@ -5106,7 +5186,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5106
5186
|
}
|
|
5107
5187
|
};
|
|
5108
5188
|
return /* @__PURE__ */ o("div", { className: `metakyc-sdk ${s || ""}`, children: [
|
|
5109
|
-
|
|
5189
|
+
E(),
|
|
5110
5190
|
S()
|
|
5111
5191
|
] });
|
|
5112
5192
|
};
|
|
@@ -5157,10 +5237,10 @@ function Kr(e) {
|
|
|
5157
5237
|
t[n] = vr();
|
|
5158
5238
|
}), ue.object(t);
|
|
5159
5239
|
}
|
|
5160
|
-
const
|
|
5240
|
+
const Hr = ue.any();
|
|
5161
5241
|
export {
|
|
5162
|
-
|
|
5163
|
-
|
|
5242
|
+
Le as ALLOWED_LANGUAGES,
|
|
5243
|
+
Ir as ALL_APPLICANT_FIELDS,
|
|
5164
5244
|
Ge as ApplicantProgressOnHoldReason,
|
|
5165
5245
|
le as ApplicantProgressStatus,
|
|
5166
5246
|
ut as ApplicantService,
|
|
@@ -5181,8 +5261,8 @@ export {
|
|
|
5181
5261
|
rt as DocumentReviewStatus,
|
|
5182
5262
|
ct as EndpointBuilder,
|
|
5183
5263
|
we as ErrorHandler,
|
|
5184
|
-
|
|
5185
|
-
|
|
5264
|
+
It as EventEmitter,
|
|
5265
|
+
Pe as FIELD_METADATA,
|
|
5186
5266
|
tt as FileType,
|
|
5187
5267
|
Vt as FileUpload,
|
|
5188
5268
|
Ce as GenderType,
|
|
@@ -5206,7 +5286,7 @@ export {
|
|
|
5206
5286
|
de as MetaKYCError,
|
|
5207
5287
|
Dr as MetaKYCProvider,
|
|
5208
5288
|
Qt as MultiSelect,
|
|
5209
|
-
|
|
5289
|
+
Lt as OnfidoProvider,
|
|
5210
5290
|
gt as OverviewService,
|
|
5211
5291
|
cr as OverviewStep,
|
|
5212
5292
|
Gt as PhoneInput,
|
|
@@ -5217,7 +5297,7 @@ export {
|
|
|
5217
5297
|
Ze as RiskLevel,
|
|
5218
5298
|
yt as RiskScoringService,
|
|
5219
5299
|
pr as RiskScoringStep,
|
|
5220
|
-
|
|
5300
|
+
Pt as SardinAIProvider,
|
|
5221
5301
|
ge as Select,
|
|
5222
5302
|
ce as Spinner,
|
|
5223
5303
|
Rt as StepRouter,
|
|
@@ -5231,9 +5311,9 @@ export {
|
|
|
5231
5311
|
he as ValueDataType,
|
|
5232
5312
|
Dt as WorkflowOrchestrator,
|
|
5233
5313
|
Se as WorkflowResultType,
|
|
5234
|
-
|
|
5314
|
+
Et as WorkflowState,
|
|
5235
5315
|
O as WorkflowStepAction,
|
|
5236
|
-
|
|
5316
|
+
Hr as appropriatenessTestSchema,
|
|
5237
5317
|
Tr as clearAllStorage,
|
|
5238
5318
|
zt as clearApplicantId,
|
|
5239
5319
|
_t as clearWorkflowState,
|
|
@@ -5248,12 +5328,12 @@ export {
|
|
|
5248
5328
|
$r as generateQuestionnaireSchema,
|
|
5249
5329
|
Ur as generateRiskScoringSchema,
|
|
5250
5330
|
_r as generateUploadDocumentSchema,
|
|
5251
|
-
|
|
5331
|
+
Pr as getAcceptString,
|
|
5252
5332
|
Ot as getApplicantId,
|
|
5253
5333
|
ke as getThemePreset,
|
|
5254
5334
|
Mr as getWorkflowState,
|
|
5255
5335
|
kt as healthcareTheme,
|
|
5256
|
-
|
|
5336
|
+
Er as isScriptLoaded,
|
|
5257
5337
|
Be as loadScript,
|
|
5258
5338
|
St as minimalTheme,
|
|
5259
5339
|
Nt as modernTheme,
|
|
@@ -5263,14 +5343,14 @@ export {
|
|
|
5263
5343
|
Ct as themePresets,
|
|
5264
5344
|
Wt as useApplicant,
|
|
5265
5345
|
Br as useAppropriatenessTest,
|
|
5266
|
-
|
|
5346
|
+
qt as useIdentityVerification,
|
|
5267
5347
|
Ut as useKycWorkflow,
|
|
5268
5348
|
se as useMetaKYC,
|
|
5269
|
-
|
|
5349
|
+
jt as useOverview,
|
|
5270
5350
|
Kt as useQuestionnaire,
|
|
5271
5351
|
Yt as useRiskScoring,
|
|
5272
|
-
|
|
5352
|
+
Ht as useUploadDocument,
|
|
5273
5353
|
Fr as validateFileSize,
|
|
5274
|
-
|
|
5354
|
+
Lr as validateFileType
|
|
5275
5355
|
};
|
|
5276
5356
|
//# sourceMappingURL=index.js.map
|