@vpdev2/metakyc 1.0.51 → 1.0.52

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
@@ -138,10 +138,10 @@ class Ai {
138
138
  }
139
139
  }
140
140
  class Ge extends Error {
141
- constructor(a, r, n, c, o) {
141
+ constructor(a, r, n, l, o) {
142
142
  super(a);
143
143
  he(this, "response");
144
- this.code = r, this.details = n, this.validationErrors = c, this.name = "MetaKYCError", this.response = o, Object.setPrototypeOf(this, Ge.prototype);
144
+ this.code = r, this.details = n, this.validationErrors = l, this.name = "MetaKYCError", this.response = o, Object.setPrototypeOf(this, Ge.prototype);
145
145
  }
146
146
  }
147
147
  class gt {
@@ -220,7 +220,7 @@ class Li {
220
220
  var n;
221
221
  const r = a.config;
222
222
  return ((n = a.response) == null ? void 0 : n.status) >= 500 && !r._retry && (r._retry = !0, r._retryCount = (r._retryCount || 0) + 1, r._retryCount < (this.config.retries || 3)) ? (await new Promise(
223
- (c) => setTimeout(c, 1e3 * r._retryCount)
223
+ (l) => setTimeout(l, 1e3 * r._retryCount)
224
224
  ), this.axiosInstance(r)) : Promise.reject(a);
225
225
  }
226
226
  );
@@ -236,10 +236,10 @@ class Li {
236
236
  */
237
237
  async get(t, a, r) {
238
238
  try {
239
- const n = this.buildEndpoint(t, a), c = await this.axiosInstance.get(n, {
239
+ const n = this.buildEndpoint(t, a), l = await this.axiosInstance.get(n, {
240
240
  params: r
241
241
  });
242
- return this.handleResponse(c);
242
+ return this.handleResponse(l);
243
243
  } catch (n) {
244
244
  throw gt.handleAxiosError(n);
245
245
  }
@@ -249,8 +249,8 @@ class Li {
249
249
  */
250
250
  async post(t, a, r) {
251
251
  try {
252
- const n = this.buildEndpoint(t, a), c = await this.axiosInstance.post(n, r);
253
- return this.handleResponse(c);
252
+ const n = this.buildEndpoint(t, a), l = await this.axiosInstance.post(n, r);
253
+ return this.handleResponse(l);
254
254
  } catch (n) {
255
255
  throw gt.handleAxiosError(n);
256
256
  }
@@ -260,8 +260,8 @@ class Li {
260
260
  */
261
261
  async put(t, a, r) {
262
262
  try {
263
- const n = this.buildEndpoint(t, a), c = await this.axiosInstance.put(n, r);
264
- return this.handleResponse(c);
263
+ const n = this.buildEndpoint(t, a), l = await this.axiosInstance.put(n, r);
264
+ return this.handleResponse(l);
265
265
  } catch (n) {
266
266
  throw gt.handleAxiosError(n);
267
267
  }
@@ -271,10 +271,10 @@ class Li {
271
271
  */
272
272
  async delete(t, a, r) {
273
273
  try {
274
- const n = this.buildEndpoint(t, a), c = await this.axiosInstance.delete(n, {
274
+ const n = this.buildEndpoint(t, a), l = await this.axiosInstance.delete(n, {
275
275
  params: r
276
276
  });
277
- return this.handleResponse(c);
277
+ return this.handleResponse(l);
278
278
  } catch (n) {
279
279
  throw gt.handleAxiosError(n);
280
280
  }
@@ -297,11 +297,11 @@ class Li {
297
297
  }
298
298
  class Aa {
299
299
  static async createToken(t) {
300
- const { baseUrl: a, apiKey: r, secretKey: n, tenantId: c, clientId: o, externalRefId: g } = t;
301
- if (!c && !o)
300
+ const { baseUrl: a, apiKey: r, secretKey: n, tenantId: l, clientId: o, externalRefId: g } = t;
301
+ if (!l && !o)
302
302
  throw new Error("Either tenantId or clientId must be provided.");
303
303
  const m = { apiKey: r, secretKey: n };
304
- c != null && (m.tenantId = c), o && (m.clientId = o), g && (m.externalRefId = g);
304
+ l != null && (m.tenantId = l), o && (m.clientId = o), g && (m.externalRefId = g);
305
305
  const y = (await Xt.post(
306
306
  `${a.replace(/\/+$/, "")}/api/SdkSession/CreateToken`,
307
307
  m,
@@ -950,66 +950,67 @@ class $i {
950
950
  /**
951
951
  * Get theme configuration from backend
952
952
  */
953
- async getThemeConfiguration() {
954
- var t;
953
+ async getThemeConfiguration(t) {
954
+ var a;
955
955
  try {
956
- const a = await this.httpClient.get(
956
+ const r = t ? { configVersionName: t } : void 0, n = await this.httpClient.get(
957
957
  "Tenant",
958
- "GetThemeConfiguration"
958
+ "GetThemeConfiguration",
959
+ r
959
960
  );
960
- if (!a.result.isEnabled)
961
+ if (!n.result.isEnabled)
961
962
  return yt(De.Default);
962
- let r = a.result.preset ? yt(a.result.preset) : yt(De.Default);
963
- if (a.result.title && (r.title = a.result.title), a.result.logo && (r.logo = { ...r.logo, ...a.result.logo }), a.result.colors && (r.colors = { ...r.colors, ...a.result.colors }), a.result.typography && (r.typography = { ...r.typography, ...a.result.typography }), a.result.spacing && (r.spacing = { ...r.spacing, ...a.result.spacing }), a.result.customCSS && (r.customCSS = a.result.customCSS), a.result.darkMode && (r.darkMode = {
963
+ let l = n.result.preset ? yt(n.result.preset) : yt(De.Default);
964
+ if (n.result.title && (l.title = n.result.title), n.result.logo && (l.logo = { ...l.logo, ...n.result.logo }), n.result.colors && (l.colors = { ...l.colors, ...n.result.colors }), n.result.typography && (l.typography = { ...l.typography, ...n.result.typography }), n.result.spacing && (l.spacing = { ...l.spacing, ...n.result.spacing }), n.result.customCSS && (l.customCSS = n.result.customCSS), n.result.darkMode && (l.darkMode = {
964
965
  colors: {
965
- ...(t = r.darkMode) == null ? void 0 : t.colors,
966
- ...a.result.darkMode.colors
966
+ ...(a = l.darkMode) == null ? void 0 : a.colors,
967
+ ...n.result.darkMode.colors
967
968
  }
968
- }), a.result.applicantFormVisibleFields && a.result.applicantFormVisibleFields.length > 0 && (r.applicantFormVisibleFields = a.result.applicantFormVisibleFields), a.result.applicantFormRequiredFields && a.result.applicantFormRequiredFields.length > 0 && (r.applicantFormRequiredFields = a.result.applicantFormRequiredFields), a.result.allowedLanguages && a.result.allowedLanguages.length > 0 && (r.allowedLanguages = a.result.allowedLanguages), a.result.applicantFormPages)
969
+ }), n.result.applicantFormVisibleFields && n.result.applicantFormVisibleFields.length > 0 && (l.applicantFormVisibleFields = n.result.applicantFormVisibleFields), n.result.applicantFormRequiredFields && n.result.applicantFormRequiredFields.length > 0 && (l.applicantFormRequiredFields = n.result.applicantFormRequiredFields), n.result.allowedLanguages && n.result.allowedLanguages.length > 0 && (l.allowedLanguages = n.result.allowedLanguages), n.result.applicantFormPages)
969
970
  try {
970
- const n = typeof a.result.applicantFormPages == "string" ? JSON.parse(a.result.applicantFormPages) : a.result.applicantFormPages;
971
- Array.isArray(n) && n.length > 0 && (r.applicantFormPages = n.map((c) => {
972
- const o = !c._v || c._v < 4;
971
+ const o = typeof n.result.applicantFormPages == "string" ? JSON.parse(n.result.applicantFormPages) : n.result.applicantFormPages;
972
+ Array.isArray(o) && o.length > 0 && (l.applicantFormPages = o.map((g) => {
973
+ const m = !g._v || g._v < 4;
973
974
  return {
974
- ...c,
975
- fields: (c.fields || []).map((g) => ({
976
- ...g,
977
- colSpan: o ? g.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, g.colSpan ?? 4))
975
+ ...g,
976
+ fields: (g.fields || []).map((d) => ({
977
+ ...d,
978
+ colSpan: m ? d.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, d.colSpan ?? 4))
978
979
  }))
979
980
  };
980
981
  }));
981
982
  } catch {
982
983
  }
983
- if (a.result.reviewPageFields)
984
+ if (n.result.reviewPageFields)
984
985
  try {
985
- const n = typeof a.result.reviewPageFields == "string" ? JSON.parse(a.result.reviewPageFields) : a.result.reviewPageFields;
986
- Array.isArray(n) && n.length > 0 && (r.reviewPageFields = n);
986
+ const o = typeof n.result.reviewPageFields == "string" ? JSON.parse(n.result.reviewPageFields) : n.result.reviewPageFields;
987
+ Array.isArray(o) && o.length > 0 && (l.reviewPageFields = o);
987
988
  } catch {
988
989
  }
989
- if (a.result.reviewPageDisabled && (r.reviewPageDisabled = !0), a.result.fieldLabelMode === "placeholder" && (r.fieldLabelMode = "placeholder"), a.result.companyFormVisibleFields && a.result.companyFormVisibleFields.length > 0 && (r.companyFormVisibleFields = a.result.companyFormVisibleFields), a.result.companyFormRequiredFields && a.result.companyFormRequiredFields.length > 0 && (r.companyFormRequiredFields = a.result.companyFormRequiredFields), a.result.companyFormPages)
990
+ if (n.result.reviewPageDisabled && (l.reviewPageDisabled = !0), n.result.fieldLabelMode === "placeholder" && (l.fieldLabelMode = "placeholder"), n.result.companyFormVisibleFields && n.result.companyFormVisibleFields.length > 0 && (l.companyFormVisibleFields = n.result.companyFormVisibleFields), n.result.companyFormRequiredFields && n.result.companyFormRequiredFields.length > 0 && (l.companyFormRequiredFields = n.result.companyFormRequiredFields), n.result.companyFormPages)
990
991
  try {
991
- const n = typeof a.result.companyFormPages == "string" ? JSON.parse(a.result.companyFormPages) : a.result.companyFormPages;
992
- Array.isArray(n) && n.length > 0 && (r.companyFormPages = n.map((c) => {
993
- const o = !c._v || c._v < 4;
992
+ const o = typeof n.result.companyFormPages == "string" ? JSON.parse(n.result.companyFormPages) : n.result.companyFormPages;
993
+ Array.isArray(o) && o.length > 0 && (l.companyFormPages = o.map((g) => {
994
+ const m = !g._v || g._v < 4;
994
995
  return {
995
- ...c,
996
- fields: (c.fields || []).map((g) => ({
997
- ...g,
998
- colSpan: o ? g.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, g.colSpan ?? 4))
996
+ ...g,
997
+ fields: (g.fields || []).map((d) => ({
998
+ ...d,
999
+ colSpan: m ? d.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, d.colSpan ?? 4))
999
1000
  }))
1000
1001
  };
1001
1002
  }));
1002
1003
  } catch {
1003
1004
  }
1004
- if (a.result.companyReviewPageFields)
1005
+ if (n.result.companyReviewPageFields)
1005
1006
  try {
1006
- const n = typeof a.result.companyReviewPageFields == "string" ? JSON.parse(a.result.companyReviewPageFields) : a.result.companyReviewPageFields;
1007
- Array.isArray(n) && n.length > 0 && (r.companyReviewPageFields = n);
1007
+ const o = typeof n.result.companyReviewPageFields == "string" ? JSON.parse(n.result.companyReviewPageFields) : n.result.companyReviewPageFields;
1008
+ Array.isArray(o) && o.length > 0 && (l.companyReviewPageFields = o);
1008
1009
  } catch {
1009
1010
  }
1010
- return r;
1011
- } catch (a) {
1012
- return console.warn("[ThemeService] Failed to fetch theme configuration:", a), yt(De.Default);
1011
+ return l;
1012
+ } catch (r) {
1013
+ return console.warn("[ThemeService] Failed to fetch theme configuration:", r), yt(De.Default);
1013
1014
  }
1014
1015
  }
1015
1016
  /**
@@ -1090,8 +1091,8 @@ class Gi {
1090
1091
  r && r.forEach((n) => {
1091
1092
  try {
1092
1093
  n(a);
1093
- } catch (c) {
1094
- console.error(`Error in event listener for "${t}":`, c);
1094
+ } catch (l) {
1095
+ console.error(`Error in event listener for "${t}":`, l);
1095
1096
  }
1096
1097
  });
1097
1098
  }
@@ -1290,10 +1291,10 @@ class Xi {
1290
1291
  }
1291
1292
  }
1292
1293
  class Zi {
1293
- constructor(t, a, r, n, c, o, g, m) {
1294
+ constructor(t, a, r, n, l, o, g, m) {
1294
1295
  he(this, "state");
1295
1296
  he(this, "stepRouter");
1296
- this.applicantService = t, this.questionnaireService = a, this.uploadDocumentService = r, this.appropriatenessTestService = n, this.overviewService = c, this.riskScoringService = o, this.investorCategorizationService = m, this.state = new Qi(), this.stepRouter = new Xi(), this.registerStepHandlers();
1297
+ this.applicantService = t, this.questionnaireService = a, this.uploadDocumentService = r, this.appropriatenessTestService = n, this.overviewService = l, this.riskScoringService = o, this.investorCategorizationService = m, this.state = new Qi(), this.stepRouter = new Xi(), this.registerStepHandlers();
1297
1298
  }
1298
1299
  /**
1299
1300
  * Register all step handlers
@@ -1460,7 +1461,7 @@ function _e(e, t) {
1460
1461
  }
1461
1462
  }
1462
1463
  function er() {
1463
- const e = _e("--metakyc-primary", "#2563eb"), t = _e("--metakyc-primary-hover", "#1d4ed8"), a = _e("--metakyc-background", "#ffffff"), r = _e("--metakyc-surface", "#f9fafb"), n = _e("--metakyc-text-primary", "#111827"), c = _e("--metakyc-text-secondary", "#6b7280"), o = _e("--metakyc-text-muted", "#9ca3af"), g = _e("--metakyc-border", "#e5e7eb");
1464
+ const e = _e("--metakyc-primary", "#2563eb"), t = _e("--metakyc-primary-hover", "#1d4ed8"), a = _e("--metakyc-background", "#ffffff"), r = _e("--metakyc-surface", "#f9fafb"), n = _e("--metakyc-text-primary", "#111827"), l = _e("--metakyc-text-secondary", "#6b7280"), o = _e("--metakyc-text-muted", "#9ca3af"), g = _e("--metakyc-border", "#e5e7eb");
1464
1465
  return `
1465
1466
  body, html { font-family: ${_e(
1466
1467
  "--metakyc-font-family",
@@ -1468,7 +1469,7 @@ body, html { font-family: ${_e(
1468
1469
  )} !important; background-color: ${a} !important; }
1469
1470
  p, span, label, div { color: ${n}; }
1470
1471
  h1, h2, h3, h4 { color: ${n}; }
1471
- .step-desc { color: ${c}; }
1472
+ .step-desc { color: ${l}; }
1472
1473
  section.content { background-color: ${r}; color: ${n}; padding: 32px 32px 16px; box-shadow: none; border-radius: 10px; border: 1px solid ${g}; }
1473
1474
  input { color: ${n}; font-weight: 500; outline: none; background-color: ${a}; border: 1px solid ${g}; border-radius: 6px; }
1474
1475
  input:focus { border-color: ${e}; box-shadow: 0 0 0 2px ${e}33; }
@@ -1480,7 +1481,7 @@ button.back:hover { background-color: ${r}; }
1480
1481
  .round-icon { background-color: ${e} !important; background-image: none !important; }
1481
1482
  .upload-item, .document-status { border-color: ${g} !important; }
1482
1483
  select { background-color: ${a}; color: ${n}; border: 1px solid ${g}; border-radius: 6px; }
1483
- .description { color: ${c}; }
1484
+ .description { color: ${l}; }
1484
1485
  .subtitle { color: ${o}; }
1485
1486
  a { color: ${e}; }
1486
1487
  a:hover { color: ${t}; }
@@ -1516,14 +1517,14 @@ class tr {
1516
1517
  }).on("idCheck.onStepCompleted", (n) => {
1517
1518
  console.log("[Sumsub] Step completed:", n);
1518
1519
  }).on("idCheck.applicantStatus", (n) => {
1519
- var c, o;
1520
- console.log("[Sumsub] Applicant status:", n), ((n == null ? void 0 : n.reviewStatus) === "completed" || ((c = n == null ? void 0 : n.reviewResult) == null ? void 0 : c.reviewAnswer) === "GREEN") && ((o = this.completeCallback) == null || o.call(this, n));
1520
+ var l, o;
1521
+ console.log("[Sumsub] Applicant status:", n), ((n == null ? void 0 : n.reviewStatus) === "completed" || ((l = n == null ? void 0 : n.reviewResult) == null ? void 0 : l.reviewAnswer) === "GREEN") && ((o = this.completeCallback) == null || o.call(this, n));
1521
1522
  }).on("idCheck.onError", (n) => {
1522
- var c;
1523
- console.error("[Sumsub] Error:", n), (c = this.errorCallback) == null || c.call(this, n);
1524
- }).onMessage((n, c) => {
1523
+ var l;
1524
+ console.error("[Sumsub] Error:", n), (l = this.errorCallback) == null || l.call(this, n);
1525
+ }).onMessage((n, l) => {
1525
1526
  var o;
1526
- console.log("[Sumsub] Message:", n, c), n === "idCheck.onApplicantSubmitted" && ((o = this.completeCallback) == null || o.call(this, c));
1527
+ console.log("[Sumsub] Message:", n, l), n === "idCheck.onApplicantSubmitted" && ((o = this.completeCallback) == null || o.call(this, l));
1527
1528
  });
1528
1529
  this.sdk = r.build(), this.sdk.launch(`#${t}`);
1529
1530
  }
@@ -1658,8 +1659,8 @@ class rr {
1658
1659
  }, n.onerror = () => {
1659
1660
  a(new Error("Failed to load SardinAI SDK"));
1660
1661
  };
1661
- const c = document.getElementsByTagName("script")[0];
1662
- c && c.parentNode ? c.parentNode.insertBefore(n, c) : document.head.appendChild(n);
1662
+ const l = document.getElementsByTagName("script")[0];
1663
+ l && l.parentNode ? l.parentNode.insertBefore(n, l) : document.head.appendChild(n);
1663
1664
  });
1664
1665
  }
1665
1666
  /**
@@ -1669,7 +1670,7 @@ class rr {
1669
1670
  try {
1670
1671
  if (await this.loadSDK(), !window._Sardine)
1671
1672
  throw new Error("SardinAI SDK not available after loading");
1672
- const t = this.getSardineHost(), { clientId: a, environment: r, flow: n, enableBiometrics: c, enablePortScanning: o } = this.config;
1673
+ const t = this.getSardineHost(), { clientId: a, environment: r, flow: n, enableBiometrics: l, enablePortScanning: o } = this.config;
1673
1674
  this.sardineContext = window._Sardine.createContext({
1674
1675
  clientId: a,
1675
1676
  sessionKey: this.sessionKey,
@@ -1678,7 +1679,7 @@ class rr {
1678
1679
  flow: n || window.location.pathname,
1679
1680
  environment: r || "production",
1680
1681
  parentElement: document.body,
1681
- enableBiometrics: c !== !1,
1682
+ enableBiometrics: l !== !1,
1682
1683
  // Default true
1683
1684
  enablePortScanning: o === !0,
1684
1685
  // Default false
@@ -1712,8 +1713,8 @@ class rr {
1712
1713
  * Add noscript fallback for cases where JS is disabled
1713
1714
  */
1714
1715
  addNoScriptFallback(t) {
1715
- const a = document.createElement("noscript"), r = document.createElement("img"), { clientId: n, flow: c } = this.config;
1716
- r.src = `https://${t}/v1/a.png?clientId=${n}&sessionKey=${this.sessionKey}&flow=${c || "kyc"}&ns=1`, r.style.display = "none", a.appendChild(r), document.body.appendChild(a);
1716
+ const a = document.createElement("noscript"), r = document.createElement("img"), { clientId: n, flow: l } = this.config;
1717
+ r.src = `https://${t}/v1/a.png?clientId=${n}&sessionKey=${this.sessionKey}&flow=${l || "kyc"}&ns=1`, r.style.display = "none", a.appendChild(r), document.body.appendChild(a);
1717
1718
  }
1718
1719
  /**
1719
1720
  * Update configuration (e.g., set userIdHash after login)
@@ -1773,7 +1774,7 @@ class tt {
1773
1774
  * Get provider configuration from API token object
1774
1775
  */
1775
1776
  static parseProviderConfig(t, a, r) {
1776
- var n, c;
1777
+ var n, l;
1777
1778
  switch (t) {
1778
1779
  case qe.Sumsub:
1779
1780
  const o = ((n = r == null ? void 0 : r.identityProviders) == null ? void 0 : n.sumsub) || {};
@@ -1793,7 +1794,7 @@ class tt {
1793
1794
  token: a.token || a.sdkToken
1794
1795
  };
1795
1796
  case qe.SardinAI:
1796
- const g = ((c = r == null ? void 0 : r.identityProviders) == null ? void 0 : c.sardinai) || {};
1797
+ const g = ((l = r == null ? void 0 : r.identityProviders) == null ? void 0 : l.sardinai) || {};
1797
1798
  return {
1798
1799
  clientId: g.clientId || a.clientId,
1799
1800
  sessionKey: g.sessionKey || a.sessionKey,
@@ -6798,8 +6799,8 @@ function Vt(e, t) {
6798
6799
  function ii(e) {
6799
6800
  const t = zt.en;
6800
6801
  return (a, r) => {
6801
- const n = !a.includes("."), c = Ft(e, a) ?? (n ? Vt(e, a) : void 0) ?? Ft(t, a) ?? (n ? Vt(t, a) : void 0) ?? a;
6802
- return wr(c, r);
6802
+ const n = !a.includes("."), l = Ft(e, a) ?? (n ? Vt(e, a) : void 0) ?? Ft(t, a) ?? (n ? Vt(t, a) : void 0) ?? a;
6803
+ return wr(l, r);
6803
6804
  };
6804
6805
  }
6805
6806
  const Sr = /^t\(['"](.+?)['"]\)$/, Bt = "$t:";
@@ -6811,7 +6812,7 @@ function G(e, t) {
6811
6812
  const r = Sr.exec(a);
6812
6813
  return r ? t(r[1]) : e;
6813
6814
  }
6814
- const ri = "1.0.51", ai = Zt(null), qt = `metakyc-translations-${ri}-`, Cr = ({
6815
+ const ri = "1.0.52", ai = Zt(null), qt = `metakyc-translations-${ri}-`, Cr = ({
6815
6816
  locale: e,
6816
6817
  fetchTranslations: t,
6817
6818
  children: a
@@ -6825,7 +6826,7 @@ const ri = "1.0.51", ai = Zt(null), qt = `metakyc-translations-${ri}-`, Cr = ({
6825
6826
  } catch {
6826
6827
  }
6827
6828
  return m;
6828
- }, [r]), [c, o] = S(n);
6829
+ }, [r]), [l, o] = S(n);
6829
6830
  be(() => {
6830
6831
  if (!t) return;
6831
6832
  let m = !1;
@@ -6849,10 +6850,10 @@ const ri = "1.0.51", ai = Zt(null), qt = `metakyc-translations-${ri}-`, Cr = ({
6849
6850
  };
6850
6851
  }, [r, t]);
6851
6852
  const g = Fe(() => ({
6852
- t: ii(c),
6853
+ t: ii(l),
6853
6854
  locale: r,
6854
- dictionary: c
6855
- }), [c, r]);
6855
+ dictionary: l
6856
+ }), [l, r]);
6856
6857
  return /* @__PURE__ */ i(ai.Provider, { value: g, children: a });
6857
6858
  };
6858
6859
  function Ie() {
@@ -6876,7 +6877,7 @@ function Tr() {
6876
6877
  }
6877
6878
  const Wt = "metakyc-theme-cache", Pa = ({ config: e, children: t }) => {
6878
6879
  Tr();
6879
- const [a, r] = S(null), n = Ne.useRef(!1), c = Ne.useRef(!1), o = Fe(() => {
6880
+ const [a, r] = S(null), n = Ne.useRef(!1), l = Ne.useRef(!1), o = Fe(() => {
6880
6881
  const d = new Li(e), y = new Ei(d), v = new Pi(d), z = new Di(d), L = new Mi(d), C = new ji(d), q = new Fi(d), T = new Oi(d), P = new Vi(d), B = new Bi(d), $ = new $i(d), D = new _i(d), K = new ar();
6881
6882
  if (typeof document < "u")
6882
6883
  if (e.theme)
@@ -6919,26 +6920,26 @@ const Wt = "metakyc-theme-cache", Pa = ({ config: e, children: t }) => {
6919
6920
  )
6920
6921
  }), [e, o, a]);
6921
6922
  be(() => ((async () => {
6922
- if (n.current || c.current) {
6923
+ if (n.current || l.current) {
6923
6924
  console.log("[MetaKYC] Theme already loading or loaded, skipping...");
6924
6925
  return;
6925
6926
  }
6926
6927
  n.current = !0;
6927
6928
  try {
6928
6929
  if (e.theme) {
6929
- console.log("[MetaKYC] Applying static theme from config"), o.themeManager.applyTheme(e.theme), r(o.themeManager.getCurrentTheme()), c.current = !0;
6930
+ console.log("[MetaKYC] Applying static theme from config"), o.themeManager.applyTheme(e.theme), r(o.themeManager.getCurrentTheme()), l.current = !0;
6930
6931
  return;
6931
6932
  }
6932
6933
  console.log("[MetaKYC] Fetching theme from backend...");
6933
- const y = await o.themeService.getThemeConfiguration();
6934
- o.themeManager.applyTheme(y), r(o.themeManager.getCurrentTheme()), c.current = !0;
6934
+ const y = await o.themeService.getThemeConfiguration(e.configVersion);
6935
+ o.themeManager.applyTheme(y), r(o.themeManager.getCurrentTheme()), l.current = !0;
6935
6936
  try {
6936
6937
  localStorage.setItem(Wt, JSON.stringify(y));
6937
6938
  } catch {
6938
6939
  }
6939
6940
  console.log("[MetaKYC] Theme loaded and applied", y);
6940
6941
  } catch (y) {
6941
- console.warn("[MetaKYC] Failed to load theme, using default:", y), r(o.themeManager.getCurrentTheme()), c.current = !0;
6942
+ console.warn("[MetaKYC] Failed to load theme, using default:", y), r(o.themeManager.getCurrentTheme()), l.current = !0;
6942
6943
  } finally {
6943
6944
  n.current = !1;
6944
6945
  }
@@ -6990,8 +6991,8 @@ async function Rr(e) {
6990
6991
  return new Promise((t, a) => {
6991
6992
  const r = new FileReader();
6992
6993
  r.readAsDataURL(e), r.onload = () => {
6993
- const c = r.result.split(",")[1];
6994
- t(c);
6994
+ const l = r.result.split(",")[1];
6995
+ t(l);
6995
6996
  }, r.onerror = (n) => a(n);
6996
6997
  });
6997
6998
  }
@@ -7059,7 +7060,7 @@ function Ba() {
7059
7060
  Ir(), Ar();
7060
7061
  }
7061
7062
  function Lr(e) {
7062
- const { createOrchestrator: t, config: a } = Oe(), [r, n] = S(null), [c, o] = S(!1), [g, m] = S(null), d = ue(null), y = e || a.applicantId || void 0;
7063
+ const { createOrchestrator: t, config: a } = Oe(), [r, n] = S(null), [l, o] = S(!1), [g, m] = S(null), d = ue(null), y = e || a.applicantId || void 0;
7063
7064
  be(() => {
7064
7065
  d.current || (d.current = t());
7065
7066
  }, [t]), be(() => {
@@ -7157,7 +7158,7 @@ function Lr(e) {
7157
7158
  workflowKey: r == null ? void 0 : r.workFlowKey,
7158
7159
  nextWorkflowKey: r == null ? void 0 : r.nextWorkflowKey,
7159
7160
  hasWorkflowChanged: $,
7160
- isLoading: c,
7161
+ isLoading: l,
7161
7162
  error: g,
7162
7163
  isComplete: (r == null ? void 0 : r.status) === Ue.Finished,
7163
7164
  isOnHold: (r == null ? void 0 : r.status) === Ue.OnHold,
@@ -7169,7 +7170,7 @@ function Lr(e) {
7169
7170
  };
7170
7171
  }
7171
7172
  function Er(e) {
7172
- const { questionnaireService: t, applicantService: a } = Oe(), [r, n] = S(null), [c, o] = S({}), [g, m] = S(!1), [d, y] = S(!1), [v, z] = S(null), L = ue(!1), C = ue(null), q = ie(async () => {
7173
+ const { questionnaireService: t, applicantService: a } = Oe(), [r, n] = S(null), [l, o] = S({}), [g, m] = S(!1), [d, y] = S(!1), [v, z] = S(null), L = ue(!1), C = ue(null), q = ie(async () => {
7173
7174
  var P, B;
7174
7175
  if (e) {
7175
7176
  if (L.current) {
@@ -7219,7 +7220,7 @@ function Er(e) {
7219
7220
  );
7220
7221
  return {
7221
7222
  questionnaire: r,
7222
- initialAnswers: c,
7223
+ initialAnswers: l,
7223
7224
  isLoading: g,
7224
7225
  isSubmitting: d,
7225
7226
  error: v,
@@ -7228,20 +7229,20 @@ function Er(e) {
7228
7229
  };
7229
7230
  }
7230
7231
  function Pr(e) {
7231
- const { uploadDocumentService: t } = Oe(), [a, r] = S(null), [n, c] = S(!1), [o, g] = S(!1), [m, d] = S(0), [y, v] = S(null), z = ue(!1), L = ue(null), C = ie(async () => {
7232
+ const { uploadDocumentService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, g] = S(!1), [m, d] = S(0), [y, v] = S(null), z = ue(!1), L = ue(null), C = ie(async () => {
7232
7233
  if (e) {
7233
7234
  if (z.current) {
7234
7235
  console.log("[UploadDocument] Load already in progress, skipping...");
7235
7236
  return;
7236
7237
  }
7237
- z.current = !0, c(!0), v(null);
7238
+ z.current = !0, l(!0), v(null);
7238
7239
  try {
7239
7240
  const T = await t.getUploadDocument(e);
7240
7241
  r(T), L.current = e;
7241
7242
  } catch (T) {
7242
7243
  v(T);
7243
7244
  } finally {
7244
- c(!1), z.current = !1;
7245
+ l(!1), z.current = !1;
7245
7246
  }
7246
7247
  }
7247
7248
  }, [e, t]);
@@ -7272,20 +7273,20 @@ function Pr(e) {
7272
7273
  };
7273
7274
  }
7274
7275
  function qa(e) {
7275
- const { appropriatenessTestService: t } = Oe(), [a, r] = S(null), [n, c] = S(!1), [o, g] = S(!1), [m, d] = S(null), [y, v] = S(null), z = ue(!1), L = ue(null), C = ie(async () => {
7276
+ const { appropriatenessTestService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, g] = S(!1), [m, d] = S(null), [y, v] = S(null), z = ue(!1), L = ue(null), C = ie(async () => {
7276
7277
  if (e) {
7277
7278
  if (z.current) {
7278
7279
  console.log("[AppropriatenessTest] Load already in progress, skipping...");
7279
7280
  return;
7280
7281
  }
7281
- z.current = !0, c(!0), d(null);
7282
+ z.current = !0, l(!0), d(null);
7282
7283
  try {
7283
7284
  const T = await t.getAppropriatenessTest(e);
7284
7285
  r(T), L.current = e;
7285
7286
  } catch (T) {
7286
7287
  d(T);
7287
7288
  } finally {
7288
- c(!1), z.current = !1;
7289
+ l(!1), z.current = !1;
7289
7290
  }
7290
7291
  }
7291
7292
  }, [e, t]);
@@ -7317,20 +7318,20 @@ function qa(e) {
7317
7318
  };
7318
7319
  }
7319
7320
  function Dr(e) {
7320
- const { overviewService: t } = Oe(), [a, r] = S(null), [n, c] = S(!1), [o, g] = S(!1), [m, d] = S(null), y = ue(!1), v = ue(null), z = ie(async () => {
7321
+ const { overviewService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, g] = S(!1), [m, d] = S(null), y = ue(!1), v = ue(null), z = ie(async () => {
7321
7322
  if (e) {
7322
7323
  if (y.current) {
7323
7324
  console.log("[Overview] Load already in progress, skipping...");
7324
7325
  return;
7325
7326
  }
7326
- y.current = !0, c(!0), d(null);
7327
+ y.current = !0, l(!0), d(null);
7327
7328
  try {
7328
7329
  const C = await t.getOverviewData(e);
7329
7330
  r(C), v.current = e;
7330
7331
  } catch (C) {
7331
7332
  d(C);
7332
7333
  } finally {
7333
- c(!1), y.current = !1;
7334
+ l(!1), y.current = !1;
7334
7335
  }
7335
7336
  }
7336
7337
  }, [e, t]);
@@ -7361,14 +7362,14 @@ function Dr(e) {
7361
7362
  function Mr(e) {
7362
7363
  const { identityService: t } = Oe(), [a, r] = S(
7363
7364
  null
7364
- ), [n, c] = S(!1), [o, g] = S(null), m = ue(!1), d = ie(
7365
+ ), [n, l] = S(!1), [o, g] = S(null), m = ue(!1), d = ie(
7365
7366
  async (z, L) => {
7366
7367
  if (e) {
7367
7368
  if (m.current) {
7368
7369
  console.log("[Identity] Request already in progress, skipping...");
7369
7370
  return;
7370
7371
  }
7371
- m.current = !0, c(!0), g(null);
7372
+ m.current = !0, l(!0), g(null);
7372
7373
  try {
7373
7374
  const C = {
7374
7375
  applicantId: e,
@@ -7383,7 +7384,7 @@ function Mr(e) {
7383
7384
  } catch (C) {
7384
7385
  throw g(C), C;
7385
7386
  } finally {
7386
- c(!1), m.current = !1;
7387
+ l(!1), m.current = !1;
7387
7388
  }
7388
7389
  }
7389
7390
  },
@@ -7391,7 +7392,7 @@ function Mr(e) {
7391
7392
  ), y = ie(
7392
7393
  async (z, L) => {
7393
7394
  if (e) {
7394
- c(!0), g(null);
7395
+ l(!0), g(null);
7395
7396
  try {
7396
7397
  const C = {
7397
7398
  applicantId: e,
@@ -7403,7 +7404,7 @@ function Mr(e) {
7403
7404
  } catch (C) {
7404
7405
  throw g(C), C;
7405
7406
  } finally {
7406
- c(!1);
7407
+ l(!1);
7407
7408
  }
7408
7409
  }
7409
7410
  },
@@ -7414,7 +7415,7 @@ function Mr(e) {
7414
7415
  console.log("[Identity] Restart already in progress, skipping...");
7415
7416
  return;
7416
7417
  }
7417
- m.current = !0, c(!0), g(null);
7418
+ m.current = !0, l(!0), g(null);
7418
7419
  try {
7419
7420
  const z = {
7420
7421
  applicantId: e,
@@ -7429,7 +7430,7 @@ function Mr(e) {
7429
7430
  } catch (z) {
7430
7431
  throw g(z), z;
7431
7432
  } finally {
7432
- c(!1), m.current = !1;
7433
+ l(!1), m.current = !1;
7433
7434
  }
7434
7435
  }
7435
7436
  }, [e, t]);
@@ -7445,7 +7446,7 @@ function Mr(e) {
7445
7446
  };
7446
7447
  }
7447
7448
  function jr(e) {
7448
- const { riskScoringService: t, applicantService: a } = Oe(), [r, n] = S(null), [c, o] = S({}), [g, m] = S(!1), [d, y] = S(!1), [v, z] = S(null), [L, C] = S(null), q = ue(!1), T = ue(null), P = ie(async () => {
7449
+ const { riskScoringService: t, applicantService: a } = Oe(), [r, n] = S(null), [l, o] = S({}), [g, m] = S(!1), [d, y] = S(!1), [v, z] = S(null), [L, C] = S(null), q = ue(!1), T = ue(null), P = ie(async () => {
7449
7450
  var $;
7450
7451
  if (e) {
7451
7452
  if (q.current) {
@@ -7496,7 +7497,7 @@ function jr(e) {
7496
7497
  );
7497
7498
  return {
7498
7499
  criteria: r,
7499
- initialAnswers: c,
7500
+ initialAnswers: l,
7500
7501
  result: L,
7501
7502
  isLoading: g,
7502
7503
  isSubmitting: d,
@@ -7506,7 +7507,7 @@ function jr(e) {
7506
7507
  };
7507
7508
  }
7508
7509
  function oi() {
7509
- const { applicantService: e, config: t } = Oe(), [a, r] = S(!1), [n, c] = S(null), o = ue(!1), g = ue(!1), m = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(L) {
7510
+ const { applicantService: e, config: t } = Oe(), [a, r] = S(!1), [n, l] = S(null), o = ue(!1), g = ue(!1), m = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(L) {
7510
7511
  const C = Math.random() * 16 | 0;
7511
7512
  return (L === "x" ? C : C & 3 | 8).toString(16);
7512
7513
  }), d = ie(
@@ -7514,7 +7515,7 @@ function oi() {
7514
7515
  var C;
7515
7516
  if (o.current)
7516
7517
  throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
7517
- o.current = !0, r(!0), c(null);
7518
+ o.current = !0, r(!0), l(null);
7518
7519
  try {
7519
7520
  if (L.applicantAdditionalDatas || (L.applicantAdditionalDatas = []), (C = t.identityProviders) != null && C.sardinai) {
7520
7521
  const T = m();
@@ -7525,7 +7526,7 @@ function oi() {
7525
7526
  }
7526
7527
  return await e.createApplicant(L);
7527
7528
  } catch (q) {
7528
- throw c(q), q;
7529
+ throw l(q), q;
7529
7530
  } finally {
7530
7531
  r(!1), o.current = !1;
7531
7532
  }
@@ -7533,11 +7534,11 @@ function oi() {
7533
7534
  [e, t]
7534
7535
  ), y = ie(
7535
7536
  async (L) => {
7536
- r(!0), c(null);
7537
+ r(!0), l(null);
7537
7538
  try {
7538
7539
  return await e.createCompanyApplicant(L);
7539
7540
  } catch (C) {
7540
- throw c(C), C;
7541
+ throw l(C), C;
7541
7542
  } finally {
7542
7543
  r(!1);
7543
7544
  }
@@ -7547,11 +7548,11 @@ function oi() {
7547
7548
  async (L) => {
7548
7549
  if (g.current)
7549
7550
  throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
7550
- g.current = !0, r(!0), c(null);
7551
+ g.current = !0, r(!0), l(null);
7551
7552
  try {
7552
7553
  return await e.getApplicantData(L);
7553
7554
  } catch (C) {
7554
- throw c(C), C;
7555
+ throw l(C), C;
7555
7556
  } finally {
7556
7557
  r(!1), g.current = !1;
7557
7558
  }
@@ -7559,11 +7560,11 @@ function oi() {
7559
7560
  [e]
7560
7561
  ), z = ie(
7561
7562
  async (L) => {
7562
- r(!0), c(null);
7563
+ r(!0), l(null);
7563
7564
  try {
7564
7565
  await e.stopProgress(L);
7565
7566
  } catch (C) {
7566
- throw c(C), C;
7567
+ throw l(C), C;
7567
7568
  } finally {
7568
7569
  r(!1);
7569
7570
  }
@@ -7611,7 +7612,7 @@ const Fr = {
7611
7612
  size: a = "md",
7612
7613
  isLoading: r = !1,
7613
7614
  disabled: n,
7614
- className: c,
7615
+ className: l,
7615
7616
  style: o,
7616
7617
  ...g
7617
7618
  }) => {
@@ -7627,7 +7628,7 @@ const Fr = {
7627
7628
  return /* @__PURE__ */ s(
7628
7629
  "button",
7629
7630
  {
7630
- className: Me(m, d[a], c),
7631
+ className: Me(m, d[a], l),
7631
7632
  style: {
7632
7633
  display: "inline-flex",
7633
7634
  alignItems: "center",
@@ -7681,7 +7682,7 @@ const Fr = {
7681
7682
  }
7682
7683
  );
7683
7684
  }, Ce = kt(
7684
- ({ label: e, error: t, helperText: a, leftIcon: r, rightIcon: n, className: c, style: o, ...g }, m) => /* @__PURE__ */ s("div", { className: "w-full", children: [
7685
+ ({ label: e, error: t, helperText: a, leftIcon: r, rightIcon: n, className: l, style: o, ...g }, m) => /* @__PURE__ */ s("div", { className: "w-full", children: [
7685
7686
  e && /* @__PURE__ */ s(
7686
7687
  "label",
7687
7688
  {
@@ -7705,7 +7706,7 @@ const Fr = {
7705
7706
  "disabled:opacity-60 disabled:cursor-not-allowed",
7706
7707
  r ? "pl-10" : "",
7707
7708
  n ? "pr-10" : "",
7708
- c
7709
+ l
7709
7710
  ),
7710
7711
  style: {
7711
7712
  minHeight: "38px",
@@ -7799,7 +7800,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
7799
7800
  margin: 0,
7800
7801
  verticalAlign: "middle"
7801
7802
  }, We = ({ checked: e, onChange: t, disabled: a, style: r }) => {
7802
- const n = "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))", c = "var(--metakyc-input-bg, var(--metakyc-background, #ffffff))", o = "var(--metakyc-primary, #2563eb)";
7803
+ const n = "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))", l = "var(--metakyc-input-bg, var(--metakyc-background, #ffffff))", o = "var(--metakyc-primary, #2563eb)";
7803
7804
  return /* @__PURE__ */ i(
7804
7805
  "span",
7805
7806
  {
@@ -7814,7 +7815,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
7814
7815
  },
7815
7816
  style: {
7816
7817
  ...Or,
7817
- backgroundColor: e ? o : c,
7818
+ backgroundColor: e ? o : l,
7818
7819
  borderColor: e ? o : n,
7819
7820
  opacity: a ? 0.5 : 1,
7820
7821
  cursor: a ? "not-allowed" : "pointer",
@@ -7914,7 +7915,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
7914
7915
  }
7915
7916
  ) });
7916
7917
  }, Et = kt(
7917
- ({ label: e, error: t, helperText: a, options: r, placeholder: n, className: c, style: o, ...g }, m) => /* @__PURE__ */ s("div", { className: "w-full", children: [
7918
+ ({ label: e, error: t, helperText: a, options: r, placeholder: n, className: l, style: o, ...g }, m) => /* @__PURE__ */ s("div", { className: "w-full", children: [
7918
7919
  e && /* @__PURE__ */ s(
7919
7920
  "label",
7920
7921
  {
@@ -7935,7 +7936,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
7935
7936
  "focus:outline-none focus:ring-2 focus:ring-offset-0",
7936
7937
  "disabled:opacity-60 disabled:cursor-not-allowed",
7937
7938
  t ? "border-danger-500" : "",
7938
- c
7939
+ l
7939
7940
  ),
7940
7941
  style: {
7941
7942
  minHeight: "38px",
@@ -7986,11 +7987,11 @@ const Kt = 280, Br = ({
7986
7987
  onChange: a,
7987
7988
  options: r,
7988
7989
  placeholder: n,
7989
- disabled: c = !1,
7990
+ disabled: l = !1,
7990
7991
  readOnly: o = !1,
7991
7992
  required: g = !1
7992
7993
  }) => {
7993
- const { t: m } = Ie(), d = n ?? m("common.select"), y = c || o, [v, z] = S(!1), [L, C] = S(""), [q, T] = S(null), [P, B] = S({
7994
+ const { t: m } = Ie(), d = n ?? m("common.select"), y = l || o, [v, z] = S(!1), [L, C] = S(""), [q, T] = S(null), [P, B] = S({
7994
7995
  bg: "#ffffff",
7995
7996
  borderColor: "#d1d5db",
7996
7997
  textPrimary: "#111827",
@@ -8254,7 +8255,7 @@ const Kt = 280, Br = ({
8254
8255
  helperText: a,
8255
8256
  options: r,
8256
8257
  placeholder: n,
8257
- value: c,
8258
+ value: l,
8258
8259
  onChange: o,
8259
8260
  disabled: g = !1,
8260
8261
  readOnly: m = !1,
@@ -8323,7 +8324,7 @@ const Kt = 280, Br = ({
8323
8324
  }, [C]);
8324
8325
  const ce = r.filter(
8325
8326
  (M) => M.label.toLowerCase().includes(T.toLowerCase()) || M.value.toLowerCase().includes(T.toLowerCase())
8326
- ), Y = (de = r.find((M) => M.value === c)) == null ? void 0 : de.label, je = (M, _) => {
8327
+ ), Y = (de = r.find((M) => M.value === l)) == null ? void 0 : de.label, je = (M, _) => {
8327
8328
  L || _ || (o(M), U());
8328
8329
  }, { bg: ye, border: fe, text: Se, textSecondary: pe, primary: j, primaryLight: E, hoverBg: O } = D, xe = C && B && /* @__PURE__ */ s(
8329
8330
  "div",
@@ -8386,7 +8387,7 @@ const Kt = 280, Br = ({
8386
8387
  overflowY: "auto"
8387
8388
  },
8388
8389
  children: ce.length === 0 ? /* @__PURE__ */ i("li", { style: { padding: "8px 12px", fontSize: "13px", color: pe }, children: v("common.noResults") }) : ce.map((M) => {
8389
- const _ = M.value === c;
8390
+ const _ = M.value === l;
8390
8391
  return /* @__PURE__ */ i(
8391
8392
  "li",
8392
8393
  {
@@ -8490,7 +8491,7 @@ const Ur = ({
8490
8491
  error: a,
8491
8492
  accept: r,
8492
8493
  multiple: n = !1,
8493
- maxSize: c,
8494
+ maxSize: l,
8494
8495
  required: o,
8495
8496
  onChange: g,
8496
8497
  value: m = [],
@@ -8500,12 +8501,12 @@ const Ur = ({
8500
8501
  if (!b) return;
8501
8502
  C(null);
8502
8503
  const R = Array.from(b);
8503
- if (c && R.filter((Q) => Q.size > c).length > 0) {
8504
- C(`File exceeds the maximum size of ${Ct(c)}`);
8504
+ if (l && R.filter((Q) => Q.size > l).length > 0) {
8505
+ C(`File exceeds the maximum size of ${Ct(l)}`);
8505
8506
  return;
8506
8507
  }
8507
8508
  g == null || g(n ? [...m, ...R] : [R[0]]);
8508
- }, [c, n, g, m]), P = ie((b) => {
8509
+ }, [l, n, g, m]), P = ie((b) => {
8509
8510
  b.preventDefault(), b.stopPropagation(), z(!0);
8510
8511
  }, []), B = ie((b) => {
8511
8512
  b.preventDefault(), b.stopPropagation(), z(!1);
@@ -8610,10 +8611,10 @@ const Ur = ({
8610
8611
  " ",
8611
8612
  y("uploadDocument.orDragDrop")
8612
8613
  ] }),
8613
- (r || c) && /* @__PURE__ */ s("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "4px" }, children: [
8614
+ (r || l) && /* @__PURE__ */ s("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "4px" }, children: [
8614
8615
  r && /* @__PURE__ */ i("span", { children: r }),
8615
- r && c && /* @__PURE__ */ i("span", { children: " · " }),
8616
- c && /* @__PURE__ */ i("span", { children: y("uploadDocument.maxSize", { size: Ct(c) }) })
8616
+ r && l && /* @__PURE__ */ i("span", { children: " · " }),
8617
+ l && /* @__PURE__ */ i("span", { children: y("uploadDocument.maxSize", { size: Ct(l) }) })
8617
8618
  ] })
8618
8619
  ] })
8619
8620
  ] })
@@ -8742,7 +8743,7 @@ const Ur = ({
8742
8743
  {
8743
8744
  type: "text",
8744
8745
  value: e,
8745
- onChange: (c) => t == null ? void 0 : t(c.target.value),
8746
+ onChange: (l) => t == null ? void 0 : t(l.target.value),
8746
8747
  className: Me(
8747
8748
  "w-20 rounded-lg border px-3 py-2 text-sm",
8748
8749
  "focus:outline-none focus:ring-2 focus:ring-offset-0"
@@ -8847,7 +8848,7 @@ const _r = kt(
8847
8848
  strokeWidth: a = 2,
8848
8849
  absoluteStrokeWidth: r,
8849
8850
  className: n = "",
8850
- children: c,
8851
+ children: l,
8851
8852
  iconNode: o,
8852
8853
  ...g
8853
8854
  }, m) => It(
@@ -8860,12 +8861,12 @@ const _r = kt(
8860
8861
  stroke: e,
8861
8862
  strokeWidth: r ? Number(a) * 24 / Number(t) : a,
8862
8863
  className: li("lucide", n),
8863
- ...!c && !$r(g) && { "aria-hidden": "true" },
8864
+ ...!l && !$r(g) && { "aria-hidden": "true" },
8864
8865
  ...g
8865
8866
  },
8866
8867
  [
8867
8868
  ...o.map(([d, y]) => It(d, y)),
8868
- ...Array.isArray(c) ? c : [c]
8869
+ ...Array.isArray(l) ? l : [l]
8869
8870
  ]
8870
8871
  )
8871
8872
  );
@@ -8877,8 +8878,8 @@ const _r = kt(
8877
8878
  */
8878
8879
  const ci = (e, t) => {
8879
8880
  const a = kt(
8880
- ({ className: r, ...n }, c) => It(_r, {
8881
- ref: c,
8881
+ ({ className: r, ...n }, l) => It(_r, {
8882
+ ref: l,
8882
8883
  iconNode: t,
8883
8884
  className: li(
8884
8885
  `lucide-${Kr(Ht(e))}`,
@@ -8935,7 +8936,7 @@ function Xr(e, t) {
8935
8936
  }
8936
8937
  function Zr(e) {
8937
8938
  const t = e.flatMap(
8938
- (r, n) => (r.questions ?? []).map((c, o) => ({ question: c, groupIndex: n, qIdx: o }))
8939
+ (r, n) => (r.questions ?? []).map((l, o) => ({ question: l, groupIndex: n, qIdx: o }))
8939
8940
  ), a = /* @__PURE__ */ new Map();
8940
8941
  for (const r of t) {
8941
8942
  const n = r.question.pageNumber != null && r.question.pageNumber > 0 ? r.question.pageNumber : 1;
@@ -8948,10 +8949,10 @@ const Jr = ({
8948
8949
  onComplete: t,
8949
8950
  onBack: a
8950
8951
  }) => {
8951
- const { t: r } = Ie(), { questionnaire: n, initialAnswers: c, isLoading: o, isSubmitting: g, error: m, submit: d } = Er(e), [y, v] = S({}), [z, L] = S({}), [C, q] = S(0);
8952
+ const { t: r } = Ie(), { questionnaire: n, initialAnswers: l, isLoading: o, isSubmitting: g, error: m, submit: d } = Er(e), [y, v] = S({}), [z, L] = S({}), [C, q] = S(0);
8952
8953
  Ne.useEffect(() => {
8953
- c && Object.keys(c).length > 0 && Object.keys(y).length === 0 && v(c);
8954
- }, [c]);
8954
+ l && Object.keys(l).length > 0 && Object.keys(y).length === 0 && v(l);
8955
+ }, [l]);
8955
8956
  const T = Fe(
8956
8957
  () => n ? Zr(n.questionGroups) : [],
8957
8958
  [n]
@@ -9169,7 +9170,7 @@ const ia = ({
9169
9170
  onComplete: t,
9170
9171
  onBack: a
9171
9172
  }) => {
9172
- const { t: r } = Ie(), { uploadDocument: n, isLoading: c, isSubmitting: o, error: g, submit: m } = Pr(e), [d, y] = S({}), [v, z] = S(null), [L, C] = S(0), [q, T] = S({}), P = Fe(
9173
+ const { t: r } = Ie(), { uploadDocument: n, isLoading: l, isSubmitting: o, error: g, submit: m } = Pr(e), [d, y] = S({}), [v, z] = S(null), [L, C] = S(0), [q, T] = S({}), P = Fe(
9173
9174
  () => n ? ta(n.uploadDocumentFiles) : [],
9174
9175
  [n]
9175
9176
  ), B = P[L] ?? [], $ = L === P.length - 1, D = P.length, K = ie(() => {
@@ -9209,7 +9210,7 @@ const ia = ({
9209
9210
  }
9210
9211
  }
9211
9212
  };
9212
- return c ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
9213
+ return l ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
9213
9214
  /* @__PURE__ */ i(Be, { className: "my-8" }),
9214
9215
  /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("uploadDocument.loading") })
9215
9216
  ] }) }) }) : g ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: {
@@ -9377,10 +9378,10 @@ const ia = ({
9377
9378
  ] }) })
9378
9379
  ] }) : null;
9379
9380
  }, ra = ({ applicantId: e, onComplete: t, onBack: a }) => {
9380
- const { t: r } = Ie(), { overview: n, isLoading: c, isSubmitting: o, error: g, passOverview: m } = Dr(e), d = async () => {
9381
+ const { t: r } = Ie(), { overview: n, isLoading: l, isSubmitting: o, error: g, passOverview: m } = Dr(e), d = async () => {
9381
9382
  await m(), t == null || t();
9382
9383
  };
9383
- return c ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(Be, { className: "my-8" }) }) }) : g ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
9384
+ return l ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(Be, { className: "my-8" }) }) }) : g ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
9384
9385
  r("overview.errorLoading"),
9385
9386
  " ",
9386
9387
  g.message
@@ -9456,11 +9457,11 @@ function sa(e, t) {
9456
9457
  }
9457
9458
  const n = e.valueDataType === Qe.Integer || e.valueDataType === Qe.Money || e.valueDataType === Qe.DigitOnly;
9458
9459
  if (n && r.trim() !== "") {
9459
- const c = Number(r);
9460
- if (!isNaN(c)) {
9461
- if (e.min !== void 0 && e.min !== null && c < e.min)
9460
+ const l = Number(r);
9461
+ if (!isNaN(l)) {
9462
+ if (e.min !== void 0 && e.min !== null && l < e.min)
9462
9463
  return `Minimum value is ${e.min}`;
9463
- if (e.max !== void 0 && e.max !== null && c > e.max)
9464
+ if (e.max !== void 0 && e.max !== null && l > e.max)
9464
9465
  return `Maximum value is ${e.max}`;
9465
9466
  }
9466
9467
  } else if (!n && r !== "") {
@@ -9487,7 +9488,7 @@ const da = ({
9487
9488
  onComplete: t,
9488
9489
  onBack: a
9489
9490
  }) => {
9490
- const { t: r } = Ie(), { config: n } = Oe(), c = n.locale ?? "en", { criteria: o, initialAnswers: g, isLoading: m, isSubmitting: d, error: y, submit: v } = jr(e), [z, L] = S({}), [C, q] = S({}), [T, P] = S(0), [B, $] = S(!1);
9491
+ const { t: r } = Ie(), { config: n } = Oe(), l = n.locale ?? "en", { criteria: o, initialAnswers: g, isLoading: m, isSubmitting: d, error: y, submit: v } = jr(e), [z, L] = S({}), [C, q] = S({}), [T, P] = S(0), [B, $] = S(!1);
9491
9492
  Ne.useEffect(() => {
9492
9493
  g && Object.keys(g).length > 0 && Object.keys(z).length === 0 && L(g);
9493
9494
  }, [g]);
@@ -9562,7 +9563,7 @@ const da = ({
9562
9563
  criterion: ee,
9563
9564
  value: z[ee.id] ?? [],
9564
9565
  error: C[ee.id],
9565
- locale: c,
9566
+ locale: l,
9566
9567
  onChange: (U) => re(ee.id, U)
9567
9568
  },
9568
9569
  ee.id
@@ -9600,21 +9601,21 @@ const da = ({
9600
9601
  }, children: /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: y.message }) })
9601
9602
  ] }) : null;
9602
9603
  }, ma = ({ criterion: e, value: t, error: a, locale: r, onChange: n }) => {
9603
- const { t: c } = Ie(), o = ca(e), g = e.valueDataType === Qe.Integer || e.valueDataType === Qe.Money || e.valueDataType === Qe.DigitOnly, m = na(e), d = (y) => m ? oa(y, r) : y;
9604
+ const { t: l } = Ie(), o = ca(e), g = e.valueDataType === Qe.Integer || e.valueDataType === Qe.Money || e.valueDataType === Qe.DigitOnly, m = na(e), d = (y) => m ? oa(y, r) : y;
9604
9605
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
9605
9606
  /* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
9606
9607
  e.displayName,
9607
9608
  e.isRequired && /* @__PURE__ */ i("span", { className: "text-danger-500 ml-1", children: "*" })
9608
9609
  ] }),
9609
9610
  e.description && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: e.description }),
9610
- g && (e.min !== void 0 || e.max !== void 0) && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: e.min !== void 0 && e.max !== void 0 ? c("riskScoring.range", { min: e.min, max: e.max }) : e.min !== void 0 ? c("riskScoring.minimum", { min: e.min }) : c("riskScoring.maximum", { max: e.max }) }),
9611
+ g && (e.min !== void 0 || e.max !== void 0) && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: e.min !== void 0 && e.max !== void 0 ? l("riskScoring.range", { min: e.min, max: e.max }) : e.min !== void 0 ? l("riskScoring.minimum", { min: e.min }) : l("riskScoring.maximum", { max: e.max }) }),
9611
9612
  o === "text" && /* @__PURE__ */ i(
9612
9613
  Ce,
9613
9614
  {
9614
9615
  value: t[0] ?? "",
9615
9616
  onChange: (y) => n([y.target.value]),
9616
9617
  type: g ? "number" : "text",
9617
- placeholder: c("placeholders.enterAnswer"),
9618
+ placeholder: l("placeholders.enterAnswer"),
9618
9619
  error: a,
9619
9620
  required: e.isRequired,
9620
9621
  min: e.min,
@@ -9695,7 +9696,7 @@ const da = ({
9695
9696
  { value: "FR", label: "France" },
9696
9697
  { value: "AE", label: "United Arab Emirates" }
9697
9698
  ],
9698
- placeholder: c("placeholders.selectCountry"),
9699
+ placeholder: l("placeholders.selectCountry"),
9699
9700
  error: a,
9700
9701
  required: e.isRequired
9701
9702
  }
@@ -9706,9 +9707,9 @@ const da = ({
9706
9707
  onComplete: t,
9707
9708
  onBack: a
9708
9709
  }) => {
9709
- const { t: r } = Ie(), { investorCategorizationService: n } = Oe(), [c, o] = S(null), [g, m] = S(!1), [d, y] = S(null);
9710
+ const { t: r } = Ie(), { investorCategorizationService: n } = Oe(), [l, o] = S(null), [g, m] = S(!1), [d, y] = S(null);
9710
9711
  return /* @__PURE__ */ i("form", { onSubmit: async (z) => {
9711
- if (z.preventDefault(), c === null) {
9712
+ if (z.preventDefault(), l === null) {
9712
9713
  y(r("investorCategorization.pleaseSelect"));
9713
9714
  return;
9714
9715
  }
@@ -9716,7 +9717,7 @@ const da = ({
9716
9717
  try {
9717
9718
  const L = {
9718
9719
  applicantId: e,
9719
- investorType: c
9720
+ investorType: l
9720
9721
  };
9721
9722
  console.log("Submitting investor categorization:", L);
9722
9723
  const C = await n.setInvestorCategorization(L);
@@ -9738,8 +9739,8 @@ const da = ({
9738
9739
  {
9739
9740
  className: "block p-4 border-2 rounded-lg cursor-pointer transition-all",
9740
9741
  style: {
9741
- borderColor: c === Ee.Individual ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)",
9742
- backgroundColor: c === Ee.Individual ? "var(--metakyc-primary-light, #dbeafe)" : "transparent"
9742
+ borderColor: l === Ee.Individual ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)",
9743
+ backgroundColor: l === Ee.Individual ? "var(--metakyc-primary-light, #dbeafe)" : "transparent"
9743
9744
  },
9744
9745
  children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
9745
9746
  /* @__PURE__ */ i(
@@ -9748,7 +9749,7 @@ const da = ({
9748
9749
  type: "radio",
9749
9750
  name: "investorType",
9750
9751
  value: Ee.Individual,
9751
- checked: c === Ee.Individual,
9752
+ checked: l === Ee.Individual,
9752
9753
  onChange: () => o(Ee.Individual),
9753
9754
  className: "mt-1"
9754
9755
  }
@@ -9765,8 +9766,8 @@ const da = ({
9765
9766
  {
9766
9767
  className: "block p-4 border-2 rounded-lg cursor-pointer transition-all",
9767
9768
  style: {
9768
- borderColor: c === Ee.Sophisticated ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)",
9769
- backgroundColor: c === Ee.Sophisticated ? "var(--metakyc-primary-light, #dbeafe)" : "transparent"
9769
+ borderColor: l === Ee.Sophisticated ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)",
9770
+ backgroundColor: l === Ee.Sophisticated ? "var(--metakyc-primary-light, #dbeafe)" : "transparent"
9770
9771
  },
9771
9772
  children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
9772
9773
  /* @__PURE__ */ i(
@@ -9775,7 +9776,7 @@ const da = ({
9775
9776
  type: "radio",
9776
9777
  name: "investorType",
9777
9778
  value: Ee.Sophisticated,
9778
- checked: c === Ee.Sophisticated,
9779
+ checked: l === Ee.Sophisticated,
9779
9780
  onChange: () => o(Ee.Sophisticated),
9780
9781
  className: "mt-1"
9781
9782
  }
@@ -9792,8 +9793,8 @@ const da = ({
9792
9793
  {
9793
9794
  className: "block p-4 border-2 rounded-lg cursor-pointer transition-all",
9794
9795
  style: {
9795
- borderColor: c === Ee.HighNetWorth ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)",
9796
- backgroundColor: c === Ee.HighNetWorth ? "var(--metakyc-primary-light, #dbeafe)" : "transparent"
9796
+ borderColor: l === Ee.HighNetWorth ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)",
9797
+ backgroundColor: l === Ee.HighNetWorth ? "var(--metakyc-primary-light, #dbeafe)" : "transparent"
9797
9798
  },
9798
9799
  children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
9799
9800
  /* @__PURE__ */ i(
@@ -9802,7 +9803,7 @@ const da = ({
9802
9803
  type: "radio",
9803
9804
  name: "investorType",
9804
9805
  value: Ee.HighNetWorth,
9805
- checked: c === Ee.HighNetWorth,
9806
+ checked: l === Ee.HighNetWorth,
9806
9807
  onChange: () => o(Ee.HighNetWorth),
9807
9808
  className: "mt-1"
9808
9809
  }
@@ -9827,7 +9828,7 @@ const da = ({
9827
9828
  {
9828
9829
  type: "submit",
9829
9830
  isLoading: g,
9830
- disabled: c === null,
9831
+ disabled: l === null,
9831
9832
  children: r("common.submit")
9832
9833
  }
9833
9834
  )
@@ -9847,7 +9848,7 @@ const pa = ({
9847
9848
  onComplete: t,
9848
9849
  onBack: a
9849
9850
  }) => {
9850
- const { t: r } = Ie(), { appropriatenessTestService: n } = Oe(), [c, o] = S(null), [g, m] = S(!0), [d, y] = S(!1), [v, z] = S(null), [L, C] = S({}), [q, T] = S(0), [P, B] = S(!1), [$, D] = S(!1), [K, J] = S(0), [re, b] = S(0), [R, V] = S(null);
9851
+ const { t: r } = Ie(), { appropriatenessTestService: n } = Oe(), [l, o] = S(null), [g, m] = S(!0), [d, y] = S(!1), [v, z] = S(null), [L, C] = S({}), [q, T] = S(0), [P, B] = S(!1), [$, D] = S(!1), [K, J] = S(0), [re, b] = S(0), [R, V] = S(null);
9851
9852
  be(() => {
9852
9853
  (async () => {
9853
9854
  try {
@@ -9879,7 +9880,7 @@ const pa = ({
9879
9880
  $ && !d && X();
9880
9881
  }, [$]);
9881
9882
  const Q = () => {
9882
- c && (B(!0), T(c.testDurationSec), b(0), C({}), z(null));
9883
+ l && (B(!0), T(l.testDurationSec), b(0), C({}), z(null));
9883
9884
  }, ee = (E, O) => {
9884
9885
  C((xe) => ({ ...xe, [E]: O }));
9885
9886
  }, U = ie(async () => {
@@ -9892,9 +9893,9 @@ const pa = ({
9892
9893
  } catch {
9893
9894
  }
9894
9895
  }, [e, n]), X = async (E) => {
9895
- if (c) {
9896
+ if (l) {
9896
9897
  if (!$) {
9897
- const O = c.appropriatenessQuestions.length - Object.keys(L).length;
9898
+ const O = l.appropriatenessQuestions.length - Object.keys(L).length;
9898
9899
  if (O > 0) {
9899
9900
  z(r("appropriatenessTest.answerAllQuestions", { remaining: O }));
9900
9901
  return;
@@ -9902,11 +9903,11 @@ const pa = ({
9902
9903
  }
9903
9904
  y(!0), z(null);
9904
9905
  try {
9905
- const O = c.appropriatenessQuestions.map(
9906
+ const O = l.appropriatenessQuestions.map(
9906
9907
  (de) => ({ appropriatenessQuestionId: de.id, value: L[de.id] || "" })
9907
9908
  ), xe = {
9908
9909
  applicantId: e,
9909
- appropriatenessTestId: c.id,
9910
+ appropriatenessTestId: l.id,
9910
9911
  appropriatenessQuestionResults: O
9911
9912
  };
9912
9913
  try {
@@ -9932,15 +9933,15 @@ const pa = ({
9932
9933
  /* @__PURE__ */ i(Be, { className: "my-8" }),
9933
9934
  /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("appropriatenessTest.loadingTest") })
9934
9935
  ] }) }) });
9935
- if (!c)
9936
+ if (!l)
9936
9937
  return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { textAlign: "center", padding: "48px 0" }, children: [
9937
9938
  /* @__PURE__ */ i("p", { style: { fontSize: "16px", fontWeight: 600, color: "var(--metakyc-danger, #ef4444)" }, children: r("appropriatenessTest.noTestData") }),
9938
9939
  v && /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: v })
9939
9940
  ] }) }) });
9940
- const Y = c.testAllowedMaxTry - c.totalFailedTries, je = c.appropriatenessQuestions.length, ye = Object.keys(L).length;
9941
+ const Y = l.testAllowedMaxTry - l.totalFailedTries, je = l.appropriatenessQuestions.length, ye = Object.keys(L).length;
9941
9942
  if (K > 0)
9942
9943
  return /* @__PURE__ */ s(ne, { children: [
9943
- /* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: c.displayName }) }),
9944
+ /* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: l.displayName }) }),
9944
9945
  /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { textAlign: "center", padding: "32px 0" }, children: [
9945
9946
  /* @__PURE__ */ i("div", { style: {
9946
9947
  width: "100px",
@@ -10044,11 +10045,11 @@ const pa = ({
10044
10045
  if (!P)
10045
10046
  return /* @__PURE__ */ s(ne, { children: [
10046
10047
  /* @__PURE__ */ s(Te, { children: [
10047
- /* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: c.displayName }),
10048
- c.subtitle && /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-secondary, #6b7280)", marginTop: "4px" }, children: c.subtitle })
10048
+ /* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: l.displayName }),
10049
+ l.subtitle && /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-secondary, #6b7280)", marginTop: "4px" }, children: l.subtitle })
10049
10050
  ] }),
10050
10051
  /* @__PURE__ */ s(oe, { children: [
10051
- c.description && /* @__PURE__ */ s("div", { style: {
10052
+ l.description && /* @__PURE__ */ s("div", { style: {
10052
10053
  marginBottom: "20px",
10053
10054
  padding: "12px 14px",
10054
10055
  borderRadius: "10px",
@@ -10062,12 +10063,12 @@ const pa = ({
10062
10063
  /* @__PURE__ */ i("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
10063
10064
  /* @__PURE__ */ i("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
10064
10065
  ] }),
10065
- /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-text-secondary, #374151)", margin: 0, lineHeight: 1.5 }, children: c.description })
10066
+ /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-text-secondary, #374151)", margin: 0, lineHeight: 1.5 }, children: l.description })
10066
10067
  ] }),
10067
10068
  /* @__PURE__ */ s("div", { className: "metakyc-grid-2", style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "12px", marginBottom: "20px" }, children: [
10068
- /* @__PURE__ */ i(vt, { icon: "questions", label: r("appropriatenessTest.questions"), value: String(c.totalQuestionCount) }),
10069
- /* @__PURE__ */ i(vt, { icon: "time", label: r("appropriatenessTest.timeLimit"), value: Nt(c.testDurationSec) }),
10070
- /* @__PURE__ */ i(vt, { icon: "target", label: r("appropriatenessTest.passRequirement"), value: r("appropriatenessTest.correct", { count: c.testCorrectAnswerPassLimit }) }),
10069
+ /* @__PURE__ */ i(vt, { icon: "questions", label: r("appropriatenessTest.questions"), value: String(l.totalQuestionCount) }),
10070
+ /* @__PURE__ */ i(vt, { icon: "time", label: r("appropriatenessTest.timeLimit"), value: Nt(l.testDurationSec) }),
10071
+ /* @__PURE__ */ i(vt, { icon: "target", label: r("appropriatenessTest.passRequirement"), value: r("appropriatenessTest.correct", { count: l.testCorrectAnswerPassLimit }) }),
10071
10072
  /* @__PURE__ */ i(
10072
10073
  vt,
10073
10074
  {
@@ -10110,12 +10111,12 @@ const pa = ({
10110
10111
  /* @__PURE__ */ i(Z, { type: "button", onClick: Q, disabled: Y <= 0, children: r("appropriatenessTest.startTest") })
10111
10112
  ] }) })
10112
10113
  ] });
10113
- const fe = c.appropriatenessQuestions[re], Se = re === je - 1, pe = ye === je, j = q <= 60;
10114
+ const fe = l.appropriatenessQuestions[re], Se = re === je - 1, pe = ye === je, j = q <= 60;
10114
10115
  return /* @__PURE__ */ s(ne, { children: [
10115
10116
  /* @__PURE__ */ s(Te, { children: [
10116
10117
  /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
10117
10118
  /* @__PURE__ */ s("div", { children: [
10118
- /* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: c.displayName }),
10119
+ /* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: l.displayName }),
10119
10120
  /* @__PURE__ */ i("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "2px" }, children: r("appropriatenessTest.questionXofY", { current: re + 1, total: je }) })
10120
10121
  ] }),
10121
10122
  /* @__PURE__ */ s("div", { style: {
@@ -10201,7 +10202,7 @@ const pa = ({
10201
10202
  gap: "6px",
10202
10203
  marginTop: "20px",
10203
10204
  flexWrap: "wrap"
10204
- }, children: c.appropriatenessQuestions.map((E, O) => /* @__PURE__ */ i(
10205
+ }, children: l.appropriatenessQuestions.map((E, O) => /* @__PURE__ */ i(
10205
10206
  "button",
10206
10207
  {
10207
10208
  type: "button",
@@ -10349,7 +10350,7 @@ const pa = ({
10349
10350
  lineHeight: 1.5
10350
10351
  }, children: e.question })
10351
10352
  ] }),
10352
- /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: e.answers.map((n, c) => {
10353
+ /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: e.answers.map((n, l) => {
10353
10354
  const o = t === n;
10354
10355
  return /* @__PURE__ */ s(
10355
10356
  "label",
@@ -10409,7 +10410,7 @@ const pa = ({
10409
10410
  }, children: n })
10410
10411
  ]
10411
10412
  },
10412
- c
10413
+ l
10413
10414
  );
10414
10415
  }) })
10415
10416
  ] }), fa = ({
@@ -10418,7 +10419,7 @@ const pa = ({
10418
10419
  onBack: a
10419
10420
  }) => {
10420
10421
  var at, He, dt, Je;
10421
- const { t: r } = Ie(), { applicantService: n, baseInformationService: c, identityService: o, config: g, currentTheme: m } = Oe(), { identityData: d, provider: y, token: v, isLoading: z, error: L, requestIdentity: C, restartIdentity: q } = Mr(e), [T, P] = S(null), [B, $] = S(null), [D, K] = S([]), [J, re] = S([]), [b, R] = S(!0), [V, Q] = S(!1), [ee, U] = S(null), [X, ce] = S(!1), Y = Ne.useRef(!1), [je, ye] = S({}), [fe, Se] = S({}), pe = m != null && m.reviewPageFields && m.reviewPageFields.length > 0 ? m.reviewPageFields[0] : null, j = !!(m != null && m.reviewPageDisabled), E = ue(!1);
10422
+ const { t: r } = Ie(), { applicantService: n, baseInformationService: l, identityService: o, config: g, currentTheme: m } = Oe(), { identityData: d, provider: y, token: v, isLoading: z, error: L, requestIdentity: C, restartIdentity: q } = Mr(e), [T, P] = S(null), [B, $] = S(null), [D, K] = S([]), [J, re] = S([]), [b, R] = S(!0), [V, Q] = S(!1), [ee, U] = S(null), [X, ce] = S(!1), Y = Ne.useRef(!1), [je, ye] = S({}), [fe, Se] = S({}), pe = m != null && m.reviewPageFields && m.reviewPageFields.length > 0 ? m.reviewPageFields[0] : null, j = !!(m != null && m.reviewPageDisabled), E = ue(!1);
10422
10423
  E.current = j;
10423
10424
  const O = yi({
10424
10425
  defaultValues: {
@@ -10440,8 +10441,8 @@ const pa = ({
10440
10441
  try {
10441
10442
  const [F, H, W] = await Promise.all([
10442
10443
  n.getApplicantData(e),
10443
- c.getCountries("", "en"),
10444
- c.getCountries("", "en", 40)
10444
+ l.getCountries("", "en"),
10445
+ l.getCountries("", "en", 40)
10445
10446
  // CountriesType.PhoneNumber
10446
10447
  ]);
10447
10448
  $(F);
@@ -10968,7 +10969,7 @@ const pa = ({
10968
10969
  const p = Array.isArray(te) ? te : te ? [te] : [], I = (x) => {
10969
10970
  k.singleSelect ? Se((u) => ({ ...u, [W]: p[0] === x ? [] : [x] })) : Se((u) => ({
10970
10971
  ...u,
10971
- [W]: p.includes(x) ? p.filter((l) => l !== x) : [...p, x]
10972
+ [W]: p.includes(x) ? p.filter((c) => c !== x) : [...p, x]
10972
10973
  }));
10973
10974
  };
10974
10975
  return /* @__PURE__ */ i("div", { style: le(k.colSpan), children: Ae(
@@ -11028,7 +11029,7 @@ const pa = ({
11028
11029
  {
11029
11030
  label: te,
11030
11031
  value: String(p),
11031
- onChange: (u) => ye((l) => ({ ...l, [H]: u })),
11032
+ onChange: (u) => ye((c) => ({ ...c, [H]: u })),
11032
11033
  options: [{ value: "", label: r("placeholders.selectCountryCode") }, ...J]
11033
11034
  }
11034
11035
  ),
@@ -11039,7 +11040,7 @@ const pa = ({
11039
11040
  {
11040
11041
  label: te,
11041
11042
  value: String(p),
11042
- onChange: (u) => ye((l) => ({ ...l, [H]: u })),
11043
+ onChange: (u) => ye((c) => ({ ...c, [H]: u })),
11043
11044
  options: [{ value: "", label: r("common.select") }, ...D]
11044
11045
  }
11045
11046
  ),
@@ -11051,7 +11052,7 @@ const pa = ({
11051
11052
  label: te,
11052
11053
  type: (W == null ? void 0 : W.type) === "date" ? "date" : (W == null ? void 0 : W.type) === "email" ? "email" : "text",
11053
11054
  value: String(p),
11054
- onChange: (u) => ye((l) => ({ ...l, [H]: u.target.value }))
11055
+ onChange: (u) => ye((c) => ({ ...c, [H]: u.target.value }))
11055
11056
  }
11056
11057
  ),
11057
11058
  k.helpText
@@ -11173,7 +11174,7 @@ const _t = ({
11173
11174
  workflowResult: a,
11174
11175
  customMessage: r,
11175
11176
  onContinue: n,
11176
- onContactSupport: c
11177
+ onContactSupport: l
11177
11178
  }) => {
11178
11179
  const { t: o } = Ie(), m = t === Ke.Approved ? { type: "success", title: o("status.applicationApproved"), icon: "✓", message: o("status.applicationApprovedMsg") } : t === Ke.Reject ? { type: "error", title: o("status.applicationRejected"), icon: "✕", message: o("status.applicationRejectedMsg") } : t === Ke.UnderReview ? { type: "pending", title: o("status.underReview"), icon: "📋", message: o("status.underReviewMsg") } : t === Ke.AdminReview ? { type: "pending", title: o("status.adminReviewRequired"), icon: "📋", message: o("status.adminReviewRequiredMsg") } : t === Ke.Closed ? { type: "error", title: o("status.applicationRejected"), icon: "✕", message: o("status.applicationRejectedMsg") } : t === Ke.InProgress ? { type: "pending", title: o("status.verificationPending"), icon: "⏱", message: o("status.verificationPendingMsg") } : t === Ke.New ? { type: "pending", title: o("status.processing"), icon: "⏱", message: o("status.processingMsg") } : a === bt.Success ? { type: "success", title: o("status.processComplete"), icon: "✓", message: o("status.processCompleteMsg") } : a === bt.Failed ? { type: "error", title: o("status.processFailed"), icon: "✕", message: o("status.processFailedMsg") } : a === bt.AdminReview ? { type: "pending", title: o("status.adminReviewRequired"), icon: "📋", message: o("status.adminReviewRequiredMsg") } : { type: "pending", title: o("status.processing"), icon: "⏱", message: o("status.processingMsg") };
11179
11180
  return /* @__PURE__ */ s(ne, { children: [
@@ -11260,7 +11261,7 @@ const _t = ({
11260
11261
  /* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "center", gap: "1rem" }, children: [
11261
11262
  m.type === "success" && n && /* @__PURE__ */ i(Z, { onClick: n, size: "lg", children: o("common.continue") }),
11262
11263
  m.type === "error" && /* @__PURE__ */ s(pt, { children: [
11263
- c && /* @__PURE__ */ i(Z, { variant: "outline", onClick: c, children: o("status.contactSupport") }),
11264
+ l && /* @__PURE__ */ i(Z, { variant: "outline", onClick: l, children: o("status.contactSupport") }),
11264
11265
  n && /* @__PURE__ */ i(Z, { onClick: n, children: o("status.tryAgain") })
11265
11266
  ] }),
11266
11267
  m.type === "pending" && /* @__PURE__ */ i("div", { className: "text-center", children: /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: o("status.checkBackLater") }) })
@@ -11289,7 +11290,7 @@ const _t = ({
11289
11290
  subtitle: t,
11290
11291
  className: a = ""
11291
11292
  }) => {
11292
- const { currentTheme: r } = Oe(), { t: n } = Ie(), c = e || (r == null ? void 0 : r.title) || "", o = G(c, n), g = G(t, n), m = !!(r != null && r.logo && r.logo.visible && r.logo.url), d = !!o;
11293
+ const { currentTheme: r } = Oe(), { t: n } = Ie(), l = e || (r == null ? void 0 : r.title) || "", o = G(l, n), g = G(t, n), m = !!(r != null && r.logo && r.logo.visible && r.logo.url), d = !!o;
11293
11294
  return !m && !d ? null : /* @__PURE__ */ s("div", { className: `metakyc-header ${a}`, children: [
11294
11295
  /* @__PURE__ */ s(
11295
11296
  "div",
@@ -11351,7 +11352,7 @@ const ha = {
11351
11352
  children: /* @__PURE__ */ s(
11352
11353
  "div",
11353
11354
  {
11354
- onClick: (c) => c.stopPropagation(),
11355
+ onClick: (l) => l.stopPropagation(),
11355
11356
  style: {
11356
11357
  background: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
11357
11358
  border: "1px solid var(--metakyc-border, #e5e7eb)",
@@ -11437,11 +11438,11 @@ const ha = {
11437
11438
  zIndex: 2,
11438
11439
  transition: "background 0.15s, color 0.15s"
11439
11440
  },
11440
- onMouseEnter: (c) => {
11441
- c.currentTarget.style.background = "var(--metakyc-primary, #2563eb)", c.currentTarget.style.color = "#ffffff";
11441
+ onMouseEnter: (l) => {
11442
+ l.currentTarget.style.background = "var(--metakyc-primary, #2563eb)", l.currentTarget.style.color = "#ffffff";
11442
11443
  },
11443
- onMouseLeave: (c) => {
11444
- c.currentTarget.style.background = "transparent", c.currentTarget.style.color = "var(--metakyc-primary, #2563eb)";
11444
+ onMouseLeave: (l) => {
11445
+ l.currentTarget.style.background = "transparent", l.currentTarget.style.color = "var(--metakyc-primary, #2563eb)";
11445
11446
  },
11446
11447
  children: "?"
11447
11448
  }
@@ -11455,7 +11456,7 @@ const ha = {
11455
11456
  onCancel: r
11456
11457
  }) => {
11457
11458
  var H, W, te, p, I, x, u;
11458
- const { config: n, baseInformationService: c, currentTheme: o } = Oe(), { createApplicant: g, isLoading: m } = oi(), { t: d } = Ie(), y = e || ((H = n.applicantForm) == null ? void 0 : H.workflowKey);
11459
+ const { config: n, baseInformationService: l, currentTheme: o } = Oe(), { createApplicant: g, isLoading: m } = oi(), { t: d } = Ie(), y = e || ((H = n.applicantForm) == null ? void 0 : H.workflowKey);
11459
11460
  if (!y)
11460
11461
  throw new Error(
11461
11462
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
@@ -11464,13 +11465,13 @@ const ha = {
11464
11465
  () => o != null && o.applicantFormPages && o.applicantFormPages.length > 0 ? o.applicantFormPages : null,
11465
11466
  [o == null ? void 0 : o.applicantFormPages]
11466
11467
  ), B = Fe(() => {
11467
- const l = new Set(ht), f = o == null ? void 0 : o.applicantFormRequiredFields;
11468
- if (f) for (const h of f) l.add(h);
11468
+ const c = new Set(ht), f = o == null ? void 0 : o.applicantFormRequiredFields;
11469
+ if (f) for (const h of f) c.add(h);
11469
11470
  if (P)
11470
11471
  for (const h of P)
11471
11472
  for (const A of h.fields)
11472
- !A.isCustom && A.name && A.required && l.add(A.name);
11473
- return Array.from(l);
11473
+ !A.isCustom && A.name && A.required && c.add(A.name);
11474
+ return Array.from(c);
11474
11475
  }, [o == null ? void 0 : o.applicantFormRequiredFields, P]), $ = Fe(() => {
11475
11476
  var h;
11476
11477
  if (P) {
@@ -11478,9 +11479,9 @@ const ha = {
11478
11479
  for (const w of ht) N.add(w);
11479
11480
  return Array.from(N);
11480
11481
  }
11481
- let l;
11482
- (h = n.applicantForm) != null && h.visibleFields ? l = n.applicantForm.visibleFields : o != null && o.applicantFormVisibleFields && o.applicantFormVisibleFields.length > 0 ? l = o.applicantFormVisibleFields : l = Ii;
11483
- const f = new Set(l);
11482
+ let c;
11483
+ (h = n.applicantForm) != null && h.visibleFields ? c = n.applicantForm.visibleFields : o != null && o.applicantFormVisibleFields && o.applicantFormVisibleFields.length > 0 ? c = o.applicantFormVisibleFields : c = Ii;
11484
+ const f = new Set(c);
11484
11485
  for (const A of ht) f.add(A);
11485
11486
  return Array.from(f);
11486
11487
  }, [(u = n.applicantForm) == null ? void 0 : u.visibleFields, o == null ? void 0 : o.applicantFormVisibleFields, P]), D = /* @__PURE__ */ new Set([
@@ -11492,23 +11493,23 @@ const ha = {
11492
11493
  "otherNationality"
11493
11494
  ]), K = Fe(() => {
11494
11495
  var f, h;
11495
- const l = /* @__PURE__ */ new Set();
11496
+ const c = /* @__PURE__ */ new Set();
11496
11497
  if (P)
11497
11498
  for (const A of P)
11498
11499
  for (const N of A.fields)
11499
- !N.isCustom && N.name && D.has(N.name) && l.add(N.countriesType ?? ((f = lt[N.name]) == null ? void 0 : f.countriesType));
11500
+ !N.isCustom && N.name && D.has(N.name) && c.add(N.countriesType ?? ((f = lt[N.name]) == null ? void 0 : f.countriesType));
11500
11501
  else
11501
11502
  for (const A of $)
11502
- D.has(A) && l.add((h = lt[A]) == null ? void 0 : h.countriesType);
11503
- return l.size === 0 && l.add(void 0), Array.from(l);
11503
+ D.has(A) && c.add((h = lt[A]) == null ? void 0 : h.countriesType);
11504
+ return c.size === 0 && c.add(void 0), Array.from(c);
11504
11505
  }, [$, P]), [J, re] = S({}), [b, R] = S(!0), V = ue(/* @__PURE__ */ new Set()), Q = ue(/* @__PURE__ */ new Set());
11505
11506
  be(() => {
11506
11507
  if (!o) return;
11507
- const l = K.filter((A) => {
11508
+ const c = K.filter((A) => {
11508
11509
  const N = A != null ? String(A) : "all";
11509
11510
  return !Q.current.has(N) && !V.current.has(N);
11510
11511
  });
11511
- if (l.length === 0) {
11512
+ if (c.length === 0) {
11512
11513
  K.every((N) => {
11513
11514
  const w = N != null ? String(N) : "all";
11514
11515
  return Q.current.has(w);
@@ -11516,12 +11517,12 @@ const ha = {
11516
11517
  return;
11517
11518
  }
11518
11519
  R(!0);
11519
- const f = l.map((A) => A != null ? String(A) : "all");
11520
+ const f = c.map((A) => A != null ? String(A) : "all");
11520
11521
  f.forEach((A) => V.current.add(A)), (async () => {
11521
11522
  try {
11522
11523
  const A = await Promise.all(
11523
- l.map(async (N) => {
11524
- const w = N != null ? String(N) : "all", ae = await c.getCountries("", n.locale || "en", N), se = N === 40, we = /* @__PURE__ */ new Set(), ke = ae.map((ve) => se && ve.countryCode ? {
11524
+ c.map(async (N) => {
11525
+ const w = N != null ? String(N) : "all", ae = await l.getCountries("", n.locale || "en", N), se = N === 40, we = /* @__PURE__ */ new Set(), ke = ae.map((ve) => se && ve.countryCode ? {
11525
11526
  value: ve.countryCode,
11526
11527
  label: `${ve.countryCode} – ${ve.name}`
11527
11528
  } : { value: ve.abbreviation3 || ve.abbreviation, label: ve.name }).filter((ve) => !ve.value || we.has(ve.value) ? !1 : (we.add(ve.value), !0));
@@ -11539,9 +11540,9 @@ const ha = {
11539
11540
  }
11540
11541
  })();
11541
11542
  }, [K, o]);
11542
- const ee = (l, f) => {
11543
+ const ee = (c, f) => {
11543
11544
  var N;
11544
- const h = f ?? ((N = lt[l]) == null ? void 0 : N.countriesType), A = h != null ? String(h) : "all";
11545
+ const h = f ?? ((N = lt[c]) == null ? void 0 : N.countriesType), A = h != null ? String(h) : "all";
11545
11546
  return J[A] || [];
11546
11547
  }, U = {
11547
11548
  firstName: 1,
@@ -11567,9 +11568,9 @@ const ha = {
11567
11568
  occupation: 1,
11568
11569
  taxNumber: 1
11569
11570
  }, X = Object.fromEntries(
11570
- Object.entries(L).filter(([l]) => l in U)
11571
+ Object.entries(L).filter(([c]) => c in U)
11571
11572
  ), ce = Object.fromEntries(
11572
- Object.entries(C).filter(([l]) => l in U)
11573
+ Object.entries(C).filter(([c]) => c in U)
11573
11574
  ), [Y, je] = S({
11574
11575
  workflowKey: y,
11575
11576
  firstName: "",
@@ -11598,10 +11599,10 @@ const ha = {
11598
11599
  ...X,
11599
11600
  ...ce
11600
11601
  }), ye = Object.fromEntries(
11601
- Object.entries(L).filter(([l]) => !(l in X) && l !== "externalRefId" && l !== "workflowKey")
11602
- ), [fe, Se] = S({ ...ye }), [pe, j] = S(0), [E, O] = S({}), [xe, de] = S(null), [M, _] = S(!1), ge = (l, f) => je((h) => ({ ...h, [l]: f })), le = (l, f) => Se((h) => ({ ...h, [l]: f })), ze = (l) => !l.conditionalOn || fe[l.conditionalOn] === "true", rt = (l) => {
11602
+ Object.entries(L).filter(([c]) => !(c in X) && c !== "externalRefId" && c !== "workflowKey")
11603
+ ), [fe, Se] = S({ ...ye }), [pe, j] = S(0), [E, O] = S({}), [xe, de] = S(null), [M, _] = S(!1), ge = (c, f) => je((h) => ({ ...h, [c]: f })), le = (c, f) => Se((h) => ({ ...h, [c]: f })), ze = (c) => !c.conditionalOn || fe[c.conditionalOn] === "true", rt = (c) => {
11603
11604
  var f;
11604
- for (const h of l.fields) {
11605
+ for (const h of c.fields) {
11605
11606
  if (!h.isCustom || !h.paramName || !((f = h.blockingValues) != null && f.length)) continue;
11606
11607
  const A = fe[h.paramName] ?? "";
11607
11608
  if (h.customType === "group_checkbox") {
@@ -11610,9 +11611,9 @@ const ha = {
11610
11611
  return !0;
11611
11612
  }
11612
11613
  return !1;
11613
- }, Ae = P && pe < P.length - 1 ? pe + 1 : -1, Ye = P && pe > 0 ? pe - 1 : -1, ct = (l) => {
11614
+ }, Ae = P && pe < P.length - 1 ? pe + 1 : -1, Ye = P && pe > 0 ? pe - 1 : -1, ct = (c) => {
11614
11615
  const f = {};
11615
- for (const h of l.fields)
11616
+ for (const h of c.fields)
11616
11617
  if (h.isCustom) {
11617
11618
  if (h.customType === "paragraph" || h.customType === "html" || h.customType === "br" || h.customType === "link") continue;
11618
11619
  if (h.required && h.paramName) {
@@ -11629,13 +11630,13 @@ const ha = {
11629
11630
  return f;
11630
11631
  }, at = async () => {
11631
11632
  if (!P) return;
11632
- const l = P[pe];
11633
- if (rt(l) || l.conditionalOn && l.conditionalMode === "block" && !ze(l)) return;
11634
- if (l.conditionalOn && !ze(l)) {
11633
+ const c = P[pe];
11634
+ if (rt(c) || c.conditionalOn && c.conditionalMode === "block" && !ze(c)) return;
11635
+ if (c.conditionalOn && !ze(c)) {
11635
11636
  O({}), Ae >= 0 ? j(Ae) : await He();
11636
11637
  return;
11637
11638
  }
11638
- const f = ct(l);
11639
+ const f = ct(c);
11639
11640
  if (Object.keys(f).length > 0) {
11640
11641
  O(f);
11641
11642
  return;
@@ -11643,11 +11644,11 @@ const ha = {
11643
11644
  O({}), Ae >= 0 ? j(Ae) : await He();
11644
11645
  }, He = async () => {
11645
11646
  if (P) {
11646
- let l = {};
11647
+ let c = {};
11647
11648
  for (const f of P)
11648
- ze(f) && (l = { ...l, ...ct(f) });
11649
- if (Object.keys(l).length > 0) {
11650
- O(l);
11649
+ ze(f) && (c = { ...c, ...ct(f) });
11650
+ if (Object.keys(c).length > 0) {
11651
+ O(c);
11651
11652
  return;
11652
11653
  }
11653
11654
  }
@@ -11657,7 +11658,7 @@ const ha = {
11657
11658
  de(d("createApplicant.externalRefIdRequired"));
11658
11659
  return;
11659
11660
  }
11660
- const l = {
11661
+ const c = {
11661
11662
  workflowKey: Y.workflowKey,
11662
11663
  externalRefId: Y.externalRefId.trim()
11663
11664
  };
@@ -11667,19 +11668,19 @@ const ha = {
11667
11668
  for (const w of N.fields)
11668
11669
  if (!w.isCustom && w.name) {
11669
11670
  const ae = w.name, se = Y[ae];
11670
- ut(se) || (l[ae] = se);
11671
+ ut(se) || (c[ae] = se);
11671
11672
  }
11672
11673
  }
11673
11674
  for (const N of ht)
11674
- if (l[N] === void 0) {
11675
+ if (c[N] === void 0) {
11675
11676
  const w = Y[N];
11676
- ut(w) || (l[N] = w);
11677
+ ut(w) || (c[N] = w);
11677
11678
  }
11678
11679
  } else
11679
11680
  $.forEach((N) => {
11680
11681
  if (N === "externalRefId") return;
11681
11682
  const w = Y[N];
11682
- ut(w) || (l[N] = w);
11683
+ ut(w) || (c[N] = w);
11683
11684
  });
11684
11685
  const f = [];
11685
11686
  if (P) {
@@ -11696,20 +11697,20 @@ const ha = {
11696
11697
  }
11697
11698
  }
11698
11699
  for (const [N, w] of Object.entries(X))
11699
- l[N] === void 0 && !ut(w) && (l[N] = w);
11700
+ c[N] === void 0 && !ut(w) && (c[N] = w);
11700
11701
  const h = new Set(f.map((N) => N.paramName));
11701
11702
  for (const [N, w] of Object.entries(ye))
11702
11703
  !h.has(N) && w && f.push({ paramName: N, value: w });
11703
- f.length > 0 && (l.applicantAdditionalDatas = f);
11704
- const A = await g(l);
11704
+ f.length > 0 && (c.applicantAdditionalDatas = f);
11705
+ const A = await g(c);
11705
11706
  a(A.applicantId);
11706
- } catch (l) {
11707
- console.error("Error creating applicant:", l), de(l.message || d("createApplicant.failedToCreate"));
11707
+ } catch (c) {
11708
+ console.error("Error creating applicant:", c), de(c.message || d("createApplicant.failedToCreate"));
11708
11709
  } finally {
11709
11710
  _(!1);
11710
11711
  }
11711
- }, dt = async (l) => {
11712
- l.preventDefault();
11712
+ }, dt = async (c) => {
11713
+ c.preventDefault();
11713
11714
  for (const f of B)
11714
11715
  if (ut(Y[f])) {
11715
11716
  const h = lt[f], A = (h != null && h.translationKey ? d(`fields.${h.translationKey}`) : void 0) || (h == null ? void 0 : h.label) || f;
@@ -11717,22 +11718,22 @@ const ha = {
11717
11718
  return;
11718
11719
  }
11719
11720
  await He();
11720
- }, Je = (l, f, h, A, N) => {
11721
+ }, Je = (c, f, h, A, N) => {
11721
11722
  var Dt;
11722
- const w = lt[l];
11723
+ const w = lt[c];
11723
11724
  if (!w) return null;
11724
- const ae = B.includes(l), se = E[l], we = G(h, d) || (w.translationKey ? d(`fields.${w.translationKey}`) : void 0) || w.label, ke = l in ce, ve = f ?? l, Ve = { required: ae }, $e = N ? N !== "placeholder" : T, et = $e ? we : void 0;
11725
+ const ae = B.includes(c), se = E[c], we = G(h, d) || (w.translationKey ? d(`fields.${w.translationKey}`) : void 0) || w.label, ke = c in ce, ve = f ?? c, Ve = { required: ae }, $e = N ? N !== "placeholder" : T, et = $e ? we : void 0;
11725
11726
  switch (w.type) {
11726
11727
  case "select":
11727
- if (l === "country" || l === "nationality" || l === "taxCountry" || l === "countryOfBirth" || l === "mobileCountryCode") {
11728
- const Le = ee(l, A);
11728
+ if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
11729
+ const Le = ee(c, A);
11729
11730
  return /* @__PURE__ */ i(
11730
11731
  Xe,
11731
11732
  {
11732
11733
  ...Ve,
11733
11734
  label: et,
11734
- value: Y[l] || "",
11735
- onChange: (nt) => ge(l, nt),
11735
+ value: Y[c] || "",
11736
+ onChange: (nt) => ge(c, nt),
11736
11737
  options: [{ value: "", label: $e ? d("placeholders.selectCountry") : we }, ...Le],
11737
11738
  disabled: b,
11738
11739
  readOnly: ke,
@@ -11741,14 +11742,14 @@ const ha = {
11741
11742
  ve
11742
11743
  );
11743
11744
  }
11744
- if (l === "salutation")
11745
+ if (c === "salutation")
11745
11746
  return /* @__PURE__ */ i(
11746
11747
  Xe,
11747
11748
  {
11748
11749
  ...Ve,
11749
11750
  label: et,
11750
- value: ((Dt = Y[l]) == null ? void 0 : Dt.toString()) || "",
11751
- onChange: (Le) => ge(l, Le ? Number(Le) : null),
11751
+ value: ((Dt = Y[c]) == null ? void 0 : Dt.toString()) || "",
11752
+ onChange: (Le) => ge(c, Le ? Number(Le) : null),
11752
11753
  options: [
11753
11754
  { value: "", label: $e ? d("placeholders.selectSalutation") : we },
11754
11755
  { value: xt.Male.toString(), label: d("gender.male") },
@@ -11760,15 +11761,15 @@ const ha = {
11760
11761
  },
11761
11762
  ve
11762
11763
  );
11763
- if (l === "defaultLanguage") {
11764
+ if (c === "defaultLanguage") {
11764
11765
  const Le = o != null && o.allowedLanguages && o.allowedLanguages.length > 0 ? jt.filter((nt) => o.allowedLanguages.includes(nt.value)) : jt;
11765
11766
  return /* @__PURE__ */ i(
11766
11767
  Xe,
11767
11768
  {
11768
11769
  ...Ve,
11769
11770
  label: et,
11770
- value: Y[l] || "",
11771
- onChange: (nt) => ge(l, nt),
11771
+ value: Y[c] || "",
11772
+ onChange: (nt) => ge(c, nt),
11772
11773
  options: [{ value: "", label: $e ? d("placeholders.selectLanguage") : we }, ...Le],
11773
11774
  readOnly: ke,
11774
11775
  error: se
@@ -11778,15 +11779,15 @@ const ha = {
11778
11779
  }
11779
11780
  return null;
11780
11781
  case "multiselect":
11781
- if (l === "otherNationality") {
11782
- const Le = ee(l, A);
11782
+ if (c === "otherNationality") {
11783
+ const Le = ee(c, A);
11783
11784
  return /* @__PURE__ */ i(
11784
11785
  Br,
11785
11786
  {
11786
11787
  ...Ve,
11787
11788
  label: et,
11788
- value: Y[l] || [],
11789
- onChange: (nt) => ge(l, nt),
11789
+ value: Y[c] || [],
11790
+ onChange: (nt) => ge(c, nt),
11790
11791
  options: Le,
11791
11792
  placeholder: $e ? d("placeholders.selectOtherNationalities") : we,
11792
11793
  disabled: b,
@@ -11804,8 +11805,8 @@ const ha = {
11804
11805
  type: "date",
11805
11806
  label: et,
11806
11807
  placeholder: $e ? void 0 : we,
11807
- value: Y[l] || "",
11808
- onChange: (Le) => ge(l, Le.target.value),
11808
+ value: Y[c] || "",
11809
+ onChange: (Le) => ge(c, Le.target.value),
11809
11810
  readOnly: ke,
11810
11811
  error: se
11811
11812
  },
@@ -11819,8 +11820,8 @@ const ha = {
11819
11820
  type: "email",
11820
11821
  label: et,
11821
11822
  placeholder: $e ? void 0 : we,
11822
- value: Y[l] || "",
11823
- onChange: (Le) => ge(l, Le.target.value),
11823
+ value: Y[c] || "",
11824
+ onChange: (Le) => ge(c, Le.target.value),
11824
11825
  readOnly: ke,
11825
11826
  error: se
11826
11827
  },
@@ -11834,8 +11835,8 @@ const ha = {
11834
11835
  type: "tel",
11835
11836
  label: et,
11836
11837
  placeholder: $e ? void 0 : we,
11837
- value: Y[l] || "",
11838
- onChange: (Le) => ge(l, Le.target.value),
11838
+ value: Y[c] || "",
11839
+ onChange: (Le) => ge(c, Le.target.value),
11839
11840
  readOnly: ke,
11840
11841
  error: se
11841
11842
  },
@@ -11849,18 +11850,18 @@ const ha = {
11849
11850
  type: "text",
11850
11851
  label: et,
11851
11852
  placeholder: $e ? void 0 : we,
11852
- value: Y[l] || "",
11853
- onChange: (Le) => ge(l, Le.target.value),
11853
+ value: Y[c] || "",
11854
+ onChange: (Le) => ge(c, Le.target.value),
11854
11855
  readOnly: ke,
11855
11856
  error: se
11856
11857
  },
11857
11858
  ve
11858
11859
  );
11859
11860
  }
11860
- }, k = (l, f) => {
11861
- const h = l.labelMode ? l.labelMode !== "placeholder" : T;
11862
- if (l.customType === "paragraph") {
11863
- const w = G(l.displayText, d) || G(l.label, d) || "";
11861
+ }, k = (c, f) => {
11862
+ const h = c.labelMode ? c.labelMode !== "placeholder" : T;
11863
+ if (c.customType === "paragraph") {
11864
+ const w = G(c.displayText, d) || G(c.label, d) || "";
11864
11865
  return /* @__PURE__ */ i(
11865
11866
  "p",
11866
11867
  {
@@ -11876,22 +11877,22 @@ const ha = {
11876
11877
  `custom-${f}`
11877
11878
  );
11878
11879
  }
11879
- if (l.customType === "html")
11880
+ if (c.customType === "html")
11880
11881
  return /* @__PURE__ */ i(
11881
11882
  "div",
11882
11883
  {
11883
- dangerouslySetInnerHTML: { __html: G(l.label, d) || "" }
11884
+ dangerouslySetInnerHTML: { __html: G(c.label, d) || "" }
11884
11885
  },
11885
11886
  `custom-${f}`
11886
11887
  );
11887
- if (l.customType === "br")
11888
+ if (c.customType === "br")
11888
11889
  return /* @__PURE__ */ i("div", { style: { height: "12px" } }, `custom-${f}`);
11889
- if (l.customType === "link") {
11890
- const w = G(l.displayText, d) || G(l.label, d) || l.linkText || l.linkUrl || "";
11890
+ if (c.customType === "link") {
11891
+ const w = G(c.displayText, d) || G(c.label, d) || c.linkText || c.linkUrl || "";
11891
11892
  return /* @__PURE__ */ i("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
11892
11893
  "a",
11893
11894
  {
11894
- href: l.linkUrl || "#",
11895
+ href: c.linkUrl || "#",
11895
11896
  target: "_blank",
11896
11897
  rel: "noopener noreferrer",
11897
11898
  style: {
@@ -11910,10 +11911,10 @@ const ha = {
11910
11911
  }
11911
11912
  ) }, `custom-${f}`);
11912
11913
  }
11913
- if (!l.paramName) return null;
11914
- const A = E[l.paramName], N = G(l.displayText, d) || G(l.label, d) || l.paramName;
11915
- if (l.customType === "checkbox") {
11916
- const w = fe[l.paramName] === "true";
11914
+ if (!c.paramName) return null;
11915
+ const A = E[c.paramName], N = G(c.displayText, d) || G(c.label, d) || c.paramName;
11916
+ if (c.customType === "checkbox") {
11917
+ const w = fe[c.paramName] === "true";
11917
11918
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
11918
11919
  /* @__PURE__ */ s(
11919
11920
  "div",
@@ -11921,14 +11922,14 @@ const ha = {
11921
11922
  className: "metakyc-option-label",
11922
11923
  role: "checkbox",
11923
11924
  "aria-checked": w,
11924
- onClick: () => le(l.paramName, w ? "false" : "true"),
11925
+ onClick: () => le(c.paramName, w ? "false" : "true"),
11925
11926
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
11926
11927
  children: [
11927
11928
  /* @__PURE__ */ i(
11928
11929
  We,
11929
11930
  {
11930
11931
  checked: w,
11931
- onChange: (ae) => le(l.paramName, ae ? "true" : "false")
11932
+ onChange: (ae) => le(c.paramName, ae ? "true" : "false")
11932
11933
  }
11933
11934
  ),
11934
11935
  /* @__PURE__ */ s(
@@ -11938,7 +11939,7 @@ const ha = {
11938
11939
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
11939
11940
  children: [
11940
11941
  N,
11941
- l.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
11942
+ c.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
11942
11943
  ]
11943
11944
  }
11944
11945
  )
@@ -11948,8 +11949,8 @@ const ha = {
11948
11949
  A && /* @__PURE__ */ i("p", { className: "text-xs mt-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: A })
11949
11950
  ] }, `custom-${f}`);
11950
11951
  }
11951
- if (l.customType === "link_checkbox") {
11952
- const w = fe[l.paramName] === "true";
11952
+ if (c.customType === "link_checkbox") {
11953
+ const w = fe[c.paramName] === "true";
11953
11954
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
11954
11955
  /* @__PURE__ */ s(
11955
11956
  "div",
@@ -11957,14 +11958,14 @@ const ha = {
11957
11958
  className: "metakyc-option-label",
11958
11959
  role: "checkbox",
11959
11960
  "aria-checked": w,
11960
- onClick: () => le(l.paramName, w ? "false" : "true"),
11961
+ onClick: () => le(c.paramName, w ? "false" : "true"),
11961
11962
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
11962
11963
  children: [
11963
11964
  /* @__PURE__ */ i(
11964
11965
  We,
11965
11966
  {
11966
11967
  checked: w,
11967
- onChange: (ae) => le(l.paramName, ae ? "true" : "false")
11968
+ onChange: (ae) => le(c.paramName, ae ? "true" : "false")
11968
11969
  }
11969
11970
  ),
11970
11971
  /* @__PURE__ */ s(
@@ -11975,19 +11976,19 @@ const ha = {
11975
11976
  children: [
11976
11977
  N,
11977
11978
  " ",
11978
- l.linkUrl && /* @__PURE__ */ i(
11979
+ c.linkUrl && /* @__PURE__ */ i(
11979
11980
  "a",
11980
11981
  {
11981
- href: l.linkUrl,
11982
+ href: c.linkUrl,
11982
11983
  target: "_blank",
11983
11984
  rel: "noopener noreferrer",
11984
11985
  className: "underline",
11985
11986
  style: { color: "var(--metakyc-primary, #2563eb)" },
11986
11987
  onClick: (ae) => ae.stopPropagation(),
11987
- children: l.linkText || l.linkUrl
11988
+ children: c.linkText || c.linkUrl
11988
11989
  }
11989
11990
  ),
11990
- l.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
11991
+ c.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
11991
11992
  ]
11992
11993
  }
11993
11994
  )
@@ -11997,8 +11998,8 @@ const ha = {
11997
11998
  A && /* @__PURE__ */ i("p", { className: "text-xs mt-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: A })
11998
11999
  ] }, `custom-${f}`);
11999
12000
  }
12000
- if (l.customType === "group_checkbox") {
12001
- const w = (fe[l.paramName] || "").split(",").filter(Boolean);
12001
+ if (c.customType === "group_checkbox") {
12002
+ const w = (fe[c.paramName] || "").split(",").filter(Boolean);
12002
12003
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
12003
12004
  h && /* @__PURE__ */ s(
12004
12005
  "div",
@@ -12007,17 +12008,17 @@ const ha = {
12007
12008
  style: { color: "var(--metakyc-text-primary, #111827)" },
12008
12009
  children: [
12009
12010
  N,
12010
- l.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12011
+ c.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12011
12012
  ]
12012
12013
  }
12013
12014
  ),
12014
- /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (l.options || []).map((ae) => {
12015
- const se = l.singleSelect ? fe[l.paramName] === ae.value : w.includes(ae.value), we = () => {
12016
- if (l.singleSelect)
12017
- le(l.paramName, se ? "" : ae.value);
12015
+ /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((ae) => {
12016
+ const se = c.singleSelect ? fe[c.paramName] === ae.value : w.includes(ae.value), we = () => {
12017
+ if (c.singleSelect)
12018
+ le(c.paramName, se ? "" : ae.value);
12018
12019
  else {
12019
12020
  const ke = se ? w.filter((ve) => ve !== ae.value) : [...w, ae.value];
12020
- le(l.paramName, ke.join(","));
12021
+ le(c.paramName, ke.join(","));
12021
12022
  }
12022
12023
  };
12023
12024
  return /* @__PURE__ */ s(
@@ -12044,7 +12045,7 @@ const ha = {
12044
12045
  A && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-danger, #ef4444)" }, children: A })
12045
12046
  ] }, `custom-${f}`);
12046
12047
  }
12047
- return l.customType === "radio_group" ? /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
12048
+ return c.customType === "radio_group" ? /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
12048
12049
  h && /* @__PURE__ */ s(
12049
12050
  "div",
12050
12051
  {
@@ -12052,24 +12053,24 @@ const ha = {
12052
12053
  style: { color: "var(--metakyc-text-primary, #111827)" },
12053
12054
  children: [
12054
12055
  N,
12055
- l.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12056
+ c.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12056
12057
  ]
12057
12058
  }
12058
12059
  ),
12059
- /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (l.options || []).map((w) => /* @__PURE__ */ s(
12060
+ /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((w) => /* @__PURE__ */ s(
12060
12061
  "div",
12061
12062
  {
12062
12063
  className: "metakyc-option-label",
12063
- onClick: () => le(l.paramName, w.value),
12064
+ onClick: () => le(c.paramName, w.value),
12064
12065
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
12065
12066
  children: [
12066
12067
  /* @__PURE__ */ i(
12067
12068
  "input",
12068
12069
  {
12069
12070
  type: "radio",
12070
- checked: fe[l.paramName] === w.value,
12071
- onChange: () => le(l.paramName, w.value),
12072
- name: `radio-group-${l.paramName}-${f}`,
12071
+ checked: fe[c.paramName] === w.value,
12072
+ onChange: () => le(c.paramName, w.value),
12073
+ name: `radio-group-${c.paramName}-${f}`,
12073
12074
  className: "metakyc-option-input",
12074
12075
  onClick: (ae) => ae.stopPropagation(),
12075
12076
  style: ha
@@ -12092,32 +12093,32 @@ const ha = {
12092
12093
  Ce,
12093
12094
  {
12094
12095
  type: "text",
12095
- label: h ? `${N}${l.required ? " *" : ""}` : void 0,
12096
+ label: h ? `${N}${c.required ? " *" : ""}` : void 0,
12096
12097
  placeholder: h ? void 0 : N,
12097
- value: fe[l.paramName] || "",
12098
- onChange: (w) => le(l.paramName, w.target.value),
12099
- required: l.required,
12098
+ value: fe[c.paramName] || "",
12099
+ onChange: (w) => le(c.paramName, w.target.value),
12100
+ required: c.required,
12100
12101
  error: A
12101
12102
  },
12102
12103
  `custom-${f}`
12103
12104
  );
12104
- }, F = (l, f) => {
12105
- const h = ze(l);
12105
+ }, F = (c, f) => {
12106
+ const h = ze(c);
12106
12107
  return /* @__PURE__ */ s("div", { className: "space-y-4", children: [
12107
- l.conditionalOn && /* @__PURE__ */ i(Gt, { helpText: l.conditionalHelpText, children: /* @__PURE__ */ s(
12108
+ c.conditionalOn && /* @__PURE__ */ i(Gt, { helpText: c.conditionalHelpText, children: /* @__PURE__ */ s(
12108
12109
  "div",
12109
12110
  {
12110
12111
  className: "metakyc-option-label",
12111
12112
  role: "checkbox",
12112
12113
  "aria-checked": h,
12113
- onClick: () => le(l.conditionalOn, h ? "false" : "true"),
12114
+ onClick: () => le(c.conditionalOn, h ? "false" : "true"),
12114
12115
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
12115
12116
  children: [
12116
12117
  /* @__PURE__ */ i(
12117
12118
  We,
12118
12119
  {
12119
12120
  checked: h,
12120
- onChange: (A) => le(l.conditionalOn, A ? "true" : "false")
12121
+ onChange: (A) => le(c.conditionalOn, A ? "true" : "false")
12121
12122
  }
12122
12123
  ),
12123
12124
  /* @__PURE__ */ i(
@@ -12125,13 +12126,13 @@ const ha = {
12125
12126
  {
12126
12127
  className: "metakyc-option-text",
12127
12128
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", fontWeight: 500 },
12128
- children: G(l.conditionalLabel, d) || l.conditionalOn
12129
+ children: G(c.conditionalLabel, d) || c.conditionalOn
12129
12130
  }
12130
12131
  )
12131
12132
  ]
12132
12133
  }
12133
12134
  ) }),
12134
- h && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: l.fields.map((A, N) => {
12135
+ h && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: c.fields.map((A, N) => {
12135
12136
  const w = Math.min(4, Math.max(1, Number(A.colSpan) || 4)), ae = A.isCustom ? `custom-${N}-${A.paramName}` : `builtin-${A.name}-${N}`;
12136
12137
  return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${w} / span ${w}` }, children: /* @__PURE__ */ i(Gt, { helpText: A.helpText, children: A.isCustom ? k(A, N) : Je(A.name, ae, A.displayText, A.countriesType, A.labelMode) }) }, ae);
12137
12138
  }) })
@@ -12143,34 +12144,34 @@ const ha = {
12143
12144
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: d("common.loadingForm") })
12144
12145
  ] }) }) });
12145
12146
  if (P) {
12146
- const l = P[pe] ?? P[0], f = Ye === -1, h = Ae === -1, A = P.length, N = ze(l), w = rt(l), ae = Object.values(E), se = !N && !!l.conditionalOn && l.conditionalMode === "block", we = M || m || se || w;
12147
+ const c = P[pe] ?? P[0], f = Ye === -1, h = Ae === -1, A = P.length, N = ze(c), w = rt(c), ae = Object.values(E), se = !N && !!c.conditionalOn && c.conditionalMode === "block", we = M || m || se || w;
12147
12148
  let ke;
12148
- return se || w ? ke = d("common.blocked") : h ? ke = l.conditionalOn && !N ? d("common.skipAndSubmit") : d("common.submit") : ke = l.conditionalOn && !N ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
12149
+ return se || w ? ke = d("common.blocked") : h ? ke = c.conditionalOn && !N ? d("common.skipAndSubmit") : d("common.submit") : ke = c.conditionalOn && !N ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
12149
12150
  /* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(ft, { title: (o == null ? void 0 : o.title) || d("createApplicant.title") }) }),
12150
12151
  /* @__PURE__ */ s(oe, { children: [
12151
- (l.title || l.subtitle || l.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
12152
- l.title && /* @__PURE__ */ i(
12152
+ (c.title || c.subtitle || c.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
12153
+ c.title && /* @__PURE__ */ i(
12153
12154
  "h3",
12154
12155
  {
12155
12156
  className: "font-semibold text-base",
12156
12157
  style: { color: "var(--metakyc-text-primary, #111827)" },
12157
- children: G(l.title, d)
12158
+ children: G(c.title, d)
12158
12159
  }
12159
12160
  ),
12160
- l.subtitle && /* @__PURE__ */ i(
12161
+ c.subtitle && /* @__PURE__ */ i(
12161
12162
  "p",
12162
12163
  {
12163
12164
  className: "text-sm mt-0.5",
12164
12165
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
12165
- children: G(l.subtitle, d)
12166
+ children: G(c.subtitle, d)
12166
12167
  }
12167
12168
  ),
12168
- l.description && l.description !== l.subtitle && /* @__PURE__ */ i(
12169
+ c.description && c.description !== c.subtitle && /* @__PURE__ */ i(
12169
12170
  "p",
12170
12171
  {
12171
12172
  className: "text-xs mt-1",
12172
12173
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
12173
- children: G(l.description, d)
12174
+ children: G(c.description, d)
12174
12175
  }
12175
12176
  )
12176
12177
  ] }),
@@ -12204,7 +12205,7 @@ const ha = {
12204
12205
  ] }),
12205
12206
  ae.map((ve, Ve) => /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: ve }, Ve))
12206
12207
  ] }),
12207
- F(l)
12208
+ F(c)
12208
12209
  ] }),
12209
12210
  /* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
12210
12211
  /* @__PURE__ */ s("div", { children: [
@@ -12246,7 +12247,7 @@ const ha = {
12246
12247
  " ",
12247
12248
  xe
12248
12249
  ] }) }),
12249
- /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: $.map((l) => /* @__PURE__ */ i("div", { style: { gridColumn: "span 4 / span 4" }, children: Je(l) }, l)) })
12250
+ /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: $.map((c) => /* @__PURE__ */ i("div", { style: { gridColumn: "span 4 / span 4" }, children: Je(c) }, c)) })
12250
12251
  ] }),
12251
12252
  /* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
12252
12253
  r && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: r, disabled: M || m, children: "Cancel" }),
@@ -12264,7 +12265,7 @@ const Wa = ({
12264
12265
  onCancel: r
12265
12266
  }) => {
12266
12267
  var Je, k, F, H, W, te;
12267
- const { config: n, baseInformationService: c, currentTheme: o } = Oe(), { createCompanyApplicant: g, isLoading: m } = oi(), { t: d } = Ie(), y = e || ((Je = n.applicantForm) == null ? void 0 : Je.workflowKey);
12268
+ const { config: n, baseInformationService: l, currentTheme: o } = Oe(), { createCompanyApplicant: g, isLoading: m } = oi(), { t: d } = Ie(), y = e || ((Je = n.applicantForm) == null ? void 0 : Je.workflowKey);
12268
12269
  if (!y)
12269
12270
  throw new Error(
12270
12271
  "workflowKey is required. Provide it either as a prop to CreateCompanyApplicantForm or set it in config.applicantForm.workflowKey"
@@ -12293,8 +12294,8 @@ const Wa = ({
12293
12294
  const p = /* @__PURE__ */ new Set();
12294
12295
  if (T)
12295
12296
  for (const u of T)
12296
- for (const l of u.fields)
12297
- !l.isCustom && l.name && $.has(l.name) && p.add(l.countriesType ?? ((I = mt[l.name]) == null ? void 0 : I.countriesType));
12297
+ for (const c of u.fields)
12298
+ !c.isCustom && c.name && $.has(c.name) && p.add(c.countriesType ?? ((I = mt[c.name]) == null ? void 0 : I.countriesType));
12298
12299
  else
12299
12300
  for (const u of B)
12300
12301
  $.has(u) && p.add((x = mt[u]) == null ? void 0 : x.countriesType);
@@ -12303,11 +12304,11 @@ const Wa = ({
12303
12304
  be(() => {
12304
12305
  if (!o) return;
12305
12306
  const p = D.filter((u) => {
12306
- const l = u != null ? String(u) : "all";
12307
- return !V.current.has(l) && !R.current.has(l);
12307
+ const c = u != null ? String(u) : "all";
12308
+ return !V.current.has(c) && !R.current.has(c);
12308
12309
  });
12309
12310
  if (p.length === 0) {
12310
- D.every((l) => V.current.has(l != null ? String(l) : "all")) && b(!1);
12311
+ D.every((c) => V.current.has(c != null ? String(c) : "all")) && b(!1);
12311
12312
  return;
12312
12313
  }
12313
12314
  b(!0);
@@ -12315,22 +12316,22 @@ const Wa = ({
12315
12316
  I.forEach((u) => R.current.add(u)), (async () => {
12316
12317
  try {
12317
12318
  const u = await Promise.all(
12318
- p.map(async (l) => {
12319
- const f = l != null ? String(l) : "all", h = await c.getCountries("", n.locale || "en", l), A = /* @__PURE__ */ new Set(), N = h.map((w) => ({ value: w.abbreviation3 || w.abbreviation, label: w.name })).filter((w) => !w.value || A.has(w.value) ? !1 : (A.add(w.value), !0));
12319
+ p.map(async (c) => {
12320
+ const f = c != null ? String(c) : "all", h = await l.getCountries("", n.locale || "en", c), A = /* @__PURE__ */ new Set(), N = h.map((w) => ({ value: w.abbreviation3 || w.abbreviation, label: w.name })).filter((w) => !w.value || A.has(w.value) ? !1 : (A.add(w.value), !0));
12320
12321
  return V.current.add(f), R.current.delete(f), [f, N];
12321
12322
  })
12322
12323
  );
12323
- J((l) => ({ ...l, ...Object.fromEntries(u) }));
12324
+ J((c) => ({ ...c, ...Object.fromEntries(u) }));
12324
12325
  } catch (u) {
12325
- I.forEach((l) => R.current.delete(l)), console.error("Failed to load countries:", u);
12326
+ I.forEach((c) => R.current.delete(c)), console.error("Failed to load countries:", u);
12326
12327
  } finally {
12327
- D.every((l) => V.current.has(l != null ? String(l) : "all")) && b(!1);
12328
+ D.every((c) => V.current.has(c != null ? String(c) : "all")) && b(!1);
12328
12329
  }
12329
12330
  })();
12330
12331
  }, [D, o]);
12331
12332
  const Q = (p, I) => {
12332
- var l;
12333
- const x = I ?? ((l = mt[p]) == null ? void 0 : l.countriesType), u = x != null ? String(x) : "all";
12333
+ var c;
12334
+ const x = I ?? ((c = mt[p]) == null ? void 0 : c.countriesType), u = x != null ? String(x) : "all";
12334
12335
  return K[u] || [];
12335
12336
  }, ee = {
12336
12337
  companyName: 1,
@@ -12394,13 +12395,13 @@ const Wa = ({
12394
12395
  if (x.isCustom) {
12395
12396
  if (x.customType === "paragraph" || x.customType === "html" || x.customType === "br" || x.customType === "link") continue;
12396
12397
  if (x.required && x.paramName) {
12397
- const u = Y[x.paramName], l = G(x.displayText, d) || G(x.label, d) || x.paramName;
12398
- x.customType === "checkbox" || x.customType === "link_checkbox" ? u !== "true" && (I[x.paramName] = d("validation.fieldRequired", { field: l })) : (!u || u.trim() === "") && (I[x.paramName] = d("validation.fieldRequired", { field: l }));
12398
+ const u = Y[x.paramName], c = G(x.displayText, d) || G(x.label, d) || x.paramName;
12399
+ x.customType === "checkbox" || x.customType === "link_checkbox" ? u !== "true" && (I[x.paramName] = d("validation.fieldRequired", { field: c })) : (!u || u.trim() === "") && (I[x.paramName] = d("validation.fieldRequired", { field: c }));
12399
12400
  }
12400
12401
  } else if (x.name) {
12401
12402
  const u = x.name;
12402
12403
  if (P.includes(u) && Rt(X[u])) {
12403
- const l = mt[u], f = G(x.displayText, d) || (l != null && l.translationKey ? d(`fields.${l.translationKey}`) : void 0) || (l == null ? void 0 : l.label) || u;
12404
+ const c = mt[u], f = G(x.displayText, d) || (c != null && c.translationKey ? d(`fields.${c.translationKey}`) : void 0) || (c == null ? void 0 : c.label) || u;
12404
12405
  I[u] = d("validation.fieldRequired", { field: f });
12405
12406
  }
12406
12407
  }
@@ -12484,8 +12485,8 @@ const Wa = ({
12484
12485
  }
12485
12486
  }
12486
12487
  u.length > 0 && (I.applicantAdditionalDatas = u);
12487
- const l = await g(I);
12488
- a(l.applicantId);
12488
+ const c = await g(I);
12489
+ a(c.applicantId);
12489
12490
  } catch (I) {
12490
12491
  console.error("Error creating company applicant:", I), E(I.message || d("createCompany.failedToCreate"));
12491
12492
  } finally {
@@ -12500,10 +12501,10 @@ const Wa = ({
12500
12501
  return;
12501
12502
  }
12502
12503
  await Ye();
12503
- }, at = (p, I, x, u, l) => {
12504
+ }, at = (p, I, x, u, c) => {
12504
12505
  const f = mt[p];
12505
12506
  if (!f) return null;
12506
- const h = P.includes(p), A = Se[p], N = G(x, d) || (f.translationKey ? d(`fields.${f.translationKey}`) : void 0) || f.label, w = p in U, ae = I ?? p, se = l ? l !== "placeholder" : q, we = se ? N : void 0;
12507
+ const h = P.includes(p), A = Se[p], N = G(x, d) || (f.translationKey ? d(`fields.${f.translationKey}`) : void 0) || f.label, w = p in U, ae = I ?? p, se = c ? c !== "placeholder" : q, we = se ? N : void 0;
12507
12508
  switch (f.type) {
12508
12509
  case "select":
12509
12510
  if (p === "countryResidence" || p === "addressCountry") {
@@ -12611,7 +12612,7 @@ const Wa = ({
12611
12612
  }
12612
12613
  ) }, `custom-${I}`);
12613
12614
  if (!p.paramName) return null;
12614
- const x = Se[p.paramName], u = G(p.displayText, d) || G(p.label, d) || p.paramName, l = p.labelMode ? p.labelMode !== "placeholder" : q;
12615
+ const x = Se[p.paramName], u = G(p.displayText, d) || G(p.label, d) || p.paramName, c = p.labelMode ? p.labelMode !== "placeholder" : q;
12615
12616
  if (p.customType === "checkbox") {
12616
12617
  const f = Y[p.paramName] === "true";
12617
12618
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
@@ -12644,8 +12645,8 @@ const Wa = ({
12644
12645
  Ce,
12645
12646
  {
12646
12647
  type: "text",
12647
- label: l ? `${u}${p.required ? " *" : ""}` : void 0,
12648
- placeholder: l ? void 0 : u,
12648
+ label: c ? `${u}${p.required ? " *" : ""}` : void 0,
12649
+ placeholder: c ? void 0 : u,
12649
12650
  value: Y[p.paramName] || "",
12650
12651
  onChange: (f) => M(p.paramName, f.target.value),
12651
12652
  required: p.required,
@@ -12676,8 +12677,8 @@ const Wa = ({
12676
12677
  }
12677
12678
  ),
12678
12679
  I && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: p.fields.map((x, u) => {
12679
- const l = Math.min(4, Math.max(1, Number(x.colSpan) || 4)), f = x.isCustom ? `custom-${u}-${x.paramName}` : `builtin-${x.name}-${u}`;
12680
- return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${l} / span ${l}` }, children: x.isCustom ? He(x, u) : at(x.name, f, x.displayText, x.countriesType, x.labelMode) }, f);
12680
+ const c = Math.min(4, Math.max(1, Number(x.colSpan) || 4)), f = x.isCustom ? `custom-${u}-${x.paramName}` : `builtin-${x.name}-${u}`;
12681
+ return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${c} / span ${c}` }, children: x.isCustom ? He(x, u) : at(x.name, f, x.displayText, x.countriesType, x.labelMode) }, f);
12681
12682
  }) })
12682
12683
  ] });
12683
12684
  };
@@ -12687,9 +12688,9 @@ const Wa = ({
12687
12688
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: d("common.loadingForm") })
12688
12689
  ] }) }) });
12689
12690
  if (T) {
12690
- const p = T[ye] ?? T[0], I = ze === -1, x = le === -1, u = T.length, l = _(p), f = ge(p), h = Object.values(Se), A = !l && !!p.conditionalOn && p.conditionalMode === "block", N = O || m || A || f;
12691
+ const p = T[ye] ?? T[0], I = ze === -1, x = le === -1, u = T.length, c = _(p), f = ge(p), h = Object.values(Se), A = !c && !!p.conditionalOn && p.conditionalMode === "block", N = O || m || A || f;
12691
12692
  let w;
12692
- return A || f ? w = d("common.blocked") : x ? w = p.conditionalOn && !l ? d("common.skipAndSubmit") : d("common.submit") : w = p.conditionalOn && !l ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
12693
+ return A || f ? w = d("common.blocked") : x ? w = p.conditionalOn && !c ? d("common.skipAndSubmit") : d("common.submit") : w = p.conditionalOn && !c ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
12693
12694
  /* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(ft, { title: (o == null ? void 0 : o.title) || d("createCompany.title") }) }),
12694
12695
  /* @__PURE__ */ s(oe, { children: [
12695
12696
  (p.title || p.subtitle) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
@@ -12773,7 +12774,7 @@ const Wa = ({
12773
12774
  className: r
12774
12775
  }) => {
12775
12776
  const { t: n } = Ie(), {
12776
- progress: c,
12777
+ progress: l,
12777
12778
  currentStep: o,
12778
12779
  steps: g,
12779
12780
  workflowKey: m,
@@ -12787,10 +12788,10 @@ const Wa = ({
12787
12788
  if (Ne.useEffect(() => {
12788
12789
  z && a && a(z);
12789
12790
  }, [z, a]), Ne.useEffect(() => {
12790
- c != null && c.workflowResult && t && t(c.workflowResult);
12791
- }, [c == null ? void 0 : c.workflowResult, t]), Ne.useEffect(() => {
12791
+ l != null && l.workflowResult && t && t(l.workflowResult);
12792
+ }, [l == null ? void 0 : l.workflowResult, t]), Ne.useEffect(() => {
12792
12793
  y && T(!1);
12793
- }, [y]), v || !c)
12794
+ }, [y]), v || !l)
12794
12795
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
12795
12796
  /* @__PURE__ */ i(Be, { className: "my-8" }),
12796
12797
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n("workflow.loadingWorkflow") })
@@ -12817,7 +12818,7 @@ const Wa = ({
12817
12818
  /* @__PURE__ */ i("p", { className: "font-medium", style: { color: "var(--metakyc-primary, #2563eb)" }, children: d })
12818
12819
  ] })
12819
12820
  ] }),
12820
- c.nextWorkflowName && /* @__PURE__ */ i("p", { className: "text-center mt-2 text-xs", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: c.nextWorkflowName })
12821
+ l.nextWorkflowName && /* @__PURE__ */ i("p", { className: "text-center mt-2 text-xs", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: l.nextWorkflowName })
12821
12822
  ] }),
12822
12823
  /* @__PURE__ */ i(
12823
12824
  "button",
@@ -12829,15 +12830,15 @@ const Wa = ({
12829
12830
  }
12830
12831
  )
12831
12832
  ] }) }) }) });
12832
- if (c.status === Ue.Finished || c.status === Ue.OnHold)
12833
+ if (l.status === Ue.Finished || l.status === Ue.OnHold)
12833
12834
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(
12834
12835
  _t,
12835
12836
  {
12836
- kycStatus: c.kycStatus,
12837
- reviewStatus: c.reviewStatus,
12838
- workflowResult: c.workflowResult,
12839
- customMessage: c.customMessage,
12840
- onContinue: t && c.workflowResult ? () => t(c.workflowResult) : void 0,
12837
+ kycStatus: l.kycStatus,
12838
+ reviewStatus: l.reviewStatus,
12839
+ workflowResult: l.workflowResult,
12840
+ customMessage: l.customMessage,
12841
+ onContinue: t && l.workflowResult ? () => t(l.workflowResult) : void 0,
12841
12842
  onContactSupport: () => {
12842
12843
  typeof window < "u" && (window.location.href = "mailto:support@example.com");
12843
12844
  }
@@ -12846,7 +12847,7 @@ const Wa = ({
12846
12847
  if (!o)
12847
12848
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
12848
12849
  /* @__PURE__ */ i(Be, { className: "my-8" }),
12849
- /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: c.status === Ue.IdentityPending ? n("workflow.loadingIdentityVerification") : n("workflow.loadingCurrentStep") })
12850
+ /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: l.status === Ue.IdentityPending ? n("workflow.loadingIdentityVerification") : n("workflow.loadingCurrentStep") })
12850
12851
  ] }) }) });
12851
12852
  const B = (K) => {
12852
12853
  switch (K) {
@@ -12883,7 +12884,7 @@ const Wa = ({
12883
12884
  }, children: [
12884
12885
  /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: "16px", gap: "8px", flexWrap: "wrap" }, children: [
12885
12886
  /* @__PURE__ */ i(ft, {}),
12886
- /* @__PURE__ */ i(si, { variant: c.status === 1 ? "info" : "success", children: n("common.stepXofY", { current: re, total: b }) })
12887
+ /* @__PURE__ */ i(si, { variant: l.status === 1 ? "info" : "success", children: n("common.stepXofY", { current: re, total: b }) })
12887
12888
  ] }),
12888
12889
  /* @__PURE__ */ s("div", { style: { position: "relative", height: "4px", borderRadius: "999px", overflow: "hidden", marginBottom: "16px" }, children: [
12889
12890
  /* @__PURE__ */ i("div", { style: { position: "absolute", inset: 0, backgroundColor: "var(--metakyc-border, #e5e7eb)", opacity: 0.3 } }),
@@ -12936,10 +12937,10 @@ const Wa = ({
12936
12937
  return /* @__PURE__ */ i(
12937
12938
  _t,
12938
12939
  {
12939
- kycStatus: c.kycStatus,
12940
- reviewStatus: c.reviewStatus,
12941
- workflowResult: c.workflowResult,
12942
- customMessage: c.customMessage
12940
+ kycStatus: l.kycStatus,
12941
+ reviewStatus: l.reviewStatus,
12942
+ workflowResult: l.workflowResult,
12943
+ customMessage: l.customMessage
12943
12944
  }
12944
12945
  );
12945
12946
  default:
@@ -12964,10 +12965,10 @@ const Wa = ({
12964
12965
  ] });
12965
12966
  }, ba = Ne.forwardRef(
12966
12967
  ({ visibleSteps: e, currentVisibleStepIndex: t, getStepFallbackName: a }, r) => {
12967
- const n = Ne.useRef(null), c = Ne.useRef(null);
12968
+ const n = Ne.useRef(null), l = Ne.useRef(null);
12968
12969
  return Ne.useImperativeHandle(r, () => n.current), Ne.useEffect(() => {
12969
- if (c.current && n.current) {
12970
- const o = n.current, g = c.current, m = g.offsetLeft - o.offsetWidth / 2 + g.offsetWidth / 2;
12970
+ if (l.current && n.current) {
12971
+ const o = n.current, g = l.current, m = g.offsetLeft - o.offsetWidth / 2 + g.offsetWidth / 2;
12971
12972
  o.scrollTo({ left: Math.max(0, m), behavior: "smooth" });
12972
12973
  }
12973
12974
  }, [t]), /* @__PURE__ */ i(
@@ -12993,7 +12994,7 @@ const Wa = ({
12993
12994
  /* @__PURE__ */ s(
12994
12995
  "div",
12995
12996
  {
12996
- ref: d ? c : void 0,
12997
+ ref: d ? l : void 0,
12997
12998
  style: {
12998
12999
  display: "flex",
12999
13000
  alignItems: "center",
@@ -13068,7 +13069,7 @@ function xa(e) {
13068
13069
  const a = e.allowedTypes.split(",").map((r) => r.trim());
13069
13070
  t = t.refine(
13070
13071
  (r) => r ? r.every(
13071
- (n) => a.some((c) => c.endsWith("/*") ? n.type.startsWith(c.slice(0, -2)) : n.type === c)
13072
+ (n) => a.some((l) => l.endsWith("/*") ? n.type.startsWith(l.slice(0, -2)) : n.type === l)
13072
13073
  ) : !0,
13073
13074
  { message: "Invalid file type" }
13074
13075
  );