@vpdev2/metakyc-sdk 1.0.64 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CreateApplicantForm.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +230 -227
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var vt = Object.defineProperty;
|
|
2
2
|
var kt = (e, t, n) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var ne = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import wt from "axios";
|
|
5
5
|
import * as nt from "react";
|
|
6
|
-
import ge, { createContext as Nt, useState as v, useMemo as Ee, useEffect as
|
|
6
|
+
import ge, { createContext as Nt, useState as v, useMemo as Ee, useEffect as ae, useContext as St, useRef as ee, useCallback as Q, forwardRef as Ue, createElement as Qe } from "react";
|
|
7
7
|
import { jsx as r, jsxs as s, Fragment as dt } from "react/jsx-runtime";
|
|
8
8
|
import { createPortal as Ve } from "react-dom";
|
|
9
9
|
import { useForm as Ct, Controller as Pe } from "react-hook-form";
|
|
@@ -115,7 +115,7 @@ class Bt {
|
|
|
115
115
|
class Ne extends Error {
|
|
116
116
|
constructor(n, a, i, o, l) {
|
|
117
117
|
super(n);
|
|
118
|
-
|
|
118
|
+
ne(this, "response");
|
|
119
119
|
this.code = a, this.details = i, this.validationErrors = o, this.name = "MetaKYCError", this.response = l, Object.setPrototypeOf(this, Ne.prototype);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
@@ -171,9 +171,9 @@ class ze {
|
|
|
171
171
|
}
|
|
172
172
|
class _t {
|
|
173
173
|
constructor(t) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
ne(this, "axiosInstance");
|
|
175
|
+
ne(this, "endpointBuilder");
|
|
176
|
+
ne(this, "config");
|
|
177
177
|
this.config = { ...$t, ...t }, this.endpointBuilder = new Bt(this.config.endpoints), this.axiosInstance = wt.create({
|
|
178
178
|
baseURL: this.config.baseUrl,
|
|
179
179
|
timeout: this.config.timeout,
|
|
@@ -960,7 +960,7 @@ class rr {
|
|
|
960
960
|
}
|
|
961
961
|
class nr {
|
|
962
962
|
constructor() {
|
|
963
|
-
|
|
963
|
+
ne(this, "listeners", /* @__PURE__ */ new Map());
|
|
964
964
|
}
|
|
965
965
|
/**
|
|
966
966
|
* Subscribe to an event
|
|
@@ -1005,10 +1005,10 @@ class nr {
|
|
|
1005
1005
|
}
|
|
1006
1006
|
class ar {
|
|
1007
1007
|
constructor() {
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1008
|
+
ne(this, "events", new nr());
|
|
1009
|
+
ne(this, "_applicantId", null);
|
|
1010
|
+
ne(this, "_progress", null);
|
|
1011
|
+
ne(this, "_error", null);
|
|
1012
1012
|
}
|
|
1013
1013
|
/**
|
|
1014
1014
|
* Get current applicant ID
|
|
@@ -1145,7 +1145,7 @@ class ar {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
class ir {
|
|
1147
1147
|
constructor() {
|
|
1148
|
-
|
|
1148
|
+
ne(this, "handlers", /* @__PURE__ */ new Map());
|
|
1149
1149
|
}
|
|
1150
1150
|
/**
|
|
1151
1151
|
* Register a step handler
|
|
@@ -1186,8 +1186,8 @@ class ir {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
class sr {
|
|
1188
1188
|
constructor(t, n, a, i, o, l, d, u) {
|
|
1189
|
-
|
|
1190
|
-
|
|
1189
|
+
ne(this, "state");
|
|
1190
|
+
ne(this, "stepRouter");
|
|
1191
1191
|
this.applicantService = t, this.questionnaireService = n, this.uploadDocumentService = a, this.appropriatenessTestService = i, this.overviewService = o, this.riskScoringService = l, this.investorCategorizationService = u, this.state = new ar(), this.stepRouter = new ir(), this.registerStepHandlers();
|
|
1192
1192
|
}
|
|
1193
1193
|
/**
|
|
@@ -1347,8 +1347,8 @@ function sn(e) {
|
|
|
1347
1347
|
}
|
|
1348
1348
|
class or {
|
|
1349
1349
|
constructor(t) {
|
|
1350
|
-
|
|
1351
|
-
|
|
1350
|
+
ne(this, "sdk", null);
|
|
1351
|
+
ne(this, "config");
|
|
1352
1352
|
this.config = t;
|
|
1353
1353
|
}
|
|
1354
1354
|
/**
|
|
@@ -1402,8 +1402,8 @@ class or {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
class lr {
|
|
1404
1404
|
constructor(t) {
|
|
1405
|
-
|
|
1406
|
-
|
|
1405
|
+
ne(this, "sdk", null);
|
|
1406
|
+
ne(this, "config");
|
|
1407
1407
|
this.config = t;
|
|
1408
1408
|
}
|
|
1409
1409
|
/**
|
|
@@ -1468,9 +1468,9 @@ class lr {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
class cr {
|
|
1470
1470
|
constructor(t) {
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1471
|
+
ne(this, "sardineContext", null);
|
|
1472
|
+
ne(this, "config");
|
|
1473
|
+
ne(this, "sessionKey");
|
|
1474
1474
|
this.config = t, this.sessionKey = t.sessionKey || this.generateSessionKey();
|
|
1475
1475
|
}
|
|
1476
1476
|
/**
|
|
@@ -1662,9 +1662,9 @@ class Me {
|
|
|
1662
1662
|
}
|
|
1663
1663
|
class dr {
|
|
1664
1664
|
constructor(t) {
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1665
|
+
ne(this, "currentTheme", ue);
|
|
1666
|
+
ne(this, "customStyleElement", null);
|
|
1667
|
+
ne(this, "container");
|
|
1668
1668
|
this.container = t || document.documentElement;
|
|
1669
1669
|
}
|
|
1670
1670
|
/**
|
|
@@ -1820,7 +1820,7 @@ const mt = Nt(null), on = ({ config: e, children: t }) => {
|
|
|
1820
1820
|
l.investorCategorizationService
|
|
1821
1821
|
)
|
|
1822
1822
|
}), [e, l, n]);
|
|
1823
|
-
return
|
|
1823
|
+
return ae(() => ((async () => {
|
|
1824
1824
|
if (i.current || o.current) {
|
|
1825
1825
|
console.log("[MetaKYC] Theme already loading or loaded, skipping...");
|
|
1826
1826
|
return;
|
|
@@ -1934,9 +1934,9 @@ function mn() {
|
|
|
1934
1934
|
}
|
|
1935
1935
|
function fr(e) {
|
|
1936
1936
|
const { createOrchestrator: t } = ye(), [n, a] = v(null), [i, o] = v(!1), [l, d] = v(null), u = ee(null), p = e || pr();
|
|
1937
|
-
|
|
1937
|
+
ae(() => {
|
|
1938
1938
|
u.current || (u.current = t());
|
|
1939
|
-
}, [t]),
|
|
1939
|
+
}, [t]), ae(() => {
|
|
1940
1940
|
var A;
|
|
1941
1941
|
n && p && (mr(p), gr({
|
|
1942
1942
|
applicantId: p,
|
|
@@ -1964,7 +1964,7 @@ function fr(e) {
|
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
1966
1966
|
}, [p]);
|
|
1967
|
-
|
|
1967
|
+
ae(() => {
|
|
1968
1968
|
p && !N.current && m();
|
|
1969
1969
|
}, [p, m]);
|
|
1970
1970
|
const x = Q(async () => {
|
|
@@ -2075,7 +2075,7 @@ function xr(e) {
|
|
|
2075
2075
|
}
|
|
2076
2076
|
}
|
|
2077
2077
|
}, [e, t, n]);
|
|
2078
|
-
|
|
2078
|
+
ae(() => {
|
|
2079
2079
|
e && h.current !== e && C();
|
|
2080
2080
|
}, [e]);
|
|
2081
2081
|
const D = Q(
|
|
@@ -2119,7 +2119,7 @@ function br(e) {
|
|
|
2119
2119
|
}
|
|
2120
2120
|
}
|
|
2121
2121
|
}, [e, t]);
|
|
2122
|
-
|
|
2122
|
+
ae(() => {
|
|
2123
2123
|
e && x.current !== e && h();
|
|
2124
2124
|
}, [e]);
|
|
2125
2125
|
const C = Q(
|
|
@@ -2163,7 +2163,7 @@ function pn(e) {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
2165
|
}, [e, t]);
|
|
2166
|
-
|
|
2166
|
+
ae(() => {
|
|
2167
2167
|
e && x.current !== e && h();
|
|
2168
2168
|
}, [e]);
|
|
2169
2169
|
const C = Q(
|
|
@@ -2208,7 +2208,7 @@ function vr(e) {
|
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
2210
|
}, [e, t]);
|
|
2211
|
-
|
|
2211
|
+
ae(() => {
|
|
2212
2212
|
e && N.current !== e && m();
|
|
2213
2213
|
}, [e]);
|
|
2214
2214
|
const x = Q(async () => {
|
|
@@ -2351,7 +2351,7 @@ function wr(e) {
|
|
|
2351
2351
|
}
|
|
2352
2352
|
}
|
|
2353
2353
|
}, [e, t, n]);
|
|
2354
|
-
|
|
2354
|
+
ae(() => {
|
|
2355
2355
|
e && D.current !== e && k();
|
|
2356
2356
|
}, [e]);
|
|
2357
2357
|
const z = Q(
|
|
@@ -2722,8 +2722,8 @@ const it = 280, Sr = ({
|
|
|
2722
2722
|
}) => {
|
|
2723
2723
|
const [d, u] = v(!1), [p, b] = v(""), [N, m] = v(null), x = ee(null), h = ee(null), C = ee(null), D = Q(() => {
|
|
2724
2724
|
if (!h.current) return null;
|
|
2725
|
-
const w = h.current.getBoundingClientRect(),
|
|
2726
|
-
return { top:
|
|
2725
|
+
const w = h.current.getBoundingClientRect(), re = window.innerHeight - w.bottom < it && w.top > it;
|
|
2726
|
+
return { top: re ? w.top : w.bottom + 4, left: w.left, width: w.width, openUp: re };
|
|
2727
2727
|
}, []), k = Q(() => {
|
|
2728
2728
|
if (o) return;
|
|
2729
2729
|
const w = D();
|
|
@@ -2731,15 +2731,15 @@ const it = 280, Sr = ({
|
|
|
2731
2731
|
}, [o, D]), z = Q(() => {
|
|
2732
2732
|
u(!1), b("");
|
|
2733
2733
|
}, []);
|
|
2734
|
-
|
|
2734
|
+
ae(() => {
|
|
2735
2735
|
if (!d) return;
|
|
2736
2736
|
const w = (q) => {
|
|
2737
|
-
var
|
|
2738
|
-
const
|
|
2739
|
-
!((
|
|
2737
|
+
var _, F;
|
|
2738
|
+
const re = q.target;
|
|
2739
|
+
!((_ = x.current) != null && _.contains(re)) && !((F = C.current) != null && F.contains(re)) && z();
|
|
2740
2740
|
};
|
|
2741
2741
|
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
2742
|
-
}, [d, z]),
|
|
2742
|
+
}, [d, z]), ae(() => {
|
|
2743
2743
|
if (!d) return;
|
|
2744
2744
|
const w = () => {
|
|
2745
2745
|
const q = D();
|
|
@@ -2754,10 +2754,10 @@ const it = 280, Sr = ({
|
|
|
2754
2754
|
), I = (w) => {
|
|
2755
2755
|
o || n(t.includes(w) ? t.filter((q) => q !== w) : [...t, w]);
|
|
2756
2756
|
}, j = (w, q) => {
|
|
2757
|
-
q.stopPropagation(), o || n(t.filter((
|
|
2757
|
+
q.stopPropagation(), o || n(t.filter((re) => re !== w));
|
|
2758
2758
|
}, G = (w) => {
|
|
2759
2759
|
var q;
|
|
2760
|
-
return ((q = a.find((
|
|
2760
|
+
return ((q = a.find((re) => re.value === w)) == null ? void 0 : q.label) || w;
|
|
2761
2761
|
}, E = h.current ? getComputedStyle(h.current) : null, f = (E == null ? void 0 : E.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", R = (E == null ? void 0 : E.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", P = (E == null ? void 0 : E.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", O = (E == null ? void 0 : E.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", H = (E == null ? void 0 : E.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", M = (E == null ? void 0 : E.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", T = (E == null ? void 0 : E.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", J = d && N && /* @__PURE__ */ s(
|
|
2762
2762
|
"div",
|
|
2763
2763
|
{
|
|
@@ -2819,11 +2819,11 @@ const it = 280, Sr = ({
|
|
|
2819
2819
|
color: q ? H : P,
|
|
2820
2820
|
userSelect: "none"
|
|
2821
2821
|
},
|
|
2822
|
-
onMouseEnter: (
|
|
2823
|
-
q || (
|
|
2822
|
+
onMouseEnter: (re) => {
|
|
2823
|
+
q || (re.currentTarget.style.backgroundColor = T);
|
|
2824
2824
|
},
|
|
2825
|
-
onMouseLeave: (
|
|
2826
|
-
q || (
|
|
2825
|
+
onMouseLeave: (re) => {
|
|
2826
|
+
q || (re.currentTarget.style.backgroundColor = "transparent");
|
|
2827
2827
|
},
|
|
2828
2828
|
children: [
|
|
2829
2829
|
/* @__PURE__ */ r(
|
|
@@ -2979,7 +2979,7 @@ const it = 280, Sr = ({
|
|
|
2979
2979
|
}, [d, I]), G = Q(() => {
|
|
2980
2980
|
N(!1), x("");
|
|
2981
2981
|
}, []), E = () => b ? G() : j();
|
|
2982
|
-
|
|
2982
|
+
ae(() => {
|
|
2983
2983
|
if (!b) return;
|
|
2984
2984
|
const S = (U) => {
|
|
2985
2985
|
var Y, we;
|
|
@@ -2987,7 +2987,7 @@ const it = 280, Sr = ({
|
|
|
2987
2987
|
!((Y = D.current) != null && Y.contains(X)) && !((we = z.current) != null && we.contains(X)) && G();
|
|
2988
2988
|
};
|
|
2989
2989
|
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
2990
|
-
}, [b, G]),
|
|
2990
|
+
}, [b, G]), ae(() => {
|
|
2991
2991
|
if (!b) return;
|
|
2992
2992
|
const S = () => {
|
|
2993
2993
|
const U = I();
|
|
@@ -2996,7 +2996,7 @@ const it = 280, Sr = ({
|
|
|
2996
2996
|
return window.addEventListener("scroll", S, !0), window.addEventListener("resize", S), () => {
|
|
2997
2997
|
window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S);
|
|
2998
2998
|
};
|
|
2999
|
-
}, [b, I]),
|
|
2999
|
+
}, [b, I]), ae(() => {
|
|
3000
3000
|
b && A.current && setTimeout(() => {
|
|
3001
3001
|
var S;
|
|
3002
3002
|
return (S = A.current) == null ? void 0 : S.focus();
|
|
@@ -3006,7 +3006,7 @@ const it = 280, Sr = ({
|
|
|
3006
3006
|
(S) => S.label.toLowerCase().includes(m.toLowerCase()) || S.value.toLowerCase().includes(m.toLowerCase())
|
|
3007
3007
|
), R = (F = a.find((S) => S.value === o)) == null ? void 0 : F.label, P = (S, U) => {
|
|
3008
3008
|
d || U || (l(S), G());
|
|
3009
|
-
}, O = k.current ? getComputedStyle(k.current) : null, H = (O == null ? void 0 : O.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", M = (O == null ? void 0 : O.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", T = (O == null ? void 0 : O.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", J = (O == null ? void 0 : O.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", w = (O == null ? void 0 : O.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", q = (O == null ? void 0 : O.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff",
|
|
3009
|
+
}, O = k.current ? getComputedStyle(k.current) : null, H = (O == null ? void 0 : O.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", M = (O == null ? void 0 : O.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", T = (O == null ? void 0 : O.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", J = (O == null ? void 0 : O.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", w = (O == null ? void 0 : O.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", q = (O == null ? void 0 : O.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", re = (O == null ? void 0 : O.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", _ = b && h && /* @__PURE__ */ s(
|
|
3010
3010
|
"div",
|
|
3011
3011
|
{
|
|
3012
3012
|
ref: z,
|
|
@@ -3076,7 +3076,7 @@ const it = 280, Sr = ({
|
|
|
3076
3076
|
userSelect: "none"
|
|
3077
3077
|
},
|
|
3078
3078
|
onMouseEnter: (X) => {
|
|
3079
|
-
!U && !S.disabled && (X.currentTarget.style.backgroundColor =
|
|
3079
|
+
!U && !S.disabled && (X.currentTarget.style.backgroundColor = re);
|
|
3080
3080
|
},
|
|
3081
3081
|
onMouseLeave: (X) => {
|
|
3082
3082
|
U || (X.currentTarget.style.backgroundColor = "transparent");
|
|
@@ -3146,7 +3146,7 @@ const it = 280, Sr = ({
|
|
|
3146
3146
|
]
|
|
3147
3147
|
}
|
|
3148
3148
|
),
|
|
3149
|
-
typeof document < "u" &&
|
|
3149
|
+
typeof document < "u" && _ ? Ve(_, document.body) : null,
|
|
3150
3150
|
t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
|
|
3151
3151
|
!t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
|
|
3152
3152
|
]
|
|
@@ -4252,7 +4252,7 @@ const jr = ({
|
|
|
4252
4252
|
onBack: n
|
|
4253
4253
|
}) => {
|
|
4254
4254
|
const { appropriatenessTestService: a } = ye(), [i, o] = v(null), [l, d] = v(!0), [u, p] = v(!1), [b, N] = v(null), [m, x] = v({}), [h, C] = v(0), [D, k] = v(!1), [z, A] = v(!1), [I, j] = v(0);
|
|
4255
|
-
|
|
4255
|
+
ae(() => {
|
|
4256
4256
|
(async () => {
|
|
4257
4257
|
try {
|
|
4258
4258
|
d(!0), N(null), console.log("Loading appropriateness test for applicant:", e);
|
|
@@ -4279,19 +4279,19 @@ const jr = ({
|
|
|
4279
4279
|
const T = Math.floor(M / 60), J = M % 60;
|
|
4280
4280
|
return `${T.toString().padStart(2, "0")}:${J.toString().padStart(2, "0")}`;
|
|
4281
4281
|
};
|
|
4282
|
-
|
|
4282
|
+
ae(() => {
|
|
4283
4283
|
if (!D || h <= 0) return;
|
|
4284
4284
|
const M = setInterval(() => {
|
|
4285
4285
|
C((T) => T <= 1 ? (A(!0), 0) : T - 1);
|
|
4286
4286
|
}, 1e3);
|
|
4287
4287
|
return () => clearInterval(M);
|
|
4288
|
-
}, [D, h]),
|
|
4288
|
+
}, [D, h]), ae(() => {
|
|
4289
4289
|
if (I <= 0) return;
|
|
4290
4290
|
const M = setInterval(() => {
|
|
4291
4291
|
j((T) => T <= 1 ? 0 : T - 1);
|
|
4292
4292
|
}, 1e3);
|
|
4293
4293
|
return () => clearInterval(M);
|
|
4294
|
-
}, [I]),
|
|
4294
|
+
}, [I]), ae(() => {
|
|
4295
4295
|
z && !u && P();
|
|
4296
4296
|
}, [z]);
|
|
4297
4297
|
const f = () => {
|
|
@@ -4533,7 +4533,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4533
4533
|
onComplete: t,
|
|
4534
4534
|
onBack: n
|
|
4535
4535
|
}) => {
|
|
4536
|
-
var J, w, q,
|
|
4536
|
+
var J, w, q, re;
|
|
4537
4537
|
const { applicantService: a, baseInformationService: i, config: o } = ye(), { identityData: l, provider: d, token: u, isLoading: p, error: b, requestIdentity: N, restartIdentity: m } = kr(e), [x, h] = v(null), [C, D] = v(null), [k, z] = v([]), [A, I] = v(!0), [j, G] = v(!1), [E, f] = v(null), [R, P] = v(!1), O = ge.useRef(!1), H = Ct({
|
|
4538
4538
|
defaultValues: {
|
|
4539
4539
|
street: "",
|
|
@@ -4545,7 +4545,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4545
4545
|
phonenumber: ""
|
|
4546
4546
|
}
|
|
4547
4547
|
});
|
|
4548
|
-
|
|
4548
|
+
ae(() => {
|
|
4549
4549
|
(async () => {
|
|
4550
4550
|
try {
|
|
4551
4551
|
const [F, S] = await Promise.all([
|
|
@@ -4581,13 +4581,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4581
4581
|
I(!1);
|
|
4582
4582
|
}
|
|
4583
4583
|
})();
|
|
4584
|
-
}, [e]),
|
|
4584
|
+
}, [e]), ae(() => {
|
|
4585
4585
|
l && !j && (console.log("[Identity] Identity data already loaded, showing provider"), G(!0));
|
|
4586
|
-
}, [l, j]),
|
|
4586
|
+
}, [l, j]), ae(() => {
|
|
4587
4587
|
if (u) {
|
|
4588
4588
|
if (u.expiresAt) {
|
|
4589
|
-
const
|
|
4590
|
-
if (Date.now() >=
|
|
4589
|
+
const _ = new Date(u.expiresAt).getTime();
|
|
4590
|
+
if (Date.now() >= _) {
|
|
4591
4591
|
console.warn("[Identity] Token has expired (expiresAt)"), P(!0), f("Your verification session has expired. Please restart.");
|
|
4592
4592
|
return;
|
|
4593
4593
|
}
|
|
@@ -4607,13 +4607,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4607
4607
|
return;
|
|
4608
4608
|
}
|
|
4609
4609
|
}
|
|
4610
|
-
}, [u]),
|
|
4610
|
+
}, [u]), ae(() => {
|
|
4611
4611
|
if (d !== null && u && !x && j && !R) {
|
|
4612
|
-
const
|
|
4612
|
+
const _ = d;
|
|
4613
4613
|
if (u.url) {
|
|
4614
4614
|
console.log("[Identity] Loading provider URL for user verification:", u.url), f(null);
|
|
4615
4615
|
try {
|
|
4616
|
-
if (new URL(u.url),
|
|
4616
|
+
if (new URL(u.url), _ === xe.SardinAI) {
|
|
4617
4617
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
4618
4618
|
try {
|
|
4619
4619
|
const F = Me.parseProviderConfig(d, u, o);
|
|
@@ -4632,7 +4632,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4632
4632
|
}
|
|
4633
4633
|
return;
|
|
4634
4634
|
}
|
|
4635
|
-
if (
|
|
4635
|
+
if (_ === xe.SardinAI) {
|
|
4636
4636
|
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), f(null);
|
|
4637
4637
|
try {
|
|
4638
4638
|
const F = Me.parseProviderConfig(d, u, o), S = Me.createProvider(d, F);
|
|
@@ -4654,12 +4654,12 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4654
4654
|
try {
|
|
4655
4655
|
f(null);
|
|
4656
4656
|
const F = Me.parseProviderConfig(d, u, o), S = Me.createProvider(d, F);
|
|
4657
|
-
|
|
4657
|
+
_ === xe.Sumsub ? (S.initialize("identity-container").catch((U) => {
|
|
4658
4658
|
var X;
|
|
4659
4659
|
console.error("[Sumsub] Initialization error:", U), f(`Failed to initialize: ${U.message}`), (X = U.message) != null && X.toLowerCase().includes("expired") && P(!0);
|
|
4660
4660
|
}), S.onComplete && S.onComplete(() => {
|
|
4661
4661
|
t == null || t();
|
|
4662
|
-
})) :
|
|
4662
|
+
})) : _ === xe.Onfido && S.initialize("identity-container").catch((U) => {
|
|
4663
4663
|
console.error("[Onfido] Initialization error:", U), f(`Failed to initialize: ${U.message}`);
|
|
4664
4664
|
}), h(S);
|
|
4665
4665
|
} catch (F) {
|
|
@@ -4670,22 +4670,22 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4670
4670
|
if (x && x.destroy)
|
|
4671
4671
|
try {
|
|
4672
4672
|
x.destroy();
|
|
4673
|
-
} catch (
|
|
4674
|
-
console.error("[Identity] Error destroying provider:",
|
|
4673
|
+
} catch (_) {
|
|
4674
|
+
console.error("[Identity] Error destroying provider:", _);
|
|
4675
4675
|
}
|
|
4676
4676
|
};
|
|
4677
4677
|
}, [d, u, x, j, t, R]);
|
|
4678
4678
|
const M = async () => {
|
|
4679
4679
|
try {
|
|
4680
4680
|
f(null), P(!1), await N(), G(!0);
|
|
4681
|
-
} catch (
|
|
4682
|
-
console.error("Error starting identity verification:",
|
|
4681
|
+
} catch (_) {
|
|
4682
|
+
console.error("Error starting identity verification:", _);
|
|
4683
4683
|
}
|
|
4684
4684
|
}, T = async () => {
|
|
4685
4685
|
try {
|
|
4686
4686
|
f(null), P(!1), h(null), console.log("[Identity] Restarting verification..."), await m(), G(!0);
|
|
4687
|
-
} catch (
|
|
4688
|
-
console.error("Error restarting identity verification:",
|
|
4687
|
+
} catch (_) {
|
|
4688
|
+
console.error("Error restarting identity verification:", _), f(_.message || "Failed to restart verification");
|
|
4689
4689
|
}
|
|
4690
4690
|
};
|
|
4691
4691
|
if (A || p)
|
|
@@ -4741,7 +4741,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4741
4741
|
] })
|
|
4742
4742
|
] });
|
|
4743
4743
|
if (j && l) {
|
|
4744
|
-
const
|
|
4744
|
+
const _ = d;
|
|
4745
4745
|
return u != null && u.url ? /* @__PURE__ */ s(K, { children: [
|
|
4746
4746
|
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
4747
4747
|
/* @__PURE__ */ s("div", { children: [
|
|
@@ -4789,7 +4789,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4789
4789
|
) })
|
|
4790
4790
|
] }),
|
|
4791
4791
|
n && /* @__PURE__ */ r(pe, { children: /* @__PURE__ */ r(Z, { variant: "outline", onClick: n, children: "Back" }) })
|
|
4792
|
-
] }) :
|
|
4792
|
+
] }) : _ === xe.SardinAI ? /* @__PURE__ */ s(K, { children: [
|
|
4793
4793
|
/* @__PURE__ */ s(de, { children: [
|
|
4794
4794
|
/* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
|
|
4795
4795
|
/* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
|
|
@@ -4829,7 +4829,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4829
4829
|
] }),
|
|
4830
4830
|
/* @__PURE__ */ s("div", { children: [
|
|
4831
4831
|
/* @__PURE__ */ r("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Date of Birth" }),
|
|
4832
|
-
/* @__PURE__ */ r("p", { className: "mt-1 text-base", children: ((
|
|
4832
|
+
/* @__PURE__ */ r("p", { className: "mt-1 text-base", children: ((re = C == null ? void 0 : C.applicantRequestData) == null ? void 0 : re.dateOfBirth) || "Not provided" })
|
|
4833
4833
|
] })
|
|
4834
4834
|
] }),
|
|
4835
4835
|
/* @__PURE__ */ s("div", { className: "space-y-4", children: [
|
|
@@ -4840,10 +4840,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4840
4840
|
{
|
|
4841
4841
|
control: H.control,
|
|
4842
4842
|
name: "country",
|
|
4843
|
-
render: ({ field:
|
|
4843
|
+
render: ({ field: _ }) => /* @__PURE__ */ r(
|
|
4844
4844
|
He,
|
|
4845
4845
|
{
|
|
4846
|
-
...
|
|
4846
|
+
..._,
|
|
4847
4847
|
label: "Country",
|
|
4848
4848
|
options: [
|
|
4849
4849
|
{ value: "", label: "Select country..." },
|
|
@@ -4861,10 +4861,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4861
4861
|
{
|
|
4862
4862
|
control: H.control,
|
|
4863
4863
|
name: "nationality",
|
|
4864
|
-
render: ({ field:
|
|
4864
|
+
render: ({ field: _ }) => /* @__PURE__ */ r(
|
|
4865
4865
|
He,
|
|
4866
4866
|
{
|
|
4867
|
-
...
|
|
4867
|
+
..._,
|
|
4868
4868
|
label: "Nationality",
|
|
4869
4869
|
options: [
|
|
4870
4870
|
{ value: "", label: "Select nationality..." },
|
|
@@ -4884,7 +4884,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4884
4884
|
{
|
|
4885
4885
|
control: H.control,
|
|
4886
4886
|
name: "street",
|
|
4887
|
-
render: ({ field:
|
|
4887
|
+
render: ({ field: _ }) => /* @__PURE__ */ r(me, { ..._, label: "Street" })
|
|
4888
4888
|
}
|
|
4889
4889
|
),
|
|
4890
4890
|
/* @__PURE__ */ r(
|
|
@@ -4892,7 +4892,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4892
4892
|
{
|
|
4893
4893
|
control: H.control,
|
|
4894
4894
|
name: "streetNumber",
|
|
4895
|
-
render: ({ field:
|
|
4895
|
+
render: ({ field: _ }) => /* @__PURE__ */ r(me, { ..._, label: "Street Number" })
|
|
4896
4896
|
}
|
|
4897
4897
|
)
|
|
4898
4898
|
] }),
|
|
@@ -4902,7 +4902,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4902
4902
|
{
|
|
4903
4903
|
control: H.control,
|
|
4904
4904
|
name: "city",
|
|
4905
|
-
render: ({ field:
|
|
4905
|
+
render: ({ field: _ }) => /* @__PURE__ */ r(me, { ..._, label: "City" })
|
|
4906
4906
|
}
|
|
4907
4907
|
),
|
|
4908
4908
|
/* @__PURE__ */ r(
|
|
@@ -4910,7 +4910,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4910
4910
|
{
|
|
4911
4911
|
control: H.control,
|
|
4912
4912
|
name: "zip",
|
|
4913
|
-
render: ({ field:
|
|
4913
|
+
render: ({ field: _ }) => /* @__PURE__ */ r(me, { ..._, label: "ZIP/Postal Code" })
|
|
4914
4914
|
}
|
|
4915
4915
|
)
|
|
4916
4916
|
] }),
|
|
@@ -4919,7 +4919,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4919
4919
|
{
|
|
4920
4920
|
control: H.control,
|
|
4921
4921
|
name: "phonenumber",
|
|
4922
|
-
render: ({ field:
|
|
4922
|
+
render: ({ field: _ }) => /* @__PURE__ */ r(me, { ..._, label: "Phone Number", type: "tel" })
|
|
4923
4923
|
}
|
|
4924
4924
|
)
|
|
4925
4925
|
] })
|
|
@@ -5258,20 +5258,20 @@ const _e = {
|
|
|
5258
5258
|
if (L) for (const $ of L) c.add($);
|
|
5259
5259
|
if (m)
|
|
5260
5260
|
for (const $ of m)
|
|
5261
|
-
for (const
|
|
5262
|
-
!
|
|
5261
|
+
for (const y of $.fields)
|
|
5262
|
+
!y.isCustom && y.name && y.required && c.add(y.name);
|
|
5263
5263
|
return Array.from(c);
|
|
5264
5264
|
}, [l == null ? void 0 : l.applicantFormRequiredFields, m]), h = Ee(() => {
|
|
5265
5265
|
var $;
|
|
5266
5266
|
if (m) {
|
|
5267
|
-
const
|
|
5268
|
-
for (const
|
|
5269
|
-
return Array.from(
|
|
5267
|
+
const y = m.flatMap((B) => B.fields).filter((B) => !B.isCustom && B.name).map((B) => B.name), g = new Set(y);
|
|
5268
|
+
for (const B of je) g.add(B);
|
|
5269
|
+
return Array.from(g);
|
|
5270
5270
|
}
|
|
5271
5271
|
let c;
|
|
5272
5272
|
($ = i.applicantForm) != null && $.visibleFields ? c = i.applicantForm.visibleFields : l != null && l.applicantFormVisibleFields && l.applicantFormVisibleFields.length > 0 ? c = l.applicantFormVisibleFields : c = zt;
|
|
5273
5273
|
const L = new Set(c);
|
|
5274
|
-
for (const
|
|
5274
|
+
for (const y of je) L.add(y);
|
|
5275
5275
|
return Array.from(L);
|
|
5276
5276
|
}, [(tt = i.applicantForm) == null ? void 0 : tt.visibleFields, l == null ? void 0 : l.applicantFormVisibleFields, m]), C = /* @__PURE__ */ new Set([
|
|
5277
5277
|
"country",
|
|
@@ -5284,52 +5284,52 @@ const _e = {
|
|
|
5284
5284
|
var L, $;
|
|
5285
5285
|
const c = /* @__PURE__ */ new Set();
|
|
5286
5286
|
if (m)
|
|
5287
|
-
for (const
|
|
5288
|
-
for (const
|
|
5289
|
-
!
|
|
5287
|
+
for (const y of m)
|
|
5288
|
+
for (const g of y.fields)
|
|
5289
|
+
!g.isCustom && g.name && C.has(g.name) && c.add(g.countriesType ?? ((L = Te[g.name]) == null ? void 0 : L.countriesType));
|
|
5290
5290
|
else
|
|
5291
|
-
for (const
|
|
5292
|
-
C.has(
|
|
5291
|
+
for (const y of h)
|
|
5292
|
+
C.has(y) && c.add(($ = Te[y]) == null ? void 0 : $.countriesType);
|
|
5293
5293
|
return c.size === 0 && c.add(void 0), Array.from(c);
|
|
5294
5294
|
}, [h, m]), [k, z] = v({}), [A, I] = v(!0), j = ee(/* @__PURE__ */ new Set()), G = ee(/* @__PURE__ */ new Set());
|
|
5295
|
-
|
|
5295
|
+
ae(() => {
|
|
5296
5296
|
if (!l) return;
|
|
5297
|
-
const c = D.filter((
|
|
5298
|
-
const
|
|
5299
|
-
return !G.current.has(
|
|
5297
|
+
const c = D.filter((y) => {
|
|
5298
|
+
const g = y != null ? String(y) : "all";
|
|
5299
|
+
return !G.current.has(g) && !j.current.has(g);
|
|
5300
5300
|
});
|
|
5301
5301
|
if (c.length === 0) {
|
|
5302
|
-
D.every((
|
|
5303
|
-
const
|
|
5304
|
-
return G.current.has(
|
|
5302
|
+
D.every((g) => {
|
|
5303
|
+
const B = g != null ? String(g) : "all";
|
|
5304
|
+
return G.current.has(B);
|
|
5305
5305
|
}) && I(!1);
|
|
5306
5306
|
return;
|
|
5307
5307
|
}
|
|
5308
5308
|
I(!0);
|
|
5309
|
-
const L = c.map((
|
|
5310
|
-
L.forEach((
|
|
5309
|
+
const L = c.map((y) => y != null ? String(y) : "all");
|
|
5310
|
+
L.forEach((y) => j.current.add(y)), (async () => {
|
|
5311
5311
|
try {
|
|
5312
|
-
const
|
|
5313
|
-
c.map(async (
|
|
5314
|
-
const
|
|
5315
|
-
return G.current.add(
|
|
5312
|
+
const y = await Promise.all(
|
|
5313
|
+
c.map(async (g) => {
|
|
5314
|
+
const B = g != null ? String(g) : "all", te = await o.getCountries("", i.locale || "en", g), ie = /* @__PURE__ */ new Set(), fe = te.map((se) => ({ value: se.abbreviation3 || se.abbreviation, label: se.name })).filter((se) => !se.value || ie.has(se.value) ? !1 : (ie.add(se.value), !0));
|
|
5315
|
+
return G.current.add(B), j.current.delete(B), [B, fe];
|
|
5316
5316
|
})
|
|
5317
5317
|
);
|
|
5318
|
-
z((
|
|
5319
|
-
} catch (
|
|
5320
|
-
L.forEach((
|
|
5318
|
+
z((g) => ({ ...g, ...Object.fromEntries(y) }));
|
|
5319
|
+
} catch (y) {
|
|
5320
|
+
L.forEach((g) => j.current.delete(g)), console.error("Failed to load countries:", y);
|
|
5321
5321
|
} finally {
|
|
5322
|
-
D.every((
|
|
5323
|
-
const
|
|
5324
|
-
return G.current.has(
|
|
5322
|
+
D.every((g) => {
|
|
5323
|
+
const B = g != null ? String(g) : "all";
|
|
5324
|
+
return G.current.has(B);
|
|
5325
5325
|
}) && I(!1);
|
|
5326
5326
|
}
|
|
5327
5327
|
})();
|
|
5328
5328
|
}, [D, l]);
|
|
5329
5329
|
const E = (c, L) => {
|
|
5330
|
-
var
|
|
5331
|
-
const $ = L ?? ((
|
|
5332
|
-
return k[
|
|
5330
|
+
var g;
|
|
5331
|
+
const $ = L ?? ((g = Te[c]) == null ? void 0 : g.countriesType), y = $ != null ? String($) : "all";
|
|
5332
|
+
return k[y] || [];
|
|
5333
5333
|
}, [f, R] = v({
|
|
5334
5334
|
workflowKey: p,
|
|
5335
5335
|
firstName: "",
|
|
@@ -5355,21 +5355,21 @@ const _e = {
|
|
|
5355
5355
|
educationLevel: "",
|
|
5356
5356
|
occupation: "",
|
|
5357
5357
|
taxNumber: ""
|
|
5358
|
-
}), [P, O] = v({}), [H, M] = v(0), [T, J] = v({}), [w, q] = v(null), [
|
|
5358
|
+
}), [P, O] = v({}), [H, M] = v(0), [T, J] = v({}), [w, q] = v(null), [re, _] = v(!1), F = (c, L) => R(($) => ({ ...$, [c]: L })), S = (c, L) => O(($) => ({ ...$, [c]: L })), U = (c) => !c.conditionalOn || P[c.conditionalOn] === "true", X = m && H < m.length - 1 ? H + 1 : -1, Y = m && H > 0 ? H - 1 : -1, we = (c) => {
|
|
5359
5359
|
var $;
|
|
5360
5360
|
const L = {};
|
|
5361
|
-
for (const
|
|
5362
|
-
if (
|
|
5363
|
-
if (
|
|
5364
|
-
if (
|
|
5365
|
-
const
|
|
5366
|
-
|
|
5361
|
+
for (const y of c.fields)
|
|
5362
|
+
if (y.isCustom) {
|
|
5363
|
+
if (y.customType === "paragraph" || y.customType === "br" || y.customType === "link") continue;
|
|
5364
|
+
if (y.required && y.paramName) {
|
|
5365
|
+
const g = P[y.paramName], B = y.displayText || y.label || y.paramName;
|
|
5366
|
+
y.customType === "checkbox" || y.customType === "link_checkbox" ? g !== "true" && (L[y.paramName] = `${B} is required.`) : (!g || g.trim() === "") && (L[y.paramName] = `${B} is required.`);
|
|
5367
5367
|
}
|
|
5368
|
-
} else if (
|
|
5369
|
-
const
|
|
5370
|
-
if (x.includes(
|
|
5371
|
-
const
|
|
5372
|
-
L[
|
|
5368
|
+
} else if (y.name) {
|
|
5369
|
+
const g = y.name;
|
|
5370
|
+
if (x.includes(g) && Be(f[g])) {
|
|
5371
|
+
const B = y.displayText || (($ = Te[g]) == null ? void 0 : $.label) || g;
|
|
5372
|
+
L[g] = `${B} is required.`;
|
|
5373
5373
|
}
|
|
5374
5374
|
}
|
|
5375
5375
|
return L;
|
|
@@ -5396,7 +5396,7 @@ const _e = {
|
|
|
5396
5396
|
return;
|
|
5397
5397
|
}
|
|
5398
5398
|
}
|
|
5399
|
-
|
|
5399
|
+
_(!0), q(null);
|
|
5400
5400
|
try {
|
|
5401
5401
|
if (!f.externalRefId || f.externalRefId.trim() === "") {
|
|
5402
5402
|
q("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
|
|
@@ -5407,35 +5407,38 @@ const _e = {
|
|
|
5407
5407
|
externalRefId: f.externalRefId.trim()
|
|
5408
5408
|
};
|
|
5409
5409
|
if (m) {
|
|
5410
|
-
for (const
|
|
5411
|
-
if (U(
|
|
5412
|
-
for (const
|
|
5413
|
-
if (!
|
|
5414
|
-
const
|
|
5415
|
-
Be(
|
|
5410
|
+
for (const y of m)
|
|
5411
|
+
if (U(y)) {
|
|
5412
|
+
for (const g of y.fields)
|
|
5413
|
+
if (!g.isCustom && g.name) {
|
|
5414
|
+
const B = g.name, te = f[B];
|
|
5415
|
+
Be(te) || (c[B] = te);
|
|
5416
5416
|
}
|
|
5417
5417
|
}
|
|
5418
|
-
for (const
|
|
5419
|
-
if (c[
|
|
5420
|
-
const
|
|
5421
|
-
Be(
|
|
5418
|
+
for (const y of je)
|
|
5419
|
+
if (c[y] === void 0) {
|
|
5420
|
+
const g = f[y];
|
|
5421
|
+
Be(g) || (c[y] = g);
|
|
5422
5422
|
}
|
|
5423
5423
|
} else
|
|
5424
|
-
h.forEach((
|
|
5425
|
-
if (
|
|
5426
|
-
const
|
|
5427
|
-
Be(
|
|
5424
|
+
h.forEach((y) => {
|
|
5425
|
+
if (y === "externalRefId") return;
|
|
5426
|
+
const g = f[y];
|
|
5427
|
+
Be(g) || (c[y] = g);
|
|
5428
5428
|
});
|
|
5429
5429
|
const L = [];
|
|
5430
5430
|
if (m) {
|
|
5431
|
-
for (const
|
|
5432
|
-
if (U(
|
|
5433
|
-
for (const
|
|
5434
|
-
if (
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5431
|
+
for (const y of m)
|
|
5432
|
+
if (U(y))
|
|
5433
|
+
for (const g of y.fields) {
|
|
5434
|
+
if (!g.isCustom || !g.paramName || g.customType === "paragraph" || g.customType === "br" || g.customType === "link") continue;
|
|
5435
|
+
const B = P[g.paramName] ?? "";
|
|
5436
|
+
let te;
|
|
5437
|
+
if (g.customType === "checkbox" || g.customType === "link_checkbox")
|
|
5438
|
+
te = B === "true" ? "yes" : "no";
|
|
5439
|
+
else if (te = B, !te && !g.required) continue;
|
|
5440
|
+
L.push({ paramName: g.paramName, paramValue: te });
|
|
5441
|
+
}
|
|
5439
5442
|
}
|
|
5440
5443
|
L.length > 0 && (c.applicantAdditionalDatas = L);
|
|
5441
5444
|
const $ = await d(c);
|
|
@@ -5443,37 +5446,37 @@ const _e = {
|
|
|
5443
5446
|
} catch (c) {
|
|
5444
5447
|
console.error("Error creating applicant:", c), q(c.message || "Failed to create applicant");
|
|
5445
5448
|
} finally {
|
|
5446
|
-
|
|
5449
|
+
_(!1);
|
|
5447
5450
|
}
|
|
5448
5451
|
}, ft = async (c) => {
|
|
5449
5452
|
var L;
|
|
5450
5453
|
c.preventDefault();
|
|
5451
5454
|
for (const $ of x)
|
|
5452
5455
|
if (Be(f[$])) {
|
|
5453
|
-
const
|
|
5454
|
-
q(`${
|
|
5456
|
+
const y = ((L = Te[$]) == null ? void 0 : L.label) || $;
|
|
5457
|
+
q(`${y} is required.`);
|
|
5455
5458
|
return;
|
|
5456
5459
|
}
|
|
5457
5460
|
await Ce();
|
|
5458
|
-
}, Ze = (c, L, $,
|
|
5461
|
+
}, Ze = (c, L, $, y) => {
|
|
5459
5462
|
var rt;
|
|
5460
|
-
const
|
|
5461
|
-
if (!
|
|
5462
|
-
const
|
|
5463
|
-
switch (
|
|
5463
|
+
const g = Te[c];
|
|
5464
|
+
if (!g) return null;
|
|
5465
|
+
const B = x.includes(c), te = T[c], ie = $ || g.label, fe = L ?? c, se = { required: B };
|
|
5466
|
+
switch (g.type) {
|
|
5464
5467
|
case "select":
|
|
5465
5468
|
if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
|
|
5466
|
-
const le = E(c,
|
|
5469
|
+
const le = E(c, y);
|
|
5467
5470
|
return /* @__PURE__ */ r(
|
|
5468
5471
|
We,
|
|
5469
5472
|
{
|
|
5470
5473
|
...se,
|
|
5471
|
-
label:
|
|
5474
|
+
label: ie,
|
|
5472
5475
|
value: f[c] || "",
|
|
5473
5476
|
onChange: (Re) => F(c, Re),
|
|
5474
|
-
options: [{ value: "", label: `Select ${
|
|
5477
|
+
options: [{ value: "", label: `Select ${ie.toLowerCase()}...` }, ...le],
|
|
5475
5478
|
disabled: A,
|
|
5476
|
-
error:
|
|
5479
|
+
error: te
|
|
5477
5480
|
},
|
|
5478
5481
|
fe
|
|
5479
5482
|
);
|
|
@@ -5483,7 +5486,7 @@ const _e = {
|
|
|
5483
5486
|
We,
|
|
5484
5487
|
{
|
|
5485
5488
|
...se,
|
|
5486
|
-
label:
|
|
5489
|
+
label: ie,
|
|
5487
5490
|
value: ((rt = f[c]) == null ? void 0 : rt.toString()) || "",
|
|
5488
5491
|
onChange: (le) => F(c, le ? Number(le) : null),
|
|
5489
5492
|
options: [
|
|
@@ -5492,7 +5495,7 @@ const _e = {
|
|
|
5492
5495
|
{ value: Ke.Female.toString(), label: "Female" },
|
|
5493
5496
|
{ value: Ke.Other.toString(), label: "Other" }
|
|
5494
5497
|
],
|
|
5495
|
-
error:
|
|
5498
|
+
error: te
|
|
5496
5499
|
},
|
|
5497
5500
|
fe
|
|
5498
5501
|
);
|
|
@@ -5502,11 +5505,11 @@ const _e = {
|
|
|
5502
5505
|
We,
|
|
5503
5506
|
{
|
|
5504
5507
|
...se,
|
|
5505
|
-
label:
|
|
5508
|
+
label: ie,
|
|
5506
5509
|
value: f[c] || "",
|
|
5507
5510
|
onChange: (Re) => F(c, Re),
|
|
5508
5511
|
options: [{ value: "", label: "Select language..." }, ...le],
|
|
5509
|
-
error:
|
|
5512
|
+
error: te
|
|
5510
5513
|
},
|
|
5511
5514
|
fe
|
|
5512
5515
|
);
|
|
@@ -5514,12 +5517,12 @@ const _e = {
|
|
|
5514
5517
|
return null;
|
|
5515
5518
|
case "multiselect":
|
|
5516
5519
|
if (c === "otherNationality") {
|
|
5517
|
-
const le = E(c,
|
|
5520
|
+
const le = E(c, y);
|
|
5518
5521
|
return /* @__PURE__ */ r(
|
|
5519
5522
|
Sr,
|
|
5520
5523
|
{
|
|
5521
5524
|
...se,
|
|
5522
|
-
label:
|
|
5525
|
+
label: ie,
|
|
5523
5526
|
value: f[c] || [],
|
|
5524
5527
|
onChange: (Re) => F(c, Re),
|
|
5525
5528
|
options: le,
|
|
@@ -5536,10 +5539,10 @@ const _e = {
|
|
|
5536
5539
|
{
|
|
5537
5540
|
...se,
|
|
5538
5541
|
type: "date",
|
|
5539
|
-
label:
|
|
5542
|
+
label: ie,
|
|
5540
5543
|
value: f[c] || "",
|
|
5541
5544
|
onChange: (le) => F(c, le.target.value),
|
|
5542
|
-
error:
|
|
5545
|
+
error: te
|
|
5543
5546
|
},
|
|
5544
5547
|
fe
|
|
5545
5548
|
);
|
|
@@ -5549,10 +5552,10 @@ const _e = {
|
|
|
5549
5552
|
{
|
|
5550
5553
|
...se,
|
|
5551
5554
|
type: "email",
|
|
5552
|
-
label:
|
|
5555
|
+
label: ie,
|
|
5553
5556
|
value: f[c] || "",
|
|
5554
5557
|
onChange: (le) => F(c, le.target.value),
|
|
5555
|
-
error:
|
|
5558
|
+
error: te
|
|
5556
5559
|
},
|
|
5557
5560
|
fe
|
|
5558
5561
|
);
|
|
@@ -5562,10 +5565,10 @@ const _e = {
|
|
|
5562
5565
|
{
|
|
5563
5566
|
...se,
|
|
5564
5567
|
type: "tel",
|
|
5565
|
-
label:
|
|
5568
|
+
label: ie,
|
|
5566
5569
|
value: f[c] || "",
|
|
5567
5570
|
onChange: (le) => F(c, le.target.value),
|
|
5568
|
-
error:
|
|
5571
|
+
error: te
|
|
5569
5572
|
},
|
|
5570
5573
|
fe
|
|
5571
5574
|
);
|
|
@@ -5575,17 +5578,17 @@ const _e = {
|
|
|
5575
5578
|
{
|
|
5576
5579
|
...se,
|
|
5577
5580
|
type: "text",
|
|
5578
|
-
label:
|
|
5581
|
+
label: ie,
|
|
5579
5582
|
value: f[c] || "",
|
|
5580
5583
|
onChange: (le) => F(c, le.target.value),
|
|
5581
|
-
error:
|
|
5584
|
+
error: te
|
|
5582
5585
|
},
|
|
5583
5586
|
fe
|
|
5584
5587
|
);
|
|
5585
5588
|
}
|
|
5586
5589
|
}, xt = (c, L) => {
|
|
5587
5590
|
if (c.customType === "paragraph") {
|
|
5588
|
-
const
|
|
5591
|
+
const g = c.displayText || c.label || "";
|
|
5589
5592
|
return /* @__PURE__ */ r(
|
|
5590
5593
|
"p",
|
|
5591
5594
|
{
|
|
@@ -5596,7 +5599,7 @@ const _e = {
|
|
|
5596
5599
|
margin: 0,
|
|
5597
5600
|
color: "var(--metakyc-text-secondary, #6b7280)"
|
|
5598
5601
|
},
|
|
5599
|
-
dangerouslySetInnerHTML: { __html:
|
|
5602
|
+
dangerouslySetInnerHTML: { __html: g }
|
|
5600
5603
|
},
|
|
5601
5604
|
`custom-${L}`
|
|
5602
5605
|
);
|
|
@@ -5604,7 +5607,7 @@ const _e = {
|
|
|
5604
5607
|
if (c.customType === "br")
|
|
5605
5608
|
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${L}`);
|
|
5606
5609
|
if (c.customType === "link") {
|
|
5607
|
-
const
|
|
5610
|
+
const g = c.displayText || c.label || c.linkText || c.linkUrl || "";
|
|
5608
5611
|
return /* @__PURE__ */ r("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
|
|
5609
5612
|
"a",
|
|
5610
5613
|
{
|
|
@@ -5621,14 +5624,14 @@ const _e = {
|
|
|
5621
5624
|
cursor: "pointer"
|
|
5622
5625
|
},
|
|
5623
5626
|
children: [
|
|
5624
|
-
|
|
5627
|
+
g,
|
|
5625
5628
|
/* @__PURE__ */ r("span", { style: { fontSize: "10px", opacity: 0.7 }, children: "↗" })
|
|
5626
5629
|
]
|
|
5627
5630
|
}
|
|
5628
5631
|
) }, `custom-${L}`);
|
|
5629
5632
|
}
|
|
5630
5633
|
if (!c.paramName) return null;
|
|
5631
|
-
const $ = T[c.paramName],
|
|
5634
|
+
const $ = T[c.paramName], y = c.displayText || c.label || c.paramName;
|
|
5632
5635
|
if (c.customType === "checkbox")
|
|
5633
5636
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
|
|
5634
5637
|
/* @__PURE__ */ s(
|
|
@@ -5642,7 +5645,7 @@ const _e = {
|
|
|
5642
5645
|
{
|
|
5643
5646
|
type: "checkbox",
|
|
5644
5647
|
checked: P[c.paramName] === "true",
|
|
5645
|
-
onChange: (
|
|
5648
|
+
onChange: (g) => S(c.paramName, g.target.checked ? "true" : "false"),
|
|
5646
5649
|
className: "metakyc-option-input",
|
|
5647
5650
|
style: _e
|
|
5648
5651
|
}
|
|
@@ -5653,7 +5656,7 @@ const _e = {
|
|
|
5653
5656
|
className: "metakyc-option-text",
|
|
5654
5657
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
5655
5658
|
children: [
|
|
5656
|
-
|
|
5659
|
+
y,
|
|
5657
5660
|
c.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5658
5661
|
]
|
|
5659
5662
|
}
|
|
@@ -5676,7 +5679,7 @@ const _e = {
|
|
|
5676
5679
|
{
|
|
5677
5680
|
type: "checkbox",
|
|
5678
5681
|
checked: P[c.paramName] === "true",
|
|
5679
|
-
onChange: (
|
|
5682
|
+
onChange: (g) => S(c.paramName, g.target.checked ? "true" : "false"),
|
|
5680
5683
|
className: "metakyc-option-input",
|
|
5681
5684
|
style: { ..._e, alignSelf: "flex-start", marginTop: "2px" }
|
|
5682
5685
|
}
|
|
@@ -5687,7 +5690,7 @@ const _e = {
|
|
|
5687
5690
|
className: "metakyc-option-text",
|
|
5688
5691
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
5689
5692
|
children: [
|
|
5690
|
-
|
|
5693
|
+
y,
|
|
5691
5694
|
" ",
|
|
5692
5695
|
c.linkUrl && /* @__PURE__ */ r(
|
|
5693
5696
|
"a",
|
|
@@ -5697,7 +5700,7 @@ const _e = {
|
|
|
5697
5700
|
rel: "noopener noreferrer",
|
|
5698
5701
|
className: "underline",
|
|
5699
5702
|
style: { color: "var(--metakyc-primary, #2563eb)" },
|
|
5700
|
-
onClick: (
|
|
5703
|
+
onClick: (g) => g.stopPropagation(),
|
|
5701
5704
|
children: c.linkText || c.linkUrl
|
|
5702
5705
|
}
|
|
5703
5706
|
),
|
|
@@ -5711,7 +5714,7 @@ const _e = {
|
|
|
5711
5714
|
$ && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: $ })
|
|
5712
5715
|
] }, `custom-${L}`);
|
|
5713
5716
|
if (c.customType === "group_checkbox") {
|
|
5714
|
-
const
|
|
5717
|
+
const g = (P[c.paramName] || "").split(",").filter(Boolean);
|
|
5715
5718
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
5716
5719
|
/* @__PURE__ */ s(
|
|
5717
5720
|
"div",
|
|
@@ -5719,13 +5722,13 @@ const _e = {
|
|
|
5719
5722
|
className: "text-sm font-medium",
|
|
5720
5723
|
style: { color: "var(--metakyc-text-primary, #111827)" },
|
|
5721
5724
|
children: [
|
|
5722
|
-
|
|
5725
|
+
y,
|
|
5723
5726
|
c.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5724
5727
|
]
|
|
5725
5728
|
}
|
|
5726
5729
|
),
|
|
5727
|
-
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((
|
|
5728
|
-
const
|
|
5730
|
+
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((B) => {
|
|
5731
|
+
const te = c.singleSelect ? P[c.paramName] === B.value : g.includes(B.value);
|
|
5729
5732
|
return /* @__PURE__ */ s(
|
|
5730
5733
|
"label",
|
|
5731
5734
|
{
|
|
@@ -5736,12 +5739,12 @@ const _e = {
|
|
|
5736
5739
|
"input",
|
|
5737
5740
|
{
|
|
5738
5741
|
type: "checkbox",
|
|
5739
|
-
checked:
|
|
5740
|
-
onChange: (
|
|
5742
|
+
checked: te,
|
|
5743
|
+
onChange: (ie) => {
|
|
5741
5744
|
if (c.singleSelect)
|
|
5742
|
-
S(c.paramName,
|
|
5745
|
+
S(c.paramName, ie.target.checked ? B.value : "");
|
|
5743
5746
|
else {
|
|
5744
|
-
const fe =
|
|
5747
|
+
const fe = ie.target.checked ? [...g, B.value] : g.filter((se) => se !== B.value);
|
|
5745
5748
|
S(c.paramName, fe.join(","));
|
|
5746
5749
|
}
|
|
5747
5750
|
},
|
|
@@ -5754,12 +5757,12 @@ const _e = {
|
|
|
5754
5757
|
{
|
|
5755
5758
|
className: "metakyc-option-text",
|
|
5756
5759
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
5757
|
-
children:
|
|
5760
|
+
children: B.label
|
|
5758
5761
|
}
|
|
5759
5762
|
)
|
|
5760
5763
|
]
|
|
5761
5764
|
},
|
|
5762
|
-
|
|
5765
|
+
B.value
|
|
5763
5766
|
);
|
|
5764
5767
|
}) }),
|
|
5765
5768
|
$ && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: $ })
|
|
@@ -5772,12 +5775,12 @@ const _e = {
|
|
|
5772
5775
|
className: "text-sm font-medium",
|
|
5773
5776
|
style: { color: "var(--metakyc-text-primary, #111827)" },
|
|
5774
5777
|
children: [
|
|
5775
|
-
|
|
5778
|
+
y,
|
|
5776
5779
|
c.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5777
5780
|
]
|
|
5778
5781
|
}
|
|
5779
5782
|
),
|
|
5780
|
-
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((
|
|
5783
|
+
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((g) => /* @__PURE__ */ s(
|
|
5781
5784
|
"label",
|
|
5782
5785
|
{
|
|
5783
5786
|
className: "metakyc-option-label",
|
|
@@ -5787,8 +5790,8 @@ const _e = {
|
|
|
5787
5790
|
"input",
|
|
5788
5791
|
{
|
|
5789
5792
|
type: "radio",
|
|
5790
|
-
checked: P[c.paramName] ===
|
|
5791
|
-
onChange: () => S(c.paramName,
|
|
5793
|
+
checked: P[c.paramName] === g.value,
|
|
5794
|
+
onChange: () => S(c.paramName, g.value),
|
|
5792
5795
|
name: `radio-group-${c.paramName}-${L}`,
|
|
5793
5796
|
className: "metakyc-option-input",
|
|
5794
5797
|
style: _e
|
|
@@ -5799,21 +5802,21 @@ const _e = {
|
|
|
5799
5802
|
{
|
|
5800
5803
|
className: "metakyc-option-text",
|
|
5801
5804
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
5802
|
-
children:
|
|
5805
|
+
children: g.label
|
|
5803
5806
|
}
|
|
5804
5807
|
)
|
|
5805
5808
|
]
|
|
5806
5809
|
},
|
|
5807
|
-
|
|
5810
|
+
g.value
|
|
5808
5811
|
)) }),
|
|
5809
5812
|
$ && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: $ })
|
|
5810
5813
|
] }, `custom-${L}`) : /* @__PURE__ */ r(
|
|
5811
5814
|
me,
|
|
5812
5815
|
{
|
|
5813
5816
|
type: "text",
|
|
5814
|
-
label: `${
|
|
5817
|
+
label: `${y}${c.required ? " *" : ""}`,
|
|
5815
5818
|
value: P[c.paramName] || "",
|
|
5816
|
-
onChange: (
|
|
5819
|
+
onChange: (g) => S(c.paramName, g.target.value),
|
|
5817
5820
|
required: c.required,
|
|
5818
5821
|
error: $
|
|
5819
5822
|
},
|
|
@@ -5833,7 +5836,7 @@ const _e = {
|
|
|
5833
5836
|
{
|
|
5834
5837
|
type: "checkbox",
|
|
5835
5838
|
checked: $,
|
|
5836
|
-
onChange: (
|
|
5839
|
+
onChange: (y) => S(c.conditionalOn, y.target.checked ? "true" : "false"),
|
|
5837
5840
|
className: "metakyc-option-input",
|
|
5838
5841
|
style: _e
|
|
5839
5842
|
}
|
|
@@ -5849,9 +5852,9 @@ const _e = {
|
|
|
5849
5852
|
]
|
|
5850
5853
|
}
|
|
5851
5854
|
) }),
|
|
5852
|
-
$ && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: c.fields.map((
|
|
5853
|
-
const
|
|
5854
|
-
return /* @__PURE__ */ r("div", { className:
|
|
5855
|
+
$ && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: c.fields.map((y, g) => {
|
|
5856
|
+
const B = y.colSpan === 1 ? "col-span-1" : y.colSpan === 2 ? "col-span-2" : y.colSpan === 3 ? "col-span-3" : "col-span-4", te = y.isCustom ? `custom-${g}-${y.paramName}` : `builtin-${y.name}-${g}`;
|
|
5857
|
+
return /* @__PURE__ */ r("div", { className: B, children: /* @__PURE__ */ r(ct, { helpText: y.helpText, children: y.isCustom ? xt(y, g) : Ze(y.name, te, y.displayText, y.countriesType) }) }, te);
|
|
5855
5858
|
}) })
|
|
5856
5859
|
] });
|
|
5857
5860
|
};
|
|
@@ -5861,7 +5864,7 @@ const _e = {
|
|
|
5861
5864
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
5862
5865
|
] }) }) });
|
|
5863
5866
|
if (m) {
|
|
5864
|
-
const c = m[H] ?? m[0], L = Y === -1, $ = X === -1,
|
|
5867
|
+
const c = m[H] ?? m[0], L = Y === -1, $ = X === -1, y = m.length, g = U(c), B = Object.values(T);
|
|
5865
5868
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(K, { children: [
|
|
5866
5869
|
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
|
|
5867
5870
|
/* @__PURE__ */ s(W, { children: [
|
|
@@ -5891,27 +5894,27 @@ const _e = {
|
|
|
5891
5894
|
}
|
|
5892
5895
|
)
|
|
5893
5896
|
] }),
|
|
5894
|
-
(w ||
|
|
5897
|
+
(w || B.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
|
|
5895
5898
|
w && /* @__PURE__ */ s("p", { className: "text-red-600 text-sm", children: [
|
|
5896
5899
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
5897
5900
|
" ",
|
|
5898
5901
|
w
|
|
5899
5902
|
] }),
|
|
5900
|
-
|
|
5903
|
+
B.map((te, ie) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: te }, ie))
|
|
5901
5904
|
] }),
|
|
5902
|
-
|
|
5903
|
-
m.map((
|
|
5905
|
+
y > 1 && /* @__PURE__ */ s("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
5906
|
+
m.map((te, ie) => /* @__PURE__ */ r(
|
|
5904
5907
|
"div",
|
|
5905
5908
|
{
|
|
5906
|
-
className: `h-1.5 rounded-full transition-all ${
|
|
5907
|
-
style:
|
|
5909
|
+
className: `h-1.5 rounded-full transition-all ${ie === H ? "flex-1" : "w-8"}`,
|
|
5910
|
+
style: ie === H ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : ie < H ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
|
|
5908
5911
|
},
|
|
5909
|
-
|
|
5912
|
+
ie
|
|
5910
5913
|
)),
|
|
5911
5914
|
/* @__PURE__ */ s("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
|
|
5912
5915
|
H + 1,
|
|
5913
5916
|
" / ",
|
|
5914
|
-
|
|
5917
|
+
y
|
|
5915
5918
|
] })
|
|
5916
5919
|
] }),
|
|
5917
5920
|
bt(c)
|
|
@@ -5926,19 +5929,19 @@ const _e = {
|
|
|
5926
5929
|
onClick: () => {
|
|
5927
5930
|
M(Y), J({});
|
|
5928
5931
|
},
|
|
5929
|
-
disabled:
|
|
5932
|
+
disabled: re || u,
|
|
5930
5933
|
children: "Previous"
|
|
5931
5934
|
}
|
|
5932
5935
|
),
|
|
5933
|
-
L && a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled:
|
|
5936
|
+
L && a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled: re || u, children: "Cancel" })
|
|
5934
5937
|
] }),
|
|
5935
5938
|
/* @__PURE__ */ r(
|
|
5936
5939
|
Z,
|
|
5937
5940
|
{
|
|
5938
5941
|
type: "button",
|
|
5939
|
-
isLoading:
|
|
5942
|
+
isLoading: re || u,
|
|
5940
5943
|
onClick: $ ? Ce : ke,
|
|
5941
|
-
children: $ ? c.conditionalOn && !
|
|
5944
|
+
children: $ ? c.conditionalOn && !g ? "Skip & Submit" : "Submit" : c.conditionalOn && !g ? "Skip" : "Next"
|
|
5942
5945
|
}
|
|
5943
5946
|
)
|
|
5944
5947
|
] })
|
|
@@ -5955,8 +5958,8 @@ const _e = {
|
|
|
5955
5958
|
/* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: h.map((c) => /* @__PURE__ */ r("div", { className: "col-span-4", children: Ze(c) }, c)) })
|
|
5956
5959
|
] }),
|
|
5957
5960
|
/* @__PURE__ */ s(pe, { className: "flex justify-between", children: [
|
|
5958
|
-
a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled:
|
|
5959
|
-
/* @__PURE__ */ r(Z, { type: "submit", isLoading:
|
|
5961
|
+
a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled: re || u, children: "Cancel" }),
|
|
5962
|
+
/* @__PURE__ */ r(Z, { type: "submit", isLoading: re || u, children: "Create Applicant" })
|
|
5960
5963
|
] })
|
|
5961
5964
|
] }) }) });
|
|
5962
5965
|
}, gn = ({
|