@vpdev2/metakyc-sdk 1.0.73 → 1.0.74
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/steps/RiskScoringStep.d.ts.map +1 -1
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1017 -995
- package/dist/index.js.map +1 -1
- package/dist/types/risk-scoring.d.ts +2 -1
- package/dist/types/risk-scoring.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ var kt = (e, t, n) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var re = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import wt from "axios";
|
|
5
5
|
import * as ot from "react";
|
|
6
|
-
import
|
|
6
|
+
import xe, { createContext as Nt, useState as k, useMemo as Ee, useEffect as ne, useContext as St, useRef as ee, useCallback as V, forwardRef as Ge, createElement as nt } from "react";
|
|
7
7
|
import { jsx as r, jsxs as o, Fragment as Qe } from "react/jsx-runtime";
|
|
8
8
|
import Ct, { createPortal as it } from "react-dom";
|
|
9
|
-
import { useForm as At, Controller as
|
|
10
|
-
import { z as
|
|
11
|
-
var
|
|
9
|
+
import { useForm as At, Controller as Le } from "react-hook-form";
|
|
10
|
+
import { z as Ce } from "zod";
|
|
11
|
+
var J = /* @__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))(J || {}), Je = /* @__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))(Je || {}), ke = /* @__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))(ke || {}), It = /* @__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))(It || {}), 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 || {}), Te = /* @__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))(Te || {}), De = /* @__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))(De || {}), Rt = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Rt || {}), Pt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(Pt || {}), ve = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(ve || {}), Ft = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Ft || {}), Ze = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ze || {}), Lt = /* @__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))(Lt || {}), Tt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Tt || {}), Dt = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Dt || {}), Se = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Money = 2] = "Money", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Se || {}), Mt = /* @__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))(Mt || {}), Ot = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Ot || {}), fe = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(fe || {}), $t = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))($t || {});
|
|
12
12
|
const $e = {
|
|
13
13
|
Nationality: 10,
|
|
14
14
|
Address: 20,
|
|
@@ -1177,7 +1177,7 @@ class sr {
|
|
|
1177
1177
|
async loadStepData(t, n) {
|
|
1178
1178
|
const a = this.getHandler(t);
|
|
1179
1179
|
if (!a)
|
|
1180
|
-
throw new Error(`No handler registered for step action: ${
|
|
1180
|
+
throw new Error(`No handler registered for step action: ${J[t]}`);
|
|
1181
1181
|
return a.loadData(n);
|
|
1182
1182
|
}
|
|
1183
1183
|
/**
|
|
@@ -1186,7 +1186,7 @@ class sr {
|
|
|
1186
1186
|
async submitStepData(t, n) {
|
|
1187
1187
|
const a = this.getHandler(t);
|
|
1188
1188
|
if (!a)
|
|
1189
|
-
throw new Error(`No handler registered for step action: ${
|
|
1189
|
+
throw new Error(`No handler registered for step action: ${J[t]}`);
|
|
1190
1190
|
return a.submitData(n);
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
@@ -1200,47 +1200,47 @@ class or {
|
|
|
1200
1200
|
* Register all step handlers
|
|
1201
1201
|
*/
|
|
1202
1202
|
registerStepHandlers() {
|
|
1203
|
-
this.stepRouter.registerHandler(
|
|
1203
|
+
this.stepRouter.registerHandler(J.Questionaries, {
|
|
1204
1204
|
loadData: (t) => this.questionnaireService.getQuestionnaire(t),
|
|
1205
1205
|
submitData: async (t) => {
|
|
1206
1206
|
await this.questionnaireService.fillQuestionnaire(t);
|
|
1207
1207
|
}
|
|
1208
|
-
}), this.stepRouter.registerHandler(
|
|
1208
|
+
}), this.stepRouter.registerHandler(J.UploadDocument, {
|
|
1209
1209
|
loadData: (t) => this.uploadDocumentService.getUploadDocument(t),
|
|
1210
1210
|
submitData: (t) => this.uploadDocumentService.fillUploadDocument(t)
|
|
1211
|
-
}), this.stepRouter.registerHandler(
|
|
1211
|
+
}), this.stepRouter.registerHandler(J.AppropriatenessTest, {
|
|
1212
1212
|
loadData: (t) => this.appropriatenessTestService.getAppropriatenessTest(t),
|
|
1213
1213
|
submitData: async (t) => {
|
|
1214
1214
|
await this.appropriatenessTestService.fillAppropriatenessTest(t);
|
|
1215
1215
|
}
|
|
1216
|
-
}), this.stepRouter.registerHandler(
|
|
1216
|
+
}), this.stepRouter.registerHandler(J.Overview, {
|
|
1217
1217
|
loadData: (t) => this.overviewService.getOverviewData(t),
|
|
1218
1218
|
submitData: (t) => this.overviewService.passOverview(t.applicantId)
|
|
1219
|
-
}), this.stepRouter.registerHandler(
|
|
1219
|
+
}), this.stepRouter.registerHandler(J.RiskScoring, {
|
|
1220
1220
|
loadData: (t) => this.riskScoringService.getRiskCriterias(t),
|
|
1221
1221
|
submitData: async (t) => {
|
|
1222
1222
|
await this.riskScoringService.submitRiskScoring(t);
|
|
1223
1223
|
}
|
|
1224
|
-
}), this.stepRouter.registerHandler(
|
|
1224
|
+
}), this.stepRouter.registerHandler(J.IdentitySdk, {
|
|
1225
1225
|
loadData: async (t) => ({
|
|
1226
1226
|
applicantId: t,
|
|
1227
1227
|
message: "Identity verification required"
|
|
1228
1228
|
}),
|
|
1229
1229
|
submitData: async () => {
|
|
1230
1230
|
}
|
|
1231
|
-
}), this.stepRouter.registerHandler(
|
|
1231
|
+
}), this.stepRouter.registerHandler(J.InvestorCategorization, {
|
|
1232
1232
|
loadData: (t) => this.investorCategorizationService.getInvestorCategorization(t),
|
|
1233
1233
|
submitData: async (t) => {
|
|
1234
1234
|
await this.investorCategorizationService.setInvestorCategorization(t);
|
|
1235
1235
|
}
|
|
1236
|
-
}), this.stepRouter.registerHandler(
|
|
1236
|
+
}), this.stepRouter.registerHandler(J.ManualReview, {
|
|
1237
1237
|
loadData: async (t) => ({
|
|
1238
1238
|
applicantId: t,
|
|
1239
1239
|
message: "Your application is under manual review"
|
|
1240
1240
|
}),
|
|
1241
1241
|
submitData: async () => {
|
|
1242
1242
|
}
|
|
1243
|
-
}), this.stepRouter.registerHandler(
|
|
1243
|
+
}), this.stepRouter.registerHandler(J.AdditionalData, {
|
|
1244
1244
|
loadData: async (t) => ({
|
|
1245
1245
|
applicantId: t,
|
|
1246
1246
|
message: "Additional data required"
|
|
@@ -1344,10 +1344,10 @@ function ht(e, t) {
|
|
|
1344
1344
|
s.src = e, t && (s.id = t), s.async = !0, s.onload = () => n(), s.onerror = () => a(new Error(`Failed to load script: ${e}`)), document.head.appendChild(s);
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function cn(e) {
|
|
1348
1348
|
return !!document.getElementById(e);
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function dn(e) {
|
|
1351
1351
|
const t = document.getElementById(e);
|
|
1352
1352
|
t && t.remove();
|
|
1353
1353
|
}
|
|
@@ -1551,10 +1551,10 @@ class dr {
|
|
|
1551
1551
|
console.log(`[SardinAI] Device ID: ${u.deviceId}`);
|
|
1552
1552
|
},
|
|
1553
1553
|
// New callback for session updates
|
|
1554
|
-
onConfigUpdate: (u, h,
|
|
1554
|
+
onConfigUpdate: (u, h, m) => {
|
|
1555
1555
|
switch (u) {
|
|
1556
1556
|
case "SESSION_UPDATE_FAILED":
|
|
1557
|
-
console.error("[SardinAI] Session update failed:",
|
|
1557
|
+
console.error("[SardinAI] Session update failed:", m);
|
|
1558
1558
|
break;
|
|
1559
1559
|
case "SESSION_UPDATED":
|
|
1560
1560
|
console.log("[SardinAI] Session updated:", h);
|
|
@@ -1796,24 +1796,24 @@ class ur {
|
|
|
1796
1796
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
|
-
const gt = Nt(null),
|
|
1800
|
-
const [n, a] =
|
|
1801
|
-
const h = new Ht(e),
|
|
1799
|
+
const gt = Nt(null), un = ({ config: e, children: t }) => {
|
|
1800
|
+
const [n, a] = k(null), s = xe.useRef(!1), l = xe.useRef(!1), c = Ee(() => {
|
|
1801
|
+
const h = new Ht(e), m = new Ut(h), v = new jt(h), S = new Kt(h), f = new Wt(h), N = new Yt(h), x = new qt(h), D = new Qt(h), F = new Gt(h), R = new Vt(h), $ = new nr(h), E = new ur();
|
|
1802
1802
|
return {
|
|
1803
1803
|
httpClient: h,
|
|
1804
|
-
applicantService:
|
|
1804
|
+
applicantService: m,
|
|
1805
1805
|
questionnaireService: v,
|
|
1806
|
-
uploadDocumentService:
|
|
1806
|
+
uploadDocumentService: S,
|
|
1807
1807
|
appropriatenessTestService: f,
|
|
1808
|
-
overviewService:
|
|
1808
|
+
overviewService: N,
|
|
1809
1809
|
riskScoringService: x,
|
|
1810
1810
|
identityService: D,
|
|
1811
|
-
baseInformationService:
|
|
1812
|
-
investorCategorizationService:
|
|
1813
|
-
themeService:
|
|
1811
|
+
baseInformationService: F,
|
|
1812
|
+
investorCategorizationService: R,
|
|
1813
|
+
themeService: $,
|
|
1814
1814
|
themeManager: E
|
|
1815
1815
|
};
|
|
1816
|
-
}, [e]), u =
|
|
1816
|
+
}, [e]), u = Ee(() => ({
|
|
1817
1817
|
config: e,
|
|
1818
1818
|
...c,
|
|
1819
1819
|
currentTheme: n,
|
|
@@ -1840,10 +1840,10 @@ const gt = Nt(null), ln = ({ config: e, children: t }) => {
|
|
|
1840
1840
|
return;
|
|
1841
1841
|
}
|
|
1842
1842
|
console.log("[MetaKYC] Fetching theme from backend...");
|
|
1843
|
-
const
|
|
1844
|
-
c.themeManager.applyTheme(
|
|
1845
|
-
} catch (
|
|
1846
|
-
console.warn("[MetaKYC] Failed to load theme, using default:",
|
|
1843
|
+
const m = await c.themeService.getThemeConfiguration();
|
|
1844
|
+
c.themeManager.applyTheme(m), a(c.themeManager.getCurrentTheme()), l.current = !0, console.log("[MetaKYC] Theme loaded and applied", m);
|
|
1845
|
+
} catch (m) {
|
|
1846
|
+
console.warn("[MetaKYC] Failed to load theme, using default:", m), a(c.themeManager.getCurrentTheme()), l.current = !0;
|
|
1847
1847
|
} finally {
|
|
1848
1848
|
s.current = !1;
|
|
1849
1849
|
}
|
|
@@ -1851,7 +1851,7 @@ const gt = Nt(null), ln = ({ config: e, children: t }) => {
|
|
|
1851
1851
|
c.themeManager.cleanup();
|
|
1852
1852
|
}), []), /* @__PURE__ */ r(gt.Provider, { value: u, children: t });
|
|
1853
1853
|
};
|
|
1854
|
-
function
|
|
1854
|
+
function ge() {
|
|
1855
1855
|
const e = St(gt);
|
|
1856
1856
|
if (!e)
|
|
1857
1857
|
throw new Error("useMetaKYC must be used within a MetaKYCProvider");
|
|
@@ -1866,10 +1866,10 @@ async function mr(e) {
|
|
|
1866
1866
|
}, a.onerror = (s) => n(s);
|
|
1867
1867
|
});
|
|
1868
1868
|
}
|
|
1869
|
-
function
|
|
1869
|
+
function mn(e, t) {
|
|
1870
1870
|
return e.size <= t;
|
|
1871
1871
|
}
|
|
1872
|
-
function
|
|
1872
|
+
function pn(e, t) {
|
|
1873
1873
|
return t.split(",").map((a) => a.trim()).some((a) => {
|
|
1874
1874
|
if (a.endsWith("/*")) {
|
|
1875
1875
|
const s = a.slice(0, -2);
|
|
@@ -1883,7 +1883,7 @@ function rt(e) {
|
|
|
1883
1883
|
const t = 1024, n = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(e) / Math.log(t));
|
|
1884
1884
|
return Math.round(e / Math.pow(t, a) * 100) / 100 + " " + n[a];
|
|
1885
1885
|
}
|
|
1886
|
-
function
|
|
1886
|
+
function hn(e) {
|
|
1887
1887
|
return e;
|
|
1888
1888
|
}
|
|
1889
1889
|
function oe(...e) {
|
|
@@ -1922,7 +1922,7 @@ function yr(e) {
|
|
|
1922
1922
|
console.warn("Failed to save workflow state to storage:", t);
|
|
1923
1923
|
}
|
|
1924
1924
|
}
|
|
1925
|
-
function
|
|
1925
|
+
function gn() {
|
|
1926
1926
|
try {
|
|
1927
1927
|
const e = localStorage.getItem(Be.WORKFLOW_STATE);
|
|
1928
1928
|
return e ? JSON.parse(e) : null;
|
|
@@ -1937,45 +1937,45 @@ function fr() {
|
|
|
1937
1937
|
console.warn("Failed to clear workflow state from storage:", e);
|
|
1938
1938
|
}
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1940
|
+
function yn() {
|
|
1941
1941
|
gr(), fr();
|
|
1942
1942
|
}
|
|
1943
1943
|
function xr(e) {
|
|
1944
|
-
const { createOrchestrator: t } =
|
|
1944
|
+
const { createOrchestrator: t } = ge(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(null), h = ee(null), m = e || hr();
|
|
1945
1945
|
ne(() => {
|
|
1946
1946
|
h.current || (h.current = t());
|
|
1947
1947
|
}, [t]), ne(() => {
|
|
1948
1948
|
var E;
|
|
1949
|
-
n &&
|
|
1950
|
-
applicantId:
|
|
1949
|
+
n && m && (pr(m), yr({
|
|
1950
|
+
applicantId: m,
|
|
1951
1951
|
currentStepOrder: (E = n.currentStep) == null ? void 0 : E.order,
|
|
1952
1952
|
status: n.status,
|
|
1953
1953
|
lastUpdated: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1954
1954
|
workflowKey: n.workFlowKey,
|
|
1955
1955
|
nextWorkflowKey: n.nextWorkflowKey
|
|
1956
1956
|
}));
|
|
1957
|
-
}, [n,
|
|
1958
|
-
const v = ee(!1),
|
|
1959
|
-
if (!(!
|
|
1957
|
+
}, [n, m]);
|
|
1958
|
+
const v = ee(!1), S = ee(!1), f = V(async () => {
|
|
1959
|
+
if (!(!m || !h.current)) {
|
|
1960
1960
|
if (v.current) {
|
|
1961
1961
|
console.log("[Workflow] Load already in progress, skipping...");
|
|
1962
1962
|
return;
|
|
1963
1963
|
}
|
|
1964
1964
|
v.current = !0, l(!0), u(null);
|
|
1965
1965
|
try {
|
|
1966
|
-
const E = await h.current.initialize(
|
|
1967
|
-
a(E),
|
|
1966
|
+
const E = await h.current.initialize(m);
|
|
1967
|
+
a(E), S.current = !0;
|
|
1968
1968
|
} catch (E) {
|
|
1969
1969
|
u(E);
|
|
1970
1970
|
} finally {
|
|
1971
1971
|
l(!1), v.current = !1;
|
|
1972
1972
|
}
|
|
1973
1973
|
}
|
|
1974
|
-
}, [
|
|
1974
|
+
}, [m]);
|
|
1975
1975
|
ne(() => {
|
|
1976
|
-
|
|
1977
|
-
}, [
|
|
1978
|
-
const
|
|
1976
|
+
m && !S.current && f();
|
|
1977
|
+
}, [m, f]);
|
|
1978
|
+
const N = V(async () => {
|
|
1979
1979
|
if (h.current) {
|
|
1980
1980
|
if (v.current) {
|
|
1981
1981
|
console.log("[Workflow] Refresh already in progress, skipping...");
|
|
@@ -1991,7 +1991,7 @@ function xr(e) {
|
|
|
1991
1991
|
l(!1), v.current = !1;
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
1994
|
-
}, []), x =
|
|
1994
|
+
}, []), x = V(async () => {
|
|
1995
1995
|
if (h.current) {
|
|
1996
1996
|
l(!0), u(null);
|
|
1997
1997
|
try {
|
|
@@ -2003,7 +2003,7 @@ function xr(e) {
|
|
|
2003
2003
|
l(!1);
|
|
2004
2004
|
}
|
|
2005
2005
|
}
|
|
2006
|
-
}, []), D =
|
|
2006
|
+
}, []), D = V(async () => {
|
|
2007
2007
|
if (h.current) {
|
|
2008
2008
|
l(!0), u(null);
|
|
2009
2009
|
try {
|
|
@@ -2015,63 +2015,63 @@ function xr(e) {
|
|
|
2015
2015
|
l(!1);
|
|
2016
2016
|
}
|
|
2017
2017
|
}
|
|
2018
|
-
}, []),
|
|
2018
|
+
}, []), F = V(async (E) => {
|
|
2019
2019
|
if (h.current) {
|
|
2020
2020
|
l(!0), u(null);
|
|
2021
2021
|
try {
|
|
2022
2022
|
await h.current.submitCurrentStep(E);
|
|
2023
|
-
const
|
|
2024
|
-
a(
|
|
2025
|
-
} catch (
|
|
2026
|
-
throw u(
|
|
2023
|
+
const L = await h.current.refreshProgress();
|
|
2024
|
+
a(L);
|
|
2025
|
+
} catch (L) {
|
|
2026
|
+
throw u(L), L;
|
|
2027
2027
|
} finally {
|
|
2028
2028
|
l(!1);
|
|
2029
2029
|
}
|
|
2030
2030
|
}
|
|
2031
|
-
}, []),
|
|
2031
|
+
}, []), R = ot.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((E, L) => E.order - L.order) : [], [n == null ? void 0 : n.stepInfoList]), $ = ot.useMemo(() => n ? n.nextWorkflowKey && n.nextWorkflowKey !== n.workFlowKey : !1, [n]);
|
|
2032
2032
|
return {
|
|
2033
2033
|
progress: n,
|
|
2034
|
-
applicantId:
|
|
2034
|
+
applicantId: m,
|
|
2035
2035
|
currentStep: (n == null ? void 0 : n.currentStep) || null,
|
|
2036
|
-
steps:
|
|
2036
|
+
steps: R,
|
|
2037
2037
|
status: (n == null ? void 0 : n.status) || ke.None,
|
|
2038
2038
|
workflowResult: (n == null ? void 0 : n.workflowResult) || null,
|
|
2039
2039
|
workflowKey: n == null ? void 0 : n.workFlowKey,
|
|
2040
2040
|
nextWorkflowKey: n == null ? void 0 : n.nextWorkflowKey,
|
|
2041
|
-
hasWorkflowChanged:
|
|
2041
|
+
hasWorkflowChanged: $,
|
|
2042
2042
|
isLoading: s,
|
|
2043
2043
|
error: c,
|
|
2044
2044
|
isComplete: (n == null ? void 0 : n.status) === ke.Finished,
|
|
2045
2045
|
isOnHold: (n == null ? void 0 : n.status) === ke.OnHold,
|
|
2046
|
-
refreshProgress:
|
|
2046
|
+
refreshProgress: N,
|
|
2047
2047
|
moveToNext: x,
|
|
2048
2048
|
moveBack: D,
|
|
2049
|
-
submitCurrentStep:
|
|
2049
|
+
submitCurrentStep: F,
|
|
2050
2050
|
orchestrator: h.current
|
|
2051
2051
|
};
|
|
2052
2052
|
}
|
|
2053
2053
|
function br(e) {
|
|
2054
|
-
const { questionnaireService: t, applicantService: n } =
|
|
2055
|
-
var
|
|
2054
|
+
const { questionnaireService: t, applicantService: n } = ge(), [a, s] = k(null), [l, c] = k({}), [u, h] = k(!1), [m, v] = k(!1), [S, f] = k(null), N = ee(!1), x = ee(null), D = V(async () => {
|
|
2055
|
+
var R, $;
|
|
2056
2056
|
if (e) {
|
|
2057
|
-
if (
|
|
2057
|
+
if (N.current) {
|
|
2058
2058
|
console.log("[Questionnaire] Load already in progress, skipping...");
|
|
2059
2059
|
return;
|
|
2060
2060
|
}
|
|
2061
|
-
|
|
2061
|
+
N.current = !0, h(!0), f(null);
|
|
2062
2062
|
try {
|
|
2063
|
-
const [E,
|
|
2063
|
+
const [E, L] = await Promise.all([
|
|
2064
2064
|
t.getQuestionnaire(e),
|
|
2065
2065
|
n.getApplicantData(e).catch(() => null)
|
|
2066
2066
|
]);
|
|
2067
|
-
if (s(E), (
|
|
2068
|
-
const
|
|
2069
|
-
for (const
|
|
2070
|
-
|
|
2071
|
-
const X = {},
|
|
2072
|
-
for (const
|
|
2073
|
-
const
|
|
2074
|
-
|
|
2067
|
+
if (s(E), (R = L == null ? void 0 : L.questionnaireResults) != null && R.length && E) {
|
|
2068
|
+
const Y = /* @__PURE__ */ new Map();
|
|
2069
|
+
for (const w of L.questionnaireResults)
|
|
2070
|
+
w.question && (($ = w.answers) != null && $.length) && Y.set(w.question.trim().toLowerCase(), w.answers);
|
|
2071
|
+
const X = {}, P = E.questionGroups.flatMap((w) => w.questions ?? []);
|
|
2072
|
+
for (const w of P) {
|
|
2073
|
+
const H = w.text.trim().toLowerCase();
|
|
2074
|
+
Y.has(H) && (X[w.id] = Y.get(H));
|
|
2075
2075
|
}
|
|
2076
2076
|
c(X);
|
|
2077
2077
|
}
|
|
@@ -2079,20 +2079,20 @@ function br(e) {
|
|
|
2079
2079
|
} catch (E) {
|
|
2080
2080
|
f(E);
|
|
2081
2081
|
} finally {
|
|
2082
|
-
h(!1),
|
|
2082
|
+
h(!1), N.current = !1;
|
|
2083
2083
|
}
|
|
2084
2084
|
}
|
|
2085
2085
|
}, [e, t, n]);
|
|
2086
2086
|
ne(() => {
|
|
2087
2087
|
e && x.current !== e && D();
|
|
2088
2088
|
}, [e]);
|
|
2089
|
-
const
|
|
2090
|
-
async (
|
|
2089
|
+
const F = V(
|
|
2090
|
+
async (R) => {
|
|
2091
2091
|
v(!0), f(null);
|
|
2092
2092
|
try {
|
|
2093
|
-
return await t.fillQuestionnaire(
|
|
2094
|
-
} catch (
|
|
2095
|
-
throw f(
|
|
2093
|
+
return await t.fillQuestionnaire(R);
|
|
2094
|
+
} catch ($) {
|
|
2095
|
+
throw f($), $;
|
|
2096
2096
|
} finally {
|
|
2097
2097
|
v(!1);
|
|
2098
2098
|
}
|
|
@@ -2103,40 +2103,40 @@ function br(e) {
|
|
|
2103
2103
|
questionnaire: a,
|
|
2104
2104
|
initialAnswers: l,
|
|
2105
2105
|
isLoading: u,
|
|
2106
|
-
isSubmitting:
|
|
2107
|
-
error:
|
|
2106
|
+
isSubmitting: m,
|
|
2107
|
+
error: S,
|
|
2108
2108
|
load: D,
|
|
2109
|
-
submit:
|
|
2109
|
+
submit: F
|
|
2110
2110
|
};
|
|
2111
2111
|
}
|
|
2112
2112
|
function vr(e) {
|
|
2113
|
-
const { uploadDocumentService: t } =
|
|
2113
|
+
const { uploadDocumentService: t } = ge(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(0), [v, S] = k(null), f = ee(!1), N = ee(null), x = V(async () => {
|
|
2114
2114
|
if (e) {
|
|
2115
2115
|
if (f.current) {
|
|
2116
2116
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
2117
2117
|
return;
|
|
2118
2118
|
}
|
|
2119
|
-
f.current = !0, l(!0),
|
|
2119
|
+
f.current = !0, l(!0), S(null);
|
|
2120
2120
|
try {
|
|
2121
|
-
const
|
|
2122
|
-
a(
|
|
2123
|
-
} catch (
|
|
2124
|
-
|
|
2121
|
+
const F = await t.getUploadDocument(e);
|
|
2122
|
+
a(F), N.current = e;
|
|
2123
|
+
} catch (F) {
|
|
2124
|
+
S(F);
|
|
2125
2125
|
} finally {
|
|
2126
2126
|
l(!1), f.current = !1;
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
2129
|
}, [e, t]);
|
|
2130
2130
|
ne(() => {
|
|
2131
|
-
e &&
|
|
2131
|
+
e && N.current !== e && x();
|
|
2132
2132
|
}, [e]);
|
|
2133
|
-
const D =
|
|
2134
|
-
async (
|
|
2135
|
-
u(!0),
|
|
2133
|
+
const D = V(
|
|
2134
|
+
async (F) => {
|
|
2135
|
+
u(!0), m(0), S(null);
|
|
2136
2136
|
try {
|
|
2137
|
-
await t.fillUploadDocument(
|
|
2138
|
-
} catch (
|
|
2139
|
-
throw
|
|
2137
|
+
await t.fillUploadDocument(F), m(100);
|
|
2138
|
+
} catch (R) {
|
|
2139
|
+
throw S(R), R;
|
|
2140
2140
|
} finally {
|
|
2141
2141
|
u(!1);
|
|
2142
2142
|
}
|
|
@@ -2153,35 +2153,35 @@ function vr(e) {
|
|
|
2153
2153
|
submit: D
|
|
2154
2154
|
};
|
|
2155
2155
|
}
|
|
2156
|
-
function
|
|
2157
|
-
const { appropriatenessTestService: t } =
|
|
2156
|
+
function fn(e) {
|
|
2157
|
+
const { appropriatenessTestService: t } = ge(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(null), [v, S] = k(null), f = ee(!1), N = ee(null), x = V(async () => {
|
|
2158
2158
|
if (e) {
|
|
2159
2159
|
if (f.current) {
|
|
2160
2160
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
2161
2161
|
return;
|
|
2162
2162
|
}
|
|
2163
|
-
f.current = !0, l(!0),
|
|
2163
|
+
f.current = !0, l(!0), m(null);
|
|
2164
2164
|
try {
|
|
2165
|
-
const
|
|
2166
|
-
a(
|
|
2167
|
-
} catch (
|
|
2168
|
-
|
|
2165
|
+
const F = await t.getAppropriatenessTest(e);
|
|
2166
|
+
a(F), N.current = e;
|
|
2167
|
+
} catch (F) {
|
|
2168
|
+
m(F);
|
|
2169
2169
|
} finally {
|
|
2170
2170
|
l(!1), f.current = !1;
|
|
2171
2171
|
}
|
|
2172
2172
|
}
|
|
2173
2173
|
}, [e, t]);
|
|
2174
2174
|
ne(() => {
|
|
2175
|
-
e &&
|
|
2175
|
+
e && N.current !== e && x();
|
|
2176
2176
|
}, [e]);
|
|
2177
|
-
const D =
|
|
2178
|
-
async (
|
|
2179
|
-
u(!0),
|
|
2177
|
+
const D = V(
|
|
2178
|
+
async (F) => {
|
|
2179
|
+
u(!0), m(null);
|
|
2180
2180
|
try {
|
|
2181
|
-
const
|
|
2182
|
-
return
|
|
2183
|
-
} catch (
|
|
2184
|
-
throw
|
|
2181
|
+
const R = await t.fillAppropriatenessTest(F);
|
|
2182
|
+
return S(R), R;
|
|
2183
|
+
} catch (R) {
|
|
2184
|
+
throw m(R), R;
|
|
2185
2185
|
} finally {
|
|
2186
2186
|
u(!1);
|
|
2187
2187
|
}
|
|
@@ -2199,33 +2199,33 @@ function hn(e) {
|
|
|
2199
2199
|
};
|
|
2200
2200
|
}
|
|
2201
2201
|
function kr(e) {
|
|
2202
|
-
const { overviewService: t } =
|
|
2202
|
+
const { overviewService: t } = ge(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(null), v = ee(!1), S = ee(null), f = V(async () => {
|
|
2203
2203
|
if (e) {
|
|
2204
2204
|
if (v.current) {
|
|
2205
2205
|
console.log("[Overview] Load already in progress, skipping...");
|
|
2206
2206
|
return;
|
|
2207
2207
|
}
|
|
2208
|
-
v.current = !0, l(!0),
|
|
2208
|
+
v.current = !0, l(!0), m(null);
|
|
2209
2209
|
try {
|
|
2210
2210
|
const x = await t.getOverviewData(e);
|
|
2211
|
-
a(x),
|
|
2211
|
+
a(x), S.current = e;
|
|
2212
2212
|
} catch (x) {
|
|
2213
|
-
|
|
2213
|
+
m(x);
|
|
2214
2214
|
} finally {
|
|
2215
2215
|
l(!1), v.current = !1;
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
2218
|
}, [e, t]);
|
|
2219
2219
|
ne(() => {
|
|
2220
|
-
e &&
|
|
2220
|
+
e && S.current !== e && f();
|
|
2221
2221
|
}, [e]);
|
|
2222
|
-
const
|
|
2222
|
+
const N = V(async () => {
|
|
2223
2223
|
if (e) {
|
|
2224
|
-
u(!0),
|
|
2224
|
+
u(!0), m(null);
|
|
2225
2225
|
try {
|
|
2226
2226
|
await t.passOverview(e);
|
|
2227
2227
|
} catch (x) {
|
|
2228
|
-
throw
|
|
2228
|
+
throw m(x), x;
|
|
2229
2229
|
} finally {
|
|
2230
2230
|
u(!1);
|
|
2231
2231
|
}
|
|
@@ -2237,14 +2237,14 @@ function kr(e) {
|
|
|
2237
2237
|
isSubmitting: c,
|
|
2238
2238
|
error: h,
|
|
2239
2239
|
load: f,
|
|
2240
|
-
passOverview:
|
|
2240
|
+
passOverview: N
|
|
2241
2241
|
};
|
|
2242
2242
|
}
|
|
2243
2243
|
function wr(e) {
|
|
2244
|
-
const { identityService: t } =
|
|
2244
|
+
const { identityService: t } = ge(), [n, a] = k(
|
|
2245
2245
|
null
|
|
2246
|
-
), [s, l] =
|
|
2247
|
-
async (f,
|
|
2246
|
+
), [s, l] = k(!1), [c, u] = k(null), h = ee(!1), m = V(
|
|
2247
|
+
async (f, N) => {
|
|
2248
2248
|
if (e) {
|
|
2249
2249
|
if (h.current) {
|
|
2250
2250
|
console.log("[Identity] Request already in progress, skipping...");
|
|
@@ -2256,7 +2256,7 @@ function wr(e) {
|
|
|
2256
2256
|
applicantId: e,
|
|
2257
2257
|
restart: !1,
|
|
2258
2258
|
redirectUrl: f || "",
|
|
2259
|
-
ttl:
|
|
2259
|
+
ttl: N || 604800
|
|
2260
2260
|
// Default: 7 days
|
|
2261
2261
|
};
|
|
2262
2262
|
console.log("Identity request input:", x);
|
|
@@ -2270,8 +2270,8 @@ function wr(e) {
|
|
|
2270
2270
|
}
|
|
2271
2271
|
},
|
|
2272
2272
|
[e, t]
|
|
2273
|
-
), v =
|
|
2274
|
-
async (f,
|
|
2273
|
+
), v = V(
|
|
2274
|
+
async (f, N) => {
|
|
2275
2275
|
if (e) {
|
|
2276
2276
|
l(!0), u(null);
|
|
2277
2277
|
try {
|
|
@@ -2279,7 +2279,7 @@ function wr(e) {
|
|
|
2279
2279
|
applicantId: e,
|
|
2280
2280
|
restart: !1,
|
|
2281
2281
|
redirectUrl: f,
|
|
2282
|
-
ttl:
|
|
2282
|
+
ttl: N
|
|
2283
2283
|
}, D = await t.identityCompanyRequest(x);
|
|
2284
2284
|
return a(D), D;
|
|
2285
2285
|
} catch (x) {
|
|
@@ -2290,7 +2290,7 @@ function wr(e) {
|
|
|
2290
2290
|
}
|
|
2291
2291
|
},
|
|
2292
2292
|
[e, t]
|
|
2293
|
-
),
|
|
2293
|
+
), S = V(async () => {
|
|
2294
2294
|
if (e) {
|
|
2295
2295
|
if (h.current) {
|
|
2296
2296
|
console.log("[Identity] Restart already in progress, skipping...");
|
|
@@ -2306,8 +2306,8 @@ function wr(e) {
|
|
|
2306
2306
|
// 7 days
|
|
2307
2307
|
};
|
|
2308
2308
|
console.log("Restarting identity with input:", f);
|
|
2309
|
-
const
|
|
2310
|
-
return console.log("Restart identity result:",
|
|
2309
|
+
const N = await t.identityRequest(f);
|
|
2310
|
+
return console.log("Restart identity result:", N), a(N), N;
|
|
2311
2311
|
} catch (f) {
|
|
2312
2312
|
throw u(f), f;
|
|
2313
2313
|
} finally {
|
|
@@ -2321,13 +2321,13 @@ function wr(e) {
|
|
|
2321
2321
|
token: (n == null ? void 0 : n.publicProviderTokenObject) || null,
|
|
2322
2322
|
isLoading: s,
|
|
2323
2323
|
error: c,
|
|
2324
|
-
requestIdentity:
|
|
2324
|
+
requestIdentity: m,
|
|
2325
2325
|
requestCompanyIdentity: v,
|
|
2326
|
-
restartIdentity:
|
|
2326
|
+
restartIdentity: S
|
|
2327
2327
|
};
|
|
2328
2328
|
}
|
|
2329
2329
|
function Nr(e) {
|
|
2330
|
-
const { riskScoringService: t, applicantService: n } =
|
|
2330
|
+
const { riskScoringService: t, applicantService: n } = ge(), [a, s] = k(null), [l, c] = k({}), [u, h] = k(!1), [m, v] = k(!1), [S, f] = k(null), [N, x] = k(null), D = ee(!1), F = ee(null), R = V(async () => {
|
|
2331
2331
|
var E;
|
|
2332
2332
|
if (e) {
|
|
2333
2333
|
if (D.current) {
|
|
@@ -2336,40 +2336,40 @@ function Nr(e) {
|
|
|
2336
2336
|
}
|
|
2337
2337
|
D.current = !0, h(!0), f(null);
|
|
2338
2338
|
try {
|
|
2339
|
-
const [
|
|
2339
|
+
const [L, Y] = await Promise.all([
|
|
2340
2340
|
t.getRiskCriterias(e),
|
|
2341
2341
|
n.getApplicantData(e).catch(() => null)
|
|
2342
2342
|
]);
|
|
2343
|
-
if (s(
|
|
2344
|
-
const X =
|
|
2345
|
-
for (const
|
|
2346
|
-
if (
|
|
2347
|
-
const
|
|
2348
|
-
|
|
2343
|
+
if (s(L), (E = Y == null ? void 0 : Y.riskScoringResults) != null && E.length) {
|
|
2344
|
+
const X = Y.riskScoringResults[0], P = {};
|
|
2345
|
+
for (const w of X.riskCriteriaResults ?? [])
|
|
2346
|
+
if (w.riskCriteriaId != null && w.answer != null && w.answer !== "") {
|
|
2347
|
+
const H = [...new Set(
|
|
2348
|
+
w.answer.split(",").map((W) => W.trim()).filter((W) => W !== "")
|
|
2349
2349
|
)];
|
|
2350
|
-
|
|
2350
|
+
H.length > 0 && (P[w.riskCriteriaId] = H);
|
|
2351
2351
|
}
|
|
2352
|
-
c(
|
|
2352
|
+
c(P);
|
|
2353
2353
|
}
|
|
2354
|
-
|
|
2355
|
-
} catch (
|
|
2356
|
-
f(
|
|
2354
|
+
F.current = e;
|
|
2355
|
+
} catch (L) {
|
|
2356
|
+
f(L);
|
|
2357
2357
|
} finally {
|
|
2358
2358
|
h(!1), D.current = !1;
|
|
2359
2359
|
}
|
|
2360
2360
|
}
|
|
2361
2361
|
}, [e, t, n]);
|
|
2362
2362
|
ne(() => {
|
|
2363
|
-
e &&
|
|
2363
|
+
e && F.current !== e && R();
|
|
2364
2364
|
}, [e]);
|
|
2365
|
-
const
|
|
2365
|
+
const $ = V(
|
|
2366
2366
|
async (E) => {
|
|
2367
2367
|
v(!0), f(null);
|
|
2368
2368
|
try {
|
|
2369
|
-
const
|
|
2370
|
-
return x(
|
|
2371
|
-
} catch (
|
|
2372
|
-
throw f(
|
|
2369
|
+
const L = await t.submitRiskScoring(E);
|
|
2370
|
+
return x(L), L;
|
|
2371
|
+
} catch (L) {
|
|
2372
|
+
throw f(L), L;
|
|
2373
2373
|
} finally {
|
|
2374
2374
|
v(!1);
|
|
2375
2375
|
}
|
|
@@ -2379,33 +2379,33 @@ function Nr(e) {
|
|
|
2379
2379
|
return {
|
|
2380
2380
|
criteria: a,
|
|
2381
2381
|
initialAnswers: l,
|
|
2382
|
-
result:
|
|
2382
|
+
result: N,
|
|
2383
2383
|
isLoading: u,
|
|
2384
|
-
isSubmitting:
|
|
2385
|
-
error:
|
|
2386
|
-
load:
|
|
2387
|
-
submit:
|
|
2384
|
+
isSubmitting: m,
|
|
2385
|
+
error: S,
|
|
2386
|
+
load: R,
|
|
2387
|
+
submit: $
|
|
2388
2388
|
};
|
|
2389
2389
|
}
|
|
2390
2390
|
function Sr() {
|
|
2391
|
-
const { applicantService: e, config: t } =
|
|
2391
|
+
const { applicantService: e, config: t } = ge(), [n, a] = k(!1), [s, l] = k(null), c = ee(!1), u = ee(!1), h = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(N) {
|
|
2392
2392
|
const x = Math.random() * 16 | 0;
|
|
2393
|
-
return (
|
|
2394
|
-
}),
|
|
2395
|
-
async (
|
|
2393
|
+
return (N === "x" ? x : x & 3 | 8).toString(16);
|
|
2394
|
+
}), m = V(
|
|
2395
|
+
async (N) => {
|
|
2396
2396
|
var x;
|
|
2397
2397
|
if (c.current)
|
|
2398
2398
|
throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
|
|
2399
2399
|
c.current = !0, a(!0), l(null);
|
|
2400
2400
|
try {
|
|
2401
|
-
if (
|
|
2402
|
-
const
|
|
2403
|
-
console.log("[SardinAI] Generated session key:",
|
|
2401
|
+
if (N.applicantAdditionalDatas || (N.applicantAdditionalDatas = []), (x = t.identityProviders) != null && x.sardinai) {
|
|
2402
|
+
const F = h();
|
|
2403
|
+
console.log("[SardinAI] Generated session key:", F), N.applicantAdditionalDatas.push({
|
|
2404
2404
|
paramName: "sessionKey",
|
|
2405
|
-
value:
|
|
2405
|
+
value: F
|
|
2406
2406
|
});
|
|
2407
2407
|
}
|
|
2408
|
-
return await e.createApplicant(
|
|
2408
|
+
return await e.createApplicant(N);
|
|
2409
2409
|
} catch (D) {
|
|
2410
2410
|
throw l(D), D;
|
|
2411
2411
|
} finally {
|
|
@@ -2413,11 +2413,11 @@ function Sr() {
|
|
|
2413
2413
|
}
|
|
2414
2414
|
},
|
|
2415
2415
|
[e, t]
|
|
2416
|
-
), v =
|
|
2417
|
-
async (
|
|
2416
|
+
), v = V(
|
|
2417
|
+
async (N) => {
|
|
2418
2418
|
a(!0), l(null);
|
|
2419
2419
|
try {
|
|
2420
|
-
return await e.createCompanyApplicant(
|
|
2420
|
+
return await e.createCompanyApplicant(N);
|
|
2421
2421
|
} catch (x) {
|
|
2422
2422
|
throw l(x), x;
|
|
2423
2423
|
} finally {
|
|
@@ -2425,13 +2425,13 @@ function Sr() {
|
|
|
2425
2425
|
}
|
|
2426
2426
|
},
|
|
2427
2427
|
[e]
|
|
2428
|
-
),
|
|
2429
|
-
async (
|
|
2428
|
+
), S = V(
|
|
2429
|
+
async (N) => {
|
|
2430
2430
|
if (u.current)
|
|
2431
2431
|
throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
|
|
2432
2432
|
u.current = !0, a(!0), l(null);
|
|
2433
2433
|
try {
|
|
2434
|
-
return await e.getApplicantData(
|
|
2434
|
+
return await e.getApplicantData(N);
|
|
2435
2435
|
} catch (x) {
|
|
2436
2436
|
throw l(x), x;
|
|
2437
2437
|
} finally {
|
|
@@ -2439,11 +2439,11 @@ function Sr() {
|
|
|
2439
2439
|
}
|
|
2440
2440
|
},
|
|
2441
2441
|
[e]
|
|
2442
|
-
), f =
|
|
2443
|
-
async (
|
|
2442
|
+
), f = V(
|
|
2443
|
+
async (N) => {
|
|
2444
2444
|
a(!0), l(null);
|
|
2445
2445
|
try {
|
|
2446
|
-
await e.stopProgress(
|
|
2446
|
+
await e.stopProgress(N);
|
|
2447
2447
|
} catch (x) {
|
|
2448
2448
|
throw l(x), x;
|
|
2449
2449
|
} finally {
|
|
@@ -2455,13 +2455,13 @@ function Sr() {
|
|
|
2455
2455
|
return {
|
|
2456
2456
|
isLoading: n,
|
|
2457
2457
|
error: s,
|
|
2458
|
-
createApplicant:
|
|
2458
|
+
createApplicant: m,
|
|
2459
2459
|
createCompanyApplicant: v,
|
|
2460
|
-
getApplicantData:
|
|
2460
|
+
getApplicantData: S,
|
|
2461
2461
|
stopProgress: f
|
|
2462
2462
|
};
|
|
2463
2463
|
}
|
|
2464
|
-
const
|
|
2464
|
+
const Q = ({
|
|
2465
2465
|
children: e,
|
|
2466
2466
|
variant: t = "primary",
|
|
2467
2467
|
size: n = "md",
|
|
@@ -2476,7 +2476,7 @@ const q = ({
|
|
|
2476
2476
|
outline: "border-2 border-primary-500 text-primary-500 hover:bg-primary-50 focus:ring-primary-500",
|
|
2477
2477
|
danger: "bg-danger-500 text-white hover:bg-danger-600 focus:ring-danger-500",
|
|
2478
2478
|
ghost: "text-gray-700 hover:bg-gray-100 focus:ring-gray-400"
|
|
2479
|
-
},
|
|
2479
|
+
}, m = {
|
|
2480
2480
|
sm: "px-3 py-1.5 text-sm",
|
|
2481
2481
|
md: "px-4 py-2 text-base",
|
|
2482
2482
|
lg: "px-6 py-3 text-lg"
|
|
@@ -2484,7 +2484,7 @@ const q = ({
|
|
|
2484
2484
|
return /* @__PURE__ */ o(
|
|
2485
2485
|
"button",
|
|
2486
2486
|
{
|
|
2487
|
-
className: oe(u, h[t],
|
|
2487
|
+
className: oe(u, h[t], m[n], l),
|
|
2488
2488
|
disabled: s || a,
|
|
2489
2489
|
...c,
|
|
2490
2490
|
children: [
|
|
@@ -2599,7 +2599,7 @@ const j = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2599
2599
|
...n,
|
|
2600
2600
|
children: e
|
|
2601
2601
|
}
|
|
2602
|
-
),
|
|
2602
|
+
), Ie = ({ children: e, variant: t = "default", className: n, ...a }) => /* @__PURE__ */ r(
|
|
2603
2603
|
"span",
|
|
2604
2604
|
{
|
|
2605
2605
|
className: oe(
|
|
@@ -2698,18 +2698,18 @@ const j = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2698
2698
|
},
|
|
2699
2699
|
"__placeholder__"
|
|
2700
2700
|
),
|
|
2701
|
-
a.map((
|
|
2701
|
+
a.map((m, v) => /* @__PURE__ */ r(
|
|
2702
2702
|
"option",
|
|
2703
2703
|
{
|
|
2704
|
-
value:
|
|
2705
|
-
disabled:
|
|
2704
|
+
value: m.value,
|
|
2705
|
+
disabled: m.disabled,
|
|
2706
2706
|
style: {
|
|
2707
2707
|
backgroundColor: "var(--metakyc-input-bg, #ffffff)",
|
|
2708
|
-
color:
|
|
2708
|
+
color: m.disabled ? "var(--metakyc-text-secondary, #9ca3af)" : "var(--metakyc-text-primary, #111827)"
|
|
2709
2709
|
},
|
|
2710
|
-
children:
|
|
2710
|
+
children: m.label
|
|
2711
2711
|
},
|
|
2712
|
-
|
|
2712
|
+
m.value || `option-${v}`
|
|
2713
2713
|
))
|
|
2714
2714
|
]
|
|
2715
2715
|
}
|
|
@@ -2728,72 +2728,72 @@ const ct = 280, Cr = ({
|
|
|
2728
2728
|
disabled: l = !1,
|
|
2729
2729
|
required: c = !1
|
|
2730
2730
|
}) => {
|
|
2731
|
-
const [u, h] =
|
|
2731
|
+
const [u, h] = k(!1), [m, v] = k(""), [S, f] = k(null), N = ee(null), x = ee(null), D = ee(null), F = V(() => {
|
|
2732
2732
|
if (!x.current) return null;
|
|
2733
|
-
const
|
|
2734
|
-
return { top: te ?
|
|
2735
|
-
}, []),
|
|
2733
|
+
const C = x.current.getBoundingClientRect(), te = window.innerHeight - C.bottom < ct && C.top > ct;
|
|
2734
|
+
return { top: te ? C.top : C.bottom + 4, left: C.left, width: C.width, openUp: te };
|
|
2735
|
+
}, []), R = V(() => {
|
|
2736
2736
|
if (l) return;
|
|
2737
|
-
const
|
|
2738
|
-
|
|
2739
|
-
}, [l,
|
|
2737
|
+
const C = F();
|
|
2738
|
+
C && f(C), h(!0);
|
|
2739
|
+
}, [l, F]), $ = V(() => {
|
|
2740
2740
|
h(!1), v("");
|
|
2741
2741
|
}, []);
|
|
2742
2742
|
ne(() => {
|
|
2743
2743
|
if (!u) return;
|
|
2744
|
-
const
|
|
2745
|
-
var
|
|
2744
|
+
const C = (U) => {
|
|
2745
|
+
var ye, se;
|
|
2746
2746
|
const te = U.target;
|
|
2747
|
-
!((
|
|
2747
|
+
!((ye = N.current) != null && ye.contains(te)) && !((se = D.current) != null && se.contains(te)) && $();
|
|
2748
2748
|
};
|
|
2749
|
-
return document.addEventListener("mousedown",
|
|
2750
|
-
}, [u,
|
|
2749
|
+
return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
|
|
2750
|
+
}, [u, $]), ne(() => {
|
|
2751
2751
|
if (!u) return;
|
|
2752
|
-
const
|
|
2753
|
-
const U =
|
|
2752
|
+
const C = () => {
|
|
2753
|
+
const U = F();
|
|
2754
2754
|
U && f(U);
|
|
2755
2755
|
};
|
|
2756
|
-
return window.addEventListener("scroll",
|
|
2757
|
-
window.removeEventListener("scroll",
|
|
2756
|
+
return window.addEventListener("scroll", C, !0), window.addEventListener("resize", C), () => {
|
|
2757
|
+
window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C);
|
|
2758
2758
|
};
|
|
2759
|
-
}, [u,
|
|
2759
|
+
}, [u, F]);
|
|
2760
2760
|
const E = a.filter(
|
|
2761
|
-
(
|
|
2762
|
-
),
|
|
2763
|
-
l || n(t.includes(
|
|
2764
|
-
},
|
|
2765
|
-
U.stopPropagation(), l || n(t.filter((te) => te !==
|
|
2766
|
-
}, X = (
|
|
2761
|
+
(C) => C.label.toLowerCase().includes(m.toLowerCase())
|
|
2762
|
+
), L = (C) => {
|
|
2763
|
+
l || n(t.includes(C) ? t.filter((U) => U !== C) : [...t, C]);
|
|
2764
|
+
}, Y = (C, U) => {
|
|
2765
|
+
U.stopPropagation(), l || n(t.filter((te) => te !== C));
|
|
2766
|
+
}, X = (C) => {
|
|
2767
2767
|
var U;
|
|
2768
|
-
return ((U = a.find((te) => te.value ===
|
|
2769
|
-
},
|
|
2768
|
+
return ((U = a.find((te) => te.value === C)) == null ? void 0 : U.label) || C;
|
|
2769
|
+
}, P = x.current ? getComputedStyle(x.current) : null, w = (P == null ? void 0 : P.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", H = (P == null ? void 0 : P.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", W = (P == null ? void 0 : P.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", I = (P == null ? void 0 : P.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", B = (P == null ? void 0 : P.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", T = (P == null ? void 0 : P.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", O = (P == null ? void 0 : P.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", G = u && S && /* @__PURE__ */ o(
|
|
2770
2770
|
"div",
|
|
2771
2771
|
{
|
|
2772
2772
|
ref: D,
|
|
2773
2773
|
className: "metakyc-multiselect-dropdown",
|
|
2774
2774
|
style: {
|
|
2775
2775
|
position: "fixed",
|
|
2776
|
-
top:
|
|
2777
|
-
bottom:
|
|
2778
|
-
left:
|
|
2779
|
-
width:
|
|
2776
|
+
top: S.openUp ? void 0 : S.top,
|
|
2777
|
+
bottom: S.openUp ? window.innerHeight - S.top + 4 : void 0,
|
|
2778
|
+
left: S.left,
|
|
2779
|
+
width: S.width,
|
|
2780
2780
|
zIndex: 99999,
|
|
2781
2781
|
borderRadius: "8px",
|
|
2782
2782
|
boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
|
|
2783
|
-
border: `1px solid ${
|
|
2784
|
-
backgroundColor:
|
|
2783
|
+
border: `1px solid ${H}`,
|
|
2784
|
+
backgroundColor: w,
|
|
2785
2785
|
overflow: "hidden"
|
|
2786
2786
|
},
|
|
2787
2787
|
children: [
|
|
2788
|
-
/* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${
|
|
2788
|
+
/* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${H}` }, children: /* @__PURE__ */ r(
|
|
2789
2789
|
"input",
|
|
2790
2790
|
{
|
|
2791
2791
|
type: "text",
|
|
2792
|
-
value:
|
|
2793
|
-
onChange: (
|
|
2792
|
+
value: m,
|
|
2793
|
+
onChange: (C) => v(C.target.value),
|
|
2794
2794
|
placeholder: "Search...",
|
|
2795
2795
|
autoFocus: !0,
|
|
2796
|
-
onClick: (
|
|
2796
|
+
onClick: (C) => C.stopPropagation(),
|
|
2797
2797
|
className: "metakyc-multiselect-search w-full",
|
|
2798
2798
|
style: {
|
|
2799
2799
|
display: "block",
|
|
@@ -2801,20 +2801,20 @@ const ct = 280, Cr = ({
|
|
|
2801
2801
|
padding: "6px 8px",
|
|
2802
2802
|
fontSize: "13px",
|
|
2803
2803
|
borderRadius: "6px",
|
|
2804
|
-
border: `1px solid ${
|
|
2805
|
-
backgroundColor:
|
|
2806
|
-
color:
|
|
2804
|
+
border: `1px solid ${H}`,
|
|
2805
|
+
backgroundColor: w,
|
|
2806
|
+
color: W,
|
|
2807
2807
|
outline: "none",
|
|
2808
2808
|
boxSizing: "border-box"
|
|
2809
2809
|
}
|
|
2810
2810
|
}
|
|
2811
2811
|
) }),
|
|
2812
|
-
/* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: E.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color:
|
|
2813
|
-
const U = t.includes(
|
|
2812
|
+
/* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: E.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: I }, children: "No results" }) : E.map((C) => {
|
|
2813
|
+
const U = t.includes(C.value);
|
|
2814
2814
|
return /* @__PURE__ */ o(
|
|
2815
2815
|
"li",
|
|
2816
2816
|
{
|
|
2817
|
-
onClick: () =>
|
|
2817
|
+
onClick: () => L(C.value),
|
|
2818
2818
|
className: "metakyc-multiselect-option",
|
|
2819
2819
|
style: {
|
|
2820
2820
|
display: "flex",
|
|
@@ -2823,12 +2823,12 @@ const ct = 280, Cr = ({
|
|
|
2823
2823
|
padding: "8px 12px",
|
|
2824
2824
|
fontSize: "13px",
|
|
2825
2825
|
cursor: "pointer",
|
|
2826
|
-
backgroundColor: U ?
|
|
2827
|
-
color: U ?
|
|
2826
|
+
backgroundColor: U ? T : "transparent",
|
|
2827
|
+
color: U ? B : W,
|
|
2828
2828
|
userSelect: "none"
|
|
2829
2829
|
},
|
|
2830
2830
|
onMouseEnter: (te) => {
|
|
2831
|
-
U || (te.currentTarget.style.backgroundColor =
|
|
2831
|
+
U || (te.currentTarget.style.backgroundColor = O);
|
|
2832
2832
|
},
|
|
2833
2833
|
onMouseLeave: (te) => {
|
|
2834
2834
|
U || (te.currentTarget.style.backgroundColor = "transparent");
|
|
@@ -2840,16 +2840,16 @@ const ct = 280, Cr = ({
|
|
|
2840
2840
|
type: "checkbox",
|
|
2841
2841
|
checked: U,
|
|
2842
2842
|
readOnly: !0,
|
|
2843
|
-
style: { accentColor:
|
|
2843
|
+
style: { accentColor: B, pointerEvents: "none", flexShrink: 0 }
|
|
2844
2844
|
}
|
|
2845
2845
|
),
|
|
2846
|
-
/* @__PURE__ */ r("span", { children:
|
|
2846
|
+
/* @__PURE__ */ r("span", { children: C.label })
|
|
2847
2847
|
]
|
|
2848
2848
|
},
|
|
2849
|
-
|
|
2849
|
+
C.value
|
|
2850
2850
|
);
|
|
2851
2851
|
}) }),
|
|
2852
|
-
t.length > 0 && /* @__PURE__ */ r("div", { style: { padding: "6px 12px", borderTop: `1px solid ${
|
|
2852
|
+
t.length > 0 && /* @__PURE__ */ r("div", { style: { padding: "6px 12px", borderTop: `1px solid ${H}` }, children: /* @__PURE__ */ o(
|
|
2853
2853
|
"button",
|
|
2854
2854
|
{
|
|
2855
2855
|
type: "button",
|
|
@@ -2867,7 +2867,7 @@ const ct = 280, Cr = ({
|
|
|
2867
2867
|
]
|
|
2868
2868
|
}
|
|
2869
2869
|
);
|
|
2870
|
-
return /* @__PURE__ */ o("div", { className: "w-full metakyc-multiselect", ref:
|
|
2870
|
+
return /* @__PURE__ */ o("div", { className: "w-full metakyc-multiselect", ref: N, children: [
|
|
2871
2871
|
e && /* @__PURE__ */ o(
|
|
2872
2872
|
"label",
|
|
2873
2873
|
{
|
|
@@ -2883,7 +2883,7 @@ const ct = 280, Cr = ({
|
|
|
2883
2883
|
"div",
|
|
2884
2884
|
{
|
|
2885
2885
|
ref: x,
|
|
2886
|
-
onClick: () => u ?
|
|
2886
|
+
onClick: () => u ? $() : R(),
|
|
2887
2887
|
className: oe(
|
|
2888
2888
|
"metakyc-multiselect-trigger",
|
|
2889
2889
|
"min-h-[42px] w-full px-3 py-2 rounded-lg border text-sm transition-colors relative",
|
|
@@ -2903,7 +2903,7 @@ const ct = 280, Cr = ({
|
|
|
2903
2903
|
style: { color: "var(--metakyc-text-secondary, #9ca3af)" },
|
|
2904
2904
|
children: s
|
|
2905
2905
|
}
|
|
2906
|
-
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((
|
|
2906
|
+
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((C) => /* @__PURE__ */ o(
|
|
2907
2907
|
"span",
|
|
2908
2908
|
{
|
|
2909
2909
|
className: "metakyc-multiselect-chip inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium",
|
|
@@ -2912,12 +2912,12 @@ const ct = 280, Cr = ({
|
|
|
2912
2912
|
color: "var(--metakyc-primary, #2563eb)"
|
|
2913
2913
|
},
|
|
2914
2914
|
children: [
|
|
2915
|
-
X(
|
|
2915
|
+
X(C),
|
|
2916
2916
|
!l && /* @__PURE__ */ r(
|
|
2917
2917
|
"button",
|
|
2918
2918
|
{
|
|
2919
2919
|
type: "button",
|
|
2920
|
-
onClick: (U) =>
|
|
2920
|
+
onClick: (U) => Y(C, U),
|
|
2921
2921
|
className: "metakyc-multiselect-chip-remove",
|
|
2922
2922
|
style: {
|
|
2923
2923
|
background: "transparent",
|
|
@@ -2943,7 +2943,7 @@ const ct = 280, Cr = ({
|
|
|
2943
2943
|
)
|
|
2944
2944
|
]
|
|
2945
2945
|
},
|
|
2946
|
-
|
|
2946
|
+
C
|
|
2947
2947
|
)) }),
|
|
2948
2948
|
/* @__PURE__ */ r(
|
|
2949
2949
|
"span",
|
|
@@ -2956,7 +2956,7 @@ const ct = 280, Cr = ({
|
|
|
2956
2956
|
]
|
|
2957
2957
|
}
|
|
2958
2958
|
),
|
|
2959
|
-
typeof document < "u" &&
|
|
2959
|
+
typeof document < "u" && G ? it(G, document.body) : null
|
|
2960
2960
|
] });
|
|
2961
2961
|
}, dt = 260, Re = ({
|
|
2962
2962
|
label: e,
|
|
@@ -2968,56 +2968,56 @@ const ct = 280, Cr = ({
|
|
|
2968
2968
|
onChange: c,
|
|
2969
2969
|
disabled: u = !1,
|
|
2970
2970
|
required: h = !1,
|
|
2971
|
-
className:
|
|
2971
|
+
className: m
|
|
2972
2972
|
}) => {
|
|
2973
2973
|
var se;
|
|
2974
|
-
const [v,
|
|
2975
|
-
if (!
|
|
2976
|
-
const M =
|
|
2974
|
+
const [v, S] = k(!1), [f, N] = k(""), [x, D] = k(null), F = ee(null), R = ee(null), $ = ee(null), E = ee(null), L = V(() => {
|
|
2975
|
+
if (!R.current) return null;
|
|
2976
|
+
const M = R.current.getBoundingClientRect(), ie = window.innerHeight - M.bottom < dt && M.top > dt;
|
|
2977
2977
|
return {
|
|
2978
2978
|
top: ie ? M.top : M.bottom + 4,
|
|
2979
2979
|
left: M.left,
|
|
2980
2980
|
width: M.width,
|
|
2981
2981
|
openUp: ie
|
|
2982
2982
|
};
|
|
2983
|
-
}, []),
|
|
2983
|
+
}, []), Y = V(() => {
|
|
2984
2984
|
if (u) return;
|
|
2985
|
-
const M =
|
|
2986
|
-
M && D(M),
|
|
2987
|
-
}, [u,
|
|
2988
|
-
|
|
2989
|
-
}, []),
|
|
2985
|
+
const M = L();
|
|
2986
|
+
M && D(M), S(!0);
|
|
2987
|
+
}, [u, L]), X = V(() => {
|
|
2988
|
+
S(!1), N("");
|
|
2989
|
+
}, []), P = () => v ? X() : Y();
|
|
2990
2990
|
ne(() => {
|
|
2991
2991
|
if (!v) return;
|
|
2992
2992
|
const M = (Z) => {
|
|
2993
|
-
var
|
|
2993
|
+
var Ae, Pe;
|
|
2994
2994
|
const ie = Z.target;
|
|
2995
|
-
!((
|
|
2995
|
+
!((Ae = F.current) != null && Ae.contains(ie)) && !((Pe = $.current) != null && Pe.contains(ie)) && X();
|
|
2996
2996
|
};
|
|
2997
2997
|
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
2998
2998
|
}, [v, X]), ne(() => {
|
|
2999
2999
|
if (!v) return;
|
|
3000
3000
|
const M = () => {
|
|
3001
|
-
const Z =
|
|
3001
|
+
const Z = L();
|
|
3002
3002
|
Z && D(Z);
|
|
3003
3003
|
};
|
|
3004
3004
|
return window.addEventListener("scroll", M, !0), window.addEventListener("resize", M), () => {
|
|
3005
3005
|
window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M);
|
|
3006
3006
|
};
|
|
3007
|
-
}, [v,
|
|
3007
|
+
}, [v, L]), ne(() => {
|
|
3008
3008
|
v && E.current && setTimeout(() => {
|
|
3009
3009
|
var M;
|
|
3010
3010
|
return (M = E.current) == null ? void 0 : M.focus();
|
|
3011
3011
|
}, 0);
|
|
3012
3012
|
}, [v]);
|
|
3013
|
-
const
|
|
3013
|
+
const w = a.filter(
|
|
3014
3014
|
(M) => M.label.toLowerCase().includes(f.toLowerCase()) || M.value.toLowerCase().includes(f.toLowerCase())
|
|
3015
|
-
),
|
|
3015
|
+
), H = (se = a.find((M) => M.value === l)) == null ? void 0 : se.label, W = (M, Z) => {
|
|
3016
3016
|
u || Z || (c(M), X());
|
|
3017
|
-
},
|
|
3017
|
+
}, I = R.current ? getComputedStyle(R.current) : null, B = (I == null ? void 0 : I.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", T = (I == null ? void 0 : I.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", O = (I == null ? void 0 : I.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", G = (I == null ? void 0 : I.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", C = (I == null ? void 0 : I.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", U = (I == null ? void 0 : I.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", te = (I == null ? void 0 : I.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", ye = v && x && /* @__PURE__ */ o(
|
|
3018
3018
|
"div",
|
|
3019
3019
|
{
|
|
3020
|
-
ref:
|
|
3020
|
+
ref: $,
|
|
3021
3021
|
className: "metakyc-searchable-select-dropdown",
|
|
3022
3022
|
style: {
|
|
3023
3023
|
position: "fixed",
|
|
@@ -3028,18 +3028,18 @@ const ct = 280, Cr = ({
|
|
|
3028
3028
|
zIndex: 99999,
|
|
3029
3029
|
borderRadius: "8px",
|
|
3030
3030
|
boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
|
|
3031
|
-
border: `1px solid ${
|
|
3032
|
-
backgroundColor:
|
|
3031
|
+
border: `1px solid ${T}`,
|
|
3032
|
+
backgroundColor: B,
|
|
3033
3033
|
overflow: "hidden"
|
|
3034
3034
|
},
|
|
3035
3035
|
children: [
|
|
3036
|
-
/* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${
|
|
3036
|
+
/* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${T}` }, children: /* @__PURE__ */ r(
|
|
3037
3037
|
"input",
|
|
3038
3038
|
{
|
|
3039
3039
|
ref: E,
|
|
3040
3040
|
type: "text",
|
|
3041
3041
|
value: f,
|
|
3042
|
-
onChange: (M) =>
|
|
3042
|
+
onChange: (M) => N(M.target.value),
|
|
3043
3043
|
placeholder: "Search...",
|
|
3044
3044
|
onClick: (M) => M.stopPropagation(),
|
|
3045
3045
|
className: "metakyc-searchable-select-search w-full",
|
|
@@ -3049,9 +3049,9 @@ const ct = 280, Cr = ({
|
|
|
3049
3049
|
padding: "6px 8px",
|
|
3050
3050
|
fontSize: "13px",
|
|
3051
3051
|
borderRadius: "6px",
|
|
3052
|
-
border: `1px solid ${
|
|
3053
|
-
backgroundColor:
|
|
3054
|
-
color:
|
|
3052
|
+
border: `1px solid ${T}`,
|
|
3053
|
+
backgroundColor: B,
|
|
3054
|
+
color: O,
|
|
3055
3055
|
outline: "none",
|
|
3056
3056
|
boxSizing: "border-box"
|
|
3057
3057
|
}
|
|
@@ -3067,20 +3067,20 @@ const ct = 280, Cr = ({
|
|
|
3067
3067
|
maxHeight: "208px",
|
|
3068
3068
|
overflowY: "auto"
|
|
3069
3069
|
},
|
|
3070
|
-
children:
|
|
3070
|
+
children: w.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: G }, children: "No results" }) : w.map((M) => {
|
|
3071
3071
|
const Z = M.value === l;
|
|
3072
3072
|
return /* @__PURE__ */ r(
|
|
3073
3073
|
"li",
|
|
3074
3074
|
{
|
|
3075
3075
|
className: "metakyc-searchable-select-option",
|
|
3076
|
-
onClick: () =>
|
|
3076
|
+
onClick: () => W(M.value, M.disabled),
|
|
3077
3077
|
style: {
|
|
3078
3078
|
padding: "8px 12px",
|
|
3079
3079
|
fontSize: "13px",
|
|
3080
3080
|
cursor: M.disabled ? "not-allowed" : "pointer",
|
|
3081
3081
|
opacity: M.disabled ? 0.4 : 1,
|
|
3082
3082
|
backgroundColor: Z ? U : "transparent",
|
|
3083
|
-
color: Z ?
|
|
3083
|
+
color: Z ? C : O,
|
|
3084
3084
|
userSelect: "none"
|
|
3085
3085
|
},
|
|
3086
3086
|
onMouseEnter: (ie) => {
|
|
@@ -3102,8 +3102,8 @@ const ct = 280, Cr = ({
|
|
|
3102
3102
|
return /* @__PURE__ */ o(
|
|
3103
3103
|
"div",
|
|
3104
3104
|
{
|
|
3105
|
-
className: oe("w-full metakyc-searchable-select",
|
|
3106
|
-
ref:
|
|
3105
|
+
className: oe("w-full metakyc-searchable-select", m),
|
|
3106
|
+
ref: F,
|
|
3107
3107
|
children: [
|
|
3108
3108
|
e && /* @__PURE__ */ o(
|
|
3109
3109
|
"label",
|
|
@@ -3119,12 +3119,12 @@ const ct = 280, Cr = ({
|
|
|
3119
3119
|
/* @__PURE__ */ o(
|
|
3120
3120
|
"div",
|
|
3121
3121
|
{
|
|
3122
|
-
ref:
|
|
3122
|
+
ref: R,
|
|
3123
3123
|
role: "button",
|
|
3124
3124
|
tabIndex: u ? -1 : 0,
|
|
3125
|
-
onClick:
|
|
3125
|
+
onClick: P,
|
|
3126
3126
|
onKeyDown: (M) => {
|
|
3127
|
-
(M.key === "Enter" || M.key === " ") && (M.preventDefault(),
|
|
3127
|
+
(M.key === "Enter" || M.key === " ") && (M.preventDefault(), P()), M.key === "Escape" && X();
|
|
3128
3128
|
},
|
|
3129
3129
|
className: oe(
|
|
3130
3130
|
"metakyc-searchable-select-trigger",
|
|
@@ -3135,14 +3135,14 @@ const ct = 280, Cr = ({
|
|
|
3135
3135
|
),
|
|
3136
3136
|
style: {
|
|
3137
3137
|
backgroundColor: "var(--metakyc-input-bg, #ffffff)",
|
|
3138
|
-
color:
|
|
3138
|
+
color: H ? "var(--metakyc-text-primary, #111827)" : "var(--metakyc-text-secondary, #9ca3af)",
|
|
3139
3139
|
borderColor: t ? "var(--metakyc-error, #ef4444)" : v ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #d1d5db)",
|
|
3140
3140
|
minHeight: "42px",
|
|
3141
3141
|
outline: v ? "2px solid var(--metakyc-primary, #2563eb)" : "none",
|
|
3142
3142
|
outlineOffset: "-1px"
|
|
3143
3143
|
},
|
|
3144
3144
|
children: [
|
|
3145
|
-
/* @__PURE__ */ r("span", { className: "truncate flex-1", children:
|
|
3145
|
+
/* @__PURE__ */ r("span", { className: "truncate flex-1", children: H || s }),
|
|
3146
3146
|
/* @__PURE__ */ r(
|
|
3147
3147
|
"span",
|
|
3148
3148
|
{
|
|
@@ -3154,7 +3154,7 @@ const ct = 280, Cr = ({
|
|
|
3154
3154
|
]
|
|
3155
3155
|
}
|
|
3156
3156
|
),
|
|
3157
|
-
typeof document < "u" &&
|
|
3157
|
+
typeof document < "u" && ye ? it(ye, document.body) : null,
|
|
3158
3158
|
t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
|
|
3159
3159
|
!t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
|
|
3160
3160
|
]
|
|
@@ -3172,27 +3172,27 @@ const Ar = ({
|
|
|
3172
3172
|
value: c = [],
|
|
3173
3173
|
className: u
|
|
3174
3174
|
}) => {
|
|
3175
|
-
const [h,
|
|
3176
|
-
if (!
|
|
3177
|
-
const
|
|
3178
|
-
if (s &&
|
|
3179
|
-
const
|
|
3180
|
-
alert(`Some files exceed the maximum size of ${
|
|
3175
|
+
const [h, m] = k(!1), v = ee(null), S = (R) => {
|
|
3176
|
+
if (!R) return;
|
|
3177
|
+
const $ = Array.from(R);
|
|
3178
|
+
if (s && $.filter((L) => L.size > s).length > 0) {
|
|
3179
|
+
const L = rt(s);
|
|
3180
|
+
alert(`Some files exceed the maximum size of ${L}`);
|
|
3181
3181
|
return;
|
|
3182
3182
|
}
|
|
3183
|
-
l == null || l(a ? [...c,
|
|
3184
|
-
}, f = (
|
|
3185
|
-
|
|
3186
|
-
},
|
|
3187
|
-
|
|
3188
|
-
}, x = (
|
|
3189
|
-
|
|
3183
|
+
l == null || l(a ? [...c, ...$] : [$[0]]);
|
|
3184
|
+
}, f = (R) => {
|
|
3185
|
+
R.preventDefault(), m(!0);
|
|
3186
|
+
}, N = () => {
|
|
3187
|
+
m(!1);
|
|
3188
|
+
}, x = (R) => {
|
|
3189
|
+
R.preventDefault(), m(!1), S(R.dataTransfer.files);
|
|
3190
3190
|
}, D = () => {
|
|
3191
|
-
var
|
|
3192
|
-
(
|
|
3193
|
-
},
|
|
3194
|
-
const
|
|
3195
|
-
l == null || l(
|
|
3191
|
+
var R;
|
|
3192
|
+
(R = v.current) == null || R.click();
|
|
3193
|
+
}, F = (R) => {
|
|
3194
|
+
const $ = c.filter((E, L) => L !== R);
|
|
3195
|
+
l == null || l($);
|
|
3196
3196
|
};
|
|
3197
3197
|
return /* @__PURE__ */ o("div", { className: oe("w-full", u), children: [
|
|
3198
3198
|
e && /* @__PURE__ */ r("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: e }),
|
|
@@ -3205,7 +3205,7 @@ const Ar = ({
|
|
|
3205
3205
|
t && "border-danger-500"
|
|
3206
3206
|
),
|
|
3207
3207
|
onDragOver: f,
|
|
3208
|
-
onDragLeave:
|
|
3208
|
+
onDragLeave: N,
|
|
3209
3209
|
onDrop: x,
|
|
3210
3210
|
onClick: D,
|
|
3211
3211
|
children: [
|
|
@@ -3217,7 +3217,7 @@ const Ar = ({
|
|
|
3217
3217
|
className: "hidden",
|
|
3218
3218
|
accept: n,
|
|
3219
3219
|
multiple: a,
|
|
3220
|
-
onChange: (
|
|
3220
|
+
onChange: (R) => S(R.target.files)
|
|
3221
3221
|
}
|
|
3222
3222
|
),
|
|
3223
3223
|
/* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
@@ -3251,7 +3251,7 @@ const Ar = ({
|
|
|
3251
3251
|
]
|
|
3252
3252
|
}
|
|
3253
3253
|
),
|
|
3254
|
-
c.length > 0 && /* @__PURE__ */ r("div", { className: "mt-3 space-y-2", children: c.map((
|
|
3254
|
+
c.length > 0 && /* @__PURE__ */ r("div", { className: "mt-3 space-y-2", children: c.map((R, $) => /* @__PURE__ */ o(
|
|
3255
3255
|
"div",
|
|
3256
3256
|
{
|
|
3257
3257
|
className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
|
|
@@ -3273,10 +3273,10 @@ const Ar = ({
|
|
|
3273
3273
|
)
|
|
3274
3274
|
}
|
|
3275
3275
|
),
|
|
3276
|
-
/* @__PURE__ */ r("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children:
|
|
3276
|
+
/* @__PURE__ */ r("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children: R.name }),
|
|
3277
3277
|
/* @__PURE__ */ o("span", { className: "text-xs text-gray-500", children: [
|
|
3278
3278
|
"(",
|
|
3279
|
-
rt(
|
|
3279
|
+
rt(R.size),
|
|
3280
3280
|
")"
|
|
3281
3281
|
] })
|
|
3282
3282
|
] }),
|
|
@@ -3285,7 +3285,7 @@ const Ar = ({
|
|
|
3285
3285
|
{
|
|
3286
3286
|
type: "button",
|
|
3287
3287
|
onClick: (E) => {
|
|
3288
|
-
E.stopPropagation(),
|
|
3288
|
+
E.stopPropagation(), F($);
|
|
3289
3289
|
},
|
|
3290
3290
|
className: "ml-2 text-danger-500 hover:text-danger-700 focus:outline-none",
|
|
3291
3291
|
children: /* @__PURE__ */ r("svg", { className: "h-5 w-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ r(
|
|
@@ -3300,7 +3300,7 @@ const Ar = ({
|
|
|
3300
3300
|
)
|
|
3301
3301
|
]
|
|
3302
3302
|
},
|
|
3303
|
-
|
|
3303
|
+
$
|
|
3304
3304
|
)) }),
|
|
3305
3305
|
t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm text-danger-500", children: t })
|
|
3306
3306
|
] });
|
|
@@ -3420,7 +3420,7 @@ const Fr = (e) => {
|
|
|
3420
3420
|
* This source code is licensed under the ISC license.
|
|
3421
3421
|
* See the LICENSE file in the root directory of this source tree.
|
|
3422
3422
|
*/
|
|
3423
|
-
const
|
|
3423
|
+
const Lr = Ge(
|
|
3424
3424
|
({
|
|
3425
3425
|
color: e = "currentColor",
|
|
3426
3426
|
size: t = 24,
|
|
@@ -3444,7 +3444,7 @@ const Tr = Ge(
|
|
|
3444
3444
|
...u
|
|
3445
3445
|
},
|
|
3446
3446
|
[
|
|
3447
|
-
...c.map(([
|
|
3447
|
+
...c.map(([m, v]) => nt(m, v)),
|
|
3448
3448
|
...Array.isArray(l) ? l : [l]
|
|
3449
3449
|
]
|
|
3450
3450
|
)
|
|
@@ -3457,7 +3457,7 @@ const Tr = Ge(
|
|
|
3457
3457
|
*/
|
|
3458
3458
|
const ft = (e, t) => {
|
|
3459
3459
|
const n = Ge(
|
|
3460
|
-
({ className: a, ...s }, l) => nt(
|
|
3460
|
+
({ className: a, ...s }, l) => nt(Lr, {
|
|
3461
3461
|
ref: l,
|
|
3462
3462
|
iconNode: t,
|
|
3463
3463
|
className: yt(
|
|
@@ -3476,7 +3476,7 @@ const ft = (e, t) => {
|
|
|
3476
3476
|
* This source code is licensed under the ISC license.
|
|
3477
3477
|
* See the LICENSE file in the root directory of this source tree.
|
|
3478
3478
|
*/
|
|
3479
|
-
const
|
|
3479
|
+
const Tr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], xt = ft("chevron-left", Tr);
|
|
3480
3480
|
/**
|
|
3481
3481
|
* @license lucide-react v0.574.0 - ISC
|
|
3482
3482
|
*
|
|
@@ -3528,45 +3528,45 @@ const $r = ({
|
|
|
3528
3528
|
onComplete: t,
|
|
3529
3529
|
onBack: n
|
|
3530
3530
|
}) => {
|
|
3531
|
-
const { questionnaire: a, initialAnswers: s, isLoading: l, isSubmitting: c, error: u, submit: h } = br(e), [
|
|
3532
|
-
|
|
3533
|
-
s && Object.keys(s).length > 0 && Object.keys(
|
|
3531
|
+
const { questionnaire: a, initialAnswers: s, isLoading: l, isSubmitting: c, error: u, submit: h } = br(e), [m, v] = k({}), [S, f] = k({}), [N, x] = k(0);
|
|
3532
|
+
xe.useEffect(() => {
|
|
3533
|
+
s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && v(s);
|
|
3534
3534
|
}, [s]);
|
|
3535
|
-
const D =
|
|
3535
|
+
const D = Ee(
|
|
3536
3536
|
() => a ? Or(a.questionGroups) : [],
|
|
3537
3537
|
[a]
|
|
3538
|
-
),
|
|
3539
|
-
v((
|
|
3540
|
-
const
|
|
3541
|
-
return delete
|
|
3538
|
+
), F = N === D.length - 1, R = D[N] ?? [], $ = V((P, w) => {
|
|
3539
|
+
v((H) => ({ ...H, [P]: w })), f((H) => {
|
|
3540
|
+
const W = { ...H };
|
|
3541
|
+
return delete W[P], W;
|
|
3542
3542
|
});
|
|
3543
|
-
}, []), E =
|
|
3544
|
-
const
|
|
3545
|
-
for (const { question:
|
|
3546
|
-
const
|
|
3547
|
-
|
|
3543
|
+
}, []), E = V(() => {
|
|
3544
|
+
const P = {};
|
|
3545
|
+
for (const { question: w } of R) {
|
|
3546
|
+
const H = Mr(w, m[w.id] ?? []);
|
|
3547
|
+
H && (P[w.id] = H);
|
|
3548
3548
|
}
|
|
3549
|
-
return f((
|
|
3550
|
-
}, [
|
|
3551
|
-
E() && x((
|
|
3552
|
-
},
|
|
3553
|
-
|
|
3549
|
+
return f((w) => ({ ...w, ...P })), Object.keys(P).length === 0;
|
|
3550
|
+
}, [R, m]), L = () => {
|
|
3551
|
+
E() && x((P) => P + 1);
|
|
3552
|
+
}, Y = () => {
|
|
3553
|
+
N > 0 ? x((P) => P - 1) : n == null || n();
|
|
3554
3554
|
}, X = async () => {
|
|
3555
3555
|
if (!(!E() || !a))
|
|
3556
3556
|
try {
|
|
3557
|
-
const
|
|
3558
|
-
(
|
|
3559
|
-
questionId:
|
|
3560
|
-
values:
|
|
3557
|
+
const P = a.questionGroups.flatMap(
|
|
3558
|
+
(H) => (H.questions ?? []).map((W) => ({
|
|
3559
|
+
questionId: W.id,
|
|
3560
|
+
values: m[W.id] ?? []
|
|
3561
3561
|
}))
|
|
3562
|
-
),
|
|
3562
|
+
), w = {
|
|
3563
3563
|
applicantId: e,
|
|
3564
3564
|
questionnarieId: a.id,
|
|
3565
|
-
questionResults:
|
|
3565
|
+
questionResults: P
|
|
3566
3566
|
};
|
|
3567
|
-
await h(
|
|
3568
|
-
} catch (
|
|
3569
|
-
console.error("Questionnaire submit error:",
|
|
3567
|
+
await h(w), t == null || t();
|
|
3568
|
+
} catch (P) {
|
|
3569
|
+
console.error("Questionnaire submit error:", P);
|
|
3570
3570
|
}
|
|
3571
3571
|
};
|
|
3572
3572
|
return l ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(we, { className: "my-8" }) }) }) : u ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
@@ -3579,50 +3579,50 @@ const $r = ({
|
|
|
3579
3579
|
D.length > 1 && /* @__PURE__ */ o("div", { className: "flex items-center justify-between mt-3", children: [
|
|
3580
3580
|
/* @__PURE__ */ o("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
3581
3581
|
"Page ",
|
|
3582
|
-
|
|
3582
|
+
N + 1,
|
|
3583
3583
|
" of ",
|
|
3584
3584
|
D.length
|
|
3585
3585
|
] }),
|
|
3586
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: D.map((
|
|
3586
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: D.map((P, w) => /* @__PURE__ */ r(
|
|
3587
3587
|
"div",
|
|
3588
3588
|
{
|
|
3589
3589
|
className: "rounded-full transition-all duration-200",
|
|
3590
3590
|
style: {
|
|
3591
3591
|
height: "6px",
|
|
3592
|
-
width:
|
|
3593
|
-
backgroundColor:
|
|
3592
|
+
width: w === N ? "20px" : "6px",
|
|
3593
|
+
backgroundColor: w <= N ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
3594
3594
|
}
|
|
3595
3595
|
},
|
|
3596
|
-
|
|
3596
|
+
w
|
|
3597
3597
|
)) })
|
|
3598
3598
|
] })
|
|
3599
3599
|
] }),
|
|
3600
|
-
/* @__PURE__ */ r(K, { className: "space-y-6", children:
|
|
3600
|
+
/* @__PURE__ */ r(K, { className: "space-y-6", children: R.map(({ question: P }) => /* @__PURE__ */ r(
|
|
3601
3601
|
zr,
|
|
3602
3602
|
{
|
|
3603
|
-
question:
|
|
3604
|
-
value:
|
|
3605
|
-
error:
|
|
3606
|
-
onChange: (
|
|
3603
|
+
question: P,
|
|
3604
|
+
value: m[P.id] ?? [],
|
|
3605
|
+
error: S[P.id],
|
|
3606
|
+
onChange: (w) => $(P.id, w)
|
|
3607
3607
|
},
|
|
3608
|
-
|
|
3608
|
+
P.id
|
|
3609
3609
|
)) }),
|
|
3610
3610
|
/* @__PURE__ */ o(me, { className: "flex items-center justify-between", children: [
|
|
3611
3611
|
/* @__PURE__ */ o(
|
|
3612
|
-
|
|
3612
|
+
Q,
|
|
3613
3613
|
{
|
|
3614
3614
|
type: "button",
|
|
3615
3615
|
variant: "outline",
|
|
3616
|
-
onClick:
|
|
3616
|
+
onClick: Y,
|
|
3617
3617
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3618
3618
|
children: [
|
|
3619
3619
|
/* @__PURE__ */ r(xt, { size: 14 }),
|
|
3620
|
-
|
|
3620
|
+
N > 0 ? "Previous" : "Back"
|
|
3621
3621
|
]
|
|
3622
3622
|
}
|
|
3623
3623
|
),
|
|
3624
|
-
|
|
3625
|
-
|
|
3624
|
+
F ? /* @__PURE__ */ r(
|
|
3625
|
+
Q,
|
|
3626
3626
|
{
|
|
3627
3627
|
type: "button",
|
|
3628
3628
|
isLoading: c,
|
|
@@ -3630,10 +3630,10 @@ const $r = ({
|
|
|
3630
3630
|
children: "Continue"
|
|
3631
3631
|
}
|
|
3632
3632
|
) : /* @__PURE__ */ o(
|
|
3633
|
-
|
|
3633
|
+
Q,
|
|
3634
3634
|
{
|
|
3635
3635
|
type: "button",
|
|
3636
|
-
onClick:
|
|
3636
|
+
onClick: L,
|
|
3637
3637
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3638
3638
|
children: [
|
|
3639
3639
|
"Next",
|
|
@@ -3724,7 +3724,7 @@ const $r = ({
|
|
|
3724
3724
|
type: "checkbox",
|
|
3725
3725
|
checked: t.includes(u),
|
|
3726
3726
|
onChange: (h) => {
|
|
3727
|
-
h.target.checked ? a([...t, u]) : a(t.filter((
|
|
3727
|
+
h.target.checked ? a([...t, u]) : a(t.filter((m) => m !== u));
|
|
3728
3728
|
},
|
|
3729
3729
|
className: "metakyc-option-input",
|
|
3730
3730
|
style: {
|
|
@@ -3756,27 +3756,27 @@ const $r = ({
|
|
|
3756
3756
|
onComplete: t,
|
|
3757
3757
|
onBack: n
|
|
3758
3758
|
}) => {
|
|
3759
|
-
const { uploadDocument: a, isLoading: s, isSubmitting: l, error: c, submit: u } = vr(e), [h,
|
|
3760
|
-
if (
|
|
3759
|
+
const { uploadDocument: a, isLoading: s, isSubmitting: l, error: c, submit: u } = vr(e), [h, m] = k({}), v = async (S) => {
|
|
3760
|
+
if (S.preventDefault(), !a) return;
|
|
3761
3761
|
const f = await Promise.all(
|
|
3762
3762
|
a.uploadDocumentFiles.map(async (x) => {
|
|
3763
|
-
const D = h[x.id] || [],
|
|
3764
|
-
D.map(async (
|
|
3765
|
-
fileName:
|
|
3766
|
-
fileData: await mr(
|
|
3763
|
+
const D = h[x.id] || [], F = await Promise.all(
|
|
3764
|
+
D.map(async (R) => ({
|
|
3765
|
+
fileName: R.name,
|
|
3766
|
+
fileData: await mr(R)
|
|
3767
3767
|
}))
|
|
3768
3768
|
);
|
|
3769
3769
|
return {
|
|
3770
3770
|
uploadDocumentFileId: x.id,
|
|
3771
|
-
valueList:
|
|
3771
|
+
valueList: F
|
|
3772
3772
|
};
|
|
3773
3773
|
})
|
|
3774
|
-
),
|
|
3774
|
+
), N = {
|
|
3775
3775
|
applicantId: e,
|
|
3776
3776
|
uploadDocumentId: a.id,
|
|
3777
3777
|
uploadDocumentResults: f
|
|
3778
3778
|
};
|
|
3779
|
-
await u(
|
|
3779
|
+
await u(N), t == null || t();
|
|
3780
3780
|
};
|
|
3781
3781
|
return s ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(we, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
3782
3782
|
"Error loading document requirements: ",
|
|
@@ -3786,23 +3786,23 @@ const $r = ({
|
|
|
3786
3786
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.displayName }),
|
|
3787
3787
|
a.subtitle && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: a.subtitle })
|
|
3788
3788
|
] }),
|
|
3789
|
-
/* @__PURE__ */ r(K, { className: "space-y-6", children: a.uploadDocumentFiles.map((
|
|
3789
|
+
/* @__PURE__ */ r(K, { className: "space-y-6", children: a.uploadDocumentFiles.map((S) => /* @__PURE__ */ r(
|
|
3790
3790
|
Ar,
|
|
3791
3791
|
{
|
|
3792
|
-
label:
|
|
3793
|
-
accept:
|
|
3794
|
-
multiple:
|
|
3795
|
-
maxSize:
|
|
3796
|
-
value: h[
|
|
3792
|
+
label: S.displayName,
|
|
3793
|
+
accept: S.allowedTypes,
|
|
3794
|
+
multiple: S.multipleFile,
|
|
3795
|
+
maxSize: S.maxEachFileSizeByte,
|
|
3796
|
+
value: h[S.id] || [],
|
|
3797
3797
|
onChange: (f) => {
|
|
3798
|
-
|
|
3798
|
+
m((N) => ({ ...N, [S.id]: f }));
|
|
3799
3799
|
}
|
|
3800
3800
|
},
|
|
3801
|
-
|
|
3801
|
+
S.id
|
|
3802
3802
|
)) }),
|
|
3803
3803
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
3804
|
-
n && /* @__PURE__ */ r(
|
|
3805
|
-
/* @__PURE__ */ r(
|
|
3804
|
+
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
3805
|
+
/* @__PURE__ */ r(Q, { type: "submit", isLoading: l, children: "Continue" })
|
|
3806
3806
|
] })
|
|
3807
3807
|
] }) }) : null;
|
|
3808
3808
|
}, _r = ({ applicantId: e, onComplete: t, onBack: n }) => {
|
|
@@ -3817,8 +3817,8 @@ const $r = ({
|
|
|
3817
3817
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.title || "Overview" }),
|
|
3818
3818
|
a.description && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: a.description })
|
|
3819
3819
|
] }),
|
|
3820
|
-
/* @__PURE__ */ r(K, { className: "space-y-8", children: a.steps && a.steps.length > 0 ? a.steps.sort((
|
|
3821
|
-
/* @__PURE__ */ r("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ r("div", { className: "w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center font-medium text-sm", children:
|
|
3820
|
+
/* @__PURE__ */ r(K, { className: "space-y-8", children: a.steps && a.steps.length > 0 ? a.steps.sort((m, v) => m.order - v.order).map((m) => /* @__PURE__ */ o("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
|
|
3821
|
+
/* @__PURE__ */ r("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ r("div", { className: "w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center font-medium text-sm", children: m.order + 1 }) }),
|
|
3822
3822
|
/* @__PURE__ */ o(
|
|
3823
3823
|
"div",
|
|
3824
3824
|
{
|
|
@@ -3830,19 +3830,40 @@ const $r = ({
|
|
|
3830
3830
|
background: "transparent"
|
|
3831
3831
|
},
|
|
3832
3832
|
children: [
|
|
3833
|
-
/* @__PURE__ */ r("span", { className: "metakyc-step-title text-sm font-semibold text-gray-900 dark:text-white", children:
|
|
3834
|
-
|
|
3833
|
+
/* @__PURE__ */ r("span", { className: "metakyc-step-title text-sm font-semibold text-gray-900 dark:text-white", children: m.title }),
|
|
3834
|
+
m.description && /* @__PURE__ */ r("p", { className: "metakyc-step-description text-sm text-gray-600 dark:text-gray-400", children: m.description })
|
|
3835
3835
|
]
|
|
3836
3836
|
}
|
|
3837
3837
|
)
|
|
3838
|
-
] },
|
|
3838
|
+
] }, m.order)) : /* @__PURE__ */ r("div", { className: "text-center py-8", children: /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: "Loading overview data..." }) }) }),
|
|
3839
3839
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
3840
|
-
n && /* @__PURE__ */ r(
|
|
3841
|
-
/* @__PURE__ */ r(
|
|
3840
|
+
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
3841
|
+
/* @__PURE__ */ r(Q, { onClick: h, isLoading: l, children: "Continue" })
|
|
3842
3842
|
] })
|
|
3843
3843
|
] }) : null;
|
|
3844
3844
|
};
|
|
3845
|
-
function Hr(e
|
|
3845
|
+
function Hr(e) {
|
|
3846
|
+
const t = (e ?? "en").toLowerCase().replace("_", "-");
|
|
3847
|
+
try {
|
|
3848
|
+
return Intl.NumberFormat.supportedLocalesOf([t]), t;
|
|
3849
|
+
} catch {
|
|
3850
|
+
return "en";
|
|
3851
|
+
}
|
|
3852
|
+
}
|
|
3853
|
+
function Ur(e) {
|
|
3854
|
+
return e.valueDataType === Se.Money && Array.isArray(e.defaultValues) && e.defaultValues.length > 0;
|
|
3855
|
+
}
|
|
3856
|
+
function jr(e, t) {
|
|
3857
|
+
const n = new Intl.NumberFormat(Hr(t), {
|
|
3858
|
+
minimumFractionDigits: 0,
|
|
3859
|
+
maximumFractionDigits: 2
|
|
3860
|
+
});
|
|
3861
|
+
return e.replace(/([\d]+(?:\.\d+)?)/g, (a) => {
|
|
3862
|
+
const s = parseFloat(a);
|
|
3863
|
+
return isNaN(s) ? a : n.format(s);
|
|
3864
|
+
});
|
|
3865
|
+
}
|
|
3866
|
+
function Kr(e, t) {
|
|
3846
3867
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
3847
3868
|
if (e.isRequired && n)
|
|
3848
3869
|
return e.errorMessage || `${e.displayName} is required`;
|
|
@@ -3854,7 +3875,7 @@ function Hr(e, t) {
|
|
|
3854
3875
|
return e.errorMessage || "Invalid format";
|
|
3855
3876
|
} catch {
|
|
3856
3877
|
}
|
|
3857
|
-
const s = e.valueDataType ===
|
|
3878
|
+
const s = e.valueDataType === Se.Integer || e.valueDataType === Se.Money || e.valueDataType === Se.DigitOnly;
|
|
3858
3879
|
if (s && a.trim() !== "") {
|
|
3859
3880
|
const l = Number(a);
|
|
3860
3881
|
if (!isNaN(l)) {
|
|
@@ -3872,123 +3893,124 @@ function Hr(e, t) {
|
|
|
3872
3893
|
}
|
|
3873
3894
|
return null;
|
|
3874
3895
|
}
|
|
3875
|
-
function
|
|
3896
|
+
function Wr(e) {
|
|
3876
3897
|
const t = /* @__PURE__ */ new Map();
|
|
3877
3898
|
return e.forEach((n, a) => {
|
|
3878
3899
|
const s = n.pageNumber != null && n.pageNumber > 0 ? n.pageNumber : 1;
|
|
3879
3900
|
t.has(s) || t.set(s, []), t.get(s).push({ criterion: n, idx: a });
|
|
3880
3901
|
}), Array.from(t.entries()).sort(([n], [a]) => n - a).map(([, n]) => n);
|
|
3881
3902
|
}
|
|
3882
|
-
function
|
|
3903
|
+
function Yr(e) {
|
|
3883
3904
|
return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
|
|
3884
3905
|
}
|
|
3885
|
-
const
|
|
3906
|
+
const qr = ({
|
|
3886
3907
|
applicantId: e,
|
|
3887
3908
|
onComplete: t,
|
|
3888
3909
|
onBack: n
|
|
3889
3910
|
}) => {
|
|
3890
|
-
const {
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
}, [
|
|
3894
|
-
const
|
|
3895
|
-
() =>
|
|
3896
|
-
[
|
|
3897
|
-
),
|
|
3898
|
-
|
|
3899
|
-
!
|
|
3900
|
-
}, [
|
|
3901
|
-
const
|
|
3902
|
-
|
|
3903
|
-
const
|
|
3904
|
-
return delete
|
|
3911
|
+
const { config: a } = ge(), s = a.locale ?? "en", { criteria: l, initialAnswers: c, isLoading: u, isSubmitting: h, error: m, submit: v } = Nr(e), [S, f] = k({}), [N, x] = k({}), [D, F] = k(0), [R, $] = k(!1);
|
|
3912
|
+
xe.useEffect(() => {
|
|
3913
|
+
c && Object.keys(c).length > 0 && Object.keys(S).length === 0 && f(c);
|
|
3914
|
+
}, [c]);
|
|
3915
|
+
const E = Ee(
|
|
3916
|
+
() => l && l.length > 0 ? Wr(l) : [],
|
|
3917
|
+
[l]
|
|
3918
|
+
), L = D === E.length - 1, Y = E[D] ?? [];
|
|
3919
|
+
xe.useEffect(() => {
|
|
3920
|
+
!u && l && l.length === 0 && !R && !h && ($(!0), v({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
|
|
3921
|
+
}, [u, l, R, h, v, e, t]);
|
|
3922
|
+
const X = V((I, B) => {
|
|
3923
|
+
f((T) => ({ ...T, [I]: B })), x((T) => {
|
|
3924
|
+
const O = { ...T };
|
|
3925
|
+
return delete O[I], O;
|
|
3905
3926
|
});
|
|
3906
|
-
}, []),
|
|
3907
|
-
const
|
|
3908
|
-
for (const { criterion: B } of
|
|
3909
|
-
const T =
|
|
3910
|
-
T && (
|
|
3927
|
+
}, []), P = V(() => {
|
|
3928
|
+
const I = {};
|
|
3929
|
+
for (const { criterion: B } of Y) {
|
|
3930
|
+
const T = Kr(B, S[B.id] ?? []);
|
|
3931
|
+
T && (I[B.id] = T);
|
|
3911
3932
|
}
|
|
3912
|
-
return
|
|
3913
|
-
}, [
|
|
3914
|
-
|
|
3915
|
-
},
|
|
3916
|
-
|
|
3917
|
-
},
|
|
3918
|
-
if (!(!
|
|
3933
|
+
return x((B) => ({ ...B, ...I })), Object.keys(I).length === 0;
|
|
3934
|
+
}, [Y, S]), w = () => {
|
|
3935
|
+
P() && F((I) => I + 1);
|
|
3936
|
+
}, H = () => {
|
|
3937
|
+
D > 0 ? F((I) => I - 1) : n == null || n();
|
|
3938
|
+
}, W = async () => {
|
|
3939
|
+
if (!(!P() || !l))
|
|
3919
3940
|
try {
|
|
3920
|
-
const
|
|
3921
|
-
const
|
|
3922
|
-
return
|
|
3941
|
+
const I = l.map((T) => {
|
|
3942
|
+
const O = (S[T.id] ?? []).filter((G) => G && G.trim());
|
|
3943
|
+
return O.length > 0 ? { riskCriteriaId: T.id, values: O } : null;
|
|
3923
3944
|
}).filter((T) => T !== null);
|
|
3924
|
-
await
|
|
3925
|
-
} catch (
|
|
3926
|
-
console.error("Risk scoring submit error:",
|
|
3945
|
+
await v({ applicantId: e, criteriaValueInputs: I }), t == null || t();
|
|
3946
|
+
} catch (I) {
|
|
3947
|
+
console.error("Risk scoring submit error:", I);
|
|
3927
3948
|
}
|
|
3928
3949
|
};
|
|
3929
|
-
return
|
|
3950
|
+
return u ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ o(K, { children: [
|
|
3930
3951
|
/* @__PURE__ */ r(we, { className: "my-8" }),
|
|
3931
3952
|
/* @__PURE__ */ r("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Loading risk scoring criteria…" })
|
|
3932
|
-
] }) }) : !
|
|
3953
|
+
] }) }) : !u && l && l.length === 0 ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ o(K, { children: [
|
|
3933
3954
|
/* @__PURE__ */ r(we, { className: "my-8" }),
|
|
3934
3955
|
/* @__PURE__ */ r("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "No criteria required. Moving to next step…" })
|
|
3935
|
-
] }) }) :
|
|
3956
|
+
] }) }) : m ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
3936
3957
|
"Error loading criteria: ",
|
|
3937
|
-
|
|
3938
|
-
] }) }) }) :
|
|
3958
|
+
m.message
|
|
3959
|
+
] }) }) }) : l ? /* @__PURE__ */ o(j, { children: [
|
|
3939
3960
|
/* @__PURE__ */ o(ue, { children: [
|
|
3940
3961
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: "Risk Assessment" }),
|
|
3941
3962
|
/* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Please answer the following questions for risk evaluation" }),
|
|
3942
|
-
|
|
3963
|
+
E.length > 1 && /* @__PURE__ */ o("div", { className: "flex items-center justify-between mt-3", children: [
|
|
3943
3964
|
/* @__PURE__ */ o("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
3944
3965
|
"Page ",
|
|
3945
|
-
|
|
3966
|
+
D + 1,
|
|
3946
3967
|
" of ",
|
|
3947
|
-
|
|
3968
|
+
E.length
|
|
3948
3969
|
] }),
|
|
3949
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children:
|
|
3970
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: E.map((I, B) => /* @__PURE__ */ r(
|
|
3950
3971
|
"div",
|
|
3951
3972
|
{
|
|
3952
3973
|
className: "rounded-full transition-all duration-200",
|
|
3953
3974
|
style: {
|
|
3954
3975
|
height: "6px",
|
|
3955
|
-
width: B ===
|
|
3956
|
-
backgroundColor: B <=
|
|
3976
|
+
width: B === D ? "20px" : "6px",
|
|
3977
|
+
backgroundColor: B <= D ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
3957
3978
|
}
|
|
3958
3979
|
},
|
|
3959
3980
|
B
|
|
3960
3981
|
)) })
|
|
3961
3982
|
] })
|
|
3962
3983
|
] }),
|
|
3963
|
-
/* @__PURE__ */ r(K, { className: "space-y-6", children:
|
|
3964
|
-
|
|
3984
|
+
/* @__PURE__ */ r(K, { className: "space-y-6", children: Y.map(({ criterion: I }) => /* @__PURE__ */ r(
|
|
3985
|
+
Qr,
|
|
3965
3986
|
{
|
|
3966
|
-
criterion:
|
|
3967
|
-
value:
|
|
3968
|
-
error: I
|
|
3969
|
-
|
|
3987
|
+
criterion: I,
|
|
3988
|
+
value: S[I.id] ?? [],
|
|
3989
|
+
error: N[I.id],
|
|
3990
|
+
locale: s,
|
|
3991
|
+
onChange: (B) => X(I.id, B)
|
|
3970
3992
|
},
|
|
3971
|
-
|
|
3993
|
+
I.id
|
|
3972
3994
|
)) }),
|
|
3973
3995
|
/* @__PURE__ */ o(me, { className: "flex items-center justify-between", children: [
|
|
3974
3996
|
/* @__PURE__ */ o(
|
|
3975
|
-
|
|
3997
|
+
Q,
|
|
3976
3998
|
{
|
|
3977
3999
|
type: "button",
|
|
3978
4000
|
variant: "outline",
|
|
3979
|
-
onClick:
|
|
4001
|
+
onClick: H,
|
|
3980
4002
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3981
4003
|
children: [
|
|
3982
4004
|
/* @__PURE__ */ r(xt, { size: 14 }),
|
|
3983
|
-
|
|
4005
|
+
D > 0 ? "Previous" : "Back"
|
|
3984
4006
|
]
|
|
3985
4007
|
}
|
|
3986
4008
|
),
|
|
3987
|
-
|
|
3988
|
-
|
|
4009
|
+
L ? /* @__PURE__ */ r(Q, { type: "button", isLoading: h, onClick: W, children: "Continue" }) : /* @__PURE__ */ o(
|
|
4010
|
+
Q,
|
|
3989
4011
|
{
|
|
3990
4012
|
type: "button",
|
|
3991
|
-
onClick:
|
|
4013
|
+
onClick: w,
|
|
3992
4014
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3993
4015
|
children: [
|
|
3994
4016
|
"Next",
|
|
@@ -3997,35 +4019,35 @@ const Kr = ({
|
|
|
3997
4019
|
}
|
|
3998
4020
|
)
|
|
3999
4021
|
] }),
|
|
4000
|
-
|
|
4022
|
+
m && /* @__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: m.message }) })
|
|
4001
4023
|
] }) : null;
|
|
4002
|
-
},
|
|
4003
|
-
const
|
|
4024
|
+
}, Qr = ({ criterion: e, value: t, error: n, locale: a, onChange: s }) => {
|
|
4025
|
+
const l = Yr(e), c = e.valueDataType === Se.Integer || e.valueDataType === Se.Money || e.valueDataType === Se.DigitOnly, u = Ur(e), h = (m) => u ? jr(m, a) : m;
|
|
4004
4026
|
return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
4005
4027
|
/* @__PURE__ */ o("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
4006
4028
|
e.displayName,
|
|
4007
4029
|
e.isRequired && /* @__PURE__ */ r("span", { className: "text-danger-500 ml-1", children: "*" })
|
|
4008
4030
|
] }),
|
|
4009
4031
|
e.description && /* @__PURE__ */ r("p", { className: "text-xs", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: e.description }),
|
|
4010
|
-
|
|
4011
|
-
|
|
4032
|
+
c && (e.min !== void 0 || e.max !== void 0) && /* @__PURE__ */ r("p", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: e.min !== void 0 && e.max !== void 0 ? `Range: ${e.min} – ${e.max}` : e.min !== void 0 ? `Minimum: ${e.min}` : `Maximum: ${e.max}` }),
|
|
4033
|
+
l === "text" && /* @__PURE__ */ r(
|
|
4012
4034
|
de,
|
|
4013
4035
|
{
|
|
4014
4036
|
value: t[0] ?? "",
|
|
4015
|
-
onChange: (
|
|
4016
|
-
type:
|
|
4037
|
+
onChange: (m) => s([m.target.value]),
|
|
4038
|
+
type: c ? "number" : "text",
|
|
4017
4039
|
placeholder: "Enter your answer…",
|
|
4018
4040
|
error: n,
|
|
4019
4041
|
required: e.isRequired,
|
|
4020
4042
|
min: e.min,
|
|
4021
4043
|
max: e.max,
|
|
4022
|
-
onKeyDown: (
|
|
4023
|
-
e.valueDataType ===
|
|
4044
|
+
onKeyDown: (m) => {
|
|
4045
|
+
e.valueDataType === Se.DigitOnly && ["e", "E", "+", "-", "."].includes(m.key) && m.preventDefault();
|
|
4024
4046
|
}
|
|
4025
4047
|
}
|
|
4026
4048
|
),
|
|
4027
|
-
|
|
4028
|
-
(e.defaultValues ?? []).map((
|
|
4049
|
+
l === "radio" && /* @__PURE__ */ o("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
4050
|
+
(e.defaultValues ?? []).map((m) => /* @__PURE__ */ o(
|
|
4029
4051
|
"label",
|
|
4030
4052
|
{
|
|
4031
4053
|
className: "metakyc-option-label",
|
|
@@ -4035,8 +4057,8 @@ const Kr = ({
|
|
|
4035
4057
|
"input",
|
|
4036
4058
|
{
|
|
4037
4059
|
type: "radio",
|
|
4038
|
-
checked: t[0] ===
|
|
4039
|
-
onChange: () =>
|
|
4060
|
+
checked: t[0] === m,
|
|
4061
|
+
onChange: () => s([m]),
|
|
4040
4062
|
className: "metakyc-option-input",
|
|
4041
4063
|
style: {
|
|
4042
4064
|
width: "16px",
|
|
@@ -4053,15 +4075,15 @@ const Kr = ({
|
|
|
4053
4075
|
}
|
|
4054
4076
|
}
|
|
4055
4077
|
),
|
|
4056
|
-
/* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children:
|
|
4078
|
+
/* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: h(m) })
|
|
4057
4079
|
]
|
|
4058
4080
|
},
|
|
4059
|
-
|
|
4081
|
+
m
|
|
4060
4082
|
)),
|
|
4061
4083
|
n && /* @__PURE__ */ r("p", { className: "text-sm text-danger-500", children: n })
|
|
4062
4084
|
] }),
|
|
4063
|
-
|
|
4064
|
-
(e.defaultValues ?? []).map((
|
|
4085
|
+
l === "checkbox" && /* @__PURE__ */ o("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
4086
|
+
(e.defaultValues ?? []).map((m) => /* @__PURE__ */ o(
|
|
4065
4087
|
"label",
|
|
4066
4088
|
{
|
|
4067
4089
|
className: "metakyc-option-label",
|
|
@@ -4071,9 +4093,9 @@ const Kr = ({
|
|
|
4071
4093
|
"input",
|
|
4072
4094
|
{
|
|
4073
4095
|
type: "checkbox",
|
|
4074
|
-
checked: t.includes(
|
|
4075
|
-
onChange: (
|
|
4076
|
-
|
|
4096
|
+
checked: t.includes(m),
|
|
4097
|
+
onChange: (v) => {
|
|
4098
|
+
v.target.checked ? s([...t, m]) : s(t.filter((S) => S !== m));
|
|
4077
4099
|
},
|
|
4078
4100
|
className: "metakyc-option-input",
|
|
4079
4101
|
style: {
|
|
@@ -4091,18 +4113,18 @@ const Kr = ({
|
|
|
4091
4113
|
}
|
|
4092
4114
|
}
|
|
4093
4115
|
),
|
|
4094
|
-
/* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children:
|
|
4116
|
+
/* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: h(m) })
|
|
4095
4117
|
]
|
|
4096
4118
|
},
|
|
4097
|
-
|
|
4119
|
+
m
|
|
4098
4120
|
)),
|
|
4099
4121
|
n && /* @__PURE__ */ r("p", { className: "text-sm text-danger-500", children: n })
|
|
4100
4122
|
] }),
|
|
4101
|
-
|
|
4123
|
+
l === "country" && /* @__PURE__ */ r(
|
|
4102
4124
|
st,
|
|
4103
4125
|
{
|
|
4104
4126
|
value: t[0] ?? "",
|
|
4105
|
-
onChange: (
|
|
4127
|
+
onChange: (m) => s([m.target.value]),
|
|
4106
4128
|
options: [
|
|
4107
4129
|
{ value: "US", label: "United States" },
|
|
4108
4130
|
{ value: "GB", label: "United Kingdom" },
|
|
@@ -4116,28 +4138,28 @@ const Kr = ({
|
|
|
4116
4138
|
}
|
|
4117
4139
|
)
|
|
4118
4140
|
] });
|
|
4119
|
-
},
|
|
4141
|
+
}, Gr = ({
|
|
4120
4142
|
applicantId: e,
|
|
4121
4143
|
onComplete: t,
|
|
4122
4144
|
onBack: n
|
|
4123
4145
|
}) => {
|
|
4124
|
-
const { investorCategorizationService: a } =
|
|
4125
|
-
return /* @__PURE__ */ r("form", { onSubmit: async (
|
|
4126
|
-
if (
|
|
4127
|
-
|
|
4146
|
+
const { investorCategorizationService: a } = ge(), [s, l] = k(null), [c, u] = k(!1), [h, m] = k(null);
|
|
4147
|
+
return /* @__PURE__ */ r("form", { onSubmit: async (S) => {
|
|
4148
|
+
if (S.preventDefault(), s === null) {
|
|
4149
|
+
m("Please select an investor type");
|
|
4128
4150
|
return;
|
|
4129
4151
|
}
|
|
4130
|
-
u(!0),
|
|
4152
|
+
u(!0), m(null);
|
|
4131
4153
|
try {
|
|
4132
4154
|
const f = {
|
|
4133
4155
|
applicantId: e,
|
|
4134
4156
|
investorType: s
|
|
4135
4157
|
};
|
|
4136
4158
|
console.log("Submitting investor categorization:", f);
|
|
4137
|
-
const
|
|
4138
|
-
console.log("Investor categorization result:",
|
|
4159
|
+
const N = await a.setInvestorCategorization(f);
|
|
4160
|
+
console.log("Investor categorization result:", N), t == null || t();
|
|
4139
4161
|
} catch (f) {
|
|
4140
|
-
console.error("Error submitting investor categorization:", f),
|
|
4162
|
+
console.error("Error submitting investor categorization:", f), m(f.message || "Failed to submit investor categorization");
|
|
4141
4163
|
} finally {
|
|
4142
4164
|
u(!1);
|
|
4143
4165
|
}
|
|
@@ -4153,7 +4175,7 @@ const Kr = ({
|
|
|
4153
4175
|
{
|
|
4154
4176
|
className: `
|
|
4155
4177
|
block p-4 border-2 rounded-lg cursor-pointer transition-all
|
|
4156
|
-
${s ===
|
|
4178
|
+
${s === fe.Individual ? "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"}
|
|
4157
4179
|
`,
|
|
4158
4180
|
children: /* @__PURE__ */ o("div", { className: "flex items-start", children: [
|
|
4159
4181
|
/* @__PURE__ */ r(
|
|
@@ -4161,9 +4183,9 @@ const Kr = ({
|
|
|
4161
4183
|
{
|
|
4162
4184
|
type: "radio",
|
|
4163
4185
|
name: "investorType",
|
|
4164
|
-
value:
|
|
4165
|
-
checked: s ===
|
|
4166
|
-
onChange: () => l(
|
|
4186
|
+
value: fe.Individual,
|
|
4187
|
+
checked: s === fe.Individual,
|
|
4188
|
+
onChange: () => l(fe.Individual),
|
|
4167
4189
|
className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
|
|
4168
4190
|
}
|
|
4169
4191
|
),
|
|
@@ -4179,7 +4201,7 @@ const Kr = ({
|
|
|
4179
4201
|
{
|
|
4180
4202
|
className: `
|
|
4181
4203
|
block p-4 border-2 rounded-lg cursor-pointer transition-all
|
|
4182
|
-
${s ===
|
|
4204
|
+
${s === fe.Sophisticated ? "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"}
|
|
4183
4205
|
`,
|
|
4184
4206
|
children: /* @__PURE__ */ o("div", { className: "flex items-start", children: [
|
|
4185
4207
|
/* @__PURE__ */ r(
|
|
@@ -4187,9 +4209,9 @@ const Kr = ({
|
|
|
4187
4209
|
{
|
|
4188
4210
|
type: "radio",
|
|
4189
4211
|
name: "investorType",
|
|
4190
|
-
value:
|
|
4191
|
-
checked: s ===
|
|
4192
|
-
onChange: () => l(
|
|
4212
|
+
value: fe.Sophisticated,
|
|
4213
|
+
checked: s === fe.Sophisticated,
|
|
4214
|
+
onChange: () => l(fe.Sophisticated),
|
|
4193
4215
|
className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
|
|
4194
4216
|
}
|
|
4195
4217
|
),
|
|
@@ -4210,7 +4232,7 @@ const Kr = ({
|
|
|
4210
4232
|
{
|
|
4211
4233
|
className: `
|
|
4212
4234
|
block p-4 border-2 rounded-lg cursor-pointer transition-all
|
|
4213
|
-
${s ===
|
|
4235
|
+
${s === fe.HighNetWorth ? "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"}
|
|
4214
4236
|
`,
|
|
4215
4237
|
children: /* @__PURE__ */ o("div", { className: "flex items-start", children: [
|
|
4216
4238
|
/* @__PURE__ */ r(
|
|
@@ -4218,9 +4240,9 @@ const Kr = ({
|
|
|
4218
4240
|
{
|
|
4219
4241
|
type: "radio",
|
|
4220
4242
|
name: "investorType",
|
|
4221
|
-
value:
|
|
4222
|
-
checked: s ===
|
|
4223
|
-
onChange: () => l(
|
|
4243
|
+
value: fe.HighNetWorth,
|
|
4244
|
+
checked: s === fe.HighNetWorth,
|
|
4245
|
+
onChange: () => l(fe.HighNetWorth),
|
|
4224
4246
|
className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
|
|
4225
4247
|
}
|
|
4226
4248
|
),
|
|
@@ -4242,9 +4264,9 @@ const Kr = ({
|
|
|
4242
4264
|
] }) })
|
|
4243
4265
|
] }),
|
|
4244
4266
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
4245
|
-
n && /* @__PURE__ */ r(
|
|
4267
|
+
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
4246
4268
|
/* @__PURE__ */ r(
|
|
4247
|
-
|
|
4269
|
+
Q,
|
|
4248
4270
|
{
|
|
4249
4271
|
type: "submit",
|
|
4250
4272
|
isLoading: c,
|
|
@@ -4254,109 +4276,109 @@ const Kr = ({
|
|
|
4254
4276
|
)
|
|
4255
4277
|
] })
|
|
4256
4278
|
] }) });
|
|
4257
|
-
},
|
|
4279
|
+
}, Vr = ({
|
|
4258
4280
|
applicantId: e,
|
|
4259
4281
|
onComplete: t,
|
|
4260
4282
|
onBack: n
|
|
4261
4283
|
}) => {
|
|
4262
|
-
const { appropriatenessTestService: a } =
|
|
4284
|
+
const { appropriatenessTestService: a } = ge(), [s, l] = k(null), [c, u] = k(!0), [h, m] = k(!1), [v, S] = k(null), [f, N] = k({}), [x, D] = k(0), [F, R] = k(!1), [$, E] = k(!1), [L, Y] = k(0);
|
|
4263
4285
|
ne(() => {
|
|
4264
4286
|
(async () => {
|
|
4265
4287
|
try {
|
|
4266
|
-
u(!0),
|
|
4267
|
-
const
|
|
4268
|
-
if (console.log("Appropriateness test data:",
|
|
4269
|
-
const
|
|
4270
|
-
|
|
4288
|
+
u(!0), S(null), console.log("Loading appropriateness test for applicant:", e);
|
|
4289
|
+
const O = await a.getAppropriatenessTest(e);
|
|
4290
|
+
if (console.log("Appropriateness test data:", O), l(O), O.waitTimeSpanForNextTry && O.waitTimeSpanForNextTry !== "00:00:00") {
|
|
4291
|
+
const G = X(O.waitTimeSpanForNextTry);
|
|
4292
|
+
G > 0 && Y(G);
|
|
4271
4293
|
}
|
|
4272
|
-
} catch (
|
|
4273
|
-
console.error("Error loading appropriateness test:",
|
|
4294
|
+
} catch (O) {
|
|
4295
|
+
console.error("Error loading appropriateness test:", O), S(O.message || "Failed to load appropriateness test");
|
|
4274
4296
|
} finally {
|
|
4275
4297
|
u(!1);
|
|
4276
4298
|
}
|
|
4277
4299
|
})();
|
|
4278
4300
|
}, [e, a]);
|
|
4279
|
-
const X = (
|
|
4280
|
-
const
|
|
4281
|
-
if (
|
|
4282
|
-
const [
|
|
4283
|
-
return
|
|
4301
|
+
const X = (T) => {
|
|
4302
|
+
const O = T.split(":").map(Number);
|
|
4303
|
+
if (O.length === 3) {
|
|
4304
|
+
const [G, C, U] = O;
|
|
4305
|
+
return G * 3600 + C * 60 + U;
|
|
4284
4306
|
}
|
|
4285
4307
|
return 0;
|
|
4286
|
-
},
|
|
4287
|
-
const
|
|
4288
|
-
return `${
|
|
4308
|
+
}, P = (T) => {
|
|
4309
|
+
const O = Math.floor(T / 60), G = T % 60;
|
|
4310
|
+
return `${O.toString().padStart(2, "0")}:${G.toString().padStart(2, "0")}`;
|
|
4289
4311
|
};
|
|
4290
4312
|
ne(() => {
|
|
4291
|
-
if (!
|
|
4292
|
-
const
|
|
4293
|
-
D((
|
|
4313
|
+
if (!F || x <= 0) return;
|
|
4314
|
+
const T = setInterval(() => {
|
|
4315
|
+
D((O) => O <= 1 ? (E(!0), 0) : O - 1);
|
|
4294
4316
|
}, 1e3);
|
|
4295
|
-
return () => clearInterval(
|
|
4296
|
-
}, [
|
|
4297
|
-
if (
|
|
4298
|
-
const
|
|
4299
|
-
|
|
4317
|
+
return () => clearInterval(T);
|
|
4318
|
+
}, [F, x]), ne(() => {
|
|
4319
|
+
if (L <= 0) return;
|
|
4320
|
+
const T = setInterval(() => {
|
|
4321
|
+
Y((O) => O <= 1 ? 0 : O - 1);
|
|
4300
4322
|
}, 1e3);
|
|
4301
|
-
return () => clearInterval(
|
|
4302
|
-
}, [
|
|
4303
|
-
|
|
4304
|
-
}, [
|
|
4305
|
-
const
|
|
4306
|
-
s && (
|
|
4307
|
-
},
|
|
4308
|
-
|
|
4309
|
-
...
|
|
4310
|
-
[
|
|
4323
|
+
return () => clearInterval(T);
|
|
4324
|
+
}, [L]), ne(() => {
|
|
4325
|
+
$ && !h && W();
|
|
4326
|
+
}, [$]);
|
|
4327
|
+
const w = () => {
|
|
4328
|
+
s && (R(!0), D(s.testDurationSec));
|
|
4329
|
+
}, H = (T, O) => {
|
|
4330
|
+
N((G) => ({
|
|
4331
|
+
...G,
|
|
4332
|
+
[T]: O
|
|
4311
4333
|
}));
|
|
4312
|
-
},
|
|
4313
|
-
if (
|
|
4314
|
-
if (
|
|
4315
|
-
const
|
|
4316
|
-
if (
|
|
4317
|
-
|
|
4334
|
+
}, W = async (T) => {
|
|
4335
|
+
if (T && T.preventDefault(), !!s) {
|
|
4336
|
+
if (!$) {
|
|
4337
|
+
const O = s.appropriatenessQuestions.length - Object.keys(f).length;
|
|
4338
|
+
if (O > 0) {
|
|
4339
|
+
S(`Please answer all questions. ${O} question(s) remaining.`);
|
|
4318
4340
|
return;
|
|
4319
4341
|
}
|
|
4320
4342
|
}
|
|
4321
|
-
|
|
4343
|
+
m(!0), S(null);
|
|
4322
4344
|
try {
|
|
4323
|
-
const
|
|
4324
|
-
(
|
|
4325
|
-
appropriatenessQuestionId:
|
|
4326
|
-
value: f[
|
|
4345
|
+
const O = s.appropriatenessQuestions.map(
|
|
4346
|
+
(C) => ({
|
|
4347
|
+
appropriatenessQuestionId: C.id,
|
|
4348
|
+
value: f[C.id] || ""
|
|
4327
4349
|
// Empty string if not answered
|
|
4328
4350
|
})
|
|
4329
|
-
),
|
|
4351
|
+
), G = {
|
|
4330
4352
|
applicantId: e,
|
|
4331
4353
|
appropriatenessTestId: s.id,
|
|
4332
|
-
appropriatenessQuestionResults:
|
|
4354
|
+
appropriatenessQuestionResults: O
|
|
4333
4355
|
};
|
|
4334
|
-
console.log("Submitting appropriateness test:",
|
|
4356
|
+
console.log("Submitting appropriateness test:", G);
|
|
4335
4357
|
try {
|
|
4336
|
-
const
|
|
4337
|
-
console.log("Appropriateness test result:",
|
|
4338
|
-
} catch (
|
|
4339
|
-
if (
|
|
4340
|
-
const U =
|
|
4341
|
-
console.log("Test failed:", U),
|
|
4358
|
+
const C = await a.fillAppropriatenessTest(G);
|
|
4359
|
+
console.log("Appropriateness test result:", C), C.message && (C.message.toLowerCase().includes("pass") || C.message.toLowerCase().includes("success") || C.message.toLowerCase().includes("congratulations")) ? t == null || t() : (S(C.message || "Test completed. Please check the result."), R(!1), E(!1), N({}), setTimeout(() => I(), 1e3));
|
|
4360
|
+
} catch (C) {
|
|
4361
|
+
if (C.code === 400 && C.message) {
|
|
4362
|
+
const U = C.message;
|
|
4363
|
+
console.log("Test failed:", U), S(U), R(!1), E(!1), N({}), setTimeout(() => I(), 1500);
|
|
4342
4364
|
} else
|
|
4343
|
-
throw
|
|
4365
|
+
throw C;
|
|
4344
4366
|
}
|
|
4345
|
-
} catch (
|
|
4346
|
-
console.error("Error submitting appropriateness test:",
|
|
4367
|
+
} catch (O) {
|
|
4368
|
+
console.error("Error submitting appropriateness test:", O), S(O.message || "Failed to submit test. Please try again."), R(!1), E(!1), N({});
|
|
4347
4369
|
} finally {
|
|
4348
|
-
|
|
4370
|
+
m(!1);
|
|
4349
4371
|
}
|
|
4350
4372
|
}
|
|
4351
|
-
},
|
|
4373
|
+
}, I = async () => {
|
|
4352
4374
|
try {
|
|
4353
|
-
const
|
|
4354
|
-
if (console.log("Reloaded test data:",
|
|
4355
|
-
const
|
|
4356
|
-
|
|
4375
|
+
const T = await a.getAppropriatenessTest(e);
|
|
4376
|
+
if (console.log("Reloaded test data:", T), l(T), T.waitTimeSpanForNextTry && T.waitTimeSpanForNextTry !== "00:00:00") {
|
|
4377
|
+
const O = X(T.waitTimeSpanForNextTry);
|
|
4378
|
+
O > 0 && Y(O);
|
|
4357
4379
|
}
|
|
4358
|
-
} catch (
|
|
4359
|
-
console.error("Error reloading test data:",
|
|
4380
|
+
} catch (T) {
|
|
4381
|
+
console.error("Error reloading test data:", T), S((O) => O + `
|
|
4360
4382
|
|
|
4361
4383
|
Failed to reload test data. Please refresh the page.`);
|
|
4362
4384
|
}
|
|
@@ -4371,7 +4393,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4371
4393
|
/* @__PURE__ */ r("p", { className: "text-danger-500 text-lg mb-4", children: "No test data available" }),
|
|
4372
4394
|
v && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: v })
|
|
4373
4395
|
] }) });
|
|
4374
|
-
if (
|
|
4396
|
+
if (L > 0)
|
|
4375
4397
|
return /* @__PURE__ */ o(j, { children: [
|
|
4376
4398
|
/* @__PURE__ */ o(ue, { children: [
|
|
4377
4399
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: s.displayName }),
|
|
@@ -4379,14 +4401,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4379
4401
|
] }),
|
|
4380
4402
|
/* @__PURE__ */ o(K, { className: "py-12 text-center", children: [
|
|
4381
4403
|
/* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
4382
|
-
/* @__PURE__ */ r("div", { className: "text-6xl font-bold text-primary-500 mb-2", children:
|
|
4404
|
+
/* @__PURE__ */ r("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: P(L) }),
|
|
4383
4405
|
/* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
|
|
4384
4406
|
] }),
|
|
4385
4407
|
v && /* @__PURE__ */ r("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__ */ r("p", { className: "text-red-600 dark:text-red-400 text-sm", children: v }) })
|
|
4386
4408
|
] })
|
|
4387
4409
|
] });
|
|
4388
|
-
const
|
|
4389
|
-
return
|
|
4410
|
+
const B = s.testAllowedMaxTry - s.totalFailedTries;
|
|
4411
|
+
return F ? /* @__PURE__ */ r("form", { onSubmit: W, children: /* @__PURE__ */ o(j, { children: [
|
|
4390
4412
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
4391
4413
|
/* @__PURE__ */ o("div", { children: [
|
|
4392
4414
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: s.displayName }),
|
|
@@ -4397,7 +4419,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4397
4419
|
"div",
|
|
4398
4420
|
{
|
|
4399
4421
|
className: `text-3xl font-bold ${x <= 60 ? "text-danger-500" : "text-primary-500"}`,
|
|
4400
|
-
children:
|
|
4422
|
+
children: P(x)
|
|
4401
4423
|
}
|
|
4402
4424
|
),
|
|
4403
4425
|
/* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
|
|
@@ -4405,20 +4427,20 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4405
4427
|
] }) }),
|
|
4406
4428
|
/* @__PURE__ */ o(K, { className: "space-y-6", children: [
|
|
4407
4429
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between mb-4", children: [
|
|
4408
|
-
/* @__PURE__ */ o(
|
|
4430
|
+
/* @__PURE__ */ o(Ie, { variant: "info", children: [
|
|
4409
4431
|
"Question ",
|
|
4410
4432
|
Object.keys(f).length,
|
|
4411
4433
|
" of ",
|
|
4412
4434
|
s.totalQuestionCount
|
|
4413
4435
|
] }),
|
|
4414
|
-
/* @__PURE__ */ o(
|
|
4415
|
-
|
|
4436
|
+
/* @__PURE__ */ o(Ie, { variant: B > 1 ? "success" : "warning", children: [
|
|
4437
|
+
B,
|
|
4416
4438
|
" attempt",
|
|
4417
|
-
|
|
4439
|
+
B !== 1 ? "s" : "",
|
|
4418
4440
|
" remaining"
|
|
4419
4441
|
] })
|
|
4420
4442
|
] }),
|
|
4421
|
-
s.appropriatenessQuestions.map((
|
|
4443
|
+
s.appropriatenessQuestions.map((T, O) => /* @__PURE__ */ o(
|
|
4422
4444
|
"div",
|
|
4423
4445
|
{
|
|
4424
4446
|
className: "p-4 border border-gray-200 dark:border-gray-700 rounded-lg",
|
|
@@ -4426,53 +4448,53 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4426
4448
|
/* @__PURE__ */ o("div", { className: "mb-4", children: [
|
|
4427
4449
|
/* @__PURE__ */ o("span", { className: "inline-block px-2 py-1 text-xs font-semibold text-primary-700 bg-primary-100 dark:text-primary-300 dark:bg-primary-900/30 rounded mb-2", children: [
|
|
4428
4450
|
"Question ",
|
|
4429
|
-
|
|
4451
|
+
O + 1
|
|
4430
4452
|
] }),
|
|
4431
|
-
|
|
4432
|
-
/* @__PURE__ */ r("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children:
|
|
4453
|
+
T.groupName && /* @__PURE__ */ r("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: T.groupName }),
|
|
4454
|
+
/* @__PURE__ */ r("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: T.question })
|
|
4433
4455
|
] }),
|
|
4434
|
-
/* @__PURE__ */ r("div", { className: "space-y-2", children:
|
|
4456
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: T.answers.map((G, C) => /* @__PURE__ */ o(
|
|
4435
4457
|
"label",
|
|
4436
4458
|
{
|
|
4437
4459
|
className: `
|
|
4438
4460
|
flex items-center p-3 border-2 rounded-lg cursor-pointer transition-all
|
|
4439
|
-
${f[
|
|
4461
|
+
${f[T.id] === G ? "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"}
|
|
4440
4462
|
`,
|
|
4441
4463
|
children: [
|
|
4442
4464
|
/* @__PURE__ */ r(
|
|
4443
4465
|
"input",
|
|
4444
4466
|
{
|
|
4445
4467
|
type: "radio",
|
|
4446
|
-
name: `question-${
|
|
4447
|
-
value:
|
|
4448
|
-
checked: f[
|
|
4449
|
-
onChange: (U) =>
|
|
4468
|
+
name: `question-${T.id}`,
|
|
4469
|
+
value: G,
|
|
4470
|
+
checked: f[T.id] === G,
|
|
4471
|
+
onChange: (U) => H(T.id, U.target.value),
|
|
4450
4472
|
className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500",
|
|
4451
4473
|
disabled: h
|
|
4452
4474
|
}
|
|
4453
4475
|
),
|
|
4454
|
-
/* @__PURE__ */ r("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children:
|
|
4476
|
+
/* @__PURE__ */ r("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: G })
|
|
4455
4477
|
]
|
|
4456
4478
|
},
|
|
4457
|
-
|
|
4479
|
+
C
|
|
4458
4480
|
)) })
|
|
4459
4481
|
]
|
|
4460
4482
|
},
|
|
4461
|
-
|
|
4483
|
+
T.id
|
|
4462
4484
|
)),
|
|
4463
|
-
v &&
|
|
4485
|
+
v && !$ && /* @__PURE__ */ r("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: [
|
|
4464
4486
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
4465
4487
|
" ",
|
|
4466
4488
|
v
|
|
4467
4489
|
] }) }),
|
|
4468
|
-
|
|
4490
|
+
$ && /* @__PURE__ */ r("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: [
|
|
4469
4491
|
/* @__PURE__ */ r("strong", { children: "Time's up!" }),
|
|
4470
4492
|
" Your answers are being submitted automatically."
|
|
4471
4493
|
] }) })
|
|
4472
4494
|
] }),
|
|
4473
4495
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
4474
4496
|
/* @__PURE__ */ r(
|
|
4475
|
-
|
|
4497
|
+
Q,
|
|
4476
4498
|
{
|
|
4477
4499
|
type: "button",
|
|
4478
4500
|
variant: "outline",
|
|
@@ -4482,12 +4504,12 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4482
4504
|
}
|
|
4483
4505
|
),
|
|
4484
4506
|
/* @__PURE__ */ r(
|
|
4485
|
-
|
|
4507
|
+
Q,
|
|
4486
4508
|
{
|
|
4487
4509
|
type: "submit",
|
|
4488
4510
|
isLoading: h,
|
|
4489
4511
|
disabled: Object.keys(f).length < s.totalQuestionCount,
|
|
4490
|
-
children:
|
|
4512
|
+
children: $ ? "Submitting..." : "Submit Test"
|
|
4491
4513
|
}
|
|
4492
4514
|
)
|
|
4493
4515
|
] })
|
|
@@ -4501,19 +4523,19 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4501
4523
|
/* @__PURE__ */ o("div", { className: "space-y-4 mb-6", children: [
|
|
4502
4524
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4503
4525
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Total Questions:" }),
|
|
4504
|
-
/* @__PURE__ */ r(
|
|
4526
|
+
/* @__PURE__ */ r(Ie, { variant: "info", children: s.totalQuestionCount })
|
|
4505
4527
|
] }),
|
|
4506
4528
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4507
4529
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Time Limit:" }),
|
|
4508
|
-
/* @__PURE__ */ r(
|
|
4530
|
+
/* @__PURE__ */ r(Ie, { variant: "info", children: P(s.testDurationSec) })
|
|
4509
4531
|
] }),
|
|
4510
4532
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4511
4533
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Correct Answers Required:" }),
|
|
4512
|
-
/* @__PURE__ */ r(
|
|
4534
|
+
/* @__PURE__ */ r(Ie, { variant: "info", children: s.testCorrectAnswerPassLimit })
|
|
4513
4535
|
] }),
|
|
4514
4536
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4515
4537
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
|
|
4516
|
-
/* @__PURE__ */ r(
|
|
4538
|
+
/* @__PURE__ */ r(Ie, { variant: B > 1 ? "success" : "warning", children: B })
|
|
4517
4539
|
] })
|
|
4518
4540
|
] }),
|
|
4519
4541
|
v && /* @__PURE__ */ r("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: [
|
|
@@ -4521,28 +4543,28 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4521
4543
|
" ",
|
|
4522
4544
|
v
|
|
4523
4545
|
] }) }),
|
|
4524
|
-
|
|
4546
|
+
B <= 0 && /* @__PURE__ */ r("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ r("p", { className: "text-red-600 dark:text-red-400", children: "You have used all your attempts. Please contact support for assistance." }) })
|
|
4525
4547
|
] }),
|
|
4526
4548
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
4527
|
-
n && /* @__PURE__ */ r(
|
|
4549
|
+
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
4528
4550
|
/* @__PURE__ */ r(
|
|
4529
|
-
|
|
4551
|
+
Q,
|
|
4530
4552
|
{
|
|
4531
4553
|
type: "button",
|
|
4532
|
-
onClick:
|
|
4533
|
-
disabled:
|
|
4554
|
+
onClick: w,
|
|
4555
|
+
disabled: B <= 0,
|
|
4534
4556
|
children: "Start Test"
|
|
4535
4557
|
}
|
|
4536
4558
|
)
|
|
4537
4559
|
] })
|
|
4538
4560
|
] });
|
|
4539
|
-
},
|
|
4561
|
+
}, Jr = ({
|
|
4540
4562
|
applicantId: e,
|
|
4541
4563
|
onComplete: t,
|
|
4542
4564
|
onBack: n
|
|
4543
4565
|
}) => {
|
|
4544
4566
|
var _e, He, Ue, je;
|
|
4545
|
-
const { applicantService: a, baseInformationService: s, config: l, currentTheme: c } =
|
|
4567
|
+
const { applicantService: a, baseInformationService: s, config: l, currentTheme: c } = ge(), { identityData: u, provider: h, token: m, isLoading: v, error: S, requestIdentity: f, restartIdentity: N } = wr(e), [x, D] = k(null), [F, R] = k(null), [$, E] = k([]), [L, Y] = k([]), [X, P] = k(!0), [w, H] = k(!1), [W, I] = k(null), [B, T] = k(!1), O = xe.useRef(!1), [G, C] = k({}), [U, te] = k({}), ye = c != null && c.reviewPageFields && c.reviewPageFields.length > 0 ? c.reviewPageFields[0] : null, se = !!(c != null && c.reviewPageDisabled), M = ee(!1);
|
|
4546
4568
|
M.current = se;
|
|
4547
4569
|
const Z = At({
|
|
4548
4570
|
defaultValues: {
|
|
@@ -4557,7 +4579,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4557
4579
|
});
|
|
4558
4580
|
ne(() => {
|
|
4559
4581
|
if (se) {
|
|
4560
|
-
|
|
4582
|
+
O.current || (O.current = !0, f().then(() => H(!0)).catch((g) => console.error("[Identity] Auto-request failed:", g)).finally(() => P(!1)));
|
|
4561
4583
|
return;
|
|
4562
4584
|
}
|
|
4563
4585
|
(async () => {
|
|
@@ -4568,13 +4590,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4568
4590
|
s.getCountries("", "en", 40)
|
|
4569
4591
|
// CountriesType.PhoneNumber
|
|
4570
4592
|
]);
|
|
4571
|
-
|
|
4572
|
-
const
|
|
4573
|
-
E(
|
|
4574
|
-
const
|
|
4575
|
-
|
|
4593
|
+
R(g);
|
|
4594
|
+
const p = /* @__PURE__ */ new Set(), A = b.map((q) => ({ value: q.abbreviation3 || q.abbreviation, label: q.name })).filter((q) => !q.value || p.has(q.value) ? !1 : (p.add(q.value), !0));
|
|
4595
|
+
E(A);
|
|
4596
|
+
const z = /* @__PURE__ */ new Set(), _ = d.filter((q) => q.countryCode).map((q) => ({ value: q.countryCode, label: `${q.countryCode} – ${q.name}` })).filter((q) => z.has(q.value) ? !1 : (z.add(q.value), !0));
|
|
4597
|
+
Y(_);
|
|
4576
4598
|
const y = g.applicantRequestData;
|
|
4577
|
-
if (
|
|
4599
|
+
if (C({
|
|
4578
4600
|
firstName: (y == null ? void 0 : y.firstName) || "",
|
|
4579
4601
|
lastName: (y == null ? void 0 : y.lastName) || "",
|
|
4580
4602
|
email: (y == null ? void 0 : y.email) || "",
|
|
@@ -4604,56 +4626,56 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4604
4626
|
country: (y == null ? void 0 : y.country) || "",
|
|
4605
4627
|
nationality: (y == null ? void 0 : y.nationality) || "",
|
|
4606
4628
|
phonenumber: (y == null ? void 0 : y.phonenumber) || ""
|
|
4607
|
-
}), g.kycRecords && g.kycRecords.length > 0 && g.kycRecords[0].providerTokenObject !== null &&
|
|
4608
|
-
console.log("[Identity] Review page disabled + existing identity — auto-requesting..."),
|
|
4629
|
+
}), g.kycRecords && g.kycRecords.length > 0 && g.kycRecords[0].providerTokenObject !== null && !O.current && M.current) {
|
|
4630
|
+
console.log("[Identity] Review page disabled + existing identity — auto-requesting..."), O.current = !0;
|
|
4609
4631
|
try {
|
|
4610
|
-
await f(),
|
|
4611
|
-
} catch (
|
|
4612
|
-
console.error("[Identity] Auto-request failed:",
|
|
4632
|
+
await f(), H(!0);
|
|
4633
|
+
} catch (q) {
|
|
4634
|
+
console.error("[Identity] Auto-request failed:", q);
|
|
4613
4635
|
}
|
|
4614
4636
|
}
|
|
4615
4637
|
} catch (g) {
|
|
4616
4638
|
console.error("Error loading applicant data:", g);
|
|
4617
4639
|
} finally {
|
|
4618
|
-
|
|
4640
|
+
P(!1);
|
|
4619
4641
|
}
|
|
4620
4642
|
})();
|
|
4621
4643
|
}, [e]), ne(() => {
|
|
4622
|
-
u && !
|
|
4623
|
-
}, [u,
|
|
4624
|
-
if (
|
|
4625
|
-
if (
|
|
4626
|
-
const i = new Date(
|
|
4644
|
+
u && !w && M.current && (console.log("[Identity] Review page disabled — showing cached provider"), H(!0));
|
|
4645
|
+
}, [u, w]), ne(() => {
|
|
4646
|
+
if (m) {
|
|
4647
|
+
if (m.expiresAt) {
|
|
4648
|
+
const i = new Date(m.expiresAt).getTime();
|
|
4627
4649
|
if (Date.now() >= i) {
|
|
4628
|
-
console.warn("[Identity] Token has expired (expiresAt)"),
|
|
4650
|
+
console.warn("[Identity] Token has expired (expiresAt)"), T(!0), I("Your verification session has expired. Please restart.");
|
|
4629
4651
|
return;
|
|
4630
4652
|
}
|
|
4631
4653
|
}
|
|
4632
|
-
if (
|
|
4654
|
+
if (m.url)
|
|
4633
4655
|
try {
|
|
4634
|
-
const g = new URL(
|
|
4656
|
+
const g = new URL(m.url).toString().toLowerCase();
|
|
4635
4657
|
if (g.includes("expired") || g.includes("invalid") || g.includes("error")) {
|
|
4636
|
-
console.warn("[Identity] Token URL indicates expiration"),
|
|
4658
|
+
console.warn("[Identity] Token URL indicates expiration"), T(!0), I("Your verification link has expired. Please restart.");
|
|
4637
4659
|
return;
|
|
4638
4660
|
}
|
|
4639
4661
|
} catch {
|
|
4640
4662
|
console.error("[Identity] Invalid token URL");
|
|
4641
4663
|
}
|
|
4642
|
-
if (
|
|
4643
|
-
console.warn("[Identity] Token object indicates expiration"),
|
|
4664
|
+
if (m.status === "expired" || m.error === "expired" || m.expired === !0) {
|
|
4665
|
+
console.warn("[Identity] Token object indicates expiration"), T(!0), I("Your verification session has expired. Please restart.");
|
|
4644
4666
|
return;
|
|
4645
4667
|
}
|
|
4646
4668
|
}
|
|
4647
|
-
}, [
|
|
4648
|
-
if (h !== null &&
|
|
4669
|
+
}, [m]), ne(() => {
|
|
4670
|
+
if (h !== null && m && !x && w && !B) {
|
|
4649
4671
|
const i = h;
|
|
4650
|
-
if (
|
|
4651
|
-
console.log("[Identity] Loading provider URL for user verification:",
|
|
4672
|
+
if (m.url) {
|
|
4673
|
+
console.log("[Identity] Loading provider URL for user verification:", m.url), I(null);
|
|
4652
4674
|
try {
|
|
4653
|
-
if (new URL(
|
|
4675
|
+
if (new URL(m.url), i === ve.SardinAI) {
|
|
4654
4676
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
4655
4677
|
try {
|
|
4656
|
-
const g = ze.parseProviderConfig(h,
|
|
4678
|
+
const g = ze.parseProviderConfig(h, m, l);
|
|
4657
4679
|
ze.createProvider(h, g).initialize().then(() => {
|
|
4658
4680
|
console.log("[SardinAI] Risk SDK initialized successfully in background");
|
|
4659
4681
|
}).catch((d) => {
|
|
@@ -4663,44 +4685,44 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4663
4685
|
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", g);
|
|
4664
4686
|
}
|
|
4665
4687
|
}
|
|
4666
|
-
D({ type: "url", url:
|
|
4688
|
+
D({ type: "url", url: m.url });
|
|
4667
4689
|
} catch (g) {
|
|
4668
|
-
console.error("[Identity] Invalid URL:", g),
|
|
4690
|
+
console.error("[Identity] Invalid URL:", g), I("Invalid verification URL. Please restart."), T(!0);
|
|
4669
4691
|
}
|
|
4670
4692
|
return;
|
|
4671
4693
|
}
|
|
4672
4694
|
if (i === ve.SardinAI) {
|
|
4673
|
-
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."),
|
|
4695
|
+
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), I(null);
|
|
4674
4696
|
try {
|
|
4675
|
-
const g = ze.parseProviderConfig(h,
|
|
4697
|
+
const g = ze.parseProviderConfig(h, m, l), b = ze.createProvider(h, g);
|
|
4676
4698
|
b.initialize().then(() => {
|
|
4677
4699
|
console.log("[SardinAI] Risk SDK initialized successfully"), D(b), setTimeout(() => {
|
|
4678
4700
|
t == null || t();
|
|
4679
4701
|
}, 2e3);
|
|
4680
4702
|
}).catch((d) => {
|
|
4681
|
-
var
|
|
4703
|
+
var A;
|
|
4682
4704
|
console.error("[SardinAI] Failed to initialize:", d);
|
|
4683
|
-
const
|
|
4684
|
-
|
|
4705
|
+
const p = ((A = d.message) == null ? void 0 : A.toLowerCase()) || "";
|
|
4706
|
+
p.includes("expired") || p.includes("invalid") || p.includes("401") || p.includes("400") ? (T(!0), I("Session expired or invalid. Please restart verification.")) : I(`Failed to initialize: ${d.message}`);
|
|
4685
4707
|
});
|
|
4686
4708
|
} catch (g) {
|
|
4687
|
-
console.error("[SardinAI] Error creating provider:", g),
|
|
4709
|
+
console.error("[SardinAI] Error creating provider:", g), I(`Configuration error: ${g.message}`);
|
|
4688
4710
|
}
|
|
4689
4711
|
return;
|
|
4690
4712
|
}
|
|
4691
4713
|
try {
|
|
4692
|
-
|
|
4693
|
-
const g = ze.parseProviderConfig(h,
|
|
4714
|
+
I(null);
|
|
4715
|
+
const g = ze.parseProviderConfig(h, m, l), b = ze.createProvider(h, g);
|
|
4694
4716
|
i === ve.Sumsub ? (b.initialize("identity-container").catch((d) => {
|
|
4695
|
-
var
|
|
4696
|
-
console.error("[Sumsub] Initialization error:", d),
|
|
4717
|
+
var p;
|
|
4718
|
+
console.error("[Sumsub] Initialization error:", d), I(`Failed to initialize: ${d.message}`), (p = d.message) != null && p.toLowerCase().includes("expired") && T(!0);
|
|
4697
4719
|
}), b.onComplete && b.onComplete(() => {
|
|
4698
4720
|
t == null || t();
|
|
4699
4721
|
})) : i === ve.Onfido && b.initialize("identity-container").catch((d) => {
|
|
4700
|
-
console.error("[Onfido] Initialization error:", d),
|
|
4722
|
+
console.error("[Onfido] Initialization error:", d), I(`Failed to initialize: ${d.message}`);
|
|
4701
4723
|
}), D(b);
|
|
4702
4724
|
} catch (g) {
|
|
4703
|
-
console.error("[Identity] Provider setup error:", g),
|
|
4725
|
+
console.error("[Identity] Provider setup error:", g), I(`Setup error: ${g.message}`);
|
|
4704
4726
|
}
|
|
4705
4727
|
}
|
|
4706
4728
|
return () => {
|
|
@@ -4711,18 +4733,18 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4711
4733
|
console.error("[Identity] Error destroying provider:", i);
|
|
4712
4734
|
}
|
|
4713
4735
|
};
|
|
4714
|
-
}, [h,
|
|
4736
|
+
}, [h, m, x, w, t, B]);
|
|
4715
4737
|
const ie = async () => {
|
|
4716
4738
|
try {
|
|
4717
|
-
|
|
4739
|
+
I(null), T(!1), await f(), H(!0);
|
|
4718
4740
|
} catch (i) {
|
|
4719
4741
|
console.error("Error starting identity verification:", i);
|
|
4720
4742
|
}
|
|
4721
|
-
},
|
|
4743
|
+
}, Ae = async () => {
|
|
4722
4744
|
try {
|
|
4723
|
-
|
|
4745
|
+
I(null), T(!1), D(null), console.log("[Identity] Restarting verification..."), await N(), H(!0);
|
|
4724
4746
|
} catch (i) {
|
|
4725
|
-
console.error("Error restarting identity verification:", i),
|
|
4747
|
+
console.error("Error restarting identity verification:", i), I(i.message || "Failed to restart verification");
|
|
4726
4748
|
}
|
|
4727
4749
|
};
|
|
4728
4750
|
if (X || v)
|
|
@@ -4730,12 +4752,12 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4730
4752
|
/* @__PURE__ */ r(we, { className: "my-8" }),
|
|
4731
4753
|
/* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
|
|
4732
4754
|
] }) });
|
|
4733
|
-
if (
|
|
4755
|
+
if (S)
|
|
4734
4756
|
return /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
4735
4757
|
"Error: ",
|
|
4736
|
-
|
|
4758
|
+
S.message
|
|
4737
4759
|
] }) }) });
|
|
4738
|
-
if (
|
|
4760
|
+
if (w && (W || B))
|
|
4739
4761
|
return /* @__PURE__ */ o(j, { children: [
|
|
4740
4762
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
|
|
4741
4763
|
/* @__PURE__ */ o(K, { children: [
|
|
@@ -4759,8 +4781,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4759
4781
|
}
|
|
4760
4782
|
),
|
|
4761
4783
|
/* @__PURE__ */ o("div", { children: [
|
|
4762
|
-
/* @__PURE__ */ r("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children:
|
|
4763
|
-
/* @__PURE__ */ r("p", { className: "text-red-800 dark:text-red-200 text-sm", children:
|
|
4784
|
+
/* @__PURE__ */ r("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: B ? "Session Expired" : "Verification Error" }),
|
|
4785
|
+
/* @__PURE__ */ r("p", { className: "text-red-800 dark:text-red-200 text-sm", children: W || "Your verification session has expired and needs to be restarted." })
|
|
4764
4786
|
] })
|
|
4765
4787
|
] }) }),
|
|
4766
4788
|
/* @__PURE__ */ o("div", { className: "bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4", children: [
|
|
@@ -4773,25 +4795,25 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4773
4795
|
] })
|
|
4774
4796
|
] }),
|
|
4775
4797
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
4776
|
-
n && /* @__PURE__ */ r(
|
|
4777
|
-
/* @__PURE__ */ r(
|
|
4798
|
+
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
4799
|
+
/* @__PURE__ */ r(Q, { type: "button", onClick: Ae, disabled: v, children: v ? "Restarting..." : "Restart Verification" })
|
|
4778
4800
|
] })
|
|
4779
4801
|
] });
|
|
4780
|
-
if (
|
|
4802
|
+
if (w && u) {
|
|
4781
4803
|
const i = h;
|
|
4782
|
-
return
|
|
4804
|
+
return m != null && m.url ? /* @__PURE__ */ o(j, { children: [
|
|
4783
4805
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
4784
4806
|
/* @__PURE__ */ o("div", { children: [
|
|
4785
4807
|
/* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
|
|
4786
4808
|
/* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
|
|
4787
4809
|
] }),
|
|
4788
4810
|
/* @__PURE__ */ r(
|
|
4789
|
-
|
|
4811
|
+
Q,
|
|
4790
4812
|
{
|
|
4791
4813
|
type: "button",
|
|
4792
4814
|
variant: "outline",
|
|
4793
4815
|
size: "sm",
|
|
4794
|
-
onClick:
|
|
4816
|
+
onClick: Ae,
|
|
4795
4817
|
disabled: v,
|
|
4796
4818
|
children: "Restart"
|
|
4797
4819
|
}
|
|
@@ -4805,18 +4827,18 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4805
4827
|
/* @__PURE__ */ r("div", { className: "w-full", style: { height: "600px" }, children: /* @__PURE__ */ r(
|
|
4806
4828
|
"iframe",
|
|
4807
4829
|
{
|
|
4808
|
-
src:
|
|
4830
|
+
src: m.url,
|
|
4809
4831
|
className: "w-full h-full border-0 rounded-lg",
|
|
4810
4832
|
allow: "camera; microphone; geolocation",
|
|
4811
4833
|
title: "Identity Verification",
|
|
4812
4834
|
onLoad: (g) => {
|
|
4813
|
-
var b, d,
|
|
4835
|
+
var b, d, p;
|
|
4814
4836
|
console.log("[Identity] Iframe loaded");
|
|
4815
4837
|
try {
|
|
4816
|
-
const
|
|
4817
|
-
if (
|
|
4818
|
-
const
|
|
4819
|
-
(
|
|
4838
|
+
const A = g.target, z = A.contentDocument || ((b = A.contentWindow) == null ? void 0 : b.document);
|
|
4839
|
+
if (z) {
|
|
4840
|
+
const _ = ((p = (d = z.body) == null ? void 0 : d.textContent) == null ? void 0 : p.toLowerCase()) || "";
|
|
4841
|
+
(_.includes("expired") || _.includes("invalid") || _.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), T(!0), I("Your verification link has expired."));
|
|
4820
4842
|
}
|
|
4821
4843
|
} catch {
|
|
4822
4844
|
console.log("[Identity] Cannot check iframe content (CORS)");
|
|
@@ -4825,7 +4847,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4825
4847
|
}
|
|
4826
4848
|
) })
|
|
4827
4849
|
] }),
|
|
4828
|
-
n && /* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(
|
|
4850
|
+
n && /* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(Q, { variant: "outline", onClick: n, children: "Back" }) })
|
|
4829
4851
|
] }) : i === ve.SardinAI ? /* @__PURE__ */ o(j, { children: [
|
|
4830
4852
|
/* @__PURE__ */ o(ue, { children: [
|
|
4831
4853
|
/* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
|
|
@@ -4842,18 +4864,18 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4842
4864
|
/* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
|
|
4843
4865
|
] }),
|
|
4844
4866
|
/* @__PURE__ */ r(K, { children: /* @__PURE__ */ r("div", { id: "identity-container", className: "min-h-[400px]" }) }),
|
|
4845
|
-
n && /* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(
|
|
4867
|
+
n && /* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(Q, { variant: "outline", onClick: n, children: "Back" }) })
|
|
4846
4868
|
] });
|
|
4847
4869
|
}
|
|
4848
4870
|
const Pe = /* @__PURE__ */ new Set(["country", "nationality", "taxCountry", "countryOfBirth", "mobileCountryCode", "otherNationality"]), pe = (i = 4) => ({ 1: "col-span-1", 2: "col-span-2", 3: "col-span-3", 4: "col-span-4" })[i] || "col-span-4", Oe = (i, g) => {
|
|
4849
4871
|
if (!g && g !== 0) return "—";
|
|
4850
4872
|
if (Pe.has(i) && i !== "mobileCountryCode") {
|
|
4851
|
-
const b =
|
|
4873
|
+
const b = $.find((d) => d.value === g);
|
|
4852
4874
|
return b ? b.label : String(g);
|
|
4853
4875
|
}
|
|
4854
4876
|
return String(g);
|
|
4855
4877
|
}, Xe = ({ helpText: i }) => {
|
|
4856
|
-
const [g, b] =
|
|
4878
|
+
const [g, b] = k(!1), d = ee(null), [, p] = k({ top: 0, left: 0 });
|
|
4857
4879
|
return /* @__PURE__ */ o(Qe, { children: [
|
|
4858
4880
|
/* @__PURE__ */ r(
|
|
4859
4881
|
"button",
|
|
@@ -4862,8 +4884,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4862
4884
|
ref: d,
|
|
4863
4885
|
onClick: () => {
|
|
4864
4886
|
if (d.current) {
|
|
4865
|
-
const
|
|
4866
|
-
|
|
4887
|
+
const z = d.current.getBoundingClientRect();
|
|
4888
|
+
p({ top: z.bottom + window.scrollY + 6, left: z.left + window.scrollX });
|
|
4867
4889
|
}
|
|
4868
4890
|
b(!0);
|
|
4869
4891
|
},
|
|
@@ -4903,7 +4925,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4903
4925
|
children: /* @__PURE__ */ o(
|
|
4904
4926
|
"div",
|
|
4905
4927
|
{
|
|
4906
|
-
onClick: (
|
|
4928
|
+
onClick: (z) => z.stopPropagation(),
|
|
4907
4929
|
style: {
|
|
4908
4930
|
background: "var(--metakyc-surface, #fff)",
|
|
4909
4931
|
border: "1px solid var(--metakyc-border, #e5e7eb)",
|
|
@@ -4945,7 +4967,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4945
4967
|
/* @__PURE__ */ r("div", { style: { flex: 1, minWidth: 0 }, children: i }),
|
|
4946
4968
|
/* @__PURE__ */ r("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ r(Xe, { helpText: g }) })
|
|
4947
4969
|
] }) : i, et = (i, g) => {
|
|
4948
|
-
const b = `cf-${g}`, d = i.paramName ?? "",
|
|
4970
|
+
const b = `cf-${g}`, d = i.paramName ?? "", p = U[d];
|
|
4949
4971
|
if (i.customType === "br")
|
|
4950
4972
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), style: { minHeight: "0.5rem" } }, b);
|
|
4951
4973
|
if (i.customType === "paragraph")
|
|
@@ -4982,15 +5004,15 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4982
5004
|
i.helpText
|
|
4983
5005
|
) }, b);
|
|
4984
5006
|
if (i.customType === "checkbox" || i.customType === "link_checkbox") {
|
|
4985
|
-
const
|
|
5007
|
+
const A = p === "true" || p === !0;
|
|
4986
5008
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: be(
|
|
4987
5009
|
/* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
4988
5010
|
/* @__PURE__ */ r(
|
|
4989
5011
|
"input",
|
|
4990
5012
|
{
|
|
4991
5013
|
type: "checkbox",
|
|
4992
|
-
checked: !!
|
|
4993
|
-
onChange: (
|
|
5014
|
+
checked: !!A,
|
|
5015
|
+
onChange: (z) => te((_) => ({ ..._, [d]: String(z.target.checked) })),
|
|
4994
5016
|
style: {
|
|
4995
5017
|
width: 16,
|
|
4996
5018
|
height: 16,
|
|
@@ -5009,27 +5031,27 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5009
5031
|
) }, b);
|
|
5010
5032
|
}
|
|
5011
5033
|
if (i.customType === "group_checkbox") {
|
|
5012
|
-
const
|
|
5013
|
-
i.singleSelect ? te((y) => ({ ...y, [d]:
|
|
5034
|
+
const A = Array.isArray(p) ? p : p ? [p] : [], z = (_) => {
|
|
5035
|
+
i.singleSelect ? te((y) => ({ ...y, [d]: A[0] === _ ? [] : [_] })) : te((y) => ({
|
|
5014
5036
|
...y,
|
|
5015
|
-
[d]:
|
|
5037
|
+
[d]: A.includes(_) ? A.filter((ae) => ae !== _) : [...A, _]
|
|
5016
5038
|
}));
|
|
5017
5039
|
};
|
|
5018
5040
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: be(
|
|
5019
5041
|
/* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
|
|
5020
5042
|
i.label && /* @__PURE__ */ r("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: i.displayText || i.label }),
|
|
5021
|
-
(i.options || []).map((
|
|
5043
|
+
(i.options || []).map((_) => /* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
5022
5044
|
/* @__PURE__ */ r(
|
|
5023
5045
|
"input",
|
|
5024
5046
|
{
|
|
5025
5047
|
type: "checkbox",
|
|
5026
|
-
checked:
|
|
5027
|
-
onChange: () => _
|
|
5048
|
+
checked: A.includes(_.value),
|
|
5049
|
+
onChange: () => z(_.value),
|
|
5028
5050
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
5029
5051
|
}
|
|
5030
5052
|
),
|
|
5031
|
-
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children:
|
|
5032
|
-
] },
|
|
5053
|
+
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: _.label })
|
|
5054
|
+
] }, _.value))
|
|
5033
5055
|
] }),
|
|
5034
5056
|
i.helpText
|
|
5035
5057
|
) }, b);
|
|
@@ -5037,20 +5059,20 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5037
5059
|
return i.customType === "radio_group" ? /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: be(
|
|
5038
5060
|
/* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
|
|
5039
5061
|
i.label && /* @__PURE__ */ r("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: i.displayText || i.label }),
|
|
5040
|
-
(i.options || []).map((
|
|
5062
|
+
(i.options || []).map((A) => /* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
5041
5063
|
/* @__PURE__ */ r(
|
|
5042
5064
|
"input",
|
|
5043
5065
|
{
|
|
5044
5066
|
type: "radio",
|
|
5045
5067
|
name: `rg-${d}`,
|
|
5046
|
-
value:
|
|
5047
|
-
checked:
|
|
5048
|
-
onChange: () => te((
|
|
5068
|
+
value: A.value,
|
|
5069
|
+
checked: p === A.value,
|
|
5070
|
+
onChange: () => te((z) => ({ ...z, [d]: A.value })),
|
|
5049
5071
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
5050
5072
|
}
|
|
5051
5073
|
),
|
|
5052
|
-
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children:
|
|
5053
|
-
] },
|
|
5074
|
+
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: A.label })
|
|
5075
|
+
] }, A.value))
|
|
5054
5076
|
] }),
|
|
5055
5077
|
i.helpText
|
|
5056
5078
|
) }, b) : /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: be(
|
|
@@ -5058,34 +5080,34 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5058
5080
|
de,
|
|
5059
5081
|
{
|
|
5060
5082
|
label: i.displayText || i.label || d,
|
|
5061
|
-
value: String(
|
|
5062
|
-
onChange: (
|
|
5083
|
+
value: String(p ?? ""),
|
|
5084
|
+
onChange: (A) => te((z) => ({ ...z, [d]: A.target.value }))
|
|
5063
5085
|
}
|
|
5064
5086
|
),
|
|
5065
5087
|
i.helpText
|
|
5066
5088
|
) }, b);
|
|
5067
5089
|
}, tt = (i, g) => {
|
|
5068
5090
|
if (i.isCustom) return et(i, g);
|
|
5069
|
-
const b = i.name ?? "", d = Me[b],
|
|
5070
|
-
return i.editable ?
|
|
5091
|
+
const b = i.name ?? "", d = Me[b], p = i.displayText || (d == null ? void 0 : d.label) || b, A = G[b] ?? "", z = b === "mobileCountryCode", _ = !!(d != null && d.countriesType) && !z;
|
|
5092
|
+
return i.editable ? z ? /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: be(
|
|
5071
5093
|
/* @__PURE__ */ r(
|
|
5072
5094
|
Re,
|
|
5073
5095
|
{
|
|
5074
|
-
label:
|
|
5075
|
-
value: String(
|
|
5076
|
-
onChange: (y) =>
|
|
5077
|
-
options: [{ value: "", label: "Select country code…" }, ...
|
|
5096
|
+
label: p,
|
|
5097
|
+
value: String(A),
|
|
5098
|
+
onChange: (y) => C((ae) => ({ ...ae, [b]: y })),
|
|
5099
|
+
options: [{ value: "", label: "Select country code…" }, ...L]
|
|
5078
5100
|
}
|
|
5079
5101
|
),
|
|
5080
5102
|
i.helpText
|
|
5081
|
-
) }, `epc-${g}`) :
|
|
5103
|
+
) }, `epc-${g}`) : _ ? /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: be(
|
|
5082
5104
|
/* @__PURE__ */ r(
|
|
5083
5105
|
Re,
|
|
5084
5106
|
{
|
|
5085
|
-
label:
|
|
5086
|
-
value: String(
|
|
5087
|
-
onChange: (y) =>
|
|
5088
|
-
options: [{ value: "", label: `Select ${
|
|
5107
|
+
label: p,
|
|
5108
|
+
value: String(A),
|
|
5109
|
+
onChange: (y) => C((ae) => ({ ...ae, [b]: y })),
|
|
5110
|
+
options: [{ value: "", label: `Select ${p.toLowerCase()}…` }, ...$]
|
|
5089
5111
|
}
|
|
5090
5112
|
),
|
|
5091
5113
|
i.helpText
|
|
@@ -5093,23 +5115,23 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5093
5115
|
/* @__PURE__ */ r(
|
|
5094
5116
|
de,
|
|
5095
5117
|
{
|
|
5096
|
-
label:
|
|
5118
|
+
label: p,
|
|
5097
5119
|
type: (d == null ? void 0 : d.type) === "date" ? "date" : (d == null ? void 0 : d.type) === "email" ? "email" : "text",
|
|
5098
|
-
value: String(
|
|
5099
|
-
onChange: (y) =>
|
|
5120
|
+
value: String(A),
|
|
5121
|
+
onChange: (y) => C((ae) => ({ ...ae, [b]: y.target.value }))
|
|
5100
5122
|
}
|
|
5101
5123
|
),
|
|
5102
5124
|
i.helpText
|
|
5103
5125
|
) }, `ei-${g}`) : /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: be(
|
|
5104
5126
|
/* @__PURE__ */ o(Qe, { children: [
|
|
5105
|
-
/* @__PURE__ */ r("label", { className: "block text-sm font-medium mb-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children:
|
|
5106
|
-
/* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: Oe(b,
|
|
5127
|
+
/* @__PURE__ */ r("label", { className: "block text-sm font-medium mb-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: p }),
|
|
5128
|
+
/* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: Oe(b, A) })
|
|
5107
5129
|
] }),
|
|
5108
5130
|
i.helpText
|
|
5109
5131
|
) }, `ro-${g}`);
|
|
5110
5132
|
};
|
|
5111
|
-
if (
|
|
5112
|
-
const i =
|
|
5133
|
+
if (ye) {
|
|
5134
|
+
const i = ye.title || "Review Your Information", g = ye.subtitle || "Please review and confirm your information before starting identity verification";
|
|
5113
5135
|
return /* @__PURE__ */ r("form", { onSubmit: (b) => {
|
|
5114
5136
|
b.preventDefault(), ie();
|
|
5115
5137
|
}, children: /* @__PURE__ */ o(j, { children: [
|
|
@@ -5117,10 +5139,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5117
5139
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: i }),
|
|
5118
5140
|
/* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: g })
|
|
5119
5141
|
] }),
|
|
5120
|
-
/* @__PURE__ */ r(K, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children:
|
|
5142
|
+
/* @__PURE__ */ r(K, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: ye.fields.map((b, d) => tt(b, d)) }) }),
|
|
5121
5143
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
5122
|
-
n && /* @__PURE__ */ r(
|
|
5123
|
-
/* @__PURE__ */ r(
|
|
5144
|
+
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
5145
|
+
/* @__PURE__ */ r(Q, { type: "submit", isLoading: v, children: "Confirm and Start Verification" })
|
|
5124
5146
|
] })
|
|
5125
5147
|
] }) });
|
|
5126
5148
|
}
|
|
@@ -5131,9 +5153,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5131
5153
|
] }),
|
|
5132
5154
|
/* @__PURE__ */ o(K, { className: "space-y-6", children: [
|
|
5133
5155
|
/* @__PURE__ */ r("div", { className: "space-y-4 pb-4", style: { borderBottom: "1px solid var(--metakyc-border, #e5e7eb)" }, children: [
|
|
5134
|
-
{ label: "Name", value: `${((_e =
|
|
5135
|
-
{ label: "Email", value: (Ue =
|
|
5136
|
-
{ label: "Date of Birth", value: ((je =
|
|
5156
|
+
{ label: "Name", value: `${((_e = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : _e.firstName) || ""} ${((He = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : He.lastName) || ""}`.trim() },
|
|
5157
|
+
{ label: "Email", value: (Ue = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : Ue.email },
|
|
5158
|
+
{ label: "Date of Birth", value: ((je = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : je.dateOfBirth) || "Not provided" }
|
|
5137
5159
|
].map(({ label: i, value: g }) => /* @__PURE__ */ o("div", { children: [
|
|
5138
5160
|
/* @__PURE__ */ r("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: i }),
|
|
5139
5161
|
/* @__PURE__ */ r("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: g })
|
|
@@ -5142,7 +5164,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5142
5164
|
/* @__PURE__ */ r("h3", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: "Address Information" }),
|
|
5143
5165
|
/* @__PURE__ */ o("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
5144
5166
|
/* @__PURE__ */ r(
|
|
5145
|
-
|
|
5167
|
+
Le,
|
|
5146
5168
|
{
|
|
5147
5169
|
control: Z.control,
|
|
5148
5170
|
name: "country",
|
|
@@ -5152,13 +5174,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5152
5174
|
label: "Country",
|
|
5153
5175
|
value: i.value,
|
|
5154
5176
|
onChange: i.onChange,
|
|
5155
|
-
options: [{ value: "", label: "Select country…" },
|
|
5177
|
+
options: [{ value: "", label: "Select country…" }, ...$]
|
|
5156
5178
|
}
|
|
5157
5179
|
)
|
|
5158
5180
|
}
|
|
5159
5181
|
),
|
|
5160
5182
|
/* @__PURE__ */ r(
|
|
5161
|
-
|
|
5183
|
+
Le,
|
|
5162
5184
|
{
|
|
5163
5185
|
control: Z.control,
|
|
5164
5186
|
name: "nationality",
|
|
@@ -5168,26 +5190,26 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5168
5190
|
label: "Nationality",
|
|
5169
5191
|
value: i.value,
|
|
5170
5192
|
onChange: i.onChange,
|
|
5171
|
-
options: [{ value: "", label: "Select nationality…" },
|
|
5193
|
+
options: [{ value: "", label: "Select nationality…" }, ...$]
|
|
5172
5194
|
}
|
|
5173
5195
|
)
|
|
5174
5196
|
}
|
|
5175
5197
|
)
|
|
5176
5198
|
] }),
|
|
5177
5199
|
/* @__PURE__ */ o("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
5178
|
-
/* @__PURE__ */ r(
|
|
5179
|
-
/* @__PURE__ */ r(
|
|
5200
|
+
/* @__PURE__ */ r(Le, { control: Z.control, name: "street", render: ({ field: i }) => /* @__PURE__ */ r(de, { ...i, label: "Street" }) }),
|
|
5201
|
+
/* @__PURE__ */ r(Le, { control: Z.control, name: "streetNumber", render: ({ field: i }) => /* @__PURE__ */ r(de, { ...i, label: "Street Number" }) })
|
|
5180
5202
|
] }),
|
|
5181
5203
|
/* @__PURE__ */ o("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
5182
|
-
/* @__PURE__ */ r(
|
|
5183
|
-
/* @__PURE__ */ r(
|
|
5204
|
+
/* @__PURE__ */ r(Le, { control: Z.control, name: "city", render: ({ field: i }) => /* @__PURE__ */ r(de, { ...i, label: "City" }) }),
|
|
5205
|
+
/* @__PURE__ */ r(Le, { control: Z.control, name: "zip", render: ({ field: i }) => /* @__PURE__ */ r(de, { ...i, label: "ZIP / Postal Code" }) })
|
|
5184
5206
|
] }),
|
|
5185
|
-
/* @__PURE__ */ r(
|
|
5207
|
+
/* @__PURE__ */ r(Le, { control: Z.control, name: "phonenumber", render: ({ field: i }) => /* @__PURE__ */ r(de, { ...i, label: "Phone Number", type: "tel" }) })
|
|
5186
5208
|
] })
|
|
5187
5209
|
] }),
|
|
5188
5210
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
5189
|
-
n && /* @__PURE__ */ r(
|
|
5190
|
-
/* @__PURE__ */ r(
|
|
5211
|
+
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
5212
|
+
/* @__PURE__ */ r(Q, { type: "submit", isLoading: v, children: "Confirm and Start Verification" })
|
|
5191
5213
|
] })
|
|
5192
5214
|
] }) });
|
|
5193
5215
|
}, mt = ({
|
|
@@ -5198,21 +5220,21 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5198
5220
|
onContinue: s,
|
|
5199
5221
|
onContactSupport: l
|
|
5200
5222
|
}) => {
|
|
5201
|
-
const u = e ===
|
|
5223
|
+
const u = e === Te.Approved ? {
|
|
5202
5224
|
type: "success",
|
|
5203
5225
|
title: "Verification Approved",
|
|
5204
5226
|
icon: "✓",
|
|
5205
5227
|
iconBg: "bg-green-100 dark:bg-green-900/30",
|
|
5206
5228
|
iconColor: "text-green-600 dark:text-green-400",
|
|
5207
5229
|
message: "Your identity verification has been successfully approved."
|
|
5208
|
-
} : e ===
|
|
5230
|
+
} : e === Te.Rejected ? {
|
|
5209
5231
|
type: "error",
|
|
5210
5232
|
title: "Verification Rejected",
|
|
5211
5233
|
icon: "✕",
|
|
5212
5234
|
iconBg: "bg-red-100 dark:bg-red-900/30",
|
|
5213
5235
|
iconColor: "text-red-600 dark:text-red-400",
|
|
5214
5236
|
message: "Unfortunately, your identity verification was not approved."
|
|
5215
|
-
} : e ===
|
|
5237
|
+
} : e === Te.Pending || e === Te.InProgress ? {
|
|
5216
5238
|
type: "pending",
|
|
5217
5239
|
title: "Verification Pending",
|
|
5218
5240
|
icon: "⏱",
|
|
@@ -5280,10 +5302,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5280
5302
|
) }),
|
|
5281
5303
|
/* @__PURE__ */ r("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children: u.title }),
|
|
5282
5304
|
/* @__PURE__ */ r("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ r(
|
|
5283
|
-
|
|
5305
|
+
Ie,
|
|
5284
5306
|
{
|
|
5285
5307
|
variant: u.type === "success" ? "success" : u.type === "error" ? "danger" : u.type === "pending" ? "warning" : "info",
|
|
5286
|
-
children: e != null ?
|
|
5308
|
+
children: e != null ? Te[e] : De[t]
|
|
5287
5309
|
}
|
|
5288
5310
|
) }),
|
|
5289
5311
|
/* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-6 max-w-md mx-auto", children: a || u.message }),
|
|
@@ -5315,7 +5337,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5315
5337
|
/* @__PURE__ */ r("div", { className: "mt-6 pt-6 border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ o("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
|
|
5316
5338
|
/* @__PURE__ */ o("div", { children: [
|
|
5317
5339
|
/* @__PURE__ */ r("span", { className: "text-gray-500 dark:text-gray-400", children: "KYC Status:" }),
|
|
5318
|
-
/* @__PURE__ */ r("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: e != null ?
|
|
5340
|
+
/* @__PURE__ */ r("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: e != null ? Te[e] : "Not Available" })
|
|
5319
5341
|
] }),
|
|
5320
5342
|
/* @__PURE__ */ o("div", { children: [
|
|
5321
5343
|
/* @__PURE__ */ r("span", { className: "text-gray-500 dark:text-gray-400", children: "Review Status:" }),
|
|
@@ -5324,15 +5346,15 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5324
5346
|
] }) })
|
|
5325
5347
|
] }),
|
|
5326
5348
|
/* @__PURE__ */ o(me, { className: "flex justify-center gap-4", children: [
|
|
5327
|
-
u.type === "success" && s && /* @__PURE__ */ r(
|
|
5349
|
+
u.type === "success" && s && /* @__PURE__ */ r(Q, { onClick: s, size: "lg", children: "Continue" }),
|
|
5328
5350
|
u.type === "error" && /* @__PURE__ */ o(Qe, { children: [
|
|
5329
|
-
l && /* @__PURE__ */ r(
|
|
5330
|
-
s && /* @__PURE__ */ r(
|
|
5351
|
+
l && /* @__PURE__ */ r(Q, { variant: "outline", onClick: l, children: "Contact Support" }),
|
|
5352
|
+
s && /* @__PURE__ */ r(Q, { onClick: s, children: "Try Again" })
|
|
5331
5353
|
] }),
|
|
5332
5354
|
u.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" }) })
|
|
5333
5355
|
] })
|
|
5334
5356
|
] });
|
|
5335
|
-
},
|
|
5357
|
+
}, Zr = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ r("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ r(
|
|
5336
5358
|
"img",
|
|
5337
5359
|
{
|
|
5338
5360
|
src: e.url,
|
|
@@ -5352,10 +5374,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5352
5374
|
subtitle: t,
|
|
5353
5375
|
className: n = ""
|
|
5354
5376
|
}) => {
|
|
5355
|
-
const { currentTheme: a } =
|
|
5377
|
+
const { currentTheme: a } = ge(), s = e || (a == null ? void 0 : a.title) || "", l = !!(a != null && a.logo && a.logo.visible && a.logo.url), c = !!s;
|
|
5356
5378
|
return !l && !c ? null : /* @__PURE__ */ o("div", { className: `metakyc-header ${n}`, children: [
|
|
5357
5379
|
/* @__PURE__ */ o("div", { className: "metakyc-header-title flex items-center text-xl font-bold text-gray-900 dark:text-white", children: [
|
|
5358
|
-
l && /* @__PURE__ */ r(
|
|
5380
|
+
l && /* @__PURE__ */ r(Zr, { config: a.logo }),
|
|
5359
5381
|
l && c && /* @__PURE__ */ r(
|
|
5360
5382
|
"span",
|
|
5361
5383
|
{
|
|
@@ -5385,7 +5407,7 @@ const qe = {
|
|
|
5385
5407
|
display: "inline-block",
|
|
5386
5408
|
verticalAlign: "middle"
|
|
5387
5409
|
}, pt = ({ helpText: e, children: t }) => {
|
|
5388
|
-
const [n, a] =
|
|
5410
|
+
const [n, a] = xe.useState(!1);
|
|
5389
5411
|
if (!e) return /* @__PURE__ */ r(Qe, { children: t });
|
|
5390
5412
|
const s = n ? /* @__PURE__ */ r(
|
|
5391
5413
|
"div",
|
|
@@ -5499,22 +5521,22 @@ const qe = {
|
|
|
5499
5521
|
),
|
|
5500
5522
|
typeof document < "u" && s ? it(s, document.body) : null
|
|
5501
5523
|
] });
|
|
5502
|
-
},
|
|
5524
|
+
}, xn = ({
|
|
5503
5525
|
workflowKey: e,
|
|
5504
5526
|
externalRefId: t,
|
|
5505
5527
|
onSuccess: n,
|
|
5506
5528
|
onCancel: a
|
|
5507
5529
|
}) => {
|
|
5508
5530
|
var _e, He, Ue, je;
|
|
5509
|
-
const { config: s, baseInformationService: l, currentTheme: c } =
|
|
5510
|
-
if (!
|
|
5531
|
+
const { config: s, baseInformationService: l, currentTheme: c } = ge(), { createApplicant: u, isLoading: h } = Sr(), m = e || ((_e = s.applicantForm) == null ? void 0 : _e.workflowKey);
|
|
5532
|
+
if (!m)
|
|
5511
5533
|
throw new Error(
|
|
5512
5534
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
5513
5535
|
);
|
|
5514
|
-
const v = t || ((He = s.applicantForm) == null ? void 0 : He.externalRefId) || "",
|
|
5536
|
+
const v = t || ((He = s.applicantForm) == null ? void 0 : He.externalRefId) || "", S = ((Ue = s.applicantForm) == null ? void 0 : Ue.email) || "", f = Ee(
|
|
5515
5537
|
() => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
|
|
5516
5538
|
[c == null ? void 0 : c.applicantFormPages]
|
|
5517
|
-
),
|
|
5539
|
+
), N = Ee(() => {
|
|
5518
5540
|
const i = new Set(Ve), g = c == null ? void 0 : c.applicantFormRequiredFields;
|
|
5519
5541
|
if (g) for (const b of g) i.add(b);
|
|
5520
5542
|
if (f)
|
|
@@ -5522,12 +5544,12 @@ const qe = {
|
|
|
5522
5544
|
for (const d of b.fields)
|
|
5523
5545
|
!d.isCustom && d.name && d.required && i.add(d.name);
|
|
5524
5546
|
return Array.from(i);
|
|
5525
|
-
}, [c == null ? void 0 : c.applicantFormRequiredFields, f]), x =
|
|
5547
|
+
}, [c == null ? void 0 : c.applicantFormRequiredFields, f]), x = Ee(() => {
|
|
5526
5548
|
var b;
|
|
5527
5549
|
if (f) {
|
|
5528
|
-
const d = f.flatMap((
|
|
5529
|
-
for (const
|
|
5530
|
-
return Array.from(
|
|
5550
|
+
const d = f.flatMap((A) => A.fields).filter((A) => !A.isCustom && A.name).map((A) => A.name), p = new Set(d);
|
|
5551
|
+
for (const A of Ve) p.add(A);
|
|
5552
|
+
return Array.from(p);
|
|
5531
5553
|
}
|
|
5532
5554
|
let i;
|
|
5533
5555
|
(b = s.applicantForm) != null && b.visibleFields ? i = s.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? i = c.applicantFormVisibleFields : i = zt;
|
|
@@ -5541,65 +5563,65 @@ const qe = {
|
|
|
5541
5563
|
"countryOfBirth",
|
|
5542
5564
|
"mobileCountryCode",
|
|
5543
5565
|
"otherNationality"
|
|
5544
|
-
]),
|
|
5566
|
+
]), F = Ee(() => {
|
|
5545
5567
|
var g, b;
|
|
5546
5568
|
const i = /* @__PURE__ */ new Set();
|
|
5547
5569
|
if (f)
|
|
5548
5570
|
for (const d of f)
|
|
5549
|
-
for (const
|
|
5550
|
-
!
|
|
5571
|
+
for (const p of d.fields)
|
|
5572
|
+
!p.isCustom && p.name && D.has(p.name) && i.add(p.countriesType ?? ((g = Me[p.name]) == null ? void 0 : g.countriesType));
|
|
5551
5573
|
else
|
|
5552
5574
|
for (const d of x)
|
|
5553
5575
|
D.has(d) && i.add((b = Me[d]) == null ? void 0 : b.countriesType);
|
|
5554
5576
|
return i.size === 0 && i.add(void 0), Array.from(i);
|
|
5555
|
-
}, [x, f]), [
|
|
5577
|
+
}, [x, f]), [R, $] = k({}), [E, L] = k(!0), Y = ee(/* @__PURE__ */ new Set()), X = ee(/* @__PURE__ */ new Set());
|
|
5556
5578
|
ne(() => {
|
|
5557
5579
|
if (!c) return;
|
|
5558
|
-
const i =
|
|
5559
|
-
const
|
|
5560
|
-
return !X.current.has(
|
|
5580
|
+
const i = F.filter((d) => {
|
|
5581
|
+
const p = d != null ? String(d) : "all";
|
|
5582
|
+
return !X.current.has(p) && !Y.current.has(p);
|
|
5561
5583
|
});
|
|
5562
5584
|
if (i.length === 0) {
|
|
5563
|
-
|
|
5564
|
-
const
|
|
5565
|
-
return X.current.has(
|
|
5566
|
-
}) &&
|
|
5585
|
+
F.every((p) => {
|
|
5586
|
+
const A = p != null ? String(p) : "all";
|
|
5587
|
+
return X.current.has(A);
|
|
5588
|
+
}) && L(!1);
|
|
5567
5589
|
return;
|
|
5568
5590
|
}
|
|
5569
|
-
|
|
5591
|
+
L(!0);
|
|
5570
5592
|
const g = i.map((d) => d != null ? String(d) : "all");
|
|
5571
|
-
g.forEach((d) =>
|
|
5593
|
+
g.forEach((d) => Y.current.add(d)), (async () => {
|
|
5572
5594
|
try {
|
|
5573
5595
|
const d = await Promise.all(
|
|
5574
|
-
i.map(async (
|
|
5575
|
-
const
|
|
5576
|
-
value:
|
|
5577
|
-
label: `${
|
|
5578
|
-
} : { value:
|
|
5579
|
-
return X.current.add(
|
|
5596
|
+
i.map(async (p) => {
|
|
5597
|
+
const A = p != null ? String(p) : "all", z = await l.getCountries("", s.locale || "en", p), _ = p === 40, y = /* @__PURE__ */ new Set(), ae = z.map((q) => _ && q.countryCode ? {
|
|
5598
|
+
value: q.countryCode,
|
|
5599
|
+
label: `${q.countryCode} – ${q.name}`
|
|
5600
|
+
} : { value: q.abbreviation3 || q.abbreviation, label: q.name }).filter((q) => !q.value || y.has(q.value) ? !1 : (y.add(q.value), !0));
|
|
5601
|
+
return X.current.add(A), Y.current.delete(A), [A, ae];
|
|
5580
5602
|
})
|
|
5581
5603
|
);
|
|
5582
|
-
|
|
5604
|
+
$((p) => ({ ...p, ...Object.fromEntries(d) }));
|
|
5583
5605
|
} catch (d) {
|
|
5584
|
-
g.forEach((
|
|
5606
|
+
g.forEach((p) => Y.current.delete(p)), console.error("Failed to load countries:", d);
|
|
5585
5607
|
} finally {
|
|
5586
|
-
|
|
5587
|
-
const
|
|
5588
|
-
return X.current.has(
|
|
5589
|
-
}) &&
|
|
5608
|
+
F.every((p) => {
|
|
5609
|
+
const A = p != null ? String(p) : "all";
|
|
5610
|
+
return X.current.has(A);
|
|
5611
|
+
}) && L(!1);
|
|
5590
5612
|
}
|
|
5591
5613
|
})();
|
|
5592
|
-
}, [
|
|
5593
|
-
const
|
|
5594
|
-
var
|
|
5595
|
-
const b = g ?? ((
|
|
5596
|
-
return
|
|
5597
|
-
}, [
|
|
5598
|
-
workflowKey:
|
|
5614
|
+
}, [F, c]);
|
|
5615
|
+
const P = (i, g) => {
|
|
5616
|
+
var p;
|
|
5617
|
+
const b = g ?? ((p = Me[i]) == null ? void 0 : p.countriesType), d = b != null ? String(b) : "all";
|
|
5618
|
+
return R[d] || [];
|
|
5619
|
+
}, [w, H] = k({
|
|
5620
|
+
workflowKey: m,
|
|
5599
5621
|
firstName: "",
|
|
5600
5622
|
lastName: "",
|
|
5601
5623
|
title: "",
|
|
5602
|
-
email:
|
|
5624
|
+
email: S,
|
|
5603
5625
|
dateOfBirth: "",
|
|
5604
5626
|
phonenumber: "",
|
|
5605
5627
|
externalRefId: v,
|
|
@@ -5619,89 +5641,89 @@ const qe = {
|
|
|
5619
5641
|
educationLevel: "",
|
|
5620
5642
|
occupation: "",
|
|
5621
5643
|
taxNumber: ""
|
|
5622
|
-
}), [
|
|
5644
|
+
}), [W, I] = k({}), [B, T] = k(0), [O, G] = k({}), [C, U] = k(null), [te, ye] = k(!1), se = (i, g) => H((b) => ({ ...b, [i]: g })), M = (i, g) => I((b) => ({ ...b, [i]: g })), Z = (i) => !i.conditionalOn || W[i.conditionalOn] === "true", ie = f && B < f.length - 1 ? B + 1 : -1, Ae = f && B > 0 ? B - 1 : -1, Pe = (i) => {
|
|
5623
5645
|
var b;
|
|
5624
5646
|
const g = {};
|
|
5625
5647
|
for (const d of i.fields)
|
|
5626
5648
|
if (d.isCustom) {
|
|
5627
5649
|
if (d.customType === "paragraph" || d.customType === "html" || d.customType === "br" || d.customType === "link") continue;
|
|
5628
5650
|
if (d.required && d.paramName) {
|
|
5629
|
-
const
|
|
5630
|
-
d.customType === "checkbox" || d.customType === "link_checkbox" ?
|
|
5651
|
+
const p = W[d.paramName], A = d.displayText || d.label || d.paramName;
|
|
5652
|
+
d.customType === "checkbox" || d.customType === "link_checkbox" ? p !== "true" && (g[d.paramName] = `${A} is required.`) : (!p || p.trim() === "") && (g[d.paramName] = `${A} is required.`);
|
|
5631
5653
|
}
|
|
5632
5654
|
} else if (d.name) {
|
|
5633
|
-
const
|
|
5634
|
-
if (
|
|
5635
|
-
const
|
|
5636
|
-
g[
|
|
5655
|
+
const p = d.name;
|
|
5656
|
+
if (N.includes(p) && Ye(w[p])) {
|
|
5657
|
+
const A = d.displayText || ((b = Me[p]) == null ? void 0 : b.label) || p;
|
|
5658
|
+
g[p] = `${A} is required.`;
|
|
5637
5659
|
}
|
|
5638
5660
|
}
|
|
5639
5661
|
return g;
|
|
5640
5662
|
}, pe = async () => {
|
|
5641
5663
|
if (!f) return;
|
|
5642
|
-
const i = f[
|
|
5664
|
+
const i = f[B];
|
|
5643
5665
|
if (i.conditionalOn && !Z(i)) {
|
|
5644
|
-
|
|
5666
|
+
G({}), ie >= 0 ? T(ie) : await Oe();
|
|
5645
5667
|
return;
|
|
5646
5668
|
}
|
|
5647
5669
|
const g = Pe(i);
|
|
5648
5670
|
if (Object.keys(g).length > 0) {
|
|
5649
|
-
|
|
5671
|
+
G(g);
|
|
5650
5672
|
return;
|
|
5651
5673
|
}
|
|
5652
|
-
|
|
5674
|
+
G({}), ie >= 0 ? T(ie) : await Oe();
|
|
5653
5675
|
}, Oe = async () => {
|
|
5654
5676
|
if (f) {
|
|
5655
5677
|
let i = {};
|
|
5656
5678
|
for (const g of f)
|
|
5657
5679
|
Z(g) && (i = { ...i, ...Pe(g) });
|
|
5658
5680
|
if (Object.keys(i).length > 0) {
|
|
5659
|
-
|
|
5681
|
+
G(i);
|
|
5660
5682
|
return;
|
|
5661
5683
|
}
|
|
5662
5684
|
}
|
|
5663
|
-
|
|
5685
|
+
ye(!0), U(null);
|
|
5664
5686
|
try {
|
|
5665
|
-
if (!
|
|
5687
|
+
if (!w.externalRefId || w.externalRefId.trim() === "") {
|
|
5666
5688
|
U("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
|
|
5667
5689
|
return;
|
|
5668
5690
|
}
|
|
5669
5691
|
const i = {
|
|
5670
|
-
workflowKey:
|
|
5671
|
-
externalRefId:
|
|
5692
|
+
workflowKey: w.workflowKey,
|
|
5693
|
+
externalRefId: w.externalRefId.trim()
|
|
5672
5694
|
};
|
|
5673
5695
|
if (f) {
|
|
5674
5696
|
for (const d of f)
|
|
5675
5697
|
if (Z(d)) {
|
|
5676
|
-
for (const
|
|
5677
|
-
if (!
|
|
5678
|
-
const
|
|
5679
|
-
Ye(
|
|
5698
|
+
for (const p of d.fields)
|
|
5699
|
+
if (!p.isCustom && p.name) {
|
|
5700
|
+
const A = p.name, z = w[A];
|
|
5701
|
+
Ye(z) || (i[A] = z);
|
|
5680
5702
|
}
|
|
5681
5703
|
}
|
|
5682
5704
|
for (const d of Ve)
|
|
5683
5705
|
if (i[d] === void 0) {
|
|
5684
|
-
const
|
|
5685
|
-
Ye(
|
|
5706
|
+
const p = w[d];
|
|
5707
|
+
Ye(p) || (i[d] = p);
|
|
5686
5708
|
}
|
|
5687
5709
|
} else
|
|
5688
5710
|
x.forEach((d) => {
|
|
5689
5711
|
if (d === "externalRefId") return;
|
|
5690
|
-
const
|
|
5691
|
-
Ye(
|
|
5712
|
+
const p = w[d];
|
|
5713
|
+
Ye(p) || (i[d] = p);
|
|
5692
5714
|
});
|
|
5693
5715
|
const g = [];
|
|
5694
5716
|
if (f) {
|
|
5695
5717
|
for (const d of f)
|
|
5696
5718
|
if (Z(d))
|
|
5697
|
-
for (const
|
|
5698
|
-
if (!
|
|
5699
|
-
const
|
|
5700
|
-
let
|
|
5701
|
-
if (
|
|
5702
|
-
|
|
5703
|
-
else if (
|
|
5704
|
-
g.push({ paramName:
|
|
5719
|
+
for (const p of d.fields) {
|
|
5720
|
+
if (!p.isCustom || !p.paramName || p.customType === "paragraph" || p.customType === "html" || p.customType === "br" || p.customType === "link") continue;
|
|
5721
|
+
const A = W[p.paramName] ?? "";
|
|
5722
|
+
let z;
|
|
5723
|
+
if (p.customType === "checkbox" || p.customType === "link_checkbox")
|
|
5724
|
+
z = A === "true" ? "yes" : "no";
|
|
5725
|
+
else if (z = A, !z && !p.required) continue;
|
|
5726
|
+
g.push({ paramName: p.paramName, value: z });
|
|
5705
5727
|
}
|
|
5706
5728
|
}
|
|
5707
5729
|
g.length > 0 && (i.applicantAdditionalDatas = g);
|
|
@@ -5710,37 +5732,37 @@ const qe = {
|
|
|
5710
5732
|
} catch (i) {
|
|
5711
5733
|
console.error("Error creating applicant:", i), U(i.message || "Failed to create applicant");
|
|
5712
5734
|
} finally {
|
|
5713
|
-
|
|
5735
|
+
ye(!1);
|
|
5714
5736
|
}
|
|
5715
5737
|
}, Xe = async (i) => {
|
|
5716
5738
|
var g;
|
|
5717
5739
|
i.preventDefault();
|
|
5718
|
-
for (const b of
|
|
5719
|
-
if (Ye(
|
|
5740
|
+
for (const b of N)
|
|
5741
|
+
if (Ye(w[b])) {
|
|
5720
5742
|
const d = ((g = Me[b]) == null ? void 0 : g.label) || b;
|
|
5721
5743
|
U(`${d} is required.`);
|
|
5722
5744
|
return;
|
|
5723
5745
|
}
|
|
5724
5746
|
await Oe();
|
|
5725
5747
|
}, be = (i, g, b, d) => {
|
|
5726
|
-
var
|
|
5727
|
-
const
|
|
5728
|
-
if (!
|
|
5729
|
-
const
|
|
5730
|
-
switch (
|
|
5748
|
+
var q;
|
|
5749
|
+
const p = Me[i];
|
|
5750
|
+
if (!p) return null;
|
|
5751
|
+
const A = N.includes(i), z = O[i], _ = b || p.label, y = g ?? i, ae = { required: A };
|
|
5752
|
+
switch (p.type) {
|
|
5731
5753
|
case "select":
|
|
5732
5754
|
if (i === "country" || i === "nationality" || i === "taxCountry" || i === "countryOfBirth" || i === "mobileCountryCode") {
|
|
5733
|
-
const le =
|
|
5755
|
+
const le = P(i, d);
|
|
5734
5756
|
return /* @__PURE__ */ r(
|
|
5735
5757
|
Re,
|
|
5736
5758
|
{
|
|
5737
5759
|
...ae,
|
|
5738
|
-
label:
|
|
5739
|
-
value:
|
|
5760
|
+
label: _,
|
|
5761
|
+
value: w[i] || "",
|
|
5740
5762
|
onChange: (Fe) => se(i, Fe),
|
|
5741
|
-
options: [{ value: "", label: `Select ${
|
|
5763
|
+
options: [{ value: "", label: `Select ${_.toLowerCase()}...` }, ...le],
|
|
5742
5764
|
disabled: E,
|
|
5743
|
-
error:
|
|
5765
|
+
error: z
|
|
5744
5766
|
},
|
|
5745
5767
|
y
|
|
5746
5768
|
);
|
|
@@ -5750,8 +5772,8 @@ const qe = {
|
|
|
5750
5772
|
Re,
|
|
5751
5773
|
{
|
|
5752
5774
|
...ae,
|
|
5753
|
-
label:
|
|
5754
|
-
value: ((
|
|
5775
|
+
label: _,
|
|
5776
|
+
value: ((q = w[i]) == null ? void 0 : q.toString()) || "",
|
|
5755
5777
|
onChange: (le) => se(i, le ? Number(le) : null),
|
|
5756
5778
|
options: [
|
|
5757
5779
|
{ value: "", label: "Select salutation..." },
|
|
@@ -5759,7 +5781,7 @@ const qe = {
|
|
|
5759
5781
|
{ value: Ze.Female.toString(), label: "Female" },
|
|
5760
5782
|
{ value: Ze.Other.toString(), label: "Other" }
|
|
5761
5783
|
],
|
|
5762
|
-
error:
|
|
5784
|
+
error: z
|
|
5763
5785
|
},
|
|
5764
5786
|
y
|
|
5765
5787
|
);
|
|
@@ -5769,11 +5791,11 @@ const qe = {
|
|
|
5769
5791
|
Re,
|
|
5770
5792
|
{
|
|
5771
5793
|
...ae,
|
|
5772
|
-
label:
|
|
5773
|
-
value:
|
|
5794
|
+
label: _,
|
|
5795
|
+
value: w[i] || "",
|
|
5774
5796
|
onChange: (Fe) => se(i, Fe),
|
|
5775
5797
|
options: [{ value: "", label: "Select language..." }, ...le],
|
|
5776
|
-
error:
|
|
5798
|
+
error: z
|
|
5777
5799
|
},
|
|
5778
5800
|
y
|
|
5779
5801
|
);
|
|
@@ -5781,13 +5803,13 @@ const qe = {
|
|
|
5781
5803
|
return null;
|
|
5782
5804
|
case "multiselect":
|
|
5783
5805
|
if (i === "otherNationality") {
|
|
5784
|
-
const le =
|
|
5806
|
+
const le = P(i, d);
|
|
5785
5807
|
return /* @__PURE__ */ r(
|
|
5786
5808
|
Cr,
|
|
5787
5809
|
{
|
|
5788
5810
|
...ae,
|
|
5789
|
-
label:
|
|
5790
|
-
value:
|
|
5811
|
+
label: _,
|
|
5812
|
+
value: w[i] || [],
|
|
5791
5813
|
onChange: (Fe) => se(i, Fe),
|
|
5792
5814
|
options: le,
|
|
5793
5815
|
placeholder: "Select other nationalities...",
|
|
@@ -5803,10 +5825,10 @@ const qe = {
|
|
|
5803
5825
|
{
|
|
5804
5826
|
...ae,
|
|
5805
5827
|
type: "date",
|
|
5806
|
-
label:
|
|
5807
|
-
value:
|
|
5828
|
+
label: _,
|
|
5829
|
+
value: w[i] || "",
|
|
5808
5830
|
onChange: (le) => se(i, le.target.value),
|
|
5809
|
-
error:
|
|
5831
|
+
error: z
|
|
5810
5832
|
},
|
|
5811
5833
|
y
|
|
5812
5834
|
);
|
|
@@ -5816,10 +5838,10 @@ const qe = {
|
|
|
5816
5838
|
{
|
|
5817
5839
|
...ae,
|
|
5818
5840
|
type: "email",
|
|
5819
|
-
label:
|
|
5820
|
-
value:
|
|
5841
|
+
label: _,
|
|
5842
|
+
value: w[i] || "",
|
|
5821
5843
|
onChange: (le) => se(i, le.target.value),
|
|
5822
|
-
error:
|
|
5844
|
+
error: z
|
|
5823
5845
|
},
|
|
5824
5846
|
y
|
|
5825
5847
|
);
|
|
@@ -5829,10 +5851,10 @@ const qe = {
|
|
|
5829
5851
|
{
|
|
5830
5852
|
...ae,
|
|
5831
5853
|
type: "tel",
|
|
5832
|
-
label:
|
|
5833
|
-
value:
|
|
5854
|
+
label: _,
|
|
5855
|
+
value: w[i] || "",
|
|
5834
5856
|
onChange: (le) => se(i, le.target.value),
|
|
5835
|
-
error:
|
|
5857
|
+
error: z
|
|
5836
5858
|
},
|
|
5837
5859
|
y
|
|
5838
5860
|
);
|
|
@@ -5842,17 +5864,17 @@ const qe = {
|
|
|
5842
5864
|
{
|
|
5843
5865
|
...ae,
|
|
5844
5866
|
type: "text",
|
|
5845
|
-
label:
|
|
5846
|
-
value:
|
|
5867
|
+
label: _,
|
|
5868
|
+
value: w[i] || "",
|
|
5847
5869
|
onChange: (le) => se(i, le.target.value),
|
|
5848
|
-
error:
|
|
5870
|
+
error: z
|
|
5849
5871
|
},
|
|
5850
5872
|
y
|
|
5851
5873
|
);
|
|
5852
5874
|
}
|
|
5853
5875
|
}, et = (i, g) => {
|
|
5854
5876
|
if (i.customType === "paragraph") {
|
|
5855
|
-
const
|
|
5877
|
+
const p = i.displayText || i.label || "";
|
|
5856
5878
|
return /* @__PURE__ */ r(
|
|
5857
5879
|
"p",
|
|
5858
5880
|
{
|
|
@@ -5863,7 +5885,7 @@ const qe = {
|
|
|
5863
5885
|
margin: 0,
|
|
5864
5886
|
color: "var(--metakyc-text-secondary, #6b7280)"
|
|
5865
5887
|
},
|
|
5866
|
-
dangerouslySetInnerHTML: { __html:
|
|
5888
|
+
dangerouslySetInnerHTML: { __html: p }
|
|
5867
5889
|
},
|
|
5868
5890
|
`custom-${g}`
|
|
5869
5891
|
);
|
|
@@ -5879,7 +5901,7 @@ const qe = {
|
|
|
5879
5901
|
if (i.customType === "br")
|
|
5880
5902
|
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${g}`);
|
|
5881
5903
|
if (i.customType === "link") {
|
|
5882
|
-
const
|
|
5904
|
+
const p = i.displayText || i.label || i.linkText || i.linkUrl || "";
|
|
5883
5905
|
return /* @__PURE__ */ r("div", { className: "metakyc-link-field", children: /* @__PURE__ */ o(
|
|
5884
5906
|
"a",
|
|
5885
5907
|
{
|
|
@@ -5896,14 +5918,14 @@ const qe = {
|
|
|
5896
5918
|
cursor: "pointer"
|
|
5897
5919
|
},
|
|
5898
5920
|
children: [
|
|
5899
|
-
|
|
5921
|
+
p,
|
|
5900
5922
|
/* @__PURE__ */ r("span", { style: { fontSize: "10px", opacity: 0.7 }, children: "↗" })
|
|
5901
5923
|
]
|
|
5902
5924
|
}
|
|
5903
5925
|
) }, `custom-${g}`);
|
|
5904
5926
|
}
|
|
5905
5927
|
if (!i.paramName) return null;
|
|
5906
|
-
const b =
|
|
5928
|
+
const b = O[i.paramName], d = i.displayText || i.label || i.paramName;
|
|
5907
5929
|
if (i.customType === "checkbox")
|
|
5908
5930
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
5909
5931
|
/* @__PURE__ */ o(
|
|
@@ -5916,8 +5938,8 @@ const qe = {
|
|
|
5916
5938
|
"input",
|
|
5917
5939
|
{
|
|
5918
5940
|
type: "checkbox",
|
|
5919
|
-
checked:
|
|
5920
|
-
onChange: (
|
|
5941
|
+
checked: W[i.paramName] === "true",
|
|
5942
|
+
onChange: (p) => M(i.paramName, p.target.checked ? "true" : "false"),
|
|
5921
5943
|
className: "metakyc-option-input",
|
|
5922
5944
|
style: qe
|
|
5923
5945
|
}
|
|
@@ -5950,8 +5972,8 @@ const qe = {
|
|
|
5950
5972
|
"input",
|
|
5951
5973
|
{
|
|
5952
5974
|
type: "checkbox",
|
|
5953
|
-
checked:
|
|
5954
|
-
onChange: (
|
|
5975
|
+
checked: W[i.paramName] === "true",
|
|
5976
|
+
onChange: (p) => M(i.paramName, p.target.checked ? "true" : "false"),
|
|
5955
5977
|
className: "metakyc-option-input",
|
|
5956
5978
|
style: { ...qe, alignSelf: "flex-start", marginTop: "2px" }
|
|
5957
5979
|
}
|
|
@@ -5972,7 +5994,7 @@ const qe = {
|
|
|
5972
5994
|
rel: "noopener noreferrer",
|
|
5973
5995
|
className: "underline",
|
|
5974
5996
|
style: { color: "var(--metakyc-primary, #2563eb)" },
|
|
5975
|
-
onClick: (
|
|
5997
|
+
onClick: (p) => p.stopPropagation(),
|
|
5976
5998
|
children: i.linkText || i.linkUrl
|
|
5977
5999
|
}
|
|
5978
6000
|
),
|
|
@@ -5986,7 +6008,7 @@ const qe = {
|
|
|
5986
6008
|
b && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: b })
|
|
5987
6009
|
] }, `custom-${g}`);
|
|
5988
6010
|
if (i.customType === "group_checkbox") {
|
|
5989
|
-
const
|
|
6011
|
+
const p = (W[i.paramName] || "").split(",").filter(Boolean);
|
|
5990
6012
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
5991
6013
|
/* @__PURE__ */ o(
|
|
5992
6014
|
"div",
|
|
@@ -5999,8 +6021,8 @@ const qe = {
|
|
|
5999
6021
|
]
|
|
6000
6022
|
}
|
|
6001
6023
|
),
|
|
6002
|
-
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (i.options || []).map((
|
|
6003
|
-
const
|
|
6024
|
+
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (i.options || []).map((A) => {
|
|
6025
|
+
const z = i.singleSelect ? W[i.paramName] === A.value : p.includes(A.value);
|
|
6004
6026
|
return /* @__PURE__ */ o(
|
|
6005
6027
|
"label",
|
|
6006
6028
|
{
|
|
@@ -6011,12 +6033,12 @@ const qe = {
|
|
|
6011
6033
|
"input",
|
|
6012
6034
|
{
|
|
6013
6035
|
type: "checkbox",
|
|
6014
|
-
checked:
|
|
6015
|
-
onChange: (
|
|
6036
|
+
checked: z,
|
|
6037
|
+
onChange: (_) => {
|
|
6016
6038
|
if (i.singleSelect)
|
|
6017
|
-
M(i.paramName,
|
|
6039
|
+
M(i.paramName, _.target.checked ? A.value : "");
|
|
6018
6040
|
else {
|
|
6019
|
-
const y =
|
|
6041
|
+
const y = _.target.checked ? [...p, A.value] : p.filter((ae) => ae !== A.value);
|
|
6020
6042
|
M(i.paramName, y.join(","));
|
|
6021
6043
|
}
|
|
6022
6044
|
},
|
|
@@ -6029,12 +6051,12 @@ const qe = {
|
|
|
6029
6051
|
{
|
|
6030
6052
|
className: "metakyc-option-text",
|
|
6031
6053
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
6032
|
-
children:
|
|
6054
|
+
children: A.label
|
|
6033
6055
|
}
|
|
6034
6056
|
)
|
|
6035
6057
|
]
|
|
6036
6058
|
},
|
|
6037
|
-
|
|
6059
|
+
A.value
|
|
6038
6060
|
);
|
|
6039
6061
|
}) }),
|
|
6040
6062
|
b && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: b })
|
|
@@ -6052,7 +6074,7 @@ const qe = {
|
|
|
6052
6074
|
]
|
|
6053
6075
|
}
|
|
6054
6076
|
),
|
|
6055
|
-
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (i.options || []).map((
|
|
6077
|
+
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (i.options || []).map((p) => /* @__PURE__ */ o(
|
|
6056
6078
|
"label",
|
|
6057
6079
|
{
|
|
6058
6080
|
className: "metakyc-option-label",
|
|
@@ -6062,8 +6084,8 @@ const qe = {
|
|
|
6062
6084
|
"input",
|
|
6063
6085
|
{
|
|
6064
6086
|
type: "radio",
|
|
6065
|
-
checked:
|
|
6066
|
-
onChange: () => M(i.paramName,
|
|
6087
|
+
checked: W[i.paramName] === p.value,
|
|
6088
|
+
onChange: () => M(i.paramName, p.value),
|
|
6067
6089
|
name: `radio-group-${i.paramName}-${g}`,
|
|
6068
6090
|
className: "metakyc-option-input",
|
|
6069
6091
|
style: qe
|
|
@@ -6074,12 +6096,12 @@ const qe = {
|
|
|
6074
6096
|
{
|
|
6075
6097
|
className: "metakyc-option-text",
|
|
6076
6098
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
6077
|
-
children:
|
|
6099
|
+
children: p.label
|
|
6078
6100
|
}
|
|
6079
6101
|
)
|
|
6080
6102
|
]
|
|
6081
6103
|
},
|
|
6082
|
-
|
|
6104
|
+
p.value
|
|
6083
6105
|
)) }),
|
|
6084
6106
|
b && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: b })
|
|
6085
6107
|
] }, `custom-${g}`) : /* @__PURE__ */ r(
|
|
@@ -6087,8 +6109,8 @@ const qe = {
|
|
|
6087
6109
|
{
|
|
6088
6110
|
type: "text",
|
|
6089
6111
|
label: `${d}${i.required ? " *" : ""}`,
|
|
6090
|
-
value:
|
|
6091
|
-
onChange: (
|
|
6112
|
+
value: W[i.paramName] || "",
|
|
6113
|
+
onChange: (p) => M(i.paramName, p.target.value),
|
|
6092
6114
|
required: i.required,
|
|
6093
6115
|
error: b
|
|
6094
6116
|
},
|
|
@@ -6124,9 +6146,9 @@ const qe = {
|
|
|
6124
6146
|
]
|
|
6125
6147
|
}
|
|
6126
6148
|
) }),
|
|
6127
|
-
b && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: i.fields.map((d,
|
|
6128
|
-
const
|
|
6129
|
-
return /* @__PURE__ */ r("div", { className:
|
|
6149
|
+
b && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: i.fields.map((d, p) => {
|
|
6150
|
+
const A = d.colSpan === 1 ? "col-span-1" : d.colSpan === 2 ? "col-span-2" : d.colSpan === 3 ? "col-span-3" : "col-span-4", z = d.isCustom ? `custom-${p}-${d.paramName}` : `builtin-${d.name}-${p}`;
|
|
6151
|
+
return /* @__PURE__ */ r("div", { className: A, children: /* @__PURE__ */ r(pt, { helpText: d.helpText, children: d.isCustom ? et(d, p) : be(d.name, z, d.displayText, d.countriesType) }) }, z);
|
|
6130
6152
|
}) })
|
|
6131
6153
|
] });
|
|
6132
6154
|
};
|
|
@@ -6136,7 +6158,7 @@ const qe = {
|
|
|
6136
6158
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
6137
6159
|
] }) }) });
|
|
6138
6160
|
if (f) {
|
|
6139
|
-
const i = f[
|
|
6161
|
+
const i = f[B] ?? f[0], g = Ae === -1, b = ie === -1, d = f.length, p = Z(i), A = Object.values(O);
|
|
6140
6162
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(j, { children: [
|
|
6141
6163
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r(at, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
6142
6164
|
/* @__PURE__ */ o(K, { children: [
|
|
@@ -6166,25 +6188,25 @@ const qe = {
|
|
|
6166
6188
|
}
|
|
6167
6189
|
)
|
|
6168
6190
|
] }),
|
|
6169
|
-
(
|
|
6170
|
-
|
|
6191
|
+
(C || A.length > 0) && /* @__PURE__ */ o("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
|
|
6192
|
+
C && /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
6171
6193
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
6172
6194
|
" ",
|
|
6173
|
-
|
|
6195
|
+
C
|
|
6174
6196
|
] }),
|
|
6175
|
-
|
|
6197
|
+
A.map((z, _) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: z }, _))
|
|
6176
6198
|
] }),
|
|
6177
6199
|
d > 1 && /* @__PURE__ */ o("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
6178
|
-
f.map((
|
|
6200
|
+
f.map((z, _) => /* @__PURE__ */ r(
|
|
6179
6201
|
"div",
|
|
6180
6202
|
{
|
|
6181
|
-
className: `h-1.5 rounded-full transition-all ${
|
|
6182
|
-
style:
|
|
6203
|
+
className: `h-1.5 rounded-full transition-all ${_ === B ? "flex-1" : "w-8"}`,
|
|
6204
|
+
style: _ === B ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : _ < B ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
|
|
6183
6205
|
},
|
|
6184
|
-
|
|
6206
|
+
_
|
|
6185
6207
|
)),
|
|
6186
6208
|
/* @__PURE__ */ o("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
|
|
6187
|
-
|
|
6209
|
+
B + 1,
|
|
6188
6210
|
" / ",
|
|
6189
6211
|
d
|
|
6190
6212
|
] })
|
|
@@ -6194,26 +6216,26 @@ const qe = {
|
|
|
6194
6216
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
6195
6217
|
/* @__PURE__ */ o("div", { children: [
|
|
6196
6218
|
!g && /* @__PURE__ */ r(
|
|
6197
|
-
|
|
6219
|
+
Q,
|
|
6198
6220
|
{
|
|
6199
6221
|
type: "button",
|
|
6200
6222
|
variant: "outline",
|
|
6201
6223
|
onClick: () => {
|
|
6202
|
-
|
|
6224
|
+
T(Ae), G({});
|
|
6203
6225
|
},
|
|
6204
6226
|
disabled: te || h,
|
|
6205
6227
|
children: "Previous"
|
|
6206
6228
|
}
|
|
6207
6229
|
),
|
|
6208
|
-
g && a && /* @__PURE__ */ r(
|
|
6230
|
+
g && a && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: a, disabled: te || h, children: "Cancel" })
|
|
6209
6231
|
] }),
|
|
6210
6232
|
/* @__PURE__ */ r(
|
|
6211
|
-
|
|
6233
|
+
Q,
|
|
6212
6234
|
{
|
|
6213
6235
|
type: "button",
|
|
6214
6236
|
isLoading: te || h,
|
|
6215
6237
|
onClick: b ? Oe : pe,
|
|
6216
|
-
children: b ? i.conditionalOn && !
|
|
6238
|
+
children: b ? i.conditionalOn && !p ? "Skip & Submit" : "Submit" : i.conditionalOn && !p ? "Skip" : "Next"
|
|
6217
6239
|
}
|
|
6218
6240
|
)
|
|
6219
6241
|
] })
|
|
@@ -6222,19 +6244,19 @@ const qe = {
|
|
|
6222
6244
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: Xe, children: /* @__PURE__ */ o(j, { children: [
|
|
6223
6245
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r(at, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
6224
6246
|
/* @__PURE__ */ o(K, { children: [
|
|
6225
|
-
|
|
6247
|
+
C && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
6226
6248
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
6227
6249
|
" ",
|
|
6228
|
-
|
|
6250
|
+
C
|
|
6229
6251
|
] }) }),
|
|
6230
6252
|
/* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: x.map((i) => /* @__PURE__ */ r("div", { className: "col-span-4", children: be(i) }, i)) })
|
|
6231
6253
|
] }),
|
|
6232
6254
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
6233
|
-
a && /* @__PURE__ */ r(
|
|
6234
|
-
/* @__PURE__ */ r(
|
|
6255
|
+
a && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: a, disabled: te || h, children: "Cancel" }),
|
|
6256
|
+
/* @__PURE__ */ r(Q, { type: "submit", isLoading: te || h, children: "Create Applicant" })
|
|
6235
6257
|
] })
|
|
6236
6258
|
] }) }) });
|
|
6237
|
-
},
|
|
6259
|
+
}, bn = ({
|
|
6238
6260
|
applicantId: e,
|
|
6239
6261
|
onComplete: t,
|
|
6240
6262
|
onError: n,
|
|
@@ -6246,22 +6268,22 @@ const qe = {
|
|
|
6246
6268
|
currentStep: c,
|
|
6247
6269
|
steps: u,
|
|
6248
6270
|
workflowKey: h,
|
|
6249
|
-
nextWorkflowKey:
|
|
6271
|
+
nextWorkflowKey: m,
|
|
6250
6272
|
hasWorkflowChanged: v,
|
|
6251
|
-
isLoading:
|
|
6273
|
+
isLoading: S,
|
|
6252
6274
|
error: f,
|
|
6253
|
-
moveBack:
|
|
6275
|
+
moveBack: N,
|
|
6254
6276
|
refreshProgress: x
|
|
6255
|
-
} = xr(e), [D,
|
|
6256
|
-
if (
|
|
6277
|
+
} = xr(e), [D, F] = xe.useState(!1);
|
|
6278
|
+
if (xe.useEffect(() => {
|
|
6257
6279
|
f && n && n(f);
|
|
6258
|
-
}, [f, n]),
|
|
6280
|
+
}, [f, n]), xe.useEffect(() => {
|
|
6259
6281
|
l != null && l.workflowResult && t && t(l.workflowResult);
|
|
6260
|
-
}, [l == null ? void 0 : l.workflowResult, t]),
|
|
6282
|
+
}, [l == null ? void 0 : l.workflowResult, t]), xe.useEffect(() => {
|
|
6261
6283
|
a === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
6262
|
-
}, [a]),
|
|
6263
|
-
v &&
|
|
6264
|
-
}, [v]),
|
|
6284
|
+
}, [a]), xe.useEffect(() => {
|
|
6285
|
+
v && F(!1);
|
|
6286
|
+
}, [v]), S || !l)
|
|
6265
6287
|
return /* @__PURE__ */ r("div", { className: s, children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ o(K, { children: [
|
|
6266
6288
|
/* @__PURE__ */ r(we, { className: "my-8" }),
|
|
6267
6289
|
/* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading workflow..." })
|
|
@@ -6285,7 +6307,7 @@ const qe = {
|
|
|
6285
6307
|
/* @__PURE__ */ r("svg", { className: "w-6 h-6 text-gray-400 mx-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 7l5 5m0 0l-5 5m5-5H6" }) }),
|
|
6286
6308
|
/* @__PURE__ */ o("div", { className: "text-right", children: [
|
|
6287
6309
|
/* @__PURE__ */ r("p", { className: "text-gray-500 dark:text-gray-400 mb-1", children: "New Workflow" }),
|
|
6288
|
-
/* @__PURE__ */ r("p", { className: "font-medium text-blue-600 dark:text-blue-400", children:
|
|
6310
|
+
/* @__PURE__ */ r("p", { className: "font-medium text-blue-600 dark:text-blue-400", children: m })
|
|
6289
6311
|
] })
|
|
6290
6312
|
] }),
|
|
6291
6313
|
l.nextWorkflowName && /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-2 text-xs", children: l.nextWorkflowName })
|
|
@@ -6293,7 +6315,7 @@ const qe = {
|
|
|
6293
6315
|
/* @__PURE__ */ r(
|
|
6294
6316
|
"button",
|
|
6295
6317
|
{
|
|
6296
|
-
onClick: () =>
|
|
6318
|
+
onClick: () => F(!0),
|
|
6297
6319
|
className: "px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-colors",
|
|
6298
6320
|
children: "Continue with New Workflow"
|
|
6299
6321
|
}
|
|
@@ -6318,97 +6340,97 @@ const qe = {
|
|
|
6318
6340
|
/* @__PURE__ */ r(we, { className: "my-8" }),
|
|
6319
6341
|
/* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: l.status === ke.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
|
|
6320
6342
|
] }) }) });
|
|
6321
|
-
const
|
|
6322
|
-
switch (
|
|
6323
|
-
case
|
|
6343
|
+
const R = (L) => {
|
|
6344
|
+
switch (L) {
|
|
6345
|
+
case J.Overview:
|
|
6324
6346
|
return "Overview";
|
|
6325
|
-
case
|
|
6347
|
+
case J.Questionaries:
|
|
6326
6348
|
return "Questionnaire";
|
|
6327
|
-
case
|
|
6349
|
+
case J.UploadDocument:
|
|
6328
6350
|
return "Documents";
|
|
6329
|
-
case
|
|
6351
|
+
case J.IdentitySdk:
|
|
6330
6352
|
return "Identity";
|
|
6331
|
-
case
|
|
6353
|
+
case J.RiskScoring:
|
|
6332
6354
|
return "Risk Assessment";
|
|
6333
|
-
case
|
|
6355
|
+
case J.InvestorCategorization:
|
|
6334
6356
|
return "Investor Categorization";
|
|
6335
|
-
case
|
|
6357
|
+
case J.AppropriatenessTest:
|
|
6336
6358
|
return "Appropriateness Test";
|
|
6337
|
-
case
|
|
6359
|
+
case J.AdditionalData:
|
|
6338
6360
|
return "Additional Data";
|
|
6339
|
-
case
|
|
6361
|
+
case J.ManualReview:
|
|
6340
6362
|
return "Review";
|
|
6341
6363
|
default:
|
|
6342
6364
|
return "";
|
|
6343
6365
|
}
|
|
6344
|
-
},
|
|
6345
|
-
const
|
|
6366
|
+
}, $ = () => {
|
|
6367
|
+
const L = u.filter((w) => w.visibility !== !1), Y = L.findIndex((w) => w.order === c.order), X = Y >= 0 ? Y + 1 : 1, P = L.length;
|
|
6346
6368
|
return /* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
6347
6369
|
/* @__PURE__ */ o("div", { className: "flex items-start justify-between mb-4", children: [
|
|
6348
6370
|
/* @__PURE__ */ r(at, {}),
|
|
6349
|
-
/* @__PURE__ */ o(
|
|
6371
|
+
/* @__PURE__ */ o(Ie, { variant: l.status === 1 ? "info" : "success", children: [
|
|
6350
6372
|
"Step ",
|
|
6351
6373
|
X,
|
|
6352
6374
|
" of ",
|
|
6353
|
-
|
|
6375
|
+
P
|
|
6354
6376
|
] })
|
|
6355
6377
|
] }),
|
|
6356
|
-
/* @__PURE__ */ r("div", { className: "flex items-center", children:
|
|
6357
|
-
const
|
|
6358
|
-
return /* @__PURE__ */ o(
|
|
6378
|
+
/* @__PURE__ */ r("div", { className: "flex items-center", children: L.map((w, H) => {
|
|
6379
|
+
const W = H < Y, I = w.order === c.order;
|
|
6380
|
+
return /* @__PURE__ */ o(xe.Fragment, { children: [
|
|
6359
6381
|
/* @__PURE__ */ o("div", { className: "flex items-center", children: [
|
|
6360
6382
|
/* @__PURE__ */ r(
|
|
6361
6383
|
"div",
|
|
6362
6384
|
{
|
|
6363
6385
|
className: `
|
|
6364
6386
|
w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium
|
|
6365
|
-
${
|
|
6387
|
+
${W || I ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
|
|
6366
6388
|
`,
|
|
6367
|
-
children:
|
|
6389
|
+
children: H + 1
|
|
6368
6390
|
}
|
|
6369
6391
|
),
|
|
6370
6392
|
/* @__PURE__ */ r(
|
|
6371
6393
|
"span",
|
|
6372
6394
|
{
|
|
6373
|
-
className: `ml-2 text-sm ${
|
|
6374
|
-
children:
|
|
6395
|
+
className: `ml-2 text-sm ${I ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
|
|
6396
|
+
children: w.displayName || w.name || R(w.action) || `Step ${H + 1}`
|
|
6375
6397
|
}
|
|
6376
6398
|
)
|
|
6377
6399
|
] }),
|
|
6378
|
-
|
|
6400
|
+
H < L.length - 1 && /* @__PURE__ */ r(
|
|
6379
6401
|
"div",
|
|
6380
6402
|
{
|
|
6381
|
-
className: `flex-1 h-0.5 mx-4 ${
|
|
6403
|
+
className: `flex-1 h-0.5 mx-4 ${W ? "bg-primary-500" : "bg-gray-200 dark:bg-gray-700"}`
|
|
6382
6404
|
}
|
|
6383
6405
|
)
|
|
6384
|
-
] },
|
|
6406
|
+
] }, w.order);
|
|
6385
6407
|
}) })
|
|
6386
6408
|
] });
|
|
6387
6409
|
}, E = () => {
|
|
6388
|
-
const
|
|
6410
|
+
const L = {
|
|
6389
6411
|
applicantId: e,
|
|
6390
6412
|
onComplete: async () => {
|
|
6391
6413
|
await x();
|
|
6392
6414
|
},
|
|
6393
|
-
onBack: c.order > 0 ?
|
|
6415
|
+
onBack: c.order > 0 ? N : void 0
|
|
6394
6416
|
};
|
|
6395
6417
|
switch (c.action) {
|
|
6396
|
-
case
|
|
6397
|
-
return /* @__PURE__ */ r($r, { ...
|
|
6398
|
-
case
|
|
6399
|
-
return /* @__PURE__ */ r(Br, { ...
|
|
6400
|
-
case
|
|
6401
|
-
return /* @__PURE__ */ r(_r, { ...
|
|
6402
|
-
case
|
|
6403
|
-
return /* @__PURE__ */ r(
|
|
6404
|
-
case
|
|
6405
|
-
return /* @__PURE__ */ r(
|
|
6406
|
-
case
|
|
6407
|
-
case
|
|
6408
|
-
return /* @__PURE__ */ r(
|
|
6409
|
-
case
|
|
6410
|
-
return /* @__PURE__ */ r(
|
|
6411
|
-
case
|
|
6418
|
+
case J.Questionaries:
|
|
6419
|
+
return /* @__PURE__ */ r($r, { ...L });
|
|
6420
|
+
case J.UploadDocument:
|
|
6421
|
+
return /* @__PURE__ */ r(Br, { ...L });
|
|
6422
|
+
case J.Overview:
|
|
6423
|
+
return /* @__PURE__ */ r(_r, { ...L });
|
|
6424
|
+
case J.IdentitySdk:
|
|
6425
|
+
return /* @__PURE__ */ r(Jr, { ...L });
|
|
6426
|
+
case J.RiskScoring:
|
|
6427
|
+
return /* @__PURE__ */ r(qr, { ...L });
|
|
6428
|
+
case J.AdditionalData:
|
|
6429
|
+
case J.InvestorCategorization:
|
|
6430
|
+
return /* @__PURE__ */ r(Gr, { ...L });
|
|
6431
|
+
case J.AppropriatenessTest:
|
|
6432
|
+
return /* @__PURE__ */ r(Vr, { ...L });
|
|
6433
|
+
case J.ManualReview:
|
|
6412
6434
|
return /* @__PURE__ */ r(
|
|
6413
6435
|
mt,
|
|
6414
6436
|
{
|
|
@@ -6427,23 +6449,23 @@ const qe = {
|
|
|
6427
6449
|
] }),
|
|
6428
6450
|
/* @__PURE__ */ o("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
|
|
6429
6451
|
"Action type: ",
|
|
6430
|
-
|
|
6452
|
+
J[c.action]
|
|
6431
6453
|
] })
|
|
6432
6454
|
] }) });
|
|
6433
6455
|
}
|
|
6434
6456
|
};
|
|
6435
6457
|
return /* @__PURE__ */ o("div", { className: `metakyc-sdk ${s || ""}`, children: [
|
|
6436
|
-
|
|
6458
|
+
$(),
|
|
6437
6459
|
E()
|
|
6438
6460
|
] });
|
|
6439
6461
|
};
|
|
6440
|
-
function
|
|
6441
|
-
return
|
|
6442
|
-
questionResults:
|
|
6462
|
+
function vn(e) {
|
|
6463
|
+
return Ce.object({
|
|
6464
|
+
questionResults: Ce.any()
|
|
6443
6465
|
}).passthrough();
|
|
6444
6466
|
}
|
|
6445
|
-
function
|
|
6446
|
-
let t =
|
|
6467
|
+
function Xr(e) {
|
|
6468
|
+
let t = Ce.array(Ce.instanceof(File));
|
|
6447
6469
|
if (e.isRequired ? t = t.min(
|
|
6448
6470
|
1,
|
|
6449
6471
|
`${e.displayName} is required`
|
|
@@ -6464,27 +6486,27 @@ function Vr(e) {
|
|
|
6464
6486
|
}
|
|
6465
6487
|
return t;
|
|
6466
6488
|
}
|
|
6467
|
-
function
|
|
6489
|
+
function kn(e) {
|
|
6468
6490
|
const t = {};
|
|
6469
6491
|
return e.uploadDocumentFiles.forEach((n) => {
|
|
6470
6492
|
const a = `file_${n.id}`;
|
|
6471
|
-
t[a] =
|
|
6472
|
-
}),
|
|
6493
|
+
t[a] = Xr(n);
|
|
6494
|
+
}), Ce.object(t);
|
|
6473
6495
|
}
|
|
6474
|
-
function
|
|
6475
|
-
return
|
|
6496
|
+
function wn(e) {
|
|
6497
|
+
return Ce.any();
|
|
6476
6498
|
}
|
|
6477
|
-
function
|
|
6478
|
-
return
|
|
6499
|
+
function en(e) {
|
|
6500
|
+
return Ce.string().min(1, "This question is required");
|
|
6479
6501
|
}
|
|
6480
|
-
function
|
|
6502
|
+
function Nn(e) {
|
|
6481
6503
|
const t = {};
|
|
6482
6504
|
return e.appropriatenessQuestions.forEach((n) => {
|
|
6483
6505
|
const a = `question_${n.id}`;
|
|
6484
|
-
t[a] =
|
|
6485
|
-
}),
|
|
6506
|
+
t[a] = en();
|
|
6507
|
+
}), Ce.object(t);
|
|
6486
6508
|
}
|
|
6487
|
-
const
|
|
6509
|
+
const Sn = Ce.any();
|
|
6488
6510
|
export {
|
|
6489
6511
|
lt as ALLOWED_LANGUAGES,
|
|
6490
6512
|
It as ApplicantProgressOnHoldReason,
|
|
@@ -6493,24 +6515,24 @@ export {
|
|
|
6493
6515
|
Rt as ApplicantStatus,
|
|
6494
6516
|
Dt as AppropriatenessQuestionType,
|
|
6495
6517
|
Wt as AppropriatenessTestService,
|
|
6496
|
-
|
|
6497
|
-
|
|
6518
|
+
Vr as AppropriatenessTestStep,
|
|
6519
|
+
Ie as Badge,
|
|
6498
6520
|
Gt as BaseInformationService,
|
|
6499
|
-
|
|
6521
|
+
Q as Button,
|
|
6500
6522
|
j as Card,
|
|
6501
6523
|
K as CardContent,
|
|
6502
6524
|
me as CardFooter,
|
|
6503
6525
|
ue as CardHeader,
|
|
6504
6526
|
$e as CountriesType,
|
|
6505
|
-
|
|
6527
|
+
xn as CreateApplicantForm,
|
|
6506
6528
|
Ot as CriteriaBuiltInType,
|
|
6507
6529
|
zt as DEFAULT_VISIBLE_FIELDS,
|
|
6508
|
-
|
|
6530
|
+
Tt as DocumentReviewStatus,
|
|
6509
6531
|
_t as EndpointBuilder,
|
|
6510
6532
|
Ke as ErrorHandler,
|
|
6511
6533
|
ar as EventEmitter,
|
|
6512
6534
|
Me as FIELD_METADATA,
|
|
6513
|
-
|
|
6535
|
+
Lt as FileType,
|
|
6514
6536
|
Ar as FileUpload,
|
|
6515
6537
|
Ze as GenderType,
|
|
6516
6538
|
at as Header,
|
|
@@ -6518,20 +6540,20 @@ export {
|
|
|
6518
6540
|
ze as IdentityProviderManager,
|
|
6519
6541
|
Qt as IdentityService,
|
|
6520
6542
|
ve as IdentityVerificationProvider,
|
|
6521
|
-
|
|
6543
|
+
Jr as IdentityVerificationStep,
|
|
6522
6544
|
de as Input,
|
|
6523
6545
|
Vt as InvestorCategorizationService,
|
|
6524
|
-
|
|
6525
|
-
|
|
6546
|
+
Gr as InvestorCategorizationStep,
|
|
6547
|
+
fe as InvestorCategorizationType,
|
|
6526
6548
|
$t as InvestorCategoryType,
|
|
6527
6549
|
Pt as KycProcessStatus,
|
|
6528
|
-
|
|
6550
|
+
Te as KycStatus,
|
|
6529
6551
|
mt as KycStatusDisplay,
|
|
6530
|
-
|
|
6531
|
-
|
|
6552
|
+
bn as KycWorkflow,
|
|
6553
|
+
Zr as Logo,
|
|
6532
6554
|
gt as MetaKYCContext,
|
|
6533
6555
|
Ne as MetaKYCError,
|
|
6534
|
-
|
|
6556
|
+
un as MetaKYCProvider,
|
|
6535
6557
|
Cr as MultiSelect,
|
|
6536
6558
|
cr as OnfidoProvider,
|
|
6537
6559
|
Yt as OverviewService,
|
|
@@ -6543,7 +6565,7 @@ export {
|
|
|
6543
6565
|
Mt as RiskCriteriaType,
|
|
6544
6566
|
Et as RiskLevel,
|
|
6545
6567
|
qt as RiskScoringService,
|
|
6546
|
-
|
|
6568
|
+
qr as RiskScoringStep,
|
|
6547
6569
|
dr as SardinAIProvider,
|
|
6548
6570
|
Re as SearchableSelect,
|
|
6549
6571
|
st as Select,
|
|
@@ -6556,13 +6578,13 @@ export {
|
|
|
6556
6578
|
Kt as UploadDocumentService,
|
|
6557
6579
|
Br as UploadDocumentStep,
|
|
6558
6580
|
Ft as UserType,
|
|
6559
|
-
|
|
6581
|
+
Se as ValueDataType,
|
|
6560
6582
|
or as WorkflowOrchestrator,
|
|
6561
6583
|
Je as WorkflowResultType,
|
|
6562
6584
|
ir as WorkflowState,
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6585
|
+
J as WorkflowStepAction,
|
|
6586
|
+
Sn as appropriatenessTestSchema,
|
|
6587
|
+
yn as clearAllStorage,
|
|
6566
6588
|
gr as clearApplicantId,
|
|
6567
6589
|
fr as clearWorkflowState,
|
|
6568
6590
|
oe as cn,
|
|
@@ -6572,33 +6594,33 @@ export {
|
|
|
6572
6594
|
mr as fileToBase64,
|
|
6573
6595
|
Zt as fintechTheme,
|
|
6574
6596
|
rt as formatFileSize,
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6597
|
+
Nn as generateAppropriatenessSchema,
|
|
6598
|
+
vn as generateQuestionnaireSchema,
|
|
6599
|
+
wn as generateRiskScoringSchema,
|
|
6600
|
+
kn as generateUploadDocumentSchema,
|
|
6601
|
+
hn as getAcceptString,
|
|
6580
6602
|
hr as getApplicantId,
|
|
6581
6603
|
We as getThemePreset,
|
|
6582
|
-
|
|
6604
|
+
gn as getWorkflowState,
|
|
6583
6605
|
Xt as healthcareTheme,
|
|
6584
|
-
|
|
6606
|
+
cn as isScriptLoaded,
|
|
6585
6607
|
ht as loadScript,
|
|
6586
6608
|
tr as minimalTheme,
|
|
6587
6609
|
er as modernTheme,
|
|
6588
|
-
|
|
6610
|
+
dn as removeScript,
|
|
6589
6611
|
pr as saveApplicantId,
|
|
6590
6612
|
yr as saveWorkflowState,
|
|
6591
6613
|
rr as themePresets,
|
|
6592
6614
|
Sr as useApplicant,
|
|
6593
|
-
|
|
6615
|
+
fn as useAppropriatenessTest,
|
|
6594
6616
|
wr as useIdentityVerification,
|
|
6595
6617
|
xr as useKycWorkflow,
|
|
6596
|
-
|
|
6618
|
+
ge as useMetaKYC,
|
|
6597
6619
|
kr as useOverview,
|
|
6598
6620
|
br as useQuestionnaire,
|
|
6599
6621
|
Nr as useRiskScoring,
|
|
6600
6622
|
vr as useUploadDocument,
|
|
6601
|
-
|
|
6602
|
-
|
|
6623
|
+
mn as validateFileSize,
|
|
6624
|
+
pn as validateFileType
|
|
6603
6625
|
};
|
|
6604
6626
|
//# sourceMappingURL=index.js.map
|