@vpdev2/metakyc 1.0.17 → 1.0.19
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/components/CreateApplicantForm.d.ts.map +1 -1
- package/dist/components/KycWorkflow.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +545 -522
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ var Vt = (e, t, a) => t in e ? Yt(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var he = (e, t, a) => Vt(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
4
|
import Qt from "axios";
|
|
5
5
|
import * as Rt from "react";
|
|
6
|
-
import we, { createContext as Gt, useState as x, useMemo as De, useEffect as fe, useContext as Jt, useRef as
|
|
6
|
+
import we, { createContext as Gt, useState as x, useMemo as De, useEffect as fe, useContext as Jt, useRef as ce, useCallback as ae, forwardRef as yt, createElement as St } from "react";
|
|
7
7
|
import { jsxs as o, jsx as r, Fragment as ct } from "react/jsx-runtime";
|
|
8
8
|
import Xt, { createPortal as Ct } from "react-dom";
|
|
9
9
|
import { useForm as Zt, Controller as tt } from "react-hook-form";
|
|
10
10
|
import { z as Ve } from "zod";
|
|
11
|
-
var
|
|
11
|
+
var le = /* @__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))(le || {}), ft = /* @__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))(ft || {}), Oe = /* @__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))(Oe || {}), er = /* @__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))(er || {}), tr = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(tr || {}), rt = /* @__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))(rt || {}), at = /* @__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))(at || {}), rr = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(rr || {}), ar = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(ar || {}), ze = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(ze || {}), nr = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(nr || {}), kt = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(kt || {}), ir = /* @__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))(ir || {}), or = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(or || {}), sr = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(sr || {}), qe = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Money = 2] = "Money", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(qe || {}), lr = /* @__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))(lr || {}), cr = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(cr || {}), Ee = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(Ee || {}), dr = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(dr || {});
|
|
12
12
|
const Xe = {
|
|
13
13
|
Nationality: 10,
|
|
14
14
|
Address: 20,
|
|
@@ -1242,7 +1242,7 @@ class Dr {
|
|
|
1242
1242
|
async loadStepData(t, a) {
|
|
1243
1243
|
const n = this.getHandler(t);
|
|
1244
1244
|
if (!n)
|
|
1245
|
-
throw new Error(`No handler registered for step action: ${
|
|
1245
|
+
throw new Error(`No handler registered for step action: ${le[t]}`);
|
|
1246
1246
|
return n.loadData(a);
|
|
1247
1247
|
}
|
|
1248
1248
|
/**
|
|
@@ -1251,7 +1251,7 @@ class Dr {
|
|
|
1251
1251
|
async submitStepData(t, a) {
|
|
1252
1252
|
const n = this.getHandler(t);
|
|
1253
1253
|
if (!n)
|
|
1254
|
-
throw new Error(`No handler registered for step action: ${
|
|
1254
|
+
throw new Error(`No handler registered for step action: ${le[t]}`);
|
|
1255
1255
|
return n.submitData(a);
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
@@ -1265,47 +1265,47 @@ class Mr {
|
|
|
1265
1265
|
* Register all step handlers
|
|
1266
1266
|
*/
|
|
1267
1267
|
registerStepHandlers() {
|
|
1268
|
-
this.stepRouter.registerHandler(
|
|
1268
|
+
this.stepRouter.registerHandler(le.Questionaries, {
|
|
1269
1269
|
loadData: (t) => this.questionnaireService.getQuestionnaire(t),
|
|
1270
1270
|
submitData: async (t) => {
|
|
1271
1271
|
await this.questionnaireService.fillQuestionnaire(t);
|
|
1272
1272
|
}
|
|
1273
|
-
}), this.stepRouter.registerHandler(
|
|
1273
|
+
}), this.stepRouter.registerHandler(le.UploadDocument, {
|
|
1274
1274
|
loadData: (t) => this.uploadDocumentService.getUploadDocument(t),
|
|
1275
1275
|
submitData: (t) => this.uploadDocumentService.fillUploadDocument(t)
|
|
1276
|
-
}), this.stepRouter.registerHandler(
|
|
1276
|
+
}), this.stepRouter.registerHandler(le.AppropriatenessTest, {
|
|
1277
1277
|
loadData: (t) => this.appropriatenessTestService.getAppropriatenessTest(t),
|
|
1278
1278
|
submitData: async (t) => {
|
|
1279
1279
|
await this.appropriatenessTestService.fillAppropriatenessTest(t);
|
|
1280
1280
|
}
|
|
1281
|
-
}), this.stepRouter.registerHandler(
|
|
1281
|
+
}), this.stepRouter.registerHandler(le.Overview, {
|
|
1282
1282
|
loadData: (t) => this.overviewService.getOverviewData(t),
|
|
1283
1283
|
submitData: (t) => this.overviewService.passOverview(t.applicantId)
|
|
1284
|
-
}), this.stepRouter.registerHandler(
|
|
1284
|
+
}), this.stepRouter.registerHandler(le.RiskScoring, {
|
|
1285
1285
|
loadData: (t) => this.riskScoringService.getRiskCriterias(t),
|
|
1286
1286
|
submitData: async (t) => {
|
|
1287
1287
|
await this.riskScoringService.submitRiskScoring(t);
|
|
1288
1288
|
}
|
|
1289
|
-
}), this.stepRouter.registerHandler(
|
|
1289
|
+
}), this.stepRouter.registerHandler(le.IdentitySdk, {
|
|
1290
1290
|
loadData: async (t) => ({
|
|
1291
1291
|
applicantId: t,
|
|
1292
1292
|
message: "Identity verification required"
|
|
1293
1293
|
}),
|
|
1294
1294
|
submitData: async () => {
|
|
1295
1295
|
}
|
|
1296
|
-
}), this.stepRouter.registerHandler(
|
|
1296
|
+
}), this.stepRouter.registerHandler(le.InvestorCategorization, {
|
|
1297
1297
|
loadData: (t) => this.investorCategorizationService.getInvestorCategorization(t),
|
|
1298
1298
|
submitData: async (t) => {
|
|
1299
1299
|
await this.investorCategorizationService.setInvestorCategorization(t);
|
|
1300
1300
|
}
|
|
1301
|
-
}), this.stepRouter.registerHandler(
|
|
1301
|
+
}), this.stepRouter.registerHandler(le.ManualReview, {
|
|
1302
1302
|
loadData: async (t) => ({
|
|
1303
1303
|
applicantId: t,
|
|
1304
1304
|
message: "Your application is under manual review"
|
|
1305
1305
|
}),
|
|
1306
1306
|
submitData: async () => {
|
|
1307
1307
|
}
|
|
1308
|
-
}), this.stepRouter.registerHandler(
|
|
1308
|
+
}), this.stepRouter.registerHandler(le.AdditionalData, {
|
|
1309
1309
|
loadData: async (t) => ({
|
|
1310
1310
|
applicantId: t,
|
|
1311
1311
|
message: "Additional data required"
|
|
@@ -1943,7 +1943,7 @@ ${Object.entries(i).filter(([, y]) => !!y).map(([y, p]) => ` --metakyc-${y}: ${
|
|
|
1943
1943
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1944
1944
|
}
|
|
1945
1945
|
}
|
|
1946
|
-
const Bt = Gt(null), Hr = "1.0.17", Wr = '.metakyc-sdk .pointer-events-none{pointer-events:none}.metakyc-sdk .visible{visibility:visible}.metakyc-sdk .static{position:static}.metakyc-sdk .fixed{position:fixed}.metakyc-sdk .absolute{position:absolute}.metakyc-sdk .relative{position:relative}.metakyc-sdk .inset-y-0{top:0;bottom:0}.metakyc-sdk .left-0{left:0}.metakyc-sdk .right-0{right:0}.metakyc-sdk .right-3{right:.75rem}.metakyc-sdk .top-1\\/2{top:50%}.metakyc-sdk .mx-4{margin-left:1rem;margin-right:1rem}.metakyc-sdk .mx-6{margin-left:1.5rem;margin-right:1.5rem}.metakyc-sdk .mx-auto{margin-left:auto;margin-right:auto}.metakyc-sdk .my-8{margin-top:2rem;margin-bottom:2rem}.metakyc-sdk .-ml-1{margin-left:-.25rem}.metakyc-sdk .mb-0\\.5{margin-bottom:.125rem}.metakyc-sdk .mb-1{margin-bottom:.25rem}.metakyc-sdk .mb-2{margin-bottom:.5rem}.metakyc-sdk .mb-3{margin-bottom:.75rem}.metakyc-sdk .mb-4{margin-bottom:1rem}.metakyc-sdk .mb-6{margin-bottom:1.5rem}.metakyc-sdk .ml-0\\.5{margin-left:.125rem}.metakyc-sdk .ml-1{margin-left:.25rem}.metakyc-sdk .ml-3{margin-left:.75rem}.metakyc-sdk .mr-2{margin-right:.5rem}.metakyc-sdk .mr-3{margin-right:.75rem}.metakyc-sdk .mt-0\\.5{margin-top:.125rem}.metakyc-sdk .mt-1{margin-top:.25rem}.metakyc-sdk .mt-2{margin-top:.5rem}.metakyc-sdk .mt-3{margin-top:.75rem}.metakyc-sdk .mt-4{margin-top:1rem}.metakyc-sdk .mt-6{margin-top:1.5rem}.metakyc-sdk .block{display:block}.metakyc-sdk .inline-block{display:inline-block}.metakyc-sdk .inline{display:inline}.metakyc-sdk .flex{display:flex}.metakyc-sdk .inline-flex{display:inline-flex}.metakyc-sdk .grid{display:grid}.metakyc-sdk .hidden{display:none}.metakyc-sdk .h-12{height:3rem}.metakyc-sdk .h-16{height:4rem}.metakyc-sdk .h-24{height:6rem}.metakyc-sdk .h-4{height:1rem}.metakyc-sdk .h-6{height:1.5rem}.metakyc-sdk .h-8{height:2rem}.metakyc-sdk .h-full{height:100%}.metakyc-sdk .max-h-52{max-height:13rem}.metakyc-sdk .min-h-\\[400px\\]{min-height:400px}.metakyc-sdk .w-12{width:3rem}.metakyc-sdk .w-16{width:4rem}.metakyc-sdk .w-20{width:5rem}.metakyc-sdk .w-24{width:6rem}.metakyc-sdk .w-4{width:1rem}.metakyc-sdk .w-6{width:1.5rem}.metakyc-sdk .w-8{width:2rem}.metakyc-sdk .w-full{width:100%}.metakyc-sdk .max-w-md{max-width:28rem}.metakyc-sdk .flex-1{flex:1 1 0%}.metakyc-sdk .flex-shrink-0{flex-shrink:0}.metakyc-sdk .-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.metakyc-sdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.metakyc-sdk .animate-spin{animation:spin 1s linear infinite}.metakyc-sdk .cursor-not-allowed{cursor:not-allowed}.metakyc-sdk .cursor-pointer{cursor:pointer}.metakyc-sdk .resize{resize:both}.metakyc-sdk .list-inside{list-style-position:inside}.metakyc-sdk .list-disc{list-style-type:disc}.metakyc-sdk .list-none{list-style-type:none}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.metakyc-sdk .flex-col{flex-direction:column}.metakyc-sdk .flex-wrap{flex-wrap:wrap}.metakyc-sdk .items-start{align-items:flex-start}.metakyc-sdk .items-center{align-items:center}.metakyc-sdk .justify-center{justify-content:center}.metakyc-sdk .justify-between{justify-content:space-between}.metakyc-sdk .gap-1{gap:.25rem}.metakyc-sdk .gap-1\\.5{gap:.375rem}.metakyc-sdk .gap-2{gap:.5rem}.metakyc-sdk .gap-4{gap:1rem}.metakyc-sdk :is(.space-x-3>:not([hidden])~:not([hidden])){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.metakyc-sdk :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-1\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-6>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-8>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.metakyc-sdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.metakyc-sdk .rounded{border-radius:.25rem}.metakyc-sdk .rounded-full{border-radius:9999px}.metakyc-sdk .rounded-lg{border-radius:.5rem}.metakyc-sdk .rounded-xl{border-radius:.75rem}.metakyc-sdk .border{border-width:1px}.metakyc-sdk .border-0{border-width:0px}.metakyc-sdk .border-2{border-width:2px}.metakyc-sdk .border-b{border-bottom-width:1px}.metakyc-sdk .border-t{border-top-width:1px}.metakyc-sdk .border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-danger-500{border-color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.metakyc-sdk .bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.metakyc-sdk .p-3{padding:.75rem}.metakyc-sdk .p-4{padding:1rem}.metakyc-sdk .px-2{padding-left:.5rem;padding-right:.5rem}.metakyc-sdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}.metakyc-sdk .px-3{padding-left:.75rem;padding-right:.75rem}.metakyc-sdk .px-4{padding-left:1rem;padding-right:1rem}.metakyc-sdk .px-6{padding-left:1.5rem;padding-right:1.5rem}.metakyc-sdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.metakyc-sdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.metakyc-sdk .py-12{padding-top:3rem;padding-bottom:3rem}.metakyc-sdk .py-2{padding-top:.5rem;padding-bottom:.5rem}.metakyc-sdk .py-3{padding-top:.75rem;padding-bottom:.75rem}.metakyc-sdk .py-4{padding-top:1rem;padding-bottom:1rem}.metakyc-sdk .py-8{padding-top:2rem;padding-bottom:2rem}.metakyc-sdk .pb-4{padding-bottom:1rem}.metakyc-sdk .pl-10{padding-left:2.5rem}.metakyc-sdk .pl-3{padding-left:.75rem}.metakyc-sdk .pr-10{padding-right:2.5rem}.metakyc-sdk .pr-3{padding-right:.75rem}.metakyc-sdk .pr-6{padding-right:1.5rem}.metakyc-sdk .pt-6{padding-top:1.5rem}.metakyc-sdk .text-left{text-align:left}.metakyc-sdk .text-center{text-align:center}.metakyc-sdk .text-right{text-align:right}.metakyc-sdk .text-2xl{font-size:1.5rem;line-height:2rem}.metakyc-sdk .text-3xl{font-size:1.875rem;line-height:2.25rem}.metakyc-sdk .text-5xl{font-size:3rem;line-height:1}.metakyc-sdk .text-base{font-size:1rem;line-height:1.5rem}.metakyc-sdk .text-lg{font-size:1.125rem;line-height:1.75rem}.metakyc-sdk .text-sm{font-size:.875rem;line-height:1.25rem}.metakyc-sdk .text-xl{font-size:1.25rem;line-height:1.75rem}.metakyc-sdk .text-xs{font-size:.75rem;line-height:1rem}.metakyc-sdk .font-bold{font-weight:700}.metakyc-sdk .font-medium{font-weight:500}.metakyc-sdk .font-semibold{font-weight:600}.metakyc-sdk .uppercase{text-transform:uppercase}.metakyc-sdk .lowercase{text-transform:lowercase}.metakyc-sdk .tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.metakyc-sdk .leading-6{line-height:1.5rem}.metakyc-sdk .text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-danger-500{color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-primary,.metakyc-sdk .text-primary-500{color:var(--metakyc-primary, #3B82F6)}.metakyc-sdk .text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-secondary{color:var(--metakyc-secondary, #64748b)}.metakyc-sdk .text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.metakyc-sdk .underline{text-decoration-line:underline}.metakyc-sdk .opacity-25{opacity:.25}.metakyc-sdk .opacity-50{opacity:.5}.metakyc-sdk .opacity-60{opacity:.6}.metakyc-sdk .opacity-75{opacity:.75}.metakyc-sdk .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.metakyc-sdk .outline{outline-style:solid}.metakyc-sdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .duration-200{transition-duration:.2s}.metakyc-sdk .grid{display:grid!important}.metakyc-sdk .flex{display:flex!important}.metakyc-sdk .inline-flex{display:inline-flex!important}.metakyc-sdk .hidden{display:none!important}.metakyc-sdk .block{display:block!important}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.metakyc-sdk .col-span-1{grid-column:span 1 / span 1!important}.metakyc-sdk .col-span-2{grid-column:span 2 / span 2!important}.metakyc-sdk .col-span-3{grid-column:span 3 / span 3!important}.metakyc-sdk .col-span-4{grid-column:span 4 / span 4!important}.metakyc-sdk .gap-1{gap:.25rem!important}.metakyc-sdk .gap-2{gap:.5rem!important}.metakyc-sdk .gap-3{gap:.75rem!important}.metakyc-sdk .gap-4{gap:1rem!important}.metakyc-sdk .gap-6{gap:1.5rem!important}.metakyc-sdk .gap-8{gap:2rem!important}.metakyc-sdk .flex-col{flex-direction:column!important}.metakyc-sdk .flex-row{flex-direction:row!important}.metakyc-sdk .flex-wrap{flex-wrap:wrap!important}.metakyc-sdk .flex-1{flex:1 1 0%!important}.metakyc-sdk .flex-shrink-0{flex-shrink:0!important}.metakyc-sdk .items-center{align-items:center!important}.metakyc-sdk .items-start{align-items:flex-start!important}.metakyc-sdk .items-end{align-items:flex-end!important}.metakyc-sdk .justify-between{justify-content:space-between!important}.metakyc-sdk .justify-center{justify-content:center!important}.metakyc-sdk .justify-end{justify-content:flex-end!important}.metakyc-sdk .justify-start{justify-content:flex-start!important}.metakyc-sdk .space-y-1>*+*{margin-top:.25rem!important}.metakyc-sdk .space-y-1\\.5>*+*{margin-top:.375rem!important}.metakyc-sdk .space-y-2>*+*{margin-top:.5rem!important}.metakyc-sdk .space-y-3>*+*{margin-top:.75rem!important}.metakyc-sdk .space-y-4>*+*{margin-top:1rem!important}.metakyc-sdk .space-y-6>*+*{margin-top:1.5rem!important}.metakyc-sdk .w-full{width:100%!important}.metakyc-sdk .relative{position:relative!important}.metakyc-sdk .absolute{position:absolute!important}.metakyc-sdk .overflow-hidden{overflow:hidden!important}.metakyc-sdk .overflow-auto{overflow:auto!important}.metakyc-sdk .overflow-x-auto{overflow-x:auto!important}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}}.metakyc-sdk *,.metakyc-sdk *:before,.metakyc-sdk *:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--metakyc-border, #e5e7eb)}.metakyc-sdk{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.metakyc-sdk img,.metakyc-sdk video{max-width:100%;height:auto}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6,.metakyc-sdk p{margin:0}.metakyc-sdk ol,.metakyc-sdk ul{list-style:none;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk input,.metakyc-sdk optgroup,.metakyc-sdk select,.metakyc-sdk textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk [role=button]{cursor:pointer}.metakyc-sdk a{color:inherit;text-decoration:inherit}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),.metakyc-sdk select,.metakyc-sdk textarea,.metakyc-sdk .metakyc-searchable-select-trigger,.metakyc-sdk .metakyc-multiselect-trigger{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-sdk input::-moz-placeholder,.metakyc-sdk textarea::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input::placeholder,.metakyc-sdk textarea::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):focus,.metakyc-sdk select:focus,.metakyc-sdk textarea:focus{outline:none!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-sdk input[type=checkbox],.metakyc-sdk input[type=radio]{appearance:none!important;-webkit-appearance:none!important;-moz-appearance:none!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;flex-shrink:0!important;cursor:pointer!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border:1.5px solid var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;position:relative!important;transition:background-color .15s,border-color .15s!important;vertical-align:middle!important;display:inline-block!important;padding:0!important;margin:0!important;color-scheme:light!important}.metakyc-sdk input[type=checkbox]{border-radius:4px!important}.metakyc-sdk input[type=radio]{border-radius:50%!important}.metakyc-sdk input[type=checkbox]:checked,.metakyc-sdk input[type=radio]:checked{background-color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk input[type=checkbox]:checked:after{content:""!important;display:block!important;position:absolute!important;left:4px!important;top:1px!important;width:5px!important;height:9px!important;border:2px solid #ffffff!important;border-top:none!important;border-left:none!important;transform:rotate(45deg)!important}.metakyc-sdk input[type=radio]:checked:after{content:""!important;display:block!important;position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:6px!important;height:6px!important;border-radius:50%!important;background:#fff!important}.metakyc-sdk input[type=checkbox]:focus,.metakyc-sdk input[type=radio]:focus{outline:none!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-primary, #2563eb) 30%,transparent)!important}.metakyc-searchable-select-dropdown,.metakyc-multiselect-dropdown{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important}.metakyc-searchable-select-dropdown input,.metakyc-multiselect-dropdown input{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-searchable-select-dropdown input::-moz-placeholder,.metakyc-multiselect-dropdown input::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input::placeholder,.metakyc-multiselect-dropdown input::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input:focus,.metakyc-multiselect-dropdown input:focus{outline:none!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-searchable-select-dropdown li:hover,.metakyc-multiselect-dropdown li:hover{background-color:var(--metakyc-surface, var(--metakyc-background, #f9fafb))!important}.metakyc-sdk .metakyc-help-btn{color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important;background:transparent!important;position:relative!important;z-index:2!important}.metakyc-sdk .metakyc-overview-step-item,.metakyc-sdk .metakyc-overview-step-item *,.metakyc-sdk .metakyc-step-content,.metakyc-sdk .metakyc-step-content *,.metakyc-sdk .metakyc-step-title,.metakyc-sdk .metakyc-step-title *,.metakyc-sdk .metakyc-step-icon,.metakyc-sdk .metakyc-step-icon *,.metakyc-sdk .metakyc-step-description,.metakyc-sdk .metakyc-step-description *{border-top-width:0!important;border-bottom-width:0!important;border-left-width:0!important;border-right-width:0!important;border-top-style:none!important;border-bottom-style:none!important;border-left-style:none!important;border-right-style:none!important;border-top-color:transparent!important;border-bottom-color:transparent!important;border-left-color:transparent!important;border-right-color:transparent!important;border:0!important;box-shadow:none!important;outline:none!important;outline-width:0!important;outline-style:none!important;text-decoration:none!important;text-decoration-line:none!important}.metakyc-sdk .metakyc-overview-step-item:before,.metakyc-sdk .metakyc-overview-step-item:after,.metakyc-sdk .metakyc-overview-step-item *:before,.metakyc-sdk .metakyc-overview-step-item *:after,.metakyc-sdk .metakyc-step-content:before,.metakyc-sdk .metakyc-step-content:after,.metakyc-sdk .metakyc-step-content *:before,.metakyc-sdk .metakyc-step-content *:after,.metakyc-sdk .metakyc-step-title:before,.metakyc-sdk .metakyc-step-title:after,.metakyc-sdk .metakyc-step-description:before,.metakyc-sdk .metakyc-step-description:after{content:none!important;display:none!important;visibility:hidden!important;border:none!important;box-shadow:none!important;outline:none!important;background:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-overview-step-item{border-width:0!important;border-style:none!important;border:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-content{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-title{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important;text-decoration:none!important}.metakyc-sdk hr,.metakyc-sdk .metakyc-overview-step-item hr,.metakyc-sdk .metakyc-overview-step-item * hr,.metakyc-sdk .metakyc-step-content hr,.metakyc-sdk .metakyc-step-content * hr{display:block!important;height:0!important;border:0!important;border-top:1px solid var(--metakyc-primary, #2563eb)!important;margin:1rem 0!important;overflow:visible!important}.metakyc-sdk{background-color:var(--metakyc-background, #ffffff)!important;color:var(--metakyc-text-primary, #111827)!important;font-family:var(--metakyc-font-family, inherit)!important;padding:1.5rem!important;border-radius:.75rem!important}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6{color:var(--metakyc-text-primary, #111827);letter-spacing:normal}.metakyc-sdk .text-gray-900{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .text-gray-800{color:var(--metakyc-text-primary, #1f2937)!important}.metakyc-sdk .text-gray-700{color:var(--metakyc-text-secondary, #374151)!important}.metakyc-sdk .text-gray-600{color:var(--metakyc-text-secondary, #6b7280)!important}.metakyc-sdk .text-gray-500{color:var(--metakyc-text-muted, #6b7280)!important}.metakyc-sdk .text-gray-400{color:var(--metakyc-text-muted, #9ca3af)!important}.metakyc-sdk .text-gray-300{color:var(--metakyc-text-muted, #d1d5db)!important}.metakyc-sdk .text-white{color:#fff!important}.metakyc-sdk .bg-white{background-color:var(--metakyc-background, #ffffff)!important}.metakyc-sdk .bg-gray-50{background-color:var(--metakyc-surface, #f9fafb)!important}.metakyc-sdk .bg-gray-100{background-color:var(--metakyc-surface, #f3f4f6)!important}.metakyc-sdk .bg-gray-200{background-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-gray-800{background-color:var(--metakyc-surface, #1f2937)!important}.metakyc-sdk .border-gray-100,.metakyc-sdk .border-gray-200,.metakyc-sdk .border-gray-300{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-t{border-top-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-b{border-bottom-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .divide-gray-200>*{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-primary-500,.metakyc-sdk .bg-primary-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-primary-50,.metakyc-sdk .bg-primary-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-primary-500,.metakyc-sdk .text-primary-600,.metakyc-sdk .text-primary-800{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .text-primary-900{color:var(--metakyc-primary-dark, #1e40af)!important}.metakyc-sdk .border-primary-500,.metakyc-sdk .border-primary-600{border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-primary-50:hover{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .hover\\:bg-primary-600:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .bg-blue-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-blue-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-blue-600,.metakyc-sdk .text-blue-400{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-blue-700:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .metakyc-overview-steps h3:before,.metakyc-sdk .metakyc-overview-steps h3:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-overview-steps *:before,.metakyc-sdk .metakyc-overview-steps *:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-stepper-scroll::-webkit-scrollbar{display:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-file-dropzone:hover{border-color:var(--metakyc-primary, #2563eb)!important;background-color:color-mix(in srgb,var(--metakyc-primary, #2563eb) 3%,var(--metakyc-background, #ffffff))!important}.metakyc-sdk .metakyc-file-item:hover{background-color:color-mix(in srgb,var(--metakyc-surface, #f9fafb) 80%,var(--metakyc-border, #e5e7eb))!important}.metakyc-sdk .metakyc-file-upload label{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .metakyc-file-upload p{margin:0!important;line-height:1.4!important}.metakyc-sdk .metakyc-file-item button{background:transparent!important;border:none!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-file-dropzone{box-shadow:none!important;outline:none!important}.metakyc-sdk .hover\\:opacity-90:hover{opacity:.9}.metakyc-sdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.metakyc-sdk .focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.metakyc-sdk .focus\\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.metakyc-sdk .focus\\:ring-offset-1:focus{--tw-ring-offset-width: 1px}.metakyc-sdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.metakyc-sdk .disabled\\:opacity-50:disabled{opacity:.5}.metakyc-sdk .disabled\\:opacity-60:disabled{opacity:.6}.metakyc-sdk .dark\\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-yellow-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(133 77 14 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:bg-blue-900\\/20:is(.dark *){background-color:#1e3a8a33}.metakyc-sdk .dark\\:bg-blue-900\\/30:is(.dark *){background-color:#1e3a8a4d}.metakyc-sdk .dark\\:bg-green-900\\/20:is(.dark *){background-color:#14532d33}.metakyc-sdk .dark\\:bg-green-900\\/30:is(.dark *){background-color:#14532d4d}.metakyc-sdk .dark\\:bg-red-900\\/20:is(.dark *){background-color:#7f1d1d33}.metakyc-sdk .dark\\:bg-red-900\\/30:is(.dark *){background-color:#7f1d1d4d}.metakyc-sdk .dark\\:bg-yellow-900\\/20:is(.dark *){background-color:#713f1233}.metakyc-sdk .dark\\:bg-yellow-900\\/30:is(.dark *){background-color:#713f124d}.metakyc-sdk .dark\\:text-blue-100:is(.dark *){--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-100:is(.dark *){--tw-text-opacity: 1;color:rgb(220 252 231 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}', Ft = "metakyc-sdk-styles";
|
|
1946
|
+
const Bt = Gt(null), Hr = "1.0.19", Wr = '.metakyc-sdk .pointer-events-none{pointer-events:none}.metakyc-sdk .visible{visibility:visible}.metakyc-sdk .static{position:static}.metakyc-sdk .fixed{position:fixed}.metakyc-sdk .absolute{position:absolute}.metakyc-sdk .relative{position:relative}.metakyc-sdk .inset-y-0{top:0;bottom:0}.metakyc-sdk .left-0{left:0}.metakyc-sdk .right-0{right:0}.metakyc-sdk .right-3{right:.75rem}.metakyc-sdk .top-1\\/2{top:50%}.metakyc-sdk .mx-4{margin-left:1rem;margin-right:1rem}.metakyc-sdk .mx-6{margin-left:1.5rem;margin-right:1.5rem}.metakyc-sdk .mx-auto{margin-left:auto;margin-right:auto}.metakyc-sdk .my-8{margin-top:2rem;margin-bottom:2rem}.metakyc-sdk .-ml-1{margin-left:-.25rem}.metakyc-sdk .mb-0\\.5{margin-bottom:.125rem}.metakyc-sdk .mb-1{margin-bottom:.25rem}.metakyc-sdk .mb-2{margin-bottom:.5rem}.metakyc-sdk .mb-3{margin-bottom:.75rem}.metakyc-sdk .mb-4{margin-bottom:1rem}.metakyc-sdk .mb-6{margin-bottom:1.5rem}.metakyc-sdk .ml-0\\.5{margin-left:.125rem}.metakyc-sdk .ml-1{margin-left:.25rem}.metakyc-sdk .ml-3{margin-left:.75rem}.metakyc-sdk .mr-2{margin-right:.5rem}.metakyc-sdk .mr-3{margin-right:.75rem}.metakyc-sdk .mt-0\\.5{margin-top:.125rem}.metakyc-sdk .mt-1{margin-top:.25rem}.metakyc-sdk .mt-2{margin-top:.5rem}.metakyc-sdk .mt-3{margin-top:.75rem}.metakyc-sdk .mt-4{margin-top:1rem}.metakyc-sdk .mt-6{margin-top:1.5rem}.metakyc-sdk .block{display:block}.metakyc-sdk .inline-block{display:inline-block}.metakyc-sdk .inline{display:inline}.metakyc-sdk .flex{display:flex}.metakyc-sdk .inline-flex{display:inline-flex}.metakyc-sdk .grid{display:grid}.metakyc-sdk .hidden{display:none}.metakyc-sdk .h-12{height:3rem}.metakyc-sdk .h-16{height:4rem}.metakyc-sdk .h-24{height:6rem}.metakyc-sdk .h-4{height:1rem}.metakyc-sdk .h-6{height:1.5rem}.metakyc-sdk .h-8{height:2rem}.metakyc-sdk .h-full{height:100%}.metakyc-sdk .max-h-52{max-height:13rem}.metakyc-sdk .min-h-\\[400px\\]{min-height:400px}.metakyc-sdk .w-12{width:3rem}.metakyc-sdk .w-16{width:4rem}.metakyc-sdk .w-20{width:5rem}.metakyc-sdk .w-24{width:6rem}.metakyc-sdk .w-4{width:1rem}.metakyc-sdk .w-6{width:1.5rem}.metakyc-sdk .w-8{width:2rem}.metakyc-sdk .w-full{width:100%}.metakyc-sdk .max-w-md{max-width:28rem}.metakyc-sdk .flex-1{flex:1 1 0%}.metakyc-sdk .flex-shrink-0{flex-shrink:0}.metakyc-sdk .-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.metakyc-sdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.metakyc-sdk .animate-spin{animation:spin 1s linear infinite}.metakyc-sdk .cursor-not-allowed{cursor:not-allowed}.metakyc-sdk .cursor-pointer{cursor:pointer}.metakyc-sdk .resize{resize:both}.metakyc-sdk .list-inside{list-style-position:inside}.metakyc-sdk .list-disc{list-style-type:disc}.metakyc-sdk .list-none{list-style-type:none}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.metakyc-sdk .flex-col{flex-direction:column}.metakyc-sdk .flex-wrap{flex-wrap:wrap}.metakyc-sdk .items-start{align-items:flex-start}.metakyc-sdk .items-center{align-items:center}.metakyc-sdk .justify-center{justify-content:center}.metakyc-sdk .justify-between{justify-content:space-between}.metakyc-sdk .gap-1{gap:.25rem}.metakyc-sdk .gap-1\\.5{gap:.375rem}.metakyc-sdk .gap-2{gap:.5rem}.metakyc-sdk .gap-4{gap:1rem}.metakyc-sdk :is(.space-x-3>:not([hidden])~:not([hidden])){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.metakyc-sdk :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-1\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-6>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-8>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.metakyc-sdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.metakyc-sdk .rounded{border-radius:.25rem}.metakyc-sdk .rounded-full{border-radius:9999px}.metakyc-sdk .rounded-lg{border-radius:.5rem}.metakyc-sdk .rounded-xl{border-radius:.75rem}.metakyc-sdk .border{border-width:1px}.metakyc-sdk .border-0{border-width:0px}.metakyc-sdk .border-2{border-width:2px}.metakyc-sdk .border-b{border-bottom-width:1px}.metakyc-sdk .border-t{border-top-width:1px}.metakyc-sdk .border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-danger-500{border-color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.metakyc-sdk .bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.metakyc-sdk .p-3{padding:.75rem}.metakyc-sdk .p-4{padding:1rem}.metakyc-sdk .px-2{padding-left:.5rem;padding-right:.5rem}.metakyc-sdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}.metakyc-sdk .px-3{padding-left:.75rem;padding-right:.75rem}.metakyc-sdk .px-4{padding-left:1rem;padding-right:1rem}.metakyc-sdk .px-6{padding-left:1.5rem;padding-right:1.5rem}.metakyc-sdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.metakyc-sdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.metakyc-sdk .py-12{padding-top:3rem;padding-bottom:3rem}.metakyc-sdk .py-2{padding-top:.5rem;padding-bottom:.5rem}.metakyc-sdk .py-3{padding-top:.75rem;padding-bottom:.75rem}.metakyc-sdk .py-4{padding-top:1rem;padding-bottom:1rem}.metakyc-sdk .py-8{padding-top:2rem;padding-bottom:2rem}.metakyc-sdk .pb-4{padding-bottom:1rem}.metakyc-sdk .pl-10{padding-left:2.5rem}.metakyc-sdk .pl-3{padding-left:.75rem}.metakyc-sdk .pr-10{padding-right:2.5rem}.metakyc-sdk .pr-3{padding-right:.75rem}.metakyc-sdk .pr-6{padding-right:1.5rem}.metakyc-sdk .pt-6{padding-top:1.5rem}.metakyc-sdk .text-left{text-align:left}.metakyc-sdk .text-center{text-align:center}.metakyc-sdk .text-right{text-align:right}.metakyc-sdk .text-2xl{font-size:1.5rem;line-height:2rem}.metakyc-sdk .text-3xl{font-size:1.875rem;line-height:2.25rem}.metakyc-sdk .text-5xl{font-size:3rem;line-height:1}.metakyc-sdk .text-base{font-size:1rem;line-height:1.5rem}.metakyc-sdk .text-lg{font-size:1.125rem;line-height:1.75rem}.metakyc-sdk .text-sm{font-size:.875rem;line-height:1.25rem}.metakyc-sdk .text-xl{font-size:1.25rem;line-height:1.75rem}.metakyc-sdk .text-xs{font-size:.75rem;line-height:1rem}.metakyc-sdk .font-bold{font-weight:700}.metakyc-sdk .font-medium{font-weight:500}.metakyc-sdk .font-semibold{font-weight:600}.metakyc-sdk .uppercase{text-transform:uppercase}.metakyc-sdk .lowercase{text-transform:lowercase}.metakyc-sdk .tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.metakyc-sdk .leading-6{line-height:1.5rem}.metakyc-sdk .text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-danger-500{color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-primary,.metakyc-sdk .text-primary-500{color:var(--metakyc-primary, #3B82F6)}.metakyc-sdk .text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-secondary{color:var(--metakyc-secondary, #64748b)}.metakyc-sdk .text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.metakyc-sdk .underline{text-decoration-line:underline}.metakyc-sdk .opacity-25{opacity:.25}.metakyc-sdk .opacity-50{opacity:.5}.metakyc-sdk .opacity-60{opacity:.6}.metakyc-sdk .opacity-75{opacity:.75}.metakyc-sdk .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.metakyc-sdk .outline{outline-style:solid}.metakyc-sdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .duration-200{transition-duration:.2s}.metakyc-sdk .grid{display:grid!important}.metakyc-sdk .flex{display:flex!important}.metakyc-sdk .inline-flex{display:inline-flex!important}.metakyc-sdk .hidden{display:none!important}.metakyc-sdk .block{display:block!important}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.metakyc-sdk .col-span-1{grid-column:span 1 / span 1!important}.metakyc-sdk .col-span-2{grid-column:span 2 / span 2!important}.metakyc-sdk .col-span-3{grid-column:span 3 / span 3!important}.metakyc-sdk .col-span-4{grid-column:span 4 / span 4!important}.metakyc-sdk .gap-1{gap:.25rem!important}.metakyc-sdk .gap-2{gap:.5rem!important}.metakyc-sdk .gap-3{gap:.75rem!important}.metakyc-sdk .gap-4{gap:1rem!important}.metakyc-sdk .gap-6{gap:1.5rem!important}.metakyc-sdk .gap-8{gap:2rem!important}.metakyc-sdk .flex-col{flex-direction:column!important}.metakyc-sdk .flex-row{flex-direction:row!important}.metakyc-sdk .flex-wrap{flex-wrap:wrap!important}.metakyc-sdk .flex-1{flex:1 1 0%!important}.metakyc-sdk .flex-shrink-0{flex-shrink:0!important}.metakyc-sdk .items-center{align-items:center!important}.metakyc-sdk .items-start{align-items:flex-start!important}.metakyc-sdk .items-end{align-items:flex-end!important}.metakyc-sdk .justify-between{justify-content:space-between!important}.metakyc-sdk .justify-center{justify-content:center!important}.metakyc-sdk .justify-end{justify-content:flex-end!important}.metakyc-sdk .justify-start{justify-content:flex-start!important}.metakyc-sdk .space-y-1>*+*{margin-top:.25rem!important}.metakyc-sdk .space-y-1\\.5>*+*{margin-top:.375rem!important}.metakyc-sdk .space-y-2>*+*{margin-top:.5rem!important}.metakyc-sdk .space-y-3>*+*{margin-top:.75rem!important}.metakyc-sdk .space-y-4>*+*{margin-top:1rem!important}.metakyc-sdk .space-y-6>*+*{margin-top:1.5rem!important}.metakyc-sdk .w-full{width:100%!important}.metakyc-sdk .relative{position:relative!important}.metakyc-sdk .absolute{position:absolute!important}.metakyc-sdk .overflow-hidden{overflow:hidden!important}.metakyc-sdk .overflow-auto{overflow:auto!important}.metakyc-sdk .overflow-x-auto{overflow-x:auto!important}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}}.metakyc-sdk *,.metakyc-sdk *:before,.metakyc-sdk *:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--metakyc-border, #e5e7eb)}.metakyc-sdk{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.metakyc-sdk img,.metakyc-sdk video{max-width:100%;height:auto}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6,.metakyc-sdk p{margin:0}.metakyc-sdk ol,.metakyc-sdk ul{list-style:none;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk input,.metakyc-sdk optgroup,.metakyc-sdk select,.metakyc-sdk textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk [role=button]{cursor:pointer}.metakyc-sdk a{color:inherit;text-decoration:inherit}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),.metakyc-sdk select,.metakyc-sdk textarea,.metakyc-sdk .metakyc-searchable-select-trigger,.metakyc-sdk .metakyc-multiselect-trigger{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-sdk input::-moz-placeholder,.metakyc-sdk textarea::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input::placeholder,.metakyc-sdk textarea::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):focus,.metakyc-sdk select:focus,.metakyc-sdk textarea:focus{outline:none!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-sdk input[type=checkbox],.metakyc-sdk input[type=radio]{appearance:none!important;-webkit-appearance:none!important;-moz-appearance:none!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;flex-shrink:0!important;cursor:pointer!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border:1.5px solid var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;position:relative!important;transition:background-color .15s,border-color .15s!important;vertical-align:middle!important;display:inline-block!important;padding:0!important;margin:0!important;color-scheme:light!important}.metakyc-sdk input[type=checkbox]{border-radius:4px!important}.metakyc-sdk input[type=radio]{border-radius:50%!important}.metakyc-sdk input[type=checkbox]:checked,.metakyc-sdk input[type=radio]:checked{background-color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk input[type=checkbox]:checked:after{content:""!important;display:block!important;position:absolute!important;left:4px!important;top:1px!important;width:5px!important;height:9px!important;border:2px solid #ffffff!important;border-top:none!important;border-left:none!important;transform:rotate(45deg)!important}.metakyc-sdk input[type=radio]:checked:after{content:""!important;display:block!important;position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:6px!important;height:6px!important;border-radius:50%!important;background:#fff!important}.metakyc-sdk input[type=checkbox]:focus,.metakyc-sdk input[type=radio]:focus{outline:none!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-primary, #2563eb) 30%,transparent)!important}.metakyc-searchable-select-dropdown,.metakyc-multiselect-dropdown{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important}.metakyc-searchable-select-dropdown input,.metakyc-multiselect-dropdown input{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-searchable-select-dropdown input::-moz-placeholder,.metakyc-multiselect-dropdown input::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input::placeholder,.metakyc-multiselect-dropdown input::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input:focus,.metakyc-multiselect-dropdown input:focus{outline:none!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-searchable-select-dropdown li:hover,.metakyc-multiselect-dropdown li:hover{background-color:var(--metakyc-surface, var(--metakyc-background, #f9fafb))!important}.metakyc-sdk .metakyc-help-btn{color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important;background:transparent!important;position:relative!important;z-index:2!important}.metakyc-sdk .metakyc-overview-step-item,.metakyc-sdk .metakyc-overview-step-item *,.metakyc-sdk .metakyc-step-content,.metakyc-sdk .metakyc-step-content *,.metakyc-sdk .metakyc-step-title,.metakyc-sdk .metakyc-step-title *,.metakyc-sdk .metakyc-step-icon,.metakyc-sdk .metakyc-step-icon *,.metakyc-sdk .metakyc-step-description,.metakyc-sdk .metakyc-step-description *{border-top-width:0!important;border-bottom-width:0!important;border-left-width:0!important;border-right-width:0!important;border-top-style:none!important;border-bottom-style:none!important;border-left-style:none!important;border-right-style:none!important;border-top-color:transparent!important;border-bottom-color:transparent!important;border-left-color:transparent!important;border-right-color:transparent!important;border:0!important;box-shadow:none!important;outline:none!important;outline-width:0!important;outline-style:none!important;text-decoration:none!important;text-decoration-line:none!important}.metakyc-sdk .metakyc-overview-step-item:before,.metakyc-sdk .metakyc-overview-step-item:after,.metakyc-sdk .metakyc-overview-step-item *:before,.metakyc-sdk .metakyc-overview-step-item *:after,.metakyc-sdk .metakyc-step-content:before,.metakyc-sdk .metakyc-step-content:after,.metakyc-sdk .metakyc-step-content *:before,.metakyc-sdk .metakyc-step-content *:after,.metakyc-sdk .metakyc-step-title:before,.metakyc-sdk .metakyc-step-title:after,.metakyc-sdk .metakyc-step-description:before,.metakyc-sdk .metakyc-step-description:after{content:none!important;display:none!important;visibility:hidden!important;border:none!important;box-shadow:none!important;outline:none!important;background:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-overview-step-item{border-width:0!important;border-style:none!important;border:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-content{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-title{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important;text-decoration:none!important}.metakyc-sdk hr,.metakyc-sdk .metakyc-overview-step-item hr,.metakyc-sdk .metakyc-overview-step-item * hr,.metakyc-sdk .metakyc-step-content hr,.metakyc-sdk .metakyc-step-content * hr{display:block!important;height:0!important;border:0!important;border-top:1px solid var(--metakyc-primary, #2563eb)!important;opacity:.25!important;margin:1rem 0!important;overflow:visible!important}.metakyc-sdk{background-color:var(--metakyc-background, #ffffff)!important;color:var(--metakyc-text-primary, #111827)!important;font-family:var(--metakyc-font-family, inherit)!important;padding:1.5rem!important;border-radius:.75rem!important}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6{color:var(--metakyc-text-primary, #111827);letter-spacing:normal}.metakyc-sdk .text-gray-900{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .text-gray-800{color:var(--metakyc-text-primary, #1f2937)!important}.metakyc-sdk .text-gray-700{color:var(--metakyc-text-secondary, #374151)!important}.metakyc-sdk .text-gray-600{color:var(--metakyc-text-secondary, #6b7280)!important}.metakyc-sdk .text-gray-500{color:var(--metakyc-text-muted, #6b7280)!important}.metakyc-sdk .text-gray-400{color:var(--metakyc-text-muted, #9ca3af)!important}.metakyc-sdk .text-gray-300{color:var(--metakyc-text-muted, #d1d5db)!important}.metakyc-sdk .text-white{color:#fff!important}.metakyc-sdk .bg-white{background-color:var(--metakyc-background, #ffffff)!important}.metakyc-sdk .bg-gray-50{background-color:var(--metakyc-surface, #f9fafb)!important}.metakyc-sdk .bg-gray-100{background-color:var(--metakyc-surface, #f3f4f6)!important}.metakyc-sdk .bg-gray-200{background-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-gray-800{background-color:var(--metakyc-surface, #1f2937)!important}.metakyc-sdk .border-gray-100,.metakyc-sdk .border-gray-200,.metakyc-sdk .border-gray-300{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-t{border-top-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-b{border-bottom-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .divide-gray-200>*{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-primary-500,.metakyc-sdk .bg-primary-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-primary-50,.metakyc-sdk .bg-primary-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-primary-500,.metakyc-sdk .text-primary-600,.metakyc-sdk .text-primary-800{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .text-primary-900{color:var(--metakyc-primary-dark, #1e40af)!important}.metakyc-sdk .border-primary-500,.metakyc-sdk .border-primary-600{border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-primary-50:hover{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .hover\\:bg-primary-600:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .bg-blue-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-blue-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-blue-600,.metakyc-sdk .text-blue-400{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-blue-700:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .metakyc-overview-steps h3:before,.metakyc-sdk .metakyc-overview-steps h3:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-overview-steps *:before,.metakyc-sdk .metakyc-overview-steps *:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-stepper-scroll::-webkit-scrollbar{display:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-file-dropzone:hover{border-color:var(--metakyc-primary, #2563eb)!important;background-color:color-mix(in srgb,var(--metakyc-primary, #2563eb) 3%,var(--metakyc-background, #ffffff))!important}.metakyc-sdk .metakyc-file-item:hover{background-color:color-mix(in srgb,var(--metakyc-surface, #f9fafb) 80%,var(--metakyc-border, #e5e7eb))!important}.metakyc-sdk .metakyc-file-upload label{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .metakyc-file-upload p{margin:0!important;line-height:1.4!important}.metakyc-sdk .metakyc-file-item button{background:transparent!important;border:none!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-file-dropzone{box-shadow:none!important;outline:none!important}.metakyc-sdk .hover\\:opacity-90:hover{opacity:.9}.metakyc-sdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.metakyc-sdk .focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.metakyc-sdk .focus\\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.metakyc-sdk .focus\\:ring-offset-1:focus{--tw-ring-offset-width: 1px}.metakyc-sdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.metakyc-sdk .disabled\\:opacity-50:disabled{opacity:.5}.metakyc-sdk .disabled\\:opacity-60:disabled{opacity:.6}.metakyc-sdk .dark\\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-yellow-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(133 77 14 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:bg-blue-900\\/20:is(.dark *){background-color:#1e3a8a33}.metakyc-sdk .dark\\:bg-blue-900\\/30:is(.dark *){background-color:#1e3a8a4d}.metakyc-sdk .dark\\:bg-green-900\\/20:is(.dark *){background-color:#14532d33}.metakyc-sdk .dark\\:bg-green-900\\/30:is(.dark *){background-color:#14532d4d}.metakyc-sdk .dark\\:bg-red-900\\/20:is(.dark *){background-color:#7f1d1d33}.metakyc-sdk .dark\\:bg-red-900\\/30:is(.dark *){background-color:#7f1d1d4d}.metakyc-sdk .dark\\:bg-yellow-900\\/20:is(.dark *){background-color:#713f1233}.metakyc-sdk .dark\\:bg-yellow-900\\/30:is(.dark *){background-color:#713f124d}.metakyc-sdk .dark\\:text-blue-100:is(.dark *){--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-100:is(.dark *){--tw-text-opacity: 1;color:rgb(220 252 231 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}', Ft = "metakyc-sdk-styles";
|
|
1947
1947
|
let bt = !1;
|
|
1948
1948
|
function Ur() {
|
|
1949
1949
|
if (bt || typeof document > "u") return;
|
|
@@ -1957,7 +1957,7 @@ function Ur() {
|
|
|
1957
1957
|
const At = "metakyc-theme-cache", Ja = ({ config: e, children: t }) => {
|
|
1958
1958
|
Ur();
|
|
1959
1959
|
const [a, n] = x(null), i = we.useRef(!1), l = we.useRef(!1), c = De(() => {
|
|
1960
|
-
const y = new hr(e), p = new gr(y), b = new fr(y), F = new kr(y), S = new br(y),
|
|
1960
|
+
const y = new hr(e), p = new gr(y), b = new fr(y), F = new kr(y), S = new br(y), A = new xr(y), L = new vr(y), v = new wr(y), I = new Sr(y), B = new Cr(y), Y = new Tr(y), P = new jr();
|
|
1961
1961
|
if (typeof document < "u")
|
|
1962
1962
|
if (e.theme)
|
|
1963
1963
|
P.applyTheme(e.theme);
|
|
@@ -1974,10 +1974,10 @@ const At = "metakyc-theme-cache", Ja = ({ config: e, children: t }) => {
|
|
|
1974
1974
|
questionnaireService: b,
|
|
1975
1975
|
uploadDocumentService: F,
|
|
1976
1976
|
appropriatenessTestService: S,
|
|
1977
|
-
overviewService:
|
|
1977
|
+
overviewService: A,
|
|
1978
1978
|
riskScoringService: L,
|
|
1979
1979
|
identityService: v,
|
|
1980
|
-
baseInformationService:
|
|
1980
|
+
baseInformationService: I,
|
|
1981
1981
|
investorCategorizationService: B,
|
|
1982
1982
|
themeService: Y,
|
|
1983
1983
|
themeManager: P
|
|
@@ -2137,7 +2137,7 @@ function rn() {
|
|
|
2137
2137
|
Vr(), Gr();
|
|
2138
2138
|
}
|
|
2139
2139
|
function Jr(e) {
|
|
2140
|
-
const { createOrchestrator: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(null), y =
|
|
2140
|
+
const { createOrchestrator: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(null), y = ce(null), p = e || Yr();
|
|
2141
2141
|
fe(() => {
|
|
2142
2142
|
y.current || (y.current = t());
|
|
2143
2143
|
}, [t]), fe(() => {
|
|
@@ -2151,7 +2151,7 @@ function Jr(e) {
|
|
|
2151
2151
|
nextWorkflowKey: a.nextWorkflowKey
|
|
2152
2152
|
}));
|
|
2153
2153
|
}, [a, p]);
|
|
2154
|
-
const b =
|
|
2154
|
+
const b = ce(!1), F = ce(!1), S = ae(async () => {
|
|
2155
2155
|
if (!(!p || !y.current)) {
|
|
2156
2156
|
if (b.current) {
|
|
2157
2157
|
console.log("[Workflow] Load already in progress, skipping...");
|
|
@@ -2171,7 +2171,7 @@ function Jr(e) {
|
|
|
2171
2171
|
fe(() => {
|
|
2172
2172
|
p && !F.current && S();
|
|
2173
2173
|
}, [p, S]);
|
|
2174
|
-
const
|
|
2174
|
+
const A = ae(async () => {
|
|
2175
2175
|
if (y.current) {
|
|
2176
2176
|
if (b.current) {
|
|
2177
2177
|
console.log("[Workflow] Refresh already in progress, skipping...");
|
|
@@ -2211,7 +2211,7 @@ function Jr(e) {
|
|
|
2211
2211
|
l(!1);
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
|
-
}, []),
|
|
2214
|
+
}, []), I = ae(async (P) => {
|
|
2215
2215
|
if (y.current) {
|
|
2216
2216
|
l(!0), d(null);
|
|
2217
2217
|
try {
|
|
@@ -2239,22 +2239,22 @@ function Jr(e) {
|
|
|
2239
2239
|
error: c,
|
|
2240
2240
|
isComplete: (a == null ? void 0 : a.status) === Oe.Finished,
|
|
2241
2241
|
isOnHold: (a == null ? void 0 : a.status) === Oe.OnHold,
|
|
2242
|
-
refreshProgress:
|
|
2242
|
+
refreshProgress: A,
|
|
2243
2243
|
moveToNext: L,
|
|
2244
2244
|
moveBack: v,
|
|
2245
|
-
submitCurrentStep:
|
|
2245
|
+
submitCurrentStep: I,
|
|
2246
2246
|
orchestrator: y.current
|
|
2247
2247
|
};
|
|
2248
2248
|
}
|
|
2249
2249
|
function Xr(e) {
|
|
2250
|
-
const { questionnaireService: t, applicantService: a } = Le(), [n, i] = x(null), [l, c] = x({}), [d, y] = x(!1), [p, b] = x(!1), [F, S] = x(null),
|
|
2250
|
+
const { questionnaireService: t, applicantService: a } = Le(), [n, i] = x(null), [l, c] = x({}), [d, y] = x(!1), [p, b] = x(!1), [F, S] = x(null), A = ce(!1), L = ce(null), v = ae(async () => {
|
|
2251
2251
|
var B, Y;
|
|
2252
2252
|
if (e) {
|
|
2253
|
-
if (
|
|
2253
|
+
if (A.current) {
|
|
2254
2254
|
console.log("[Questionnaire] Load already in progress, skipping...");
|
|
2255
2255
|
return;
|
|
2256
2256
|
}
|
|
2257
|
-
|
|
2257
|
+
A.current = !0, y(!0), S(null);
|
|
2258
2258
|
try {
|
|
2259
2259
|
const [P, z] = await Promise.all([
|
|
2260
2260
|
t.getQuestionnaire(e),
|
|
@@ -2262,12 +2262,12 @@ function Xr(e) {
|
|
|
2262
2262
|
]);
|
|
2263
2263
|
if (i(P), (B = z == null ? void 0 : z.questionnaireResults) != null && B.length && P) {
|
|
2264
2264
|
const Z = /* @__PURE__ */ new Map();
|
|
2265
|
-
for (const
|
|
2266
|
-
|
|
2267
|
-
const ne = {}, R = P.questionGroups.flatMap((
|
|
2268
|
-
for (const
|
|
2269
|
-
const $ =
|
|
2270
|
-
Z.has($) && (ne[
|
|
2265
|
+
for (const k of z.questionnaireResults)
|
|
2266
|
+
k.question && ((Y = k.answers) != null && Y.length) && Z.set(k.question.trim().toLowerCase(), k.answers);
|
|
2267
|
+
const ne = {}, R = P.questionGroups.flatMap((k) => k.questions ?? []);
|
|
2268
|
+
for (const k of R) {
|
|
2269
|
+
const $ = k.text.trim().toLowerCase();
|
|
2270
|
+
Z.has($) && (ne[k.id] = Z.get($));
|
|
2271
2271
|
}
|
|
2272
2272
|
c(ne);
|
|
2273
2273
|
}
|
|
@@ -2275,14 +2275,14 @@ function Xr(e) {
|
|
|
2275
2275
|
} catch (P) {
|
|
2276
2276
|
S(P);
|
|
2277
2277
|
} finally {
|
|
2278
|
-
y(!1),
|
|
2278
|
+
y(!1), A.current = !1;
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
2281
|
}, [e, t, a]);
|
|
2282
2282
|
fe(() => {
|
|
2283
2283
|
e && L.current !== e && v();
|
|
2284
2284
|
}, [e]);
|
|
2285
|
-
const
|
|
2285
|
+
const I = ae(
|
|
2286
2286
|
async (B) => {
|
|
2287
2287
|
b(!0), S(null);
|
|
2288
2288
|
try {
|
|
@@ -2302,11 +2302,11 @@ function Xr(e) {
|
|
|
2302
2302
|
isSubmitting: p,
|
|
2303
2303
|
error: F,
|
|
2304
2304
|
load: v,
|
|
2305
|
-
submit:
|
|
2305
|
+
submit: I
|
|
2306
2306
|
};
|
|
2307
2307
|
}
|
|
2308
2308
|
function Zr(e) {
|
|
2309
|
-
const { uploadDocumentService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(0), [b, F] = x(null), S =
|
|
2309
|
+
const { uploadDocumentService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(0), [b, F] = x(null), S = ce(!1), A = ce(null), L = ae(async () => {
|
|
2310
2310
|
if (e) {
|
|
2311
2311
|
if (S.current) {
|
|
2312
2312
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
@@ -2314,23 +2314,23 @@ function Zr(e) {
|
|
|
2314
2314
|
}
|
|
2315
2315
|
S.current = !0, l(!0), F(null);
|
|
2316
2316
|
try {
|
|
2317
|
-
const
|
|
2318
|
-
n(
|
|
2319
|
-
} catch (
|
|
2320
|
-
F(
|
|
2317
|
+
const I = await t.getUploadDocument(e);
|
|
2318
|
+
n(I), A.current = e;
|
|
2319
|
+
} catch (I) {
|
|
2320
|
+
F(I);
|
|
2321
2321
|
} finally {
|
|
2322
2322
|
l(!1), S.current = !1;
|
|
2323
2323
|
}
|
|
2324
2324
|
}
|
|
2325
2325
|
}, [e, t]);
|
|
2326
2326
|
fe(() => {
|
|
2327
|
-
e &&
|
|
2327
|
+
e && A.current !== e && L();
|
|
2328
2328
|
}, [e]);
|
|
2329
2329
|
const v = ae(
|
|
2330
|
-
async (
|
|
2330
|
+
async (I) => {
|
|
2331
2331
|
d(!0), p(0), F(null);
|
|
2332
2332
|
try {
|
|
2333
|
-
await t.fillUploadDocument(
|
|
2333
|
+
await t.fillUploadDocument(I), p(100);
|
|
2334
2334
|
} catch (B) {
|
|
2335
2335
|
throw F(B), B;
|
|
2336
2336
|
} finally {
|
|
@@ -2350,7 +2350,7 @@ function Zr(e) {
|
|
|
2350
2350
|
};
|
|
2351
2351
|
}
|
|
2352
2352
|
function an(e) {
|
|
2353
|
-
const { appropriatenessTestService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(null), [b, F] = x(null), S =
|
|
2353
|
+
const { appropriatenessTestService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(null), [b, F] = x(null), S = ce(!1), A = ce(null), L = ae(async () => {
|
|
2354
2354
|
if (e) {
|
|
2355
2355
|
if (S.current) {
|
|
2356
2356
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
@@ -2358,23 +2358,23 @@ function an(e) {
|
|
|
2358
2358
|
}
|
|
2359
2359
|
S.current = !0, l(!0), p(null);
|
|
2360
2360
|
try {
|
|
2361
|
-
const
|
|
2362
|
-
n(
|
|
2363
|
-
} catch (
|
|
2364
|
-
p(
|
|
2361
|
+
const I = await t.getAppropriatenessTest(e);
|
|
2362
|
+
n(I), A.current = e;
|
|
2363
|
+
} catch (I) {
|
|
2364
|
+
p(I);
|
|
2365
2365
|
} finally {
|
|
2366
2366
|
l(!1), S.current = !1;
|
|
2367
2367
|
}
|
|
2368
2368
|
}
|
|
2369
2369
|
}, [e, t]);
|
|
2370
2370
|
fe(() => {
|
|
2371
|
-
e &&
|
|
2371
|
+
e && A.current !== e && L();
|
|
2372
2372
|
}, [e]);
|
|
2373
2373
|
const v = ae(
|
|
2374
|
-
async (
|
|
2374
|
+
async (I) => {
|
|
2375
2375
|
d(!0), p(null);
|
|
2376
2376
|
try {
|
|
2377
|
-
const B = await t.fillAppropriatenessTest(
|
|
2377
|
+
const B = await t.fillAppropriatenessTest(I);
|
|
2378
2378
|
return F(B), B;
|
|
2379
2379
|
} catch (B) {
|
|
2380
2380
|
throw p(B), B;
|
|
@@ -2395,7 +2395,7 @@ function an(e) {
|
|
|
2395
2395
|
};
|
|
2396
2396
|
}
|
|
2397
2397
|
function ea(e) {
|
|
2398
|
-
const { overviewService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(null), b =
|
|
2398
|
+
const { overviewService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(null), b = ce(!1), F = ce(null), S = ae(async () => {
|
|
2399
2399
|
if (e) {
|
|
2400
2400
|
if (b.current) {
|
|
2401
2401
|
console.log("[Overview] Load already in progress, skipping...");
|
|
@@ -2415,7 +2415,7 @@ function ea(e) {
|
|
|
2415
2415
|
fe(() => {
|
|
2416
2416
|
e && F.current !== e && S();
|
|
2417
2417
|
}, [e]);
|
|
2418
|
-
const
|
|
2418
|
+
const A = ae(async () => {
|
|
2419
2419
|
if (e) {
|
|
2420
2420
|
d(!0), p(null);
|
|
2421
2421
|
try {
|
|
@@ -2433,14 +2433,14 @@ function ea(e) {
|
|
|
2433
2433
|
isSubmitting: c,
|
|
2434
2434
|
error: y,
|
|
2435
2435
|
load: S,
|
|
2436
|
-
passOverview:
|
|
2436
|
+
passOverview: A
|
|
2437
2437
|
};
|
|
2438
2438
|
}
|
|
2439
2439
|
function ta(e) {
|
|
2440
2440
|
const { identityService: t } = Le(), [a, n] = x(
|
|
2441
2441
|
null
|
|
2442
|
-
), [i, l] = x(!1), [c, d] = x(null), y =
|
|
2443
|
-
async (S,
|
|
2442
|
+
), [i, l] = x(!1), [c, d] = x(null), y = ce(!1), p = ae(
|
|
2443
|
+
async (S, A) => {
|
|
2444
2444
|
if (e) {
|
|
2445
2445
|
if (y.current) {
|
|
2446
2446
|
console.log("[Identity] Request already in progress, skipping...");
|
|
@@ -2452,7 +2452,7 @@ function ta(e) {
|
|
|
2452
2452
|
applicantId: e,
|
|
2453
2453
|
restart: !1,
|
|
2454
2454
|
redirectUrl: S || "",
|
|
2455
|
-
ttl:
|
|
2455
|
+
ttl: A || 604800
|
|
2456
2456
|
// Default: 7 days
|
|
2457
2457
|
};
|
|
2458
2458
|
console.log("Identity request input:", L);
|
|
@@ -2467,7 +2467,7 @@ function ta(e) {
|
|
|
2467
2467
|
},
|
|
2468
2468
|
[e, t]
|
|
2469
2469
|
), b = ae(
|
|
2470
|
-
async (S,
|
|
2470
|
+
async (S, A) => {
|
|
2471
2471
|
if (e) {
|
|
2472
2472
|
l(!0), d(null);
|
|
2473
2473
|
try {
|
|
@@ -2475,7 +2475,7 @@ function ta(e) {
|
|
|
2475
2475
|
applicantId: e,
|
|
2476
2476
|
restart: !1,
|
|
2477
2477
|
redirectUrl: S,
|
|
2478
|
-
ttl:
|
|
2478
|
+
ttl: A
|
|
2479
2479
|
}, v = await t.identityCompanyRequest(L);
|
|
2480
2480
|
return n(v), v;
|
|
2481
2481
|
} catch (L) {
|
|
@@ -2502,8 +2502,8 @@ function ta(e) {
|
|
|
2502
2502
|
// 7 days
|
|
2503
2503
|
};
|
|
2504
2504
|
console.log("Restarting identity with input:", S);
|
|
2505
|
-
const
|
|
2506
|
-
return console.log("Restart identity result:",
|
|
2505
|
+
const A = await t.identityRequest(S);
|
|
2506
|
+
return console.log("Restart identity result:", A), n(A), A;
|
|
2507
2507
|
} catch (S) {
|
|
2508
2508
|
throw d(S), S;
|
|
2509
2509
|
} finally {
|
|
@@ -2523,7 +2523,7 @@ function ta(e) {
|
|
|
2523
2523
|
};
|
|
2524
2524
|
}
|
|
2525
2525
|
function ra(e) {
|
|
2526
|
-
const { riskScoringService: t, applicantService: a } = Le(), [n, i] = x(null), [l, c] = x({}), [d, y] = x(!1), [p, b] = x(!1), [F, S] = x(null), [
|
|
2526
|
+
const { riskScoringService: t, applicantService: a } = Le(), [n, i] = x(null), [l, c] = x({}), [d, y] = x(!1), [p, b] = x(!1), [F, S] = x(null), [A, L] = x(null), v = ce(!1), I = ce(null), B = ae(async () => {
|
|
2527
2527
|
var P;
|
|
2528
2528
|
if (e) {
|
|
2529
2529
|
if (v.current) {
|
|
@@ -2538,16 +2538,16 @@ function ra(e) {
|
|
|
2538
2538
|
]);
|
|
2539
2539
|
if (i(z), (P = Z == null ? void 0 : Z.riskScoringResults) != null && P.length) {
|
|
2540
2540
|
const ne = Z.riskScoringResults[0], R = {};
|
|
2541
|
-
for (const
|
|
2542
|
-
if (
|
|
2541
|
+
for (const k of ne.riskCriteriaResults ?? [])
|
|
2542
|
+
if (k.riskCriteriaId != null && k.answer != null && k.answer !== "") {
|
|
2543
2543
|
const $ = [...new Set(
|
|
2544
|
-
|
|
2544
|
+
k.answer.split(",").map((G) => G.trim()).filter((G) => G !== "")
|
|
2545
2545
|
)];
|
|
2546
|
-
$.length > 0 && (R[
|
|
2546
|
+
$.length > 0 && (R[k.riskCriteriaId] = $);
|
|
2547
2547
|
}
|
|
2548
2548
|
c(R);
|
|
2549
2549
|
}
|
|
2550
|
-
|
|
2550
|
+
I.current = e;
|
|
2551
2551
|
} catch (z) {
|
|
2552
2552
|
S(z);
|
|
2553
2553
|
} finally {
|
|
@@ -2556,7 +2556,7 @@ function ra(e) {
|
|
|
2556
2556
|
}
|
|
2557
2557
|
}, [e, t, a]);
|
|
2558
2558
|
fe(() => {
|
|
2559
|
-
e &&
|
|
2559
|
+
e && I.current !== e && B();
|
|
2560
2560
|
}, [e]);
|
|
2561
2561
|
const Y = ae(
|
|
2562
2562
|
async (P) => {
|
|
@@ -2575,7 +2575,7 @@ function ra(e) {
|
|
|
2575
2575
|
return {
|
|
2576
2576
|
criteria: n,
|
|
2577
2577
|
initialAnswers: l,
|
|
2578
|
-
result:
|
|
2578
|
+
result: A,
|
|
2579
2579
|
isLoading: d,
|
|
2580
2580
|
isSubmitting: p,
|
|
2581
2581
|
error: F,
|
|
@@ -2584,24 +2584,24 @@ function ra(e) {
|
|
|
2584
2584
|
};
|
|
2585
2585
|
}
|
|
2586
2586
|
function _t() {
|
|
2587
|
-
const { applicantService: e, config: t } = Le(), [a, n] = x(!1), [i, l] = x(null), c =
|
|
2587
|
+
const { applicantService: e, config: t } = Le(), [a, n] = x(!1), [i, l] = x(null), c = ce(!1), d = ce(!1), y = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(A) {
|
|
2588
2588
|
const L = Math.random() * 16 | 0;
|
|
2589
|
-
return (
|
|
2589
|
+
return (A === "x" ? L : L & 3 | 8).toString(16);
|
|
2590
2590
|
}), p = ae(
|
|
2591
|
-
async (
|
|
2591
|
+
async (A) => {
|
|
2592
2592
|
var L;
|
|
2593
2593
|
if (c.current)
|
|
2594
2594
|
throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
|
|
2595
2595
|
c.current = !0, n(!0), l(null);
|
|
2596
2596
|
try {
|
|
2597
|
-
if (
|
|
2598
|
-
const
|
|
2599
|
-
console.log("[SardinAI] Generated session key:",
|
|
2597
|
+
if (A.applicantAdditionalDatas || (A.applicantAdditionalDatas = []), (L = t.identityProviders) != null && L.sardinai) {
|
|
2598
|
+
const I = y();
|
|
2599
|
+
console.log("[SardinAI] Generated session key:", I), A.applicantAdditionalDatas.push({
|
|
2600
2600
|
paramName: "sessionKey",
|
|
2601
|
-
value:
|
|
2601
|
+
value: I
|
|
2602
2602
|
});
|
|
2603
2603
|
}
|
|
2604
|
-
return await e.createApplicant(
|
|
2604
|
+
return await e.createApplicant(A);
|
|
2605
2605
|
} catch (v) {
|
|
2606
2606
|
throw l(v), v;
|
|
2607
2607
|
} finally {
|
|
@@ -2610,10 +2610,10 @@ function _t() {
|
|
|
2610
2610
|
},
|
|
2611
2611
|
[e, t]
|
|
2612
2612
|
), b = ae(
|
|
2613
|
-
async (
|
|
2613
|
+
async (A) => {
|
|
2614
2614
|
n(!0), l(null);
|
|
2615
2615
|
try {
|
|
2616
|
-
return await e.createCompanyApplicant(
|
|
2616
|
+
return await e.createCompanyApplicant(A);
|
|
2617
2617
|
} catch (L) {
|
|
2618
2618
|
throw l(L), L;
|
|
2619
2619
|
} finally {
|
|
@@ -2622,12 +2622,12 @@ function _t() {
|
|
|
2622
2622
|
},
|
|
2623
2623
|
[e]
|
|
2624
2624
|
), F = ae(
|
|
2625
|
-
async (
|
|
2625
|
+
async (A) => {
|
|
2626
2626
|
if (d.current)
|
|
2627
2627
|
throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
|
|
2628
2628
|
d.current = !0, n(!0), l(null);
|
|
2629
2629
|
try {
|
|
2630
|
-
return await e.getApplicantData(
|
|
2630
|
+
return await e.getApplicantData(A);
|
|
2631
2631
|
} catch (L) {
|
|
2632
2632
|
throw l(L), L;
|
|
2633
2633
|
} finally {
|
|
@@ -2636,10 +2636,10 @@ function _t() {
|
|
|
2636
2636
|
},
|
|
2637
2637
|
[e]
|
|
2638
2638
|
), S = ae(
|
|
2639
|
-
async (
|
|
2639
|
+
async (A) => {
|
|
2640
2640
|
n(!0), l(null);
|
|
2641
2641
|
try {
|
|
2642
|
-
await e.stopProgress(
|
|
2642
|
+
await e.stopProgress(A);
|
|
2643
2643
|
} catch (L) {
|
|
2644
2644
|
throw l(L), L;
|
|
2645
2645
|
} finally {
|
|
@@ -3066,7 +3066,7 @@ const Tt = 280, oa = ({
|
|
|
3066
3066
|
readOnly: c = !1,
|
|
3067
3067
|
required: d = !1
|
|
3068
3068
|
}) => {
|
|
3069
|
-
const y = l || c, [p, b] = x(!1), [F, S] = x(""), [
|
|
3069
|
+
const y = l || c, [p, b] = x(!1), [F, S] = x(""), [A, L] = x(null), [v, I] = x({
|
|
3070
3070
|
bg: "#ffffff",
|
|
3071
3071
|
borderColor: "#d1d5db",
|
|
3072
3072
|
textPrimary: "#111827",
|
|
@@ -3074,13 +3074,13 @@ const Tt = 280, oa = ({
|
|
|
3074
3074
|
primaryColor: "#2563eb",
|
|
3075
3075
|
primaryLight: "#eff6ff",
|
|
3076
3076
|
hoverBg: "#f9fafb"
|
|
3077
|
-
}), B =
|
|
3077
|
+
}), B = ce(null), Y = ce(null), P = ce(null), z = ae(() => {
|
|
3078
3078
|
if (!Y.current) return null;
|
|
3079
|
-
const
|
|
3080
|
-
return { top: _ ?
|
|
3079
|
+
const T = Y.current.getBoundingClientRect(), _ = window.innerHeight - T.bottom < Tt && T.top > Tt;
|
|
3080
|
+
return { top: _ ? T.top : T.bottom + 4, left: T.left, width: T.width, openUp: _ };
|
|
3081
3081
|
}, []), Z = ae(() => {
|
|
3082
|
-
const
|
|
3083
|
-
|
|
3082
|
+
const T = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), U = (H, ge) => T.getPropertyValue(H).trim() || ge, _ = U("--metakyc-input-bg", U("--metakyc-background", "#ffffff"));
|
|
3083
|
+
I({
|
|
3084
3084
|
bg: _,
|
|
3085
3085
|
borderColor: U("--metakyc-input-border", U("--metakyc-border", "#d1d5db")),
|
|
3086
3086
|
textPrimary: U("--metakyc-input-text", U("--metakyc-text-primary", "#111827")),
|
|
@@ -3092,49 +3092,49 @@ const Tt = 280, oa = ({
|
|
|
3092
3092
|
}, []), ne = ae(() => {
|
|
3093
3093
|
if (y) return;
|
|
3094
3094
|
Z();
|
|
3095
|
-
const
|
|
3096
|
-
|
|
3095
|
+
const T = z();
|
|
3096
|
+
T && L(T), b(!0);
|
|
3097
3097
|
}, [y, z, Z]), R = ae(() => {
|
|
3098
3098
|
b(!1), S("");
|
|
3099
3099
|
}, []);
|
|
3100
3100
|
fe(() => {
|
|
3101
3101
|
if (!p) return;
|
|
3102
|
-
const
|
|
3102
|
+
const T = (U) => {
|
|
3103
3103
|
var H, ge;
|
|
3104
3104
|
const _ = U.target;
|
|
3105
3105
|
!((H = B.current) != null && H.contains(_)) && !((ge = P.current) != null && ge.contains(_)) && R();
|
|
3106
3106
|
};
|
|
3107
|
-
return document.addEventListener("mousedown",
|
|
3107
|
+
return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
|
|
3108
3108
|
}, [p, R]), fe(() => {
|
|
3109
3109
|
if (!p) return;
|
|
3110
|
-
const
|
|
3110
|
+
const T = () => {
|
|
3111
3111
|
const U = z();
|
|
3112
3112
|
U && L(U);
|
|
3113
3113
|
};
|
|
3114
|
-
return window.addEventListener("scroll",
|
|
3115
|
-
window.removeEventListener("scroll",
|
|
3114
|
+
return window.addEventListener("scroll", T, !0), window.addEventListener("resize", T), () => {
|
|
3115
|
+
window.removeEventListener("scroll", T, !0), window.removeEventListener("resize", T);
|
|
3116
3116
|
};
|
|
3117
3117
|
}, [p, z]);
|
|
3118
|
-
const
|
|
3119
|
-
(
|
|
3120
|
-
), $ = (
|
|
3121
|
-
y || a(t.includes(
|
|
3122
|
-
}, G = (
|
|
3123
|
-
U.stopPropagation(), y || a(t.filter((_) => _ !==
|
|
3124
|
-
}, V = (
|
|
3118
|
+
const k = n.filter(
|
|
3119
|
+
(T) => T.label.toLowerCase().includes(F.toLowerCase())
|
|
3120
|
+
), $ = (T) => {
|
|
3121
|
+
y || a(t.includes(T) ? t.filter((U) => U !== T) : [...t, T]);
|
|
3122
|
+
}, G = (T, U) => {
|
|
3123
|
+
U.stopPropagation(), y || a(t.filter((_) => _ !== T));
|
|
3124
|
+
}, V = (T) => {
|
|
3125
3125
|
var U;
|
|
3126
|
-
return ((U = n.find((_) => _.value ===
|
|
3127
|
-
}, { bg: j, borderColor: Q, textPrimary: ie, textSecondary: q, primaryColor: ve, primaryLight:
|
|
3126
|
+
return ((U = n.find((_) => _.value === T)) == null ? void 0 : U.label) || T;
|
|
3127
|
+
}, { bg: j, borderColor: Q, textPrimary: ie, textSecondary: q, primaryColor: ve, primaryLight: de, hoverBg: ue } = v, xe = p && A && /* @__PURE__ */ o(
|
|
3128
3128
|
"div",
|
|
3129
3129
|
{
|
|
3130
3130
|
ref: P,
|
|
3131
3131
|
className: "metakyc-multiselect-dropdown",
|
|
3132
3132
|
style: {
|
|
3133
3133
|
position: "fixed",
|
|
3134
|
-
top:
|
|
3135
|
-
bottom:
|
|
3136
|
-
left:
|
|
3137
|
-
width:
|
|
3134
|
+
top: A.openUp ? void 0 : A.top,
|
|
3135
|
+
bottom: A.openUp ? window.innerHeight - A.top + 4 : void 0,
|
|
3136
|
+
left: A.left,
|
|
3137
|
+
width: A.width,
|
|
3138
3138
|
zIndex: 99999,
|
|
3139
3139
|
borderRadius: "8px",
|
|
3140
3140
|
boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
|
|
@@ -3148,10 +3148,10 @@ const Tt = 280, oa = ({
|
|
|
3148
3148
|
{
|
|
3149
3149
|
type: "text",
|
|
3150
3150
|
value: F,
|
|
3151
|
-
onChange: (
|
|
3151
|
+
onChange: (T) => S(T.target.value),
|
|
3152
3152
|
placeholder: "Search...",
|
|
3153
3153
|
autoFocus: !0,
|
|
3154
|
-
onClick: (
|
|
3154
|
+
onClick: (T) => T.stopPropagation(),
|
|
3155
3155
|
className: "metakyc-multiselect-search w-full",
|
|
3156
3156
|
style: {
|
|
3157
3157
|
display: "block",
|
|
@@ -3165,21 +3165,21 @@ const Tt = 280, oa = ({
|
|
|
3165
3165
|
outline: "none",
|
|
3166
3166
|
boxSizing: "border-box"
|
|
3167
3167
|
},
|
|
3168
|
-
onFocus: (
|
|
3168
|
+
onFocus: (T) => {
|
|
3169
3169
|
const U = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), _ = U.getPropertyValue("--metakyc-input-border-focus").trim() || U.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
|
|
3170
|
-
|
|
3170
|
+
T.currentTarget.style.backgroundColor = j, T.currentTarget.style.color = ie, T.currentTarget.style.borderColor = _, T.currentTarget.style.outline = "none", T.currentTarget.style.boxShadow = `0 0 0 2px ${_}33`;
|
|
3171
3171
|
},
|
|
3172
|
-
onBlur: (
|
|
3173
|
-
|
|
3172
|
+
onBlur: (T) => {
|
|
3173
|
+
T.currentTarget.style.backgroundColor = j, T.currentTarget.style.color = ie, T.currentTarget.style.borderColor = Q, T.currentTarget.style.outline = "none", T.currentTarget.style.boxShadow = "none";
|
|
3174
3174
|
}
|
|
3175
3175
|
}
|
|
3176
3176
|
) }),
|
|
3177
|
-
/* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children:
|
|
3178
|
-
const U = t.includes(
|
|
3177
|
+
/* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: k.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: q }, children: "No results" }) : k.map((T) => {
|
|
3178
|
+
const U = t.includes(T.value);
|
|
3179
3179
|
return /* @__PURE__ */ o(
|
|
3180
3180
|
"li",
|
|
3181
3181
|
{
|
|
3182
|
-
onClick: () => $(
|
|
3182
|
+
onClick: () => $(T.value),
|
|
3183
3183
|
className: "metakyc-multiselect-option",
|
|
3184
3184
|
style: {
|
|
3185
3185
|
display: "flex",
|
|
@@ -3188,7 +3188,7 @@ const Tt = 280, oa = ({
|
|
|
3188
3188
|
padding: "8px 12px",
|
|
3189
3189
|
fontSize: "13px",
|
|
3190
3190
|
cursor: "pointer",
|
|
3191
|
-
backgroundColor: U ?
|
|
3191
|
+
backgroundColor: U ? de : "transparent",
|
|
3192
3192
|
color: U ? ve : ie,
|
|
3193
3193
|
userSelect: "none"
|
|
3194
3194
|
},
|
|
@@ -3207,10 +3207,10 @@ const Tt = 280, oa = ({
|
|
|
3207
3207
|
}
|
|
3208
3208
|
}
|
|
3209
3209
|
),
|
|
3210
|
-
/* @__PURE__ */ r("span", { children:
|
|
3210
|
+
/* @__PURE__ */ r("span", { children: T.label })
|
|
3211
3211
|
]
|
|
3212
3212
|
},
|
|
3213
|
-
|
|
3213
|
+
T.value
|
|
3214
3214
|
);
|
|
3215
3215
|
}) }),
|
|
3216
3216
|
t.length > 0 && /* @__PURE__ */ r("div", { style: { padding: "6px 12px", borderTop: `1px solid ${Q}` }, children: /* @__PURE__ */ o(
|
|
@@ -3268,7 +3268,7 @@ const Tt = 280, oa = ({
|
|
|
3268
3268
|
style: { color: "var(--metakyc-text-secondary, #9ca3af)" },
|
|
3269
3269
|
children: i
|
|
3270
3270
|
}
|
|
3271
|
-
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((
|
|
3271
|
+
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((T) => /* @__PURE__ */ o(
|
|
3272
3272
|
"span",
|
|
3273
3273
|
{
|
|
3274
3274
|
className: "metakyc-multiselect-chip inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium",
|
|
@@ -3277,12 +3277,12 @@ const Tt = 280, oa = ({
|
|
|
3277
3277
|
color: "var(--metakyc-primary, #2563eb)"
|
|
3278
3278
|
},
|
|
3279
3279
|
children: [
|
|
3280
|
-
V(
|
|
3280
|
+
V(T),
|
|
3281
3281
|
!y && /* @__PURE__ */ r(
|
|
3282
3282
|
"button",
|
|
3283
3283
|
{
|
|
3284
3284
|
type: "button",
|
|
3285
|
-
onClick: (U) => G(
|
|
3285
|
+
onClick: (U) => G(T, U),
|
|
3286
3286
|
className: "metakyc-multiselect-chip-remove",
|
|
3287
3287
|
style: {
|
|
3288
3288
|
background: "transparent",
|
|
@@ -3308,7 +3308,7 @@ const Tt = 280, oa = ({
|
|
|
3308
3308
|
)
|
|
3309
3309
|
]
|
|
3310
3310
|
},
|
|
3311
|
-
|
|
3311
|
+
T
|
|
3312
3312
|
)) }),
|
|
3313
3313
|
/* @__PURE__ */ r(
|
|
3314
3314
|
"span",
|
|
@@ -3337,7 +3337,7 @@ const Tt = 280, oa = ({
|
|
|
3337
3337
|
className: b
|
|
3338
3338
|
}) => {
|
|
3339
3339
|
var ge;
|
|
3340
|
-
const F = d || y, [S,
|
|
3340
|
+
const F = d || y, [S, A] = x(!1), [L, v] = x(""), [I, B] = x(null), [Y, P] = x({
|
|
3341
3341
|
bg: "#ffffff",
|
|
3342
3342
|
border: "#d1d5db",
|
|
3343
3343
|
text: "#111827",
|
|
@@ -3356,7 +3356,7 @@ const Tt = 280, oa = ({
|
|
|
3356
3356
|
primaryLight: ee("--metakyc-primary-light", "#eff6ff"),
|
|
3357
3357
|
hoverBg: ee("--metakyc-surface", ye)
|
|
3358
3358
|
});
|
|
3359
|
-
}, []), Z =
|
|
3359
|
+
}, []), Z = ce(null), ne = ce(null), R = ce(null), k = ce(null), $ = ae(() => {
|
|
3360
3360
|
if (!ne.current) return null;
|
|
3361
3361
|
const E = ne.current.getBoundingClientRect(), ye = window.innerHeight - E.bottom < Lt && E.top > Lt;
|
|
3362
3362
|
return {
|
|
@@ -3369,9 +3369,9 @@ const Tt = 280, oa = ({
|
|
|
3369
3369
|
if (F) return;
|
|
3370
3370
|
z();
|
|
3371
3371
|
const E = $();
|
|
3372
|
-
E && B(E),
|
|
3372
|
+
E && B(E), A(!0);
|
|
3373
3373
|
}, [F, $, z]), V = ae(() => {
|
|
3374
|
-
|
|
3374
|
+
A(!1), v("");
|
|
3375
3375
|
}, []), j = () => S ? V() : G();
|
|
3376
3376
|
fe(() => {
|
|
3377
3377
|
if (!S) return;
|
|
@@ -3391,38 +3391,38 @@ const Tt = 280, oa = ({
|
|
|
3391
3391
|
window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E);
|
|
3392
3392
|
};
|
|
3393
3393
|
}, [S, $]), fe(() => {
|
|
3394
|
-
S &&
|
|
3394
|
+
S && k.current && setTimeout(() => {
|
|
3395
3395
|
var E;
|
|
3396
|
-
return (E =
|
|
3396
|
+
return (E = k.current) == null ? void 0 : E.focus();
|
|
3397
3397
|
}, 0);
|
|
3398
3398
|
}, [S]);
|
|
3399
3399
|
const Q = n.filter(
|
|
3400
3400
|
(E) => E.label.toLowerCase().includes(L.toLowerCase()) || E.value.toLowerCase().includes(L.toLowerCase())
|
|
3401
3401
|
), ie = (ge = n.find((E) => E.value === l)) == null ? void 0 : ge.label, q = (E, ee) => {
|
|
3402
3402
|
F || ee || (c(E), V());
|
|
3403
|
-
}, { bg: ve, border:
|
|
3403
|
+
}, { bg: ve, border: de, text: ue, textSecondary: xe, primary: T, primaryLight: U, hoverBg: _ } = Y, H = S && I && /* @__PURE__ */ o(
|
|
3404
3404
|
"div",
|
|
3405
3405
|
{
|
|
3406
3406
|
ref: R,
|
|
3407
3407
|
className: "metakyc-searchable-select-dropdown",
|
|
3408
3408
|
style: {
|
|
3409
3409
|
position: "fixed",
|
|
3410
|
-
top:
|
|
3411
|
-
bottom:
|
|
3412
|
-
left:
|
|
3413
|
-
width:
|
|
3410
|
+
top: I.openUp ? void 0 : I.top,
|
|
3411
|
+
bottom: I.openUp ? window.innerHeight - I.top + 4 : void 0,
|
|
3412
|
+
left: I.left,
|
|
3413
|
+
width: I.width,
|
|
3414
3414
|
zIndex: 99999,
|
|
3415
3415
|
borderRadius: "8px",
|
|
3416
3416
|
boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
|
|
3417
|
-
border: `1px solid ${
|
|
3417
|
+
border: `1px solid ${de}`,
|
|
3418
3418
|
backgroundColor: ve,
|
|
3419
3419
|
overflow: "hidden"
|
|
3420
3420
|
},
|
|
3421
3421
|
children: [
|
|
3422
|
-
/* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${
|
|
3422
|
+
/* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${de}` }, children: /* @__PURE__ */ r(
|
|
3423
3423
|
"input",
|
|
3424
3424
|
{
|
|
3425
|
-
ref:
|
|
3425
|
+
ref: k,
|
|
3426
3426
|
type: "text",
|
|
3427
3427
|
value: L,
|
|
3428
3428
|
onChange: (E) => v(E.target.value),
|
|
@@ -3435,7 +3435,7 @@ const Tt = 280, oa = ({
|
|
|
3435
3435
|
padding: "6px 8px",
|
|
3436
3436
|
fontSize: "13px",
|
|
3437
3437
|
borderRadius: "6px",
|
|
3438
|
-
border: `1px solid ${
|
|
3438
|
+
border: `1px solid ${de}`,
|
|
3439
3439
|
backgroundColor: ve,
|
|
3440
3440
|
color: ue,
|
|
3441
3441
|
outline: "none",
|
|
@@ -3446,7 +3446,7 @@ const Tt = 280, oa = ({
|
|
|
3446
3446
|
E.currentTarget.style.backgroundColor = ve, E.currentTarget.style.color = ue, E.currentTarget.style.borderColor = ye, E.currentTarget.style.outline = "none", E.currentTarget.style.boxShadow = `0 0 0 2px ${ye}33`;
|
|
3447
3447
|
},
|
|
3448
3448
|
onBlur: (E) => {
|
|
3449
|
-
E.currentTarget.style.backgroundColor = ve, E.currentTarget.style.color = ue, E.currentTarget.style.borderColor =
|
|
3449
|
+
E.currentTarget.style.backgroundColor = ve, E.currentTarget.style.color = ue, E.currentTarget.style.borderColor = de, E.currentTarget.style.outline = "none", E.currentTarget.style.boxShadow = "none";
|
|
3450
3450
|
}
|
|
3451
3451
|
}
|
|
3452
3452
|
) }),
|
|
@@ -3473,7 +3473,7 @@ const Tt = 280, oa = ({
|
|
|
3473
3473
|
cursor: E.disabled ? "not-allowed" : "pointer",
|
|
3474
3474
|
opacity: E.disabled ? 0.4 : 1,
|
|
3475
3475
|
backgroundColor: ee ? U : "transparent",
|
|
3476
|
-
color: ee ?
|
|
3476
|
+
color: ee ? T : ue,
|
|
3477
3477
|
userSelect: "none"
|
|
3478
3478
|
},
|
|
3479
3479
|
onMouseEnter: (ye) => {
|
|
@@ -3571,16 +3571,16 @@ const la = ({
|
|
|
3571
3571
|
value: y = [],
|
|
3572
3572
|
className: p
|
|
3573
3573
|
}) => {
|
|
3574
|
-
const [b, F] = x(!1), [S,
|
|
3574
|
+
const [b, F] = x(!1), [S, A] = x(null), L = ce(null), v = ae((R) => {
|
|
3575
3575
|
if (!R) return;
|
|
3576
|
-
|
|
3577
|
-
const
|
|
3578
|
-
if (l &&
|
|
3579
|
-
|
|
3576
|
+
A(null);
|
|
3577
|
+
const k = Array.from(R);
|
|
3578
|
+
if (l && k.filter((G) => G.size > l).length > 0) {
|
|
3579
|
+
A(`File exceeds the maximum size of ${xt(l)}`);
|
|
3580
3580
|
return;
|
|
3581
3581
|
}
|
|
3582
|
-
d == null || d(i ? [...y, ...
|
|
3583
|
-
}, [l, i, d, y]),
|
|
3582
|
+
d == null || d(i ? [...y, ...k] : [k[0]]);
|
|
3583
|
+
}, [l, i, d, y]), I = ae((R) => {
|
|
3584
3584
|
R.preventDefault(), R.stopPropagation(), F(!0);
|
|
3585
3585
|
}, []), B = ae((R) => {
|
|
3586
3586
|
R.preventDefault(), R.stopPropagation(), F(!1);
|
|
@@ -3590,9 +3590,9 @@ const la = ({
|
|
|
3590
3590
|
var R;
|
|
3591
3591
|
(R = L.current) == null || R.click();
|
|
3592
3592
|
}, z = (R) => {
|
|
3593
|
-
|
|
3594
|
-
const
|
|
3595
|
-
d == null || d(
|
|
3593
|
+
A(null);
|
|
3594
|
+
const k = y.filter(($, G) => G !== R);
|
|
3595
|
+
d == null || d(k);
|
|
3596
3596
|
}, Z = a || S, ne = y.length > 0;
|
|
3597
3597
|
return /* @__PURE__ */ o("div", { className: Te("metakyc-file-upload", p), style: { width: "100%" }, children: [
|
|
3598
3598
|
e && /* @__PURE__ */ o("div", { style: { marginBottom: "8px" }, children: [
|
|
@@ -3618,7 +3618,7 @@ const la = ({
|
|
|
3618
3618
|
{
|
|
3619
3619
|
className: "metakyc-file-dropzone",
|
|
3620
3620
|
onClick: P,
|
|
3621
|
-
onDragOver:
|
|
3621
|
+
onDragOver: I,
|
|
3622
3622
|
onDragLeave: B,
|
|
3623
3623
|
onDrop: Y,
|
|
3624
3624
|
style: {
|
|
@@ -3698,7 +3698,7 @@ const la = ({
|
|
|
3698
3698
|
]
|
|
3699
3699
|
}
|
|
3700
3700
|
),
|
|
3701
|
-
ne && /* @__PURE__ */ r("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: y.map((R,
|
|
3701
|
+
ne && /* @__PURE__ */ r("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: y.map((R, k) => {
|
|
3702
3702
|
const $ = sa(R), G = $ === "image", V = G ? URL.createObjectURL(R) : null;
|
|
3703
3703
|
return /* @__PURE__ */ o(
|
|
3704
3704
|
"div",
|
|
@@ -3765,7 +3765,7 @@ const la = ({
|
|
|
3765
3765
|
{
|
|
3766
3766
|
type: "button",
|
|
3767
3767
|
onClick: (j) => {
|
|
3768
|
-
j.stopPropagation(), z(
|
|
3768
|
+
j.stopPropagation(), z(k);
|
|
3769
3769
|
},
|
|
3770
3770
|
style: {
|
|
3771
3771
|
display: "flex",
|
|
@@ -3796,7 +3796,7 @@ const la = ({
|
|
|
3796
3796
|
)
|
|
3797
3797
|
]
|
|
3798
3798
|
},
|
|
3799
|
-
`${R.name}-${
|
|
3799
|
+
`${R.name}-${k}`
|
|
3800
3800
|
);
|
|
3801
3801
|
}) }),
|
|
3802
3802
|
Z && /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", marginTop: "6px" }, children: Z })
|
|
@@ -4026,29 +4026,29 @@ const ba = ({
|
|
|
4026
4026
|
onComplete: t,
|
|
4027
4027
|
onBack: a
|
|
4028
4028
|
}) => {
|
|
4029
|
-
const { questionnaire: n, initialAnswers: i, isLoading: l, isSubmitting: c, error: d, submit: y } = Xr(e), [p, b] = x({}), [F, S] = x({}), [
|
|
4029
|
+
const { questionnaire: n, initialAnswers: i, isLoading: l, isSubmitting: c, error: d, submit: y } = Xr(e), [p, b] = x({}), [F, S] = x({}), [A, L] = x(0);
|
|
4030
4030
|
we.useEffect(() => {
|
|
4031
4031
|
i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && b(i);
|
|
4032
4032
|
}, [i]);
|
|
4033
4033
|
const v = De(
|
|
4034
4034
|
() => n ? ka(n.questionGroups) : [],
|
|
4035
4035
|
[n]
|
|
4036
|
-
),
|
|
4037
|
-
b(($) => ({ ...$, [R]:
|
|
4036
|
+
), I = A === v.length - 1, B = v[A] ?? [], Y = ae((R, k) => {
|
|
4037
|
+
b(($) => ({ ...$, [R]: k })), S(($) => {
|
|
4038
4038
|
const G = { ...$ };
|
|
4039
4039
|
return delete G[R], G;
|
|
4040
4040
|
});
|
|
4041
4041
|
}, []), P = ae(() => {
|
|
4042
4042
|
const R = {};
|
|
4043
|
-
for (const { question:
|
|
4044
|
-
const $ = fa(
|
|
4045
|
-
$ && (R[
|
|
4043
|
+
for (const { question: k } of B) {
|
|
4044
|
+
const $ = fa(k, p[k.id] ?? []);
|
|
4045
|
+
$ && (R[k.id] = $);
|
|
4046
4046
|
}
|
|
4047
|
-
return S((
|
|
4047
|
+
return S((k) => ({ ...k, ...R })), Object.keys(R).length === 0;
|
|
4048
4048
|
}, [B, p]), z = () => {
|
|
4049
4049
|
P() && L((R) => R + 1);
|
|
4050
4050
|
}, Z = () => {
|
|
4051
|
-
|
|
4051
|
+
A > 0 ? L((R) => R - 1) : a == null || a();
|
|
4052
4052
|
}, ne = async () => {
|
|
4053
4053
|
if (!(!P() || !n))
|
|
4054
4054
|
try {
|
|
@@ -4057,12 +4057,12 @@ const ba = ({
|
|
|
4057
4057
|
questionId: G.id,
|
|
4058
4058
|
values: p[G.id] ?? []
|
|
4059
4059
|
}))
|
|
4060
|
-
),
|
|
4060
|
+
), k = {
|
|
4061
4061
|
applicantId: e,
|
|
4062
4062
|
questionnarieId: n.id,
|
|
4063
4063
|
questionResults: R
|
|
4064
4064
|
};
|
|
4065
|
-
await y(
|
|
4065
|
+
await y(k), t == null || t();
|
|
4066
4066
|
} catch (R) {
|
|
4067
4067
|
console.error("Questionnaire submit error:", R);
|
|
4068
4068
|
}
|
|
@@ -4077,21 +4077,21 @@ const ba = ({
|
|
|
4077
4077
|
v.length > 1 && /* @__PURE__ */ o("div", { className: "flex items-center justify-between mt-3", children: [
|
|
4078
4078
|
/* @__PURE__ */ o("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
4079
4079
|
"Page ",
|
|
4080
|
-
|
|
4080
|
+
A + 1,
|
|
4081
4081
|
" of ",
|
|
4082
4082
|
v.length
|
|
4083
4083
|
] }),
|
|
4084
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: v.map((R,
|
|
4084
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: v.map((R, k) => /* @__PURE__ */ r(
|
|
4085
4085
|
"div",
|
|
4086
4086
|
{
|
|
4087
4087
|
className: "rounded-full transition-all duration-200",
|
|
4088
4088
|
style: {
|
|
4089
4089
|
height: "6px",
|
|
4090
|
-
width:
|
|
4091
|
-
backgroundColor:
|
|
4090
|
+
width: k === A ? "20px" : "6px",
|
|
4091
|
+
backgroundColor: k <= A ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
4092
4092
|
}
|
|
4093
4093
|
},
|
|
4094
|
-
|
|
4094
|
+
k
|
|
4095
4095
|
)) })
|
|
4096
4096
|
] })
|
|
4097
4097
|
] }),
|
|
@@ -4101,7 +4101,7 @@ const ba = ({
|
|
|
4101
4101
|
question: R,
|
|
4102
4102
|
value: p[R.id] ?? [],
|
|
4103
4103
|
error: F[R.id],
|
|
4104
|
-
onChange: (
|
|
4104
|
+
onChange: (k) => Y(R.id, k)
|
|
4105
4105
|
},
|
|
4106
4106
|
R.id
|
|
4107
4107
|
)) }),
|
|
@@ -4115,11 +4115,11 @@ const ba = ({
|
|
|
4115
4115
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
4116
4116
|
children: [
|
|
4117
4117
|
/* @__PURE__ */ r(Ut, { size: 14 }),
|
|
4118
|
-
|
|
4118
|
+
A > 0 ? "Previous" : "Back"
|
|
4119
4119
|
]
|
|
4120
4120
|
}
|
|
4121
4121
|
),
|
|
4122
|
-
|
|
4122
|
+
I ? /* @__PURE__ */ r(
|
|
4123
4123
|
J,
|
|
4124
4124
|
{
|
|
4125
4125
|
type: "button",
|
|
@@ -4248,23 +4248,23 @@ const wa = ({
|
|
|
4248
4248
|
onComplete: t,
|
|
4249
4249
|
onBack: a
|
|
4250
4250
|
}) => {
|
|
4251
|
-
const { uploadDocument: n, isLoading: i, isSubmitting: l, error: c, submit: d } = Zr(e), [y, p] = x({}), [b, F] = x(null), [S,
|
|
4251
|
+
const { uploadDocument: n, isLoading: i, isSubmitting: l, error: c, submit: d } = Zr(e), [y, p] = x({}), [b, F] = x(null), [S, A] = x(0), [L, v] = x({}), I = De(
|
|
4252
4252
|
() => n ? va(n.uploadDocumentFiles) : [],
|
|
4253
4253
|
[n]
|
|
4254
|
-
), B =
|
|
4255
|
-
const
|
|
4254
|
+
), B = I[S] ?? [], Y = S === I.length - 1, P = I.length, z = ae(() => {
|
|
4255
|
+
const k = {};
|
|
4256
4256
|
for (const $ of B)
|
|
4257
|
-
$.isRequired && (y[$.id] || []).length === 0 && (
|
|
4258
|
-
return v(
|
|
4257
|
+
$.isRequired && (y[$.id] || []).length === 0 && (k[$.id] = `${$.displayName} is required`);
|
|
4258
|
+
return v(k), Object.keys(k).length === 0;
|
|
4259
4259
|
}, [B, y]), Z = () => {
|
|
4260
|
-
z() && (
|
|
4260
|
+
z() && (A((k) => k + 1), v({}));
|
|
4261
4261
|
}, ne = () => {
|
|
4262
|
-
S > 0 ? (
|
|
4262
|
+
S > 0 ? (A((k) => k - 1), v({})) : a == null || a();
|
|
4263
4263
|
}, R = async () => {
|
|
4264
4264
|
if (!(!z() || !n)) {
|
|
4265
4265
|
F(null);
|
|
4266
4266
|
try {
|
|
4267
|
-
const
|
|
4267
|
+
const k = await Promise.all(
|
|
4268
4268
|
n.uploadDocumentFiles.map(async (G) => {
|
|
4269
4269
|
const V = y[G.id] || [], j = await Promise.all(
|
|
4270
4270
|
V.map(async (Q) => ({
|
|
@@ -4280,11 +4280,11 @@ const wa = ({
|
|
|
4280
4280
|
), $ = {
|
|
4281
4281
|
applicantId: e,
|
|
4282
4282
|
uploadDocumentId: n.id,
|
|
4283
|
-
uploadDocumentResults:
|
|
4283
|
+
uploadDocumentResults: k
|
|
4284
4284
|
};
|
|
4285
4285
|
await d($), t == null || t();
|
|
4286
|
-
} catch (
|
|
4287
|
-
F((
|
|
4286
|
+
} catch (k) {
|
|
4287
|
+
F((k == null ? void 0 : k.message) || "Failed to submit documents. Please try again.");
|
|
4288
4288
|
}
|
|
4289
4289
|
}
|
|
4290
4290
|
};
|
|
@@ -4339,7 +4339,7 @@ const wa = ({
|
|
|
4339
4339
|
" of ",
|
|
4340
4340
|
P
|
|
4341
4341
|
] }),
|
|
4342
|
-
/* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children:
|
|
4342
|
+
/* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: I.map((k, $) => /* @__PURE__ */ r(
|
|
4343
4343
|
"div",
|
|
4344
4344
|
{
|
|
4345
4345
|
style: {
|
|
@@ -4390,25 +4390,25 @@ const wa = ({
|
|
|
4390
4390
|
lineHeight: 1.5
|
|
4391
4391
|
}, children: n.description })
|
|
4392
4392
|
] }),
|
|
4393
|
-
/* @__PURE__ */ r(re, { children: /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: B.map((
|
|
4393
|
+
/* @__PURE__ */ r(re, { children: /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: B.map((k) => /* @__PURE__ */ r(
|
|
4394
4394
|
la,
|
|
4395
4395
|
{
|
|
4396
|
-
label:
|
|
4397
|
-
subtitle:
|
|
4398
|
-
accept:
|
|
4399
|
-
multiple:
|
|
4400
|
-
maxSize:
|
|
4401
|
-
required:
|
|
4402
|
-
error: L[
|
|
4403
|
-
value: y[
|
|
4396
|
+
label: k.displayName,
|
|
4397
|
+
subtitle: k.subtitle,
|
|
4398
|
+
accept: k.allowedTypes,
|
|
4399
|
+
multiple: k.multipleFile,
|
|
4400
|
+
maxSize: k.maxEachFileSizeByte,
|
|
4401
|
+
required: k.isRequired,
|
|
4402
|
+
error: L[k.id],
|
|
4403
|
+
value: y[k.id] || [],
|
|
4404
4404
|
onChange: ($) => {
|
|
4405
4405
|
F(null), v((G) => {
|
|
4406
4406
|
const V = { ...G };
|
|
4407
|
-
return delete V[
|
|
4408
|
-
}), p((G) => ({ ...G, [
|
|
4407
|
+
return delete V[k.id], V;
|
|
4408
|
+
}), p((G) => ({ ...G, [k.id]: $ }));
|
|
4409
4409
|
}
|
|
4410
4410
|
},
|
|
4411
|
-
|
|
4411
|
+
k.id
|
|
4412
4412
|
)) }) }),
|
|
4413
4413
|
b && /* @__PURE__ */ o("div", { style: {
|
|
4414
4414
|
margin: "0 24px",
|
|
@@ -4570,7 +4570,7 @@ const Aa = ({
|
|
|
4570
4570
|
onComplete: t,
|
|
4571
4571
|
onBack: a
|
|
4572
4572
|
}) => {
|
|
4573
|
-
const { config: n } = Le(), i = n.locale ?? "en", { criteria: l, initialAnswers: c, isLoading: d, isSubmitting: y, error: p, submit: b } = ra(e), [F, S] = x({}), [
|
|
4573
|
+
const { config: n } = Le(), i = n.locale ?? "en", { criteria: l, initialAnswers: c, isLoading: d, isSubmitting: y, error: p, submit: b } = ra(e), [F, S] = x({}), [A, L] = x({}), [v, I] = x(0), [B, Y] = x(!1);
|
|
4574
4574
|
we.useEffect(() => {
|
|
4575
4575
|
c && Object.keys(c).length > 0 && Object.keys(F).length === 0 && S(c);
|
|
4576
4576
|
}, [c]);
|
|
@@ -4593,10 +4593,10 @@ const Aa = ({
|
|
|
4593
4593
|
Q && (V[j.id] = Q);
|
|
4594
4594
|
}
|
|
4595
4595
|
return L((j) => ({ ...j, ...V })), Object.keys(V).length === 0;
|
|
4596
|
-
}, [Z, F]),
|
|
4597
|
-
R() &&
|
|
4596
|
+
}, [Z, F]), k = () => {
|
|
4597
|
+
R() && I((V) => V + 1);
|
|
4598
4598
|
}, $ = () => {
|
|
4599
|
-
v > 0 ?
|
|
4599
|
+
v > 0 ? I((V) => V - 1) : a == null || a();
|
|
4600
4600
|
}, G = async () => {
|
|
4601
4601
|
if (!(!R() || !l))
|
|
4602
4602
|
try {
|
|
@@ -4648,7 +4648,7 @@ const Aa = ({
|
|
|
4648
4648
|
{
|
|
4649
4649
|
criterion: V,
|
|
4650
4650
|
value: F[V.id] ?? [],
|
|
4651
|
-
error:
|
|
4651
|
+
error: A[V.id],
|
|
4652
4652
|
locale: i,
|
|
4653
4653
|
onChange: (j) => ne(V.id, j)
|
|
4654
4654
|
},
|
|
@@ -4672,7 +4672,7 @@ const Aa = ({
|
|
|
4672
4672
|
J,
|
|
4673
4673
|
{
|
|
4674
4674
|
type: "button",
|
|
4675
|
-
onClick:
|
|
4675
|
+
onClick: k,
|
|
4676
4676
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
4677
4677
|
children: [
|
|
4678
4678
|
"Next",
|
|
@@ -4803,8 +4803,8 @@ const Aa = ({
|
|
|
4803
4803
|
investorType: i
|
|
4804
4804
|
};
|
|
4805
4805
|
console.log("Submitting investor categorization:", S);
|
|
4806
|
-
const
|
|
4807
|
-
console.log("Investor categorization result:",
|
|
4806
|
+
const A = await n.setInvestorCategorization(S);
|
|
4807
|
+
console.log("Investor categorization result:", A), t == null || t();
|
|
4808
4808
|
} catch (S) {
|
|
4809
4809
|
console.error("Error submitting investor categorization:", S), p(S.message || "Failed to submit investor categorization");
|
|
4810
4810
|
} finally {
|
|
@@ -4940,7 +4940,7 @@ const Pa = ({
|
|
|
4940
4940
|
onComplete: t,
|
|
4941
4941
|
onBack: a
|
|
4942
4942
|
}) => {
|
|
4943
|
-
const { appropriatenessTestService: n } = Le(), [i, l] = x(null), [c, d] = x(!0), [y, p] = x(!1), [b, F] = x(null), [S,
|
|
4943
|
+
const { appropriatenessTestService: n } = Le(), [i, l] = x(null), [c, d] = x(!0), [y, p] = x(!1), [b, F] = x(null), [S, A] = x({}), [L, v] = x(0), [I, B] = x(!1), [Y, P] = x(!1), [z, Z] = x(0), [ne, R] = x(0), [k, $] = x(null);
|
|
4944
4944
|
fe(() => {
|
|
4945
4945
|
(async () => {
|
|
4946
4946
|
try {
|
|
@@ -4957,12 +4957,12 @@ const Pa = ({
|
|
|
4957
4957
|
}
|
|
4958
4958
|
})();
|
|
4959
4959
|
}, [e, n]), fe(() => {
|
|
4960
|
-
if (!
|
|
4960
|
+
if (!I || L <= 0) return;
|
|
4961
4961
|
const _ = setInterval(() => {
|
|
4962
4962
|
v((H) => H <= 1 ? (P(!0), 0) : H - 1);
|
|
4963
4963
|
}, 1e3);
|
|
4964
4964
|
return () => clearInterval(_);
|
|
4965
|
-
}, [
|
|
4965
|
+
}, [I, L]), fe(() => {
|
|
4966
4966
|
if (z <= 0) return;
|
|
4967
4967
|
const _ = setInterval(() => {
|
|
4968
4968
|
Z((H) => H <= 1 ? 0 : H - 1);
|
|
@@ -4972,9 +4972,9 @@ const Pa = ({
|
|
|
4972
4972
|
Y && !y && Q();
|
|
4973
4973
|
}, [Y]);
|
|
4974
4974
|
const G = () => {
|
|
4975
|
-
i && (B(!0), v(i.testDurationSec), R(0),
|
|
4975
|
+
i && (B(!0), v(i.testDurationSec), R(0), A({}), F(null));
|
|
4976
4976
|
}, V = (_, H) => {
|
|
4977
|
-
|
|
4977
|
+
A((ge) => ({ ...ge, [_]: H }));
|
|
4978
4978
|
}, j = ae(async () => {
|
|
4979
4979
|
try {
|
|
4980
4980
|
const _ = await n.getAppropriatenessTest(e);
|
|
@@ -5018,7 +5018,7 @@ const Pa = ({
|
|
|
5018
5018
|
}
|
|
5019
5019
|
}
|
|
5020
5020
|
}, ie = () => {
|
|
5021
|
-
B(!1), P(!1),
|
|
5021
|
+
B(!1), P(!1), A({}), R(0);
|
|
5022
5022
|
};
|
|
5023
5023
|
if (c)
|
|
5024
5024
|
return /* @__PURE__ */ r(te, { children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
|
|
@@ -5030,7 +5030,7 @@ const Pa = ({
|
|
|
5030
5030
|
/* @__PURE__ */ r("p", { style: { fontSize: "16px", fontWeight: 600, color: "var(--metakyc-danger, #ef4444)" }, children: "No test data available" }),
|
|
5031
5031
|
b && /* @__PURE__ */ r("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: b })
|
|
5032
5032
|
] }) }) });
|
|
5033
|
-
const q = i.testAllowedMaxTry - i.totalFailedTries, ve = i.appropriatenessQuestions.length,
|
|
5033
|
+
const q = i.testAllowedMaxTry - i.totalFailedTries, ve = i.appropriatenessQuestions.length, de = Object.keys(S).length;
|
|
5034
5034
|
if (z > 0)
|
|
5035
5035
|
return /* @__PURE__ */ o(te, { children: [
|
|
5036
5036
|
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: i.displayName }) }),
|
|
@@ -5061,7 +5061,7 @@ const Pa = ({
|
|
|
5061
5061
|
}, children: /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: b }) })
|
|
5062
5062
|
] }) })
|
|
5063
5063
|
] });
|
|
5064
|
-
if (
|
|
5064
|
+
if (k) {
|
|
5065
5065
|
const _ = () => {
|
|
5066
5066
|
$(null), ie(), F(null);
|
|
5067
5067
|
};
|
|
@@ -5081,8 +5081,8 @@ const Pa = ({
|
|
|
5081
5081
|
display: "flex",
|
|
5082
5082
|
alignItems: "center",
|
|
5083
5083
|
justifyContent: "center",
|
|
5084
|
-
backgroundColor:
|
|
5085
|
-
}, children:
|
|
5084
|
+
backgroundColor: k.success ? "color-mix(in srgb, var(--metakyc-success, #10b981) 12%, transparent)" : "color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent)"
|
|
5085
|
+
}, children: k.success ? /* @__PURE__ */ o("svg", { width: "36", height: "36", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-success, #10b981)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
5086
5086
|
/* @__PURE__ */ r("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
5087
5087
|
/* @__PURE__ */ r("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
5088
5088
|
] }) : /* @__PURE__ */ o("svg", { width: "36", height: "36", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
@@ -5093,9 +5093,9 @@ const Pa = ({
|
|
|
5093
5093
|
/* @__PURE__ */ r("h2", { style: {
|
|
5094
5094
|
fontSize: "20px",
|
|
5095
5095
|
fontWeight: 700,
|
|
5096
|
-
color:
|
|
5096
|
+
color: k.success ? "var(--metakyc-success, #10b981)" : "var(--metakyc-danger, #ef4444)",
|
|
5097
5097
|
margin: 0
|
|
5098
|
-
}, children:
|
|
5098
|
+
}, children: k.success ? "Test Passed" : "Test Failed" }),
|
|
5099
5099
|
/* @__PURE__ */ r("p", { style: {
|
|
5100
5100
|
fontSize: "14px",
|
|
5101
5101
|
color: "var(--metakyc-text-secondary, #6b7280)",
|
|
@@ -5103,8 +5103,8 @@ const Pa = ({
|
|
|
5103
5103
|
lineHeight: 1.6,
|
|
5104
5104
|
maxWidth: "400px",
|
|
5105
5105
|
whiteSpace: "pre-line"
|
|
5106
|
-
}, children:
|
|
5107
|
-
!
|
|
5106
|
+
}, children: k.message }),
|
|
5107
|
+
!k.success && q > 0 && /* @__PURE__ */ r("div", { style: {
|
|
5108
5108
|
marginTop: "4px",
|
|
5109
5109
|
padding: "10px 20px",
|
|
5110
5110
|
borderRadius: "10px",
|
|
@@ -5121,7 +5121,7 @@ const Pa = ({
|
|
|
5121
5121
|
q !== 1 ? "s" : "",
|
|
5122
5122
|
" remaining"
|
|
5123
5123
|
] }) }),
|
|
5124
|
-
!
|
|
5124
|
+
!k.success && q <= 0 && /* @__PURE__ */ r("div", { style: {
|
|
5125
5125
|
marginTop: "4px",
|
|
5126
5126
|
padding: "10px 20px",
|
|
5127
5127
|
borderRadius: "10px",
|
|
@@ -5133,14 +5133,14 @@ const Pa = ({
|
|
|
5133
5133
|
margin: 0
|
|
5134
5134
|
}, children: "No attempts remaining. Please contact support for assistance." }) })
|
|
5135
5135
|
] }) }),
|
|
5136
|
-
/* @__PURE__ */ r(Ce, { children: /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "center", width: "100%", gap: "12px" }, children:
|
|
5136
|
+
/* @__PURE__ */ r(Ce, { children: /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "center", width: "100%", gap: "12px" }, children: k.success ? /* @__PURE__ */ r(J, { type: "button", onClick: () => t == null ? void 0 : t(), children: "Continue" }) : /* @__PURE__ */ o(ct, { children: [
|
|
5137
5137
|
q > 0 && z <= 0 && /* @__PURE__ */ r(J, { type: "button", onClick: _, children: "Retake Test" }),
|
|
5138
5138
|
q > 0 && z > 0 && /* @__PURE__ */ r(J, { type: "button", onClick: _, children: "OK" }),
|
|
5139
5139
|
q <= 0 && a && /* @__PURE__ */ r(J, { type: "button", variant: "outline", onClick: a, children: "Back" })
|
|
5140
5140
|
] }) }) })
|
|
5141
5141
|
] });
|
|
5142
5142
|
}
|
|
5143
|
-
if (!
|
|
5143
|
+
if (!I)
|
|
5144
5144
|
return /* @__PURE__ */ o(te, { children: [
|
|
5145
5145
|
/* @__PURE__ */ o(Se, { children: [
|
|
5146
5146
|
/* @__PURE__ */ r("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: i.displayName }),
|
|
@@ -5209,7 +5209,7 @@ const Pa = ({
|
|
|
5209
5209
|
/* @__PURE__ */ r(J, { type: "button", onClick: G, disabled: q <= 0, children: "Start Test" })
|
|
5210
5210
|
] }) })
|
|
5211
5211
|
] });
|
|
5212
|
-
const ue = i.appropriatenessQuestions[ne], xe = ne === ve - 1,
|
|
5212
|
+
const ue = i.appropriatenessQuestions[ne], xe = ne === ve - 1, T = de === ve, U = L <= 60;
|
|
5213
5213
|
return /* @__PURE__ */ o(te, { children: [
|
|
5214
5214
|
/* @__PURE__ */ o(Se, { children: [
|
|
5215
5215
|
/* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
@@ -5267,7 +5267,7 @@ const Pa = ({
|
|
|
5267
5267
|
height: "100%",
|
|
5268
5268
|
borderRadius: "999px",
|
|
5269
5269
|
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
5270
|
-
width: `${
|
|
5270
|
+
width: `${de / ve * 100}%`,
|
|
5271
5271
|
transition: "width 0.3s ease"
|
|
5272
5272
|
} }) }),
|
|
5273
5273
|
/* @__PURE__ */ o("div", { style: {
|
|
@@ -5276,7 +5276,7 @@ const Pa = ({
|
|
|
5276
5276
|
marginTop: "4px"
|
|
5277
5277
|
}, children: [
|
|
5278
5278
|
/* @__PURE__ */ o("span", { style: { fontSize: "11px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
5279
|
-
|
|
5279
|
+
de,
|
|
5280
5280
|
" answered"
|
|
5281
5281
|
] }),
|
|
5282
5282
|
/* @__PURE__ */ o("span", { style: { fontSize: "11px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
@@ -5376,14 +5376,14 @@ const Pa = ({
|
|
|
5376
5376
|
children: "Next"
|
|
5377
5377
|
}
|
|
5378
5378
|
),
|
|
5379
|
-
(xe ||
|
|
5379
|
+
(xe || T) && /* @__PURE__ */ r(
|
|
5380
5380
|
J,
|
|
5381
5381
|
{
|
|
5382
5382
|
type: "button",
|
|
5383
5383
|
isLoading: y,
|
|
5384
5384
|
onClick: () => Q(),
|
|
5385
|
-
disabled: !
|
|
5386
|
-
style: { opacity:
|
|
5385
|
+
disabled: !T && !Y,
|
|
5386
|
+
style: { opacity: T || Y ? 1 : 0.5 },
|
|
5387
5387
|
children: Y ? "Submitting..." : "Submit Test"
|
|
5388
5388
|
}
|
|
5389
5389
|
)
|
|
@@ -5522,7 +5522,7 @@ const Pa = ({
|
|
|
5522
5522
|
onBack: a
|
|
5523
5523
|
}) => {
|
|
5524
5524
|
var Ze, He, ot, Qe;
|
|
5525
|
-
const { applicantService: n, baseInformationService: i, identityService: l, config: c, currentTheme: d } = Le(), { identityData: y, provider: p, token: b, isLoading: F, error: S, requestIdentity:
|
|
5525
|
+
const { applicantService: n, baseInformationService: i, identityService: l, config: c, currentTheme: d } = Le(), { identityData: y, provider: p, token: b, isLoading: F, error: S, requestIdentity: A, restartIdentity: L } = ta(e), [v, I] = x(null), [B, Y] = x(null), [P, z] = x([]), [Z, ne] = x([]), [R, k] = x(!0), [$, G] = x(!1), [V, j] = x(null), [Q, ie] = x(!1), q = we.useRef(!1), [ve, de] = x({}), [ue, xe] = x({}), T = d != null && d.reviewPageFields && d.reviewPageFields.length > 0 ? d.reviewPageFields[0] : null, U = !!(d != null && d.reviewPageDisabled), _ = ce(!1);
|
|
5526
5526
|
_.current = U;
|
|
5527
5527
|
const H = Zt({
|
|
5528
5528
|
defaultValues: {
|
|
@@ -5537,7 +5537,7 @@ const Pa = ({
|
|
|
5537
5537
|
});
|
|
5538
5538
|
fe(() => {
|
|
5539
5539
|
if (U) {
|
|
5540
|
-
q.current || (q.current = !0,
|
|
5540
|
+
q.current || (q.current = !0, A().then(() => G(!0)).catch((O) => console.error("[Identity] Auto-request failed:", O)).finally(() => k(!1)));
|
|
5541
5541
|
return;
|
|
5542
5542
|
}
|
|
5543
5543
|
(async () => {
|
|
@@ -5551,10 +5551,10 @@ const Pa = ({
|
|
|
5551
5551
|
Y(O);
|
|
5552
5552
|
const X = /* @__PURE__ */ new Set(), u = K.map((g) => ({ value: g.abbreviation3 || g.abbreviation, label: g.name })).filter((g) => !g.value || X.has(g.value) ? !1 : (X.add(g.value), !0));
|
|
5553
5553
|
z(u);
|
|
5554
|
-
const
|
|
5554
|
+
const N = /* @__PURE__ */ new Set(), D = W.filter((g) => g.countryCode).map((g) => ({ value: g.countryCode, label: `${g.countryCode} – ${g.name}` })).filter((g) => N.has(g.value) ? !1 : (N.add(g.value), !0));
|
|
5555
5555
|
ne(D);
|
|
5556
5556
|
const m = O.applicantRequestData;
|
|
5557
|
-
if (
|
|
5557
|
+
if (de({
|
|
5558
5558
|
firstName: (m == null ? void 0 : m.firstName) || "",
|
|
5559
5559
|
lastName: (m == null ? void 0 : m.lastName) || "",
|
|
5560
5560
|
email: (m == null ? void 0 : m.email) || "",
|
|
@@ -5587,7 +5587,7 @@ const Pa = ({
|
|
|
5587
5587
|
}), O.kycRecords && O.kycRecords.length > 0 && O.kycRecords[0].providerTokenObject !== null && !q.current && _.current) {
|
|
5588
5588
|
console.log("[Identity] Review page disabled + existing identity — auto-requesting..."), q.current = !0;
|
|
5589
5589
|
try {
|
|
5590
|
-
await
|
|
5590
|
+
await A(), G(!0);
|
|
5591
5591
|
} catch (g) {
|
|
5592
5592
|
console.error("[Identity] Auto-request failed:", g);
|
|
5593
5593
|
}
|
|
@@ -5595,7 +5595,7 @@ const Pa = ({
|
|
|
5595
5595
|
} catch (O) {
|
|
5596
5596
|
console.error("Error loading applicant data:", O);
|
|
5597
5597
|
} finally {
|
|
5598
|
-
|
|
5598
|
+
k(!1);
|
|
5599
5599
|
}
|
|
5600
5600
|
})();
|
|
5601
5601
|
}, [e]), fe(() => {
|
|
@@ -5639,7 +5639,7 @@ const Pa = ({
|
|
|
5639
5639
|
console.log("[Sumsub] Verification complete:", X), t == null || t();
|
|
5640
5640
|
}), W.onError((X) => {
|
|
5641
5641
|
console.error("[Sumsub] SDK error:", X), (typeof X == "string" ? X : (X == null ? void 0 : X.message) || "Unknown error").toLowerCase().includes("expired") && (ie(!0), j("Session expired. Please restart."));
|
|
5642
|
-
}), await W.initialize("sumsub-websdk-container"), console.log("[Sumsub] Web SDK launched"),
|
|
5642
|
+
}), await W.initialize("sumsub-websdk-container"), console.log("[Sumsub] Web SDK launched"), I(W);
|
|
5643
5643
|
} catch (O) {
|
|
5644
5644
|
console.error("[Sumsub] Initialization error:", O), j(`Failed to initialize: ${O.message || O}`), String(O.message || O).toLowerCase().includes("expired") && ie(!0);
|
|
5645
5645
|
}
|
|
@@ -5658,7 +5658,7 @@ const Pa = ({
|
|
|
5658
5658
|
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", O);
|
|
5659
5659
|
}
|
|
5660
5660
|
}
|
|
5661
|
-
|
|
5661
|
+
I({ type: "url", url: b.url });
|
|
5662
5662
|
} catch (O) {
|
|
5663
5663
|
console.error("[Identity] Invalid URL:", O), j("Invalid verification URL. Please restart."), ie(!0);
|
|
5664
5664
|
}
|
|
@@ -5669,7 +5669,7 @@ const Pa = ({
|
|
|
5669
5669
|
try {
|
|
5670
5670
|
const O = Je.parseProviderConfig(p, b, c), K = Je.createProvider(p, O);
|
|
5671
5671
|
K.initialize().then(() => {
|
|
5672
|
-
console.log("[SardinAI] Risk SDK initialized successfully"),
|
|
5672
|
+
console.log("[SardinAI] Risk SDK initialized successfully"), I(K), setTimeout(() => t == null ? void 0 : t(), 2e3);
|
|
5673
5673
|
}).catch((W) => {
|
|
5674
5674
|
var u;
|
|
5675
5675
|
console.error("[SardinAI] Failed to initialize:", W);
|
|
@@ -5686,7 +5686,7 @@ const Pa = ({
|
|
|
5686
5686
|
const O = Je.parseProviderConfig(p, b, c), K = Je.createProvider(p, O);
|
|
5687
5687
|
h === ze.Onfido && K.initialize("identity-container").catch((W) => {
|
|
5688
5688
|
console.error("[Onfido] Initialization error:", W), j(`Failed to initialize: ${W.message}`);
|
|
5689
|
-
}),
|
|
5689
|
+
}), I(K);
|
|
5690
5690
|
} catch (O) {
|
|
5691
5691
|
console.error("[Identity] Provider setup error:", O), j(`Setup error: ${O.message}`);
|
|
5692
5692
|
}
|
|
@@ -5702,13 +5702,13 @@ const Pa = ({
|
|
|
5702
5702
|
}, [p, b, v, $, t, Q, ge, e, c, l]);
|
|
5703
5703
|
const E = async () => {
|
|
5704
5704
|
try {
|
|
5705
|
-
j(null), ie(!1), await
|
|
5705
|
+
j(null), ie(!1), await A(), G(!0);
|
|
5706
5706
|
} catch (h) {
|
|
5707
5707
|
console.error("Error starting identity verification:", h);
|
|
5708
5708
|
}
|
|
5709
5709
|
}, ee = async () => {
|
|
5710
5710
|
try {
|
|
5711
|
-
j(null), ie(!1),
|
|
5711
|
+
j(null), ie(!1), I(null), console.log("[Identity] Restarting verification..."), await L(), G(!0);
|
|
5712
5712
|
} catch (h) {
|
|
5713
5713
|
console.error("Error restarting identity verification:", h), j(h.message || "Failed to restart verification");
|
|
5714
5714
|
}
|
|
@@ -5864,9 +5864,9 @@ const Pa = ({
|
|
|
5864
5864
|
var K, W, X;
|
|
5865
5865
|
console.log("[Identity] Iframe loaded");
|
|
5866
5866
|
try {
|
|
5867
|
-
const u = O.target,
|
|
5868
|
-
if (
|
|
5869
|
-
const D = ((X = (W =
|
|
5867
|
+
const u = O.target, N = u.contentDocument || ((K = u.contentWindow) == null ? void 0 : K.document);
|
|
5868
|
+
if (N) {
|
|
5869
|
+
const D = ((X = (W = N.body) == null ? void 0 : W.textContent) == null ? void 0 : X.toLowerCase()) || "";
|
|
5870
5870
|
(D.includes("expired") || D.includes("invalid") || D.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), ie(!0), j("Your verification link has expired."));
|
|
5871
5871
|
}
|
|
5872
5872
|
} catch {
|
|
@@ -5907,7 +5907,7 @@ const Pa = ({
|
|
|
5907
5907
|
}
|
|
5908
5908
|
return String(O);
|
|
5909
5909
|
}, $e = ({ helpText: h }) => {
|
|
5910
|
-
const [O, K] = x(!1), W =
|
|
5910
|
+
const [O, K] = x(!1), W = ce(null), [, X] = x({ top: 0, left: 0 });
|
|
5911
5911
|
return /* @__PURE__ */ o(ct, { children: [
|
|
5912
5912
|
/* @__PURE__ */ r(
|
|
5913
5913
|
"button",
|
|
@@ -5917,8 +5917,8 @@ const Pa = ({
|
|
|
5917
5917
|
ref: W,
|
|
5918
5918
|
onClick: () => {
|
|
5919
5919
|
if (W.current) {
|
|
5920
|
-
const
|
|
5921
|
-
X({ top:
|
|
5920
|
+
const N = W.current.getBoundingClientRect();
|
|
5921
|
+
X({ top: N.bottom + window.scrollY + 6, left: N.left + window.scrollX });
|
|
5922
5922
|
}
|
|
5923
5923
|
K(!0);
|
|
5924
5924
|
},
|
|
@@ -5962,7 +5962,7 @@ const Pa = ({
|
|
|
5962
5962
|
children: /* @__PURE__ */ o(
|
|
5963
5963
|
"div",
|
|
5964
5964
|
{
|
|
5965
|
-
onClick: (
|
|
5965
|
+
onClick: (N) => N.stopPropagation(),
|
|
5966
5966
|
style: {
|
|
5967
5967
|
background: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
|
|
5968
5968
|
border: "1px solid var(--metakyc-border, #e5e7eb)",
|
|
@@ -6048,7 +6048,7 @@ const Pa = ({
|
|
|
6048
6048
|
Be,
|
|
6049
6049
|
{
|
|
6050
6050
|
checked: !!u,
|
|
6051
|
-
onChange: (
|
|
6051
|
+
onChange: (N) => xe((D) => ({ ...D, [W]: String(N) })),
|
|
6052
6052
|
style: { marginTop: 2 }
|
|
6053
6053
|
}
|
|
6054
6054
|
),
|
|
@@ -6061,7 +6061,7 @@ const Pa = ({
|
|
|
6061
6061
|
) }, K);
|
|
6062
6062
|
}
|
|
6063
6063
|
if (h.customType === "group_checkbox") {
|
|
6064
|
-
const u = Array.isArray(X) ? X : X ? [X] : [],
|
|
6064
|
+
const u = Array.isArray(X) ? X : X ? [X] : [], N = (D) => {
|
|
6065
6065
|
h.singleSelect ? xe((m) => ({ ...m, [W]: u[0] === D ? [] : [D] })) : xe((m) => ({
|
|
6066
6066
|
...m,
|
|
6067
6067
|
[W]: u.includes(D) ? u.filter((s) => s !== D) : [...u, D]
|
|
@@ -6075,7 +6075,7 @@ const Pa = ({
|
|
|
6075
6075
|
Be,
|
|
6076
6076
|
{
|
|
6077
6077
|
checked: u.includes(D.value),
|
|
6078
|
-
onChange: () =>
|
|
6078
|
+
onChange: () => N(D.value),
|
|
6079
6079
|
style: { marginTop: 2 }
|
|
6080
6080
|
}
|
|
6081
6081
|
),
|
|
@@ -6096,7 +6096,7 @@ const Pa = ({
|
|
|
6096
6096
|
name: `rg-${W}`,
|
|
6097
6097
|
value: u.value,
|
|
6098
6098
|
checked: X === u.value,
|
|
6099
|
-
onChange: () => xe((
|
|
6099
|
+
onChange: () => xe((N) => ({ ...N, [W]: u.value })),
|
|
6100
6100
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
6101
6101
|
}
|
|
6102
6102
|
),
|
|
@@ -6110,21 +6110,21 @@ const Pa = ({
|
|
|
6110
6110
|
{
|
|
6111
6111
|
label: h.displayText || h.label || W,
|
|
6112
6112
|
value: String(X ?? ""),
|
|
6113
|
-
onChange: (u) => xe((
|
|
6113
|
+
onChange: (u) => xe((N) => ({ ...N, [W]: u.target.value }))
|
|
6114
6114
|
}
|
|
6115
6115
|
),
|
|
6116
6116
|
h.helpText
|
|
6117
6117
|
) }, K);
|
|
6118
6118
|
}, it = (h, O) => {
|
|
6119
6119
|
if (h.isCustom) return je(h, O);
|
|
6120
|
-
const K = h.name ?? "", W = nt[K], X = h.displayText || (W == null ? void 0 : W.label) || K, u = ve[K] ?? "",
|
|
6121
|
-
return h.editable ?
|
|
6120
|
+
const K = h.name ?? "", W = nt[K], X = h.displayText || (W == null ? void 0 : W.label) || K, u = ve[K] ?? "", N = K === "mobileCountryCode", D = !!(W != null && W.countriesType) && !N;
|
|
6121
|
+
return h.editable ? N ? /* @__PURE__ */ r("div", { style: oe(h.colSpan ?? 2), children: Ie(
|
|
6122
6122
|
/* @__PURE__ */ r(
|
|
6123
6123
|
Ye,
|
|
6124
6124
|
{
|
|
6125
6125
|
label: X,
|
|
6126
6126
|
value: String(u),
|
|
6127
|
-
onChange: (m) =>
|
|
6127
|
+
onChange: (m) => de((s) => ({ ...s, [K]: m })),
|
|
6128
6128
|
options: [{ value: "", label: "Select country code…" }, ...Z]
|
|
6129
6129
|
}
|
|
6130
6130
|
),
|
|
@@ -6135,7 +6135,7 @@ const Pa = ({
|
|
|
6135
6135
|
{
|
|
6136
6136
|
label: X,
|
|
6137
6137
|
value: String(u),
|
|
6138
|
-
onChange: (m) =>
|
|
6138
|
+
onChange: (m) => de((s) => ({ ...s, [K]: m })),
|
|
6139
6139
|
options: [{ value: "", label: `Select ${X.toLowerCase()}…` }, ...P]
|
|
6140
6140
|
}
|
|
6141
6141
|
),
|
|
@@ -6147,7 +6147,7 @@ const Pa = ({
|
|
|
6147
6147
|
label: X,
|
|
6148
6148
|
type: (W == null ? void 0 : W.type) === "date" ? "date" : (W == null ? void 0 : W.type) === "email" ? "email" : "text",
|
|
6149
6149
|
value: String(u),
|
|
6150
|
-
onChange: (m) =>
|
|
6150
|
+
onChange: (m) => de((s) => ({ ...s, [K]: m.target.value }))
|
|
6151
6151
|
}
|
|
6152
6152
|
),
|
|
6153
6153
|
h.helpText
|
|
@@ -6159,8 +6159,8 @@ const Pa = ({
|
|
|
6159
6159
|
h.helpText
|
|
6160
6160
|
) }, `ro-${O}`);
|
|
6161
6161
|
};
|
|
6162
|
-
if (
|
|
6163
|
-
const h =
|
|
6162
|
+
if (T) {
|
|
6163
|
+
const h = T.title || "Review Your Information", O = T.subtitle || "Please review and confirm your information before starting identity verification";
|
|
6164
6164
|
return /* @__PURE__ */ r("form", { onSubmit: (K) => {
|
|
6165
6165
|
K.preventDefault(), E();
|
|
6166
6166
|
}, children: /* @__PURE__ */ o(te, { children: [
|
|
@@ -6168,7 +6168,7 @@ const Pa = ({
|
|
|
6168
6168
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: h }),
|
|
6169
6169
|
/* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: O })
|
|
6170
6170
|
] }),
|
|
6171
|
-
/* @__PURE__ */ r(re, { children: /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children:
|
|
6171
|
+
/* @__PURE__ */ r(re, { children: /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: T.fields.map((K, W) => it(K, W)) }) }),
|
|
6172
6172
|
/* @__PURE__ */ o(Ce, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
6173
6173
|
a && /* @__PURE__ */ r(J, { type: "button", variant: "outline", onClick: a, children: "Back" }),
|
|
6174
6174
|
/* @__PURE__ */ r(J, { type: "submit", isLoading: F, children: "Confirm and Start Verification" })
|
|
@@ -6568,36 +6568,36 @@ const $a = {
|
|
|
6568
6568
|
onSuccess: a,
|
|
6569
6569
|
onCancel: n
|
|
6570
6570
|
}) => {
|
|
6571
|
-
var K, W, X, u,
|
|
6571
|
+
var K, W, X, u, N, D, m;
|
|
6572
6572
|
const { config: i, baseInformationService: l, currentTheme: c } = Le(), { createApplicant: d, isLoading: y } = _t(), p = e || ((K = i.applicantForm) == null ? void 0 : K.workflowKey);
|
|
6573
6573
|
if (!p)
|
|
6574
6574
|
throw new Error(
|
|
6575
6575
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
6576
6576
|
);
|
|
6577
|
-
const b = t || ((W = i.applicantForm) == null ? void 0 : W.externalRefId) || "", F = ((X = i.applicantForm) == null ? void 0 : X.email) || "", S = ((u = i.applicantForm) == null ? void 0 : u.hiddenValues) || {},
|
|
6577
|
+
const b = t || ((W = i.applicantForm) == null ? void 0 : W.externalRefId) || "", F = ((X = i.applicantForm) == null ? void 0 : X.email) || "", S = ((u = i.applicantForm) == null ? void 0 : u.hiddenValues) || {}, A = ((N = i.applicantForm) == null ? void 0 : N.initialValues) || {}, v = (((D = i.applicantForm) == null ? void 0 : D.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", I = De(
|
|
6578
6578
|
() => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
|
|
6579
6579
|
[c == null ? void 0 : c.applicantFormPages]
|
|
6580
6580
|
), B = De(() => {
|
|
6581
6581
|
const s = new Set(gt), g = c == null ? void 0 : c.applicantFormRequiredFields;
|
|
6582
6582
|
if (g) for (const M of g) s.add(M);
|
|
6583
|
-
if (
|
|
6584
|
-
for (const M of
|
|
6585
|
-
for (const
|
|
6586
|
-
!
|
|
6583
|
+
if (I)
|
|
6584
|
+
for (const M of I)
|
|
6585
|
+
for (const f of M.fields)
|
|
6586
|
+
!f.isCustom && f.name && f.required && s.add(f.name);
|
|
6587
6587
|
return Array.from(s);
|
|
6588
|
-
}, [c == null ? void 0 : c.applicantFormRequiredFields,
|
|
6588
|
+
}, [c == null ? void 0 : c.applicantFormRequiredFields, I]), Y = De(() => {
|
|
6589
6589
|
var M;
|
|
6590
|
-
if (
|
|
6591
|
-
const
|
|
6590
|
+
if (I) {
|
|
6591
|
+
const f = I.flatMap((w) => w.fields).filter((w) => !w.isCustom && w.name).map((w) => w.name), C = new Set(f);
|
|
6592
6592
|
for (const w of gt) C.add(w);
|
|
6593
6593
|
return Array.from(C);
|
|
6594
6594
|
}
|
|
6595
6595
|
let s;
|
|
6596
6596
|
(M = i.applicantForm) != null && M.visibleFields ? s = i.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? s = c.applicantFormVisibleFields : s = pr;
|
|
6597
6597
|
const g = new Set(s);
|
|
6598
|
-
for (const
|
|
6598
|
+
for (const f of gt) g.add(f);
|
|
6599
6599
|
return Array.from(g);
|
|
6600
|
-
}, [(m = i.applicantForm) == null ? void 0 : m.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields,
|
|
6600
|
+
}, [(m = i.applicantForm) == null ? void 0 : m.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields, I]), P = /* @__PURE__ */ new Set([
|
|
6601
6601
|
"country",
|
|
6602
6602
|
"nationality",
|
|
6603
6603
|
"taxCountry",
|
|
@@ -6607,56 +6607,56 @@ const $a = {
|
|
|
6607
6607
|
]), z = De(() => {
|
|
6608
6608
|
var g, M;
|
|
6609
6609
|
const s = /* @__PURE__ */ new Set();
|
|
6610
|
-
if (
|
|
6611
|
-
for (const
|
|
6612
|
-
for (const C of
|
|
6610
|
+
if (I)
|
|
6611
|
+
for (const f of I)
|
|
6612
|
+
for (const C of f.fields)
|
|
6613
6613
|
!C.isCustom && C.name && P.has(C.name) && s.add(C.countriesType ?? ((g = nt[C.name]) == null ? void 0 : g.countriesType));
|
|
6614
6614
|
else
|
|
6615
|
-
for (const
|
|
6616
|
-
P.has(
|
|
6615
|
+
for (const f of Y)
|
|
6616
|
+
P.has(f) && s.add((M = nt[f]) == null ? void 0 : M.countriesType);
|
|
6617
6617
|
return s.size === 0 && s.add(void 0), Array.from(s);
|
|
6618
|
-
}, [Y,
|
|
6618
|
+
}, [Y, I]), [Z, ne] = x({}), [R, k] = x(!0), $ = ce(/* @__PURE__ */ new Set()), G = ce(/* @__PURE__ */ new Set());
|
|
6619
6619
|
fe(() => {
|
|
6620
6620
|
if (!c) return;
|
|
6621
|
-
const s = z.filter((
|
|
6622
|
-
const C =
|
|
6621
|
+
const s = z.filter((f) => {
|
|
6622
|
+
const C = f != null ? String(f) : "all";
|
|
6623
6623
|
return !G.current.has(C) && !$.current.has(C);
|
|
6624
6624
|
});
|
|
6625
6625
|
if (s.length === 0) {
|
|
6626
6626
|
z.every((C) => {
|
|
6627
6627
|
const w = C != null ? String(C) : "all";
|
|
6628
6628
|
return G.current.has(w);
|
|
6629
|
-
}) &&
|
|
6629
|
+
}) && k(!1);
|
|
6630
6630
|
return;
|
|
6631
6631
|
}
|
|
6632
|
-
|
|
6633
|
-
const g = s.map((
|
|
6634
|
-
g.forEach((
|
|
6632
|
+
k(!0);
|
|
6633
|
+
const g = s.map((f) => f != null ? String(f) : "all");
|
|
6634
|
+
g.forEach((f) => $.current.add(f)), (async () => {
|
|
6635
6635
|
try {
|
|
6636
|
-
const
|
|
6636
|
+
const f = await Promise.all(
|
|
6637
6637
|
s.map(async (C) => {
|
|
6638
|
-
const w = C != null ? String(C) : "all", me = await l.getCountries("", i.locale || "en", C),
|
|
6639
|
-
value:
|
|
6640
|
-
label: `${
|
|
6641
|
-
} : { value:
|
|
6638
|
+
const w = C != null ? String(C) : "all", me = await l.getCountries("", i.locale || "en", C), pe = C === 40, ke = /* @__PURE__ */ new Set(), Pe = me.map((se) => pe && se.countryCode ? {
|
|
6639
|
+
value: se.countryCode,
|
|
6640
|
+
label: `${se.countryCode} – ${se.name}`
|
|
6641
|
+
} : { value: se.abbreviation3 || se.abbreviation, label: se.name }).filter((se) => !se.value || ke.has(se.value) ? !1 : (ke.add(se.value), !0));
|
|
6642
6642
|
return G.current.add(w), $.current.delete(w), [w, Pe];
|
|
6643
6643
|
})
|
|
6644
6644
|
);
|
|
6645
|
-
ne((C) => ({ ...C, ...Object.fromEntries(
|
|
6646
|
-
} catch (
|
|
6647
|
-
g.forEach((C) => $.current.delete(C)), console.error("Failed to load countries:",
|
|
6645
|
+
ne((C) => ({ ...C, ...Object.fromEntries(f) }));
|
|
6646
|
+
} catch (f) {
|
|
6647
|
+
g.forEach((C) => $.current.delete(C)), console.error("Failed to load countries:", f);
|
|
6648
6648
|
} finally {
|
|
6649
6649
|
z.every((C) => {
|
|
6650
6650
|
const w = C != null ? String(C) : "all";
|
|
6651
6651
|
return G.current.has(w);
|
|
6652
|
-
}) &&
|
|
6652
|
+
}) && k(!1);
|
|
6653
6653
|
}
|
|
6654
6654
|
})();
|
|
6655
6655
|
}, [z, c]);
|
|
6656
6656
|
const V = (s, g) => {
|
|
6657
6657
|
var C;
|
|
6658
|
-
const M = g ?? ((C = nt[s]) == null ? void 0 : C.countriesType),
|
|
6659
|
-
return Z[
|
|
6658
|
+
const M = g ?? ((C = nt[s]) == null ? void 0 : C.countriesType), f = M != null ? String(M) : "all";
|
|
6659
|
+
return Z[f] || [];
|
|
6660
6660
|
}, j = {
|
|
6661
6661
|
firstName: 1,
|
|
6662
6662
|
lastName: 1,
|
|
@@ -6683,7 +6683,7 @@ const $a = {
|
|
|
6683
6683
|
}, Q = Object.fromEntries(
|
|
6684
6684
|
Object.entries(S).filter(([s]) => s in j)
|
|
6685
6685
|
), ie = Object.fromEntries(
|
|
6686
|
-
Object.entries(
|
|
6686
|
+
Object.entries(A).filter(([s]) => s in j)
|
|
6687
6687
|
), [q, ve] = x({
|
|
6688
6688
|
workflowKey: p,
|
|
6689
6689
|
firstName: "",
|
|
@@ -6711,29 +6711,29 @@ const $a = {
|
|
|
6711
6711
|
taxNumber: "",
|
|
6712
6712
|
...Q,
|
|
6713
6713
|
...ie
|
|
6714
|
-
}),
|
|
6714
|
+
}), de = Object.fromEntries(
|
|
6715
6715
|
Object.entries(S).filter(([s]) => !(s in Q) && s !== "externalRefId" && s !== "workflowKey")
|
|
6716
|
-
), [ue, xe] = x({ ...
|
|
6716
|
+
), [ue, xe] = x({ ...de }), [T, U] = x(0), [_, H] = x({}), [ge, E] = x(null), [ee, ye] = x(!1), oe = (s, g) => ve((M) => ({ ...M, [s]: g })), Ne = (s, g) => xe((M) => ({ ...M, [s]: g })), $e = (s) => !s.conditionalOn || ue[s.conditionalOn] === "true", Ie = I && T < I.length - 1 ? T + 1 : -1, je = I && T > 0 ? T - 1 : -1, it = (s) => {
|
|
6717
6717
|
var M;
|
|
6718
6718
|
const g = {};
|
|
6719
|
-
for (const
|
|
6720
|
-
if (
|
|
6721
|
-
if (
|
|
6722
|
-
if (
|
|
6723
|
-
const C = ue[
|
|
6724
|
-
|
|
6719
|
+
for (const f of s.fields)
|
|
6720
|
+
if (f.isCustom) {
|
|
6721
|
+
if (f.customType === "paragraph" || f.customType === "html" || f.customType === "br" || f.customType === "link") continue;
|
|
6722
|
+
if (f.required && f.paramName) {
|
|
6723
|
+
const C = ue[f.paramName], w = f.displayText || f.label || f.paramName;
|
|
6724
|
+
f.customType === "checkbox" || f.customType === "link_checkbox" ? C !== "true" && (g[f.paramName] = `${w} is required.`) : (!C || C.trim() === "") && (g[f.paramName] = `${w} is required.`);
|
|
6725
6725
|
}
|
|
6726
|
-
} else if (
|
|
6727
|
-
const C =
|
|
6726
|
+
} else if (f.name) {
|
|
6727
|
+
const C = f.name;
|
|
6728
6728
|
if (B.includes(C) && lt(q[C])) {
|
|
6729
|
-
const w =
|
|
6729
|
+
const w = f.displayText || ((M = nt[C]) == null ? void 0 : M.label) || C;
|
|
6730
6730
|
g[C] = `${w} is required.`;
|
|
6731
6731
|
}
|
|
6732
6732
|
}
|
|
6733
6733
|
return g;
|
|
6734
6734
|
}, Ze = async () => {
|
|
6735
|
-
if (!
|
|
6736
|
-
const s =
|
|
6735
|
+
if (!I) return;
|
|
6736
|
+
const s = I[T];
|
|
6737
6737
|
if (s.conditionalOn && !$e(s)) {
|
|
6738
6738
|
H({}), Ie >= 0 ? U(Ie) : await He();
|
|
6739
6739
|
return;
|
|
@@ -6745,9 +6745,9 @@ const $a = {
|
|
|
6745
6745
|
}
|
|
6746
6746
|
H({}), Ie >= 0 ? U(Ie) : await He();
|
|
6747
6747
|
}, He = async () => {
|
|
6748
|
-
if (
|
|
6748
|
+
if (I) {
|
|
6749
6749
|
let s = {};
|
|
6750
|
-
for (const g of
|
|
6750
|
+
for (const g of I)
|
|
6751
6751
|
$e(g) && (s = { ...s, ...it(g) });
|
|
6752
6752
|
if (Object.keys(s).length > 0) {
|
|
6753
6753
|
H(s);
|
|
@@ -6764,13 +6764,13 @@ const $a = {
|
|
|
6764
6764
|
workflowKey: q.workflowKey,
|
|
6765
6765
|
externalRefId: q.externalRefId.trim()
|
|
6766
6766
|
};
|
|
6767
|
-
if (
|
|
6768
|
-
for (const C of
|
|
6767
|
+
if (I) {
|
|
6768
|
+
for (const C of I)
|
|
6769
6769
|
if ($e(C)) {
|
|
6770
6770
|
for (const w of C.fields)
|
|
6771
6771
|
if (!w.isCustom && w.name) {
|
|
6772
|
-
const me = w.name,
|
|
6773
|
-
lt(
|
|
6772
|
+
const me = w.name, pe = q[me];
|
|
6773
|
+
lt(pe) || (s[me] = pe);
|
|
6774
6774
|
}
|
|
6775
6775
|
}
|
|
6776
6776
|
for (const C of gt)
|
|
@@ -6785,27 +6785,27 @@ const $a = {
|
|
|
6785
6785
|
lt(w) || (s[C] = w);
|
|
6786
6786
|
});
|
|
6787
6787
|
const g = [];
|
|
6788
|
-
if (
|
|
6789
|
-
for (const C of
|
|
6788
|
+
if (I) {
|
|
6789
|
+
for (const C of I)
|
|
6790
6790
|
if ($e(C))
|
|
6791
6791
|
for (const w of C.fields) {
|
|
6792
6792
|
if (!w.isCustom || !w.paramName || w.customType === "paragraph" || w.customType === "html" || w.customType === "br" || w.customType === "link") continue;
|
|
6793
6793
|
const me = ue[w.paramName] ?? "";
|
|
6794
|
-
let
|
|
6794
|
+
let pe;
|
|
6795
6795
|
if (w.customType === "checkbox" || w.customType === "link_checkbox")
|
|
6796
|
-
|
|
6797
|
-
else if (
|
|
6798
|
-
g.push({ paramName: w.paramName, value:
|
|
6796
|
+
pe = me === "true" ? "yes" : "no";
|
|
6797
|
+
else if (pe = me, !pe && !w.required) continue;
|
|
6798
|
+
g.push({ paramName: w.paramName, value: pe });
|
|
6799
6799
|
}
|
|
6800
6800
|
}
|
|
6801
6801
|
for (const [C, w] of Object.entries(Q))
|
|
6802
6802
|
s[C] === void 0 && !lt(w) && (s[C] = w);
|
|
6803
6803
|
const M = new Set(g.map((C) => C.paramName));
|
|
6804
|
-
for (const [C, w] of Object.entries(
|
|
6804
|
+
for (const [C, w] of Object.entries(de))
|
|
6805
6805
|
!M.has(C) && w && g.push({ paramName: C, value: w });
|
|
6806
6806
|
g.length > 0 && (s.applicantAdditionalDatas = g);
|
|
6807
|
-
const
|
|
6808
|
-
a(
|
|
6807
|
+
const f = await d(s);
|
|
6808
|
+
a(f.applicantId);
|
|
6809
6809
|
} catch (s) {
|
|
6810
6810
|
console.error("Error creating applicant:", s), E(s.message || "Failed to create applicant");
|
|
6811
6811
|
} finally {
|
|
@@ -6816,20 +6816,20 @@ const $a = {
|
|
|
6816
6816
|
s.preventDefault();
|
|
6817
6817
|
for (const M of B)
|
|
6818
6818
|
if (lt(q[M])) {
|
|
6819
|
-
const
|
|
6820
|
-
E(`${
|
|
6819
|
+
const f = ((g = nt[M]) == null ? void 0 : g.label) || M;
|
|
6820
|
+
E(`${f} is required.`);
|
|
6821
6821
|
return;
|
|
6822
6822
|
}
|
|
6823
6823
|
await He();
|
|
6824
|
-
}, Qe = (s, g, M,
|
|
6824
|
+
}, Qe = (s, g, M, f, C) => {
|
|
6825
6825
|
var It;
|
|
6826
6826
|
const w = nt[s];
|
|
6827
6827
|
if (!w) return null;
|
|
6828
|
-
const me = B.includes(s),
|
|
6828
|
+
const me = B.includes(s), pe = _[s], ke = M || w.label, Pe = s in ie, se = g ?? s, _e = { required: me }, We = C ? C !== "placeholder" : v, Ge = We ? ke : void 0, qt = We ? "..." : ke;
|
|
6829
6829
|
switch (w.type) {
|
|
6830
6830
|
case "select":
|
|
6831
6831
|
if (s === "country" || s === "nationality" || s === "taxCountry" || s === "countryOfBirth" || s === "mobileCountryCode") {
|
|
6832
|
-
const Re = V(s,
|
|
6832
|
+
const Re = V(s, f);
|
|
6833
6833
|
return /* @__PURE__ */ r(
|
|
6834
6834
|
Ye,
|
|
6835
6835
|
{
|
|
@@ -6840,9 +6840,9 @@ const $a = {
|
|
|
6840
6840
|
options: [{ value: "", label: `Select ${qt.toLowerCase()}` }, ...Re],
|
|
6841
6841
|
disabled: R,
|
|
6842
6842
|
readOnly: Pe,
|
|
6843
|
-
error:
|
|
6843
|
+
error: pe
|
|
6844
6844
|
},
|
|
6845
|
-
|
|
6845
|
+
se
|
|
6846
6846
|
);
|
|
6847
6847
|
}
|
|
6848
6848
|
if (s === "salutation")
|
|
@@ -6860,9 +6860,9 @@ const $a = {
|
|
|
6860
6860
|
{ value: kt.Other.toString(), label: "Other" }
|
|
6861
6861
|
],
|
|
6862
6862
|
readOnly: Pe,
|
|
6863
|
-
error:
|
|
6863
|
+
error: pe
|
|
6864
6864
|
},
|
|
6865
|
-
|
|
6865
|
+
se
|
|
6866
6866
|
);
|
|
6867
6867
|
if (s === "defaultLanguage") {
|
|
6868
6868
|
const Re = c != null && c.allowedLanguages && c.allowedLanguages.length > 0 ? Et.filter((et) => c.allowedLanguages.includes(et.value)) : Et;
|
|
@@ -6875,15 +6875,15 @@ const $a = {
|
|
|
6875
6875
|
onChange: (et) => oe(s, et),
|
|
6876
6876
|
options: [{ value: "", label: We ? "Select language..." : ke }, ...Re],
|
|
6877
6877
|
readOnly: Pe,
|
|
6878
|
-
error:
|
|
6878
|
+
error: pe
|
|
6879
6879
|
},
|
|
6880
|
-
|
|
6880
|
+
se
|
|
6881
6881
|
);
|
|
6882
6882
|
}
|
|
6883
6883
|
return null;
|
|
6884
6884
|
case "multiselect":
|
|
6885
6885
|
if (s === "otherNationality") {
|
|
6886
|
-
const Re = V(s,
|
|
6886
|
+
const Re = V(s, f);
|
|
6887
6887
|
return /* @__PURE__ */ r(
|
|
6888
6888
|
oa,
|
|
6889
6889
|
{
|
|
@@ -6896,7 +6896,7 @@ const $a = {
|
|
|
6896
6896
|
disabled: R,
|
|
6897
6897
|
readOnly: Pe
|
|
6898
6898
|
},
|
|
6899
|
-
|
|
6899
|
+
se
|
|
6900
6900
|
);
|
|
6901
6901
|
}
|
|
6902
6902
|
return null;
|
|
@@ -6911,9 +6911,9 @@ const $a = {
|
|
|
6911
6911
|
value: q[s] || "",
|
|
6912
6912
|
onChange: (Re) => oe(s, Re.target.value),
|
|
6913
6913
|
readOnly: Pe,
|
|
6914
|
-
error:
|
|
6914
|
+
error: pe
|
|
6915
6915
|
},
|
|
6916
|
-
|
|
6916
|
+
se
|
|
6917
6917
|
);
|
|
6918
6918
|
case "email":
|
|
6919
6919
|
return /* @__PURE__ */ r(
|
|
@@ -6926,9 +6926,9 @@ const $a = {
|
|
|
6926
6926
|
value: q[s] || "",
|
|
6927
6927
|
onChange: (Re) => oe(s, Re.target.value),
|
|
6928
6928
|
readOnly: Pe,
|
|
6929
|
-
error:
|
|
6929
|
+
error: pe
|
|
6930
6930
|
},
|
|
6931
|
-
|
|
6931
|
+
se
|
|
6932
6932
|
);
|
|
6933
6933
|
case "tel":
|
|
6934
6934
|
return /* @__PURE__ */ r(
|
|
@@ -6941,9 +6941,9 @@ const $a = {
|
|
|
6941
6941
|
value: q[s] || "",
|
|
6942
6942
|
onChange: (Re) => oe(s, Re.target.value),
|
|
6943
6943
|
readOnly: Pe,
|
|
6944
|
-
error:
|
|
6944
|
+
error: pe
|
|
6945
6945
|
},
|
|
6946
|
-
|
|
6946
|
+
se
|
|
6947
6947
|
);
|
|
6948
6948
|
default:
|
|
6949
6949
|
return /* @__PURE__ */ r(
|
|
@@ -6956,9 +6956,9 @@ const $a = {
|
|
|
6956
6956
|
value: q[s] || "",
|
|
6957
6957
|
onChange: (Re) => oe(s, Re.target.value),
|
|
6958
6958
|
readOnly: Pe,
|
|
6959
|
-
error:
|
|
6959
|
+
error: pe
|
|
6960
6960
|
},
|
|
6961
|
-
|
|
6961
|
+
se
|
|
6962
6962
|
);
|
|
6963
6963
|
}
|
|
6964
6964
|
}, h = (s, g) => {
|
|
@@ -7015,7 +7015,7 @@ const $a = {
|
|
|
7015
7015
|
) }, `custom-${g}`);
|
|
7016
7016
|
}
|
|
7017
7017
|
if (!s.paramName) return null;
|
|
7018
|
-
const
|
|
7018
|
+
const f = _[s.paramName], C = s.displayText || s.label || s.paramName;
|
|
7019
7019
|
if (s.customType === "checkbox")
|
|
7020
7020
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
7021
7021
|
/* @__PURE__ */ o(
|
|
@@ -7045,7 +7045,7 @@ const $a = {
|
|
|
7045
7045
|
]
|
|
7046
7046
|
}
|
|
7047
7047
|
),
|
|
7048
|
-
|
|
7048
|
+
f && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: f })
|
|
7049
7049
|
] }, `custom-${g}`);
|
|
7050
7050
|
if (s.customType === "link_checkbox")
|
|
7051
7051
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -7089,7 +7089,7 @@ const $a = {
|
|
|
7089
7089
|
]
|
|
7090
7090
|
}
|
|
7091
7091
|
),
|
|
7092
|
-
|
|
7092
|
+
f && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: f })
|
|
7093
7093
|
] }, `custom-${g}`);
|
|
7094
7094
|
if (s.customType === "group_checkbox") {
|
|
7095
7095
|
const w = (ue[s.paramName] || "").split(",").filter(Boolean);
|
|
@@ -7106,7 +7106,7 @@ const $a = {
|
|
|
7106
7106
|
}
|
|
7107
7107
|
),
|
|
7108
7108
|
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (s.options || []).map((me) => {
|
|
7109
|
-
const
|
|
7109
|
+
const pe = s.singleSelect ? ue[s.paramName] === me.value : w.includes(me.value);
|
|
7110
7110
|
return /* @__PURE__ */ o(
|
|
7111
7111
|
"label",
|
|
7112
7112
|
{
|
|
@@ -7116,12 +7116,12 @@ const $a = {
|
|
|
7116
7116
|
/* @__PURE__ */ r(
|
|
7117
7117
|
Be,
|
|
7118
7118
|
{
|
|
7119
|
-
checked:
|
|
7119
|
+
checked: pe,
|
|
7120
7120
|
onChange: (ke) => {
|
|
7121
7121
|
if (s.singleSelect)
|
|
7122
7122
|
Ne(s.paramName, ke ? me.value : "");
|
|
7123
7123
|
else {
|
|
7124
|
-
const Pe = ke ? [...w, me.value] : w.filter((
|
|
7124
|
+
const Pe = ke ? [...w, me.value] : w.filter((se) => se !== me.value);
|
|
7125
7125
|
Ne(s.paramName, Pe.join(","));
|
|
7126
7126
|
}
|
|
7127
7127
|
}
|
|
@@ -7140,7 +7140,7 @@ const $a = {
|
|
|
7140
7140
|
me.value
|
|
7141
7141
|
);
|
|
7142
7142
|
}) }),
|
|
7143
|
-
|
|
7143
|
+
f && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: f })
|
|
7144
7144
|
] }, `custom-${g}`);
|
|
7145
7145
|
}
|
|
7146
7146
|
return s.customType === "radio_group" ? /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
@@ -7184,7 +7184,7 @@ const $a = {
|
|
|
7184
7184
|
},
|
|
7185
7185
|
w.value
|
|
7186
7186
|
)) }),
|
|
7187
|
-
|
|
7187
|
+
f && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: f })
|
|
7188
7188
|
] }, `custom-${g}`) : /* @__PURE__ */ r(
|
|
7189
7189
|
be,
|
|
7190
7190
|
{
|
|
@@ -7194,7 +7194,7 @@ const $a = {
|
|
|
7194
7194
|
value: ue[s.paramName] || "",
|
|
7195
7195
|
onChange: (w) => Ne(s.paramName, w.target.value),
|
|
7196
7196
|
required: s.required,
|
|
7197
|
-
error:
|
|
7197
|
+
error: f
|
|
7198
7198
|
},
|
|
7199
7199
|
`custom-${g}`
|
|
7200
7200
|
);
|
|
@@ -7211,7 +7211,7 @@ const $a = {
|
|
|
7211
7211
|
Be,
|
|
7212
7212
|
{
|
|
7213
7213
|
checked: M,
|
|
7214
|
-
onChange: (
|
|
7214
|
+
onChange: (f) => Ne(s.conditionalOn, f ? "true" : "false")
|
|
7215
7215
|
}
|
|
7216
7216
|
),
|
|
7217
7217
|
/* @__PURE__ */ r(
|
|
@@ -7225,9 +7225,9 @@ const $a = {
|
|
|
7225
7225
|
]
|
|
7226
7226
|
}
|
|
7227
7227
|
) }),
|
|
7228
|
-
M && /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: s.fields.map((
|
|
7229
|
-
const w = Math.min(4, Math.max(1, Number(
|
|
7230
|
-
return /* @__PURE__ */ r("div", { style: { gridColumn: `span ${w} / span ${w}` }, children: /* @__PURE__ */ r(zt, { helpText:
|
|
7228
|
+
M && /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: s.fields.map((f, C) => {
|
|
7229
|
+
const w = Math.min(4, Math.max(1, Number(f.colSpan) || 4)), me = f.isCustom ? `custom-${C}-${f.paramName}` : `builtin-${f.name}-${C}`;
|
|
7230
|
+
return /* @__PURE__ */ r("div", { style: { gridColumn: `span ${w} / span ${w}` }, children: /* @__PURE__ */ r(zt, { helpText: f.helpText, children: f.isCustom ? h(f, C) : Qe(f.name, me, f.displayText, f.countriesType, f.labelMode) }) }, me);
|
|
7231
7231
|
}) })
|
|
7232
7232
|
] });
|
|
7233
7233
|
};
|
|
@@ -7236,10 +7236,46 @@ const $a = {
|
|
|
7236
7236
|
/* @__PURE__ */ r(Me, { className: "my-8" }),
|
|
7237
7237
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
7238
7238
|
] }) }) });
|
|
7239
|
-
if (
|
|
7240
|
-
const s =
|
|
7239
|
+
if (I) {
|
|
7240
|
+
const s = I[T] ?? I[0], g = je === -1, M = Ie === -1, f = I.length, C = $e(s), w = Object.values(_), me = f > 1 ? (T + 1) / f * 100 : 100;
|
|
7241
7241
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(te, { children: [
|
|
7242
|
-
|
|
7242
|
+
f > 1 && /* @__PURE__ */ o("div", { style: { position: "relative", height: "4px", borderRadius: "0.75rem 0.75rem 0 0", overflow: "hidden" }, children: [
|
|
7243
|
+
/* @__PURE__ */ r("div", { style: {
|
|
7244
|
+
position: "absolute",
|
|
7245
|
+
inset: 0,
|
|
7246
|
+
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
7247
|
+
opacity: 0.3
|
|
7248
|
+
} }),
|
|
7249
|
+
/* @__PURE__ */ r("div", { style: {
|
|
7250
|
+
position: "absolute",
|
|
7251
|
+
top: 0,
|
|
7252
|
+
left: 0,
|
|
7253
|
+
bottom: 0,
|
|
7254
|
+
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
7255
|
+
width: `${me}%`,
|
|
7256
|
+
transition: "width 0.4s ease"
|
|
7257
|
+
} })
|
|
7258
|
+
] }),
|
|
7259
|
+
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" }, children: [
|
|
7260
|
+
/* @__PURE__ */ r(ut, { title: (c == null ? void 0 : c.title) || "Create Applicant" }),
|
|
7261
|
+
f > 1 && /* @__PURE__ */ o("span", { style: {
|
|
7262
|
+
display: "inline-flex",
|
|
7263
|
+
alignItems: "center",
|
|
7264
|
+
padding: "2px 10px",
|
|
7265
|
+
borderRadius: "9999px",
|
|
7266
|
+
fontSize: "0.75rem",
|
|
7267
|
+
fontWeight: 500,
|
|
7268
|
+
whiteSpace: "nowrap",
|
|
7269
|
+
backgroundColor: "var(--metakyc-input-bg, var(--metakyc-surface, #f9fafb))",
|
|
7270
|
+
color: "var(--metakyc-input-text, var(--metakyc-text-secondary, #6b7280))",
|
|
7271
|
+
border: "1px solid var(--metakyc-input-border, var(--metakyc-border, #e5e7eb))"
|
|
7272
|
+
}, children: [
|
|
7273
|
+
"Page ",
|
|
7274
|
+
T + 1,
|
|
7275
|
+
" of ",
|
|
7276
|
+
f
|
|
7277
|
+
] })
|
|
7278
|
+
] }) }),
|
|
7243
7279
|
/* @__PURE__ */ o(re, { children: [
|
|
7244
7280
|
(s.title || s.subtitle || s.description) && /* @__PURE__ */ o("div", { className: "mb-4", children: [
|
|
7245
7281
|
s.title && /* @__PURE__ */ r(
|
|
@@ -7273,26 +7309,7 @@ const $a = {
|
|
|
7273
7309
|
" ",
|
|
7274
7310
|
ge
|
|
7275
7311
|
] }),
|
|
7276
|
-
w.map((
|
|
7277
|
-
] }),
|
|
7278
|
-
k > 1 && /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
|
|
7279
|
-
N.map((me, se) => /* @__PURE__ */ r(
|
|
7280
|
-
"div",
|
|
7281
|
-
{
|
|
7282
|
-
style: {
|
|
7283
|
-
height: "0.375rem",
|
|
7284
|
-
borderRadius: "9999px",
|
|
7285
|
-
transition: "all 150ms",
|
|
7286
|
-
...se === A ? { flex: "1 1 0%", backgroundColor: "var(--metakyc-primary, #2563eb)" } : se < A ? { width: "2rem", backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { width: "2rem", backgroundColor: "#e5e7eb" }
|
|
7287
|
-
}
|
|
7288
|
-
},
|
|
7289
|
-
se
|
|
7290
|
-
)),
|
|
7291
|
-
/* @__PURE__ */ o("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
|
|
7292
|
-
A + 1,
|
|
7293
|
-
" / ",
|
|
7294
|
-
k
|
|
7295
|
-
] })
|
|
7312
|
+
w.map((pe, ke) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: pe }, ke))
|
|
7296
7313
|
] }),
|
|
7297
7314
|
O(s)
|
|
7298
7315
|
] }),
|
|
@@ -7358,9 +7375,9 @@ const on = ({
|
|
|
7358
7375
|
const b = t || ((h = i.applicantForm) == null ? void 0 : h.externalRefId) || "", F = ((O = i.applicantForm) == null ? void 0 : O.email) || "", S = ((K = i.applicantForm) == null ? void 0 : K.initialValues) || {}, L = (((W = i.applicantForm) == null ? void 0 : W.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", v = De(
|
|
7359
7376
|
() => c != null && c.companyFormPages && c.companyFormPages.length > 0 ? c.companyFormPages : null,
|
|
7360
7377
|
[c == null ? void 0 : c.companyFormPages]
|
|
7361
|
-
),
|
|
7362
|
-
const u = new Set(Ot),
|
|
7363
|
-
if (
|
|
7378
|
+
), I = De(() => {
|
|
7379
|
+
const u = new Set(Ot), N = c == null ? void 0 : c.companyFormRequiredFields;
|
|
7380
|
+
if (N) for (const D of N) u.add(D);
|
|
7364
7381
|
if (v)
|
|
7365
7382
|
for (const D of v)
|
|
7366
7383
|
for (const m of D.fields)
|
|
@@ -7369,54 +7386,54 @@ const on = ({
|
|
|
7369
7386
|
}, [c == null ? void 0 : c.companyFormRequiredFields, v]), B = De(() => {
|
|
7370
7387
|
var u;
|
|
7371
7388
|
if (v) {
|
|
7372
|
-
const
|
|
7389
|
+
const N = v.flatMap((m) => m.fields).filter((m) => !m.isCustom && m.name).map((m) => m.name), D = new Set(N);
|
|
7373
7390
|
for (const m of Ot) D.add(m);
|
|
7374
7391
|
return Array.from(D);
|
|
7375
7392
|
}
|
|
7376
7393
|
return (u = i.applicantForm) != null && u.visibleFields ? i.applicantForm.visibleFields : c != null && c.companyFormVisibleFields && c.companyFormVisibleFields.length > 0 ? c.companyFormVisibleFields : mr;
|
|
7377
7394
|
}, [(X = i.applicantForm) == null ? void 0 : X.visibleFields, c == null ? void 0 : c.companyFormVisibleFields, v]), Y = /* @__PURE__ */ new Set(["countryResidence", "addressCountry"]), P = De(() => {
|
|
7378
|
-
var
|
|
7395
|
+
var N, D;
|
|
7379
7396
|
const u = /* @__PURE__ */ new Set();
|
|
7380
7397
|
if (v)
|
|
7381
7398
|
for (const m of v)
|
|
7382
7399
|
for (const s of m.fields)
|
|
7383
|
-
!s.isCustom && s.name && Y.has(s.name) && u.add(s.countriesType ?? ((
|
|
7400
|
+
!s.isCustom && s.name && Y.has(s.name) && u.add(s.countriesType ?? ((N = st[s.name]) == null ? void 0 : N.countriesType));
|
|
7384
7401
|
else
|
|
7385
7402
|
for (const m of B)
|
|
7386
7403
|
Y.has(m) && u.add((D = st[m]) == null ? void 0 : D.countriesType);
|
|
7387
7404
|
return u.size === 0 && u.add(void 0), Array.from(u);
|
|
7388
|
-
}, [B, v]), [z, Z] = x({}), [ne, R] = x(!0),
|
|
7405
|
+
}, [B, v]), [z, Z] = x({}), [ne, R] = x(!0), k = ce(/* @__PURE__ */ new Set()), $ = ce(/* @__PURE__ */ new Set());
|
|
7389
7406
|
fe(() => {
|
|
7390
7407
|
if (!c) return;
|
|
7391
7408
|
const u = P.filter((m) => {
|
|
7392
7409
|
const s = m != null ? String(m) : "all";
|
|
7393
|
-
return !$.current.has(s) && !
|
|
7410
|
+
return !$.current.has(s) && !k.current.has(s);
|
|
7394
7411
|
});
|
|
7395
7412
|
if (u.length === 0) {
|
|
7396
7413
|
P.every((s) => $.current.has(s != null ? String(s) : "all")) && R(!1);
|
|
7397
7414
|
return;
|
|
7398
7415
|
}
|
|
7399
7416
|
R(!0);
|
|
7400
|
-
const
|
|
7401
|
-
|
|
7417
|
+
const N = u.map((m) => m != null ? String(m) : "all");
|
|
7418
|
+
N.forEach((m) => k.current.add(m)), (async () => {
|
|
7402
7419
|
try {
|
|
7403
7420
|
const m = await Promise.all(
|
|
7404
7421
|
u.map(async (s) => {
|
|
7405
|
-
const g = s != null ? String(s) : "all", M = await l.getCountries("", i.locale || "en", s),
|
|
7406
|
-
return $.current.add(g),
|
|
7422
|
+
const g = s != null ? String(s) : "all", M = await l.getCountries("", i.locale || "en", s), f = /* @__PURE__ */ new Set(), C = M.map((w) => ({ value: w.abbreviation3 || w.abbreviation, label: w.name })).filter((w) => !w.value || f.has(w.value) ? !1 : (f.add(w.value), !0));
|
|
7423
|
+
return $.current.add(g), k.current.delete(g), [g, C];
|
|
7407
7424
|
})
|
|
7408
7425
|
);
|
|
7409
7426
|
Z((s) => ({ ...s, ...Object.fromEntries(m) }));
|
|
7410
7427
|
} catch (m) {
|
|
7411
|
-
|
|
7428
|
+
N.forEach((s) => k.current.delete(s)), console.error("Failed to load countries:", m);
|
|
7412
7429
|
} finally {
|
|
7413
7430
|
P.every((s) => $.current.has(s != null ? String(s) : "all")) && R(!1);
|
|
7414
7431
|
}
|
|
7415
7432
|
})();
|
|
7416
7433
|
}, [P, c]);
|
|
7417
|
-
const G = (u,
|
|
7434
|
+
const G = (u, N) => {
|
|
7418
7435
|
var s;
|
|
7419
|
-
const D =
|
|
7436
|
+
const D = N ?? ((s = st[u]) == null ? void 0 : s.countriesType), m = D != null ? String(D) : "all";
|
|
7420
7437
|
return z[m] || [];
|
|
7421
7438
|
}, V = {
|
|
7422
7439
|
companyName: 1,
|
|
@@ -7463,51 +7480,51 @@ const on = ({
|
|
|
7463
7480
|
lei: "",
|
|
7464
7481
|
externalRefId: b,
|
|
7465
7482
|
...j
|
|
7466
|
-
}), [q, ve] = x({}), [
|
|
7483
|
+
}), [q, ve] = x({}), [de, ue] = x(0), [xe, T] = x({}), [U, _] = x(null), [H, ge] = x(!1), E = (u, N) => ie((D) => ({ ...D, [u]: N })), ee = (u, N) => ve((D) => ({ ...D, [u]: N })), ye = (u) => !u.conditionalOn || q[u.conditionalOn] === "true", oe = v && de < v.length - 1 ? de + 1 : -1, Ne = v && de > 0 ? de - 1 : -1, $e = (u) => {
|
|
7467
7484
|
var D;
|
|
7468
|
-
const
|
|
7485
|
+
const N = {};
|
|
7469
7486
|
for (const m of u.fields)
|
|
7470
7487
|
if (m.isCustom) {
|
|
7471
7488
|
if (m.customType === "paragraph" || m.customType === "html" || m.customType === "br" || m.customType === "link") continue;
|
|
7472
7489
|
if (m.required && m.paramName) {
|
|
7473
7490
|
const s = q[m.paramName], g = m.displayText || m.label || m.paramName;
|
|
7474
|
-
m.customType === "checkbox" || m.customType === "link_checkbox" ? s !== "true" && (
|
|
7491
|
+
m.customType === "checkbox" || m.customType === "link_checkbox" ? s !== "true" && (N[m.paramName] = `${g} is required.`) : (!s || s.trim() === "") && (N[m.paramName] = `${g} is required.`);
|
|
7475
7492
|
}
|
|
7476
7493
|
} else if (m.name) {
|
|
7477
7494
|
const s = m.name;
|
|
7478
|
-
if (
|
|
7495
|
+
if (I.includes(s) && wt(Q[s])) {
|
|
7479
7496
|
const g = m.displayText || ((D = st[s]) == null ? void 0 : D.label) || s;
|
|
7480
|
-
|
|
7497
|
+
N[s] = `${g} is required.`;
|
|
7481
7498
|
}
|
|
7482
7499
|
}
|
|
7483
|
-
return
|
|
7500
|
+
return N;
|
|
7484
7501
|
}, Ie = async () => {
|
|
7485
7502
|
if (!v) return;
|
|
7486
|
-
const u = v[
|
|
7503
|
+
const u = v[de];
|
|
7487
7504
|
if (u.conditionalOn && !ye(u)) {
|
|
7488
|
-
|
|
7505
|
+
T({}), oe >= 0 ? ue(oe) : await je();
|
|
7489
7506
|
return;
|
|
7490
7507
|
}
|
|
7491
|
-
const
|
|
7492
|
-
if (Object.keys(
|
|
7493
|
-
|
|
7508
|
+
const N = $e(u);
|
|
7509
|
+
if (Object.keys(N).length > 0) {
|
|
7510
|
+
T(N);
|
|
7494
7511
|
return;
|
|
7495
7512
|
}
|
|
7496
|
-
|
|
7513
|
+
T({}), oe >= 0 ? ue(oe) : await je();
|
|
7497
7514
|
}, je = async () => {
|
|
7498
7515
|
var u;
|
|
7499
7516
|
if (v) {
|
|
7500
|
-
let
|
|
7517
|
+
let N = {};
|
|
7501
7518
|
for (const D of v)
|
|
7502
|
-
ye(D) && (
|
|
7503
|
-
if (Object.keys(
|
|
7504
|
-
|
|
7519
|
+
ye(D) && (N = { ...N, ...$e(D) });
|
|
7520
|
+
if (Object.keys(N).length > 0) {
|
|
7521
|
+
T(N);
|
|
7505
7522
|
return;
|
|
7506
7523
|
}
|
|
7507
7524
|
}
|
|
7508
7525
|
ge(!0), _(null);
|
|
7509
7526
|
try {
|
|
7510
|
-
const
|
|
7527
|
+
const N = {
|
|
7511
7528
|
workflowKey: Q.workflowKey,
|
|
7512
7529
|
externalRefId: ((u = Q.externalRefId) == null ? void 0 : u.trim()) || void 0
|
|
7513
7530
|
}, D = v ? v.filter((g) => ye(g)).flatMap((g) => g.fields).filter((g) => !g.isCustom && g.name).map((g) => g.name) : B;
|
|
@@ -7516,31 +7533,31 @@ const on = ({
|
|
|
7516
7533
|
if (!wt(M))
|
|
7517
7534
|
switch (g) {
|
|
7518
7535
|
case "companyName":
|
|
7519
|
-
|
|
7536
|
+
N.companyName = M;
|
|
7520
7537
|
break;
|
|
7521
7538
|
case "email":
|
|
7522
|
-
|
|
7539
|
+
N.companyEmail = M;
|
|
7523
7540
|
break;
|
|
7524
7541
|
case "phone":
|
|
7525
|
-
|
|
7542
|
+
N.companyPhone = M;
|
|
7526
7543
|
break;
|
|
7527
7544
|
case "registrationNumber":
|
|
7528
|
-
|
|
7545
|
+
N.companyRegistrationNumber = M;
|
|
7529
7546
|
break;
|
|
7530
7547
|
case "countryResidence":
|
|
7531
|
-
|
|
7548
|
+
N.companyCountry = M;
|
|
7532
7549
|
break;
|
|
7533
7550
|
case "city":
|
|
7534
|
-
|
|
7551
|
+
N.companyCity = M;
|
|
7535
7552
|
break;
|
|
7536
7553
|
case "street":
|
|
7537
|
-
|
|
7554
|
+
N.companyStreet = M;
|
|
7538
7555
|
break;
|
|
7539
7556
|
case "postalCode":
|
|
7540
|
-
|
|
7557
|
+
N.companyZip = M;
|
|
7541
7558
|
break;
|
|
7542
7559
|
default:
|
|
7543
|
-
|
|
7560
|
+
N[g] = M;
|
|
7544
7561
|
break;
|
|
7545
7562
|
}
|
|
7546
7563
|
}
|
|
@@ -7550,40 +7567,40 @@ const on = ({
|
|
|
7550
7567
|
if (ye(g))
|
|
7551
7568
|
for (const M of g.fields) {
|
|
7552
7569
|
if (!M.isCustom || !M.paramName || M.customType === "paragraph" || M.customType === "html" || M.customType === "br" || M.customType === "link") continue;
|
|
7553
|
-
const
|
|
7570
|
+
const f = q[M.paramName] ?? "";
|
|
7554
7571
|
let C;
|
|
7555
7572
|
if (M.customType === "checkbox" || M.customType === "link_checkbox")
|
|
7556
|
-
C =
|
|
7557
|
-
else if (C =
|
|
7573
|
+
C = f === "true" ? "yes" : "no";
|
|
7574
|
+
else if (C = f, !C && !M.required) continue;
|
|
7558
7575
|
m.push({ paramName: M.paramName, value: C });
|
|
7559
7576
|
}
|
|
7560
7577
|
}
|
|
7561
|
-
m.length > 0 && (
|
|
7562
|
-
const s = await d(
|
|
7578
|
+
m.length > 0 && (N.applicantAdditionalDatas = m);
|
|
7579
|
+
const s = await d(N);
|
|
7563
7580
|
a(s.applicantId);
|
|
7564
|
-
} catch (
|
|
7565
|
-
console.error("Error creating company applicant:",
|
|
7581
|
+
} catch (N) {
|
|
7582
|
+
console.error("Error creating company applicant:", N), _(N.message || "Failed to create company applicant");
|
|
7566
7583
|
} finally {
|
|
7567
7584
|
ge(!1);
|
|
7568
7585
|
}
|
|
7569
7586
|
}, it = async (u) => {
|
|
7570
|
-
var
|
|
7587
|
+
var N;
|
|
7571
7588
|
u.preventDefault();
|
|
7572
|
-
for (const D of
|
|
7589
|
+
for (const D of I)
|
|
7573
7590
|
if (wt(Q[D])) {
|
|
7574
|
-
const m = ((
|
|
7591
|
+
const m = ((N = st[D]) == null ? void 0 : N.label) || D;
|
|
7575
7592
|
_(`${m} is required.`);
|
|
7576
7593
|
return;
|
|
7577
7594
|
}
|
|
7578
7595
|
await je();
|
|
7579
|
-
}, Ze = (u,
|
|
7596
|
+
}, Ze = (u, N, D, m, s) => {
|
|
7580
7597
|
const g = st[u];
|
|
7581
7598
|
if (!g) return null;
|
|
7582
|
-
const M =
|
|
7599
|
+
const M = I.includes(u), f = xe[u], C = D || g.label, w = u in j, me = N ?? u, pe = s ? s !== "placeholder" : L, ke = pe ? C : void 0, Pe = pe ? "..." : C;
|
|
7583
7600
|
switch (g.type) {
|
|
7584
7601
|
case "select":
|
|
7585
7602
|
if (u === "countryResidence" || u === "addressCountry") {
|
|
7586
|
-
const
|
|
7603
|
+
const se = G(u, m);
|
|
7587
7604
|
return /* @__PURE__ */ r(
|
|
7588
7605
|
Ye,
|
|
7589
7606
|
{
|
|
@@ -7591,10 +7608,10 @@ const on = ({
|
|
|
7591
7608
|
label: ke,
|
|
7592
7609
|
value: Q[u] || "",
|
|
7593
7610
|
onChange: (_e) => E(u, _e),
|
|
7594
|
-
options: [{ value: "", label: `Select ${Pe.toLowerCase()}` }, ...
|
|
7611
|
+
options: [{ value: "", label: `Select ${Pe.toLowerCase()}` }, ...se],
|
|
7595
7612
|
disabled: ne,
|
|
7596
7613
|
readOnly: w,
|
|
7597
|
-
error:
|
|
7614
|
+
error: f
|
|
7598
7615
|
},
|
|
7599
7616
|
me
|
|
7600
7617
|
);
|
|
@@ -7607,11 +7624,11 @@ const on = ({
|
|
|
7607
7624
|
required: M,
|
|
7608
7625
|
type: "date",
|
|
7609
7626
|
label: ke,
|
|
7610
|
-
placeholder:
|
|
7627
|
+
placeholder: pe ? void 0 : C,
|
|
7611
7628
|
value: Q[u] || "",
|
|
7612
|
-
onChange: (
|
|
7629
|
+
onChange: (se) => E(u, se.target.value),
|
|
7613
7630
|
readOnly: w,
|
|
7614
|
-
error:
|
|
7631
|
+
error: f
|
|
7615
7632
|
},
|
|
7616
7633
|
me
|
|
7617
7634
|
);
|
|
@@ -7622,11 +7639,11 @@ const on = ({
|
|
|
7622
7639
|
required: M,
|
|
7623
7640
|
type: "email",
|
|
7624
7641
|
label: ke,
|
|
7625
|
-
placeholder:
|
|
7642
|
+
placeholder: pe ? void 0 : C,
|
|
7626
7643
|
value: Q[u] || "",
|
|
7627
|
-
onChange: (
|
|
7644
|
+
onChange: (se) => E(u, se.target.value),
|
|
7628
7645
|
readOnly: w,
|
|
7629
|
-
error:
|
|
7646
|
+
error: f
|
|
7630
7647
|
},
|
|
7631
7648
|
me
|
|
7632
7649
|
);
|
|
@@ -7637,11 +7654,11 @@ const on = ({
|
|
|
7637
7654
|
required: M,
|
|
7638
7655
|
type: "tel",
|
|
7639
7656
|
label: ke,
|
|
7640
|
-
placeholder:
|
|
7657
|
+
placeholder: pe ? void 0 : C,
|
|
7641
7658
|
value: Q[u] || "",
|
|
7642
|
-
onChange: (
|
|
7659
|
+
onChange: (se) => E(u, se.target.value),
|
|
7643
7660
|
readOnly: w,
|
|
7644
|
-
error:
|
|
7661
|
+
error: f
|
|
7645
7662
|
},
|
|
7646
7663
|
me
|
|
7647
7664
|
);
|
|
@@ -7652,16 +7669,16 @@ const on = ({
|
|
|
7652
7669
|
required: M,
|
|
7653
7670
|
type: "text",
|
|
7654
7671
|
label: ke,
|
|
7655
|
-
placeholder:
|
|
7672
|
+
placeholder: pe ? void 0 : C,
|
|
7656
7673
|
value: Q[u] || "",
|
|
7657
|
-
onChange: (
|
|
7674
|
+
onChange: (se) => E(u, se.target.value),
|
|
7658
7675
|
readOnly: w,
|
|
7659
|
-
error:
|
|
7676
|
+
error: f
|
|
7660
7677
|
},
|
|
7661
7678
|
me
|
|
7662
7679
|
);
|
|
7663
7680
|
}
|
|
7664
|
-
}, He = (u,
|
|
7681
|
+
}, He = (u, N) => {
|
|
7665
7682
|
if (u.customType === "paragraph")
|
|
7666
7683
|
return /* @__PURE__ */ r(
|
|
7667
7684
|
"p",
|
|
@@ -7669,12 +7686,12 @@ const on = ({
|
|
|
7669
7686
|
style: { fontSize: "14px", lineHeight: "1.7", margin: 0, color: "var(--metakyc-text-secondary, #6b7280)" },
|
|
7670
7687
|
dangerouslySetInnerHTML: { __html: u.displayText || u.label || "" }
|
|
7671
7688
|
},
|
|
7672
|
-
`custom-${
|
|
7689
|
+
`custom-${N}`
|
|
7673
7690
|
);
|
|
7674
7691
|
if (u.customType === "html")
|
|
7675
|
-
return /* @__PURE__ */ r("div", { dangerouslySetInnerHTML: { __html: u.label || "" } }, `custom-${
|
|
7692
|
+
return /* @__PURE__ */ r("div", { dangerouslySetInnerHTML: { __html: u.label || "" } }, `custom-${N}`);
|
|
7676
7693
|
if (u.customType === "br")
|
|
7677
|
-
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${
|
|
7694
|
+
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${N}`);
|
|
7678
7695
|
if (u.customType === "link")
|
|
7679
7696
|
return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
7680
7697
|
"a",
|
|
@@ -7685,7 +7702,7 @@ const on = ({
|
|
|
7685
7702
|
style: { color: "var(--metakyc-primary, #2563eb)", fontSize: "14px", textDecoration: "underline" },
|
|
7686
7703
|
children: u.displayText || u.label || u.linkText || u.linkUrl || ""
|
|
7687
7704
|
}
|
|
7688
|
-
) }, `custom-${
|
|
7705
|
+
) }, `custom-${N}`);
|
|
7689
7706
|
if (!u.paramName) return null;
|
|
7690
7707
|
const D = xe[u.paramName], m = u.displayText || u.label || u.paramName, s = u.labelMode ? u.labelMode !== "placeholder" : L;
|
|
7691
7708
|
return u.customType === "checkbox" ? /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -7703,7 +7720,7 @@ const on = ({
|
|
|
7703
7720
|
] })
|
|
7704
7721
|
] }),
|
|
7705
7722
|
D && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: D })
|
|
7706
|
-
] }, `custom-${
|
|
7723
|
+
] }, `custom-${N}`) : /* @__PURE__ */ r(
|
|
7707
7724
|
be,
|
|
7708
7725
|
{
|
|
7709
7726
|
type: "text",
|
|
@@ -7714,22 +7731,22 @@ const on = ({
|
|
|
7714
7731
|
required: u.required,
|
|
7715
7732
|
error: D
|
|
7716
7733
|
},
|
|
7717
|
-
`custom-${
|
|
7734
|
+
`custom-${N}`
|
|
7718
7735
|
);
|
|
7719
7736
|
}, ot = (u) => {
|
|
7720
|
-
const
|
|
7737
|
+
const N = ye(u);
|
|
7721
7738
|
return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
7722
7739
|
u.conditionalOn && /* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer" }, children: [
|
|
7723
7740
|
/* @__PURE__ */ r(
|
|
7724
7741
|
Be,
|
|
7725
7742
|
{
|
|
7726
|
-
checked:
|
|
7743
|
+
checked: N,
|
|
7727
7744
|
onChange: (D) => ee(u.conditionalOn, D ? "true" : "false")
|
|
7728
7745
|
}
|
|
7729
7746
|
),
|
|
7730
7747
|
/* @__PURE__ */ r("span", { style: { fontSize: "14px", fontWeight: 500 }, children: u.conditionalOn })
|
|
7731
7748
|
] }),
|
|
7732
|
-
|
|
7749
|
+
N && /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: u.fields.map((D, m) => {
|
|
7733
7750
|
const s = Math.min(4, Math.max(1, Number(D.colSpan) || 4)), g = D.isCustom ? `custom-${m}-${D.paramName}` : `builtin-${D.name}-${m}`;
|
|
7734
7751
|
return /* @__PURE__ */ r("div", { style: { gridColumn: `span ${s} / span ${s}` }, children: D.isCustom ? He(D, m) : Ze(D.name, g, D.displayText, D.countriesType, D.labelMode) }, g);
|
|
7735
7752
|
}) })
|
|
@@ -7741,7 +7758,7 @@ const on = ({
|
|
|
7741
7758
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
7742
7759
|
] }) }) });
|
|
7743
7760
|
if (v) {
|
|
7744
|
-
const u = v[
|
|
7761
|
+
const u = v[de] ?? v[0], N = Ne === -1, D = oe === -1, m = v.length, s = ye(u), g = Object.values(xe);
|
|
7745
7762
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(te, { children: [
|
|
7746
7763
|
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r(ut, { title: (c == null ? void 0 : c.title) || "Company Registration" }) }),
|
|
7747
7764
|
/* @__PURE__ */ o(re, { children: [
|
|
@@ -7755,23 +7772,23 @@ const on = ({
|
|
|
7755
7772
|
" ",
|
|
7756
7773
|
U
|
|
7757
7774
|
] }),
|
|
7758
|
-
g.map((M,
|
|
7775
|
+
g.map((M, f) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: M }, f))
|
|
7759
7776
|
] }),
|
|
7760
7777
|
m > 1 && /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
|
|
7761
|
-
v.map((M,
|
|
7778
|
+
v.map((M, f) => /* @__PURE__ */ r(
|
|
7762
7779
|
"div",
|
|
7763
7780
|
{
|
|
7764
7781
|
style: {
|
|
7765
7782
|
height: "0.375rem",
|
|
7766
7783
|
borderRadius: "9999px",
|
|
7767
7784
|
transition: "all 150ms",
|
|
7768
|
-
...
|
|
7785
|
+
...f === de ? { flex: "1 1 0%", backgroundColor: "var(--metakyc-primary, #2563eb)" } : f < de ? { width: "2rem", backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { width: "2rem", backgroundColor: "#e5e7eb" }
|
|
7769
7786
|
}
|
|
7770
7787
|
},
|
|
7771
|
-
|
|
7788
|
+
f
|
|
7772
7789
|
)),
|
|
7773
7790
|
/* @__PURE__ */ o("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
|
|
7774
|
-
|
|
7791
|
+
de + 1,
|
|
7775
7792
|
" / ",
|
|
7776
7793
|
m
|
|
7777
7794
|
] })
|
|
@@ -7780,19 +7797,19 @@ const on = ({
|
|
|
7780
7797
|
] }),
|
|
7781
7798
|
/* @__PURE__ */ o(Ce, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
7782
7799
|
/* @__PURE__ */ o("div", { children: [
|
|
7783
|
-
!
|
|
7800
|
+
!N && /* @__PURE__ */ r(
|
|
7784
7801
|
J,
|
|
7785
7802
|
{
|
|
7786
7803
|
type: "button",
|
|
7787
7804
|
variant: "outline",
|
|
7788
7805
|
onClick: () => {
|
|
7789
|
-
ue(Ne),
|
|
7806
|
+
ue(Ne), T({});
|
|
7790
7807
|
},
|
|
7791
7808
|
disabled: H || y,
|
|
7792
7809
|
children: "Previous"
|
|
7793
7810
|
}
|
|
7794
7811
|
),
|
|
7795
|
-
|
|
7812
|
+
N && n && /* @__PURE__ */ r(J, { type: "button", variant: "outline", onClick: n, disabled: H || y, children: "Cancel" })
|
|
7796
7813
|
] }),
|
|
7797
7814
|
/* @__PURE__ */ r(J, { type: "button", isLoading: H || y, onClick: D ? je : Ie, children: D ? u.conditionalOn && !s ? "Skip & Submit" : "Submit" : u.conditionalOn && !s ? "Skip" : "Next" })
|
|
7798
7815
|
] })
|
|
@@ -7829,8 +7846,8 @@ const on = ({
|
|
|
7829
7846
|
isLoading: b,
|
|
7830
7847
|
error: F,
|
|
7831
7848
|
moveBack: S,
|
|
7832
|
-
refreshProgress:
|
|
7833
|
-
} = Jr(e), [L, v] = we.useState(!1),
|
|
7849
|
+
refreshProgress: A
|
|
7850
|
+
} = Jr(e), [L, v] = we.useState(!1), I = we.useRef(null);
|
|
7834
7851
|
if (we.useEffect(() => {
|
|
7835
7852
|
F && a && a(F);
|
|
7836
7853
|
}, [F, a]), we.useEffect(() => {
|
|
@@ -7897,93 +7914,99 @@ const on = ({
|
|
|
7897
7914
|
] }) }) });
|
|
7898
7915
|
const B = (z) => {
|
|
7899
7916
|
switch (z) {
|
|
7900
|
-
case
|
|
7917
|
+
case le.Overview:
|
|
7901
7918
|
return "Overview";
|
|
7902
|
-
case
|
|
7919
|
+
case le.Questionaries:
|
|
7903
7920
|
return "Questionnaire";
|
|
7904
|
-
case
|
|
7921
|
+
case le.UploadDocument:
|
|
7905
7922
|
return "Documents";
|
|
7906
|
-
case
|
|
7923
|
+
case le.IdentitySdk:
|
|
7907
7924
|
return "Identity";
|
|
7908
|
-
case
|
|
7925
|
+
case le.RiskScoring:
|
|
7909
7926
|
return "Risk Assessment";
|
|
7910
|
-
case
|
|
7927
|
+
case le.InvestorCategorization:
|
|
7911
7928
|
return "Investor Categorization";
|
|
7912
|
-
case
|
|
7929
|
+
case le.AppropriatenessTest:
|
|
7913
7930
|
return "Appropriateness Test";
|
|
7914
|
-
case
|
|
7931
|
+
case le.AdditionalData:
|
|
7915
7932
|
return "Additional Data";
|
|
7916
|
-
case
|
|
7933
|
+
case le.ManualReview:
|
|
7917
7934
|
return "Review";
|
|
7918
7935
|
default:
|
|
7919
7936
|
return "";
|
|
7920
7937
|
}
|
|
7921
7938
|
}, Y = () => {
|
|
7922
|
-
const z = c.filter(($) => $.visibility !== !1), Z = z.findIndex(($) => $.order === l.order), ne = Z >= 0 ? Z + 1 : 1, R = z.length,
|
|
7939
|
+
const z = c.filter(($) => $.visibility !== !1), Z = z.findIndex(($) => $.order === l.order), ne = Z >= 0 ? Z + 1 : 1, R = z.length, k = R > 1 ? (Z + 1) / R * 100 : 100;
|
|
7923
7940
|
return /* @__PURE__ */ o("div", { style: {
|
|
7924
7941
|
marginBottom: "24px",
|
|
7925
7942
|
backgroundColor: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
|
|
7926
7943
|
borderRadius: "0.75rem",
|
|
7927
7944
|
border: "1px solid var(--metakyc-border, #e5e7eb)",
|
|
7928
|
-
padding: "1rem 1.5rem",
|
|
7929
7945
|
overflow: "hidden"
|
|
7930
7946
|
}, children: [
|
|
7931
|
-
/* @__PURE__ */ o("div", { style: {
|
|
7932
|
-
/* @__PURE__ */ r(
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7947
|
+
/* @__PURE__ */ o("div", { style: { position: "relative", height: "4px" }, children: [
|
|
7948
|
+
/* @__PURE__ */ r("div", { style: {
|
|
7949
|
+
position: "absolute",
|
|
7950
|
+
inset: 0,
|
|
7951
|
+
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
7952
|
+
opacity: 0.3
|
|
7953
|
+
} }),
|
|
7954
|
+
/* @__PURE__ */ r("div", { style: {
|
|
7955
|
+
position: "absolute",
|
|
7956
|
+
top: 0,
|
|
7957
|
+
left: 0,
|
|
7958
|
+
bottom: 0,
|
|
7959
|
+
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
7960
|
+
width: `${k}%`,
|
|
7961
|
+
transition: "width 0.4s ease"
|
|
7962
|
+
} })
|
|
7939
7963
|
] }),
|
|
7940
|
-
/* @__PURE__ */
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
)
|
|
7964
|
+
/* @__PURE__ */ o("div", { style: { padding: "1rem 1.5rem" }, children: [
|
|
7965
|
+
/* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: "16px" }, children: [
|
|
7966
|
+
/* @__PURE__ */ r(ut, {}),
|
|
7967
|
+
/* @__PURE__ */ o(jt, { variant: i.status === 1 ? "info" : "success", children: [
|
|
7968
|
+
"Step ",
|
|
7969
|
+
ne,
|
|
7970
|
+
" of ",
|
|
7971
|
+
R
|
|
7972
|
+
] })
|
|
7973
|
+
] }),
|
|
7974
|
+
/* @__PURE__ */ r(
|
|
7975
|
+
Ba,
|
|
7976
|
+
{
|
|
7977
|
+
ref: I,
|
|
7978
|
+
visibleSteps: z,
|
|
7979
|
+
currentVisibleStepIndex: Z,
|
|
7980
|
+
getStepFallbackName: B
|
|
7981
|
+
}
|
|
7982
|
+
)
|
|
7983
|
+
] })
|
|
7961
7984
|
] });
|
|
7962
7985
|
}, P = () => {
|
|
7963
7986
|
const z = {
|
|
7964
7987
|
applicantId: e,
|
|
7965
7988
|
onComplete: async () => {
|
|
7966
|
-
await
|
|
7989
|
+
await A();
|
|
7967
7990
|
},
|
|
7968
7991
|
onBack: l.order > 0 ? S : void 0
|
|
7969
7992
|
};
|
|
7970
7993
|
switch (l.action) {
|
|
7971
|
-
case
|
|
7994
|
+
case le.Questionaries:
|
|
7972
7995
|
return /* @__PURE__ */ r(ba, { ...z });
|
|
7973
|
-
case
|
|
7996
|
+
case le.UploadDocument:
|
|
7974
7997
|
return /* @__PURE__ */ r(wa, { ...z });
|
|
7975
|
-
case
|
|
7998
|
+
case le.Overview:
|
|
7976
7999
|
return /* @__PURE__ */ r(Sa, { ...z });
|
|
7977
|
-
case
|
|
8000
|
+
case le.IdentitySdk:
|
|
7978
8001
|
return /* @__PURE__ */ r(za, { ...z });
|
|
7979
|
-
case
|
|
8002
|
+
case le.RiskScoring:
|
|
7980
8003
|
return /* @__PURE__ */ r(Aa, { ...z });
|
|
7981
|
-
case
|
|
7982
|
-
case
|
|
8004
|
+
case le.AdditionalData:
|
|
8005
|
+
case le.InvestorCategorization:
|
|
7983
8006
|
return /* @__PURE__ */ r(La, { ...z });
|
|
7984
|
-
case
|
|
8007
|
+
case le.AppropriatenessTest:
|
|
7985
8008
|
return /* @__PURE__ */ r(Pa, { ...z });
|
|
7986
|
-
case
|
|
8009
|
+
case le.ManualReview:
|
|
7987
8010
|
return /* @__PURE__ */ r(
|
|
7988
8011
|
Mt,
|
|
7989
8012
|
{
|
|
@@ -8002,7 +8025,7 @@ const on = ({
|
|
|
8002
8025
|
] }),
|
|
8003
8026
|
/* @__PURE__ */ o("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
|
|
8004
8027
|
"Action type: ",
|
|
8005
|
-
|
|
8028
|
+
le[l.action]
|
|
8006
8029
|
] })
|
|
8007
8030
|
] }) });
|
|
8008
8031
|
}
|
|
@@ -8225,7 +8248,7 @@ export {
|
|
|
8225
8248
|
Mr as WorkflowOrchestrator,
|
|
8226
8249
|
ft as WorkflowResultType,
|
|
8227
8250
|
Pr as WorkflowState,
|
|
8228
|
-
|
|
8251
|
+
le as WorkflowStepAction,
|
|
8229
8252
|
pn as appropriatenessTestSchema,
|
|
8230
8253
|
rn as clearAllStorage,
|
|
8231
8254
|
Vr as clearApplicantId,
|