@adyen/kyc-components 4.0.0-beta.1 → 4.0.0-beta.4

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 (628) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-BQ4Yct7L.js → AcceptTermsOfServiceComponent-ilX6szf9.js} +85 -82
  2. package/dist/{AccountSetupRejected-UVhxMcAe.js → AccountSetupRejected-CQjHA557.js} +6 -6
  3. package/dist/{Avatar-NEiNEcRx.js → Avatar-BfRRf9_a.js} +2 -2
  4. package/dist/{BusinessDetailsDropin-l0xfPekL.js → BusinessDetailsDropin-Dr580mIQ.js} +429 -405
  5. package/dist/{BusinessFinancingComponent-Bs-poF2d.js → BusinessFinancingComponent-CEIG-4wN.js} +3 -3
  6. package/dist/{BusinessFinancingDropin-DoRzdS4n.js → BusinessFinancingDropin-sC3QpkDx.js} +537 -489
  7. package/dist/{BusinessFinancingPage-DSlmJmOK.js → BusinessFinancingPage-BIEuNfKE.js} +3 -3
  8. package/dist/{BusinessTypeSelectionPage-Bmi_8K2g.js → BusinessTypeSelectionPage-6sF2ce3o.js} +111 -145
  9. package/dist/{CZ-BhoS6sd6.js → CZ-BiPeoA9G.js} +11 -1
  10. package/dist/{ContractViewer-R4-gfVmp.js → ContractViewer-BOxsPeO1.js} +306 -297
  11. package/dist/{CreateIndividualComponent-D3aXuYRk.js → CreateIndividualComponent-t9eDVjpb.js} +8 -8
  12. package/dist/{CreateTransferInstrumentComponent-C-ncZ-A8.js → CreateTransferInstrumentComponent-D65FAcQz.js} +7 -7
  13. package/dist/{CustomerSupport-CMFRgQNa.js → CustomerSupport-CoLWcgoS.js} +27 -32
  14. package/dist/{DebugModal-BEmhG3UP.js → DebugModal-DkICAsiu.js} +33 -239
  15. package/dist/{DecisionMakerDetailsPage-DI2Ubmef.js → DecisionMakerDetailsPage-CvmwdHqV.js} +4 -4
  16. package/dist/DecisionMakers-DthVv8_t.js +478 -0
  17. package/dist/{EmbeddedStatus-BsZsXbKc.js → EmbeddedStatus-DdGnEZzS.js} +16 -16
  18. package/dist/FormEndState-CUYkLBgX.js +59 -0
  19. package/dist/{FormFlow-Bt-mu4Wm.js → FormFlow-CNXkXUwa.js} +19 -20
  20. package/dist/{HU-v3vOxRm8.js → HU-D8vJYkDH.js} +10 -1
  21. package/dist/{IndividualOnfidoDropin-DGMCOm9M.js → IndividualOnfidoDropin-DV2fJG5W.js} +919 -895
  22. package/dist/{Introduction-DJ6qIUPC.js → Introduction-B1WXHc-7.js} +53 -57
  23. package/dist/{ProviderButton-DAsW5EVa.js → LandingLayout-BC3pp_IY.js} +93 -86
  24. package/dist/{LegalRepresentativeDetailsPage-CyHwQR_W.js → LegalRepresentativeDetailsPage-9xm-XCto.js} +4 -4
  25. package/dist/{ManageIndividualComponent-BIMCvcr2.js → ManageIndividualComponent-zCo6mUQx.js} +9 -13
  26. package/dist/{ManageTermsOfServiceComponent-CsM23jq3.js → ManageTermsOfServiceComponent-DpQXgPYk.js} +7 -8
  27. package/dist/{ManageTransferInstrumentComponent-Vut9_bRn.js → ManageTransferInstrumentComponent-BKERoin1.js} +23 -31
  28. package/dist/{OnboardingDropinComponent-BW6er2HU.js → OnboardingDropinComponent-DYdts9Sh.js} +521 -398
  29. package/dist/{Review-DWDbL9-9.js → Review-jBq7cFVv.js} +11 -11
  30. package/dist/RootBusinessDetailsPage-BfO0Xb7n.js +1848 -0
  31. package/dist/{RootIndividualDetailsPage-DCxJ3ycQ.js → RootIndividualDetailsPage-DzmHoceW.js} +4 -4
  32. package/dist/{SignPCIComponent-kHaxhkWa.js → SignPCIComponent-By4PazmA.js} +32 -38
  33. package/dist/{SingpassSelection-Dmlbiq4Z.js → SingpassSelection-BeUj9Kdy.js} +12 -15
  34. package/dist/{SoleProprietorshipPage-Bdhs90-q.js → SoleProprietorshipPage-CZPeKEEl.js} +4 -4
  35. package/dist/{SourceOfFundsPage-Bj22DAFv.js → SourceOfFundsPage-CI1qdFId.js} +508 -488
  36. package/dist/{StoreProvider-BmzY19Td.js → StoreProvider-O9jwxfG8.js} +20832 -21372
  37. package/dist/{TaskItemStatus-CB6FEOnk.js → TaskItemStatus-s7Z3DOGa.js} +24 -24
  38. package/dist/TaskStatusIndicator-BanufME0.js +69 -0
  39. package/dist/{TaxReportingDropin-jofokkei.js → TaxReportingDropin-BQqDUn9I.js} +82 -101
  40. package/dist/{TileGroup-i5Jc08ns.js → TileGroup-tu04B8GK.js} +6 -8
  41. package/dist/{TrustDetailsPage-B6HmvYUf.js → TrustDetailsPage-BQKZ_ZyU.js} +91 -80
  42. package/dist/{TrustMemberCompanyPage-D3VJOq6a.js → TrustMemberCompanyPage-C9aFr4Bm.js} +5 -5
  43. package/dist/{TrustMemberIndividualPage-1aeOYsnG.js → TrustMemberIndividualPage-Ci7hwMA_.js} +4 -4
  44. package/dist/{UnincorporatedPartnershipIndividualPage-Bt7e6ncF.js → UnincorporatedPartnershipIndividualPage-XQsgF3ou.js} +4 -4
  45. package/dist/{UnincorporatedPartnershipMemberCompanyPage-Ck5C_SEU.js → UnincorporatedPartnershipMemberCompanyPage-DFe_N3gH.js} +4 -4
  46. package/dist/{VerificationErrorAlert-DhtKOmjt.js → VerificationErrorAlert-Ci0cObw1.js} +20 -9
  47. package/dist/{ViewVerificationStatusComponent-DtKLcCGI.js → ViewVerificationStatusComponent-_qQmZFDY.js} +22 -21
  48. package/dist/adyen-business-financing.js +8 -12
  49. package/dist/adyen-individual.js +6 -4
  50. package/dist/adyen-kyc-components.js +144 -118
  51. package/dist/adyen-manage-individual.js +2 -2
  52. package/dist/adyen-manage-terms-of-service.js +3 -3
  53. package/dist/adyen-manage-transfer-instruments.js +3 -3
  54. package/dist/adyen-onboarding.js +14 -6
  55. package/dist/adyen-terms-of-service.js +18 -6
  56. package/dist/adyen-transfer-instrument.js +10 -6
  57. package/dist/adyen-verification-status.js +2 -2
  58. package/dist/bag-DpxmyXfR.js +14 -0
  59. package/dist/bg-BG-9uVrFuHv.js +23 -0
  60. package/dist/bg-BG-BY3Wa361.js +54 -0
  61. package/dist/bg-BG-BiYtb1Tz.js +55 -0
  62. package/dist/bg-BG-BvSUDgGF.js +13 -0
  63. package/dist/bg-BG-CMomhopf.js +35 -0
  64. package/dist/bg-BG-Dy6-IwuZ.js +28 -0
  65. package/dist/bg-BG-NMIts2sa.js +35 -0
  66. package/dist/{plaintext-B39yQnOr.js → bg-BG-hFblesn-.js} +4 -6
  67. package/dist/business-lines-DboUCbXw.js +135 -0
  68. package/dist/{_plugin-vue_export-helper-CgYpM5kA.js → cs-CZ-B8IPRc47.js} +4 -8
  69. package/dist/cs-CZ-BEFeaKsV.js +54 -0
  70. package/dist/cs-CZ-Csr_35T-.js +35 -0
  71. package/dist/cs-CZ-DMzortvO.js +35 -0
  72. package/dist/cs-CZ-Dbow28-o.js +28 -0
  73. package/dist/cs-CZ-Wzc382q6.js +23 -0
  74. package/dist/cs-CZ-wdftovLe.js +55 -0
  75. package/dist/cs-CZ-y4mvq4Lv.js +13 -0
  76. package/dist/da-DK-4QAKic_C.js +55 -0
  77. package/dist/da-DK-Adj8R5Qn.js +28 -0
  78. package/dist/da-DK-BTpZzEgA.js +15 -0
  79. package/dist/da-DK-CeNMXUfE.js +23 -0
  80. package/dist/da-DK-D6UK8XT9.js +54 -0
  81. package/dist/da-DK-Dm8o1giq.js +35 -0
  82. package/dist/da-DK-q2b_1elr.js +35 -0
  83. package/dist/da-DK-qgQOVjDp.js +13 -0
  84. package/dist/de-DE-B3nctkG8.js +13 -0
  85. package/dist/de-DE-BG0tKqvi.js +28 -0
  86. package/dist/de-DE-BzumFI3T.js +55 -0
  87. package/dist/de-DE-D2ByeIZs.js +35 -0
  88. package/dist/de-DE-DMFaycio.js +35 -0
  89. package/dist/de-DE-DUl6gRKv.js +54 -0
  90. package/dist/de-DE-DjOUNvp6.js +15 -0
  91. package/dist/de-DE-JI-7mvxy.js +23 -0
  92. package/dist/de-DE-pSdsxBpQ.js +13 -0
  93. package/dist/decision-makers-group-CgddXgrx.js +1944 -0
  94. package/dist/el-GR-B5j7VZ3E.js +54 -0
  95. package/dist/el-GR-Bvjk5Sw8.js +13 -0
  96. package/dist/el-GR-CGeBAkDN.js +35 -0
  97. package/dist/el-GR-CXmTklMq.js +55 -0
  98. package/dist/el-GR-CdgLZhuO.js +13 -0
  99. package/dist/el-GR-Cu9HwD-f.js +15 -0
  100. package/dist/el-GR-DGW388LZ.js +35 -0
  101. package/dist/el-GR-DerT143K.js +28 -0
  102. package/dist/el-GR-DfNOPkLq.js +23 -0
  103. package/dist/en-US-BQpgt41j.js +37 -0
  104. package/dist/en-US-BTYdAWXp.js +15 -0
  105. package/dist/en-US-Bq2Twy6x.js +54 -0
  106. package/dist/en-US-CQ3angjM.js +22 -0
  107. package/dist/en-US-CkZcSKGh.js +35 -0
  108. package/dist/en-US-DHq7VYFs.js +23 -0
  109. package/dist/en-US-DLm6gy6T.js +58 -0
  110. package/dist/en-US-DSoLr6rp.js +13 -0
  111. package/dist/en-US-SbE0c1gn.js +36 -0
  112. package/dist/es-ES-BM4U0hT3.js +28 -0
  113. package/dist/es-ES-BRfK6tX7.js +13 -0
  114. package/dist/es-ES-BhQOdKge.js +55 -0
  115. package/dist/es-ES-Cavm0szq.js +54 -0
  116. package/dist/es-ES-Cj7q7fWO.js +15 -0
  117. package/dist/es-ES-DOVPTeyf.js +23 -0
  118. package/dist/es-ES-Dy1uR2H_.js +13 -0
  119. package/dist/es-ES-WWftn3JX.js +35 -0
  120. package/dist/es-ES-pXHx3ODy.js +35 -0
  121. package/dist/et-EE-BJIsPOnh.js +23 -0
  122. package/dist/et-EE-CFlzRBEx.js +55 -0
  123. package/dist/et-EE-D5lRJbMZ.js +35 -0
  124. package/dist/et-EE-DUWZ2Vqm.js +54 -0
  125. package/dist/et-EE-Dor3enPS.js +15 -0
  126. package/dist/et-EE-OJg_PSHf.js +28 -0
  127. package/dist/et-EE-QLVnr6Vl.js +35 -0
  128. package/dist/et-EE-d9V24rcf.js +13 -0
  129. package/dist/fi-FI-B0fnAFV2.js +13 -0
  130. package/dist/fi-FI-BJ2l42Pj.js +28 -0
  131. package/dist/fi-FI-BNcnKrJ9.js +15 -0
  132. package/dist/fi-FI-D522KHGk.js +23 -0
  133. package/dist/fi-FI-D9E_KaJi.js +35 -0
  134. package/dist/fi-FI-DT351N-G.js +35 -0
  135. package/dist/fi-FI-DVa-ccaW.js +54 -0
  136. package/dist/fi-FI-Djollt2G.js +55 -0
  137. package/dist/fr-FR-BNXXNUX_.js +35 -0
  138. package/dist/fr-FR-Bn3D6mmY.js +15 -0
  139. package/dist/fr-FR-BoKzVp2q.js +13 -0
  140. package/dist/fr-FR-CY9emHgF.js +54 -0
  141. package/dist/fr-FR-Cv0k-3Xc.js +35 -0
  142. package/dist/fr-FR-DInQKkTd.js +23 -0
  143. package/dist/fr-FR-Dk6Lw2On.js +13 -0
  144. package/dist/fr-FR-g7lmxEsI.js +28 -0
  145. package/dist/fr-FR-l36qBV3a.js +55 -0
  146. package/dist/{getFieldsWithExistingData-BW8_TEQl.js → getFieldsWithExistingData-7pZnHro-.js} +3 -4
  147. package/dist/{hasDataChanged-Mu0HyZ3E.js → hasDataChanged-v0hD-nEq.js} +4 -4
  148. package/dist/hr-HR-B8AZ4eHJ.js +35 -0
  149. package/dist/hr-HR-CDUE36Dg.js +28 -0
  150. package/dist/hr-HR-CF0AHQzi.js +13 -0
  151. package/dist/hr-HR-CNzbyo9r.js +15 -0
  152. package/dist/hr-HR-CnP5sqih.js +54 -0
  153. package/dist/hr-HR-CzSrqEFA.js +35 -0
  154. package/dist/hr-HR-DTCY4iL8.js +55 -0
  155. package/dist/hr-HR-DzS44Gpv.js +23 -0
  156. package/dist/hu-HU-BSOiZA7a.js +15 -0
  157. package/dist/hu-HU-BTlpbCpc.js +54 -0
  158. package/dist/hu-HU-Bmf13NMf.js +28 -0
  159. package/dist/hu-HU-BznXPoc2.js +55 -0
  160. package/dist/hu-HU-CSPhOvLC.js +13 -0
  161. package/dist/hu-HU-DRi6Dz9U.js +35 -0
  162. package/dist/hu-HU-xCvNM5TU.js +23 -0
  163. package/dist/hu-HU-zK6nUqWr.js +35 -0
  164. package/dist/it-IT-BEWyAQUU.js +55 -0
  165. package/dist/it-IT-BH-eqIKH.js +13 -0
  166. package/dist/it-IT-BeYbInCQ.js +35 -0
  167. package/dist/it-IT-C_fNHhjE.js +35 -0
  168. package/dist/it-IT-CjEYONJg.js +23 -0
  169. package/dist/it-IT-D7G4BaP7.js +13 -0
  170. package/dist/it-IT-DYIx7myn.js +28 -0
  171. package/dist/it-IT-DvM-9LpM.js +15 -0
  172. package/dist/it-IT-GgHc0cHR.js +54 -0
  173. package/dist/ja-JP-B3yqM_FM.js +13 -0
  174. package/dist/ja-JP-BUz3qN-V.js +23 -0
  175. package/dist/ja-JP-BhS-_dIx.js +54 -0
  176. package/dist/ja-JP-C1OQ16fo.js +35 -0
  177. package/dist/ja-JP-D7oL6xGY.js +55 -0
  178. package/dist/ja-JP-DTW_hY1L.js +13 -0
  179. package/dist/ja-JP-GXkLvnQ4.js +15 -0
  180. package/dist/ja-JP-tx1DbZYD.js +28 -0
  181. package/dist/ja-JP-weDU8GLW.js +35 -0
  182. package/dist/{localizeDateString-QtCjf8Fg.js → localizeDateString-BlZ_CtJI.js} +6 -6
  183. package/dist/lt-LT-B6CJ4ULI.js +23 -0
  184. package/dist/lt-LT-BUYY0LaT.js +35 -0
  185. package/dist/lt-LT-BxScCodJ.js +28 -0
  186. package/dist/lt-LT-DNjXmQPv.js +15 -0
  187. package/dist/lt-LT-DTQGR9M0.js +54 -0
  188. package/dist/lt-LT-De7dLXxI.js +55 -0
  189. package/dist/lt-LT-Lzl_Cbw-.js +13 -0
  190. package/dist/lt-LT-_MzAcXJo.js +35 -0
  191. package/dist/lv-LV-B9js9VoA.js +35 -0
  192. package/dist/lv-LV-BQ4F1GrV.js +54 -0
  193. package/dist/lv-LV-CRhXAjn6.js +35 -0
  194. package/dist/lv-LV-ChOoZuhc.js +15 -0
  195. package/dist/lv-LV-DTtuyfHS.js +23 -0
  196. package/dist/lv-LV-De9rdme0.js +55 -0
  197. package/dist/lv-LV-F9_Fiu3w.js +28 -0
  198. package/dist/lv-LV-y00wN1pj.js +13 -0
  199. package/dist/mail-Z_IE_hkw.js +14 -0
  200. package/dist/{mapFinancialReportsToFinancialInformation-C-2jp0wg.js → mapFinancialReportsToFinancialInformation-DrS0xN6i.js} +19 -12
  201. package/dist/minus-circle-filled-BGKeHaxJ.js +17 -0
  202. package/dist/nl-NL-BHqiO21q.js +15 -0
  203. package/dist/nl-NL-CFzm75Jw.js +13 -0
  204. package/dist/nl-NL-CUcML482.js +54 -0
  205. package/dist/nl-NL-Cht7cSwD.js +28 -0
  206. package/dist/nl-NL-DLedC3mO.js +35 -0
  207. package/dist/nl-NL-Dbx0ZmI7.js +35 -0
  208. package/dist/nl-NL-DmnFXAQC.js +13 -0
  209. package/dist/nl-NL-Zcq0bXd-.js +23 -0
  210. package/dist/nl-NL-lZcJhRsP.js +55 -0
  211. package/dist/no-NO-BBCvsecq.js +54 -0
  212. package/dist/no-NO-BEIyAMmZ.js +55 -0
  213. package/dist/no-NO-BQAqVzF4.js +28 -0
  214. package/dist/no-NO-BxReX6oF.js +23 -0
  215. package/dist/no-NO-C0sfkp82.js +35 -0
  216. package/dist/no-NO-CKT9kLAH.js +15 -0
  217. package/dist/no-NO-CpVal4cV.js +35 -0
  218. package/dist/no-NO-DbvFfP96.js +13 -0
  219. package/dist/pay-by-link-plane-Pv7Babgn.js +22 -0
  220. package/dist/pl-PL--mmxopYA.js +13 -0
  221. package/dist/pl-PL-1ylK-_FE.js +35 -0
  222. package/dist/pl-PL-CqxMKpBm.js +28 -0
  223. package/dist/pl-PL-D6heiKsH.js +15 -0
  224. package/dist/pl-PL-DAPGaxWi.js +35 -0
  225. package/dist/pl-PL-DD3wVcKc.js +55 -0
  226. package/dist/pl-PL-T6uD5--R.js +23 -0
  227. package/dist/pl-PL-kGaeUP-w.js +54 -0
  228. package/dist/plus-circle-filled-Cnf1oJTm.js +17 -0
  229. package/dist/pt-PT-BVzXBFp7.js +13 -0
  230. package/dist/pt-PT-BY9rcwcF.js +35 -0
  231. package/dist/pt-PT-BkvMsoK4.js +35 -0
  232. package/dist/pt-PT-BsDCHbWN.js +55 -0
  233. package/dist/pt-PT-CBbmkr_J.js +28 -0
  234. package/dist/pt-PT-D2elvnDU.js +15 -0
  235. package/dist/pt-PT-DpDxAynk.js +13 -0
  236. package/dist/pt-PT-JVqqgvPs.js +54 -0
  237. package/dist/pt-PT-N0njcfLO.js +23 -0
  238. package/dist/{resolveEnvironment-Dx0BPNMa.js → resolveEnvironment-DvSgDDo8.js} +3 -3
  239. package/dist/ro-RO-C83h2zHZ.js +54 -0
  240. package/dist/ro-RO-CUg8-CQ8.js +55 -0
  241. package/dist/ro-RO-Cdmevo9A.js +13 -0
  242. package/dist/ro-RO-DJLWmWZ4.js +35 -0
  243. package/dist/ro-RO-DL9V1CMj.js +15 -0
  244. package/dist/ro-RO-Dfx0g3bU.js +35 -0
  245. package/dist/ro-RO-IY3AMhwm.js +28 -0
  246. package/dist/ro-RO-Ic1SzBgx.js +23 -0
  247. package/dist/ru-RU-FZb2upqh.js +13 -0
  248. package/dist/{rules-CUANHpja.js → rules-Meybz2dk.js} +45 -72
  249. package/dist/sk-SK-B7o3L57C.js +35 -0
  250. package/dist/sk-SK-BDKRZ2mM.js +28 -0
  251. package/dist/sk-SK-BSioQTMW.js +15 -0
  252. package/dist/sk-SK-CgLJIuJw.js +54 -0
  253. package/dist/sk-SK-CiD0FeLN.js +23 -0
  254. package/dist/sk-SK-Cjrkrb85.js +55 -0
  255. package/dist/sk-SK-iO863_t2.js +35 -0
  256. package/dist/sk-SK-nfeuTcY5.js +13 -0
  257. package/dist/sl-SI-BB0suyr1.js +28 -0
  258. package/dist/sl-SI-BE_ndzZ2.js +55 -0
  259. package/dist/sl-SI-BylvpF-X.js +15 -0
  260. package/dist/sl-SI-BzeVaC1Z.js +54 -0
  261. package/dist/sl-SI-C8CMAkD0.js +35 -0
  262. package/dist/sl-SI-Cth2Qa5T.js +35 -0
  263. package/dist/sl-SI-DUTZDqkP.js +13 -0
  264. package/dist/sl-SI-MZoDApq9.js +23 -0
  265. package/dist/solution-payments-DTAuLSWF.js +14 -0
  266. package/dist/style.css +1018 -1144
  267. package/dist/styles-CLV89_hH.js +1018 -1144
  268. package/dist/sv-SE-BTx2XKAp.js +13 -0
  269. package/dist/sv-SE-BryiIPVv.js +55 -0
  270. package/dist/sv-SE-Bwh0wKFk.js +35 -0
  271. package/dist/sv-SE-CVmo11gI.js +54 -0
  272. package/dist/sv-SE-DCFSf4Oj.js +23 -0
  273. package/dist/sv-SE-DYruQSzt.js +28 -0
  274. package/dist/sv-SE-Dwz1yTrB.js +15 -0
  275. package/dist/sv-SE-OPOHtqtP.js +35 -0
  276. package/dist/sv-SE-rckxD-43.js +13 -0
  277. package/dist/terminal-1-ewywjFJI.js +18 -0
  278. package/dist/types/api/companySelection/useCompanySelection.d.ts +18 -1
  279. package/dist/types/api/configurations/useScenarios.d.ts +6 -6
  280. package/dist/types/api/idNowProvider/idNowProvider.types.d.ts +1 -2
  281. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +4 -8
  282. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirements.d.ts +2 -3
  283. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +26 -24
  284. package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/types.d.ts +10 -10
  285. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -2
  286. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +0 -306
  287. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +1 -1
  288. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformationMultiform.d.ts +9 -0
  289. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +2 -1
  290. package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +10 -0
  291. package/dist/types/components/Business/forms/BasicInformation/types.d.ts +4 -3
  292. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +15 -3
  293. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +5 -3
  294. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +3 -2
  295. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelectionMultiform.d.ts +14 -0
  296. package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +3 -0
  297. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructureMultiform.d.ts +4 -0
  298. package/dist/types/components/Business/forms/forms.types.d.ts +14 -0
  299. package/dist/types/components/Business/forms/rules.d.ts +27 -8
  300. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +2 -1
  301. package/dist/types/components/Business/mapping/businessDetails/mapOrganizationTypeToCompanyType.d.ts +1 -1
  302. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsFormConfig.d.ts +1 -2
  303. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +5 -3
  304. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +4 -3
  305. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +0 -3
  306. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiform.d.ts +18 -0
  307. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiformDropin.d.ts +5 -0
  308. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/types.d.ts +2 -0
  309. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +21 -0
  310. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/validate.d.ts +22 -0
  311. package/dist/types/components/Business/utils/companyTypeMetadata.d.ts +1 -1
  312. package/dist/types/components/Business/utils/companyUtil.d.ts +3 -3
  313. package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +5 -0
  314. package/dist/types/components/BusinessLines/tasks/BusinessLinesDropin.d.ts +5 -0
  315. package/dist/types/components/BusinessLines/tasks/BusinessLinesGettingStarted/BusinessLinesGettingStarted.d.ts +6 -0
  316. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +2 -2
  317. package/dist/types/components/EFP/fields/LegalFormField/types.d.ts +4 -2
  318. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +36 -336
  319. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +0 -1
  320. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +1 -0
  321. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -19
  322. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +5 -4
  323. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +1 -0
  324. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/SOFFinancierModal.d.ts +1 -2
  325. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +2 -2
  326. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +2 -1
  327. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types.d.ts +3 -3
  328. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/useNavigation.d.ts +5 -5
  329. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/ViewVerificationStatusComponent.d.ts +1 -1
  330. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/content.d.ts +1 -1
  331. package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +6 -0
  332. package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +2 -2
  333. package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +0 -2
  334. package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +2 -2
  335. package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +2 -2
  336. package/dist/types/components/Individual/forms/Individual/ProofOfRelationship/types.d.ts +8 -8
  337. package/dist/types/components/Individual/forms/Individual/ProofOfResidency/types.d.ts +18 -18
  338. package/dist/types/components/Individual/forms/Individual/rules.d.ts +1 -1
  339. package/dist/types/components/Individual/forms/Individual/types.d.ts +2 -2
  340. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.d.ts +1 -2
  341. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +3 -2
  342. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +2 -2
  343. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +2 -2
  344. package/dist/types/components/Individual/forms/IndividualOnfido/GuidanceQuestion/GuidanceQuestion.d.ts +7 -3
  345. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -1
  346. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +3 -1
  347. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +2 -2
  348. package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +2 -2
  349. package/dist/types/components/Individual/helpers/roleUtils.d.ts +1 -1
  350. package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +3 -3
  351. package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +3 -0
  352. package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +3 -0
  353. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +1 -1
  354. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.d.ts +2 -0
  355. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +7 -0
  356. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersGettingStarted.d.ts +5 -0
  357. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersModalContent.d.ts +1 -0
  358. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +6 -0
  359. package/dist/types/components/Shared/EntityGuidanceStatus/types.d.ts +4 -4
  360. package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +1 -1
  361. package/dist/types/components/Shared/FormNavigation/FormNavigationItem.d.ts +1 -2
  362. package/dist/types/components/Shared/Introduction/Introduction.d.ts +2 -2
  363. package/dist/types/components/Shared/Introduction/IntroductionScreen.d.ts +2 -2
  364. package/dist/types/components/Shared/Introduction/constants.d.ts +3 -3
  365. package/dist/types/components/Shared/Introduction/copy.d.ts +8 -7
  366. package/dist/types/components/Shared/Introduction/types.d.ts +11 -11
  367. package/dist/types/components/Shared/SingpassBanner/SingpassBanner.d.ts +1 -1
  368. package/dist/types/components/Shared/Summary/Summary.d.ts +0 -1
  369. package/dist/types/components/Shared/devex/DebugListener/DebugModal.d.ts +0 -1
  370. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
  371. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +1 -1
  372. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +5 -7
  373. package/dist/types/components/Shared/fields/CountryField/types.d.ts +1 -1
  374. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
  375. package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
  376. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -3
  377. package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +1 -1
  378. package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
  379. package/dist/types/components/Shared/fields/FinancialReportingDate/types.d.ts +1 -1
  380. package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +2 -2
  381. package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +2 -2
  382. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +27 -27
  383. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultRegistrationNumberType.d.ts +16 -0
  384. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultTaxIdNumberType.d.ts +2 -2
  385. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultVatNumberType.d.ts +13 -0
  386. package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferTaxIdNumberType.d.ts +2 -2
  387. package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -2
  388. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +1 -1
  389. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +12 -0
  390. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/types.d.ts +5 -0
  391. package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
  392. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -2
  393. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +1 -1
  394. package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
  395. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  396. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  397. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  398. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -2
  399. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +8 -6
  400. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +3 -7
  401. package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
  402. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +2 -4
  403. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  404. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +2 -2
  405. package/dist/types/components/Shared/forms/ConstitutionalDocument/types.d.ts +11 -10
  406. package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
  407. package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
  408. package/dist/types/components/Shared/forms/FinancialInformation/types.d.ts +4 -1
  409. package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +7 -5
  410. package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +1 -2
  411. package/dist/types/components/Shared/tasks/TaskList/TaskListItem.d.ts +1 -1
  412. package/dist/types/components/Shared/tasks/TaskList/types.d.ts +3 -4
  413. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -2
  414. package/dist/types/components/Trust/forms/Trust/rules.d.ts +1 -0
  415. package/dist/types/components/Trust/forms/Trust/types.d.ts +1 -1
  416. package/dist/types/components/Trust/forms/TrustRegistrationDetails/types.d.ts +2 -2
  417. package/dist/types/components/Trust/forms/TrustRoleAndEntityType/types.d.ts +1 -2
  418. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +3 -3
  419. package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -1
  420. package/dist/types/components/Trust/tasks/TrustMembers/CompanyTrustMemberTaskItem.d.ts +1 -1
  421. package/dist/types/components/Trust/tasks/TrustMembers/ExemptSettlorTaskItem.d.ts +1 -1
  422. package/dist/types/components/Trust/tasks/TrustMembers/RegularTrustMemberTaskItem.d.ts +1 -1
  423. package/dist/types/components/Trust/tasks/TrustMembers/RootTrusteeTaskItem.d.ts +1 -1
  424. package/dist/types/components/Trust/tasks/TrustMembers/types.d.ts +6 -6
  425. package/dist/types/components/Trust/utils/trustMemberGuidance.d.ts +7 -6
  426. package/dist/types/components/Trust/utils/trustMemberRequirements.d.ts +1 -1
  427. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +6 -6
  428. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/types.d.ts +5 -5
  429. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRadioGroup.d.ts +4 -5
  430. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRoleAndType.d.ts +1 -2
  431. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/types.d.ts +2 -2
  432. package/dist/types/components/ui/atoms/Accordion/Accordion.d.ts +1 -2
  433. package/dist/types/components/ui/atoms/Button/Button.d.ts +2 -3
  434. package/dist/types/components/ui/atoms/Button/Button.types.d.ts +3 -3
  435. package/dist/types/components/ui/atoms/Field/Field.d.ts +3 -6
  436. package/dist/types/components/ui/atoms/Field/Field.types.d.ts +9 -12
  437. package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +4 -6
  438. package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +4 -4
  439. package/dist/types/components/ui/atoms/List/List.d.ts +12 -0
  440. package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +16 -0
  441. package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
  442. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +3 -3
  443. package/dist/types/components/ui/atoms/Remove/Remove.d.ts +1 -2
  444. package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -2
  445. package/dist/types/components/ui/atoms/Select/Select.types.d.ts +1 -0
  446. package/dist/types/components/ui/atoms/SelectButton/SelectButton.d.ts +1 -2
  447. package/dist/types/components/ui/atoms/SelectButton/SelectButton.types.d.ts +3 -4
  448. package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -2
  449. package/dist/types/components/ui/atoms/SelectList/SelectList.types.d.ts +2 -2
  450. package/dist/types/components/ui/atoms/SelectListItem/SelectListItem.types.d.ts +3 -3
  451. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +18 -0
  452. package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +1 -1
  453. package/dist/types/components/ui/atoms/TextArea/TextArea.d.ts +1 -2
  454. package/dist/types/components/ui/atoms/Tile/Tile.d.ts +1 -2
  455. package/dist/types/components/ui/layout/LandingLayout/LandingLayout.d.ts +11 -0
  456. package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +8 -0
  457. package/dist/types/components/ui/molecules/Alert/VerificationErrorAlert.d.ts +1 -1
  458. package/dist/types/components/ui/molecules/Alert/types.d.ts +1 -0
  459. package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -2
  460. package/dist/types/components/ui/molecules/Card/types.d.ts +3 -3
  461. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +2 -2
  462. package/dist/types/components/ui/molecules/Dropzone/Dropzone.d.ts +1 -2
  463. package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -4
  464. package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +3 -3
  465. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +4 -4
  466. package/dist/types/components/ui/molecules/FormEndState/FormEndState.d.ts +0 -1
  467. package/dist/types/components/ui/molecules/InputCurrency/InputCurrency.d.ts +1 -2
  468. package/dist/types/components/ui/molecules/InputDate/InputDate.d.ts +3 -3
  469. package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +2 -2
  470. package/dist/types/constants/keys.d.ts +2 -0
  471. package/dist/types/context/ExperimentContext/types.d.ts +52 -36
  472. package/dist/types/context/SettingsContext/types.d.ts +24 -24
  473. package/dist/types/core/EmbedShell/EmbedShell.d.ts +1 -0
  474. package/dist/types/core/UIElement/UIElement.d.ts +1 -0
  475. package/dist/types/core/models/api/company-types-value.d.ts +12 -11
  476. package/dist/types/core/models/api/decision-maker-type.d.ts +7 -6
  477. package/dist/types/core/models/api/entity-type.d.ts +5 -4
  478. package/dist/types/core/models/api/financialReport.d.ts +2 -2
  479. package/dist/types/core/models/api/get-scenarios.d.ts +18 -18
  480. package/dist/types/core/models/api/individual.d.ts +1 -0
  481. package/dist/types/core/models/api/legal-arrangement.d.ts +10 -2
  482. package/dist/types/core/models/api/legal-entity-association.d.ts +2 -2
  483. package/dist/types/core/models/api/legal-entity-type.d.ts +8 -7
  484. package/dist/types/core/models/api/organization.d.ts +8 -0
  485. package/dist/types/core/models/api/trust-member-type.d.ts +8 -8
  486. package/dist/types/core/models/api/trusted-fields-provider.d.ts +5 -4
  487. package/dist/types/core/models/api/unincorporated-partnership.d.ts +6 -6
  488. package/dist/types/core/models/api/verification-error.d.ts +8 -7
  489. package/dist/types/core/models/api/verification-status.d.ts +7 -6
  490. package/dist/types/core/models/api/view-verification-status.d.ts +8 -7
  491. package/dist/types/core/user-events.d.ts +1 -1
  492. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +1 -1
  493. package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +6 -1
  494. package/dist/types/embeds/individual/adyen-individual.types.d.ts +6 -1
  495. package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +1 -0
  496. package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +4 -1
  497. package/dist/types/embeds/terms-of-service/adyen-terms-of-service.types.d.ts +7 -1
  498. package/dist/types/embeds/transfer-instrument/AdyenTransferInstrument.d.ts +2 -1
  499. package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +7 -2
  500. package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +4 -4
  501. package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +7 -6
  502. package/dist/types/hooks/useBusinessSetup.d.ts +11 -10
  503. package/dist/types/hooks/useDataMissingRemediations.d.ts +2 -2
  504. package/dist/types/hooks/useForm/types.d.ts +0 -2
  505. package/dist/types/hooks/useFormComposer.d.ts +1 -1
  506. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +31 -0
  507. package/dist/types/hooks/useLegalEntityType.d.ts +1 -1
  508. package/dist/types/hooks/useMultiForm/types.d.ts +38 -36
  509. package/dist/types/hooks/useMultiForm/useMultiForm.d.ts +1 -1
  510. package/dist/types/hooks/useScenarioConfiguration.d.ts +2 -2
  511. package/dist/types/language/Language.d.ts +1 -7
  512. package/dist/types/language/i18n.d.ts +2 -0
  513. package/dist/types/language/types.d.ts +5 -0
  514. package/dist/types/language/utils.d.ts +11 -2
  515. package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +2 -2
  516. package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +2 -2
  517. package/dist/types/stores/globalStore/get-task-status.d.ts +2 -2
  518. package/dist/types/stores/globalStore/globalStore.d.ts +7 -7
  519. package/dist/types/stores/globalStore/taskStatus.d.ts +17 -16
  520. package/dist/types/stores/globalStore/taskTypes.d.ts +37 -35
  521. package/dist/types/types/datasets/country-code.d.ts +249 -249
  522. package/dist/types/types/datasets/currency.d.ts +25 -25
  523. package/dist/types/types/datasets/province-code.d.ts +46 -46
  524. package/dist/types/types/datasets/state-code.d.ts +84 -84
  525. package/dist/types/types/errors/entity-problems.d.ts +3 -4
  526. package/dist/types/types/form-rules.d.ts +2 -2
  527. package/dist/types/utils/api/processValidationErrors.d.ts +2 -2
  528. package/dist/types/utils/birthDateUtils.d.ts +3 -3
  529. package/dist/types/utils/decisionMaker.d.ts +4 -3
  530. package/dist/types/utils/decisionMakerRoles.d.ts +4 -3
  531. package/dist/types/utils/entityAssociationUtil.d.ts +4 -5
  532. package/dist/types/utils/entityStatusUtil.d.ts +3 -3
  533. package/dist/types/utils/eventHandlers/handleKeys.d.ts +2 -2
  534. package/dist/types/utils/formUtils.d.ts +2 -2
  535. package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
  536. package/dist/types/utils/getName.d.ts +2 -2
  537. package/dist/types/utils/makeSelectItemForRole.d.ts +2 -2
  538. package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +1 -0
  539. package/dist/types/utils/regex/patternValidators.d.ts +3 -0
  540. package/dist/types/utils/roleMetadata.d.ts +3 -3
  541. package/dist/types/utils/simulateTextChangeFromKeyboardEvent.d.ts +2 -2
  542. package/dist/types/utils/translation.d.ts +40 -0
  543. package/dist/types/utils/urlUtils.d.ts +1 -0
  544. package/dist/types/utils/validatorUtils.d.ts +2 -0
  545. package/dist/{useMultiForm-Bwx2nVhh.js → useMultiForm-BQmE_nfY.js} +158 -135
  546. package/dist/{useOnboardingStatus-Cwba-HzS.js → useOnboardingStatus-DJdV6bAG.js} +2 -2
  547. package/dist/{useTermsOfServiceStatus-C-i9mF4m.js → useTermsOfServiceStatus-BX4GiDbz.js} +2 -2
  548. package/dist/{useUpdateLegalEntity-xQlAqIqy.js → useUpdateLegalEntity-BfnvHQJj.js} +2 -2
  549. package/dist/{utils-DXv7uAh6.js → utils-1zLleVnu.js} +30 -23
  550. package/dist/{validate-CuwYJGc9.js → validate-BweJRQFE.js} +9 -3
  551. package/dist/{validate-BN5p-GhK.js → validate-Cy6vBhF2.js} +2 -2
  552. package/dist/view-verification-status-VFcBydkR.js +21 -0
  553. package/dist/zh-CN-wUb4MmTZ.js +13 -0
  554. package/dist/zh-TW-DNTXHLKa.js +13 -0
  555. package/package.json +28 -52
  556. package/dist/DecisionMakers-BKhtcs_K.js +0 -222
  557. package/dist/FormEndState-C3HCmXcw.js +0 -32
  558. package/dist/ManagePCIComponent-Blj60xLa.js +0 -33
  559. package/dist/RootBusinessDetailsPage-BTYIldSf.js +0 -42
  560. package/dist/SourceOfFunds.module-xwHIboir.js +0 -128
  561. package/dist/adyen-manage-pci.js +0 -48
  562. package/dist/adyen-sign-pci.js +0 -62
  563. package/dist/adyen-terms-of-service.vue_vue_type_script_lang-BD4hndWg.js +0 -42
  564. package/dist/adyen-transfer-instrument.vue_vue_type_script_lang-BE-ro1iH.js +0 -53
  565. package/dist/bg-BG-COTwZXwN.js +0 -2040
  566. package/dist/cs-CZ-DUlgJKVq.js +0 -2040
  567. package/dist/css-CQUoQdd2.js +0 -24
  568. package/dist/da-DK-BDzDHhVR.js +0 -2040
  569. package/dist/de-DE-B3TpRjZX.js +0 -994
  570. package/dist/de-DE-DJdgXqS_.js +0 -2040
  571. package/dist/el-GR-CFEuLvxK.js +0 -994
  572. package/dist/el-GR-D5i9BNyh.js +0 -2040
  573. package/dist/en-US-ghR-1_C2.js +0 -994
  574. package/dist/es-ES-BtWn2FOQ.js +0 -994
  575. package/dist/es-ES-VOSWszW5.js +0 -2040
  576. package/dist/et-EE-Bp4Ngsn4.js +0 -2040
  577. package/dist/fi-FI-DaujOE-a.js +0 -2040
  578. package/dist/fr-FR-BdPZxk11.js +0 -2040
  579. package/dist/fr-FR-HvIkGqJf.js +0 -994
  580. package/dist/hr-HR-BY7C7NxY.js +0 -2040
  581. package/dist/hu-HU-DHCty-Tc.js +0 -2040
  582. package/dist/it-IT-BMsuhZEQ.js +0 -2040
  583. package/dist/it-IT-CjbZahlB.js +0 -994
  584. package/dist/ja-JP-4jufT0xh.js +0 -994
  585. package/dist/ja-JP-BYDz1z2G.js +0 -2040
  586. package/dist/json-DWikzB4g.js +0 -31
  587. package/dist/lt-LT-DNJ9V9xV.js +0 -2040
  588. package/dist/lv-LV-CFJwN5wq.js +0 -2040
  589. package/dist/nl-NL-B3xjfpMi.js +0 -994
  590. package/dist/nl-NL-DibAf790.js +0 -2040
  591. package/dist/no-NO-DHCy5rXx.js +0 -2040
  592. package/dist/pl-PL-eZBNH5HH.js +0 -2040
  593. package/dist/preact/adyen-individual.js +0 -15
  594. package/dist/preact/adyen-manage-individual.js +0 -15
  595. package/dist/preact/adyen-terms-of-service.js +0 -16
  596. package/dist/preact/adyen-transfer-instrument.js +0 -16
  597. package/dist/pt-PT-BpYDD-PX.js +0 -994
  598. package/dist/pt-PT-CiN_Wmfe.js +0 -2040
  599. package/dist/ro-RO-CgyMTvLc.js +0 -2040
  600. package/dist/ru-RU-BlgIj-Q4.js +0 -994
  601. package/dist/sk-SK-B5qlQB_U.js +0 -2040
  602. package/dist/sl-SI-8PPfrGzL.js +0 -2040
  603. package/dist/sv-SE-7lcf_fB9.js +0 -994
  604. package/dist/sv-SE-ZWLw6D3j.js +0 -2040
  605. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationDisclaimer/IdVerificationDisclaimer.d.ts +0 -1
  606. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationHeader/IdVerificationHeader.d.ts +0 -1
  607. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/RichText.d.ts +0 -5
  608. package/dist/types/embeds/individual/AdyenIndividualPreact.d.ts +0 -3
  609. package/dist/types/embeds/manage-individual/AdyenManageIndividualPreact.d.ts +0 -3
  610. package/dist/types/embeds/manage-pci/AdyenManagePci.d.ts +0 -12
  611. package/dist/types/embeds/manage-pci/adyen-manage-pci.d.ts +0 -1
  612. package/dist/types/embeds/manage-pci/adyen-manage-pci.types.d.ts +0 -39
  613. package/dist/types/embeds/sign-pci/AdyenSignPci.d.ts +0 -15
  614. package/dist/types/embeds/sign-pci/adyen-sign-pci.d.ts +0 -1
  615. package/dist/types/embeds/sign-pci/adyen-sign-pci.types.d.ts +0 -43
  616. package/dist/types/embeds/terms-of-service/AdyenTermsOfServicePreact.d.ts +0 -3
  617. package/dist/types/embeds/transfer-instrument/AdyenTransferInstrumentPreact.d.ts +0 -3
  618. package/dist/types/utils/sanitizeHtml.d.ts +0 -3
  619. package/dist/types/utils/useStateFromProp.d.ts +0 -9
  620. package/dist/useSalesChannelsSettings-BLzegVJh.js +0 -51
  621. package/dist/view-verification-status-DTkA8PtO.js +0 -20
  622. package/dist/vue/adyen-individual.js +0 -53
  623. package/dist/vue/adyen-manage-individual.js +0 -56
  624. package/dist/vue/adyen-terms-of-service.js +0 -28
  625. package/dist/vue/adyen-transfer-instrument.js +0 -30
  626. package/dist/yaml-jFdy-qnY.js +0 -22
  627. package/dist/zh-CN-xYZH718R.js +0 -994
  628. package/dist/zh-TW-DqBBNurv.js +0 -994
@@ -2,26 +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] = "e2cdc12a-d741-4f4f-a432-dd45c7e5c993", e._sentryDebugIdIdentifier = "sentry-dbid-e2cdc12a-d741-4f4f-a432-dd45c7e5c993");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a68441b5-c9eb-4c1e-967a-39218aca12bb", e._sentryDebugIdIdentifier = "sentry-dbid-a68441b5-c9eb-4c1e-967a-39218aca12bb");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { p as useApiContext, q as useQuery, r as httpGet, be as useInvalidateRootLegalEntity, bf as useMutation, bh as httpPost, bS as formatObject, y as LegalEntityType, C as Typography, ew as Currencies, b as useI18nContext, az as Field, ex as InputGroup, bK as Select, bq as InputText, bW as InputDate, aD as TextArea, aV as RadioGroup, aF as CountryField, b2 as Modal, B as Alert, Z as Button, b8 as Confirm, ap as isEmpty, au as useForm, ey as useGlobalDataSlice, ax as ErrorPanel, ay as createFormUtils, L as Loader, a3 as Icon, bM as getFormProps, a0 as Card, b5 as StructuredList, _ as IconButton, bN as isEmpty$1, bm as Svg, a5 as useToastContext, X as createLogger, ez as Dropzone, cv as createDocumentRequest, bn as useQueryClient, a as useLegalEntity, R as ROOT_LE, ec as useStateContext, $ as useAnalyticsContext, eA as useLegalEntities, cH as getPropsFromConfigurations, bO as getRequiredForms, bP as addValidityToForms, bQ as useFormComposer, cz as documentApiUtils, ei as FormWrapper, ab as useCapabilityProblems, bi as getProblemsForEntity, U as EntityType, g as getLegalEntityCountry } from "./StoreProvider-BmzY19Td.js";
11
+ import { a as useApiContext, r as useQuery, x as httpGet, bo as useInvalidateRootLegalEntity, bp as useMutation, t as httpPost, bA as formatObject, O as LegalEntityTypes, N as Typography, fy as Currencies, u as useI18nContext, aD as Field, fz as InputGroup, bu as Select, bE as InputText, bJ as InputDate, aH as TextArea, a_ as RadioGroup, aJ as CountryField, bc as Modal, K as Alert, G as Button, bi as Confirm, at as isEmpty, c as useTranslation, ay as useForm, fA as useGlobalDataSlice, aB as ErrorPanel, aC as createFormUtils, L as Loader, a7 as Icon, dq as getFormProps, a4 as Card, bf as StructuredList, a2 as IconButton, dh as isEmpty$1, H as Svg, a9 as useToastContext, a0 as createLogger, fB as Dropzone, cl as createDocumentRequest, br as useQueryClient, d as useLegalEntity, R as ROOT_LE, ff as useStateContext, a3 as useAnalyticsContext, fC as useLegalEntities, cy as getPropsFromConfigurations, bQ as getRequiredForms, bR as addValidityToForms, bS as useFormComposer, cp as documentApiUtils, fk as FormWrapper, af as useCapabilityProblems, b5 as getProblemsForEntity, Z as EntityTypes, g as getLegalEntityCountry } from "./StoreProvider-O9jwxfG8.js";
12
12
  import { useState, useMemo, useEffect, useCallback, useRef } from "preact/hooks";
13
- import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-xQlAqIqy.js";
14
- import { h as hasDataChanged } from "./hasDataChanged-Mu0HyZ3E.js";
13
+ import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-BfnvHQJj.js";
14
+ import { h as hasDataChanged } from "./hasDataChanged-v0hD-nEq.js";
15
15
  import { signal } from "@preact/signals";
16
- import { s as styles, T as TaskStatusIndicator } from "./SourceOfFunds.module-xwHIboir.js";
17
16
  import { a as formatAmountWithCurrency } from "./formatCurrency-CMOSdJMB.js";
18
- import { l as localizeDateString } from "./localizeDateString-QtCjf8Fg.js";
17
+ import { l as localizeDateString } from "./localizeDateString-BlZ_CtJI.js";
19
18
  import { t as toCapitalized } from "./toCapitalized-Bq7laD0b.js";
20
- import { A as Avatar } from "./Avatar-NEiNEcRx.js";
21
- import isURL from "validator/es/lib/isURL.js";
22
- import { v as validateDateNotInTheFuture } from "./validate-CuwYJGc9.js";
23
- import { T as TileGroup } from "./TileGroup-i5Jc08ns.js";
24
- import { n as normalizedTaskStatusStore } from "./OnboardingDropinComponent-BW6er2HU.js";
19
+ import { A as Avatar } from "./Avatar-BfRRf9_a.js";
20
+ import { v as validateDateNotInTheFuture } from "./validate-BweJRQFE.js";
21
+ import { T as TileGroup } from "./TileGroup-tu04B8GK.js";
22
+ import { T as TaskStatusIndicator } from "./TaskStatusIndicator-BanufME0.js";
23
+ import { L as LandingLayout } from "./LandingLayout-BC3pp_IY.js";
24
+ import { n as normalizedTaskStatusStore } from "./OnboardingDropinComponent-DYdts9Sh.js";
25
25
  const getBusinessLines = async (legalEntityId, baseUrl) => {
26
26
  return httpGet({
27
27
  baseUrl,
@@ -99,6 +99,62 @@ const useSourceOfFundsTypes = (options) => {
99
99
  ...options
100
100
  });
101
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
+ };
102
158
  const additionalDataSchemaKeys = [
103
159
  "description",
104
160
  "dateOfFundsReceived",
@@ -204,54 +260,52 @@ const getServiceTranslationKey = (service) => {
204
260
  };
205
261
  const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
206
262
  const details = [];
207
- sourceOfFundsType == null ? void 0 : sourceOfFundsType.forEach((type) => {
208
- var _a, _b, _c;
263
+ sourceOfFundsType?.forEach((type) => {
209
264
  switch (type) {
210
265
  case "amount":
211
266
  details.push({
212
267
  term: i18n.get("amount"),
213
- 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) : ""
214
269
  });
215
270
  break;
216
271
  case "description":
217
272
  details.push({
218
273
  term: i18n.get("description"),
219
- details: (data == null ? void 0 : data.description) || ""
274
+ details: data?.description || ""
220
275
  });
221
276
  break;
222
277
  case "dateOfFundsReceived":
223
278
  details.push({
224
279
  term: i18n.get("date"),
225
- details: localizeDateString((data == null ? void 0 : data.dateOfFundsReceived) || "", i18n.locale)
280
+ details: localizeDateString(data?.dateOfFundsReceived || "", i18n.locale)
226
281
  });
227
282
  break;
228
283
  case "purpose":
229
284
  details.push({
230
285
  term: i18n.get("reason"),
231
- details: (data == null ? void 0 : data.purpose) || ""
286
+ details: data?.purpose || ""
232
287
  });
233
288
  break;
234
289
  case "relationship":
235
- details.push({ term: i18n.get("relationship"), details: (data == null ? void 0 : data.relationship) || "" });
290
+ details.push({ term: i18n.get("relationship"), details: data?.relationship || "" });
236
291
  break;
237
292
  case "originatorLegalEntityId":
238
293
  details.push({
239
294
  term: i18n.get("benefactorDetails"),
240
295
  details: [
241
- (data == null ? void 0 : data.legalName) ? `${data == null ? void 0 : data.legalName}` : `${data == null ? void 0 : data.firstName} ${data == null ? void 0 : data.lastName}`,
242
- /* @__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")
243
298
  ]
244
299
  });
245
300
  break;
246
301
  case "financiers":
247
- (_c = data == null ? void 0 : data.financiers) == null ? void 0 : _c.map((financier) => {
248
- var _a2, _b2;
302
+ data?.financiers?.map((financier) => {
249
303
  return details.push({
250
304
  term: i18n.get("investor"),
251
305
  details: [
252
- `${financier == null ? void 0 : financier.firstName} ${financier == null ? void 0 : financier.lastName}`,
253
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: (financier == null ? void 0 : financier.location) || "" }, "location"),
254
- /* @__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(
255
309
  financier.amount.value,
256
310
  financier.amount.currency
257
311
  ) || "" : "" }, "value")
@@ -262,19 +316,19 @@ const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
262
316
  case "cryptocurrencyExchange":
263
317
  details.push({
264
318
  term: i18n.get("cryptocurrencyExchange"),
265
- details: (data == null ? void 0 : data.cryptocurrencyExchange) || ""
319
+ details: data?.cryptocurrencyExchange || ""
266
320
  });
267
321
  break;
268
322
  case "dateOfSourceEvent":
269
323
  details.push({
270
324
  term: i18n.get("dateOfSourceEvent"),
271
- details: localizeDateString((data == null ? void 0 : data.dateOfSourceEvent) || "", i18n.locale)
325
+ details: localizeDateString(data?.dateOfSourceEvent || "", i18n.locale)
272
326
  });
273
327
  break;
274
328
  case "website":
275
329
  details.push({
276
330
  term: i18n.get("website"),
277
- details: (data == null ? void 0 : data.website) || ""
331
+ details: data?.website || ""
278
332
  });
279
333
  break;
280
334
  }
@@ -309,7 +363,7 @@ const typesRequiringAdditionalData = [
309
363
  const getSourceOfFundsRequiredForms = (data) => {
310
364
  return Object.fromEntries(
311
365
  Object.entries(sourceOfFundsForms).filter(([form]) => {
312
- if (!(data == null ? void 0 : data.type) || !typesRequiringAdditionalData.includes(data == null ? void 0 : data.type))
366
+ if (!data?.type || !typesRequiringAdditionalData.includes(data?.type))
313
367
  return form !== sourceOfFundsForms.additionalData.formId;
314
368
  return form;
315
369
  })
@@ -321,7 +375,6 @@ const getInputErrors = ({
321
375
  key,
322
376
  value
323
377
  }) => {
324
- var _a, _b, _c, _d;
325
378
  const isEmpty2 = value === "" || value === null || value === void 0;
326
379
  let errors = { ...formErrors };
327
380
  if (isEmpty2) {
@@ -330,15 +383,15 @@ const getInputErrors = ({
330
383
  errors = { ...formErrors, [key]: void 0 };
331
384
  }
332
385
  if (["amount", "currency"].includes(key)) {
333
- 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) {
334
387
  errors = { ...formErrors, amount: void 0 };
335
388
  }
336
- if (!((_c = data == null ? void 0 : data.amount) == null ? void 0 : _c.currency)) {
389
+ if (!data?.amount?.currency) {
337
390
  errors = { ...formErrors, amount: "currencyIsRequired" };
338
391
  }
339
- if (!((_d = data == null ? void 0 : data.amount) == null ? void 0 : _d.value)) {
392
+ if (!data?.amount?.value) {
340
393
  errors = { ...formErrors, amount: "amountIsRequired" };
341
- } else if (isNaN(data == null ? void 0 : data.amount.value)) {
394
+ } else if (isNaN(data?.amount.value)) {
342
395
  errors = { ...formErrors, amount: "pleaseEnterAValidAmount" };
343
396
  }
344
397
  }
@@ -611,34 +664,32 @@ const parseSOFDocumentDescription = (i18n, documentDescription) => {
611
664
  };
612
665
  const MISSING_DATA_SOF_UPLOAD_CODE = "2_8224";
613
666
  const parseOriginatorDetails = (originatorDetails, businessLine) => {
614
- var _a, _b, _c, _d, _e;
615
667
  const copiedBusinessLine = { ...businessLine };
616
668
  if (copiedBusinessLine.sourceOfFunds) {
617
669
  if (originatorDetails.organization) {
618
670
  copiedBusinessLine.sourceOfFunds.legalName = originatorDetails.organization.legalName;
619
- 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;
620
672
  copiedBusinessLine.sourceOfFunds.originatorType = "organization";
621
673
  }
622
674
  if (originatorDetails.individual) {
623
- copiedBusinessLine.sourceOfFunds.firstName = (_c = originatorDetails.individual.name) == null ? void 0 : _c.firstName;
624
- copiedBusinessLine.sourceOfFunds.lastName = (_d = originatorDetails.individual.name) == null ? void 0 : _d.lastName;
625
- 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;
626
678
  copiedBusinessLine.sourceOfFunds.originatorType = "individual";
627
679
  }
628
680
  }
629
681
  return copiedBusinessLine;
630
682
  };
631
683
  const getSourceOfFundsPayload = (sofType, additionalData) => {
632
- var _a, _b;
633
684
  switch (sofType) {
634
685
  case "business":
635
686
  return {
636
687
  adyenProcessedFunds: false,
637
688
  type: "business",
638
- description: additionalData == null ? void 0 : additionalData.description,
689
+ description: additionalData?.description,
639
690
  amount: {
640
- currency: ((_a = additionalData == null ? void 0 : additionalData.amount) == null ? void 0 : _a.currency) ?? "USD",
641
- 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
642
693
  }
643
694
  };
644
695
  case "employment":
@@ -650,19 +701,19 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
650
701
  return {
651
702
  adyenProcessedFunds: false,
652
703
  type: "donations",
653
- dateOfFundsReceived: additionalData == null ? void 0 : additionalData.dateOfFundsReceived,
654
- purpose: additionalData == null ? void 0 : additionalData.purpose,
655
- relationship: additionalData == null ? void 0 : additionalData.relationship,
656
- originatorLegalEntityId: additionalData == null ? void 0 : additionalData.originatorLegalEntityId
704
+ dateOfFundsReceived: additionalData?.dateOfFundsReceived,
705
+ purpose: additionalData?.purpose,
706
+ relationship: additionalData?.relationship,
707
+ originatorLegalEntityId: additionalData?.originatorLegalEntityId
657
708
  };
658
709
  case "inheritance":
659
710
  return {
660
711
  adyenProcessedFunds: false,
661
712
  type: "inheritance",
662
- dateOfFundsReceived: additionalData == null ? void 0 : additionalData.dateOfFundsReceived,
663
- amount: additionalData == null ? void 0 : additionalData.amount,
664
- relationship: additionalData == null ? void 0 : additionalData.relationship,
665
- originatorLegalEntityId: additionalData == null ? void 0 : additionalData.originatorLegalEntityId
713
+ dateOfFundsReceived: additionalData?.dateOfFundsReceived,
714
+ amount: additionalData?.amount,
715
+ relationship: additionalData?.relationship,
716
+ originatorLegalEntityId: additionalData?.originatorLegalEntityId
666
717
  };
667
718
  case "financialAid":
668
719
  return {
@@ -698,22 +749,22 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
698
749
  return {
699
750
  adyenProcessedFunds: false,
700
751
  type: "thirdPartyFunding",
701
- financiers: additionalData == null ? void 0 : additionalData.financiers
752
+ financiers: additionalData?.financiers
702
753
  };
703
754
  case "cryptocurrencyIncome":
704
755
  return {
705
756
  adyenProcessedFunds: false,
706
757
  type: "cryptocurrencyIncome",
707
- cryptocurrencyExchange: additionalData == null ? void 0 : additionalData.cryptocurrencyExchange
758
+ cryptocurrencyExchange: additionalData?.cryptocurrencyExchange
708
759
  };
709
760
  case "assetSale":
710
761
  return {
711
762
  adyenProcessedFunds: false,
712
763
  type: "assetSale",
713
- cryptocurrencyExchange: additionalData == null ? void 0 : additionalData.cryptocurrencyExchange,
714
- dateOfSourceEvent: additionalData == null ? void 0 : additionalData.dateOfSourceEvent,
715
- description: additionalData == null ? void 0 : additionalData.description,
716
- amount: additionalData == null ? void 0 : additionalData.amount
764
+ cryptocurrencyExchange: additionalData?.cryptocurrencyExchange,
765
+ dateOfSourceEvent: additionalData?.dateOfSourceEvent,
766
+ description: additionalData?.description,
767
+ amount: additionalData?.amount
717
768
  };
718
769
  case "loans":
719
770
  return {
@@ -724,9 +775,9 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
724
775
  return {
725
776
  adyenProcessedFunds: false,
726
777
  type: "gamblingWinnings",
727
- dateOfSourceEvent: additionalData == null ? void 0 : additionalData.dateOfSourceEvent,
728
- website: additionalData == null ? void 0 : additionalData.website,
729
- 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
730
781
  };
731
782
  default:
732
783
  return { adyenProcessedFunds: true };
@@ -734,26 +785,26 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
734
785
  };
735
786
  const parseSofOriginatorPayload = (additionalData) => {
736
787
  let sofOriginator;
737
- if ((additionalData == null ? void 0 : additionalData.originatorType) === "individual") {
788
+ if (additionalData?.originatorType === "individual") {
738
789
  sofOriginator = {
739
- type: LegalEntityType.INDIVIDUAL,
790
+ type: LegalEntityTypes.INDIVIDUAL,
740
791
  individual: {
741
792
  name: {
742
- firstName: (additionalData == null ? void 0 : additionalData.firstName) ?? "",
743
- lastName: (additionalData == null ? void 0 : additionalData.lastName) ?? ""
793
+ firstName: additionalData?.firstName ?? "",
794
+ lastName: additionalData?.lastName ?? ""
744
795
  },
745
796
  residentialAddress: {
746
- country: additionalData == null ? void 0 : additionalData.country
797
+ country: additionalData?.country
747
798
  }
748
799
  }
749
800
  };
750
801
  } else {
751
802
  sofOriginator = {
752
- type: LegalEntityType.ORGANIZATION,
803
+ type: LegalEntityTypes.ORGANIZATION,
753
804
  organization: {
754
- legalName: (additionalData == null ? void 0 : additionalData.legalName) ?? "",
805
+ legalName: additionalData?.legalName ?? "",
755
806
  registeredAddress: {
756
- country: additionalData == null ? void 0 : additionalData.country
807
+ country: additionalData?.country
757
808
  }
758
809
  }
759
810
  };
@@ -772,15 +823,15 @@ const formatDateForInput = (isoDateString) => {
772
823
  return "";
773
824
  }
774
825
  };
775
- const getSofCardDetails = (i18n, sourceOfFunds) => {
776
- if (!sourceOfFunds) {
826
+ const getSofCardDetails = (i18n, sourceOfFunds2) => {
827
+ if (!sourceOfFunds2) {
777
828
  return "";
778
829
  }
779
- if (sourceOfFunds == null ? void 0 : sourceOfFunds.adyenProcessedFunds) {
830
+ if (sourceOfFunds2?.adyenProcessedFunds) {
780
831
  return i18n.get("sofTypeAdyenLabel");
781
832
  }
782
- if (sourceOfFunds == null ? void 0 : sourceOfFunds.type) {
783
- 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`);
784
835
  }
785
836
  return "";
786
837
  };
@@ -795,10 +846,9 @@ const getRelevantErrors = (problems, targetCodes) => {
795
846
  );
796
847
  };
797
848
  const getUniqueRemediationActions = (error) => {
798
- var _a;
799
849
  const allActions = [
800
850
  ...error.remediatingActions || [],
801
- ...((_a = error.subErrors) == null ? void 0 : _a.flatMap((sub) => sub.remediatingActions || [])) || []
851
+ ...error.subErrors?.flatMap((sub) => sub.remediatingActions || []) || []
802
852
  ];
803
853
  return allActions.filter((action, i, arr) => arr.findIndex((a) => a.code === action.code) === i);
804
854
  };
@@ -819,48 +869,45 @@ function AdditionalDataForAssetSale(props) {
819
869
  name: "amount",
820
870
  label: formUtils.getLabel("amount", "saleAmount"),
821
871
  errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
822
- children: (childProps) => {
823
- var _a, _b;
824
- return /* @__PURE__ */ jsxs(
825
- InputGroup,
826
- {
827
- ...childProps,
828
- id: "currencyGroup",
829
- isFocused,
830
- isInvalid: Boolean(!valid.amount && errors.amount),
831
- children: [
832
- /* @__PURE__ */ jsx(
833
- Select,
834
- {
835
- name: "currency",
836
- "aria-label": i18n.get("currency"),
837
- isMulti: false,
838
- items: allowedCurrencies,
839
- selected: (_a = data.amount) == null ? void 0 : _a.currency,
840
- placeholder: i18n.get("select"),
841
- onChange: handleAmountChange("currency"),
842
- minimal: true
843
- }
844
- ),
845
- /* @__PURE__ */ jsx(
846
- InputText,
847
- {
848
- ...childProps,
849
- name: "amount",
850
- value: (_b = data.amount) == null ? void 0 : _b.value,
851
- readonly: formUtils.isReadOnly("amount"),
852
- onInput: handleAmountChange("amount"),
853
- onBlur: handleOnAmountBlur,
854
- "aria-required": true,
855
- "aria-invalid": !valid.amount,
856
- isValid: valid.amount,
857
- onFocusHandler: () => setIsFocused(true)
858
- }
859
- )
860
- ]
861
- }
862
- );
863
- }
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
+ )
864
911
  }
865
912
  ),
866
913
  /* @__PURE__ */ jsx(
@@ -927,48 +974,45 @@ function AdditionalDataForBusiness(props) {
927
974
  errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
928
975
  helper: i18n.get("useFiguresFromTheMostRecentYearAvailable"),
929
976
  helperPosition: "below",
930
- children: (childProps) => {
931
- var _a, _b;
932
- return /* @__PURE__ */ jsxs(
933
- InputGroup,
934
- {
935
- ...childProps,
936
- id: "currencyGroup",
937
- isFocused,
938
- isInvalid: Boolean(!valid.amount && errors.amount),
939
- children: [
940
- /* @__PURE__ */ jsx(
941
- Select,
942
- {
943
- name: "currency",
944
- "aria-label": i18n.get("currency"),
945
- isMulti: false,
946
- items: allowedCurrencies,
947
- selected: (_a = data.amount) == null ? void 0 : _a.currency,
948
- placeholder: i18n.get("select"),
949
- onChange: handleAmountChange("currency"),
950
- minimal: true
951
- }
952
- ),
953
- /* @__PURE__ */ jsx(
954
- InputText,
955
- {
956
- ...childProps,
957
- name: "amount",
958
- value: (_b = data.amount) == null ? void 0 : _b.value,
959
- readonly: formUtils.isReadOnly("amount"),
960
- onInput: handleAmountChange("amount"),
961
- onBlur: handleOnAmountBlur,
962
- "aria-required": true,
963
- "aria-invalid": !valid.amount,
964
- isValid: valid.amount,
965
- onFocusHandler: () => setIsFocused(true)
966
- }
967
- )
968
- ]
969
- }
970
- );
971
- }
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
+ )
972
1016
  }
973
1017
  ),
974
1018
  /* @__PURE__ */ jsx(
@@ -1064,7 +1108,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
1064
1108
  )
1065
1109
  }
1066
1110
  ),
1067
- (data == null ? void 0 : data.originatorType) === "organization" && /* @__PURE__ */ jsx(
1111
+ data?.originatorType === "organization" && /* @__PURE__ */ jsx(
1068
1112
  Field,
1069
1113
  {
1070
1114
  name: "legalName",
@@ -1087,7 +1131,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
1087
1131
  )
1088
1132
  }
1089
1133
  ),
1090
- (data == null ? void 0 : data.originatorType) === "individual" && /* @__PURE__ */ jsxs(Fragment, { children: [
1134
+ data?.originatorType === "individual" && /* @__PURE__ */ jsxs(Fragment, { children: [
1091
1135
  /* @__PURE__ */ jsx(
1092
1136
  Field,
1093
1137
  {
@@ -1141,14 +1185,14 @@ function AdditionalDataOriginatorLegalEntity(props) {
1141
1185
  }
1142
1186
  )
1143
1187
  ] }),
1144
- (data == null ? void 0 : data.originatorType) && /* @__PURE__ */ jsxs(Fragment, { children: [
1188
+ data?.originatorType && /* @__PURE__ */ jsxs(Fragment, { children: [
1145
1189
  /* @__PURE__ */ jsx(
1146
1190
  Field,
1147
1191
  {
1148
1192
  name: "relationship",
1149
1193
  label: formUtils.getLabel(
1150
1194
  "relationship",
1151
- 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"
1152
1196
  ),
1153
1197
  errorMessage: formUtils.getErrorMessage("relationship", errors, fieldProblems),
1154
1198
  isValid: valid.relationship,
@@ -1178,7 +1222,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
1178
1222
  },
1179
1223
  labels: {
1180
1224
  country: i18n.get(
1181
- 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"
1182
1226
  )
1183
1227
  },
1184
1228
  readonly: formUtils.isReadOnly("country"),
@@ -1272,48 +1316,45 @@ function AdditionalDataForGambling(props) {
1272
1316
  name: "amount",
1273
1317
  label: formUtils.getLabel("amount", "totalAmountWon"),
1274
1318
  errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
1275
- children: (childProps) => {
1276
- var _a, _b;
1277
- return /* @__PURE__ */ jsxs(
1278
- InputGroup,
1279
- {
1280
- ...childProps,
1281
- id: "currencyGroup",
1282
- isFocused: focusedInput === "amount",
1283
- isInvalid: Boolean(!valid.amount && errors.amount),
1284
- children: [
1285
- /* @__PURE__ */ jsx(
1286
- Select,
1287
- {
1288
- name: "currency",
1289
- "aria-label": i18n.get("currency"),
1290
- isMulti: false,
1291
- items: allowedCurrencies,
1292
- selected: (_a = data.amount) == null ? void 0 : _a.currency,
1293
- placeholder: i18n.get("select"),
1294
- onChange: handleAmountChange("currency"),
1295
- minimal: true
1296
- }
1297
- ),
1298
- /* @__PURE__ */ jsx(
1299
- InputText,
1300
- {
1301
- ...childProps,
1302
- name: "amount",
1303
- value: (_b = data.amount) == null ? void 0 : _b.value,
1304
- readonly: formUtils.isReadOnly("amount"),
1305
- onInput: handleAmountChange("amount"),
1306
- onBlur: handleOnAmountBlur,
1307
- "aria-required": true,
1308
- "aria-invalid": !valid.amount,
1309
- isValid: valid.amount,
1310
- onFocusHandler: () => setFocusedInput("amount")
1311
- }
1312
- )
1313
- ]
1314
- }
1315
- );
1316
- }
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
+ )
1317
1358
  }
1318
1359
  ),
1319
1360
  /* @__PURE__ */ jsx(
@@ -1404,48 +1445,45 @@ function AdditionalDataForInheritance(props) {
1404
1445
  name: "amount",
1405
1446
  label: formUtils.getLabel("amount", "inheritanceAmount"),
1406
1447
  errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
1407
- children: (childProps) => {
1408
- var _a, _b;
1409
- return /* @__PURE__ */ jsxs(
1410
- InputGroup,
1411
- {
1412
- ...childProps,
1413
- id: "currencyGroup",
1414
- isFocused,
1415
- isInvalid: Boolean(!valid.amount && errors.amount),
1416
- children: [
1417
- /* @__PURE__ */ jsx(
1418
- Select,
1419
- {
1420
- name: "currency",
1421
- "aria-label": i18n.get("currency"),
1422
- isMulti: false,
1423
- items: allowedCurrencies ?? [],
1424
- selected: (_a = data.amount) == null ? void 0 : _a.currency,
1425
- placeholder: i18n.get("select"),
1426
- onChange: handleAmountChange("currency"),
1427
- minimal: true
1428
- }
1429
- ),
1430
- /* @__PURE__ */ jsx(
1431
- InputText,
1432
- {
1433
- ...childProps,
1434
- name: "amount",
1435
- value: (_b = data.amount) == null ? void 0 : _b.value,
1436
- readonly: formUtils.isReadOnly("amount"),
1437
- onInput: handleAmountChange("amount"),
1438
- onBlur: handleOnAmountBlur,
1439
- "aria-required": true,
1440
- "aria-invalid": !valid.amount,
1441
- isValid: valid.amount,
1442
- onFocusHandler: () => setIsFocused(true)
1443
- }
1444
- )
1445
- ]
1446
- }
1447
- );
1448
- }
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
+ )
1449
1487
  }
1450
1488
  ),
1451
1489
  /* @__PURE__ */ jsx(
@@ -1460,7 +1498,7 @@ function AdditionalDataForInheritance(props) {
1460
1498
  {
1461
1499
  ...childProps,
1462
1500
  name: "dateOfFundsReceived",
1463
- value: data.dateOfFundsReceived,
1501
+ value: formatDateForInput(data.dateOfFundsReceived),
1464
1502
  onInput: handleChangeFor("dateOfFundsReceived", "input"),
1465
1503
  onBlur: handleChangeFor("dateOfFundsReceived", "blur"),
1466
1504
  "aria-required": true,
@@ -1482,17 +1520,16 @@ const SOFFinancierModal = (props) => {
1482
1520
  const [isFocused, setIsFocused] = useState(false);
1483
1521
  const [errorMessage, setErrorMessage] = useState("");
1484
1522
  const handleInputUpdate = (key, e) => {
1485
- var _a, _b;
1486
1523
  const inputEl = e.target;
1487
1524
  setErrorMessage("");
1488
- const value = inputEl == null ? void 0 : inputEl.value;
1525
+ const value = inputEl?.value;
1489
1526
  let inputData = {
1490
1527
  [key]: value
1491
1528
  };
1492
1529
  if (["amount", "currency"].includes(key)) {
1493
1530
  const amountValue = {
1494
- currency: key === "currency" ? value : (_a = formData == null ? void 0 : formData.amount) == null ? void 0 : _a.currency,
1495
- 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
1496
1533
  };
1497
1534
  inputData = { amount: amountValue };
1498
1535
  }
@@ -1505,19 +1542,17 @@ const SOFFinancierModal = (props) => {
1505
1542
  setFormErrors(errors);
1506
1543
  };
1507
1544
  const handleOnAmountBlur = () => {
1508
- var _a;
1509
1545
  setIsFocused(false);
1510
1546
  const errors = getInputErrors({
1511
1547
  formErrors,
1512
1548
  data: formData,
1513
1549
  key: "amount",
1514
- value: (_a = formData == null ? void 0 : formData.amount) == null ? void 0 : _a.value
1550
+ value: formData?.amount?.value
1515
1551
  });
1516
1552
  setFormErrors(errors);
1517
1553
  };
1518
1554
  const allFieldsFilled = (data) => {
1519
- var _a, _b;
1520
- 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));
1521
1556
  };
1522
1557
  const handleFinancierSave = () => {
1523
1558
  if (formData && allFieldsFilled(formData)) {
@@ -1531,8 +1566,7 @@ const SOFFinancierModal = (props) => {
1531
1566
  "amount"
1532
1567
  ];
1533
1568
  const errors = fields.reduce((acc, key) => {
1534
- var _a;
1535
- 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];
1536
1570
  return {
1537
1571
  ...acc,
1538
1572
  ...getInputErrors({
@@ -1585,7 +1619,7 @@ const SOFFinancierModal = (props) => {
1585
1619
  {
1586
1620
  ...childProps,
1587
1621
  name: "firstName",
1588
- value: formData == null ? void 0 : formData.firstName,
1622
+ value: formData?.firstName,
1589
1623
  onInput: (e) => handleInputUpdate("firstName", e),
1590
1624
  onBlur: (e) => handleInputUpdate("firstName", e),
1591
1625
  "aria-required": true,
@@ -1607,7 +1641,7 @@ const SOFFinancierModal = (props) => {
1607
1641
  {
1608
1642
  ...childProps,
1609
1643
  name: "lastName",
1610
- value: formData == null ? void 0 : formData.lastName,
1644
+ value: formData?.lastName,
1611
1645
  onInput: (e) => handleInputUpdate("lastName", e),
1612
1646
  onBlur: (e) => handleInputUpdate("lastName", e),
1613
1647
  "aria-required": true,
@@ -1633,7 +1667,7 @@ const SOFFinancierModal = (props) => {
1633
1667
  {
1634
1668
  ...childProps,
1635
1669
  name: "location",
1636
- value: formData == null ? void 0 : formData.location,
1670
+ value: formData?.location,
1637
1671
  onInput: (e) => handleInputUpdate("location", e),
1638
1672
  onBlur: (e) => handleInputUpdate("location", e),
1639
1673
  "aria-required": true,
@@ -1651,36 +1685,33 @@ const SOFFinancierModal = (props) => {
1651
1685
  label: i18n.get("investmentAmount"),
1652
1686
  errorMessage: formErrors.amount,
1653
1687
  isValid: !formErrors.amount,
1654
- children: (childProps) => {
1655
- var _a, _b;
1656
- return /* @__PURE__ */ jsxs(InputGroup, { ...childProps, id: "currencyGroup", isFocused, children: [
1657
- /* @__PURE__ */ jsx(
1658
- Select,
1659
- {
1660
- minimal: true,
1661
- name: "currency",
1662
- "aria-label": i18n.get("currency"),
1663
- isMulti: false,
1664
- items: allowedCurrencies,
1665
- selected: (_a = formData == null ? void 0 : formData.amount) == null ? void 0 : _a.currency,
1666
- placeholder: i18n.get("select"),
1667
- onChange: (e) => handleInputUpdate("currency", e)
1668
- }
1669
- ),
1670
- /* @__PURE__ */ jsx(
1671
- InputText,
1672
- {
1673
- ...childProps,
1674
- name: "amount",
1675
- value: (_b = formData == null ? void 0 : formData.amount) == null ? void 0 : _b.value,
1676
- onInput: (e) => handleInputUpdate("amount", e),
1677
- onBlur: handleOnAmountBlur,
1678
- "aria-required": true,
1679
- onFocusHandler: () => setIsFocused(true)
1680
- }
1681
- )
1682
- ] });
1683
- }
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
+ ] })
1684
1715
  }
1685
1716
  )
1686
1717
  ] }),
@@ -1702,7 +1733,6 @@ const SOFFinancierModal = (props) => {
1702
1733
  ] });
1703
1734
  };
1704
1735
  function AdditionalDataForThirdParty(props) {
1705
- var _a;
1706
1736
  const [showFinancierModal, setShowFinancierModal] = useState(false);
1707
1737
  const [activeFinancier, setActiveFinancier] = useState();
1708
1738
  const [activeIndex, setActiveIndex] = useState();
@@ -1760,35 +1790,32 @@ function AdditionalDataForThirdParty(props) {
1760
1790
  children: i18n.get("addAtLeastOneInvestor")
1761
1791
  }
1762
1792
  ),
1763
- (_a = data.financiers) == null ? void 0 : _a.map((financier, index) => {
1764
- var _a2, _b, _c;
1765
- return /* @__PURE__ */ jsxs(
1766
- "button",
1767
- {
1768
- type: "button",
1769
- onClick: () => handleShowUpdateFinancierModal(index),
1770
- className: styles.sourceOfFundsThirdPartyFundingFinancierGroup,
1771
- children: [
1772
- /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
1773
- /* @__PURE__ */ jsx(Avatar, { iconName: "user", circle: true }),
1774
- /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
1775
- /* @__PURE__ */ jsxs(Typography, { el: "div", variant: "body-strongest", children: [
1776
- financier.firstName,
1777
- " ",
1778
- financier.lastName
1779
- ] }),
1780
- /* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: financier.location })
1781
- ] })
1782
- ] }),
1783
- /* @__PURE__ */ jsx("div", { children: ((_a2 = financier.amount) == null ? void 0 : _a2.currency) && ((_b = financier.amount) == null ? void 0 : _b.value) ? formatAmountWithCurrency(
1784
- financier.amount.value,
1785
- (_c = financier.amount) == null ? void 0 : _c.currency
1786
- ) : "" })
1787
- ]
1788
- },
1789
- index
1790
- );
1791
- }),
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
+ )),
1792
1819
  /* @__PURE__ */ jsx(
1793
1820
  "button",
1794
1821
  {
@@ -1812,6 +1839,17 @@ function AdditionalDataForThirdParty(props) {
1812
1839
  )
1813
1840
  ] });
1814
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
+ }
1815
1853
  const sourceOfFundsTypeValidations = {
1816
1854
  type: {
1817
1855
  modes: ["blur"],
@@ -1833,24 +1871,26 @@ const sourceOfFundsAdditionalDataValidations = {
1833
1871
  },
1834
1872
  {
1835
1873
  modes: ["blur"],
1836
- validate: (website) => website ? isURL(website) : false,
1874
+ validate: (website) => website ? canParseUrl(
1875
+ website?.startsWith("http:") || website?.startsWith("https:") ? website : `https://${website}`
1876
+ ) : false,
1837
1877
  errorMessage: "validationPleaseEnterAValidUrl"
1838
1878
  }
1839
1879
  ],
1840
1880
  amount: [
1841
1881
  {
1842
1882
  modes: ["blur"],
1843
- validate: (amount) => !isEmpty(amount == null ? void 0 : amount.currency),
1883
+ validate: (amount) => !isEmpty(amount?.currency),
1844
1884
  errorMessage: "currencyIsRequired"
1845
1885
  },
1846
1886
  {
1847
1887
  modes: ["blur"],
1848
- validate: (amount) => !isEmpty(amount == null ? void 0 : amount.value),
1888
+ validate: (amount) => !isEmpty(amount?.value),
1849
1889
  errorMessage: "amountIsRequired"
1850
1890
  },
1851
1891
  {
1852
1892
  modes: ["blur"],
1853
- validate: (amount) => !Number.isNaN(Number(amount == null ? void 0 : amount.value)),
1893
+ validate: (amount) => !Number.isNaN(Number(amount?.value)),
1854
1894
  errorMessage: "pleaseEnterAValidAmount"
1855
1895
  }
1856
1896
  ],
@@ -1925,7 +1965,7 @@ const sourceOfFundsAdditionalDataValidations = {
1925
1965
  }
1926
1966
  };
1927
1967
  function SourceOfFundsAdditionalData(props) {
1928
- const { i18n } = useI18nContext();
1968
+ const { t } = useTranslation();
1929
1969
  const {
1930
1970
  data: defaultData,
1931
1971
  validators,
@@ -1935,8 +1975,8 @@ function SourceOfFundsAdditionalData(props) {
1935
1975
  sourceOfFundsType
1936
1976
  } = props;
1937
1977
  const getFormSchema = useMemo(
1938
- () => getAdditionalDataSchemaKeys(sourceOfFundsType, defaultData == null ? void 0 : defaultData.originatorType),
1939
- [sourceOfFundsType, defaultData == null ? void 0 : defaultData.originatorType]
1978
+ () => getAdditionalDataSchemaKeys(sourceOfFundsType, defaultData?.originatorType),
1979
+ [sourceOfFundsType, defaultData?.originatorType]
1940
1980
  );
1941
1981
  const [schema, setSchema] = useState(getFormSchema);
1942
1982
  const {
@@ -1955,14 +1995,13 @@ function SourceOfFundsAdditionalData(props) {
1955
1995
  shouldValidate
1956
1996
  });
1957
1997
  useEffect(() => {
1958
- setSchema(getAdditionalDataSchemaKeys(sourceOfFundsType, formData == null ? void 0 : formData.originatorType));
1998
+ setSchema(getAdditionalDataSchemaKeys(sourceOfFundsType, formData?.originatorType));
1959
1999
  }, [formData.originatorType]);
1960
2000
  const handleAmountChange = (key) => (e) => {
1961
- var _a, _b;
1962
2001
  const isCurrencyKey = key === "currency";
1963
2002
  const amountValue = {
1964
- currency: isCurrencyKey ? e.target.value : (_a = formData.amount) == null ? void 0 : _a.currency,
1965
- 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
1966
2005
  };
1967
2006
  const fieldEvent = {
1968
2007
  target: {
@@ -1972,7 +2011,7 @@ function SourceOfFundsAdditionalData(props) {
1972
2011
  };
1973
2012
  handleChangeFor("amount")(fieldEvent);
1974
2013
  };
1975
- const formUtils = createFormUtils(props, i18n);
2014
+ const formUtils = createFormUtils(props, t);
1976
2015
  const { updateStateSlice } = useGlobalDataSlice("additionalData");
1977
2016
  useEffect(() => {
1978
2017
  updateStateSlice({
@@ -2085,7 +2124,7 @@ function SourceOfFundsAdditionalData(props) {
2085
2124
  ErrorPanel,
2086
2125
  {
2087
2126
  verificationErrors: formVerificationErrors,
2088
- validationErrors: props == null ? void 0 : props.fieldValidationErrors,
2127
+ validationErrors: props?.fieldValidationErrors,
2089
2128
  formUtils,
2090
2129
  id: "ariaErrorField"
2091
2130
  }
@@ -2095,6 +2134,7 @@ function SourceOfFundsAdditionalData(props) {
2095
2134
  }
2096
2135
  const sourceOfFundsTypeFields = ["type"];
2097
2136
  function SourceOfFundsType(props) {
2137
+ const { t } = useTranslation();
2098
2138
  const { i18n } = useI18nContext();
2099
2139
  const {
2100
2140
  data: sourceOfFundsTypeDefaultData,
@@ -2118,7 +2158,7 @@ function SourceOfFundsType(props) {
2118
2158
  fieldProblems: fieldValidationErrors,
2119
2159
  shouldValidate
2120
2160
  });
2121
- const formUtils = createFormUtils(props, i18n);
2161
+ const formUtils = createFormUtils(props, t);
2122
2162
  const { updateStateSlice } = useGlobalDataSlice("sourceOfFundsType");
2123
2163
  useEffect(() => {
2124
2164
  updateStateSlice({
@@ -2135,11 +2175,11 @@ function SourceOfFundsType(props) {
2135
2175
  label: i18n.get("sofTypeAdyenLabel"),
2136
2176
  icon: getIconById("adyen")
2137
2177
  },
2138
- ...(categories == null ? void 0 : categories.map((item) => ({
2178
+ ...categories?.map((item) => ({
2139
2179
  value: item.id,
2140
2180
  label: i18n.get(`sofType${toCapitalized(item.name)}Label`),
2141
2181
  icon: getIconById(item.id)
2142
- }))) ?? []
2182
+ })) ?? []
2143
2183
  ];
2144
2184
  const errorMessage = formUtils.getErrorMessage("type", formErrors, formFieldProblems);
2145
2185
  return /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: () => /* @__PURE__ */ jsx(
@@ -2148,7 +2188,7 @@ function SourceOfFundsType(props) {
2148
2188
  name: "type",
2149
2189
  tiles: categoryItems,
2150
2190
  errorMessage: typeof errorMessage !== "boolean" ? i18n.get(errorMessage) : errorMessage,
2151
- selected: (formData == null ? void 0 : formData.type) ? formData.type : [],
2191
+ selected: formData?.type ? formData.type : [],
2152
2192
  onChange: handleChangeFor("type", "input")
2153
2193
  }
2154
2194
  ) });
@@ -2195,7 +2235,7 @@ function SourceOfFunds(props) {
2195
2235
  const { i18n } = useI18nContext();
2196
2236
  const { activeForm, activeBusinessLine, sourceOfFundsType } = props;
2197
2237
  const { data: sourceOfFundsTypesData, isLoading } = useSourceOfFundsTypes();
2198
- const formWrapperClasses = (formId) => (activeForm == null ? void 0 : activeForm.formId) !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
2238
+ const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
2199
2239
  const pageHeadings = useMemo(
2200
2240
  () => getPageHeadings(sourceOfFundsType ?? "adyen"),
2201
2241
  [sourceOfFundsType]
@@ -2203,19 +2243,19 @@ function SourceOfFunds(props) {
2203
2243
  return isLoading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
2204
2244
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsWrapperHeading, children: [
2205
2245
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get(
2206
- (activeForm == null ? void 0 : activeForm.formId) === "additionalData" ? pageHeadings.heading : {
2246
+ activeForm?.formId === "additionalData" ? pageHeadings.heading : {
2207
2247
  key: "selectASourceOfFunding",
2208
2248
  values: {
2209
2249
  type: getServiceTranslationSelectTitle(
2210
2250
  i18n,
2211
- (activeBusinessLine == null ? void 0 : activeBusinessLine.service) || ""
2251
+ activeBusinessLine?.service || ""
2212
2252
  ).toLowerCase()
2213
2253
  }
2214
2254
  }
2215
2255
  ) }),
2216
2256
  /* @__PURE__ */ jsxs(Typography, { className: styles.sourceOfFundsWrapperDescription, children: [
2217
- (activeForm == null ? void 0 : activeForm.formId) === "additionalData" && pageHeadings.description && i18n.get(pageHeadings.description),
2218
- (sourceOfFundsTypesData == null ? void 0 : sourceOfFundsTypesData.length) === 0 && i18n.get("noCategoriesAvailable")
2257
+ activeForm?.formId === "additionalData" && pageHeadings.description && i18n.get(pageHeadings.description),
2258
+ sourceOfFundsTypesData?.length === 0 && i18n.get("noCategoriesAvailable")
2219
2259
  ] })
2220
2260
  ] }),
2221
2261
  sofErrorMessage.value && /* @__PURE__ */ jsxs(
@@ -2232,21 +2272,21 @@ function SourceOfFunds(props) {
2232
2272
  ]
2233
2273
  }
2234
2274
  ),
2235
- (activeForm == null ? void 0 : activeForm.formId) === "sourceOfFundsType" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("sourceOfFundsType"), children: /* @__PURE__ */ jsx(
2275
+ activeForm?.formId === "sourceOfFundsType" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("sourceOfFundsType"), children: /* @__PURE__ */ jsx(
2236
2276
  SourceOfFundsType,
2237
2277
  {
2238
2278
  categories: sourceOfFundsTypesData,
2239
2279
  ...getFormProps(props, sourceOfFundsForms.sourceOfFundsType.formId)
2240
2280
  }
2241
2281
  ) }),
2242
- (activeForm == null ? void 0 : activeForm.formId) === "additionalData" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("additionalData"), children: /* @__PURE__ */ jsx(
2282
+ activeForm?.formId === "additionalData" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("additionalData"), children: /* @__PURE__ */ jsx(
2243
2283
  SourceOfFundsAdditionalData,
2244
2284
  {
2245
2285
  ...getFormProps(props, sourceOfFundsForms.additionalData.formId),
2246
2286
  sourceOfFundsType
2247
2287
  }
2248
2288
  ) }),
2249
- (activeForm == null ? void 0 : activeForm.formId) === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("companySourceOfFunds"), children: /* @__PURE__ */ jsx("div", { children: i18n.get("uploadADocument") }) })
2289
+ activeForm?.formId === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("companySourceOfFunds"), children: /* @__PURE__ */ jsx("div", { children: i18n.get("uploadADocument") }) })
2250
2290
  ] });
2251
2291
  }
2252
2292
  function SourceOfFundsGettingStartedCard(props) {
@@ -2268,7 +2308,7 @@ function SourceOfFundsGettingStartedCard(props) {
2268
2308
  children: i18n.get("start")
2269
2309
  }
2270
2310
  ),
2271
- children: isEdit && (meta == null ? void 0 : meta.length) && /* @__PURE__ */ jsx(
2311
+ children: isEdit && meta?.length && /* @__PURE__ */ jsx(
2272
2312
  StructuredList,
2273
2313
  {
2274
2314
  className: styles.sourceOfFundsGettingStartedCardsCardDescription,
@@ -2289,64 +2329,55 @@ const SourceOfFundsGettingStarted = ({
2289
2329
  legalEntity,
2290
2330
  isSoFDocumentMissing
2291
2331
  }) => {
2292
- var _a, _b, _c;
2293
2332
  const { i18n } = useI18nContext();
2294
- const hasSourceOfFunds = businessLines == null ? void 0 : businessLines.some(
2333
+ const hasSourceOfFunds = businessLines?.some(
2295
2334
  (businessLine) => !isEmpty$1(businessLine.sourceOfFunds)
2296
2335
  );
2297
2336
  const sofDocuments = useMemo(
2298
- () => {
2299
- var _a2;
2300
- return ((_a2 = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _a2.filter((doc) => doc.type === "proofOfFundingOrWealthSource")) ?? [];
2301
- },
2337
+ () => legalEntity?.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [],
2302
2338
  [legalEntity]
2303
2339
  );
2304
2340
  const mapBusinessLines = useCallback(
2305
2341
  (lines) => {
2306
- var _a2;
2307
- const completedBusinessLines = businessLines.every((line) => {
2308
- var _a3;
2309
- return (_a3 = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _a3.type;
2310
- });
2342
+ const completedBusinessLines = businessLines.every((line) => line?.sourceOfFunds?.type);
2311
2343
  const cards = lines.map((line) => {
2312
- var _a3, _b2, _c2, _d, _e;
2313
2344
  const SoF = mapSourceOfFundToSourceOfFundsSchema(line);
2314
2345
  return {
2315
2346
  title: getServiceTranslation(i18n, line.service || ""),
2316
- type: (_a3 = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _a3.type,
2317
- 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),
2347
+ type: line?.sourceOfFunds?.type,
2348
+ isEdit: !!line?.sourceOfFunds?.type || !!line?.sourceOfFunds?.adyenProcessedFunds,
2318
2349
  onClick: () => handleSourceOfFundsClick(SoF, line),
2319
2350
  meta: [
2320
2351
  {
2321
2352
  term: i18n.get("sourceOfFunds"),
2322
- details: getSofCardDetails(i18n, line == null ? void 0 : line.sourceOfFunds)
2353
+ details: getSofCardDetails(i18n, line?.sourceOfFunds)
2323
2354
  },
2324
2355
  ...getGettingStartedCardDetails(
2325
2356
  getAdditionalDataSchemaKeys(
2326
- ((_d = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _d.type) || "adyen",
2327
- (_e = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _e.originatorType
2357
+ line?.sourceOfFunds?.type || "adyen",
2358
+ line?.sourceOfFunds?.originatorType
2328
2359
  ),
2329
2360
  i18n,
2330
- line == null ? void 0 : line.sourceOfFunds
2361
+ line?.sourceOfFunds
2331
2362
  )
2332
2363
  ]
2333
2364
  };
2334
- }).sort((a) => (a == null ? void 0 : a.type) ? 1 : -1);
2365
+ }).sort((a) => a?.type ? 1 : -1);
2335
2366
  const uploadCard = {
2336
2367
  title: getServiceTranslation(i18n),
2337
2368
  type: "",
2338
- isEdit: !!(sofDocuments == null ? void 0 : sofDocuments.length),
2369
+ isEdit: !!sofDocuments?.length,
2339
2370
  onClick: handleNavigateToUploadPage,
2340
- meta: (sofDocuments == null ? void 0 : sofDocuments.length) ? sofDocuments.map((doc) => ({
2371
+ meta: sofDocuments?.length ? sofDocuments.map((doc) => ({
2341
2372
  term: i18n.get("fileName"),
2342
2373
  details: [
2343
- doc == null ? void 0 : doc.fileName,
2344
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(i18n, doc == null ? void 0 : doc.description) || "" }, "docDescription")
2374
+ doc?.fileName,
2375
+ /* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(i18n, doc?.description) || "" }, "docDescription")
2345
2376
  ]
2346
2377
  })) : []
2347
2378
  };
2348
- if (completedBusinessLines && (isSoFDocumentMissing || (sofDocuments == null ? void 0 : sofDocuments.length))) {
2349
- if ((_a2 = uploadCard.meta) == null ? void 0 : _a2.length) {
2379
+ if (completedBusinessLines && (isSoFDocumentMissing || sofDocuments?.length)) {
2380
+ if (uploadCard.meta?.length) {
2350
2381
  cards.push(uploadCard);
2351
2382
  } else {
2352
2383
  cards.unshift(uploadCard);
@@ -2379,27 +2410,61 @@ const SourceOfFundsGettingStarted = ({
2379
2410
  "data-testid": "source-of-funds-getting-started",
2380
2411
  children: [
2381
2412
  !hasSourceOfFunds && /* @__PURE__ */ jsx(
2382
- Svg,
2383
- {
2384
- type: "image",
2385
- testId: "source-of-funds-getting-started-icon",
2386
- name: "source-of-funds",
2387
- className: styles.sourceOfFundsGettingStartedIcon
2388
- }
2389
- ),
2390
- hasSourceOfFunds && /* @__PURE__ */ jsx(
2391
- TaskStatusIndicator,
2413
+ LandingLayout,
2392
2414
  {
2393
- taskStatus: (_c = (_b = (_a = normalizedTaskStatusStore) == null ? void 0 : _a.value) == null ? void 0 : _b.SOURCE_OF_FUNDS) == null ? void 0 : _c.status
2415
+ media: /* @__PURE__ */ jsx(
2416
+ Svg,
2417
+ {
2418
+ type: "image",
2419
+ testId: "source-of-funds-getting-started-icon",
2420
+ name: "source-of-funds"
2421
+ }
2422
+ ),
2423
+ title: i18n.get("fundingSourcesForFinancialProducts"),
2424
+ description: i18n.get("inTheNextStepWellCollectInformation"),
2425
+ actions: /* @__PURE__ */ jsxs(Fragment, { children: [
2426
+ /* @__PURE__ */ jsx(
2427
+ Button,
2428
+ {
2429
+ fullWidth: true,
2430
+ testId: "source-of-funds-getting-primary-button",
2431
+ onClick: handleGettingStartedClick,
2432
+ children: i18n.get("gettingStarted")
2433
+ }
2434
+ ),
2435
+ handleCancelClick && /* @__PURE__ */ jsx(
2436
+ Button,
2437
+ {
2438
+ variant: "tertiary",
2439
+ fullWidth: true,
2440
+ testId: "source-of-funds-getting-cancel-button",
2441
+ onClick: handleCancelClick,
2442
+ children: i18n.get("backToTaskList")
2443
+ }
2444
+ )
2445
+ ] })
2394
2446
  }
2395
2447
  ),
2396
- /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedHeading, el: "h2", variant: "title-l", children: i18n.get("fundingSourcesForFinancialProducts") }),
2397
2448
  hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
2449
+ /* @__PURE__ */ jsx(
2450
+ TaskStatusIndicator,
2451
+ {
2452
+ taskStatus: normalizedTaskStatusStore?.value?.SOURCE_OF_FUNDS?.status
2453
+ }
2454
+ ),
2455
+ /* @__PURE__ */ jsx(
2456
+ Typography,
2457
+ {
2458
+ className: styles.sourceOfFundsGettingStartedHeading,
2459
+ el: "h2",
2460
+ variant: "title-l",
2461
+ children: i18n.get("fundingSourcesForFinancialProducts")
2462
+ }
2463
+ ),
2398
2464
  /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedBody, children: i18n.get("addAllSourcesOfFundsBeingUsed") }),
2399
2465
  errorObjects && errorObjects.map((errorObj, index) => {
2400
- var _a2, _b2;
2401
2466
  const uniqueActions = getUniqueRemediationActions(errorObj);
2402
- const errorItems = ((_a2 = errorObj.subErrors) == null ? void 0 : _a2.map((subError) => subError.message)) || [];
2467
+ const errorItems = errorObj.subErrors?.map((subError) => subError.message) || [];
2403
2468
  return /* @__PURE__ */ jsxs(
2404
2469
  Alert,
2405
2470
  {
@@ -2407,7 +2472,7 @@ const SourceOfFundsGettingStarted = ({
2407
2472
  className: styles.sourceOfFundsGettingStartedError,
2408
2473
  variant: "error",
2409
2474
  children: [
2410
- ((_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)) }),
2475
+ errorObj?.subErrors?.length && /* @__PURE__ */ jsx("ul", { children: errorItems.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) }),
2411
2476
  uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedErrorActions, children: uniqueActions.filter((action) => action.code !== "1_519").map((action, i) => /* @__PURE__ */ jsx(
2412
2477
  Button,
2413
2478
  {
@@ -2433,42 +2498,17 @@ const SourceOfFundsGettingStarted = ({
2433
2498
  children: i18n.get("backToTaskList")
2434
2499
  }
2435
2500
  )
2436
- ] }),
2437
- !hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
2438
- /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedBody, children: i18n.get("inTheNextStepWellCollectInformation") }),
2439
- /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsGettingStartedActions, children: [
2440
- /* @__PURE__ */ jsx(
2441
- Button,
2442
- {
2443
- fullWidth: true,
2444
- testId: "source-of-funds-getting-primary-button",
2445
- onClick: handleGettingStartedClick,
2446
- children: i18n.get("gettingStarted")
2447
- }
2448
- ),
2449
- handleCancelClick && /* @__PURE__ */ jsx(
2450
- Button,
2451
- {
2452
- variant: "tertiary",
2453
- fullWidth: true,
2454
- testId: "source-of-funds-getting-cancel-button",
2455
- onClick: handleCancelClick,
2456
- children: i18n.get("cancel")
2457
- }
2458
- )
2459
- ] })
2460
2501
  ] })
2461
2502
  ]
2462
2503
  }
2463
2504
  );
2464
2505
  };
2465
2506
  const SOFUploadModal = (props) => {
2466
- var _a, _b;
2467
2507
  const { i18n } = useI18nContext();
2468
2508
  const { showToast } = useToastContext();
2469
2509
  const logger2 = createLogger();
2470
2510
  const { businessLines, handleModalClose, documentUtils } = props;
2471
- const firstService = (businessLines == null ? void 0 : businessLines.length) === 1 ? (_a = businessLines == null ? void 0 : businessLines[0]) == null ? void 0 : _a.service : void 0;
2511
+ const firstService = businessLines?.length === 1 ? businessLines?.[0]?.service : void 0;
2472
2512
  const [selectedService, setSelectedService] = useState(
2473
2513
  firstService
2474
2514
  );
@@ -2483,16 +2523,15 @@ const SOFUploadModal = (props) => {
2483
2523
  const serviceRadioItems = useMemo(() => {
2484
2524
  return businessLines.map((businessLine) => ({
2485
2525
  id: businessLine.service,
2486
- name: getServiceTranslationKey((businessLine == null ? void 0 : businessLine.service) || "")
2526
+ name: getServiceTranslationKey(businessLine?.service || "")
2487
2527
  }));
2488
2528
  }, [businessLines]);
2489
2529
  const canUpload = useMemo(() => selectedService && documentType, [selectedService, documentType]);
2490
- const selectedBusinessLineId = ((_b = businessLines == null ? void 0 : businessLines.find((businessLine) => businessLine.service === selectedService)) == null ? void 0 : _b.id) || "";
2530
+ const selectedBusinessLineId = businessLines?.find((businessLine) => businessLine.service === selectedService)?.id || "";
2491
2531
  const documentLists = useMemo(() => {
2492
- var _a2, _b2;
2493
- const selectedType = (_b2 = (_a2 = businessLines == null ? void 0 : businessLines.find(
2532
+ const selectedType = businessLines?.find(
2494
2533
  (businessLine) => businessLine.service === selectedService
2495
- )) == null ? void 0 : _a2.sourceOfFunds) == null ? void 0 : _b2.type;
2534
+ )?.sourceOfFunds?.type;
2496
2535
  if (selectedType) {
2497
2536
  const lists = getDocumentLists(selectedType);
2498
2537
  const items = lists.map((list) => ({
@@ -2536,7 +2575,7 @@ const SOFUploadModal = (props) => {
2536
2575
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Modal, { onClose: handleModalClose, ariaLabel: i18n.get("uploadASupportingDocument"), inset: true, children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsModal, children: [
2537
2576
  /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: i18n.get("uploadASupportingDocument") }),
2538
2577
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContent, children: [
2539
- (businessLines == null ? void 0 : businessLines.length) > 1 ? /* @__PURE__ */ jsx(
2578
+ businessLines?.length > 1 ? /* @__PURE__ */ jsx(
2540
2579
  Field,
2541
2580
  {
2542
2581
  el: "fieldset",
@@ -2578,9 +2617,9 @@ const SOFUploadModal = (props) => {
2578
2617
  )
2579
2618
  }
2580
2619
  ),
2581
- (documentRequirements == null ? void 0 : documentRequirements.length) ? /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContentRequirementsContainer, children: [
2620
+ documentRequirements?.length ? /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContentRequirementsContainer, children: [
2582
2621
  /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "div", children: i18n.get("documentShouldShow") }),
2583
- /* @__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)) })
2622
+ /* @__PURE__ */ jsx("ul", { children: documentRequirements?.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "div", children: i18n.get(requirement) }) }, requirement)) })
2584
2623
  ] }) : null,
2585
2624
  canUpload && /* @__PURE__ */ jsx(
2586
2625
  Dropzone,
@@ -2604,7 +2643,6 @@ const SourceOfFundsUpload = ({
2604
2643
  legalEntity,
2605
2644
  handleNavigateToSummary
2606
2645
  }) => {
2607
- var _a;
2608
2646
  const { i18n } = useI18nContext();
2609
2647
  const [showUploadModal, setShowUploadModal] = useState(false);
2610
2648
  const [docToDelete, setDocToDelete] = useState(void 0);
@@ -2621,16 +2659,10 @@ const SourceOfFundsUpload = ({
2621
2659
  setShowUploadModal(true);
2622
2660
  };
2623
2661
  const documents = useMemo(
2624
- () => {
2625
- var _a2;
2626
- return ((_a2 = legalEntity.documentDetails) == null ? void 0 : _a2.filter((doc) => doc.type === "proofOfFundingOrWealthSource")) ?? [];
2627
- },
2662
+ () => legalEntity.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [],
2628
2663
  [legalEntity]
2629
2664
  );
2630
- const sourceOfFundsCategories = (_a = businessLines == null ? void 0 : businessLines.map((line) => {
2631
- var _a2;
2632
- return (_a2 = line.sourceOfFunds) == null ? void 0 : _a2.type;
2633
- })) == null ? void 0 : _a.filter(Boolean);
2665
+ const sourceOfFundsCategories = businessLines?.map((line) => line.sourceOfFunds?.type)?.filter(Boolean);
2634
2666
  const handleFileDelete = async (documentId) => {
2635
2667
  if (documentUtils.deleteDocument) {
2636
2668
  try {
@@ -2652,7 +2684,7 @@ const SourceOfFundsUpload = ({
2652
2684
  return /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadList, children: [
2653
2685
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadListHeading, children: [
2654
2686
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("supportingDocuments") }),
2655
- /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children: (sourceOfFundsCategories == null ? void 0 : sourceOfFundsCategories.length) > 1 ? i18n.get("weNeedProofOfFundingPlural", {
2687
+ /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children: sourceOfFundsCategories?.length > 1 ? i18n.get("weNeedProofOfFundingPlural", {
2656
2688
  values: {
2657
2689
  category1_name: sourceOfFundsCategories[0] ? i18n.get(
2658
2690
  `sofType${toCapitalized(sourceOfFundsCategories[0])}Label`
@@ -2669,7 +2701,7 @@ const SourceOfFundsUpload = ({
2669
2701
  }
2670
2702
  }) })
2671
2703
  ] }),
2672
- documents == null ? void 0 : documents.map((document) => /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
2704
+ documents?.map((document) => /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
2673
2705
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
2674
2706
  /* @__PURE__ */ jsx(Avatar, { iconName: "document", circle: true }),
2675
2707
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
@@ -2701,18 +2733,18 @@ const SourceOfFundsUpload = ({
2701
2733
  ] })
2702
2734
  }
2703
2735
  ),
2704
- 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") }) }),
2736
+ 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") }) }),
2705
2737
  !!docToDelete && /* @__PURE__ */ jsx(
2706
2738
  Confirm,
2707
2739
  {
2708
2740
  title: i18n.get({
2709
2741
  key: "areYouSureYouWantToDeleteThisDocument",
2710
2742
  values: {
2711
- deleteDocName: (docToDelete == null ? void 0 : docToDelete.fileName) || ""
2743
+ deleteDocName: docToDelete?.fileName || ""
2712
2744
  }
2713
2745
  }),
2714
2746
  confirmText: i18n.get("delete"),
2715
- onConfirm: () => handleFileDelete(docToDelete == null ? void 0 : docToDelete.id),
2747
+ onConfirm: () => handleFileDelete(docToDelete?.id),
2716
2748
  onCancel: () => setDocToDelete(void 0),
2717
2749
  critical: true
2718
2750
  }
@@ -2733,7 +2765,6 @@ function SourceOfFundsDropin({
2733
2765
  problems,
2734
2766
  handleHomeClick
2735
2767
  }) {
2736
- var _a, _b, _c;
2737
2768
  const { data: legalEntity, isLoading: isLoadingRootLegalEntity } = useLegalEntity(ROOT_LE);
2738
2769
  const [loadingStatus, setLoadingStatus] = useState("success");
2739
2770
  const [activeBusinessLine, setActiveBusinessLine] = useState();
@@ -2751,33 +2782,24 @@ function SourceOfFundsDropin({
2751
2782
  const { i18n } = useI18nContext();
2752
2783
  const userEvents = useAnalyticsContext();
2753
2784
  const { showToast } = useToastContext();
2754
- const { data: businessLinesData } = useBusinessLines();
2785
+ const { data: businessLinesData, isLoading: isLoadingBusinessLines } = useBusinessLines();
2755
2786
  const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
2756
2787
  const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
2757
2788
  const { mutateAsync: updateSoFMutation } = useUpdateSourceOfFunds();
2758
2789
  const filteredBusinessLines = useMemo(() => {
2759
- return businessLinesData == null ? void 0 : businessLinesData.filter(
2790
+ return businessLinesData?.filter(
2760
2791
  (businessLine) => ALLOWED_SOF_SERVICES.includes(businessLine.service)
2761
2792
  );
2762
2793
  }, [businessLinesData]);
2763
2794
  const isSoFDocumentMissing = useMemo(
2764
- () => {
2765
- var _a2;
2766
- return ((_a2 = legalEntity == null ? void 0 : legalEntity.problems) == null ? void 0 : _a2.some(
2767
- (problem) => {
2768
- var _a3;
2769
- return (_a3 = problem == null ? void 0 : problem.verificationErrors) == null ? void 0 : _a3.some(
2770
- (verificationError) => (verificationError == null ? void 0 : verificationError.code) === MISSING_DATA_SOF_UPLOAD_CODE
2771
- );
2772
- }
2773
- )) ?? false;
2774
- },
2775
- [legalEntity == null ? void 0 : legalEntity.problems]
2795
+ () => legalEntity?.problems?.some(
2796
+ (problem) => problem?.verificationErrors?.some(
2797
+ (verificationError) => verificationError?.code === MISSING_DATA_SOF_UPLOAD_CODE
2798
+ )
2799
+ ) ?? false,
2800
+ [legalEntity?.problems]
2776
2801
  );
2777
- const idsToFetch = (filteredBusinessLines == null ? void 0 : filteredBusinessLines.map((businessLine) => {
2778
- var _a2;
2779
- return (_a2 = businessLine.sourceOfFunds) == null ? void 0 : _a2.originatorLegalEntityId;
2780
- }).filter((id) => Boolean(id))) ?? [];
2802
+ const idsToFetch = filteredBusinessLines?.map((businessLine) => businessLine.sourceOfFunds?.originatorLegalEntityId).filter((id) => Boolean(id)) ?? [];
2781
2803
  const legalEntityResults = useLegalEntities(idsToFetch, {
2782
2804
  staleTime: 5 * 60 * 1e3
2783
2805
  // 5 minutes
@@ -2788,7 +2810,6 @@ function SourceOfFundsDropin({
2788
2810
  return null;
2789
2811
  }
2790
2812
  return filteredBusinessLines.map((businessLine, index) => {
2791
- var _a2;
2792
2813
  const result = legalEntityResults[index];
2793
2814
  let updatedBusinessLine = { ...businessLine };
2794
2815
  if (result && result.data) {
@@ -2797,7 +2818,7 @@ function SourceOfFundsDropin({
2797
2818
  logger.error(`Error fetching legal entity for BL ${businessLine.id}:`, result.error);
2798
2819
  showToast({ label: i18n.get("unableToLoadRelatedEntity"), variant: "error" });
2799
2820
  }
2800
- if ((_a2 = updatedBusinessLine.sourceOfFunds) == null ? void 0 : _a2.adyenProcessedFunds) {
2821
+ if (updatedBusinessLine.sourceOfFunds?.adyenProcessedFunds) {
2801
2822
  updatedBusinessLine.sourceOfFunds.type = "adyen";
2802
2823
  }
2803
2824
  return updatedBusinessLine;
@@ -2845,34 +2866,28 @@ function SourceOfFundsDropin({
2845
2866
  });
2846
2867
  }, [userEvents]);
2847
2868
  const canSubmitForm = useMemo(
2848
- () => {
2849
- var _a2, _b2;
2850
- return activeSourceOfFund ? !isEmpty((_b2 = (_a2 = currentState.data) == null ? void 0 : _a2.sourceOfFundsType) == null ? void 0 : _b2.type) && hasDataChanged(activeSourceOfFund, currentState.data) : false;
2851
- },
2869
+ () => activeSourceOfFund ? !isEmpty(currentState.data?.sourceOfFundsType?.type) && hasDataChanged(activeSourceOfFund, currentState.data) : false,
2852
2870
  [activeSourceOfFund, currentState.data]
2853
2871
  );
2854
2872
  const derivedProps = useMemo(
2855
2873
  () => getPropsFromConfigurations(
2856
2874
  {},
2857
2875
  sourceOfFundsForms,
2858
- (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [],
2859
- (problems == null ? void 0 : problems.missingData) ?? [],
2876
+ problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
2877
+ problems?.missingData ?? [],
2860
2878
  // TODO fix this to take existing fields into account
2861
2879
  // getFieldsWithExistingData(legalEntityResponse, sourceOfFundsApiKeyMapping),
2862
2880
  [],
2863
2881
  {},
2864
2882
  {},
2865
2883
  {},
2866
- legalEntity == null ? void 0 : legalEntity.type
2884
+ legalEntity?.type
2867
2885
  ),
2868
- [problems == null ? void 0 : problems.remediationActions, problems == null ? void 0 : problems.missingData, legalEntity]
2886
+ [problems?.remediationActions, problems?.missingData, legalEntity]
2869
2887
  );
2870
2888
  const sourceOfFundsRequiredForms = useMemo(
2871
- () => {
2872
- var _a2;
2873
- return getSourceOfFundsRequiredForms((_a2 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _a2.sourceOfFundsType);
2874
- },
2875
- [(_a = currentState == null ? void 0 : currentState.data) == null ? void 0 : _a.sourceOfFundsType]
2889
+ () => getSourceOfFundsRequiredForms(currentState?.data?.sourceOfFundsType),
2890
+ [currentState?.data?.sourceOfFundsType]
2876
2891
  );
2877
2892
  const forms = useMemo(() => {
2878
2893
  const requiredForms = getRequiredForms(
@@ -2886,9 +2901,9 @@ function SourceOfFundsDropin({
2886
2901
  const createOrUpdateOriginator = async (additionalData) => {
2887
2902
  let originatorLegalEntityId;
2888
2903
  const sofOriginator = parseSofOriginatorPayload(additionalData);
2889
- if (additionalData == null ? void 0 : additionalData.originatorLegalEntityId) {
2904
+ if (additionalData?.originatorLegalEntityId) {
2890
2905
  try {
2891
- sofOriginator.id = additionalData == null ? void 0 : additionalData.originatorLegalEntityId;
2906
+ sofOriginator.id = additionalData?.originatorLegalEntityId;
2892
2907
  if (sofOriginator.type) {
2893
2908
  delete sofOriginator.type;
2894
2909
  }
@@ -2897,14 +2912,14 @@ function SourceOfFundsDropin({
2897
2912
  id: sofOriginator.id
2898
2913
  };
2899
2914
  const le = await updateLegalEntity(patchLegalEntity);
2900
- originatorLegalEntityId = le == null ? void 0 : le.id;
2915
+ originatorLegalEntityId = le?.id;
2901
2916
  } catch (e) {
2902
2917
  logger.log("Error updating originator legal entity", e);
2903
2918
  }
2904
2919
  } else {
2905
2920
  try {
2906
2921
  const le = await createLegalEntity(sofOriginator);
2907
- originatorLegalEntityId = le == null ? void 0 : le.id;
2922
+ originatorLegalEntityId = le?.id;
2908
2923
  } catch (e) {
2909
2924
  logger.log("Error creating originator legal entity", e);
2910
2925
  }
@@ -2912,10 +2927,9 @@ function SourceOfFundsDropin({
2912
2927
  return originatorLegalEntityId;
2913
2928
  };
2914
2929
  const handleSubmit = useCallback(async () => {
2915
- var _a2, _b2;
2916
- const sofData = { ...currentState == null ? void 0 : currentState.data };
2917
- const sofType = (_a2 = sofData == null ? void 0 : sofData.sourceOfFundsType) == null ? void 0 : _a2.type;
2918
- if (!sofType || !(activeBusinessLine == null ? void 0 : activeBusinessLine.id)) {
2930
+ const sofData = { ...currentState?.data };
2931
+ const sofType = sofData?.sourceOfFundsType?.type;
2932
+ if (!sofType || !activeBusinessLine?.id) {
2919
2933
  return;
2920
2934
  }
2921
2935
  const eventsAdditionalData = {};
@@ -2923,11 +2937,16 @@ function SourceOfFundsDropin({
2923
2937
  const { additionalData } = sofData;
2924
2938
  const sofPayload = getSourceOfFundsPayload(sofType, additionalData);
2925
2939
  if (sofType === "donations" || sofType === "inheritance") {
2926
- sofPayload.originatorLegalEntityId = await createOrUpdateOriginator(additionalData);
2927
- eventsAdditionalData.originatorType = (additionalData == null ? void 0 : additionalData.originatorType) ?? "";
2940
+ try {
2941
+ sofPayload.originatorLegalEntityId = await createOrUpdateOriginator(additionalData);
2942
+ } catch (e) {
2943
+ setSofErrorMessage(e?.message || i18n.get("errorUpdatingSourceOfFunds"));
2944
+ logger.log("Error updating source of funds", e);
2945
+ }
2946
+ eventsAdditionalData.originatorType = additionalData?.originatorType ?? "";
2928
2947
  }
2929
2948
  if (sofType === "thirdPartyFunding") {
2930
- eventsAdditionalData.financiers = `${((_b2 = additionalData == null ? void 0 : additionalData.financiers) == null ? void 0 : _b2.length) || 0} investor(s)`;
2949
+ eventsAdditionalData.financiers = `${additionalData?.financiers?.length || 0} investor(s)`;
2931
2950
  }
2932
2951
  const sofMutationPayload = {
2933
2952
  ...sofPayload,
@@ -2945,13 +2964,14 @@ function SourceOfFundsDropin({
2945
2964
  setActiveSourceOfFund({});
2946
2965
  gotoFormByFormIndex(0);
2947
2966
  setSofErrorMessage("");
2948
- handleHomeClick == null ? void 0 : handleHomeClick();
2967
+ showToast({ label: i18n.get("successAddedFundingSources"), variant: "success" });
2968
+ handleHomeClick?.();
2949
2969
  } catch (e) {
2950
- setSofErrorMessage((e == null ? void 0 : e.message) || i18n.get("errorUpdatingSourceOfFunds"));
2970
+ setSofErrorMessage(e?.message || i18n.get("errorUpdatingSourceOfFunds"));
2951
2971
  logger.log("Error updating source of funds", e);
2952
2972
  }
2953
2973
  setLoadingStatus("success");
2954
- }, [currentState == null ? void 0 : currentState.data, handleHomeClick]);
2974
+ }, [currentState?.data, handleHomeClick]);
2955
2975
  const handleGettingStarted = useCallback(() => {
2956
2976
  setGettingStarted(!gettingStarted);
2957
2977
  }, [gettingStarted]);
@@ -2984,14 +3004,14 @@ function SourceOfFundsDropin({
2984
3004
  const handleNavigateToUploadPage = () => {
2985
3005
  setShowUploadPage(true);
2986
3006
  };
2987
- return /* @__PURE__ */ jsx("div", { className: styles.sourceOfFunds, children: loading || isLoadingRootLegalEntity ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
3007
+ return /* @__PURE__ */ jsx("div", { className: styles.sourceOfFunds, children: loading || isLoadingRootLegalEntity || isLoadingBusinessLines || areLegalEntitiesLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
2988
3008
  gettingStarted && !showUploadPage && legalEntity && /* @__PURE__ */ jsx(
2989
3009
  SourceOfFundsGettingStarted,
2990
3010
  {
2991
3011
  handleCancelClick: handleHomeClick,
2992
3012
  handleGettingStartedClick: handleGettingStarted,
2993
3013
  businessLines: allBusinessLines,
2994
- problems: legalEntity == null ? void 0 : legalEntity.problems,
3014
+ problems: legalEntity?.problems,
2995
3015
  handleSourceOfFundsClick,
2996
3016
  handleNavigateToUploadPage,
2997
3017
  legalEntity,
@@ -3032,7 +3052,7 @@ function SourceOfFundsDropin({
3032
3052
  activeForm,
3033
3053
  shouldValidate,
3034
3054
  activeBusinessLine,
3035
- sourceOfFundsType: (_c = (_b = currentState == null ? void 0 : currentState.data) == null ? void 0 : _b.sourceOfFundsType) == null ? void 0 : _c.type,
3055
+ sourceOfFundsType: currentState?.data?.sourceOfFundsType?.type,
3036
3056
  ref: formRef,
3037
3057
  data: activeSourceOfFund
3038
3058
  }
@@ -3047,7 +3067,7 @@ const SourceOfFundsPage = ({ onSubmit, handleHomeClick }) => {
3047
3067
  if (!rootLe) {
3048
3068
  return /* @__PURE__ */ jsx(Loader, {});
3049
3069
  }
3050
- const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityType.LEGAL_ENTITY, rootLe.id) : void 0;
3070
+ const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, rootLe.id) : void 0;
3051
3071
  return /* @__PURE__ */ jsx(
3052
3072
  SourceOfFundsDropin,
3053
3073
  {