@vpdev2/metakyc-sdk 1.0.64 → 1.0.66

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
@@ -1,21 +1,21 @@
1
1
  var vt = Object.defineProperty;
2
2
  var kt = (e, t, n) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var re = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
3
+ var ne = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import wt from "axios";
5
5
  import * as nt from "react";
6
- import ge, { createContext as Nt, useState as v, useMemo as Ee, useEffect as ne, useContext as St, useRef as ee, useCallback as Q, forwardRef as Ue, createElement as Qe } from "react";
6
+ import ye, { createContext as Nt, useState as v, useMemo as Ie, useEffect as ae, useContext as St, useRef as ee, useCallback as Q, forwardRef as je, createElement as Ge } from "react";
7
7
  import { jsx as r, jsxs as s, Fragment as dt } from "react/jsx-runtime";
8
- import { createPortal as Ve } from "react-dom";
9
- import { useForm as Ct, Controller as Pe } from "react-hook-form";
10
- import { z as Se } from "zod";
11
- var V = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(V || {}), qe = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(qe || {}), be = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(be || {}), At = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.RepresentativeKYC = 1] = "RepresentativeKYC", e[e.ManualRiskCriteria = 2] = "ManualRiskCriteria", e[e.UploadDocumentReview = 3] = "UploadDocumentReview", e[e.AdminReview = 4] = "AdminReview", e))(At || {}), Et = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(Et || {}), De = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(De || {}), Fe = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(Fe || {}), It = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(It || {}), Rt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(Rt || {}), xe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(xe || {}), Pt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Pt || {}), Ke = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ke || {}), Dt = /* @__PURE__ */ ((e) => (e[e.Image = 0] = "Image", e[e.Video = 1] = "Video", e[e.PDF = 2] = "PDF", e[e.OfficePDF = 3] = "OfficePDF", e[e.Custom = 4] = "Custom", e))(Dt || {}), Ft = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Ft || {}), Lt = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Lt || {}), Ie = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Decimal = 2] = "Decimal", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Ie || {}), Tt = /* @__PURE__ */ ((e) => (e[e.Text = 0] = "Text", e[e.Radio = 1] = "Radio", e[e.Checkbox = 2] = "Checkbox", e[e.Dropdown = 3] = "Dropdown", e[e.Country = 4] = "Country", e))(Tt || {}), Mt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Mt || {}), he = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(he || {}), Ot = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(Ot || {});
12
- const Le = {
8
+ import { createPortal as Ze } from "react-dom";
9
+ import { useForm as Ct, Controller as De } from "react-hook-form";
10
+ import { z as Ce } from "zod";
11
+ var V = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(V || {}), Ke = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(Ke || {}), ve = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(ve || {}), At = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.RepresentativeKYC = 1] = "RepresentativeKYC", e[e.ManualRiskCriteria = 2] = "ManualRiskCriteria", e[e.UploadDocumentReview = 3] = "UploadDocumentReview", e[e.AdminReview = 4] = "AdminReview", e))(At || {}), Et = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(Et || {}), Fe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(Fe || {}), Le = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(Le || {}), It = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(It || {}), Rt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(Rt || {}), be = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(be || {}), Pt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Pt || {}), We = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(We || {}), Dt = /* @__PURE__ */ ((e) => (e[e.Image = 0] = "Image", e[e.Video = 1] = "Video", e[e.PDF = 2] = "PDF", e[e.OfficePDF = 3] = "OfficePDF", e[e.Custom = 4] = "Custom", e))(Dt || {}), Ft = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Ft || {}), Lt = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Lt || {}), Re = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Decimal = 2] = "Decimal", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Re || {}), Tt = /* @__PURE__ */ ((e) => (e[e.Text = 0] = "Text", e[e.Radio = 1] = "Radio", e[e.Checkbox = 2] = "Checkbox", e[e.Dropdown = 3] = "Dropdown", e[e.Country = 4] = "Country", e))(Tt || {}), Mt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Mt || {}), ge = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(ge || {}), Ot = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(Ot || {});
12
+ const Te = {
13
13
  Nationality: 10,
14
14
  Address: 20,
15
15
  CountryOfBirth: 30,
16
16
  PhoneNumber: 40,
17
17
  UboAddress: 50
18
- }, Te = {
18
+ }, Me = {
19
19
  firstName: { label: "First Name", type: "text" },
20
20
  lastName: { label: "Last Name", type: "text" },
21
21
  email: { label: "Email", type: "email" },
@@ -23,17 +23,17 @@ const Le = {
23
23
  dateOfBirth: { label: "Date of Birth", type: "date" },
24
24
  salutation: { label: "Salutation", type: "select" },
25
25
  title: { label: "Title", type: "text" },
26
- mobileCountryCode: { label: "Mobile Country Code", type: "select", countriesType: Le.PhoneNumber },
26
+ mobileCountryCode: { label: "Mobile Country Code", type: "select", countriesType: Te.PhoneNumber },
27
27
  street: { label: "Street", type: "text" },
28
28
  streetNumber: { label: "Street Number", type: "text" },
29
29
  zip: { label: "ZIP / Postal Code", type: "text" },
30
30
  city: { label: "City", type: "text" },
31
- country: { label: "Country", type: "select", countriesType: Le.Address },
32
- nationality: { label: "Nationality", type: "select", countriesType: Le.Nationality },
33
- otherNationality: { label: "Other Nationalities", type: "multiselect", countriesType: Le.Nationality },
34
- countryOfBirth: { label: "Country of Birth", type: "select", countriesType: Le.CountryOfBirth },
31
+ country: { label: "Country", type: "select", countriesType: Te.Address },
32
+ nationality: { label: "Nationality", type: "select", countriesType: Te.Nationality },
33
+ otherNationality: { label: "Other Nationalities", type: "multiselect", countriesType: Te.Nationality },
34
+ countryOfBirth: { label: "Country of Birth", type: "select", countriesType: Te.CountryOfBirth },
35
35
  placeOfBirth: { label: "Place of Birth", type: "text" },
36
- taxCountry: { label: "Tax Country", type: "select", countriesType: Le.Address },
36
+ taxCountry: { label: "Tax Country", type: "select", countriesType: Te.Address },
37
37
  taxNumber: { label: "Tax Number", type: "text" },
38
38
  defaultLanguage: { label: "Default Language", type: "select" },
39
39
  educationLevel: { label: "Education Level", type: "text" },
@@ -63,7 +63,7 @@ const Le = {
63
63
  { value: "FI", label: "Finnish" },
64
64
  { value: "NO", label: "Norwegian" }
65
65
  ];
66
- var ce = /* @__PURE__ */ ((e) => (e.Default = "default", e.Corporate = "corporate", e.Fintech = "fintech", e.Healthcare = "healthcare", e.Modern = "modern", e.Minimal = "minimal", e))(ce || {});
66
+ var le = /* @__PURE__ */ ((e) => (e.Default = "default", e.Corporate = "corporate", e.Fintech = "fintech", e.Healthcare = "healthcare", e.Modern = "modern", e.Minimal = "minimal", e))(le || {});
67
67
  const $t = {
68
68
  timeout: 3e4,
69
69
  retries: 3,
@@ -112,19 +112,19 @@ class Bt {
112
112
  }[t] || t;
113
113
  }
114
114
  }
115
- class Ne extends Error {
115
+ class Se extends Error {
116
116
  constructor(n, a, i, o, l) {
117
117
  super(n);
118
- re(this, "response");
119
- this.code = a, this.details = i, this.validationErrors = o, this.name = "MetaKYCError", this.response = l, Object.setPrototypeOf(this, Ne.prototype);
118
+ ne(this, "response");
119
+ this.code = a, this.details = i, this.validationErrors = o, this.name = "MetaKYCError", this.response = l, Object.setPrototypeOf(this, Se.prototype);
120
120
  }
121
121
  }
122
- class ze {
122
+ class $e {
123
123
  /**
124
124
  * Process an error from the API response
125
125
  */
126
126
  static handleApiError(t) {
127
- return new Ne(
127
+ return new Se(
128
128
  t.message || "An unknown error occurred",
129
129
  t.code,
130
130
  t.details || void 0,
@@ -137,43 +137,43 @@ class ze {
137
137
  static handleAxiosError(t) {
138
138
  if (t.response) {
139
139
  const n = t.response.data;
140
- return n && n.error ? new Ne(
140
+ return n && n.error ? new Se(
141
141
  n.error.message || "An unknown error occurred",
142
142
  n.error.code,
143
143
  n.error.details || void 0,
144
144
  n.error.validationErrors || void 0,
145
145
  t.response
146
- ) : n && n.result && n.result.message ? new Ne(
146
+ ) : n && n.result && n.result.message ? new Se(
147
147
  n.result.message,
148
148
  t.response.status,
149
149
  `HTTP ${t.response.status}: ${t.response.statusText}`,
150
150
  void 0,
151
151
  t.response
152
- ) : new Ne(
152
+ ) : new Se(
153
153
  (n == null ? void 0 : n.message) || t.message || "Request failed",
154
154
  t.response.status,
155
155
  `HTTP ${t.response.status}: ${t.response.statusText}`,
156
156
  void 0,
157
157
  t.response
158
158
  );
159
- } else return t.request ? new Ne(
159
+ } else return t.request ? new Se(
160
160
  "No response from server",
161
161
  0,
162
162
  "The request was made but no response was received. Please check your network connection."
163
- ) : new Ne(t.message || "An unexpected error occurred", 0, t.toString());
163
+ ) : new Se(t.message || "An unexpected error occurred", 0, t.toString());
164
164
  }
165
165
  /**
166
166
  * Check if an error is a MetaKYCError
167
167
  */
168
168
  static isMetaKYCError(t) {
169
- return t instanceof Ne;
169
+ return t instanceof Se;
170
170
  }
171
171
  }
172
172
  class _t {
173
173
  constructor(t) {
174
- re(this, "axiosInstance");
175
- re(this, "endpointBuilder");
176
- re(this, "config");
174
+ ne(this, "axiosInstance");
175
+ ne(this, "endpointBuilder");
176
+ ne(this, "config");
177
177
  this.config = { ...$t, ...t }, this.endpointBuilder = new Bt(this.config.endpoints), this.axiosInstance = wt.create({
178
178
  baseURL: this.config.baseUrl,
179
179
  timeout: this.config.timeout,
@@ -210,7 +210,7 @@ class _t {
210
210
  });
211
211
  return this.handleResponse(o);
212
212
  } catch (i) {
213
- throw ze.handleAxiosError(i);
213
+ throw $e.handleAxiosError(i);
214
214
  }
215
215
  }
216
216
  /**
@@ -221,7 +221,7 @@ class _t {
221
221
  const i = this.buildEndpoint(t, n), o = await this.axiosInstance.post(i, a);
222
222
  return this.handleResponse(o);
223
223
  } catch (i) {
224
- throw ze.handleAxiosError(i);
224
+ throw $e.handleAxiosError(i);
225
225
  }
226
226
  }
227
227
  /**
@@ -232,7 +232,7 @@ class _t {
232
232
  const i = this.buildEndpoint(t, n), o = await this.axiosInstance.put(i, a);
233
233
  return this.handleResponse(o);
234
234
  } catch (i) {
235
- throw ze.handleAxiosError(i);
235
+ throw $e.handleAxiosError(i);
236
236
  }
237
237
  }
238
238
  /**
@@ -245,7 +245,7 @@ class _t {
245
245
  });
246
246
  return this.handleResponse(o);
247
247
  } catch (i) {
248
- throw ze.handleAxiosError(i);
248
+ throw $e.handleAxiosError(i);
249
249
  }
250
250
  }
251
251
  /**
@@ -254,7 +254,7 @@ class _t {
254
254
  handleResponse(t) {
255
255
  const n = t.data;
256
256
  if (!n.success && n.error)
257
- throw ze.handleApiError(n.error);
257
+ throw $e.handleApiError(n.error);
258
258
  return n;
259
259
  }
260
260
  /**
@@ -872,14 +872,14 @@ const ue = {
872
872
  inputHeight: "2.25rem"
873
873
  }
874
874
  }, tr = {
875
- [ce.Default]: ue,
876
- [ce.Corporate]: Vt,
877
- [ce.Fintech]: Zt,
878
- [ce.Healthcare]: Jt,
879
- [ce.Modern]: Xt,
880
- [ce.Minimal]: er
875
+ [le.Default]: ue,
876
+ [le.Corporate]: Vt,
877
+ [le.Fintech]: Zt,
878
+ [le.Healthcare]: Jt,
879
+ [le.Modern]: Xt,
880
+ [le.Minimal]: er
881
881
  };
882
- function $e(e) {
882
+ function Be(e) {
883
883
  return tr[e] || ue;
884
884
  }
885
885
  class rr {
@@ -897,8 +897,8 @@ class rr {
897
897
  "GetThemeConfiguration"
898
898
  );
899
899
  if (!n.result.isEnabled)
900
- return $e(ce.Default);
901
- let a = n.result.preset ? $e(n.result.preset) : $e(ce.Default);
900
+ return Be(le.Default);
901
+ let a = n.result.preset ? Be(n.result.preset) : Be(le.Default);
902
902
  if (n.result.title && (a.title = n.result.title), n.result.logo && (a.logo = { ...a.logo, ...n.result.logo }), n.result.colors && (a.colors = { ...a.colors, ...n.result.colors }), n.result.typography && (a.typography = { ...a.typography, ...n.result.typography }), n.result.spacing && (a.spacing = { ...a.spacing, ...n.result.spacing }), n.result.customCSS && (a.customCSS = n.result.customCSS), n.result.darkMode && (a.darkMode = {
903
903
  colors: {
904
904
  ...(t = a.darkMode) == null ? void 0 : t.colors,
@@ -921,7 +921,7 @@ class rr {
921
921
  }
922
922
  return a;
923
923
  } catch (n) {
924
- return console.warn("[ThemeService] Failed to fetch theme configuration:", n), $e(ce.Default);
924
+ return console.warn("[ThemeService] Failed to fetch theme configuration:", n), Be(le.Default);
925
925
  }
926
926
  }
927
927
  /**
@@ -935,19 +935,19 @@ class rr {
935
935
  */
936
936
  getAvailablePresets() {
937
937
  return [
938
- { id: ce.Default, name: "Default" },
939
- { id: ce.Corporate, name: "Corporate" },
940
- { id: ce.Fintech, name: "Fintech" },
941
- { id: ce.Healthcare, name: "Healthcare" },
942
- { id: ce.Modern, name: "Modern" },
943
- { id: ce.Minimal, name: "Minimal" }
938
+ { id: le.Default, name: "Default" },
939
+ { id: le.Corporate, name: "Corporate" },
940
+ { id: le.Fintech, name: "Fintech" },
941
+ { id: le.Healthcare, name: "Healthcare" },
942
+ { id: le.Modern, name: "Modern" },
943
+ { id: le.Minimal, name: "Minimal" }
944
944
  ];
945
945
  }
946
946
  /**
947
947
  * Preview theme (doesn't save)
948
948
  */
949
949
  getPreviewTheme(t, n) {
950
- const a = $e(t);
950
+ const a = Be(t);
951
951
  return n ? {
952
952
  ...a,
953
953
  ...n,
@@ -960,7 +960,7 @@ class rr {
960
960
  }
961
961
  class nr {
962
962
  constructor() {
963
- re(this, "listeners", /* @__PURE__ */ new Map());
963
+ ne(this, "listeners", /* @__PURE__ */ new Map());
964
964
  }
965
965
  /**
966
966
  * Subscribe to an event
@@ -1005,10 +1005,10 @@ class nr {
1005
1005
  }
1006
1006
  class ar {
1007
1007
  constructor() {
1008
- re(this, "events", new nr());
1009
- re(this, "_applicantId", null);
1010
- re(this, "_progress", null);
1011
- re(this, "_error", null);
1008
+ ne(this, "events", new nr());
1009
+ ne(this, "_applicantId", null);
1010
+ ne(this, "_progress", null);
1011
+ ne(this, "_error", null);
1012
1012
  }
1013
1013
  /**
1014
1014
  * Get current applicant ID
@@ -1041,7 +1041,7 @@ class ar {
1041
1041
  */
1042
1042
  get status() {
1043
1043
  var t;
1044
- return ((t = this._progress) == null ? void 0 : t.status) || be.None;
1044
+ return ((t = this._progress) == null ? void 0 : t.status) || ve.None;
1045
1045
  }
1046
1046
  /**
1047
1047
  * Get workflow result
@@ -1060,19 +1060,19 @@ class ar {
1060
1060
  * Check if workflow is complete
1061
1061
  */
1062
1062
  get isComplete() {
1063
- return this.status === be.Finished;
1063
+ return this.status === ve.Finished;
1064
1064
  }
1065
1065
  /**
1066
1066
  * Check if workflow is on hold
1067
1067
  */
1068
1068
  get isOnHold() {
1069
- return this.status === be.OnHold;
1069
+ return this.status === ve.OnHold;
1070
1070
  }
1071
1071
  /**
1072
1072
  * Check if workflow is in progress
1073
1073
  */
1074
1074
  get isInProgress() {
1075
- return this.status === be.InProgress;
1075
+ return this.status === ve.InProgress;
1076
1076
  }
1077
1077
  /**
1078
1078
  * Set applicant ID
@@ -1086,7 +1086,7 @@ class ar {
1086
1086
  updateProgress(t) {
1087
1087
  var a, i;
1088
1088
  const n = (a = this._progress) == null ? void 0 : a.currentStep;
1089
- this._progress = t, this._applicantId = t.applicantId, this._error = null, this.events.emit("progressUpdated", t), (n == null ? void 0 : n.order) !== ((i = t.currentStep) == null ? void 0 : i.order) && this.events.emit("stepChanged", t.currentStep), this.events.emit("statusChanged", t.status), t.status === be.Finished && t.workflowResult && this.events.emit("completed", t.workflowResult);
1089
+ this._progress = t, this._applicantId = t.applicantId, this._error = null, this.events.emit("progressUpdated", t), (n == null ? void 0 : n.order) !== ((i = t.currentStep) == null ? void 0 : i.order) && this.events.emit("stepChanged", t.currentStep), this.events.emit("statusChanged", t.status), t.status === ve.Finished && t.workflowResult && this.events.emit("completed", t.workflowResult);
1090
1090
  }
1091
1091
  /**
1092
1092
  * Set error
@@ -1145,7 +1145,7 @@ class ar {
1145
1145
  }
1146
1146
  class ir {
1147
1147
  constructor() {
1148
- re(this, "handlers", /* @__PURE__ */ new Map());
1148
+ ne(this, "handlers", /* @__PURE__ */ new Map());
1149
1149
  }
1150
1150
  /**
1151
1151
  * Register a step handler
@@ -1186,8 +1186,8 @@ class ir {
1186
1186
  }
1187
1187
  class sr {
1188
1188
  constructor(t, n, a, i, o, l, d, u) {
1189
- re(this, "state");
1190
- re(this, "stepRouter");
1189
+ ne(this, "state");
1190
+ ne(this, "stepRouter");
1191
1191
  this.applicantService = t, this.questionnaireService = n, this.uploadDocumentService = a, this.appropriatenessTestService = i, this.overviewService = o, this.riskScoringService = l, this.investorCategorizationService = u, this.state = new ar(), this.stepRouter = new ir(), this.registerStepHandlers();
1192
1192
  }
1193
1193
  /**
@@ -1347,8 +1347,8 @@ function sn(e) {
1347
1347
  }
1348
1348
  class or {
1349
1349
  constructor(t) {
1350
- re(this, "sdk", null);
1351
- re(this, "config");
1350
+ ne(this, "sdk", null);
1351
+ ne(this, "config");
1352
1352
  this.config = t;
1353
1353
  }
1354
1354
  /**
@@ -1402,8 +1402,8 @@ class or {
1402
1402
  }
1403
1403
  class lr {
1404
1404
  constructor(t) {
1405
- re(this, "sdk", null);
1406
- re(this, "config");
1405
+ ne(this, "sdk", null);
1406
+ ne(this, "config");
1407
1407
  this.config = t;
1408
1408
  }
1409
1409
  /**
@@ -1468,9 +1468,9 @@ class lr {
1468
1468
  }
1469
1469
  class cr {
1470
1470
  constructor(t) {
1471
- re(this, "sardineContext", null);
1472
- re(this, "config");
1473
- re(this, "sessionKey");
1471
+ ne(this, "sardineContext", null);
1472
+ ne(this, "config");
1473
+ ne(this, "sessionKey");
1474
1474
  this.config = t, this.sessionKey = t.sessionKey || this.generateSessionKey();
1475
1475
  }
1476
1476
  /**
@@ -1610,17 +1610,17 @@ class cr {
1610
1610
  this.sardineContext && (this.sardineContext = null);
1611
1611
  }
1612
1612
  }
1613
- class Me {
1613
+ class Oe {
1614
1614
  /**
1615
1615
  * Create a provider instance
1616
1616
  */
1617
1617
  static createProvider(t, n) {
1618
1618
  switch (t) {
1619
- case xe.Sumsub:
1619
+ case be.Sumsub:
1620
1620
  return new or(n);
1621
- case xe.Onfido:
1621
+ case be.Onfido:
1622
1622
  return new lr(n);
1623
- case xe.SardinAI:
1623
+ case be.SardinAI:
1624
1624
  return new cr(n);
1625
1625
  default:
1626
1626
  throw new Error(`Unsupported identity provider: ${t}`);
@@ -1632,7 +1632,7 @@ class Me {
1632
1632
  static parseProviderConfig(t, n, a) {
1633
1633
  var i;
1634
1634
  switch (t) {
1635
- case xe.Sumsub:
1635
+ case be.Sumsub:
1636
1636
  return {
1637
1637
  accessToken: n.accessToken || n.token,
1638
1638
  applicantEmail: n.email,
@@ -1640,11 +1640,11 @@ class Me {
1640
1640
  externalUserId: n.externalUserId,
1641
1641
  lang: n.lang || "en"
1642
1642
  };
1643
- case xe.Onfido:
1643
+ case be.Onfido:
1644
1644
  return {
1645
1645
  token: n.token || n.sdkToken
1646
1646
  };
1647
- case xe.SardinAI:
1647
+ case be.SardinAI:
1648
1648
  const o = ((i = a == null ? void 0 : a.identityProviders) == null ? void 0 : i.sardinai) || {};
1649
1649
  return {
1650
1650
  clientId: o.clientId || n.clientId,
@@ -1662,9 +1662,9 @@ class Me {
1662
1662
  }
1663
1663
  class dr {
1664
1664
  constructor(t) {
1665
- re(this, "currentTheme", ue);
1666
- re(this, "customStyleElement", null);
1667
- re(this, "container");
1665
+ ne(this, "currentTheme", ue);
1666
+ ne(this, "customStyleElement", null);
1667
+ ne(this, "container");
1668
1668
  this.container = t || document.documentElement;
1669
1669
  }
1670
1670
  /**
@@ -1789,8 +1789,8 @@ class dr {
1789
1789
  }
1790
1790
  }
1791
1791
  const mt = Nt(null), on = ({ config: e, children: t }) => {
1792
- const [n, a] = v(null), i = ge.useRef(!1), o = ge.useRef(!1), l = Ee(() => {
1793
- const u = new _t(e), p = new Ht(u), b = new Ut(u), N = new jt(u), m = new qt(u), x = new Kt(u), h = new Wt(u), C = new Yt(u), D = new Qt(u), k = new Gt(u), z = new rr(u), A = new dr();
1792
+ const [n, a] = v(null), i = ye.useRef(!1), o = ye.useRef(!1), l = Ie(() => {
1793
+ const u = new _t(e), p = new Ht(u), b = new Ut(u), N = new jt(u), m = new qt(u), x = new Kt(u), g = new Wt(u), C = new Yt(u), D = new Qt(u), k = new Gt(u), z = new rr(u), A = new dr();
1794
1794
  return {
1795
1795
  httpClient: u,
1796
1796
  applicantService: p,
@@ -1798,14 +1798,14 @@ const mt = Nt(null), on = ({ config: e, children: t }) => {
1798
1798
  uploadDocumentService: N,
1799
1799
  appropriatenessTestService: m,
1800
1800
  overviewService: x,
1801
- riskScoringService: h,
1801
+ riskScoringService: g,
1802
1802
  identityService: C,
1803
1803
  baseInformationService: D,
1804
1804
  investorCategorizationService: k,
1805
1805
  themeService: z,
1806
1806
  themeManager: A
1807
1807
  };
1808
- }, [e]), d = Ee(() => ({
1808
+ }, [e]), d = Ie(() => ({
1809
1809
  config: e,
1810
1810
  ...l,
1811
1811
  currentTheme: n,
@@ -1820,7 +1820,7 @@ const mt = Nt(null), on = ({ config: e, children: t }) => {
1820
1820
  l.investorCategorizationService
1821
1821
  )
1822
1822
  }), [e, l, n]);
1823
- return ne(() => ((async () => {
1823
+ return ae(() => ((async () => {
1824
1824
  if (i.current || o.current) {
1825
1825
  console.log("[MetaKYC] Theme already loading or loaded, skipping...");
1826
1826
  return;
@@ -1843,7 +1843,7 @@ const mt = Nt(null), on = ({ config: e, children: t }) => {
1843
1843
  l.themeManager.cleanup();
1844
1844
  }), []), /* @__PURE__ */ r(mt.Provider, { value: d, children: t });
1845
1845
  };
1846
- function ye() {
1846
+ function fe() {
1847
1847
  const e = St(mt);
1848
1848
  if (!e)
1849
1849
  throw new Error("useMetaKYC must be used within a MetaKYCProvider");
@@ -1870,7 +1870,7 @@ function cn(e, t) {
1870
1870
  return e.type === a;
1871
1871
  });
1872
1872
  }
1873
- function Ye(e) {
1873
+ function Qe(e) {
1874
1874
  if (e === 0) return "0 Bytes";
1875
1875
  const t = 1024, n = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(e) / Math.log(t));
1876
1876
  return Math.round(e / Math.pow(t, a) * 100) / 100 + " " + n[a];
@@ -1878,23 +1878,23 @@ function Ye(e) {
1878
1878
  function dn(e) {
1879
1879
  return e;
1880
1880
  }
1881
- function oe(...e) {
1881
+ function se(...e) {
1882
1882
  return e.filter(Boolean).join(" ");
1883
1883
  }
1884
- const Oe = {
1884
+ const ze = {
1885
1885
  APPLICANT_ID: "metakyc_applicant_id",
1886
1886
  WORKFLOW_STATE: "metakyc_workflow_state"
1887
1887
  };
1888
1888
  function mr(e) {
1889
1889
  try {
1890
- localStorage.setItem(Oe.APPLICANT_ID, e.toString());
1890
+ localStorage.setItem(ze.APPLICANT_ID, e.toString());
1891
1891
  } catch (t) {
1892
1892
  console.warn("Failed to save applicant ID to storage:", t);
1893
1893
  }
1894
1894
  }
1895
1895
  function pr() {
1896
1896
  try {
1897
- const e = localStorage.getItem(Oe.APPLICANT_ID);
1897
+ const e = localStorage.getItem(ze.APPLICANT_ID);
1898
1898
  return e ? parseInt(e, 10) : null;
1899
1899
  } catch (e) {
1900
1900
  return console.warn("Failed to retrieve applicant ID from storage:", e), null;
@@ -1902,21 +1902,21 @@ function pr() {
1902
1902
  }
1903
1903
  function hr() {
1904
1904
  try {
1905
- localStorage.removeItem(Oe.APPLICANT_ID);
1905
+ localStorage.removeItem(ze.APPLICANT_ID);
1906
1906
  } catch (e) {
1907
1907
  console.warn("Failed to clear applicant ID from storage:", e);
1908
1908
  }
1909
1909
  }
1910
1910
  function gr(e) {
1911
1911
  try {
1912
- localStorage.setItem(Oe.WORKFLOW_STATE, JSON.stringify(e));
1912
+ localStorage.setItem(ze.WORKFLOW_STATE, JSON.stringify(e));
1913
1913
  } catch (t) {
1914
1914
  console.warn("Failed to save workflow state to storage:", t);
1915
1915
  }
1916
1916
  }
1917
1917
  function un() {
1918
1918
  try {
1919
- const e = localStorage.getItem(Oe.WORKFLOW_STATE);
1919
+ const e = localStorage.getItem(ze.WORKFLOW_STATE);
1920
1920
  return e ? JSON.parse(e) : null;
1921
1921
  } catch (e) {
1922
1922
  return console.warn("Failed to retrieve workflow state from storage:", e), null;
@@ -1924,7 +1924,7 @@ function un() {
1924
1924
  }
1925
1925
  function yr() {
1926
1926
  try {
1927
- localStorage.removeItem(Oe.WORKFLOW_STATE);
1927
+ localStorage.removeItem(ze.WORKFLOW_STATE);
1928
1928
  } catch (e) {
1929
1929
  console.warn("Failed to clear workflow state from storage:", e);
1930
1930
  }
@@ -1933,10 +1933,10 @@ function mn() {
1933
1933
  hr(), yr();
1934
1934
  }
1935
1935
  function fr(e) {
1936
- const { createOrchestrator: t } = ye(), [n, a] = v(null), [i, o] = v(!1), [l, d] = v(null), u = ee(null), p = e || pr();
1937
- ne(() => {
1936
+ const { createOrchestrator: t } = fe(), [n, a] = v(null), [i, o] = v(!1), [l, d] = v(null), u = ee(null), p = e || pr();
1937
+ ae(() => {
1938
1938
  u.current || (u.current = t());
1939
- }, [t]), ne(() => {
1939
+ }, [t]), ae(() => {
1940
1940
  var A;
1941
1941
  n && p && (mr(p), gr({
1942
1942
  applicantId: p,
@@ -1964,7 +1964,7 @@ function fr(e) {
1964
1964
  }
1965
1965
  }
1966
1966
  }, [p]);
1967
- ne(() => {
1967
+ ae(() => {
1968
1968
  p && !N.current && m();
1969
1969
  }, [p, m]);
1970
1970
  const x = Q(async () => {
@@ -1983,7 +1983,7 @@ function fr(e) {
1983
1983
  o(!1), b.current = !1;
1984
1984
  }
1985
1985
  }
1986
- }, []), h = Q(async () => {
1986
+ }, []), g = Q(async () => {
1987
1987
  if (u.current) {
1988
1988
  o(!0), d(null);
1989
1989
  try {
@@ -2026,24 +2026,24 @@ function fr(e) {
2026
2026
  applicantId: p,
2027
2027
  currentStep: (n == null ? void 0 : n.currentStep) || null,
2028
2028
  steps: k,
2029
- status: (n == null ? void 0 : n.status) || be.None,
2029
+ status: (n == null ? void 0 : n.status) || ve.None,
2030
2030
  workflowResult: (n == null ? void 0 : n.workflowResult) || null,
2031
2031
  workflowKey: n == null ? void 0 : n.workFlowKey,
2032
2032
  nextWorkflowKey: n == null ? void 0 : n.nextWorkflowKey,
2033
2033
  hasWorkflowChanged: z,
2034
2034
  isLoading: i,
2035
2035
  error: l,
2036
- isComplete: (n == null ? void 0 : n.status) === be.Finished,
2037
- isOnHold: (n == null ? void 0 : n.status) === be.OnHold,
2036
+ isComplete: (n == null ? void 0 : n.status) === ve.Finished,
2037
+ isOnHold: (n == null ? void 0 : n.status) === ve.OnHold,
2038
2038
  refreshProgress: x,
2039
- moveToNext: h,
2039
+ moveToNext: g,
2040
2040
  moveBack: C,
2041
2041
  submitCurrentStep: D,
2042
2042
  orchestrator: u.current
2043
2043
  };
2044
2044
  }
2045
2045
  function xr(e) {
2046
- const { questionnaireService: t, applicantService: n } = ye(), [a, i] = v(null), [o, l] = v({}), [d, u] = v(!1), [p, b] = v(!1), [N, m] = v(null), x = ee(!1), h = ee(null), C = Q(async () => {
2046
+ const { questionnaireService: t, applicantService: n } = fe(), [a, i] = v(null), [o, l] = v({}), [d, u] = v(!1), [p, b] = v(!1), [N, m] = v(null), x = ee(!1), g = ee(null), C = Q(async () => {
2047
2047
  var k, z;
2048
2048
  if (e) {
2049
2049
  if (x.current) {
@@ -2067,7 +2067,7 @@ function xr(e) {
2067
2067
  }
2068
2068
  l(G);
2069
2069
  }
2070
- h.current = e;
2070
+ g.current = e;
2071
2071
  } catch (A) {
2072
2072
  m(A);
2073
2073
  } finally {
@@ -2075,8 +2075,8 @@ function xr(e) {
2075
2075
  }
2076
2076
  }
2077
2077
  }, [e, t, n]);
2078
- ne(() => {
2079
- e && h.current !== e && C();
2078
+ ae(() => {
2079
+ e && g.current !== e && C();
2080
2080
  }, [e]);
2081
2081
  const D = Q(
2082
2082
  async (k) => {
@@ -2102,7 +2102,7 @@ function xr(e) {
2102
2102
  };
2103
2103
  }
2104
2104
  function br(e) {
2105
- const { uploadDocumentService: t } = ye(), [n, a] = v(null), [i, o] = v(!1), [l, d] = v(!1), [u, p] = v(0), [b, N] = v(null), m = ee(!1), x = ee(null), h = Q(async () => {
2105
+ const { uploadDocumentService: t } = fe(), [n, a] = v(null), [i, o] = v(!1), [l, d] = v(!1), [u, p] = v(0), [b, N] = v(null), m = ee(!1), x = ee(null), g = Q(async () => {
2106
2106
  if (e) {
2107
2107
  if (m.current) {
2108
2108
  console.log("[UploadDocument] Load already in progress, skipping...");
@@ -2119,8 +2119,8 @@ function br(e) {
2119
2119
  }
2120
2120
  }
2121
2121
  }, [e, t]);
2122
- ne(() => {
2123
- e && x.current !== e && h();
2122
+ ae(() => {
2123
+ e && x.current !== e && g();
2124
2124
  }, [e]);
2125
2125
  const C = Q(
2126
2126
  async (D) => {
@@ -2141,12 +2141,12 @@ function br(e) {
2141
2141
  isSubmitting: l,
2142
2142
  uploadProgress: u,
2143
2143
  error: b,
2144
- load: h,
2144
+ load: g,
2145
2145
  submit: C
2146
2146
  };
2147
2147
  }
2148
2148
  function pn(e) {
2149
- const { appropriatenessTestService: t } = ye(), [n, a] = v(null), [i, o] = v(!1), [l, d] = v(!1), [u, p] = v(null), [b, N] = v(null), m = ee(!1), x = ee(null), h = Q(async () => {
2149
+ const { appropriatenessTestService: t } = fe(), [n, a] = v(null), [i, o] = v(!1), [l, d] = v(!1), [u, p] = v(null), [b, N] = v(null), m = ee(!1), x = ee(null), g = Q(async () => {
2150
2150
  if (e) {
2151
2151
  if (m.current) {
2152
2152
  console.log("[AppropriatenessTest] Load already in progress, skipping...");
@@ -2163,8 +2163,8 @@ function pn(e) {
2163
2163
  }
2164
2164
  }
2165
2165
  }, [e, t]);
2166
- ne(() => {
2167
- e && x.current !== e && h();
2166
+ ae(() => {
2167
+ e && x.current !== e && g();
2168
2168
  }, [e]);
2169
2169
  const C = Q(
2170
2170
  async (D) => {
@@ -2186,12 +2186,12 @@ function pn(e) {
2186
2186
  isLoading: i,
2187
2187
  isSubmitting: l,
2188
2188
  error: u,
2189
- load: h,
2189
+ load: g,
2190
2190
  submit: C
2191
2191
  };
2192
2192
  }
2193
2193
  function vr(e) {
2194
- const { overviewService: t } = ye(), [n, a] = v(null), [i, o] = v(!1), [l, d] = v(!1), [u, p] = v(null), b = ee(!1), N = ee(null), m = Q(async () => {
2194
+ const { overviewService: t } = fe(), [n, a] = v(null), [i, o] = v(!1), [l, d] = v(!1), [u, p] = v(null), b = ee(!1), N = ee(null), m = Q(async () => {
2195
2195
  if (e) {
2196
2196
  if (b.current) {
2197
2197
  console.log("[Overview] Load already in progress, skipping...");
@@ -2199,16 +2199,16 @@ function vr(e) {
2199
2199
  }
2200
2200
  b.current = !0, o(!0), p(null);
2201
2201
  try {
2202
- const h = await t.getOverviewData(e);
2203
- a(h), N.current = e;
2204
- } catch (h) {
2205
- p(h);
2202
+ const g = await t.getOverviewData(e);
2203
+ a(g), N.current = e;
2204
+ } catch (g) {
2205
+ p(g);
2206
2206
  } finally {
2207
2207
  o(!1), b.current = !1;
2208
2208
  }
2209
2209
  }
2210
2210
  }, [e, t]);
2211
- ne(() => {
2211
+ ae(() => {
2212
2212
  e && N.current !== e && m();
2213
2213
  }, [e]);
2214
2214
  const x = Q(async () => {
@@ -2216,8 +2216,8 @@ function vr(e) {
2216
2216
  d(!0), p(null);
2217
2217
  try {
2218
2218
  await t.passOverview(e);
2219
- } catch (h) {
2220
- throw p(h), h;
2219
+ } catch (g) {
2220
+ throw p(g), g;
2221
2221
  } finally {
2222
2222
  d(!1);
2223
2223
  }
@@ -2233,7 +2233,7 @@ function vr(e) {
2233
2233
  };
2234
2234
  }
2235
2235
  function kr(e) {
2236
- const { identityService: t } = ye(), [n, a] = v(
2236
+ const { identityService: t } = fe(), [n, a] = v(
2237
2237
  null
2238
2238
  ), [i, o] = v(!1), [l, d] = v(null), u = ee(!1), p = Q(
2239
2239
  async (m, x) => {
@@ -2244,18 +2244,18 @@ function kr(e) {
2244
2244
  }
2245
2245
  u.current = !0, o(!0), d(null);
2246
2246
  try {
2247
- const h = {
2247
+ const g = {
2248
2248
  applicantId: e,
2249
2249
  restart: !1,
2250
2250
  redirectUrl: m || "",
2251
2251
  ttl: x || 604800
2252
2252
  // Default: 7 days
2253
2253
  };
2254
- console.log("Identity request input:", h);
2255
- const C = await t.identityRequest(h);
2254
+ console.log("Identity request input:", g);
2255
+ const C = await t.identityRequest(g);
2256
2256
  return console.log("Identity request result:", C), a(C), C;
2257
- } catch (h) {
2258
- throw d(h), h;
2257
+ } catch (g) {
2258
+ throw d(g), g;
2259
2259
  } finally {
2260
2260
  o(!1), u.current = !1;
2261
2261
  }
@@ -2267,15 +2267,15 @@ function kr(e) {
2267
2267
  if (e) {
2268
2268
  o(!0), d(null);
2269
2269
  try {
2270
- const h = {
2270
+ const g = {
2271
2271
  applicantId: e,
2272
2272
  restart: !1,
2273
2273
  redirectUrl: m,
2274
2274
  ttl: x
2275
- }, C = await t.identityCompanyRequest(h);
2275
+ }, C = await t.identityCompanyRequest(g);
2276
2276
  return a(C), C;
2277
- } catch (h) {
2278
- throw d(h), h;
2277
+ } catch (g) {
2278
+ throw d(g), g;
2279
2279
  } finally {
2280
2280
  o(!1);
2281
2281
  }
@@ -2319,7 +2319,7 @@ function kr(e) {
2319
2319
  };
2320
2320
  }
2321
2321
  function wr(e) {
2322
- const { riskScoringService: t, applicantService: n } = ye(), [a, i] = v(null), [o, l] = v({}), [d, u] = v(!1), [p, b] = v(!1), [N, m] = v(null), [x, h] = v(null), C = ee(!1), D = ee(null), k = Q(async () => {
2322
+ const { riskScoringService: t, applicantService: n } = fe(), [a, i] = v(null), [o, l] = v({}), [d, u] = v(!1), [p, b] = v(!1), [N, m] = v(null), [x, g] = v(null), C = ee(!1), D = ee(null), k = Q(async () => {
2323
2323
  var A;
2324
2324
  if (e) {
2325
2325
  if (C.current) {
@@ -2351,7 +2351,7 @@ function wr(e) {
2351
2351
  }
2352
2352
  }
2353
2353
  }, [e, t, n]);
2354
- ne(() => {
2354
+ ae(() => {
2355
2355
  e && D.current !== e && k();
2356
2356
  }, [e]);
2357
2357
  const z = Q(
@@ -2359,7 +2359,7 @@ function wr(e) {
2359
2359
  b(!0), m(null);
2360
2360
  try {
2361
2361
  const I = await t.submitRiskScoring(A);
2362
- return h(I), I;
2362
+ return g(I), I;
2363
2363
  } catch (I) {
2364
2364
  throw m(I), I;
2365
2365
  } finally {
@@ -2380,17 +2380,17 @@ function wr(e) {
2380
2380
  };
2381
2381
  }
2382
2382
  function Nr() {
2383
- const { applicantService: e, config: t } = ye(), [n, a] = v(!1), [i, o] = v(null), l = ee(!1), d = ee(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(x) {
2384
- const h = Math.random() * 16 | 0;
2385
- return (x === "x" ? h : h & 3 | 8).toString(16);
2383
+ const { applicantService: e, config: t } = fe(), [n, a] = v(!1), [i, o] = v(null), l = ee(!1), d = ee(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(x) {
2384
+ const g = Math.random() * 16 | 0;
2385
+ return (x === "x" ? g : g & 3 | 8).toString(16);
2386
2386
  }), p = Q(
2387
2387
  async (x) => {
2388
- var h;
2388
+ var g;
2389
2389
  if (l.current)
2390
2390
  throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
2391
2391
  l.current = !0, a(!0), o(null);
2392
2392
  try {
2393
- if (x.applicantAdditionalDatas || (x.applicantAdditionalDatas = []), (h = t.identityProviders) != null && h.sardinai) {
2393
+ if (x.applicantAdditionalDatas || (x.applicantAdditionalDatas = []), (g = t.identityProviders) != null && g.sardinai) {
2394
2394
  const D = u();
2395
2395
  console.log("[SardinAI] Generated session key:", D), x.applicantAdditionalDatas.push({
2396
2396
  paramName: "sessionKey",
@@ -2410,8 +2410,8 @@ function Nr() {
2410
2410
  a(!0), o(null);
2411
2411
  try {
2412
2412
  return await e.createCompanyApplicant(x);
2413
- } catch (h) {
2414
- throw o(h), h;
2413
+ } catch (g) {
2414
+ throw o(g), g;
2415
2415
  } finally {
2416
2416
  a(!1);
2417
2417
  }
@@ -2424,8 +2424,8 @@ function Nr() {
2424
2424
  d.current = !0, a(!0), o(null);
2425
2425
  try {
2426
2426
  return await e.getApplicantData(x);
2427
- } catch (h) {
2428
- throw o(h), h;
2427
+ } catch (g) {
2428
+ throw o(g), g;
2429
2429
  } finally {
2430
2430
  a(!1), d.current = !1;
2431
2431
  }
@@ -2436,8 +2436,8 @@ function Nr() {
2436
2436
  a(!0), o(null);
2437
2437
  try {
2438
2438
  await e.stopProgress(x);
2439
- } catch (h) {
2440
- throw o(h), h;
2439
+ } catch (g) {
2440
+ throw o(g), g;
2441
2441
  } finally {
2442
2442
  a(!1);
2443
2443
  }
@@ -2476,7 +2476,7 @@ const Z = ({
2476
2476
  return /* @__PURE__ */ s(
2477
2477
  "button",
2478
2478
  {
2479
- className: oe(d, u[t], p[n], o),
2479
+ className: se(d, u[t], p[n], o),
2480
2480
  disabled: i || a,
2481
2481
  ...l,
2482
2482
  children: [
@@ -2514,7 +2514,7 @@ const Z = ({
2514
2514
  ]
2515
2515
  }
2516
2516
  );
2517
- }, me = Ue(
2517
+ }, me = je(
2518
2518
  ({ label: e, error: t, helperText: n, leftIcon: a, rightIcon: i, className: o, style: l, ...d }, u) => /* @__PURE__ */ s("div", { className: "w-full", children: [
2519
2519
  e && /* @__PURE__ */ s(
2520
2520
  "label",
@@ -2533,7 +2533,7 @@ const Z = ({
2533
2533
  "input",
2534
2534
  {
2535
2535
  ref: u,
2536
- className: oe(
2536
+ className: se(
2537
2537
  "block w-full rounded-lg border px-3 py-2 text-sm transition-colors",
2538
2538
  "focus:outline-none focus:ring-2 focus:ring-offset-0",
2539
2539
  "disabled:opacity-60 disabled:cursor-not-allowed",
@@ -2560,7 +2560,7 @@ me.displayName = "Input";
2560
2560
  const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2561
2561
  "div",
2562
2562
  {
2563
- className: oe(
2563
+ className: se(
2564
2564
  "metakyc-card rounded-xl shadow-sm border",
2565
2565
  t
2566
2566
  ),
@@ -2571,30 +2571,30 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2571
2571
  ...n,
2572
2572
  children: e
2573
2573
  }
2574
- ), de = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2574
+ ), ce = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2575
2575
  "div",
2576
2576
  {
2577
- className: oe("px-6 py-4 border-b", t),
2577
+ className: se("px-6 py-4 border-b", t),
2578
2578
  style: {
2579
2579
  borderColor: "var(--metakyc-border, #e5e7eb)"
2580
2580
  },
2581
2581
  ...n,
2582
2582
  children: e
2583
2583
  }
2584
- ), W = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r("div", { className: oe("px-6 py-4", t), ...n, children: e }), pe = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2584
+ ), W = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r("div", { className: se("px-6 py-4", t), ...n, children: e }), pe = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2585
2585
  "div",
2586
2586
  {
2587
- className: oe("px-6 py-4 border-t", t),
2587
+ className: se("px-6 py-4 border-t", t),
2588
2588
  style: {
2589
2589
  borderColor: "var(--metakyc-border, #e5e7eb)"
2590
2590
  },
2591
2591
  ...n,
2592
2592
  children: e
2593
2593
  }
2594
- ), Ae = ({ children: e, variant: t = "default", className: n, ...a }) => /* @__PURE__ */ r(
2594
+ ), Ee = ({ children: e, variant: t = "default", className: n, ...a }) => /* @__PURE__ */ r(
2595
2595
  "span",
2596
2596
  {
2597
- className: oe(
2597
+ className: se(
2598
2598
  "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",
2599
2599
  {
2600
2600
  default: "bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",
@@ -2608,16 +2608,16 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2608
2608
  ...a,
2609
2609
  children: e
2610
2610
  }
2611
- ), ve = ({ size: e = "md", className: t, ...n }) => {
2611
+ ), ke = ({ size: e = "md", className: t, ...n }) => {
2612
2612
  const a = {
2613
2613
  sm: "h-4 w-4",
2614
2614
  md: "h-8 w-8",
2615
2615
  lg: "h-12 w-12"
2616
2616
  };
2617
- return /* @__PURE__ */ r("div", { className: oe("flex items-center justify-center", t), ...n, children: /* @__PURE__ */ s(
2617
+ return /* @__PURE__ */ r("div", { className: se("flex items-center justify-center", t), ...n, children: /* @__PURE__ */ s(
2618
2618
  "svg",
2619
2619
  {
2620
- className: oe("animate-spin text-primary-500", a[e]),
2620
+ className: se("animate-spin text-primary-500", a[e]),
2621
2621
  xmlns: "http://www.w3.org/2000/svg",
2622
2622
  fill: "none",
2623
2623
  viewBox: "0 0 24 24",
@@ -2644,7 +2644,7 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2644
2644
  ]
2645
2645
  }
2646
2646
  ) });
2647
- }, He = Ue(
2647
+ }, Ue = je(
2648
2648
  ({ label: e, error: t, helperText: n, options: a, placeholder: i, className: o, style: l, ...d }, u) => /* @__PURE__ */ s("div", { className: "w-full", children: [
2649
2649
  e && /* @__PURE__ */ s(
2650
2650
  "label",
@@ -2661,7 +2661,7 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2661
2661
  "select",
2662
2662
  {
2663
2663
  ref: u,
2664
- className: oe(
2664
+ className: se(
2665
2665
  "block w-full rounded-lg border px-3 py-2 text-sm transition-colors",
2666
2666
  "focus:outline-none focus:ring-2 focus:ring-offset-0",
2667
2667
  "disabled:opacity-60 disabled:cursor-not-allowed",
@@ -2710,7 +2710,7 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2710
2710
  !t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
2711
2711
  ] })
2712
2712
  );
2713
- He.displayName = "Select";
2713
+ Ue.displayName = "Select";
2714
2714
  const it = 280, Sr = ({
2715
2715
  label: e,
2716
2716
  value: t,
@@ -2720,10 +2720,10 @@ const it = 280, Sr = ({
2720
2720
  disabled: o = !1,
2721
2721
  required: l = !1
2722
2722
  }) => {
2723
- const [d, u] = v(!1), [p, b] = v(""), [N, m] = v(null), x = ee(null), h = ee(null), C = ee(null), D = Q(() => {
2724
- if (!h.current) return null;
2725
- const w = h.current.getBoundingClientRect(), te = window.innerHeight - w.bottom < it && w.top > it;
2726
- return { top: te ? w.top : w.bottom + 4, left: w.left, width: w.width, openUp: te };
2723
+ const [d, u] = v(!1), [p, b] = v(""), [N, m] = v(null), x = ee(null), g = ee(null), C = ee(null), D = Q(() => {
2724
+ if (!g.current) return null;
2725
+ const w = g.current.getBoundingClientRect(), re = window.innerHeight - w.bottom < it && w.top > it;
2726
+ return { top: re ? w.top : w.bottom + 4, left: w.left, width: w.width, openUp: re };
2727
2727
  }, []), k = Q(() => {
2728
2728
  if (o) return;
2729
2729
  const w = D();
@@ -2731,15 +2731,15 @@ const it = 280, Sr = ({
2731
2731
  }, [o, D]), z = Q(() => {
2732
2732
  u(!1), b("");
2733
2733
  }, []);
2734
- ne(() => {
2734
+ ae(() => {
2735
2735
  if (!d) return;
2736
2736
  const w = (q) => {
2737
- var B, F;
2738
- const te = q.target;
2739
- !((B = x.current) != null && B.contains(te)) && !((F = C.current) != null && F.contains(te)) && z();
2737
+ var _, F;
2738
+ const re = q.target;
2739
+ !((_ = x.current) != null && _.contains(re)) && !((F = C.current) != null && F.contains(re)) && z();
2740
2740
  };
2741
2741
  return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
2742
- }, [d, z]), ne(() => {
2742
+ }, [d, z]), ae(() => {
2743
2743
  if (!d) return;
2744
2744
  const w = () => {
2745
2745
  const q = D();
@@ -2754,11 +2754,11 @@ const it = 280, Sr = ({
2754
2754
  ), I = (w) => {
2755
2755
  o || n(t.includes(w) ? t.filter((q) => q !== w) : [...t, w]);
2756
2756
  }, j = (w, q) => {
2757
- q.stopPropagation(), o || n(t.filter((te) => te !== w));
2757
+ q.stopPropagation(), o || n(t.filter((re) => re !== w));
2758
2758
  }, G = (w) => {
2759
2759
  var q;
2760
- return ((q = a.find((te) => te.value === w)) == null ? void 0 : q.label) || w;
2761
- }, E = h.current ? getComputedStyle(h.current) : null, f = (E == null ? void 0 : E.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", R = (E == null ? void 0 : E.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", P = (E == null ? void 0 : E.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", O = (E == null ? void 0 : E.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", H = (E == null ? void 0 : E.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", M = (E == null ? void 0 : E.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", T = (E == null ? void 0 : E.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", J = d && N && /* @__PURE__ */ s(
2760
+ return ((q = a.find((re) => re.value === w)) == null ? void 0 : q.label) || w;
2761
+ }, E = g.current ? getComputedStyle(g.current) : null, f = (E == null ? void 0 : E.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", R = (E == null ? void 0 : E.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", P = (E == null ? void 0 : E.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", O = (E == null ? void 0 : E.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", H = (E == null ? void 0 : E.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", M = (E == null ? void 0 : E.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", T = (E == null ? void 0 : E.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", J = d && N && /* @__PURE__ */ s(
2762
2762
  "div",
2763
2763
  {
2764
2764
  ref: C,
@@ -2819,11 +2819,11 @@ const it = 280, Sr = ({
2819
2819
  color: q ? H : P,
2820
2820
  userSelect: "none"
2821
2821
  },
2822
- onMouseEnter: (te) => {
2823
- q || (te.currentTarget.style.backgroundColor = T);
2822
+ onMouseEnter: (re) => {
2823
+ q || (re.currentTarget.style.backgroundColor = T);
2824
2824
  },
2825
- onMouseLeave: (te) => {
2826
- q || (te.currentTarget.style.backgroundColor = "transparent");
2825
+ onMouseLeave: (re) => {
2826
+ q || (re.currentTarget.style.backgroundColor = "transparent");
2827
2827
  },
2828
2828
  children: [
2829
2829
  /* @__PURE__ */ r(
@@ -2874,9 +2874,9 @@ const it = 280, Sr = ({
2874
2874
  /* @__PURE__ */ s(
2875
2875
  "div",
2876
2876
  {
2877
- ref: h,
2877
+ ref: g,
2878
2878
  onClick: () => d ? z() : k(),
2879
- className: oe(
2879
+ className: se(
2880
2880
  "metakyc-multiselect-trigger",
2881
2881
  "min-h-[42px] w-full px-3 py-2 rounded-lg border text-sm transition-colors relative",
2882
2882
  o ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
@@ -2948,9 +2948,9 @@ const it = 280, Sr = ({
2948
2948
  ]
2949
2949
  }
2950
2950
  ),
2951
- typeof document < "u" && J ? Ve(J, document.body) : null
2951
+ typeof document < "u" && J ? Ze(J, document.body) : null
2952
2952
  ] });
2953
- }, st = 260, We = ({
2953
+ }, st = 260, Ye = ({
2954
2954
  label: e,
2955
2955
  error: t,
2956
2956
  helperText: n,
@@ -2963,7 +2963,7 @@ const it = 280, Sr = ({
2963
2963
  className: p
2964
2964
  }) => {
2965
2965
  var F;
2966
- const [b, N] = v(!1), [m, x] = v(""), [h, C] = v(null), D = ee(null), k = ee(null), z = ee(null), A = ee(null), I = Q(() => {
2966
+ const [b, N] = v(!1), [m, x] = v(""), [g, C] = v(null), D = ee(null), k = ee(null), z = ee(null), A = ee(null), I = Q(() => {
2967
2967
  if (!k.current) return null;
2968
2968
  const S = k.current.getBoundingClientRect(), X = window.innerHeight - S.bottom < st && S.top > st;
2969
2969
  return {
@@ -2979,15 +2979,15 @@ const it = 280, Sr = ({
2979
2979
  }, [d, I]), G = Q(() => {
2980
2980
  N(!1), x("");
2981
2981
  }, []), E = () => b ? G() : j();
2982
- ne(() => {
2982
+ ae(() => {
2983
2983
  if (!b) return;
2984
2984
  const S = (U) => {
2985
- var Y, we;
2985
+ var Y, Ne;
2986
2986
  const X = U.target;
2987
- !((Y = D.current) != null && Y.contains(X)) && !((we = z.current) != null && we.contains(X)) && G();
2987
+ !((Y = D.current) != null && Y.contains(X)) && !((Ne = z.current) != null && Ne.contains(X)) && G();
2988
2988
  };
2989
2989
  return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
2990
- }, [b, G]), ne(() => {
2990
+ }, [b, G]), ae(() => {
2991
2991
  if (!b) return;
2992
2992
  const S = () => {
2993
2993
  const U = I();
@@ -2996,7 +2996,7 @@ const it = 280, Sr = ({
2996
2996
  return window.addEventListener("scroll", S, !0), window.addEventListener("resize", S), () => {
2997
2997
  window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S);
2998
2998
  };
2999
- }, [b, I]), ne(() => {
2999
+ }, [b, I]), ae(() => {
3000
3000
  b && A.current && setTimeout(() => {
3001
3001
  var S;
3002
3002
  return (S = A.current) == null ? void 0 : S.focus();
@@ -3006,17 +3006,17 @@ const it = 280, Sr = ({
3006
3006
  (S) => S.label.toLowerCase().includes(m.toLowerCase()) || S.value.toLowerCase().includes(m.toLowerCase())
3007
3007
  ), R = (F = a.find((S) => S.value === o)) == null ? void 0 : F.label, P = (S, U) => {
3008
3008
  d || U || (l(S), G());
3009
- }, O = k.current ? getComputedStyle(k.current) : null, H = (O == null ? void 0 : O.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", M = (O == null ? void 0 : O.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", T = (O == null ? void 0 : O.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", J = (O == null ? void 0 : O.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", w = (O == null ? void 0 : O.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", q = (O == null ? void 0 : O.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", te = (O == null ? void 0 : O.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", B = b && h && /* @__PURE__ */ s(
3009
+ }, O = k.current ? getComputedStyle(k.current) : null, H = (O == null ? void 0 : O.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", M = (O == null ? void 0 : O.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", T = (O == null ? void 0 : O.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", J = (O == null ? void 0 : O.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", w = (O == null ? void 0 : O.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", q = (O == null ? void 0 : O.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", re = (O == null ? void 0 : O.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", _ = b && g && /* @__PURE__ */ s(
3010
3010
  "div",
3011
3011
  {
3012
3012
  ref: z,
3013
3013
  className: "metakyc-searchable-select-dropdown",
3014
3014
  style: {
3015
3015
  position: "fixed",
3016
- top: h.openUp ? void 0 : h.top,
3017
- bottom: h.openUp ? window.innerHeight - h.top + 4 : void 0,
3018
- left: h.left,
3019
- width: h.width,
3016
+ top: g.openUp ? void 0 : g.top,
3017
+ bottom: g.openUp ? window.innerHeight - g.top + 4 : void 0,
3018
+ left: g.left,
3019
+ width: g.width,
3020
3020
  zIndex: 99999,
3021
3021
  borderRadius: "8px",
3022
3022
  boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
@@ -3076,7 +3076,7 @@ const it = 280, Sr = ({
3076
3076
  userSelect: "none"
3077
3077
  },
3078
3078
  onMouseEnter: (X) => {
3079
- !U && !S.disabled && (X.currentTarget.style.backgroundColor = te);
3079
+ !U && !S.disabled && (X.currentTarget.style.backgroundColor = re);
3080
3080
  },
3081
3081
  onMouseLeave: (X) => {
3082
3082
  U || (X.currentTarget.style.backgroundColor = "transparent");
@@ -3094,7 +3094,7 @@ const it = 280, Sr = ({
3094
3094
  return /* @__PURE__ */ s(
3095
3095
  "div",
3096
3096
  {
3097
- className: oe("w-full metakyc-searchable-select", p),
3097
+ className: se("w-full metakyc-searchable-select", p),
3098
3098
  ref: D,
3099
3099
  children: [
3100
3100
  e && /* @__PURE__ */ s(
@@ -3118,7 +3118,7 @@ const it = 280, Sr = ({
3118
3118
  onKeyDown: (S) => {
3119
3119
  (S.key === "Enter" || S.key === " ") && (S.preventDefault(), E()), S.key === "Escape" && G();
3120
3120
  },
3121
- className: oe(
3121
+ className: se(
3122
3122
  "metakyc-searchable-select-trigger",
3123
3123
  "w-full px-3 py-2 rounded-lg border text-sm transition-colors text-left",
3124
3124
  "flex items-center justify-between gap-2",
@@ -3146,14 +3146,14 @@ const it = 280, Sr = ({
3146
3146
  ]
3147
3147
  }
3148
3148
  ),
3149
- typeof document < "u" && B ? Ve(B, document.body) : null,
3149
+ typeof document < "u" && _ ? Ze(_, document.body) : null,
3150
3150
  t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
3151
3151
  !t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
3152
3152
  ]
3153
3153
  }
3154
3154
  );
3155
3155
  };
3156
- We.displayName = "SearchableSelect";
3156
+ Ye.displayName = "SearchableSelect";
3157
3157
  const Cr = ({
3158
3158
  label: e,
3159
3159
  error: t,
@@ -3168,7 +3168,7 @@ const Cr = ({
3168
3168
  if (!k) return;
3169
3169
  const z = Array.from(k);
3170
3170
  if (i && z.filter((I) => I.size > i).length > 0) {
3171
- const I = Ye(i);
3171
+ const I = Qe(i);
3172
3172
  alert(`Some files exceed the maximum size of ${I}`);
3173
3173
  return;
3174
3174
  }
@@ -3177,7 +3177,7 @@ const Cr = ({
3177
3177
  k.preventDefault(), p(!0);
3178
3178
  }, x = () => {
3179
3179
  p(!1);
3180
- }, h = (k) => {
3180
+ }, g = (k) => {
3181
3181
  k.preventDefault(), p(!1), N(k.dataTransfer.files);
3182
3182
  }, C = () => {
3183
3183
  var k;
@@ -3186,19 +3186,19 @@ const Cr = ({
3186
3186
  const z = l.filter((A, I) => I !== k);
3187
3187
  o == null || o(z);
3188
3188
  };
3189
- return /* @__PURE__ */ s("div", { className: oe("w-full", d), children: [
3189
+ return /* @__PURE__ */ s("div", { className: se("w-full", d), children: [
3190
3190
  e && /* @__PURE__ */ r("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: e }),
3191
3191
  /* @__PURE__ */ s(
3192
3192
  "div",
3193
3193
  {
3194
- className: oe(
3194
+ className: se(
3195
3195
  "border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition-colors",
3196
3196
  u ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-300 dark:border-gray-600 hover:border-primary-500",
3197
3197
  t && "border-danger-500"
3198
3198
  ),
3199
3199
  onDragOver: m,
3200
3200
  onDragLeave: x,
3201
- onDrop: h,
3201
+ onDrop: g,
3202
3202
  onClick: C,
3203
3203
  children: [
3204
3204
  /* @__PURE__ */ r(
@@ -3237,7 +3237,7 @@ const Cr = ({
3237
3237
  ] }),
3238
3238
  i && /* @__PURE__ */ s("p", { className: "text-xs text-gray-500", children: [
3239
3239
  "Maximum file size: ",
3240
- Ye(i)
3240
+ Qe(i)
3241
3241
  ] })
3242
3242
  ] })
3243
3243
  ]
@@ -3268,7 +3268,7 @@ const Cr = ({
3268
3268
  /* @__PURE__ */ r("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children: k.name }),
3269
3269
  /* @__PURE__ */ s("span", { className: "text-xs text-gray-500", children: [
3270
3270
  "(",
3271
- Ye(k.size),
3271
+ Qe(k.size),
3272
3272
  ")"
3273
3273
  ] })
3274
3274
  ] }),
@@ -3296,7 +3296,7 @@ const Cr = ({
3296
3296
  )) }),
3297
3297
  t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm text-danger-500", children: t })
3298
3298
  ] });
3299
- }, Ar = Ue(
3299
+ }, Ar = je(
3300
3300
  ({ countryCode: e = "+1", onCountryCodeChange: t, className: n, ...a }, i) => /* @__PURE__ */ s("div", { className: "w-full", children: [
3301
3301
  a.label && /* @__PURE__ */ s(
3302
3302
  "label",
@@ -3316,7 +3316,7 @@ const Cr = ({
3316
3316
  type: "text",
3317
3317
  value: e,
3318
3318
  onChange: (o) => t == null ? void 0 : t(o.target.value),
3319
- className: oe(
3319
+ className: se(
3320
3320
  "w-20 rounded-lg border px-3 py-2 text-sm",
3321
3321
  "focus:outline-none focus:ring-2 focus:ring-offset-0"
3322
3322
  ),
@@ -3333,7 +3333,7 @@ const Cr = ({
3333
3333
  {
3334
3334
  ref: i,
3335
3335
  type: "tel",
3336
- className: oe("flex-1", n),
3336
+ className: se("flex-1", n),
3337
3337
  ...a,
3338
3338
  label: ""
3339
3339
  }
@@ -3412,7 +3412,7 @@ const Pr = (e) => {
3412
3412
  * This source code is licensed under the ISC license.
3413
3413
  * See the LICENSE file in the root directory of this source tree.
3414
3414
  */
3415
- const Dr = Ue(
3415
+ const Dr = je(
3416
3416
  ({
3417
3417
  color: e = "currentColor",
3418
3418
  size: t = 24,
@@ -3422,7 +3422,7 @@ const Dr = Ue(
3422
3422
  children: o,
3423
3423
  iconNode: l,
3424
3424
  ...d
3425
- }, u) => Qe(
3425
+ }, u) => Ge(
3426
3426
  "svg",
3427
3427
  {
3428
3428
  ref: u,
@@ -3436,7 +3436,7 @@ const Dr = Ue(
3436
3436
  ...d
3437
3437
  },
3438
3438
  [
3439
- ...l.map(([p, b]) => Qe(p, b)),
3439
+ ...l.map(([p, b]) => Ge(p, b)),
3440
3440
  ...Array.isArray(o) ? o : [o]
3441
3441
  ]
3442
3442
  )
@@ -3448,8 +3448,8 @@ const Dr = Ue(
3448
3448
  * See the LICENSE file in the root directory of this source tree.
3449
3449
  */
3450
3450
  const ht = (e, t) => {
3451
- const n = Ue(
3452
- ({ className: a, ...i }, o) => Qe(Dr, {
3451
+ const n = je(
3452
+ ({ className: a, ...i }, o) => Ge(Dr, {
3453
3453
  ref: o,
3454
3454
  iconNode: t,
3455
3455
  className: pt(
@@ -3520,11 +3520,11 @@ const Or = ({
3520
3520
  onComplete: t,
3521
3521
  onBack: n
3522
3522
  }) => {
3523
- const { questionnaire: a, initialAnswers: i, isLoading: o, isSubmitting: l, error: d, submit: u } = xr(e), [p, b] = v({}), [N, m] = v({}), [x, h] = v(0);
3524
- ge.useEffect(() => {
3523
+ const { questionnaire: a, initialAnswers: i, isLoading: o, isSubmitting: l, error: d, submit: u } = xr(e), [p, b] = v({}), [N, m] = v({}), [x, g] = v(0);
3524
+ ye.useEffect(() => {
3525
3525
  i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && b(i);
3526
3526
  }, [i]);
3527
- const C = Ee(
3527
+ const C = Ie(
3528
3528
  () => a ? Mr(a.questionGroups) : [],
3529
3529
  [a]
3530
3530
  ), D = x === C.length - 1, k = C[x] ?? [], z = Q((E, f) => {
@@ -3540,9 +3540,9 @@ const Or = ({
3540
3540
  }
3541
3541
  return m((f) => ({ ...f, ...E })), Object.keys(E).length === 0;
3542
3542
  }, [k, p]), I = () => {
3543
- A() && h((E) => E + 1);
3543
+ A() && g((E) => E + 1);
3544
3544
  }, j = () => {
3545
- x > 0 ? h((E) => E - 1) : n == null || n();
3545
+ x > 0 ? g((E) => E - 1) : n == null || n();
3546
3546
  }, G = async () => {
3547
3547
  if (!(!A() || !a))
3548
3548
  try {
@@ -3561,11 +3561,11 @@ const Or = ({
3561
3561
  console.error("Questionnaire submit error:", E);
3562
3562
  }
3563
3563
  };
3564
- return o ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(ve, { className: "my-8" }) }) }) : d ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3564
+ return o ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(ke, { className: "my-8" }) }) }) : d ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3565
3565
  "Error loading questionnaire: ",
3566
3566
  d.message
3567
3567
  ] }) }) }) : a ? /* @__PURE__ */ s(K, { children: [
3568
- /* @__PURE__ */ s(de, { children: [
3568
+ /* @__PURE__ */ s(ce, { children: [
3569
3569
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.displayName }),
3570
3570
  a.subtitle && /* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: a.subtitle }),
3571
3571
  C.length > 1 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-3", children: [
@@ -3657,7 +3657,7 @@ const Or = ({
3657
3657
  }
3658
3658
  ),
3659
3659
  o === "single-select" && /* @__PURE__ */ r(
3660
- He,
3660
+ Ue,
3661
3661
  {
3662
3662
  value: t[0] ?? "",
3663
3663
  onChange: (d) => a([d.target.value]),
@@ -3751,15 +3751,15 @@ const Or = ({
3751
3751
  const { uploadDocument: a, isLoading: i, isSubmitting: o, error: l, submit: d } = br(e), [u, p] = v({}), b = async (N) => {
3752
3752
  if (N.preventDefault(), !a) return;
3753
3753
  const m = await Promise.all(
3754
- a.uploadDocumentFiles.map(async (h) => {
3755
- const C = u[h.id] || [], D = await Promise.all(
3754
+ a.uploadDocumentFiles.map(async (g) => {
3755
+ const C = u[g.id] || [], D = await Promise.all(
3756
3756
  C.map(async (k) => ({
3757
3757
  fileName: k.name,
3758
3758
  fileData: await ur(k)
3759
3759
  }))
3760
3760
  );
3761
3761
  return {
3762
- uploadDocumentFileId: h.id,
3762
+ uploadDocumentFileId: g.id,
3763
3763
  valueList: D
3764
3764
  };
3765
3765
  })
@@ -3770,11 +3770,11 @@ const Or = ({
3770
3770
  };
3771
3771
  await d(x), t == null || t();
3772
3772
  };
3773
- return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(ve, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3773
+ return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(ke, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3774
3774
  "Error loading document requirements: ",
3775
3775
  l.message
3776
3776
  ] }) }) }) : a ? /* @__PURE__ */ r("form", { onSubmit: b, children: /* @__PURE__ */ s(K, { children: [
3777
- /* @__PURE__ */ s(de, { children: [
3777
+ /* @__PURE__ */ s(ce, { children: [
3778
3778
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.displayName }),
3779
3779
  a.subtitle && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: a.subtitle })
3780
3780
  ] }),
@@ -3801,11 +3801,11 @@ const Or = ({
3801
3801
  const { overview: a, isLoading: i, isSubmitting: o, error: l, passOverview: d } = vr(e), u = async () => {
3802
3802
  await d(), t == null || t();
3803
3803
  };
3804
- return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(ve, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3804
+ return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(ke, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3805
3805
  "Error loading overview: ",
3806
3806
  l.message
3807
3807
  ] }) }) }) : a ? /* @__PURE__ */ s(K, { children: [
3808
- /* @__PURE__ */ s(de, { children: [
3808
+ /* @__PURE__ */ s(ce, { children: [
3809
3809
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.title || "Overview" }),
3810
3810
  a.description && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: a.description })
3811
3811
  ] }),
@@ -3846,7 +3846,7 @@ function _r(e, t) {
3846
3846
  return e.errorMessage || "Invalid format";
3847
3847
  } catch {
3848
3848
  }
3849
- const i = e.valueDataType === Ie.Integer || e.valueDataType === Ie.Decimal || e.valueDataType === Ie.DigitOnly;
3849
+ const i = e.valueDataType === Re.Integer || e.valueDataType === Re.Decimal || e.valueDataType === Re.DigitOnly;
3850
3850
  if (i && a.trim() !== "") {
3851
3851
  const o = Number(a);
3852
3852
  if (!isNaN(o)) {
@@ -3879,15 +3879,15 @@ const jr = ({
3879
3879
  onComplete: t,
3880
3880
  onBack: n
3881
3881
  }) => {
3882
- const { criteria: a, initialAnswers: i, isLoading: o, isSubmitting: l, error: d, submit: u } = wr(e), [p, b] = v({}), [N, m] = v({}), [x, h] = v(0), [C, D] = v(!1);
3883
- ge.useEffect(() => {
3882
+ const { criteria: a, initialAnswers: i, isLoading: o, isSubmitting: l, error: d, submit: u } = wr(e), [p, b] = v({}), [N, m] = v({}), [x, g] = v(0), [C, D] = v(!1);
3883
+ ye.useEffect(() => {
3884
3884
  i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && b(i);
3885
3885
  }, [i]);
3886
- const k = Ee(
3886
+ const k = Ie(
3887
3887
  () => a && a.length > 0 ? Hr(a) : [],
3888
3888
  [a]
3889
3889
  ), z = x === k.length - 1, A = k[x] ?? [];
3890
- ge.useEffect(() => {
3890
+ ye.useEffect(() => {
3891
3891
  !o && a && a.length === 0 && !C && !l && (D(!0), u({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
3892
3892
  }, [o, a, C, l, u, e, t]);
3893
3893
  const I = Q((R, P) => {
@@ -3903,9 +3903,9 @@ const jr = ({
3903
3903
  }
3904
3904
  return m((P) => ({ ...P, ...R })), Object.keys(R).length === 0;
3905
3905
  }, [A, p]), G = () => {
3906
- j() && h((R) => R + 1);
3906
+ j() && g((R) => R + 1);
3907
3907
  }, E = () => {
3908
- x > 0 ? h((R) => R - 1) : n == null || n();
3908
+ x > 0 ? g((R) => R - 1) : n == null || n();
3909
3909
  }, f = async () => {
3910
3910
  if (!(!j() || !a))
3911
3911
  try {
@@ -3919,16 +3919,16 @@ const jr = ({
3919
3919
  }
3920
3920
  };
3921
3921
  return o ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
3922
- /* @__PURE__ */ r(ve, { className: "my-8" }),
3922
+ /* @__PURE__ */ r(ke, { className: "my-8" }),
3923
3923
  /* @__PURE__ */ r("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Loading risk scoring criteria…" })
3924
3924
  ] }) }) : !o && a && a.length === 0 ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
3925
- /* @__PURE__ */ r(ve, { className: "my-8" }),
3925
+ /* @__PURE__ */ r(ke, { className: "my-8" }),
3926
3926
  /* @__PURE__ */ r("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "No criteria required. Moving to next step…" })
3927
3927
  ] }) }) : d ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3928
3928
  "Error loading criteria: ",
3929
3929
  d.message
3930
3930
  ] }) }) }) : a ? /* @__PURE__ */ s(K, { children: [
3931
- /* @__PURE__ */ s(de, { children: [
3931
+ /* @__PURE__ */ s(ce, { children: [
3932
3932
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: "Risk Assessment" }),
3933
3933
  /* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Please answer the following questions for risk evaluation" }),
3934
3934
  k.length > 1 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-3", children: [
@@ -3992,7 +3992,7 @@ const jr = ({
3992
3992
  d && /* @__PURE__ */ r("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: d.message }) })
3993
3993
  ] }) : null;
3994
3994
  }, qr = ({ criterion: e, value: t, error: n, onChange: a }) => {
3995
- const i = Ur(e), o = e.valueDataType === Ie.Integer || e.valueDataType === Ie.Decimal || e.valueDataType === Ie.DigitOnly;
3995
+ const i = Ur(e), o = e.valueDataType === Re.Integer || e.valueDataType === Re.Decimal || e.valueDataType === Re.DigitOnly;
3996
3996
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
3997
3997
  /* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
3998
3998
  e.displayName,
@@ -4012,7 +4012,7 @@ const jr = ({
4012
4012
  min: e.min,
4013
4013
  max: e.max,
4014
4014
  onKeyDown: (l) => {
4015
- e.valueDataType === Ie.DigitOnly && ["e", "E", "+", "-", "."].includes(l.key) && l.preventDefault();
4015
+ e.valueDataType === Re.DigitOnly && ["e", "E", "+", "-", "."].includes(l.key) && l.preventDefault();
4016
4016
  }
4017
4017
  }
4018
4018
  ),
@@ -4091,7 +4091,7 @@ const jr = ({
4091
4091
  n && /* @__PURE__ */ r("p", { className: "text-sm text-danger-500", children: n })
4092
4092
  ] }),
4093
4093
  i === "country" && /* @__PURE__ */ r(
4094
- He,
4094
+ Ue,
4095
4095
  {
4096
4096
  value: t[0] ?? "",
4097
4097
  onChange: (l) => a([l.target.value]),
@@ -4113,7 +4113,7 @@ const jr = ({
4113
4113
  onComplete: t,
4114
4114
  onBack: n
4115
4115
  }) => {
4116
- const { investorCategorizationService: a } = ye(), [i, o] = v(null), [l, d] = v(!1), [u, p] = v(null);
4116
+ const { investorCategorizationService: a } = fe(), [i, o] = v(null), [l, d] = v(!1), [u, p] = v(null);
4117
4117
  return /* @__PURE__ */ r("form", { onSubmit: async (N) => {
4118
4118
  if (N.preventDefault(), i === null) {
4119
4119
  p("Please select an investor type");
@@ -4134,7 +4134,7 @@ const jr = ({
4134
4134
  d(!1);
4135
4135
  }
4136
4136
  }, children: /* @__PURE__ */ s(K, { children: [
4137
- /* @__PURE__ */ s(de, { children: [
4137
+ /* @__PURE__ */ s(ce, { children: [
4138
4138
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: "Which statement best describes you?" }),
4139
4139
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: "All Tokenise clients are treated as Retail Investors under EU regulation, which gives you the highest level of investor protection. For our internal purposes, we ask you to select the description that best matches your situation" })
4140
4140
  ] }),
@@ -4145,7 +4145,7 @@ const jr = ({
4145
4145
  {
4146
4146
  className: `
4147
4147
  block p-4 border-2 rounded-lg cursor-pointer transition-all
4148
- ${i === he.Individual ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
4148
+ ${i === ge.Individual ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
4149
4149
  `,
4150
4150
  children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
4151
4151
  /* @__PURE__ */ r(
@@ -4153,9 +4153,9 @@ const jr = ({
4153
4153
  {
4154
4154
  type: "radio",
4155
4155
  name: "investorType",
4156
- value: he.Individual,
4157
- checked: i === he.Individual,
4158
- onChange: () => o(he.Individual),
4156
+ value: ge.Individual,
4157
+ checked: i === ge.Individual,
4158
+ onChange: () => o(ge.Individual),
4159
4159
  className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
4160
4160
  }
4161
4161
  ),
@@ -4171,7 +4171,7 @@ const jr = ({
4171
4171
  {
4172
4172
  className: `
4173
4173
  block p-4 border-2 rounded-lg cursor-pointer transition-all
4174
- ${i === he.Sophisticated ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
4174
+ ${i === ge.Sophisticated ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
4175
4175
  `,
4176
4176
  children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
4177
4177
  /* @__PURE__ */ r(
@@ -4179,9 +4179,9 @@ const jr = ({
4179
4179
  {
4180
4180
  type: "radio",
4181
4181
  name: "investorType",
4182
- value: he.Sophisticated,
4183
- checked: i === he.Sophisticated,
4184
- onChange: () => o(he.Sophisticated),
4182
+ value: ge.Sophisticated,
4183
+ checked: i === ge.Sophisticated,
4184
+ onChange: () => o(ge.Sophisticated),
4185
4185
  className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
4186
4186
  }
4187
4187
  ),
@@ -4202,7 +4202,7 @@ const jr = ({
4202
4202
  {
4203
4203
  className: `
4204
4204
  block p-4 border-2 rounded-lg cursor-pointer transition-all
4205
- ${i === he.HighNetWorth ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
4205
+ ${i === ge.HighNetWorth ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
4206
4206
  `,
4207
4207
  children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
4208
4208
  /* @__PURE__ */ r(
@@ -4210,9 +4210,9 @@ const jr = ({
4210
4210
  {
4211
4211
  type: "radio",
4212
4212
  name: "investorType",
4213
- value: he.HighNetWorth,
4214
- checked: i === he.HighNetWorth,
4215
- onChange: () => o(he.HighNetWorth),
4213
+ value: ge.HighNetWorth,
4214
+ checked: i === ge.HighNetWorth,
4215
+ onChange: () => o(ge.HighNetWorth),
4216
4216
  className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
4217
4217
  }
4218
4218
  ),
@@ -4251,8 +4251,8 @@ const jr = ({
4251
4251
  onComplete: t,
4252
4252
  onBack: n
4253
4253
  }) => {
4254
- const { appropriatenessTestService: a } = ye(), [i, o] = v(null), [l, d] = v(!0), [u, p] = v(!1), [b, N] = v(null), [m, x] = v({}), [h, C] = v(0), [D, k] = v(!1), [z, A] = v(!1), [I, j] = v(0);
4255
- ne(() => {
4254
+ const { appropriatenessTestService: a } = fe(), [i, o] = v(null), [l, d] = v(!0), [u, p] = v(!1), [b, N] = v(null), [m, x] = v({}), [g, C] = v(0), [D, k] = v(!1), [z, A] = v(!1), [I, j] = v(0);
4255
+ ae(() => {
4256
4256
  (async () => {
4257
4257
  try {
4258
4258
  d(!0), N(null), console.log("Loading appropriateness test for applicant:", e);
@@ -4279,19 +4279,19 @@ const jr = ({
4279
4279
  const T = Math.floor(M / 60), J = M % 60;
4280
4280
  return `${T.toString().padStart(2, "0")}:${J.toString().padStart(2, "0")}`;
4281
4281
  };
4282
- ne(() => {
4283
- if (!D || h <= 0) return;
4282
+ ae(() => {
4283
+ if (!D || g <= 0) return;
4284
4284
  const M = setInterval(() => {
4285
4285
  C((T) => T <= 1 ? (A(!0), 0) : T - 1);
4286
4286
  }, 1e3);
4287
4287
  return () => clearInterval(M);
4288
- }, [D, h]), ne(() => {
4288
+ }, [D, g]), ae(() => {
4289
4289
  if (I <= 0) return;
4290
4290
  const M = setInterval(() => {
4291
4291
  j((T) => T <= 1 ? 0 : T - 1);
4292
4292
  }, 1e3);
4293
4293
  return () => clearInterval(M);
4294
- }, [I]), ne(() => {
4294
+ }, [I]), ae(() => {
4295
4295
  z && !u && P();
4296
4296
  }, [z]);
4297
4297
  const f = () => {
@@ -4355,7 +4355,7 @@ Failed to reload test data. Please refresh the page.`);
4355
4355
  };
4356
4356
  if (l)
4357
4357
  return /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
4358
- /* @__PURE__ */ r(ve, { className: "my-8" }),
4358
+ /* @__PURE__ */ r(ke, { className: "my-8" }),
4359
4359
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
4360
4360
  ] }) });
4361
4361
  if (!i)
@@ -4365,7 +4365,7 @@ Failed to reload test data. Please refresh the page.`);
4365
4365
  ] }) });
4366
4366
  if (I > 0)
4367
4367
  return /* @__PURE__ */ s(K, { children: [
4368
- /* @__PURE__ */ s(de, { children: [
4368
+ /* @__PURE__ */ s(ce, { children: [
4369
4369
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: i.displayName }),
4370
4370
  i.subtitle && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: i.subtitle })
4371
4371
  ] }),
@@ -4379,7 +4379,7 @@ Failed to reload test data. Please refresh the page.`);
4379
4379
  ] });
4380
4380
  const H = i.testAllowedMaxTry - i.totalFailedTries;
4381
4381
  return D ? /* @__PURE__ */ r("form", { onSubmit: P, children: /* @__PURE__ */ s(K, { children: [
4382
- /* @__PURE__ */ r(de, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
4382
+ /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
4383
4383
  /* @__PURE__ */ s("div", { children: [
4384
4384
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: i.displayName }),
4385
4385
  i.subtitle && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: i.subtitle })
@@ -4388,8 +4388,8 @@ Failed to reload test data. Please refresh the page.`);
4388
4388
  /* @__PURE__ */ r(
4389
4389
  "div",
4390
4390
  {
4391
- className: `text-3xl font-bold ${h <= 60 ? "text-danger-500" : "text-primary-500"}`,
4392
- children: E(h)
4391
+ className: `text-3xl font-bold ${g <= 60 ? "text-danger-500" : "text-primary-500"}`,
4392
+ children: E(g)
4393
4393
  }
4394
4394
  ),
4395
4395
  /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
@@ -4397,13 +4397,13 @@ Failed to reload test data. Please refresh the page.`);
4397
4397
  ] }) }),
4398
4398
  /* @__PURE__ */ s(W, { className: "space-y-6", children: [
4399
4399
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between mb-4", children: [
4400
- /* @__PURE__ */ s(Ae, { variant: "info", children: [
4400
+ /* @__PURE__ */ s(Ee, { variant: "info", children: [
4401
4401
  "Question ",
4402
4402
  Object.keys(m).length,
4403
4403
  " of ",
4404
4404
  i.totalQuestionCount
4405
4405
  ] }),
4406
- /* @__PURE__ */ s(Ae, { variant: H > 1 ? "success" : "warning", children: [
4406
+ /* @__PURE__ */ s(Ee, { variant: H > 1 ? "success" : "warning", children: [
4407
4407
  H,
4408
4408
  " attempt",
4409
4409
  H !== 1 ? "s" : "",
@@ -4484,7 +4484,7 @@ Failed to reload test data. Please refresh the page.`);
4484
4484
  )
4485
4485
  ] })
4486
4486
  ] }) }) : /* @__PURE__ */ s(K, { children: [
4487
- /* @__PURE__ */ s(de, { children: [
4487
+ /* @__PURE__ */ s(ce, { children: [
4488
4488
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: i.displayName }),
4489
4489
  i.subtitle && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: i.subtitle })
4490
4490
  ] }),
@@ -4493,19 +4493,19 @@ Failed to reload test data. Please refresh the page.`);
4493
4493
  /* @__PURE__ */ s("div", { className: "space-y-4 mb-6", children: [
4494
4494
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4495
4495
  /* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Total Questions:" }),
4496
- /* @__PURE__ */ r(Ae, { variant: "info", children: i.totalQuestionCount })
4496
+ /* @__PURE__ */ r(Ee, { variant: "info", children: i.totalQuestionCount })
4497
4497
  ] }),
4498
4498
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4499
4499
  /* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Time Limit:" }),
4500
- /* @__PURE__ */ r(Ae, { variant: "info", children: E(i.testDurationSec) })
4500
+ /* @__PURE__ */ r(Ee, { variant: "info", children: E(i.testDurationSec) })
4501
4501
  ] }),
4502
4502
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4503
4503
  /* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Correct Answers Required:" }),
4504
- /* @__PURE__ */ r(Ae, { variant: "info", children: i.testCorrectAnswerPassLimit })
4504
+ /* @__PURE__ */ r(Ee, { variant: "info", children: i.testCorrectAnswerPassLimit })
4505
4505
  ] }),
4506
4506
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4507
4507
  /* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
4508
- /* @__PURE__ */ r(Ae, { variant: H > 1 ? "success" : "warning", children: H })
4508
+ /* @__PURE__ */ r(Ee, { variant: H > 1 ? "success" : "warning", children: H })
4509
4509
  ] })
4510
4510
  ] }),
4511
4511
  b && /* @__PURE__ */ r("div", { className: "mb-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ s("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
@@ -4533,8 +4533,8 @@ Failed to reload test data. Please refresh the page.`);
4533
4533
  onComplete: t,
4534
4534
  onBack: n
4535
4535
  }) => {
4536
- var J, w, q, te;
4537
- const { applicantService: a, baseInformationService: i, config: o } = ye(), { identityData: l, provider: d, token: u, isLoading: p, error: b, requestIdentity: N, restartIdentity: m } = kr(e), [x, h] = v(null), [C, D] = v(null), [k, z] = v([]), [A, I] = v(!0), [j, G] = v(!1), [E, f] = v(null), [R, P] = v(!1), O = ge.useRef(!1), H = Ct({
4536
+ var J, w, q, re;
4537
+ const { applicantService: a, baseInformationService: i, config: o } = fe(), { identityData: l, provider: d, token: u, isLoading: p, error: b, requestIdentity: N, restartIdentity: m } = kr(e), [x, g] = v(null), [C, D] = v(null), [k, z] = v([]), [A, I] = v(!0), [j, G] = v(!1), [E, f] = v(null), [R, P] = v(!1), O = ye.useRef(!1), H = Ct({
4538
4538
  defaultValues: {
4539
4539
  street: "",
4540
4540
  streetNumber: "",
@@ -4545,7 +4545,7 @@ Failed to reload test data. Please refresh the page.`);
4545
4545
  phonenumber: ""
4546
4546
  }
4547
4547
  });
4548
- ne(() => {
4548
+ ae(() => {
4549
4549
  (async () => {
4550
4550
  try {
4551
4551
  const [F, S] = await Promise.all([
@@ -4553,9 +4553,9 @@ Failed to reload test data. Please refresh the page.`);
4553
4553
  i.getCountries("", "en")
4554
4554
  ]);
4555
4555
  D(F);
4556
- const U = /* @__PURE__ */ new Set(), X = S.filter((ke) => {
4557
- const Ce = ke.abbreviation3 || ke.abbreviation;
4558
- return !Ce || U.has(Ce) ? !1 : (U.add(Ce), !0);
4556
+ const U = /* @__PURE__ */ new Set(), X = S.filter((we) => {
4557
+ const Ae = we.abbreviation3 || we.abbreviation;
4558
+ return !Ae || U.has(Ae) ? !1 : (U.add(Ae), !0);
4559
4559
  });
4560
4560
  z(X);
4561
4561
  const Y = F.applicantRequestData;
@@ -4571,8 +4571,8 @@ Failed to reload test data. Please refresh the page.`);
4571
4571
  console.log("[Identity] Found existing identity verification, auto-requesting..."), O.current = !0;
4572
4572
  try {
4573
4573
  await N(), G(!0);
4574
- } catch (ke) {
4575
- console.error("[Identity] Auto-request failed:", ke);
4574
+ } catch (we) {
4575
+ console.error("[Identity] Auto-request failed:", we);
4576
4576
  }
4577
4577
  }
4578
4578
  } catch (F) {
@@ -4581,13 +4581,13 @@ Failed to reload test data. Please refresh the page.`);
4581
4581
  I(!1);
4582
4582
  }
4583
4583
  })();
4584
- }, [e]), ne(() => {
4584
+ }, [e]), ae(() => {
4585
4585
  l && !j && (console.log("[Identity] Identity data already loaded, showing provider"), G(!0));
4586
- }, [l, j]), ne(() => {
4586
+ }, [l, j]), ae(() => {
4587
4587
  if (u) {
4588
4588
  if (u.expiresAt) {
4589
- const B = new Date(u.expiresAt).getTime();
4590
- if (Date.now() >= B) {
4589
+ const _ = new Date(u.expiresAt).getTime();
4590
+ if (Date.now() >= _) {
4591
4591
  console.warn("[Identity] Token has expired (expiresAt)"), P(!0), f("Your verification session has expired. Please restart.");
4592
4592
  return;
4593
4593
  }
@@ -4607,17 +4607,17 @@ Failed to reload test data. Please refresh the page.`);
4607
4607
  return;
4608
4608
  }
4609
4609
  }
4610
- }, [u]), ne(() => {
4610
+ }, [u]), ae(() => {
4611
4611
  if (d !== null && u && !x && j && !R) {
4612
- const B = d;
4612
+ const _ = d;
4613
4613
  if (u.url) {
4614
4614
  console.log("[Identity] Loading provider URL for user verification:", u.url), f(null);
4615
4615
  try {
4616
- if (new URL(u.url), B === xe.SardinAI) {
4616
+ if (new URL(u.url), _ === be.SardinAI) {
4617
4617
  console.log("[SardinAI] Initializing Risk SDK in background...");
4618
4618
  try {
4619
- const F = Me.parseProviderConfig(d, u, o);
4620
- Me.createProvider(d, F).initialize().then(() => {
4619
+ const F = Oe.parseProviderConfig(d, u, o);
4620
+ Oe.createProvider(d, F).initialize().then(() => {
4621
4621
  console.log("[SardinAI] Risk SDK initialized successfully in background");
4622
4622
  }).catch((U) => {
4623
4623
  console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", U);
@@ -4626,18 +4626,18 @@ Failed to reload test data. Please refresh the page.`);
4626
4626
  console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", F);
4627
4627
  }
4628
4628
  }
4629
- h({ type: "url", url: u.url });
4629
+ g({ type: "url", url: u.url });
4630
4630
  } catch (F) {
4631
4631
  console.error("[Identity] Invalid URL:", F), f("Invalid verification URL. Please restart."), P(!0);
4632
4632
  }
4633
4633
  return;
4634
4634
  }
4635
- if (B === xe.SardinAI) {
4635
+ if (_ === be.SardinAI) {
4636
4636
  console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), f(null);
4637
4637
  try {
4638
- const F = Me.parseProviderConfig(d, u, o), S = Me.createProvider(d, F);
4638
+ const F = Oe.parseProviderConfig(d, u, o), S = Oe.createProvider(d, F);
4639
4639
  S.initialize().then(() => {
4640
- console.log("[SardinAI] Risk SDK initialized successfully"), h(S), setTimeout(() => {
4640
+ console.log("[SardinAI] Risk SDK initialized successfully"), g(S), setTimeout(() => {
4641
4641
  t == null || t();
4642
4642
  }, 2e3);
4643
4643
  }).catch((U) => {
@@ -4653,15 +4653,15 @@ Failed to reload test data. Please refresh the page.`);
4653
4653
  }
4654
4654
  try {
4655
4655
  f(null);
4656
- const F = Me.parseProviderConfig(d, u, o), S = Me.createProvider(d, F);
4657
- B === xe.Sumsub ? (S.initialize("identity-container").catch((U) => {
4656
+ const F = Oe.parseProviderConfig(d, u, o), S = Oe.createProvider(d, F);
4657
+ _ === be.Sumsub ? (S.initialize("identity-container").catch((U) => {
4658
4658
  var X;
4659
4659
  console.error("[Sumsub] Initialization error:", U), f(`Failed to initialize: ${U.message}`), (X = U.message) != null && X.toLowerCase().includes("expired") && P(!0);
4660
4660
  }), S.onComplete && S.onComplete(() => {
4661
4661
  t == null || t();
4662
- })) : B === xe.Onfido && S.initialize("identity-container").catch((U) => {
4662
+ })) : _ === be.Onfido && S.initialize("identity-container").catch((U) => {
4663
4663
  console.error("[Onfido] Initialization error:", U), f(`Failed to initialize: ${U.message}`);
4664
- }), h(S);
4664
+ }), g(S);
4665
4665
  } catch (F) {
4666
4666
  console.error("[Identity] Provider setup error:", F), f(`Setup error: ${F.message}`);
4667
4667
  }
@@ -4670,27 +4670,27 @@ Failed to reload test data. Please refresh the page.`);
4670
4670
  if (x && x.destroy)
4671
4671
  try {
4672
4672
  x.destroy();
4673
- } catch (B) {
4674
- console.error("[Identity] Error destroying provider:", B);
4673
+ } catch (_) {
4674
+ console.error("[Identity] Error destroying provider:", _);
4675
4675
  }
4676
4676
  };
4677
4677
  }, [d, u, x, j, t, R]);
4678
4678
  const M = async () => {
4679
4679
  try {
4680
4680
  f(null), P(!1), await N(), G(!0);
4681
- } catch (B) {
4682
- console.error("Error starting identity verification:", B);
4681
+ } catch (_) {
4682
+ console.error("Error starting identity verification:", _);
4683
4683
  }
4684
4684
  }, T = async () => {
4685
4685
  try {
4686
- f(null), P(!1), h(null), console.log("[Identity] Restarting verification..."), await m(), G(!0);
4687
- } catch (B) {
4688
- console.error("Error restarting identity verification:", B), f(B.message || "Failed to restart verification");
4686
+ f(null), P(!1), g(null), console.log("[Identity] Restarting verification..."), await m(), G(!0);
4687
+ } catch (_) {
4688
+ console.error("Error restarting identity verification:", _), f(_.message || "Failed to restart verification");
4689
4689
  }
4690
4690
  };
4691
4691
  if (A || p)
4692
4692
  return /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
4693
- /* @__PURE__ */ r(ve, { className: "my-8" }),
4693
+ /* @__PURE__ */ r(ke, { className: "my-8" }),
4694
4694
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
4695
4695
  ] }) });
4696
4696
  if (b)
@@ -4700,7 +4700,7 @@ Failed to reload test data. Please refresh the page.`);
4700
4700
  ] }) }) });
4701
4701
  if (j && (E || R))
4702
4702
  return /* @__PURE__ */ s(K, { children: [
4703
- /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
4703
+ /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
4704
4704
  /* @__PURE__ */ s(W, { children: [
4705
4705
  /* @__PURE__ */ r("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg mb-6", children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
4706
4706
  /* @__PURE__ */ r(
@@ -4741,9 +4741,9 @@ Failed to reload test data. Please refresh the page.`);
4741
4741
  ] })
4742
4742
  ] });
4743
4743
  if (j && l) {
4744
- const B = d;
4744
+ const _ = d;
4745
4745
  return u != null && u.url ? /* @__PURE__ */ s(K, { children: [
4746
- /* @__PURE__ */ r(de, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
4746
+ /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
4747
4747
  /* @__PURE__ */ s("div", { children: [
4748
4748
  /* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
4749
4749
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
@@ -4776,10 +4776,10 @@ Failed to reload test data. Please refresh the page.`);
4776
4776
  var S, U, X;
4777
4777
  console.log("[Identity] Iframe loaded");
4778
4778
  try {
4779
- const Y = F.target, we = Y.contentDocument || ((S = Y.contentWindow) == null ? void 0 : S.document);
4780
- if (we) {
4781
- const ke = ((X = (U = we.body) == null ? void 0 : U.textContent) == null ? void 0 : X.toLowerCase()) || "";
4782
- (ke.includes("expired") || ke.includes("invalid") || ke.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), P(!0), f("Your verification link has expired."));
4779
+ const Y = F.target, Ne = Y.contentDocument || ((S = Y.contentWindow) == null ? void 0 : S.document);
4780
+ if (Ne) {
4781
+ const we = ((X = (U = Ne.body) == null ? void 0 : U.textContent) == null ? void 0 : X.toLowerCase()) || "";
4782
+ (we.includes("expired") || we.includes("invalid") || we.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), P(!0), f("Your verification link has expired."));
4783
4783
  }
4784
4784
  } catch {
4785
4785
  console.log("[Identity] Cannot check iframe content (CORS)");
@@ -4789,18 +4789,18 @@ Failed to reload test data. Please refresh the page.`);
4789
4789
  ) })
4790
4790
  ] }),
4791
4791
  n && /* @__PURE__ */ r(pe, { children: /* @__PURE__ */ r(Z, { variant: "outline", onClick: n, children: "Back" }) })
4792
- ] }) : B === xe.SardinAI ? /* @__PURE__ */ s(K, { children: [
4793
- /* @__PURE__ */ s(de, { children: [
4792
+ ] }) : _ === be.SardinAI ? /* @__PURE__ */ s(K, { children: [
4793
+ /* @__PURE__ */ s(ce, { children: [
4794
4794
  /* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
4795
4795
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
4796
4796
  ] }),
4797
4797
  /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("div", { className: "text-center py-12", children: [
4798
- /* @__PURE__ */ r(ve, { className: "mb-4" }),
4798
+ /* @__PURE__ */ r(ke, { className: "mb-4" }),
4799
4799
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait while we verify your device security" }),
4800
4800
  /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-500 mt-2", children: "This process is automatic and will complete in a few seconds" })
4801
4801
  ] }) })
4802
4802
  ] }) : /* @__PURE__ */ s(K, { children: [
4803
- /* @__PURE__ */ s(de, { children: [
4803
+ /* @__PURE__ */ s(ce, { children: [
4804
4804
  /* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
4805
4805
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
4806
4806
  ] }),
@@ -4809,7 +4809,7 @@ Failed to reload test data. Please refresh the page.`);
4809
4809
  ] });
4810
4810
  }
4811
4811
  return /* @__PURE__ */ r("form", { onSubmit: H.handleSubmit(M), children: /* @__PURE__ */ s(K, { children: [
4812
- /* @__PURE__ */ s(de, { children: [
4812
+ /* @__PURE__ */ s(ce, { children: [
4813
4813
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: "Review Your Information" }),
4814
4814
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please review and confirm your information before starting identity verification" })
4815
4815
  ] }),
@@ -4829,21 +4829,21 @@ Failed to reload test data. Please refresh the page.`);
4829
4829
  ] }),
4830
4830
  /* @__PURE__ */ s("div", { children: [
4831
4831
  /* @__PURE__ */ r("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Date of Birth" }),
4832
- /* @__PURE__ */ r("p", { className: "mt-1 text-base", children: ((te = C == null ? void 0 : C.applicantRequestData) == null ? void 0 : te.dateOfBirth) || "Not provided" })
4832
+ /* @__PURE__ */ r("p", { className: "mt-1 text-base", children: ((re = C == null ? void 0 : C.applicantRequestData) == null ? void 0 : re.dateOfBirth) || "Not provided" })
4833
4833
  ] })
4834
4834
  ] }),
4835
4835
  /* @__PURE__ */ s("div", { className: "space-y-4", children: [
4836
4836
  /* @__PURE__ */ r("h3", { className: "text-lg font-semibold", children: "Address Information" }),
4837
4837
  /* @__PURE__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
4838
4838
  /* @__PURE__ */ r(
4839
- Pe,
4839
+ De,
4840
4840
  {
4841
4841
  control: H.control,
4842
4842
  name: "country",
4843
- render: ({ field: B }) => /* @__PURE__ */ r(
4844
- He,
4843
+ render: ({ field: _ }) => /* @__PURE__ */ r(
4844
+ Ue,
4845
4845
  {
4846
- ...B,
4846
+ ..._,
4847
4847
  label: "Country",
4848
4848
  options: [
4849
4849
  { value: "", label: "Select country..." },
@@ -4857,14 +4857,14 @@ Failed to reload test data. Please refresh the page.`);
4857
4857
  }
4858
4858
  ),
4859
4859
  /* @__PURE__ */ r(
4860
- Pe,
4860
+ De,
4861
4861
  {
4862
4862
  control: H.control,
4863
4863
  name: "nationality",
4864
- render: ({ field: B }) => /* @__PURE__ */ r(
4865
- He,
4864
+ render: ({ field: _ }) => /* @__PURE__ */ r(
4865
+ Ue,
4866
4866
  {
4867
- ...B,
4867
+ ..._,
4868
4868
  label: "Nationality",
4869
4869
  options: [
4870
4870
  { value: "", label: "Select nationality..." },
@@ -4880,46 +4880,46 @@ Failed to reload test data. Please refresh the page.`);
4880
4880
  ] }),
4881
4881
  /* @__PURE__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
4882
4882
  /* @__PURE__ */ r(
4883
- Pe,
4883
+ De,
4884
4884
  {
4885
4885
  control: H.control,
4886
4886
  name: "street",
4887
- render: ({ field: B }) => /* @__PURE__ */ r(me, { ...B, label: "Street" })
4887
+ render: ({ field: _ }) => /* @__PURE__ */ r(me, { ..._, label: "Street" })
4888
4888
  }
4889
4889
  ),
4890
4890
  /* @__PURE__ */ r(
4891
- Pe,
4891
+ De,
4892
4892
  {
4893
4893
  control: H.control,
4894
4894
  name: "streetNumber",
4895
- render: ({ field: B }) => /* @__PURE__ */ r(me, { ...B, label: "Street Number" })
4895
+ render: ({ field: _ }) => /* @__PURE__ */ r(me, { ..._, label: "Street Number" })
4896
4896
  }
4897
4897
  )
4898
4898
  ] }),
4899
4899
  /* @__PURE__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
4900
4900
  /* @__PURE__ */ r(
4901
- Pe,
4901
+ De,
4902
4902
  {
4903
4903
  control: H.control,
4904
4904
  name: "city",
4905
- render: ({ field: B }) => /* @__PURE__ */ r(me, { ...B, label: "City" })
4905
+ render: ({ field: _ }) => /* @__PURE__ */ r(me, { ..._, label: "City" })
4906
4906
  }
4907
4907
  ),
4908
4908
  /* @__PURE__ */ r(
4909
- Pe,
4909
+ De,
4910
4910
  {
4911
4911
  control: H.control,
4912
4912
  name: "zip",
4913
- render: ({ field: B }) => /* @__PURE__ */ r(me, { ...B, label: "ZIP/Postal Code" })
4913
+ render: ({ field: _ }) => /* @__PURE__ */ r(me, { ..._, label: "ZIP/Postal Code" })
4914
4914
  }
4915
4915
  )
4916
4916
  ] }),
4917
4917
  /* @__PURE__ */ r(
4918
- Pe,
4918
+ De,
4919
4919
  {
4920
4920
  control: H.control,
4921
4921
  name: "phonenumber",
4922
- render: ({ field: B }) => /* @__PURE__ */ r(me, { ...B, label: "Phone Number", type: "tel" })
4922
+ render: ({ field: _ }) => /* @__PURE__ */ r(me, { ..._, label: "Phone Number", type: "tel" })
4923
4923
  }
4924
4924
  )
4925
4925
  ] })
@@ -4937,63 +4937,63 @@ Failed to reload test data. Please refresh the page.`);
4937
4937
  onContinue: i,
4938
4938
  onContactSupport: o
4939
4939
  }) => {
4940
- const d = e === De.Approved ? {
4940
+ const d = e === Fe.Approved ? {
4941
4941
  type: "success",
4942
4942
  title: "Verification Approved",
4943
4943
  icon: "✓",
4944
4944
  iconBg: "bg-green-100 dark:bg-green-900/30",
4945
4945
  iconColor: "text-green-600 dark:text-green-400",
4946
4946
  message: "Your identity verification has been successfully approved."
4947
- } : e === De.Rejected ? {
4947
+ } : e === Fe.Rejected ? {
4948
4948
  type: "error",
4949
4949
  title: "Verification Rejected",
4950
4950
  icon: "✕",
4951
4951
  iconBg: "bg-red-100 dark:bg-red-900/30",
4952
4952
  iconColor: "text-red-600 dark:text-red-400",
4953
4953
  message: "Unfortunately, your identity verification was not approved."
4954
- } : e === De.Pending || e === De.InProgress ? {
4954
+ } : e === Fe.Pending || e === Fe.InProgress ? {
4955
4955
  type: "pending",
4956
4956
  title: "Verification Pending",
4957
4957
  icon: "⏱",
4958
4958
  iconBg: "bg-blue-100 dark:bg-blue-900/30",
4959
4959
  iconColor: "text-blue-600 dark:text-blue-400",
4960
4960
  message: "Your identity verification is currently being processed."
4961
- } : t === Fe.Approved ? {
4961
+ } : t === Le.Approved ? {
4962
4962
  type: "success",
4963
4963
  title: "Application Approved",
4964
4964
  icon: "✓",
4965
4965
  iconBg: "bg-green-100 dark:bg-green-900/30",
4966
4966
  iconColor: "text-green-600 dark:text-green-400",
4967
4967
  message: "Your application has been approved."
4968
- } : t === Fe.Reject ? {
4968
+ } : t === Le.Reject ? {
4969
4969
  type: "error",
4970
4970
  title: "Application Rejected",
4971
4971
  icon: "✕",
4972
4972
  iconBg: "bg-red-100 dark:bg-red-900/30",
4973
4973
  iconColor: "text-red-600 dark:text-red-400",
4974
4974
  message: "Your application has been rejected."
4975
- } : t === Fe.UnderReview || t === Fe.AdminReview ? {
4975
+ } : t === Le.UnderReview || t === Le.AdminReview ? {
4976
4976
  type: "pending",
4977
4977
  title: "Under Review",
4978
4978
  icon: "📋",
4979
4979
  iconBg: "bg-yellow-100 dark:bg-yellow-900/30",
4980
4980
  iconColor: "text-yellow-700 dark:text-yellow-400",
4981
4981
  message: "Your application is currently under manual review."
4982
- } : n === qe.Success ? {
4982
+ } : n === Ke.Success ? {
4983
4983
  type: "success",
4984
4984
  title: "Process Complete",
4985
4985
  icon: "✓",
4986
4986
  iconBg: "bg-green-100 dark:bg-green-900/30",
4987
4987
  iconColor: "text-green-600 dark:text-green-400",
4988
4988
  message: "Your verification process has been completed successfully."
4989
- } : n === qe.Failed ? {
4989
+ } : n === Ke.Failed ? {
4990
4990
  type: "error",
4991
4991
  title: "Process Failed",
4992
4992
  icon: "✕",
4993
4993
  iconBg: "bg-red-100 dark:bg-red-900/30",
4994
4994
  iconColor: "text-red-600 dark:text-red-400",
4995
4995
  message: "The verification process could not be completed."
4996
- } : n === qe.AdminReview ? {
4996
+ } : n === Ke.AdminReview ? {
4997
4997
  type: "pending",
4998
4998
  title: "Admin Review Required",
4999
4999
  icon: "📋",
@@ -5019,10 +5019,10 @@ Failed to reload test data. Please refresh the page.`);
5019
5019
  ) }),
5020
5020
  /* @__PURE__ */ r("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children: d.title }),
5021
5021
  /* @__PURE__ */ r("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ r(
5022
- Ae,
5022
+ Ee,
5023
5023
  {
5024
5024
  variant: d.type === "success" ? "success" : d.type === "error" ? "danger" : d.type === "pending" ? "warning" : "info",
5025
- children: e != null ? De[e] : Fe[t]
5025
+ children: e != null ? Fe[e] : Le[t]
5026
5026
  }
5027
5027
  ) }),
5028
5028
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-6 max-w-md mx-auto", children: a || d.message }),
@@ -5054,11 +5054,11 @@ Failed to reload test data. Please refresh the page.`);
5054
5054
  /* @__PURE__ */ r("div", { className: "mt-6 pt-6 border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
5055
5055
  /* @__PURE__ */ s("div", { children: [
5056
5056
  /* @__PURE__ */ r("span", { className: "text-gray-500 dark:text-gray-400", children: "KYC Status:" }),
5057
- /* @__PURE__ */ r("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: e != null ? De[e] : "Not Available" })
5057
+ /* @__PURE__ */ r("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: e != null ? Fe[e] : "Not Available" })
5058
5058
  ] }),
5059
5059
  /* @__PURE__ */ s("div", { children: [
5060
5060
  /* @__PURE__ */ r("span", { className: "text-gray-500 dark:text-gray-400", children: "Review Status:" }),
5061
- /* @__PURE__ */ r("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: Fe[t] })
5061
+ /* @__PURE__ */ r("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: Le[t] })
5062
5062
  ] })
5063
5063
  ] }) })
5064
5064
  ] }),
@@ -5086,12 +5086,12 @@ Failed to reload test data. Please refresh the page.`);
5086
5086
  console.warn("[Logo] Failed to load logo:", e.url), n.target.style.display = "none";
5087
5087
  }
5088
5088
  }
5089
- ) }), Ge = ({
5089
+ ) }), Ve = ({
5090
5090
  title: e,
5091
5091
  subtitle: t,
5092
5092
  className: n = ""
5093
5093
  }) => {
5094
- const { currentTheme: a } = ye(), i = e || (a == null ? void 0 : a.title) || "", o = !!(a != null && a.logo && a.logo.visible && a.logo.url), l = !!i;
5094
+ const { currentTheme: a } = fe(), i = e || (a == null ? void 0 : a.title) || "", o = !!(a != null && a.logo && a.logo.visible && a.logo.url), l = !!i;
5095
5095
  return !o && !l ? null : /* @__PURE__ */ s("div", { className: `metakyc-header ${n}`, children: [
5096
5096
  /* @__PURE__ */ s("div", { className: "metakyc-header-title flex items-center text-xl font-bold text-gray-900 dark:text-white", children: [
5097
5097
  o && /* @__PURE__ */ r(Qr, { config: a.logo }),
@@ -5107,11 +5107,11 @@ Failed to reload test data. Please refresh the page.`);
5107
5107
  ] }),
5108
5108
  t && /* @__PURE__ */ r("p", { className: "text-sm text-gray-600 dark:text-gray-400 mt-1", children: t })
5109
5109
  ] });
5110
- }, je = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
5111
- function Be(e) {
5110
+ }, qe = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
5111
+ function _e(e) {
5112
5112
  return e == null || e === "" || Array.isArray(e) && e.length === 0;
5113
5113
  }
5114
- const _e = {
5114
+ const He = {
5115
5115
  width: "16px",
5116
5116
  height: "16px",
5117
5117
  minWidth: "16px",
@@ -5124,7 +5124,7 @@ const _e = {
5124
5124
  display: "inline-block",
5125
5125
  verticalAlign: "middle"
5126
5126
  }, ct = ({ helpText: e, children: t }) => {
5127
- const [n, a] = ge.useState(!1);
5127
+ const [n, a] = ye.useState(!1);
5128
5128
  if (!e) return /* @__PURE__ */ r(dt, { children: t });
5129
5129
  const i = n ? /* @__PURE__ */ r(
5130
5130
  "div",
@@ -5236,7 +5236,7 @@ const _e = {
5236
5236
  children: "?"
5237
5237
  }
5238
5238
  ),
5239
- typeof document < "u" && i ? Ve(i, document.body) : null
5239
+ typeof document < "u" && i ? Ze(i, document.body) : null
5240
5240
  ] });
5241
5241
  }, hn = ({
5242
5242
  workflowKey: e,
@@ -5244,92 +5244,95 @@ const _e = {
5244
5244
  onSuccess: n,
5245
5245
  onCancel: a
5246
5246
  }) => {
5247
- var Je, Xe, et, tt;
5248
- const { config: i, baseInformationService: o, currentTheme: l } = ye(), { createApplicant: d, isLoading: u } = Nr(), p = e || ((Je = i.applicantForm) == null ? void 0 : Je.workflowKey);
5247
+ var Xe, et, tt, rt;
5248
+ const { config: i, baseInformationService: o, currentTheme: l } = fe(), { createApplicant: d, isLoading: u } = Nr(), p = e || ((Xe = i.applicantForm) == null ? void 0 : Xe.workflowKey);
5249
5249
  if (!p)
5250
5250
  throw new Error(
5251
5251
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
5252
5252
  );
5253
- const b = t || ((Xe = i.applicantForm) == null ? void 0 : Xe.externalRefId) || "", N = ((et = i.applicantForm) == null ? void 0 : et.email) || "", m = Ee(
5253
+ const b = t || ((et = i.applicantForm) == null ? void 0 : et.externalRefId) || "", N = ((tt = i.applicantForm) == null ? void 0 : tt.email) || "", m = Ie(
5254
5254
  () => l != null && l.applicantFormPages && l.applicantFormPages.length > 0 ? l.applicantFormPages : null,
5255
5255
  [l == null ? void 0 : l.applicantFormPages]
5256
- ), x = Ee(() => {
5257
- const c = new Set(je), L = l == null ? void 0 : l.applicantFormRequiredFields;
5256
+ ), x = Ie(() => {
5257
+ const c = new Set(qe), L = l == null ? void 0 : l.applicantFormRequiredFields;
5258
5258
  if (L) for (const $ of L) c.add($);
5259
5259
  if (m)
5260
5260
  for (const $ of m)
5261
- for (const g of $.fields)
5262
- !g.isCustom && g.name && g.required && c.add(g.name);
5261
+ for (const y of $.fields)
5262
+ !y.isCustom && y.name && y.required && c.add(y.name);
5263
5263
  return Array.from(c);
5264
- }, [l == null ? void 0 : l.applicantFormRequiredFields, m]), h = Ee(() => {
5264
+ }, [l == null ? void 0 : l.applicantFormRequiredFields, m]), g = Ie(() => {
5265
5265
  var $;
5266
5266
  if (m) {
5267
- const g = m.flatMap((_) => _.fields).filter((_) => !_.isCustom && _.name).map((_) => _.name), y = new Set(g);
5268
- for (const _ of je) y.add(_);
5269
- return Array.from(y);
5267
+ const y = m.flatMap((B) => B.fields).filter((B) => !B.isCustom && B.name).map((B) => B.name), h = new Set(y);
5268
+ for (const B of qe) h.add(B);
5269
+ return Array.from(h);
5270
5270
  }
5271
5271
  let c;
5272
5272
  ($ = i.applicantForm) != null && $.visibleFields ? c = i.applicantForm.visibleFields : l != null && l.applicantFormVisibleFields && l.applicantFormVisibleFields.length > 0 ? c = l.applicantFormVisibleFields : c = zt;
5273
5273
  const L = new Set(c);
5274
- for (const g of je) L.add(g);
5274
+ for (const y of qe) L.add(y);
5275
5275
  return Array.from(L);
5276
- }, [(tt = i.applicantForm) == null ? void 0 : tt.visibleFields, l == null ? void 0 : l.applicantFormVisibleFields, m]), C = /* @__PURE__ */ new Set([
5276
+ }, [(rt = i.applicantForm) == null ? void 0 : rt.visibleFields, l == null ? void 0 : l.applicantFormVisibleFields, m]), C = /* @__PURE__ */ new Set([
5277
5277
  "country",
5278
5278
  "nationality",
5279
5279
  "taxCountry",
5280
5280
  "countryOfBirth",
5281
5281
  "mobileCountryCode",
5282
5282
  "otherNationality"
5283
- ]), D = Ee(() => {
5283
+ ]), D = Ie(() => {
5284
5284
  var L, $;
5285
5285
  const c = /* @__PURE__ */ new Set();
5286
5286
  if (m)
5287
- for (const g of m)
5288
- for (const y of g.fields)
5289
- !y.isCustom && y.name && C.has(y.name) && c.add(y.countriesType ?? ((L = Te[y.name]) == null ? void 0 : L.countriesType));
5287
+ for (const y of m)
5288
+ for (const h of y.fields)
5289
+ !h.isCustom && h.name && C.has(h.name) && c.add(h.countriesType ?? ((L = Me[h.name]) == null ? void 0 : L.countriesType));
5290
5290
  else
5291
- for (const g of h)
5292
- C.has(g) && c.add(($ = Te[g]) == null ? void 0 : $.countriesType);
5291
+ for (const y of g)
5292
+ C.has(y) && c.add(($ = Me[y]) == null ? void 0 : $.countriesType);
5293
5293
  return c.size === 0 && c.add(void 0), Array.from(c);
5294
- }, [h, m]), [k, z] = v({}), [A, I] = v(!0), j = ee(/* @__PURE__ */ new Set()), G = ee(/* @__PURE__ */ new Set());
5295
- ne(() => {
5294
+ }, [g, m]), [k, z] = v({}), [A, I] = v(!0), j = ee(/* @__PURE__ */ new Set()), G = ee(/* @__PURE__ */ new Set());
5295
+ ae(() => {
5296
5296
  if (!l) return;
5297
- const c = D.filter((g) => {
5298
- const y = g != null ? String(g) : "all";
5299
- return !G.current.has(y) && !j.current.has(y);
5297
+ const c = D.filter((y) => {
5298
+ const h = y != null ? String(y) : "all";
5299
+ return !G.current.has(h) && !j.current.has(h);
5300
5300
  });
5301
5301
  if (c.length === 0) {
5302
- D.every((y) => {
5303
- const _ = y != null ? String(y) : "all";
5304
- return G.current.has(_);
5302
+ D.every((h) => {
5303
+ const B = h != null ? String(h) : "all";
5304
+ return G.current.has(B);
5305
5305
  }) && I(!1);
5306
5306
  return;
5307
5307
  }
5308
5308
  I(!0);
5309
- const L = c.map((g) => g != null ? String(g) : "all");
5310
- L.forEach((g) => j.current.add(g)), (async () => {
5309
+ const L = c.map((y) => y != null ? String(y) : "all");
5310
+ L.forEach((y) => j.current.add(y)), (async () => {
5311
5311
  try {
5312
- const g = await Promise.all(
5313
- c.map(async (y) => {
5314
- const _ = y != null ? String(y) : "all", ie = await o.getCountries("", i.locale || "en", y), ae = /* @__PURE__ */ new Set(), fe = ie.map((se) => ({ value: se.abbreviation3 || se.abbreviation, label: se.name })).filter((se) => !se.value || ae.has(se.value) ? !1 : (ae.add(se.value), !0));
5315
- return G.current.add(_), j.current.delete(_), [_, fe];
5312
+ const y = await Promise.all(
5313
+ c.map(async (h) => {
5314
+ const B = h != null ? String(h) : "all", te = await o.getCountries("", i.locale || "en", h), ie = h === 40, he = /* @__PURE__ */ new Set(), xe = te.map((de) => ie && de.countryCode ? {
5315
+ value: de.countryCode,
5316
+ label: `${de.countryCode} – ${de.name}`
5317
+ } : { value: de.abbreviation3 || de.abbreviation, label: de.name }).filter((de) => !de.value || he.has(de.value) ? !1 : (he.add(de.value), !0));
5318
+ return G.current.add(B), j.current.delete(B), [B, xe];
5316
5319
  })
5317
5320
  );
5318
- z((y) => ({ ...y, ...Object.fromEntries(g) }));
5319
- } catch (g) {
5320
- L.forEach((y) => j.current.delete(y)), console.error("Failed to load countries:", g);
5321
+ z((h) => ({ ...h, ...Object.fromEntries(y) }));
5322
+ } catch (y) {
5323
+ L.forEach((h) => j.current.delete(h)), console.error("Failed to load countries:", y);
5321
5324
  } finally {
5322
- D.every((y) => {
5323
- const _ = y != null ? String(y) : "all";
5324
- return G.current.has(_);
5325
+ D.every((h) => {
5326
+ const B = h != null ? String(h) : "all";
5327
+ return G.current.has(B);
5325
5328
  }) && I(!1);
5326
5329
  }
5327
5330
  })();
5328
5331
  }, [D, l]);
5329
5332
  const E = (c, L) => {
5330
- var y;
5331
- const $ = L ?? ((y = Te[c]) == null ? void 0 : y.countriesType), g = $ != null ? String($) : "all";
5332
- return k[g] || [];
5333
+ var h;
5334
+ const $ = L ?? ((h = Me[c]) == null ? void 0 : h.countriesType), y = $ != null ? String($) : "all";
5335
+ return k[y] || [];
5333
5336
  }, [f, R] = v({
5334
5337
  workflowKey: p,
5335
5338
  firstName: "",
@@ -5355,48 +5358,48 @@ const _e = {
5355
5358
  educationLevel: "",
5356
5359
  occupation: "",
5357
5360
  taxNumber: ""
5358
- }), [P, O] = v({}), [H, M] = v(0), [T, J] = v({}), [w, q] = v(null), [te, B] = v(!1), F = (c, L) => R(($) => ({ ...$, [c]: L })), S = (c, L) => O(($) => ({ ...$, [c]: L })), U = (c) => !c.conditionalOn || P[c.conditionalOn] === "true", X = m && H < m.length - 1 ? H + 1 : -1, Y = m && H > 0 ? H - 1 : -1, we = (c) => {
5361
+ }), [P, O] = v({}), [H, M] = v(0), [T, J] = v({}), [w, q] = v(null), [re, _] = v(!1), F = (c, L) => R(($) => ({ ...$, [c]: L })), S = (c, L) => O(($) => ({ ...$, [c]: L })), U = (c) => !c.conditionalOn || P[c.conditionalOn] === "true", X = m && H < m.length - 1 ? H + 1 : -1, Y = m && H > 0 ? H - 1 : -1, Ne = (c) => {
5359
5362
  var $;
5360
5363
  const L = {};
5361
- for (const g of c.fields)
5362
- if (g.isCustom) {
5363
- if (g.customType === "paragraph" || g.customType === "br" || g.customType === "link") continue;
5364
- if (g.required && g.paramName) {
5365
- const y = P[g.paramName], _ = g.displayText || g.label || g.paramName;
5366
- g.customType === "checkbox" || g.customType === "link_checkbox" ? y !== "true" && (L[g.paramName] = `${_} is required.`) : (!y || y.trim() === "") && (L[g.paramName] = `${_} is required.`);
5364
+ for (const y of c.fields)
5365
+ if (y.isCustom) {
5366
+ if (y.customType === "paragraph" || y.customType === "br" || y.customType === "link") continue;
5367
+ if (y.required && y.paramName) {
5368
+ const h = P[y.paramName], B = y.displayText || y.label || y.paramName;
5369
+ y.customType === "checkbox" || y.customType === "link_checkbox" ? h !== "true" && (L[y.paramName] = `${B} is required.`) : (!h || h.trim() === "") && (L[y.paramName] = `${B} is required.`);
5367
5370
  }
5368
- } else if (g.name) {
5369
- const y = g.name;
5370
- if (x.includes(y) && Be(f[y])) {
5371
- const _ = g.displayText || (($ = Te[y]) == null ? void 0 : $.label) || y;
5372
- L[y] = `${_} is required.`;
5371
+ } else if (y.name) {
5372
+ const h = y.name;
5373
+ if (x.includes(h) && _e(f[h])) {
5374
+ const B = y.displayText || (($ = Me[h]) == null ? void 0 : $.label) || h;
5375
+ L[h] = `${B} is required.`;
5373
5376
  }
5374
5377
  }
5375
5378
  return L;
5376
- }, ke = async () => {
5379
+ }, we = async () => {
5377
5380
  if (!m) return;
5378
5381
  const c = m[H];
5379
5382
  if (c.conditionalOn && !U(c)) {
5380
- J({}), X >= 0 ? M(X) : await Ce();
5383
+ J({}), X >= 0 ? M(X) : await Ae();
5381
5384
  return;
5382
5385
  }
5383
- const L = we(c);
5386
+ const L = Ne(c);
5384
5387
  if (Object.keys(L).length > 0) {
5385
5388
  J(L);
5386
5389
  return;
5387
5390
  }
5388
- J({}), X >= 0 ? M(X) : await Ce();
5389
- }, Ce = async () => {
5391
+ J({}), X >= 0 ? M(X) : await Ae();
5392
+ }, Ae = async () => {
5390
5393
  if (m) {
5391
5394
  let c = {};
5392
5395
  for (const L of m)
5393
- U(L) && (c = { ...c, ...we(L) });
5396
+ U(L) && (c = { ...c, ...Ne(L) });
5394
5397
  if (Object.keys(c).length > 0) {
5395
5398
  J(c);
5396
5399
  return;
5397
5400
  }
5398
5401
  }
5399
- B(!0), q(null);
5402
+ _(!0), q(null);
5400
5403
  try {
5401
5404
  if (!f.externalRefId || f.externalRefId.trim() === "") {
5402
5405
  q("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
@@ -5407,35 +5410,38 @@ const _e = {
5407
5410
  externalRefId: f.externalRefId.trim()
5408
5411
  };
5409
5412
  if (m) {
5410
- for (const g of m)
5411
- if (U(g)) {
5412
- for (const y of g.fields)
5413
- if (!y.isCustom && y.name) {
5414
- const _ = y.name, ie = f[_];
5415
- Be(ie) || (c[_] = ie);
5413
+ for (const y of m)
5414
+ if (U(y)) {
5415
+ for (const h of y.fields)
5416
+ if (!h.isCustom && h.name) {
5417
+ const B = h.name, te = f[B];
5418
+ _e(te) || (c[B] = te);
5416
5419
  }
5417
5420
  }
5418
- for (const g of je)
5419
- if (c[g] === void 0) {
5420
- const y = f[g];
5421
- Be(y) || (c[g] = y);
5421
+ for (const y of qe)
5422
+ if (c[y] === void 0) {
5423
+ const h = f[y];
5424
+ _e(h) || (c[y] = h);
5422
5425
  }
5423
5426
  } else
5424
- h.forEach((g) => {
5425
- if (g === "externalRefId") return;
5426
- const y = f[g];
5427
- Be(y) || (c[g] = y);
5427
+ g.forEach((y) => {
5428
+ if (y === "externalRefId") return;
5429
+ const h = f[y];
5430
+ _e(h) || (c[y] = h);
5428
5431
  });
5429
5432
  const L = [];
5430
5433
  if (m) {
5431
- for (const g of m)
5432
- if (U(g)) {
5433
- for (const y of g.fields)
5434
- if (y.isCustom && y.paramName && y.customType !== "paragraph" && y.customType !== "br" && y.customType !== "link") {
5435
- const _ = P[y.paramName] ?? "";
5436
- L.push({ paramName: y.paramName, paramValue: _ });
5437
- }
5438
- }
5434
+ for (const y of m)
5435
+ if (U(y))
5436
+ for (const h of y.fields) {
5437
+ if (!h.isCustom || !h.paramName || h.customType === "paragraph" || h.customType === "br" || h.customType === "link") continue;
5438
+ const B = P[h.paramName] ?? "";
5439
+ let te;
5440
+ if (h.customType === "checkbox" || h.customType === "link_checkbox")
5441
+ te = B === "true" ? "yes" : "no";
5442
+ else if (te = B, !te && !h.required) continue;
5443
+ L.push({ paramName: h.paramName, paramValue: te });
5444
+ }
5439
5445
  }
5440
5446
  L.length > 0 && (c.applicantAdditionalDatas = L);
5441
5447
  const $ = await d(c);
@@ -5443,90 +5449,90 @@ const _e = {
5443
5449
  } catch (c) {
5444
5450
  console.error("Error creating applicant:", c), q(c.message || "Failed to create applicant");
5445
5451
  } finally {
5446
- B(!1);
5452
+ _(!1);
5447
5453
  }
5448
5454
  }, ft = async (c) => {
5449
5455
  var L;
5450
5456
  c.preventDefault();
5451
5457
  for (const $ of x)
5452
- if (Be(f[$])) {
5453
- const g = ((L = Te[$]) == null ? void 0 : L.label) || $;
5454
- q(`${g} is required.`);
5458
+ if (_e(f[$])) {
5459
+ const y = ((L = Me[$]) == null ? void 0 : L.label) || $;
5460
+ q(`${y} is required.`);
5455
5461
  return;
5456
5462
  }
5457
- await Ce();
5458
- }, Ze = (c, L, $, g) => {
5459
- var rt;
5460
- const y = Te[c];
5461
- if (!y) return null;
5462
- const _ = x.includes(c), ie = T[c], ae = $ || y.label, fe = L ?? c, se = { required: _ };
5463
- switch (y.type) {
5463
+ await Ae();
5464
+ }, Je = (c, L, $, y) => {
5465
+ var de;
5466
+ const h = Me[c];
5467
+ if (!h) return null;
5468
+ const B = x.includes(c), te = T[c], ie = $ || h.label, he = L ?? c, xe = { required: B };
5469
+ switch (h.type) {
5464
5470
  case "select":
5465
5471
  if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
5466
- const le = E(c, g);
5472
+ const oe = E(c, y);
5467
5473
  return /* @__PURE__ */ r(
5468
- We,
5474
+ Ye,
5469
5475
  {
5470
- ...se,
5471
- label: ae,
5476
+ ...xe,
5477
+ label: ie,
5472
5478
  value: f[c] || "",
5473
- onChange: (Re) => F(c, Re),
5474
- options: [{ value: "", label: `Select ${ae.toLowerCase()}...` }, ...le],
5479
+ onChange: (Pe) => F(c, Pe),
5480
+ options: [{ value: "", label: `Select ${ie.toLowerCase()}...` }, ...oe],
5475
5481
  disabled: A,
5476
- error: ie
5482
+ error: te
5477
5483
  },
5478
- fe
5484
+ he
5479
5485
  );
5480
5486
  }
5481
5487
  if (c === "salutation")
5482
5488
  return /* @__PURE__ */ r(
5483
- We,
5489
+ Ye,
5484
5490
  {
5485
- ...se,
5486
- label: ae,
5487
- value: ((rt = f[c]) == null ? void 0 : rt.toString()) || "",
5488
- onChange: (le) => F(c, le ? Number(le) : null),
5491
+ ...xe,
5492
+ label: ie,
5493
+ value: ((de = f[c]) == null ? void 0 : de.toString()) || "",
5494
+ onChange: (oe) => F(c, oe ? Number(oe) : null),
5489
5495
  options: [
5490
5496
  { value: "", label: "Select salutation..." },
5491
- { value: Ke.Male.toString(), label: "Male" },
5492
- { value: Ke.Female.toString(), label: "Female" },
5493
- { value: Ke.Other.toString(), label: "Other" }
5497
+ { value: We.Male.toString(), label: "Male" },
5498
+ { value: We.Female.toString(), label: "Female" },
5499
+ { value: We.Other.toString(), label: "Other" }
5494
5500
  ],
5495
- error: ie
5501
+ error: te
5496
5502
  },
5497
- fe
5503
+ he
5498
5504
  );
5499
5505
  if (c === "defaultLanguage") {
5500
- const le = l != null && l.allowedLanguages && l.allowedLanguages.length > 0 ? at.filter((Re) => l.allowedLanguages.includes(Re.value)) : at;
5506
+ const oe = l != null && l.allowedLanguages && l.allowedLanguages.length > 0 ? at.filter((Pe) => l.allowedLanguages.includes(Pe.value)) : at;
5501
5507
  return /* @__PURE__ */ r(
5502
- We,
5508
+ Ye,
5503
5509
  {
5504
- ...se,
5505
- label: ae,
5510
+ ...xe,
5511
+ label: ie,
5506
5512
  value: f[c] || "",
5507
- onChange: (Re) => F(c, Re),
5508
- options: [{ value: "", label: "Select language..." }, ...le],
5509
- error: ie
5513
+ onChange: (Pe) => F(c, Pe),
5514
+ options: [{ value: "", label: "Select language..." }, ...oe],
5515
+ error: te
5510
5516
  },
5511
- fe
5517
+ he
5512
5518
  );
5513
5519
  }
5514
5520
  return null;
5515
5521
  case "multiselect":
5516
5522
  if (c === "otherNationality") {
5517
- const le = E(c, g);
5523
+ const oe = E(c, y);
5518
5524
  return /* @__PURE__ */ r(
5519
5525
  Sr,
5520
5526
  {
5521
- ...se,
5522
- label: ae,
5527
+ ...xe,
5528
+ label: ie,
5523
5529
  value: f[c] || [],
5524
- onChange: (Re) => F(c, Re),
5525
- options: le,
5530
+ onChange: (Pe) => F(c, Pe),
5531
+ options: oe,
5526
5532
  placeholder: "Select other nationalities...",
5527
5533
  disabled: A
5528
5534
  },
5529
- fe
5535
+ he
5530
5536
  );
5531
5537
  }
5532
5538
  return null;
@@ -5534,58 +5540,58 @@ const _e = {
5534
5540
  return /* @__PURE__ */ r(
5535
5541
  me,
5536
5542
  {
5537
- ...se,
5543
+ ...xe,
5538
5544
  type: "date",
5539
- label: ae,
5545
+ label: ie,
5540
5546
  value: f[c] || "",
5541
- onChange: (le) => F(c, le.target.value),
5542
- error: ie
5547
+ onChange: (oe) => F(c, oe.target.value),
5548
+ error: te
5543
5549
  },
5544
- fe
5550
+ he
5545
5551
  );
5546
5552
  case "email":
5547
5553
  return /* @__PURE__ */ r(
5548
5554
  me,
5549
5555
  {
5550
- ...se,
5556
+ ...xe,
5551
5557
  type: "email",
5552
- label: ae,
5558
+ label: ie,
5553
5559
  value: f[c] || "",
5554
- onChange: (le) => F(c, le.target.value),
5555
- error: ie
5560
+ onChange: (oe) => F(c, oe.target.value),
5561
+ error: te
5556
5562
  },
5557
- fe
5563
+ he
5558
5564
  );
5559
5565
  case "tel":
5560
5566
  return /* @__PURE__ */ r(
5561
5567
  me,
5562
5568
  {
5563
- ...se,
5569
+ ...xe,
5564
5570
  type: "tel",
5565
- label: ae,
5571
+ label: ie,
5566
5572
  value: f[c] || "",
5567
- onChange: (le) => F(c, le.target.value),
5568
- error: ie
5573
+ onChange: (oe) => F(c, oe.target.value),
5574
+ error: te
5569
5575
  },
5570
- fe
5576
+ he
5571
5577
  );
5572
5578
  default:
5573
5579
  return /* @__PURE__ */ r(
5574
5580
  me,
5575
5581
  {
5576
- ...se,
5582
+ ...xe,
5577
5583
  type: "text",
5578
- label: ae,
5584
+ label: ie,
5579
5585
  value: f[c] || "",
5580
- onChange: (le) => F(c, le.target.value),
5581
- error: ie
5586
+ onChange: (oe) => F(c, oe.target.value),
5587
+ error: te
5582
5588
  },
5583
- fe
5589
+ he
5584
5590
  );
5585
5591
  }
5586
5592
  }, xt = (c, L) => {
5587
5593
  if (c.customType === "paragraph") {
5588
- const y = c.displayText || c.label || "";
5594
+ const h = c.displayText || c.label || "";
5589
5595
  return /* @__PURE__ */ r(
5590
5596
  "p",
5591
5597
  {
@@ -5596,7 +5602,7 @@ const _e = {
5596
5602
  margin: 0,
5597
5603
  color: "var(--metakyc-text-secondary, #6b7280)"
5598
5604
  },
5599
- dangerouslySetInnerHTML: { __html: y }
5605
+ dangerouslySetInnerHTML: { __html: h }
5600
5606
  },
5601
5607
  `custom-${L}`
5602
5608
  );
@@ -5604,7 +5610,7 @@ const _e = {
5604
5610
  if (c.customType === "br")
5605
5611
  return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${L}`);
5606
5612
  if (c.customType === "link") {
5607
- const y = c.displayText || c.label || c.linkText || c.linkUrl || "";
5613
+ const h = c.displayText || c.label || c.linkText || c.linkUrl || "";
5608
5614
  return /* @__PURE__ */ r("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
5609
5615
  "a",
5610
5616
  {
@@ -5621,14 +5627,14 @@ const _e = {
5621
5627
  cursor: "pointer"
5622
5628
  },
5623
5629
  children: [
5624
- y,
5630
+ h,
5625
5631
  /* @__PURE__ */ r("span", { style: { fontSize: "10px", opacity: 0.7 }, children: "↗" })
5626
5632
  ]
5627
5633
  }
5628
5634
  ) }, `custom-${L}`);
5629
5635
  }
5630
5636
  if (!c.paramName) return null;
5631
- const $ = T[c.paramName], g = c.displayText || c.label || c.paramName;
5637
+ const $ = T[c.paramName], y = c.displayText || c.label || c.paramName;
5632
5638
  if (c.customType === "checkbox")
5633
5639
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
5634
5640
  /* @__PURE__ */ s(
@@ -5642,9 +5648,9 @@ const _e = {
5642
5648
  {
5643
5649
  type: "checkbox",
5644
5650
  checked: P[c.paramName] === "true",
5645
- onChange: (y) => S(c.paramName, y.target.checked ? "true" : "false"),
5651
+ onChange: (h) => S(c.paramName, h.target.checked ? "true" : "false"),
5646
5652
  className: "metakyc-option-input",
5647
- style: _e
5653
+ style: He
5648
5654
  }
5649
5655
  ),
5650
5656
  /* @__PURE__ */ s(
@@ -5653,7 +5659,7 @@ const _e = {
5653
5659
  className: "metakyc-option-text",
5654
5660
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5655
5661
  children: [
5656
- g,
5662
+ y,
5657
5663
  c.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5658
5664
  ]
5659
5665
  }
@@ -5676,9 +5682,9 @@ const _e = {
5676
5682
  {
5677
5683
  type: "checkbox",
5678
5684
  checked: P[c.paramName] === "true",
5679
- onChange: (y) => S(c.paramName, y.target.checked ? "true" : "false"),
5685
+ onChange: (h) => S(c.paramName, h.target.checked ? "true" : "false"),
5680
5686
  className: "metakyc-option-input",
5681
- style: { ..._e, alignSelf: "flex-start", marginTop: "2px" }
5687
+ style: { ...He, alignSelf: "flex-start", marginTop: "2px" }
5682
5688
  }
5683
5689
  ),
5684
5690
  /* @__PURE__ */ s(
@@ -5687,7 +5693,7 @@ const _e = {
5687
5693
  className: "metakyc-option-text",
5688
5694
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5689
5695
  children: [
5690
- g,
5696
+ y,
5691
5697
  " ",
5692
5698
  c.linkUrl && /* @__PURE__ */ r(
5693
5699
  "a",
@@ -5697,7 +5703,7 @@ const _e = {
5697
5703
  rel: "noopener noreferrer",
5698
5704
  className: "underline",
5699
5705
  style: { color: "var(--metakyc-primary, #2563eb)" },
5700
- onClick: (y) => y.stopPropagation(),
5706
+ onClick: (h) => h.stopPropagation(),
5701
5707
  children: c.linkText || c.linkUrl
5702
5708
  }
5703
5709
  ),
@@ -5711,7 +5717,7 @@ const _e = {
5711
5717
  $ && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: $ })
5712
5718
  ] }, `custom-${L}`);
5713
5719
  if (c.customType === "group_checkbox") {
5714
- const y = (P[c.paramName] || "").split(",").filter(Boolean);
5720
+ const h = (P[c.paramName] || "").split(",").filter(Boolean);
5715
5721
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
5716
5722
  /* @__PURE__ */ s(
5717
5723
  "div",
@@ -5719,13 +5725,13 @@ const _e = {
5719
5725
  className: "text-sm font-medium",
5720
5726
  style: { color: "var(--metakyc-text-primary, #111827)" },
5721
5727
  children: [
5722
- g,
5728
+ y,
5723
5729
  c.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5724
5730
  ]
5725
5731
  }
5726
5732
  ),
5727
- /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((_) => {
5728
- const ie = c.singleSelect ? P[c.paramName] === _.value : y.includes(_.value);
5733
+ /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((B) => {
5734
+ const te = c.singleSelect ? P[c.paramName] === B.value : h.includes(B.value);
5729
5735
  return /* @__PURE__ */ s(
5730
5736
  "label",
5731
5737
  {
@@ -5736,17 +5742,17 @@ const _e = {
5736
5742
  "input",
5737
5743
  {
5738
5744
  type: "checkbox",
5739
- checked: ie,
5740
- onChange: (ae) => {
5745
+ checked: te,
5746
+ onChange: (ie) => {
5741
5747
  if (c.singleSelect)
5742
- S(c.paramName, ae.target.checked ? _.value : "");
5748
+ S(c.paramName, ie.target.checked ? B.value : "");
5743
5749
  else {
5744
- const fe = ae.target.checked ? [...y, _.value] : y.filter((se) => se !== _.value);
5745
- S(c.paramName, fe.join(","));
5750
+ const he = ie.target.checked ? [...h, B.value] : h.filter((xe) => xe !== B.value);
5751
+ S(c.paramName, he.join(","));
5746
5752
  }
5747
5753
  },
5748
5754
  className: "metakyc-option-input",
5749
- style: _e
5755
+ style: He
5750
5756
  }
5751
5757
  ),
5752
5758
  /* @__PURE__ */ r(
@@ -5754,12 +5760,12 @@ const _e = {
5754
5760
  {
5755
5761
  className: "metakyc-option-text",
5756
5762
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5757
- children: _.label
5763
+ children: B.label
5758
5764
  }
5759
5765
  )
5760
5766
  ]
5761
5767
  },
5762
- _.value
5768
+ B.value
5763
5769
  );
5764
5770
  }) }),
5765
5771
  $ && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: $ })
@@ -5772,12 +5778,12 @@ const _e = {
5772
5778
  className: "text-sm font-medium",
5773
5779
  style: { color: "var(--metakyc-text-primary, #111827)" },
5774
5780
  children: [
5775
- g,
5781
+ y,
5776
5782
  c.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5777
5783
  ]
5778
5784
  }
5779
5785
  ),
5780
- /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((y) => /* @__PURE__ */ s(
5786
+ /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((h) => /* @__PURE__ */ s(
5781
5787
  "label",
5782
5788
  {
5783
5789
  className: "metakyc-option-label",
@@ -5787,11 +5793,11 @@ const _e = {
5787
5793
  "input",
5788
5794
  {
5789
5795
  type: "radio",
5790
- checked: P[c.paramName] === y.value,
5791
- onChange: () => S(c.paramName, y.value),
5796
+ checked: P[c.paramName] === h.value,
5797
+ onChange: () => S(c.paramName, h.value),
5792
5798
  name: `radio-group-${c.paramName}-${L}`,
5793
5799
  className: "metakyc-option-input",
5794
- style: _e
5800
+ style: He
5795
5801
  }
5796
5802
  ),
5797
5803
  /* @__PURE__ */ r(
@@ -5799,21 +5805,21 @@ const _e = {
5799
5805
  {
5800
5806
  className: "metakyc-option-text",
5801
5807
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5802
- children: y.label
5808
+ children: h.label
5803
5809
  }
5804
5810
  )
5805
5811
  ]
5806
5812
  },
5807
- y.value
5813
+ h.value
5808
5814
  )) }),
5809
5815
  $ && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: $ })
5810
5816
  ] }, `custom-${L}`) : /* @__PURE__ */ r(
5811
5817
  me,
5812
5818
  {
5813
5819
  type: "text",
5814
- label: `${g}${c.required ? " *" : ""}`,
5820
+ label: `${y}${c.required ? " *" : ""}`,
5815
5821
  value: P[c.paramName] || "",
5816
- onChange: (y) => S(c.paramName, y.target.value),
5822
+ onChange: (h) => S(c.paramName, h.target.value),
5817
5823
  required: c.required,
5818
5824
  error: $
5819
5825
  },
@@ -5833,9 +5839,9 @@ const _e = {
5833
5839
  {
5834
5840
  type: "checkbox",
5835
5841
  checked: $,
5836
- onChange: (g) => S(c.conditionalOn, g.target.checked ? "true" : "false"),
5842
+ onChange: (y) => S(c.conditionalOn, y.target.checked ? "true" : "false"),
5837
5843
  className: "metakyc-option-input",
5838
- style: _e
5844
+ style: He
5839
5845
  }
5840
5846
  ),
5841
5847
  /* @__PURE__ */ r(
@@ -5849,21 +5855,21 @@ const _e = {
5849
5855
  ]
5850
5856
  }
5851
5857
  ) }),
5852
- $ && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: c.fields.map((g, y) => {
5853
- const _ = g.colSpan === 1 ? "col-span-1" : g.colSpan === 2 ? "col-span-2" : g.colSpan === 3 ? "col-span-3" : "col-span-4", ie = g.isCustom ? `custom-${y}-${g.paramName}` : `builtin-${g.name}-${y}`;
5854
- return /* @__PURE__ */ r("div", { className: _, children: /* @__PURE__ */ r(ct, { helpText: g.helpText, children: g.isCustom ? xt(g, y) : Ze(g.name, ie, g.displayText, g.countriesType) }) }, ie);
5858
+ $ && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: c.fields.map((y, h) => {
5859
+ const B = y.colSpan === 1 ? "col-span-1" : y.colSpan === 2 ? "col-span-2" : y.colSpan === 3 ? "col-span-3" : "col-span-4", te = y.isCustom ? `custom-${h}-${y.paramName}` : `builtin-${y.name}-${h}`;
5860
+ return /* @__PURE__ */ r("div", { className: B, children: /* @__PURE__ */ r(ct, { helpText: y.helpText, children: y.isCustom ? xt(y, h) : Je(y.name, te, y.displayText, y.countriesType) }) }, te);
5855
5861
  }) })
5856
5862
  ] });
5857
5863
  };
5858
5864
  if (!l || A)
5859
5865
  return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
5860
- /* @__PURE__ */ r(ve, { className: "my-8" }),
5866
+ /* @__PURE__ */ r(ke, { className: "my-8" }),
5861
5867
  /* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
5862
5868
  ] }) }) });
5863
5869
  if (m) {
5864
- const c = m[H] ?? m[0], L = Y === -1, $ = X === -1, g = m.length, y = U(c), _ = Object.values(T);
5870
+ const c = m[H] ?? m[0], L = Y === -1, $ = X === -1, y = m.length, h = U(c), B = Object.values(T);
5865
5871
  return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(K, { children: [
5866
- /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5872
+ /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r(Ve, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5867
5873
  /* @__PURE__ */ s(W, { children: [
5868
5874
  (c.title || c.subtitle || c.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
5869
5875
  c.title && /* @__PURE__ */ r(
@@ -5891,27 +5897,27 @@ const _e = {
5891
5897
  }
5892
5898
  )
5893
5899
  ] }),
5894
- (w || _.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5900
+ (w || B.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5895
5901
  w && /* @__PURE__ */ s("p", { className: "text-red-600 text-sm", children: [
5896
5902
  /* @__PURE__ */ r("strong", { children: "Error:" }),
5897
5903
  " ",
5898
5904
  w
5899
5905
  ] }),
5900
- _.map((ie, ae) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: ie }, ae))
5906
+ B.map((te, ie) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: te }, ie))
5901
5907
  ] }),
5902
- g > 1 && /* @__PURE__ */ s("div", { className: "flex items-center gap-2 mb-4", children: [
5903
- m.map((ie, ae) => /* @__PURE__ */ r(
5908
+ y > 1 && /* @__PURE__ */ s("div", { className: "flex items-center gap-2 mb-4", children: [
5909
+ m.map((te, ie) => /* @__PURE__ */ r(
5904
5910
  "div",
5905
5911
  {
5906
- className: `h-1.5 rounded-full transition-all ${ae === H ? "flex-1" : "w-8"}`,
5907
- style: ae === H ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : ae < H ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
5912
+ className: `h-1.5 rounded-full transition-all ${ie === H ? "flex-1" : "w-8"}`,
5913
+ style: ie === H ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : ie < H ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
5908
5914
  },
5909
- ae
5915
+ ie
5910
5916
  )),
5911
5917
  /* @__PURE__ */ s("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
5912
5918
  H + 1,
5913
5919
  " / ",
5914
- g
5920
+ y
5915
5921
  ] })
5916
5922
  ] }),
5917
5923
  bt(c)
@@ -5926,37 +5932,37 @@ const _e = {
5926
5932
  onClick: () => {
5927
5933
  M(Y), J({});
5928
5934
  },
5929
- disabled: te || u,
5935
+ disabled: re || u,
5930
5936
  children: "Previous"
5931
5937
  }
5932
5938
  ),
5933
- L && a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled: te || u, children: "Cancel" })
5939
+ L && a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled: re || u, children: "Cancel" })
5934
5940
  ] }),
5935
5941
  /* @__PURE__ */ r(
5936
5942
  Z,
5937
5943
  {
5938
5944
  type: "button",
5939
- isLoading: te || u,
5940
- onClick: $ ? Ce : ke,
5941
- children: $ ? c.conditionalOn && !y ? "Skip & Submit" : "Submit" : c.conditionalOn && !y ? "Skip" : "Next"
5945
+ isLoading: re || u,
5946
+ onClick: $ ? Ae : we,
5947
+ children: $ ? c.conditionalOn && !h ? "Skip & Submit" : "Submit" : c.conditionalOn && !h ? "Skip" : "Next"
5942
5948
  }
5943
5949
  )
5944
5950
  ] })
5945
5951
  ] }) });
5946
5952
  }
5947
5953
  return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: ft, children: /* @__PURE__ */ s(K, { children: [
5948
- /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5954
+ /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r(Ve, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5949
5955
  /* @__PURE__ */ s(W, { children: [
5950
5956
  w && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ s("p", { className: "text-red-600 text-sm", children: [
5951
5957
  /* @__PURE__ */ r("strong", { children: "Error:" }),
5952
5958
  " ",
5953
5959
  w
5954
5960
  ] }) }),
5955
- /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: h.map((c) => /* @__PURE__ */ r("div", { className: "col-span-4", children: Ze(c) }, c)) })
5961
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: g.map((c) => /* @__PURE__ */ r("div", { className: "col-span-4", children: Je(c) }, c)) })
5956
5962
  ] }),
5957
5963
  /* @__PURE__ */ s(pe, { className: "flex justify-between", children: [
5958
- a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled: te || u, children: "Cancel" }),
5959
- /* @__PURE__ */ r(Z, { type: "submit", isLoading: te || u, children: "Create Applicant" })
5964
+ a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled: re || u, children: "Cancel" }),
5965
+ /* @__PURE__ */ r(Z, { type: "submit", isLoading: re || u, children: "Create Applicant" })
5960
5966
  ] })
5961
5967
  ] }) }) });
5962
5968
  }, gn = ({
@@ -5976,19 +5982,19 @@ const _e = {
5976
5982
  isLoading: N,
5977
5983
  error: m,
5978
5984
  moveBack: x,
5979
- refreshProgress: h
5980
- } = fr(e), [C, D] = ge.useState(!1);
5981
- if (ge.useEffect(() => {
5985
+ refreshProgress: g
5986
+ } = fr(e), [C, D] = ye.useState(!1);
5987
+ if (ye.useEffect(() => {
5982
5988
  m && n && n(m);
5983
- }, [m, n]), ge.useEffect(() => {
5989
+ }, [m, n]), ye.useEffect(() => {
5984
5990
  o != null && o.workflowResult && t && t(o.workflowResult);
5985
- }, [o == null ? void 0 : o.workflowResult, t]), ge.useEffect(() => {
5991
+ }, [o == null ? void 0 : o.workflowResult, t]), ye.useEffect(() => {
5986
5992
  a === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
5987
- }, [a]), ge.useEffect(() => {
5993
+ }, [a]), ye.useEffect(() => {
5988
5994
  b && D(!1);
5989
5995
  }, [b]), N || !o)
5990
5996
  return /* @__PURE__ */ r("div", { className: i, children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
5991
- /* @__PURE__ */ r(ve, { className: "my-8" }),
5997
+ /* @__PURE__ */ r(ke, { className: "my-8" }),
5992
5998
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading workflow..." })
5993
5999
  ] }) }) });
5994
6000
  if (m)
@@ -6024,7 +6030,7 @@ const _e = {
6024
6030
  }
6025
6031
  )
6026
6032
  ] }) }) }) });
6027
- if (o.status === be.Finished || o.status === be.OnHold)
6033
+ if (o.status === ve.Finished || o.status === ve.OnHold)
6028
6034
  return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${i || ""}`, children: /* @__PURE__ */ r(
6029
6035
  lt,
6030
6036
  {
@@ -6040,8 +6046,8 @@ const _e = {
6040
6046
  ) });
6041
6047
  if (!l)
6042
6048
  return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${i || ""}`, children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
6043
- /* @__PURE__ */ r(ve, { className: "my-8" }),
6044
- /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: o.status === be.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
6049
+ /* @__PURE__ */ r(ke, { className: "my-8" }),
6050
+ /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: o.status === ve.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
6045
6051
  ] }) }) });
6046
6052
  const k = (I) => {
6047
6053
  switch (I) {
@@ -6070,8 +6076,8 @@ const _e = {
6070
6076
  const I = d.filter((f) => f.visibility !== !1), j = I.findIndex((f) => f.order === l.order), G = j >= 0 ? j + 1 : 1, E = I.length;
6071
6077
  return /* @__PURE__ */ s("div", { className: "mb-6", children: [
6072
6078
  /* @__PURE__ */ s("div", { className: "flex items-start justify-between mb-4", children: [
6073
- /* @__PURE__ */ r(Ge, {}),
6074
- /* @__PURE__ */ s(Ae, { variant: o.status === 1 ? "info" : "success", children: [
6079
+ /* @__PURE__ */ r(Ve, {}),
6080
+ /* @__PURE__ */ s(Ee, { variant: o.status === 1 ? "info" : "success", children: [
6075
6081
  "Step ",
6076
6082
  G,
6077
6083
  " of ",
@@ -6080,7 +6086,7 @@ const _e = {
6080
6086
  ] }),
6081
6087
  /* @__PURE__ */ r("div", { className: "flex items-center", children: I.map((f, R) => {
6082
6088
  const P = R < j, O = f.order === l.order;
6083
- return /* @__PURE__ */ s(ge.Fragment, { children: [
6089
+ return /* @__PURE__ */ s(ye.Fragment, { children: [
6084
6090
  /* @__PURE__ */ s("div", { className: "flex items-center", children: [
6085
6091
  /* @__PURE__ */ r(
6086
6092
  "div",
@@ -6113,7 +6119,7 @@ const _e = {
6113
6119
  const I = {
6114
6120
  applicantId: e,
6115
6121
  onComplete: async () => {
6116
- await h();
6122
+ await g();
6117
6123
  },
6118
6124
  onBack: l.order > 0 ? x : void 0
6119
6125
  };
@@ -6145,7 +6151,7 @@ const _e = {
6145
6151
  );
6146
6152
  default:
6147
6153
  return /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { className: "py-12 text-center", children: [
6148
- /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(ve, {}) }),
6154
+ /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(ke, {}) }),
6149
6155
  /* @__PURE__ */ s("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
6150
6156
  "Processing step: ",
6151
6157
  l.title || l.name
@@ -6163,12 +6169,12 @@ const _e = {
6163
6169
  ] });
6164
6170
  };
6165
6171
  function yn(e) {
6166
- return Se.object({
6167
- questionResults: Se.any()
6172
+ return Ce.object({
6173
+ questionResults: Ce.any()
6168
6174
  }).passthrough();
6169
6175
  }
6170
6176
  function Gr(e) {
6171
- let t = Se.array(Se.instanceof(File));
6177
+ let t = Ce.array(Ce.instanceof(File));
6172
6178
  if (e.isRequired ? t = t.min(
6173
6179
  1,
6174
6180
  `${e.displayName} is required`
@@ -6194,68 +6200,68 @@ function fn(e) {
6194
6200
  return e.uploadDocumentFiles.forEach((n) => {
6195
6201
  const a = `file_${n.id}`;
6196
6202
  t[a] = Gr(n);
6197
- }), Se.object(t);
6203
+ }), Ce.object(t);
6198
6204
  }
6199
6205
  function xn(e) {
6200
- return Se.any();
6206
+ return Ce.any();
6201
6207
  }
6202
6208
  function Vr(e) {
6203
- return Se.string().min(1, "This question is required");
6209
+ return Ce.string().min(1, "This question is required");
6204
6210
  }
6205
6211
  function bn(e) {
6206
6212
  const t = {};
6207
6213
  return e.appropriatenessQuestions.forEach((n) => {
6208
6214
  const a = `question_${n.id}`;
6209
6215
  t[a] = Vr();
6210
- }), Se.object(t);
6216
+ }), Ce.object(t);
6211
6217
  }
6212
- const vn = Se.any();
6218
+ const vn = Ce.any();
6213
6219
  export {
6214
6220
  at as ALLOWED_LANGUAGES,
6215
6221
  At as ApplicantProgressOnHoldReason,
6216
- be as ApplicantProgressStatus,
6222
+ ve as ApplicantProgressStatus,
6217
6223
  Ht as ApplicantService,
6218
6224
  It as ApplicantStatus,
6219
6225
  Lt as AppropriatenessQuestionType,
6220
6226
  qt as AppropriatenessTestService,
6221
6227
  Wr as AppropriatenessTestStep,
6222
- Ae as Badge,
6228
+ Ee as Badge,
6223
6229
  Qt as BaseInformationService,
6224
6230
  Z as Button,
6225
6231
  K as Card,
6226
6232
  W as CardContent,
6227
6233
  pe as CardFooter,
6228
- de as CardHeader,
6229
- Le as CountriesType,
6234
+ ce as CardHeader,
6235
+ Te as CountriesType,
6230
6236
  hn as CreateApplicantForm,
6231
6237
  Mt as CriteriaBuiltInType,
6232
6238
  zt as DEFAULT_VISIBLE_FIELDS,
6233
6239
  Ft as DocumentReviewStatus,
6234
6240
  Bt as EndpointBuilder,
6235
- ze as ErrorHandler,
6241
+ $e as ErrorHandler,
6236
6242
  nr as EventEmitter,
6237
- Te as FIELD_METADATA,
6243
+ Me as FIELD_METADATA,
6238
6244
  Dt as FileType,
6239
6245
  Cr as FileUpload,
6240
- Ke as GenderType,
6241
- Ge as Header,
6246
+ We as GenderType,
6247
+ Ve as Header,
6242
6248
  _t as HttpClient,
6243
- Me as IdentityProviderManager,
6249
+ Oe as IdentityProviderManager,
6244
6250
  Yt as IdentityService,
6245
- xe as IdentityVerificationProvider,
6251
+ be as IdentityVerificationProvider,
6246
6252
  Yr as IdentityVerificationStep,
6247
6253
  me as Input,
6248
6254
  Gt as InvestorCategorizationService,
6249
6255
  Kr as InvestorCategorizationStep,
6250
- he as InvestorCategorizationType,
6256
+ ge as InvestorCategorizationType,
6251
6257
  Ot as InvestorCategoryType,
6252
6258
  Rt as KycProcessStatus,
6253
- De as KycStatus,
6259
+ Fe as KycStatus,
6254
6260
  lt as KycStatusDisplay,
6255
6261
  gn as KycWorkflow,
6256
6262
  Qr as Logo,
6257
6263
  mt as MetaKYCContext,
6258
- Ne as MetaKYCError,
6264
+ Se as MetaKYCError,
6259
6265
  on as MetaKYCProvider,
6260
6266
  Sr as MultiSelect,
6261
6267
  lr as OnfidoProvider,
@@ -6264,46 +6270,46 @@ export {
6264
6270
  Ar as PhoneInput,
6265
6271
  Ut as QuestionnaireService,
6266
6272
  Or as QuestionnaireStep,
6267
- Fe as ReviewStatus,
6273
+ Le as ReviewStatus,
6268
6274
  Tt as RiskCriteriaType,
6269
6275
  Et as RiskLevel,
6270
6276
  Wt as RiskScoringService,
6271
6277
  jr as RiskScoringStep,
6272
6278
  cr as SardinAIProvider,
6273
- We as SearchableSelect,
6274
- He as Select,
6275
- ve as Spinner,
6279
+ Ye as SearchableSelect,
6280
+ Ue as Select,
6281
+ ke as Spinner,
6276
6282
  ir as StepRouter,
6277
6283
  or as SumsubProvider,
6278
6284
  dr as ThemeManager,
6279
- ce as ThemePreset,
6285
+ le as ThemePreset,
6280
6286
  rr as ThemeService,
6281
6287
  jt as UploadDocumentService,
6282
6288
  $r as UploadDocumentStep,
6283
6289
  Pt as UserType,
6284
- Ie as ValueDataType,
6290
+ Re as ValueDataType,
6285
6291
  sr as WorkflowOrchestrator,
6286
- qe as WorkflowResultType,
6292
+ Ke as WorkflowResultType,
6287
6293
  ar as WorkflowState,
6288
6294
  V as WorkflowStepAction,
6289
6295
  vn as appropriatenessTestSchema,
6290
6296
  mn as clearAllStorage,
6291
6297
  hr as clearApplicantId,
6292
6298
  yr as clearWorkflowState,
6293
- oe as cn,
6299
+ se as cn,
6294
6300
  Vt as corporateTheme,
6295
6301
  $t as defaultConfig,
6296
6302
  ue as defaultTheme,
6297
6303
  ur as fileToBase64,
6298
6304
  Zt as fintechTheme,
6299
- Ye as formatFileSize,
6305
+ Qe as formatFileSize,
6300
6306
  bn as generateAppropriatenessSchema,
6301
6307
  yn as generateQuestionnaireSchema,
6302
6308
  xn as generateRiskScoringSchema,
6303
6309
  fn as generateUploadDocumentSchema,
6304
6310
  dn as getAcceptString,
6305
6311
  pr as getApplicantId,
6306
- $e as getThemePreset,
6312
+ Be as getThemePreset,
6307
6313
  un as getWorkflowState,
6308
6314
  Jt as healthcareTheme,
6309
6315
  an as isScriptLoaded,
@@ -6318,7 +6324,7 @@ export {
6318
6324
  pn as useAppropriatenessTest,
6319
6325
  kr as useIdentityVerification,
6320
6326
  fr as useKycWorkflow,
6321
- ye as useMetaKYC,
6327
+ fe as useMetaKYC,
6322
6328
  vr as useOverview,
6323
6329
  xr as useQuestionnaire,
6324
6330
  wr as useRiskScoring,