@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,35 +2,26 @@
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] = "908b0adc-2326-4531-874e-fbcc78ab0a6b", e._sentryDebugIdIdentifier = "sentry-dbid-908b0adc-2326-4531-874e-fbcc78ab0a6b");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2f44333d-554c-4aff-bf9a-44054bd93740", e._sentryDebugIdIdentifier = "sentry-dbid-2f44333d-554c-4aff-bf9a-44054bd93740");
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, r as useQuery, t as httpGet, b4 as useInvalidateRootLegalEntity, b5 as useMutation, b7 as httpPost, z as LegalEntityType, G as Typography, d$ as Currencies, b as useI18nContext, ax as Field, e0 as InputGroup, bw as Select, bg as InputText, bM as InputDate, aB as TextArea, aT as RadioGroup, aD as CountryField, C as Alert, Z as Button, an as isEmpty, as as useForm, bQ as useGlobalDataSlice, av as ErrorPanel, aw as createFormUtils, L as Loader, a3 as Icon, by as getFormProps, a0 as Card, b0 as StructuredList, _ as IconButton, bz as isEmpty$1, ba as Svg, aJ as createLogger, e1 as Dropzone, bb as useQueryClient, a as useLegalEntity, R as ROOT_LE, bG as useStateContext, $ as useAnalyticsContext, e2 as useLegalEntities, V as EntityType, g as getLegalEntityCountry } from "./StoreProvider-COHi02bX.js";
12
- import { u as useCapabilityProblems, g as getProblemsForEntity } from "./ProviderButton-vD5DUJaN.js";
11
+ import { p as useApiContext, q as useQuery, r as httpGet, bh as useInvalidateRootLegalEntity, bi as useMutation, bk as httpPost, bA as formatObject, y as LegalEntityType, G as Typography, eD as Currencies, ap as useI18nContext, aB as Field, eE as InputGroup, bu as Select, bE as InputText, bG as InputDate, aF as TextArea, aY as RadioGroup, aH as CountryField, b5 as Modal, B as Alert, _ as Button, bb as Confirm, ar as isEmpty, aw as useForm, eF as useGlobalDataSlice, az as ErrorPanel, aA as createFormUtils, L as Loader, a4 as Icon, ds as getFormProps, a1 as Card, b8 as StructuredList, $ as IconButton, di as isEmpty$1, bp as Svg, a6 as useToastContext, Y as createLogger, eG as Dropzone, cl as createDocumentRequest, bq as useQueryClient, b as useLegalEntity, R as ROOT_LE, ei as useStateContext, a0 as useAnalyticsContext, eH as useLegalEntities, cy as getPropsFromConfigurations, bQ as getRequiredForms, bR as addValidityToForms, bS as useFormComposer, cp as documentApiUtils, eo as FormWrapper, ac as useCapabilityProblems, bl as getProblemsForEntity, V as EntityType, g as getLegalEntityCountry } from "./StoreProvider-ClKLaHzy.js";
13
12
  import { useState, useMemo, useEffect, useCallback, useRef } from "preact/hooks";
14
- import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-By6uwPUg.js";
15
- import { h as hasDataChanged } from "./hasDataChanged-CIg-bPSm.js";
16
- import { u as useToastContext } from "./useToastContext-CF2xonft.js";
17
- import { g as getPropsFromConfigurations } from "./process-field-configurations-DugpEY9k.js";
18
- import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-Bk0T79SK.js";
19
- import { F as FormWrapper } from "./FormWrapper-Dvm1o4tC.js";
20
- import { c as createDocumentRequest, d as documentApiUtils } from "./documentUtils-51iMbUyU.js";
21
- import { f as formatObject } from "./utils-B1H_8b1P.js";
13
+ import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-D8dw9Oc3.js";
14
+ import { h as hasDataChanged } from "./hasDataChanged-CwfuS4et.js";
22
15
  import { signal } from "@preact/signals";
23
- import { s as styles, T as TaskStatusIndicator } from "./SourceOfFunds.module-OqFTr4WQ.js";
24
16
  import { a as formatAmountWithCurrency } from "./formatCurrency-CMOSdJMB.js";
25
- import { l as localizeDateString } from "./localizeDateString-KlstHAcM.js";
17
+ import { l as localizeDateString } from "./localizeDateString-CKCBXzSn.js";
26
18
  import { t as toCapitalized } from "./toCapitalized-Bq7laD0b.js";
27
- import { A as Avatar } from "./Avatar-C8aZB2wq.js";
28
- import { M as Modal } from "./Modal-CRNejb1x.js";
29
- import { C as Confirm } from "./Confirm-okTxq40p.js";
30
- import isURL from "validator/es/lib/isURL.js";
31
- import { v as validateDateNotInTheFuture } from "./validate-wd48TLfx.js";
32
- import { T as TileGroup } from "./TileGroup-B1IymoWv.js";
33
- import { n as normalizedTaskStatusStore } from "./OnboardingDropinComponent-CocnpjvA.js";
19
+ import { A as Avatar } from "./Avatar-vCjWXfC7.js";
20
+ import { v as validateDateNotInTheFuture } from "./validate-CuwYJGc9.js";
21
+ import { T as TileGroup } from "./TileGroup-BtE472I1.js";
22
+ import { T as TaskStatusIndicator } from "./TaskStatusIndicator-CTtKjo0m.js";
23
+ import { L as LandingLayout } from "./LandingLayout-B45lEjOv.js";
24
+ import { n as normalizedTaskStatusStore } from "./OnboardingDropinComponent-DBW5N3Dr.js";
34
25
  const getBusinessLines = async (legalEntityId, baseUrl) => {
35
26
  return httpGet({
36
27
  baseUrl,
@@ -108,6 +99,62 @@ const useSourceOfFundsTypes = (options) => {
108
99
  ...options
109
100
  });
110
101
  };
102
+ const sourceOfFunds = "adyen-kyc-source-of-funds";
103
+ const sourceOfFundsWrapperLoading = "adyen-kyc-source-of-funds-wrapper-loading";
104
+ const sourceOfFundsWrapperHeading = "adyen-kyc-source-of-funds-wrapper-heading";
105
+ const sourceOfFundsWrapperDescription = "adyen-kyc-source-of-funds-wrapper-description";
106
+ const sourceOfFundsGettingStarted = "adyen-kyc-source-of-funds-getting-started";
107
+ const sourceOfFundsGettingStartedHeading = "adyen-kyc-source-of-funds-getting-started-heading";
108
+ const sourceOfFundsGettingStartedBody = "adyen-kyc-source-of-funds-getting-started-body";
109
+ const sourceOfFundsGettingStartedError = "adyen-kyc-source-of-funds-getting-started-error";
110
+ const sourceOfFundsGettingStartedErrorActions = "adyen-kyc-source-of-funds-getting-started-error-actions";
111
+ const sourceOfFundsGettingStartedCards = "adyen-kyc-source-of-funds-getting-started-cards";
112
+ const sourceOfFundsGettingStartedCardsCard = "adyen-kyc-source-of-funds-getting-started-cards-card";
113
+ const sourceOfFundsGettingStartedCardsCardHeader = "adyen-kyc-source-of-funds-getting-started-cards-card-header";
114
+ const sourceOfFundsGettingStartedCardsCardBody = "adyen-kyc-source-of-funds-getting-started-cards-card-body";
115
+ const sourceOfFundsGettingStartedActions = "adyen-kyc-source-of-funds-getting-started-actions";
116
+ const sourceOfFundsAdditionalDataForm = "adyen-kyc-source-of-funds-additional-data-form";
117
+ const sourceOfFundsThirdPartyFundingFinancierGroup = "adyen-kyc-source-of-funds-third-party-funding-financier-group";
118
+ const sourceOfFundsThirdPartyFundingNameAvatarGroup = "adyen-kyc-source-of-funds-third-party-funding-name-avatar-group";
119
+ const sourceOfFundsThirdPartyFundingNameAddressGroup = "adyen-kyc-source-of-funds-third-party-funding-name-address-group";
120
+ const sourceOfFundsSofFinancierFormError = "adyen-kyc-source-of-funds-sof-financier-form-error";
121
+ const sourceOfFundsSofFinancierFormNameGroup = "adyen-kyc-source-of-funds-sof-financier-form-name-group";
122
+ const sourceOfFundsFinancierFooter = "adyen-kyc-source-of-funds-financier-footer";
123
+ const sourceOfFundsGridContainer = "adyen-kyc-source-of-funds-grid-container";
124
+ const sourceOfFundsUploadModalContentField = "adyen-kyc-source-of-funds-upload-modal-content-field";
125
+ const sourceOfFundsUploadModalContentFieldRadioGroup = "adyen-kyc-source-of-funds-upload-modal-content-field-radio-group";
126
+ const sourceOfFundsUploadModalContentRequirementsContainer = "adyen-kyc-source-of-funds-upload-modal-content-requirements-container";
127
+ const sourceOfFundsUploadListHeading = "adyen-kyc-source-of-funds-upload-list-heading";
128
+ const sourceOfFundsModal = "adyen-kyc-source-of-funds-modal";
129
+ const styles = {
130
+ sourceOfFunds,
131
+ sourceOfFundsWrapperLoading,
132
+ sourceOfFundsWrapperHeading,
133
+ sourceOfFundsWrapperDescription,
134
+ sourceOfFundsGettingStarted,
135
+ sourceOfFundsGettingStartedHeading,
136
+ sourceOfFundsGettingStartedBody,
137
+ sourceOfFundsGettingStartedError,
138
+ sourceOfFundsGettingStartedErrorActions,
139
+ sourceOfFundsGettingStartedCards,
140
+ sourceOfFundsGettingStartedCardsCard,
141
+ sourceOfFundsGettingStartedCardsCardHeader,
142
+ sourceOfFundsGettingStartedCardsCardBody,
143
+ sourceOfFundsGettingStartedActions,
144
+ sourceOfFundsAdditionalDataForm,
145
+ sourceOfFundsThirdPartyFundingFinancierGroup,
146
+ sourceOfFundsThirdPartyFundingNameAvatarGroup,
147
+ sourceOfFundsThirdPartyFundingNameAddressGroup,
148
+ sourceOfFundsSofFinancierFormError,
149
+ sourceOfFundsSofFinancierFormNameGroup,
150
+ sourceOfFundsFinancierFooter,
151
+ sourceOfFundsGridContainer,
152
+ sourceOfFundsUploadModalContentField,
153
+ sourceOfFundsUploadModalContentFieldRadioGroup,
154
+ sourceOfFundsUploadModalContentRequirementsContainer,
155
+ sourceOfFundsUploadListHeading,
156
+ sourceOfFundsModal
157
+ };
111
158
  const additionalDataSchemaKeys = [
112
159
  "description",
113
160
  "dateOfFundsReceived",
@@ -187,6 +234,18 @@ const getServiceTranslation = (i18n, service) => {
187
234
  return i18n.get("supportingDocuments");
188
235
  }
189
236
  };
237
+ const getServiceTranslationSelectTitle = (i18n, service) => {
238
+ switch (service) {
239
+ case "banking":
240
+ return i18n.get("bankingServiceSelectTitle");
241
+ case "issuing":
242
+ return i18n.get("issuingServiceSelectTitle");
243
+ case "paymentProcessing":
244
+ return i18n.get("paymentServiceSelectTitle");
245
+ default:
246
+ return i18n.get("supportingDocuments");
247
+ }
248
+ };
190
249
  const getServiceTranslationKey = (service) => {
191
250
  switch (service) {
192
251
  case "banking":
@@ -201,54 +260,52 @@ const getServiceTranslationKey = (service) => {
201
260
  };
202
261
  const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
203
262
  const details = [];
204
- sourceOfFundsType == null ? void 0 : sourceOfFundsType.forEach((type) => {
205
- var _a, _b, _c;
263
+ sourceOfFundsType?.forEach((type) => {
206
264
  switch (type) {
207
265
  case "amount":
208
266
  details.push({
209
267
  term: i18n.get("amount"),
210
- details: ((_a = data == null ? void 0 : data.amount) == null ? void 0 : _a.currency) && ((_b = data == null ? void 0 : data.amount) == null ? void 0 : _b.value) ? formatAmountWithCurrency(data.amount.value, data.amount.currency) : ""
268
+ details: data?.amount?.currency && data?.amount?.value ? formatAmountWithCurrency(data.amount.value, data.amount.currency) : ""
211
269
  });
212
270
  break;
213
271
  case "description":
214
272
  details.push({
215
273
  term: i18n.get("description"),
216
- details: (data == null ? void 0 : data.description) || ""
274
+ details: data?.description || ""
217
275
  });
218
276
  break;
219
277
  case "dateOfFundsReceived":
220
278
  details.push({
221
279
  term: i18n.get("date"),
222
- details: localizeDateString((data == null ? void 0 : data.dateOfFundsReceived) || "", i18n.locale)
280
+ details: localizeDateString(data?.dateOfFundsReceived || "", i18n.locale)
223
281
  });
224
282
  break;
225
283
  case "purpose":
226
284
  details.push({
227
285
  term: i18n.get("reason"),
228
- details: (data == null ? void 0 : data.purpose) || ""
286
+ details: data?.purpose || ""
229
287
  });
230
288
  break;
231
289
  case "relationship":
232
- details.push({ term: i18n.get("relationship"), details: (data == null ? void 0 : data.relationship) || "" });
290
+ details.push({ term: i18n.get("relationship"), details: data?.relationship || "" });
233
291
  break;
234
292
  case "originatorLegalEntityId":
235
293
  details.push({
236
294
  term: i18n.get("benefactorDetails"),
237
295
  details: [
238
- (data == null ? void 0 : data.legalName) ? `${data == null ? void 0 : data.legalName}` : `${data == null ? void 0 : data.firstName} ${data == null ? void 0 : data.lastName}`,
239
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: (data == null ? void 0 : data.country) || "" }, "location")
296
+ data?.legalName ? `${data?.legalName}` : `${data?.firstName} ${data?.lastName}`,
297
+ /* @__PURE__ */ jsx(Typography, { color: "secondary", children: data?.country || "" }, "location")
240
298
  ]
241
299
  });
242
300
  break;
243
301
  case "financiers":
244
- (_c = data == null ? void 0 : data.financiers) == null ? void 0 : _c.map((financier) => {
245
- var _a2, _b2;
302
+ data?.financiers?.map((financier) => {
246
303
  return details.push({
247
304
  term: i18n.get("investor"),
248
305
  details: [
249
- `${financier == null ? void 0 : financier.firstName} ${financier == null ? void 0 : financier.lastName}`,
250
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: (financier == null ? void 0 : financier.location) || "" }, "location"),
251
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: ((_a2 = financier == null ? void 0 : financier.amount) == null ? void 0 : _a2.currency) && ((_b2 = financier == null ? void 0 : financier.amount) == null ? void 0 : _b2.value) ? formatAmountWithCurrency(
306
+ `${financier?.firstName} ${financier?.lastName}`,
307
+ /* @__PURE__ */ jsx(Typography, { color: "secondary", children: financier?.location || "" }, "location"),
308
+ /* @__PURE__ */ jsx(Typography, { color: "secondary", children: financier?.amount?.currency && financier?.amount?.value ? formatAmountWithCurrency(
252
309
  financier.amount.value,
253
310
  financier.amount.currency
254
311
  ) || "" : "" }, "value")
@@ -259,19 +316,19 @@ const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
259
316
  case "cryptocurrencyExchange":
260
317
  details.push({
261
318
  term: i18n.get("cryptocurrencyExchange"),
262
- details: (data == null ? void 0 : data.cryptocurrencyExchange) || ""
319
+ details: data?.cryptocurrencyExchange || ""
263
320
  });
264
321
  break;
265
322
  case "dateOfSourceEvent":
266
323
  details.push({
267
324
  term: i18n.get("dateOfSourceEvent"),
268
- details: localizeDateString((data == null ? void 0 : data.dateOfSourceEvent) || "", i18n.locale)
325
+ details: localizeDateString(data?.dateOfSourceEvent || "", i18n.locale)
269
326
  });
270
327
  break;
271
328
  case "website":
272
329
  details.push({
273
330
  term: i18n.get("website"),
274
- details: (data == null ? void 0 : data.website) || ""
331
+ details: data?.website || ""
275
332
  });
276
333
  break;
277
334
  }
@@ -306,7 +363,7 @@ const typesRequiringAdditionalData = [
306
363
  const getSourceOfFundsRequiredForms = (data) => {
307
364
  return Object.fromEntries(
308
365
  Object.entries(sourceOfFundsForms).filter(([form]) => {
309
- if (!(data == null ? void 0 : data.type) || !typesRequiringAdditionalData.includes(data == null ? void 0 : data.type))
366
+ if (!data?.type || !typesRequiringAdditionalData.includes(data?.type))
310
367
  return form !== sourceOfFundsForms.additionalData.formId;
311
368
  return form;
312
369
  })
@@ -318,7 +375,6 @@ const getInputErrors = ({
318
375
  key,
319
376
  value
320
377
  }) => {
321
- var _a, _b, _c, _d;
322
378
  const isEmpty2 = value === "" || value === null || value === void 0;
323
379
  let errors = { ...formErrors };
324
380
  if (isEmpty2) {
@@ -327,15 +383,15 @@ const getInputErrors = ({
327
383
  errors = { ...formErrors, [key]: void 0 };
328
384
  }
329
385
  if (["amount", "currency"].includes(key)) {
330
- if (((_a = data == null ? void 0 : data.amount) == null ? void 0 : _a.value) && ((_b = data == null ? void 0 : data.amount) == null ? void 0 : _b.currency)) {
386
+ if (data?.amount?.value && data?.amount?.currency) {
331
387
  errors = { ...formErrors, amount: void 0 };
332
388
  }
333
- if (!((_c = data == null ? void 0 : data.amount) == null ? void 0 : _c.currency)) {
389
+ if (!data?.amount?.currency) {
334
390
  errors = { ...formErrors, amount: "currencyIsRequired" };
335
391
  }
336
- if (!((_d = data == null ? void 0 : data.amount) == null ? void 0 : _d.value)) {
392
+ if (!data?.amount?.value) {
337
393
  errors = { ...formErrors, amount: "amountIsRequired" };
338
- } else if (isNaN(data == null ? void 0 : data.amount.value)) {
394
+ } else if (isNaN(data?.amount.value)) {
339
395
  errors = { ...formErrors, amount: "pleaseEnterAValidAmount" };
340
396
  }
341
397
  }
@@ -608,34 +664,32 @@ const parseSOFDocumentDescription = (i18n, documentDescription) => {
608
664
  };
609
665
  const MISSING_DATA_SOF_UPLOAD_CODE = "2_8224";
610
666
  const parseOriginatorDetails = (originatorDetails, businessLine) => {
611
- var _a, _b, _c, _d, _e;
612
667
  const copiedBusinessLine = { ...businessLine };
613
668
  if (copiedBusinessLine.sourceOfFunds) {
614
669
  if (originatorDetails.organization) {
615
670
  copiedBusinessLine.sourceOfFunds.legalName = originatorDetails.organization.legalName;
616
- copiedBusinessLine.sourceOfFunds.country = (_b = (_a = originatorDetails.organization) == null ? void 0 : _a.registeredAddress) == null ? void 0 : _b.country;
671
+ copiedBusinessLine.sourceOfFunds.country = originatorDetails.organization?.registeredAddress?.country;
617
672
  copiedBusinessLine.sourceOfFunds.originatorType = "organization";
618
673
  }
619
674
  if (originatorDetails.individual) {
620
- copiedBusinessLine.sourceOfFunds.firstName = (_c = originatorDetails.individual.name) == null ? void 0 : _c.firstName;
621
- copiedBusinessLine.sourceOfFunds.lastName = (_d = originatorDetails.individual.name) == null ? void 0 : _d.lastName;
622
- copiedBusinessLine.sourceOfFunds.country = (_e = originatorDetails.individual.residentialAddress) == null ? void 0 : _e.country;
675
+ copiedBusinessLine.sourceOfFunds.firstName = originatorDetails.individual.name?.firstName;
676
+ copiedBusinessLine.sourceOfFunds.lastName = originatorDetails.individual.name?.lastName;
677
+ copiedBusinessLine.sourceOfFunds.country = originatorDetails.individual.residentialAddress?.country;
623
678
  copiedBusinessLine.sourceOfFunds.originatorType = "individual";
624
679
  }
625
680
  }
626
681
  return copiedBusinessLine;
627
682
  };
628
683
  const getSourceOfFundsPayload = (sofType, additionalData) => {
629
- var _a, _b;
630
684
  switch (sofType) {
631
685
  case "business":
632
686
  return {
633
687
  adyenProcessedFunds: false,
634
688
  type: "business",
635
- description: additionalData == null ? void 0 : additionalData.description,
689
+ description: additionalData?.description,
636
690
  amount: {
637
- currency: ((_a = additionalData == null ? void 0 : additionalData.amount) == null ? void 0 : _a.currency) ?? "USD",
638
- value: ((_b = additionalData == null ? void 0 : additionalData.amount) == null ? void 0 : _b.value) ?? 0
691
+ currency: additionalData?.amount?.currency ?? "USD",
692
+ value: additionalData?.amount?.value ?? 0
639
693
  }
640
694
  };
641
695
  case "employment":
@@ -647,19 +701,19 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
647
701
  return {
648
702
  adyenProcessedFunds: false,
649
703
  type: "donations",
650
- dateOfFundsReceived: additionalData == null ? void 0 : additionalData.dateOfFundsReceived,
651
- purpose: additionalData == null ? void 0 : additionalData.purpose,
652
- relationship: additionalData == null ? void 0 : additionalData.relationship,
653
- originatorLegalEntityId: additionalData == null ? void 0 : additionalData.originatorLegalEntityId
704
+ dateOfFundsReceived: additionalData?.dateOfFundsReceived,
705
+ purpose: additionalData?.purpose,
706
+ relationship: additionalData?.relationship,
707
+ originatorLegalEntityId: additionalData?.originatorLegalEntityId
654
708
  };
655
709
  case "inheritance":
656
710
  return {
657
711
  adyenProcessedFunds: false,
658
712
  type: "inheritance",
659
- dateOfFundsReceived: additionalData == null ? void 0 : additionalData.dateOfFundsReceived,
660
- amount: additionalData == null ? void 0 : additionalData.amount,
661
- relationship: additionalData == null ? void 0 : additionalData.relationship,
662
- originatorLegalEntityId: additionalData == null ? void 0 : additionalData.originatorLegalEntityId
713
+ dateOfFundsReceived: additionalData?.dateOfFundsReceived,
714
+ amount: additionalData?.amount,
715
+ relationship: additionalData?.relationship,
716
+ originatorLegalEntityId: additionalData?.originatorLegalEntityId
663
717
  };
664
718
  case "financialAid":
665
719
  return {
@@ -695,22 +749,22 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
695
749
  return {
696
750
  adyenProcessedFunds: false,
697
751
  type: "thirdPartyFunding",
698
- financiers: additionalData == null ? void 0 : additionalData.financiers
752
+ financiers: additionalData?.financiers
699
753
  };
700
754
  case "cryptocurrencyIncome":
701
755
  return {
702
756
  adyenProcessedFunds: false,
703
757
  type: "cryptocurrencyIncome",
704
- cryptocurrencyExchange: additionalData == null ? void 0 : additionalData.cryptocurrencyExchange
758
+ cryptocurrencyExchange: additionalData?.cryptocurrencyExchange
705
759
  };
706
760
  case "assetSale":
707
761
  return {
708
762
  adyenProcessedFunds: false,
709
763
  type: "assetSale",
710
- cryptocurrencyExchange: additionalData == null ? void 0 : additionalData.cryptocurrencyExchange,
711
- dateOfSourceEvent: additionalData == null ? void 0 : additionalData.dateOfSourceEvent,
712
- description: additionalData == null ? void 0 : additionalData.description,
713
- amount: additionalData == null ? void 0 : additionalData.amount
764
+ cryptocurrencyExchange: additionalData?.cryptocurrencyExchange,
765
+ dateOfSourceEvent: additionalData?.dateOfSourceEvent,
766
+ description: additionalData?.description,
767
+ amount: additionalData?.amount
714
768
  };
715
769
  case "loans":
716
770
  return {
@@ -721,9 +775,9 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
721
775
  return {
722
776
  adyenProcessedFunds: false,
723
777
  type: "gamblingWinnings",
724
- dateOfSourceEvent: additionalData == null ? void 0 : additionalData.dateOfSourceEvent,
725
- website: additionalData == null ? void 0 : additionalData.website,
726
- amount: additionalData == null ? void 0 : additionalData.amount
778
+ dateOfSourceEvent: additionalData?.dateOfSourceEvent,
779
+ website: additionalData?.website && !additionalData.website.startsWith("http://") && !additionalData.website.startsWith("https://") ? `https://${additionalData.website}` : additionalData?.website,
780
+ amount: additionalData?.amount
727
781
  };
728
782
  default:
729
783
  return { adyenProcessedFunds: true };
@@ -731,16 +785,16 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
731
785
  };
732
786
  const parseSofOriginatorPayload = (additionalData) => {
733
787
  let sofOriginator;
734
- if ((additionalData == null ? void 0 : additionalData.originatorType) === "individual") {
788
+ if (additionalData?.originatorType === "individual") {
735
789
  sofOriginator = {
736
790
  type: LegalEntityType.INDIVIDUAL,
737
791
  individual: {
738
792
  name: {
739
- firstName: (additionalData == null ? void 0 : additionalData.firstName) ?? "",
740
- lastName: (additionalData == null ? void 0 : additionalData.lastName) ?? ""
793
+ firstName: additionalData?.firstName ?? "",
794
+ lastName: additionalData?.lastName ?? ""
741
795
  },
742
796
  residentialAddress: {
743
- country: additionalData == null ? void 0 : additionalData.country
797
+ country: additionalData?.country
744
798
  }
745
799
  }
746
800
  };
@@ -748,9 +802,9 @@ const parseSofOriginatorPayload = (additionalData) => {
748
802
  sofOriginator = {
749
803
  type: LegalEntityType.ORGANIZATION,
750
804
  organization: {
751
- legalName: (additionalData == null ? void 0 : additionalData.legalName) ?? "",
805
+ legalName: additionalData?.legalName ?? "",
752
806
  registeredAddress: {
753
- country: additionalData == null ? void 0 : additionalData.country
807
+ country: additionalData?.country
754
808
  }
755
809
  }
756
810
  };
@@ -769,25 +823,20 @@ const formatDateForInput = (isoDateString) => {
769
823
  return "";
770
824
  }
771
825
  };
772
- const getSofCardDetails = (i18n, sourceOfFunds) => {
773
- if (!sourceOfFunds) {
826
+ const getSofCardDetails = (i18n, sourceOfFunds2) => {
827
+ if (!sourceOfFunds2) {
774
828
  return "";
775
829
  }
776
- if (sourceOfFunds == null ? void 0 : sourceOfFunds.adyenProcessedFunds) {
830
+ if (sourceOfFunds2?.adyenProcessedFunds) {
777
831
  return i18n.get("sofTypeAdyenLabel");
778
832
  }
779
- if (sourceOfFunds == null ? void 0 : sourceOfFunds.type) {
780
- return i18n.get(`sofType${toCapitalized(sourceOfFunds == null ? void 0 : sourceOfFunds.type)}Label`);
833
+ if (sourceOfFunds2?.type) {
834
+ return i18n.get(`sofType${toCapitalized(sourceOfFunds2?.type)}Label`);
781
835
  }
782
836
  return "";
783
837
  };
784
838
  const ALLOWED_SOF_SERVICES = ["issuing", "banking"];
785
839
  const SOF_INVALID_INPUT_ERROR_CODES = ["1_93", "1_94"];
786
- const SOF_INVALID_INPUT_SUBERROR_CODES = ["1_9009", "1_9010", "1_9011", "1_9012"];
787
- [
788
- ...SOF_INVALID_INPUT_ERROR_CODES,
789
- ...SOF_INVALID_INPUT_SUBERROR_CODES
790
- ];
791
840
  const getRelevantErrors = (problems, targetCodes) => {
792
841
  if (!problems) return false;
793
842
  return problems.flatMap(
@@ -797,10 +846,9 @@ const getRelevantErrors = (problems, targetCodes) => {
797
846
  );
798
847
  };
799
848
  const getUniqueRemediationActions = (error) => {
800
- var _a;
801
849
  const allActions = [
802
850
  ...error.remediatingActions || [],
803
- ...((_a = error.subErrors) == null ? void 0 : _a.flatMap((sub) => sub.remediatingActions || [])) || []
851
+ ...error.subErrors?.flatMap((sub) => sub.remediatingActions || []) || []
804
852
  ];
805
853
  return allActions.filter((action, i, arr) => arr.findIndex((a) => a.code === action.code) === i);
806
854
  };
@@ -821,48 +869,45 @@ function AdditionalDataForAssetSale(props) {
821
869
  name: "amount",
822
870
  label: formUtils.getLabel("amount", "saleAmount"),
823
871
  errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
824
- children: (childProps) => {
825
- var _a, _b;
826
- return /* @__PURE__ */ jsxs(
827
- InputGroup,
828
- {
829
- ...childProps,
830
- id: "currencyGroup",
831
- isFocused,
832
- isInvalid: Boolean(!valid.amount && errors.amount),
833
- children: [
834
- /* @__PURE__ */ jsx(
835
- Select,
836
- {
837
- name: "currency",
838
- "aria-label": i18n.get("currency"),
839
- isMulti: false,
840
- items: allowedCurrencies,
841
- selected: (_a = data.amount) == null ? void 0 : _a.currency,
842
- placeholder: i18n.get("select"),
843
- onChange: handleAmountChange("currency"),
844
- minimal: true
845
- }
846
- ),
847
- /* @__PURE__ */ jsx(
848
- InputText,
849
- {
850
- ...childProps,
851
- name: "amount",
852
- value: (_b = data.amount) == null ? void 0 : _b.value,
853
- readonly: formUtils.isReadOnly("amount"),
854
- onInput: handleAmountChange("amount"),
855
- onBlur: handleOnAmountBlur,
856
- "aria-required": true,
857
- "aria-invalid": !valid.amount,
858
- isValid: valid.amount,
859
- onFocusHandler: () => setIsFocused(true)
860
- }
861
- )
862
- ]
863
- }
864
- );
865
- }
872
+ children: (childProps) => /* @__PURE__ */ jsxs(
873
+ InputGroup,
874
+ {
875
+ ...childProps,
876
+ id: "currencyGroup",
877
+ isFocused,
878
+ isInvalid: Boolean(!valid.amount && errors.amount),
879
+ children: [
880
+ /* @__PURE__ */ jsx(
881
+ Select,
882
+ {
883
+ name: "currency",
884
+ "aria-label": i18n.get("currency"),
885
+ isMulti: false,
886
+ items: allowedCurrencies,
887
+ selected: data.amount?.currency,
888
+ placeholder: i18n.get("select"),
889
+ onChange: handleAmountChange("currency"),
890
+ minimal: true
891
+ }
892
+ ),
893
+ /* @__PURE__ */ jsx(
894
+ InputText,
895
+ {
896
+ ...childProps,
897
+ name: "amount",
898
+ value: data.amount?.value,
899
+ readonly: formUtils.isReadOnly("amount"),
900
+ onInput: handleAmountChange("amount"),
901
+ onBlur: handleOnAmountBlur,
902
+ "aria-required": true,
903
+ "aria-invalid": !valid.amount,
904
+ isValid: valid.amount,
905
+ onFocusHandler: () => setIsFocused(true)
906
+ }
907
+ )
908
+ ]
909
+ }
910
+ )
866
911
  }
867
912
  ),
868
913
  /* @__PURE__ */ jsx(
@@ -929,48 +974,45 @@ function AdditionalDataForBusiness(props) {
929
974
  errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
930
975
  helper: i18n.get("useFiguresFromTheMostRecentYearAvailable"),
931
976
  helperPosition: "below",
932
- children: (childProps) => {
933
- var _a, _b;
934
- return /* @__PURE__ */ jsxs(
935
- InputGroup,
936
- {
937
- ...childProps,
938
- id: "currencyGroup",
939
- isFocused,
940
- isInvalid: Boolean(!valid.amount && errors.amount),
941
- children: [
942
- /* @__PURE__ */ jsx(
943
- Select,
944
- {
945
- name: "currency",
946
- "aria-label": i18n.get("currency"),
947
- isMulti: false,
948
- items: allowedCurrencies,
949
- selected: (_a = data.amount) == null ? void 0 : _a.currency,
950
- placeholder: i18n.get("select"),
951
- onChange: handleAmountChange("currency"),
952
- minimal: true
953
- }
954
- ),
955
- /* @__PURE__ */ jsx(
956
- InputText,
957
- {
958
- ...childProps,
959
- name: "amount",
960
- value: (_b = data.amount) == null ? void 0 : _b.value,
961
- readonly: formUtils.isReadOnly("amount"),
962
- onInput: handleAmountChange("amount"),
963
- onBlur: handleOnAmountBlur,
964
- "aria-required": true,
965
- "aria-invalid": !valid.amount,
966
- isValid: valid.amount,
967
- onFocusHandler: () => setIsFocused(true)
968
- }
969
- )
970
- ]
971
- }
972
- );
973
- }
977
+ children: (childProps) => /* @__PURE__ */ jsxs(
978
+ InputGroup,
979
+ {
980
+ ...childProps,
981
+ id: "currencyGroup",
982
+ isFocused,
983
+ isInvalid: Boolean(!valid.amount && errors.amount),
984
+ children: [
985
+ /* @__PURE__ */ jsx(
986
+ Select,
987
+ {
988
+ name: "currency",
989
+ "aria-label": i18n.get("currency"),
990
+ isMulti: false,
991
+ items: allowedCurrencies,
992
+ selected: data.amount?.currency,
993
+ placeholder: i18n.get("select"),
994
+ onChange: handleAmountChange("currency"),
995
+ minimal: true
996
+ }
997
+ ),
998
+ /* @__PURE__ */ jsx(
999
+ InputText,
1000
+ {
1001
+ ...childProps,
1002
+ name: "amount",
1003
+ value: data.amount?.value,
1004
+ readonly: formUtils.isReadOnly("amount"),
1005
+ onInput: handleAmountChange("amount"),
1006
+ onBlur: handleOnAmountBlur,
1007
+ "aria-required": true,
1008
+ "aria-invalid": !valid.amount,
1009
+ isValid: valid.amount,
1010
+ onFocusHandler: () => setIsFocused(true)
1011
+ }
1012
+ )
1013
+ ]
1014
+ }
1015
+ )
974
1016
  }
975
1017
  ),
976
1018
  /* @__PURE__ */ jsx(
@@ -1066,7 +1108,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
1066
1108
  )
1067
1109
  }
1068
1110
  ),
1069
- (data == null ? void 0 : data.originatorType) === "organization" && /* @__PURE__ */ jsx(
1111
+ data?.originatorType === "organization" && /* @__PURE__ */ jsx(
1070
1112
  Field,
1071
1113
  {
1072
1114
  name: "legalName",
@@ -1089,7 +1131,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
1089
1131
  )
1090
1132
  }
1091
1133
  ),
1092
- (data == null ? void 0 : data.originatorType) === "individual" && /* @__PURE__ */ jsxs(Fragment, { children: [
1134
+ data?.originatorType === "individual" && /* @__PURE__ */ jsxs(Fragment, { children: [
1093
1135
  /* @__PURE__ */ jsx(
1094
1136
  Field,
1095
1137
  {
@@ -1143,14 +1185,14 @@ function AdditionalDataOriginatorLegalEntity(props) {
1143
1185
  }
1144
1186
  )
1145
1187
  ] }),
1146
- (data == null ? void 0 : data.originatorType) && /* @__PURE__ */ jsxs(Fragment, { children: [
1188
+ data?.originatorType && /* @__PURE__ */ jsxs(Fragment, { children: [
1147
1189
  /* @__PURE__ */ jsx(
1148
1190
  Field,
1149
1191
  {
1150
1192
  name: "relationship",
1151
1193
  label: formUtils.getLabel(
1152
1194
  "relationship",
1153
- isDonations && (data == null ? void 0 : data.originatorType) === "individual" ? "yourRelationshipToDonor" : (data == null ? void 0 : data.originatorType) === "organization" ? "yourRelationshipToOrganization" : "yourRelationshipToDecedent"
1195
+ isDonations && data?.originatorType === "individual" ? "yourRelationshipToDonor" : data?.originatorType === "organization" ? "yourRelationshipToOrganization" : "yourRelationshipToDecedent"
1154
1196
  ),
1155
1197
  errorMessage: formUtils.getErrorMessage("relationship", errors, fieldProblems),
1156
1198
  isValid: valid.relationship,
@@ -1180,7 +1222,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
1180
1222
  },
1181
1223
  labels: {
1182
1224
  country: i18n.get(
1183
- isDonations && (data == null ? void 0 : data.originatorType) === "individual" ? "donorsCountryOfResidence" : (data == null ? void 0 : data.originatorType) === "organization" ? "organizationsCountryOfOperation" : "decedentsCountryOfDeath"
1225
+ isDonations && data?.originatorType === "individual" ? "donorsCountryOfResidence" : data?.originatorType === "organization" ? "organizationsCountryOfOperation" : "decedentsCountryOfDeath"
1184
1226
  )
1185
1227
  },
1186
1228
  readonly: formUtils.isReadOnly("country"),
@@ -1274,48 +1316,45 @@ function AdditionalDataForGambling(props) {
1274
1316
  name: "amount",
1275
1317
  label: formUtils.getLabel("amount", "totalAmountWon"),
1276
1318
  errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
1277
- children: (childProps) => {
1278
- var _a, _b;
1279
- return /* @__PURE__ */ jsxs(
1280
- InputGroup,
1281
- {
1282
- ...childProps,
1283
- id: "currencyGroup",
1284
- isFocused: focusedInput === "amount",
1285
- isInvalid: Boolean(!valid.amount && errors.amount),
1286
- children: [
1287
- /* @__PURE__ */ jsx(
1288
- Select,
1289
- {
1290
- name: "currency",
1291
- "aria-label": i18n.get("currency"),
1292
- isMulti: false,
1293
- items: allowedCurrencies,
1294
- selected: (_a = data.amount) == null ? void 0 : _a.currency,
1295
- placeholder: i18n.get("select"),
1296
- onChange: handleAmountChange("currency"),
1297
- minimal: true
1298
- }
1299
- ),
1300
- /* @__PURE__ */ jsx(
1301
- InputText,
1302
- {
1303
- ...childProps,
1304
- name: "amount",
1305
- value: (_b = data.amount) == null ? void 0 : _b.value,
1306
- readonly: formUtils.isReadOnly("amount"),
1307
- onInput: handleAmountChange("amount"),
1308
- onBlur: handleOnAmountBlur,
1309
- "aria-required": true,
1310
- "aria-invalid": !valid.amount,
1311
- isValid: valid.amount,
1312
- onFocusHandler: () => setFocusedInput("amount")
1313
- }
1314
- )
1315
- ]
1316
- }
1317
- );
1318
- }
1319
+ children: (childProps) => /* @__PURE__ */ jsxs(
1320
+ InputGroup,
1321
+ {
1322
+ ...childProps,
1323
+ id: "currencyGroup",
1324
+ isFocused: focusedInput === "amount",
1325
+ isInvalid: Boolean(!valid.amount && errors.amount),
1326
+ children: [
1327
+ /* @__PURE__ */ jsx(
1328
+ Select,
1329
+ {
1330
+ name: "currency",
1331
+ "aria-label": i18n.get("currency"),
1332
+ isMulti: false,
1333
+ items: allowedCurrencies,
1334
+ selected: data.amount?.currency,
1335
+ placeholder: i18n.get("select"),
1336
+ onChange: handleAmountChange("currency"),
1337
+ minimal: true
1338
+ }
1339
+ ),
1340
+ /* @__PURE__ */ jsx(
1341
+ InputText,
1342
+ {
1343
+ ...childProps,
1344
+ name: "amount",
1345
+ value: data.amount?.value,
1346
+ readonly: formUtils.isReadOnly("amount"),
1347
+ onInput: handleAmountChange("amount"),
1348
+ onBlur: handleOnAmountBlur,
1349
+ "aria-required": true,
1350
+ "aria-invalid": !valid.amount,
1351
+ isValid: valid.amount,
1352
+ onFocusHandler: () => setFocusedInput("amount")
1353
+ }
1354
+ )
1355
+ ]
1356
+ }
1357
+ )
1319
1358
  }
1320
1359
  ),
1321
1360
  /* @__PURE__ */ jsx(
@@ -1406,48 +1445,45 @@ function AdditionalDataForInheritance(props) {
1406
1445
  name: "amount",
1407
1446
  label: formUtils.getLabel("amount", "inheritanceAmount"),
1408
1447
  errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
1409
- children: (childProps) => {
1410
- var _a, _b;
1411
- return /* @__PURE__ */ jsxs(
1412
- InputGroup,
1413
- {
1414
- ...childProps,
1415
- id: "currencyGroup",
1416
- isFocused,
1417
- isInvalid: Boolean(!valid.amount && errors.amount),
1418
- children: [
1419
- /* @__PURE__ */ jsx(
1420
- Select,
1421
- {
1422
- name: "currency",
1423
- "aria-label": i18n.get("currency"),
1424
- isMulti: false,
1425
- items: allowedCurrencies ?? [],
1426
- selected: (_a = data.amount) == null ? void 0 : _a.currency,
1427
- placeholder: i18n.get("select"),
1428
- onChange: handleAmountChange("currency"),
1429
- minimal: true
1430
- }
1431
- ),
1432
- /* @__PURE__ */ jsx(
1433
- InputText,
1434
- {
1435
- ...childProps,
1436
- name: "amount",
1437
- value: (_b = data.amount) == null ? void 0 : _b.value,
1438
- readonly: formUtils.isReadOnly("amount"),
1439
- onInput: handleAmountChange("amount"),
1440
- onBlur: handleOnAmountBlur,
1441
- "aria-required": true,
1442
- "aria-invalid": !valid.amount,
1443
- isValid: valid.amount,
1444
- onFocusHandler: () => setIsFocused(true)
1445
- }
1446
- )
1447
- ]
1448
- }
1449
- );
1450
- }
1448
+ children: (childProps) => /* @__PURE__ */ jsxs(
1449
+ InputGroup,
1450
+ {
1451
+ ...childProps,
1452
+ id: "currencyGroup",
1453
+ isFocused,
1454
+ isInvalid: Boolean(!valid.amount && errors.amount),
1455
+ children: [
1456
+ /* @__PURE__ */ jsx(
1457
+ Select,
1458
+ {
1459
+ name: "currency",
1460
+ "aria-label": i18n.get("currency"),
1461
+ isMulti: false,
1462
+ items: allowedCurrencies ?? [],
1463
+ selected: data.amount?.currency,
1464
+ placeholder: i18n.get("select"),
1465
+ onChange: handleAmountChange("currency"),
1466
+ minimal: true
1467
+ }
1468
+ ),
1469
+ /* @__PURE__ */ jsx(
1470
+ InputText,
1471
+ {
1472
+ ...childProps,
1473
+ name: "amount",
1474
+ value: data.amount?.value,
1475
+ readonly: formUtils.isReadOnly("amount"),
1476
+ onInput: handleAmountChange("amount"),
1477
+ onBlur: handleOnAmountBlur,
1478
+ "aria-required": true,
1479
+ "aria-invalid": !valid.amount,
1480
+ isValid: valid.amount,
1481
+ onFocusHandler: () => setIsFocused(true)
1482
+ }
1483
+ )
1484
+ ]
1485
+ }
1486
+ )
1451
1487
  }
1452
1488
  ),
1453
1489
  /* @__PURE__ */ jsx(
@@ -1462,7 +1498,7 @@ function AdditionalDataForInheritance(props) {
1462
1498
  {
1463
1499
  ...childProps,
1464
1500
  name: "dateOfFundsReceived",
1465
- value: data.dateOfFundsReceived,
1501
+ value: formatDateForInput(data.dateOfFundsReceived),
1466
1502
  onInput: handleChangeFor("dateOfFundsReceived", "input"),
1467
1503
  onBlur: handleChangeFor("dateOfFundsReceived", "blur"),
1468
1504
  "aria-required": true,
@@ -1484,17 +1520,16 @@ const SOFFinancierModal = (props) => {
1484
1520
  const [isFocused, setIsFocused] = useState(false);
1485
1521
  const [errorMessage, setErrorMessage] = useState("");
1486
1522
  const handleInputUpdate = (key, e) => {
1487
- var _a, _b;
1488
1523
  const inputEl = e.target;
1489
1524
  setErrorMessage("");
1490
- const value = inputEl == null ? void 0 : inputEl.value;
1525
+ const value = inputEl?.value;
1491
1526
  let inputData = {
1492
1527
  [key]: value
1493
1528
  };
1494
1529
  if (["amount", "currency"].includes(key)) {
1495
1530
  const amountValue = {
1496
- currency: key === "currency" ? value : (_a = formData == null ? void 0 : formData.amount) == null ? void 0 : _a.currency,
1497
- value: key === "currency" ? (_b = formData == null ? void 0 : formData.amount) == null ? void 0 : _b.value : value
1531
+ currency: key === "currency" ? value : formData?.amount?.currency,
1532
+ value: key === "currency" ? formData?.amount?.value : value
1498
1533
  };
1499
1534
  inputData = { amount: amountValue };
1500
1535
  }
@@ -1507,19 +1542,17 @@ const SOFFinancierModal = (props) => {
1507
1542
  setFormErrors(errors);
1508
1543
  };
1509
1544
  const handleOnAmountBlur = () => {
1510
- var _a;
1511
1545
  setIsFocused(false);
1512
1546
  const errors = getInputErrors({
1513
1547
  formErrors,
1514
1548
  data: formData,
1515
1549
  key: "amount",
1516
- value: (_a = formData == null ? void 0 : formData.amount) == null ? void 0 : _a.value
1550
+ value: formData?.amount?.value
1517
1551
  });
1518
1552
  setFormErrors(errors);
1519
1553
  };
1520
1554
  const allFieldsFilled = (data) => {
1521
- var _a, _b;
1522
- return (data == null ? void 0 : data.firstName) && (data == null ? void 0 : data.lastName) && (data == null ? void 0 : data.location) && ((_a = data == null ? void 0 : data.amount) == null ? void 0 : _a.currency) && !Number.isNaN(Number((_b = data == null ? void 0 : data.amount) == null ? void 0 : _b.value));
1555
+ return data?.firstName && data?.lastName && data?.location && data?.amount?.currency && !Number.isNaN(Number(data?.amount?.value));
1523
1556
  };
1524
1557
  const handleFinancierSave = () => {
1525
1558
  if (formData && allFieldsFilled(formData)) {
@@ -1533,8 +1566,7 @@ const SOFFinancierModal = (props) => {
1533
1566
  "amount"
1534
1567
  ];
1535
1568
  const errors = fields.reduce((acc, key) => {
1536
- var _a;
1537
- const value = key === "amount" ? (_a = formData == null ? void 0 : formData.amount) == null ? void 0 : _a.value : formData == null ? void 0 : formData[key];
1569
+ const value = key === "amount" ? formData?.amount?.value : formData?.[key];
1538
1570
  return {
1539
1571
  ...acc,
1540
1572
  ...getInputErrors({
@@ -1587,7 +1619,7 @@ const SOFFinancierModal = (props) => {
1587
1619
  {
1588
1620
  ...childProps,
1589
1621
  name: "firstName",
1590
- value: formData == null ? void 0 : formData.firstName,
1622
+ value: formData?.firstName,
1591
1623
  onInput: (e) => handleInputUpdate("firstName", e),
1592
1624
  onBlur: (e) => handleInputUpdate("firstName", e),
1593
1625
  "aria-required": true,
@@ -1609,7 +1641,7 @@ const SOFFinancierModal = (props) => {
1609
1641
  {
1610
1642
  ...childProps,
1611
1643
  name: "lastName",
1612
- value: formData == null ? void 0 : formData.lastName,
1644
+ value: formData?.lastName,
1613
1645
  onInput: (e) => handleInputUpdate("lastName", e),
1614
1646
  onBlur: (e) => handleInputUpdate("lastName", e),
1615
1647
  "aria-required": true,
@@ -1635,7 +1667,7 @@ const SOFFinancierModal = (props) => {
1635
1667
  {
1636
1668
  ...childProps,
1637
1669
  name: "location",
1638
- value: formData == null ? void 0 : formData.location,
1670
+ value: formData?.location,
1639
1671
  onInput: (e) => handleInputUpdate("location", e),
1640
1672
  onBlur: (e) => handleInputUpdate("location", e),
1641
1673
  "aria-required": true,
@@ -1653,36 +1685,33 @@ const SOFFinancierModal = (props) => {
1653
1685
  label: i18n.get("investmentAmount"),
1654
1686
  errorMessage: formErrors.amount,
1655
1687
  isValid: !formErrors.amount,
1656
- children: (childProps) => {
1657
- var _a, _b;
1658
- return /* @__PURE__ */ jsxs(InputGroup, { ...childProps, id: "currencyGroup", isFocused, children: [
1659
- /* @__PURE__ */ jsx(
1660
- Select,
1661
- {
1662
- minimal: true,
1663
- name: "currency",
1664
- "aria-label": i18n.get("currency"),
1665
- isMulti: false,
1666
- items: allowedCurrencies,
1667
- selected: (_a = formData == null ? void 0 : formData.amount) == null ? void 0 : _a.currency,
1668
- placeholder: i18n.get("select"),
1669
- onChange: (e) => handleInputUpdate("currency", e)
1670
- }
1671
- ),
1672
- /* @__PURE__ */ jsx(
1673
- InputText,
1674
- {
1675
- ...childProps,
1676
- name: "amount",
1677
- value: (_b = formData == null ? void 0 : formData.amount) == null ? void 0 : _b.value,
1678
- onInput: (e) => handleInputUpdate("amount", e),
1679
- onBlur: handleOnAmountBlur,
1680
- "aria-required": true,
1681
- onFocusHandler: () => setIsFocused(true)
1682
- }
1683
- )
1684
- ] });
1685
- }
1688
+ children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, { ...childProps, id: "currencyGroup", isFocused, children: [
1689
+ /* @__PURE__ */ jsx(
1690
+ Select,
1691
+ {
1692
+ minimal: true,
1693
+ name: "currency",
1694
+ "aria-label": i18n.get("currency"),
1695
+ isMulti: false,
1696
+ items: allowedCurrencies,
1697
+ selected: formData?.amount?.currency,
1698
+ placeholder: i18n.get("select"),
1699
+ onChange: (e) => handleInputUpdate("currency", e)
1700
+ }
1701
+ ),
1702
+ /* @__PURE__ */ jsx(
1703
+ InputText,
1704
+ {
1705
+ ...childProps,
1706
+ name: "amount",
1707
+ value: formData?.amount?.value,
1708
+ onInput: (e) => handleInputUpdate("amount", e),
1709
+ onBlur: handleOnAmountBlur,
1710
+ "aria-required": true,
1711
+ onFocusHandler: () => setIsFocused(true)
1712
+ }
1713
+ )
1714
+ ] })
1686
1715
  }
1687
1716
  )
1688
1717
  ] }),
@@ -1704,7 +1733,6 @@ const SOFFinancierModal = (props) => {
1704
1733
  ] });
1705
1734
  };
1706
1735
  function AdditionalDataForThirdParty(props) {
1707
- var _a;
1708
1736
  const [showFinancierModal, setShowFinancierModal] = useState(false);
1709
1737
  const [activeFinancier, setActiveFinancier] = useState();
1710
1738
  const [activeIndex, setActiveIndex] = useState();
@@ -1762,35 +1790,32 @@ function AdditionalDataForThirdParty(props) {
1762
1790
  children: i18n.get("addAtLeastOneInvestor")
1763
1791
  }
1764
1792
  ),
1765
- (_a = data.financiers) == null ? void 0 : _a.map((financier, index) => {
1766
- var _a2, _b, _c;
1767
- return /* @__PURE__ */ jsxs(
1768
- "button",
1769
- {
1770
- type: "button",
1771
- onClick: () => handleShowUpdateFinancierModal(index),
1772
- className: styles.sourceOfFundsThirdPartyFundingFinancierGroup,
1773
- children: [
1774
- /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
1775
- /* @__PURE__ */ jsx(Avatar, { iconName: "user", circle: true }),
1776
- /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
1777
- /* @__PURE__ */ jsxs(Typography, { el: "div", variant: "body-strongest", children: [
1778
- financier.firstName,
1779
- " ",
1780
- financier.lastName
1781
- ] }),
1782
- /* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: financier.location })
1783
- ] })
1784
- ] }),
1785
- /* @__PURE__ */ jsx("div", { children: ((_a2 = financier.amount) == null ? void 0 : _a2.currency) && ((_b = financier.amount) == null ? void 0 : _b.value) ? formatAmountWithCurrency(
1786
- financier.amount.value,
1787
- (_c = financier.amount) == null ? void 0 : _c.currency
1788
- ) : "" })
1789
- ]
1790
- },
1791
- index
1792
- );
1793
- }),
1793
+ data.financiers?.map((financier, index) => /* @__PURE__ */ jsxs(
1794
+ "button",
1795
+ {
1796
+ type: "button",
1797
+ onClick: () => handleShowUpdateFinancierModal(index),
1798
+ className: styles.sourceOfFundsThirdPartyFundingFinancierGroup,
1799
+ children: [
1800
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
1801
+ /* @__PURE__ */ jsx(Avatar, { iconName: "user", circle: true }),
1802
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
1803
+ /* @__PURE__ */ jsxs(Typography, { el: "div", variant: "body-strongest", children: [
1804
+ financier.firstName,
1805
+ " ",
1806
+ financier.lastName
1807
+ ] }),
1808
+ /* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: financier.location })
1809
+ ] })
1810
+ ] }),
1811
+ /* @__PURE__ */ jsx("div", { children: financier.amount?.currency && financier.amount?.value ? formatAmountWithCurrency(
1812
+ financier.amount.value,
1813
+ financier.amount?.currency
1814
+ ) : "" })
1815
+ ]
1816
+ },
1817
+ index
1818
+ )),
1794
1819
  /* @__PURE__ */ jsx(
1795
1820
  "button",
1796
1821
  {
@@ -1814,6 +1839,17 @@ function AdditionalDataForThirdParty(props) {
1814
1839
  )
1815
1840
  ] });
1816
1841
  }
1842
+ function canParseUrl(url) {
1843
+ if (URL.canParse) {
1844
+ return URL.canParse(url);
1845
+ }
1846
+ try {
1847
+ new URL(url);
1848
+ return true;
1849
+ } catch {
1850
+ return false;
1851
+ }
1852
+ }
1817
1853
  const sourceOfFundsTypeValidations = {
1818
1854
  type: {
1819
1855
  modes: ["blur"],
@@ -1835,24 +1871,26 @@ const sourceOfFundsAdditionalDataValidations = {
1835
1871
  },
1836
1872
  {
1837
1873
  modes: ["blur"],
1838
- validate: (website) => website ? isURL(website) : false,
1874
+ validate: (website) => website ? canParseUrl(
1875
+ website?.startsWith("http:") || website?.startsWith("https:") ? website : `https://${website}`
1876
+ ) : false,
1839
1877
  errorMessage: "validationPleaseEnterAValidUrl"
1840
1878
  }
1841
1879
  ],
1842
1880
  amount: [
1843
1881
  {
1844
1882
  modes: ["blur"],
1845
- validate: (amount) => !isEmpty(amount == null ? void 0 : amount.currency),
1883
+ validate: (amount) => !isEmpty(amount?.currency),
1846
1884
  errorMessage: "currencyIsRequired"
1847
1885
  },
1848
1886
  {
1849
1887
  modes: ["blur"],
1850
- validate: (amount) => !isEmpty(amount == null ? void 0 : amount.value),
1888
+ validate: (amount) => !isEmpty(amount?.value),
1851
1889
  errorMessage: "amountIsRequired"
1852
1890
  },
1853
1891
  {
1854
1892
  modes: ["blur"],
1855
- validate: (amount) => !Number.isNaN(Number(amount == null ? void 0 : amount.value)),
1893
+ validate: (amount) => !Number.isNaN(Number(amount?.value)),
1856
1894
  errorMessage: "pleaseEnterAValidAmount"
1857
1895
  }
1858
1896
  ],
@@ -1937,8 +1975,8 @@ function SourceOfFundsAdditionalData(props) {
1937
1975
  sourceOfFundsType
1938
1976
  } = props;
1939
1977
  const getFormSchema = useMemo(
1940
- () => getAdditionalDataSchemaKeys(sourceOfFundsType, defaultData == null ? void 0 : defaultData.originatorType),
1941
- [sourceOfFundsType, defaultData == null ? void 0 : defaultData.originatorType]
1978
+ () => getAdditionalDataSchemaKeys(sourceOfFundsType, defaultData?.originatorType),
1979
+ [sourceOfFundsType, defaultData?.originatorType]
1942
1980
  );
1943
1981
  const [schema, setSchema] = useState(getFormSchema);
1944
1982
  const {
@@ -1957,14 +1995,13 @@ function SourceOfFundsAdditionalData(props) {
1957
1995
  shouldValidate
1958
1996
  });
1959
1997
  useEffect(() => {
1960
- setSchema(getAdditionalDataSchemaKeys(sourceOfFundsType, formData == null ? void 0 : formData.originatorType));
1998
+ setSchema(getAdditionalDataSchemaKeys(sourceOfFundsType, formData?.originatorType));
1961
1999
  }, [formData.originatorType]);
1962
2000
  const handleAmountChange = (key) => (e) => {
1963
- var _a, _b;
1964
2001
  const isCurrencyKey = key === "currency";
1965
2002
  const amountValue = {
1966
- currency: isCurrencyKey ? e.target.value : (_a = formData.amount) == null ? void 0 : _a.currency,
1967
- value: isCurrencyKey ? (_b = formData.amount) == null ? void 0 : _b.value : e.target.value
2003
+ currency: isCurrencyKey ? e.target.value : formData.amount?.currency,
2004
+ value: isCurrencyKey ? formData.amount?.value : e.target.value
1968
2005
  };
1969
2006
  const fieldEvent = {
1970
2007
  target: {
@@ -2087,7 +2124,7 @@ function SourceOfFundsAdditionalData(props) {
2087
2124
  ErrorPanel,
2088
2125
  {
2089
2126
  verificationErrors: formVerificationErrors,
2090
- validationErrors: props == null ? void 0 : props.fieldValidationErrors,
2127
+ validationErrors: props?.fieldValidationErrors,
2091
2128
  formUtils,
2092
2129
  id: "ariaErrorField"
2093
2130
  }
@@ -2137,11 +2174,11 @@ function SourceOfFundsType(props) {
2137
2174
  label: i18n.get("sofTypeAdyenLabel"),
2138
2175
  icon: getIconById("adyen")
2139
2176
  },
2140
- ...(categories == null ? void 0 : categories.map((item) => ({
2177
+ ...categories?.map((item) => ({
2141
2178
  value: item.id,
2142
2179
  label: i18n.get(`sofType${toCapitalized(item.name)}Label`),
2143
2180
  icon: getIconById(item.id)
2144
- }))) ?? []
2181
+ })) ?? []
2145
2182
  ];
2146
2183
  const errorMessage = formUtils.getErrorMessage("type", formErrors, formFieldProblems);
2147
2184
  return /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: () => /* @__PURE__ */ jsx(
@@ -2150,7 +2187,7 @@ function SourceOfFundsType(props) {
2150
2187
  name: "type",
2151
2188
  tiles: categoryItems,
2152
2189
  errorMessage: typeof errorMessage !== "boolean" ? i18n.get(errorMessage) : errorMessage,
2153
- selected: (formData == null ? void 0 : formData.type) ? formData.type : [],
2190
+ selected: formData?.type ? formData.type : [],
2154
2191
  onChange: handleChangeFor("type", "input")
2155
2192
  }
2156
2193
  ) });
@@ -2197,7 +2234,7 @@ function SourceOfFunds(props) {
2197
2234
  const { i18n } = useI18nContext();
2198
2235
  const { activeForm, activeBusinessLine, sourceOfFundsType } = props;
2199
2236
  const { data: sourceOfFundsTypesData, isLoading } = useSourceOfFundsTypes();
2200
- const formWrapperClasses = (formId) => (activeForm == null ? void 0 : activeForm.formId) !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
2237
+ const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
2201
2238
  const pageHeadings = useMemo(
2202
2239
  () => getPageHeadings(sourceOfFundsType ?? "adyen"),
2203
2240
  [sourceOfFundsType]
@@ -2205,19 +2242,19 @@ function SourceOfFunds(props) {
2205
2242
  return isLoading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
2206
2243
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsWrapperHeading, children: [
2207
2244
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get(
2208
- (activeForm == null ? void 0 : activeForm.formId) === "additionalData" ? pageHeadings.heading : {
2245
+ activeForm?.formId === "additionalData" ? pageHeadings.heading : {
2209
2246
  key: "selectASourceOfFunding",
2210
2247
  values: {
2211
- type: getServiceTranslation(
2248
+ type: getServiceTranslationSelectTitle(
2212
2249
  i18n,
2213
- (activeBusinessLine == null ? void 0 : activeBusinessLine.service) || ""
2250
+ activeBusinessLine?.service || ""
2214
2251
  ).toLowerCase()
2215
2252
  }
2216
2253
  }
2217
2254
  ) }),
2218
2255
  /* @__PURE__ */ jsxs(Typography, { className: styles.sourceOfFundsWrapperDescription, children: [
2219
- (activeForm == null ? void 0 : activeForm.formId) === "additionalData" && pageHeadings.description && i18n.get(pageHeadings.description),
2220
- (sourceOfFundsTypesData == null ? void 0 : sourceOfFundsTypesData.length) === 0 && i18n.get("noCategoriesAvailable")
2256
+ activeForm?.formId === "additionalData" && pageHeadings.description && i18n.get(pageHeadings.description),
2257
+ sourceOfFundsTypesData?.length === 0 && i18n.get("noCategoriesAvailable")
2221
2258
  ] })
2222
2259
  ] }),
2223
2260
  sofErrorMessage.value && /* @__PURE__ */ jsxs(
@@ -2234,21 +2271,21 @@ function SourceOfFunds(props) {
2234
2271
  ]
2235
2272
  }
2236
2273
  ),
2237
- (activeForm == null ? void 0 : activeForm.formId) === "sourceOfFundsType" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("sourceOfFundsType"), children: /* @__PURE__ */ jsx(
2274
+ activeForm?.formId === "sourceOfFundsType" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("sourceOfFundsType"), children: /* @__PURE__ */ jsx(
2238
2275
  SourceOfFundsType,
2239
2276
  {
2240
2277
  categories: sourceOfFundsTypesData,
2241
2278
  ...getFormProps(props, sourceOfFundsForms.sourceOfFundsType.formId)
2242
2279
  }
2243
2280
  ) }),
2244
- (activeForm == null ? void 0 : activeForm.formId) === "additionalData" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("additionalData"), children: /* @__PURE__ */ jsx(
2281
+ activeForm?.formId === "additionalData" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("additionalData"), children: /* @__PURE__ */ jsx(
2245
2282
  SourceOfFundsAdditionalData,
2246
2283
  {
2247
2284
  ...getFormProps(props, sourceOfFundsForms.additionalData.formId),
2248
2285
  sourceOfFundsType
2249
2286
  }
2250
2287
  ) }),
2251
- (activeForm == null ? void 0 : activeForm.formId) === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("companySourceOfFunds"), children: /* @__PURE__ */ jsx("div", { children: i18n.get("uploadADocument") }) })
2288
+ activeForm?.formId === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("companySourceOfFunds"), children: /* @__PURE__ */ jsx("div", { children: i18n.get("uploadADocument") }) })
2252
2289
  ] });
2253
2290
  }
2254
2291
  function SourceOfFundsGettingStartedCard(props) {
@@ -2270,7 +2307,7 @@ function SourceOfFundsGettingStartedCard(props) {
2270
2307
  children: i18n.get("start")
2271
2308
  }
2272
2309
  ),
2273
- children: isEdit && (meta == null ? void 0 : meta.length) && /* @__PURE__ */ jsx(
2310
+ children: isEdit && meta?.length && /* @__PURE__ */ jsx(
2274
2311
  StructuredList,
2275
2312
  {
2276
2313
  className: styles.sourceOfFundsGettingStartedCardsCardDescription,
@@ -2291,64 +2328,55 @@ const SourceOfFundsGettingStarted = ({
2291
2328
  legalEntity,
2292
2329
  isSoFDocumentMissing
2293
2330
  }) => {
2294
- var _a, _b, _c;
2295
2331
  const { i18n } = useI18nContext();
2296
- const hasSourceOfFunds = businessLines == null ? void 0 : businessLines.some(
2332
+ const hasSourceOfFunds = businessLines?.some(
2297
2333
  (businessLine) => !isEmpty$1(businessLine.sourceOfFunds)
2298
2334
  );
2299
2335
  const sofDocuments = useMemo(
2300
- () => {
2301
- var _a2;
2302
- return ((_a2 = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _a2.filter((doc) => doc.type === "proofOfFundingOrWealthSource")) ?? [];
2303
- },
2336
+ () => legalEntity?.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [],
2304
2337
  [legalEntity]
2305
2338
  );
2306
2339
  const mapBusinessLines = useCallback(
2307
2340
  (lines) => {
2308
- var _a2;
2309
- const completedBusinessLines = businessLines.every((line) => {
2310
- var _a3;
2311
- return (_a3 = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _a3.type;
2312
- });
2341
+ const completedBusinessLines = businessLines.every((line) => line?.sourceOfFunds?.type);
2313
2342
  const cards = lines.map((line) => {
2314
- var _a3, _b2, _c2, _d, _e;
2315
2343
  const SoF = mapSourceOfFundToSourceOfFundsSchema(line);
2316
2344
  return {
2317
2345
  title: getServiceTranslation(i18n, line.service || ""),
2318
- type: (_a3 = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _a3.type,
2319
- isEdit: !!((_b2 = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _b2.type) || !!((_c2 = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _c2.adyenProcessedFunds),
2346
+ type: line?.sourceOfFunds?.type,
2347
+ isEdit: !!line?.sourceOfFunds?.type || !!line?.sourceOfFunds?.adyenProcessedFunds,
2320
2348
  onClick: () => handleSourceOfFundsClick(SoF, line),
2321
2349
  meta: [
2322
2350
  {
2323
2351
  term: i18n.get("sourceOfFunds"),
2324
- details: getSofCardDetails(i18n, line == null ? void 0 : line.sourceOfFunds)
2352
+ details: getSofCardDetails(i18n, line?.sourceOfFunds)
2325
2353
  },
2326
2354
  ...getGettingStartedCardDetails(
2327
2355
  getAdditionalDataSchemaKeys(
2328
- ((_d = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _d.type) || "adyen",
2329
- (_e = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _e.originatorType
2356
+ line?.sourceOfFunds?.type || "adyen",
2357
+ line?.sourceOfFunds?.originatorType
2330
2358
  ),
2331
2359
  i18n,
2332
- line == null ? void 0 : line.sourceOfFunds
2360
+ line?.sourceOfFunds
2333
2361
  )
2334
2362
  ]
2335
2363
  };
2336
- }).sort((a) => (a == null ? void 0 : a.type) ? 1 : -1);
2364
+ }).sort((a) => a?.type ? 1 : -1);
2337
2365
  const uploadCard = {
2338
2366
  title: getServiceTranslation(i18n),
2339
2367
  type: "",
2340
- isEdit: !!(sofDocuments == null ? void 0 : sofDocuments.length),
2368
+ isEdit: !!sofDocuments?.length,
2341
2369
  onClick: handleNavigateToUploadPage,
2342
- meta: (sofDocuments == null ? void 0 : sofDocuments.length) ? sofDocuments.map((doc) => ({
2370
+ meta: sofDocuments?.length ? sofDocuments.map((doc) => ({
2343
2371
  term: i18n.get("fileName"),
2344
2372
  details: [
2345
- doc == null ? void 0 : doc.fileName,
2346
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(i18n, doc == null ? void 0 : doc.description) || "" }, "docDescription")
2373
+ doc?.fileName,
2374
+ /* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(i18n, doc?.description) || "" }, "docDescription")
2347
2375
  ]
2348
2376
  })) : []
2349
2377
  };
2350
- if (completedBusinessLines && (isSoFDocumentMissing || (sofDocuments == null ? void 0 : sofDocuments.length))) {
2351
- if ((_a2 = uploadCard.meta) == null ? void 0 : _a2.length) {
2378
+ if (completedBusinessLines && (isSoFDocumentMissing || sofDocuments?.length)) {
2379
+ if (uploadCard.meta?.length) {
2352
2380
  cards.push(uploadCard);
2353
2381
  } else {
2354
2382
  cards.unshift(uploadCard);
@@ -2381,27 +2409,61 @@ const SourceOfFundsGettingStarted = ({
2381
2409
  "data-testid": "source-of-funds-getting-started",
2382
2410
  children: [
2383
2411
  !hasSourceOfFunds && /* @__PURE__ */ jsx(
2384
- Svg,
2412
+ LandingLayout,
2385
2413
  {
2386
- type: "image",
2387
- testId: "source-of-funds-getting-started-icon",
2388
- name: "source-of-funds",
2389
- className: styles.sourceOfFundsGettingStartedIcon
2390
- }
2391
- ),
2392
- hasSourceOfFunds && /* @__PURE__ */ jsx(
2393
- TaskStatusIndicator,
2394
- {
2395
- taskStatus: (_c = (_b = (_a = normalizedTaskStatusStore) == null ? void 0 : _a.value) == null ? void 0 : _b.SOURCE_OF_FUNDS) == null ? void 0 : _c.status
2414
+ media: /* @__PURE__ */ jsx(
2415
+ Svg,
2416
+ {
2417
+ type: "image",
2418
+ testId: "source-of-funds-getting-started-icon",
2419
+ name: "source-of-funds"
2420
+ }
2421
+ ),
2422
+ title: i18n.get("fundingSourcesForFinancialProducts"),
2423
+ description: i18n.get("inTheNextStepWellCollectInformation"),
2424
+ actions: /* @__PURE__ */ jsxs(Fragment, { children: [
2425
+ /* @__PURE__ */ jsx(
2426
+ Button,
2427
+ {
2428
+ fullWidth: true,
2429
+ testId: "source-of-funds-getting-primary-button",
2430
+ onClick: handleGettingStartedClick,
2431
+ children: i18n.get("gettingStarted")
2432
+ }
2433
+ ),
2434
+ handleCancelClick && /* @__PURE__ */ jsx(
2435
+ Button,
2436
+ {
2437
+ variant: "tertiary",
2438
+ fullWidth: true,
2439
+ testId: "source-of-funds-getting-cancel-button",
2440
+ onClick: handleCancelClick,
2441
+ children: i18n.get("backToTaskList")
2442
+ }
2443
+ )
2444
+ ] })
2396
2445
  }
2397
2446
  ),
2398
- /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedHeading, el: "h2", variant: "title-l", children: i18n.get("financialProductFundingSources") }),
2399
2447
  hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
2448
+ /* @__PURE__ */ jsx(
2449
+ TaskStatusIndicator,
2450
+ {
2451
+ taskStatus: normalizedTaskStatusStore?.value?.SOURCE_OF_FUNDS?.status
2452
+ }
2453
+ ),
2454
+ /* @__PURE__ */ jsx(
2455
+ Typography,
2456
+ {
2457
+ className: styles.sourceOfFundsGettingStartedHeading,
2458
+ el: "h2",
2459
+ variant: "title-l",
2460
+ children: i18n.get("fundingSourcesForFinancialProducts")
2461
+ }
2462
+ ),
2400
2463
  /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedBody, children: i18n.get("addAllSourcesOfFundsBeingUsed") }),
2401
2464
  errorObjects && errorObjects.map((errorObj, index) => {
2402
- var _a2, _b2;
2403
2465
  const uniqueActions = getUniqueRemediationActions(errorObj);
2404
- const errorItems = ((_a2 = errorObj.subErrors) == null ? void 0 : _a2.map((subError) => subError.message)) || [];
2466
+ const errorItems = errorObj.subErrors?.map((subError) => subError.message) || [];
2405
2467
  return /* @__PURE__ */ jsxs(
2406
2468
  Alert,
2407
2469
  {
@@ -2409,7 +2471,7 @@ const SourceOfFundsGettingStarted = ({
2409
2471
  className: styles.sourceOfFundsGettingStartedError,
2410
2472
  variant: "error",
2411
2473
  children: [
2412
- ((_b2 = errorObj == null ? void 0 : errorObj.subErrors) == null ? void 0 : _b2.length) && /* @__PURE__ */ jsx("ul", { children: errorItems.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) }),
2474
+ errorObj?.subErrors?.length && /* @__PURE__ */ jsx("ul", { children: errorItems.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) }),
2413
2475
  uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedErrorActions, children: uniqueActions.filter((action) => action.code !== "1_519").map((action, i) => /* @__PURE__ */ jsx(
2414
2476
  Button,
2415
2477
  {
@@ -2435,48 +2497,21 @@ const SourceOfFundsGettingStarted = ({
2435
2497
  children: i18n.get("backToTaskList")
2436
2498
  }
2437
2499
  )
2438
- ] }),
2439
- !hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
2440
- /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedBody, children: i18n.get("inTheNextStepWellCollectInformation") }),
2441
- /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsGettingStartedActions, children: [
2442
- /* @__PURE__ */ jsx(
2443
- Button,
2444
- {
2445
- fullWidth: true,
2446
- testId: "source-of-funds-getting-primary-button",
2447
- onClick: handleGettingStartedClick,
2448
- children: i18n.get("gettingStarted")
2449
- }
2450
- ),
2451
- handleCancelClick && /* @__PURE__ */ jsx(
2452
- Button,
2453
- {
2454
- variant: "tertiary",
2455
- fullWidth: true,
2456
- testId: "source-of-funds-getting-cancel-button",
2457
- onClick: handleCancelClick,
2458
- children: i18n.get("cancel")
2459
- }
2460
- )
2461
- ] })
2462
2500
  ] })
2463
2501
  ]
2464
2502
  }
2465
2503
  );
2466
2504
  };
2467
2505
  const SOFUploadModal = (props) => {
2468
- var _a;
2469
2506
  const { i18n } = useI18nContext();
2470
2507
  const { showToast } = useToastContext();
2471
2508
  const logger2 = createLogger();
2472
- const { businessLines, handleModalClose, documentUtils, legalEntityId } = props;
2473
- const firstService = (businessLines == null ? void 0 : businessLines.length) === 1 ? (_a = businessLines == null ? void 0 : businessLines[0]) == null ? void 0 : _a.service : void 0;
2509
+ const { businessLines, handleModalClose, documentUtils } = props;
2510
+ const firstService = businessLines?.length === 1 ? businessLines?.[0]?.service : void 0;
2474
2511
  const [selectedService, setSelectedService] = useState(
2475
2512
  firstService
2476
2513
  );
2477
2514
  const [documentType, setDocumentType] = useState();
2478
- const [selectedBusinessLineId, setSelectedBusinessLineId] = useState("");
2479
- const [documentLists, setDocumentLists] = useState([]);
2480
2515
  const onRadioChange = (selectedId) => {
2481
2516
  setSelectedService(selectedId);
2482
2517
  setDocumentType(void 0);
@@ -2487,30 +2522,25 @@ const SOFUploadModal = (props) => {
2487
2522
  const serviceRadioItems = useMemo(() => {
2488
2523
  return businessLines.map((businessLine) => ({
2489
2524
  id: businessLine.service,
2490
- name: getServiceTranslationKey((businessLine == null ? void 0 : businessLine.service) || "")
2525
+ name: getServiceTranslationKey(businessLine?.service || "")
2491
2526
  }));
2492
2527
  }, [businessLines]);
2493
2528
  const canUpload = useMemo(() => selectedService && documentType, [selectedService, documentType]);
2494
- useEffect(() => {
2495
- var _a2, _b, _c;
2496
- if (selectedService) {
2497
- const selectedType = (_b = (_a2 = businessLines == null ? void 0 : businessLines.find(
2498
- (businessLine) => businessLine.service === selectedService
2499
- )) == null ? void 0 : _a2.sourceOfFunds) == null ? void 0 : _b.type;
2500
- const getSelectedBusinessLineId = (_c = businessLines == null ? void 0 : businessLines.find(
2501
- (businessLine) => businessLine.service === selectedService
2502
- )) == null ? void 0 : _c.id;
2503
- setSelectedBusinessLineId(getSelectedBusinessLineId ?? "");
2504
- if (selectedType) {
2505
- const lists = getDocumentLists(selectedType);
2506
- const items = lists.map((list) => ({
2507
- id: list,
2508
- name: i18n.get(list)
2509
- }));
2510
- setDocumentLists(items);
2511
- }
2529
+ const selectedBusinessLineId = businessLines?.find((businessLine) => businessLine.service === selectedService)?.id || "";
2530
+ const documentLists = useMemo(() => {
2531
+ const selectedType = businessLines?.find(
2532
+ (businessLine) => businessLine.service === selectedService
2533
+ )?.sourceOfFunds?.type;
2534
+ if (selectedType) {
2535
+ const lists = getDocumentLists(selectedType);
2536
+ const items = lists.map((list) => ({
2537
+ id: list,
2538
+ name: i18n.get(list)
2539
+ }));
2540
+ return items;
2512
2541
  }
2513
- }, [selectedService, setSelectedBusinessLineId, i18n, businessLines]);
2542
+ return [];
2543
+ }, [businessLines, i18n, selectedService]);
2514
2544
  const documentRequirements = useMemo(() => {
2515
2545
  return documentType ? getDocumentRequirements[documentType] : [];
2516
2546
  }, [documentType]);
@@ -2528,7 +2558,7 @@ const SOFUploadModal = (props) => {
2528
2558
  });
2529
2559
  if (formattedDocument) {
2530
2560
  try {
2531
- await documentUtils.uploadDocuments([formattedDocument], legalEntityId);
2561
+ await documentUtils.uploadDocuments([formattedDocument], selectedBusinessLineId);
2532
2562
  showToast({
2533
2563
  label: i18n.get("documentUploadedSuccessfully"),
2534
2564
  variant: "success",
@@ -2544,7 +2574,7 @@ const SOFUploadModal = (props) => {
2544
2574
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Modal, { onClose: handleModalClose, ariaLabel: i18n.get("uploadASupportingDocument"), inset: true, children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsModal, children: [
2545
2575
  /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: i18n.get("uploadASupportingDocument") }),
2546
2576
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContent, children: [
2547
- (businessLines == null ? void 0 : businessLines.length) > 1 ? /* @__PURE__ */ jsx(
2577
+ businessLines?.length > 1 ? /* @__PURE__ */ jsx(
2548
2578
  Field,
2549
2579
  {
2550
2580
  el: "fieldset",
@@ -2586,9 +2616,9 @@ const SOFUploadModal = (props) => {
2586
2616
  )
2587
2617
  }
2588
2618
  ),
2589
- (documentRequirements == null ? void 0 : documentRequirements.length) ? /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContentRequirementsContainer, children: [
2619
+ documentRequirements?.length ? /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContentRequirementsContainer, children: [
2590
2620
  /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "div", children: i18n.get("documentShouldShow") }),
2591
- /* @__PURE__ */ jsx("ul", { children: documentRequirements == null ? void 0 : documentRequirements.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "div", children: i18n.get(requirement) }) }, requirement)) })
2621
+ /* @__PURE__ */ jsx("ul", { children: documentRequirements?.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "div", children: i18n.get(requirement) }) }, requirement)) })
2592
2622
  ] }) : null,
2593
2623
  canUpload && /* @__PURE__ */ jsx(
2594
2624
  Dropzone,
@@ -2612,7 +2642,6 @@ const SourceOfFundsUpload = ({
2612
2642
  legalEntity,
2613
2643
  handleNavigateToSummary
2614
2644
  }) => {
2615
- var _a;
2616
2645
  const { i18n } = useI18nContext();
2617
2646
  const [showUploadModal, setShowUploadModal] = useState(false);
2618
2647
  const [docToDelete, setDocToDelete] = useState(void 0);
@@ -2629,16 +2658,10 @@ const SourceOfFundsUpload = ({
2629
2658
  setShowUploadModal(true);
2630
2659
  };
2631
2660
  const documents = useMemo(
2632
- () => {
2633
- var _a2;
2634
- return ((_a2 = legalEntity.documentDetails) == null ? void 0 : _a2.filter((doc) => doc.type === "proofOfFundingOrWealthSource")) ?? [];
2635
- },
2661
+ () => legalEntity.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [],
2636
2662
  [legalEntity]
2637
2663
  );
2638
- const sourceOfFundsCategories = (_a = businessLines == null ? void 0 : businessLines.map((line) => {
2639
- var _a2;
2640
- return (_a2 = line.sourceOfFunds) == null ? void 0 : _a2.type;
2641
- })) == null ? void 0 : _a.filter(Boolean);
2664
+ const sourceOfFundsCategories = businessLines?.map((line) => line.sourceOfFunds?.type)?.filter(Boolean);
2642
2665
  const handleFileDelete = async (documentId) => {
2643
2666
  if (documentUtils.deleteDocument) {
2644
2667
  try {
@@ -2660,7 +2683,7 @@ const SourceOfFundsUpload = ({
2660
2683
  return /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadList, children: [
2661
2684
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadListHeading, children: [
2662
2685
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("supportingDocuments") }),
2663
- /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children: (sourceOfFundsCategories == null ? void 0 : sourceOfFundsCategories.length) ? i18n.get("weNeedProofOfFundingPlural", {
2686
+ /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children: sourceOfFundsCategories?.length > 1 ? i18n.get("weNeedProofOfFundingPlural", {
2664
2687
  values: {
2665
2688
  category1_name: sourceOfFundsCategories[0] ? i18n.get(
2666
2689
  `sofType${toCapitalized(sourceOfFundsCategories[0])}Label`
@@ -2677,7 +2700,7 @@ const SourceOfFundsUpload = ({
2677
2700
  }
2678
2701
  }) })
2679
2702
  ] }),
2680
- documents == null ? void 0 : documents.map((document) => /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
2703
+ documents?.map((document) => /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
2681
2704
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
2682
2705
  /* @__PURE__ */ jsx(Avatar, { iconName: "document", circle: true }),
2683
2706
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
@@ -2709,18 +2732,18 @@ const SourceOfFundsUpload = ({
2709
2732
  ] })
2710
2733
  }
2711
2734
  ),
2712
- handleNavigateToSummary && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedActions, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children: (documents == null ? void 0 : documents.length) > 0 ? i18n.get("finish") : i18n.get("cancel") }) }),
2735
+ handleNavigateToSummary && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedActions, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children: documents?.length > 0 ? i18n.get("finish") : i18n.get("cancel") }) }),
2713
2736
  !!docToDelete && /* @__PURE__ */ jsx(
2714
2737
  Confirm,
2715
2738
  {
2716
2739
  title: i18n.get({
2717
2740
  key: "areYouSureYouWantToDeleteThisDocument",
2718
2741
  values: {
2719
- deleteDocName: (docToDelete == null ? void 0 : docToDelete.fileName) || ""
2742
+ deleteDocName: docToDelete?.fileName || ""
2720
2743
  }
2721
2744
  }),
2722
2745
  confirmText: i18n.get("delete"),
2723
- onConfirm: () => handleFileDelete(docToDelete == null ? void 0 : docToDelete.id),
2746
+ onConfirm: () => handleFileDelete(docToDelete?.id),
2724
2747
  onCancel: () => setDocToDelete(void 0),
2725
2748
  critical: true
2726
2749
  }
@@ -2730,8 +2753,7 @@ const SourceOfFundsUpload = ({
2730
2753
  {
2731
2754
  documentUtils,
2732
2755
  handleModalClose,
2733
- businessLines,
2734
- legalEntityId: legalEntity.id
2756
+ businessLines
2735
2757
  }
2736
2758
  )
2737
2759
  ] });
@@ -2742,7 +2764,6 @@ function SourceOfFundsDropin({
2742
2764
  problems,
2743
2765
  handleHomeClick
2744
2766
  }) {
2745
- var _a, _b, _c;
2746
2767
  const { data: legalEntity, isLoading: isLoadingRootLegalEntity } = useLegalEntity(ROOT_LE);
2747
2768
  const [loadingStatus, setLoadingStatus] = useState("success");
2748
2769
  const [activeBusinessLine, setActiveBusinessLine] = useState();
@@ -2760,33 +2781,24 @@ function SourceOfFundsDropin({
2760
2781
  const { i18n } = useI18nContext();
2761
2782
  const userEvents = useAnalyticsContext();
2762
2783
  const { showToast } = useToastContext();
2763
- const { data: businessLinesData } = useBusinessLines();
2784
+ const { data: businessLinesData, isLoading: isLoadingBusinessLines } = useBusinessLines();
2764
2785
  const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
2765
2786
  const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
2766
2787
  const { mutateAsync: updateSoFMutation } = useUpdateSourceOfFunds();
2767
2788
  const filteredBusinessLines = useMemo(() => {
2768
- return businessLinesData == null ? void 0 : businessLinesData.filter(
2789
+ return businessLinesData?.filter(
2769
2790
  (businessLine) => ALLOWED_SOF_SERVICES.includes(businessLine.service)
2770
2791
  );
2771
2792
  }, [businessLinesData]);
2772
2793
  const isSoFDocumentMissing = useMemo(
2773
- () => {
2774
- var _a2;
2775
- return ((_a2 = legalEntity == null ? void 0 : legalEntity.problems) == null ? void 0 : _a2.some(
2776
- (problem) => {
2777
- var _a3;
2778
- return (_a3 = problem == null ? void 0 : problem.verificationErrors) == null ? void 0 : _a3.some(
2779
- (verificationError) => (verificationError == null ? void 0 : verificationError.code) === MISSING_DATA_SOF_UPLOAD_CODE
2780
- );
2781
- }
2782
- )) ?? false;
2783
- },
2784
- [legalEntity == null ? void 0 : legalEntity.problems]
2794
+ () => legalEntity?.problems?.some(
2795
+ (problem) => problem?.verificationErrors?.some(
2796
+ (verificationError) => verificationError?.code === MISSING_DATA_SOF_UPLOAD_CODE
2797
+ )
2798
+ ) ?? false,
2799
+ [legalEntity?.problems]
2785
2800
  );
2786
- const idsToFetch = (filteredBusinessLines == null ? void 0 : filteredBusinessLines.map((businessLine) => {
2787
- var _a2;
2788
- return (_a2 = businessLine.sourceOfFunds) == null ? void 0 : _a2.originatorLegalEntityId;
2789
- }).filter((id) => Boolean(id))) ?? [];
2801
+ const idsToFetch = filteredBusinessLines?.map((businessLine) => businessLine.sourceOfFunds?.originatorLegalEntityId).filter((id) => Boolean(id)) ?? [];
2790
2802
  const legalEntityResults = useLegalEntities(idsToFetch, {
2791
2803
  staleTime: 5 * 60 * 1e3
2792
2804
  // 5 minutes
@@ -2797,7 +2809,6 @@ function SourceOfFundsDropin({
2797
2809
  return null;
2798
2810
  }
2799
2811
  return filteredBusinessLines.map((businessLine, index) => {
2800
- var _a2;
2801
2812
  const result = legalEntityResults[index];
2802
2813
  let updatedBusinessLine = { ...businessLine };
2803
2814
  if (result && result.data) {
@@ -2806,7 +2817,7 @@ function SourceOfFundsDropin({
2806
2817
  logger.error(`Error fetching legal entity for BL ${businessLine.id}:`, result.error);
2807
2818
  showToast({ label: i18n.get("unableToLoadRelatedEntity"), variant: "error" });
2808
2819
  }
2809
- if ((_a2 = updatedBusinessLine.sourceOfFunds) == null ? void 0 : _a2.adyenProcessedFunds) {
2820
+ if (updatedBusinessLine.sourceOfFunds?.adyenProcessedFunds) {
2810
2821
  updatedBusinessLine.sourceOfFunds.type = "adyen";
2811
2822
  }
2812
2823
  return updatedBusinessLine;
@@ -2854,34 +2865,28 @@ function SourceOfFundsDropin({
2854
2865
  });
2855
2866
  }, [userEvents]);
2856
2867
  const canSubmitForm = useMemo(
2857
- () => {
2858
- var _a2, _b2;
2859
- return activeSourceOfFund ? !isEmpty((_b2 = (_a2 = currentState.data) == null ? void 0 : _a2.sourceOfFundsType) == null ? void 0 : _b2.type) && hasDataChanged(activeSourceOfFund, currentState.data) : false;
2860
- },
2868
+ () => activeSourceOfFund ? !isEmpty(currentState.data?.sourceOfFundsType?.type) && hasDataChanged(activeSourceOfFund, currentState.data) : false,
2861
2869
  [activeSourceOfFund, currentState.data]
2862
2870
  );
2863
2871
  const derivedProps = useMemo(
2864
2872
  () => getPropsFromConfigurations(
2865
2873
  {},
2866
2874
  sourceOfFundsForms,
2867
- (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [],
2868
- (problems == null ? void 0 : problems.missingData) ?? [],
2875
+ problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
2876
+ problems?.missingData ?? [],
2869
2877
  // TODO fix this to take existing fields into account
2870
2878
  // getFieldsWithExistingData(legalEntityResponse, sourceOfFundsApiKeyMapping),
2871
2879
  [],
2872
2880
  {},
2873
2881
  {},
2874
2882
  {},
2875
- legalEntity == null ? void 0 : legalEntity.type
2883
+ legalEntity?.type
2876
2884
  ),
2877
- [problems == null ? void 0 : problems.remediationActions, problems == null ? void 0 : problems.missingData, legalEntity]
2885
+ [problems?.remediationActions, problems?.missingData, legalEntity]
2878
2886
  );
2879
2887
  const sourceOfFundsRequiredForms = useMemo(
2880
- () => {
2881
- var _a2;
2882
- return getSourceOfFundsRequiredForms((_a2 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _a2.sourceOfFundsType);
2883
- },
2884
- [(_a = currentState == null ? void 0 : currentState.data) == null ? void 0 : _a.sourceOfFundsType]
2888
+ () => getSourceOfFundsRequiredForms(currentState?.data?.sourceOfFundsType),
2889
+ [currentState?.data?.sourceOfFundsType]
2885
2890
  );
2886
2891
  const forms = useMemo(() => {
2887
2892
  const requiredForms = getRequiredForms(
@@ -2895,9 +2900,9 @@ function SourceOfFundsDropin({
2895
2900
  const createOrUpdateOriginator = async (additionalData) => {
2896
2901
  let originatorLegalEntityId;
2897
2902
  const sofOriginator = parseSofOriginatorPayload(additionalData);
2898
- if (additionalData == null ? void 0 : additionalData.originatorLegalEntityId) {
2903
+ if (additionalData?.originatorLegalEntityId) {
2899
2904
  try {
2900
- sofOriginator.id = additionalData == null ? void 0 : additionalData.originatorLegalEntityId;
2905
+ sofOriginator.id = additionalData?.originatorLegalEntityId;
2901
2906
  if (sofOriginator.type) {
2902
2907
  delete sofOriginator.type;
2903
2908
  }
@@ -2906,14 +2911,14 @@ function SourceOfFundsDropin({
2906
2911
  id: sofOriginator.id
2907
2912
  };
2908
2913
  const le = await updateLegalEntity(patchLegalEntity);
2909
- originatorLegalEntityId = le == null ? void 0 : le.id;
2914
+ originatorLegalEntityId = le?.id;
2910
2915
  } catch (e) {
2911
2916
  logger.log("Error updating originator legal entity", e);
2912
2917
  }
2913
2918
  } else {
2914
2919
  try {
2915
2920
  const le = await createLegalEntity(sofOriginator);
2916
- originatorLegalEntityId = le == null ? void 0 : le.id;
2921
+ originatorLegalEntityId = le?.id;
2917
2922
  } catch (e) {
2918
2923
  logger.log("Error creating originator legal entity", e);
2919
2924
  }
@@ -2921,17 +2926,26 @@ function SourceOfFundsDropin({
2921
2926
  return originatorLegalEntityId;
2922
2927
  };
2923
2928
  const handleSubmit = useCallback(async () => {
2924
- var _a2;
2925
- const sofData = { ...currentState == null ? void 0 : currentState.data };
2926
- const sofType = (_a2 = sofData == null ? void 0 : sofData.sourceOfFundsType) == null ? void 0 : _a2.type;
2927
- if (!sofType || !(activeBusinessLine == null ? void 0 : activeBusinessLine.id)) {
2929
+ const sofData = { ...currentState?.data };
2930
+ const sofType = sofData?.sourceOfFundsType?.type;
2931
+ if (!sofType || !activeBusinessLine?.id) {
2928
2932
  return;
2929
2933
  }
2934
+ const eventsAdditionalData = {};
2930
2935
  setLoadingStatus("loading");
2931
2936
  const { additionalData } = sofData;
2932
2937
  const sofPayload = getSourceOfFundsPayload(sofType, additionalData);
2933
2938
  if (sofType === "donations" || sofType === "inheritance") {
2934
- sofPayload.originatorLegalEntityId = await createOrUpdateOriginator(additionalData);
2939
+ try {
2940
+ sofPayload.originatorLegalEntityId = await createOrUpdateOriginator(additionalData);
2941
+ } catch (e) {
2942
+ setSofErrorMessage(e?.message || i18n.get("errorUpdatingSourceOfFunds"));
2943
+ logger.log("Error updating source of funds", e);
2944
+ }
2945
+ eventsAdditionalData.originatorType = additionalData?.originatorType ?? "";
2946
+ }
2947
+ if (sofType === "thirdPartyFunding") {
2948
+ eventsAdditionalData.financiers = `${additionalData?.financiers?.length || 0} investor(s)`;
2935
2949
  }
2936
2950
  const sofMutationPayload = {
2937
2951
  ...sofPayload,
@@ -2941,20 +2955,22 @@ function SourceOfFundsDropin({
2941
2955
  await updateSoFMutation(sofMutationPayload);
2942
2956
  userEvents.addTaskEvent("Success", {
2943
2957
  actionType: "submit",
2944
- returnValue: sofType
2958
+ returnValue: sofType,
2959
+ additionalData: eventsAdditionalData
2945
2960
  });
2946
2961
  setGettingStarted(true);
2947
2962
  setShowUploadPage(false);
2948
2963
  setActiveSourceOfFund({});
2949
2964
  gotoFormByFormIndex(0);
2950
2965
  setSofErrorMessage("");
2951
- handleHomeClick == null ? void 0 : handleHomeClick();
2966
+ showToast({ label: i18n.get("successAddedFundingSources"), variant: "success" });
2967
+ handleHomeClick?.();
2952
2968
  } catch (e) {
2953
- setSofErrorMessage((e == null ? void 0 : e.message) || i18n.get("errorUpdatingSourceOfFunds"));
2969
+ setSofErrorMessage(e?.message || i18n.get("errorUpdatingSourceOfFunds"));
2954
2970
  logger.log("Error updating source of funds", e);
2955
2971
  }
2956
2972
  setLoadingStatus("success");
2957
- }, [currentState == null ? void 0 : currentState.data, handleHomeClick]);
2973
+ }, [currentState?.data, handleHomeClick]);
2958
2974
  const handleGettingStarted = useCallback(() => {
2959
2975
  setGettingStarted(!gettingStarted);
2960
2976
  }, [gettingStarted]);
@@ -2987,14 +3003,14 @@ function SourceOfFundsDropin({
2987
3003
  const handleNavigateToUploadPage = () => {
2988
3004
  setShowUploadPage(true);
2989
3005
  };
2990
- return /* @__PURE__ */ jsx("div", { className: styles.sourceOfFunds, children: loading || isLoadingRootLegalEntity ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
3006
+ return /* @__PURE__ */ jsx("div", { className: styles.sourceOfFunds, children: loading || isLoadingRootLegalEntity || isLoadingBusinessLines || areLegalEntitiesLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
2991
3007
  gettingStarted && !showUploadPage && legalEntity && /* @__PURE__ */ jsx(
2992
3008
  SourceOfFundsGettingStarted,
2993
3009
  {
2994
3010
  handleCancelClick: handleHomeClick,
2995
3011
  handleGettingStartedClick: handleGettingStarted,
2996
3012
  businessLines: allBusinessLines,
2997
- problems: legalEntity == null ? void 0 : legalEntity.problems,
3013
+ problems: legalEntity?.problems,
2998
3014
  handleSourceOfFundsClick,
2999
3015
  handleNavigateToUploadPage,
3000
3016
  legalEntity,
@@ -3035,7 +3051,7 @@ function SourceOfFundsDropin({
3035
3051
  activeForm,
3036
3052
  shouldValidate,
3037
3053
  activeBusinessLine,
3038
- sourceOfFundsType: (_c = (_b = currentState == null ? void 0 : currentState.data) == null ? void 0 : _b.sourceOfFundsType) == null ? void 0 : _c.type,
3054
+ sourceOfFundsType: currentState?.data?.sourceOfFundsType?.type,
3039
3055
  ref: formRef,
3040
3056
  data: activeSourceOfFund
3041
3057
  }