@adyen/kyc-components 4.0.0-beta.0 → 4.0.0-beta.3

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.
Files changed (749) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-Dh7RSJoE.js → AcceptTermsOfServiceComponent-i222mdxX.js} +54 -59
  2. package/dist/{AccountSetupRejected-PdYyKwbS.js → AccountSetupRejected-DHph9lFl.js} +6 -6
  3. package/dist/{Avatar-C8aZB2wq.js → Avatar-vCjWXfC7.js} +2 -2
  4. package/dist/{BusinessDetailsDropin-DC8FEWvP.js → BusinessDetailsDropin-DQcfiSR8.js} +408 -393
  5. package/dist/{BusinessFinancingComponent-B0vW7r62.js → BusinessFinancingComponent-DC3jzBrq.js} +3 -3
  6. package/dist/{BusinessFinancingDropin-D8HAwTSq.js → BusinessFinancingDropin-D2lMEbNh.js} +529 -701
  7. package/dist/{BusinessFinancingPage-L1APYvzn.js → BusinessFinancingPage-BPD2cSDR.js} +3 -3
  8. package/dist/{BusinessTypeSelectionPage-sfGqHnp6.js → BusinessTypeSelectionPage-Cdp8joPJ.js} +86 -91
  9. package/dist/{CZ-BhoS6sd6.js → CZ-BiPeoA9G.js} +11 -1
  10. package/dist/ContractViewer-B0bZ14Ts.js +947 -0
  11. package/dist/{CreateIndividualComponent-i-QNCzp0.js → CreateIndividualComponent-D9wnexv4.js} +7 -8
  12. package/dist/{CreateTransferInstrumentComponent-8n3tjBYK.js → CreateTransferInstrumentComponent-COzPdQjC.js} +4 -5
  13. package/dist/{CustomerSupport-BER6nSK2.js → CustomerSupport-NGBoBg3N.js} +27 -33
  14. package/dist/{DebugModal-DeSsKkh_.js → DebugModal-I2U6TjGT.js} +43 -69
  15. package/dist/{DecisionMakerDetailsPage-DgjlfKyP.js → DecisionMakerDetailsPage-BN-H1sJF.js} +3 -4
  16. package/dist/{DecisionMakers-D2TjKnOc.js → DecisionMakers-CZ5-IRtU.js} +128 -25
  17. package/dist/{ES-JRIf-4xI.js → ES-BlWV7xvh.js} +4 -6
  18. package/dist/{EmbeddedStatus-Bn5KNA0V.js → EmbeddedStatus-Blr0seRl.js} +13 -5
  19. package/dist/FormEndState-JB6QFSet.js +59 -0
  20. package/dist/{FormFlow-CZgc09E3.js → FormFlow-DjvdNEiV.js} +18 -22
  21. package/dist/{HU-v3vOxRm8.js → HU-D8vJYkDH.js} +10 -1
  22. package/dist/{IndividualOnfidoDropin-D6uwo7VI.js → IndividualOnfidoDropin-DHhyO2ai.js} +1364 -867
  23. package/dist/{Introduction-DW2IQ57R.js → Introduction-erRXgreE.js} +32 -35
  24. package/dist/LandingLayout-B45lEjOv.js +84 -0
  25. package/dist/{LegalRepresentativeDetailsPage-BfIDXqv1.js → LegalRepresentativeDetailsPage-rS5K4657.js} +3 -4
  26. package/dist/{ManageIndividualComponent-DJoEsE2m.js → ManageIndividualComponent-BEzE5lkX.js} +8 -12
  27. package/dist/{ManagePCIComponent-BGESFWL6.js → ManagePCIComponent-BgdGfAuT.js} +5 -5
  28. package/dist/{ManageTermsOfServiceComponent-_wTZrjqd.js → ManageTermsOfServiceComponent-BWkwy6YC.js} +7 -8
  29. package/dist/{ManageTransferInstrumentComponent-Cvc3kk94.js → ManageTransferInstrumentComponent-B8kRNftW.js} +21 -34
  30. package/dist/{OnboardingDropinComponent-CocnpjvA.js → OnboardingDropinComponent-DBW5N3Dr.js} +325 -364
  31. package/dist/{ProviderButton-vD5DUJaN.js → ProviderButton-B58n0cRC.js} +13 -24
  32. package/dist/{Review-BFgzcIDj.js → Review-O6Al47Cu.js} +11 -12
  33. package/dist/{RootBusinessDetailsPage-C6lHQShI.js → RootBusinessDetailsPage-q_6wAcer.js} +3 -4
  34. package/dist/{RootIndividualDetailsPage-DfpqHdAS.js → RootIndividualDetailsPage-CiXgSJsV.js} +3 -4
  35. package/dist/{SignPCIComponent-D35913wJ.js → SignPCIComponent-cqRNhGdl.js} +17 -23
  36. package/dist/{SingpassSelection-D2Xe1wGv.js → SingpassSelection-BWEJ3Yi-.js} +6 -9
  37. package/dist/{SoleProprietorshipPage-D2F8Ghmo.js → SoleProprietorshipPage-CRcJSpn9.js} +4 -5
  38. package/dist/{SourceOfFundsPage-RjAcZ3Bo.js → SourceOfFundsPage-BxLGXTHb.js} +533 -517
  39. package/dist/{StoreProvider-COHi02bX.js → StoreProvider-ClKLaHzy.js} +23640 -25317
  40. package/dist/{TaskItemStatus-Bi1L8gea.js → TaskItemStatus-DrTIwCTx.js} +14 -14
  41. package/dist/TaskStatusIndicator-CTtKjo0m.js +69 -0
  42. package/dist/{TaxReportingDropin-BLXgRbuR.js → TaxReportingDropin-DFZ2ehfk.js} +82 -102
  43. package/dist/{TileGroup-B1IymoWv.js → TileGroup-BtE472I1.js} +6 -8
  44. package/dist/{TrustDetailsPage-DVvGJ_Ta.js → TrustDetailsPage-CGiiTbfR.js} +93 -114
  45. package/dist/{TrustMemberCompanyPage-D0wTEhuh.js → TrustMemberCompanyPage-oLNhg0hg.js} +4 -5
  46. package/dist/{TrustMemberIndividualPage-BLuaBi3j.js → TrustMemberIndividualPage-Bgsis586.js} +3 -4
  47. package/dist/{UnincorporatedPartnershipIndividualPage-BhIihH2v.js → UnincorporatedPartnershipIndividualPage-DPE3grqL.js} +3 -4
  48. package/dist/{UnincorporatedPartnershipMemberCompanyPage-CgujXwfX.js → UnincorporatedPartnershipMemberCompanyPage-HUnc9g0g.js} +3 -4
  49. package/dist/{VerificationErrorAlert-BkImnGA-.js → VerificationErrorAlert-BBdJmGJu.js} +10 -8
  50. package/dist/{ViewVerificationStatusComponent-CRefu327.js → ViewVerificationStatusComponent-DDtXG_pM.js} +12 -13
  51. package/dist/adyen-business-financing.js +22 -29
  52. package/dist/adyen-individual.js +21 -22
  53. package/dist/adyen-kyc-components.js +137 -122
  54. package/dist/adyen-manage-individual.js +18 -21
  55. package/dist/adyen-manage-pci.js +18 -21
  56. package/dist/adyen-manage-terms-of-service.js +18 -21
  57. package/dist/adyen-manage-transfer-instruments.js +27 -30
  58. package/dist/adyen-onboarding.js +25 -22
  59. package/dist/adyen-sign-pci.js +22 -32
  60. package/dist/adyen-terms-of-service.js +32 -29
  61. package/dist/adyen-transfer-instrument.js +32 -31
  62. package/dist/{adyen-transfer-instrument.vue_vue_type_script_lang-BE-ro1iH.js → adyen-transfer-instrument.vue_vue_type_script_lang-DQBzahGy.js} +5 -1
  63. package/dist/adyen-verification-status.js +30 -33
  64. package/dist/bg-BG-BY3Wa361.js +54 -0
  65. package/dist/bg-BG-BvSUDgGF.js +13 -0
  66. package/dist/bg-BG-HpLj_LOM.js +16 -0
  67. package/dist/cs-CZ-BEFeaKsV.js +54 -0
  68. package/dist/cs-CZ-CQ_M3lEp.js +16 -0
  69. package/dist/cs-CZ-y4mvq4Lv.js +13 -0
  70. package/dist/{css-DZNXkIaY.js → css-BJGWcW8A.js} +2 -2
  71. package/dist/da-DK-D6UK8XT9.js +54 -0
  72. package/dist/da-DK-k4JW3iVF.js +16 -0
  73. package/dist/da-DK-qgQOVjDp.js +13 -0
  74. package/dist/de-DE-B3nctkG8.js +13 -0
  75. package/dist/de-DE-C7mjtS5w.js +16 -0
  76. package/dist/de-DE-DUl6gRKv.js +54 -0
  77. package/dist/de-DE-pSdsxBpQ.js +13 -0
  78. package/dist/decision-makers-group-CgddXgrx.js +1944 -0
  79. package/dist/el-GR-B5j7VZ3E.js +54 -0
  80. package/dist/el-GR-Bvjk5Sw8.js +13 -0
  81. package/dist/el-GR-CEQrkYHW.js +16 -0
  82. package/dist/el-GR-CdgLZhuO.js +13 -0
  83. package/dist/en-US-Bq2Twy6x.js +54 -0
  84. package/dist/en-US-DDagIr01.js +16 -0
  85. package/dist/en-US-DSoLr6rp.js +13 -0
  86. package/dist/es-ES-BRfK6tX7.js +13 -0
  87. package/dist/es-ES-Cavm0szq.js +54 -0
  88. package/dist/es-ES-DB1c74Kv.js +16 -0
  89. package/dist/es-ES-Dy1uR2H_.js +13 -0
  90. package/dist/et-EE-DUWZ2Vqm.js +54 -0
  91. package/dist/et-EE-d9V24rcf.js +13 -0
  92. package/dist/et-EE-xIegUSuv.js +16 -0
  93. package/dist/fi-FI-B0fnAFV2.js +13 -0
  94. package/dist/fi-FI-DVa-ccaW.js +54 -0
  95. package/dist/fi-FI-NCxneAqU.js +16 -0
  96. package/dist/fr-FR-BoKzVp2q.js +13 -0
  97. package/dist/fr-FR-CY9emHgF.js +54 -0
  98. package/dist/fr-FR-Dk6Lw2On.js +13 -0
  99. package/dist/fr-FR-daiUnUwo.js +16 -0
  100. package/dist/{getFieldsWithExistingData-UNUNInq5.js → getFieldsWithExistingData-BY--eXBQ.js} +3 -4
  101. package/dist/{hasDataChanged-CIg-bPSm.js → hasDataChanged-CwfuS4et.js} +4 -4
  102. package/dist/hr-HR-BAUywqDj.js +16 -0
  103. package/dist/hr-HR-CF0AHQzi.js +13 -0
  104. package/dist/hr-HR-CnP5sqih.js +54 -0
  105. package/dist/hu-HU-3GQojIHR.js +16 -0
  106. package/dist/hu-HU-BTlpbCpc.js +54 -0
  107. package/dist/hu-HU-CSPhOvLC.js +13 -0
  108. package/dist/it-IT-BH-eqIKH.js +13 -0
  109. package/dist/it-IT-D7G4BaP7.js +13 -0
  110. package/dist/it-IT-GgHc0cHR.js +54 -0
  111. package/dist/it-IT-pDWPFHEh.js +16 -0
  112. package/dist/ja-JP-B3yqM_FM.js +13 -0
  113. package/dist/ja-JP-BhS-_dIx.js +54 -0
  114. package/dist/ja-JP-DTW_hY1L.js +13 -0
  115. package/dist/ja-JP-scPXJ93L.js +16 -0
  116. package/dist/{json-DGARJCng.js → json-Dk6RRAV8.js} +2 -2
  117. package/dist/{localizeDateString-KlstHAcM.js → localizeDateString-CKCBXzSn.js} +6 -6
  118. package/dist/lt-LT-BcGNy8Ti.js +16 -0
  119. package/dist/lt-LT-DTQGR9M0.js +54 -0
  120. package/dist/lt-LT-Lzl_Cbw-.js +13 -0
  121. package/dist/lv-LV-BQ4F1GrV.js +54 -0
  122. package/dist/lv-LV-CBD07r1Y.js +16 -0
  123. package/dist/lv-LV-y00wN1pj.js +13 -0
  124. package/dist/{mapFinancialReportsToFinancialInformation-Cid31JpK.js → mapFinancialReportsToFinancialInformation-D_6u_bSS.js} +19 -12
  125. package/dist/minus-circle-filled-BGKeHaxJ.js +17 -0
  126. package/dist/nl-NL-BxJUDHMK.js +16 -0
  127. package/dist/nl-NL-CFzm75Jw.js +13 -0
  128. package/dist/nl-NL-CUcML482.js +54 -0
  129. package/dist/nl-NL-DmnFXAQC.js +13 -0
  130. package/dist/no-NO-BBCvsecq.js +54 -0
  131. package/dist/no-NO-DbvFfP96.js +13 -0
  132. package/dist/no-NO-Drup6Jyy.js +16 -0
  133. package/dist/pl-PL--mmxopYA.js +13 -0
  134. package/dist/pl-PL-BXv8Mmzb.js +16 -0
  135. package/dist/pl-PL-kGaeUP-w.js +54 -0
  136. package/dist/{plaintext-jF9fCLMp.js → plaintext-9WNCwUtz.js} +2 -2
  137. package/dist/plus-circle-filled-Cnf1oJTm.js +17 -0
  138. package/dist/preact/adyen-terms-of-service.js +1 -1
  139. package/dist/preact/adyen-transfer-instrument.js +2 -2
  140. package/dist/pt-PT-BVzXBFp7.js +13 -0
  141. package/dist/pt-PT-D8nU-UM2.js +16 -0
  142. package/dist/pt-PT-DpDxAynk.js +13 -0
  143. package/dist/pt-PT-JVqqgvPs.js +54 -0
  144. package/dist/resolveEnvironment-DQH1ab0S.js +84 -0
  145. package/dist/ro-RO-C83h2zHZ.js +54 -0
  146. package/dist/ro-RO-CG33OwqS.js +16 -0
  147. package/dist/ro-RO-Cdmevo9A.js +13 -0
  148. package/dist/ru-RU-FZb2upqh.js +13 -0
  149. package/dist/{rules-a4kJDPzY.js → rules-CCnLDGvk.js} +63 -64
  150. package/dist/sk-SK-CgLJIuJw.js +54 -0
  151. package/dist/sk-SK-DV_xkO69.js +16 -0
  152. package/dist/sk-SK-nfeuTcY5.js +13 -0
  153. package/dist/sl-SI-B5yeoadY.js +16 -0
  154. package/dist/sl-SI-BzeVaC1Z.js +54 -0
  155. package/dist/sl-SI-DUTZDqkP.js +13 -0
  156. package/dist/style.css +2124 -3093
  157. package/dist/styles-CLV89_hH.js +2125 -3094
  158. package/dist/sv-SE-BTx2XKAp.js +13 -0
  159. package/dist/sv-SE-CVmo11gI.js +54 -0
  160. package/dist/sv-SE-CfxyR53r.js +16 -0
  161. package/dist/sv-SE-rckxD-43.js +13 -0
  162. package/dist/types/api/address/address.types.d.ts +0 -1
  163. package/dist/types/api/address/useAddressCleanse.d.ts +1 -1
  164. package/dist/types/api/address/useSearchAddress.d.ts +0 -1
  165. package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +2 -2
  166. package/dist/types/api/companyDataSet/companyDataset.types.d.ts +2 -2
  167. package/dist/types/api/companyDataSet/constants.d.ts +1 -1
  168. package/dist/types/api/companyDataSet/handleCompanyDataset.d.ts +3 -0
  169. package/dist/types/api/companySearch/companySearch.types.d.ts +2 -2
  170. package/dist/types/api/companySelection/companySelection.types.d.ts +6 -0
  171. package/dist/types/api/companySelection/useCompanySelection.d.ts +21 -0
  172. package/dist/types/api/configurations/configurations.types.d.ts +9 -0
  173. package/dist/types/api/configurations/useScenarios.d.ts +33 -35
  174. package/dist/types/api/configurations/useSupportedCountries.d.ts +3 -3
  175. package/dist/types/api/configurations/useTaskTypes.d.ts +2 -2
  176. package/dist/types/api/configurations/useVersionConfiguration.d.ts +2 -2
  177. package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +11 -11
  178. package/dist/types/api/datasets/datasets.types.d.ts +6 -0
  179. package/dist/types/api/datasets/useLegalForms.d.ts +3 -8
  180. package/dist/types/api/datasets/useNaceCodes.d.ts +2 -2
  181. package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +2 -2
  182. package/dist/types/api/entityVerifications/entityVerifications.types.d.ts +15 -0
  183. package/dist/types/api/entityVerifications/useVerifyIdNumber.d.ts +2 -17
  184. package/dist/types/api/idNowProvider/idNowProvider.types.d.ts +7 -0
  185. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +14 -0
  186. package/dist/types/api/idVerificationProviders/idVerificationProviders.types.d.ts +6 -0
  187. package/dist/types/api/idVerificationProviders/idVerificationStartCheck.d.ts +3 -7
  188. package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +7 -7
  189. package/dist/types/api/legalEntity/useConfirmReview.d.ts +2 -2
  190. package/dist/types/api/legalEntity/useLegalEntity.d.ts +285 -223
  191. package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +14 -14
  192. package/dist/types/api/onboardingStatus/onboardingStatus.types.d.ts +7 -0
  193. package/dist/types/api/onboardingStatus/useGenerateOnboardingLink.d.ts +2 -5
  194. package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
  195. package/dist/types/api/pciTemplate/pciTemplate.types.d.ts +9 -0
  196. package/dist/types/api/pciTemplate/usePciQuestionnaire.d.ts +2 -4
  197. package/dist/types/api/pciTemplate/usePciQuestionnaireList.d.ts +7 -9
  198. package/dist/types/api/pciTemplate/usePciStatus.d.ts +4 -9
  199. package/dist/types/api/pciTemplate/usePciTemplate.d.ts +2 -2
  200. package/dist/types/api/pciTemplate/useSignPci.d.ts +2 -2
  201. package/dist/types/api/providersConfiguration/providersConfiguration.types.d.ts +9 -0
  202. package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +3 -13
  203. package/dist/types/api/queryKeys.d.ts +5 -3
  204. package/dist/types/api/taskStatus/taskStatus.types.d.ts +4 -0
  205. package/dist/types/api/taskStatus/useTaskStatus.d.ts +0 -3
  206. package/dist/types/api/taxClassification/taxClassification.types.d.ts +2 -0
  207. package/dist/types/api/taxClassification/useTaxClassification.d.ts +1 -2
  208. package/dist/types/api/termsOfService/termsOfService.types.d.ts +10 -0
  209. package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +3 -10
  210. package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +9 -8
  211. package/dist/types/api/termsOfService/useTermsOfService.d.ts +12 -5
  212. package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +2 -2
  213. package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +2 -2
  214. package/dist/types/api/tinVerification/tinVerification.types.d.ts +4 -0
  215. package/dist/types/api/tinVerification/useVerifyTin.d.ts +2 -4
  216. package/dist/types/api/transferInstruments/transferInstruments.types.d.ts +25 -0
  217. package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -14
  218. package/dist/types/api/transferInstruments/useCreateTrustedTransferInstrument.d.ts +3 -6
  219. package/dist/types/api/transferInstruments/useHandleBankVerificationError.d.ts +4 -7
  220. package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -9
  221. package/dist/types/api/uiAnalytics/uiAnalytics.types.d.ts +7 -0
  222. package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -14
  223. package/dist/types/api/uiAnalytics/usePushAnalyticEvent.d.ts +2 -2
  224. package/dist/types/api/validation/useValidateAccountIdentification.d.ts +1 -6
  225. package/dist/types/api/validation/useValidatePhoneNumber.d.ts +4 -7
  226. package/dist/types/api/validation/validation.types.d.ts +8 -0
  227. package/dist/types/components/BankAccount/fields/BankAccountNumber/fieldConfig.d.ts +1 -1
  228. package/dist/types/components/BankAccount/fields/BankAccountNumber/types.d.ts +1 -1
  229. package/dist/types/components/BankAccount/fields/BankCode/fieldConfig.d.ts +1 -1
  230. package/dist/types/components/BankAccount/fields/BankCode/types.d.ts +1 -1
  231. package/dist/types/components/BankAccount/fields/BranchCode/fieldConfig.d.ts +1 -1
  232. package/dist/types/components/BankAccount/fields/BranchCode/types.d.ts +1 -1
  233. package/dist/types/components/BankAccount/fields/Iban/fieldConfig.d.ts +1 -1
  234. package/dist/types/components/BankAccount/fields/Iban/ibanValidator.d.ts +1 -1
  235. package/dist/types/components/BankAccount/fields/Iban/types.d.ts +1 -1
  236. package/dist/types/components/BankAccount/fields/SwiftCode/fieldConfig.d.ts +1 -1
  237. package/dist/types/components/BankAccount/forms/BankDocument/BankDocument.d.ts +0 -1
  238. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirements.d.ts +1 -2
  239. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +3 -2
  240. package/dist/types/components/BankAccount/forms/BankVerification/BankVerification.d.ts +2 -2
  241. package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +3 -3
  242. package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/types.d.ts +1 -2
  243. package/dist/types/components/BankAccount/forms/PayoutAccount/CheckGuidance/CheckGuidance.d.ts +0 -1
  244. package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +1 -1
  245. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +0 -1
  246. package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +6 -6
  247. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +3 -9
  248. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/allowedBankCountriesPerCountry.d.ts +1 -1
  249. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/types.d.ts +2 -2
  250. package/dist/types/components/BankAccount/hooks/useAsyncAccountDetailsValidationRules.d.ts +1 -1
  251. package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +1 -1
  252. package/dist/types/components/BankAccount/mapping/mapPayoutDocumentsToApiDocuments.d.ts +1 -1
  253. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +1613 -1919
  254. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +1 -0
  255. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
  256. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +3 -3
  257. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +3 -0
  258. package/dist/types/components/BankAccount/utils/defaultPayoutAccountFormat.d.ts +1 -1
  259. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +3 -3
  260. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +3 -2
  261. package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +1 -0
  262. package/dist/types/components/Business/forms/BasicInformation/types.d.ts +3 -2
  263. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +2 -2
  264. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -2
  265. package/dist/types/components/Business/forms/BusinessSelection/{BusinessInformationCard.d.ts → BusinessInformationCard/BusinessInformationCard.d.ts} +4 -6
  266. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelection.d.ts +1 -1
  267. package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +1 -1
  268. package/dist/types/components/Business/forms/ProofOfDirectorDocument/types.d.ts +1 -1
  269. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +1 -1
  270. package/dist/types/components/Business/forms/ProofOfSignatoryDocument/types.d.ts +1 -1
  271. package/dist/types/components/Business/forms/RegistrationDocument/config.d.ts +1 -1
  272. package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +1 -1
  273. package/dist/types/components/Business/forms/TaxDocument/config.d.ts +1 -1
  274. package/dist/types/components/Business/forms/TaxDocument/types.d.ts +1 -1
  275. package/dist/types/components/Business/forms/rules.d.ts +23 -20
  276. package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +1 -1
  277. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +1 -1
  278. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsFormConfig.d.ts +1 -2
  279. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +2 -2
  280. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +3 -3
  281. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +1 -4
  282. package/dist/types/components/Business/utils/companyUtil.d.ts +1 -1
  283. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/ServiceAgreementDropin.d.ts +0 -1
  284. package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
  285. package/dist/types/components/EFP/fields/LegalFormField/types.d.ts +6 -3
  286. package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
  287. package/dist/types/components/EFP/fields/NaceCodeField/types.d.ts +1 -0
  288. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +2053 -24
  289. package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +2 -2
  290. package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -2
  291. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBasicCompanyInformation.d.ts +5 -1
  292. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBusinessInformation.d.ts +10 -1
  293. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +11 -1
  294. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingLegalInformation.d.ts +6 -1
  295. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingOwnershipStructure.d.ts +7 -2
  296. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +7 -1
  297. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +27 -112
  298. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +17 -4
  299. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +22 -0
  300. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/SOFFinancierModal.d.ts +1 -2
  301. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsUploader/SOFUploadModal.d.ts +0 -1
  302. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/sofStore.d.ts +1 -1
  303. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +3 -3
  304. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +1 -1
  305. package/dist/types/components/EFP/tasks/TaxReportingDropin/taxClassificationStore.d.ts +1 -1
  306. package/dist/types/components/EFP/tasks/TaxReportingDropin/types.d.ts +3 -3
  307. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +3 -3
  308. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverview/ManageTransferInstrumentOverview.d.ts +1 -1
  309. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItem/ManageTransferInstrumentOverviewItem.d.ts +1 -1
  310. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemModal/ManageTransferInstrumentOverviewItemModal.d.ts +1 -1
  311. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
  312. package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +1 -1
  313. package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +1 -1
  314. package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -1
  315. package/dist/types/components/Individual/fields/IdentityNumber/IdentityNumber.d.ts +1 -2
  316. package/dist/types/components/Individual/fields/IdentityNumber/fieldConfig.d.ts +3 -3
  317. package/dist/types/components/Individual/fields/IdentityNumber/type.d.ts +1 -1
  318. package/dist/types/components/Individual/fields/LocalizedNameFields/LocalizedNameFields.d.ts +2 -0
  319. package/dist/types/components/Individual/fields/LocalizedNameFields/types.d.ts +9 -0
  320. package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +13 -0
  321. package/dist/types/components/Individual/fields/NameFields/types.d.ts +23 -0
  322. package/dist/types/components/Individual/fields/NameFields/validate.d.ts +4 -0
  323. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentManualUpload.d.ts +1 -1
  324. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +3 -3
  325. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/utils.d.ts +1 -1
  326. package/dist/types/components/Individual/forms/Individual/IdVerification/idVerificationProviderId.d.ts +1 -1
  327. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +1 -1
  328. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/types.d.ts +2 -2
  329. package/dist/types/components/Individual/forms/Individual/Individual.d.ts +1 -1
  330. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +1 -1
  331. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +1 -1
  332. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +1 -1
  333. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/identityUS/IdentityUS.d.ts +1 -1
  334. package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +7 -5
  335. package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +2 -2
  336. package/dist/types/components/Individual/forms/Individual/rules.d.ts +34 -32
  337. package/dist/types/components/Individual/forms/Individual/types.d.ts +8 -8
  338. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.d.ts +1 -1
  339. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +1 -1
  340. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/Identity.d.ts +1 -1
  341. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/validate.d.ts +1 -1
  342. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +2 -2
  343. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.d.ts +1 -1
  344. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +3 -2
  345. package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/ConflictRow.d.ts +1 -1
  346. package/dist/types/components/Individual/forms/IndividualOnfido/GuidanceQuestion/GuidanceQuestion.d.ts +7 -3
  347. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +1 -0
  348. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +23 -9
  349. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +1 -1
  350. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -1
  351. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +37 -34
  352. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +4 -4
  353. package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaire.d.ts +1 -1
  354. package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +1 -3
  355. package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaireModalContent.d.ts +1 -0
  356. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.d.ts +1 -1
  357. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +3 -3
  358. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +5 -0
  359. package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +1 -1
  360. package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +2 -2
  361. package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +3 -0
  362. package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +3 -0
  363. package/dist/types/components/Individual/mapping/individualOnfidoKeyMappings.d.ts +1 -0
  364. package/dist/types/components/Individual/mapping/mapIndividualOnfidoSchemaToLegalEntity.d.ts +3 -1
  365. package/dist/types/components/Individual/mapping/mapLocalization.d.ts +3 -0
  366. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersGettingStarted.d.ts +5 -0
  367. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersModalContent.d.ts +1 -0
  368. package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +1 -1
  369. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +6 -0
  370. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/individualOnfidoFormConfig.d.ts +1 -1
  371. package/dist/types/components/Shared/EntityAssociation/types.d.ts +1 -1
  372. package/dist/types/components/Shared/EntityGuidanceStatus/types.d.ts +1 -1
  373. package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +1 -1
  374. package/dist/types/components/Shared/FormNavigation/FormNavigationItem.d.ts +1 -2
  375. package/dist/types/components/Shared/FormNavigation/types.d.ts +3 -3
  376. package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +2 -2
  377. package/dist/types/components/Shared/Introduction/copy.d.ts +2 -2
  378. package/dist/types/components/Shared/SingpassSelection/types.d.ts +1 -1
  379. package/dist/types/components/Shared/Summary/Summary.d.ts +1 -2
  380. package/dist/types/components/Shared/Summary/summaryItem.d.ts +1 -1
  381. package/dist/types/components/Shared/Summary/types.d.ts +3 -3
  382. package/dist/types/components/Shared/devex/DebugListener/DebugModal.d.ts +0 -1
  383. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
  384. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +6 -4
  385. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +6 -8
  386. package/dist/types/components/Shared/fields/CountryField/CountryField.d.ts +1 -1
  387. package/dist/types/components/Shared/fields/CountryField/types.d.ts +3 -3
  388. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
  389. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +2 -2
  390. package/dist/types/components/Shared/fields/Currency/types.d.ts +3 -3
  391. package/dist/types/components/Shared/fields/DBANameField/fieldConfig.d.ts +1 -1
  392. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -3
  393. package/dist/types/components/Shared/fields/DateOfIncorporationField/fieldConfig.d.ts +1 -1
  394. package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +1 -1
  395. package/dist/types/components/Shared/fields/EInvoicingCodeField/fieldConfig.d.ts +1 -1
  396. package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
  397. package/dist/types/components/Shared/fields/FinancialReportingDate/types.d.ts +1 -1
  398. package/dist/types/components/Shared/fields/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +2 -2
  399. package/dist/types/components/Shared/fields/IdFieldTypeSelector/IndividualIdNumberTypeSelector.d.ts +2 -2
  400. package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +4 -3
  401. package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +2 -2
  402. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +11 -2
  403. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultRegistrationNumberType.d.ts +16 -0
  404. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultTaxIdNumberType.d.ts +1 -1
  405. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultVatNumberType.d.ts +13 -0
  406. package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferCompanyRegistrationNumberType.d.ts +1 -1
  407. package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferTaxIdNumberType.d.ts +1 -1
  408. package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferVatNumberType.d.ts +1 -1
  409. package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -2
  410. package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +1 -1
  411. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +1 -1
  412. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +12 -0
  413. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/types.d.ts +5 -0
  414. package/dist/types/components/Shared/fields/Name/Name.d.ts +1 -1
  415. package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
  416. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -2
  417. package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +1 -1
  418. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -2
  419. package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
  420. package/dist/types/components/Shared/fields/StateField/fieldConfig.d.ts +1 -1
  421. package/dist/types/components/Shared/fields/StateField/types.d.ts +4 -4
  422. package/dist/types/components/Shared/fields/StockExchangeMICField/fieldConfig.d.ts +1 -1
  423. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  424. package/dist/types/components/Shared/fields/StockISINField/fieldConfig.d.ts +1 -1
  425. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  426. package/dist/types/components/Shared/fields/StockTickerSymbol/fieldConfig.d.ts +1 -1
  427. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  428. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -2
  429. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +5 -3
  430. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +2 -2
  431. package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
  432. package/dist/types/components/Shared/fields/VatNumberField/fieldConfig.d.ts +1 -1
  433. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +3 -5
  434. package/dist/types/components/Shared/forms/Address/AddressField.d.ts +1 -1
  435. package/dist/types/components/Shared/forms/Address/SearchAddress.d.ts +3 -3
  436. package/dist/types/components/Shared/forms/Address/constants.d.ts +1 -1
  437. package/dist/types/components/Shared/forms/Address/types.d.ts +1 -2
  438. package/dist/types/components/Shared/forms/Address/utils.d.ts +3 -3
  439. package/dist/types/components/Shared/forms/Address/validate.d.ts +1 -1
  440. package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +1 -1
  441. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +7 -7
  442. package/dist/types/components/Shared/forms/CompanyNameAndCountry/types.d.ts +1 -1
  443. package/dist/types/components/Shared/forms/ConstitutionalDocument/types.d.ts +1 -1
  444. package/dist/types/components/Shared/forms/ContactDetails/ContactDetails.d.ts +1 -1
  445. package/dist/types/components/Shared/forms/ContactDetails/types.d.ts +1 -1
  446. package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +2 -2
  447. package/dist/types/components/Shared/forms/FinancialInformation/ReportedValue.d.ts +1 -1
  448. package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +2 -2
  449. package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
  450. package/dist/types/components/Shared/forms/FinancialInformation/types.d.ts +3 -3
  451. package/dist/types/components/Shared/forms/FinancialInformation/validate.d.ts +1 -0
  452. package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +2 -2
  453. package/dist/types/components/Shared/tasks/CustomerSupport/types.d.ts +1 -1
  454. package/dist/types/components/Shared/tasks/TaskList/PayoutAccountTaskListItem.d.ts +1 -1
  455. package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +1 -2
  456. package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +1 -1
  457. package/dist/types/components/Shared/tasks/TaskList/types.d.ts +2 -2
  458. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -1
  459. package/dist/types/components/Trust/forms/Trust/Trust.d.ts +19 -3
  460. package/dist/types/components/Trust/forms/Trust/rules.d.ts +6 -6
  461. package/dist/types/components/Trust/forms/Trust/types.d.ts +2 -2
  462. package/dist/types/components/Trust/forms/TrustRegistrationDetails/types.d.ts +1 -1
  463. package/dist/types/components/Trust/forms/TrustRoleAndEntityType/types.d.ts +1 -1
  464. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +14 -14
  465. package/dist/types/components/Trust/mapping/mapTrustDocumentToApiDocument.d.ts +1 -1
  466. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/types.d.ts +1 -1
  467. package/dist/types/components/Trust/tasks/TrustDropin/trustFormConfig.d.ts +1 -1
  468. package/dist/types/components/Trust/tasks/TrustMembers/types.d.ts +1 -1
  469. package/dist/types/components/Trust/utils/trustUtil.d.ts +4 -4
  470. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +2 -2
  471. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRadioGroup.d.ts +2 -3
  472. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRoleAndType.d.ts +1 -2
  473. package/dist/types/components/UnincorporatedPartnership/types/types.d.ts +1 -1
  474. package/dist/types/components/UnincorporatedPartnership/utils/unincorporatedParnershipUtil.d.ts +3 -3
  475. package/dist/types/components/ui/atoms/Accordion/Accordion.d.ts +1 -2
  476. package/dist/types/components/ui/atoms/ActionsMenu/ActionsMenu.d.ts +1 -1
  477. package/dist/types/components/ui/atoms/Button/Button.d.ts +2 -3
  478. package/dist/types/components/ui/atoms/Button/Button.types.d.ts +3 -3
  479. package/dist/types/components/ui/atoms/Checkbox/Checkbox.d.ts +1 -2
  480. package/dist/types/components/ui/atoms/Field/Field.d.ts +3 -6
  481. package/dist/types/components/ui/atoms/Field/Field.types.d.ts +11 -12
  482. package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +4 -6
  483. package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +5 -5
  484. package/dist/types/components/ui/atoms/List/List.d.ts +12 -0
  485. package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
  486. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +3 -3
  487. package/dist/types/components/ui/atoms/Remove/Remove.d.ts +1 -2
  488. package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -2
  489. package/dist/types/components/ui/atoms/Select/Select.types.d.ts +1 -0
  490. package/dist/types/components/ui/atoms/SelectButton/SelectButton.d.ts +1 -2
  491. package/dist/types/components/ui/atoms/SelectButton/SelectButton.types.d.ts +3 -4
  492. package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -2
  493. package/dist/types/components/ui/atoms/SelectList/SelectList.types.d.ts +2 -2
  494. package/dist/types/components/ui/atoms/SelectListItem/SelectListItem.types.d.ts +3 -3
  495. package/dist/types/components/ui/atoms/Svg/Svg.d.ts +1 -1
  496. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +6 -0
  497. package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +1 -1
  498. package/dist/types/components/ui/atoms/TextArea/TextArea.d.ts +1 -2
  499. package/dist/types/components/ui/atoms/Tile/Tile.d.ts +1 -2
  500. package/dist/types/components/ui/layout/LandingLayout/LandingLayout.d.ts +10 -0
  501. package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +8 -0
  502. package/dist/types/components/ui/molecules/Alert/Alert.d.ts +1 -1
  503. package/dist/types/components/ui/molecules/Alert/types.d.ts +1 -1
  504. package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -2
  505. package/dist/types/components/ui/molecules/Card/types.d.ts +3 -3
  506. package/dist/types/components/ui/molecules/Confirm/Confirm.d.ts +1 -1
  507. package/dist/types/components/ui/molecules/Confirm/Confirm.types.d.ts +1 -0
  508. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +2 -2
  509. package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +3 -5
  510. package/dist/types/components/ui/molecules/Dropzone/types.d.ts +1 -1
  511. package/dist/types/components/ui/molecules/Dropzone/validate.d.ts +1 -1
  512. package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +2 -2
  513. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +2 -2
  514. package/dist/types/components/ui/molecules/ErrorPanel/ErrorPanel.d.ts +1 -1
  515. package/dist/types/components/ui/molecules/ErrorPanel/VerificationErrors.d.ts +2 -1
  516. package/dist/types/components/ui/molecules/ErrorPanel/types.d.ts +3 -3
  517. package/dist/types/components/ui/molecules/FormEndState/FormEndState.d.ts +0 -1
  518. package/dist/types/components/ui/molecules/InputCurrency/InputCurrency.d.ts +2 -3
  519. package/dist/types/components/ui/molecules/InputDate/InputDate.d.ts +3 -3
  520. package/dist/types/components/ui/molecules/InputEmail/InputEmail.d.ts +1 -1
  521. package/dist/types/components/ui/molecules/InputTelephone/InputTelephone.d.ts +1 -1
  522. package/dist/types/components/ui/molecules/InputText/InputText.d.ts +1 -1
  523. package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +3 -7
  524. package/dist/types/constants/countries.d.ts +1 -1
  525. package/dist/types/constants/keys.d.ts +2 -0
  526. package/dist/types/context/ExperimentContext/types.d.ts +18 -1
  527. package/dist/types/context/FormContext/FormContext.d.ts +1 -1
  528. package/dist/types/context/FormRouterContext/FormRouterContext.d.ts +1 -1
  529. package/dist/types/context/FormRouterContext/types.d.ts +1 -1
  530. package/dist/types/context/SettingsContext/SettingsContext.d.ts +1 -1
  531. package/dist/types/context/SettingsContext/types.d.ts +1 -1
  532. package/dist/types/context/StateContext/StateContext.d.ts +1 -1
  533. package/dist/types/context/StateContext/StateContextSetter.d.ts +1 -1
  534. package/dist/types/context/StateContext/StateReducer.d.ts +4 -10
  535. package/dist/types/context/StateContext/types.d.ts +19 -17
  536. package/dist/types/context/StateContext/useGlobalData.d.ts +2 -2
  537. package/dist/types/core/EmbedShell/EmbedShell.d.ts +2 -1
  538. package/dist/types/core/UIElement/UIElement.d.ts +2 -1
  539. package/dist/types/core/analytics.d.ts +12 -10
  540. package/dist/types/core/environment/resolveEnvironment.d.ts +1 -1
  541. package/dist/types/core/error.d.ts +1 -1
  542. package/dist/types/core/errorMapping.d.ts +3 -3
  543. package/dist/types/core/models/api/address.d.ts +1 -1
  544. package/dist/types/core/models/api/financialReport.d.ts +3 -3
  545. package/dist/types/core/models/api/get-scenarios.d.ts +2 -8
  546. package/dist/types/core/models/api/individual.d.ts +10 -0
  547. package/dist/types/core/models/api/legal-arrangement.d.ts +10 -2
  548. package/dist/types/core/models/api/legal-entity-association.d.ts +5 -0
  549. package/dist/types/core/models/api/organization.d.ts +9 -1
  550. package/dist/types/core/models/api/phone.d.ts +1 -1
  551. package/dist/types/core/models/api/remediating-action.d.ts +1 -1
  552. package/dist/types/core/models/api/source-of-funds.d.ts +1 -1
  553. package/dist/types/core/models/api/transfer-instrument.d.ts +1 -1
  554. package/dist/types/core/models/api/verification-error.d.ts +1 -1
  555. package/dist/types/core/models/api/view-verification-status.d.ts +0 -4
  556. package/dist/types/core/process-field-configurations.d.ts +9 -9
  557. package/dist/types/core/types.d.ts +1 -1
  558. package/dist/types/core/user-events.d.ts +14 -3
  559. package/dist/types/datasets/generators/getAccountFormatForCountry.d.ts +2 -2
  560. package/dist/types/datasets/generators/getBusinessTypeExamplesForCountry.d.ts +2 -2
  561. package/dist/types/datasets/generators/getCompanyTypeExamplesForCountry.d.ts +2 -2
  562. package/dist/types/datasets/generators/getLegalArrangementTypeExamplesForCountry.d.ts +3 -3
  563. package/dist/types/datasets/generators/loadCountries.d.ts +1 -1
  564. package/dist/types/datasets/generators/loadStatesDataset.d.ts +1 -1
  565. package/dist/types/embeds/EmbedBaseElement.d.ts +41 -0
  566. package/dist/types/embeds/EmbedCore.d.ts +22 -0
  567. package/dist/types/embeds/baseEmbedProps.d.ts +21 -0
  568. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +13 -0
  569. package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +6 -1
  570. package/dist/types/embeds/individual/AdyenIndividual.d.ts +12 -0
  571. package/dist/types/embeds/individual/adyen-individual.types.d.ts +6 -1
  572. package/dist/types/embeds/manage-individual/AdyenManageIndividual.d.ts +12 -0
  573. package/dist/types/embeds/manage-pci/AdyenManagePci.d.ts +12 -0
  574. package/dist/types/embeds/manage-terms-of-service/AdyenManageTermsOfService.d.ts +12 -0
  575. package/dist/types/embeds/manage-transfer-instruments/AdyenManageTransferInstrument.d.ts +15 -0
  576. package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +12 -0
  577. package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +4 -1
  578. package/dist/types/embeds/sign-pci/AdyenSignPci.d.ts +14 -0
  579. package/dist/types/embeds/sign-pci/adyen-sign-pci.types.d.ts +5 -3
  580. package/dist/types/embeds/terms-of-service/AdyenTermsOfService.d.ts +12 -0
  581. package/dist/types/embeds/terms-of-service/adyen-terms-of-service.types.d.ts +7 -1
  582. package/dist/types/embeds/transfer-instrument/AdyenTransferInstrument.d.ts +16 -0
  583. package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +7 -2
  584. package/dist/types/embeds/verification-status/AdyenVerificationStatus.d.ts +20 -0
  585. package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +1 -1
  586. package/dist/types/hooks/singpass/useHasSeenSingpassSelection.d.ts +2 -1
  587. package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +2 -2
  588. package/dist/types/hooks/useAccountHolder.d.ts +1 -1
  589. package/dist/types/hooks/useAllowedCountries.d.ts +1 -1
  590. package/dist/types/hooks/useAsyncValidator.d.ts +2 -1
  591. package/dist/types/hooks/useBusinessSetup.d.ts +1 -1
  592. package/dist/types/hooks/useDataConflicts.d.ts +0 -6
  593. package/dist/types/hooks/useDataMissingRemediations.d.ts +1 -1
  594. package/dist/types/hooks/useForm/reducer.d.ts +2 -2
  595. package/dist/types/hooks/useForm/types.d.ts +14 -19
  596. package/dist/types/hooks/useFormComposer.d.ts +2 -2
  597. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +28 -0
  598. package/dist/types/hooks/useMultiForm/reducer.d.ts +4 -3
  599. package/dist/types/hooks/useMultiForm/types.d.ts +36 -73
  600. package/dist/types/hooks/useMultiForm/useMultiForm.d.ts +1 -1
  601. package/dist/types/hooks/useMultiForm/useMultiFormAsyncValidator.d.ts +2 -2
  602. package/dist/types/hooks/useScenarioConfiguration.d.ts +5 -5
  603. package/dist/types/language/Language.d.ts +1 -7
  604. package/dist/types/language/i18n.d.ts +2 -0
  605. package/dist/types/language/types.d.ts +3 -0
  606. package/dist/types/language/utils.d.ts +12 -3
  607. package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +2 -2
  608. package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +2 -2
  609. package/dist/types/stores/globalStore/get-task-status.d.ts +1 -1
  610. package/dist/types/stores/globalStore/globalStore.d.ts +4 -4
  611. package/dist/types/stores/globalStore/taskStatus.d.ts +1 -1
  612. package/dist/types/types/datasets/country-code.d.ts +251 -0
  613. package/dist/types/{core/models → types}/errors/capability-problems.d.ts +1 -1
  614. package/dist/types/{core/models → types}/errors/entity-problems.d.ts +4 -4
  615. package/dist/types/{core/models → types}/errors/error-message.d.ts +1 -1
  616. package/dist/types/{core/models → types}/errors/maintenance-mode-error.d.ts +1 -1
  617. package/dist/types/{core/models → types}/errors/remediation.d.ts +1 -1
  618. package/dist/types/{core/models → types}/form-configuration.d.ts +4 -4
  619. package/dist/types/{core/models → types}/form-rules.d.ts +10 -8
  620. package/dist/types/{core/models → types}/form.d.ts +1 -1
  621. package/dist/types/utils/accountHolderUtils.d.ts +1 -1
  622. package/dist/types/utils/api/documentUtils.d.ts +1 -1
  623. package/dist/types/utils/api/getProblemsForEntity.d.ts +2 -2
  624. package/dist/types/utils/api/processCapabilitites.d.ts +5 -4
  625. package/dist/types/utils/api/processValidationErrors.d.ts +3 -3
  626. package/dist/types/utils/birthDateUtils.d.ts +53 -2
  627. package/dist/types/utils/country.d.ts +5 -2
  628. package/dist/types/utils/datasetUtil.d.ts +3 -3
  629. package/dist/types/{core/models/decision-maker.d.ts → utils/decisionMaker.d.ts} +2 -2
  630. package/dist/types/utils/dropinUtils.d.ts +2 -2
  631. package/dist/types/utils/entityAssociationUtil.d.ts +6 -7
  632. package/dist/types/utils/entityStatusUtil.d.ts +2 -2
  633. package/dist/types/utils/eventHandlers/handleKeys.d.ts +2 -2
  634. package/dist/types/{core/models/field-configurations.d.ts → utils/fieldConfigurations.d.ts} +4 -4
  635. package/dist/types/utils/formUtils.d.ts +1 -1
  636. package/dist/types/utils/formatCurrency.d.ts +1 -1
  637. package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
  638. package/dist/types/utils/getLegalEntityCountry.d.ts +1 -1
  639. package/dist/types/utils/getName.d.ts +2 -2
  640. package/dist/types/utils/getSSNType.d.ts +1 -1
  641. package/dist/types/utils/makeSelectItemForRole.d.ts +2 -2
  642. package/dist/types/utils/mapping/mapExistingFile.d.ts +1 -1
  643. package/dist/types/utils/mapping/utils.d.ts +7 -10
  644. package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +1 -0
  645. package/dist/types/utils/omitObscuredFieldsIfUnchanged.d.ts +1 -1
  646. package/dist/types/utils/perCountry.d.ts +1 -1
  647. package/dist/types/utils/perState.d.ts +3 -2
  648. package/dist/types/utils/regex/patternValidators.d.ts +2 -0
  649. package/dist/types/utils/regex/postalCodePatterns.d.ts +1 -1
  650. package/dist/types/utils/simulateTextChangeFromKeyboardEvent.d.ts +2 -2
  651. package/dist/types/utils/trackNavigation.d.ts +1 -2
  652. package/dist/types/utils/urlUtils.d.ts +1 -0
  653. package/dist/types/utils/validation/types.d.ts +1 -1
  654. package/dist/types/utils/validation/validationResult.d.ts +1 -1
  655. package/dist/types/{core/models/errors/validation-error.d.ts → utils/validationError.d.ts} +1 -1
  656. package/dist/types/utils/validatorUtils.d.ts +7 -3
  657. package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +2 -2
  658. package/dist/{useMultiForm-Lh2i5tRJ.js → useMultiForm-KQwxav4F.js} +160 -136
  659. package/dist/{useOnboardingStatus-D1ym3MHp.js → useOnboardingStatus-BMyj9Pwn.js} +2 -2
  660. package/dist/{useSalesChannelsSettings-BGuBY0ls.js → useSalesChannelsSettings-43TfSoxc.js} +2 -2
  661. package/dist/{useTermsOfServiceStatus-DGZYHVsm.js → useTermsOfServiceStatus-CBHKWYSb.js} +4 -4
  662. package/dist/{useUpdateLegalEntity-By6uwPUg.js → useUpdateLegalEntity-D8dw9Oc3.js} +2 -2
  663. package/dist/{utils-BPrqY9DW.js → utils-CL9qlD-O.js} +18 -11
  664. package/dist/{validate-Dyb8B4Hi.js → validate-CeF0YKvL.js} +2 -2
  665. package/dist/validate-CuwYJGc9.js +94 -0
  666. package/dist/vue/adyen-individual.js +1 -1
  667. package/dist/vue/adyen-manage-individual.js +1 -1
  668. package/dist/vue/adyen-terms-of-service.js +1 -1
  669. package/dist/vue/adyen-transfer-instrument.js +5 -4
  670. package/dist/{yaml-Ba_Tz8d4.js → yaml-CBkrSAtc.js} +2 -2
  671. package/dist/zh-CN-wUb4MmTZ.js +13 -0
  672. package/dist/zh-TW-DNTXHLKa.js +13 -0
  673. package/package.json +53 -51
  674. package/dist/CXEL7IU7-B_FIdhoh.js +0 -55
  675. package/dist/Confirm-okTxq40p.js +0 -56
  676. package/dist/ContractViewer-BChszuWL.js +0 -980
  677. package/dist/FormEndState-BQOQ83vO.js +0 -32
  678. package/dist/FormNavigation-B6RspX9C.js +0 -145
  679. package/dist/FormWrapper-Dvm1o4tC.js +0 -149
  680. package/dist/HASRA6WW-C1SPXfmX.js +0 -12411
  681. package/dist/I3HPI4QX-A8JLvlId.js +0 -46
  682. package/dist/MaybeModal-Djz8fRfd.js +0 -18
  683. package/dist/Modal-CRNejb1x.js +0 -135
  684. package/dist/PayoutDetailsDropin-Bw29V8E7.js +0 -901
  685. package/dist/PayoutDetailsPage-BHNHaMbR.js +0 -57
  686. package/dist/ShadowStylesRoot-D4KvocCc.js +0 -103
  687. package/dist/SourceOfFunds.module-OqFTr4WQ.js +0 -128
  688. package/dist/Spacer-BK3jDget.js +0 -18
  689. package/dist/StepProgressIndicator-BuGfVdlr.js +0 -74
  690. package/dist/bg-BG-CGHVGS50.js +0 -1986
  691. package/dist/cs-CZ-5Os6MsQs.js +0 -1986
  692. package/dist/da-DK-Dk9852pS.js +0 -1986
  693. package/dist/de-DE-B3TpRjZX.js +0 -994
  694. package/dist/de-DE-dk9CMgxF.js +0 -1986
  695. package/dist/documentUtils-51iMbUyU.js +0 -226
  696. package/dist/dropinUtils-Bk0T79SK.js +0 -204
  697. package/dist/el-GR-CFEuLvxK.js +0 -994
  698. package/dist/el-GR-DgI6Cgl6.js +0 -1986
  699. package/dist/en-US-ghR-1_C2.js +0 -994
  700. package/dist/es-ES-BtWn2FOQ.js +0 -994
  701. package/dist/es-ES-BzoYprDP.js +0 -1986
  702. package/dist/et-EE-DlbiEFQu.js +0 -1986
  703. package/dist/fi-FI-GSyT4vm7.js +0 -1986
  704. package/dist/fr-FR-BEImhl_J.js +0 -1986
  705. package/dist/fr-FR-HvIkGqJf.js +0 -994
  706. package/dist/hr-HR-CNFI9uDD.js +0 -1986
  707. package/dist/hu-HU-D4xFA3R6.js +0 -1986
  708. package/dist/individualFormConfig-BrFLPTfr.js +0 -171
  709. package/dist/it-IT-B65JP9Qv.js +0 -1986
  710. package/dist/it-IT-CjbZahlB.js +0 -994
  711. package/dist/ja-JP-4jufT0xh.js +0 -994
  712. package/dist/ja-JP-CgGmwtzl.js +0 -1986
  713. package/dist/lt-LT-D_Q1Z3N4.js +0 -1986
  714. package/dist/lv-LV-aF5bMtic.js +0 -1986
  715. package/dist/mapExistingFile-BE74t9jV.js +0 -25
  716. package/dist/mapTransferInstrumentToPayoutAccount-DR8zv8gS.js +0 -30
  717. package/dist/nl-NL-B3xjfpMi.js +0 -994
  718. package/dist/nl-NL-GDXpht_y.js +0 -1986
  719. package/dist/no-NO-CEow5Bac.js +0 -1986
  720. package/dist/omitObscuredFieldsIfUnchanged-DhCrqm4T.js +0 -28
  721. package/dist/pl-PL-Bir_Ltlv.js +0 -1986
  722. package/dist/process-field-configurations-DugpEY9k.js +0 -185
  723. package/dist/processValidationErrors-RYlNmxB9.js +0 -203
  724. package/dist/pt-PT-BpYDD-PX.js +0 -994
  725. package/dist/pt-PT-lkmVY63I.js +0 -1986
  726. package/dist/ro-RO-CTQvP4R9.js +0 -1986
  727. package/dist/ru-RU-BlgIj-Q4.js +0 -994
  728. package/dist/sk-SK-Ct3OVI0e.js +0 -1986
  729. package/dist/sl-SI-CNjkFWB7.js +0 -1986
  730. package/dist/sv-SE-7lcf_fB9.js +0 -994
  731. package/dist/sv-SE-BwREUuQq.js +0 -1986
  732. package/dist/types/api/companyDataSet/useCompanyDataset.d.ts +0 -5
  733. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/formatId.d.ts +0 -3
  734. package/dist/types/core/models/country-code.d.ts +0 -250
  735. package/dist/types/embeds/ShadowStylesRoot.d.ts +0 -3
  736. package/dist/types/utils/sanitizeHtml.d.ts +0 -3
  737. package/dist/types/utils/useStateFromProp.d.ts +0 -9
  738. package/dist/useToastContext-CF2xonft.js +0 -21
  739. package/dist/utils-B1H_8b1P.js +0 -74
  740. package/dist/validate-wd48TLfx.js +0 -245
  741. package/dist/zh-CN-xYZH718R.js +0 -994
  742. package/dist/zh-TW-DqBBNurv.js +0 -994
  743. /package/dist/types/{core/types/AccountHolder.types.d.ts → types/accountHolder.d.ts} +0 -0
  744. /package/dist/types/{core/models → types/datasets}/currency.d.ts +0 -0
  745. /package/dist/types/{core/models → types/datasets}/province-code.d.ts +0 -0
  746. /package/dist/types/{core/models → types/datasets}/state-code.d.ts +0 -0
  747. /package/dist/types/{core/models → types}/errors/form-verification-errors.d.ts +0 -0
  748. /package/dist/types/{core/models → types}/errors/remediation-action-context.d.ts +0 -0
  749. /package/dist/types/{core/models → types}/file.d.ts +0 -0
@@ -2,30 +2,20 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "74e85ce1-0038-47d8-bdf4-f7ea3f406bbb", e._sentryDebugIdIdentifier = "sentry-dbid-74e85ce1-0038-47d8-bdf4-f7ea3f406bbb");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "d847da80-ec3c-4248-9087-2ee05268b2be", e._sentryDebugIdIdentifier = "sentry-dbid-d847da80-ec3c-4248-9087-2ee05268b2be");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { q as useApiContext, b5 as useMutation, b7 as httpPost, r as useQuery, dl as KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS, b as useI18nContext, c$ as MemoizedDocumentUpload, Z as Button, G as Typography, am as CountryCodes, P as CompanyTypesValue, bR as useGlobalData, dm as getForms, X as TaskTypes, dn as BasicInformation, by as getFormProps, dp as CompanyStructure, dq as AdditionalInformation, dr as MemoizedConstitutionalDocument, z as LegalEntityType, ds as FinancialInformation, b3 as entriesOf, b9 as businessDetailsComponentsKeyMapping, dt as solePropBusinessDetailsKeyMapping, aY as objectsDeepEqual, du as operationalAddressIsSameIds, dv as COUNTRIES_USING_COMPANY_SEARCH, dw as FIELDS_NEEDED_FOR_COMPANY_SEARCH, bB as keysOf, i as isUndefinedOrNull, aH as summaryItem, dx as solePropBusinessDetailsApiKeyMapping, d6 as businessDetailsApiKeyMapping, bz as isEmpty, dy as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, a_ as datasetUtilities, cn as mapAddressLabels, dz as companyTypeMetadata, an as isEmpty$1, aJ as createLogger, cm as filterOutUnwantedAssociationsIfRootLE, dA as documentFormsIds, ap as resolveFieldMetadata, dB as defaultFieldMetadata, dC as inferCompanyRegistrationNumberType, dD as getCompanyRegistrationNumberOptions, dE as defaultFieldConfig, c7 as defaultFieldMetadata$1, dF as countryToTaxInfoTypeMap, c8 as defaultFieldConfig$1, dG as getKeyForField, cr as drop, ak as getOwnEntityAssociations, cv as doArraysMatch, U as useAccountHolder, $ as useAnalyticsContext, a5 as useExperimentsContext, K as useSettingsContext, dH as verifiedBusiness, bb as useQueryClient, bG as useStateContext, M as SettingNames, dI as setIsBankAccountRequestedForOrganization, bW as getAssociatedLeAnalyticsPayload, a$ as getCapabilityProblems, dJ as rules, dK as useCompanyDataset, dL as useVerifyTin, dM as setVerifiedBusiness, dN as solePropBusinessDetailsDocumentMapping, dO as businessDetailsDocumentMapping } from "./StoreProvider-COHi02bX.js";
11
+ import { p as useApiContext, bi as useMutation, bk as httpPost, q as useQuery, dT as KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS, ap as useI18nContext, dy as MemoizedDocumentUpload, _ as Button, b5 as Modal, b7 as ModalContent, G as Typography, aq as CountryCodes, P as CompanyTypesValue, dU as useGlobalData, dV as getForms, X as TaskTypes, dW as BasicInformation, ds as getFormProps, dX as CompanyStructure, dY as AdditionalInformation, dZ as MemoizedConstitutionalDocument, y as LegalEntityType, d_ as FinancialInformation, bA as formatObject, bf as entriesOf, cg as getDocument, ch as mapExistingFile, ci as getPageName, bo as businessDetailsComponentsKeyMapping, d$ as solePropBusinessDetailsKeyMapping, e0 as getDefaultRegistrationNumberType, e1 as getDefaultVatNumberType, b1 as objectsDeepEqual, e2 as operationalAddressIsSameIds, e3 as COUNTRIES_USING_COMPANY_SEARCH, e4 as FIELDS_NEEDED_FOR_COMPANY_SEARCH, dh as keysOf, i as isUndefinedOrNull, dK as isDateOlderThanAYear, aL as summaryItem, e5 as solePropBusinessDetailsApiKeyMapping, e6 as businessDetailsApiKeyMapping, di as isEmpty, e7 as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, cl as createDocumentRequest, b3 as datasetUtilities, cG as mapAddressLabels, e8 as companyTypeMetadata, e9 as getProp, ar as isEmpty$1, Y as createLogger, cF as filterOutUnwantedAssociationsIfRootLE, bU as isValidationError, bV as processValidationErrors, bW as isMaintenanceModeError, ea as documentFormsIds, at as resolveFieldMetadata, eb as registrationNumberDefaultFieldMetadata, ec as inferCompanyRegistrationNumberType, ed as getCompanyRegistrationNumberOptions, ee as registrationNumberDefaultFieldConfig, cb as taxInformationDefaultFieldMetadata, ef as countryToTaxInfoTypeMap, cc as taxInformationDefaultFieldConfig, eg as getKeyForField, co as drop, al as getOwnEntityAssociations, cP as doArraysMatch, cL as getFileExtention, U as useAccountHolder, a6 as useToastContext, a0 as useAnalyticsContext, a7 as useExperimentsContext, K as useSettingsContext, eh as verifiedBusiness, bq as useQueryClient, ei as useStateContext, M as SettingNames, ej as setIsBankAccountRequestedForOrganization, bP as getAssociatedLeAnalyticsPayload, b4 as getCapabilityProblems, cp as documentApiUtils, cD as composePerScenarioFormConfigurations, cx as useScenarioConfiguration, ek as rules, cy as getPropsFromConfigurations, el as useCompanySelection, em as useVerifyTin, bQ as getRequiredForms, bR as addValidityToForms, bS as useFormComposer, en as setVerifiedBusiness, eo as FormWrapper, bb as Confirm, ep as solePropBusinessDetailsDocumentMapping, eq as businessDetailsDocumentMapping } from "./StoreProvider-ClKLaHzy.js";
12
12
  import { useState, useEffect, useRef, useCallback, useMemo } from "preact/hooks";
13
- import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-By6uwPUg.js";
14
- import { h as hasDataChanged } from "./hasDataChanged-CIg-bPSm.js";
15
- import { u as useToastContext } from "./useToastContext-CF2xonft.js";
16
- import { a as augmentWithCountryConfigs, c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-DugpEY9k.js";
17
- import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer, t as trackNavigation } from "./dropinUtils-Bk0T79SK.js";
18
- import { i as isValidationError, p as processValidationErrors, d as isMaintenanceModeError, u as useScenarioConfiguration } from "./processValidationErrors-RYlNmxB9.js";
19
- import { C as Confirm } from "./Confirm-okTxq40p.js";
20
- import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-BPrqY9DW.js";
21
- import { F as FormWrapper } from "./FormWrapper-Dvm1o4tC.js";
22
- import { g as getDocument, c as createDocumentRequest, a as getFileExtention, d as documentApiUtils } from "./documentUtils-51iMbUyU.js";
23
- import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-UNUNInq5.js";
13
+ import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-D8dw9Oc3.js";
14
+ import { h as hasDataChanged } from "./hasDataChanged-CwfuS4et.js";
15
+ import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-CL9qlD-O.js";
16
+ import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-BY--eXBQ.js";
24
17
  import cx from "classnames";
25
- import { M as Modal, b as ModalContent } from "./Modal-CRNejb1x.js";
26
- import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-Cid31JpK.js";
27
- import { m as mapExistingFile, g as getPageName } from "./mapExistingFile-BE74t9jV.js";
28
- import { f as formatObject, g as getProp } from "./utils-B1H_8b1P.js";
18
+ import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-D_6u_bSS.js";
29
19
  import { f as formatCurrency } from "./formatCurrency-CMOSdJMB.js";
30
20
  const clearCompanyData = async (legalEntityId, baseUrl) => {
31
21
  return httpPost({
@@ -48,6 +38,16 @@ const useCompanySearch = (data, options) => {
48
38
  return useQuery({
49
39
  queryKey: ["companySearch", data],
50
40
  queryFn: () => handleCompanySearch(rootLegalEntityId.value, baseUrl.value, data),
41
+ // TODO: Remove this once Moody's resolves & bug
42
+ select: (data2) => {
43
+ const transformedResults = data2.results.map((item) => ({
44
+ ...item,
45
+ name: item.name.replaceAll("&", "&")
46
+ }));
47
+ return {
48
+ results: transformedResults
49
+ };
50
+ },
51
51
  retry: 0,
52
52
  ...options
53
53
  });
@@ -134,6 +134,7 @@ function ProofOfDirectorDocument({
134
134
  documentType: "proofOfDirector",
135
135
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$4, {}),
136
136
  country,
137
+ hidePageCount: true,
137
138
  documentTypeSelect: {
138
139
  selectedType: selectedDocumentName,
139
140
  setSelectedType: setSelectedDocumentName,
@@ -220,16 +221,14 @@ function ProofOfOwnershipDocument({
220
221
  description = "weNeedAnOfficialDocumentForOwnership",
221
222
  ...props
222
223
  }) {
223
- var _a;
224
224
  const { i18n } = useI18nContext();
225
225
  const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
226
226
  const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
227
227
  useEffect(() => {
228
- var _a2, _b;
229
- if (((_b = (_a2 = props.data) == null ? void 0 : _a2.proofOfOwnership) == null ? void 0 : _b.length) === 2) {
228
+ if (props.data?.proofOfOwnership?.length === 2) {
230
229
  setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
231
230
  }
232
- }, [(_a = props.data) == null ? void 0 : _a.proofOfOwnership]);
231
+ }, [props.data?.proofOfOwnership]);
233
232
  return /* @__PURE__ */ jsx(
234
233
  MemoizedDocumentUpload,
235
234
  {
@@ -289,6 +288,7 @@ function ProofOfSignatoryDocument({
289
288
  documentType: "proofOfSignatory",
290
289
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, {}),
291
290
  country,
291
+ hidePageCount: true,
292
292
  documentTypeSelect: {
293
293
  selectedType: selectedDocumentName,
294
294
  setSelectedType: setSelectedDocumentName,
@@ -370,9 +370,8 @@ const GuidanceContent$1 = ({
370
370
  country,
371
371
  companyType
372
372
  }) => {
373
- var _a;
374
373
  const { i18n } = useI18nContext();
375
- const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country]) == null ? void 0 : _a[companyType];
374
+ const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
376
375
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
377
376
  acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
378
377
  /* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
@@ -410,7 +409,8 @@ function RegistrationDocument({
410
409
  documentType: "registrationDocument",
411
410
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType }),
412
411
  companyType,
413
- country
412
+ country,
413
+ hidePageCount: true
414
414
  }
415
415
  );
416
416
  }
@@ -465,9 +465,8 @@ const GuidanceContent = ({
465
465
  country,
466
466
  companyType
467
467
  }) => {
468
- var _a;
469
468
  const { i18n } = useI18nContext();
470
- const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country]) == null ? void 0 : _a[companyType];
469
+ const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
471
470
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
472
471
  acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
473
472
  /* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
@@ -509,7 +508,8 @@ function TaxDocument({
509
508
  documentType: "proofOfOrganizationTaxInfo",
510
509
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, { country, companyType }),
511
510
  companyType,
512
- country
511
+ country,
512
+ hidePageCount: true
513
513
  }
514
514
  );
515
515
  }
@@ -531,25 +531,25 @@ function BusinessDetails(props) {
531
531
  proceedToManualDataEntry
532
532
  } = props;
533
533
  const forms = getForms(country);
534
- const formWrapperClasses = (formId) => (activeForm == null ? void 0 : activeForm.formId) !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
534
+ const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
535
535
  const classNames = cx("adyen-kyc-business-details", {
536
- "adyen-kyc-business-details--hide": (activeForm == null ? void 0 : activeForm.formId) === "summary"
536
+ "adyen-kyc-business-details--hide": activeForm?.formId === "summary"
537
537
  });
538
- const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValue.SOLE_PROPRIETORSHIP : companyStructure == null ? void 0 : companyStructure.entityType;
538
+ const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValue.SOLE_PROPRIETORSHIP : companyStructure?.entityType;
539
539
  return /* @__PURE__ */ jsxs("div", { className: classNames, children: [
540
540
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.basicInformation.formId), children: /* @__PURE__ */ jsx(
541
541
  BasicInformation,
542
542
  {
543
543
  ...getFormProps(props, forms.basicInformation.formId),
544
544
  id: forms.basicInformation.formId,
545
- heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) || forms.basicInformation.formHeading),
546
- description: (activeForm == null ? void 0 : activeForm.formDescription) ? i18n.get(activeForm == null ? void 0 : activeForm.formDescription) : void 0,
545
+ heading: i18n.get(activeForm?.formHeading || forms.basicInformation.formHeading),
546
+ description: activeForm?.formDescription ? i18n.get(activeForm?.formDescription) : void 0,
547
547
  country,
548
548
  companyType,
549
549
  isTopLevelEntity,
550
550
  showBusinessSelection,
551
551
  showCompanyStructure,
552
- isActiveForm: (activeForm == null ? void 0 : activeForm.formId) === forms.basicInformation.formId,
552
+ isActiveForm: activeForm?.formId === forms.basicInformation.formId,
553
553
  loading,
554
554
  proceedToManualDataEntry,
555
555
  searchResults,
@@ -564,9 +564,9 @@ function BusinessDetails(props) {
564
564
  {
565
565
  ...getFormProps(props, forms.companyStructure.formId),
566
566
  id: forms.companyStructure.formId,
567
- heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) ?? forms.companyStructure.formHeading),
567
+ heading: i18n.get(activeForm?.formHeading ?? forms.companyStructure.formHeading),
568
568
  description: i18n.get(
569
- (activeForm == null ? void 0 : activeForm.formDescription) ?? forms.companyStructure.formDescription
569
+ activeForm?.formDescription ?? forms.companyStructure.formDescription
570
570
  ),
571
571
  country,
572
572
  showCompanyStructure
@@ -577,7 +577,7 @@ function BusinessDetails(props) {
577
577
  {
578
578
  ...getFormProps(props, forms.additionalInformation.formId),
579
579
  id: forms.additionalInformation.formId,
580
- heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) ?? forms.additionalInformation.formHeading),
580
+ heading: i18n.get(activeForm?.formHeading ?? forms.additionalInformation.formHeading),
581
581
  country,
582
582
  companyType,
583
583
  showCompanyStructure
@@ -613,6 +613,7 @@ function BusinessDetails(props) {
613
613
  description: i18n.get(forms.companyTaxDocument.formDescription),
614
614
  documentField: "taxDocument",
615
615
  documentType: "vatDocument",
616
+ hidePageCount: true,
616
617
  guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
617
618
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
618
619
  " ",
@@ -707,25 +708,24 @@ const mapBasicInformation = (data) => {
707
708
  }, {});
708
709
  };
709
710
  const mapDbaName = (legalEntity) => {
710
- var _a, _b, _c, _d;
711
711
  const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
712
712
  const dbaName = {};
713
- if (typeof (entity == null ? void 0 : entity.doingBusinessAsAbsent) !== "undefined") {
713
+ if (typeof entity?.doingBusinessAsAbsent !== "undefined") {
714
714
  dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
715
715
  } else {
716
- if (entity == null ? void 0 : entity.doingBusinessAs) {
717
- dbaName.hasDoingBusinessAs = (entity == null ? void 0 : entity.doingBusinessAs) !== (legalEntity.type === "organization" ? (_a = legalEntity.organization) == null ? void 0 : _a.legalName : (_b = legalEntity.soleProprietorship) == null ? void 0 : _b.name);
716
+ if (entity?.doingBusinessAs) {
717
+ dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
718
718
  } else {
719
719
  dbaName.hasDoingBusinessAs = void 0;
720
720
  }
721
721
  }
722
- if ((_c = legalEntity.organization) == null ? void 0 : _c.doingBusinessAs) {
723
- dbaName.doingBusinessAs = (_d = legalEntity.organization) == null ? void 0 : _d.doingBusinessAs;
722
+ if (legalEntity.organization?.doingBusinessAs) {
723
+ dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
724
724
  }
725
725
  return dbaName;
726
726
  };
727
727
  const mapIsUen = (taxInformation, registrationNumber, country) => {
728
- const currentCountryTaxInfo = taxInformation == null ? void 0 : taxInformation.find((taxInfo) => taxInfo.country === country);
728
+ const currentCountryTaxInfo = taxInformation?.find((taxInfo) => taxInfo.country === country);
729
729
  if (!currentCountryTaxInfo || country !== "SG") return {};
730
730
  return {
731
731
  registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
@@ -735,14 +735,21 @@ const mapIsUen = (taxInformation, registrationNumber, country) => {
735
735
  const mapAdditionalInformation = (data, legalEntity) => {
736
736
  if (!data) return;
737
737
  const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
738
- const currentCountry = entity == null ? void 0 : entity.registeredAddress.country;
738
+ const currentCountry = entity?.registeredAddress.country;
739
739
  const dbaNameFields = mapDbaName(legalEntity);
740
740
  const isUen = mapIsUen(
741
741
  data.taxInformation,
742
742
  data.registrationNumber,
743
743
  currentCountry
744
744
  );
745
- const operationalAddressIsSame = (entity == null ? void 0 : entity.principalPlaceOfBusiness) && !objectsDeepEqual(entity == null ? void 0 : entity.principalPlaceOfBusiness, entity == null ? void 0 : entity.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
745
+ const companyType = legalEntity.type === "organization" ? legalEntity.organization?.type : CompanyTypesValue.SOLE_PROPRIETORSHIP;
746
+ const registrationNumberType = getDefaultRegistrationNumberType(
747
+ entity?.registrationNumber,
748
+ currentCountry,
749
+ companyType
750
+ );
751
+ const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
752
+ const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
746
753
  const result = entriesOf(data).reduce(
747
754
  (acc, [field]) => {
748
755
  if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
@@ -759,10 +766,28 @@ const mapAdditionalInformation = (data, legalEntity) => {
759
766
  }
760
767
  return acc;
761
768
  },
762
- { operationalAddressIsSame }
769
+ { operationalAddressIsSame, registrationNumberType, vatNumberType }
763
770
  );
764
771
  return { ...result, ...dbaNameFields, ...isUen };
765
772
  };
773
+ const mapLocalization = (data) => {
774
+ const mappings = [
775
+ { formField: "jaHaniLegalCompanyName", script: "ja-Hani", legalEntityField: "legalName" },
776
+ { formField: "jaKanaLegalCompanyName", script: "ja-Kana", legalEntityField: "legalName" }
777
+ ];
778
+ const localizedScriptsAndFields = data.organization?.localization || data.soleProprietorship?.localization;
779
+ if (!localizedScriptsAndFields) {
780
+ return;
781
+ }
782
+ const result = {};
783
+ mappings.forEach((mapping) => {
784
+ const value = localizedScriptsAndFields.find(
785
+ (localization) => localization.script === mapping.script
786
+ )?.fields?.[mapping.legalEntityField];
787
+ result[mapping.formField] = value;
788
+ });
789
+ return result;
790
+ };
766
791
  const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
767
792
  if (!legalEntity) return {};
768
793
  const {
@@ -774,16 +799,20 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
774
799
  companyConstitutionalDocument
775
800
  } = mapApiDocumentToBusinessDetailsDocuments(legalEntity.id);
776
801
  const buildSolePropSchema = () => {
777
- var _a, _b, _c;
778
802
  const solePropData = formatObject(
779
803
  legalEntity,
780
804
  solePropBusinessDetailsKeyMapping
781
805
  );
782
- const country = ((_b = (_a = solePropData == null ? void 0 : solePropData.additionalInformation) == null ? void 0 : _a.registrationAddress) == null ? void 0 : _b.country) ?? ((_c = parentEntity == null ? void 0 : parentEntity.individual) == null ? void 0 : _c.residentialAddress.country);
806
+ const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
807
+ if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
808
+ solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
809
+ legalEntity.soleProprietorship.financialReports
810
+ );
811
+ }
783
812
  return {
784
813
  ...solePropData,
785
814
  basicInformation: {
786
- ...solePropData == null ? void 0 : solePropData.basicInformation,
815
+ ...solePropData?.basicInformation,
787
816
  country
788
817
  },
789
818
  companyConstitutionalDocument
@@ -799,13 +828,13 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
799
828
  companyFinancialInformation: {}
800
829
  };
801
830
  const businessDetailsSchema = legalEntity.type === "organization" ? orgSchema : buildSolePropSchema();
831
+ const localization = mapLocalization(legalEntity);
802
832
  return entriesOf(businessDetailsSchema).reduce((componentData, [key]) => {
803
- var _a;
804
833
  switch (key) {
805
834
  case "basicInformation": {
806
835
  return {
807
836
  ...componentData,
808
- [key]: mapBasicInformation(businessDetailsSchema[key])
837
+ [key]: { ...mapBasicInformation(businessDetailsSchema[key]), ...localization ?? {} }
809
838
  };
810
839
  }
811
840
  case "companyStructure": {
@@ -859,11 +888,10 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
859
888
  };
860
889
  }
861
890
  case "companyFinancialInformation": {
862
- return ((_a = legalEntity == null ? void 0 : legalEntity.organization) == null ? void 0 : _a.financialReports) ? {
891
+ const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
892
+ return financialReports?.length ? {
863
893
  ...componentData,
864
- [key]: mapFinancialReportsToFinancialInformation(
865
- legalEntity.organization.financialReports
866
- )
894
+ [key]: mapFinancialReportsToFinancialInformation(financialReports)
867
895
  } : componentData;
868
896
  }
869
897
  default:
@@ -871,6 +899,74 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
871
899
  }
872
900
  }, {});
873
901
  };
902
+ const businessDetailsBase = {
903
+ /* Base required fields */
904
+ country: { rule: "REQUIRED" },
905
+ entityType: { rule: "businessRequiresCompanyType" },
906
+ legalCompanyName: { rule: "REQUIRED" },
907
+ jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
908
+ jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
909
+ hasDoingBusinessAs: { rule: "REQUIRED" },
910
+ registrationAddress: { rule: "REQUIRED" },
911
+ operationalAddressIsSame: { rule: "REQUIRED" },
912
+ /* Base optional fields */
913
+ operationalAddress: { rule: "OPTIONAL" },
914
+ /* Fields with custom country specific rules */
915
+ stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
916
+ stockISIN: { rule: "ifPubliclyTradedCompany" },
917
+ stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
918
+ dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
919
+ stateOrProvince: { rule: "countryUsingCompanySearch" },
920
+ registrationNumber: { rule: "countryRequiresRegistrationNumber" },
921
+ registrationNumberType: { rule: "countryRequiresRegistrationNumber" },
922
+ exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
923
+ eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
924
+ countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
925
+ taxDocument: { rule: "ifCountryUsAndTinFailed" }
926
+ };
927
+ const taxInformationBase = {
928
+ vatNumber: { rule: "countryUsesVat" },
929
+ vatNumberType: { rule: "countryUsesVat" },
930
+ exemptedFromVat: { rule: "countryUsesVat" },
931
+ vatAbsenceReason: { rule: "countryUsesVat" },
932
+ taxInformation: { rule: "countryUsesTaxId" },
933
+ exemptedFromTax: { rule: "countryHasTaxExemptions" },
934
+ isUen: { rule: "countryUsesUenOrGst" }
935
+ };
936
+ const financialInformationBase = {
937
+ numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
938
+ financialReportingDate: { rule: "isFinancialReportingFieldsRequired" }
939
+ };
940
+ const businessDetailsFieldsPerScenario = {
941
+ L0: {
942
+ country: { rule: "REQUIRED" },
943
+ legalCompanyName: { rule: "REQUIRED" },
944
+ stateOrProvince: { rule: "countryUsingCompanySearch" },
945
+ ...financialInformationBase
946
+ },
947
+ L1: {
948
+ ...businessDetailsBase,
949
+ ...financialInformationBase
950
+ },
951
+ L: {
952
+ ...businessDetailsBase,
953
+ ...taxInformationBase,
954
+ ...financialInformationBase
955
+ },
956
+ L_PROOFOFADDRESS: {
957
+ // TODO this field does not exist
958
+ // proofOfAddressDocument: { rule: 'REQUIRED' },
959
+ },
960
+ L_REGDOC: {
961
+ registrationDocument: { rule: "REQUIRED" }
962
+ },
963
+ L_TAXDOC: {
964
+ taxDocument: { rule: "REQUIRED" }
965
+ },
966
+ L_BAFIN: {
967
+ legalForm: { rule: "REQUIRED" }
968
+ }
969
+ };
874
970
  const adjustFormData = (oldFormData, newFormData) => {
875
971
  const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
876
972
  return schema.reduce((acc, key) => {
@@ -893,9 +989,17 @@ const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
893
989
  return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
894
990
  }, {});
895
991
  };
896
- const formatFinancialInformationSummary = (data, i18n, country) => {
897
- if (!data) return {};
898
- const summary = {
992
+ const formatFinancialInformationSummary = (data, i18n, country, dateOfIncorporation) => {
993
+ let summary;
994
+ if (!data) return void 0;
995
+ if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
996
+ if (country === CountryCodes.UnitedKingdom) {
997
+ summary = { numberOfEmployees: `${data.numberOfEmployees}` };
998
+ return summary;
999
+ }
1000
+ return void 0;
1001
+ }
1002
+ summary = {
899
1003
  currency: data.currency,
900
1004
  financialReportingDate: data.financialReportingDate
901
1005
  };
@@ -914,81 +1018,81 @@ const formatFinancialInformationSummary = (data, i18n, country) => {
914
1018
  return summary;
915
1019
  };
916
1020
  const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
917
- var _a, _b, _c, _d, _e, _f, _g, _h;
918
1021
  const {
919
1022
  companyRegistrationDocument,
920
1023
  companyTaxDocument,
921
1024
  companyProofOfDirectorDocument,
922
1025
  companyConstitutionalDocument,
923
1026
  companyProofOfSignatoryDocument,
924
- companyProofOfOwnershipDocument
1027
+ companyProofOfOwnershipDocument,
1028
+ basicInformation
925
1029
  } = data;
926
1030
  const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
927
- (_a = data.basicInformation) == null ? void 0 : _a.country
1031
+ basicInformation?.country
928
1032
  ) ? "proofOfOrganizationTaxInfo" : "vatDocument";
929
1033
  const documents = await Promise.all([
930
1034
  createDocumentRequest({
931
1035
  entityId,
932
1036
  entityType: "legalEntity",
933
1037
  documentType: "registrationDocument",
934
- page1: (_b = companyRegistrationDocument == null ? void 0 : companyRegistrationDocument.registrationDocument) == null ? void 0 : _b[0]
1038
+ page1: companyRegistrationDocument?.registrationDocument?.[0]
935
1039
  }),
936
1040
  createDocumentRequest({
937
1041
  entityId,
938
1042
  entityType: "legalEntity",
939
1043
  documentType: taxDocumentType,
940
- page1: (_c = companyTaxDocument == null ? void 0 : companyTaxDocument.taxDocument) == null ? void 0 : _c[0]
1044
+ page1: companyTaxDocument?.taxDocument?.[0]
941
1045
  }),
942
1046
  createDocumentRequest({
943
1047
  entityId,
944
1048
  entityType: "legalEntity",
945
1049
  documentType: "proofOfDirector",
946
- page1: (_d = companyProofOfDirectorDocument == null ? void 0 : companyProofOfDirectorDocument.proofOfDirector) == null ? void 0 : _d[0]
1050
+ page1: companyProofOfDirectorDocument?.proofOfDirector?.[0]
947
1051
  }),
948
1052
  createDocumentRequest({
949
1053
  entityId,
950
1054
  entityType: "legalEntity",
951
1055
  documentType: "constitutionalDocument",
952
- page1: (_e = companyConstitutionalDocument == null ? void 0 : companyConstitutionalDocument.constitutionalDocument) == null ? void 0 : _e[0]
1056
+ page1: companyConstitutionalDocument?.constitutionalDocument?.[0]
953
1057
  }),
954
1058
  createDocumentRequest({
955
1059
  entityId,
956
1060
  entityType: "legalEntity",
957
1061
  documentType: "proofOfSignatory",
958
- page1: (_f = companyProofOfSignatoryDocument == null ? void 0 : companyProofOfSignatoryDocument.proofOfSignatory) == null ? void 0 : _f[0]
1062
+ page1: companyProofOfSignatoryDocument?.proofOfSignatory?.[0]
959
1063
  }),
960
1064
  createDocumentRequest({
961
1065
  entityId,
962
1066
  entityType: "legalEntity",
963
1067
  documentType: "proofOfOwnership",
964
- page1: (_g = companyProofOfOwnershipDocument == null ? void 0 : companyProofOfOwnershipDocument.proofOfOwnership) == null ? void 0 : _g[0],
965
- page2: (_h = companyProofOfOwnershipDocument == null ? void 0 : companyProofOfOwnershipDocument.proofOfOwnership) == null ? void 0 : _h[1]
1068
+ page1: companyProofOfOwnershipDocument?.proofOfOwnership?.[0],
1069
+ page2: companyProofOfOwnershipDocument?.proofOfOwnership?.[1]
966
1070
  })
967
1071
  ]);
968
1072
  return documents.filter(Boolean);
969
1073
  };
970
1074
  const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperimentEnabled) => {
971
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
972
1075
  const requestObj = {
973
1076
  ...formatObject(
974
1077
  data,
975
1078
  accountHolder === "mySoleProprietorName" ? solePropBusinessDetailsApiKeyMapping : businessDetailsApiKeyMapping
976
1079
  )
977
1080
  };
978
- (_a = requestObj.organization) == null ? true : delete _a.legalFormDescription;
1081
+ delete requestObj.organization?.legalFormDescription;
979
1082
  const taxData = COUNTRIES_USING_COMPANY_SEARCH.includes(
980
- (_b = data.basicInformation) == null ? void 0 : _b.country
981
- ) ? (_c = data.basicInformation) == null ? void 0 : _c.taxInformation : (_d = data.additionalInformation) == null ? void 0 : _d.taxInformation;
1083
+ data.basicInformation?.country
1084
+ ) ? data.basicInformation?.taxInformation : data.additionalInformation?.taxInformation;
982
1085
  const registrationNumber = COUNTRIES_USING_COMPANY_SEARCH.includes(
983
- (_e = data.basicInformation) == null ? void 0 : _e.country
984
- ) ? (_f = data.basicInformation) == null ? void 0 : _f.registrationNumber : (_g = data.additionalInformation) == null ? void 0 : _g.registrationNumber;
985
- const doingBusinessAs = ((_h = data.additionalInformation) == null ? void 0 : _h.doingBusinessAs) ?? "";
1086
+ data.basicInformation?.country
1087
+ ) ? data.basicInformation?.registrationNumber : data.additionalInformation?.registrationNumber;
1088
+ const localization = processLocalizationFields(data.basicInformation);
1089
+ const doingBusinessAs = data.additionalInformation?.doingBusinessAs ?? "";
986
1090
  const entityObject = isEmpty(data.companyStructure) ? requestObj.soleProprietorship : requestObj.organization;
987
1091
  if (entityObject) {
988
1092
  if (taxData) {
989
1093
  entityObject.taxInformation = taxData;
990
1094
  }
991
- if (!!requestObj.soleProprietorship && !((_i = requestObj.soleProprietorship) == null ? void 0 : _i.countryOfGoverningLaw) && !!((_j = data.basicInformation) == null ? void 0 : _j.country)) {
1095
+ if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
992
1096
  requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
993
1097
  }
994
1098
  if (registrationNumber) {
@@ -997,168 +1101,86 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
997
1101
  requestObj.organization.registrationNumberAbsent = false;
998
1102
  }
999
1103
  }
1000
- if (((_k = data.additionalInformation) == null ? void 0 : _k.exemptedFromRegistrationNumber) && isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && requestObj.organization) {
1001
- requestObj.organization.registrationNumberAbsent = (_l = data.additionalInformation) == null ? void 0 : _l.exemptedFromRegistrationNumber;
1104
+ if (localization) {
1105
+ entityObject.localization = localization;
1002
1106
  }
1003
- if ((_m = data.additionalInformation) == null ? void 0 : _m.vatAbsenceReason) {
1107
+ if (data.additionalInformation?.exemptedFromRegistrationNumber && isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && requestObj.organization) {
1108
+ requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
1109
+ }
1110
+ if (data.additionalInformation?.vatAbsenceReason) {
1004
1111
  entityObject.vatNumber = "";
1005
1112
  }
1006
1113
  if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
1007
- if (typeof ((_n = data.additionalInformation) == null ? void 0 : _n.hasDoingBusinessAs) !== "undefined") {
1008
- entityObject.doingBusinessAsAbsent = !((_o = data.additionalInformation) == null ? void 0 : _o.hasDoingBusinessAs);
1114
+ if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
1115
+ entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
1009
1116
  }
1010
1117
  } else {
1011
- entityObject.doingBusinessAs = doingBusinessAs || ((_p = data.basicInformation) == null ? void 0 : _p.legalCompanyName);
1118
+ entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
1012
1119
  delete entityObject.doingBusinessAsAbsent;
1013
1120
  }
1014
- if (((_q = data.additionalInformation) == null ? void 0 : _q.operationalAddressIsSame) === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
1121
+ if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
1015
1122
  entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
1016
1123
  }
1017
1124
  if (!isEmpty(data.companyFinancialInformation)) {
1125
+ const isIncorporationDateDependencyEnabled = isExperimentEnabled(
1126
+ "EnableIncorporationDateBasedFinancialValidationForHO"
1127
+ );
1018
1128
  entityObject.financialReports = [
1019
- mapFinancialInformationToFinancialReport(data.companyFinancialInformation)
1129
+ mapFinancialInformationToFinancialReport(
1130
+ data.companyFinancialInformation,
1131
+ isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
1132
+ )
1020
1133
  ];
1021
1134
  }
1022
1135
  }
1023
1136
  requestObj.type = requestObj.organization ? LegalEntityType.ORGANIZATION : LegalEntityType.SOLE_PROPRIETORSHIP;
1024
- if ((entityObject == null ? void 0 : entityObject.registeredAddress.country) === "US") {
1137
+ if (entityObject?.registeredAddress.country === "US") {
1025
1138
  delete entityObject.registrationNumber;
1026
1139
  }
1027
1140
  return requestObj;
1028
1141
  };
1029
- const businessDetailsBase = {
1030
- /* Base required fields */
1031
- country: { rule: "REQUIRED" },
1032
- entityType: { rule: "businessRequiresCompanyType" },
1033
- legalCompanyName: { rule: "REQUIRED" },
1034
- hasDoingBusinessAs: { rule: "REQUIRED" },
1035
- registrationAddress: { rule: "REQUIRED" },
1036
- operationalAddressIsSame: { rule: "REQUIRED" },
1037
- /* Base optional fields */
1038
- operationalAddress: { rule: "OPTIONAL" },
1039
- /* Fields with custom country specific rules */
1040
- stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
1041
- stockISIN: { rule: "ifPubliclyTradedCompany" },
1042
- stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
1043
- dateOfIncorporation: { rule: "countryRequiresDateOfIncorporationForCompanies" },
1044
- stateOrProvince: { rule: "countryUsingCompanySearch" },
1045
- registrationNumber: { rule: "countryRequiresRegistrationNumber" },
1046
- exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
1047
- eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
1048
- countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
1049
- taxDocument: { rule: "ifCountryUsAndTinFailed" }
1050
- };
1051
- const taxInformationBase = {
1052
- vatNumber: { rule: "countryUsesVat" },
1053
- exemptedFromVat: { rule: "countryUsesVat" },
1054
- vatAbsenceReason: { rule: "countryUsesVat" },
1055
- taxInformation: { rule: "countryUsesTaxId" },
1056
- exemptedFromTax: { rule: "countryHasTaxExemptions" },
1057
- isUen: { rule: "countryUsesUenOrGst" }
1058
- };
1059
- const financialInformationBase = {
1060
- numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
1061
- financialReportingDate: { rule: "countryRequiresFinancialInformation" }
1062
- };
1063
- const businessDetailsFieldsPerScenario = {
1064
- L0: {
1065
- country: { rule: "REQUIRED" },
1066
- legalCompanyName: { rule: "REQUIRED" },
1067
- stateOrProvince: { rule: "countryUsingCompanySearch" },
1068
- ...financialInformationBase
1069
- },
1070
- L1: {
1071
- ...businessDetailsBase,
1072
- ...financialInformationBase
1073
- },
1074
- L: {
1075
- ...businessDetailsBase,
1076
- ...taxInformationBase,
1077
- ...financialInformationBase
1078
- },
1079
- L_PROOFOFADDRESS: {
1080
- // TODO this field does not exist
1081
- // proofOfAddressDocument: { rule: 'REQUIRED' },
1082
- },
1083
- L_REGDOC: {
1084
- registrationDocument: { rule: "REQUIRED" }
1085
- },
1086
- L_TAXDOC: {
1087
- taxDocument: { rule: "REQUIRED" }
1142
+ const processLocalizationFields = (data) => {
1143
+ if (!data) {
1144
+ return;
1088
1145
  }
1089
- };
1090
- const businessDetailsCountryConfig = {
1091
- [CountryCodes.Australia]: {
1092
- entityType: { label: "companyType" },
1093
- exemptedFromTax: { label: "doNotHaveAbn" },
1094
- exemptedFromRegistrationNumber: { label: "doNotHaveAcn" }
1095
- },
1096
- [CountryCodes.Austria]: {
1097
- exemptedFromRegistrationNumber: { label: "doNotHaveFirmenbuchnummer" }
1098
- },
1099
- [CountryCodes.Finland]: {
1100
- exemptedFromRegistrationNumber: { label: "doNotHaveYTunnus" }
1101
- },
1102
- [CountryCodes.Germany]: {
1103
- exemptedFromRegistrationNumber: { label: "doNotHaveHandelsregisternummer" }
1104
- },
1105
- [CountryCodes.HongKong]: {
1106
- entityType: { label: "typeOfCompany" },
1107
- registrationDocument: { label: "companyRegistrationDocument" },
1108
- exemptedFromRegistrationNumber: { label: "iDoNotHaveCompanyRegistrationNumber" }
1109
- },
1110
- [CountryCodes.Japan]: {
1111
- registrationDocument: { label: "chamberOfCommerceExtract" }
1112
- },
1113
- [CountryCodes.Lithuania]: {
1114
- exemptedFromRegistrationNumber: { label: "doNotHaveLtRegistrationNumber" }
1115
- },
1116
- [CountryCodes.Luxembourg]: {
1117
- exemptedFromRegistrationNumber: { label: "doNotHaveLuRegistrationNumber" }
1118
- },
1119
- [CountryCodes.Malaysia]: {
1120
- registrationDocument: { label: "companyProfile" }
1121
- },
1122
- [CountryCodes.Mexico]: {
1123
- registrationDocument: { label: "RfcDocument" }
1124
- },
1125
- [CountryCodes.NewZealand]: {
1126
- taxDocument: { label: "irdDocument" }
1127
- },
1128
- [CountryCodes.Poland]: {
1129
- exemptedFromRegistrationNumber: { label: "doNotHaveRegonKrsNumber" }
1130
- },
1131
- [CountryCodes.PuertoRico]: {
1132
- // exactly matches CountryCodes.UnitedStates, except `stateOrProvince`
1133
- country: { label: "country__US__business" },
1134
- exemptedFromTax: { label: "doNotHaveEIN" }
1135
- },
1136
- [CountryCodes.Singapore]: {
1137
- registrationNumber: { label: "uen" },
1138
- entityType: { label: "companyType" },
1139
- isUen: { label: "iDoNotHaveGst" }
1140
- },
1141
- [CountryCodes.Sweden]: {
1142
- exemptedFromRegistrationNumber: { label: "doNotHaveOrganisationsnummer" }
1143
- },
1144
- [CountryCodes.Switzerland]: {
1145
- exemptedFromRegistrationNumber: { label: "doNotHaveChRegistrationNumber" }
1146
- },
1147
- [CountryCodes.UnitedStates]: {
1148
- country: { label: "country__US__business" },
1149
- stateOrProvince: { label: "stateOrProvince__US__business" },
1150
- doingBusinessAs: { label: "doingBusinessAs" },
1151
- exemptedFromTax: { label: "doNotHaveEIN" }
1146
+ const LOCALIZATION_FIELDS = {
1147
+ jaHaniLegalCompanyName: { script: "ja-Hani", fieldName: "legalName" },
1148
+ jaKanaLegalCompanyName: { script: "ja-Kana", fieldName: "legalName" }
1149
+ };
1150
+ const localization = {};
1151
+ Object.keys(LOCALIZATION_FIELDS).forEach((field) => {
1152
+ const basicInformationFieldSchemaField = field;
1153
+ if (data[basicInformationFieldSchemaField]) {
1154
+ const script = LOCALIZATION_FIELDS[basicInformationFieldSchemaField]?.script;
1155
+ const fieldName = LOCALIZATION_FIELDS[basicInformationFieldSchemaField]?.fieldName;
1156
+ if (script && localization[script]) {
1157
+ localization[script] = {
1158
+ fields: {
1159
+ ...localization[script].fields,
1160
+ [fieldName]: data[basicInformationFieldSchemaField]
1161
+ }
1162
+ };
1163
+ } else if (script && !localization[script]) {
1164
+ localization[script] = {
1165
+ fields: {
1166
+ [fieldName]: data[basicInformationFieldSchemaField]
1167
+ }
1168
+ };
1169
+ }
1170
+ }
1171
+ });
1172
+ if (Object.keys(localization).length === 0) {
1173
+ return;
1152
1174
  }
1175
+ return Object.keys(localization).map((script) => ({
1176
+ script,
1177
+ fields: { ...localization[script].fields }
1178
+ }));
1153
1179
  };
1154
1180
  const MANDATORY_FIELDS_BUSINESS_DETAILS = [
1155
1181
  "basicInformation.legalCompanyName",
1156
1182
  "basicInformation.country"
1157
1183
  ];
1158
- const parseBusinessDetailsScenarios = (scenarios, country) => augmentWithCountryConfigs(
1159
- businessDetailsCountryConfig[country],
1160
- composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario)
1161
- );
1162
1184
  const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) => {
1163
1185
  const value = getProp(data, detail);
1164
1186
  return !isEmpty$1(value);
@@ -1166,74 +1188,72 @@ const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) =>
1166
1188
  const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
1167
1189
  const removeConditionalForms = (forms, isSkippingCompanyStructure) => isSkippingCompanyStructure ? forms.filter((f) => f.formId !== "companyStructure" && f.formId !== "companyType") : forms;
1168
1190
  const formatBasicInformation = (data, labels, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
1169
- var _a, _b, _c, _d, _e;
1170
- const country = data == null ? void 0 : data.country;
1191
+ const country = data?.country;
1171
1192
  const registrationNumberLabel = resolveFieldMetadata(
1172
- defaultFieldConfig[country],
1193
+ registrationNumberDefaultFieldConfig[country],
1173
1194
  {
1174
1195
  companyType,
1175
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data == null ? void 0 : data.registrationNumber, country, companyType) : (_b = (_a = getCompanyRegistrationNumberOptions(country, companyType)) == null ? void 0 : _a[0]) == null ? void 0 : _b.id
1196
+ registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
1176
1197
  },
1177
- defaultFieldMetadata
1198
+ registrationNumberDefaultFieldMetadata
1178
1199
  ).label;
1179
1200
  const taxIdLabel = resolveFieldMetadata(
1180
- defaultFieldConfig$1[country],
1201
+ taxInformationDefaultFieldConfig[country],
1181
1202
  {
1182
1203
  taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
1183
1204
  // TODO use type selector
1184
1205
  companyType: void 0
1185
1206
  },
1186
- defaultFieldMetadata$1
1207
+ taxInformationDefaultFieldMetadata
1187
1208
  ).label;
1188
1209
  const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
1189
1210
  return {
1190
- [((_c = labels == null ? void 0 : labels.basicInformation) == null ? void 0 : _c.legalCompanyName) ?? "legalCompanyName"]: data.legalCompanyName,
1211
+ [labels?.basicInformation?.legalCompanyName ?? "legalCompanyName"]: data.legalCompanyName,
1191
1212
  country: datasetUtils.getCountryName(data.country),
1192
1213
  [getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
1193
1214
  data.stateOrProvince,
1194
1215
  data.country
1195
1216
  ),
1196
- [taxIdLabel]: (_e = (_d = data.taxInformation) == null ? void 0 : _d.find((taxId) => data.country === taxId.country)) == null ? void 0 : _e.number,
1217
+ [taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
1197
1218
  [registrationNumberLabel]: data.registrationNumber,
1198
1219
  countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
1199
1220
  };
1200
1221
  };
1201
1222
  const formatAdditionalInformation = (data, labels, country, companyType, i18n) => {
1202
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
1203
1223
  const registrationNumberLabel = resolveFieldMetadata(
1204
- defaultFieldConfig[country],
1224
+ registrationNumberDefaultFieldConfig[country],
1205
1225
  {
1206
1226
  companyType,
1207
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data == null ? void 0 : data.registrationNumber, country, companyType) : (_b = (_a = getCompanyRegistrationNumberOptions(country, companyType)) == null ? void 0 : _a[0]) == null ? void 0 : _b.id
1227
+ registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
1208
1228
  },
1209
- defaultFieldMetadata
1229
+ registrationNumberDefaultFieldMetadata
1210
1230
  ).label;
1211
1231
  const taxIdLabel = resolveFieldMetadata(
1212
- defaultFieldConfig$1[country],
1232
+ taxInformationDefaultFieldConfig[country],
1213
1233
  {
1214
1234
  taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
1215
1235
  // TODO use type selector
1216
1236
  companyType: void 0
1217
1237
  },
1218
- defaultFieldMetadata$1
1238
+ taxInformationDefaultFieldMetadata
1219
1239
  ).label;
1220
1240
  return {
1221
- [((_c = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _c.doingBusinessAs) ?? "doingBusinessAs"]: data.doingBusinessAs,
1241
+ [labels?.additionalInformation?.legalForm ?? "businessStructure"]: data.legalFormLabel,
1242
+ [labels?.additionalInformation?.doingBusinessAs ?? "doingBusinessAs"]: data.doingBusinessAs,
1222
1243
  [registrationNumberLabel]: data.registrationNumber,
1223
- [taxIdLabel]: data.isUen ? void 0 : (_e = (_d = data.taxInformation) == null ? void 0 : _d.find((taxId) => country === taxId.country)) == null ? void 0 : _e.number,
1224
- [((_f = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _f.vatNumber) ?? "vatNumber"]: data.vatNumber,
1225
- [((_g = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _g.vatAbsenceReason) ?? "vatAbsenceReason"]: data.vatAbsenceReason ? i18n.get(data.vatAbsenceReason) : void 0,
1226
- [((_h = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _h.dateOfIncorporation) ?? "dateOfIncorporation"]: data.dateOfIncorporation,
1227
- [((_i = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _i.stockExchangeMIC) ?? "stockExchangeMIC"]: data.stockExchangeMIC,
1228
- [((_j = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _j.stockISIN) ?? "stockISIN"]: data.stockISIN,
1229
- [((_k = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _k.stockTickerSymbol) ?? "stockTickerSymbol"]: data.stockTickerSymbol,
1230
- [((_l = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _l.eInvoicingCode) ?? "eInvoicingCode"]: data.eInvoicingCode
1244
+ [taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
1245
+ [labels?.additionalInformation?.vatNumber ?? "vatNumber"]: data.vatNumber,
1246
+ [labels?.additionalInformation?.vatAbsenceReason ?? "vatAbsenceReason"]: data.vatAbsenceReason ? i18n.get(data.vatAbsenceReason) : void 0,
1247
+ [labels?.additionalInformation?.dateOfIncorporation ?? "dateOfIncorporation"]: data.dateOfIncorporation,
1248
+ [labels?.additionalInformation?.stockExchangeMIC ?? "stockExchangeMIC"]: data.stockExchangeMIC,
1249
+ [labels?.additionalInformation?.stockISIN ?? "stockISIN"]: data.stockISIN,
1250
+ [labels?.additionalInformation?.stockTickerSymbol ?? "stockTickerSymbol"]: data.stockTickerSymbol,
1251
+ [labels?.additionalInformation?.eInvoicingCode ?? "eInvoicingCode"]: data.eInvoicingCode
1231
1252
  };
1232
1253
  };
1233
1254
  const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) => {
1234
1255
  const datasetUtils = datasetUtilities(i18n.locale);
1235
1256
  return entriesOf(data).reduce((summaryData, [form]) => {
1236
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
1237
1257
  if (!form || !data[form]) return summaryData;
1238
1258
  const isCountryOfGoverningLawEnabled = isExperimentEnabled(
1239
1259
  "EnableCountryOfGoverningLawForUKCompanies"
@@ -1246,7 +1266,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1246
1266
  data[form],
1247
1267
  labels,
1248
1268
  datasetUtils,
1249
- (_a = data.companyStructure) == null ? void 0 : _a.entityType,
1269
+ data.companyStructure?.entityType,
1250
1270
  isCountryOfGoverningLawEnabled
1251
1271
  )
1252
1272
  };
@@ -1255,7 +1275,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1255
1275
  ...summaryData,
1256
1276
  [form]: {
1257
1277
  entityType: i18n.get(
1258
- (_c = companyTypeMetadata[(_b = data[form]) == null ? void 0 : _b.entityType]) == null ? void 0 : _c.name
1278
+ companyTypeMetadata[data[form]?.entityType]?.name
1259
1279
  )
1260
1280
  }
1261
1281
  };
@@ -1267,8 +1287,8 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1267
1287
  additionalInformationFormName: formatAdditionalInformation(
1268
1288
  data[form],
1269
1289
  labels,
1270
- (_d = data.basicInformation) == null ? void 0 : _d.country,
1271
- (_e = data.companyStructure) == null ? void 0 : _e.entityType,
1290
+ data.basicInformation?.country,
1291
+ data.companyStructure?.entityType,
1272
1292
  i18n
1273
1293
  ),
1274
1294
  registrationAddress: mapAddressLabels(data[form].registrationAddress, datasetUtils),
@@ -1281,7 +1301,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1281
1301
  ...summaryData,
1282
1302
  [form]: {
1283
1303
  companyRegistrationDocument: {
1284
- fileName: (_g = (_f = data[form].registrationDocument) == null ? void 0 : _f[0]) == null ? void 0 : _g.name
1304
+ fileName: data[form].registrationDocument?.[0]?.name
1285
1305
  }
1286
1306
  }
1287
1307
  };
@@ -1291,7 +1311,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1291
1311
  ...summaryData,
1292
1312
  [form]: {
1293
1313
  companyTaxDocument: {
1294
- fileName: (_i = (_h = data[form].taxDocument) == null ? void 0 : _h[0]) == null ? void 0 : _i.name
1314
+ fileName: data[form].taxDocument?.[0]?.name
1295
1315
  }
1296
1316
  }
1297
1317
  };
@@ -1301,7 +1321,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1301
1321
  ...summaryData,
1302
1322
  [form]: {
1303
1323
  companyProofOfDirectorDocument: {
1304
- fileName: (_k = (_j = data[form].proofOfDirector) == null ? void 0 : _j[0]) == null ? void 0 : _k.name
1324
+ fileName: data[form].proofOfDirector?.[0]?.name
1305
1325
  }
1306
1326
  }
1307
1327
  };
@@ -1311,7 +1331,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1311
1331
  ...summaryData,
1312
1332
  [form]: {
1313
1333
  companyProofOfSignatoryDocument: {
1314
- fileName: (_m = (_l = data[form].proofOfSignatory) == null ? void 0 : _l[0]) == null ? void 0 : _m.name
1334
+ fileName: data[form].proofOfSignatory?.[0]?.name
1315
1335
  }
1316
1336
  }
1317
1337
  };
@@ -1321,19 +1341,24 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1321
1341
  ...summaryData,
1322
1342
  [form]: {
1323
1343
  companyProofOfOwnershipDocument: {
1324
- fileName: (_n = data[form].proofOfOwnership) == null ? void 0 : _n.map((doc) => doc.name).join("\n")
1344
+ fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n")
1325
1345
  }
1326
1346
  }
1327
1347
  };
1328
- case "companyFinancialInformation":
1348
+ case "companyFinancialInformation": {
1349
+ const isIncorporationDateDependencyEnabled = isExperimentEnabled(
1350
+ "EnableIncorporationDateBasedFinancialValidationForHO"
1351
+ );
1329
1352
  return {
1330
1353
  ...summaryData,
1331
1354
  [form]: formatFinancialInformationSummary(
1332
1355
  data[form],
1333
1356
  i18n,
1334
- (_o = data == null ? void 0 : data.basicInformation) == null ? void 0 : _o.country
1357
+ data?.basicInformation?.country,
1358
+ isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
1335
1359
  )
1336
1360
  };
1361
+ }
1337
1362
  default:
1338
1363
  return summaryData;
1339
1364
  }
@@ -1354,12 +1379,11 @@ async function submitDocuments({
1354
1379
  if (formattedDocument) {
1355
1380
  await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
1356
1381
  formattedDocument.forEach((doc) => {
1357
- var _a;
1358
- userEvents == null ? void 0 : userEvents.addTaskEvent("Success", {
1382
+ userEvents?.addTaskEvent("Success", {
1359
1383
  ...additionalTrackingParams,
1360
1384
  actionType: "upload",
1361
1385
  documentType: doc.type,
1362
- fileExtention: ((_a = doc.attachments) == null ? void 0 : _a.map((item) => getFileExtention(item.pageName))) ?? []
1386
+ fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
1363
1387
  });
1364
1388
  });
1365
1389
  }
@@ -1395,17 +1419,16 @@ async function submit({
1395
1419
  isExperimentEnabled,
1396
1420
  userEvents
1397
1421
  }) {
1398
- var _a, _b, _c, _d, _e;
1399
1422
  const logger = createLogger();
1400
1423
  setLoadingStatus("loading");
1401
1424
  const trackingPayload = {
1402
1425
  ...additionalTrackingParams,
1403
1426
  actionType: "submit",
1404
- companyStructure: ((_a = data.companyStructure) == null ? void 0 : _a.entityType) ?? null,
1405
- countryOfRegistration: ((_b = data.basicInformation) == null ? void 0 : _b.country) ?? null,
1406
- legalEntityName: accountHolder === "theCompanyIWorkFor" ? ((_c = data.basicInformation) == null ? void 0 : _c.legalCompanyName) ?? null : null,
1427
+ companyStructure: data.companyStructure?.entityType ?? null,
1428
+ countryOfRegistration: data.basicInformation?.country ?? null,
1429
+ legalEntityName: accountHolder === "theCompanyIWorkFor" ? data.basicInformation?.legalCompanyName ?? null : null,
1407
1430
  // Only send legalCompanyName for organizations
1408
- usedAdditionalAddress: ((_d = data.additionalInformation) == null ? void 0 : _d.operationalAddressIsSame) === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
1431
+ usedAdditionalAddress: data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
1409
1432
  };
1410
1433
  const entityToUpdate = (() => {
1411
1434
  switch (taskType) {
@@ -1420,12 +1443,12 @@ async function submit({
1420
1443
  }
1421
1444
  })();
1422
1445
  const handleSubmitLegalEntity = async (legalEntity) => {
1423
- if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !(nestedLegalEntity == null ? void 0 : nestedLegalEntity.id) || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !(nestedLegalEntity == null ? void 0 : nestedLegalEntity.id) || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !(associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id)) {
1446
+ if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
1424
1447
  return await createLegalEntity(legalEntity);
1425
1448
  } else {
1426
1449
  return handleUpdateLegalEntity({
1427
1450
  ...drop("type").from(legalEntity),
1428
- id: (entityToUpdate == null ? void 0 : entityToUpdate.id) ?? legalEntityResponse.id
1451
+ id: entityToUpdate?.id ?? legalEntityResponse.id
1429
1452
  });
1430
1453
  }
1431
1454
  };
@@ -1437,7 +1460,7 @@ async function submit({
1437
1460
  if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
1438
1461
  const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
1439
1462
  const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
1440
- const newRoles = (nestedLegalEntityDetails2 == null ? void 0 : nestedLegalEntityDetails2.roles) ?? [];
1463
+ const newRoles = nestedLegalEntityDetails2?.roles ?? [];
1441
1464
  const rolesChanged = !doArraysMatch(existingRoles, newRoles);
1442
1465
  if (rolesChanged) {
1443
1466
  const updatedAssociations = {
@@ -1469,7 +1492,7 @@ async function submit({
1469
1492
  };
1470
1493
  const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse) : null;
1471
1494
  const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
1472
- if ((filteredData == null ? void 0 : filteredData.additionalInformation) && !((_e = filteredData == null ? void 0 : filteredData.additionalInformation) == null ? void 0 : _e.taxInformation)) {
1495
+ if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
1473
1496
  filteredData.additionalInformation.taxInformation = void 0;
1474
1497
  }
1475
1498
  const isCountryOfGoverningLawEnabled = isExperimentEnabled(
@@ -1477,9 +1500,9 @@ async function submit({
1477
1500
  );
1478
1501
  const countryOfGoverningLaw = getCountryOfGoverningLaw(
1479
1502
  isCountryOfGoverningLawEnabled,
1480
- filteredData == null ? void 0 : filteredData.basicInformation
1503
+ filteredData?.basicInformation
1481
1504
  );
1482
- if (filteredData == null ? void 0 : filteredData.basicInformation) {
1505
+ if (filteredData?.basicInformation) {
1483
1506
  if (countryOfGoverningLaw) {
1484
1507
  filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
1485
1508
  } else {
@@ -1496,7 +1519,7 @@ async function submit({
1496
1519
  )
1497
1520
  };
1498
1521
  const legalEntity = await handleSubmitLegalEntity(mappedLegalEntity);
1499
- if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !(associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id)) {
1522
+ if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
1500
1523
  await associateLegalEntityWithParent({
1501
1524
  legalEntity,
1502
1525
  associatedLegalArrangement,
@@ -1511,9 +1534,9 @@ async function submit({
1511
1534
  forms,
1512
1535
  userEvents
1513
1536
  });
1514
- userEvents == null ? void 0 : userEvents.addTaskEvent("Success", trackingPayload);
1537
+ userEvents?.addTaskEvent("Success", trackingPayload);
1515
1538
  showToast({ label: i18n.get("successfullyUpdatedDetails"), variant: "success" });
1516
- onExternalSubmit == null ? void 0 : onExternalSubmit(data);
1539
+ onExternalSubmit?.(data);
1517
1540
  } catch (err) {
1518
1541
  if (isValidationError(err)) {
1519
1542
  setProblems({
@@ -1532,23 +1555,23 @@ async function submit({
1532
1555
  showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
1533
1556
  }
1534
1557
  logger.error(err);
1535
- userEvents == null ? void 0 : userEvents.addTaskEvent("Encountered error", {
1558
+ userEvents?.addTaskEvent("Encountered error", {
1536
1559
  ...trackingPayload,
1537
- returnType: err == null ? void 0 : err.errorCode,
1538
- returnValue: (err == null ? void 0 : err.title) || "backend"
1560
+ returnType: err?.errorCode,
1561
+ returnValue: err?.title || "backend"
1539
1562
  });
1540
1563
  } finally {
1541
1564
  setLoadingStatus("success");
1542
1565
  }
1543
1566
  }
1544
1567
  const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
1545
- if (!isCountryOfGoverningLawEnabled || (basicData == null ? void 0 : basicData.country) !== CountryCodes.UnitedKingdom) {
1568
+ if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
1546
1569
  return void 0;
1547
1570
  }
1548
- if (isCountryOfGoverningLawEnabled && (basicData == null ? void 0 : basicData.country) === CountryCodes.UnitedKingdom && !(basicData == null ? void 0 : basicData.countryOfGoverningLaw)) {
1571
+ if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
1549
1572
  return CountryCodes.UnitedKingdom;
1550
1573
  }
1551
- return basicData == null ? void 0 : basicData.countryOfGoverningLaw;
1574
+ return basicData?.countryOfGoverningLaw;
1552
1575
  };
1553
1576
  function BusinessDetailsDropin({
1554
1577
  country,
@@ -1567,7 +1590,6 @@ function BusinessDetailsDropin({
1567
1590
  onSubmit: onExternalSubmit,
1568
1591
  handleHomeClick
1569
1592
  }) {
1570
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
1571
1593
  const formRef = useRef(null);
1572
1594
  const { accountHolder, setAccountHolder } = useAccountHolder();
1573
1595
  const { showToast } = useToastContext();
@@ -1582,23 +1604,21 @@ function BusinessDetailsDropin({
1582
1604
  state: { currentState }
1583
1605
  } = useStateContext();
1584
1606
  useEffect(() => {
1585
- onChange == null ? void 0 : onChange(currentState);
1607
+ onChange?.(currentState);
1586
1608
  }, [currentState, onChange]);
1587
1609
  const isSoleProp = accountHolder === "mySoleProprietorName";
1588
1610
  const formWith2Views = "basicInformation";
1589
1611
  const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
1590
1612
  const legalEntityType = !isSoleProp ? LegalEntityType.ORGANIZATION : LegalEntityType.SOLE_PROPRIETORSHIP;
1591
1613
  const isUS = country === CountryCodes.UnitedStates;
1592
- const currentCountry = ((_a = currentState.data.basicInformation) == null ? void 0 : _a.country) ?? country;
1614
+ const currentCountry = currentState.data.basicInformation?.country ?? country;
1593
1615
  const isSkippingCompanyStructure = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
1594
- (_b = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _b.type
1616
+ legalEntityResponse?.organization?.type
1595
1617
  ) && accountHolder !== "aTrust" || isSoleProp;
1596
- const [prevLegalEntityResponse, setPrevLegalEntityResponse] = useState(legalEntityResponse);
1597
- if (prevLegalEntityResponse !== legalEntityResponse) {
1598
- const isBankAccountRequested = (_d = (_c = legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) == null ? void 0 : _c.issueBankAccount) == null ? void 0 : _d.requested;
1618
+ useEffect(() => {
1619
+ const isBankAccountRequested = legalEntityResponse?.capabilities?.issueBankAccount?.requested;
1599
1620
  setIsBankAccountRequestedForOrganization(isBankAccountRequested);
1600
- setPrevLegalEntityResponse(legalEntityResponse);
1601
- }
1621
+ }, [legalEntityResponse]);
1602
1622
  const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
1603
1623
  const associatedLeTrackingParams = getAssociatedLeAnalyticsPayload({
1604
1624
  associatedLegalEntity: associatedLegalArrangement
@@ -1607,6 +1627,10 @@ function BusinessDetailsDropin({
1607
1627
  userEvents.updateBaseTrackingPayload({ task: taskType });
1608
1628
  userEvents.addTaskEvent("Landed on page", {
1609
1629
  actionType: "start",
1630
+ ...subjectEntity?.id && subjectEntity?.type && {
1631
+ legalEntityId: subjectEntity.id,
1632
+ entityType: subjectEntity.type
1633
+ },
1610
1634
  ...associatedLeTrackingParams
1611
1635
  });
1612
1636
  }, []);
@@ -1617,9 +1641,9 @@ function BusinessDetailsDropin({
1617
1641
  isSoleProp ? legalEntityResponse : void 0
1618
1642
  );
1619
1643
  });
1620
- const [trustedFields, setTrustedFields] = useState((subjectEntity == null ? void 0 : subjectEntity.trustedFields) ?? void 0);
1644
+ const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
1621
1645
  const [currentProblems, setCurrentProblems] = useState(
1622
- problems ?? ((_f = (_e = getCapabilityProblems(legalEntityResponse, currentCountry)) == null ? void 0 : _e.LegalEntity) == null ? void 0 : _f[legalEntityResponse.id])
1646
+ problems ?? getCapabilityProblems(legalEntityResponse, currentCountry)?.LegalEntity?.[legalEntityResponse.id]
1623
1647
  );
1624
1648
  const [showCompanyStructure, setShowCompanyStructure] = useState(
1625
1649
  currentCountry !== "US" && !isSoleProp
@@ -1639,8 +1663,7 @@ function BusinessDetailsDropin({
1639
1663
  rootLegalEntityId: rootLegalEntityId.value
1640
1664
  });
1641
1665
  useEffect(() => {
1642
- var _a2;
1643
- if (!((_a2 = subjectEntity == null ? void 0 : subjectEntity.documentDetails) == null ? void 0 : _a2.length)) return;
1666
+ if (!subjectEntity?.documentDetails?.length) return;
1644
1667
  documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity.id).then(() => {
1645
1668
  setInitialData(
1646
1669
  mapLegalEntityToBusinessDetailsSchema(
@@ -1653,7 +1676,7 @@ function BusinessDetailsDropin({
1653
1676
  );
1654
1677
  }, []);
1655
1678
  const parseConfiguration = useCallback(
1656
- ({ scenarios, country: country2 }) => parseBusinessDetailsScenarios(scenarios, country2),
1679
+ ({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
1657
1680
  []
1658
1681
  );
1659
1682
  const {
@@ -1689,8 +1712,8 @@ function BusinessDetailsDropin({
1689
1712
  () => getPropsFromConfigurations(
1690
1713
  fieldConfigurations,
1691
1714
  initialForms,
1692
- (currentProblems == null ? void 0 : currentProblems.remediationActions) ? Object.values(currentProblems == null ? void 0 : currentProblems.remediationActions) : [],
1693
- (currentProblems == null ? void 0 : currentProblems.missingData) ?? [],
1715
+ currentProblems?.remediationActions ? Object.values(currentProblems?.remediationActions) : [],
1716
+ currentProblems?.missingData ?? [],
1694
1717
  subjectEntity ? subjectEntity.type === LegalEntityType.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
1695
1718
  subjectEntity,
1696
1719
  solePropBusinessDetailsApiKeyMapping,
@@ -1703,14 +1726,14 @@ function BusinessDetailsDropin({
1703
1726
  customRules,
1704
1727
  {},
1705
1728
  {},
1706
- subjectEntity == null ? void 0 : subjectEntity.type,
1729
+ subjectEntity?.type,
1707
1730
  trustedFields
1708
1731
  ),
1709
1732
  [
1710
1733
  fieldConfigurations,
1711
1734
  initialForms,
1712
- currentProblems == null ? void 0 : currentProblems.remediationActions,
1713
- currentProblems == null ? void 0 : currentProblems.missingData,
1735
+ currentProblems?.remediationActions,
1736
+ currentProblems?.missingData,
1714
1737
  subjectEntity,
1715
1738
  customRules,
1716
1739
  trustedFields
@@ -1731,37 +1754,47 @@ function BusinessDetailsDropin({
1731
1754
  enabled: showBusinessSelection
1732
1755
  }
1733
1756
  );
1734
- const companySearchResults = companySearchResponse == null ? void 0 : companySearchResponse.results;
1735
- const businessName = ((_h = (_g = currentState == null ? void 0 : currentState.data) == null ? void 0 : _g.basicInformation) == null ? void 0 : _h.legalCompanyName) || "";
1736
- const nameMatch = isNormalizedStringMatch(businessName, ((_i = companySearchResults == null ? void 0 : companySearchResults[0]) == null ? void 0 : _i.name) ?? "");
1737
- const taxInformation = (_k = (_j = currentState == null ? void 0 : currentState.data) == null ? void 0 : _j.basicInformation) == null ? void 0 : _k.taxInformation;
1738
- const tin = ((_l = taxInformation == null ? void 0 : taxInformation.find((taxId) => currentCountry === taxId.country)) == null ? void 0 : _l.number) || "";
1757
+ const companySearchResults = companySearchResponse?.results;
1758
+ const businessName = currentState?.data?.basicInformation?.legalCompanyName || "";
1759
+ const nameMatch = isNormalizedStringMatch(businessName, companySearchResults?.[0]?.name ?? "");
1760
+ const taxInformation = currentState?.data?.basicInformation?.taxInformation;
1761
+ const tin = taxInformation?.find((taxId) => currentCountry === taxId.country)?.number || "";
1739
1762
  const [prevCompanySearchResults, setPrevCompanySearchResults] = useState(companySearchResults);
1740
- const { data: singleCompanyDatasetResponse, isLoading: fetchingDataset } = useCompanyDataset(
1741
- singleCompanyDatasetParams,
1742
- {
1743
- enabled: !!singleCompanyDatasetParams && showBusinessSelection
1763
+ useEffect(() => {
1764
+ if (!searchingCompanies && companySearchResults) {
1765
+ userEvents.addPageEvent("Success", {
1766
+ actionType: "submit",
1767
+ label: "companySearch",
1768
+ additionalData: {
1769
+ numberOfResults: companySearchResults.length
1770
+ },
1771
+ ...subjectEntity?.id && subjectEntity?.type && {
1772
+ legalEntityId: subjectEntity.id,
1773
+ entityType: subjectEntity.type
1774
+ },
1775
+ ...associatedLeTrackingParams
1776
+ });
1744
1777
  }
1745
- );
1778
+ }, [
1779
+ searchingCompanies,
1780
+ companySearchResults,
1781
+ userEvents,
1782
+ subjectEntity,
1783
+ associatedLeTrackingParams
1784
+ ]);
1746
1785
  const {
1747
- data: tinResponse,
1748
- isLoading: verifyingTin,
1749
- refetch: fetchTin
1750
- } = useVerifyTin(
1751
- {
1752
- name: businessName,
1753
- tin
1754
- },
1755
- /** With a single result that DOES match the user-provided name, we attempt TIN verification after dataset retrieval */
1756
- {
1757
- enabled: !!singleCompanyDatasetResponse && showBusinessSelection
1758
- }
1759
- );
1786
+ data: singleCompanyDatasetAndTinResponse,
1787
+ isLoading: fetchingDataset,
1788
+ refetch: getCompanySelection
1789
+ } = useCompanySelection(singleCompanyDatasetParams, {
1790
+ enabled: !!singleCompanyDatasetParams && showBusinessSelection
1791
+ });
1792
+ const { refetch: fetchTin } = useVerifyTin({ name: businessName, tin }, { enabled: false });
1760
1793
  const forms = useMemo(() => {
1761
1794
  const requiredForms = getRequiredForms(
1762
1795
  initialForms,
1763
- derivedProps == null ? void 0 : derivedProps.requiredFields,
1764
- derivedProps == null ? void 0 : derivedProps.optionalFields
1796
+ derivedProps?.requiredFields,
1797
+ derivedProps?.optionalFields
1765
1798
  );
1766
1799
  const validityAddedForms = addValidityToForms(
1767
1800
  requiredForms,
@@ -1774,8 +1807,8 @@ function BusinessDetailsDropin({
1774
1807
  );
1775
1808
  }, [
1776
1809
  initialForms,
1777
- derivedProps == null ? void 0 : derivedProps.requiredFields,
1778
- derivedProps == null ? void 0 : derivedProps.optionalFields,
1810
+ derivedProps?.requiredFields,
1811
+ derivedProps?.optionalFields,
1779
1812
  currentState.validityByForm,
1780
1813
  currentProblems,
1781
1814
  currentCountry,
@@ -1787,7 +1820,7 @@ function BusinessDetailsDropin({
1787
1820
  data: formatDataForSummary(
1788
1821
  currentState.data,
1789
1822
  forms,
1790
- derivedProps == null ? void 0 : derivedProps.labels,
1823
+ derivedProps?.labels,
1791
1824
  i18n,
1792
1825
  isExperimentEnabled
1793
1826
  ),
@@ -1795,7 +1828,7 @@ function BusinessDetailsDropin({
1795
1828
  keys: ["operationalAddressIsSame"]
1796
1829
  }
1797
1830
  }),
1798
- [currentState.data, derivedProps == null ? void 0 : derivedProps.labels, forms, i18n, isExperimentEnabled]
1831
+ [currentState.data, derivedProps?.labels, forms, i18n, isExperimentEnabled]
1799
1832
  );
1800
1833
  const canSubmitForm = useMemo(
1801
1834
  () => canSubmit(currentState.data) && hasDataChanged(initialData, currentState.data),
@@ -1863,7 +1896,7 @@ function BusinessDetailsDropin({
1863
1896
  forms,
1864
1897
  onSubmit: submitTask
1865
1898
  });
1866
- const loading = fetchingDataset || verifyingTin || searchingCompanies || resettingTrustedData;
1899
+ const loading = fetchingDataset || searchingCompanies || resettingTrustedData;
1867
1900
  const proceedToManualDataEntry = useCallback(async () => {
1868
1901
  await clearCompanyData2().then(async () => {
1869
1902
  if (!isUS) {
@@ -1875,18 +1908,19 @@ function BusinessDetailsDropin({
1875
1908
  return;
1876
1909
  }
1877
1910
  const { data: refetchedTinResponse } = await fetchTin();
1878
- if ((refetchedTinResponse == null ? void 0 : refetchedTinResponse.matched) === true) {
1911
+ if (refetchedTinResponse?.matched === true) {
1879
1912
  setShowCompanyStructure(true);
1880
1913
  setBusinessMismatchModalOpen(false);
1881
1914
  } else {
1882
1915
  setBusinessMismatchModalOpen(true);
1883
1916
  setTinMatched(false);
1884
- if ((subjectEntity == null ? void 0 : subjectEntity.id) && (subjectEntity == null ? void 0 : subjectEntity.type)) {
1885
- userEvents.addTaskEvent("Opened modal", {
1886
- actionType: "open",
1917
+ if (subjectEntity?.id && subjectEntity?.type) {
1918
+ userEvents.addPageEvent("Encountered error", {
1919
+ actionType: "submit",
1887
1920
  label: "tinVerificationFailure",
1888
1921
  legalEntityId: subjectEntity.id,
1889
- entityType: subjectEntity.type
1922
+ entityType: subjectEntity.type,
1923
+ ...associatedLeTrackingParams
1890
1924
  });
1891
1925
  }
1892
1926
  }
@@ -1896,25 +1930,43 @@ function BusinessDetailsDropin({
1896
1930
  isUS,
1897
1931
  businessName,
1898
1932
  tin,
1899
- fetchTin,
1900
- subjectEntity == null ? void 0 : subjectEntity.id,
1901
- subjectEntity == null ? void 0 : subjectEntity.type,
1933
+ getCompanySelection,
1934
+ subjectEntity?.id,
1935
+ subjectEntity?.type,
1936
+ associatedLeTrackingParams,
1902
1937
  userEvents
1903
1938
  ]);
1904
1939
  if (prevCompanySearchResults !== companySearchResults) {
1905
- if ((companySearchResults == null ? void 0 : companySearchResults.length) === 1 && nameMatch) {
1940
+ if (companySearchResults?.length === 1 && nameMatch) {
1906
1941
  setSingleCompanyDatasetParams({
1907
1942
  company: companySearchResults[0],
1908
- state: (_m = currentState.data.basicInformation) == null ? void 0 : _m.stateOrProvince
1943
+ state: currentState.data.basicInformation?.stateOrProvince,
1944
+ name: businessName,
1945
+ tin
1909
1946
  });
1910
- if ((tinResponse == null ? void 0 : tinResponse.matched) === true) {
1911
- handleNextClick();
1912
- }
1913
- } else if ((companySearchResults == null ? void 0 : companySearchResults.length) === 0 && !searchingCompanies && showBusinessSelection || searchingError) {
1947
+ } else if (companySearchResults?.length === 0 && !searchingCompanies && showBusinessSelection) {
1914
1948
  proceedToManualDataEntry();
1915
1949
  }
1916
1950
  setPrevCompanySearchResults(companySearchResults);
1917
1951
  }
1952
+ const [prevSingleCompanyDatasetResponse, setPrevSingleCompanyDatasetResponse] = useState(
1953
+ singleCompanyDatasetAndTinResponse
1954
+ );
1955
+ if (prevSingleCompanyDatasetResponse !== singleCompanyDatasetAndTinResponse) {
1956
+ if (singleCompanyDatasetAndTinResponse?.tinMatched === true) {
1957
+ setVerifiedBusiness(singleCompanyDatasetAndTinResponse);
1958
+ handleNextClick();
1959
+ } else {
1960
+ setBusinessMismatchModalOpen(true);
1961
+ setTinMatched(false);
1962
+ }
1963
+ setPrevSingleCompanyDatasetResponse(singleCompanyDatasetAndTinResponse);
1964
+ }
1965
+ useEffect(() => {
1966
+ if (searchingError) {
1967
+ proceedToManualDataEntry();
1968
+ }
1969
+ }, [searchingError]);
1918
1970
  const isBusinessSelection = showBusinessSelection && activeForm.formId === formWith2Views;
1919
1971
  const hideFooter = isBusinessSelection === true && loading;
1920
1972
  const hideNextButton = activeForm.formId === formWith2Views ? isBusinessSelection : false;
@@ -1927,7 +1979,7 @@ function BusinessDetailsDropin({
1927
1979
  const selectedFormId = forms[index].formId;
1928
1980
  if (selectedFormId === formWith2Views) {
1929
1981
  if (verifiedBusiness$1) setShowBusinessSelection(false);
1930
- if (activeForm.formId === "companyStructure" && (companySearchResults == null ? void 0 : companySearchResults.length)) {
1982
+ if (activeForm.formId === "companyStructure" && companySearchResults?.length) {
1931
1983
  setShowCompanyStructure(false);
1932
1984
  }
1933
1985
  return gotoFormByFormIndex(index);
@@ -1945,28 +1997,19 @@ function BusinessDetailsDropin({
1945
1997
  gotoFormByFormIndex,
1946
1998
  verifiedBusiness$1,
1947
1999
  activeForm.formId,
1948
- companySearchResults == null ? void 0 : companySearchResults.length,
2000
+ companySearchResults?.length,
1949
2001
  isBusinessSelection
1950
2002
  ]
1951
2003
  );
1952
2004
  const nextClick = useCallback(() => {
1953
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
1954
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) || isSoleProp)
2005
+ if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) || accountHolder !== "theCompanyIWorkFor")
1955
2006
  return handleNextClick();
1956
- const toFormName = (_a2 = forms[forms.findIndex((form) => form.formId === activeForm.formId) + 1]) == null ? void 0 : _a2.formName;
1957
- if (activeForm.formId === formWith2Views && ((_b2 = currentState.validityByForm) == null ? void 0 : _b2.basicInformation) && !isBusinessSelection && !verifiedBusiness$1) {
1958
- trackNavigation({
1959
- userEvents,
1960
- actionType: "next",
1961
- toForm: toFormName || "home",
1962
- label: "next",
1963
- returnValue: "success"
1964
- });
2007
+ if (activeForm.formId === formWith2Views && currentState.validityByForm?.basicInformation && !isBusinessSelection && !verifiedBusiness$1) {
1965
2008
  setCompanySearchParams({
1966
- legalCompanyName: ((_d2 = (_c2 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _c2.basicInformation) == null ? void 0 : _d2.legalCompanyName) ?? "",
1967
- country: ((_e2 = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _e2.country) ?? country,
1968
- stateOrProvince: (_f2 = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _f2.stateOrProvince,
1969
- registrationNumber: (_g2 = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _g2.registrationNumber
2009
+ legalCompanyName: currentState?.data?.basicInformation?.legalCompanyName ?? "",
2010
+ country: currentState?.data.basicInformation?.country ?? country,
2011
+ stateOrProvince: currentState?.data.basicInformation?.stateOrProvince,
2012
+ registrationNumber: currentState?.data.basicInformation?.registrationNumber
1970
2013
  });
1971
2014
  setShowBusinessSelection(true);
1972
2015
  } else {
@@ -1976,29 +2019,21 @@ function BusinessDetailsDropin({
1976
2019
  currentCountry,
1977
2020
  isSoleProp,
1978
2021
  handleNextClick,
1979
- forms,
1980
2022
  activeForm.formId,
1981
- (_n = currentState.validityByForm) == null ? void 0 : _n.basicInformation,
1982
- (_o = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _o.legalCompanyName,
1983
- (_p = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _p.country,
1984
- (_q = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _q.stateOrProvince,
1985
- (_r = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _r.registrationNumber,
2023
+ currentState.validityByForm?.basicInformation,
2024
+ currentState?.data.basicInformation?.legalCompanyName,
2025
+ currentState?.data.basicInformation?.country,
2026
+ currentState?.data.basicInformation?.stateOrProvince,
2027
+ currentState?.data.basicInformation?.registrationNumber,
1986
2028
  isBusinessSelection,
1987
2029
  verifiedBusiness$1,
1988
- userEvents,
1989
2030
  country
1990
2031
  ]);
1991
2032
  const backClick = useCallback(() => {
1992
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick == null ? void 0 : handleBackClick();
2033
+ if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick?.();
1993
2034
  else {
1994
2035
  switch (activeForm.formId) {
1995
2036
  case formWith2Views: {
1996
- trackNavigation({
1997
- userEvents,
1998
- actionType: "back",
1999
- toForm: "basicDetails",
2000
- label: "back"
2001
- });
2002
2037
  if (showBusinessSelection) setShowBusinessSelection(false);
2003
2038
  break;
2004
2039
  }
@@ -2006,22 +2041,22 @@ function BusinessDetailsDropin({
2006
2041
  if (searchingError) {
2007
2042
  setShowBusinessSelection(false);
2008
2043
  setShowCompanyStructure(false);
2009
- handleBackClick == null ? void 0 : handleBackClick();
2044
+ handleBackClick?.();
2010
2045
  break;
2011
2046
  }
2012
2047
  if (!searchingCompanies && companySearchResults && !companySearchResults.length) {
2013
2048
  setShowBusinessSelection(false);
2014
2049
  } else if (!verifiedBusiness$1) setShowCompanyStructure(false);
2015
- handleBackClick == null ? void 0 : handleBackClick();
2050
+ handleBackClick?.();
2016
2051
  break;
2017
2052
  }
2018
2053
  case "additionalInformation": {
2019
2054
  if (verifiedBusiness$1) setShowBusinessSelection(false);
2020
- handleBackClick == null ? void 0 : handleBackClick();
2055
+ handleBackClick?.();
2021
2056
  break;
2022
2057
  }
2023
2058
  default:
2024
- handleBackClick == null ? void 0 : handleBackClick();
2059
+ handleBackClick?.();
2025
2060
  break;
2026
2061
  }
2027
2062
  }
@@ -2029,7 +2064,6 @@ function BusinessDetailsDropin({
2029
2064
  currentCountry,
2030
2065
  handleBackClick,
2031
2066
  activeForm.formId,
2032
- userEvents,
2033
2067
  showBusinessSelection,
2034
2068
  searchingError,
2035
2069
  searchingCompanies,
@@ -2037,35 +2071,17 @@ function BusinessDetailsDropin({
2037
2071
  verifiedBusiness$1
2038
2072
  ]);
2039
2073
  const homeClick = () => {
2040
- trackNavigation({
2041
- userEvents,
2042
- actionType: "save",
2043
- toForm: "home",
2044
- label: "home"
2045
- });
2046
- handleHomeClick == null ? void 0 : handleHomeClick();
2074
+ handleHomeClick?.();
2047
2075
  };
2048
2076
  const handleBusinessMismatchContinue = useCallback(() => {
2049
2077
  setShowCompanyStructure(true);
2050
2078
  setTrustedFields([]);
2051
2079
  setBusinessMismatchModalOpen(false);
2052
- trackNavigation({
2053
- userEvents,
2054
- actionType: "next",
2055
- toForm: "additionalInformationFormName",
2056
- label: "TIN Continue Anyways"
2057
- });
2058
2080
  }, [setShowCompanyStructure, setTrustedFields, setBusinessMismatchModalOpen]);
2059
2081
  const handleBusinessMismatchCancel = useCallback(() => {
2060
- backClick == null ? void 0 : backClick();
2082
+ backClick?.();
2061
2083
  setBusinessMismatchModalOpen(false);
2062
2084
  setTinMatched(void 0);
2063
- trackNavigation({
2064
- userEvents,
2065
- actionType: "back",
2066
- toForm: "basicDetails",
2067
- label: "TIN Edit Details"
2068
- });
2069
2085
  }, [backClick, setTinMatched, setBusinessMismatchModalOpen]);
2070
2086
  const resetBusinessData = useCallback(() => {
2071
2087
  queryClient.resetQueries({
@@ -2088,20 +2104,19 @@ function BusinessDetailsDropin({
2088
2104
  queryClient
2089
2105
  ]);
2090
2106
  useEffect(() => {
2091
- var _a2, _b2, _c2;
2092
- if (((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.legalCompanyName) !== (verifiedBusiness$1 == null ? void 0 : verifiedBusiness$1.name) && (((_b2 = currentState.data.basicInformation) == null ? void 0 : _b2.legalCompanyName) !== companySearchParams.legalCompanyName || ((_c2 = currentState.data.basicInformation) == null ? void 0 : _c2.stateOrProvince) !== companySearchParams.stateOrProvince)) {
2107
+ if (verifiedBusiness$1?.name && currentState.data.basicInformation?.legalCompanyName !== verifiedBusiness$1?.name && (currentState.data.basicInformation?.legalCompanyName !== companySearchParams.legalCompanyName || currentState.data.basicInformation?.stateOrProvince !== companySearchParams.stateOrProvince)) {
2093
2108
  setShowCompanyStructure(false);
2094
2109
  resetBusinessData();
2095
2110
  }
2096
2111
  }, [
2097
2112
  companySearchParams,
2098
2113
  currentState.data.basicInformation,
2099
- (_s = currentState.data.basicInformation) == null ? void 0 : _s.legalCompanyName,
2114
+ currentState.data.basicInformation?.legalCompanyName,
2100
2115
  resetBusinessData,
2101
2116
  verifiedBusiness$1
2102
2117
  ]);
2103
2118
  const [prevCurrentCountry, setPrevCurrentCountry] = useState(currentCountry);
2104
- if (prevCurrentCountry !== currentCountry && (trustedFields == null ? void 0 : trustedFields.length) && ((_t = legalEntityResponse.organization) == null ? void 0 : _t.registeredAddress.country) !== currentCountry) {
2119
+ if (prevCurrentCountry !== currentCountry && trustedFields?.length && legalEntityResponse.organization?.registeredAddress.country !== currentCountry) {
2105
2120
  setTrustedFields(void 0);
2106
2121
  setPrevCurrentCountry(currentCountry);
2107
2122
  }