@vpdev2/metakyc-sdk 1.0.55 → 1.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,13 +2,13 @@ var bt = Object.defineProperty;
2
2
  var vt = (e, t, n) => t in e ? bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var re = (e, t, n) => vt(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import kt from "axios";
5
- import * as rt from "react";
5
+ import * as nt from "react";
6
6
  import ge, { createContext as wt, useState as b, useMemo as Ee, useEffect as ne, useContext as Nt, useRef as ee, useCallback as Q, forwardRef as Ue, createElement as Qe } from "react";
7
- import { jsx as r, jsxs as s, Fragment as lt } from "react/jsx-runtime";
8
- import { createPortal as ct } from "react-dom";
7
+ import { jsx as r, jsxs as s, Fragment as ct } from "react/jsx-runtime";
8
+ import { createPortal as Ve } from "react-dom";
9
9
  import { useForm as St, Controller as Pe } from "react-hook-form";
10
10
  import { z as Se } from "zod";
11
- var G = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(G || {}), 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 || {}), xe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(xe || {}), Ct = /* @__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))(Ct || {}), At = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(At || {}), De = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(De || {}), Fe = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(Fe || {}), Et = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Et || {}), It = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(It || {}), fe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(fe || {}), Rt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Rt || {}), Ke = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ke || {}), Pt = /* @__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))(Pt || {}), Dt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Dt || {}), Ft = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Ft || {}), Ie = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Decimal = 2] = "Decimal", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Ie || {}), Lt = /* @__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))(Lt || {}), Tt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Tt || {}), he = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(he || {}), Mt = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(Mt || {});
11
+ var G = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(G || {}), qe = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(qe || {}), xe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(xe || {}), Ct = /* @__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))(Ct || {}), At = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(At || {}), De = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(De || {}), Fe = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(Fe || {}), Et = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Et || {}), It = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(It || {}), fe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(fe || {}), Rt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Rt || {}), Ke = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ke || {}), Pt = /* @__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))(Pt || {}), Dt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Dt || {}), Ft = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Ft || {}), Ie = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Decimal = 2] = "Decimal", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Ie || {}), Lt = /* @__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))(Lt || {}), Tt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Tt || {}), he = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(he || {}), Mt = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(Mt || {});
12
12
  const Le = {
13
13
  Nationality: 10,
14
14
  Address: 20,
@@ -44,7 +44,7 @@ const Le = {
44
44
  "email",
45
45
  "phonenumber",
46
46
  "dateOfBirth"
47
- ], nt = [
47
+ ], at = [
48
48
  { value: "EN", label: "English" },
49
49
  { value: "DE", label: "German" },
50
50
  { value: "FR", label: "French" },
@@ -438,7 +438,7 @@ class Ut {
438
438
  await this.httpClient.post("UploadDocument", "ReviewUploadDocument", t);
439
439
  }
440
440
  }
441
- class qt {
441
+ class jt {
442
442
  constructor(t) {
443
443
  this.httpClient = t;
444
444
  }
@@ -464,7 +464,7 @@ class qt {
464
464
  )).result;
465
465
  }
466
466
  }
467
- class jt {
467
+ class qt {
468
468
  constructor(t) {
469
469
  this.httpClient = t;
470
470
  }
@@ -1788,7 +1788,7 @@ class cr {
1788
1788
  }
1789
1789
  const ut = wt(null), on = ({ config: e, children: t }) => {
1790
1790
  const [n, a] = b(null), i = ge.useRef(!1), o = ge.useRef(!1), l = Ee(() => {
1791
- const u = new Bt(e), p = new _t(u), x = new Ht(u), N = new Ut(u), m = new qt(u), y = new jt(u), h = new Kt(u), C = new Wt(u), F = new Yt(u), k = new Qt(u), $ = new tr(u), A = new cr();
1791
+ const u = new Bt(e), p = new _t(u), x = new Ht(u), N = new Ut(u), m = new jt(u), y = new qt(u), h = new Kt(u), C = new Wt(u), F = new Yt(u), k = new Qt(u), $ = new tr(u), A = new cr();
1792
1792
  return {
1793
1793
  httpClient: u,
1794
1794
  applicantService: p,
@@ -2018,7 +2018,7 @@ function yr(e) {
2018
2018
  o(!1);
2019
2019
  }
2020
2020
  }
2021
- }, []), k = rt.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((A, I) => A.order - I.order) : [], [n == null ? void 0 : n.stepInfoList]), $ = rt.useMemo(() => n ? n.nextWorkflowKey && n.nextWorkflowKey !== n.workFlowKey : !1, [n]);
2021
+ }, []), k = nt.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((A, I) => A.order - I.order) : [], [n == null ? void 0 : n.stepInfoList]), $ = nt.useMemo(() => n ? n.nextWorkflowKey && n.nextWorkflowKey !== n.workFlowKey : !1, [n]);
2022
2022
  return {
2023
2023
  progress: n,
2024
2024
  applicantId: p,
@@ -2055,13 +2055,13 @@ function fr(e) {
2055
2055
  n.getApplicantData(e).catch(() => null)
2056
2056
  ]);
2057
2057
  if (i(A), (k = I == null ? void 0 : I.questionnaireResults) != null && k.length && A) {
2058
- const q = /* @__PURE__ */ new Map();
2058
+ const j = /* @__PURE__ */ new Map();
2059
2059
  for (const g of I.questionnaireResults)
2060
- g.question && (($ = g.answers) != null && $.length) && q.set(g.question.trim().toLowerCase(), g.answers);
2060
+ g.question && (($ = g.answers) != null && $.length) && j.set(g.question.trim().toLowerCase(), g.answers);
2061
2061
  const J = {}, E = A.questionGroups.flatMap((g) => g.questions ?? []);
2062
2062
  for (const g of E) {
2063
2063
  const R = g.text.trim().toLowerCase();
2064
- q.has(R) && (J[g.id] = q.get(R));
2064
+ j.has(R) && (J[g.id] = j.get(R));
2065
2065
  }
2066
2066
  l(J);
2067
2067
  }
@@ -2326,12 +2326,12 @@ function kr(e) {
2326
2326
  }
2327
2327
  C.current = !0, u(!0), m(null);
2328
2328
  try {
2329
- const [I, q] = await Promise.all([
2329
+ const [I, j] = await Promise.all([
2330
2330
  t.getRiskCriterias(e),
2331
2331
  n.getApplicantData(e).catch(() => null)
2332
2332
  ]);
2333
- if (i(I), (A = q == null ? void 0 : q.riskScoringResults) != null && A.length) {
2334
- const J = q.riskScoringResults[0], E = {};
2333
+ if (i(I), (A = j == null ? void 0 : j.riskScoringResults) != null && A.length) {
2334
+ const J = j.riskScoringResults[0], E = {};
2335
2335
  for (const g of J.riskCriteriaResults ?? [])
2336
2336
  if (g.riskCriteriaId != null && g.answer != null && g.answer !== "") {
2337
2337
  const R = [...new Set(
@@ -2698,7 +2698,7 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2698
2698
  ] })
2699
2699
  );
2700
2700
  He.displayName = "Select";
2701
- const at = 280, Nr = ({
2701
+ const it = 280, Nr = ({
2702
2702
  label: e,
2703
2703
  value: t,
2704
2704
  onChange: n,
@@ -2709,7 +2709,7 @@ const at = 280, Nr = ({
2709
2709
  }) => {
2710
2710
  const [d, u] = b(!1), [p, x] = b(""), [N, m] = b(null), y = ee(null), h = ee(null), C = ee(null), F = Q(() => {
2711
2711
  if (!h.current) return null;
2712
- const w = h.current.getBoundingClientRect(), te = window.innerHeight - w.bottom < at && w.top > at;
2712
+ const w = h.current.getBoundingClientRect(), te = window.innerHeight - w.bottom < it && w.top > it;
2713
2713
  return { top: te ? w.top : w.bottom + 4, left: w.left, width: w.width, openUp: te };
2714
2714
  }, []), k = Q(() => {
2715
2715
  if (o) return;
@@ -2740,7 +2740,7 @@ const at = 280, Nr = ({
2740
2740
  (w) => w.label.toLowerCase().includes(p.toLowerCase())
2741
2741
  ), I = (w) => {
2742
2742
  o || n(t.includes(w) ? t.filter((U) => U !== w) : [...t, w]);
2743
- }, q = (w, U) => {
2743
+ }, j = (w, U) => {
2744
2744
  U.stopPropagation(), o || n(t.filter((te) => te !== w));
2745
2745
  }, J = (w) => {
2746
2746
  var U;
@@ -2896,7 +2896,7 @@ const at = 280, Nr = ({
2896
2896
  "button",
2897
2897
  {
2898
2898
  type: "button",
2899
- onClick: (U) => q(w, U),
2899
+ onClick: (U) => j(w, U),
2900
2900
  className: "metakyc-multiselect-chip-remove",
2901
2901
  style: {
2902
2902
  background: "transparent",
@@ -2935,9 +2935,9 @@ const at = 280, Nr = ({
2935
2935
  ]
2936
2936
  }
2937
2937
  ),
2938
- typeof document < "u" && Z ? ct(Z, document.body) : null
2938
+ typeof document < "u" && Z ? Ve(Z, document.body) : null
2939
2939
  ] });
2940
- }, it = 260, We = ({
2940
+ }, st = 260, We = ({
2941
2941
  label: e,
2942
2942
  error: t,
2943
2943
  helperText: n,
@@ -2952,20 +2952,20 @@ const at = 280, Nr = ({
2952
2952
  var D;
2953
2953
  const [x, N] = b(!1), [m, y] = b(""), [h, C] = b(null), F = ee(null), k = ee(null), $ = ee(null), A = ee(null), I = Q(() => {
2954
2954
  if (!k.current) return null;
2955
- const S = k.current.getBoundingClientRect(), X = window.innerHeight - S.bottom < it && S.top > it;
2955
+ const S = k.current.getBoundingClientRect(), X = window.innerHeight - S.bottom < st && S.top > st;
2956
2956
  return {
2957
2957
  top: X ? S.top : S.bottom + 4,
2958
2958
  left: S.left,
2959
2959
  width: S.width,
2960
2960
  openUp: X
2961
2961
  };
2962
- }, []), q = Q(() => {
2962
+ }, []), j = Q(() => {
2963
2963
  if (d) return;
2964
2964
  const S = I();
2965
2965
  S && C(S), N(!0);
2966
2966
  }, [d, I]), J = Q(() => {
2967
2967
  N(!1), y("");
2968
- }, []), E = () => x ? J() : q();
2968
+ }, []), E = () => x ? J() : j();
2969
2969
  ne(() => {
2970
2970
  if (!x) return;
2971
2971
  const S = (H) => {
@@ -3133,7 +3133,7 @@ const at = 280, Nr = ({
3133
3133
  ]
3134
3134
  }
3135
3135
  ),
3136
- typeof document < "u" && B ? ct(B, document.body) : null,
3136
+ typeof document < "u" && B ? Ve(B, document.body) : null,
3137
3137
  t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
3138
3138
  !t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
3139
3139
  ]
@@ -3349,7 +3349,7 @@ const Er = (e) => e.replace(
3349
3349
  * This source code is licensed under the ISC license.
3350
3350
  * See the LICENSE file in the root directory of this source tree.
3351
3351
  */
3352
- const st = (e) => {
3352
+ const ot = (e) => {
3353
3353
  const t = Er(e);
3354
3354
  return t.charAt(0).toUpperCase() + t.slice(1);
3355
3355
  };
@@ -3429,14 +3429,14 @@ const pt = (e, t) => {
3429
3429
  ref: o,
3430
3430
  iconNode: t,
3431
3431
  className: mt(
3432
- `lucide-${Ar(st(e))}`,
3432
+ `lucide-${Ar(ot(e))}`,
3433
3433
  `lucide-${e}`,
3434
3434
  a
3435
3435
  ),
3436
3436
  ...i
3437
3437
  })
3438
3438
  );
3439
- return n.displayName = st(e), n;
3439
+ return n.displayName = ot(e), n;
3440
3440
  };
3441
3441
  /**
3442
3442
  * @license lucide-react v0.574.0 - ISC
@@ -3517,7 +3517,7 @@ const Mr = ({
3517
3517
  return m((g) => ({ ...g, ...E })), Object.keys(E).length === 0;
3518
3518
  }, [k, p]), I = () => {
3519
3519
  A() && h((E) => E + 1);
3520
- }, q = () => {
3520
+ }, j = () => {
3521
3521
  y > 0 ? h((E) => E - 1) : n == null || n();
3522
3522
  }, J = async () => {
3523
3523
  if (!(!A() || !a))
@@ -3581,7 +3581,7 @@ const Mr = ({
3581
3581
  {
3582
3582
  type: "button",
3583
3583
  variant: "outline",
3584
- onClick: q,
3584
+ onClick: j,
3585
3585
  style: { display: "flex", alignItems: "center", gap: "4px" },
3586
3586
  children: [
3587
3587
  /* @__PURE__ */ r(ht, { size: 14 }),
@@ -3871,7 +3871,7 @@ const Ur = ({
3871
3871
  const _ = { ...z };
3872
3872
  return delete _[R], _;
3873
3873
  });
3874
- }, []), q = Q(() => {
3874
+ }, []), j = Q(() => {
3875
3875
  const R = {};
3876
3876
  for (const { criterion: P } of A) {
3877
3877
  const z = Br(P, p[P.id] ?? []);
@@ -3879,11 +3879,11 @@ const Ur = ({
3879
3879
  }
3880
3880
  return m((P) => ({ ...P, ...R })), Object.keys(R).length === 0;
3881
3881
  }, [A, p]), J = () => {
3882
- q() && h((R) => R + 1);
3882
+ j() && h((R) => R + 1);
3883
3883
  }, E = () => {
3884
3884
  y > 0 ? h((R) => R - 1) : n == null || n();
3885
3885
  }, g = async () => {
3886
- if (!(!q() || !a))
3886
+ if (!(!j() || !a))
3887
3887
  try {
3888
3888
  const R = a.map((z) => {
3889
3889
  const _ = (p[z.id] ?? []).filter((O) => O && O.trim());
@@ -3929,7 +3929,7 @@ const Ur = ({
3929
3929
  ] })
3930
3930
  ] }),
3931
3931
  /* @__PURE__ */ r(W, { className: "space-y-6", children: A.map(({ criterion: R }) => /* @__PURE__ */ r(
3932
- qr,
3932
+ jr,
3933
3933
  {
3934
3934
  criterion: R,
3935
3935
  value: p[R.id] ?? [],
@@ -3967,7 +3967,7 @@ const Ur = ({
3967
3967
  ] }),
3968
3968
  d && /* @__PURE__ */ r("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: d.message }) })
3969
3969
  ] }) : null;
3970
- }, qr = ({ criterion: e, value: t, error: n, onChange: a }) => {
3970
+ }, jr = ({ criterion: e, value: t, error: n, onChange: a }) => {
3971
3971
  const i = Hr(e), o = e.valueDataType === Ie.Integer || e.valueDataType === Ie.Decimal || e.valueDataType === Ie.DigitOnly;
3972
3972
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
3973
3973
  /* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
@@ -4084,7 +4084,7 @@ const Ur = ({
4084
4084
  }
4085
4085
  )
4086
4086
  ] });
4087
- }, jr = ({
4087
+ }, qr = ({
4088
4088
  applicantId: e,
4089
4089
  onComplete: t,
4090
4090
  onBack: n
@@ -4227,7 +4227,7 @@ const Ur = ({
4227
4227
  onComplete: t,
4228
4228
  onBack: n
4229
4229
  }) => {
4230
- const { appropriatenessTestService: a } = ye(), [i, o] = b(null), [l, d] = b(!0), [u, p] = b(!1), [x, N] = b(null), [m, y] = b({}), [h, C] = b(0), [F, k] = b(!1), [$, A] = b(!1), [I, q] = b(0);
4230
+ const { appropriatenessTestService: a } = ye(), [i, o] = b(null), [l, d] = b(!0), [u, p] = b(!1), [x, N] = b(null), [m, y] = b({}), [h, C] = b(0), [F, k] = b(!1), [$, A] = b(!1), [I, j] = b(0);
4231
4231
  ne(() => {
4232
4232
  (async () => {
4233
4233
  try {
@@ -4235,7 +4235,7 @@ const Ur = ({
4235
4235
  const M = await a.getAppropriatenessTest(e);
4236
4236
  if (console.log("Appropriateness test data:", M), o(M), M.waitTimeSpanForNextTry && M.waitTimeSpanForNextTry !== "00:00:00") {
4237
4237
  const Z = J(M.waitTimeSpanForNextTry);
4238
- Z > 0 && q(Z);
4238
+ Z > 0 && j(Z);
4239
4239
  }
4240
4240
  } catch (M) {
4241
4241
  console.error("Error loading appropriateness test:", M), N(M.message || "Failed to load appropriateness test");
@@ -4264,7 +4264,7 @@ const Ur = ({
4264
4264
  }, [F, h]), ne(() => {
4265
4265
  if (I <= 0) return;
4266
4266
  const O = setInterval(() => {
4267
- q((M) => M <= 1 ? 0 : M - 1);
4267
+ j((M) => M <= 1 ? 0 : M - 1);
4268
4268
  }, 1e3);
4269
4269
  return () => clearInterval(O);
4270
4270
  }, [I]), ne(() => {
@@ -4321,7 +4321,7 @@ const Ur = ({
4321
4321
  const O = await a.getAppropriatenessTest(e);
4322
4322
  if (console.log("Reloaded test data:", O), o(O), O.waitTimeSpanForNextTry && O.waitTimeSpanForNextTry !== "00:00:00") {
4323
4323
  const M = J(O.waitTimeSpanForNextTry);
4324
- M > 0 && q(M);
4324
+ M > 0 && j(M);
4325
4325
  }
4326
4326
  } catch (O) {
4327
4327
  console.error("Error reloading test data:", O), N((M) => M + `
@@ -4510,7 +4510,7 @@ Failed to reload test data. Please refresh the page.`);
4510
4510
  onBack: n
4511
4511
  }) => {
4512
4512
  var Z, w, U, te;
4513
- const { applicantService: a, baseInformationService: i, config: o } = ye(), { identityData: l, provider: d, token: u, isLoading: p, error: x, requestIdentity: N, restartIdentity: m } = vr(e), [y, h] = b(null), [C, F] = b(null), [k, $] = b([]), [A, I] = b(!0), [q, J] = b(!1), [E, g] = b(null), [R, P] = b(!1), z = ge.useRef(!1), _ = St({
4513
+ const { applicantService: a, baseInformationService: i, config: o } = ye(), { identityData: l, provider: d, token: u, isLoading: p, error: x, requestIdentity: N, restartIdentity: m } = vr(e), [y, h] = b(null), [C, F] = b(null), [k, $] = b([]), [A, I] = b(!0), [j, J] = b(!1), [E, g] = b(null), [R, P] = b(!1), z = ge.useRef(!1), _ = St({
4514
4514
  defaultValues: {
4515
4515
  street: "",
4516
4516
  streetNumber: "",
@@ -4558,8 +4558,8 @@ Failed to reload test data. Please refresh the page.`);
4558
4558
  }
4559
4559
  })();
4560
4560
  }, [e]), ne(() => {
4561
- l && !q && (console.log("[Identity] Identity data already loaded, showing provider"), J(!0));
4562
- }, [l, q]), ne(() => {
4561
+ l && !j && (console.log("[Identity] Identity data already loaded, showing provider"), J(!0));
4562
+ }, [l, j]), ne(() => {
4563
4563
  if (u) {
4564
4564
  if (u.expiresAt) {
4565
4565
  const B = new Date(u.expiresAt).getTime();
@@ -4584,7 +4584,7 @@ Failed to reload test data. Please refresh the page.`);
4584
4584
  }
4585
4585
  }
4586
4586
  }, [u]), ne(() => {
4587
- if (d !== null && u && !y && q && !R) {
4587
+ if (d !== null && u && !y && j && !R) {
4588
4588
  const B = d;
4589
4589
  if (u.url) {
4590
4590
  console.log("[Identity] Loading provider URL for user verification:", u.url), g(null);
@@ -4650,7 +4650,7 @@ Failed to reload test data. Please refresh the page.`);
4650
4650
  console.error("[Identity] Error destroying provider:", B);
4651
4651
  }
4652
4652
  };
4653
- }, [d, u, y, q, t, R]);
4653
+ }, [d, u, y, j, t, R]);
4654
4654
  const O = async () => {
4655
4655
  try {
4656
4656
  g(null), P(!1), await N(), J(!0);
@@ -4674,7 +4674,7 @@ Failed to reload test data. Please refresh the page.`);
4674
4674
  "Error: ",
4675
4675
  x.message
4676
4676
  ] }) }) });
4677
- if (q && (E || R))
4677
+ if (j && (E || R))
4678
4678
  return /* @__PURE__ */ s(K, { children: [
4679
4679
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
4680
4680
  /* @__PURE__ */ s(W, { children: [
@@ -4716,7 +4716,7 @@ Failed to reload test data. Please refresh the page.`);
4716
4716
  /* @__PURE__ */ r(V, { type: "button", onClick: M, disabled: p, children: p ? "Restarting..." : "Restart Verification" })
4717
4717
  ] })
4718
4718
  ] });
4719
- if (q && l) {
4719
+ if (j && l) {
4720
4720
  const B = d;
4721
4721
  return u != null && u.url ? /* @__PURE__ */ s(K, { children: [
4722
4722
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
@@ -4905,7 +4905,7 @@ Failed to reload test data. Please refresh the page.`);
4905
4905
  /* @__PURE__ */ r(V, { type: "submit", isLoading: p, children: "Confirm and Start Verification" })
4906
4906
  ] })
4907
4907
  ] }) });
4908
- }, ot = ({
4908
+ }, lt = ({
4909
4909
  kycStatus: e,
4910
4910
  reviewStatus: t,
4911
4911
  workflowResult: n,
@@ -4955,21 +4955,21 @@ Failed to reload test data. Please refresh the page.`);
4955
4955
  iconBg: "bg-yellow-100 dark:bg-yellow-900/30",
4956
4956
  iconColor: "text-yellow-700 dark:text-yellow-400",
4957
4957
  message: "Your application is currently under manual review."
4958
- } : n === je.Success ? {
4958
+ } : n === qe.Success ? {
4959
4959
  type: "success",
4960
4960
  title: "Process Complete",
4961
4961
  icon: "✓",
4962
4962
  iconBg: "bg-green-100 dark:bg-green-900/30",
4963
4963
  iconColor: "text-green-600 dark:text-green-400",
4964
4964
  message: "Your verification process has been completed successfully."
4965
- } : n === je.Failed ? {
4965
+ } : n === qe.Failed ? {
4966
4966
  type: "error",
4967
4967
  title: "Process Failed",
4968
4968
  icon: "✕",
4969
4969
  iconBg: "bg-red-100 dark:bg-red-900/30",
4970
4970
  iconColor: "text-red-600 dark:text-red-400",
4971
4971
  message: "The verification process could not be completed."
4972
- } : n === je.AdminReview ? {
4972
+ } : n === qe.AdminReview ? {
4973
4973
  type: "pending",
4974
4974
  title: "Admin Review Required",
4975
4975
  icon: "📋",
@@ -5040,7 +5040,7 @@ Failed to reload test data. Please refresh the page.`);
5040
5040
  ] }),
5041
5041
  /* @__PURE__ */ s(pe, { className: "flex justify-center gap-4", children: [
5042
5042
  d.type === "success" && i && /* @__PURE__ */ r(V, { onClick: i, size: "lg", children: "Continue" }),
5043
- d.type === "error" && /* @__PURE__ */ s(lt, { children: [
5043
+ d.type === "error" && /* @__PURE__ */ s(ct, { children: [
5044
5044
  o && /* @__PURE__ */ r(V, { variant: "outline", onClick: o, children: "Contact Support" }),
5045
5045
  i && /* @__PURE__ */ r(V, { onClick: i, children: "Try Again" })
5046
5046
  ] }),
@@ -5083,7 +5083,7 @@ Failed to reload test data. Please refresh the page.`);
5083
5083
  ] }),
5084
5084
  t && /* @__PURE__ */ r("p", { className: "text-sm text-gray-600 dark:text-gray-400 mt-1", children: t })
5085
5085
  ] });
5086
- }, qe = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
5086
+ }, je = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
5087
5087
  function Be(e) {
5088
5088
  return e == null || e === "" || Array.isArray(e) && e.length === 0;
5089
5089
  }
@@ -5101,71 +5101,135 @@ const _e = {
5101
5101
  verticalAlign: "middle"
5102
5102
  }, Qr = ({ helpText: e, children: t }) => {
5103
5103
  const [n, a] = ge.useState(!1);
5104
- return e ? /* @__PURE__ */ s("div", { style: { position: "relative" }, children: [
5105
- /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-end", gap: "6px" }, children: [
5106
- /* @__PURE__ */ r("div", { style: { flex: 1, minWidth: 0 }, children: t }),
5107
- /* @__PURE__ */ r(
5108
- "button",
5104
+ if (!e) return /* @__PURE__ */ r(ct, { children: t });
5105
+ const i = n ? /* @__PURE__ */ r(
5106
+ "div",
5107
+ {
5108
+ role: "dialog",
5109
+ "aria-modal": "true",
5110
+ onClick: () => a(!1),
5111
+ style: {
5112
+ position: "fixed",
5113
+ inset: 0,
5114
+ zIndex: 999999,
5115
+ background: "rgba(0, 0, 0, 0.45)",
5116
+ display: "flex",
5117
+ alignItems: "center",
5118
+ justifyContent: "center",
5119
+ padding: "16px"
5120
+ },
5121
+ children: /* @__PURE__ */ s(
5122
+ "div",
5109
5123
  {
5110
- type: "button",
5111
- onClick: () => a((i) => !i),
5112
- "aria-label": "Help",
5124
+ onClick: (o) => o.stopPropagation(),
5113
5125
  style: {
5114
- flexShrink: 0,
5115
- marginBottom: "8px",
5116
- width: "20px",
5117
- height: "20px",
5118
- borderRadius: "50%",
5119
- border: `1.5px solid ${n ? "var(--metakyc-primary, #10b981)" : "var(--metakyc-border, #e5e7eb)"}`,
5120
- background: n ? "var(--metakyc-primary, #10b981)" : "transparent",
5121
- color: n ? "#fff" : "var(--metakyc-text-muted, #9ca3af)",
5122
- fontSize: "11px",
5123
- fontWeight: "bold",
5124
- cursor: "pointer",
5125
- display: "flex",
5126
- alignItems: "center",
5127
- justifyContent: "center",
5128
- lineHeight: 1,
5129
- transition: "all 0.15s"
5126
+ background: "var(--metakyc-card-bg, #ffffff)",
5127
+ borderRadius: "12px",
5128
+ padding: "28px 24px 24px",
5129
+ maxWidth: "480px",
5130
+ width: "100%",
5131
+ maxHeight: "80vh",
5132
+ overflowY: "auto",
5133
+ boxShadow: "0 24px 64px rgba(0,0,0,0.25)",
5134
+ position: "relative"
5130
5135
  },
5131
- children: "?"
5136
+ children: [
5137
+ /* @__PURE__ */ r(
5138
+ "button",
5139
+ {
5140
+ type: "button",
5141
+ onClick: () => a(!1),
5142
+ "aria-label": "Close",
5143
+ style: {
5144
+ position: "absolute",
5145
+ top: "12px",
5146
+ right: "12px",
5147
+ width: "28px",
5148
+ height: "28px",
5149
+ borderRadius: "50%",
5150
+ border: "1px solid var(--metakyc-border, #e5e7eb)",
5151
+ background: "var(--metakyc-input-bg, #f3f4f6)",
5152
+ color: "var(--metakyc-text-secondary, #6b7280)",
5153
+ fontSize: "16px",
5154
+ cursor: "pointer",
5155
+ display: "flex",
5156
+ alignItems: "center",
5157
+ justifyContent: "center",
5158
+ lineHeight: 1
5159
+ },
5160
+ children: "×"
5161
+ }
5162
+ ),
5163
+ /* @__PURE__ */ r(
5164
+ "div",
5165
+ {
5166
+ style: {
5167
+ color: "var(--metakyc-text-primary, #111827)",
5168
+ fontSize: "14px",
5169
+ lineHeight: 1.75
5170
+ },
5171
+ dangerouslySetInnerHTML: { __html: e }
5172
+ }
5173
+ )
5174
+ ]
5132
5175
  }
5133
5176
  )
5134
- ] }),
5135
- n && /* @__PURE__ */ r(
5136
- "div",
5177
+ }
5178
+ ) : null;
5179
+ return /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", gap: "6px" }, children: [
5180
+ /* @__PURE__ */ r("div", { style: { flex: 1, minWidth: 0 }, children: t }),
5181
+ /* @__PURE__ */ r(
5182
+ "button",
5137
5183
  {
5184
+ type: "button",
5185
+ onClick: () => a(!0),
5186
+ "aria-label": "Help",
5138
5187
  style: {
5139
- marginTop: "4px",
5140
- padding: "8px 10px",
5141
- borderRadius: "6px",
5142
- background: "var(--metakyc-card-bg, #f9fafb)",
5143
- border: "1px solid var(--metakyc-border, #e5e7eb)",
5144
- color: "var(--metakyc-text-secondary, #6b7280)",
5145
- fontSize: "12px",
5146
- lineHeight: 1.6
5188
+ flexShrink: 0,
5189
+ marginTop: "26px",
5190
+ width: "20px",
5191
+ height: "20px",
5192
+ borderRadius: "50%",
5193
+ border: "1.5px solid var(--metakyc-primary, #10b981)",
5194
+ background: "transparent",
5195
+ color: "var(--metakyc-primary, #10b981)",
5196
+ fontSize: "11px",
5197
+ fontWeight: "bold",
5198
+ cursor: "pointer",
5199
+ display: "flex",
5200
+ alignItems: "center",
5201
+ justifyContent: "center",
5202
+ lineHeight: 1,
5203
+ transition: "background 0.15s, color 0.15s"
5204
+ },
5205
+ onMouseEnter: (o) => {
5206
+ o.currentTarget.style.background = "var(--metakyc-primary, #10b981)", o.currentTarget.style.color = "#fff";
5147
5207
  },
5148
- children: e
5208
+ onMouseLeave: (o) => {
5209
+ o.currentTarget.style.background = "transparent", o.currentTarget.style.color = "var(--metakyc-primary, #10b981)";
5210
+ },
5211
+ children: "?"
5149
5212
  }
5150
- )
5151
- ] }) : /* @__PURE__ */ r(lt, { children: t });
5213
+ ),
5214
+ typeof document < "u" && i ? Ve(i, document.body) : null
5215
+ ] });
5152
5216
  }, hn = ({
5153
5217
  workflowKey: e,
5154
5218
  externalRefId: t,
5155
5219
  onSuccess: n,
5156
5220
  onCancel: a
5157
5221
  }) => {
5158
- var Ze, Je, Xe, et;
5159
- const { config: i, baseInformationService: o, currentTheme: l } = ye(), { createApplicant: d, isLoading: u } = wr(), p = e || ((Ze = i.applicantForm) == null ? void 0 : Ze.workflowKey);
5222
+ var Je, Xe, et, tt;
5223
+ const { config: i, baseInformationService: o, currentTheme: l } = ye(), { createApplicant: d, isLoading: u } = wr(), p = e || ((Je = i.applicantForm) == null ? void 0 : Je.workflowKey);
5160
5224
  if (!p)
5161
5225
  throw new Error(
5162
5226
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
5163
5227
  );
5164
- const x = t || ((Je = i.applicantForm) == null ? void 0 : Je.externalRefId) || "", N = ((Xe = i.applicantForm) == null ? void 0 : Xe.email) || "", m = Ee(
5228
+ const x = t || ((Xe = i.applicantForm) == null ? void 0 : Xe.externalRefId) || "", N = ((et = i.applicantForm) == null ? void 0 : et.email) || "", m = Ee(
5165
5229
  () => l != null && l.applicantFormPages && l.applicantFormPages.length > 0 ? l.applicantFormPages : null,
5166
5230
  [l == null ? void 0 : l.applicantFormPages]
5167
5231
  ), y = Ee(() => {
5168
- const c = new Set(qe), T = l == null ? void 0 : l.applicantFormRequiredFields;
5232
+ const c = new Set(je), T = l == null ? void 0 : l.applicantFormRequiredFields;
5169
5233
  if (T) for (const L of T) c.add(L);
5170
5234
  if (m)
5171
5235
  for (const L of m)
@@ -5175,16 +5239,16 @@ const _e = {
5175
5239
  }, [l == null ? void 0 : l.applicantFormRequiredFields, m]), h = Ee(() => {
5176
5240
  var L;
5177
5241
  if (m) {
5178
- const f = m.flatMap((j) => j.fields).filter((j) => !j.isCustom && j.name).map((j) => j.name), v = new Set(f);
5179
- for (const j of qe) v.add(j);
5242
+ const f = m.flatMap((q) => q.fields).filter((q) => !q.isCustom && q.name).map((q) => q.name), v = new Set(f);
5243
+ for (const q of je) v.add(q);
5180
5244
  return Array.from(v);
5181
5245
  }
5182
5246
  let c;
5183
5247
  (L = i.applicantForm) != null && L.visibleFields ? c = i.applicantForm.visibleFields : l != null && l.applicantFormVisibleFields && l.applicantFormVisibleFields.length > 0 ? c = l.applicantFormVisibleFields : c = Ot;
5184
5248
  const T = new Set(c);
5185
- for (const f of qe) T.add(f);
5249
+ for (const f of je) T.add(f);
5186
5250
  return Array.from(T);
5187
- }, [(et = i.applicantForm) == null ? void 0 : et.visibleFields, l == null ? void 0 : l.applicantFormVisibleFields, m]), C = /* @__PURE__ */ new Set([
5251
+ }, [(tt = i.applicantForm) == null ? void 0 : tt.visibleFields, l == null ? void 0 : l.applicantFormVisibleFields, m]), C = /* @__PURE__ */ new Set([
5188
5252
  "country",
5189
5253
  "nationality",
5190
5254
  "taxCountry",
@@ -5202,9 +5266,9 @@ const _e = {
5202
5266
  for (const f of h)
5203
5267
  C.has(f) && c.add((L = Te[f]) == null ? void 0 : L.countriesType);
5204
5268
  return c.size === 0 && c.add(void 0), Array.from(c);
5205
- }, [h, m]), [k, $] = b({}), [A, I] = b(!0), q = ee(!1), J = ee(/* @__PURE__ */ new Set());
5269
+ }, [h, m]), [k, $] = b({}), [A, I] = b(!0), j = ee(!1), J = ee(/* @__PURE__ */ new Set());
5206
5270
  ne(() => {
5207
- if (q.current || F.length === 0) return;
5271
+ if (j.current || F.length === 0) return;
5208
5272
  const c = F.filter((L) => {
5209
5273
  const f = L != null ? String(L) : "all";
5210
5274
  return !J.current.has(f);
@@ -5213,11 +5277,11 @@ const _e = {
5213
5277
  I(!1);
5214
5278
  return;
5215
5279
  }
5216
- q.current = !0, I(!0), (async () => {
5280
+ j.current = !0, I(!0), (async () => {
5217
5281
  try {
5218
5282
  const L = await Promise.all(
5219
5283
  c.map(async (f) => {
5220
- const v = f != null ? String(f) : "all", j = await o.getCountries("", i.locale || "en", f), ae = /* @__PURE__ */ new Set(), ie = j.map((se) => ({ value: se.abbreviation3 || se.abbreviation, label: se.name })).filter((se) => !se.value || ae.has(se.value) ? !1 : (ae.add(se.value), !0));
5284
+ const v = f != null ? String(f) : "all", q = await o.getCountries("", i.locale || "en", f), ae = /* @__PURE__ */ new Set(), ie = q.map((se) => ({ value: se.abbreviation3 || se.abbreviation, label: se.name })).filter((se) => !se.value || ae.has(se.value) ? !1 : (ae.add(se.value), !0));
5221
5285
  return J.current.add(v), [v, ie];
5222
5286
  })
5223
5287
  );
@@ -5225,7 +5289,7 @@ const _e = {
5225
5289
  } catch (L) {
5226
5290
  console.error("Failed to load countries:", L);
5227
5291
  } finally {
5228
- I(!1), q.current = !1;
5292
+ I(!1), j.current = !1;
5229
5293
  }
5230
5294
  })();
5231
5295
  }, [F]);
@@ -5265,14 +5329,14 @@ const _e = {
5265
5329
  if (f.isCustom) {
5266
5330
  if (f.customType === "paragraph" || f.customType === "br" || f.customType === "link") continue;
5267
5331
  if (f.required && f.paramName) {
5268
- const v = P[f.paramName], j = f.displayText || f.label || f.paramName;
5269
- f.customType === "checkbox" || f.customType === "link_checkbox" ? v !== "true" && (T[f.paramName] = `${j} is required.`) : (!v || v.trim() === "") && (T[f.paramName] = `${j} is required.`);
5332
+ const v = P[f.paramName], q = f.displayText || f.label || f.paramName;
5333
+ f.customType === "checkbox" || f.customType === "link_checkbox" ? v !== "true" && (T[f.paramName] = `${q} is required.`) : (!v || v.trim() === "") && (T[f.paramName] = `${q} is required.`);
5270
5334
  }
5271
5335
  } else if (f.name) {
5272
5336
  const v = f.name;
5273
5337
  if (y.includes(v) && Be(g[v])) {
5274
- const j = f.displayText || ((L = Te[v]) == null ? void 0 : L.label) || v;
5275
- T[v] = `${j} is required.`;
5338
+ const q = f.displayText || ((L = Te[v]) == null ? void 0 : L.label) || v;
5339
+ T[v] = `${q} is required.`;
5276
5340
  }
5277
5341
  }
5278
5342
  return T;
@@ -5314,11 +5378,11 @@ const _e = {
5314
5378
  if (H(f)) {
5315
5379
  for (const v of f.fields)
5316
5380
  if (!v.isCustom && v.name) {
5317
- const j = v.name, ae = g[j];
5318
- Be(ae) || (c[j] = ae);
5381
+ const q = v.name, ae = g[q];
5382
+ Be(ae) || (c[q] = ae);
5319
5383
  }
5320
5384
  }
5321
- for (const f of qe)
5385
+ for (const f of je)
5322
5386
  if (c[f] === void 0) {
5323
5387
  const v = g[f];
5324
5388
  Be(v) || (c[f] = v);
@@ -5335,8 +5399,8 @@ const _e = {
5335
5399
  if (H(f)) {
5336
5400
  for (const v of f.fields)
5337
5401
  if (v.isCustom && v.paramName && v.customType !== "paragraph" && v.customType !== "br" && v.customType !== "link") {
5338
- const j = P[v.paramName] ?? "";
5339
- T.push({ paramName: v.paramName, paramValue: j });
5402
+ const q = P[v.paramName] ?? "";
5403
+ T.push({ paramName: v.paramName, paramValue: q });
5340
5404
  }
5341
5405
  }
5342
5406
  }
@@ -5358,11 +5422,11 @@ const _e = {
5358
5422
  return;
5359
5423
  }
5360
5424
  await Ce();
5361
- }, Ve = (c, T, L, f) => {
5362
- var tt;
5425
+ }, Ze = (c, T, L, f) => {
5426
+ var rt;
5363
5427
  const v = Te[c];
5364
5428
  if (!v) return null;
5365
- const j = y.includes(c), ae = M[c], ie = L || v.label, se = T ?? c, ke = { required: j };
5429
+ const q = y.includes(c), ae = M[c], ie = L || v.label, se = T ?? c, ke = { required: q };
5366
5430
  switch (v.type) {
5367
5431
  case "select":
5368
5432
  if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
@@ -5387,7 +5451,7 @@ const _e = {
5387
5451
  {
5388
5452
  ...ke,
5389
5453
  label: ie,
5390
- value: ((tt = g[c]) == null ? void 0 : tt.toString()) || "",
5454
+ value: ((rt = g[c]) == null ? void 0 : rt.toString()) || "",
5391
5455
  onChange: (le) => D(c, le ? Number(le) : null),
5392
5456
  options: [
5393
5457
  { value: "", label: "Select salutation..." },
@@ -5400,7 +5464,7 @@ const _e = {
5400
5464
  se
5401
5465
  );
5402
5466
  if (c === "defaultLanguage") {
5403
- const le = l != null && l.allowedLanguages && l.allowedLanguages.length > 0 ? nt.filter((Re) => l.allowedLanguages.includes(Re.value)) : nt;
5467
+ const le = l != null && l.allowedLanguages && l.allowedLanguages.length > 0 ? at.filter((Re) => l.allowedLanguages.includes(Re.value)) : at;
5404
5468
  return /* @__PURE__ */ r(
5405
5469
  We,
5406
5470
  {
@@ -5627,8 +5691,8 @@ const _e = {
5627
5691
  ]
5628
5692
  }
5629
5693
  ),
5630
- /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((j) => {
5631
- const ae = c.singleSelect ? P[c.paramName] === j.value : v.includes(j.value);
5694
+ /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((q) => {
5695
+ const ae = c.singleSelect ? P[c.paramName] === q.value : v.includes(q.value);
5632
5696
  return /* @__PURE__ */ s(
5633
5697
  "label",
5634
5698
  {
@@ -5642,9 +5706,9 @@ const _e = {
5642
5706
  checked: ae,
5643
5707
  onChange: (ie) => {
5644
5708
  if (c.singleSelect)
5645
- S(c.paramName, ie.target.checked ? j.value : "");
5709
+ S(c.paramName, ie.target.checked ? q.value : "");
5646
5710
  else {
5647
- const se = ie.target.checked ? [...v, j.value] : v.filter((ke) => ke !== j.value);
5711
+ const se = ie.target.checked ? [...v, q.value] : v.filter((ke) => ke !== q.value);
5648
5712
  S(c.paramName, se.join(","));
5649
5713
  }
5650
5714
  },
@@ -5657,12 +5721,12 @@ const _e = {
5657
5721
  {
5658
5722
  className: "metakyc-option-text",
5659
5723
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5660
- children: j.label
5724
+ children: q.label
5661
5725
  }
5662
5726
  )
5663
5727
  ]
5664
5728
  },
5665
- j.value
5729
+ q.value
5666
5730
  );
5667
5731
  }) }),
5668
5732
  L && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: L })
@@ -5753,8 +5817,8 @@ const _e = {
5753
5817
  }
5754
5818
  ),
5755
5819
  L && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: c.fields.map((f, v) => {
5756
- const j = f.colSpan === 1 ? "col-span-1" : f.colSpan === 2 ? "col-span-2" : f.colSpan === 3 ? "col-span-3" : "col-span-4", ae = f.isCustom ? `custom-${v}-${f.paramName}` : `builtin-${f.name}-${v}`;
5757
- return /* @__PURE__ */ r("div", { className: j, children: /* @__PURE__ */ r(Qr, { helpText: f.helpText, children: f.isCustom ? ft(f, v) : Ve(f.name, ae, f.displayText, f.countriesType) }) }, ae);
5820
+ const q = f.colSpan === 1 ? "col-span-1" : f.colSpan === 2 ? "col-span-2" : f.colSpan === 3 ? "col-span-3" : "col-span-4", ae = f.isCustom ? `custom-${v}-${f.paramName}` : `builtin-${f.name}-${v}`;
5821
+ return /* @__PURE__ */ r("div", { className: q, children: /* @__PURE__ */ r(Qr, { helpText: f.helpText, children: f.isCustom ? ft(f, v) : Ze(f.name, ae, f.displayText, f.countriesType) }) }, ae);
5758
5822
  }) })
5759
5823
  ] });
5760
5824
  };
@@ -5764,7 +5828,7 @@ const _e = {
5764
5828
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
5765
5829
  ] }) }) });
5766
5830
  if (m) {
5767
- const c = m[_] ?? m[0], T = Y === -1, L = X === -1, f = m.length, v = H(c), j = Object.values(M);
5831
+ const c = m[_] ?? m[0], T = Y === -1, L = X === -1, f = m.length, v = H(c), q = Object.values(M);
5768
5832
  return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(K, { children: [
5769
5833
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5770
5834
  /* @__PURE__ */ s(W, { children: [
@@ -5794,13 +5858,13 @@ const _e = {
5794
5858
  }
5795
5859
  )
5796
5860
  ] }),
5797
- (w || j.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5861
+ (w || q.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5798
5862
  w && /* @__PURE__ */ s("p", { className: "text-red-600 text-sm", children: [
5799
5863
  /* @__PURE__ */ r("strong", { children: "Error:" }),
5800
5864
  " ",
5801
5865
  w
5802
5866
  ] }),
5803
- j.map((ae, ie) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: ae }, ie))
5867
+ q.map((ae, ie) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: ae }, ie))
5804
5868
  ] }),
5805
5869
  f > 1 && /* @__PURE__ */ s("div", { className: "flex items-center gap-2 mb-4", children: [
5806
5870
  m.map((ae, ie) => /* @__PURE__ */ r(
@@ -5855,7 +5919,7 @@ const _e = {
5855
5919
  " ",
5856
5920
  w
5857
5921
  ] }) }),
5858
- /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: h.map((c) => /* @__PURE__ */ r("div", { className: "col-span-4", children: Ve(c) }, c)) })
5922
+ /* @__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)) })
5859
5923
  ] }),
5860
5924
  /* @__PURE__ */ s(pe, { className: "flex justify-between", children: [
5861
5925
  a && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: a, disabled: te || u, children: "Cancel" }),
@@ -5929,7 +5993,7 @@ const _e = {
5929
5993
  ] }) }) }) });
5930
5994
  if (o.status === xe.Finished || o.status === xe.OnHold)
5931
5995
  return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${i || ""}`, children: /* @__PURE__ */ r(
5932
- ot,
5996
+ lt,
5933
5997
  {
5934
5998
  kycStatus: o.kycStatus,
5935
5999
  reviewStatus: o.reviewStatus,
@@ -5970,7 +6034,7 @@ const _e = {
5970
6034
  return "";
5971
6035
  }
5972
6036
  }, $ = () => {
5973
- const I = d.filter((g) => g.visibility !== !1), q = I.findIndex((g) => g.order === l.order), J = q >= 0 ? q + 1 : 1, E = I.length;
6037
+ const I = d.filter((g) => g.visibility !== !1), j = I.findIndex((g) => g.order === l.order), J = j >= 0 ? j + 1 : 1, E = I.length;
5974
6038
  return /* @__PURE__ */ s("div", { className: "mb-6", children: [
5975
6039
  /* @__PURE__ */ s("div", { className: "flex items-start justify-between mb-4", children: [
5976
6040
  /* @__PURE__ */ r(Ge, {}),
@@ -5982,7 +6046,7 @@ const _e = {
5982
6046
  ] })
5983
6047
  ] }),
5984
6048
  /* @__PURE__ */ r("div", { className: "flex items-center", children: I.map((g, R) => {
5985
- const P = R < q, z = g.order === l.order;
6049
+ const P = R < j, z = g.order === l.order;
5986
6050
  return /* @__PURE__ */ s(ge.Fragment, { children: [
5987
6051
  /* @__PURE__ */ s("div", { className: "flex items-center", children: [
5988
6052
  /* @__PURE__ */ r(
@@ -6033,12 +6097,12 @@ const _e = {
6033
6097
  return /* @__PURE__ */ r(Ur, { ...I });
6034
6098
  case G.AdditionalData:
6035
6099
  case G.InvestorCategorization:
6036
- return /* @__PURE__ */ r(jr, { ...I });
6100
+ return /* @__PURE__ */ r(qr, { ...I });
6037
6101
  case G.AppropriatenessTest:
6038
6102
  return /* @__PURE__ */ r(Kr, { ...I });
6039
6103
  case G.ManualReview:
6040
6104
  return /* @__PURE__ */ r(
6041
- ot,
6105
+ lt,
6042
6106
  {
6043
6107
  kycStatus: o.kycStatus,
6044
6108
  reviewStatus: o.reviewStatus,
@@ -6114,13 +6178,13 @@ function bn(e) {
6114
6178
  }
6115
6179
  const vn = Se.any();
6116
6180
  export {
6117
- nt as ALLOWED_LANGUAGES,
6181
+ at as ALLOWED_LANGUAGES,
6118
6182
  Ct as ApplicantProgressOnHoldReason,
6119
6183
  xe as ApplicantProgressStatus,
6120
6184
  _t as ApplicantService,
6121
6185
  Et as ApplicantStatus,
6122
6186
  Ft as AppropriatenessQuestionType,
6123
- qt as AppropriatenessTestService,
6187
+ jt as AppropriatenessTestService,
6124
6188
  Kr as AppropriatenessTestStep,
6125
6189
  Ae as Badge,
6126
6190
  Yt as BaseInformationService,
@@ -6149,12 +6213,12 @@ export {
6149
6213
  Wr as IdentityVerificationStep,
6150
6214
  me as Input,
6151
6215
  Qt as InvestorCategorizationService,
6152
- jr as InvestorCategorizationStep,
6216
+ qr as InvestorCategorizationStep,
6153
6217
  he as InvestorCategorizationType,
6154
6218
  Mt as InvestorCategoryType,
6155
6219
  It as KycProcessStatus,
6156
6220
  De as KycStatus,
6157
- ot as KycStatusDisplay,
6221
+ lt as KycStatusDisplay,
6158
6222
  gn as KycWorkflow,
6159
6223
  Yr as Logo,
6160
6224
  ut as MetaKYCContext,
@@ -6162,7 +6226,7 @@ export {
6162
6226
  on as MetaKYCProvider,
6163
6227
  Nr as MultiSelect,
6164
6228
  or as OnfidoProvider,
6165
- jt as OverviewService,
6229
+ qt as OverviewService,
6166
6230
  $r as OverviewStep,
6167
6231
  Cr as PhoneInput,
6168
6232
  Ht as QuestionnaireService,
@@ -6186,7 +6250,7 @@ export {
6186
6250
  Rt as UserType,
6187
6251
  Ie as ValueDataType,
6188
6252
  ir as WorkflowOrchestrator,
6189
- je as WorkflowResultType,
6253
+ qe as WorkflowResultType,
6190
6254
  nr as WorkflowState,
6191
6255
  G as WorkflowStepAction,
6192
6256
  vn as appropriatenessTestSchema,