@vpdev2/metakyc-sdk 1.0.98 → 1.0.99

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
@@ -3,12 +3,12 @@ var Bt = (e, t, n) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var me = (e, t, n) => Bt(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import _t from "axios";
5
5
  import * as vt from "react";
6
- import Fe, { createContext as jt, useState as k, useMemo as Ae, useEffect as ye, useContext as Ht, useRef as le, useCallback as J, forwardRef as lt, createElement as gt } from "react";
7
- import { jsx as r, jsxs as i, Fragment as st } from "react/jsx-runtime";
6
+ import Fe, { createContext as jt, useState as k, useMemo as Ae, useEffect as ye, useContext as Ht, useRef as le, useCallback as te, forwardRef as lt, createElement as gt } from "react";
7
+ import { jsx as r, jsxs as i, Fragment as rt } from "react/jsx-runtime";
8
8
  import Ut, { createPortal as ft } from "react-dom";
9
9
  import { useForm as Wt, Controller as qe } from "react-hook-form";
10
10
  import { z as _e } from "zod";
11
- var se = /* @__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))(se || {}), ut = /* @__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))(ut || {}), Te = /* @__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))(Te || {}), Kt = /* @__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))(Kt || {}), qt = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(qt || {}), Ve = /* @__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))(Ve || {}), Ye = /* @__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))(Ye || {}), Vt = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Vt || {}), Yt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(Yt || {}), Le = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(Le || {}), Qt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Qt || {}), pt = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(pt || {}), Gt = /* @__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))(Gt || {}), Jt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Jt || {}), Zt = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Zt || {}), $e = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Money = 2] = "Money", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))($e || {}), Xt = /* @__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))(Xt || {}), er = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(er || {}), Ce = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(Ce || {}), tr = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(tr || {});
11
+ var se = /* @__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))(se || {}), ut = /* @__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))(ut || {}), Te = /* @__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))(Te || {}), Kt = /* @__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))(Kt || {}), qt = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(qt || {}), Ye = /* @__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))(Ye || {}), Ve = /* @__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))(Ve || {}), Yt = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Yt || {}), Vt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(Vt || {}), Le = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(Le || {}), Qt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Qt || {}), pt = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(pt || {}), Gt = /* @__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))(Gt || {}), Jt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Jt || {}), Zt = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Zt || {}), $e = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Money = 2] = "Money", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))($e || {}), Xt = /* @__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))(Xt || {}), er = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(er || {}), Ce = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(Ce || {}), tr = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(tr || {});
12
12
  const Ue = {
13
13
  Nationality: 10,
14
14
  Address: 20,
@@ -144,7 +144,7 @@ class Oe extends Error {
144
144
  this.code = a, this.details = s, this.validationErrors = l, this.name = "MetaKYCError", this.response = c, Object.setPrototypeOf(this, Oe.prototype);
145
145
  }
146
146
  }
147
- class nt {
147
+ class at {
148
148
  /**
149
149
  * Process an error from the API response
150
150
  */
@@ -235,7 +235,7 @@ class sr {
235
235
  });
236
236
  return this.handleResponse(l);
237
237
  } catch (s) {
238
- throw nt.handleAxiosError(s);
238
+ throw at.handleAxiosError(s);
239
239
  }
240
240
  }
241
241
  /**
@@ -246,7 +246,7 @@ class sr {
246
246
  const s = this.buildEndpoint(t, n), l = await this.axiosInstance.post(s, a);
247
247
  return this.handleResponse(l);
248
248
  } catch (s) {
249
- throw nt.handleAxiosError(s);
249
+ throw at.handleAxiosError(s);
250
250
  }
251
251
  }
252
252
  /**
@@ -257,7 +257,7 @@ class sr {
257
257
  const s = this.buildEndpoint(t, n), l = await this.axiosInstance.put(s, a);
258
258
  return this.handleResponse(l);
259
259
  } catch (s) {
260
- throw nt.handleAxiosError(s);
260
+ throw at.handleAxiosError(s);
261
261
  }
262
262
  }
263
263
  /**
@@ -270,7 +270,7 @@ class sr {
270
270
  });
271
271
  return this.handleResponse(l);
272
272
  } catch (s) {
273
- throw nt.handleAxiosError(s);
273
+ throw at.handleAxiosError(s);
274
274
  }
275
275
  }
276
276
  /**
@@ -279,7 +279,7 @@ class sr {
279
279
  handleResponse(t) {
280
280
  const n = t.data;
281
281
  if (!n.success && n.error)
282
- throw nt.handleApiError(n.error);
282
+ throw at.handleApiError(n.error);
283
283
  return n;
284
284
  }
285
285
  /**
@@ -904,7 +904,7 @@ const Ee = {
904
904
  [Ne.Modern]: xr,
905
905
  [Ne.Minimal]: vr
906
906
  };
907
- function at(e) {
907
+ function it(e) {
908
908
  return kr[e] || Ee;
909
909
  }
910
910
  class wr {
@@ -922,8 +922,8 @@ class wr {
922
922
  "GetThemeConfiguration"
923
923
  );
924
924
  if (!n.result.isEnabled)
925
- return at(Ne.Default);
926
- let a = n.result.preset ? at(n.result.preset) : at(Ne.Default);
925
+ return it(Ne.Default);
926
+ let a = n.result.preset ? it(n.result.preset) : it(Ne.Default);
927
927
  if (n.result.title && (a.title = n.result.title), n.result.logo && (a.logo = { ...a.logo, ...n.result.logo }), n.result.colors && (a.colors = { ...a.colors, ...n.result.colors }), n.result.typography && (a.typography = { ...a.typography, ...n.result.typography }), n.result.spacing && (a.spacing = { ...a.spacing, ...n.result.spacing }), n.result.customCSS && (a.customCSS = n.result.customCSS), n.result.darkMode && (a.darkMode = {
928
928
  colors: {
929
929
  ...(t = a.darkMode) == null ? void 0 : t.colors,
@@ -973,7 +973,7 @@ class wr {
973
973
  }
974
974
  return a;
975
975
  } catch (n) {
976
- return console.warn("[ThemeService] Failed to fetch theme configuration:", n), at(Ne.Default);
976
+ return console.warn("[ThemeService] Failed to fetch theme configuration:", n), it(Ne.Default);
977
977
  }
978
978
  }
979
979
  /**
@@ -999,7 +999,7 @@ class wr {
999
999
  * Preview theme (doesn't save)
1000
1000
  */
1001
1001
  getPreviewTheme(t, n) {
1002
- const a = at(t);
1002
+ const a = it(t);
1003
1003
  return n ? {
1004
1004
  ...a,
1005
1005
  ...n,
@@ -1896,19 +1896,19 @@ class Pr {
1896
1896
  }
1897
1897
  const At = jt(null), zn = ({ config: e, children: t }) => {
1898
1898
  const [n, a] = k(null), s = Fe.useRef(!1), l = Fe.useRef(!1), c = Ae(() => {
1899
- const h = new sr(e), m = new or(h), N = new lr(h), T = new cr(h), I = new dr(h), L = new ur(h), f = new pr(h), w = new mr(h), D = new yr(h), U = new hr(h), K = new wr(h), M = new Pr();
1899
+ const h = new sr(e), m = new or(h), I = new lr(h), T = new cr(h), R = new dr(h), L = new ur(h), f = new pr(h), S = new mr(h), D = new yr(h), U = new hr(h), W = new wr(h), M = new Pr();
1900
1900
  return {
1901
1901
  httpClient: h,
1902
1902
  applicantService: m,
1903
- questionnaireService: N,
1903
+ questionnaireService: I,
1904
1904
  uploadDocumentService: T,
1905
- appropriatenessTestService: I,
1905
+ appropriatenessTestService: R,
1906
1906
  overviewService: L,
1907
1907
  riskScoringService: f,
1908
- identityService: w,
1908
+ identityService: S,
1909
1909
  baseInformationService: D,
1910
1910
  investorCategorizationService: U,
1911
- themeService: K,
1911
+ themeService: W,
1912
1912
  themeManager: M
1913
1913
  };
1914
1914
  }, [e]), u = Ae(() => ({
@@ -1987,20 +1987,20 @@ function Bn(e) {
1987
1987
  function Ie(...e) {
1988
1988
  return e.filter(Boolean).join(" ");
1989
1989
  }
1990
- const rt = {
1990
+ const nt = {
1991
1991
  APPLICANT_ID: "metakyc_applicant_id",
1992
1992
  WORKFLOW_STATE: "metakyc_workflow_state"
1993
1993
  };
1994
1994
  function Tr(e) {
1995
1995
  try {
1996
- localStorage.setItem(rt.APPLICANT_ID, e.toString());
1996
+ localStorage.setItem(nt.APPLICANT_ID, e.toString());
1997
1997
  } catch (t) {
1998
1998
  console.warn("Failed to save applicant ID to storage:", t);
1999
1999
  }
2000
2000
  }
2001
2001
  function Dr() {
2002
2002
  try {
2003
- const e = localStorage.getItem(rt.APPLICANT_ID);
2003
+ const e = localStorage.getItem(nt.APPLICANT_ID);
2004
2004
  return e ? parseInt(e, 10) : null;
2005
2005
  } catch (e) {
2006
2006
  return console.warn("Failed to retrieve applicant ID from storage:", e), null;
@@ -2008,21 +2008,21 @@ function Dr() {
2008
2008
  }
2009
2009
  function Mr() {
2010
2010
  try {
2011
- localStorage.removeItem(rt.APPLICANT_ID);
2011
+ localStorage.removeItem(nt.APPLICANT_ID);
2012
2012
  } catch (e) {
2013
2013
  console.warn("Failed to clear applicant ID from storage:", e);
2014
2014
  }
2015
2015
  }
2016
2016
  function zr(e) {
2017
2017
  try {
2018
- localStorage.setItem(rt.WORKFLOW_STATE, JSON.stringify(e));
2018
+ localStorage.setItem(nt.WORKFLOW_STATE, JSON.stringify(e));
2019
2019
  } catch (t) {
2020
2020
  console.warn("Failed to save workflow state to storage:", t);
2021
2021
  }
2022
2022
  }
2023
2023
  function _n() {
2024
2024
  try {
2025
- const e = localStorage.getItem(rt.WORKFLOW_STATE);
2025
+ const e = localStorage.getItem(nt.WORKFLOW_STATE);
2026
2026
  return e ? JSON.parse(e) : null;
2027
2027
  } catch (e) {
2028
2028
  return console.warn("Failed to retrieve workflow state from storage:", e), null;
@@ -2030,7 +2030,7 @@ function _n() {
2030
2030
  }
2031
2031
  function Or() {
2032
2032
  try {
2033
- localStorage.removeItem(rt.WORKFLOW_STATE);
2033
+ localStorage.removeItem(nt.WORKFLOW_STATE);
2034
2034
  } catch (e) {
2035
2035
  console.warn("Failed to clear workflow state from storage:", e);
2036
2036
  }
@@ -2053,43 +2053,43 @@ function $r(e) {
2053
2053
  nextWorkflowKey: n.nextWorkflowKey
2054
2054
  }));
2055
2055
  }, [n, m]);
2056
- const N = le(!1), T = le(!1), I = J(async () => {
2056
+ const I = le(!1), T = le(!1), R = te(async () => {
2057
2057
  if (!(!m || !h.current)) {
2058
- if (N.current) {
2058
+ if (I.current) {
2059
2059
  console.log("[Workflow] Load already in progress, skipping...");
2060
2060
  return;
2061
2061
  }
2062
- N.current = !0, l(!0), u(null);
2062
+ I.current = !0, l(!0), u(null);
2063
2063
  try {
2064
2064
  const M = await h.current.initialize(m);
2065
2065
  a(M), T.current = !0;
2066
2066
  } catch (M) {
2067
2067
  u(M);
2068
2068
  } finally {
2069
- l(!1), N.current = !1;
2069
+ l(!1), I.current = !1;
2070
2070
  }
2071
2071
  }
2072
2072
  }, [m]);
2073
2073
  ye(() => {
2074
- m && !T.current && I();
2075
- }, [m, I]);
2076
- const L = J(async () => {
2074
+ m && !T.current && R();
2075
+ }, [m, R]);
2076
+ const L = te(async () => {
2077
2077
  if (h.current) {
2078
- if (N.current) {
2078
+ if (I.current) {
2079
2079
  console.log("[Workflow] Refresh already in progress, skipping...");
2080
2080
  return;
2081
2081
  }
2082
- N.current = !0, l(!0), u(null);
2082
+ I.current = !0, l(!0), u(null);
2083
2083
  try {
2084
2084
  const M = await h.current.refreshProgress();
2085
2085
  a(M);
2086
2086
  } catch (M) {
2087
2087
  u(M);
2088
2088
  } finally {
2089
- l(!1), N.current = !1;
2089
+ l(!1), I.current = !1;
2090
2090
  }
2091
2091
  }
2092
- }, []), f = J(async () => {
2092
+ }, []), f = te(async () => {
2093
2093
  if (h.current) {
2094
2094
  l(!0), u(null);
2095
2095
  try {
@@ -2101,7 +2101,7 @@ function $r(e) {
2101
2101
  l(!1);
2102
2102
  }
2103
2103
  }
2104
- }, []), w = J(async () => {
2104
+ }, []), S = te(async () => {
2105
2105
  if (h.current) {
2106
2106
  l(!0), u(null);
2107
2107
  try {
@@ -2113,7 +2113,7 @@ function $r(e) {
2113
2113
  l(!1);
2114
2114
  }
2115
2115
  }
2116
- }, []), D = J(async (M) => {
2116
+ }, []), D = te(async (M) => {
2117
2117
  if (h.current) {
2118
2118
  l(!0), u(null);
2119
2119
  try {
@@ -2126,7 +2126,7 @@ function $r(e) {
2126
2126
  l(!1);
2127
2127
  }
2128
2128
  }
2129
- }, []), U = vt.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((M, B) => M.order - B.order) : [], [n == null ? void 0 : n.stepInfoList]), K = vt.useMemo(() => n ? n.nextWorkflowKey && n.nextWorkflowKey !== n.workFlowKey : !1, [n]);
2129
+ }, []), U = vt.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((M, B) => M.order - B.order) : [], [n == null ? void 0 : n.stepInfoList]), W = vt.useMemo(() => n ? n.nextWorkflowKey && n.nextWorkflowKey !== n.workFlowKey : !1, [n]);
2130
2130
  return {
2131
2131
  progress: n,
2132
2132
  applicantId: m,
@@ -2136,63 +2136,63 @@ function $r(e) {
2136
2136
  workflowResult: (n == null ? void 0 : n.workflowResult) || null,
2137
2137
  workflowKey: n == null ? void 0 : n.workFlowKey,
2138
2138
  nextWorkflowKey: n == null ? void 0 : n.nextWorkflowKey,
2139
- hasWorkflowChanged: K,
2139
+ hasWorkflowChanged: W,
2140
2140
  isLoading: s,
2141
2141
  error: c,
2142
2142
  isComplete: (n == null ? void 0 : n.status) === Te.Finished,
2143
2143
  isOnHold: (n == null ? void 0 : n.status) === Te.OnHold,
2144
2144
  refreshProgress: L,
2145
2145
  moveToNext: f,
2146
- moveBack: w,
2146
+ moveBack: S,
2147
2147
  submitCurrentStep: D,
2148
2148
  orchestrator: h.current
2149
2149
  };
2150
2150
  }
2151
2151
  function Br(e) {
2152
- const { questionnaireService: t, applicantService: n } = Re(), [a, s] = k(null), [l, c] = k({}), [u, h] = k(!1), [m, N] = k(!1), [T, I] = k(null), L = le(!1), f = le(null), w = J(async () => {
2153
- var U, K;
2152
+ const { questionnaireService: t, applicantService: n } = Re(), [a, s] = k(null), [l, c] = k({}), [u, h] = k(!1), [m, I] = k(!1), [T, R] = k(null), L = le(!1), f = le(null), S = te(async () => {
2153
+ var U, W;
2154
2154
  if (e) {
2155
2155
  if (L.current) {
2156
2156
  console.log("[Questionnaire] Load already in progress, skipping...");
2157
2157
  return;
2158
2158
  }
2159
- L.current = !0, h(!0), I(null);
2159
+ L.current = !0, h(!0), R(null);
2160
2160
  try {
2161
2161
  const [M, B] = await Promise.all([
2162
2162
  t.getQuestionnaire(e),
2163
2163
  n.getApplicantData(e).catch(() => null)
2164
2164
  ]);
2165
2165
  if (s(M), (U = B == null ? void 0 : B.questionnaireResults) != null && U.length && M) {
2166
- const Y = /* @__PURE__ */ new Map();
2166
+ const G = /* @__PURE__ */ new Map();
2167
2167
  for (const b of B.questionnaireResults)
2168
- b.question && ((K = b.answers) != null && K.length) && Y.set(b.question.trim().toLowerCase(), b.answers);
2169
- const Q = {}, E = M.questionGroups.flatMap((b) => b.questions ?? []);
2170
- for (const b of E) {
2171
- const _ = b.text.trim().toLowerCase();
2172
- Y.has(_) && (Q[b.id] = Y.get(_));
2168
+ b.question && ((W = b.answers) != null && W.length) && G.set(b.question.trim().toLowerCase(), b.answers);
2169
+ const J = {}, F = M.questionGroups.flatMap((b) => b.questions ?? []);
2170
+ for (const b of F) {
2171
+ const $ = b.text.trim().toLowerCase();
2172
+ G.has($) && (J[b.id] = G.get($));
2173
2173
  }
2174
- c(Q);
2174
+ c(J);
2175
2175
  }
2176
2176
  f.current = e;
2177
2177
  } catch (M) {
2178
- I(M);
2178
+ R(M);
2179
2179
  } finally {
2180
2180
  h(!1), L.current = !1;
2181
2181
  }
2182
2182
  }
2183
2183
  }, [e, t, n]);
2184
2184
  ye(() => {
2185
- e && f.current !== e && w();
2185
+ e && f.current !== e && S();
2186
2186
  }, [e]);
2187
- const D = J(
2187
+ const D = te(
2188
2188
  async (U) => {
2189
- N(!0), I(null);
2189
+ I(!0), R(null);
2190
2190
  try {
2191
2191
  return await t.fillQuestionnaire(U);
2192
- } catch (K) {
2193
- throw I(K), K;
2192
+ } catch (W) {
2193
+ throw R(W), W;
2194
2194
  } finally {
2195
- N(!1);
2195
+ I(!1);
2196
2196
  }
2197
2197
  },
2198
2198
  [t]
@@ -2203,32 +2203,32 @@ function Br(e) {
2203
2203
  isLoading: u,
2204
2204
  isSubmitting: m,
2205
2205
  error: T,
2206
- load: w,
2206
+ load: S,
2207
2207
  submit: D
2208
2208
  };
2209
2209
  }
2210
2210
  function _r(e) {
2211
- const { uploadDocumentService: t } = Re(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(0), [N, T] = k(null), I = le(!1), L = le(null), f = J(async () => {
2211
+ const { uploadDocumentService: t } = Re(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(0), [I, T] = k(null), R = le(!1), L = le(null), f = te(async () => {
2212
2212
  if (e) {
2213
- if (I.current) {
2213
+ if (R.current) {
2214
2214
  console.log("[UploadDocument] Load already in progress, skipping...");
2215
2215
  return;
2216
2216
  }
2217
- I.current = !0, l(!0), T(null);
2217
+ R.current = !0, l(!0), T(null);
2218
2218
  try {
2219
2219
  const D = await t.getUploadDocument(e);
2220
2220
  a(D), L.current = e;
2221
2221
  } catch (D) {
2222
2222
  T(D);
2223
2223
  } finally {
2224
- l(!1), I.current = !1;
2224
+ l(!1), R.current = !1;
2225
2225
  }
2226
2226
  }
2227
2227
  }, [e, t]);
2228
2228
  ye(() => {
2229
2229
  e && L.current !== e && f();
2230
2230
  }, [e]);
2231
- const w = J(
2231
+ const S = te(
2232
2232
  async (D) => {
2233
2233
  u(!0), m(0), T(null);
2234
2234
  try {
@@ -2246,33 +2246,33 @@ function _r(e) {
2246
2246
  isLoading: s,
2247
2247
  isSubmitting: c,
2248
2248
  uploadProgress: h,
2249
- error: N,
2249
+ error: I,
2250
2250
  load: f,
2251
- submit: w
2251
+ submit: S
2252
2252
  };
2253
2253
  }
2254
2254
  function Hn(e) {
2255
- const { appropriatenessTestService: t } = Re(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(null), [N, T] = k(null), I = le(!1), L = le(null), f = J(async () => {
2255
+ const { appropriatenessTestService: t } = Re(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(null), [I, T] = k(null), R = le(!1), L = le(null), f = te(async () => {
2256
2256
  if (e) {
2257
- if (I.current) {
2257
+ if (R.current) {
2258
2258
  console.log("[AppropriatenessTest] Load already in progress, skipping...");
2259
2259
  return;
2260
2260
  }
2261
- I.current = !0, l(!0), m(null);
2261
+ R.current = !0, l(!0), m(null);
2262
2262
  try {
2263
2263
  const D = await t.getAppropriatenessTest(e);
2264
2264
  a(D), L.current = e;
2265
2265
  } catch (D) {
2266
2266
  m(D);
2267
2267
  } finally {
2268
- l(!1), I.current = !1;
2268
+ l(!1), R.current = !1;
2269
2269
  }
2270
2270
  }
2271
2271
  }, [e, t]);
2272
2272
  ye(() => {
2273
2273
  e && L.current !== e && f();
2274
2274
  }, [e]);
2275
- const w = J(
2275
+ const S = te(
2276
2276
  async (D) => {
2277
2277
  u(!0), m(null);
2278
2278
  try {
@@ -2288,36 +2288,36 @@ function Hn(e) {
2288
2288
  );
2289
2289
  return {
2290
2290
  test: n,
2291
- result: N,
2291
+ result: I,
2292
2292
  isLoading: s,
2293
2293
  isSubmitting: c,
2294
2294
  error: h,
2295
2295
  load: f,
2296
- submit: w
2296
+ submit: S
2297
2297
  };
2298
2298
  }
2299
2299
  function jr(e) {
2300
- const { overviewService: t } = Re(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(null), N = le(!1), T = le(null), I = J(async () => {
2300
+ const { overviewService: t } = Re(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(null), I = le(!1), T = le(null), R = te(async () => {
2301
2301
  if (e) {
2302
- if (N.current) {
2302
+ if (I.current) {
2303
2303
  console.log("[Overview] Load already in progress, skipping...");
2304
2304
  return;
2305
2305
  }
2306
- N.current = !0, l(!0), m(null);
2306
+ I.current = !0, l(!0), m(null);
2307
2307
  try {
2308
2308
  const f = await t.getOverviewData(e);
2309
2309
  a(f), T.current = e;
2310
2310
  } catch (f) {
2311
2311
  m(f);
2312
2312
  } finally {
2313
- l(!1), N.current = !1;
2313
+ l(!1), I.current = !1;
2314
2314
  }
2315
2315
  }
2316
2316
  }, [e, t]);
2317
2317
  ye(() => {
2318
- e && T.current !== e && I();
2318
+ e && T.current !== e && R();
2319
2319
  }, [e]);
2320
- const L = J(async () => {
2320
+ const L = te(async () => {
2321
2321
  if (e) {
2322
2322
  u(!0), m(null);
2323
2323
  try {
@@ -2334,15 +2334,15 @@ function jr(e) {
2334
2334
  isLoading: s,
2335
2335
  isSubmitting: c,
2336
2336
  error: h,
2337
- load: I,
2337
+ load: R,
2338
2338
  passOverview: L
2339
2339
  };
2340
2340
  }
2341
2341
  function Hr(e) {
2342
2342
  const { identityService: t } = Re(), [n, a] = k(
2343
2343
  null
2344
- ), [s, l] = k(!1), [c, u] = k(null), h = le(!1), m = J(
2345
- async (I, L) => {
2344
+ ), [s, l] = k(!1), [c, u] = k(null), h = le(!1), m = te(
2345
+ async (R, L) => {
2346
2346
  if (e) {
2347
2347
  if (h.current) {
2348
2348
  console.log("[Identity] Request already in progress, skipping...");
@@ -2353,13 +2353,13 @@ function Hr(e) {
2353
2353
  const f = {
2354
2354
  applicantId: e,
2355
2355
  restart: !1,
2356
- redirectUrl: I || "",
2356
+ redirectUrl: R || "",
2357
2357
  ttl: L || 604800
2358
2358
  // Default: 7 days
2359
2359
  };
2360
2360
  console.log("Identity request input:", f);
2361
- const w = await t.identityRequest(f);
2362
- return console.log("Identity request result:", w), a(w), w;
2361
+ const S = await t.identityRequest(f);
2362
+ return console.log("Identity request result:", S), a(S), S;
2363
2363
  } catch (f) {
2364
2364
  throw u(f), f;
2365
2365
  } finally {
@@ -2368,18 +2368,18 @@ function Hr(e) {
2368
2368
  }
2369
2369
  },
2370
2370
  [e, t]
2371
- ), N = J(
2372
- async (I, L) => {
2371
+ ), I = te(
2372
+ async (R, L) => {
2373
2373
  if (e) {
2374
2374
  l(!0), u(null);
2375
2375
  try {
2376
2376
  const f = {
2377
2377
  applicantId: e,
2378
2378
  restart: !1,
2379
- redirectUrl: I,
2379
+ redirectUrl: R,
2380
2380
  ttl: L
2381
- }, w = await t.identityCompanyRequest(f);
2382
- return a(w), w;
2381
+ }, S = await t.identityCompanyRequest(f);
2382
+ return a(S), S;
2383
2383
  } catch (f) {
2384
2384
  throw u(f), f;
2385
2385
  } finally {
@@ -2388,7 +2388,7 @@ function Hr(e) {
2388
2388
  }
2389
2389
  },
2390
2390
  [e, t]
2391
- ), T = J(async () => {
2391
+ ), T = te(async () => {
2392
2392
  if (e) {
2393
2393
  if (h.current) {
2394
2394
  console.log("[Identity] Restart already in progress, skipping...");
@@ -2396,18 +2396,18 @@ function Hr(e) {
2396
2396
  }
2397
2397
  h.current = !0, l(!0), u(null);
2398
2398
  try {
2399
- const I = {
2399
+ const R = {
2400
2400
  applicantId: e,
2401
2401
  restart: !0,
2402
2402
  redirectUrl: "",
2403
2403
  ttl: 604800
2404
2404
  // 7 days
2405
2405
  };
2406
- console.log("Restarting identity with input:", I);
2407
- const L = await t.identityRequest(I);
2406
+ console.log("Restarting identity with input:", R);
2407
+ const L = await t.identityRequest(R);
2408
2408
  return console.log("Restart identity result:", L), a(L), L;
2409
- } catch (I) {
2410
- throw u(I), I;
2409
+ } catch (R) {
2410
+ throw u(R), R;
2411
2411
  } finally {
2412
2412
  l(!1), h.current = !1;
2413
2413
  }
@@ -2420,56 +2420,56 @@ function Hr(e) {
2420
2420
  isLoading: s,
2421
2421
  error: c,
2422
2422
  requestIdentity: m,
2423
- requestCompanyIdentity: N,
2423
+ requestCompanyIdentity: I,
2424
2424
  restartIdentity: T
2425
2425
  };
2426
2426
  }
2427
2427
  function Ur(e) {
2428
- const { riskScoringService: t, applicantService: n } = Re(), [a, s] = k(null), [l, c] = k({}), [u, h] = k(!1), [m, N] = k(!1), [T, I] = k(null), [L, f] = k(null), w = le(!1), D = le(null), U = J(async () => {
2428
+ const { riskScoringService: t, applicantService: n } = Re(), [a, s] = k(null), [l, c] = k({}), [u, h] = k(!1), [m, I] = k(!1), [T, R] = k(null), [L, f] = k(null), S = le(!1), D = le(null), U = te(async () => {
2429
2429
  var M;
2430
2430
  if (e) {
2431
- if (w.current) {
2431
+ if (S.current) {
2432
2432
  console.log("[RiskScoring] Load already in progress, skipping...");
2433
2433
  return;
2434
2434
  }
2435
- w.current = !0, h(!0), I(null);
2435
+ S.current = !0, h(!0), R(null);
2436
2436
  try {
2437
- const [B, Y] = await Promise.all([
2437
+ const [B, G] = await Promise.all([
2438
2438
  t.getRiskCriterias(e),
2439
2439
  n.getApplicantData(e).catch(() => null)
2440
2440
  ]);
2441
- if (s(B), (M = Y == null ? void 0 : Y.riskScoringResults) != null && M.length) {
2442
- const Q = Y.riskScoringResults[0], E = {};
2443
- for (const b of Q.riskCriteriaResults ?? [])
2441
+ if (s(B), (M = G == null ? void 0 : G.riskScoringResults) != null && M.length) {
2442
+ const J = G.riskScoringResults[0], F = {};
2443
+ for (const b of J.riskCriteriaResults ?? [])
2444
2444
  if (b.riskCriteriaId != null && b.answer != null && b.answer !== "") {
2445
- const _ = [...new Set(
2445
+ const $ = [...new Set(
2446
2446
  b.answer.split(",").map((H) => H.trim()).filter((H) => H !== "")
2447
2447
  )];
2448
- _.length > 0 && (E[b.riskCriteriaId] = _);
2448
+ $.length > 0 && (F[b.riskCriteriaId] = $);
2449
2449
  }
2450
- c(E);
2450
+ c(F);
2451
2451
  }
2452
2452
  D.current = e;
2453
2453
  } catch (B) {
2454
- I(B);
2454
+ R(B);
2455
2455
  } finally {
2456
- h(!1), w.current = !1;
2456
+ h(!1), S.current = !1;
2457
2457
  }
2458
2458
  }
2459
2459
  }, [e, t, n]);
2460
2460
  ye(() => {
2461
2461
  e && D.current !== e && U();
2462
2462
  }, [e]);
2463
- const K = J(
2463
+ const W = te(
2464
2464
  async (M) => {
2465
- N(!0), I(null);
2465
+ I(!0), R(null);
2466
2466
  try {
2467
2467
  const B = await t.submitRiskScoring(M);
2468
2468
  return f(B), B;
2469
2469
  } catch (B) {
2470
- throw I(B), B;
2470
+ throw R(B), B;
2471
2471
  } finally {
2472
- N(!1);
2472
+ I(!1);
2473
2473
  }
2474
2474
  },
2475
2475
  [t]
@@ -2482,14 +2482,14 @@ function Ur(e) {
2482
2482
  isSubmitting: m,
2483
2483
  error: T,
2484
2484
  load: U,
2485
- submit: K
2485
+ submit: W
2486
2486
  };
2487
2487
  }
2488
2488
  function Pt() {
2489
2489
  const { applicantService: e, config: t } = Re(), [n, a] = k(!1), [s, l] = k(null), c = le(!1), u = le(!1), h = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(L) {
2490
2490
  const f = Math.random() * 16 | 0;
2491
2491
  return (L === "x" ? f : f & 3 | 8).toString(16);
2492
- }), m = J(
2492
+ }), m = te(
2493
2493
  async (L) => {
2494
2494
  var f;
2495
2495
  if (c.current)
@@ -2504,14 +2504,14 @@ function Pt() {
2504
2504
  });
2505
2505
  }
2506
2506
  return await e.createApplicant(L);
2507
- } catch (w) {
2508
- throw l(w), w;
2507
+ } catch (S) {
2508
+ throw l(S), S;
2509
2509
  } finally {
2510
2510
  a(!1), c.current = !1;
2511
2511
  }
2512
2512
  },
2513
2513
  [e, t]
2514
- ), N = J(
2514
+ ), I = te(
2515
2515
  async (L) => {
2516
2516
  a(!0), l(null);
2517
2517
  try {
@@ -2523,7 +2523,7 @@ function Pt() {
2523
2523
  }
2524
2524
  },
2525
2525
  [e]
2526
- ), T = J(
2526
+ ), T = te(
2527
2527
  async (L) => {
2528
2528
  if (u.current)
2529
2529
  throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
@@ -2537,7 +2537,7 @@ function Pt() {
2537
2537
  }
2538
2538
  },
2539
2539
  [e]
2540
- ), I = J(
2540
+ ), R = te(
2541
2541
  async (L) => {
2542
2542
  a(!0), l(null);
2543
2543
  try {
@@ -2554,9 +2554,9 @@ function Pt() {
2554
2554
  isLoading: n,
2555
2555
  error: s,
2556
2556
  createApplicant: m,
2557
- createCompanyApplicant: N,
2557
+ createCompanyApplicant: I,
2558
2558
  getApplicantData: T,
2559
- stopProgress: I
2559
+ stopProgress: R
2560
2560
  };
2561
2561
  }
2562
2562
  const Wr = {
@@ -2585,7 +2585,7 @@ const Wr = {
2585
2585
  color: "var(--metakyc-text-secondary, #6b7280)",
2586
2586
  borderColor: "transparent"
2587
2587
  }
2588
- }, G = ({
2588
+ }, V = ({
2589
2589
  children: e,
2590
2590
  variant: t = "primary",
2591
2591
  size: n = "md",
@@ -2683,7 +2683,7 @@ const Wr = {
2683
2683
  ] })
2684
2684
  );
2685
2685
  fe.displayName = "Input";
2686
- const ee = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2686
+ const X = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2687
2687
  "div",
2688
2688
  {
2689
2689
  className: Ie(
@@ -2707,7 +2707,7 @@ const ee = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2707
2707
  ...n,
2708
2708
  children: e
2709
2709
  }
2710
- ), te = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r("div", { className: Ie("px-6 py-4", t), ...n, children: e }), ke = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2710
+ ), ee = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r("div", { className: Ie("px-6 py-4", t), ...n, children: e }), xe = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2711
2711
  "div",
2712
2712
  {
2713
2713
  className: Ie("px-6 py-4 border-t", t),
@@ -2832,7 +2832,7 @@ const ee = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2832
2832
  },
2833
2833
  "__placeholder__"
2834
2834
  ),
2835
- a.map((m, N) => /* @__PURE__ */ r(
2835
+ a.map((m, I) => /* @__PURE__ */ r(
2836
2836
  "option",
2837
2837
  {
2838
2838
  value: m.value,
@@ -2843,7 +2843,7 @@ const ee = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2843
2843
  },
2844
2844
  children: m.label
2845
2845
  },
2846
- m.value || `option-${N}`
2846
+ m.value || `option-${I}`
2847
2847
  ))
2848
2848
  ]
2849
2849
  }
@@ -2862,7 +2862,7 @@ const wt = 280, qr = ({
2862
2862
  disabled: l = !1,
2863
2863
  required: c = !1
2864
2864
  }) => {
2865
- const [u, h] = k(!1), [m, N] = k(""), [T, I] = k(null), [L, f] = k({
2865
+ const [u, h] = k(!1), [m, I] = k(""), [T, R] = k(null), [L, f] = k({
2866
2866
  bg: "#ffffff",
2867
2867
  borderColor: "#d1d5db",
2868
2868
  textPrimary: "#111827",
@@ -2870,57 +2870,57 @@ const wt = 280, qr = ({
2870
2870
  primaryColor: "#2563eb",
2871
2871
  primaryLight: "#eff6ff",
2872
2872
  hoverBg: "#f9fafb"
2873
- }), w = le(null), D = le(null), U = le(null), K = J(() => {
2873
+ }), S = le(null), D = le(null), U = le(null), W = te(() => {
2874
2874
  if (!D.current) return null;
2875
- const P = D.current.getBoundingClientRect(), $ = window.innerHeight - P.bottom < wt && P.top > wt;
2876
- return { top: $ ? P.top : P.bottom + 4, left: P.left, width: P.width, openUp: $ };
2877
- }, []), M = J(() => {
2878
- const P = getComputedStyle(document.documentElement), W = (V, ne) => P.getPropertyValue(V).trim() || ne, $ = W("--metakyc-input-bg", W("--metakyc-background", "#ffffff"));
2875
+ const P = D.current.getBoundingClientRect(), Z = window.innerHeight - P.bottom < wt && P.top > wt;
2876
+ return { top: Z ? P.top : P.bottom + 4, left: P.left, width: P.width, openUp: Z };
2877
+ }, []), M = te(() => {
2878
+ const P = getComputedStyle(document.documentElement), K = (ue, j) => P.getPropertyValue(ue).trim() || j, Z = K("--metakyc-input-bg", K("--metakyc-background", "#ffffff"));
2879
2879
  f({
2880
- bg: $,
2881
- borderColor: W("--metakyc-input-border", W("--metakyc-border", "#d1d5db")),
2882
- textPrimary: W("--metakyc-input-text", W("--metakyc-text-primary", "#111827")),
2883
- textSecondary: W("--metakyc-text-secondary", "#6b7280"),
2884
- primaryColor: W("--metakyc-primary", "#2563eb"),
2885
- primaryLight: W("--metakyc-primary-light", "#eff6ff"),
2886
- hoverBg: W("--metakyc-surface", $)
2880
+ bg: Z,
2881
+ borderColor: K("--metakyc-input-border", K("--metakyc-border", "#d1d5db")),
2882
+ textPrimary: K("--metakyc-input-text", K("--metakyc-text-primary", "#111827")),
2883
+ textSecondary: K("--metakyc-text-secondary", "#6b7280"),
2884
+ primaryColor: K("--metakyc-primary", "#2563eb"),
2885
+ primaryLight: K("--metakyc-primary-light", "#eff6ff"),
2886
+ hoverBg: K("--metakyc-surface", Z)
2887
2887
  });
2888
- }, []), B = J(() => {
2888
+ }, []), B = te(() => {
2889
2889
  if (l) return;
2890
2890
  M();
2891
- const P = K();
2892
- P && I(P), h(!0);
2893
- }, [l, K, M]), Y = J(() => {
2894
- h(!1), N("");
2891
+ const P = W();
2892
+ P && R(P), h(!0);
2893
+ }, [l, W, M]), G = te(() => {
2894
+ h(!1), I("");
2895
2895
  }, []);
2896
2896
  ye(() => {
2897
2897
  if (!u) return;
2898
- const P = (W) => {
2899
- var V, ne;
2900
- const $ = W.target;
2901
- !((V = w.current) != null && V.contains($)) && !((ne = U.current) != null && ne.contains($)) && Y();
2898
+ const P = (K) => {
2899
+ var ue, j;
2900
+ const Z = K.target;
2901
+ !((ue = S.current) != null && ue.contains(Z)) && !((j = U.current) != null && j.contains(Z)) && G();
2902
2902
  };
2903
2903
  return document.addEventListener("mousedown", P), () => document.removeEventListener("mousedown", P);
2904
- }, [u, Y]), ye(() => {
2904
+ }, [u, G]), ye(() => {
2905
2905
  if (!u) return;
2906
2906
  const P = () => {
2907
- const W = K();
2908
- W && I(W);
2907
+ const K = W();
2908
+ K && R(K);
2909
2909
  };
2910
2910
  return window.addEventListener("scroll", P, !0), window.addEventListener("resize", P), () => {
2911
2911
  window.removeEventListener("scroll", P, !0), window.removeEventListener("resize", P);
2912
2912
  };
2913
- }, [u, K]);
2914
- const Q = a.filter(
2913
+ }, [u, W]);
2914
+ const J = a.filter(
2915
2915
  (P) => P.label.toLowerCase().includes(m.toLowerCase())
2916
- ), E = (P) => {
2917
- l || n(t.includes(P) ? t.filter((W) => W !== P) : [...t, P]);
2918
- }, b = (P, W) => {
2919
- W.stopPropagation(), l || n(t.filter(($) => $ !== P));
2920
- }, _ = (P) => {
2921
- var W;
2922
- return ((W = a.find(($) => $.value === P)) == null ? void 0 : W.label) || P;
2923
- }, { bg: H, borderColor: z, textPrimary: O, textSecondary: Z, primaryColor: re, primaryLight: ce, hoverBg: he } = L, ue = u && T && /* @__PURE__ */ i(
2916
+ ), F = (P) => {
2917
+ l || n(t.includes(P) ? t.filter((K) => K !== P) : [...t, P]);
2918
+ }, b = (P, K) => {
2919
+ K.stopPropagation(), l || n(t.filter((Z) => Z !== P));
2920
+ }, $ = (P) => {
2921
+ var K;
2922
+ return ((K = a.find((Z) => Z.value === P)) == null ? void 0 : K.label) || P;
2923
+ }, { bg: H, borderColor: z, textPrimary: O, textSecondary: ne, primaryColor: ae, primaryLight: re, hoverBg: he } = L, de = u && T && /* @__PURE__ */ i(
2924
2924
  "div",
2925
2925
  {
2926
2926
  ref: U,
@@ -2944,7 +2944,7 @@ const wt = 280, qr = ({
2944
2944
  {
2945
2945
  type: "text",
2946
2946
  value: m,
2947
- onChange: (P) => N(P.target.value),
2947
+ onChange: (P) => I(P.target.value),
2948
2948
  placeholder: "Search...",
2949
2949
  autoFocus: !0,
2950
2950
  onClick: (P) => P.stopPropagation(),
@@ -2962,20 +2962,20 @@ const wt = 280, qr = ({
2962
2962
  boxSizing: "border-box"
2963
2963
  },
2964
2964
  onFocus: (P) => {
2965
- const W = getComputedStyle(document.documentElement), $ = W.getPropertyValue("--metakyc-input-border-focus").trim() || W.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
2966
- P.currentTarget.style.backgroundColor = H, P.currentTarget.style.color = O, P.currentTarget.style.borderColor = $, P.currentTarget.style.outline = "none", P.currentTarget.style.boxShadow = `0 0 0 2px ${$}33`;
2965
+ const K = getComputedStyle(document.documentElement), Z = K.getPropertyValue("--metakyc-input-border-focus").trim() || K.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
2966
+ P.currentTarget.style.backgroundColor = H, P.currentTarget.style.color = O, P.currentTarget.style.borderColor = Z, P.currentTarget.style.outline = "none", P.currentTarget.style.boxShadow = `0 0 0 2px ${Z}33`;
2967
2967
  },
2968
2968
  onBlur: (P) => {
2969
2969
  P.currentTarget.style.backgroundColor = H, P.currentTarget.style.color = O, P.currentTarget.style.borderColor = z, P.currentTarget.style.outline = "none", P.currentTarget.style.boxShadow = "none";
2970
2970
  }
2971
2971
  }
2972
2972
  ) }),
2973
- /* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: Q.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: Z }, children: "No results" }) : Q.map((P) => {
2974
- const W = t.includes(P.value);
2973
+ /* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: J.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: ne }, children: "No results" }) : J.map((P) => {
2974
+ const K = t.includes(P.value);
2975
2975
  return /* @__PURE__ */ i(
2976
2976
  "li",
2977
2977
  {
2978
- onClick: () => E(P.value),
2978
+ onClick: () => F(P.value),
2979
2979
  className: "metakyc-multiselect-option",
2980
2980
  style: {
2981
2981
  display: "flex",
@@ -2984,24 +2984,24 @@ const wt = 280, qr = ({
2984
2984
  padding: "8px 12px",
2985
2985
  fontSize: "13px",
2986
2986
  cursor: "pointer",
2987
- backgroundColor: W ? ce : "transparent",
2988
- color: W ? re : O,
2987
+ backgroundColor: K ? re : "transparent",
2988
+ color: K ? ae : O,
2989
2989
  userSelect: "none"
2990
2990
  },
2991
- onMouseEnter: ($) => {
2992
- W || ($.currentTarget.style.backgroundColor = he);
2991
+ onMouseEnter: (Z) => {
2992
+ K || (Z.currentTarget.style.backgroundColor = he);
2993
2993
  },
2994
- onMouseLeave: ($) => {
2995
- W || ($.currentTarget.style.backgroundColor = "transparent");
2994
+ onMouseLeave: (Z) => {
2995
+ K || (Z.currentTarget.style.backgroundColor = "transparent");
2996
2996
  },
2997
2997
  children: [
2998
2998
  /* @__PURE__ */ r(
2999
2999
  "input",
3000
3000
  {
3001
3001
  type: "checkbox",
3002
- checked: W,
3002
+ checked: K,
3003
3003
  readOnly: !0,
3004
- style: { accentColor: re, pointerEvents: "none", flexShrink: 0 }
3004
+ style: { accentColor: ae, pointerEvents: "none", flexShrink: 0 }
3005
3005
  }
3006
3006
  ),
3007
3007
  /* @__PURE__ */ r("span", { children: P.label })
@@ -3015,7 +3015,7 @@ const wt = 280, qr = ({
3015
3015
  {
3016
3016
  type: "button",
3017
3017
  onClick: () => {
3018
- n([]), N("");
3018
+ n([]), I("");
3019
3019
  },
3020
3020
  style: { fontSize: "12px", color: "#ef4444", background: "none", border: "none", cursor: "pointer", padding: 0 },
3021
3021
  children: [
@@ -3028,7 +3028,7 @@ const wt = 280, qr = ({
3028
3028
  ]
3029
3029
  }
3030
3030
  );
3031
- return /* @__PURE__ */ i("div", { className: "w-full metakyc-multiselect", ref: w, children: [
3031
+ return /* @__PURE__ */ i("div", { className: "w-full metakyc-multiselect", ref: S, children: [
3032
3032
  e && /* @__PURE__ */ i(
3033
3033
  "label",
3034
3034
  {
@@ -3044,7 +3044,7 @@ const wt = 280, qr = ({
3044
3044
  "div",
3045
3045
  {
3046
3046
  ref: D,
3047
- onClick: () => u ? Y() : B(),
3047
+ onClick: () => u ? G() : B(),
3048
3048
  className: Ie(
3049
3049
  "metakyc-multiselect-trigger",
3050
3050
  "min-h-[42px] w-full px-3 py-2 rounded-lg border text-sm transition-colors relative",
@@ -3073,12 +3073,12 @@ const wt = 280, qr = ({
3073
3073
  color: "var(--metakyc-primary, #2563eb)"
3074
3074
  },
3075
3075
  children: [
3076
- _(P),
3076
+ $(P),
3077
3077
  !l && /* @__PURE__ */ r(
3078
3078
  "button",
3079
3079
  {
3080
3080
  type: "button",
3081
- onClick: (W) => b(P, W),
3081
+ onClick: (K) => b(P, K),
3082
3082
  className: "metakyc-multiselect-chip-remove",
3083
3083
  style: {
3084
3084
  background: "transparent",
@@ -3117,7 +3117,7 @@ const wt = 280, qr = ({
3117
3117
  ]
3118
3118
  }
3119
3119
  ),
3120
- typeof document < "u" && ue ? ft(ue, document.body) : null
3120
+ typeof document < "u" && de ? ft(de, document.body) : null
3121
3121
  ] });
3122
3122
  }, St = 260, Be = ({
3123
3123
  label: e,
@@ -3131,8 +3131,8 @@ const wt = 280, qr = ({
3131
3131
  required: h = !1,
3132
3132
  className: m
3133
3133
  }) => {
3134
- var ne;
3135
- const [N, T] = k(!1), [I, L] = k(""), [f, w] = k(null), [D, U] = k({
3134
+ var j;
3135
+ const [I, T] = k(!1), [R, L] = k(""), [f, S] = k(null), [D, U] = k({
3136
3136
  bg: "#ffffff",
3137
3137
  border: "#d1d5db",
3138
3138
  text: "#111827",
@@ -3140,65 +3140,65 @@ const wt = 280, qr = ({
3140
3140
  primary: "#2563eb",
3141
3141
  primaryLight: "#eff6ff",
3142
3142
  hoverBg: "#f9fafb"
3143
- }), K = J(() => {
3144
- const F = getComputedStyle(document.documentElement), X = (de, we) => F.getPropertyValue(de).trim() || we, ae = X("--metakyc-input-bg", X("--metakyc-background", "#ffffff"));
3143
+ }), W = te(() => {
3144
+ const x = getComputedStyle(document.documentElement), Q = (ce, we) => x.getPropertyValue(ce).trim() || we, Y = Q("--metakyc-input-bg", Q("--metakyc-background", "#ffffff"));
3145
3145
  U({
3146
- bg: ae,
3147
- border: X("--metakyc-input-border", X("--metakyc-border", "#d1d5db")),
3148
- text: X("--metakyc-input-text", X("--metakyc-text-primary", "#111827")),
3149
- textSecondary: X("--metakyc-text-secondary", "#6b7280"),
3150
- primary: X("--metakyc-primary", "#2563eb"),
3151
- primaryLight: X("--metakyc-primary-light", "#eff6ff"),
3152
- hoverBg: X("--metakyc-surface", ae)
3146
+ bg: Y,
3147
+ border: Q("--metakyc-input-border", Q("--metakyc-border", "#d1d5db")),
3148
+ text: Q("--metakyc-input-text", Q("--metakyc-text-primary", "#111827")),
3149
+ textSecondary: Q("--metakyc-text-secondary", "#6b7280"),
3150
+ primary: Q("--metakyc-primary", "#2563eb"),
3151
+ primaryLight: Q("--metakyc-primary-light", "#eff6ff"),
3152
+ hoverBg: Q("--metakyc-surface", Y)
3153
3153
  });
3154
- }, []), M = le(null), B = le(null), Y = le(null), Q = le(null), E = J(() => {
3154
+ }, []), M = le(null), B = le(null), G = le(null), J = le(null), F = te(() => {
3155
3155
  if (!B.current) return null;
3156
- const F = B.current.getBoundingClientRect(), ae = window.innerHeight - F.bottom < St && F.top > St;
3156
+ const x = B.current.getBoundingClientRect(), Y = window.innerHeight - x.bottom < St && x.top > St;
3157
3157
  return {
3158
- top: ae ? F.top : F.bottom + 4,
3159
- left: F.left,
3160
- width: F.width,
3161
- openUp: ae
3158
+ top: Y ? x.top : x.bottom + 4,
3159
+ left: x.left,
3160
+ width: x.width,
3161
+ openUp: Y
3162
3162
  };
3163
- }, []), b = J(() => {
3163
+ }, []), b = te(() => {
3164
3164
  if (u) return;
3165
- K();
3166
- const F = E();
3167
- F && w(F), T(!0);
3168
- }, [u, E, K]), _ = J(() => {
3165
+ W();
3166
+ const x = F();
3167
+ x && S(x), T(!0);
3168
+ }, [u, F, W]), $ = te(() => {
3169
3169
  T(!1), L("");
3170
- }, []), H = () => N ? _() : b();
3170
+ }, []), H = () => I ? $() : b();
3171
3171
  ye(() => {
3172
- if (!N) return;
3173
- const F = (X) => {
3174
- var de, we;
3175
- const ae = X.target;
3176
- !((de = M.current) != null && de.contains(ae)) && !((we = Y.current) != null && we.contains(ae)) && _();
3172
+ if (!I) return;
3173
+ const x = (Q) => {
3174
+ var ce, we;
3175
+ const Y = Q.target;
3176
+ !((ce = M.current) != null && ce.contains(Y)) && !((we = G.current) != null && we.contains(Y)) && $();
3177
3177
  };
3178
- return document.addEventListener("mousedown", F), () => document.removeEventListener("mousedown", F);
3179
- }, [N, _]), ye(() => {
3180
- if (!N) return;
3181
- const F = () => {
3182
- const X = E();
3183
- X && w(X);
3178
+ return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
3179
+ }, [I, $]), ye(() => {
3180
+ if (!I) return;
3181
+ const x = () => {
3182
+ const Q = F();
3183
+ Q && S(Q);
3184
3184
  };
3185
- return window.addEventListener("scroll", F, !0), window.addEventListener("resize", F), () => {
3186
- window.removeEventListener("scroll", F, !0), window.removeEventListener("resize", F);
3185
+ return window.addEventListener("scroll", x, !0), window.addEventListener("resize", x), () => {
3186
+ window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x);
3187
3187
  };
3188
- }, [N, E]), ye(() => {
3189
- N && Q.current && setTimeout(() => {
3190
- var F;
3191
- return (F = Q.current) == null ? void 0 : F.focus();
3188
+ }, [I, F]), ye(() => {
3189
+ I && J.current && setTimeout(() => {
3190
+ var x;
3191
+ return (x = J.current) == null ? void 0 : x.focus();
3192
3192
  }, 0);
3193
- }, [N]);
3193
+ }, [I]);
3194
3194
  const z = a.filter(
3195
- (F) => F.label.toLowerCase().includes(I.toLowerCase()) || F.value.toLowerCase().includes(I.toLowerCase())
3196
- ), O = (ne = a.find((F) => F.value === l)) == null ? void 0 : ne.label, Z = (F, X) => {
3197
- u || X || (c(F), _());
3198
- }, { bg: re, border: ce, text: he, textSecondary: ue, primary: P, primaryLight: W, hoverBg: $ } = D, V = N && f && /* @__PURE__ */ i(
3195
+ (x) => x.label.toLowerCase().includes(R.toLowerCase()) || x.value.toLowerCase().includes(R.toLowerCase())
3196
+ ), O = (j = a.find((x) => x.value === l)) == null ? void 0 : j.label, ne = (x, Q) => {
3197
+ u || Q || (c(x), $());
3198
+ }, { bg: ae, border: re, text: he, textSecondary: de, primary: P, primaryLight: K, hoverBg: Z } = D, ue = I && f && /* @__PURE__ */ i(
3199
3199
  "div",
3200
3200
  {
3201
- ref: Y,
3201
+ ref: G,
3202
3202
  className: "metakyc-searchable-select-dropdown",
3203
3203
  style: {
3204
3204
  position: "fixed",
@@ -3209,20 +3209,20 @@ const wt = 280, qr = ({
3209
3209
  zIndex: 99999,
3210
3210
  borderRadius: "8px",
3211
3211
  boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
3212
- border: `1px solid ${ce}`,
3213
- backgroundColor: re,
3212
+ border: `1px solid ${re}`,
3213
+ backgroundColor: ae,
3214
3214
  overflow: "hidden"
3215
3215
  },
3216
3216
  children: [
3217
- /* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${ce}` }, children: /* @__PURE__ */ r(
3217
+ /* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${re}` }, children: /* @__PURE__ */ r(
3218
3218
  "input",
3219
3219
  {
3220
- ref: Q,
3220
+ ref: J,
3221
3221
  type: "text",
3222
- value: I,
3223
- onChange: (F) => L(F.target.value),
3222
+ value: R,
3223
+ onChange: (x) => L(x.target.value),
3224
3224
  placeholder: "Search...",
3225
- onClick: (F) => F.stopPropagation(),
3225
+ onClick: (x) => x.stopPropagation(),
3226
3226
  className: "metakyc-searchable-select-search w-full",
3227
3227
  style: {
3228
3228
  display: "block",
@@ -3230,18 +3230,18 @@ const wt = 280, qr = ({
3230
3230
  padding: "6px 8px",
3231
3231
  fontSize: "13px",
3232
3232
  borderRadius: "6px",
3233
- border: `1px solid ${ce}`,
3234
- backgroundColor: re,
3233
+ border: `1px solid ${re}`,
3234
+ backgroundColor: ae,
3235
3235
  color: he,
3236
3236
  outline: "none",
3237
3237
  boxSizing: "border-box"
3238
3238
  },
3239
- onFocus: (F) => {
3240
- const X = getComputedStyle(document.documentElement), ae = X.getPropertyValue("--metakyc-input-border-focus").trim() || X.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
3241
- F.currentTarget.style.backgroundColor = re, F.currentTarget.style.color = he, F.currentTarget.style.borderColor = ae, F.currentTarget.style.outline = "none", F.currentTarget.style.boxShadow = `0 0 0 2px ${ae}33`;
3239
+ onFocus: (x) => {
3240
+ const Q = getComputedStyle(document.documentElement), Y = Q.getPropertyValue("--metakyc-input-border-focus").trim() || Q.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
3241
+ x.currentTarget.style.backgroundColor = ae, x.currentTarget.style.color = he, x.currentTarget.style.borderColor = Y, x.currentTarget.style.outline = "none", x.currentTarget.style.boxShadow = `0 0 0 2px ${Y}33`;
3242
3242
  },
3243
- onBlur: (F) => {
3244
- F.currentTarget.style.backgroundColor = re, F.currentTarget.style.color = he, F.currentTarget.style.borderColor = ce, F.currentTarget.style.outline = "none", F.currentTarget.style.boxShadow = "none";
3243
+ onBlur: (x) => {
3244
+ x.currentTarget.style.backgroundColor = ae, x.currentTarget.style.color = he, x.currentTarget.style.borderColor = re, x.currentTarget.style.outline = "none", x.currentTarget.style.boxShadow = "none";
3245
3245
  }
3246
3246
  }
3247
3247
  ) }),
@@ -3255,31 +3255,31 @@ const wt = 280, qr = ({
3255
3255
  maxHeight: "208px",
3256
3256
  overflowY: "auto"
3257
3257
  },
3258
- children: z.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: ue }, children: "No results" }) : z.map((F) => {
3259
- const X = F.value === l;
3258
+ children: z.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: de }, children: "No results" }) : z.map((x) => {
3259
+ const Q = x.value === l;
3260
3260
  return /* @__PURE__ */ r(
3261
3261
  "li",
3262
3262
  {
3263
3263
  className: "metakyc-searchable-select-option",
3264
- onClick: () => Z(F.value, F.disabled),
3264
+ onClick: () => ne(x.value, x.disabled),
3265
3265
  style: {
3266
3266
  padding: "8px 12px",
3267
3267
  fontSize: "13px",
3268
- cursor: F.disabled ? "not-allowed" : "pointer",
3269
- opacity: F.disabled ? 0.4 : 1,
3270
- backgroundColor: X ? W : "transparent",
3271
- color: X ? P : he,
3268
+ cursor: x.disabled ? "not-allowed" : "pointer",
3269
+ opacity: x.disabled ? 0.4 : 1,
3270
+ backgroundColor: Q ? K : "transparent",
3271
+ color: Q ? P : he,
3272
3272
  userSelect: "none"
3273
3273
  },
3274
- onMouseEnter: (ae) => {
3275
- !X && !F.disabled && (ae.currentTarget.style.backgroundColor = $);
3274
+ onMouseEnter: (Y) => {
3275
+ !Q && !x.disabled && (Y.currentTarget.style.backgroundColor = Z);
3276
3276
  },
3277
- onMouseLeave: (ae) => {
3278
- X || (ae.currentTarget.style.backgroundColor = "transparent");
3277
+ onMouseLeave: (Y) => {
3278
+ Q || (Y.currentTarget.style.backgroundColor = "transparent");
3279
3279
  },
3280
- children: F.label
3280
+ children: x.label
3281
3281
  },
3282
- F.value
3282
+ x.value
3283
3283
  );
3284
3284
  })
3285
3285
  }
@@ -3311,8 +3311,8 @@ const wt = 280, qr = ({
3311
3311
  role: "button",
3312
3312
  tabIndex: u ? -1 : 0,
3313
3313
  onClick: H,
3314
- onKeyDown: (F) => {
3315
- (F.key === "Enter" || F.key === " ") && (F.preventDefault(), H()), F.key === "Escape" && _();
3314
+ onKeyDown: (x) => {
3315
+ (x.key === "Enter" || x.key === " ") && (x.preventDefault(), H()), x.key === "Escape" && $();
3316
3316
  },
3317
3317
  className: Ie(
3318
3318
  "metakyc-searchable-select-trigger",
@@ -3324,9 +3324,9 @@ const wt = 280, qr = ({
3324
3324
  style: {
3325
3325
  backgroundColor: "var(--metakyc-input-bg, #ffffff)",
3326
3326
  color: O ? "var(--metakyc-input-text, var(--metakyc-text-primary, #111827))" : "var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))",
3327
- borderColor: t ? "var(--metakyc-danger, #ef4444)" : N ? "var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))" : "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))",
3327
+ borderColor: t ? "var(--metakyc-danger, #ef4444)" : I ? "var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))" : "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))",
3328
3328
  minHeight: "42px",
3329
- outline: N ? "2px solid var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))" : "none",
3329
+ outline: I ? "2px solid var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))" : "none",
3330
3330
  outlineOffset: "-1px"
3331
3331
  },
3332
3332
  children: [
@@ -3336,13 +3336,13 @@ const wt = 280, qr = ({
3336
3336
  {
3337
3337
  className: "flex-shrink-0 text-xs pointer-events-none",
3338
3338
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
3339
- children: N ? "▲" : "▼"
3339
+ children: I ? "▲" : "▼"
3340
3340
  }
3341
3341
  )
3342
3342
  ]
3343
3343
  }
3344
3344
  ),
3345
- typeof document < "u" && V ? ft(V, document.body) : null,
3345
+ typeof document < "u" && ue ? ft(ue, document.body) : null,
3346
3346
  t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
3347
3347
  !t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
3348
3348
  ]
@@ -3350,11 +3350,11 @@ const wt = 280, qr = ({
3350
3350
  );
3351
3351
  };
3352
3352
  Be.displayName = "SearchableSelect";
3353
- function Vr(e) {
3353
+ function Yr(e) {
3354
3354
  const t = e.type;
3355
3355
  return t.startsWith("image/") ? "image" : t === "application/pdf" ? "pdf" : "file";
3356
3356
  }
3357
- const Yr = ({
3357
+ const Vr = ({
3358
3358
  label: e,
3359
3359
  subtitle: t,
3360
3360
  error: n,
@@ -3366,29 +3366,29 @@ const Yr = ({
3366
3366
  value: h = [],
3367
3367
  className: m
3368
3368
  }) => {
3369
- const [N, T] = k(!1), [I, L] = k(null), f = le(null), w = J((E) => {
3370
- if (!E) return;
3369
+ const [I, T] = k(!1), [R, L] = k(null), f = le(null), S = te((F) => {
3370
+ if (!F) return;
3371
3371
  L(null);
3372
- const b = Array.from(E);
3372
+ const b = Array.from(F);
3373
3373
  if (l && b.filter((H) => H.size > l).length > 0) {
3374
3374
  L(`File exceeds the maximum size of ${mt(l)}`);
3375
3375
  return;
3376
3376
  }
3377
3377
  u == null || u(s ? [...h, ...b] : [b[0]]);
3378
- }, [l, s, u, h]), D = J((E) => {
3379
- E.preventDefault(), E.stopPropagation(), T(!0);
3380
- }, []), U = J((E) => {
3381
- E.preventDefault(), E.stopPropagation(), T(!1);
3382
- }, []), K = J((E) => {
3383
- E.preventDefault(), E.stopPropagation(), T(!1), w(E.dataTransfer.files);
3384
- }, [w]), M = () => {
3385
- var E;
3386
- (E = f.current) == null || E.click();
3387
- }, B = (E) => {
3378
+ }, [l, s, u, h]), D = te((F) => {
3379
+ F.preventDefault(), F.stopPropagation(), T(!0);
3380
+ }, []), U = te((F) => {
3381
+ F.preventDefault(), F.stopPropagation(), T(!1);
3382
+ }, []), W = te((F) => {
3383
+ F.preventDefault(), F.stopPropagation(), T(!1), S(F.dataTransfer.files);
3384
+ }, [S]), M = () => {
3385
+ var F;
3386
+ (F = f.current) == null || F.click();
3387
+ }, B = (F) => {
3388
3388
  L(null);
3389
- const b = h.filter((_, H) => H !== E);
3389
+ const b = h.filter(($, H) => H !== F);
3390
3390
  u == null || u(b);
3391
- }, Y = n || I, Q = h.length > 0;
3391
+ }, G = n || R, J = h.length > 0;
3392
3392
  return /* @__PURE__ */ i("div", { className: Ie("metakyc-file-upload", m), style: { width: "100%" }, children: [
3393
3393
  e && /* @__PURE__ */ i("div", { style: { marginBottom: "8px" }, children: [
3394
3394
  /* @__PURE__ */ i(
@@ -3415,15 +3415,15 @@ const Yr = ({
3415
3415
  onClick: M,
3416
3416
  onDragOver: D,
3417
3417
  onDragLeave: U,
3418
- onDrop: K,
3418
+ onDrop: W,
3419
3419
  style: {
3420
- border: `2px dashed ${Y ? "var(--metakyc-danger, #ef4444)" : N ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #d1d5db)"}`,
3420
+ border: `2px dashed ${G ? "var(--metakyc-danger, #ef4444)" : I ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #d1d5db)"}`,
3421
3421
  borderRadius: "12px",
3422
- padding: Q ? "20px" : "32px 20px",
3422
+ padding: J ? "20px" : "32px 20px",
3423
3423
  textAlign: "center",
3424
3424
  cursor: "pointer",
3425
3425
  transition: "all 0.2s ease",
3426
- backgroundColor: N ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 5%, var(--metakyc-background, #ffffff))" : "var(--metakyc-background, #ffffff)"
3426
+ backgroundColor: I ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 5%, var(--metakyc-background, #ffffff))" : "var(--metakyc-background, #ffffff)"
3427
3427
  },
3428
3428
  children: [
3429
3429
  /* @__PURE__ */ r(
@@ -3434,8 +3434,8 @@ const Yr = ({
3434
3434
  style: { display: "none" },
3435
3435
  accept: a,
3436
3436
  multiple: s,
3437
- onChange: (E) => {
3438
- w(E.target.files), E.target.value = "";
3437
+ onChange: (F) => {
3438
+ S(F.target.files), F.target.value = "";
3439
3439
  }
3440
3440
  }
3441
3441
  ),
@@ -3450,7 +3450,7 @@ const Yr = ({
3450
3450
  display: "flex",
3451
3451
  alignItems: "center",
3452
3452
  justifyContent: "center",
3453
- backgroundColor: N ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)" : "var(--metakyc-surface, #f9fafb)",
3453
+ backgroundColor: I ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)" : "var(--metakyc-surface, #f9fafb)",
3454
3454
  transition: "background-color 0.2s ease"
3455
3455
  },
3456
3456
  children: /* @__PURE__ */ i(
@@ -3460,7 +3460,7 @@ const Yr = ({
3460
3460
  height: "24",
3461
3461
  viewBox: "0 0 24 24",
3462
3462
  fill: "none",
3463
- stroke: N ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
3463
+ stroke: I ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
3464
3464
  strokeWidth: "2",
3465
3465
  strokeLinecap: "round",
3466
3466
  strokeLinejoin: "round",
@@ -3493,8 +3493,8 @@ const Yr = ({
3493
3493
  ]
3494
3494
  }
3495
3495
  ),
3496
- Q && /* @__PURE__ */ r("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: h.map((E, b) => {
3497
- const _ = Vr(E), H = _ === "image", z = H ? URL.createObjectURL(E) : null;
3496
+ J && /* @__PURE__ */ r("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: h.map((F, b) => {
3497
+ const $ = Yr(F), H = $ === "image", z = H ? URL.createObjectURL(F) : null;
3498
3498
  return /* @__PURE__ */ i(
3499
3499
  "div",
3500
3500
  {
@@ -3528,10 +3528,10 @@ const Yr = ({
3528
3528
  "img",
3529
3529
  {
3530
3530
  src: z,
3531
- alt: E.name,
3531
+ alt: F.name,
3532
3532
  style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "8px" }
3533
3533
  }
3534
- ) : _ === "pdf" ? /* @__PURE__ */ i("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
3534
+ ) : $ === "pdf" ? /* @__PURE__ */ i("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
3535
3535
  /* @__PURE__ */ r("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
3536
3536
  /* @__PURE__ */ r("polyline", { points: "14 2 14 8 20 8" }),
3537
3537
  /* @__PURE__ */ r("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
@@ -3552,8 +3552,8 @@ const Yr = ({
3552
3552
  overflow: "hidden",
3553
3553
  textOverflow: "ellipsis",
3554
3554
  whiteSpace: "nowrap"
3555
- }, children: E.name }),
3556
- /* @__PURE__ */ r("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", margin: 0, marginTop: "2px" }, children: mt(E.size) })
3555
+ }, children: F.name }),
3556
+ /* @__PURE__ */ r("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", margin: 0, marginTop: "2px" }, children: mt(F.size) })
3557
3557
  ] }),
3558
3558
  /* @__PURE__ */ r(
3559
3559
  "button",
@@ -3591,10 +3591,10 @@ const Yr = ({
3591
3591
  )
3592
3592
  ]
3593
3593
  },
3594
- `${E.name}-${b}`
3594
+ `${F.name}-${b}`
3595
3595
  );
3596
3596
  }) }),
3597
- Y && /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", marginTop: "6px" }, children: Y })
3597
+ G && /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", marginTop: "6px" }, children: G })
3598
3598
  ] });
3599
3599
  }, Qr = lt(
3600
3600
  ({ countryCode: e = "+1", onCountryCodeChange: t, className: n, ...a }, s) => /* @__PURE__ */ i("div", { className: "w-full", children: [
@@ -3736,7 +3736,7 @@ const en = lt(
3736
3736
  ...u
3737
3737
  },
3738
3738
  [
3739
- ...c.map(([m, N]) => gt(m, N)),
3739
+ ...c.map(([m, I]) => gt(m, I)),
3740
3740
  ...Array.isArray(l) ? l : [l]
3741
3741
  ]
3742
3742
  )
@@ -3820,62 +3820,62 @@ const sn = ({
3820
3820
  onComplete: t,
3821
3821
  onBack: n
3822
3822
  }) => {
3823
- const { questionnaire: a, initialAnswers: s, isLoading: l, isSubmitting: c, error: u, submit: h } = Br(e), [m, N] = k({}), [T, I] = k({}), [L, f] = k(0);
3823
+ const { questionnaire: a, initialAnswers: s, isLoading: l, isSubmitting: c, error: u, submit: h } = Br(e), [m, I] = k({}), [T, R] = k({}), [L, f] = k(0);
3824
3824
  Fe.useEffect(() => {
3825
- s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && N(s);
3825
+ s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && I(s);
3826
3826
  }, [s]);
3827
- const w = Ae(
3827
+ const S = Ae(
3828
3828
  () => a ? an(a.questionGroups) : [],
3829
3829
  [a]
3830
- ), D = L === w.length - 1, U = w[L] ?? [], K = J((E, b) => {
3831
- N((_) => ({ ..._, [E]: b })), I((_) => {
3832
- const H = { ..._ };
3833
- return delete H[E], H;
3830
+ ), D = L === S.length - 1, U = S[L] ?? [], W = te((F, b) => {
3831
+ I(($) => ({ ...$, [F]: b })), R(($) => {
3832
+ const H = { ...$ };
3833
+ return delete H[F], H;
3834
3834
  });
3835
- }, []), M = J(() => {
3836
- const E = {};
3835
+ }, []), M = te(() => {
3836
+ const F = {};
3837
3837
  for (const { question: b } of U) {
3838
- const _ = nn(b, m[b.id] ?? []);
3839
- _ && (E[b.id] = _);
3838
+ const $ = nn(b, m[b.id] ?? []);
3839
+ $ && (F[b.id] = $);
3840
3840
  }
3841
- return I((b) => ({ ...b, ...E })), Object.keys(E).length === 0;
3841
+ return R((b) => ({ ...b, ...F })), Object.keys(F).length === 0;
3842
3842
  }, [U, m]), B = () => {
3843
- M() && f((E) => E + 1);
3844
- }, Y = () => {
3845
- L > 0 ? f((E) => E - 1) : n == null || n();
3846
- }, Q = async () => {
3843
+ M() && f((F) => F + 1);
3844
+ }, G = () => {
3845
+ L > 0 ? f((F) => F - 1) : n == null || n();
3846
+ }, J = async () => {
3847
3847
  if (!(!M() || !a))
3848
3848
  try {
3849
- const E = a.questionGroups.flatMap(
3850
- (_) => (_.questions ?? []).map((H) => ({
3849
+ const F = a.questionGroups.flatMap(
3850
+ ($) => ($.questions ?? []).map((H) => ({
3851
3851
  questionId: H.id,
3852
3852
  values: m[H.id] ?? []
3853
3853
  }))
3854
3854
  ), b = {
3855
3855
  applicantId: e,
3856
3856
  questionnarieId: a.id,
3857
- questionResults: E
3857
+ questionResults: F
3858
3858
  };
3859
3859
  await h(b), t == null || t();
3860
- } catch (E) {
3861
- console.error("Questionnaire submit error:", E);
3860
+ } catch (F) {
3861
+ console.error("Questionnaire submit error:", F);
3862
3862
  }
3863
3863
  };
3864
- return l ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ r(Pe, { className: "my-8" }) }) }) : u ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3864
+ return l ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(Pe, { className: "my-8" }) }) }) : u ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3865
3865
  "Error loading questionnaire: ",
3866
3866
  u.message
3867
- ] }) }) }) : a ? /* @__PURE__ */ i(ee, { children: [
3867
+ ] }) }) }) : a ? /* @__PURE__ */ i(X, { children: [
3868
3868
  /* @__PURE__ */ i(be, { children: [
3869
3869
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.displayName }),
3870
3870
  a.subtitle && /* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: a.subtitle }),
3871
- w.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
3871
+ S.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
3872
3872
  /* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
3873
3873
  "Page ",
3874
3874
  L + 1,
3875
3875
  " of ",
3876
- w.length
3876
+ S.length
3877
3877
  ] }),
3878
- /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: w.map((E, b) => /* @__PURE__ */ r(
3878
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: S.map((F, b) => /* @__PURE__ */ r(
3879
3879
  "div",
3880
3880
  {
3881
3881
  className: "rounded-full transition-all duration-200",
@@ -3889,23 +3889,23 @@ const sn = ({
3889
3889
  )) })
3890
3890
  ] })
3891
3891
  ] }),
3892
- /* @__PURE__ */ r(te, { className: "space-y-6", children: U.map(({ question: E }) => /* @__PURE__ */ r(
3892
+ /* @__PURE__ */ r(ee, { className: "space-y-6", children: U.map(({ question: F }) => /* @__PURE__ */ r(
3893
3893
  on,
3894
3894
  {
3895
- question: E,
3896
- value: m[E.id] ?? [],
3897
- error: T[E.id],
3898
- onChange: (b) => K(E.id, b)
3895
+ question: F,
3896
+ value: m[F.id] ?? [],
3897
+ error: T[F.id],
3898
+ onChange: (b) => W(F.id, b)
3899
3899
  },
3900
- E.id
3900
+ F.id
3901
3901
  )) }),
3902
- /* @__PURE__ */ i(ke, { className: "flex items-center justify-between", children: [
3902
+ /* @__PURE__ */ i(xe, { className: "flex items-center justify-between", children: [
3903
3903
  /* @__PURE__ */ i(
3904
- G,
3904
+ V,
3905
3905
  {
3906
3906
  type: "button",
3907
3907
  variant: "outline",
3908
- onClick: Y,
3908
+ onClick: G,
3909
3909
  style: { display: "flex", alignItems: "center", gap: "4px" },
3910
3910
  children: [
3911
3911
  /* @__PURE__ */ r(Mt, { size: 14 }),
@@ -3914,15 +3914,15 @@ const sn = ({
3914
3914
  }
3915
3915
  ),
3916
3916
  D ? /* @__PURE__ */ r(
3917
- G,
3917
+ V,
3918
3918
  {
3919
3919
  type: "button",
3920
3920
  isLoading: c,
3921
- onClick: Q,
3921
+ onClick: J,
3922
3922
  children: "Continue"
3923
3923
  }
3924
3924
  ) : /* @__PURE__ */ i(
3925
- G,
3925
+ V,
3926
3926
  {
3927
3927
  type: "button",
3928
3928
  onClick: B,
@@ -4057,28 +4057,28 @@ const cn = ({
4057
4057
  onComplete: t,
4058
4058
  onBack: n
4059
4059
  }) => {
4060
- const { uploadDocument: a, isLoading: s, isSubmitting: l, error: c, submit: u } = _r(e), [h, m] = k({}), [N, T] = k(null), [I, L] = k(0), [f, w] = k({}), D = Ae(
4060
+ const { uploadDocument: a, isLoading: s, isSubmitting: l, error: c, submit: u } = _r(e), [h, m] = k({}), [I, T] = k(null), [R, L] = k(0), [f, S] = k({}), D = Ae(
4061
4061
  () => a ? ln(a.uploadDocumentFiles) : [],
4062
4062
  [a]
4063
- ), U = D[I] ?? [], K = I === D.length - 1, M = D.length, B = J(() => {
4063
+ ), U = D[R] ?? [], W = R === D.length - 1, M = D.length, B = te(() => {
4064
4064
  const b = {};
4065
- for (const _ of U)
4066
- _.isRequired && (h[_.id] || []).length === 0 && (b[_.id] = `${_.displayName} is required`);
4067
- return w(b), Object.keys(b).length === 0;
4068
- }, [U, h]), Y = () => {
4069
- B() && (L((b) => b + 1), w({}));
4070
- }, Q = () => {
4071
- I > 0 ? (L((b) => b - 1), w({})) : n == null || n();
4072
- }, E = async () => {
4065
+ for (const $ of U)
4066
+ $.isRequired && (h[$.id] || []).length === 0 && (b[$.id] = `${$.displayName} is required`);
4067
+ return S(b), Object.keys(b).length === 0;
4068
+ }, [U, h]), G = () => {
4069
+ B() && (L((b) => b + 1), S({}));
4070
+ }, J = () => {
4071
+ R > 0 ? (L((b) => b - 1), S({})) : n == null || n();
4072
+ }, F = async () => {
4073
4073
  if (!(!B() || !a)) {
4074
4074
  T(null);
4075
4075
  try {
4076
4076
  const b = await Promise.all(
4077
4077
  a.uploadDocumentFiles.map(async (H) => {
4078
4078
  const z = h[H.id] || [], O = await Promise.all(
4079
- z.map(async (Z) => ({
4080
- fileName: Z.name,
4081
- fileData: await Lr(Z)
4079
+ z.map(async (ne) => ({
4080
+ fileName: ne.name,
4081
+ fileData: await Lr(ne)
4082
4082
  }))
4083
4083
  );
4084
4084
  return {
@@ -4086,21 +4086,21 @@ const cn = ({
4086
4086
  valueList: O
4087
4087
  };
4088
4088
  })
4089
- ), _ = {
4089
+ ), $ = {
4090
4090
  applicantId: e,
4091
4091
  uploadDocumentId: a.id,
4092
4092
  uploadDocumentResults: b
4093
4093
  };
4094
- await u(_), t == null || t();
4094
+ await u($), t == null || t();
4095
4095
  } catch (b) {
4096
4096
  T((b == null ? void 0 : b.message) || "Failed to submit documents. Please try again.");
4097
4097
  }
4098
4098
  }
4099
4099
  };
4100
- return s ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
4100
+ return s ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
4101
4101
  /* @__PURE__ */ r(Pe, { className: "my-8" }),
4102
4102
  /* @__PURE__ */ r("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: "Loading document requirements..." })
4103
- ] }) }) }) : c ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("div", { style: {
4103
+ ] }) }) }) : c ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("div", { style: {
4104
4104
  display: "flex",
4105
4105
  flexDirection: "column",
4106
4106
  alignItems: "center",
@@ -4123,7 +4123,7 @@ const cn = ({
4123
4123
  ] }) }),
4124
4124
  /* @__PURE__ */ r("p", { style: { fontSize: "14px", color: "var(--metakyc-danger, #ef4444)", fontWeight: 500 }, children: "Error loading document requirements" }),
4125
4125
  /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: c.message })
4126
- ] }) }) }) : a ? /* @__PURE__ */ i(ee, { children: [
4126
+ ] }) }) }) : a ? /* @__PURE__ */ i(X, { children: [
4127
4127
  /* @__PURE__ */ i(be, { children: [
4128
4128
  /* @__PURE__ */ r("h2", { style: {
4129
4129
  fontSize: "18px",
@@ -4144,26 +4144,26 @@ const cn = ({
4144
4144
  }, children: [
4145
4145
  /* @__PURE__ */ i("span", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
4146
4146
  "Page ",
4147
- I + 1,
4147
+ R + 1,
4148
4148
  " of ",
4149
4149
  M
4150
4150
  ] }),
4151
- /* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: D.map((b, _) => /* @__PURE__ */ r(
4151
+ /* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: D.map((b, $) => /* @__PURE__ */ r(
4152
4152
  "div",
4153
4153
  {
4154
4154
  style: {
4155
4155
  height: "6px",
4156
- width: _ === I ? "20px" : "6px",
4156
+ width: $ === R ? "20px" : "6px",
4157
4157
  borderRadius: "999px",
4158
4158
  transition: "all 0.2s ease",
4159
- backgroundColor: _ <= I ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
4159
+ backgroundColor: $ <= R ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
4160
4160
  }
4161
4161
  },
4162
- _
4162
+ $
4163
4163
  )) })
4164
4164
  ] })
4165
4165
  ] }),
4166
- a.description && I === 0 && /* @__PURE__ */ i("div", { style: {
4166
+ a.description && R === 0 && /* @__PURE__ */ i("div", { style: {
4167
4167
  margin: "0 24px",
4168
4168
  marginTop: "4px",
4169
4169
  display: "flex",
@@ -4199,8 +4199,8 @@ const cn = ({
4199
4199
  lineHeight: 1.5
4200
4200
  }, children: a.description })
4201
4201
  ] }),
4202
- /* @__PURE__ */ r(te, { children: /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: U.map((b) => /* @__PURE__ */ r(
4203
- Yr,
4202
+ /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: U.map((b) => /* @__PURE__ */ r(
4203
+ Vr,
4204
4204
  {
4205
4205
  label: b.displayName,
4206
4206
  subtitle: b.subtitle,
@@ -4210,16 +4210,16 @@ const cn = ({
4210
4210
  required: b.isRequired,
4211
4211
  error: f[b.id],
4212
4212
  value: h[b.id] || [],
4213
- onChange: (_) => {
4214
- T(null), w((H) => {
4213
+ onChange: ($) => {
4214
+ T(null), S((H) => {
4215
4215
  const z = { ...H };
4216
4216
  return delete z[b.id], z;
4217
- }), m((H) => ({ ...H, [b.id]: _ }));
4217
+ }), m((H) => ({ ...H, [b.id]: $ }));
4218
4218
  }
4219
4219
  },
4220
4220
  b.id
4221
4221
  )) }) }),
4222
- N && /* @__PURE__ */ i("div", { style: {
4222
+ I && /* @__PURE__ */ i("div", { style: {
4223
4223
  margin: "0 24px",
4224
4224
  padding: "10px 14px",
4225
4225
  borderRadius: "8px",
@@ -4234,36 +4234,36 @@ const cn = ({
4234
4234
  /* @__PURE__ */ r("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
4235
4235
  /* @__PURE__ */ r("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
4236
4236
  ] }),
4237
- /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: N })
4237
+ /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: I })
4238
4238
  ] }),
4239
- /* @__PURE__ */ r(ke, { children: /* @__PURE__ */ i("div", { style: {
4239
+ /* @__PURE__ */ r(xe, { children: /* @__PURE__ */ i("div", { style: {
4240
4240
  display: "flex",
4241
4241
  alignItems: "center",
4242
4242
  justifyContent: "space-between",
4243
4243
  width: "100%"
4244
4244
  }, children: [
4245
4245
  /* @__PURE__ */ r(
4246
- G,
4246
+ V,
4247
4247
  {
4248
4248
  type: "button",
4249
4249
  variant: "outline",
4250
- onClick: Q,
4251
- children: I > 0 ? "Previous" : "Back"
4250
+ onClick: J,
4251
+ children: R > 0 ? "Previous" : "Back"
4252
4252
  }
4253
4253
  ),
4254
- K ? /* @__PURE__ */ r(
4255
- G,
4254
+ W ? /* @__PURE__ */ r(
4255
+ V,
4256
4256
  {
4257
4257
  type: "button",
4258
4258
  isLoading: l,
4259
- onClick: E,
4259
+ onClick: F,
4260
4260
  children: l ? "Uploading..." : "Continue"
4261
4261
  }
4262
4262
  ) : /* @__PURE__ */ r(
4263
- G,
4263
+ V,
4264
4264
  {
4265
4265
  type: "button",
4266
- onClick: Y,
4266
+ onClick: G,
4267
4267
  children: "Next"
4268
4268
  }
4269
4269
  )
@@ -4273,15 +4273,15 @@ const cn = ({
4273
4273
  const { overview: a, isLoading: s, isSubmitting: l, error: c, passOverview: u } = jr(e), h = async () => {
4274
4274
  await u(), t == null || t();
4275
4275
  };
4276
- return s ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ r(Pe, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
4276
+ return s ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(Pe, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
4277
4277
  "Error loading overview: ",
4278
4278
  c.message
4279
- ] }) }) }) : a ? /* @__PURE__ */ i(ee, { children: [
4279
+ ] }) }) }) : a ? /* @__PURE__ */ i(X, { children: [
4280
4280
  /* @__PURE__ */ i(be, { children: [
4281
4281
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.title || "Overview" }),
4282
4282
  a.description && /* @__PURE__ */ r("p", { className: "mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: a.description })
4283
4283
  ] }),
4284
- /* @__PURE__ */ r(te, { className: "space-y-8", children: a.steps && a.steps.length > 0 ? a.steps.sort((m, N) => m.order - N.order).map((m) => /* @__PURE__ */ i("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
4284
+ /* @__PURE__ */ r(ee, { className: "space-y-8", children: a.steps && a.steps.length > 0 ? a.steps.sort((m, I) => m.order - I.order).map((m) => /* @__PURE__ */ i("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
4285
4285
  /* @__PURE__ */ r("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ r(
4286
4286
  "div",
4287
4287
  {
@@ -4307,9 +4307,9 @@ const cn = ({
4307
4307
  }
4308
4308
  )
4309
4309
  ] }, m.order)) : /* @__PURE__ */ r("div", { className: "text-center py-8", children: /* @__PURE__ */ r("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Loading overview data..." }) }) }),
4310
- /* @__PURE__ */ i(ke, { className: "flex justify-between", children: [
4311
- n && /* @__PURE__ */ r(G, { type: "button", variant: "outline", onClick: n, children: "Back" }),
4312
- /* @__PURE__ */ r(G, { onClick: h, isLoading: l, children: "Continue" })
4310
+ /* @__PURE__ */ i(xe, { className: "flex justify-between", children: [
4311
+ n && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: n, children: "Back" }),
4312
+ /* @__PURE__ */ r(V, { onClick: h, isLoading: l, children: "Continue" })
4313
4313
  ] })
4314
4314
  ] }) : null;
4315
4315
  };
@@ -4379,62 +4379,62 @@ const fn = ({
4379
4379
  onComplete: t,
4380
4380
  onBack: n
4381
4381
  }) => {
4382
- const { config: a } = Re(), s = a.locale ?? "en", { criteria: l, initialAnswers: c, isLoading: u, isSubmitting: h, error: m, submit: N } = Ur(e), [T, I] = k({}), [L, f] = k({}), [w, D] = k(0), [U, K] = k(!1);
4382
+ const { config: a } = Re(), s = a.locale ?? "en", { criteria: l, initialAnswers: c, isLoading: u, isSubmitting: h, error: m, submit: I } = Ur(e), [T, R] = k({}), [L, f] = k({}), [S, D] = k(0), [U, W] = k(!1);
4383
4383
  Fe.useEffect(() => {
4384
- c && Object.keys(c).length > 0 && Object.keys(T).length === 0 && I(c);
4384
+ c && Object.keys(c).length > 0 && Object.keys(T).length === 0 && R(c);
4385
4385
  }, [c]);
4386
4386
  const M = Ae(
4387
4387
  () => l && l.length > 0 ? hn(l) : [],
4388
4388
  [l]
4389
- ), B = w === M.length - 1, Y = M[w] ?? [];
4389
+ ), B = S === M.length - 1, G = M[S] ?? [];
4390
4390
  Fe.useEffect(() => {
4391
- !u && l && l.length === 0 && !U && !h && (K(!0), N({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
4392
- }, [u, l, U, h, N, e, t]);
4393
- const Q = J((z, O) => {
4394
- I((Z) => ({ ...Z, [z]: O })), f((Z) => {
4395
- const re = { ...Z };
4396
- return delete re[z], re;
4391
+ !u && l && l.length === 0 && !U && !h && (W(!0), I({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
4392
+ }, [u, l, U, h, I, e, t]);
4393
+ const J = te((z, O) => {
4394
+ R((ne) => ({ ...ne, [z]: O })), f((ne) => {
4395
+ const ae = { ...ne };
4396
+ return delete ae[z], ae;
4397
4397
  });
4398
- }, []), E = J(() => {
4398
+ }, []), F = te(() => {
4399
4399
  const z = {};
4400
- for (const { criterion: O } of Y) {
4401
- const Z = yn(O, T[O.id] ?? []);
4402
- Z && (z[O.id] = Z);
4400
+ for (const { criterion: O } of G) {
4401
+ const ne = yn(O, T[O.id] ?? []);
4402
+ ne && (z[O.id] = ne);
4403
4403
  }
4404
4404
  return f((O) => ({ ...O, ...z })), Object.keys(z).length === 0;
4405
- }, [Y, T]), b = () => {
4406
- E() && D((z) => z + 1);
4407
- }, _ = () => {
4408
- w > 0 ? D((z) => z - 1) : n == null || n();
4405
+ }, [G, T]), b = () => {
4406
+ F() && D((z) => z + 1);
4407
+ }, $ = () => {
4408
+ S > 0 ? D((z) => z - 1) : n == null || n();
4409
4409
  }, H = async () => {
4410
- if (!(!E() || !l))
4410
+ if (!(!F() || !l))
4411
4411
  try {
4412
- const z = l.map((Z) => {
4413
- const re = (T[Z.id] ?? []).filter((ce) => ce && ce.trim());
4414
- return re.length > 0 ? { riskCriteriaId: Z.id, values: re } : null;
4415
- }).filter((Z) => Z !== null);
4416
- await N({ applicantId: e, criteriaValueInputs: z }), t == null || t();
4412
+ const z = l.map((ne) => {
4413
+ const ae = (T[ne.id] ?? []).filter((re) => re && re.trim());
4414
+ return ae.length > 0 ? { riskCriteriaId: ne.id, values: ae } : null;
4415
+ }).filter((ne) => ne !== null);
4416
+ await I({ applicantId: e, criteriaValueInputs: z }), t == null || t();
4417
4417
  } catch (z) {
4418
4418
  console.error("Risk scoring submit error:", z);
4419
4419
  }
4420
4420
  };
4421
- return u ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i(te, { children: [
4421
+ return u ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ i(ee, { children: [
4422
4422
  /* @__PURE__ */ r(Pe, { className: "my-8" }),
4423
4423
  /* @__PURE__ */ r("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Loading risk scoring criteria…" })
4424
- ] }) }) : !u && l && l.length === 0 ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i(te, { children: [
4424
+ ] }) }) : !u && l && l.length === 0 ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ i(ee, { children: [
4425
4425
  /* @__PURE__ */ r(Pe, { className: "my-8" }),
4426
4426
  /* @__PURE__ */ r("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "No criteria required. Moving to next step…" })
4427
- ] }) }) : m ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
4427
+ ] }) }) : m ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
4428
4428
  "Error loading criteria: ",
4429
4429
  m.message
4430
- ] }) }) }) : l ? /* @__PURE__ */ i(ee, { children: [
4430
+ ] }) }) }) : l ? /* @__PURE__ */ i(X, { children: [
4431
4431
  /* @__PURE__ */ i(be, { children: [
4432
4432
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: "Risk Assessment" }),
4433
4433
  /* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Please answer the following questions for risk evaluation" }),
4434
4434
  M.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
4435
4435
  /* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
4436
4436
  "Page ",
4437
- w + 1,
4437
+ S + 1,
4438
4438
  " of ",
4439
4439
  M.length
4440
4440
  ] }),
@@ -4444,41 +4444,41 @@ const fn = ({
4444
4444
  className: "rounded-full transition-all duration-200",
4445
4445
  style: {
4446
4446
  height: "6px",
4447
- width: O === w ? "20px" : "6px",
4448
- backgroundColor: O <= w ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
4447
+ width: O === S ? "20px" : "6px",
4448
+ backgroundColor: O <= S ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
4449
4449
  }
4450
4450
  },
4451
4451
  O
4452
4452
  )) })
4453
4453
  ] })
4454
4454
  ] }),
4455
- /* @__PURE__ */ r(te, { className: "space-y-6", children: Y.map(({ criterion: z }) => /* @__PURE__ */ r(
4455
+ /* @__PURE__ */ r(ee, { className: "space-y-6", children: G.map(({ criterion: z }) => /* @__PURE__ */ r(
4456
4456
  bn,
4457
4457
  {
4458
4458
  criterion: z,
4459
4459
  value: T[z.id] ?? [],
4460
4460
  error: L[z.id],
4461
4461
  locale: s,
4462
- onChange: (O) => Q(z.id, O)
4462
+ onChange: (O) => J(z.id, O)
4463
4463
  },
4464
4464
  z.id
4465
4465
  )) }),
4466
- /* @__PURE__ */ i(ke, { className: "flex items-center justify-between", children: [
4466
+ /* @__PURE__ */ i(xe, { className: "flex items-center justify-between", children: [
4467
4467
  /* @__PURE__ */ i(
4468
- G,
4468
+ V,
4469
4469
  {
4470
4470
  type: "button",
4471
4471
  variant: "outline",
4472
- onClick: _,
4472
+ onClick: $,
4473
4473
  style: { display: "flex", alignItems: "center", gap: "4px" },
4474
4474
  children: [
4475
4475
  /* @__PURE__ */ r(Mt, { size: 14 }),
4476
- w > 0 ? "Previous" : "Back"
4476
+ S > 0 ? "Previous" : "Back"
4477
4477
  ]
4478
4478
  }
4479
4479
  ),
4480
- B ? /* @__PURE__ */ r(G, { type: "button", isLoading: h, onClick: H, children: "Continue" }) : /* @__PURE__ */ i(
4481
- G,
4480
+ B ? /* @__PURE__ */ r(V, { type: "button", isLoading: h, onClick: H, children: "Continue" }) : /* @__PURE__ */ i(
4481
+ V,
4482
4482
  {
4483
4483
  type: "button",
4484
4484
  onClick: b,
@@ -4565,8 +4565,8 @@ const fn = ({
4565
4565
  {
4566
4566
  type: "checkbox",
4567
4567
  checked: t.includes(m),
4568
- onChange: (N) => {
4569
- N.target.checked ? s([...t, m]) : s(t.filter((T) => T !== m));
4568
+ onChange: (I) => {
4569
+ I.target.checked ? s([...t, m]) : s(t.filter((T) => T !== m));
4570
4570
  },
4571
4571
  className: "metakyc-option-input",
4572
4572
  style: {
@@ -4622,24 +4622,24 @@ const fn = ({
4622
4622
  }
4623
4623
  u(!0), m(null);
4624
4624
  try {
4625
- const I = {
4625
+ const R = {
4626
4626
  applicantId: e,
4627
4627
  investorType: s
4628
4628
  };
4629
- console.log("Submitting investor categorization:", I);
4630
- const L = await a.setInvestorCategorization(I);
4629
+ console.log("Submitting investor categorization:", R);
4630
+ const L = await a.setInvestorCategorization(R);
4631
4631
  console.log("Investor categorization result:", L), t == null || t();
4632
- } catch (I) {
4633
- console.error("Error submitting investor categorization:", I), m(I.message || "Failed to submit investor categorization");
4632
+ } catch (R) {
4633
+ console.error("Error submitting investor categorization:", R), m(R.message || "Failed to submit investor categorization");
4634
4634
  } finally {
4635
4635
  u(!1);
4636
4636
  }
4637
- }, children: /* @__PURE__ */ i(ee, { children: [
4637
+ }, children: /* @__PURE__ */ i(X, { children: [
4638
4638
  /* @__PURE__ */ i(be, { children: [
4639
4639
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: "Which statement best describes you?" }),
4640
4640
  /* @__PURE__ */ r("p", { className: "mt-2", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "All Tokenise clients are treated as Retail Investors under EU regulation, which gives you the highest level of investor protection. For our internal purposes, we ask you to select the description that best matches your situation" })
4641
4641
  ] }),
4642
- /* @__PURE__ */ i(te, { className: "space-y-4", children: [
4642
+ /* @__PURE__ */ i(ee, { className: "space-y-4", children: [
4643
4643
  /* @__PURE__ */ r("p", { className: "text-sm font-medium mb-3", style: { color: "var(--metakyc-text-secondary, #374151)" }, children: "Choose one" }),
4644
4644
  /* @__PURE__ */ r(
4645
4645
  "label",
@@ -4737,10 +4737,10 @@ const fn = ({
4737
4737
  h
4738
4738
  ] }) })
4739
4739
  ] }),
4740
- /* @__PURE__ */ i(ke, { className: "flex justify-between", children: [
4741
- n && /* @__PURE__ */ r(G, { type: "button", variant: "outline", onClick: n, children: "Back" }),
4740
+ /* @__PURE__ */ i(xe, { className: "flex justify-between", children: [
4741
+ n && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: n, children: "Back" }),
4742
4742
  /* @__PURE__ */ r(
4743
- G,
4743
+ V,
4744
4744
  {
4745
4745
  type: "submit",
4746
4746
  isLoading: c,
@@ -4764,101 +4764,101 @@ const vn = ({
4764
4764
  onComplete: t,
4765
4765
  onBack: n
4766
4766
  }) => {
4767
- const { appropriatenessTestService: a } = Re(), [s, l] = k(null), [c, u] = k(!0), [h, m] = k(!1), [N, T] = k(null), [I, L] = k({}), [f, w] = k(0), [D, U] = k(!1), [K, M] = k(!1), [B, Y] = k(0), [Q, E] = k(0);
4767
+ const { appropriatenessTestService: a } = Re(), [s, l] = k(null), [c, u] = k(!0), [h, m] = k(!1), [I, T] = k(null), [R, L] = k({}), [f, S] = k(0), [D, U] = k(!1), [W, M] = k(!1), [B, G] = k(0), [J, F] = k(0), [b, $] = k(null);
4768
4768
  ye(() => {
4769
4769
  (async () => {
4770
4770
  try {
4771
4771
  u(!0), T(null);
4772
- const $ = await a.getAppropriatenessTest(e);
4773
- if (l($), $.waitTimeSpanForNextTry && $.waitTimeSpanForNextTry !== "00:00:00") {
4774
- const V = Nt($.waitTimeSpanForNextTry);
4775
- V > 0 && Y(V);
4772
+ const j = await a.getAppropriatenessTest(e);
4773
+ if (l(j), j.waitTimeSpanForNextTry && j.waitTimeSpanForNextTry !== "00:00:00") {
4774
+ const x = Nt(j.waitTimeSpanForNextTry);
4775
+ x > 0 && G(x);
4776
4776
  }
4777
- } catch ($) {
4778
- T($.message || "Failed to load appropriateness test");
4777
+ } catch (j) {
4778
+ T(j.message || "Failed to load appropriateness test");
4779
4779
  } finally {
4780
4780
  u(!1);
4781
4781
  }
4782
4782
  })();
4783
4783
  }, [e, a]), ye(() => {
4784
4784
  if (!D || f <= 0) return;
4785
- const $ = setInterval(() => {
4786
- w((V) => V <= 1 ? (M(!0), 0) : V - 1);
4785
+ const j = setInterval(() => {
4786
+ S((x) => x <= 1 ? (M(!0), 0) : x - 1);
4787
4787
  }, 1e3);
4788
- return () => clearInterval($);
4788
+ return () => clearInterval(j);
4789
4789
  }, [D, f]), ye(() => {
4790
4790
  if (B <= 0) return;
4791
- const $ = setInterval(() => {
4792
- Y((V) => V <= 1 ? 0 : V - 1);
4791
+ const j = setInterval(() => {
4792
+ G((x) => x <= 1 ? 0 : x - 1);
4793
4793
  }, 1e3);
4794
- return () => clearInterval($);
4794
+ return () => clearInterval(j);
4795
4795
  }, [B]), ye(() => {
4796
- K && !h && z();
4797
- }, [K]);
4798
- const b = () => {
4799
- s && (U(!0), w(s.testDurationSec), E(0), L({}), T(null));
4800
- }, _ = ($, V) => {
4801
- L((ne) => ({ ...ne, [$]: V }));
4802
- }, H = J(async () => {
4796
+ W && !h && ne();
4797
+ }, [W]);
4798
+ const H = () => {
4799
+ s && (U(!0), S(s.testDurationSec), F(0), L({}), T(null));
4800
+ }, z = (j, x) => {
4801
+ L((Q) => ({ ...Q, [j]: x }));
4802
+ }, O = te(async () => {
4803
4803
  try {
4804
- const $ = await a.getAppropriatenessTest(e);
4805
- if (l($), $.waitTimeSpanForNextTry && $.waitTimeSpanForNextTry !== "00:00:00") {
4806
- const V = Nt($.waitTimeSpanForNextTry);
4807
- V > 0 && Y(V);
4804
+ const j = await a.getAppropriatenessTest(e);
4805
+ if (l(j), j.waitTimeSpanForNextTry && j.waitTimeSpanForNextTry !== "00:00:00") {
4806
+ const x = Nt(j.waitTimeSpanForNextTry);
4807
+ x > 0 && G(x);
4808
4808
  }
4809
4809
  } catch {
4810
4810
  }
4811
- }, [e, a]), z = async ($) => {
4811
+ }, [e, a]), ne = async (j) => {
4812
4812
  if (s) {
4813
- if (!K) {
4814
- const V = s.appropriatenessQuestions.length - Object.keys(I).length;
4815
- if (V > 0) {
4816
- T(`Please answer all questions. ${V} remaining.`);
4813
+ if (!W) {
4814
+ const x = s.appropriatenessQuestions.length - Object.keys(R).length;
4815
+ if (x > 0) {
4816
+ T(`Please answer all questions. ${x} remaining.`);
4817
4817
  return;
4818
4818
  }
4819
4819
  }
4820
4820
  m(!0), T(null);
4821
4821
  try {
4822
- const V = s.appropriatenessQuestions.map(
4823
- (F) => ({ appropriatenessQuestionId: F.id, value: I[F.id] || "" })
4824
- ), ne = {
4822
+ const x = s.appropriatenessQuestions.map(
4823
+ (Y) => ({ appropriatenessQuestionId: Y.id, value: R[Y.id] || "" })
4824
+ ), Q = {
4825
4825
  applicantId: e,
4826
4826
  appropriatenessTestId: s.id,
4827
- appropriatenessQuestionResults: V
4827
+ appropriatenessQuestionResults: x
4828
4828
  };
4829
4829
  try {
4830
- const F = await a.fillAppropriatenessTest(ne);
4831
- F.message && (F.message.toLowerCase().includes("pass") || F.message.toLowerCase().includes("success") || F.message.toLowerCase().includes("congratulations")) ? t == null || t() : (T(F.message || "Test completed. Please check the result."), O(), setTimeout(() => H(), 1e3));
4832
- } catch (F) {
4833
- if (F.code === 400 && F.message)
4834
- T(F.message), O(), setTimeout(() => H(), 1500);
4830
+ const Y = await a.fillAppropriatenessTest(Q);
4831
+ Y.isSuccess ? $({ success: !0, message: Y.message || "Congratulations! You have passed the test." }) : ($({ success: !1, message: Y.message || "You did not pass the test." }), setTimeout(() => O(), 1e3));
4832
+ } catch (Y) {
4833
+ if (Y.code === 400 && Y.message)
4834
+ $({ success: !1, message: Y.message }), setTimeout(() => O(), 1500);
4835
4835
  else
4836
- throw F;
4836
+ throw Y;
4837
4837
  }
4838
- } catch (V) {
4839
- T(V.message || "Failed to submit test. Please try again."), O();
4838
+ } catch (x) {
4839
+ T(x.message || "Failed to submit test. Please try again."), ae();
4840
4840
  } finally {
4841
4841
  m(!1);
4842
4842
  }
4843
4843
  }
4844
- }, O = () => {
4845
- U(!1), M(!1), L({}), E(0);
4844
+ }, ae = () => {
4845
+ U(!1), M(!1), L({}), F(0);
4846
4846
  };
4847
4847
  if (c)
4848
- return /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
4848
+ return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
4849
4849
  /* @__PURE__ */ r(Pe, { className: "my-8" }),
4850
4850
  /* @__PURE__ */ r("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: "Loading test..." })
4851
4851
  ] }) }) });
4852
4852
  if (!s)
4853
- return /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("div", { style: { textAlign: "center", padding: "48px 0" }, children: [
4853
+ return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("div", { style: { textAlign: "center", padding: "48px 0" }, children: [
4854
4854
  /* @__PURE__ */ r("p", { style: { fontSize: "16px", fontWeight: 600, color: "var(--metakyc-danger, #ef4444)" }, children: "No test data available" }),
4855
- N && /* @__PURE__ */ r("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: N })
4855
+ I && /* @__PURE__ */ r("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: I })
4856
4856
  ] }) }) });
4857
- const Z = s.testAllowedMaxTry - s.totalFailedTries, re = s.appropriatenessQuestions.length, ce = Object.keys(I).length;
4857
+ const re = s.testAllowedMaxTry - s.totalFailedTries, he = s.appropriatenessQuestions.length, de = Object.keys(R).length;
4858
4858
  if (B > 0)
4859
- return /* @__PURE__ */ i(ee, { children: [
4859
+ return /* @__PURE__ */ i(X, { children: [
4860
4860
  /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: s.displayName }) }),
4861
- /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("div", { style: { textAlign: "center", padding: "32px 0" }, children: [
4861
+ /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("div", { style: { textAlign: "center", padding: "32px 0" }, children: [
4862
4862
  /* @__PURE__ */ r("div", { style: {
4863
4863
  width: "100px",
4864
4864
  height: "100px",
@@ -4876,22 +4876,101 @@ const vn = ({
4876
4876
  }, children: yt(B) }) }),
4877
4877
  /* @__PURE__ */ r("p", { style: { fontSize: "15px", fontWeight: 500, color: "var(--metakyc-text-primary, #111827)" }, children: "Please wait before retrying" }),
4878
4878
  /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "4px" }, children: "You can attempt the test again once the timer expires" }),
4879
- N && /* @__PURE__ */ r("div", { style: {
4879
+ I && /* @__PURE__ */ r("div", { style: {
4880
4880
  marginTop: "20px",
4881
4881
  padding: "12px 16px",
4882
4882
  borderRadius: "10px",
4883
4883
  backgroundColor: "color-mix(in srgb, var(--metakyc-danger, #ef4444) 8%, transparent)",
4884
4884
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 20%, transparent)"
4885
- }, children: /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: N }) })
4885
+ }, children: /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: I }) })
4886
4886
  ] }) })
4887
4887
  ] });
4888
+ if (b) {
4889
+ const j = () => {
4890
+ $(null), ae(), T(null);
4891
+ };
4892
+ return /* @__PURE__ */ i(X, { children: [
4893
+ /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("div", { style: {
4894
+ display: "flex",
4895
+ flexDirection: "column",
4896
+ alignItems: "center",
4897
+ textAlign: "center",
4898
+ padding: "40px 16px",
4899
+ gap: "16px"
4900
+ }, children: [
4901
+ /* @__PURE__ */ r("div", { style: {
4902
+ width: "72px",
4903
+ height: "72px",
4904
+ borderRadius: "50%",
4905
+ display: "flex",
4906
+ alignItems: "center",
4907
+ justifyContent: "center",
4908
+ backgroundColor: b.success ? "color-mix(in srgb, var(--metakyc-success, #10b981) 12%, transparent)" : "color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent)"
4909
+ }, children: b.success ? /* @__PURE__ */ i("svg", { width: "36", height: "36", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-success, #10b981)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
4910
+ /* @__PURE__ */ r("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
4911
+ /* @__PURE__ */ r("polyline", { points: "22 4 12 14.01 9 11.01" })
4912
+ ] }) : /* @__PURE__ */ i("svg", { width: "36", height: "36", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
4913
+ /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "10" }),
4914
+ /* @__PURE__ */ r("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
4915
+ /* @__PURE__ */ r("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
4916
+ ] }) }),
4917
+ /* @__PURE__ */ r("h2", { style: {
4918
+ fontSize: "20px",
4919
+ fontWeight: 700,
4920
+ color: b.success ? "var(--metakyc-success, #10b981)" : "var(--metakyc-danger, #ef4444)",
4921
+ margin: 0
4922
+ }, children: b.success ? "Test Passed" : "Test Failed" }),
4923
+ /* @__PURE__ */ r("p", { style: {
4924
+ fontSize: "14px",
4925
+ color: "var(--metakyc-text-secondary, #6b7280)",
4926
+ margin: 0,
4927
+ lineHeight: 1.6,
4928
+ maxWidth: "400px",
4929
+ whiteSpace: "pre-line"
4930
+ }, children: b.message }),
4931
+ !b.success && re > 0 && /* @__PURE__ */ r("div", { style: {
4932
+ marginTop: "4px",
4933
+ padding: "10px 20px",
4934
+ borderRadius: "10px",
4935
+ backgroundColor: "var(--metakyc-surface, #f9fafb)",
4936
+ border: "1px solid var(--metakyc-border, #e5e7eb)"
4937
+ }, children: /* @__PURE__ */ i("p", { style: {
4938
+ fontSize: "13px",
4939
+ color: "var(--metakyc-text-muted, #9ca3af)",
4940
+ margin: 0
4941
+ }, children: [
4942
+ "You have ",
4943
+ /* @__PURE__ */ r("strong", { style: { color: "var(--metakyc-text-primary, #111827)" }, children: re }),
4944
+ " attempt",
4945
+ re !== 1 ? "s" : "",
4946
+ " remaining"
4947
+ ] }) }),
4948
+ !b.success && re <= 0 && /* @__PURE__ */ r("div", { style: {
4949
+ marginTop: "4px",
4950
+ padding: "10px 20px",
4951
+ borderRadius: "10px",
4952
+ backgroundColor: "color-mix(in srgb, var(--metakyc-danger, #ef4444) 8%, transparent)",
4953
+ border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 20%, transparent)"
4954
+ }, children: /* @__PURE__ */ r("p", { style: {
4955
+ fontSize: "13px",
4956
+ color: "var(--metakyc-danger, #ef4444)",
4957
+ margin: 0
4958
+ }, children: "No attempts remaining. Please contact support for assistance." }) })
4959
+ ] }) }),
4960
+ /* @__PURE__ */ r(xe, { children: /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "center", width: "100%", gap: "12px" }, children: b.success ? /* @__PURE__ */ r(V, { type: "button", onClick: () => t == null ? void 0 : t(), children: "Continue" }) : /* @__PURE__ */ i(rt, { children: [
4961
+ re > 0 && B <= 0 && /* @__PURE__ */ r(V, { type: "button", onClick: j, children: "Retake Test" }),
4962
+ re > 0 && B > 0 && /* @__PURE__ */ r(V, { type: "button", onClick: j, children: "OK" }),
4963
+ re <= 0 && n && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: n, children: "Back" })
4964
+ ] }) }) })
4965
+ ] });
4966
+ }
4888
4967
  if (!D)
4889
- return /* @__PURE__ */ i(ee, { children: [
4968
+ return /* @__PURE__ */ i(X, { children: [
4890
4969
  /* @__PURE__ */ i(be, { children: [
4891
4970
  /* @__PURE__ */ r("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: s.displayName }),
4892
4971
  s.subtitle && /* @__PURE__ */ r("p", { style: { fontSize: "14px", color: "var(--metakyc-text-secondary, #6b7280)", marginTop: "4px" }, children: s.subtitle })
4893
4972
  ] }),
4894
- /* @__PURE__ */ i(te, { children: [
4973
+ /* @__PURE__ */ i(ee, { children: [
4895
4974
  s.description && /* @__PURE__ */ i("div", { style: {
4896
4975
  marginBottom: "20px",
4897
4976
  padding: "12px 14px",
@@ -4917,12 +4996,12 @@ const vn = ({
4917
4996
  {
4918
4997
  icon: "retry",
4919
4998
  label: "Attempts Left",
4920
- value: String(Z),
4921
- variant: Z <= 1 ? "warning" : "default"
4999
+ value: String(re),
5000
+ variant: re <= 1 ? "warning" : "default"
4922
5001
  }
4923
5002
  )
4924
5003
  ] }),
4925
- N && /* @__PURE__ */ i("div", { style: {
5004
+ I && /* @__PURE__ */ i("div", { style: {
4926
5005
  marginBottom: "16px",
4927
5006
  padding: "12px 14px",
4928
5007
  borderRadius: "10px",
@@ -4939,32 +5018,32 @@ const vn = ({
4939
5018
  /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0, lineHeight: 1.5 }, children: [
4940
5019
  /* @__PURE__ */ r("strong", { children: "Previous attempt:" }),
4941
5020
  " ",
4942
- N
5021
+ I
4943
5022
  ] })
4944
5023
  ] }),
4945
- Z <= 0 && /* @__PURE__ */ r("div", { style: {
5024
+ re <= 0 && /* @__PURE__ */ r("div", { style: {
4946
5025
  padding: "12px 14px",
4947
5026
  borderRadius: "10px",
4948
5027
  backgroundColor: "color-mix(in srgb, var(--metakyc-danger, #ef4444) 8%, transparent)",
4949
5028
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 20%, transparent)"
4950
5029
  }, children: /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: "You have used all your attempts. Please contact support for assistance." }) })
4951
5030
  ] }),
4952
- /* @__PURE__ */ r(ke, { children: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", justifyContent: n ? "space-between" : "flex-end", width: "100%" }, children: [
4953
- n && /* @__PURE__ */ r(G, { type: "button", variant: "outline", onClick: n, children: "Back" }),
4954
- /* @__PURE__ */ r(G, { type: "button", onClick: b, disabled: Z <= 0, children: "Start Test" })
5031
+ /* @__PURE__ */ r(xe, { children: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", justifyContent: n ? "space-between" : "flex-end", width: "100%" }, children: [
5032
+ n && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: n, children: "Back" }),
5033
+ /* @__PURE__ */ r(V, { type: "button", onClick: H, disabled: re <= 0, children: "Start Test" })
4955
5034
  ] }) })
4956
5035
  ] });
4957
- const he = s.appropriatenessQuestions[Q], ue = Q === re - 1, P = ce === re, W = f <= 60;
4958
- return /* @__PURE__ */ i(ee, { children: [
5036
+ const P = s.appropriatenessQuestions[J], K = J === he - 1, Z = de === he, ue = f <= 60;
5037
+ return /* @__PURE__ */ i(X, { children: [
4959
5038
  /* @__PURE__ */ i(be, { children: [
4960
5039
  /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
4961
5040
  /* @__PURE__ */ i("div", { children: [
4962
5041
  /* @__PURE__ */ r("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: s.displayName }),
4963
5042
  /* @__PURE__ */ i("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "2px" }, children: [
4964
5043
  "Question ",
4965
- Q + 1,
5044
+ J + 1,
4966
5045
  " of ",
4967
- re
5046
+ he
4968
5047
  ] })
4969
5048
  ] }),
4970
5049
  /* @__PURE__ */ i("div", { style: {
@@ -4973,7 +5052,7 @@ const vn = ({
4973
5052
  gap: "8px",
4974
5053
  padding: "6px 14px",
4975
5054
  borderRadius: "999px",
4976
- backgroundColor: W ? "color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent)" : "var(--metakyc-surface, #f3f4f6)",
5055
+ backgroundColor: ue ? "color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent)" : "var(--metakyc-surface, #f3f4f6)",
4977
5056
  transition: "all 0.3s ease"
4978
5057
  }, children: [
4979
5058
  /* @__PURE__ */ i(
@@ -4983,7 +5062,7 @@ const vn = ({
4983
5062
  height: "16",
4984
5063
  viewBox: "0 0 24 24",
4985
5064
  fill: "none",
4986
- stroke: W ? "var(--metakyc-danger, #ef4444)" : "var(--metakyc-text-muted, #9ca3af)",
5065
+ stroke: ue ? "var(--metakyc-danger, #ef4444)" : "var(--metakyc-text-muted, #9ca3af)",
4987
5066
  strokeWidth: "2",
4988
5067
  strokeLinecap: "round",
4989
5068
  strokeLinejoin: "round",
@@ -4997,7 +5076,7 @@ const vn = ({
4997
5076
  fontSize: "16px",
4998
5077
  fontWeight: 700,
4999
5078
  fontVariantNumeric: "tabular-nums",
5000
- color: W ? "var(--metakyc-danger, #ef4444)" : "var(--metakyc-text-primary, #111827)",
5079
+ color: ue ? "var(--metakyc-danger, #ef4444)" : "var(--metakyc-text-primary, #111827)",
5001
5080
  transition: "color 0.3s ease"
5002
5081
  }, children: yt(f) })
5003
5082
  ] })
@@ -5012,7 +5091,7 @@ const vn = ({
5012
5091
  height: "100%",
5013
5092
  borderRadius: "999px",
5014
5093
  backgroundColor: "var(--metakyc-primary, #2563eb)",
5015
- width: `${ce / re * 100}%`,
5094
+ width: `${de / he * 100}%`,
5016
5095
  transition: "width 0.3s ease"
5017
5096
  } }) }),
5018
5097
  /* @__PURE__ */ i("div", { style: {
@@ -5021,47 +5100,47 @@ const vn = ({
5021
5100
  marginTop: "4px"
5022
5101
  }, children: [
5023
5102
  /* @__PURE__ */ i("span", { style: { fontSize: "11px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
5024
- ce,
5103
+ de,
5025
5104
  " answered"
5026
5105
  ] }),
5027
5106
  /* @__PURE__ */ i("span", { style: { fontSize: "11px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
5028
- Z,
5107
+ re,
5029
5108
  " attempt",
5030
- Z !== 1 ? "s" : "",
5109
+ re !== 1 ? "s" : "",
5031
5110
  " left"
5032
5111
  ] })
5033
5112
  ] })
5034
5113
  ] })
5035
5114
  ] }),
5036
- /* @__PURE__ */ i(te, { children: [
5037
- he && /* @__PURE__ */ r(
5115
+ /* @__PURE__ */ i(ee, { children: [
5116
+ P && /* @__PURE__ */ r(
5038
5117
  wn,
5039
5118
  {
5040
- question: he,
5041
- index: Q,
5042
- selectedAnswer: I[he.id],
5043
- onSelect: ($) => _(he.id, $),
5119
+ question: P,
5120
+ index: J,
5121
+ selectedAnswer: R[P.id],
5122
+ onSelect: (j) => z(P.id, j),
5044
5123
  disabled: h
5045
5124
  }
5046
5125
  ),
5047
- re > 1 && /* @__PURE__ */ r("div", { style: {
5126
+ he > 1 && /* @__PURE__ */ r("div", { style: {
5048
5127
  display: "flex",
5049
5128
  justifyContent: "center",
5050
5129
  gap: "6px",
5051
5130
  marginTop: "20px",
5052
5131
  flexWrap: "wrap"
5053
- }, children: s.appropriatenessQuestions.map(($, V) => /* @__PURE__ */ r(
5132
+ }, children: s.appropriatenessQuestions.map((j, x) => /* @__PURE__ */ r(
5054
5133
  "button",
5055
5134
  {
5056
5135
  type: "button",
5057
- onClick: () => E(V),
5136
+ onClick: () => F(x),
5058
5137
  style: {
5059
5138
  width: "28px",
5060
5139
  height: "28px",
5061
5140
  borderRadius: "8px",
5062
- border: V === Q ? "2px solid var(--metakyc-primary, #2563eb)" : "1px solid var(--metakyc-border, #e5e7eb)",
5063
- backgroundColor: I[$.id] ? V === Q ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)" : "color-mix(in srgb, var(--metakyc-primary, #2563eb) 8%, transparent)" : V === Q ? "var(--metakyc-surface, #f9fafb)" : "var(--metakyc-background, #ffffff)",
5064
- color: I[$.id] ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
5141
+ border: x === J ? "2px solid var(--metakyc-primary, #2563eb)" : "1px solid var(--metakyc-border, #e5e7eb)",
5142
+ backgroundColor: R[j.id] ? x === J ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)" : "color-mix(in srgb, var(--metakyc-primary, #2563eb) 8%, transparent)" : x === J ? "var(--metakyc-surface, #f9fafb)" : "var(--metakyc-background, #ffffff)",
5143
+ color: R[j.id] ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
5065
5144
  fontSize: "12px",
5066
5145
  fontWeight: 600,
5067
5146
  cursor: "pointer",
@@ -5071,11 +5150,11 @@ const vn = ({
5071
5150
  alignItems: "center",
5072
5151
  justifyContent: "center"
5073
5152
  },
5074
- children: V + 1
5153
+ children: x + 1
5075
5154
  },
5076
- $.id
5155
+ j.id
5077
5156
  )) }),
5078
- K && /* @__PURE__ */ i("div", { style: {
5157
+ W && /* @__PURE__ */ i("div", { style: {
5079
5158
  marginTop: "16px",
5080
5159
  padding: "12px 14px",
5081
5160
  borderRadius: "10px",
@@ -5091,45 +5170,45 @@ const vn = ({
5091
5170
  ] }),
5092
5171
  /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "#b45309", margin: 0, fontWeight: 500 }, children: "Time's up! Your answers are being submitted." })
5093
5172
  ] }),
5094
- N && !K && /* @__PURE__ */ r("div", { style: {
5173
+ I && !W && /* @__PURE__ */ r("div", { style: {
5095
5174
  marginTop: "16px",
5096
5175
  padding: "12px 14px",
5097
5176
  borderRadius: "10px",
5098
5177
  backgroundColor: "color-mix(in srgb, var(--metakyc-danger, #ef4444) 8%, transparent)",
5099
5178
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 20%, transparent)"
5100
- }, children: /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: N }) })
5179
+ }, children: /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: I }) })
5101
5180
  ] }),
5102
- /* @__PURE__ */ r(ke, { children: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%" }, children: [
5181
+ /* @__PURE__ */ r(xe, { children: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%" }, children: [
5103
5182
  /* @__PURE__ */ r(
5104
- G,
5183
+ V,
5105
5184
  {
5106
5185
  type: "button",
5107
5186
  variant: "outline",
5108
5187
  onClick: () => {
5109
- Q > 0 ? E(($) => $ - 1) : n == null || n();
5188
+ J > 0 ? F((j) => j - 1) : n == null || n();
5110
5189
  },
5111
5190
  disabled: h,
5112
- children: Q > 0 ? "Previous" : "Cancel"
5191
+ children: J > 0 ? "Previous" : "Cancel"
5113
5192
  }
5114
5193
  ),
5115
5194
  /* @__PURE__ */ i("div", { style: { display: "flex", gap: "8px" }, children: [
5116
- !ue && /* @__PURE__ */ r(
5117
- G,
5195
+ !K && /* @__PURE__ */ r(
5196
+ V,
5118
5197
  {
5119
5198
  type: "button",
5120
- onClick: () => E(($) => $ + 1),
5199
+ onClick: () => F((j) => j + 1),
5121
5200
  children: "Next"
5122
5201
  }
5123
5202
  ),
5124
- (ue || P) && /* @__PURE__ */ r(
5125
- G,
5203
+ (K || Z) && /* @__PURE__ */ r(
5204
+ V,
5126
5205
  {
5127
5206
  type: "button",
5128
5207
  isLoading: h,
5129
- onClick: () => z(),
5130
- disabled: !P && !K,
5131
- style: { opacity: P || K ? 1 : 0.5 },
5132
- children: K ? "Submitting..." : "Submit Test"
5208
+ onClick: () => ne(),
5209
+ disabled: !Z && !W,
5210
+ style: { opacity: Z || W ? 1 : 0.5 },
5211
+ children: W ? "Submitting..." : "Submit Test"
5133
5212
  }
5134
5213
  )
5135
5214
  ] })
@@ -5267,9 +5346,9 @@ const vn = ({
5267
5346
  onBack: n
5268
5347
  }) => {
5269
5348
  var Me, Ze, je, We;
5270
- const { applicantService: a, baseInformationService: s, config: l, currentTheme: c } = Re(), { identityData: u, provider: h, token: m, isLoading: N, error: T, requestIdentity: I, restartIdentity: L } = Hr(e), [f, w] = k(null), [D, U] = k(null), [K, M] = k([]), [B, Y] = k([]), [Q, E] = k(!0), [b, _] = k(!1), [H, z] = k(null), [O, Z] = k(!1), re = Fe.useRef(!1), [ce, he] = k({}), [ue, P] = k({}), W = c != null && c.reviewPageFields && c.reviewPageFields.length > 0 ? c.reviewPageFields[0] : null, $ = !!(c != null && c.reviewPageDisabled), V = le(!1);
5271
- V.current = $;
5272
- const ne = Wt({
5349
+ const { applicantService: a, baseInformationService: s, config: l, currentTheme: c } = Re(), { identityData: u, provider: h, token: m, isLoading: I, error: T, requestIdentity: R, restartIdentity: L } = Hr(e), [f, S] = k(null), [D, U] = k(null), [W, M] = k([]), [B, G] = k([]), [J, F] = k(!0), [b, $] = k(!1), [H, z] = k(null), [O, ne] = k(!1), ae = Fe.useRef(!1), [re, he] = k({}), [de, P] = k({}), K = c != null && c.reviewPageFields && c.reviewPageFields.length > 0 ? c.reviewPageFields[0] : null, Z = !!(c != null && c.reviewPageDisabled), ue = le(!1);
5350
+ ue.current = Z;
5351
+ const j = Wt({
5273
5352
  defaultValues: {
5274
5353
  street: "",
5275
5354
  streetNumber: "",
@@ -5281,24 +5360,24 @@ const vn = ({
5281
5360
  }
5282
5361
  });
5283
5362
  ye(() => {
5284
- if ($) {
5285
- re.current || (re.current = !0, I().then(() => _(!0)).catch((j) => console.error("[Identity] Auto-request failed:", j)).finally(() => E(!1)));
5363
+ if (Z) {
5364
+ ae.current || (ae.current = !0, R().then(() => $(!0)).catch((_) => console.error("[Identity] Auto-request failed:", _)).finally(() => F(!1)));
5286
5365
  return;
5287
5366
  }
5288
5367
  (async () => {
5289
5368
  try {
5290
- const [j, q, p] = await Promise.all([
5369
+ const [_, q, p] = await Promise.all([
5291
5370
  a.getApplicantData(e),
5292
5371
  s.getCountries("", "en"),
5293
5372
  s.getCountries("", "en", 40)
5294
5373
  // CountriesType.PhoneNumber
5295
5374
  ]);
5296
- U(j);
5297
- const v = /* @__PURE__ */ new Set(), R = q.map((y) => ({ value: y.abbreviation3 || y.abbreviation, label: y.name })).filter((y) => !y.value || v.has(y.value) ? !1 : (v.add(y.value), !0));
5298
- M(R);
5299
- const x = /* @__PURE__ */ new Set(), o = p.filter((y) => y.countryCode).map((y) => ({ value: y.countryCode, label: `${y.countryCode} – ${y.name}` })).filter((y) => x.has(y.value) ? !1 : (x.add(y.value), !0));
5300
- Y(o);
5301
- const d = j.applicantRequestData;
5375
+ U(_);
5376
+ const w = /* @__PURE__ */ new Set(), E = q.map((y) => ({ value: y.abbreviation3 || y.abbreviation, label: y.name })).filter((y) => !y.value || w.has(y.value) ? !1 : (w.add(y.value), !0));
5377
+ M(E);
5378
+ const v = /* @__PURE__ */ new Set(), o = p.filter((y) => y.countryCode).map((y) => ({ value: y.countryCode, label: `${y.countryCode} – ${y.name}` })).filter((y) => v.has(y.value) ? !1 : (v.add(y.value), !0));
5379
+ G(o);
5380
+ const d = _.applicantRequestData;
5302
5381
  if (he({
5303
5382
  firstName: (d == null ? void 0 : d.firstName) || "",
5304
5383
  lastName: (d == null ? void 0 : d.lastName) || "",
@@ -5321,7 +5400,7 @@ const vn = ({
5321
5400
  occupation: (d == null ? void 0 : d.occupation) || "",
5322
5401
  taxNumber: (d == null ? void 0 : d.taxNumber) || "",
5323
5402
  defaultLanguage: (d == null ? void 0 : d.defaultLanguage) || ""
5324
- }), ne.reset({
5403
+ }), j.reset({
5325
5404
  street: (d == null ? void 0 : d.street) || "",
5326
5405
  streetNumber: (d == null ? void 0 : d.streetNumber) || "",
5327
5406
  city: (d == null ? void 0 : d.city) || "",
@@ -5329,43 +5408,43 @@ const vn = ({
5329
5408
  country: (d == null ? void 0 : d.country) || "",
5330
5409
  nationality: (d == null ? void 0 : d.nationality) || "",
5331
5410
  phonenumber: (d == null ? void 0 : d.phonenumber) || ""
5332
- }), j.kycRecords && j.kycRecords.length > 0 && j.kycRecords[0].providerTokenObject !== null && !re.current && V.current) {
5333
- console.log("[Identity] Review page disabled + existing identity — auto-requesting..."), re.current = !0;
5411
+ }), _.kycRecords && _.kycRecords.length > 0 && _.kycRecords[0].providerTokenObject !== null && !ae.current && ue.current) {
5412
+ console.log("[Identity] Review page disabled + existing identity — auto-requesting..."), ae.current = !0;
5334
5413
  try {
5335
- await I(), _(!0);
5414
+ await R(), $(!0);
5336
5415
  } catch (y) {
5337
5416
  console.error("[Identity] Auto-request failed:", y);
5338
5417
  }
5339
5418
  }
5340
- } catch (j) {
5341
- console.error("Error loading applicant data:", j);
5419
+ } catch (_) {
5420
+ console.error("Error loading applicant data:", _);
5342
5421
  } finally {
5343
- E(!1);
5422
+ F(!1);
5344
5423
  }
5345
5424
  })();
5346
5425
  }, [e]), ye(() => {
5347
- u && !b && V.current && (console.log("[Identity] Review page disabled — showing cached provider"), _(!0));
5426
+ u && !b && ue.current && (console.log("[Identity] Review page disabled — showing cached provider"), $(!0));
5348
5427
  }, [u, b]), ye(() => {
5349
5428
  if (m) {
5350
5429
  if (m.expiresAt) {
5351
5430
  const g = new Date(m.expiresAt).getTime();
5352
5431
  if (Date.now() >= g) {
5353
- console.warn("[Identity] Token has expired (expiresAt)"), Z(!0), z("Your verification session has expired. Please restart.");
5432
+ console.warn("[Identity] Token has expired (expiresAt)"), ne(!0), z("Your verification session has expired. Please restart.");
5354
5433
  return;
5355
5434
  }
5356
5435
  }
5357
5436
  if (m.url)
5358
5437
  try {
5359
- const j = new URL(m.url).toString().toLowerCase();
5360
- if (j.includes("expired") || j.includes("invalid") || j.includes("error")) {
5361
- console.warn("[Identity] Token URL indicates expiration"), Z(!0), z("Your verification link has expired. Please restart.");
5438
+ const _ = new URL(m.url).toString().toLowerCase();
5439
+ if (_.includes("expired") || _.includes("invalid") || _.includes("error")) {
5440
+ console.warn("[Identity] Token URL indicates expiration"), ne(!0), z("Your verification link has expired. Please restart.");
5362
5441
  return;
5363
5442
  }
5364
5443
  } catch {
5365
5444
  console.error("[Identity] Invalid token URL");
5366
5445
  }
5367
5446
  if (m.status === "expired" || m.error === "expired" || m.expired === !0) {
5368
- console.warn("[Identity] Token object indicates expiration"), Z(!0), z("Your verification session has expired. Please restart.");
5447
+ console.warn("[Identity] Token object indicates expiration"), ne(!0), z("Your verification session has expired. Please restart.");
5369
5448
  return;
5370
5449
  }
5371
5450
  }
@@ -5378,54 +5457,54 @@ const vn = ({
5378
5457
  if (new URL(m.url), g === Le.SardinAI) {
5379
5458
  console.log("[SardinAI] Initializing Risk SDK in background...");
5380
5459
  try {
5381
- const j = et.parseProviderConfig(h, m, l);
5382
- et.createProvider(h, j).initialize().then(() => {
5460
+ const _ = et.parseProviderConfig(h, m, l);
5461
+ et.createProvider(h, _).initialize().then(() => {
5383
5462
  console.log("[SardinAI] Risk SDK initialized successfully in background");
5384
5463
  }).catch((p) => {
5385
5464
  console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", p);
5386
5465
  });
5387
- } catch (j) {
5388
- console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", j);
5466
+ } catch (_) {
5467
+ console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", _);
5389
5468
  }
5390
5469
  }
5391
- w({ type: "url", url: m.url });
5392
- } catch (j) {
5393
- console.error("[Identity] Invalid URL:", j), z("Invalid verification URL. Please restart."), Z(!0);
5470
+ S({ type: "url", url: m.url });
5471
+ } catch (_) {
5472
+ console.error("[Identity] Invalid URL:", _), z("Invalid verification URL. Please restart."), ne(!0);
5394
5473
  }
5395
5474
  return;
5396
5475
  }
5397
5476
  if (g === Le.SardinAI) {
5398
5477
  console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), z(null);
5399
5478
  try {
5400
- const j = et.parseProviderConfig(h, m, l), q = et.createProvider(h, j);
5479
+ const _ = et.parseProviderConfig(h, m, l), q = et.createProvider(h, _);
5401
5480
  q.initialize().then(() => {
5402
- console.log("[SardinAI] Risk SDK initialized successfully"), w(q), setTimeout(() => {
5481
+ console.log("[SardinAI] Risk SDK initialized successfully"), S(q), setTimeout(() => {
5403
5482
  t == null || t();
5404
5483
  }, 2e3);
5405
5484
  }).catch((p) => {
5406
- var R;
5485
+ var E;
5407
5486
  console.error("[SardinAI] Failed to initialize:", p);
5408
- const v = ((R = p.message) == null ? void 0 : R.toLowerCase()) || "";
5409
- v.includes("expired") || v.includes("invalid") || v.includes("401") || v.includes("400") ? (Z(!0), z("Session expired or invalid. Please restart verification.")) : z(`Failed to initialize: ${p.message}`);
5487
+ const w = ((E = p.message) == null ? void 0 : E.toLowerCase()) || "";
5488
+ w.includes("expired") || w.includes("invalid") || w.includes("401") || w.includes("400") ? (ne(!0), z("Session expired or invalid. Please restart verification.")) : z(`Failed to initialize: ${p.message}`);
5410
5489
  });
5411
- } catch (j) {
5412
- console.error("[SardinAI] Error creating provider:", j), z(`Configuration error: ${j.message}`);
5490
+ } catch (_) {
5491
+ console.error("[SardinAI] Error creating provider:", _), z(`Configuration error: ${_.message}`);
5413
5492
  }
5414
5493
  return;
5415
5494
  }
5416
5495
  try {
5417
5496
  z(null);
5418
- const j = et.parseProviderConfig(h, m, l), q = et.createProvider(h, j);
5497
+ const _ = et.parseProviderConfig(h, m, l), q = et.createProvider(h, _);
5419
5498
  g === Le.Sumsub ? (q.initialize("identity-container").catch((p) => {
5420
- var v;
5421
- console.error("[Sumsub] Initialization error:", p), z(`Failed to initialize: ${p.message}`), (v = p.message) != null && v.toLowerCase().includes("expired") && Z(!0);
5499
+ var w;
5500
+ console.error("[Sumsub] Initialization error:", p), z(`Failed to initialize: ${p.message}`), (w = p.message) != null && w.toLowerCase().includes("expired") && ne(!0);
5422
5501
  }), q.onComplete && q.onComplete(() => {
5423
5502
  t == null || t();
5424
5503
  })) : g === Le.Onfido && q.initialize("identity-container").catch((p) => {
5425
5504
  console.error("[Onfido] Initialization error:", p), z(`Failed to initialize: ${p.message}`);
5426
- }), w(q);
5427
- } catch (j) {
5428
- console.error("[Identity] Provider setup error:", j), z(`Setup error: ${j.message}`);
5505
+ }), S(q);
5506
+ } catch (_) {
5507
+ console.error("[Identity] Provider setup error:", _), z(`Setup error: ${_.message}`);
5429
5508
  }
5430
5509
  }
5431
5510
  return () => {
@@ -5437,33 +5516,33 @@ const vn = ({
5437
5516
  }
5438
5517
  };
5439
5518
  }, [h, m, f, b, t, O]);
5440
- const F = async () => {
5519
+ const x = async () => {
5441
5520
  try {
5442
- z(null), Z(!1), await I(), _(!0);
5521
+ z(null), ne(!1), await R(), $(!0);
5443
5522
  } catch (g) {
5444
5523
  console.error("Error starting identity verification:", g);
5445
5524
  }
5446
- }, X = async () => {
5525
+ }, Q = async () => {
5447
5526
  try {
5448
- z(null), Z(!1), w(null), console.log("[Identity] Restarting verification..."), await L(), _(!0);
5527
+ z(null), ne(!1), S(null), console.log("[Identity] Restarting verification..."), await L(), $(!0);
5449
5528
  } catch (g) {
5450
5529
  console.error("Error restarting identity verification:", g), z(g.message || "Failed to restart verification");
5451
5530
  }
5452
5531
  };
5453
- if (Q || N)
5454
- return /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i(te, { children: [
5532
+ if (J || I)
5533
+ return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ i(ee, { children: [
5455
5534
  /* @__PURE__ */ r(Pe, { className: "my-8" }),
5456
5535
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
5457
5536
  ] }) });
5458
5537
  if (T)
5459
- return /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
5538
+ return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
5460
5539
  "Error: ",
5461
5540
  T.message
5462
5541
  ] }) }) });
5463
5542
  if (b && (H || O))
5464
- return /* @__PURE__ */ i(ee, { children: [
5543
+ return /* @__PURE__ */ i(X, { children: [
5465
5544
  /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
5466
- /* @__PURE__ */ i(te, { children: [
5545
+ /* @__PURE__ */ i(ee, { children: [
5467
5546
  /* @__PURE__ */ r("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg mb-6", children: /* @__PURE__ */ i("div", { className: "flex items-start", children: [
5468
5547
  /* @__PURE__ */ r(
5469
5548
  "svg",
@@ -5497,32 +5576,32 @@ const vn = ({
5497
5576
  ] })
5498
5577
  ] })
5499
5578
  ] }),
5500
- /* @__PURE__ */ i(ke, { className: "flex justify-between", children: [
5501
- n && /* @__PURE__ */ r(G, { type: "button", variant: "outline", onClick: n, children: "Back" }),
5502
- /* @__PURE__ */ r(G, { type: "button", onClick: X, disabled: N, children: N ? "Restarting..." : "Restart Verification" })
5579
+ /* @__PURE__ */ i(xe, { className: "flex justify-between", children: [
5580
+ n && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: n, children: "Back" }),
5581
+ /* @__PURE__ */ r(V, { type: "button", onClick: Q, disabled: I, children: I ? "Restarting..." : "Restart Verification" })
5503
5582
  ] })
5504
5583
  ] });
5505
5584
  if (b && u) {
5506
5585
  const g = h;
5507
- return m != null && m.url ? /* @__PURE__ */ i(ee, { children: [
5586
+ return m != null && m.url ? /* @__PURE__ */ i(X, { children: [
5508
5587
  /* @__PURE__ */ r(be, { children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
5509
5588
  /* @__PURE__ */ i("div", { children: [
5510
5589
  /* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
5511
5590
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
5512
5591
  ] }),
5513
5592
  /* @__PURE__ */ r(
5514
- G,
5593
+ V,
5515
5594
  {
5516
5595
  type: "button",
5517
5596
  variant: "outline",
5518
5597
  size: "sm",
5519
- onClick: X,
5520
- disabled: N,
5598
+ onClick: Q,
5599
+ disabled: I,
5521
5600
  children: "Restart"
5522
5601
  }
5523
5602
  )
5524
5603
  ] }) }),
5525
- /* @__PURE__ */ i(te, { children: [
5604
+ /* @__PURE__ */ i(ee, { children: [
5526
5605
  /* @__PURE__ */ r("div", { className: "mb-4 p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-yellow-800 dark:text-yellow-200 text-sm", children: [
5527
5606
  /* @__PURE__ */ r("strong", { children: "Important:" }),
5528
5607
  ' If you see an "expired" or "invalid link" message below, click the "Restart" button above to generate a new verification session.'
@@ -5534,14 +5613,14 @@ const vn = ({
5534
5613
  className: "w-full h-full border-0 rounded-lg",
5535
5614
  allow: "camera; microphone; geolocation",
5536
5615
  title: "Identity Verification",
5537
- onLoad: (j) => {
5538
- var q, p, v;
5616
+ onLoad: (_) => {
5617
+ var q, p, w;
5539
5618
  console.log("[Identity] Iframe loaded");
5540
5619
  try {
5541
- const R = j.target, x = R.contentDocument || ((q = R.contentWindow) == null ? void 0 : q.document);
5542
- if (x) {
5543
- const o = ((v = (p = x.body) == null ? void 0 : p.textContent) == null ? void 0 : v.toLowerCase()) || "";
5544
- (o.includes("expired") || o.includes("invalid") || o.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), Z(!0), z("Your verification link has expired."));
5620
+ const E = _.target, v = E.contentDocument || ((q = E.contentWindow) == null ? void 0 : q.document);
5621
+ if (v) {
5622
+ const o = ((w = (p = v.body) == null ? void 0 : p.textContent) == null ? void 0 : w.toLowerCase()) || "";
5623
+ (o.includes("expired") || o.includes("invalid") || o.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), ne(!0), z("Your verification link has expired."));
5545
5624
  }
5546
5625
  } catch {
5547
5626
  console.log("[Identity] Cannot check iframe content (CORS)");
@@ -5550,36 +5629,36 @@ const vn = ({
5550
5629
  }
5551
5630
  ) })
5552
5631
  ] }),
5553
- n && /* @__PURE__ */ r(ke, { children: /* @__PURE__ */ r(G, { variant: "outline", onClick: n, children: "Back" }) })
5554
- ] }) : g === Le.SardinAI ? /* @__PURE__ */ i(ee, { children: [
5632
+ n && /* @__PURE__ */ r(xe, { children: /* @__PURE__ */ r(V, { variant: "outline", onClick: n, children: "Back" }) })
5633
+ ] }) : g === Le.SardinAI ? /* @__PURE__ */ i(X, { children: [
5555
5634
  /* @__PURE__ */ i(be, { children: [
5556
5635
  /* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
5557
5636
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
5558
5637
  ] }),
5559
- /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("div", { className: "text-center py-12", children: [
5638
+ /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("div", { className: "text-center py-12", children: [
5560
5639
  /* @__PURE__ */ r(Pe, { className: "mb-4" }),
5561
5640
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait while we verify your device security" }),
5562
5641
  /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-500 mt-2", children: "This process is automatic and will complete in a few seconds" })
5563
5642
  ] }) })
5564
- ] }) : /* @__PURE__ */ i(ee, { children: [
5643
+ ] }) : /* @__PURE__ */ i(X, { children: [
5565
5644
  /* @__PURE__ */ i(be, { children: [
5566
5645
  /* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
5567
5646
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
5568
5647
  ] }),
5569
- /* @__PURE__ */ r(te, { children: /* @__PURE__ */ r("div", { id: "identity-container", className: "min-h-[400px]" }) }),
5570
- n && /* @__PURE__ */ r(ke, { children: /* @__PURE__ */ r(G, { variant: "outline", onClick: n, children: "Back" }) })
5648
+ /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r("div", { id: "identity-container", className: "min-h-[400px]" }) }),
5649
+ n && /* @__PURE__ */ r(xe, { children: /* @__PURE__ */ r(V, { variant: "outline", onClick: n, children: "Back" }) })
5571
5650
  ] });
5572
5651
  }
5573
- const ae = /* @__PURE__ */ new Set(["country", "nationality", "taxCountry", "countryOfBirth", "mobileCountryCode", "otherNationality"]), de = (g = 4) => ({ 1: "col-span-1", 2: "col-span-2", 3: "col-span-3", 4: "col-span-4" })[g] || "col-span-4", we = (g, j) => {
5574
- if (!j && j !== 0) return "—";
5575
- if (ae.has(g) && g !== "mobileCountryCode") {
5576
- const q = K.find((p) => p.value === j);
5577
- return q ? q.label : String(j);
5652
+ const Y = /* @__PURE__ */ new Set(["country", "nationality", "taxCountry", "countryOfBirth", "mobileCountryCode", "otherNationality"]), ce = (g = 4) => ({ 1: "col-span-1", 2: "col-span-2", 3: "col-span-3", 4: "col-span-4" })[g] || "col-span-4", we = (g, _) => {
5653
+ if (!_ && _ !== 0) return "—";
5654
+ if (Y.has(g) && g !== "mobileCountryCode") {
5655
+ const q = W.find((p) => p.value === _);
5656
+ return q ? q.label : String(_);
5578
5657
  }
5579
- return String(j);
5658
+ return String(_);
5580
5659
  }, De = ({ helpText: g }) => {
5581
- const [j, q] = k(!1), p = le(null), [, v] = k({ top: 0, left: 0 });
5582
- return /* @__PURE__ */ i(st, { children: [
5660
+ const [_, q] = k(!1), p = le(null), [, w] = k({ top: 0, left: 0 });
5661
+ return /* @__PURE__ */ i(rt, { children: [
5583
5662
  /* @__PURE__ */ r(
5584
5663
  "button",
5585
5664
  {
@@ -5588,8 +5667,8 @@ const vn = ({
5588
5667
  ref: p,
5589
5668
  onClick: () => {
5590
5669
  if (p.current) {
5591
- const x = p.current.getBoundingClientRect();
5592
- v({ top: x.bottom + window.scrollY + 6, left: x.left + window.scrollX });
5670
+ const v = p.current.getBoundingClientRect();
5671
+ w({ top: v.bottom + window.scrollY + 6, left: v.left + window.scrollX });
5593
5672
  }
5594
5673
  q(!0);
5595
5674
  },
@@ -5614,7 +5693,7 @@ const vn = ({
5614
5693
  children: "?"
5615
5694
  }
5616
5695
  ),
5617
- j && Ut.createPortal(
5696
+ _ && Ut.createPortal(
5618
5697
  /* @__PURE__ */ r(
5619
5698
  "div",
5620
5699
  {
@@ -5633,7 +5712,7 @@ const vn = ({
5633
5712
  children: /* @__PURE__ */ i(
5634
5713
  "div",
5635
5714
  {
5636
- onClick: (x) => x.stopPropagation(),
5715
+ onClick: (v) => v.stopPropagation(),
5637
5716
  style: {
5638
5717
  background: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
5639
5718
  border: "1px solid var(--metakyc-border, #e5e7eb)",
@@ -5671,15 +5750,15 @@ const vn = ({
5671
5750
  document.body
5672
5751
  )
5673
5752
  ] });
5674
- }, xe = (g, j) => j ? /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "flex-start", gap: 5, flexWrap: "nowrap" }, children: [
5753
+ }, ve = (g, _) => _ ? /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "flex-start", gap: 5, flexWrap: "nowrap" }, children: [
5675
5754
  /* @__PURE__ */ r("div", { style: { flex: 1, minWidth: 0 }, children: g }),
5676
- /* @__PURE__ */ r("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ r(De, { helpText: j }) })
5677
- ] }) : g, Ge = (g, j) => {
5678
- const q = `cf-${j}`, p = g.paramName ?? "", v = ue[p];
5755
+ /* @__PURE__ */ r("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ r(De, { helpText: _ }) })
5756
+ ] }) : g, Ge = (g, _) => {
5757
+ const q = `cf-${_}`, p = g.paramName ?? "", w = de[p];
5679
5758
  if (g.customType === "br")
5680
- return /* @__PURE__ */ r("div", { className: de(g.colSpan), style: { minHeight: "0.5rem" } }, q);
5759
+ return /* @__PURE__ */ r("div", { className: ce(g.colSpan), style: { minHeight: "0.5rem" } }, q);
5681
5760
  if (g.customType === "paragraph")
5682
- return /* @__PURE__ */ r("div", { className: de(g.colSpan), children: /* @__PURE__ */ r(
5761
+ return /* @__PURE__ */ r("div", { className: ce(g.colSpan), children: /* @__PURE__ */ r(
5683
5762
  "div",
5684
5763
  {
5685
5764
  className: "text-sm",
@@ -5691,13 +5770,13 @@ const vn = ({
5691
5770
  return /* @__PURE__ */ r(
5692
5771
  "div",
5693
5772
  {
5694
- className: de(g.colSpan),
5773
+ className: ce(g.colSpan),
5695
5774
  dangerouslySetInnerHTML: { __html: g.label || "" }
5696
5775
  },
5697
5776
  q
5698
5777
  );
5699
5778
  if (g.customType === "link")
5700
- return /* @__PURE__ */ r("div", { className: de(g.colSpan), children: xe(
5779
+ return /* @__PURE__ */ r("div", { className: ce(g.colSpan), children: ve(
5701
5780
  /* @__PURE__ */ r(
5702
5781
  "a",
5703
5782
  {
@@ -5712,15 +5791,15 @@ const vn = ({
5712
5791
  g.helpText
5713
5792
  ) }, q);
5714
5793
  if (g.customType === "checkbox" || g.customType === "link_checkbox") {
5715
- const R = v === "true" || v === !0;
5716
- return /* @__PURE__ */ r("div", { className: de(g.colSpan), children: xe(
5794
+ const E = w === "true" || w === !0;
5795
+ return /* @__PURE__ */ r("div", { className: ce(g.colSpan), children: ve(
5717
5796
  /* @__PURE__ */ i("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
5718
5797
  /* @__PURE__ */ r(
5719
5798
  "input",
5720
5799
  {
5721
5800
  type: "checkbox",
5722
- checked: !!R,
5723
- onChange: (x) => P((o) => ({ ...o, [p]: String(x.target.checked) })),
5801
+ checked: !!E,
5802
+ onChange: (v) => P((o) => ({ ...o, [p]: String(v.target.checked) })),
5724
5803
  style: {
5725
5804
  width: 16,
5726
5805
  height: 16,
@@ -5730,7 +5809,7 @@ const vn = ({
5730
5809
  }
5731
5810
  }
5732
5811
  ),
5733
- /* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: g.customType === "link_checkbox" && g.linkUrl ? /* @__PURE__ */ i(st, { children: [
5812
+ /* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: g.customType === "link_checkbox" && g.linkUrl ? /* @__PURE__ */ i(rt, { children: [
5734
5813
  /* @__PURE__ */ r("a", { href: g.linkUrl, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--metakyc-primary, #6366f1)", textDecoration: "underline" }, children: g.linkText || g.label }),
5735
5814
  g.label && g.linkText ? ` ${g.label}` : ""
5736
5815
  ] }) : g.displayText || g.label })
@@ -5739,13 +5818,13 @@ const vn = ({
5739
5818
  ) }, q);
5740
5819
  }
5741
5820
  if (g.customType === "group_checkbox") {
5742
- const R = Array.isArray(v) ? v : v ? [v] : [], x = (o) => {
5743
- g.singleSelect ? P((d) => ({ ...d, [p]: R[0] === o ? [] : [o] })) : P((d) => ({
5821
+ const E = Array.isArray(w) ? w : w ? [w] : [], v = (o) => {
5822
+ g.singleSelect ? P((d) => ({ ...d, [p]: E[0] === o ? [] : [o] })) : P((d) => ({
5744
5823
  ...d,
5745
- [p]: R.includes(o) ? R.filter((A) => A !== o) : [...R, o]
5824
+ [p]: E.includes(o) ? E.filter((A) => A !== o) : [...E, o]
5746
5825
  }));
5747
5826
  };
5748
- return /* @__PURE__ */ r("div", { className: de(g.colSpan), children: xe(
5827
+ return /* @__PURE__ */ r("div", { className: ce(g.colSpan), children: ve(
5749
5828
  /* @__PURE__ */ i("div", { className: "space-y-1.5", children: [
5750
5829
  g.label && /* @__PURE__ */ r("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: g.displayText || g.label }),
5751
5830
  (g.options || []).map((o) => /* @__PURE__ */ i("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
@@ -5753,8 +5832,8 @@ const vn = ({
5753
5832
  "input",
5754
5833
  {
5755
5834
  type: "checkbox",
5756
- checked: R.includes(o.value),
5757
- onChange: () => x(o.value),
5835
+ checked: E.includes(o.value),
5836
+ onChange: () => v(o.value),
5758
5837
  style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
5759
5838
  }
5760
5839
  ),
@@ -5764,109 +5843,109 @@ const vn = ({
5764
5843
  g.helpText
5765
5844
  ) }, q);
5766
5845
  }
5767
- return g.customType === "radio_group" ? /* @__PURE__ */ r("div", { className: de(g.colSpan), children: xe(
5846
+ return g.customType === "radio_group" ? /* @__PURE__ */ r("div", { className: ce(g.colSpan), children: ve(
5768
5847
  /* @__PURE__ */ i("div", { className: "space-y-1.5", children: [
5769
5848
  g.label && /* @__PURE__ */ r("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: g.displayText || g.label }),
5770
- (g.options || []).map((R) => /* @__PURE__ */ i("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
5849
+ (g.options || []).map((E) => /* @__PURE__ */ i("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
5771
5850
  /* @__PURE__ */ r(
5772
5851
  "input",
5773
5852
  {
5774
5853
  type: "radio",
5775
5854
  name: `rg-${p}`,
5776
- value: R.value,
5777
- checked: v === R.value,
5778
- onChange: () => P((x) => ({ ...x, [p]: R.value })),
5855
+ value: E.value,
5856
+ checked: w === E.value,
5857
+ onChange: () => P((v) => ({ ...v, [p]: E.value })),
5779
5858
  style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
5780
5859
  }
5781
5860
  ),
5782
- /* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: R.label })
5783
- ] }, R.value))
5861
+ /* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: E.label })
5862
+ ] }, E.value))
5784
5863
  ] }),
5785
5864
  g.helpText
5786
- ) }, q) : /* @__PURE__ */ r("div", { className: de(g.colSpan), children: xe(
5865
+ ) }, q) : /* @__PURE__ */ r("div", { className: ce(g.colSpan), children: ve(
5787
5866
  /* @__PURE__ */ r(
5788
5867
  fe,
5789
5868
  {
5790
5869
  label: g.displayText || g.label || p,
5791
- value: String(v ?? ""),
5792
- onChange: (R) => P((x) => ({ ...x, [p]: R.target.value }))
5870
+ value: String(w ?? ""),
5871
+ onChange: (E) => P((v) => ({ ...v, [p]: E.target.value }))
5793
5872
  }
5794
5873
  ),
5795
5874
  g.helpText
5796
5875
  ) }, q);
5797
- }, Je = (g, j) => {
5798
- if (g.isCustom) return Ge(g, j);
5799
- const q = g.name ?? "", p = Qe[q], v = g.displayText || (p == null ? void 0 : p.label) || q, R = ce[q] ?? "", x = q === "mobileCountryCode", o = !!(p != null && p.countriesType) && !x;
5800
- return g.editable ? x ? /* @__PURE__ */ r("div", { className: de(g.colSpan ?? 2), children: xe(
5876
+ }, Je = (g, _) => {
5877
+ if (g.isCustom) return Ge(g, _);
5878
+ const q = g.name ?? "", p = Qe[q], w = g.displayText || (p == null ? void 0 : p.label) || q, E = re[q] ?? "", v = q === "mobileCountryCode", o = !!(p != null && p.countriesType) && !v;
5879
+ return g.editable ? v ? /* @__PURE__ */ r("div", { className: ce(g.colSpan ?? 2), children: ve(
5801
5880
  /* @__PURE__ */ r(
5802
5881
  Be,
5803
5882
  {
5804
- label: v,
5805
- value: String(R),
5883
+ label: w,
5884
+ value: String(E),
5806
5885
  onChange: (d) => he((A) => ({ ...A, [q]: d })),
5807
5886
  options: [{ value: "", label: "Select country code…" }, ...B]
5808
5887
  }
5809
5888
  ),
5810
5889
  g.helpText
5811
- ) }, `epc-${j}`) : o ? /* @__PURE__ */ r("div", { className: de(g.colSpan ?? 2), children: xe(
5890
+ ) }, `epc-${_}`) : o ? /* @__PURE__ */ r("div", { className: ce(g.colSpan ?? 2), children: ve(
5812
5891
  /* @__PURE__ */ r(
5813
5892
  Be,
5814
5893
  {
5815
- label: v,
5816
- value: String(R),
5894
+ label: w,
5895
+ value: String(E),
5817
5896
  onChange: (d) => he((A) => ({ ...A, [q]: d })),
5818
- options: [{ value: "", label: `Select ${v.toLowerCase()}…` }, ...K]
5897
+ options: [{ value: "", label: `Select ${w.toLowerCase()}…` }, ...W]
5819
5898
  }
5820
5899
  ),
5821
5900
  g.helpText
5822
- ) }, `ec-${j}`) : /* @__PURE__ */ r("div", { className: de(g.colSpan ?? 2), children: xe(
5901
+ ) }, `ec-${_}`) : /* @__PURE__ */ r("div", { className: ce(g.colSpan ?? 2), children: ve(
5823
5902
  /* @__PURE__ */ r(
5824
5903
  fe,
5825
5904
  {
5826
- label: v,
5905
+ label: w,
5827
5906
  type: (p == null ? void 0 : p.type) === "date" ? "date" : (p == null ? void 0 : p.type) === "email" ? "email" : "text",
5828
- value: String(R),
5907
+ value: String(E),
5829
5908
  onChange: (d) => he((A) => ({ ...A, [q]: d.target.value }))
5830
5909
  }
5831
5910
  ),
5832
5911
  g.helpText
5833
- ) }, `ei-${j}`) : /* @__PURE__ */ r("div", { className: de(g.colSpan ?? 2), children: xe(
5834
- /* @__PURE__ */ i(st, { children: [
5835
- /* @__PURE__ */ r("label", { className: "block text-sm font-medium mb-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: v }),
5836
- /* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: we(q, R) })
5912
+ ) }, `ei-${_}`) : /* @__PURE__ */ r("div", { className: ce(g.colSpan ?? 2), children: ve(
5913
+ /* @__PURE__ */ i(rt, { children: [
5914
+ /* @__PURE__ */ r("label", { className: "block text-sm font-medium mb-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: w }),
5915
+ /* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: we(q, E) })
5837
5916
  ] }),
5838
5917
  g.helpText
5839
- ) }, `ro-${j}`);
5918
+ ) }, `ro-${_}`);
5840
5919
  };
5841
- if (W) {
5842
- const g = W.title || "Review Your Information", j = W.subtitle || "Please review and confirm your information before starting identity verification";
5920
+ if (K) {
5921
+ const g = K.title || "Review Your Information", _ = K.subtitle || "Please review and confirm your information before starting identity verification";
5843
5922
  return /* @__PURE__ */ r("form", { onSubmit: (q) => {
5844
- q.preventDefault(), F();
5845
- }, children: /* @__PURE__ */ i(ee, { children: [
5923
+ q.preventDefault(), x();
5924
+ }, children: /* @__PURE__ */ i(X, { children: [
5846
5925
  /* @__PURE__ */ i(be, { children: [
5847
5926
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: g }),
5848
- /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: j })
5927
+ /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: _ })
5849
5928
  ] }),
5850
- /* @__PURE__ */ r(te, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: W.fields.map((q, p) => Je(q, p)) }) }),
5851
- /* @__PURE__ */ i(ke, { className: "flex justify-between", children: [
5852
- n && /* @__PURE__ */ r(G, { type: "button", variant: "outline", onClick: n, children: "Back" }),
5853
- /* @__PURE__ */ r(G, { type: "submit", isLoading: N, children: "Confirm and Start Verification" })
5929
+ /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: K.fields.map((q, p) => Je(q, p)) }) }),
5930
+ /* @__PURE__ */ i(xe, { className: "flex justify-between", children: [
5931
+ n && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: n, children: "Back" }),
5932
+ /* @__PURE__ */ r(V, { type: "submit", isLoading: I, children: "Confirm and Start Verification" })
5854
5933
  ] })
5855
5934
  ] }) });
5856
5935
  }
5857
- return /* @__PURE__ */ r("form", { onSubmit: ne.handleSubmit(F), children: /* @__PURE__ */ i(ee, { children: [
5936
+ return /* @__PURE__ */ r("form", { onSubmit: j.handleSubmit(x), children: /* @__PURE__ */ i(X, { children: [
5858
5937
  /* @__PURE__ */ i(be, { children: [
5859
5938
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: "Review Your Information" }),
5860
5939
  /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Please review and confirm your information before starting identity verification" })
5861
5940
  ] }),
5862
- /* @__PURE__ */ i(te, { className: "space-y-6", children: [
5941
+ /* @__PURE__ */ i(ee, { className: "space-y-6", children: [
5863
5942
  /* @__PURE__ */ r("div", { className: "space-y-4 pb-4", style: { borderBottom: "1px solid var(--metakyc-border, #e5e7eb)" }, children: [
5864
5943
  { label: "Name", value: `${((Me = D == null ? void 0 : D.applicantRequestData) == null ? void 0 : Me.firstName) || ""} ${((Ze = D == null ? void 0 : D.applicantRequestData) == null ? void 0 : Ze.lastName) || ""}`.trim() },
5865
5944
  { label: "Email", value: (je = D == null ? void 0 : D.applicantRequestData) == null ? void 0 : je.email },
5866
5945
  { label: "Date of Birth", value: ((We = D == null ? void 0 : D.applicantRequestData) == null ? void 0 : We.dateOfBirth) || "Not provided" }
5867
- ].map(({ label: g, value: j }) => /* @__PURE__ */ i("div", { children: [
5946
+ ].map(({ label: g, value: _ }) => /* @__PURE__ */ i("div", { children: [
5868
5947
  /* @__PURE__ */ r("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: g }),
5869
- /* @__PURE__ */ r("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: j })
5948
+ /* @__PURE__ */ r("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: _ })
5870
5949
  ] }, g)) }),
5871
5950
  /* @__PURE__ */ i("div", { className: "space-y-4", children: [
5872
5951
  /* @__PURE__ */ r("h3", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: "Address Information" }),
@@ -5874,7 +5953,7 @@ const vn = ({
5874
5953
  /* @__PURE__ */ r(
5875
5954
  qe,
5876
5955
  {
5877
- control: ne.control,
5956
+ control: j.control,
5878
5957
  name: "country",
5879
5958
  render: ({ field: g }) => /* @__PURE__ */ r(
5880
5959
  Be,
@@ -5882,7 +5961,7 @@ const vn = ({
5882
5961
  label: "Country",
5883
5962
  value: g.value,
5884
5963
  onChange: g.onChange,
5885
- options: [{ value: "", label: "Select country…" }, ...K]
5964
+ options: [{ value: "", label: "Select country…" }, ...W]
5886
5965
  }
5887
5966
  )
5888
5967
  }
@@ -5890,7 +5969,7 @@ const vn = ({
5890
5969
  /* @__PURE__ */ r(
5891
5970
  qe,
5892
5971
  {
5893
- control: ne.control,
5972
+ control: j.control,
5894
5973
  name: "nationality",
5895
5974
  render: ({ field: g }) => /* @__PURE__ */ r(
5896
5975
  Be,
@@ -5898,26 +5977,26 @@ const vn = ({
5898
5977
  label: "Nationality",
5899
5978
  value: g.value,
5900
5979
  onChange: g.onChange,
5901
- options: [{ value: "", label: "Select nationality…" }, ...K]
5980
+ options: [{ value: "", label: "Select nationality…" }, ...W]
5902
5981
  }
5903
5982
  )
5904
5983
  }
5905
5984
  )
5906
5985
  ] }),
5907
5986
  /* @__PURE__ */ i("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
5908
- /* @__PURE__ */ r(qe, { control: ne.control, name: "street", render: ({ field: g }) => /* @__PURE__ */ r(fe, { ...g, label: "Street" }) }),
5909
- /* @__PURE__ */ r(qe, { control: ne.control, name: "streetNumber", render: ({ field: g }) => /* @__PURE__ */ r(fe, { ...g, label: "Street Number" }) })
5987
+ /* @__PURE__ */ r(qe, { control: j.control, name: "street", render: ({ field: g }) => /* @__PURE__ */ r(fe, { ...g, label: "Street" }) }),
5988
+ /* @__PURE__ */ r(qe, { control: j.control, name: "streetNumber", render: ({ field: g }) => /* @__PURE__ */ r(fe, { ...g, label: "Street Number" }) })
5910
5989
  ] }),
5911
5990
  /* @__PURE__ */ i("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
5912
- /* @__PURE__ */ r(qe, { control: ne.control, name: "city", render: ({ field: g }) => /* @__PURE__ */ r(fe, { ...g, label: "City" }) }),
5913
- /* @__PURE__ */ r(qe, { control: ne.control, name: "zip", render: ({ field: g }) => /* @__PURE__ */ r(fe, { ...g, label: "ZIP / Postal Code" }) })
5991
+ /* @__PURE__ */ r(qe, { control: j.control, name: "city", render: ({ field: g }) => /* @__PURE__ */ r(fe, { ...g, label: "City" }) }),
5992
+ /* @__PURE__ */ r(qe, { control: j.control, name: "zip", render: ({ field: g }) => /* @__PURE__ */ r(fe, { ...g, label: "ZIP / Postal Code" }) })
5914
5993
  ] }),
5915
- /* @__PURE__ */ r(qe, { control: ne.control, name: "phonenumber", render: ({ field: g }) => /* @__PURE__ */ r(fe, { ...g, label: "Phone Number", type: "tel" }) })
5994
+ /* @__PURE__ */ r(qe, { control: j.control, name: "phonenumber", render: ({ field: g }) => /* @__PURE__ */ r(fe, { ...g, label: "Phone Number", type: "tel" }) })
5916
5995
  ] })
5917
5996
  ] }),
5918
- /* @__PURE__ */ i(ke, { className: "flex justify-between", children: [
5919
- n && /* @__PURE__ */ r(G, { type: "button", variant: "outline", onClick: n, children: "Back" }),
5920
- /* @__PURE__ */ r(G, { type: "submit", isLoading: N, children: "Confirm and Start Verification" })
5997
+ /* @__PURE__ */ i(xe, { className: "flex justify-between", children: [
5998
+ n && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: n, children: "Back" }),
5999
+ /* @__PURE__ */ r(V, { type: "submit", isLoading: I, children: "Confirm and Start Verification" })
5921
6000
  ] })
5922
6001
  ] }) });
5923
6002
  }, It = ({
@@ -5928,42 +6007,42 @@ const vn = ({
5928
6007
  onContinue: s,
5929
6008
  onContactSupport: l
5930
6009
  }) => {
5931
- const u = e === Ve.Approved ? {
6010
+ const u = e === Ye.Approved ? {
5932
6011
  type: "success",
5933
6012
  title: "Verification Approved",
5934
6013
  icon: "✓",
5935
6014
  iconBg: "bg-green-100 dark:bg-green-900/30",
5936
6015
  iconColor: "text-green-600 dark:text-green-400",
5937
6016
  message: "Your identity verification has been successfully approved."
5938
- } : e === Ve.Rejected ? {
6017
+ } : e === Ye.Rejected ? {
5939
6018
  type: "error",
5940
6019
  title: "Verification Rejected",
5941
6020
  icon: "✕",
5942
6021
  iconBg: "bg-red-100 dark:bg-red-900/30",
5943
6022
  iconColor: "text-red-600 dark:text-red-400",
5944
6023
  message: "Unfortunately, your identity verification was not approved."
5945
- } : e === Ve.Pending || e === Ve.InProgress ? {
6024
+ } : e === Ye.Pending || e === Ye.InProgress ? {
5946
6025
  type: "pending",
5947
6026
  title: "Verification Pending",
5948
6027
  icon: "⏱",
5949
6028
  iconBg: "bg-blue-100 dark:bg-blue-900/30",
5950
6029
  iconColor: "text-blue-600 dark:text-blue-400",
5951
6030
  message: "Your identity verification is currently being processed."
5952
- } : t === Ye.Approved ? {
6031
+ } : t === Ve.Approved ? {
5953
6032
  type: "success",
5954
6033
  title: "Application Approved",
5955
6034
  icon: "✓",
5956
6035
  iconBg: "bg-green-100 dark:bg-green-900/30",
5957
6036
  iconColor: "text-green-600 dark:text-green-400",
5958
6037
  message: "Your application has been approved."
5959
- } : t === Ye.Reject ? {
6038
+ } : t === Ve.Reject ? {
5960
6039
  type: "error",
5961
6040
  title: "Application Rejected",
5962
6041
  icon: "✕",
5963
6042
  iconBg: "bg-red-100 dark:bg-red-900/30",
5964
6043
  iconColor: "text-red-600 dark:text-red-400",
5965
6044
  message: "Your application has been rejected."
5966
- } : t === Ye.UnderReview || t === Ye.AdminReview ? {
6045
+ } : t === Ve.UnderReview || t === Ve.AdminReview ? {
5967
6046
  type: "pending",
5968
6047
  title: "Under Review",
5969
6048
  icon: "📋",
@@ -5999,8 +6078,8 @@ const vn = ({
5999
6078
  iconColor: "text-blue-600 dark:text-blue-400",
6000
6079
  message: "Your application is being reviewed."
6001
6080
  };
6002
- return /* @__PURE__ */ i(ee, { children: [
6003
- /* @__PURE__ */ i(te, { className: "py-12", children: [
6081
+ return /* @__PURE__ */ i(X, { children: [
6082
+ /* @__PURE__ */ i(ee, { className: "py-12", children: [
6004
6083
  /* @__PURE__ */ r("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ r(
6005
6084
  "div",
6006
6085
  {
@@ -6013,7 +6092,7 @@ const vn = ({
6013
6092
  Lt,
6014
6093
  {
6015
6094
  variant: u.type === "success" ? "success" : u.type === "error" ? "danger" : u.type === "pending" ? "warning" : "info",
6016
- children: e != null ? Ve[e] : Ye[t]
6095
+ children: e != null ? Ye[e] : Ve[t]
6017
6096
  }
6018
6097
  ) }),
6019
6098
  /* @__PURE__ */ r("p", { className: "text-center mb-6 max-w-md mx-auto", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: a || u.message }),
@@ -6045,19 +6124,19 @@ const vn = ({
6045
6124
  /* @__PURE__ */ r("div", { className: "mt-6 pt-6", style: { borderTop: "1px solid var(--metakyc-border, #e5e7eb)" }, children: /* @__PURE__ */ i("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
6046
6125
  /* @__PURE__ */ i("div", { children: [
6047
6126
  /* @__PURE__ */ r("span", { style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: "KYC Status:" }),
6048
- /* @__PURE__ */ r("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children: e != null ? Ve[e] : "Not Available" })
6127
+ /* @__PURE__ */ r("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children: e != null ? Ye[e] : "Not Available" })
6049
6128
  ] }),
6050
6129
  /* @__PURE__ */ i("div", { children: [
6051
6130
  /* @__PURE__ */ r("span", { style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: "Review Status:" }),
6052
- /* @__PURE__ */ r("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children: Ye[t] })
6131
+ /* @__PURE__ */ r("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children: Ve[t] })
6053
6132
  ] })
6054
6133
  ] }) })
6055
6134
  ] }),
6056
- /* @__PURE__ */ i(ke, { className: "flex justify-center gap-4", children: [
6057
- u.type === "success" && s && /* @__PURE__ */ r(G, { onClick: s, size: "lg", children: "Continue" }),
6058
- u.type === "error" && /* @__PURE__ */ i(st, { children: [
6059
- l && /* @__PURE__ */ r(G, { variant: "outline", onClick: l, children: "Contact Support" }),
6060
- s && /* @__PURE__ */ r(G, { onClick: s, children: "Try Again" })
6135
+ /* @__PURE__ */ i(xe, { className: "flex justify-center gap-4", children: [
6136
+ u.type === "success" && s && /* @__PURE__ */ r(V, { onClick: s, size: "lg", children: "Continue" }),
6137
+ u.type === "error" && /* @__PURE__ */ i(rt, { children: [
6138
+ l && /* @__PURE__ */ r(V, { variant: "outline", onClick: l, children: "Contact Support" }),
6139
+ s && /* @__PURE__ */ r(V, { onClick: s, children: "Try Again" })
6061
6140
  ] }),
6062
6141
  u.type === "pending" && /* @__PURE__ */ r("div", { className: "text-center", children: /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
6063
6142
  ] })
@@ -6108,7 +6187,7 @@ const vn = ({
6108
6187
  function tt(e) {
6109
6188
  return e == null || e === "" || Array.isArray(e) && e.length === 0;
6110
6189
  }
6111
- const it = {
6190
+ const st = {
6112
6191
  width: "16px",
6113
6192
  height: "16px",
6114
6193
  minWidth: "16px",
@@ -6122,7 +6201,7 @@ const it = {
6122
6201
  verticalAlign: "middle"
6123
6202
  }, Rt = ({ helpText: e, children: t }) => {
6124
6203
  const [n, a] = Fe.useState(!1);
6125
- if (!e) return /* @__PURE__ */ r(st, { children: t });
6204
+ if (!e) return /* @__PURE__ */ r(rt, { children: t });
6126
6205
  const s = n ? /* @__PURE__ */ r(
6127
6206
  "div",
6128
6207
  {
@@ -6247,36 +6326,36 @@ const it = {
6247
6326
  onSuccess: n,
6248
6327
  onCancel: a
6249
6328
  }) => {
6250
- var j, q, p, v, R, x;
6251
- const { config: s, baseInformationService: l, currentTheme: c } = Re(), { createApplicant: u, isLoading: h } = Pt(), m = e || ((j = s.applicantForm) == null ? void 0 : j.workflowKey);
6329
+ var _, q, p, w, E, v;
6330
+ const { config: s, baseInformationService: l, currentTheme: c } = Re(), { createApplicant: u, isLoading: h } = Pt(), m = e || ((_ = s.applicantForm) == null ? void 0 : _.workflowKey);
6252
6331
  if (!m)
6253
6332
  throw new Error(
6254
6333
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
6255
6334
  );
6256
- const N = t || ((q = s.applicantForm) == null ? void 0 : q.externalRefId) || "", T = ((p = s.applicantForm) == null ? void 0 : p.email) || "", I = ((v = s.applicantForm) == null ? void 0 : v.hiddenValues) || {}, f = (((R = s.applicantForm) == null ? void 0 : R.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", w = Ae(
6335
+ const I = t || ((q = s.applicantForm) == null ? void 0 : q.externalRefId) || "", T = ((p = s.applicantForm) == null ? void 0 : p.email) || "", R = ((w = s.applicantForm) == null ? void 0 : w.hiddenValues) || {}, f = (((E = s.applicantForm) == null ? void 0 : E.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", S = Ae(
6257
6336
  () => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
6258
6337
  [c == null ? void 0 : c.applicantFormPages]
6259
6338
  ), D = Ae(() => {
6260
6339
  const o = new Set(dt), d = c == null ? void 0 : c.applicantFormRequiredFields;
6261
6340
  if (d) for (const A of d) o.add(A);
6262
- if (w)
6263
- for (const A of w)
6341
+ if (S)
6342
+ for (const A of S)
6264
6343
  for (const y of A.fields)
6265
6344
  !y.isCustom && y.name && y.required && o.add(y.name);
6266
6345
  return Array.from(o);
6267
- }, [c == null ? void 0 : c.applicantFormRequiredFields, w]), U = Ae(() => {
6346
+ }, [c == null ? void 0 : c.applicantFormRequiredFields, S]), U = Ae(() => {
6268
6347
  var A;
6269
- if (w) {
6270
- const y = w.flatMap((S) => S.fields).filter((S) => !S.isCustom && S.name).map((S) => S.name), C = new Set(y);
6271
- for (const S of dt) C.add(S);
6272
- return Array.from(C);
6348
+ if (S) {
6349
+ const y = S.flatMap((C) => C.fields).filter((C) => !C.isCustom && C.name).map((C) => C.name), N = new Set(y);
6350
+ for (const C of dt) N.add(C);
6351
+ return Array.from(N);
6273
6352
  }
6274
6353
  let o;
6275
6354
  (A = s.applicantForm) != null && A.visibleFields ? o = s.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? o = c.applicantFormVisibleFields : o = nr;
6276
6355
  const d = new Set(o);
6277
6356
  for (const y of dt) d.add(y);
6278
6357
  return Array.from(d);
6279
- }, [(x = s.applicantForm) == null ? void 0 : x.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields, w]), K = /* @__PURE__ */ new Set([
6358
+ }, [(v = s.applicantForm) == null ? void 0 : v.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields, S]), W = /* @__PURE__ */ new Set([
6280
6359
  "country",
6281
6360
  "nationality",
6282
6361
  "taxCountry",
@@ -6286,58 +6365,58 @@ const it = {
6286
6365
  ]), M = Ae(() => {
6287
6366
  var d, A;
6288
6367
  const o = /* @__PURE__ */ new Set();
6289
- if (w)
6290
- for (const y of w)
6291
- for (const C of y.fields)
6292
- !C.isCustom && C.name && K.has(C.name) && o.add(C.countriesType ?? ((d = Qe[C.name]) == null ? void 0 : d.countriesType));
6368
+ if (S)
6369
+ for (const y of S)
6370
+ for (const N of y.fields)
6371
+ !N.isCustom && N.name && W.has(N.name) && o.add(N.countriesType ?? ((d = Qe[N.name]) == null ? void 0 : d.countriesType));
6293
6372
  else
6294
6373
  for (const y of U)
6295
- K.has(y) && o.add((A = Qe[y]) == null ? void 0 : A.countriesType);
6374
+ W.has(y) && o.add((A = Qe[y]) == null ? void 0 : A.countriesType);
6296
6375
  return o.size === 0 && o.add(void 0), Array.from(o);
6297
- }, [U, w]), [B, Y] = k({}), [Q, E] = k(!0), b = le(/* @__PURE__ */ new Set()), _ = le(/* @__PURE__ */ new Set());
6376
+ }, [U, S]), [B, G] = k({}), [J, F] = k(!0), b = le(/* @__PURE__ */ new Set()), $ = le(/* @__PURE__ */ new Set());
6298
6377
  ye(() => {
6299
6378
  if (!c) return;
6300
6379
  const o = M.filter((y) => {
6301
- const C = y != null ? String(y) : "all";
6302
- return !_.current.has(C) && !b.current.has(C);
6380
+ const N = y != null ? String(y) : "all";
6381
+ return !$.current.has(N) && !b.current.has(N);
6303
6382
  });
6304
6383
  if (o.length === 0) {
6305
- M.every((C) => {
6306
- const S = C != null ? String(C) : "all";
6307
- return _.current.has(S);
6308
- }) && E(!1);
6384
+ M.every((N) => {
6385
+ const C = N != null ? String(N) : "all";
6386
+ return $.current.has(C);
6387
+ }) && F(!1);
6309
6388
  return;
6310
6389
  }
6311
- E(!0);
6390
+ F(!0);
6312
6391
  const d = o.map((y) => y != null ? String(y) : "all");
6313
6392
  d.forEach((y) => b.current.add(y)), (async () => {
6314
6393
  try {
6315
6394
  const y = await Promise.all(
6316
- o.map(async (C) => {
6317
- const S = C != null ? String(C) : "all", oe = await l.getCountries("", s.locale || "en", C), ie = C === 40, ve = /* @__PURE__ */ new Set(), ge = oe.map((pe) => ie && pe.countryCode ? {
6395
+ o.map(async (N) => {
6396
+ const C = N != null ? String(N) : "all", oe = await l.getCountries("", s.locale || "en", N), ie = N === 40, ke = /* @__PURE__ */ new Set(), ge = oe.map((pe) => ie && pe.countryCode ? {
6318
6397
  value: pe.countryCode,
6319
6398
  label: `${pe.countryCode} – ${pe.name}`
6320
- } : { value: pe.abbreviation3 || pe.abbreviation, label: pe.name }).filter((pe) => !pe.value || ve.has(pe.value) ? !1 : (ve.add(pe.value), !0));
6321
- return _.current.add(S), b.current.delete(S), [S, ge];
6399
+ } : { value: pe.abbreviation3 || pe.abbreviation, label: pe.name }).filter((pe) => !pe.value || ke.has(pe.value) ? !1 : (ke.add(pe.value), !0));
6400
+ return $.current.add(C), b.current.delete(C), [C, ge];
6322
6401
  })
6323
6402
  );
6324
- Y((C) => ({ ...C, ...Object.fromEntries(y) }));
6403
+ G((N) => ({ ...N, ...Object.fromEntries(y) }));
6325
6404
  } catch (y) {
6326
- d.forEach((C) => b.current.delete(C)), console.error("Failed to load countries:", y);
6405
+ d.forEach((N) => b.current.delete(N)), console.error("Failed to load countries:", y);
6327
6406
  } finally {
6328
- M.every((C) => {
6329
- const S = C != null ? String(C) : "all";
6330
- return _.current.has(S);
6331
- }) && E(!1);
6407
+ M.every((N) => {
6408
+ const C = N != null ? String(N) : "all";
6409
+ return $.current.has(C);
6410
+ }) && F(!1);
6332
6411
  }
6333
6412
  })();
6334
6413
  }, [M, c]);
6335
6414
  const H = (o, d) => {
6336
- var C;
6337
- const A = d ?? ((C = Qe[o]) == null ? void 0 : C.countriesType), y = A != null ? String(A) : "all";
6415
+ var N;
6416
+ const A = d ?? ((N = Qe[o]) == null ? void 0 : N.countriesType), y = A != null ? String(A) : "all";
6338
6417
  return B[y] || [];
6339
6418
  }, z = Object.fromEntries(
6340
- Object.entries(I).filter(([o]) => o in {
6419
+ Object.entries(R).filter(([o]) => o in {
6341
6420
  firstName: 1,
6342
6421
  lastName: 1,
6343
6422
  title: 1,
@@ -6361,7 +6440,7 @@ const it = {
6361
6440
  occupation: 1,
6362
6441
  taxNumber: 1
6363
6442
  })
6364
- ), [O, Z] = k({
6443
+ ), [O, ne] = k({
6365
6444
  workflowKey: m,
6366
6445
  firstName: "",
6367
6446
  lastName: "",
@@ -6369,7 +6448,7 @@ const it = {
6369
6448
  email: T,
6370
6449
  dateOfBirth: "",
6371
6450
  phonenumber: "",
6372
- externalRefId: N,
6451
+ externalRefId: I,
6373
6452
  mobileCountryCode: "",
6374
6453
  street: "",
6375
6454
  streetNumber: "",
@@ -6387,105 +6466,105 @@ const it = {
6387
6466
  occupation: "",
6388
6467
  taxNumber: "",
6389
6468
  ...z
6390
- }), re = Object.fromEntries(
6391
- Object.entries(I).filter(([o]) => !(o in z) && o !== "externalRefId" && o !== "workflowKey")
6392
- ), [ce, he] = k({ ...re }), [ue, P] = k(0), [W, $] = k({}), [V, ne] = k(null), [F, X] = k(!1), ae = (o, d) => Z((A) => ({ ...A, [o]: d })), de = (o, d) => he((A) => ({ ...A, [o]: d })), we = (o) => !o.conditionalOn || ce[o.conditionalOn] === "true", De = w && ue < w.length - 1 ? ue + 1 : -1, xe = w && ue > 0 ? ue - 1 : -1, Ge = (o) => {
6469
+ }), ae = Object.fromEntries(
6470
+ Object.entries(R).filter(([o]) => !(o in z) && o !== "externalRefId" && o !== "workflowKey")
6471
+ ), [re, he] = k({ ...ae }), [de, P] = k(0), [K, Z] = k({}), [ue, j] = k(null), [x, Q] = k(!1), Y = (o, d) => ne((A) => ({ ...A, [o]: d })), ce = (o, d) => he((A) => ({ ...A, [o]: d })), we = (o) => !o.conditionalOn || re[o.conditionalOn] === "true", De = S && de < S.length - 1 ? de + 1 : -1, ve = S && de > 0 ? de - 1 : -1, Ge = (o) => {
6393
6472
  var A;
6394
6473
  const d = {};
6395
6474
  for (const y of o.fields)
6396
6475
  if (y.isCustom) {
6397
6476
  if (y.customType === "paragraph" || y.customType === "html" || y.customType === "br" || y.customType === "link") continue;
6398
6477
  if (y.required && y.paramName) {
6399
- const C = ce[y.paramName], S = y.displayText || y.label || y.paramName;
6400
- y.customType === "checkbox" || y.customType === "link_checkbox" ? C !== "true" && (d[y.paramName] = `${S} is required.`) : (!C || C.trim() === "") && (d[y.paramName] = `${S} is required.`);
6478
+ const N = re[y.paramName], C = y.displayText || y.label || y.paramName;
6479
+ y.customType === "checkbox" || y.customType === "link_checkbox" ? N !== "true" && (d[y.paramName] = `${C} is required.`) : (!N || N.trim() === "") && (d[y.paramName] = `${C} is required.`);
6401
6480
  }
6402
6481
  } else if (y.name) {
6403
- const C = y.name;
6404
- if (D.includes(C) && tt(O[C])) {
6405
- const S = y.displayText || ((A = Qe[C]) == null ? void 0 : A.label) || C;
6406
- d[C] = `${S} is required.`;
6482
+ const N = y.name;
6483
+ if (D.includes(N) && tt(O[N])) {
6484
+ const C = y.displayText || ((A = Qe[N]) == null ? void 0 : A.label) || N;
6485
+ d[N] = `${C} is required.`;
6407
6486
  }
6408
6487
  }
6409
6488
  return d;
6410
6489
  }, Je = async () => {
6411
- if (!w) return;
6412
- const o = w[ue];
6490
+ if (!S) return;
6491
+ const o = S[de];
6413
6492
  if (o.conditionalOn && !we(o)) {
6414
- $({}), De >= 0 ? P(De) : await Me();
6493
+ Z({}), De >= 0 ? P(De) : await Me();
6415
6494
  return;
6416
6495
  }
6417
6496
  const d = Ge(o);
6418
6497
  if (Object.keys(d).length > 0) {
6419
- $(d);
6498
+ Z(d);
6420
6499
  return;
6421
6500
  }
6422
- $({}), De >= 0 ? P(De) : await Me();
6501
+ Z({}), De >= 0 ? P(De) : await Me();
6423
6502
  }, Me = async () => {
6424
- if (w) {
6503
+ if (S) {
6425
6504
  let o = {};
6426
- for (const d of w)
6505
+ for (const d of S)
6427
6506
  we(d) && (o = { ...o, ...Ge(d) });
6428
6507
  if (Object.keys(o).length > 0) {
6429
- $(o);
6508
+ Z(o);
6430
6509
  return;
6431
6510
  }
6432
6511
  }
6433
- X(!0), ne(null);
6512
+ Q(!0), j(null);
6434
6513
  try {
6435
6514
  if (!O.externalRefId || O.externalRefId.trim() === "") {
6436
- ne("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
6515
+ j("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
6437
6516
  return;
6438
6517
  }
6439
6518
  const o = {
6440
6519
  workflowKey: O.workflowKey,
6441
6520
  externalRefId: O.externalRefId.trim()
6442
6521
  };
6443
- if (w) {
6444
- for (const C of w)
6445
- if (we(C)) {
6446
- for (const S of C.fields)
6447
- if (!S.isCustom && S.name) {
6448
- const oe = S.name, ie = O[oe];
6522
+ if (S) {
6523
+ for (const N of S)
6524
+ if (we(N)) {
6525
+ for (const C of N.fields)
6526
+ if (!C.isCustom && C.name) {
6527
+ const oe = C.name, ie = O[oe];
6449
6528
  tt(ie) || (o[oe] = ie);
6450
6529
  }
6451
6530
  }
6452
- for (const C of dt)
6453
- if (o[C] === void 0) {
6454
- const S = O[C];
6455
- tt(S) || (o[C] = S);
6531
+ for (const N of dt)
6532
+ if (o[N] === void 0) {
6533
+ const C = O[N];
6534
+ tt(C) || (o[N] = C);
6456
6535
  }
6457
6536
  } else
6458
- U.forEach((C) => {
6459
- if (C === "externalRefId") return;
6460
- const S = O[C];
6461
- tt(S) || (o[C] = S);
6537
+ U.forEach((N) => {
6538
+ if (N === "externalRefId") return;
6539
+ const C = O[N];
6540
+ tt(C) || (o[N] = C);
6462
6541
  });
6463
6542
  const d = [];
6464
- if (w) {
6465
- for (const C of w)
6466
- if (we(C))
6467
- for (const S of C.fields) {
6468
- if (!S.isCustom || !S.paramName || S.customType === "paragraph" || S.customType === "html" || S.customType === "br" || S.customType === "link") continue;
6469
- const oe = ce[S.paramName] ?? "";
6543
+ if (S) {
6544
+ for (const N of S)
6545
+ if (we(N))
6546
+ for (const C of N.fields) {
6547
+ if (!C.isCustom || !C.paramName || C.customType === "paragraph" || C.customType === "html" || C.customType === "br" || C.customType === "link") continue;
6548
+ const oe = re[C.paramName] ?? "";
6470
6549
  let ie;
6471
- if (S.customType === "checkbox" || S.customType === "link_checkbox")
6550
+ if (C.customType === "checkbox" || C.customType === "link_checkbox")
6472
6551
  ie = oe === "true" ? "yes" : "no";
6473
- else if (ie = oe, !ie && !S.required) continue;
6474
- d.push({ paramName: S.paramName, value: ie });
6552
+ else if (ie = oe, !ie && !C.required) continue;
6553
+ d.push({ paramName: C.paramName, value: ie });
6475
6554
  }
6476
6555
  }
6477
- for (const [C, S] of Object.entries(z))
6478
- o[C] === void 0 && !tt(S) && (o[C] = S);
6479
- const A = new Set(d.map((C) => C.paramName));
6480
- for (const [C, S] of Object.entries(re))
6481
- !A.has(C) && S && d.push({ paramName: C, value: S });
6556
+ for (const [N, C] of Object.entries(z))
6557
+ o[N] === void 0 && !tt(C) && (o[N] = C);
6558
+ const A = new Set(d.map((N) => N.paramName));
6559
+ for (const [N, C] of Object.entries(ae))
6560
+ !A.has(N) && C && d.push({ paramName: N, value: C });
6482
6561
  d.length > 0 && (o.applicantAdditionalDatas = d);
6483
6562
  const y = await u(o);
6484
6563
  n(y.applicantId);
6485
6564
  } catch (o) {
6486
- console.error("Error creating applicant:", o), ne(o.message || "Failed to create applicant");
6565
+ console.error("Error creating applicant:", o), j(o.message || "Failed to create applicant");
6487
6566
  } finally {
6488
- X(!1);
6567
+ Q(!1);
6489
6568
  }
6490
6569
  }, Ze = async (o) => {
6491
6570
  var d;
@@ -6493,16 +6572,16 @@ const it = {
6493
6572
  for (const A of D)
6494
6573
  if (tt(O[A])) {
6495
6574
  const y = ((d = Qe[A]) == null ? void 0 : d.label) || A;
6496
- ne(`${y} is required.`);
6575
+ j(`${y} is required.`);
6497
6576
  return;
6498
6577
  }
6499
6578
  await Me();
6500
- }, je = (o, d, A, y, C) => {
6579
+ }, je = (o, d, A, y, N) => {
6501
6580
  var xt;
6502
- const S = Qe[o];
6503
- if (!S) return null;
6504
- const oe = D.includes(o), ie = W[o], ve = A || S.label, ge = d ?? o, pe = { required: oe }, ze = C ? C !== "placeholder" : f, He = ze ? ve : void 0, Ot = ze ? "..." : ve;
6505
- switch (S.type) {
6581
+ const C = Qe[o];
6582
+ if (!C) return null;
6583
+ const oe = D.includes(o), ie = K[o], ke = A || C.label, ge = d ?? o, pe = { required: oe }, ze = N ? N !== "placeholder" : f, He = ze ? ke : void 0, Ot = ze ? "..." : ke;
6584
+ switch (C.type) {
6506
6585
  case "select":
6507
6586
  if (o === "country" || o === "nationality" || o === "taxCountry" || o === "countryOfBirth" || o === "mobileCountryCode") {
6508
6587
  const Se = H(o, y);
@@ -6512,9 +6591,9 @@ const it = {
6512
6591
  ...pe,
6513
6592
  label: He,
6514
6593
  value: O[o] || "",
6515
- onChange: (Ke) => ae(o, Ke),
6594
+ onChange: (Ke) => Y(o, Ke),
6516
6595
  options: [{ value: "", label: `Select ${Ot.toLowerCase()}` }, ...Se],
6517
- disabled: Q,
6596
+ disabled: J,
6518
6597
  error: ie
6519
6598
  },
6520
6599
  ge
@@ -6527,9 +6606,9 @@ const it = {
6527
6606
  ...pe,
6528
6607
  label: He,
6529
6608
  value: ((xt = O[o]) == null ? void 0 : xt.toString()) || "",
6530
- onChange: (Se) => ae(o, Se ? Number(Se) : null),
6609
+ onChange: (Se) => Y(o, Se ? Number(Se) : null),
6531
6610
  options: [
6532
- { value: "", label: ze ? "Select salutation..." : ve },
6611
+ { value: "", label: ze ? "Select salutation..." : ke },
6533
6612
  { value: pt.Male.toString(), label: "Male" },
6534
6613
  { value: pt.Female.toString(), label: "Female" },
6535
6614
  { value: pt.Other.toString(), label: "Other" }
@@ -6546,8 +6625,8 @@ const it = {
6546
6625
  ...pe,
6547
6626
  label: He,
6548
6627
  value: O[o] || "",
6549
- onChange: (Ke) => ae(o, Ke),
6550
- options: [{ value: "", label: ze ? "Select language..." : ve }, ...Se],
6628
+ onChange: (Ke) => Y(o, Ke),
6629
+ options: [{ value: "", label: ze ? "Select language..." : ke }, ...Se],
6551
6630
  error: ie
6552
6631
  },
6553
6632
  ge
@@ -6563,10 +6642,10 @@ const it = {
6563
6642
  ...pe,
6564
6643
  label: He,
6565
6644
  value: O[o] || [],
6566
- onChange: (Ke) => ae(o, Ke),
6645
+ onChange: (Ke) => Y(o, Ke),
6567
6646
  options: Se,
6568
- placeholder: ze ? "Select other nationalities..." : ve,
6569
- disabled: Q
6647
+ placeholder: ze ? "Select other nationalities..." : ke,
6648
+ disabled: J
6570
6649
  },
6571
6650
  ge
6572
6651
  );
@@ -6579,9 +6658,9 @@ const it = {
6579
6658
  ...pe,
6580
6659
  type: "date",
6581
6660
  label: He,
6582
- placeholder: ze ? void 0 : ve,
6661
+ placeholder: ze ? void 0 : ke,
6583
6662
  value: O[o] || "",
6584
- onChange: (Se) => ae(o, Se.target.value),
6663
+ onChange: (Se) => Y(o, Se.target.value),
6585
6664
  error: ie
6586
6665
  },
6587
6666
  ge
@@ -6593,9 +6672,9 @@ const it = {
6593
6672
  ...pe,
6594
6673
  type: "email",
6595
6674
  label: He,
6596
- placeholder: ze ? void 0 : ve,
6675
+ placeholder: ze ? void 0 : ke,
6597
6676
  value: O[o] || "",
6598
- onChange: (Se) => ae(o, Se.target.value),
6677
+ onChange: (Se) => Y(o, Se.target.value),
6599
6678
  error: ie
6600
6679
  },
6601
6680
  ge
@@ -6607,9 +6686,9 @@ const it = {
6607
6686
  ...pe,
6608
6687
  type: "tel",
6609
6688
  label: He,
6610
- placeholder: ze ? void 0 : ve,
6689
+ placeholder: ze ? void 0 : ke,
6611
6690
  value: O[o] || "",
6612
- onChange: (Se) => ae(o, Se.target.value),
6691
+ onChange: (Se) => Y(o, Se.target.value),
6613
6692
  error: ie
6614
6693
  },
6615
6694
  ge
@@ -6621,9 +6700,9 @@ const it = {
6621
6700
  ...pe,
6622
6701
  type: "text",
6623
6702
  label: He,
6624
- placeholder: ze ? void 0 : ve,
6703
+ placeholder: ze ? void 0 : ke,
6625
6704
  value: O[o] || "",
6626
- onChange: (Se) => ae(o, Se.target.value),
6705
+ onChange: (Se) => Y(o, Se.target.value),
6627
6706
  error: ie
6628
6707
  },
6629
6708
  ge
@@ -6632,7 +6711,7 @@ const it = {
6632
6711
  }, We = (o, d) => {
6633
6712
  const A = o.labelMode ? o.labelMode !== "placeholder" : f;
6634
6713
  if (o.customType === "paragraph") {
6635
- const S = o.displayText || o.label || "";
6714
+ const C = o.displayText || o.label || "";
6636
6715
  return /* @__PURE__ */ r(
6637
6716
  "p",
6638
6717
  {
@@ -6643,7 +6722,7 @@ const it = {
6643
6722
  margin: 0,
6644
6723
  color: "var(--metakyc-text-secondary, #6b7280)"
6645
6724
  },
6646
- dangerouslySetInnerHTML: { __html: S }
6725
+ dangerouslySetInnerHTML: { __html: C }
6647
6726
  },
6648
6727
  `custom-${d}`
6649
6728
  );
@@ -6659,7 +6738,7 @@ const it = {
6659
6738
  if (o.customType === "br")
6660
6739
  return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${d}`);
6661
6740
  if (o.customType === "link") {
6662
- const S = o.displayText || o.label || o.linkText || o.linkUrl || "";
6741
+ const C = o.displayText || o.label || o.linkText || o.linkUrl || "";
6663
6742
  return /* @__PURE__ */ r("div", { className: "metakyc-link-field", children: /* @__PURE__ */ i(
6664
6743
  "a",
6665
6744
  {
@@ -6676,14 +6755,14 @@ const it = {
6676
6755
  cursor: "pointer"
6677
6756
  },
6678
6757
  children: [
6679
- S,
6758
+ C,
6680
6759
  /* @__PURE__ */ r("span", { style: { fontSize: "10px", opacity: 0.7 }, children: "↗" })
6681
6760
  ]
6682
6761
  }
6683
6762
  ) }, `custom-${d}`);
6684
6763
  }
6685
6764
  if (!o.paramName) return null;
6686
- const y = W[o.paramName], C = o.displayText || o.label || o.paramName;
6765
+ const y = K[o.paramName], N = o.displayText || o.label || o.paramName;
6687
6766
  if (o.customType === "checkbox")
6688
6767
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
6689
6768
  /* @__PURE__ */ i(
@@ -6696,10 +6775,10 @@ const it = {
6696
6775
  "input",
6697
6776
  {
6698
6777
  type: "checkbox",
6699
- checked: ce[o.paramName] === "true",
6700
- onChange: (S) => de(o.paramName, S.target.checked ? "true" : "false"),
6778
+ checked: re[o.paramName] === "true",
6779
+ onChange: (C) => ce(o.paramName, C.target.checked ? "true" : "false"),
6701
6780
  className: "metakyc-option-input",
6702
- style: it
6781
+ style: st
6703
6782
  }
6704
6783
  ),
6705
6784
  /* @__PURE__ */ i(
@@ -6708,7 +6787,7 @@ const it = {
6708
6787
  className: "metakyc-option-text",
6709
6788
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
6710
6789
  children: [
6711
- C,
6790
+ N,
6712
6791
  o.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
6713
6792
  ]
6714
6793
  }
@@ -6730,10 +6809,10 @@ const it = {
6730
6809
  "input",
6731
6810
  {
6732
6811
  type: "checkbox",
6733
- checked: ce[o.paramName] === "true",
6734
- onChange: (S) => de(o.paramName, S.target.checked ? "true" : "false"),
6812
+ checked: re[o.paramName] === "true",
6813
+ onChange: (C) => ce(o.paramName, C.target.checked ? "true" : "false"),
6735
6814
  className: "metakyc-option-input",
6736
- style: { ...it, alignSelf: "flex-start", marginTop: "2px" }
6815
+ style: { ...st, alignSelf: "flex-start", marginTop: "2px" }
6737
6816
  }
6738
6817
  ),
6739
6818
  /* @__PURE__ */ i(
@@ -6742,7 +6821,7 @@ const it = {
6742
6821
  className: "metakyc-option-text",
6743
6822
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
6744
6823
  children: [
6745
- C,
6824
+ N,
6746
6825
  " ",
6747
6826
  o.linkUrl && /* @__PURE__ */ r(
6748
6827
  "a",
@@ -6752,7 +6831,7 @@ const it = {
6752
6831
  rel: "noopener noreferrer",
6753
6832
  className: "underline",
6754
6833
  style: { color: "var(--metakyc-primary, #2563eb)" },
6755
- onClick: (S) => S.stopPropagation(),
6834
+ onClick: (C) => C.stopPropagation(),
6756
6835
  children: o.linkText || o.linkUrl
6757
6836
  }
6758
6837
  ),
@@ -6766,7 +6845,7 @@ const it = {
6766
6845
  y && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: y })
6767
6846
  ] }, `custom-${d}`);
6768
6847
  if (o.customType === "group_checkbox") {
6769
- const S = (ce[o.paramName] || "").split(",").filter(Boolean);
6848
+ const C = (re[o.paramName] || "").split(",").filter(Boolean);
6770
6849
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
6771
6850
  A && /* @__PURE__ */ i(
6772
6851
  "div",
@@ -6774,13 +6853,13 @@ const it = {
6774
6853
  className: "text-sm font-medium",
6775
6854
  style: { color: "var(--metakyc-text-primary, #111827)" },
6776
6855
  children: [
6777
- C,
6856
+ N,
6778
6857
  o.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
6779
6858
  ]
6780
6859
  }
6781
6860
  ),
6782
6861
  /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (o.options || []).map((oe) => {
6783
- const ie = o.singleSelect ? ce[o.paramName] === oe.value : S.includes(oe.value);
6862
+ const ie = o.singleSelect ? re[o.paramName] === oe.value : C.includes(oe.value);
6784
6863
  return /* @__PURE__ */ i(
6785
6864
  "label",
6786
6865
  {
@@ -6792,16 +6871,16 @@ const it = {
6792
6871
  {
6793
6872
  type: "checkbox",
6794
6873
  checked: ie,
6795
- onChange: (ve) => {
6874
+ onChange: (ke) => {
6796
6875
  if (o.singleSelect)
6797
- de(o.paramName, ve.target.checked ? oe.value : "");
6876
+ ce(o.paramName, ke.target.checked ? oe.value : "");
6798
6877
  else {
6799
- const ge = ve.target.checked ? [...S, oe.value] : S.filter((pe) => pe !== oe.value);
6800
- de(o.paramName, ge.join(","));
6878
+ const ge = ke.target.checked ? [...C, oe.value] : C.filter((pe) => pe !== oe.value);
6879
+ ce(o.paramName, ge.join(","));
6801
6880
  }
6802
6881
  },
6803
6882
  className: "metakyc-option-input",
6804
- style: it
6883
+ style: st
6805
6884
  }
6806
6885
  ),
6807
6886
  /* @__PURE__ */ r(
@@ -6827,12 +6906,12 @@ const it = {
6827
6906
  className: "text-sm font-medium",
6828
6907
  style: { color: "var(--metakyc-text-primary, #111827)" },
6829
6908
  children: [
6830
- C,
6909
+ N,
6831
6910
  o.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
6832
6911
  ]
6833
6912
  }
6834
6913
  ),
6835
- /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (o.options || []).map((S) => /* @__PURE__ */ i(
6914
+ /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (o.options || []).map((C) => /* @__PURE__ */ i(
6836
6915
  "label",
6837
6916
  {
6838
6917
  className: "metakyc-option-label",
@@ -6842,11 +6921,11 @@ const it = {
6842
6921
  "input",
6843
6922
  {
6844
6923
  type: "radio",
6845
- checked: ce[o.paramName] === S.value,
6846
- onChange: () => de(o.paramName, S.value),
6924
+ checked: re[o.paramName] === C.value,
6925
+ onChange: () => ce(o.paramName, C.value),
6847
6926
  name: `radio-group-${o.paramName}-${d}`,
6848
6927
  className: "metakyc-option-input",
6849
- style: it
6928
+ style: st
6850
6929
  }
6851
6930
  ),
6852
6931
  /* @__PURE__ */ r(
@@ -6854,22 +6933,22 @@ const it = {
6854
6933
  {
6855
6934
  className: "metakyc-option-text",
6856
6935
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
6857
- children: S.label
6936
+ children: C.label
6858
6937
  }
6859
6938
  )
6860
6939
  ]
6861
6940
  },
6862
- S.value
6941
+ C.value
6863
6942
  )) }),
6864
6943
  y && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: y })
6865
6944
  ] }, `custom-${d}`) : /* @__PURE__ */ r(
6866
6945
  fe,
6867
6946
  {
6868
6947
  type: "text",
6869
- label: A ? `${C}${o.required ? " *" : ""}` : void 0,
6870
- placeholder: A ? void 0 : C,
6871
- value: ce[o.paramName] || "",
6872
- onChange: (S) => de(o.paramName, S.target.value),
6948
+ label: A ? `${N}${o.required ? " *" : ""}` : void 0,
6949
+ placeholder: A ? void 0 : N,
6950
+ value: re[o.paramName] || "",
6951
+ onChange: (C) => ce(o.paramName, C.target.value),
6873
6952
  required: o.required,
6874
6953
  error: y
6875
6954
  },
@@ -6889,9 +6968,9 @@ const it = {
6889
6968
  {
6890
6969
  type: "checkbox",
6891
6970
  checked: A,
6892
- onChange: (y) => de(o.conditionalOn, y.target.checked ? "true" : "false"),
6971
+ onChange: (y) => ce(o.conditionalOn, y.target.checked ? "true" : "false"),
6893
6972
  className: "metakyc-option-input",
6894
- style: it
6973
+ style: st
6895
6974
  }
6896
6975
  ),
6897
6976
  /* @__PURE__ */ r(
@@ -6905,22 +6984,22 @@ const it = {
6905
6984
  ]
6906
6985
  }
6907
6986
  ) }),
6908
- A && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: o.fields.map((y, C) => {
6909
- const S = y.colSpan === 1 ? "col-span-1" : y.colSpan === 2 ? "col-span-2" : y.colSpan === 3 ? "col-span-3" : "col-span-4", oe = y.isCustom ? `custom-${C}-${y.paramName}` : `builtin-${y.name}-${C}`;
6910
- return /* @__PURE__ */ r("div", { className: S, children: /* @__PURE__ */ r(Rt, { helpText: y.helpText, children: y.isCustom ? We(y, C) : je(y.name, oe, y.displayText, y.countriesType, y.labelMode) }) }, oe);
6987
+ A && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: o.fields.map((y, N) => {
6988
+ const C = y.colSpan === 1 ? "col-span-1" : y.colSpan === 2 ? "col-span-2" : y.colSpan === 3 ? "col-span-3" : "col-span-4", oe = y.isCustom ? `custom-${N}-${y.paramName}` : `builtin-${y.name}-${N}`;
6989
+ return /* @__PURE__ */ r("div", { className: C, children: /* @__PURE__ */ r(Rt, { helpText: y.helpText, children: y.isCustom ? We(y, N) : je(y.name, oe, y.displayText, y.countriesType, y.labelMode) }) }, oe);
6911
6990
  }) })
6912
6991
  ] });
6913
6992
  };
6914
- if (!c || Q)
6915
- return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i(te, { children: [
6993
+ if (!c || J)
6994
+ return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r(X, { children: /* @__PURE__ */ i(ee, { children: [
6916
6995
  /* @__PURE__ */ r(Pe, { className: "my-8" }),
6917
6996
  /* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
6918
6997
  ] }) }) });
6919
- if (w) {
6920
- const o = w[ue] ?? w[0], d = xe === -1, A = De === -1, y = w.length, C = we(o), S = Object.values(W);
6921
- return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(ee, { children: [
6998
+ if (S) {
6999
+ const o = S[de] ?? S[0], d = ve === -1, A = De === -1, y = S.length, N = we(o), C = Object.values(K);
7000
+ return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(X, { children: [
6922
7001
  /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r(ot, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
6923
- /* @__PURE__ */ i(te, { children: [
7002
+ /* @__PURE__ */ i(ee, { children: [
6924
7003
  (o.title || o.subtitle || o.description) && /* @__PURE__ */ i("div", { className: "mb-4", children: [
6925
7004
  o.title && /* @__PURE__ */ r(
6926
7005
  "h3",
@@ -6947,72 +7026,72 @@ const it = {
6947
7026
  }
6948
7027
  )
6949
7028
  ] }),
6950
- (V || S.length > 0) && /* @__PURE__ */ i("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
6951
- V && /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
7029
+ (ue || C.length > 0) && /* @__PURE__ */ i("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
7030
+ ue && /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
6952
7031
  /* @__PURE__ */ r("strong", { children: "Error:" }),
6953
7032
  " ",
6954
- V
7033
+ ue
6955
7034
  ] }),
6956
- S.map((oe, ie) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: oe }, ie))
7035
+ C.map((oe, ie) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: oe }, ie))
6957
7036
  ] }),
6958
7037
  y > 1 && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-4", children: [
6959
- w.map((oe, ie) => /* @__PURE__ */ r(
7038
+ S.map((oe, ie) => /* @__PURE__ */ r(
6960
7039
  "div",
6961
7040
  {
6962
- className: `h-1.5 rounded-full transition-all ${ie === ue ? "flex-1" : "w-8"}`,
6963
- style: ie === ue ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : ie < ue ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
7041
+ className: `h-1.5 rounded-full transition-all ${ie === de ? "flex-1" : "w-8"}`,
7042
+ style: ie === de ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : ie < de ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
6964
7043
  },
6965
7044
  ie
6966
7045
  )),
6967
7046
  /* @__PURE__ */ i("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
6968
- ue + 1,
7047
+ de + 1,
6969
7048
  " / ",
6970
7049
  y
6971
7050
  ] })
6972
7051
  ] }),
6973
7052
  g(o)
6974
7053
  ] }),
6975
- /* @__PURE__ */ i(ke, { className: "flex justify-between", children: [
7054
+ /* @__PURE__ */ i(xe, { className: "flex justify-between", children: [
6976
7055
  /* @__PURE__ */ i("div", { children: [
6977
7056
  !d && /* @__PURE__ */ r(
6978
- G,
7057
+ V,
6979
7058
  {
6980
7059
  type: "button",
6981
7060
  variant: "outline",
6982
7061
  onClick: () => {
6983
- P(xe), $({});
7062
+ P(ve), Z({});
6984
7063
  },
6985
- disabled: F || h,
7064
+ disabled: x || h,
6986
7065
  children: "Previous"
6987
7066
  }
6988
7067
  ),
6989
- d && a && /* @__PURE__ */ r(G, { type: "button", variant: "outline", onClick: a, disabled: F || h, children: "Cancel" })
7068
+ d && a && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: a, disabled: x || h, children: "Cancel" })
6990
7069
  ] }),
6991
7070
  /* @__PURE__ */ r(
6992
- G,
7071
+ V,
6993
7072
  {
6994
7073
  type: "button",
6995
- isLoading: F || h,
7074
+ isLoading: x || h,
6996
7075
  onClick: A ? Me : Je,
6997
- children: A ? o.conditionalOn && !C ? "Skip & Submit" : "Submit" : o.conditionalOn && !C ? "Skip" : "Next"
7076
+ children: A ? o.conditionalOn && !N ? "Skip & Submit" : "Submit" : o.conditionalOn && !N ? "Skip" : "Next"
6998
7077
  }
6999
7078
  )
7000
7079
  ] })
7001
7080
  ] }) });
7002
7081
  }
7003
- return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: Ze, children: /* @__PURE__ */ i(ee, { children: [
7082
+ return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: Ze, children: /* @__PURE__ */ i(X, { children: [
7004
7083
  /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r(ot, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
7005
- /* @__PURE__ */ i(te, { children: [
7006
- V && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
7084
+ /* @__PURE__ */ i(ee, { children: [
7085
+ ue && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
7007
7086
  /* @__PURE__ */ r("strong", { children: "Error:" }),
7008
7087
  " ",
7009
- V
7088
+ ue
7010
7089
  ] }) }),
7011
7090
  /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: U.map((o) => /* @__PURE__ */ r("div", { className: "col-span-4", children: je(o) }, o)) })
7012
7091
  ] }),
7013
- /* @__PURE__ */ i(ke, { className: "flex justify-between", children: [
7014
- a && /* @__PURE__ */ r(G, { type: "button", variant: "outline", onClick: a, disabled: F || h, children: "Cancel" }),
7015
- /* @__PURE__ */ r(G, { type: "submit", isLoading: F || h, children: "Create Applicant" })
7092
+ /* @__PURE__ */ i(xe, { className: "flex justify-between", children: [
7093
+ a && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: a, disabled: x || h, children: "Cancel" }),
7094
+ /* @__PURE__ */ r(V, { type: "submit", isLoading: x || h, children: "Create Applicant" })
7016
7095
  ] })
7017
7096
  ] }) }) });
7018
7097
  }, Et = ["companyName", "email"];
@@ -7025,75 +7104,75 @@ const Wn = ({
7025
7104
  onSuccess: n,
7026
7105
  onCancel: a
7027
7106
  }) => {
7028
- var je, We, g, j, q;
7107
+ var je, We, g, _, q;
7029
7108
  const { config: s, baseInformationService: l, currentTheme: c } = Re(), { createCompanyApplicant: u, isLoading: h } = Pt(), m = e || ((je = s.applicantForm) == null ? void 0 : je.workflowKey);
7030
7109
  if (!m)
7031
7110
  throw new Error(
7032
7111
  "workflowKey is required. Provide it either as a prop to CreateCompanyApplicantForm or set it in config.applicantForm.workflowKey"
7033
7112
  );
7034
- const N = t || ((We = s.applicantForm) == null ? void 0 : We.externalRefId) || "", T = ((g = s.applicantForm) == null ? void 0 : g.email) || "", L = (((j = s.applicantForm) == null ? void 0 : j.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", f = Ae(
7113
+ const I = t || ((We = s.applicantForm) == null ? void 0 : We.externalRefId) || "", T = ((g = s.applicantForm) == null ? void 0 : g.email) || "", L = (((_ = s.applicantForm) == null ? void 0 : _.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", f = Ae(
7035
7114
  () => c != null && c.companyFormPages && c.companyFormPages.length > 0 ? c.companyFormPages : null,
7036
7115
  [c == null ? void 0 : c.companyFormPages]
7037
- ), w = Ae(() => {
7038
- const p = new Set(Et), v = c == null ? void 0 : c.companyFormRequiredFields;
7039
- if (v) for (const R of v) p.add(R);
7116
+ ), S = Ae(() => {
7117
+ const p = new Set(Et), w = c == null ? void 0 : c.companyFormRequiredFields;
7118
+ if (w) for (const E of w) p.add(E);
7040
7119
  if (f)
7041
- for (const R of f)
7042
- for (const x of R.fields)
7043
- !x.isCustom && x.name && x.required && p.add(x.name);
7120
+ for (const E of f)
7121
+ for (const v of E.fields)
7122
+ !v.isCustom && v.name && v.required && p.add(v.name);
7044
7123
  return Array.from(p);
7045
7124
  }, [c == null ? void 0 : c.companyFormRequiredFields, f]), D = Ae(() => {
7046
7125
  var p;
7047
7126
  if (f) {
7048
- const v = f.flatMap((x) => x.fields).filter((x) => !x.isCustom && x.name).map((x) => x.name), R = new Set(v);
7049
- for (const x of Et) R.add(x);
7050
- return Array.from(R);
7127
+ const w = f.flatMap((v) => v.fields).filter((v) => !v.isCustom && v.name).map((v) => v.name), E = new Set(w);
7128
+ for (const v of Et) E.add(v);
7129
+ return Array.from(E);
7051
7130
  }
7052
7131
  return (p = s.applicantForm) != null && p.visibleFields ? s.applicantForm.visibleFields : c != null && c.companyFormVisibleFields && c.companyFormVisibleFields.length > 0 ? c.companyFormVisibleFields : rr;
7053
- }, [(q = s.applicantForm) == null ? void 0 : q.visibleFields, c == null ? void 0 : c.companyFormVisibleFields, f]), U = /* @__PURE__ */ new Set(["countryResidence", "addressCountry"]), K = Ae(() => {
7054
- var v, R;
7132
+ }, [(q = s.applicantForm) == null ? void 0 : q.visibleFields, c == null ? void 0 : c.companyFormVisibleFields, f]), U = /* @__PURE__ */ new Set(["countryResidence", "addressCountry"]), W = Ae(() => {
7133
+ var w, E;
7055
7134
  const p = /* @__PURE__ */ new Set();
7056
7135
  if (f)
7057
- for (const x of f)
7058
- for (const o of x.fields)
7059
- !o.isCustom && o.name && U.has(o.name) && p.add(o.countriesType ?? ((v = Xe[o.name]) == null ? void 0 : v.countriesType));
7136
+ for (const v of f)
7137
+ for (const o of v.fields)
7138
+ !o.isCustom && o.name && U.has(o.name) && p.add(o.countriesType ?? ((w = Xe[o.name]) == null ? void 0 : w.countriesType));
7060
7139
  else
7061
- for (const x of D)
7062
- U.has(x) && p.add((R = Xe[x]) == null ? void 0 : R.countriesType);
7140
+ for (const v of D)
7141
+ U.has(v) && p.add((E = Xe[v]) == null ? void 0 : E.countriesType);
7063
7142
  return p.size === 0 && p.add(void 0), Array.from(p);
7064
- }, [D, f]), [M, B] = k({}), [Y, Q] = k(!0), E = le(/* @__PURE__ */ new Set()), b = le(/* @__PURE__ */ new Set());
7143
+ }, [D, f]), [M, B] = k({}), [G, J] = k(!0), F = le(/* @__PURE__ */ new Set()), b = le(/* @__PURE__ */ new Set());
7065
7144
  ye(() => {
7066
7145
  if (!c) return;
7067
- const p = K.filter((x) => {
7068
- const o = x != null ? String(x) : "all";
7069
- return !b.current.has(o) && !E.current.has(o);
7146
+ const p = W.filter((v) => {
7147
+ const o = v != null ? String(v) : "all";
7148
+ return !b.current.has(o) && !F.current.has(o);
7070
7149
  });
7071
7150
  if (p.length === 0) {
7072
- K.every((o) => b.current.has(o != null ? String(o) : "all")) && Q(!1);
7151
+ W.every((o) => b.current.has(o != null ? String(o) : "all")) && J(!1);
7073
7152
  return;
7074
7153
  }
7075
- Q(!0);
7076
- const v = p.map((x) => x != null ? String(x) : "all");
7077
- v.forEach((x) => E.current.add(x)), (async () => {
7154
+ J(!0);
7155
+ const w = p.map((v) => v != null ? String(v) : "all");
7156
+ w.forEach((v) => F.current.add(v)), (async () => {
7078
7157
  try {
7079
- const x = await Promise.all(
7158
+ const v = await Promise.all(
7080
7159
  p.map(async (o) => {
7081
- const d = o != null ? String(o) : "all", A = await l.getCountries("", s.locale || "en", o), y = /* @__PURE__ */ new Set(), C = A.map((S) => ({ value: S.abbreviation3 || S.abbreviation, label: S.name })).filter((S) => !S.value || y.has(S.value) ? !1 : (y.add(S.value), !0));
7082
- return b.current.add(d), E.current.delete(d), [d, C];
7160
+ const d = o != null ? String(o) : "all", A = await l.getCountries("", s.locale || "en", o), y = /* @__PURE__ */ new Set(), N = A.map((C) => ({ value: C.abbreviation3 || C.abbreviation, label: C.name })).filter((C) => !C.value || y.has(C.value) ? !1 : (y.add(C.value), !0));
7161
+ return b.current.add(d), F.current.delete(d), [d, N];
7083
7162
  })
7084
7163
  );
7085
- B((o) => ({ ...o, ...Object.fromEntries(x) }));
7086
- } catch (x) {
7087
- v.forEach((o) => E.current.delete(o)), console.error("Failed to load countries:", x);
7164
+ B((o) => ({ ...o, ...Object.fromEntries(v) }));
7165
+ } catch (v) {
7166
+ w.forEach((o) => F.current.delete(o)), console.error("Failed to load countries:", v);
7088
7167
  } finally {
7089
- K.every((o) => b.current.has(o != null ? String(o) : "all")) && Q(!1);
7168
+ W.every((o) => b.current.has(o != null ? String(o) : "all")) && J(!1);
7090
7169
  }
7091
7170
  })();
7092
- }, [K, c]);
7093
- const _ = (p, v) => {
7171
+ }, [W, c]);
7172
+ const $ = (p, w) => {
7094
7173
  var o;
7095
- const R = v ?? ((o = Xe[p]) == null ? void 0 : o.countriesType), x = R != null ? String(R) : "all";
7096
- return M[x] || [];
7174
+ const E = w ?? ((o = Xe[p]) == null ? void 0 : o.countriesType), v = E != null ? String(E) : "all";
7175
+ return M[v] || [];
7097
7176
  }, [H, z] = k({
7098
7177
  workflowKey: m,
7099
7178
  companyName: "",
@@ -7115,140 +7194,140 @@ const Wn = ({
7115
7194
  postalCode: "",
7116
7195
  addressCountry: "",
7117
7196
  lei: "",
7118
- externalRefId: N
7119
- }), [O, Z] = k({}), [re, ce] = k(0), [he, ue] = k({}), [P, W] = k(null), [$, V] = k(!1), ne = (p, v) => z((R) => ({ ...R, [p]: v })), F = (p, v) => Z((R) => ({ ...R, [p]: v })), X = (p) => !p.conditionalOn || O[p.conditionalOn] === "true", ae = f && re < f.length - 1 ? re + 1 : -1, de = f && re > 0 ? re - 1 : -1, we = (p) => {
7120
- var R;
7121
- const v = {};
7122
- for (const x of p.fields)
7123
- if (x.isCustom) {
7124
- if (x.customType === "paragraph" || x.customType === "html" || x.customType === "br" || x.customType === "link") continue;
7125
- if (x.required && x.paramName) {
7126
- const o = O[x.paramName], d = x.displayText || x.label || x.paramName;
7127
- x.customType === "checkbox" || x.customType === "link_checkbox" ? o !== "true" && (v[x.paramName] = `${d} is required.`) : (!o || o.trim() === "") && (v[x.paramName] = `${d} is required.`);
7197
+ externalRefId: I
7198
+ }), [O, ne] = k({}), [ae, re] = k(0), [he, de] = k({}), [P, K] = k(null), [Z, ue] = k(!1), j = (p, w) => z((E) => ({ ...E, [p]: w })), x = (p, w) => ne((E) => ({ ...E, [p]: w })), Q = (p) => !p.conditionalOn || O[p.conditionalOn] === "true", Y = f && ae < f.length - 1 ? ae + 1 : -1, ce = f && ae > 0 ? ae - 1 : -1, we = (p) => {
7199
+ var E;
7200
+ const w = {};
7201
+ for (const v of p.fields)
7202
+ if (v.isCustom) {
7203
+ if (v.customType === "paragraph" || v.customType === "html" || v.customType === "br" || v.customType === "link") continue;
7204
+ if (v.required && v.paramName) {
7205
+ const o = O[v.paramName], d = v.displayText || v.label || v.paramName;
7206
+ v.customType === "checkbox" || v.customType === "link_checkbox" ? o !== "true" && (w[v.paramName] = `${d} is required.`) : (!o || o.trim() === "") && (w[v.paramName] = `${d} is required.`);
7128
7207
  }
7129
- } else if (x.name) {
7130
- const o = x.name;
7131
- if (w.includes(o) && ht(H[o])) {
7132
- const d = x.displayText || ((R = Xe[o]) == null ? void 0 : R.label) || o;
7133
- v[o] = `${d} is required.`;
7208
+ } else if (v.name) {
7209
+ const o = v.name;
7210
+ if (S.includes(o) && ht(H[o])) {
7211
+ const d = v.displayText || ((E = Xe[o]) == null ? void 0 : E.label) || o;
7212
+ w[o] = `${d} is required.`;
7134
7213
  }
7135
7214
  }
7136
- return v;
7215
+ return w;
7137
7216
  }, De = async () => {
7138
7217
  if (!f) return;
7139
- const p = f[re];
7140
- if (p.conditionalOn && !X(p)) {
7141
- ue({}), ae >= 0 ? ce(ae) : await xe();
7218
+ const p = f[ae];
7219
+ if (p.conditionalOn && !Q(p)) {
7220
+ de({}), Y >= 0 ? re(Y) : await ve();
7142
7221
  return;
7143
7222
  }
7144
- const v = we(p);
7145
- if (Object.keys(v).length > 0) {
7146
- ue(v);
7223
+ const w = we(p);
7224
+ if (Object.keys(w).length > 0) {
7225
+ de(w);
7147
7226
  return;
7148
7227
  }
7149
- ue({}), ae >= 0 ? ce(ae) : await xe();
7150
- }, xe = async () => {
7228
+ de({}), Y >= 0 ? re(Y) : await ve();
7229
+ }, ve = async () => {
7151
7230
  var p;
7152
7231
  if (f) {
7153
- let v = {};
7154
- for (const R of f)
7155
- X(R) && (v = { ...v, ...we(R) });
7156
- if (Object.keys(v).length > 0) {
7157
- ue(v);
7232
+ let w = {};
7233
+ for (const E of f)
7234
+ Q(E) && (w = { ...w, ...we(E) });
7235
+ if (Object.keys(w).length > 0) {
7236
+ de(w);
7158
7237
  return;
7159
7238
  }
7160
7239
  }
7161
- V(!0), W(null);
7240
+ ue(!0), K(null);
7162
7241
  try {
7163
- const v = {
7242
+ const w = {
7164
7243
  workflowKey: H.workflowKey,
7165
7244
  externalRefId: ((p = H.externalRefId) == null ? void 0 : p.trim()) || void 0
7166
- }, R = f ? f.filter((d) => X(d)).flatMap((d) => d.fields).filter((d) => !d.isCustom && d.name).map((d) => d.name) : D;
7167
- for (const d of R) {
7245
+ }, E = f ? f.filter((d) => Q(d)).flatMap((d) => d.fields).filter((d) => !d.isCustom && d.name).map((d) => d.name) : D;
7246
+ for (const d of E) {
7168
7247
  const A = H[d];
7169
7248
  if (!ht(A))
7170
7249
  switch (d) {
7171
7250
  case "companyName":
7172
- v.companyName = A;
7251
+ w.companyName = A;
7173
7252
  break;
7174
7253
  case "email":
7175
- v.companyEmail = A;
7254
+ w.companyEmail = A;
7176
7255
  break;
7177
7256
  case "phone":
7178
- v.companyPhone = A;
7257
+ w.companyPhone = A;
7179
7258
  break;
7180
7259
  case "registrationNumber":
7181
- v.companyRegistrationNumber = A;
7260
+ w.companyRegistrationNumber = A;
7182
7261
  break;
7183
7262
  case "countryResidence":
7184
- v.companyCountry = A;
7263
+ w.companyCountry = A;
7185
7264
  break;
7186
7265
  case "city":
7187
- v.companyCity = A;
7266
+ w.companyCity = A;
7188
7267
  break;
7189
7268
  case "street":
7190
- v.companyStreet = A;
7269
+ w.companyStreet = A;
7191
7270
  break;
7192
7271
  case "postalCode":
7193
- v.companyZip = A;
7272
+ w.companyZip = A;
7194
7273
  break;
7195
7274
  default:
7196
- v[d] = A;
7275
+ w[d] = A;
7197
7276
  break;
7198
7277
  }
7199
7278
  }
7200
- const x = [];
7279
+ const v = [];
7201
7280
  if (f) {
7202
7281
  for (const d of f)
7203
- if (X(d))
7282
+ if (Q(d))
7204
7283
  for (const A of d.fields) {
7205
7284
  if (!A.isCustom || !A.paramName || A.customType === "paragraph" || A.customType === "html" || A.customType === "br" || A.customType === "link") continue;
7206
7285
  const y = O[A.paramName] ?? "";
7207
- let C;
7286
+ let N;
7208
7287
  if (A.customType === "checkbox" || A.customType === "link_checkbox")
7209
- C = y === "true" ? "yes" : "no";
7210
- else if (C = y, !C && !A.required) continue;
7211
- x.push({ paramName: A.paramName, value: C });
7288
+ N = y === "true" ? "yes" : "no";
7289
+ else if (N = y, !N && !A.required) continue;
7290
+ v.push({ paramName: A.paramName, value: N });
7212
7291
  }
7213
7292
  }
7214
- x.length > 0 && (v.applicantAdditionalDatas = x);
7215
- const o = await u(v);
7293
+ v.length > 0 && (w.applicantAdditionalDatas = v);
7294
+ const o = await u(w);
7216
7295
  n(o.applicantId);
7217
- } catch (v) {
7218
- console.error("Error creating company applicant:", v), W(v.message || "Failed to create company applicant");
7296
+ } catch (w) {
7297
+ console.error("Error creating company applicant:", w), K(w.message || "Failed to create company applicant");
7219
7298
  } finally {
7220
- V(!1);
7299
+ ue(!1);
7221
7300
  }
7222
7301
  }, Ge = async (p) => {
7223
- var v;
7302
+ var w;
7224
7303
  p.preventDefault();
7225
- for (const R of w)
7226
- if (ht(H[R])) {
7227
- const x = ((v = Xe[R]) == null ? void 0 : v.label) || R;
7228
- W(`${x} is required.`);
7304
+ for (const E of S)
7305
+ if (ht(H[E])) {
7306
+ const v = ((w = Xe[E]) == null ? void 0 : w.label) || E;
7307
+ K(`${v} is required.`);
7229
7308
  return;
7230
7309
  }
7231
- await xe();
7232
- }, Je = (p, v, R, x, o) => {
7310
+ await ve();
7311
+ }, Je = (p, w, E, v, o) => {
7233
7312
  const d = Xe[p];
7234
7313
  if (!d) return null;
7235
- const A = w.includes(p), y = he[p], C = R || d.label, S = v ?? p, oe = o ? o !== "placeholder" : L, ie = oe ? C : void 0, ve = oe ? "..." : C;
7314
+ const A = S.includes(p), y = he[p], N = E || d.label, C = w ?? p, oe = o ? o !== "placeholder" : L, ie = oe ? N : void 0, ke = oe ? "..." : N;
7236
7315
  switch (d.type) {
7237
7316
  case "select":
7238
7317
  if (p === "countryResidence" || p === "addressCountry") {
7239
- const ge = _(p, x);
7318
+ const ge = $(p, v);
7240
7319
  return /* @__PURE__ */ r(
7241
7320
  Be,
7242
7321
  {
7243
7322
  required: A,
7244
7323
  label: ie,
7245
7324
  value: H[p] || "",
7246
- onChange: (pe) => ne(p, pe),
7247
- options: [{ value: "", label: `Select ${ve.toLowerCase()}` }, ...ge],
7248
- disabled: Y,
7325
+ onChange: (pe) => j(p, pe),
7326
+ options: [{ value: "", label: `Select ${ke.toLowerCase()}` }, ...ge],
7327
+ disabled: G,
7249
7328
  error: y
7250
7329
  },
7251
- S
7330
+ C
7252
7331
  );
7253
7332
  }
7254
7333
  return null;
@@ -7259,12 +7338,12 @@ const Wn = ({
7259
7338
  required: A,
7260
7339
  type: "date",
7261
7340
  label: ie,
7262
- placeholder: oe ? void 0 : C,
7341
+ placeholder: oe ? void 0 : N,
7263
7342
  value: H[p] || "",
7264
- onChange: (ge) => ne(p, ge.target.value),
7343
+ onChange: (ge) => j(p, ge.target.value),
7265
7344
  error: y
7266
7345
  },
7267
- S
7346
+ C
7268
7347
  );
7269
7348
  case "email":
7270
7349
  return /* @__PURE__ */ r(
@@ -7273,12 +7352,12 @@ const Wn = ({
7273
7352
  required: A,
7274
7353
  type: "email",
7275
7354
  label: ie,
7276
- placeholder: oe ? void 0 : C,
7355
+ placeholder: oe ? void 0 : N,
7277
7356
  value: H[p] || "",
7278
- onChange: (ge) => ne(p, ge.target.value),
7357
+ onChange: (ge) => j(p, ge.target.value),
7279
7358
  error: y
7280
7359
  },
7281
- S
7360
+ C
7282
7361
  );
7283
7362
  case "tel":
7284
7363
  return /* @__PURE__ */ r(
@@ -7287,12 +7366,12 @@ const Wn = ({
7287
7366
  required: A,
7288
7367
  type: "tel",
7289
7368
  label: ie,
7290
- placeholder: oe ? void 0 : C,
7369
+ placeholder: oe ? void 0 : N,
7291
7370
  value: H[p] || "",
7292
- onChange: (ge) => ne(p, ge.target.value),
7371
+ onChange: (ge) => j(p, ge.target.value),
7293
7372
  error: y
7294
7373
  },
7295
- S
7374
+ C
7296
7375
  );
7297
7376
  default:
7298
7377
  return /* @__PURE__ */ r(
@@ -7301,15 +7380,15 @@ const Wn = ({
7301
7380
  required: A,
7302
7381
  type: "text",
7303
7382
  label: ie,
7304
- placeholder: oe ? void 0 : C,
7383
+ placeholder: oe ? void 0 : N,
7305
7384
  value: H[p] || "",
7306
- onChange: (ge) => ne(p, ge.target.value),
7385
+ onChange: (ge) => j(p, ge.target.value),
7307
7386
  error: y
7308
7387
  },
7309
- S
7388
+ C
7310
7389
  );
7311
7390
  }
7312
- }, Me = (p, v) => {
7391
+ }, Me = (p, w) => {
7313
7392
  if (p.customType === "paragraph")
7314
7393
  return /* @__PURE__ */ r(
7315
7394
  "p",
@@ -7317,12 +7396,12 @@ const Wn = ({
7317
7396
  style: { fontSize: "14px", lineHeight: "1.7", margin: 0, color: "var(--metakyc-text-secondary, #6b7280)" },
7318
7397
  dangerouslySetInnerHTML: { __html: p.displayText || p.label || "" }
7319
7398
  },
7320
- `custom-${v}`
7399
+ `custom-${w}`
7321
7400
  );
7322
7401
  if (p.customType === "html")
7323
- return /* @__PURE__ */ r("div", { dangerouslySetInnerHTML: { __html: p.label || "" } }, `custom-${v}`);
7402
+ return /* @__PURE__ */ r("div", { dangerouslySetInnerHTML: { __html: p.label || "" } }, `custom-${w}`);
7324
7403
  if (p.customType === "br")
7325
- return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${v}`);
7404
+ return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${w}`);
7326
7405
  if (p.customType === "link")
7327
7406
  return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
7328
7407
  "a",
@@ -7333,9 +7412,9 @@ const Wn = ({
7333
7412
  style: { color: "var(--metakyc-primary, #2563eb)", fontSize: "14px", textDecoration: "underline" },
7334
7413
  children: p.displayText || p.label || p.linkText || p.linkUrl || ""
7335
7414
  }
7336
- ) }, `custom-${v}`);
7415
+ ) }, `custom-${w}`);
7337
7416
  if (!p.paramName) return null;
7338
- const R = he[p.paramName], x = p.displayText || p.label || p.paramName, o = p.labelMode ? p.labelMode !== "placeholder" : L;
7417
+ const E = he[p.paramName], v = p.displayText || p.label || p.paramName, o = p.labelMode ? p.labelMode !== "placeholder" : L;
7339
7418
  return p.customType === "checkbox" ? /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
7340
7419
  /* @__PURE__ */ i("label", { style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer" }, children: [
7341
7420
  /* @__PURE__ */ r(
@@ -7343,60 +7422,60 @@ const Wn = ({
7343
7422
  {
7344
7423
  type: "checkbox",
7345
7424
  checked: O[p.paramName] === "true",
7346
- onChange: (d) => F(p.paramName, d.target.checked ? "true" : "false"),
7425
+ onChange: (d) => x(p.paramName, d.target.checked ? "true" : "false"),
7347
7426
  style: { width: "16px", height: "16px", accentColor: "var(--metakyc-primary, #2563eb)" }
7348
7427
  }
7349
7428
  ),
7350
7429
  /* @__PURE__ */ i("span", { style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)" }, children: [
7351
- x,
7430
+ v,
7352
7431
  p.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
7353
7432
  ] })
7354
7433
  ] }),
7355
- R && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: R })
7356
- ] }, `custom-${v}`) : /* @__PURE__ */ r(
7434
+ E && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: E })
7435
+ ] }, `custom-${w}`) : /* @__PURE__ */ r(
7357
7436
  fe,
7358
7437
  {
7359
7438
  type: "text",
7360
- label: o ? `${x}${p.required ? " *" : ""}` : void 0,
7361
- placeholder: o ? void 0 : x,
7439
+ label: o ? `${v}${p.required ? " *" : ""}` : void 0,
7440
+ placeholder: o ? void 0 : v,
7362
7441
  value: O[p.paramName] || "",
7363
- onChange: (d) => F(p.paramName, d.target.value),
7442
+ onChange: (d) => x(p.paramName, d.target.value),
7364
7443
  required: p.required,
7365
- error: R
7444
+ error: E
7366
7445
  },
7367
- `custom-${v}`
7446
+ `custom-${w}`
7368
7447
  );
7369
7448
  }, Ze = (p) => {
7370
- const v = X(p);
7449
+ const w = Q(p);
7371
7450
  return /* @__PURE__ */ i("div", { className: "space-y-4", children: [
7372
7451
  p.conditionalOn && /* @__PURE__ */ i("label", { style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer" }, children: [
7373
7452
  /* @__PURE__ */ r(
7374
7453
  "input",
7375
7454
  {
7376
7455
  type: "checkbox",
7377
- checked: v,
7378
- onChange: (R) => F(p.conditionalOn, R.target.checked ? "true" : "false"),
7456
+ checked: w,
7457
+ onChange: (E) => x(p.conditionalOn, E.target.checked ? "true" : "false"),
7379
7458
  style: { width: "16px", height: "16px", accentColor: "var(--metakyc-primary, #2563eb)" }
7380
7459
  }
7381
7460
  ),
7382
7461
  /* @__PURE__ */ r("span", { style: { fontSize: "14px", fontWeight: 500 }, children: p.conditionalOn })
7383
7462
  ] }),
7384
- v && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: p.fields.map((R, x) => {
7385
- const o = R.colSpan === 1 ? "col-span-1" : R.colSpan === 2 ? "col-span-2" : R.colSpan === 3 ? "col-span-3" : "col-span-4", d = R.isCustom ? `custom-${x}-${R.paramName}` : `builtin-${R.name}-${x}`;
7386
- return /* @__PURE__ */ r("div", { className: o, children: R.isCustom ? Me(R, x) : Je(R.name, d, R.displayText, R.countriesType, R.labelMode) }, d);
7463
+ w && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: p.fields.map((E, v) => {
7464
+ const o = E.colSpan === 1 ? "col-span-1" : E.colSpan === 2 ? "col-span-2" : E.colSpan === 3 ? "col-span-3" : "col-span-4", d = E.isCustom ? `custom-${v}-${E.paramName}` : `builtin-${E.name}-${v}`;
7465
+ return /* @__PURE__ */ r("div", { className: o, children: E.isCustom ? Me(E, v) : Je(E.name, d, E.displayText, E.countriesType, E.labelMode) }, d);
7387
7466
  }) })
7388
7467
  ] });
7389
7468
  };
7390
- if (!c || Y)
7391
- return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i(te, { children: [
7469
+ if (!c || G)
7470
+ return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r(X, { children: /* @__PURE__ */ i(ee, { children: [
7392
7471
  /* @__PURE__ */ r(Pe, { className: "my-8" }),
7393
7472
  /* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
7394
7473
  ] }) }) });
7395
7474
  if (f) {
7396
- const p = f[re] ?? f[0], v = de === -1, R = ae === -1, x = f.length, o = X(p), d = Object.values(he);
7397
- return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(ee, { children: [
7475
+ const p = f[ae] ?? f[0], w = ce === -1, E = Y === -1, v = f.length, o = Q(p), d = Object.values(he);
7476
+ return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(X, { children: [
7398
7477
  /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r(ot, { title: (c == null ? void 0 : c.title) || "Company Registration" }) }),
7399
- /* @__PURE__ */ i(te, { children: [
7478
+ /* @__PURE__ */ i(ee, { children: [
7400
7479
  (p.title || p.subtitle) && /* @__PURE__ */ i("div", { className: "mb-4", children: [
7401
7480
  p.title && /* @__PURE__ */ r("h3", { className: "font-semibold text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: p.title }),
7402
7481
  p.subtitle && /* @__PURE__ */ r("p", { className: "text-sm mt-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: p.subtitle })
@@ -7409,46 +7488,46 @@ const Wn = ({
7409
7488
  ] }),
7410
7489
  d.map((A, y) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: A }, y))
7411
7490
  ] }),
7412
- x > 1 && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-4", children: [
7491
+ v > 1 && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-4", children: [
7413
7492
  f.map((A, y) => /* @__PURE__ */ r(
7414
7493
  "div",
7415
7494
  {
7416
- className: `h-1.5 rounded-full transition-all ${y === re ? "flex-1" : "w-8"}`,
7417
- style: y === re ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : y < re ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
7495
+ className: `h-1.5 rounded-full transition-all ${y === ae ? "flex-1" : "w-8"}`,
7496
+ style: y === ae ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : y < ae ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
7418
7497
  },
7419
7498
  y
7420
7499
  )),
7421
7500
  /* @__PURE__ */ i("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
7422
- re + 1,
7501
+ ae + 1,
7423
7502
  " / ",
7424
- x
7503
+ v
7425
7504
  ] })
7426
7505
  ] }),
7427
7506
  Ze(p)
7428
7507
  ] }),
7429
- /* @__PURE__ */ i(ke, { className: "flex justify-between", children: [
7508
+ /* @__PURE__ */ i(xe, { className: "flex justify-between", children: [
7430
7509
  /* @__PURE__ */ i("div", { children: [
7431
- !v && /* @__PURE__ */ r(
7432
- G,
7510
+ !w && /* @__PURE__ */ r(
7511
+ V,
7433
7512
  {
7434
7513
  type: "button",
7435
7514
  variant: "outline",
7436
7515
  onClick: () => {
7437
- ce(de), ue({});
7516
+ re(ce), de({});
7438
7517
  },
7439
- disabled: $ || h,
7518
+ disabled: Z || h,
7440
7519
  children: "Previous"
7441
7520
  }
7442
7521
  ),
7443
- v && a && /* @__PURE__ */ r(G, { type: "button", variant: "outline", onClick: a, disabled: $ || h, children: "Cancel" })
7522
+ w && a && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: a, disabled: Z || h, children: "Cancel" })
7444
7523
  ] }),
7445
- /* @__PURE__ */ r(G, { type: "button", isLoading: $ || h, onClick: R ? xe : De, children: R ? p.conditionalOn && !o ? "Skip & Submit" : "Submit" : p.conditionalOn && !o ? "Skip" : "Next" })
7524
+ /* @__PURE__ */ r(V, { type: "button", isLoading: Z || h, onClick: E ? ve : De, children: E ? p.conditionalOn && !o ? "Skip & Submit" : "Submit" : p.conditionalOn && !o ? "Skip" : "Next" })
7446
7525
  ] })
7447
7526
  ] }) });
7448
7527
  }
7449
- return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: Ge, children: /* @__PURE__ */ i(ee, { children: [
7528
+ return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: Ge, children: /* @__PURE__ */ i(X, { children: [
7450
7529
  /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r(ot, { title: (c == null ? void 0 : c.title) || "Company Registration" }) }),
7451
- /* @__PURE__ */ i(te, { children: [
7530
+ /* @__PURE__ */ i(ee, { children: [
7452
7531
  P && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
7453
7532
  /* @__PURE__ */ r("strong", { children: "Error:" }),
7454
7533
  " ",
@@ -7456,9 +7535,9 @@ const Wn = ({
7456
7535
  ] }) }),
7457
7536
  /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: D.map((p) => /* @__PURE__ */ r("div", { className: "col-span-4", children: Je(p) }, p)) })
7458
7537
  ] }),
7459
- /* @__PURE__ */ i(ke, { className: "flex justify-between", children: [
7460
- a && /* @__PURE__ */ r(G, { type: "button", variant: "outline", onClick: a, disabled: $ || h, children: "Cancel" }),
7461
- /* @__PURE__ */ r(G, { type: "submit", isLoading: $ || h, children: "Register Company" })
7538
+ /* @__PURE__ */ i(xe, { className: "flex justify-between", children: [
7539
+ a && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: a, disabled: Z || h, children: "Cancel" }),
7540
+ /* @__PURE__ */ r(V, { type: "submit", isLoading: Z || h, children: "Register Company" })
7462
7541
  ] })
7463
7542
  ] }) }) });
7464
7543
  }, Kn = ({
@@ -7474,32 +7553,32 @@ const Wn = ({
7474
7553
  steps: u,
7475
7554
  workflowKey: h,
7476
7555
  nextWorkflowKey: m,
7477
- hasWorkflowChanged: N,
7556
+ hasWorkflowChanged: I,
7478
7557
  isLoading: T,
7479
- error: I,
7558
+ error: R,
7480
7559
  moveBack: L,
7481
7560
  refreshProgress: f
7482
- } = $r(e), [w, D] = Fe.useState(!1);
7561
+ } = $r(e), [S, D] = Fe.useState(!1);
7483
7562
  if (Fe.useEffect(() => {
7484
- I && n && n(I);
7485
- }, [I, n]), Fe.useEffect(() => {
7563
+ R && n && n(R);
7564
+ }, [R, n]), Fe.useEffect(() => {
7486
7565
  l != null && l.workflowResult && t && t(l.workflowResult);
7487
7566
  }, [l == null ? void 0 : l.workflowResult, t]), Fe.useEffect(() => {
7488
7567
  a === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
7489
7568
  }, [a]), Fe.useEffect(() => {
7490
- N && D(!1);
7491
- }, [N]), T || !l)
7492
- return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i(te, { children: [
7569
+ I && D(!1);
7570
+ }, [I]), T || !l)
7571
+ return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(X, { children: /* @__PURE__ */ i(ee, { children: [
7493
7572
  /* @__PURE__ */ r(Pe, { className: "my-8" }),
7494
7573
  /* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Loading workflow..." })
7495
7574
  ] }) }) });
7496
- if (I)
7497
- return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
7575
+ if (R)
7576
+ return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
7498
7577
  /* @__PURE__ */ r("p", { className: "text-lg mb-4", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "An error occurred" }),
7499
- /* @__PURE__ */ r("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: I.message })
7578
+ /* @__PURE__ */ r("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: R.message })
7500
7579
  ] }) }) }) });
7501
- if (N && !w)
7502
- return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
7580
+ if (I && !S)
7581
+ return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
7503
7582
  /* @__PURE__ */ r("div", { className: "mb-6", children: /* @__PURE__ */ r("div", { className: "inline-flex items-center justify-center w-16 h-16 rounded-full mb-4", style: { backgroundColor: "var(--metakyc-primary-light, #dbeafe)" }, children: /* @__PURE__ */ r("svg", { className: "w-8 h-8", style: { color: "var(--metakyc-primary, #2563eb)" }, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }) }) }),
7504
7583
  /* @__PURE__ */ r("h3", { className: "text-xl font-semibold mb-2", style: { color: "var(--metakyc-text-primary, #111827)" }, children: "Workflow Transition" }),
7505
7584
  /* @__PURE__ */ r("p", { className: "mb-6", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Your application workflow has been updated based on your progress." }),
@@ -7542,7 +7621,7 @@ const Wn = ({
7542
7621
  }
7543
7622
  ) });
7544
7623
  if (!c)
7545
- return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i(te, { children: [
7624
+ return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(X, { children: /* @__PURE__ */ i(ee, { children: [
7546
7625
  /* @__PURE__ */ r(Pe, { className: "my-8" }),
7547
7626
  /* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: l.status === Te.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
7548
7627
  ] }) }) });
@@ -7569,20 +7648,20 @@ const Wn = ({
7569
7648
  default:
7570
7649
  return "";
7571
7650
  }
7572
- }, K = () => {
7573
- const B = u.filter((b) => b.visibility !== !1), Y = B.findIndex((b) => b.order === c.order), Q = Y >= 0 ? Y + 1 : 1, E = B.length;
7651
+ }, W = () => {
7652
+ const B = u.filter((b) => b.visibility !== !1), G = B.findIndex((b) => b.order === c.order), J = G >= 0 ? G + 1 : 1, F = B.length;
7574
7653
  return /* @__PURE__ */ i("div", { className: "mb-6", children: [
7575
7654
  /* @__PURE__ */ i("div", { className: "flex items-start justify-between mb-4", children: [
7576
7655
  /* @__PURE__ */ r(ot, {}),
7577
7656
  /* @__PURE__ */ i(Lt, { variant: l.status === 1 ? "info" : "success", children: [
7578
7657
  "Step ",
7579
- Q,
7658
+ J,
7580
7659
  " of ",
7581
- E
7660
+ F
7582
7661
  ] })
7583
7662
  ] }),
7584
- /* @__PURE__ */ r("div", { className: "flex items-center", children: B.map((b, _) => {
7585
- const H = _ < Y, z = b.order === c.order, O = H || z;
7663
+ /* @__PURE__ */ r("div", { className: "flex items-center", children: B.map((b, $) => {
7664
+ const H = $ < G, z = b.order === c.order, O = H || z;
7586
7665
  return /* @__PURE__ */ i(Fe.Fragment, { children: [
7587
7666
  /* @__PURE__ */ i("div", { className: "flex items-center", children: [
7588
7667
  /* @__PURE__ */ r(
@@ -7598,7 +7677,7 @@ const Wn = ({
7598
7677
  color: "var(--metakyc-text-muted, #9ca3af)",
7599
7678
  border: "2px solid var(--metakyc-border, #e5e7eb)"
7600
7679
  },
7601
- children: H ? /* @__PURE__ */ r("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", strokeWidth: 2.5, viewBox: "0 0 24 24", children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) : _ + 1
7680
+ children: H ? /* @__PURE__ */ r("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", strokeWidth: 2.5, viewBox: "0 0 24 24", children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) : $ + 1
7602
7681
  }
7603
7682
  ),
7604
7683
  /* @__PURE__ */ r(
@@ -7609,11 +7688,11 @@ const Wn = ({
7609
7688
  fontWeight: z ? 600 : 400,
7610
7689
  color: z ? "var(--metakyc-text-primary, #111827)" : "var(--metakyc-text-muted, #9ca3af)"
7611
7690
  },
7612
- children: b.displayName || b.name || U(b.action) || `Step ${_ + 1}`
7691
+ children: b.displayName || b.name || U(b.action) || `Step ${$ + 1}`
7613
7692
  }
7614
7693
  )
7615
7694
  ] }),
7616
- _ < B.length - 1 && /* @__PURE__ */ r(
7695
+ $ < B.length - 1 && /* @__PURE__ */ r(
7617
7696
  "div",
7618
7697
  {
7619
7698
  className: "flex-1 h-0.5 mx-3",
@@ -7660,7 +7739,7 @@ const Wn = ({
7660
7739
  }
7661
7740
  );
7662
7741
  default:
7663
- return /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ i(te, { className: "py-12 text-center", children: [
7742
+ return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ i(ee, { className: "py-12 text-center", children: [
7664
7743
  /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(Pe, {}) }),
7665
7744
  /* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
7666
7745
  "Processing step: ",
@@ -7674,7 +7753,7 @@ const Wn = ({
7674
7753
  }
7675
7754
  };
7676
7755
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${s || ""}`, children: [
7677
- K(),
7756
+ W(),
7678
7757
  M()
7679
7758
  ] });
7680
7759
  };
@@ -7705,14 +7784,14 @@ function Nn(e) {
7705
7784
  }
7706
7785
  return t;
7707
7786
  }
7708
- function Vn(e) {
7787
+ function Yn(e) {
7709
7788
  const t = {};
7710
7789
  return e.uploadDocumentFiles.forEach((n) => {
7711
7790
  const a = `file_${n.id}`;
7712
7791
  t[a] = Nn(n);
7713
7792
  }), _e.object(t);
7714
7793
  }
7715
- function Yn(e) {
7794
+ function Vn(e) {
7716
7795
  return _e.any();
7717
7796
  }
7718
7797
  function In(e) {
@@ -7731,17 +7810,17 @@ export {
7731
7810
  Kt as ApplicantProgressOnHoldReason,
7732
7811
  Te as ApplicantProgressStatus,
7733
7812
  or as ApplicantService,
7734
- Vt as ApplicantStatus,
7813
+ Yt as ApplicantStatus,
7735
7814
  Zt as AppropriatenessQuestionType,
7736
7815
  dr as AppropriatenessTestService,
7737
7816
  vn as AppropriatenessTestStep,
7738
7817
  Lt as Badge,
7739
7818
  yr as BaseInformationService,
7740
- G as Button,
7819
+ V as Button,
7741
7820
  Xe as COMPANY_FIELD_METADATA,
7742
- ee as Card,
7743
- te as CardContent,
7744
- ke as CardFooter,
7821
+ X as Card,
7822
+ ee as CardContent,
7823
+ xe as CardFooter,
7745
7824
  be as CardHeader,
7746
7825
  Ue as CountriesType,
7747
7826
  Un as CreateApplicantForm,
@@ -7751,11 +7830,11 @@ export {
7751
7830
  nr as DEFAULT_VISIBLE_FIELDS,
7752
7831
  Jt as DocumentReviewStatus,
7753
7832
  ir as EndpointBuilder,
7754
- nt as ErrorHandler,
7833
+ at as ErrorHandler,
7755
7834
  Sr as EventEmitter,
7756
7835
  Qe as FIELD_METADATA,
7757
7836
  Gt as FileType,
7758
- Yr as FileUpload,
7837
+ Vr as FileUpload,
7759
7838
  pt as GenderType,
7760
7839
  ot as Header,
7761
7840
  sr as HttpClient,
@@ -7768,8 +7847,8 @@ export {
7768
7847
  xn as InvestorCategorizationStep,
7769
7848
  Ce as InvestorCategorizationType,
7770
7849
  tr as InvestorCategoryType,
7771
- Yt as KycProcessStatus,
7772
- Ve as KycStatus,
7850
+ Vt as KycProcessStatus,
7851
+ Ye as KycStatus,
7773
7852
  It as KycStatusDisplay,
7774
7853
  Kn as KycWorkflow,
7775
7854
  Cn as Logo,
@@ -7783,7 +7862,7 @@ export {
7783
7862
  Qr as PhoneInput,
7784
7863
  lr as QuestionnaireService,
7785
7864
  sn as QuestionnaireStep,
7786
- Ye as ReviewStatus,
7865
+ Ve as ReviewStatus,
7787
7866
  Xt as RiskCriteriaType,
7788
7867
  qt as RiskLevel,
7789
7868
  pr as RiskScoringService,
@@ -7818,11 +7897,11 @@ export {
7818
7897
  mt as formatFileSize,
7819
7898
  Qn as generateAppropriatenessSchema,
7820
7899
  qn as generateQuestionnaireSchema,
7821
- Yn as generateRiskScoringSchema,
7822
- Vn as generateUploadDocumentSchema,
7900
+ Vn as generateRiskScoringSchema,
7901
+ Yn as generateUploadDocumentSchema,
7823
7902
  Bn as getAcceptString,
7824
7903
  Dr as getApplicantId,
7825
- at as getThemePreset,
7904
+ it as getThemePreset,
7826
7905
  _n as getWorkflowState,
7827
7906
  br as healthcareTheme,
7828
7907
  Dn as isScriptLoaded,