@incodetech/welcome 1.85.0-20251217140239.0 → 1.85.0-20251217192812.0

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.
@@ -18,7 +18,6 @@ export type SendAuthFaceImageResponse = {
18
18
  imageBase64?: string;
19
19
  selfieEncryptedBase64?: string;
20
20
  metadata?: string;
21
- videoFileURL?: string;
22
21
  };
23
22
  export declare const sendAuthFaceImage: ({ canvas, faceCoordinates, sessionToken, }: {
24
23
  canvas: IncodeCanvas;
@@ -24,3 +24,7 @@ export declare const VERIFICATION_STATES: {
24
24
  };
25
25
  export declare const COUNTRIES_WITH_CNPJ_VALIDATION: readonly ["BR"];
26
26
  export declare const COUNTRIES_WITH_SPECIAL_TAX_ID_RULES: readonly ["NG", "CM", "KE"];
27
+ export declare const BUSINESS_NAME_OPTIONAL_COUNTRIES: string[];
28
+ export declare const ADDRESS_OPTIONAL_COUNTRIES: string[];
29
+ export declare const UBO_OPTIONAL_COUNTRIES: string[];
30
+ export declare const ADDRESS_FIELDS: string[];
@@ -6,3 +6,4 @@ export declare function getFieldName(moduleName: string): string;
6
6
  * Filters and sorts modules based on custom order
7
7
  */
8
8
  export declare function sortModulesByOrder(modules: string[], customOrder: readonly string[]): string[];
9
+ export declare const isFieldOptional: (fieldName: string, countryCode: string) => boolean;
@@ -7,7 +7,6 @@ export declare class DeepsightVideoRecorder extends InterruptionHandler {
7
7
  private stream;
8
8
  recordingId: string | null;
9
9
  qsvWarning: string | null;
10
- videoFileURL: string | null;
11
10
  trimmedVideoBlob: Blob | null;
12
11
  setStreamAndStartRecording(stream: MediaStream): void;
13
12
  startRecording(): void;
@@ -1,6 +1,5 @@
1
1
  import { Session } from '../../../types/src';
2
- export declare const uploadDeepsightVideo: (video: Blob, token: Session['token'], contentType: string) => Promise<{
2
+ export declare const uploadDeepsightVideo: (video: string, token: Session['token']) => Promise<{
3
3
  recordingId: string;
4
- url: string;
5
4
  }>;
6
5
  export default uploadDeepsightVideo;
@@ -1 +1 @@
1
- export default function publishKeys(token: any): Promise<any>;
1
+ export default function publishKeys(token?: string): Promise<any>;
@@ -89,6 +89,7 @@ declare class MlWasmJSApi {
89
89
  allocateImageBuffers(imageWidth: number | null, imageHeight: number | null): Promise<void>;
90
90
  handleDetectionCallAndUpdateState(type: WasmPipelineType): Promise<void>;
91
91
  encryptImage(image: string): string;
92
+ ckvcks(data: ArrayBuffer): void;
92
93
  isVirtualCamera(label: string | null): boolean;
93
94
  estimatePerformance(): string;
94
95
  analyzeFrame(image: ImageData): Promise<void>;
@@ -7699,7 +7699,7 @@ function getProfile(Be) {
7699
7699
  throw new Error(`Profile not found for type: ${Be}`);
7700
7700
  return Le;
7701
7701
  }
7702
- const wasmVersion = "v2.12.45";
7702
+ const wasmVersion = "v2.12.46";
7703
7703
  function generateBundle() {
7704
7704
  const Be = getFeatureFlag("id_text_barcode_readability") ? PipelineProfileName.IdCapture_3_02 : getFeatureFlag("id_model_hebrew_back_id") ? PipelineProfileName.IdCapture_2_02 : PipelineProfileName.IdCapture_2_01, Le = PipelineProfileName.SelfieWithQualityMetrics, Ye = PipelineProfileName.SelfieVideoSelfie, tt = PipelineProfileName.IdVideoSelfie_2_01;
7705
7705
  return [
@@ -7801,6 +7801,11 @@ class MlWasmJSApi {
7801
7801
  "Unable to encrypt the image, cpp API hasn't been initialized"
7802
7802
  ), this.utilityApi.encryptImage(Le);
7803
7803
  }
7804
+ ckvcks(Le) {
7805
+ this.checkWasmInitialization(
7806
+ "Unable to compute video checksum, cpp API hasn't been initialized"
7807
+ ), this.utilityApi.ckvcks(Le);
7808
+ }
7804
7809
  isVirtualCamera(Le) {
7805
7810
  if (this.checkWasmInitialization(
7806
7811
  "Unable to check if the camera is virtual, cpp API hasn't been initialized"
@@ -8282,7 +8287,7 @@ class MlWasmJSApi {
8282
8287
  );
8283
8288
  }
8284
8289
  }
8285
- const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251217140239.0";
8290
+ const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251217192812.0";
8286
8291
  function e$2(Be, Le) {
8287
8292
  return function(Ye, tt) {
8288
8293
  return Object.prototype.hasOwnProperty.call(Ye, tt);
@@ -161231,41 +161236,37 @@ const ERROR_RESPONSE_BODY_READER = new Error("failed to get response body reader
161231
161236
  }, toBlobURL = async (Be, Le, Ye = !1, tt) => {
161232
161237
  const nt = Ye ? await downloadWithProgress(Be, tt) : await (await fetch(Be)).arrayBuffer(), ft = new Blob([nt], { type: Le });
161233
161238
  return URL.createObjectURL(ft);
161234
- };
161235
- async function generateSessionRecordingUploadUrl({
161236
- token: Be,
161237
- type: Le
161238
- }) {
161239
- return api.get(
161240
- "/omni/generateSessionRecordingUploadUrl",
161241
- {
161242
- params: { type: Le },
161243
- headers: {
161244
- "X-Incode-Hardware-Id": Be
161245
- }
161246
- }
161247
- ).then((Ye) => Ye.data);
161248
- }
161249
- const uploadDeepsightVideo = async (Be, Le, Ye) => {
161250
- const { recordingId: tt, url: nt } = await generateSessionRecordingUploadUrl({
161251
- token: Le,
161252
- type: "selfie"
161253
- });
161239
+ }, uploadDeepsightVideo = async (Be, Le) => {
161254
161240
  try {
161255
- return await fetch(nt, {
161256
- method: "PUT",
161257
- body: Be,
161258
- headers: {
161259
- "Content-Type": Ye
161241
+ return (await api.post(
161242
+ "/omni/recordings/import",
161243
+ {
161244
+ video: Be,
161245
+ type: "selfie"
161246
+ },
161247
+ {
161248
+ headers: {
161249
+ "X-Incode-Hardware-Id": Le
161250
+ }
161260
161251
  }
161261
- }), { recordingId: tt, url: nt };
161262
- } catch (ft) {
161263
- return console.error("Error uploading video:", ft), {
161264
- recordingId: void 0,
161265
- url: void 0
161252
+ )).data;
161253
+ } catch (Ye) {
161254
+ return console.error("Error uploading video:", Ye), {
161255
+ recordingId: void 0
161266
161256
  };
161267
161257
  }
161268
161258
  };
161259
+ function toBase64(Be) {
161260
+ return new Promise((Le, Ye) => {
161261
+ const tt = new FileReader();
161262
+ tt.onloadend = () => {
161263
+ const ft = tt.result.split(",")[1];
161264
+ Le(ft);
161265
+ }, tt.onerror = () => {
161266
+ Ye(tt.error ?? new Error("FileReader error"));
161267
+ }, tt.readAsDataURL(Be);
161268
+ });
161269
+ }
161269
161270
  function getAdaptiveMediaRecorderOptions() {
161270
161271
  const Be = getSupportedMediaRecorderMimeType();
161271
161272
  return mobile.iOS() ? {
@@ -161413,7 +161414,7 @@ async function trimLastNSecondsUsingPlayback(Be, Le) {
161413
161414
  }
161414
161415
  class DeepsightVideoRecorder extends InterruptionHandler {
161415
161416
  constructor() {
161416
- super(...arguments), this.mediaRecorder = null, this.isRecording = !1, this.error = null, this.mimeType = "", this.stream = null, this.recordingId = null, this.qsvWarning = null, this.videoFileURL = null, this.trimmedVideoBlob = null;
161417
+ super(...arguments), this.mediaRecorder = null, this.isRecording = !1, this.error = null, this.mimeType = "", this.stream = null, this.recordingId = null, this.qsvWarning = null, this.trimmedVideoBlob = null;
161417
161418
  }
161418
161419
  setStreamAndStartRecording(Le) {
161419
161420
  this.stream = Le, this.startRecording();
@@ -161432,23 +161433,30 @@ class DeepsightVideoRecorder extends InterruptionHandler {
161432
161433
  }
161433
161434
  }
161434
161435
  async stopRecording(Le, Ye = !1) {
161435
- return new Promise((tt) => {
161436
+ return new Promise((tt, nt) => {
161436
161437
  if (this.removeEventListeners(), this.mediaRecorder && this.isRecording) {
161437
- const nt = [];
161438
- this.mediaRecorder.ondataavailable = (ft) => {
161439
- ft.data.size > 0 && nt.push(ft.data);
161438
+ const ft = [];
161439
+ this.mediaRecorder.ondataavailable = (ht) => {
161440
+ ht.data.size > 0 && ft.push(ht.data);
161440
161441
  }, this.mediaRecorder.onstop = async () => {
161441
- var gt, At;
161442
- const ft = new Blob(nt, { type: this.mimeType }), ht = await trimLastNSeconds(ft, 10);
161443
- if (this.trimmedVideoBlob = ht, !Ye) {
161444
- const { recordingId: xt, url: Et } = await uploadDeepsightVideo(
161445
- ht,
161446
- Le,
161447
- this.mimeType
161442
+ var ht, gt;
161443
+ try {
161444
+ const At = new Blob(ft, { type: this.mimeType }), xt = await trimLastNSeconds(At, 10);
161445
+ this.trimmedVideoBlob = xt;
161446
+ const Et = MlWasmJSApi$1.encryptImage(
161447
+ await toBase64(xt)
161448
161448
  );
161449
- this.recordingId = xt ?? null, this.videoFileURL = Et ?? null;
161449
+ if (MlWasmJSApi$1.ckvcks(await xt.arrayBuffer()), !Ye) {
161450
+ const { recordingId: yt } = await uploadDeepsightVideo(
161451
+ Et,
161452
+ Le
161453
+ );
161454
+ this.recordingId = yt ?? null;
161455
+ }
161456
+ this.isRecording = !1, (gt = (ht = this.mediaRecorder) == null ? void 0 : ht.stream) == null || gt.getTracks().forEach((yt) => yt.stop()), tt();
161457
+ } catch (At) {
161458
+ this.isRecording = !1, this.error = `Recording stop failed: ${At}`, nt(At);
161450
161459
  }
161451
- this.isRecording = !1, (At = (gt = this.mediaRecorder) == null ? void 0 : gt.stream) == null || At.getTracks().forEach((xt) => xt.stop()), tt();
161452
161460
  }, this.mediaRecorder.stop(), this.isRecording = !1;
161453
161461
  } else
161454
161462
  tt();
@@ -172636,12 +172644,12 @@ const faceFlowManager = new FaceFlowManager(), useFaceFlowState = () => {
172636
172644
  faceCoordinates: Le,
172637
172645
  sessionToken: Ye
172638
172646
  }) => {
172639
- var tt, nt;
172647
+ var tt;
172640
172648
  try {
172641
172649
  faceFlowManager.incrementAttempts(), handleScreenEvent(Ye, eventScreenNames.authFaceUpload, !0);
172642
- const ft = Be.getBase64Image();
172643
- await onboardingAnalytics.analyzeFrame(ft), onboardingAnalytics.update(), MlWasmJSApi$1.reset();
172644
- const ht = await MlWasmJSApi$1.encryptImage(ft);
172650
+ const nt = Be.getBase64Image();
172651
+ await onboardingAnalytics.analyzeFrame(nt), onboardingAnalytics.update(), MlWasmJSApi$1.reset();
172652
+ const ft = await MlWasmJSApi$1.encryptImage(nt);
172645
172653
  addEvent({
172646
172654
  token: Ye,
172647
172655
  code: "captureAttemptFinished",
@@ -172656,17 +172664,17 @@ const faceFlowManager = new FaceFlowManager(), useFaceFlowState = () => {
172656
172664
  selfieStatsAnalysisStatus: onboardingAnalytics.getAnalysisStatus(),
172657
172665
  motionStatus: onboardingAnalytics.getMotionStatus()
172658
172666
  });
172659
- const gt = await capture({
172667
+ const ht = await capture({
172660
172668
  type: "authFace",
172661
172669
  token: Ye,
172662
- image: ht,
172670
+ image: ft,
172663
172671
  authHint: faceFlowManager.authHint,
172664
172672
  encrypted: !0,
172665
172673
  faceCoordinates: Le,
172666
172674
  recordingId: (tt = faceFlowManager.deepsightVideoRecorder) == null ? void 0 : tt.recordingId,
172667
172675
  metadata: onboardingAnalytics.getMetadata()
172668
172676
  });
172669
- if (gt.overallStatus !== "PASS") {
172677
+ if (ht.overallStatus !== "PASS") {
172670
172678
  if (faceFlowManager.getAttemptsLeft() === 0) {
172671
172679
  handleScreenEvent(Ye, eventScreenNames.authFaceUpload, !1), handleScreenEvent(Ye, eventScreenNames.authFaceError, !0), faceFlowManager.completeWithError({
172672
172680
  code: "NO_MORE_ATTEMPTS",
@@ -172675,19 +172683,19 @@ const faceFlowManager = new FaceFlowManager(), useFaceFlowState = () => {
172675
172683
  });
172676
172684
  return;
172677
172685
  }
172678
- throw gt.error.name === "SPOOF_ATTEMPT_DETECTED" && handleError(Ye, FACE_ERROR_CODES.SPOOF_ATTEMPT_DETECTED), gt.error.name === "FACE_TOO_DARK" && handleError(Ye, FACE_ERROR_CODES.FACE_TOO_DARK), gt.error.name === "LENSES_DETECTED" && handleError(Ye, FACE_ERROR_CODES.LENSES_DETECTED), gt.error.name === "FACE_MASK_DETECTED" && handleError(Ye, FACE_ERROR_CODES.FACE_MASK_DETECTED), gt.error.name === "CLOSED_EYES_DETECTED" && handleError(Ye, FACE_ERROR_CODES.CLOSED_EYES_DETECTED), gt.error.name === "HEAD_COVER_DETECTED" && handleError(Ye, FACE_ERROR_CODES.HEAD_COVER_DETECTED), gt.error.name === "FACE_NOT_FOUND" && handleError(Ye, FACE_ERROR_CODES.FACE_NOT_FOUND), gt.error.name === "FACE_CROPPING_FAILED" && handleError(Ye, FACE_ERROR_CODES.FACE_CROPPING_FAILED), gt.error.name === "FACE_TOO_SMALL" && handleError(Ye, FACE_ERROR_CODES.FACE_TOO_SMALL), gt.error.name === "FACE_TOO_BLURRY" && handleError(Ye, FACE_ERROR_CODES.FACE_TOO_BLURRY), gt.error.name === "BAD_PHOTO_QUALITY" && handleError(Ye, FACE_ERROR_CODES.BAD_PHOTO_QUALITY), gt.error.name === "PROCESSING_ERROR" && handleError(Ye, FACE_ERROR_CODES.PROCESSING_ERROR), gt.error.name === "BAD_REQUEST" && handleError(Ye, FACE_ERROR_CODES.BAD_REQUEST), gt.error.name === "SERVER" && handleError(Ye, FACE_ERROR_CODES.SERVER), gt.error.name === "USER_IS_NOT_RECOGNIZED" && handleError(Ye, FACE_ERROR_CODES.USER_IS_NOT_RECOGNIZED), gt.error.name === "NONEXISTENT_CUSTOMER" && (handleScreenEvent(Ye, eventScreenNames.authFaceUpload, !1), handleScreenEvent(Ye, eventScreenNames.authFaceError, !0), faceFlowManager.completeWithError({
172686
+ throw ht.error.name === "SPOOF_ATTEMPT_DETECTED" && handleError(Ye, FACE_ERROR_CODES.SPOOF_ATTEMPT_DETECTED), ht.error.name === "FACE_TOO_DARK" && handleError(Ye, FACE_ERROR_CODES.FACE_TOO_DARK), ht.error.name === "LENSES_DETECTED" && handleError(Ye, FACE_ERROR_CODES.LENSES_DETECTED), ht.error.name === "FACE_MASK_DETECTED" && handleError(Ye, FACE_ERROR_CODES.FACE_MASK_DETECTED), ht.error.name === "CLOSED_EYES_DETECTED" && handleError(Ye, FACE_ERROR_CODES.CLOSED_EYES_DETECTED), ht.error.name === "HEAD_COVER_DETECTED" && handleError(Ye, FACE_ERROR_CODES.HEAD_COVER_DETECTED), ht.error.name === "FACE_NOT_FOUND" && handleError(Ye, FACE_ERROR_CODES.FACE_NOT_FOUND), ht.error.name === "FACE_CROPPING_FAILED" && handleError(Ye, FACE_ERROR_CODES.FACE_CROPPING_FAILED), ht.error.name === "FACE_TOO_SMALL" && handleError(Ye, FACE_ERROR_CODES.FACE_TOO_SMALL), ht.error.name === "FACE_TOO_BLURRY" && handleError(Ye, FACE_ERROR_CODES.FACE_TOO_BLURRY), ht.error.name === "BAD_PHOTO_QUALITY" && handleError(Ye, FACE_ERROR_CODES.BAD_PHOTO_QUALITY), ht.error.name === "PROCESSING_ERROR" && handleError(Ye, FACE_ERROR_CODES.PROCESSING_ERROR), ht.error.name === "BAD_REQUEST" && handleError(Ye, FACE_ERROR_CODES.BAD_REQUEST), ht.error.name === "SERVER" && handleError(Ye, FACE_ERROR_CODES.SERVER), ht.error.name === "USER_IS_NOT_RECOGNIZED" && handleError(Ye, FACE_ERROR_CODES.USER_IS_NOT_RECOGNIZED), ht.error.name === "NONEXISTENT_CUSTOMER" && (handleScreenEvent(Ye, eventScreenNames.authFaceUpload, !1), handleScreenEvent(Ye, eventScreenNames.authFaceError, !0), faceFlowManager.completeWithError({
172679
172687
  code: "NONEXISTENT_CUSTOMER",
172680
172688
  message: "Non-existent customer",
172681
172689
  error: new Error("Non-existent customer")
172682
- })), gt.error.name === "HINT_NOT_PROVIDED" && (handleScreenEvent(Ye, eventScreenNames.authFaceUpload, !1), handleScreenEvent(Ye, eventScreenNames.authFaceError, !0), faceFlowManager.completeWithError({
172690
+ })), ht.error.name === "HINT_NOT_PROVIDED" && (handleScreenEvent(Ye, eventScreenNames.authFaceUpload, !1), handleScreenEvent(Ye, eventScreenNames.authFaceError, !0), faceFlowManager.completeWithError({
172683
172691
  code: "HINT_NOT_PROVIDED",
172684
172692
  message: "Hint not provided",
172685
172693
  error: new Error("Hint not provided")
172686
- })), new Error(gt.error.name);
172694
+ })), new Error(ht.error.name);
172687
172695
  }
172688
- return gt.imageBase64 = ft, gt.selfieEncryptedBase64 = ht, gt.metadata = onboardingAnalytics.getMetadata(), gt.videoFileURL = (nt = faceFlowManager.deepsightVideoRecorder) == null ? void 0 : nt.videoFileURL, gt;
172689
- } catch (ft) {
172690
- throw ft instanceof Error && isKnownError(ft) ? ft : new Error(FACE_ERROR_CODES.SERVER);
172696
+ return ht.imageBase64 = nt, ht.selfieEncryptedBase64 = ft, ht.metadata = onboardingAnalytics.getMetadata(), ht;
172697
+ } catch (nt) {
172698
+ throw nt instanceof Error && isKnownError(nt) ? nt : new Error(FACE_ERROR_CODES.SERVER);
172691
172699
  }
172692
172700
  };
172693
172701
  class DetectionManager {
@@ -354780,7 +354788,14 @@ const UBO_INPUT_LIMIT = 8, FIELD_ORDER = [
354780
354788
  VERIFYING: "verifying...",
354781
354789
  SUCCESS: "success",
354782
354790
  FAILED: "failed"
354783
- }, COUNTRIES_WITH_CNPJ_VALIDATION = ["BR"], COUNTRIES_WITH_SPECIAL_TAX_ID_RULES = ["NG", "CM", "KE"], CNPJ_FORMATTED_LENGTH = 18, CNPJ_CLEAN_LENGTH = 14, INVALID_CNPJ_PATTERNS = [
354791
+ }, COUNTRIES_WITH_CNPJ_VALIDATION = ["BR"], COUNTRIES_WITH_SPECIAL_TAX_ID_RULES = ["NG", "CM", "KE"], BUSINESS_NAME_OPTIONAL_COUNTRIES = ["BR"], ADDRESS_OPTIONAL_COUNTRIES = ["GB", "BR", "FR"], UBO_OPTIONAL_COUNTRIES = ["GB", "BR", "FR"], ADDRESS_FIELDS = [
354792
+ "street",
354793
+ "houseNo",
354794
+ "addressLine2",
354795
+ "city",
354796
+ "state",
354797
+ "postalCode"
354798
+ ], CNPJ_FORMATTED_LENGTH = 18, CNPJ_CLEAN_LENGTH = 14, INVALID_CNPJ_PATTERNS = [
354784
354799
  "00000000000000",
354785
354800
  "11111111111111",
354786
354801
  "22222222222222",
@@ -354990,7 +355005,7 @@ function sortModulesByOrder(Be, Le) {
354990
355005
  return nt !== -1 && ft !== -1 ? nt - ft : nt !== -1 ? -1 : ft !== -1 ? 1 : 0;
354991
355006
  });
354992
355007
  }
354993
- const sharedStyle$1 = lt`
355008
+ const isFieldOptional = (Be, Le) => Be === "businessName" ? BUSINESS_NAME_OPTIONAL_COUNTRIES.includes(Le) : ADDRESS_FIELDS.includes(Be) ? ADDRESS_OPTIONAL_COUNTRIES.includes(Le) : Be === "ubo" ? UBO_OPTIONAL_COUNTRIES.includes(Le) : !1, sharedStyle$1 = lt`
354994
355009
  background-color: transparent;
354995
355010
  width: 100%;
354996
355011
  border: none;
@@ -355085,7 +355100,7 @@ const sharedStyle$1 = lt`
355085
355100
  flow: Ye,
355086
355101
  token: tt
355087
355102
  }) => {
355088
- var $t;
355103
+ var Lt;
355089
355104
  const [nt, ft] = useState(
355090
355105
  VERIFICATION_STATES.IDLE
355091
355106
  ), { uboCount: ht, handleAddUbo: gt, extractUboNames: At } = useUboManagement(), {
@@ -355121,25 +355136,25 @@ const sharedStyle$1 = lt`
355121
355136
  screen: "EKYB",
355122
355137
  token: tt
355123
355138
  });
355124
- const Dt = Le ? Le.filter((Kt) => Kt === "ubos-user_input" ? (wt = !0, !1) : !0) : ($t = Ye == null ? void 0 : Ye.modules) == null ? void 0 : $t.filter(
355125
- (Kt) => Kt.includes("user_input") && !Kt.includes("socure") && Kt !== "ubos-user_input"
355126
- ), Pt = sortModulesByOrder(Dt || [], FIELD_ORDER), Nt = async (Kt) => {
355139
+ const Dt = Le ? Le.filter((Wt) => Wt === "ubos-user_input" ? (wt = !0, !1) : !0) : (Lt = Ye == null ? void 0 : Ye.modules) == null ? void 0 : Lt.filter(
355140
+ (Wt) => Wt.includes("user_input") && !Wt.includes("socure") && Wt !== "ubos-user_input"
355141
+ ), Pt = sortModulesByOrder(Dt || [], FIELD_ORDER), Nt = async (Wt) => {
355127
355142
  ft(VERIFICATION_STATES.VERIFYING);
355128
- const Vt = At(Kt), Ut = {
355129
- ...Kt,
355143
+ const $t = At(Wt), Kt = {
355144
+ ...Wt,
355130
355145
  plugins: ["ekyb"],
355131
- uboNames: Vt
355146
+ uboNames: $t
355132
355147
  };
355133
355148
  try {
355134
355149
  await sendEkyb({
355135
355150
  token: tt,
355136
- body: Ut
355151
+ body: Kt
355137
355152
  }), ft(VERIFICATION_STATES.SUCCESS);
355138
355153
  } catch {
355139
355154
  ft(VERIFICATION_STATES.FAILED);
355140
355155
  }
355141
355156
  Be();
355142
- }, Lt = Tt === "GB", Wt = Tt === "GB";
355157
+ };
355143
355158
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(VerificationContainer, { children: [
355144
355159
  /* @__PURE__ */ jsxRuntimeExports.jsx(InformationVerificationTitle, { children: It("ekyb.title") }),
355145
355160
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -355156,12 +355171,12 @@ const sharedStyle$1 = lt`
355156
355171
  errors: yt
355157
355172
  }
355158
355173
  ),
355159
- Pt.map((Kt) => {
355160
- const Vt = getFieldName(Kt);
355174
+ Pt.map((Wt) => {
355175
+ const $t = getFieldName(Wt), Kt = isFieldOptional($t, Tt);
355161
355176
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
355162
355177
  FieldInput,
355163
355178
  {
355164
- name: Vt,
355179
+ name: $t,
355165
355180
  country: Tt,
355166
355181
  state: Rt,
355167
355182
  isUnitedStates: Bt,
@@ -355169,9 +355184,9 @@ const sharedStyle$1 = lt`
355169
355184
  setValue: Ct,
355170
355185
  trigger: vt,
355171
355186
  errors: yt,
355172
- optional: Wt
355187
+ optional: Kt
355173
355188
  },
355174
- Vt
355189
+ $t
355175
355190
  );
355176
355191
  }),
355177
355192
  wt && /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -355180,7 +355195,7 @@ const sharedStyle$1 = lt`
355180
355195
  uboCount: ht,
355181
355196
  register: xt,
355182
355197
  errors: yt,
355183
- optional: Lt
355198
+ optional: isFieldOptional("ubo", Tt)
355184
355199
  }
355185
355200
  ),
355186
355201
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonsContainer$1, { children: [