@vpdev2/metakyc-sdk 1.0.59 → 1.0.61

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,14 +1,14 @@
1
- var bt = Object.defineProperty;
2
- var vt = (e, t, n) => t in e ? bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var re = (e, t, n) => vt(e, typeof t != "symbol" ? t + "" : t, n);
4
- import kt from "axios";
1
+ var vt = Object.defineProperty;
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);
4
+ import wt from "axios";
5
5
  import * as nt from "react";
6
- import ge, { createContext as wt, useState as b, useMemo as Ee, useEffect as ne, useContext as Nt, useRef as ee, useCallback as Q, forwardRef as Ue, createElement as Qe } from "react";
7
- import { jsx as r, jsxs as s, Fragment as ct } from "react/jsx-runtime";
6
+ import ge, { createContext as Nt, useState as b, useMemo as Ee, useEffect as ne, useContext as St, useRef as ee, useCallback as Q, forwardRef as Ue, createElement as Qe } from "react";
7
+ import { jsx as r, jsxs as s, Fragment as dt } from "react/jsx-runtime";
8
8
  import { createPortal as Ve } from "react-dom";
9
- import { useForm as St, Controller as Pe } from "react-hook-form";
9
+ import { useForm as Ct, Controller as Pe } from "react-hook-form";
10
10
  import { z as Se } from "zod";
11
- var G = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(G || {}), qe = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(qe || {}), xe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(xe || {}), Ct = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.RepresentativeKYC = 1] = "RepresentativeKYC", e[e.ManualRiskCriteria = 2] = "ManualRiskCriteria", e[e.UploadDocumentReview = 3] = "UploadDocumentReview", e[e.AdminReview = 4] = "AdminReview", e))(Ct || {}), At = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(At || {}), De = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(De || {}), Fe = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(Fe || {}), Et = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Et || {}), It = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(It || {}), fe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(fe || {}), Rt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Rt || {}), Ke = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ke || {}), Pt = /* @__PURE__ */ ((e) => (e[e.Image = 0] = "Image", e[e.Video = 1] = "Video", e[e.PDF = 2] = "PDF", e[e.OfficePDF = 3] = "OfficePDF", e[e.Custom = 4] = "Custom", e))(Pt || {}), Dt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Dt || {}), Ft = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Ft || {}), Ie = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Decimal = 2] = "Decimal", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Ie || {}), Lt = /* @__PURE__ */ ((e) => (e[e.Text = 0] = "Text", e[e.Radio = 1] = "Radio", e[e.Checkbox = 2] = "Checkbox", e[e.Dropdown = 3] = "Dropdown", e[e.Country = 4] = "Country", e))(Lt || {}), Tt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Tt || {}), he = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(he || {}), Mt = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(Mt || {});
11
+ var G = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(G || {}), qe = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(qe || {}), xe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(xe || {}), 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 || {}), fe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(fe || {}), 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
12
  const Le = {
13
13
  Nationality: 10,
14
14
  Address: 20,
@@ -38,7 +38,7 @@ const Le = {
38
38
  defaultLanguage: { label: "Default Language", type: "select" },
39
39
  educationLevel: { label: "Education Level", type: "text" },
40
40
  occupation: { label: "Occupation", type: "text" }
41
- }, Ot = [
41
+ }, zt = [
42
42
  "firstName",
43
43
  "lastName",
44
44
  "email",
@@ -64,7 +64,7 @@ const Le = {
64
64
  { value: "NO", label: "Norwegian" }
65
65
  ];
66
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 || {});
67
- const zt = {
67
+ const $t = {
68
68
  timeout: 3e4,
69
69
  retries: 3,
70
70
  locale: "en",
@@ -72,7 +72,7 @@ const zt = {
72
72
  pattern: "host-controller"
73
73
  }
74
74
  };
75
- class $t {
75
+ class Bt {
76
76
  constructor(t) {
77
77
  this.config = t;
78
78
  }
@@ -113,10 +113,10 @@ class $t {
113
113
  }
114
114
  }
115
115
  class Ne extends Error {
116
- constructor(n, a, i, o, l) {
116
+ constructor(n, a, i, o, c) {
117
117
  super(n);
118
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);
119
+ this.code = a, this.details = i, this.validationErrors = o, this.name = "MetaKYCError", this.response = c, Object.setPrototypeOf(this, Ne.prototype);
120
120
  }
121
121
  }
122
122
  class ze {
@@ -169,12 +169,12 @@ class ze {
169
169
  return t instanceof Ne;
170
170
  }
171
171
  }
172
- class Bt {
172
+ class _t {
173
173
  constructor(t) {
174
174
  re(this, "axiosInstance");
175
175
  re(this, "endpointBuilder");
176
176
  re(this, "config");
177
- this.config = { ...zt, ...t }, this.endpointBuilder = new $t(this.config.endpoints), this.axiosInstance = kt.create({
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,
180
180
  headers: {
@@ -264,7 +264,7 @@ class Bt {
264
264
  return this.axiosInstance;
265
265
  }
266
266
  }
267
- class _t {
267
+ class Ht {
268
268
  constructor(t) {
269
269
  this.httpClient = t;
270
270
  }
@@ -383,7 +383,7 @@ class _t {
383
383
  )).result;
384
384
  }
385
385
  }
386
- class Ht {
386
+ class Ut {
387
387
  constructor(t) {
388
388
  this.httpClient = t;
389
389
  }
@@ -410,7 +410,7 @@ class Ht {
410
410
  )).result;
411
411
  }
412
412
  }
413
- class Ut {
413
+ class jt {
414
414
  constructor(t) {
415
415
  this.httpClient = t;
416
416
  }
@@ -438,7 +438,7 @@ class Ut {
438
438
  await this.httpClient.post("UploadDocument", "ReviewUploadDocument", t);
439
439
  }
440
440
  }
441
- class jt {
441
+ class qt {
442
442
  constructor(t) {
443
443
  this.httpClient = t;
444
444
  }
@@ -464,7 +464,7 @@ class jt {
464
464
  )).result;
465
465
  }
466
466
  }
467
- class qt {
467
+ class Kt {
468
468
  constructor(t) {
469
469
  this.httpClient = t;
470
470
  }
@@ -486,7 +486,7 @@ class qt {
486
486
  await this.httpClient.get("Applicant", "PassOverview", { applicantId: t });
487
487
  }
488
488
  }
489
- class Kt {
489
+ class Wt {
490
490
  constructor(t) {
491
491
  this.httpClient = t;
492
492
  }
@@ -521,7 +521,7 @@ class Kt {
521
521
  )).result;
522
522
  }
523
523
  }
524
- class Wt {
524
+ class Yt {
525
525
  constructor(t) {
526
526
  this.httpClient = t;
527
527
  }
@@ -576,7 +576,7 @@ class Wt {
576
576
  return this.identityCompanyRequest(n);
577
577
  }
578
578
  }
579
- class Yt {
579
+ class Qt {
580
580
  constructor(t) {
581
581
  this.httpClient = t;
582
582
  }
@@ -612,7 +612,7 @@ class Yt {
612
612
  )).result;
613
613
  }
614
614
  }
615
- class Qt {
615
+ class Gt {
616
616
  constructor(t) {
617
617
  this.httpClient = t;
618
618
  }
@@ -697,7 +697,7 @@ const ue = {
697
697
  textMuted: "#9ca3af"
698
698
  }
699
699
  }
700
- }, Gt = {
700
+ }, Vt = {
701
701
  name: "Corporate",
702
702
  logo: {
703
703
  url: "",
@@ -730,7 +730,7 @@ const ue = {
730
730
  cardPadding: "1.5rem",
731
731
  inputHeight: "2.5rem"
732
732
  }
733
- }, Vt = {
733
+ }, Zt = {
734
734
  name: "Fintech",
735
735
  logo: {
736
736
  url: "",
@@ -763,7 +763,7 @@ const ue = {
763
763
  cardPadding: "2rem",
764
764
  inputHeight: "3rem"
765
765
  }
766
- }, Zt = {
766
+ }, Jt = {
767
767
  name: "Healthcare",
768
768
  logo: {
769
769
  url: "",
@@ -805,7 +805,7 @@ const ue = {
805
805
  textSecondary: "#CBD5E1"
806
806
  }
807
807
  }
808
- }, Jt = {
808
+ }, Xt = {
809
809
  name: "Modern",
810
810
  logo: {
811
811
  url: "",
@@ -838,7 +838,7 @@ const ue = {
838
838
  cardPadding: "2rem",
839
839
  inputHeight: "3rem"
840
840
  }
841
- }, Xt = {
841
+ }, er = {
842
842
  name: "Minimal",
843
843
  logo: {
844
844
  url: "",
@@ -871,18 +871,18 @@ const ue = {
871
871
  cardPadding: "1.25rem",
872
872
  inputHeight: "2.25rem"
873
873
  }
874
- }, er = {
874
+ }, tr = {
875
875
  [ce.Default]: ue,
876
- [ce.Corporate]: Gt,
877
- [ce.Fintech]: Vt,
878
- [ce.Healthcare]: Zt,
879
- [ce.Modern]: Jt,
880
- [ce.Minimal]: Xt
876
+ [ce.Corporate]: Vt,
877
+ [ce.Fintech]: Zt,
878
+ [ce.Healthcare]: Jt,
879
+ [ce.Modern]: Xt,
880
+ [ce.Minimal]: er
881
881
  };
882
882
  function $e(e) {
883
- return er[e] || ue;
883
+ return tr[e] || ue;
884
884
  }
885
- class tr {
885
+ class rr {
886
886
  constructor(t) {
887
887
  this.httpClient = t;
888
888
  }
@@ -908,12 +908,12 @@ class tr {
908
908
  try {
909
909
  const i = typeof n.result.applicantFormPages == "string" ? JSON.parse(n.result.applicantFormPages) : n.result.applicantFormPages;
910
910
  Array.isArray(i) && i.length > 0 && (a.applicantFormPages = i.map((o) => {
911
- const l = !o._v || o._v < 4;
911
+ const c = !o._v || o._v < 4;
912
912
  return {
913
913
  ...o,
914
914
  fields: (o.fields || []).map((d) => ({
915
915
  ...d,
916
- colSpan: l ? d.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, d.colSpan ?? 4))
916
+ colSpan: c ? d.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, d.colSpan ?? 4))
917
917
  }))
918
918
  };
919
919
  }));
@@ -958,7 +958,7 @@ class tr {
958
958
  } : a;
959
959
  }
960
960
  }
961
- class rr {
961
+ class nr {
962
962
  constructor() {
963
963
  re(this, "listeners", /* @__PURE__ */ new Map());
964
964
  }
@@ -1003,9 +1003,9 @@ class rr {
1003
1003
  this.listeners.delete(t);
1004
1004
  }
1005
1005
  }
1006
- class nr {
1006
+ class ar {
1007
1007
  constructor() {
1008
- re(this, "events", new rr());
1008
+ re(this, "events", new nr());
1009
1009
  re(this, "_applicantId", null);
1010
1010
  re(this, "_progress", null);
1011
1011
  re(this, "_error", null);
@@ -1143,7 +1143,7 @@ class nr {
1143
1143
  this.events.clear();
1144
1144
  }
1145
1145
  }
1146
- class ar {
1146
+ class ir {
1147
1147
  constructor() {
1148
1148
  re(this, "handlers", /* @__PURE__ */ new Map());
1149
1149
  }
@@ -1184,11 +1184,11 @@ class ar {
1184
1184
  return a.submitData(n);
1185
1185
  }
1186
1186
  }
1187
- class ir {
1188
- constructor(t, n, a, i, o, l, d, u) {
1187
+ class sr {
1188
+ constructor(t, n, a, i, o, c, d, u) {
1189
1189
  re(this, "state");
1190
1190
  re(this, "stepRouter");
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 nr(), this.stepRouter = new ar(), this.registerStepHandlers();
1191
+ this.applicantService = t, this.questionnaireService = n, this.uploadDocumentService = a, this.appropriatenessTestService = i, this.overviewService = o, this.riskScoringService = c, this.investorCategorizationService = u, this.state = new ar(), this.stepRouter = new ir(), this.registerStepHandlers();
1192
1192
  }
1193
1193
  /**
1194
1194
  * Register all step handlers
@@ -1328,7 +1328,7 @@ class ir {
1328
1328
  return this.stepRouter;
1329
1329
  }
1330
1330
  }
1331
- function dt(e, t) {
1331
+ function ut(e, t) {
1332
1332
  return new Promise((n, a) => {
1333
1333
  if (t && document.getElementById(t)) {
1334
1334
  n();
@@ -1345,7 +1345,7 @@ function sn(e) {
1345
1345
  const t = document.getElementById(e);
1346
1346
  t && t.remove();
1347
1347
  }
1348
- class sr {
1348
+ class or {
1349
1349
  constructor(t) {
1350
1350
  re(this, "sdk", null);
1351
1351
  re(this, "config");
@@ -1355,7 +1355,7 @@ class sr {
1355
1355
  * Load Sumsub SDK
1356
1356
  */
1357
1357
  async loadSDK() {
1358
- await dt(
1358
+ await ut(
1359
1359
  "https://cdn.sumsub.com/websdk/v2/production/websdk.js",
1360
1360
  "sumsub-sdk"
1361
1361
  );
@@ -1400,7 +1400,7 @@ class sr {
1400
1400
  this.sdk && this.sdk.on("idCheck.onError", t);
1401
1401
  }
1402
1402
  }
1403
- class or {
1403
+ class lr {
1404
1404
  constructor(t) {
1405
1405
  re(this, "sdk", null);
1406
1406
  re(this, "config");
@@ -1410,7 +1410,7 @@ class or {
1410
1410
  * Load Onfido SDK
1411
1411
  */
1412
1412
  async loadSDK() {
1413
- await dt(
1413
+ await ut(
1414
1414
  "https://sdk.onfido.com/v12.0.0/onfido.min.js",
1415
1415
  "onfido-sdk"
1416
1416
  );
@@ -1466,7 +1466,7 @@ class or {
1466
1466
  this.sdk && (this.sdk.tearDown(), this.sdk = null);
1467
1467
  }
1468
1468
  }
1469
- class lr {
1469
+ class cr {
1470
1470
  constructor(t) {
1471
1471
  re(this, "sardineContext", null);
1472
1472
  re(this, "config");
@@ -1526,7 +1526,7 @@ class lr {
1526
1526
  try {
1527
1527
  if (await this.loadSDK(), !window._Sardine)
1528
1528
  throw new Error("SardinAI SDK not available after loading");
1529
- const t = this.getSardineHost(), { clientId: n, environment: a, flow: i, enableBiometrics: o, enablePortScanning: l } = this.config;
1529
+ const t = this.getSardineHost(), { clientId: n, environment: a, flow: i, enableBiometrics: o, enablePortScanning: c } = this.config;
1530
1530
  this.sardineContext = window._Sardine.createContext({
1531
1531
  clientId: n,
1532
1532
  sessionKey: this.sessionKey,
@@ -1537,7 +1537,7 @@ class lr {
1537
1537
  parentElement: document.body,
1538
1538
  enableBiometrics: o !== !1,
1539
1539
  // Default true
1540
- enablePortScanning: l === !0,
1540
+ enablePortScanning: c === !0,
1541
1541
  // Default false
1542
1542
  region: this.config.region,
1543
1543
  // Callback for device response (deprecated but kept for compatibility)
@@ -1617,11 +1617,11 @@ class Me {
1617
1617
  static createProvider(t, n) {
1618
1618
  switch (t) {
1619
1619
  case fe.Sumsub:
1620
- return new sr(n);
1621
- case fe.Onfido:
1622
1620
  return new or(n);
1623
- case fe.SardinAI:
1621
+ case fe.Onfido:
1624
1622
  return new lr(n);
1623
+ case fe.SardinAI:
1624
+ return new cr(n);
1625
1625
  default:
1626
1626
  throw new Error(`Unsupported identity provider: ${t}`);
1627
1627
  }
@@ -1660,7 +1660,7 @@ class Me {
1660
1660
  }
1661
1661
  }
1662
1662
  }
1663
- class cr {
1663
+ class dr {
1664
1664
  constructor(t) {
1665
1665
  re(this, "currentTheme", ue);
1666
1666
  re(this, "customStyleElement", null);
@@ -1786,9 +1786,9 @@ class cr {
1786
1786
  return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1787
1787
  }
1788
1788
  }
1789
- const ut = wt(null), on = ({ config: e, children: t }) => {
1790
- const [n, a] = b(null), i = ge.useRef(!1), o = ge.useRef(!1), l = Ee(() => {
1791
- const u = new Bt(e), p = new _t(u), x = new Ht(u), N = new Ut(u), m = new jt(u), y = new qt(u), h = new Kt(u), C = new Wt(u), F = new Yt(u), k = new Qt(u), $ = new tr(u), A = new cr();
1789
+ const mt = Nt(null), on = ({ config: e, children: t }) => {
1790
+ const [n, a] = b(null), i = ge.useRef(!1), o = ge.useRef(!1), c = Ee(() => {
1791
+ const u = new _t(e), p = new Ht(u), x = new Ut(u), N = new jt(u), m = new qt(u), y = new Kt(u), h = new Wt(u), C = new Yt(u), F = new Qt(u), k = new Gt(u), $ = new rr(u), A = new dr();
1792
1792
  return {
1793
1793
  httpClient: u,
1794
1794
  applicantService: p,
@@ -1805,19 +1805,19 @@ const ut = wt(null), on = ({ config: e, children: t }) => {
1805
1805
  };
1806
1806
  }, [e]), d = Ee(() => ({
1807
1807
  config: e,
1808
- ...l,
1808
+ ...c,
1809
1809
  currentTheme: n,
1810
- createOrchestrator: () => new ir(
1811
- l.applicantService,
1812
- l.questionnaireService,
1813
- l.uploadDocumentService,
1814
- l.appropriatenessTestService,
1815
- l.overviewService,
1816
- l.riskScoringService,
1817
- l.identityService,
1818
- l.investorCategorizationService
1810
+ createOrchestrator: () => new sr(
1811
+ c.applicantService,
1812
+ c.questionnaireService,
1813
+ c.uploadDocumentService,
1814
+ c.appropriatenessTestService,
1815
+ c.overviewService,
1816
+ c.riskScoringService,
1817
+ c.identityService,
1818
+ c.investorCategorizationService
1819
1819
  )
1820
- }), [e, l, n]);
1820
+ }), [e, c, n]);
1821
1821
  return ne(() => ((async () => {
1822
1822
  if (i.current || o.current) {
1823
1823
  console.log("[MetaKYC] Theme already loading or loaded, skipping...");
@@ -1826,28 +1826,28 @@ const ut = wt(null), on = ({ config: e, children: t }) => {
1826
1826
  i.current = !0;
1827
1827
  try {
1828
1828
  if (e.theme) {
1829
- console.log("[MetaKYC] Applying static theme from config"), l.themeManager.applyTheme(e.theme), a(l.themeManager.getCurrentTheme()), o.current = !0;
1829
+ console.log("[MetaKYC] Applying static theme from config"), c.themeManager.applyTheme(e.theme), a(c.themeManager.getCurrentTheme()), o.current = !0;
1830
1830
  return;
1831
1831
  }
1832
1832
  console.log("[MetaKYC] Fetching theme from backend...");
1833
- const p = await l.themeService.getThemeConfiguration();
1834
- l.themeManager.applyTheme(p), a(l.themeManager.getCurrentTheme()), o.current = !0, console.log("[MetaKYC] Theme loaded and applied", p);
1833
+ const p = await c.themeService.getThemeConfiguration();
1834
+ c.themeManager.applyTheme(p), a(c.themeManager.getCurrentTheme()), o.current = !0, console.log("[MetaKYC] Theme loaded and applied", p);
1835
1835
  } catch (p) {
1836
- console.warn("[MetaKYC] Failed to load theme, using default:", p), a(l.themeManager.getCurrentTheme()), o.current = !0;
1836
+ console.warn("[MetaKYC] Failed to load theme, using default:", p), a(c.themeManager.getCurrentTheme()), o.current = !0;
1837
1837
  } finally {
1838
1838
  i.current = !1;
1839
1839
  }
1840
1840
  })(), () => {
1841
- l.themeManager.cleanup();
1842
- }), []), /* @__PURE__ */ r(ut.Provider, { value: d, children: t });
1841
+ c.themeManager.cleanup();
1842
+ }), []), /* @__PURE__ */ r(mt.Provider, { value: d, children: t });
1843
1843
  };
1844
1844
  function ye() {
1845
- const e = Nt(ut);
1845
+ const e = St(mt);
1846
1846
  if (!e)
1847
1847
  throw new Error("useMetaKYC must be used within a MetaKYCProvider");
1848
1848
  return e;
1849
1849
  }
1850
- async function dr(e) {
1850
+ async function ur(e) {
1851
1851
  return new Promise((t, n) => {
1852
1852
  const a = new FileReader();
1853
1853
  a.readAsDataURL(e), a.onload = () => {
@@ -1883,14 +1883,14 @@ const Oe = {
1883
1883
  APPLICANT_ID: "metakyc_applicant_id",
1884
1884
  WORKFLOW_STATE: "metakyc_workflow_state"
1885
1885
  };
1886
- function ur(e) {
1886
+ function mr(e) {
1887
1887
  try {
1888
1888
  localStorage.setItem(Oe.APPLICANT_ID, e.toString());
1889
1889
  } catch (t) {
1890
1890
  console.warn("Failed to save applicant ID to storage:", t);
1891
1891
  }
1892
1892
  }
1893
- function mr() {
1893
+ function pr() {
1894
1894
  try {
1895
1895
  const e = localStorage.getItem(Oe.APPLICANT_ID);
1896
1896
  return e ? parseInt(e, 10) : null;
@@ -1898,14 +1898,14 @@ function mr() {
1898
1898
  return console.warn("Failed to retrieve applicant ID from storage:", e), null;
1899
1899
  }
1900
1900
  }
1901
- function pr() {
1901
+ function hr() {
1902
1902
  try {
1903
1903
  localStorage.removeItem(Oe.APPLICANT_ID);
1904
1904
  } catch (e) {
1905
1905
  console.warn("Failed to clear applicant ID from storage:", e);
1906
1906
  }
1907
1907
  }
1908
- function hr(e) {
1908
+ function gr(e) {
1909
1909
  try {
1910
1910
  localStorage.setItem(Oe.WORKFLOW_STATE, JSON.stringify(e));
1911
1911
  } catch (t) {
@@ -1920,7 +1920,7 @@ function un() {
1920
1920
  return console.warn("Failed to retrieve workflow state from storage:", e), null;
1921
1921
  }
1922
1922
  }
1923
- function gr() {
1923
+ function yr() {
1924
1924
  try {
1925
1925
  localStorage.removeItem(Oe.WORKFLOW_STATE);
1926
1926
  } catch (e) {
@@ -1928,15 +1928,15 @@ function gr() {
1928
1928
  }
1929
1929
  }
1930
1930
  function mn() {
1931
- pr(), gr();
1931
+ hr(), yr();
1932
1932
  }
1933
- function yr(e) {
1934
- const { createOrchestrator: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [l, d] = b(null), u = ee(null), p = e || mr();
1933
+ function fr(e) {
1934
+ const { createOrchestrator: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [c, d] = b(null), u = ee(null), p = e || pr();
1935
1935
  ne(() => {
1936
1936
  u.current || (u.current = t());
1937
1937
  }, [t]), ne(() => {
1938
1938
  var A;
1939
- n && p && (ur(p), hr({
1939
+ n && p && (mr(p), gr({
1940
1940
  applicantId: p,
1941
1941
  currentStepOrder: (A = n.currentStep) == null ? void 0 : A.order,
1942
1942
  status: n.status,
@@ -2030,7 +2030,7 @@ function yr(e) {
2030
2030
  nextWorkflowKey: n == null ? void 0 : n.nextWorkflowKey,
2031
2031
  hasWorkflowChanged: $,
2032
2032
  isLoading: i,
2033
- error: l,
2033
+ error: c,
2034
2034
  isComplete: (n == null ? void 0 : n.status) === xe.Finished,
2035
2035
  isOnHold: (n == null ? void 0 : n.status) === xe.OnHold,
2036
2036
  refreshProgress: y,
@@ -2040,8 +2040,8 @@ function yr(e) {
2040
2040
  orchestrator: u.current
2041
2041
  };
2042
2042
  }
2043
- function fr(e) {
2044
- const { questionnaireService: t, applicantService: n } = ye(), [a, i] = b(null), [o, l] = b({}), [d, u] = b(!1), [p, x] = b(!1), [N, m] = b(null), y = ee(!1), h = ee(null), C = Q(async () => {
2043
+ function xr(e) {
2044
+ const { questionnaireService: t, applicantService: n } = ye(), [a, i] = b(null), [o, c] = b({}), [d, u] = b(!1), [p, x] = b(!1), [N, m] = b(null), y = ee(!1), h = ee(null), C = Q(async () => {
2045
2045
  var k, $;
2046
2046
  if (e) {
2047
2047
  if (y.current) {
@@ -2063,7 +2063,7 @@ function fr(e) {
2063
2063
  const R = g.text.trim().toLowerCase();
2064
2064
  j.has(R) && (J[g.id] = j.get(R));
2065
2065
  }
2066
- l(J);
2066
+ c(J);
2067
2067
  }
2068
2068
  h.current = e;
2069
2069
  } catch (A) {
@@ -2099,8 +2099,8 @@ function fr(e) {
2099
2099
  submit: F
2100
2100
  };
2101
2101
  }
2102
- function xr(e) {
2103
- const { uploadDocumentService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [l, d] = b(!1), [u, p] = b(0), [x, N] = b(null), m = ee(!1), y = ee(null), h = Q(async () => {
2102
+ function br(e) {
2103
+ const { uploadDocumentService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [c, d] = b(!1), [u, p] = b(0), [x, N] = b(null), m = ee(!1), y = ee(null), h = Q(async () => {
2104
2104
  if (e) {
2105
2105
  if (m.current) {
2106
2106
  console.log("[UploadDocument] Load already in progress, skipping...");
@@ -2136,7 +2136,7 @@ function xr(e) {
2136
2136
  return {
2137
2137
  uploadDocument: n,
2138
2138
  isLoading: i,
2139
- isSubmitting: l,
2139
+ isSubmitting: c,
2140
2140
  uploadProgress: u,
2141
2141
  error: x,
2142
2142
  load: h,
@@ -2144,7 +2144,7 @@ function xr(e) {
2144
2144
  };
2145
2145
  }
2146
2146
  function pn(e) {
2147
- const { appropriatenessTestService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [l, d] = b(!1), [u, p] = b(null), [x, N] = b(null), m = ee(!1), y = ee(null), h = Q(async () => {
2147
+ const { appropriatenessTestService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [c, d] = b(!1), [u, p] = b(null), [x, N] = b(null), m = ee(!1), y = ee(null), h = Q(async () => {
2148
2148
  if (e) {
2149
2149
  if (m.current) {
2150
2150
  console.log("[AppropriatenessTest] Load already in progress, skipping...");
@@ -2182,14 +2182,14 @@ function pn(e) {
2182
2182
  test: n,
2183
2183
  result: x,
2184
2184
  isLoading: i,
2185
- isSubmitting: l,
2185
+ isSubmitting: c,
2186
2186
  error: u,
2187
2187
  load: h,
2188
2188
  submit: C
2189
2189
  };
2190
2190
  }
2191
- function br(e) {
2192
- const { overviewService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [l, d] = b(!1), [u, p] = b(null), x = ee(!1), N = ee(null), m = Q(async () => {
2191
+ function vr(e) {
2192
+ const { overviewService: t } = ye(), [n, a] = b(null), [i, o] = b(!1), [c, d] = b(!1), [u, p] = b(null), x = ee(!1), N = ee(null), m = Q(async () => {
2193
2193
  if (e) {
2194
2194
  if (x.current) {
2195
2195
  console.log("[Overview] Load already in progress, skipping...");
@@ -2224,16 +2224,16 @@ function br(e) {
2224
2224
  return {
2225
2225
  overview: n,
2226
2226
  isLoading: i,
2227
- isSubmitting: l,
2227
+ isSubmitting: c,
2228
2228
  error: u,
2229
2229
  load: m,
2230
2230
  passOverview: y
2231
2231
  };
2232
2232
  }
2233
- function vr(e) {
2233
+ function kr(e) {
2234
2234
  const { identityService: t } = ye(), [n, a] = b(
2235
2235
  null
2236
- ), [i, o] = b(!1), [l, d] = b(null), u = ee(!1), p = Q(
2236
+ ), [i, o] = b(!1), [c, d] = b(null), u = ee(!1), p = Q(
2237
2237
  async (m, y) => {
2238
2238
  if (e) {
2239
2239
  if (u.current) {
@@ -2310,14 +2310,14 @@ function vr(e) {
2310
2310
  provider: (n == null ? void 0 : n.provider) || null,
2311
2311
  token: (n == null ? void 0 : n.publicProviderTokenObject) || null,
2312
2312
  isLoading: i,
2313
- error: l,
2313
+ error: c,
2314
2314
  requestIdentity: p,
2315
2315
  requestCompanyIdentity: x,
2316
2316
  restartIdentity: N
2317
2317
  };
2318
2318
  }
2319
- function kr(e) {
2320
- const { riskScoringService: t, applicantService: n } = ye(), [a, i] = b(null), [o, l] = b({}), [d, u] = b(!1), [p, x] = b(!1), [N, m] = b(null), [y, h] = b(null), C = ee(!1), F = ee(null), k = Q(async () => {
2319
+ function wr(e) {
2320
+ const { riskScoringService: t, applicantService: n } = ye(), [a, i] = b(null), [o, c] = b({}), [d, u] = b(!1), [p, x] = b(!1), [N, m] = b(null), [y, h] = b(null), C = ee(!1), F = ee(null), k = Q(async () => {
2321
2321
  var A;
2322
2322
  if (e) {
2323
2323
  if (C.current) {
@@ -2339,7 +2339,7 @@ function kr(e) {
2339
2339
  )];
2340
2340
  R.length > 0 && (E[g.riskCriteriaId] = R);
2341
2341
  }
2342
- l(E);
2342
+ c(E);
2343
2343
  }
2344
2344
  F.current = e;
2345
2345
  } catch (I) {
@@ -2377,16 +2377,16 @@ function kr(e) {
2377
2377
  submit: $
2378
2378
  };
2379
2379
  }
2380
- function wr() {
2381
- const { applicantService: e, config: t } = ye(), [n, a] = b(!1), [i, o] = b(null), l = ee(!1), d = ee(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(y) {
2380
+ function Nr() {
2381
+ const { applicantService: e, config: t } = ye(), [n, a] = b(!1), [i, o] = b(null), c = ee(!1), d = ee(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(y) {
2382
2382
  const h = Math.random() * 16 | 0;
2383
2383
  return (y === "x" ? h : h & 3 | 8).toString(16);
2384
2384
  }), p = Q(
2385
2385
  async (y) => {
2386
2386
  var h;
2387
- if (l.current)
2387
+ if (c.current)
2388
2388
  throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
2389
- l.current = !0, a(!0), o(null);
2389
+ c.current = !0, a(!0), o(null);
2390
2390
  try {
2391
2391
  if (y.applicantAdditionalDatas || (y.applicantAdditionalDatas = []), (h = t.identityProviders) != null && h.sardinai) {
2392
2392
  const F = u();
@@ -2399,7 +2399,7 @@ function wr() {
2399
2399
  } catch (C) {
2400
2400
  throw o(C), C;
2401
2401
  } finally {
2402
- a(!1), l.current = !1;
2402
+ a(!1), c.current = !1;
2403
2403
  }
2404
2404
  },
2405
2405
  [e, t]
@@ -2458,7 +2458,7 @@ const V = ({
2458
2458
  isLoading: a = !1,
2459
2459
  disabled: i,
2460
2460
  className: o,
2461
- ...l
2461
+ ...c
2462
2462
  }) => {
2463
2463
  const d = "inline-flex items-center justify-center rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed", u = {
2464
2464
  primary: "bg-primary-500 text-white hover:bg-primary-600 focus:ring-primary-500",
@@ -2476,7 +2476,7 @@ const V = ({
2476
2476
  {
2477
2477
  className: oe(d, u[t], p[n], o),
2478
2478
  disabled: i || a,
2479
- ...l,
2479
+ ...c,
2480
2480
  children: [
2481
2481
  a && /* @__PURE__ */ s(
2482
2482
  "svg",
@@ -2513,10 +2513,10 @@ const V = ({
2513
2513
  }
2514
2514
  );
2515
2515
  }, me = Ue(
2516
- ({ label: e, error: t, helperText: n, leftIcon: a, rightIcon: i, className: o, ...l }, d) => /* @__PURE__ */ s("div", { className: "w-full", children: [
2516
+ ({ label: e, error: t, helperText: n, leftIcon: a, rightIcon: i, className: o, ...c }, d) => /* @__PURE__ */ s("div", { className: "w-full", children: [
2517
2517
  e && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
2518
2518
  e,
2519
- l.required && /* @__PURE__ */ r("span", { className: "text-danger-500 ml-1", children: "*" })
2519
+ c.required && /* @__PURE__ */ r("span", { className: "text-danger-500 ml-1", children: "*" })
2520
2520
  ] }),
2521
2521
  /* @__PURE__ */ s("div", { className: "relative", children: [
2522
2522
  a && /* @__PURE__ */ r("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: a }),
@@ -2534,7 +2534,7 @@ const V = ({
2534
2534
  i ? "pr-10" : "",
2535
2535
  o
2536
2536
  ),
2537
- ...l
2537
+ ...c
2538
2538
  }
2539
2539
  ),
2540
2540
  i && /* @__PURE__ */ r("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: i })
@@ -2632,7 +2632,7 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2632
2632
  }
2633
2633
  ) });
2634
2634
  }, He = Ue(
2635
- ({ label: e, error: t, helperText: n, options: a, placeholder: i, className: o, style: l, ...d }, u) => /* @__PURE__ */ s("div", { className: "w-full", children: [
2635
+ ({ label: e, error: t, helperText: n, options: a, placeholder: i, className: o, style: c, ...d }, u) => /* @__PURE__ */ s("div", { className: "w-full", children: [
2636
2636
  e && /* @__PURE__ */ s(
2637
2637
  "label",
2638
2638
  {
@@ -2660,7 +2660,7 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2660
2660
  color: "var(--metakyc-text-primary, #111827)",
2661
2661
  borderColor: t ? "var(--metakyc-error, #ef4444)" : "var(--metakyc-border, #d1d5db)",
2662
2662
  // ring color via outline on focus
2663
- ...l
2663
+ ...c
2664
2664
  },
2665
2665
  ...d,
2666
2666
  children: [
@@ -2698,14 +2698,14 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2698
2698
  ] })
2699
2699
  );
2700
2700
  He.displayName = "Select";
2701
- const it = 280, Nr = ({
2701
+ const it = 280, Sr = ({
2702
2702
  label: e,
2703
2703
  value: t,
2704
2704
  onChange: n,
2705
2705
  options: a,
2706
2706
  placeholder: i = "Select...",
2707
2707
  disabled: o = !1,
2708
- required: l = !1
2708
+ required: c = !1
2709
2709
  }) => {
2710
2710
  const [d, u] = b(!1), [p, x] = b(""), [N, m] = b(null), y = ee(null), h = ee(null), C = ee(null), F = Q(() => {
2711
2711
  if (!h.current) return null;
@@ -2854,7 +2854,7 @@ const it = 280, Nr = ({
2854
2854
  style: { color: "var(--metakyc-text-primary, #374151)" },
2855
2855
  children: [
2856
2856
  e,
2857
- l && /* @__PURE__ */ r("span", { style: { color: "var(--metakyc-error, #ef4444)", marginLeft: "4px" }, children: "*" })
2857
+ c && /* @__PURE__ */ r("span", { style: { color: "var(--metakyc-error, #ef4444)", marginLeft: "4px" }, children: "*" })
2858
2858
  ]
2859
2859
  }
2860
2860
  ),
@@ -2944,7 +2944,7 @@ const it = 280, Nr = ({
2944
2944
  options: a,
2945
2945
  placeholder: i = "Select...",
2946
2946
  value: o,
2947
- onChange: l,
2947
+ onChange: c,
2948
2948
  disabled: d = !1,
2949
2949
  required: u = !1,
2950
2950
  className: p
@@ -2992,7 +2992,7 @@ const it = 280, Nr = ({
2992
2992
  const g = a.filter(
2993
2993
  (S) => S.label.toLowerCase().includes(m.toLowerCase()) || S.value.toLowerCase().includes(m.toLowerCase())
2994
2994
  ), R = (D = a.find((S) => S.value === o)) == null ? void 0 : D.label, P = (S, H) => {
2995
- d || H || (l(S), J());
2995
+ d || H || (c(S), J());
2996
2996
  }, z = k.current ? getComputedStyle(k.current) : null, _ = (z == null ? void 0 : z.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", O = (z == null ? void 0 : z.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", M = (z == null ? void 0 : z.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", Z = (z == null ? void 0 : z.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", w = (z == null ? void 0 : z.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", U = (z == null ? void 0 : z.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", te = (z == null ? void 0 : z.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", B = x && h && /* @__PURE__ */ s(
2997
2997
  "div",
2998
2998
  {
@@ -3141,14 +3141,14 @@ const it = 280, Nr = ({
3141
3141
  );
3142
3142
  };
3143
3143
  We.displayName = "SearchableSelect";
3144
- const Sr = ({
3144
+ const Cr = ({
3145
3145
  label: e,
3146
3146
  error: t,
3147
3147
  accept: n,
3148
3148
  multiple: a = !1,
3149
3149
  maxSize: i,
3150
3150
  onChange: o,
3151
- value: l = [],
3151
+ value: c = [],
3152
3152
  className: d
3153
3153
  }) => {
3154
3154
  const [u, p] = b(!1), x = ee(null), N = (k) => {
@@ -3159,7 +3159,7 @@ const Sr = ({
3159
3159
  alert(`Some files exceed the maximum size of ${I}`);
3160
3160
  return;
3161
3161
  }
3162
- o == null || o(a ? [...l, ...$] : [$[0]]);
3162
+ o == null || o(a ? [...c, ...$] : [$[0]]);
3163
3163
  }, m = (k) => {
3164
3164
  k.preventDefault(), p(!0);
3165
3165
  }, y = () => {
@@ -3170,7 +3170,7 @@ const Sr = ({
3170
3170
  var k;
3171
3171
  (k = x.current) == null || k.click();
3172
3172
  }, F = (k) => {
3173
- const $ = l.filter((A, I) => I !== k);
3173
+ const $ = c.filter((A, I) => I !== k);
3174
3174
  o == null || o($);
3175
3175
  };
3176
3176
  return /* @__PURE__ */ s("div", { className: oe("w-full", d), children: [
@@ -3230,7 +3230,7 @@ const Sr = ({
3230
3230
  ]
3231
3231
  }
3232
3232
  ),
3233
- l.length > 0 && /* @__PURE__ */ r("div", { className: "mt-3 space-y-2", children: l.map((k, $) => /* @__PURE__ */ s(
3233
+ c.length > 0 && /* @__PURE__ */ r("div", { className: "mt-3 space-y-2", children: c.map((k, $) => /* @__PURE__ */ s(
3234
3234
  "div",
3235
3235
  {
3236
3236
  className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
@@ -3283,7 +3283,7 @@ const Sr = ({
3283
3283
  )) }),
3284
3284
  t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm text-danger-500", children: t })
3285
3285
  ] });
3286
- }, Cr = Ue(
3286
+ }, Ar = Ue(
3287
3287
  ({ countryCode: e = "+1", onCountryCodeChange: t, className: n, ...a }, i) => /* @__PURE__ */ s("div", { className: "w-full", children: [
3288
3288
  a.label && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
3289
3289
  a.label,
@@ -3318,28 +3318,28 @@ const Sr = ({
3318
3318
  a.error && /* @__PURE__ */ r("p", { className: "mt-1 text-sm text-danger-500", children: a.error })
3319
3319
  ] })
3320
3320
  );
3321
- Cr.displayName = "PhoneInput";
3321
+ Ar.displayName = "PhoneInput";
3322
3322
  /**
3323
3323
  * @license lucide-react v0.574.0 - ISC
3324
3324
  *
3325
3325
  * This source code is licensed under the ISC license.
3326
3326
  * See the LICENSE file in the root directory of this source tree.
3327
3327
  */
3328
- const mt = (...e) => e.filter((t, n, a) => !!t && t.trim() !== "" && a.indexOf(t) === n).join(" ").trim();
3328
+ const pt = (...e) => e.filter((t, n, a) => !!t && t.trim() !== "" && a.indexOf(t) === n).join(" ").trim();
3329
3329
  /**
3330
3330
  * @license lucide-react v0.574.0 - ISC
3331
3331
  *
3332
3332
  * This source code is licensed under the ISC license.
3333
3333
  * See the LICENSE file in the root directory of this source tree.
3334
3334
  */
3335
- const Ar = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
3335
+ const Er = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
3336
3336
  /**
3337
3337
  * @license lucide-react v0.574.0 - ISC
3338
3338
  *
3339
3339
  * This source code is licensed under the ISC license.
3340
3340
  * See the LICENSE file in the root directory of this source tree.
3341
3341
  */
3342
- const Er = (e) => e.replace(
3342
+ const Ir = (e) => e.replace(
3343
3343
  /^([A-Z])|[\s-_]+(\w)/g,
3344
3344
  (t, n, a) => a ? a.toUpperCase() : n.toLowerCase()
3345
3345
  );
@@ -3350,7 +3350,7 @@ const Er = (e) => e.replace(
3350
3350
  * See the LICENSE file in the root directory of this source tree.
3351
3351
  */
3352
3352
  const ot = (e) => {
3353
- const t = Er(e);
3353
+ const t = Ir(e);
3354
3354
  return t.charAt(0).toUpperCase() + t.slice(1);
3355
3355
  };
3356
3356
  /**
@@ -3359,7 +3359,7 @@ const ot = (e) => {
3359
3359
  * This source code is licensed under the ISC license.
3360
3360
  * See the LICENSE file in the root directory of this source tree.
3361
3361
  */
3362
- var Ir = {
3362
+ var Rr = {
3363
3363
  xmlns: "http://www.w3.org/2000/svg",
3364
3364
  width: 24,
3365
3365
  height: 24,
@@ -3376,7 +3376,7 @@ var Ir = {
3376
3376
  * This source code is licensed under the ISC license.
3377
3377
  * See the LICENSE file in the root directory of this source tree.
3378
3378
  */
3379
- const Rr = (e) => {
3379
+ const Pr = (e) => {
3380
3380
  for (const t in e)
3381
3381
  if (t.startsWith("aria-") || t === "role" || t === "title")
3382
3382
  return !0;
@@ -3388,7 +3388,7 @@ const Rr = (e) => {
3388
3388
  * This source code is licensed under the ISC license.
3389
3389
  * See the LICENSE file in the root directory of this source tree.
3390
3390
  */
3391
- const Pr = Ue(
3391
+ const Dr = Ue(
3392
3392
  ({
3393
3393
  color: e = "currentColor",
3394
3394
  size: t = 24,
@@ -3396,23 +3396,23 @@ const Pr = Ue(
3396
3396
  absoluteStrokeWidth: a,
3397
3397
  className: i = "",
3398
3398
  children: o,
3399
- iconNode: l,
3399
+ iconNode: c,
3400
3400
  ...d
3401
3401
  }, u) => Qe(
3402
3402
  "svg",
3403
3403
  {
3404
3404
  ref: u,
3405
- ...Ir,
3405
+ ...Rr,
3406
3406
  width: t,
3407
3407
  height: t,
3408
3408
  stroke: e,
3409
3409
  strokeWidth: a ? Number(n) * 24 / Number(t) : n,
3410
- className: mt("lucide", i),
3411
- ...!o && !Rr(d) && { "aria-hidden": "true" },
3410
+ className: pt("lucide", i),
3411
+ ...!o && !Pr(d) && { "aria-hidden": "true" },
3412
3412
  ...d
3413
3413
  },
3414
3414
  [
3415
- ...l.map(([p, x]) => Qe(p, x)),
3415
+ ...c.map(([p, x]) => Qe(p, x)),
3416
3416
  ...Array.isArray(o) ? o : [o]
3417
3417
  ]
3418
3418
  )
@@ -3423,13 +3423,13 @@ const Pr = Ue(
3423
3423
  * This source code is licensed under the ISC license.
3424
3424
  * See the LICENSE file in the root directory of this source tree.
3425
3425
  */
3426
- const pt = (e, t) => {
3426
+ const ht = (e, t) => {
3427
3427
  const n = Ue(
3428
- ({ className: a, ...i }, o) => Qe(Pr, {
3428
+ ({ className: a, ...i }, o) => Qe(Dr, {
3429
3429
  ref: o,
3430
3430
  iconNode: t,
3431
- className: mt(
3432
- `lucide-${Ar(ot(e))}`,
3431
+ className: pt(
3432
+ `lucide-${Er(ot(e))}`,
3433
3433
  `lucide-${e}`,
3434
3434
  a
3435
3435
  ),
@@ -3444,15 +3444,15 @@ const pt = (e, t) => {
3444
3444
  * This source code is licensed under the ISC license.
3445
3445
  * See the LICENSE file in the root directory of this source tree.
3446
3446
  */
3447
- const Dr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], ht = pt("chevron-left", Dr);
3447
+ const Fr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], gt = ht("chevron-left", Fr);
3448
3448
  /**
3449
3449
  * @license lucide-react v0.574.0 - ISC
3450
3450
  *
3451
3451
  * This source code is licensed under the ISC license.
3452
3452
  * See the LICENSE file in the root directory of this source tree.
3453
3453
  */
3454
- const Fr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], gt = pt("chevron-right", Fr);
3455
- function Lr(e, t) {
3454
+ const Lr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], yt = ht("chevron-right", Lr);
3455
+ function Tr(e, t) {
3456
3456
  const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
3457
3457
  if (e.isRequired && n)
3458
3458
  return e.errorMessage || "This field is required";
@@ -3481,9 +3481,9 @@ function Lr(e, t) {
3481
3481
  }
3482
3482
  return null;
3483
3483
  }
3484
- function Tr(e) {
3484
+ function Mr(e) {
3485
3485
  const t = e.flatMap(
3486
- (a, i) => (a.questions ?? []).map((o, l) => ({ question: o, groupIndex: i, qIdx: l }))
3486
+ (a, i) => (a.questions ?? []).map((o, c) => ({ question: o, groupIndex: i, qIdx: c }))
3487
3487
  ), n = /* @__PURE__ */ new Map();
3488
3488
  for (const a of t) {
3489
3489
  const i = a.question.pageNumber != null && a.question.pageNumber > 0 ? a.question.pageNumber : 1;
@@ -3491,17 +3491,17 @@ function Tr(e) {
3491
3491
  }
3492
3492
  return Array.from(n.entries()).sort(([a], [i]) => a - i).map(([, a]) => a);
3493
3493
  }
3494
- const Mr = ({
3494
+ const Or = ({
3495
3495
  applicantId: e,
3496
3496
  onComplete: t,
3497
3497
  onBack: n
3498
3498
  }) => {
3499
- const { questionnaire: a, initialAnswers: i, isLoading: o, isSubmitting: l, error: d, submit: u } = fr(e), [p, x] = b({}), [N, m] = b({}), [y, h] = b(0);
3499
+ const { questionnaire: a, initialAnswers: i, isLoading: o, isSubmitting: c, error: d, submit: u } = xr(e), [p, x] = b({}), [N, m] = b({}), [y, h] = b(0);
3500
3500
  ge.useEffect(() => {
3501
3501
  i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && x(i);
3502
3502
  }, [i]);
3503
3503
  const C = Ee(
3504
- () => a ? Tr(a.questionGroups) : [],
3504
+ () => a ? Mr(a.questionGroups) : [],
3505
3505
  [a]
3506
3506
  ), F = y === C.length - 1, k = C[y] ?? [], $ = Q((E, g) => {
3507
3507
  x((R) => ({ ...R, [E]: g })), m((R) => {
@@ -3511,7 +3511,7 @@ const Mr = ({
3511
3511
  }, []), A = Q(() => {
3512
3512
  const E = {};
3513
3513
  for (const { question: g } of k) {
3514
- const R = Lr(g, p[g.id] ?? []);
3514
+ const R = Tr(g, p[g.id] ?? []);
3515
3515
  R && (E[g.id] = R);
3516
3516
  }
3517
3517
  return m((g) => ({ ...g, ...E })), Object.keys(E).length === 0;
@@ -3566,7 +3566,7 @@ const Mr = ({
3566
3566
  ] })
3567
3567
  ] }),
3568
3568
  /* @__PURE__ */ r(W, { className: "space-y-6", children: k.map(({ question: E }) => /* @__PURE__ */ r(
3569
- Or,
3569
+ zr,
3570
3570
  {
3571
3571
  question: E,
3572
3572
  value: p[E.id] ?? [],
@@ -3584,7 +3584,7 @@ const Mr = ({
3584
3584
  onClick: j,
3585
3585
  style: { display: "flex", alignItems: "center", gap: "4px" },
3586
3586
  children: [
3587
- /* @__PURE__ */ r(ht, { size: 14 }),
3587
+ /* @__PURE__ */ r(gt, { size: 14 }),
3588
3588
  y > 0 ? "Previous" : "Back"
3589
3589
  ]
3590
3590
  }
@@ -3593,7 +3593,7 @@ const Mr = ({
3593
3593
  V,
3594
3594
  {
3595
3595
  type: "button",
3596
- isLoading: l,
3596
+ isLoading: c,
3597
3597
  onClick: J,
3598
3598
  children: "Continue"
3599
3599
  }
@@ -3605,16 +3605,16 @@ const Mr = ({
3605
3605
  style: { display: "flex", alignItems: "center", gap: "4px" },
3606
3606
  children: [
3607
3607
  "Next",
3608
- /* @__PURE__ */ r(gt, { size: 14 })
3608
+ /* @__PURE__ */ r(yt, { size: 14 })
3609
3609
  ]
3610
3610
  }
3611
3611
  )
3612
3612
  ] }),
3613
3613
  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 }) })
3614
3614
  ] }) : null;
3615
- }, Or = ({ question: e, value: t, error: n, onChange: a }) => {
3616
- var l;
3617
- const o = (((l = e.defaultAnswers) == null ? void 0 : l.length) ?? 0) > 0 ? e.showAsDropdown ? e.canMultipleAnswer ? "multi-select" : "single-select" : e.canMultipleAnswer ? "checkbox" : "radio" : "text";
3615
+ }, zr = ({ question: e, value: t, error: n, onChange: a }) => {
3616
+ var c;
3617
+ const o = (((c = e.defaultAnswers) == null ? void 0 : c.length) ?? 0) > 0 ? e.showAsDropdown ? e.canMultipleAnswer ? "multi-select" : "single-select" : e.canMultipleAnswer ? "checkbox" : "radio" : "text";
3618
3618
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
3619
3619
  /* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
3620
3620
  e.text,
@@ -3719,19 +3719,19 @@ const Mr = ({
3719
3719
  ] }),
3720
3720
  n && o === "text" && null
3721
3721
  ] });
3722
- }, zr = ({
3722
+ }, $r = ({
3723
3723
  applicantId: e,
3724
3724
  onComplete: t,
3725
3725
  onBack: n
3726
3726
  }) => {
3727
- const { uploadDocument: a, isLoading: i, isSubmitting: o, error: l, submit: d } = xr(e), [u, p] = b({}), x = async (N) => {
3727
+ const { uploadDocument: a, isLoading: i, isSubmitting: o, error: c, submit: d } = br(e), [u, p] = b({}), x = async (N) => {
3728
3728
  if (N.preventDefault(), !a) return;
3729
3729
  const m = await Promise.all(
3730
3730
  a.uploadDocumentFiles.map(async (h) => {
3731
3731
  const C = u[h.id] || [], F = await Promise.all(
3732
3732
  C.map(async (k) => ({
3733
3733
  fileName: k.name,
3734
- fileData: await dr(k)
3734
+ fileData: await ur(k)
3735
3735
  }))
3736
3736
  );
3737
3737
  return {
@@ -3746,16 +3746,16 @@ const Mr = ({
3746
3746
  };
3747
3747
  await d(y), t == null || t();
3748
3748
  };
3749
- return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(be, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3749
+ return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(be, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3750
3750
  "Error loading document requirements: ",
3751
- l.message
3751
+ c.message
3752
3752
  ] }) }) }) : a ? /* @__PURE__ */ r("form", { onSubmit: x, children: /* @__PURE__ */ s(K, { children: [
3753
3753
  /* @__PURE__ */ s(de, { children: [
3754
3754
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.displayName }),
3755
3755
  a.subtitle && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: a.subtitle })
3756
3756
  ] }),
3757
3757
  /* @__PURE__ */ r(W, { className: "space-y-6", children: a.uploadDocumentFiles.map((N) => /* @__PURE__ */ r(
3758
- Sr,
3758
+ Cr,
3759
3759
  {
3760
3760
  label: N.displayName,
3761
3761
  accept: N.allowedTypes,
@@ -3773,13 +3773,13 @@ const Mr = ({
3773
3773
  /* @__PURE__ */ r(V, { type: "submit", isLoading: o, children: "Continue" })
3774
3774
  ] })
3775
3775
  ] }) }) : null;
3776
- }, $r = ({ applicantId: e, onComplete: t, onBack: n }) => {
3777
- const { overview: a, isLoading: i, isSubmitting: o, error: l, passOverview: d } = br(e), u = async () => {
3776
+ }, Br = ({ applicantId: e, onComplete: t, onBack: n }) => {
3777
+ const { overview: a, isLoading: i, isSubmitting: o, error: c, passOverview: d } = vr(e), u = async () => {
3778
3778
  await d(), t == null || t();
3779
3779
  };
3780
- return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(be, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3780
+ return i ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(be, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
3781
3781
  "Error loading overview: ",
3782
- l.message
3782
+ c.message
3783
3783
  ] }) }) }) : a ? /* @__PURE__ */ s(K, { children: [
3784
3784
  /* @__PURE__ */ s(de, { children: [
3785
3785
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.title || "Overview" }),
@@ -3810,7 +3810,7 @@ const Mr = ({
3810
3810
  ] })
3811
3811
  ] }) : null;
3812
3812
  };
3813
- function Br(e, t) {
3813
+ function _r(e, t) {
3814
3814
  const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
3815
3815
  if (e.isRequired && n)
3816
3816
  return e.errorMessage || `${e.displayName} is required`;
@@ -3840,32 +3840,32 @@ function Br(e, t) {
3840
3840
  }
3841
3841
  return null;
3842
3842
  }
3843
- function _r(e) {
3843
+ function Hr(e) {
3844
3844
  const t = /* @__PURE__ */ new Map();
3845
3845
  return e.forEach((n, a) => {
3846
3846
  const i = n.pageNumber != null && n.pageNumber > 0 ? n.pageNumber : 1;
3847
3847
  t.has(i) || t.set(i, []), t.get(i).push({ criterion: n, idx: a });
3848
3848
  }), Array.from(t.entries()).sort(([n], [a]) => n - a).map(([, n]) => n);
3849
3849
  }
3850
- function Hr(e) {
3850
+ function Ur(e) {
3851
3851
  return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
3852
3852
  }
3853
- const Ur = ({
3853
+ const jr = ({
3854
3854
  applicantId: e,
3855
3855
  onComplete: t,
3856
3856
  onBack: n
3857
3857
  }) => {
3858
- const { criteria: a, initialAnswers: i, isLoading: o, isSubmitting: l, error: d, submit: u } = kr(e), [p, x] = b({}), [N, m] = b({}), [y, h] = b(0), [C, F] = b(!1);
3858
+ const { criteria: a, initialAnswers: i, isLoading: o, isSubmitting: c, error: d, submit: u } = wr(e), [p, x] = b({}), [N, m] = b({}), [y, h] = b(0), [C, F] = b(!1);
3859
3859
  ge.useEffect(() => {
3860
3860
  i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && x(i);
3861
3861
  }, [i]);
3862
3862
  const k = Ee(
3863
- () => a && a.length > 0 ? _r(a) : [],
3863
+ () => a && a.length > 0 ? Hr(a) : [],
3864
3864
  [a]
3865
3865
  ), $ = y === k.length - 1, A = k[y] ?? [];
3866
3866
  ge.useEffect(() => {
3867
- !o && a && a.length === 0 && !C && !l && (F(!0), u({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
3868
- }, [o, a, C, l, u, e, t]);
3867
+ !o && a && a.length === 0 && !C && !c && (F(!0), u({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
3868
+ }, [o, a, C, c, u, e, t]);
3869
3869
  const I = Q((R, P) => {
3870
3870
  x((z) => ({ ...z, [R]: P })), m((z) => {
3871
3871
  const _ = { ...z };
@@ -3874,7 +3874,7 @@ const Ur = ({
3874
3874
  }, []), j = Q(() => {
3875
3875
  const R = {};
3876
3876
  for (const { criterion: P } of A) {
3877
- const z = Br(P, p[P.id] ?? []);
3877
+ const z = _r(P, p[P.id] ?? []);
3878
3878
  z && (R[P.id] = z);
3879
3879
  }
3880
3880
  return m((P) => ({ ...P, ...R })), Object.keys(R).length === 0;
@@ -3929,7 +3929,7 @@ const Ur = ({
3929
3929
  ] })
3930
3930
  ] }),
3931
3931
  /* @__PURE__ */ r(W, { className: "space-y-6", children: A.map(({ criterion: R }) => /* @__PURE__ */ r(
3932
- jr,
3932
+ qr,
3933
3933
  {
3934
3934
  criterion: R,
3935
3935
  value: p[R.id] ?? [],
@@ -3947,12 +3947,12 @@ const Ur = ({
3947
3947
  onClick: E,
3948
3948
  style: { display: "flex", alignItems: "center", gap: "4px" },
3949
3949
  children: [
3950
- /* @__PURE__ */ r(ht, { size: 14 }),
3950
+ /* @__PURE__ */ r(gt, { size: 14 }),
3951
3951
  y > 0 ? "Previous" : "Back"
3952
3952
  ]
3953
3953
  }
3954
3954
  ),
3955
- $ ? /* @__PURE__ */ r(V, { type: "button", isLoading: l, onClick: g, children: "Continue" }) : /* @__PURE__ */ s(
3955
+ $ ? /* @__PURE__ */ r(V, { type: "button", isLoading: c, onClick: g, children: "Continue" }) : /* @__PURE__ */ s(
3956
3956
  V,
3957
3957
  {
3958
3958
  type: "button",
@@ -3960,15 +3960,15 @@ const Ur = ({
3960
3960
  style: { display: "flex", alignItems: "center", gap: "4px" },
3961
3961
  children: [
3962
3962
  "Next",
3963
- /* @__PURE__ */ r(gt, { size: 14 })
3963
+ /* @__PURE__ */ r(yt, { size: 14 })
3964
3964
  ]
3965
3965
  }
3966
3966
  )
3967
3967
  ] }),
3968
3968
  d && /* @__PURE__ */ r("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: d.message }) })
3969
3969
  ] }) : null;
3970
- }, jr = ({ criterion: e, value: t, error: n, onChange: a }) => {
3971
- const i = Hr(e), o = e.valueDataType === Ie.Integer || e.valueDataType === Ie.Decimal || e.valueDataType === Ie.DigitOnly;
3970
+ }, qr = ({ criterion: e, value: t, error: n, onChange: a }) => {
3971
+ const i = Ur(e), o = e.valueDataType === Ie.Integer || e.valueDataType === Ie.Decimal || e.valueDataType === Ie.DigitOnly;
3972
3972
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
3973
3973
  /* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
3974
3974
  e.displayName,
@@ -3980,20 +3980,20 @@ const Ur = ({
3980
3980
  me,
3981
3981
  {
3982
3982
  value: t[0] ?? "",
3983
- onChange: (l) => a([l.target.value]),
3983
+ onChange: (c) => a([c.target.value]),
3984
3984
  type: o ? "number" : "text",
3985
3985
  placeholder: "Enter your answer…",
3986
3986
  error: n,
3987
3987
  required: e.isRequired,
3988
3988
  min: e.min,
3989
3989
  max: e.max,
3990
- onKeyDown: (l) => {
3991
- e.valueDataType === Ie.DigitOnly && ["e", "E", "+", "-", "."].includes(l.key) && l.preventDefault();
3990
+ onKeyDown: (c) => {
3991
+ e.valueDataType === Ie.DigitOnly && ["e", "E", "+", "-", "."].includes(c.key) && c.preventDefault();
3992
3992
  }
3993
3993
  }
3994
3994
  ),
3995
3995
  i === "radio" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
3996
- (e.defaultValues ?? []).map((l) => /* @__PURE__ */ s(
3996
+ (e.defaultValues ?? []).map((c) => /* @__PURE__ */ s(
3997
3997
  "label",
3998
3998
  {
3999
3999
  className: "metakyc-option-label",
@@ -4003,8 +4003,8 @@ const Ur = ({
4003
4003
  "input",
4004
4004
  {
4005
4005
  type: "radio",
4006
- checked: t[0] === l,
4007
- onChange: () => a([l]),
4006
+ checked: t[0] === c,
4007
+ onChange: () => a([c]),
4008
4008
  className: "metakyc-option-input",
4009
4009
  style: {
4010
4010
  width: "16px",
@@ -4021,15 +4021,15 @@ const Ur = ({
4021
4021
  }
4022
4022
  }
4023
4023
  ),
4024
- /* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: l })
4024
+ /* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: c })
4025
4025
  ]
4026
4026
  },
4027
- l
4027
+ c
4028
4028
  )),
4029
4029
  n && /* @__PURE__ */ r("p", { className: "text-sm text-danger-500", children: n })
4030
4030
  ] }),
4031
4031
  i === "checkbox" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
4032
- (e.defaultValues ?? []).map((l) => /* @__PURE__ */ s(
4032
+ (e.defaultValues ?? []).map((c) => /* @__PURE__ */ s(
4033
4033
  "label",
4034
4034
  {
4035
4035
  className: "metakyc-option-label",
@@ -4039,9 +4039,9 @@ const Ur = ({
4039
4039
  "input",
4040
4040
  {
4041
4041
  type: "checkbox",
4042
- checked: t.includes(l),
4042
+ checked: t.includes(c),
4043
4043
  onChange: (d) => {
4044
- d.target.checked ? a([...t, l]) : a(t.filter((u) => u !== l));
4044
+ d.target.checked ? a([...t, c]) : a(t.filter((u) => u !== c));
4045
4045
  },
4046
4046
  className: "metakyc-option-input",
4047
4047
  style: {
@@ -4059,10 +4059,10 @@ const Ur = ({
4059
4059
  }
4060
4060
  }
4061
4061
  ),
4062
- /* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: l })
4062
+ /* @__PURE__ */ r("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: c })
4063
4063
  ]
4064
4064
  },
4065
- l
4065
+ c
4066
4066
  )),
4067
4067
  n && /* @__PURE__ */ r("p", { className: "text-sm text-danger-500", children: n })
4068
4068
  ] }),
@@ -4070,7 +4070,7 @@ const Ur = ({
4070
4070
  He,
4071
4071
  {
4072
4072
  value: t[0] ?? "",
4073
- onChange: (l) => a([l.target.value]),
4073
+ onChange: (c) => a([c.target.value]),
4074
4074
  options: [
4075
4075
  { value: "US", label: "United States" },
4076
4076
  { value: "GB", label: "United Kingdom" },
@@ -4084,12 +4084,12 @@ const Ur = ({
4084
4084
  }
4085
4085
  )
4086
4086
  ] });
4087
- }, qr = ({
4087
+ }, Kr = ({
4088
4088
  applicantId: e,
4089
4089
  onComplete: t,
4090
4090
  onBack: n
4091
4091
  }) => {
4092
- const { investorCategorizationService: a } = ye(), [i, o] = b(null), [l, d] = b(!1), [u, p] = b(null);
4092
+ const { investorCategorizationService: a } = ye(), [i, o] = b(null), [c, d] = b(!1), [u, p] = b(null);
4093
4093
  return /* @__PURE__ */ r("form", { onSubmit: async (N) => {
4094
4094
  if (N.preventDefault(), i === null) {
4095
4095
  p("Please select an investor type");
@@ -4215,19 +4215,19 @@ const Ur = ({
4215
4215
  V,
4216
4216
  {
4217
4217
  type: "submit",
4218
- isLoading: l,
4218
+ isLoading: c,
4219
4219
  disabled: i === null,
4220
4220
  children: "Submit"
4221
4221
  }
4222
4222
  )
4223
4223
  ] })
4224
4224
  ] }) });
4225
- }, Kr = ({
4225
+ }, Wr = ({
4226
4226
  applicantId: e,
4227
4227
  onComplete: t,
4228
4228
  onBack: n
4229
4229
  }) => {
4230
- const { appropriatenessTestService: a } = ye(), [i, o] = b(null), [l, d] = b(!0), [u, p] = b(!1), [x, N] = b(null), [m, y] = b({}), [h, C] = b(0), [F, k] = b(!1), [$, A] = b(!1), [I, j] = b(0);
4230
+ const { appropriatenessTestService: a } = ye(), [i, o] = b(null), [c, d] = b(!0), [u, p] = b(!1), [x, N] = b(null), [m, y] = b({}), [h, C] = b(0), [F, k] = b(!1), [$, A] = b(!1), [I, j] = b(0);
4231
4231
  ne(() => {
4232
4232
  (async () => {
4233
4233
  try {
@@ -4329,7 +4329,7 @@ const Ur = ({
4329
4329
  Failed to reload test data. Please refresh the page.`);
4330
4330
  }
4331
4331
  };
4332
- if (l)
4332
+ if (c)
4333
4333
  return /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
4334
4334
  /* @__PURE__ */ r(be, { className: "my-8" }),
4335
4335
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
@@ -4504,13 +4504,13 @@ Failed to reload test data. Please refresh the page.`);
4504
4504
  )
4505
4505
  ] })
4506
4506
  ] });
4507
- }, Wr = ({
4507
+ }, Yr = ({
4508
4508
  applicantId: e,
4509
4509
  onComplete: t,
4510
4510
  onBack: n
4511
4511
  }) => {
4512
4512
  var Z, w, U, te;
4513
- const { applicantService: a, baseInformationService: i, config: o } = ye(), { identityData: l, provider: d, token: u, isLoading: p, error: x, requestIdentity: N, restartIdentity: m } = vr(e), [y, h] = b(null), [C, F] = b(null), [k, $] = b([]), [A, I] = b(!0), [j, J] = b(!1), [E, g] = b(null), [R, P] = b(!1), z = ge.useRef(!1), _ = St({
4513
+ const { applicantService: a, baseInformationService: i, config: o } = ye(), { identityData: c, provider: d, token: u, isLoading: p, error: x, requestIdentity: N, restartIdentity: m } = kr(e), [y, h] = b(null), [C, F] = b(null), [k, $] = b([]), [A, I] = b(!0), [j, J] = b(!1), [E, g] = b(null), [R, P] = b(!1), z = ge.useRef(!1), _ = Ct({
4514
4514
  defaultValues: {
4515
4515
  street: "",
4516
4516
  streetNumber: "",
@@ -4558,8 +4558,8 @@ Failed to reload test data. Please refresh the page.`);
4558
4558
  }
4559
4559
  })();
4560
4560
  }, [e]), ne(() => {
4561
- l && !j && (console.log("[Identity] Identity data already loaded, showing provider"), J(!0));
4562
- }, [l, j]), ne(() => {
4561
+ c && !j && (console.log("[Identity] Identity data already loaded, showing provider"), J(!0));
4562
+ }, [c, j]), ne(() => {
4563
4563
  if (u) {
4564
4564
  if (u.expiresAt) {
4565
4565
  const B = new Date(u.expiresAt).getTime();
@@ -4716,7 +4716,7 @@ Failed to reload test data. Please refresh the page.`);
4716
4716
  /* @__PURE__ */ r(V, { type: "button", onClick: M, disabled: p, children: p ? "Restarting..." : "Restart Verification" })
4717
4717
  ] })
4718
4718
  ] });
4719
- if (j && l) {
4719
+ if (j && c) {
4720
4720
  const B = d;
4721
4721
  return u != null && u.url ? /* @__PURE__ */ s(K, { children: [
4722
4722
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
@@ -5040,14 +5040,14 @@ Failed to reload test data. Please refresh the page.`);
5040
5040
  ] }),
5041
5041
  /* @__PURE__ */ s(pe, { className: "flex justify-center gap-4", children: [
5042
5042
  d.type === "success" && i && /* @__PURE__ */ r(V, { onClick: i, size: "lg", children: "Continue" }),
5043
- d.type === "error" && /* @__PURE__ */ s(ct, { children: [
5043
+ d.type === "error" && /* @__PURE__ */ s(dt, { children: [
5044
5044
  o && /* @__PURE__ */ r(V, { variant: "outline", onClick: o, children: "Contact Support" }),
5045
5045
  i && /* @__PURE__ */ r(V, { onClick: i, children: "Try Again" })
5046
5046
  ] }),
5047
5047
  d.type === "pending" && /* @__PURE__ */ r("div", { className: "text-center", children: /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
5048
5048
  ] })
5049
5049
  ] });
5050
- }, Yr = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ r("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ r(
5050
+ }, Qr = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ r("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ r(
5051
5051
  "img",
5052
5052
  {
5053
5053
  src: e.url,
@@ -5067,11 +5067,11 @@ Failed to reload test data. Please refresh the page.`);
5067
5067
  subtitle: t,
5068
5068
  className: n = ""
5069
5069
  }) => {
5070
- 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;
5071
- return !o && !l ? null : /* @__PURE__ */ s("div", { className: `metakyc-header ${n}`, children: [
5070
+ const { currentTheme: a } = ye(), i = e || (a == null ? void 0 : a.title) || "", o = !!(a != null && a.logo && a.logo.visible && a.logo.url), c = !!i;
5071
+ return !o && !c ? null : /* @__PURE__ */ s("div", { className: `metakyc-header ${n}`, children: [
5072
5072
  /* @__PURE__ */ s("div", { className: "metakyc-header-title flex items-center text-xl font-bold text-gray-900 dark:text-white", children: [
5073
- o && /* @__PURE__ */ r(Yr, { config: a.logo }),
5074
- o && l && /* @__PURE__ */ r(
5073
+ o && /* @__PURE__ */ r(Qr, { config: a.logo }),
5074
+ o && c && /* @__PURE__ */ r(
5075
5075
  "span",
5076
5076
  {
5077
5077
  className: "text-gray-400 dark:text-gray-500 mx-3",
@@ -5079,7 +5079,7 @@ Failed to reload test data. Please refresh the page.`);
5079
5079
  children: "|"
5080
5080
  }
5081
5081
  ),
5082
- l && /* @__PURE__ */ r("span", { children: i })
5082
+ c && /* @__PURE__ */ r("span", { children: i })
5083
5083
  ] }),
5084
5084
  t && /* @__PURE__ */ r("p", { className: "text-sm text-gray-600 dark:text-gray-400 mt-1", children: t })
5085
5085
  ] });
@@ -5099,9 +5099,9 @@ const _e = {
5099
5099
  padding: 0,
5100
5100
  display: "inline-block",
5101
5101
  verticalAlign: "middle"
5102
- }, Qr = ({ helpText: e, children: t }) => {
5102
+ }, ct = ({ helpText: e, children: t }) => {
5103
5103
  const [n, a] = ge.useState(!1);
5104
- if (!e) return /* @__PURE__ */ r(ct, { children: t });
5104
+ if (!e) return /* @__PURE__ */ r(dt, { children: t });
5105
5105
  const i = n ? /* @__PURE__ */ r(
5106
5106
  "div",
5107
5107
  {
@@ -5161,14 +5161,16 @@ const _e = {
5161
5161
  }
5162
5162
  ),
5163
5163
  /* @__PURE__ */ r(
5164
- "div",
5164
+ "p",
5165
5165
  {
5166
5166
  style: {
5167
5167
  color: "var(--metakyc-text-primary, #111827)",
5168
5168
  fontSize: "14px",
5169
- lineHeight: 1.75
5169
+ lineHeight: 1.75,
5170
+ margin: 0,
5171
+ whiteSpace: "pre-wrap"
5170
5172
  },
5171
- dangerouslySetInnerHTML: { __html: e }
5173
+ children: e
5172
5174
  }
5173
5175
  )
5174
5176
  ]
@@ -5221,35 +5223,35 @@ const _e = {
5221
5223
  onCancel: a
5222
5224
  }) => {
5223
5225
  var Je, Xe, et, tt;
5224
- const { config: i, baseInformationService: o, currentTheme: l } = ye(), { createApplicant: d, isLoading: u } = wr(), p = e || ((Je = i.applicantForm) == null ? void 0 : Je.workflowKey);
5226
+ const { config: i, baseInformationService: o, currentTheme: c } = ye(), { createApplicant: d, isLoading: u } = Nr(), p = e || ((Je = i.applicantForm) == null ? void 0 : Je.workflowKey);
5225
5227
  if (!p)
5226
5228
  throw new Error(
5227
5229
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
5228
5230
  );
5229
5231
  const x = t || ((Xe = i.applicantForm) == null ? void 0 : Xe.externalRefId) || "", N = ((et = i.applicantForm) == null ? void 0 : et.email) || "", m = Ee(
5230
- () => l != null && l.applicantFormPages && l.applicantFormPages.length > 0 ? l.applicantFormPages : null,
5231
- [l == null ? void 0 : l.applicantFormPages]
5232
+ () => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
5233
+ [c == null ? void 0 : c.applicantFormPages]
5232
5234
  ), y = Ee(() => {
5233
- const c = new Set(je), T = l == null ? void 0 : l.applicantFormRequiredFields;
5234
- if (T) for (const L of T) c.add(L);
5235
+ const l = new Set(je), T = c == null ? void 0 : c.applicantFormRequiredFields;
5236
+ if (T) for (const L of T) l.add(L);
5235
5237
  if (m)
5236
5238
  for (const L of m)
5237
5239
  for (const f of L.fields)
5238
- !f.isCustom && f.name && f.required && c.add(f.name);
5239
- return Array.from(c);
5240
- }, [l == null ? void 0 : l.applicantFormRequiredFields, m]), h = Ee(() => {
5240
+ !f.isCustom && f.name && f.required && l.add(f.name);
5241
+ return Array.from(l);
5242
+ }, [c == null ? void 0 : c.applicantFormRequiredFields, m]), h = Ee(() => {
5241
5243
  var L;
5242
5244
  if (m) {
5243
5245
  const f = m.flatMap((q) => q.fields).filter((q) => !q.isCustom && q.name).map((q) => q.name), v = new Set(f);
5244
5246
  for (const q of je) v.add(q);
5245
5247
  return Array.from(v);
5246
5248
  }
5247
- let c;
5248
- (L = i.applicantForm) != null && L.visibleFields ? c = i.applicantForm.visibleFields : l != null && l.applicantFormVisibleFields && l.applicantFormVisibleFields.length > 0 ? c = l.applicantFormVisibleFields : c = Ot;
5249
- const T = new Set(c);
5249
+ let l;
5250
+ (L = i.applicantForm) != null && L.visibleFields ? l = i.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? l = c.applicantFormVisibleFields : l = zt;
5251
+ const T = new Set(l);
5250
5252
  for (const f of je) T.add(f);
5251
5253
  return Array.from(T);
5252
- }, [(tt = i.applicantForm) == null ? void 0 : tt.visibleFields, l == null ? void 0 : l.applicantFormVisibleFields, m]), C = /* @__PURE__ */ new Set([
5254
+ }, [(tt = i.applicantForm) == null ? void 0 : tt.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields, m]), C = /* @__PURE__ */ new Set([
5253
5255
  "country",
5254
5256
  "nationality",
5255
5257
  "taxCountry",
@@ -5258,30 +5260,30 @@ const _e = {
5258
5260
  "otherNationality"
5259
5261
  ]), F = Ee(() => {
5260
5262
  var T, L;
5261
- const c = /* @__PURE__ */ new Set();
5263
+ const l = /* @__PURE__ */ new Set();
5262
5264
  if (m)
5263
5265
  for (const f of m)
5264
5266
  for (const v of f.fields)
5265
- !v.isCustom && v.name && C.has(v.name) && c.add(v.countriesType ?? ((T = Te[v.name]) == null ? void 0 : T.countriesType));
5267
+ !v.isCustom && v.name && C.has(v.name) && l.add(v.countriesType ?? ((T = Te[v.name]) == null ? void 0 : T.countriesType));
5266
5268
  else
5267
5269
  for (const f of h)
5268
- C.has(f) && c.add((L = Te[f]) == null ? void 0 : L.countriesType);
5269
- return c.size === 0 && c.add(void 0), Array.from(c);
5270
+ C.has(f) && l.add((L = Te[f]) == null ? void 0 : L.countriesType);
5271
+ return l.size === 0 && l.add(void 0), Array.from(l);
5270
5272
  }, [h, m]), [k, $] = b({}), [A, I] = b(!0), j = ee(!1), J = ee(/* @__PURE__ */ new Set());
5271
5273
  ne(() => {
5272
5274
  if (j.current || F.length === 0) return;
5273
- const c = F.filter((L) => {
5275
+ const l = F.filter((L) => {
5274
5276
  const f = L != null ? String(L) : "all";
5275
5277
  return !J.current.has(f);
5276
5278
  });
5277
- if (c.length === 0) {
5279
+ if (l.length === 0) {
5278
5280
  I(!1);
5279
5281
  return;
5280
5282
  }
5281
5283
  j.current = !0, I(!0), (async () => {
5282
5284
  try {
5283
5285
  const L = await Promise.all(
5284
- c.map(async (f) => {
5286
+ l.map(async (f) => {
5285
5287
  const v = f != null ? String(f) : "all", q = await o.getCountries("", i.locale || "en", f), ae = /* @__PURE__ */ new Set(), ie = q.map((se) => ({ value: se.abbreviation3 || se.abbreviation, label: se.name })).filter((se) => !se.value || ae.has(se.value) ? !1 : (ae.add(se.value), !0));
5286
5288
  return J.current.add(v), [v, ie];
5287
5289
  })
@@ -5294,9 +5296,9 @@ const _e = {
5294
5296
  }
5295
5297
  })();
5296
5298
  }, [F]);
5297
- const E = (c, T) => {
5299
+ const E = (l, T) => {
5298
5300
  var v;
5299
- const L = T ?? ((v = Te[c]) == null ? void 0 : v.countriesType), f = L != null ? String(L) : "all";
5301
+ const L = T ?? ((v = Te[l]) == null ? void 0 : v.countriesType), f = L != null ? String(L) : "all";
5300
5302
  return k[f] || [];
5301
5303
  }, [g, R] = b({
5302
5304
  workflowKey: p,
@@ -5323,10 +5325,10 @@ const _e = {
5323
5325
  educationLevel: "",
5324
5326
  occupation: "",
5325
5327
  taxNumber: ""
5326
- }), [P, z] = b({}), [_, O] = b(0), [M, Z] = b({}), [w, U] = b(null), [te, B] = b(!1), D = (c, T) => R((L) => ({ ...L, [c]: T })), S = (c, T) => z((L) => ({ ...L, [c]: T })), H = (c) => !c.conditionalOn || P[c.conditionalOn] === "true", X = m && _ < m.length - 1 ? _ + 1 : -1, Y = m && _ > 0 ? _ - 1 : -1, we = (c) => {
5328
+ }), [P, z] = b({}), [_, O] = b(0), [M, Z] = b({}), [w, U] = b(null), [te, B] = b(!1), D = (l, T) => R((L) => ({ ...L, [l]: T })), S = (l, T) => z((L) => ({ ...L, [l]: T })), H = (l) => !l.conditionalOn || P[l.conditionalOn] === "true", X = m && _ < m.length - 1 ? _ + 1 : -1, Y = m && _ > 0 ? _ - 1 : -1, we = (l) => {
5327
5329
  var L;
5328
5330
  const T = {};
5329
- for (const f of c.fields)
5331
+ for (const f of l.fields)
5330
5332
  if (f.isCustom) {
5331
5333
  if (f.customType === "paragraph" || f.customType === "br" || f.customType === "link") continue;
5332
5334
  if (f.required && f.paramName) {
@@ -5343,12 +5345,12 @@ const _e = {
5343
5345
  return T;
5344
5346
  }, ve = async () => {
5345
5347
  if (!m) return;
5346
- const c = m[_];
5347
- if (c.conditionalOn && !H(c)) {
5348
+ const l = m[_];
5349
+ if (l.conditionalOn && !H(l)) {
5348
5350
  Z({}), X >= 0 ? O(X) : await Ce();
5349
5351
  return;
5350
5352
  }
5351
- const T = we(c);
5353
+ const T = we(l);
5352
5354
  if (Object.keys(T).length > 0) {
5353
5355
  Z(T);
5354
5356
  return;
@@ -5356,11 +5358,11 @@ const _e = {
5356
5358
  Z({}), X >= 0 ? O(X) : await Ce();
5357
5359
  }, Ce = async () => {
5358
5360
  if (m) {
5359
- let c = {};
5361
+ let l = {};
5360
5362
  for (const T of m)
5361
- H(T) && (c = { ...c, ...we(T) });
5362
- if (Object.keys(c).length > 0) {
5363
- Z(c);
5363
+ H(T) && (l = { ...l, ...we(T) });
5364
+ if (Object.keys(l).length > 0) {
5365
+ Z(l);
5364
5366
  return;
5365
5367
  }
5366
5368
  }
@@ -5370,7 +5372,7 @@ const _e = {
5370
5372
  U("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
5371
5373
  return;
5372
5374
  }
5373
- const c = {
5375
+ const l = {
5374
5376
  workflowKey: g.workflowKey,
5375
5377
  externalRefId: g.externalRefId.trim()
5376
5378
  };
@@ -5380,19 +5382,19 @@ const _e = {
5380
5382
  for (const v of f.fields)
5381
5383
  if (!v.isCustom && v.name) {
5382
5384
  const q = v.name, ae = g[q];
5383
- Be(ae) || (c[q] = ae);
5385
+ Be(ae) || (l[q] = ae);
5384
5386
  }
5385
5387
  }
5386
5388
  for (const f of je)
5387
- if (c[f] === void 0) {
5389
+ if (l[f] === void 0) {
5388
5390
  const v = g[f];
5389
- Be(v) || (c[f] = v);
5391
+ Be(v) || (l[f] = v);
5390
5392
  }
5391
5393
  } else
5392
5394
  h.forEach((f) => {
5393
5395
  if (f === "externalRefId") return;
5394
5396
  const v = g[f];
5395
- Be(v) || (c[f] = v);
5397
+ Be(v) || (l[f] = v);
5396
5398
  });
5397
5399
  const T = [];
5398
5400
  if (m) {
@@ -5405,17 +5407,17 @@ const _e = {
5405
5407
  }
5406
5408
  }
5407
5409
  }
5408
- T.length > 0 && (c.applicantAdditionalDatas = T);
5409
- const L = await d(c);
5410
+ T.length > 0 && (l.applicantAdditionalDatas = T);
5411
+ const L = await d(l);
5410
5412
  n(L.applicantId);
5411
- } catch (c) {
5412
- console.error("Error creating applicant:", c), U(c.message || "Failed to create applicant");
5413
+ } catch (l) {
5414
+ console.error("Error creating applicant:", l), U(l.message || "Failed to create applicant");
5413
5415
  } finally {
5414
5416
  B(!1);
5415
5417
  }
5416
- }, yt = async (c) => {
5418
+ }, ft = async (l) => {
5417
5419
  var T;
5418
- c.preventDefault();
5420
+ l.preventDefault();
5419
5421
  for (const L of y)
5420
5422
  if (Be(g[L])) {
5421
5423
  const f = ((T = Te[L]) == null ? void 0 : T.label) || L;
@@ -5423,22 +5425,22 @@ const _e = {
5423
5425
  return;
5424
5426
  }
5425
5427
  await Ce();
5426
- }, Ze = (c, T, L, f) => {
5428
+ }, Ze = (l, T, L, f) => {
5427
5429
  var rt;
5428
- const v = Te[c];
5430
+ const v = Te[l];
5429
5431
  if (!v) return null;
5430
- const q = y.includes(c), ae = M[c], ie = L || v.label, se = T ?? c, ke = { required: q };
5432
+ const q = y.includes(l), ae = M[l], ie = L || v.label, se = T ?? l, ke = { required: q };
5431
5433
  switch (v.type) {
5432
5434
  case "select":
5433
- if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
5434
- const le = E(c, f);
5435
+ if (l === "country" || l === "nationality" || l === "taxCountry" || l === "countryOfBirth" || l === "mobileCountryCode") {
5436
+ const le = E(l, f);
5435
5437
  return /* @__PURE__ */ r(
5436
5438
  We,
5437
5439
  {
5438
5440
  ...ke,
5439
5441
  label: ie,
5440
- value: g[c] || "",
5441
- onChange: (Re) => D(c, Re),
5442
+ value: g[l] || "",
5443
+ onChange: (Re) => D(l, Re),
5442
5444
  options: [{ value: "", label: `Select ${ie.toLowerCase()}...` }, ...le],
5443
5445
  disabled: A,
5444
5446
  error: ae
@@ -5446,14 +5448,14 @@ const _e = {
5446
5448
  se
5447
5449
  );
5448
5450
  }
5449
- if (c === "salutation")
5451
+ if (l === "salutation")
5450
5452
  return /* @__PURE__ */ r(
5451
5453
  We,
5452
5454
  {
5453
5455
  ...ke,
5454
5456
  label: ie,
5455
- value: ((rt = g[c]) == null ? void 0 : rt.toString()) || "",
5456
- onChange: (le) => D(c, le ? Number(le) : null),
5457
+ value: ((rt = g[l]) == null ? void 0 : rt.toString()) || "",
5458
+ onChange: (le) => D(l, le ? Number(le) : null),
5457
5459
  options: [
5458
5460
  { value: "", label: "Select salutation..." },
5459
5461
  { value: Ke.Male.toString(), label: "Male" },
@@ -5464,15 +5466,15 @@ const _e = {
5464
5466
  },
5465
5467
  se
5466
5468
  );
5467
- if (c === "defaultLanguage") {
5468
- const le = l != null && l.allowedLanguages && l.allowedLanguages.length > 0 ? at.filter((Re) => l.allowedLanguages.includes(Re.value)) : at;
5469
+ if (l === "defaultLanguage") {
5470
+ const le = c != null && c.allowedLanguages && c.allowedLanguages.length > 0 ? at.filter((Re) => c.allowedLanguages.includes(Re.value)) : at;
5469
5471
  return /* @__PURE__ */ r(
5470
5472
  We,
5471
5473
  {
5472
5474
  ...ke,
5473
5475
  label: ie,
5474
- value: g[c] || "",
5475
- onChange: (Re) => D(c, Re),
5476
+ value: g[l] || "",
5477
+ onChange: (Re) => D(l, Re),
5476
5478
  options: [{ value: "", label: "Select language..." }, ...le],
5477
5479
  error: ae
5478
5480
  },
@@ -5481,15 +5483,15 @@ const _e = {
5481
5483
  }
5482
5484
  return null;
5483
5485
  case "multiselect":
5484
- if (c === "otherNationality") {
5485
- const le = E(c, f);
5486
+ if (l === "otherNationality") {
5487
+ const le = E(l, f);
5486
5488
  return /* @__PURE__ */ r(
5487
- Nr,
5489
+ Sr,
5488
5490
  {
5489
5491
  ...ke,
5490
5492
  label: ie,
5491
- value: g[c] || [],
5492
- onChange: (Re) => D(c, Re),
5493
+ value: g[l] || [],
5494
+ onChange: (Re) => D(l, Re),
5493
5495
  options: le,
5494
5496
  placeholder: "Select other nationalities...",
5495
5497
  disabled: A
@@ -5505,8 +5507,8 @@ const _e = {
5505
5507
  ...ke,
5506
5508
  type: "date",
5507
5509
  label: ie,
5508
- value: g[c] || "",
5509
- onChange: (le) => D(c, le.target.value),
5510
+ value: g[l] || "",
5511
+ onChange: (le) => D(l, le.target.value),
5510
5512
  error: ae
5511
5513
  },
5512
5514
  se
@@ -5518,8 +5520,8 @@ const _e = {
5518
5520
  ...ke,
5519
5521
  type: "email",
5520
5522
  label: ie,
5521
- value: g[c] || "",
5522
- onChange: (le) => D(c, le.target.value),
5523
+ value: g[l] || "",
5524
+ onChange: (le) => D(l, le.target.value),
5523
5525
  error: ae
5524
5526
  },
5525
5527
  se
@@ -5531,8 +5533,8 @@ const _e = {
5531
5533
  ...ke,
5532
5534
  type: "tel",
5533
5535
  label: ie,
5534
- value: g[c] || "",
5535
- onChange: (le) => D(c, le.target.value),
5536
+ value: g[l] || "",
5537
+ onChange: (le) => D(l, le.target.value),
5536
5538
  error: ae
5537
5539
  },
5538
5540
  se
@@ -5544,16 +5546,16 @@ const _e = {
5544
5546
  ...ke,
5545
5547
  type: "text",
5546
5548
  label: ie,
5547
- value: g[c] || "",
5548
- onChange: (le) => D(c, le.target.value),
5549
+ value: g[l] || "",
5550
+ onChange: (le) => D(l, le.target.value),
5549
5551
  error: ae
5550
5552
  },
5551
5553
  se
5552
5554
  );
5553
5555
  }
5554
- }, ft = (c, T) => {
5555
- if (c.customType === "paragraph") {
5556
- const v = c.displayText || c.label || "";
5556
+ }, xt = (l, T) => {
5557
+ if (l.customType === "paragraph") {
5558
+ const v = l.displayText || l.label || "";
5557
5559
  return /* @__PURE__ */ r(
5558
5560
  "p",
5559
5561
  {
@@ -5569,14 +5571,14 @@ const _e = {
5569
5571
  `custom-${T}`
5570
5572
  );
5571
5573
  }
5572
- if (c.customType === "br")
5574
+ if (l.customType === "br")
5573
5575
  return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${T}`);
5574
- if (c.customType === "link") {
5575
- const v = c.displayText || c.label || c.linkText || c.linkUrl || "";
5576
+ if (l.customType === "link") {
5577
+ const v = l.displayText || l.label || l.linkText || l.linkUrl || "";
5576
5578
  return /* @__PURE__ */ r("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
5577
5579
  "a",
5578
5580
  {
5579
- href: c.linkUrl || "#",
5581
+ href: l.linkUrl || "#",
5580
5582
  target: "_blank",
5581
5583
  rel: "noopener noreferrer",
5582
5584
  style: {
@@ -5595,9 +5597,9 @@ const _e = {
5595
5597
  }
5596
5598
  ) }, `custom-${T}`);
5597
5599
  }
5598
- if (!c.paramName) return null;
5599
- const L = M[c.paramName], f = c.displayText || c.label || c.paramName;
5600
- if (c.customType === "checkbox")
5600
+ if (!l.paramName) return null;
5601
+ const L = M[l.paramName], f = l.displayText || l.label || l.paramName;
5602
+ if (l.customType === "checkbox")
5601
5603
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
5602
5604
  /* @__PURE__ */ s(
5603
5605
  "label",
@@ -5609,8 +5611,8 @@ const _e = {
5609
5611
  "input",
5610
5612
  {
5611
5613
  type: "checkbox",
5612
- checked: P[c.paramName] === "true",
5613
- onChange: (v) => S(c.paramName, v.target.checked ? "true" : "false"),
5614
+ checked: P[l.paramName] === "true",
5615
+ onChange: (v) => S(l.paramName, v.target.checked ? "true" : "false"),
5614
5616
  className: "metakyc-option-input",
5615
5617
  style: _e
5616
5618
  }
@@ -5622,7 +5624,7 @@ const _e = {
5622
5624
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5623
5625
  children: [
5624
5626
  f,
5625
- c.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5627
+ l.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5626
5628
  ]
5627
5629
  }
5628
5630
  )
@@ -5631,7 +5633,7 @@ const _e = {
5631
5633
  ),
5632
5634
  L && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: L })
5633
5635
  ] }, `custom-${T}`);
5634
- if (c.customType === "link_checkbox")
5636
+ if (l.customType === "link_checkbox")
5635
5637
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
5636
5638
  /* @__PURE__ */ s(
5637
5639
  "label",
@@ -5643,8 +5645,8 @@ const _e = {
5643
5645
  "input",
5644
5646
  {
5645
5647
  type: "checkbox",
5646
- checked: P[c.paramName] === "true",
5647
- onChange: (v) => S(c.paramName, v.target.checked ? "true" : "false"),
5648
+ checked: P[l.paramName] === "true",
5649
+ onChange: (v) => S(l.paramName, v.target.checked ? "true" : "false"),
5648
5650
  className: "metakyc-option-input",
5649
5651
  style: { ..._e, alignSelf: "flex-start", marginTop: "2px" }
5650
5652
  }
@@ -5657,19 +5659,19 @@ const _e = {
5657
5659
  children: [
5658
5660
  f,
5659
5661
  " ",
5660
- c.linkUrl && /* @__PURE__ */ r(
5662
+ l.linkUrl && /* @__PURE__ */ r(
5661
5663
  "a",
5662
5664
  {
5663
- href: c.linkUrl,
5665
+ href: l.linkUrl,
5664
5666
  target: "_blank",
5665
5667
  rel: "noopener noreferrer",
5666
5668
  className: "underline",
5667
5669
  style: { color: "var(--metakyc-primary, #2563eb)" },
5668
5670
  onClick: (v) => v.stopPropagation(),
5669
- children: c.linkText || c.linkUrl
5671
+ children: l.linkText || l.linkUrl
5670
5672
  }
5671
5673
  ),
5672
- c.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5674
+ l.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5673
5675
  ]
5674
5676
  }
5675
5677
  )
@@ -5678,8 +5680,8 @@ const _e = {
5678
5680
  ),
5679
5681
  L && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: L })
5680
5682
  ] }, `custom-${T}`);
5681
- if (c.customType === "group_checkbox") {
5682
- const v = (P[c.paramName] || "").split(",").filter(Boolean);
5683
+ if (l.customType === "group_checkbox") {
5684
+ const v = (P[l.paramName] || "").split(",").filter(Boolean);
5683
5685
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
5684
5686
  /* @__PURE__ */ s(
5685
5687
  "div",
@@ -5688,12 +5690,12 @@ const _e = {
5688
5690
  style: { color: "var(--metakyc-text-primary, #111827)" },
5689
5691
  children: [
5690
5692
  f,
5691
- c.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5693
+ l.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5692
5694
  ]
5693
5695
  }
5694
5696
  ),
5695
- /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((q) => {
5696
- const ae = c.singleSelect ? P[c.paramName] === q.value : v.includes(q.value);
5697
+ /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (l.options || []).map((q) => {
5698
+ const ae = l.singleSelect ? P[l.paramName] === q.value : v.includes(q.value);
5697
5699
  return /* @__PURE__ */ s(
5698
5700
  "label",
5699
5701
  {
@@ -5706,11 +5708,11 @@ const _e = {
5706
5708
  type: "checkbox",
5707
5709
  checked: ae,
5708
5710
  onChange: (ie) => {
5709
- if (c.singleSelect)
5710
- S(c.paramName, ie.target.checked ? q.value : "");
5711
+ if (l.singleSelect)
5712
+ S(l.paramName, ie.target.checked ? q.value : "");
5711
5713
  else {
5712
5714
  const se = ie.target.checked ? [...v, q.value] : v.filter((ke) => ke !== q.value);
5713
- S(c.paramName, se.join(","));
5715
+ S(l.paramName, se.join(","));
5714
5716
  }
5715
5717
  },
5716
5718
  className: "metakyc-option-input",
@@ -5733,7 +5735,7 @@ const _e = {
5733
5735
  L && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: L })
5734
5736
  ] }, `custom-${T}`);
5735
5737
  }
5736
- return c.customType === "radio_group" ? /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
5738
+ return l.customType === "radio_group" ? /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
5737
5739
  /* @__PURE__ */ s(
5738
5740
  "div",
5739
5741
  {
@@ -5741,11 +5743,11 @@ const _e = {
5741
5743
  style: { color: "var(--metakyc-text-primary, #111827)" },
5742
5744
  children: [
5743
5745
  f,
5744
- c.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5746
+ l.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5745
5747
  ]
5746
5748
  }
5747
5749
  ),
5748
- /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((v) => /* @__PURE__ */ s(
5750
+ /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (l.options || []).map((v) => /* @__PURE__ */ s(
5749
5751
  "label",
5750
5752
  {
5751
5753
  className: "metakyc-option-label",
@@ -5755,9 +5757,9 @@ const _e = {
5755
5757
  "input",
5756
5758
  {
5757
5759
  type: "radio",
5758
- checked: P[c.paramName] === v.value,
5759
- onChange: () => S(c.paramName, v.value),
5760
- name: `radio-group-${c.paramName}-${T}`,
5760
+ checked: P[l.paramName] === v.value,
5761
+ onChange: () => S(l.paramName, v.value),
5762
+ name: `radio-group-${l.paramName}-${T}`,
5761
5763
  className: "metakyc-option-input",
5762
5764
  style: _e
5763
5765
  }
@@ -5779,18 +5781,18 @@ const _e = {
5779
5781
  me,
5780
5782
  {
5781
5783
  type: "text",
5782
- label: `${f}${c.required ? " *" : ""}`,
5783
- value: P[c.paramName] || "",
5784
- onChange: (v) => S(c.paramName, v.target.value),
5785
- required: c.required,
5784
+ label: `${f}${l.required ? " *" : ""}`,
5785
+ value: P[l.paramName] || "",
5786
+ onChange: (v) => S(l.paramName, v.target.value),
5787
+ required: l.required,
5786
5788
  error: L
5787
5789
  },
5788
5790
  `custom-${T}`
5789
5791
  );
5790
- }, xt = (c, T) => {
5791
- const L = H(c);
5792
+ }, bt = (l, T) => {
5793
+ const L = H(l);
5792
5794
  return /* @__PURE__ */ s("div", { className: "space-y-4", children: [
5793
- c.conditionalOn && /* @__PURE__ */ s(
5795
+ l.conditionalOn && /* @__PURE__ */ r(ct, { helpText: l.conditionalHelpText, children: /* @__PURE__ */ s(
5794
5796
  "label",
5795
5797
  {
5796
5798
  className: "metakyc-option-label",
@@ -5801,7 +5803,7 @@ const _e = {
5801
5803
  {
5802
5804
  type: "checkbox",
5803
5805
  checked: L,
5804
- onChange: (f) => S(c.conditionalOn, f.target.checked ? "true" : "false"),
5806
+ onChange: (f) => S(l.conditionalOn, f.target.checked ? "true" : "false"),
5805
5807
  className: "metakyc-option-input",
5806
5808
  style: _e
5807
5809
  }
@@ -5811,15 +5813,15 @@ const _e = {
5811
5813
  {
5812
5814
  className: "metakyc-option-text",
5813
5815
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", fontWeight: 500 },
5814
- children: c.conditionalOn
5816
+ children: l.conditionalOn
5815
5817
  }
5816
5818
  )
5817
5819
  ]
5818
5820
  }
5819
- ),
5820
- L && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: c.fields.map((f, v) => {
5821
+ ) }),
5822
+ L && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: l.fields.map((f, v) => {
5821
5823
  const q = f.colSpan === 1 ? "col-span-1" : f.colSpan === 2 ? "col-span-2" : f.colSpan === 3 ? "col-span-3" : "col-span-4", ae = f.isCustom ? `custom-${v}-${f.paramName}` : `builtin-${f.name}-${v}`;
5822
- return /* @__PURE__ */ r("div", { className: q, children: /* @__PURE__ */ r(Qr, { helpText: f.helpText, children: f.isCustom ? ft(f, v) : Ze(f.name, ae, f.displayText, f.countriesType) }) }, ae);
5824
+ return /* @__PURE__ */ r("div", { className: q, children: /* @__PURE__ */ r(ct, { helpText: f.helpText, children: f.isCustom ? xt(f, v) : Ze(f.name, ae, f.displayText, f.countriesType) }) }, ae);
5823
5825
  }) })
5824
5826
  ] });
5825
5827
  };
@@ -5829,33 +5831,33 @@ const _e = {
5829
5831
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
5830
5832
  ] }) }) });
5831
5833
  if (m) {
5832
- const c = m[_] ?? m[0], T = Y === -1, L = X === -1, f = m.length, v = H(c), q = Object.values(M);
5834
+ const l = m[_] ?? m[0], T = Y === -1, L = X === -1, f = m.length, v = H(l), q = Object.values(M);
5833
5835
  return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(K, { children: [
5834
- /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5836
+ /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
5835
5837
  /* @__PURE__ */ s(W, { children: [
5836
- (c.title || c.subtitle || c.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
5837
- c.title && /* @__PURE__ */ r(
5838
+ (l.title || l.subtitle || l.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
5839
+ l.title && /* @__PURE__ */ r(
5838
5840
  "h3",
5839
5841
  {
5840
5842
  className: "font-semibold text-base",
5841
5843
  style: { color: "var(--metakyc-text-primary, #111827)" },
5842
- children: c.title
5844
+ children: l.title
5843
5845
  }
5844
5846
  ),
5845
- c.subtitle && /* @__PURE__ */ r(
5847
+ l.subtitle && /* @__PURE__ */ r(
5846
5848
  "p",
5847
5849
  {
5848
5850
  className: "text-sm mt-0.5",
5849
5851
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
5850
- children: c.subtitle
5852
+ children: l.subtitle
5851
5853
  }
5852
5854
  ),
5853
- c.description && c.description !== c.subtitle && /* @__PURE__ */ r(
5855
+ l.description && l.description !== l.subtitle && /* @__PURE__ */ r(
5854
5856
  "p",
5855
5857
  {
5856
5858
  className: "text-xs mt-1",
5857
5859
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
5858
- children: c.description
5860
+ children: l.description
5859
5861
  }
5860
5862
  )
5861
5863
  ] }),
@@ -5882,7 +5884,7 @@ const _e = {
5882
5884
  f
5883
5885
  ] })
5884
5886
  ] }),
5885
- xt(c)
5887
+ bt(l)
5886
5888
  ] }),
5887
5889
  /* @__PURE__ */ s(pe, { className: "flex justify-between", children: [
5888
5890
  /* @__PURE__ */ s("div", { children: [
@@ -5906,21 +5908,21 @@ const _e = {
5906
5908
  type: "button",
5907
5909
  isLoading: te || u,
5908
5910
  onClick: L ? Ce : ve,
5909
- children: L ? c.conditionalOn && !v ? "Skip & Submit" : "Submit" : c.conditionalOn && !v ? "Skip" : "Next"
5911
+ children: L ? l.conditionalOn && !v ? "Skip & Submit" : "Submit" : l.conditionalOn && !v ? "Skip" : "Next"
5910
5912
  }
5911
5913
  )
5912
5914
  ] })
5913
5915
  ] }) });
5914
5916
  }
5915
- return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: yt, children: /* @__PURE__ */ s(K, { children: [
5916
- /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5917
+ return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: ft, children: /* @__PURE__ */ s(K, { children: [
5918
+ /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
5917
5919
  /* @__PURE__ */ s(W, { children: [
5918
5920
  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: [
5919
5921
  /* @__PURE__ */ r("strong", { children: "Error:" }),
5920
5922
  " ",
5921
5923
  w
5922
5924
  ] }) }),
5923
- /* @__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)) })
5925
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: h.map((l) => /* @__PURE__ */ r("div", { className: "col-span-4", children: Ze(l) }, l)) })
5924
5926
  ] }),
5925
5927
  /* @__PURE__ */ s(pe, { className: "flex justify-between", children: [
5926
5928
  a && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: a, disabled: te || u, children: "Cancel" }),
@@ -5936,7 +5938,7 @@ const _e = {
5936
5938
  }) => {
5937
5939
  const {
5938
5940
  progress: o,
5939
- currentStep: l,
5941
+ currentStep: c,
5940
5942
  steps: d,
5941
5943
  workflowKey: u,
5942
5944
  nextWorkflowKey: p,
@@ -5945,7 +5947,7 @@ const _e = {
5945
5947
  error: m,
5946
5948
  moveBack: y,
5947
5949
  refreshProgress: h
5948
- } = yr(e), [C, F] = ge.useState(!1);
5950
+ } = fr(e), [C, F] = ge.useState(!1);
5949
5951
  if (ge.useEffect(() => {
5950
5952
  m && n && n(m);
5951
5953
  }, [m, n]), ge.useEffect(() => {
@@ -6006,7 +6008,7 @@ const _e = {
6006
6008
  }
6007
6009
  }
6008
6010
  ) });
6009
- if (!l)
6011
+ if (!c)
6010
6012
  return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${i || ""}`, children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ s(W, { children: [
6011
6013
  /* @__PURE__ */ r(be, { className: "my-8" }),
6012
6014
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: o.status === xe.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
@@ -6035,7 +6037,7 @@ const _e = {
6035
6037
  return "";
6036
6038
  }
6037
6039
  }, $ = () => {
6038
- const I = d.filter((g) => g.visibility !== !1), j = I.findIndex((g) => g.order === l.order), J = j >= 0 ? j + 1 : 1, E = I.length;
6040
+ const I = d.filter((g) => g.visibility !== !1), j = I.findIndex((g) => g.order === c.order), J = j >= 0 ? j + 1 : 1, E = I.length;
6039
6041
  return /* @__PURE__ */ s("div", { className: "mb-6", children: [
6040
6042
  /* @__PURE__ */ s("div", { className: "flex items-start justify-between mb-4", children: [
6041
6043
  /* @__PURE__ */ r(Ge, {}),
@@ -6047,7 +6049,7 @@ const _e = {
6047
6049
  ] })
6048
6050
  ] }),
6049
6051
  /* @__PURE__ */ r("div", { className: "flex items-center", children: I.map((g, R) => {
6050
- const P = R < j, z = g.order === l.order;
6052
+ const P = R < j, z = g.order === c.order;
6051
6053
  return /* @__PURE__ */ s(ge.Fragment, { children: [
6052
6054
  /* @__PURE__ */ s("div", { className: "flex items-center", children: [
6053
6055
  /* @__PURE__ */ r(
@@ -6083,24 +6085,24 @@ const _e = {
6083
6085
  onComplete: async () => {
6084
6086
  await h();
6085
6087
  },
6086
- onBack: l.order > 0 ? y : void 0
6088
+ onBack: c.order > 0 ? y : void 0
6087
6089
  };
6088
- switch (l.action) {
6090
+ switch (c.action) {
6089
6091
  case G.Questionaries:
6090
- return /* @__PURE__ */ r(Mr, { ...I });
6092
+ return /* @__PURE__ */ r(Or, { ...I });
6091
6093
  case G.UploadDocument:
6092
- return /* @__PURE__ */ r(zr, { ...I });
6093
- case G.Overview:
6094
6094
  return /* @__PURE__ */ r($r, { ...I });
6095
+ case G.Overview:
6096
+ return /* @__PURE__ */ r(Br, { ...I });
6095
6097
  case G.IdentitySdk:
6096
- return /* @__PURE__ */ r(Wr, { ...I });
6098
+ return /* @__PURE__ */ r(Yr, { ...I });
6097
6099
  case G.RiskScoring:
6098
- return /* @__PURE__ */ r(Ur, { ...I });
6100
+ return /* @__PURE__ */ r(jr, { ...I });
6099
6101
  case G.AdditionalData:
6100
6102
  case G.InvestorCategorization:
6101
- return /* @__PURE__ */ r(qr, { ...I });
6102
- case G.AppropriatenessTest:
6103
6103
  return /* @__PURE__ */ r(Kr, { ...I });
6104
+ case G.AppropriatenessTest:
6105
+ return /* @__PURE__ */ r(Wr, { ...I });
6104
6106
  case G.ManualReview:
6105
6107
  return /* @__PURE__ */ r(
6106
6108
  lt,
@@ -6116,11 +6118,11 @@ const _e = {
6116
6118
  /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(be, {}) }),
6117
6119
  /* @__PURE__ */ s("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
6118
6120
  "Processing step: ",
6119
- l.title || l.name
6121
+ c.title || c.name
6120
6122
  ] }),
6121
6123
  /* @__PURE__ */ s("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
6122
6124
  "Action type: ",
6123
- G[l.action]
6125
+ G[c.action]
6124
6126
  ] })
6125
6127
  ] }) });
6126
6128
  }
@@ -6180,15 +6182,15 @@ function bn(e) {
6180
6182
  const vn = Se.any();
6181
6183
  export {
6182
6184
  at as ALLOWED_LANGUAGES,
6183
- Ct as ApplicantProgressOnHoldReason,
6185
+ At as ApplicantProgressOnHoldReason,
6184
6186
  xe as ApplicantProgressStatus,
6185
- _t as ApplicantService,
6186
- Et as ApplicantStatus,
6187
- Ft as AppropriatenessQuestionType,
6188
- jt as AppropriatenessTestService,
6189
- Kr as AppropriatenessTestStep,
6187
+ Ht as ApplicantService,
6188
+ It as ApplicantStatus,
6189
+ Lt as AppropriatenessQuestionType,
6190
+ qt as AppropriatenessTestService,
6191
+ Wr as AppropriatenessTestStep,
6190
6192
  Ae as Badge,
6191
- Yt as BaseInformationService,
6193
+ Qt as BaseInformationService,
6192
6194
  V as Button,
6193
6195
  K as Card,
6194
6196
  W as CardContent,
@@ -6196,101 +6198,101 @@ export {
6196
6198
  de as CardHeader,
6197
6199
  Le as CountriesType,
6198
6200
  hn as CreateApplicantForm,
6199
- Tt as CriteriaBuiltInType,
6200
- Ot as DEFAULT_VISIBLE_FIELDS,
6201
- Dt as DocumentReviewStatus,
6202
- $t as EndpointBuilder,
6201
+ Mt as CriteriaBuiltInType,
6202
+ zt as DEFAULT_VISIBLE_FIELDS,
6203
+ Ft as DocumentReviewStatus,
6204
+ Bt as EndpointBuilder,
6203
6205
  ze as ErrorHandler,
6204
- rr as EventEmitter,
6206
+ nr as EventEmitter,
6205
6207
  Te as FIELD_METADATA,
6206
- Pt as FileType,
6207
- Sr as FileUpload,
6208
+ Dt as FileType,
6209
+ Cr as FileUpload,
6208
6210
  Ke as GenderType,
6209
6211
  Ge as Header,
6210
- Bt as HttpClient,
6212
+ _t as HttpClient,
6211
6213
  Me as IdentityProviderManager,
6212
- Wt as IdentityService,
6214
+ Yt as IdentityService,
6213
6215
  fe as IdentityVerificationProvider,
6214
- Wr as IdentityVerificationStep,
6216
+ Yr as IdentityVerificationStep,
6215
6217
  me as Input,
6216
- Qt as InvestorCategorizationService,
6217
- qr as InvestorCategorizationStep,
6218
+ Gt as InvestorCategorizationService,
6219
+ Kr as InvestorCategorizationStep,
6218
6220
  he as InvestorCategorizationType,
6219
- Mt as InvestorCategoryType,
6220
- It as KycProcessStatus,
6221
+ Ot as InvestorCategoryType,
6222
+ Rt as KycProcessStatus,
6221
6223
  De as KycStatus,
6222
6224
  lt as KycStatusDisplay,
6223
6225
  gn as KycWorkflow,
6224
- Yr as Logo,
6225
- ut as MetaKYCContext,
6226
+ Qr as Logo,
6227
+ mt as MetaKYCContext,
6226
6228
  Ne as MetaKYCError,
6227
6229
  on as MetaKYCProvider,
6228
- Nr as MultiSelect,
6229
- or as OnfidoProvider,
6230
- qt as OverviewService,
6231
- $r as OverviewStep,
6232
- Cr as PhoneInput,
6233
- Ht as QuestionnaireService,
6234
- Mr as QuestionnaireStep,
6230
+ Sr as MultiSelect,
6231
+ lr as OnfidoProvider,
6232
+ Kt as OverviewService,
6233
+ Br as OverviewStep,
6234
+ Ar as PhoneInput,
6235
+ Ut as QuestionnaireService,
6236
+ Or as QuestionnaireStep,
6235
6237
  Fe as ReviewStatus,
6236
- Lt as RiskCriteriaType,
6237
- At as RiskLevel,
6238
- Kt as RiskScoringService,
6239
- Ur as RiskScoringStep,
6240
- lr as SardinAIProvider,
6238
+ Tt as RiskCriteriaType,
6239
+ Et as RiskLevel,
6240
+ Wt as RiskScoringService,
6241
+ jr as RiskScoringStep,
6242
+ cr as SardinAIProvider,
6241
6243
  We as SearchableSelect,
6242
6244
  He as Select,
6243
6245
  be as Spinner,
6244
- ar as StepRouter,
6245
- sr as SumsubProvider,
6246
- cr as ThemeManager,
6246
+ ir as StepRouter,
6247
+ or as SumsubProvider,
6248
+ dr as ThemeManager,
6247
6249
  ce as ThemePreset,
6248
- tr as ThemeService,
6249
- Ut as UploadDocumentService,
6250
- zr as UploadDocumentStep,
6251
- Rt as UserType,
6250
+ rr as ThemeService,
6251
+ jt as UploadDocumentService,
6252
+ $r as UploadDocumentStep,
6253
+ Pt as UserType,
6252
6254
  Ie as ValueDataType,
6253
- ir as WorkflowOrchestrator,
6255
+ sr as WorkflowOrchestrator,
6254
6256
  qe as WorkflowResultType,
6255
- nr as WorkflowState,
6257
+ ar as WorkflowState,
6256
6258
  G as WorkflowStepAction,
6257
6259
  vn as appropriatenessTestSchema,
6258
6260
  mn as clearAllStorage,
6259
- pr as clearApplicantId,
6260
- gr as clearWorkflowState,
6261
+ hr as clearApplicantId,
6262
+ yr as clearWorkflowState,
6261
6263
  oe as cn,
6262
- Gt as corporateTheme,
6263
- zt as defaultConfig,
6264
+ Vt as corporateTheme,
6265
+ $t as defaultConfig,
6264
6266
  ue as defaultTheme,
6265
- dr as fileToBase64,
6266
- Vt as fintechTheme,
6267
+ ur as fileToBase64,
6268
+ Zt as fintechTheme,
6267
6269
  Ye as formatFileSize,
6268
6270
  bn as generateAppropriatenessSchema,
6269
6271
  yn as generateQuestionnaireSchema,
6270
6272
  xn as generateRiskScoringSchema,
6271
6273
  fn as generateUploadDocumentSchema,
6272
6274
  dn as getAcceptString,
6273
- mr as getApplicantId,
6275
+ pr as getApplicantId,
6274
6276
  $e as getThemePreset,
6275
6277
  un as getWorkflowState,
6276
- Zt as healthcareTheme,
6278
+ Jt as healthcareTheme,
6277
6279
  an as isScriptLoaded,
6278
- dt as loadScript,
6279
- Xt as minimalTheme,
6280
- Jt as modernTheme,
6280
+ ut as loadScript,
6281
+ er as minimalTheme,
6282
+ Xt as modernTheme,
6281
6283
  sn as removeScript,
6282
- ur as saveApplicantId,
6283
- hr as saveWorkflowState,
6284
- er as themePresets,
6285
- wr as useApplicant,
6284
+ mr as saveApplicantId,
6285
+ gr as saveWorkflowState,
6286
+ tr as themePresets,
6287
+ Nr as useApplicant,
6286
6288
  pn as useAppropriatenessTest,
6287
- vr as useIdentityVerification,
6288
- yr as useKycWorkflow,
6289
+ kr as useIdentityVerification,
6290
+ fr as useKycWorkflow,
6289
6291
  ye as useMetaKYC,
6290
- br as useOverview,
6291
- fr as useQuestionnaire,
6292
- kr as useRiskScoring,
6293
- xr as useUploadDocument,
6292
+ vr as useOverview,
6293
+ xr as useQuestionnaire,
6294
+ wr as useRiskScoring,
6295
+ br as useUploadDocument,
6294
6296
  ln as validateFileSize,
6295
6297
  cn as validateFileType
6296
6298
  };