@adyen/kyc-components 4.0.1 → 4.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1393) hide show
  1. package/README.md +43 -31
  2. package/dist/4-people-BtDi7O9A.js +24 -0
  3. package/dist/AcceptTermsOfServiceComponent-DBf9qvsO.js +650 -0
  4. package/dist/Accordion-CqtzWVjL.js +88 -0
  5. package/dist/AccountSetupRejected-B_bbYtM2.js +26 -0
  6. package/dist/ActionBar-Dnv6j3rc.js +31 -0
  7. package/dist/Address-CbJvGOYV.js +1112 -0
  8. package/dist/Alert-uX8GYjqW.js +169 -0
  9. package/dist/Avatar-Cj2W0_1v.js +60 -0
  10. package/dist/BG-HKzabLqZ.js +27 -0
  11. package/dist/BusinessFinancingComponent-Bx2K8iN3.js +55 -0
  12. package/dist/BusinessFinancingDropin-CKsHfJ2J.js +2235 -0
  13. package/dist/BusinessFinancingPage-DmnaOPvo.js +43 -0
  14. package/dist/BusinessTypeSelectionPage-Bz0czSjO.js +440 -0
  15. package/dist/Card-OQuFzmxm.js +90 -0
  16. package/dist/Checkbox-BSxszx-9.js +74 -0
  17. package/dist/Confirm-DviRmz4e.js +64 -0
  18. package/dist/ConstitutionalDocument-hcS_-kxn.js +2361 -0
  19. package/dist/ContactDetails-BHn4lDFA.js +396 -0
  20. package/dist/ContextGuidance-BgMTeWIT.js +34 -0
  21. package/dist/ContractViewer-DcQHIGMU.js +935 -0
  22. package/dist/CountryField-D-WDIPSz.js +66 -0
  23. package/dist/CreateIndividualComponent-BJnGALzE.js +65 -0
  24. package/dist/CreateTransferInstrumentComponent-BudZmP_i.js +56 -0
  25. package/dist/Currency-BmTfhWzY.js +238 -0
  26. package/dist/CustomerSupport-C5g_pNY4.js +156 -0
  27. package/dist/DebugModal-C46w3DN5.js +416 -0
  28. package/dist/DecisionMakerDetailsPage-CMDK81px.js +104 -0
  29. package/dist/DecisionMakers-BbHkdcWY.js +858 -0
  30. package/dist/Dropzone-DMzbyRRZ.js +224 -0
  31. package/dist/EmbeddedStatus-Cto-qd3u.js +97 -0
  32. package/dist/EndStateLayout-Ds-6EhEu.js +71 -0
  33. package/dist/EntityAssociation-CAyTgh0S.js +178 -0
  34. package/dist/EntityGuidanceStatus-BdYW3yoc.js +106 -0
  35. package/dist/ErrorPanel-Doqj6bY8.js +194 -0
  36. package/dist/Field-CpaVW2RZ.js +141 -0
  37. package/dist/FormNavigation-D8lokOpO.js +144 -0
  38. package/dist/FormWrapper--B4boODe.js +135 -0
  39. package/dist/Header-hKHJmYRN.js +83 -0
  40. package/dist/Image-DIxxTupT.js +27 -0
  41. package/dist/Individual.rules-BAgQIMbK.js +383 -0
  42. package/dist/IndividualDropin-CpAEsMsL.js +5168 -0
  43. package/dist/InputDate-CoQAEyvT.js +43 -0
  44. package/dist/InputGroup-WBfGDV5F.js +32 -0
  45. package/dist/InputText-DmFCHVKa.js +134 -0
  46. package/dist/Introduction-DlnfG2qx.js +256 -0
  47. package/dist/JpAddress-D9wzTLlZ.js +329 -0
  48. package/dist/LandingLayout-pnTFiHf3.js +60 -0
  49. package/dist/LegalCompanyNameField-BOTkQIk6.js +138 -0
  50. package/dist/LegalRepresentativeDetailsPage-CnYE0t7-.js +55 -0
  51. package/dist/Link-B1s8_T7-.js +35 -0
  52. package/dist/List-BAzyC6sw.js +83 -0
  53. package/dist/ListItem-Coa9aGdN.js +69 -0
  54. package/dist/LoaderWrapper-YTarCjI9.js +42 -0
  55. package/dist/ManageIndividualComponent-D_RLxMfQ.js +46 -0
  56. package/dist/ManageTermsOfServiceComponent-VzhHb2cE.js +52 -0
  57. package/dist/ManageTransferInstrumentComponent-DevLP2pk.js +292 -0
  58. package/dist/MaskedInput-DEaltj9a.js +811 -0
  59. package/dist/MaybeModal-BcNIbjko.js +36 -0
  60. package/dist/Modal-sn2wYRN6.js +147 -0
  61. package/dist/Name-0TfRqG2t.js +81 -0
  62. package/dist/OnboardingDropinComponent-xFXjVEe0.js +2672 -0
  63. package/dist/PayoutDetailsDropin-popMzwBb.js +4972 -0
  64. package/dist/ProgressBar-B7gTQncy.js +47 -0
  65. package/dist/Radio-BMtxBpnn.js +39 -0
  66. package/dist/RadioGroup-B7fMJqmd.js +100 -0
  67. package/dist/RadioGroupCard-BqnCzi0b.js +152 -0
  68. package/dist/Review-DiV6r3gZ.js +84 -0
  69. package/dist/RootBusinessDetailsPage-BfQ4Pwdu.js +50 -0
  70. package/dist/RootBusinessLinesPage-CiZs8smP.js +1553 -0
  71. package/dist/RootIndividualDetailsPage-C92QtbjO.js +62 -0
  72. package/dist/Select-Cb77B0ji.js +868 -0
  73. package/dist/SignPCIComponent-B83OWndG.js +307 -0
  74. package/dist/SingpassSelection-Cc-ulD5h.js +132 -0
  75. package/dist/SoleProprietorshipPage-BYZkXtGh.js +50 -0
  76. package/dist/SourceOfFundsPage-DorVNEQ9.js +2162 -0
  77. package/dist/Spacer-BK3jDget.js +18 -0
  78. package/dist/StepProgressIndicator-DJ9FpFXO.js +78 -0
  79. package/dist/StoreProvider-qjyWZhxu.js +4845 -0
  80. package/dist/StructuredList-BNLhk_zV.js +61 -0
  81. package/dist/Summary-Bgq_Kcjg.js +220 -0
  82. package/dist/TaskVerificationStatus-DOZKjK09.js +129 -0
  83. package/dist/TaxInformationField-Dxx36AGr.js +3735 -0
  84. package/dist/TaxReportingDropin-tQf3UTtj.js +503 -0
  85. package/dist/TextArea-B4QNgWAM.js +103 -0
  86. package/dist/TileGroup-Dwrh9ZxO.js +203 -0
  87. package/dist/TrustDetailsPage-CKFlO2Ug.js +2187 -0
  88. package/dist/TrustMemberCompanyPage-BeeQ4TlK.js +68 -0
  89. package/dist/TrustMemberIndividualPage-cPDpa-cf.js +64 -0
  90. package/dist/TrustMemberRoleAndTypePage-C_isMpuS.js +1081 -0
  91. package/dist/TrustMembersOverview-CixBpWbT.js +439 -0
  92. package/dist/UnincorporatedPartnershipIndividualPage-BvVu1mfm.js +63 -0
  93. package/dist/UnincorporatedPartnershipMemberCompanyPage-HFF2AWev.js +71 -0
  94. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-DWRiDapM.js +292 -0
  95. package/dist/UnincorporatedPartnershipMembersOverview-BgxWBXQP.js +173 -0
  96. package/dist/VerificationErrorAlert-DjNgDy5_.js +60 -0
  97. package/dist/ViewVerificationStatusComponent-BZWz8bMd.js +181 -0
  98. package/dist/accountHolderUtils-dRujT8-D.js +66 -0
  99. package/dist/adyen-business-financing.js +13 -5
  100. package/dist/adyen-individual-configuration.js +8 -4
  101. package/dist/adyen-individual-status.js +5 -4
  102. package/dist/adyen-invited-decision-maker.js +87 -0
  103. package/dist/adyen-kyc-components.js +23 -21
  104. package/dist/adyen-onboarding.js +8 -4
  105. package/dist/adyen-terms-of-service-management.js +8 -4
  106. package/dist/adyen-terms-of-service-status.js +5 -4
  107. package/dist/adyen-transfer-instrument-configuration.js +8 -4
  108. package/dist/adyen-transfer-instrument-management.js +5 -4
  109. package/dist/adyen-verification-status.js +8 -4
  110. package/dist/arrow-right-BoqwUH_d.js +14 -0
  111. package/dist/bafinUtils-CyvEB6AP.js +80 -0
  112. package/dist/bag-BXVWLrwo.js +14 -0
  113. package/dist/bank-1GvaHPAZ.js +14 -0
  114. package/dist/bg-BG-6XzbmxcW.js +13 -0
  115. package/dist/bg-BG-C6kad3Qr.js +61 -0
  116. package/dist/bg-BG-CEipapl4.js +63 -0
  117. package/dist/bg-BG-CFuVZnaC.js +13 -0
  118. package/dist/bg-BG-DAqp35Dx.js +13 -0
  119. package/dist/bg-BG-DMNRRZZE.js +75 -0
  120. package/dist/bg-BG-DyX-yYYI.js +13 -0
  121. package/dist/bg-BG-K7feXvEc.js +38 -0
  122. package/dist/bg-BG-zZhDshGi.js +65 -0
  123. package/dist/bin-Ba-3ll8T.js +18 -0
  124. package/dist/business-lines-BAqTbnBw.js +135 -0
  125. package/dist/capital-9TKHySO7.js +17 -0
  126. package/dist/cash-stack-DwYu4xNy.js +22 -0
  127. package/dist/certificate-N2YFedpI.js +17 -0
  128. package/dist/checkmark-D9dGhGpG.js +14 -0
  129. package/dist/checkmark-circle-CFWClLQ6.js +20 -0
  130. package/dist/checkmark-circle-fill-DEB-tuGl.js +17 -0
  131. package/dist/checkmark-small-D3VNx2lo.js +14 -0
  132. package/dist/chevron-down-C7SUSYfl.js +14 -0
  133. package/dist/chevron-left-BXmd-S46.js +14 -0
  134. package/dist/chevron-right-jE6RwM2B.js +14 -0
  135. package/dist/chevron-up-BdfNcqzq.js +14 -0
  136. package/dist/circle-BJPTMCWB.js +17 -0
  137. package/dist/circle-small-filled-BuO8Vg8j.js +14 -0
  138. package/dist/clock-DAzaBRWk.js +20 -0
  139. package/dist/coins-DYdzG5e_.js +17 -0
  140. package/dist/commonValidators-C9eSN1bv.js +24 -0
  141. package/dist/company-types-value-D_mKv5PT.js +23 -0
  142. package/dist/contract-BfJb1t6M.js +14 -0
  143. package/dist/cross-CDS_eot4.js +14 -0
  144. package/dist/cross-circle-fill-C-EJ57Yn.js +17 -0
  145. package/dist/cross-circle-fill-small-DkPjsuBH.js +14 -0
  146. package/dist/cs-CZ-BD5bYeuJ.js +13 -0
  147. package/dist/cs-CZ-BHbWTH_v.js +63 -0
  148. package/dist/cs-CZ-C6vEQ8P9.js +13 -0
  149. package/dist/cs-CZ-CYQO0o5V.js +38 -0
  150. package/dist/cs-CZ-CYsR__kj.js +13 -0
  151. package/dist/cs-CZ-C_GFp3nV.js +61 -0
  152. package/dist/cs-CZ-Ck22NTT9.js +65 -0
  153. package/dist/cs-CZ-DXSMRqPu.js +75 -0
  154. package/dist/cs-CZ-Ke47w0bj.js +13 -0
  155. package/dist/currency-CrdnaaDu.js +35 -0
  156. package/dist/da-DK-B3Pg-MWO.js +13 -0
  157. package/dist/da-DK-C60mLiV1.js +61 -0
  158. package/dist/da-DK-CGWvmdkq.js +38 -0
  159. package/dist/da-DK-Cd5IQPv3.js +75 -0
  160. package/dist/da-DK-Cx4-hLO1.js +13 -0
  161. package/dist/da-DK-DQ4ZYSea.js +65 -0
  162. package/dist/da-DK-DzcTI92X.js +13 -0
  163. package/dist/da-DK-h8DYQ_Iq.js +13 -0
  164. package/dist/da-DK-vcVNQJbX.js +63 -0
  165. package/dist/datasetUtil-BHQp0-xL.js +58 -0
  166. package/dist/de-DE-C9NH2zMh.js +75 -0
  167. package/dist/de-DE-CL8D8vKZ.js +13 -0
  168. package/dist/de-DE-CWEW2yqg.js +63 -0
  169. package/dist/de-DE-CkbOZ6S_.js +65 -0
  170. package/dist/de-DE-Cvz1TGdB.js +61 -0
  171. package/dist/de-DE-DHDJhahG.js +38 -0
  172. package/dist/de-DE-LQE_LFFL.js +13 -0
  173. package/dist/de-DE-S6qDey1L.js +13 -0
  174. package/dist/de-DE-dPfrbCii.js +13 -0
  175. package/dist/debouncedInputEvent-Cv2S512Y.js +46 -0
  176. package/dist/decision-makers-group-DrvpnEqj.js +1944 -0
  177. package/dist/digital-wallet-Bx5YM1LY.js +46 -0
  178. package/dist/document-1-qlSTF558.js +14 -0
  179. package/dist/document-blurred-BiWap0xs.js +37 -0
  180. package/dist/document-cut-off-aQezqOif.js +32 -0
  181. package/dist/document-expired-BhBXaWWQ.js +38 -0
  182. package/dist/document-front-DYuhZGeQ.js +30 -0
  183. package/dist/document-person-CDbnTOdV.js +20 -0
  184. package/dist/download-BZQB1WkZ.js +17 -0
  185. package/dist/dropinUtils-CAGEedke.js +200 -0
  186. package/dist/edit-1-DAqtnOIx.js +14 -0
  187. package/dist/el-GR-B78b9rSH.js +63 -0
  188. package/dist/el-GR-DGbzdIL0.js +13 -0
  189. package/dist/el-GR-DHNlnOwf.js +38 -0
  190. package/dist/el-GR-DSlgFwLb.js +61 -0
  191. package/dist/el-GR-DTHQslLc.js +75 -0
  192. package/dist/el-GR-Dazirlmt.js +13 -0
  193. package/dist/el-GR-DoS_Va-n.js +13 -0
  194. package/dist/el-GR-DudORw4U.js +65 -0
  195. package/dist/el-GR-Dvv3-Qib.js +13 -0
  196. package/dist/en-US-AgtwE4Fl.js +63 -0
  197. package/dist/en-US-BSQXKu6d.js +54 -0
  198. package/dist/en-US-CjjPhkB5.js +65 -0
  199. package/dist/en-US-D1sB335h.js +61 -0
  200. package/dist/en-US-DLY20x1O.js +13 -0
  201. package/dist/en-US-DoiQhi0j.js +38 -0
  202. package/dist/en-US-G607HIyo.js +75 -0
  203. package/dist/en-US-cVpRgdC8.js +13 -0
  204. package/dist/es-ES--IvNed_Q.js +13 -0
  205. package/dist/es-ES-BAolMrZ0.js +65 -0
  206. package/dist/es-ES-BYl5-PFR.js +13 -0
  207. package/dist/es-ES-CDgjGql5.js +63 -0
  208. package/dist/es-ES-CxnsKEh4.js +38 -0
  209. package/dist/es-ES-DK-7qtDf.js +75 -0
  210. package/dist/es-ES-DdGmXdxO.js +13 -0
  211. package/dist/es-ES-Dj5-YMmZ.js +61 -0
  212. package/dist/es-ES-Vn4AcK9-.js +13 -0
  213. package/dist/et-EE-4fHYOoff.js +13 -0
  214. package/dist/et-EE-BOIrYrz9.js +65 -0
  215. package/dist/et-EE-BQixWUEV.js +38 -0
  216. package/dist/et-EE-BeZJ4Ub1.js +13 -0
  217. package/dist/et-EE-Bij5j-z5.js +61 -0
  218. package/dist/et-EE-CsTXSlnY.js +13 -0
  219. package/dist/et-EE-D0PMC4ie.js +63 -0
  220. package/dist/et-EE-D5SNtVsM.js +13 -0
  221. package/dist/et-EE-DNC4hcxm.js +75 -0
  222. package/dist/external-link-Cg6pJaSJ.js +14 -0
  223. package/dist/fi-FI-57-xkioo.js +38 -0
  224. package/dist/fi-FI-B2xHiSHi.js +61 -0
  225. package/dist/fi-FI-BJLU1JHw.js +75 -0
  226. package/dist/fi-FI-BUixKfXH.js +13 -0
  227. package/dist/fi-FI-CIYa9SyS.js +13 -0
  228. package/dist/fi-FI-CWIaV6Iz.js +13 -0
  229. package/dist/fi-FI-CsZlDJFb.js +63 -0
  230. package/dist/fi-FI-D8WrLxxq.js +65 -0
  231. package/dist/fi-FI-DFxljML-.js +13 -0
  232. package/dist/fieldConfigurations-BUT9DTUH.js +21 -0
  233. package/dist/filterProblemsByTaskForms-Cz7iQtms.js +30 -0
  234. package/dist/form-rules-DhbF2mY4.js +13 -0
  235. package/dist/formUtils-BYIcPMjp.js +107 -0
  236. package/dist/fr-FR-B2je0smB.js +75 -0
  237. package/dist/fr-FR-BM-qNLci.js +13 -0
  238. package/dist/fr-FR-Beljeilc.js +65 -0
  239. package/dist/fr-FR-BxiX8Zfi.js +38 -0
  240. package/dist/fr-FR-CCb4Oux7.js +13 -0
  241. package/dist/fr-FR-CNQtWSXx.js +61 -0
  242. package/dist/fr-FR-DPehHVb6.js +13 -0
  243. package/dist/fr-FR-VoxPkXSc.js +63 -0
  244. package/dist/fr-FR-l5z31r7i.js +13 -0
  245. package/dist/funds-in-CInoUdmG.js +21 -0
  246. package/dist/getName-BIUEu4TI.js +41 -0
  247. package/dist/getProblemsForEntity-BFrbrf8n.js +24 -0
  248. package/dist/getProps-Cc3J2-z9.js +148 -0
  249. package/dist/getTrustedFields-C5-mXl-l.js +64 -0
  250. package/dist/gift-omNInZeB.js +14 -0
  251. package/dist/graph-DunG_uu1.js +21 -0
  252. package/dist/graph-up-BZze4i6m.js +20 -0
  253. package/dist/headquarter-BhpSibFO.js +21 -0
  254. package/dist/hotel-Cp7VgGCJ.js +22 -0
  255. package/dist/house-BhyBQdR3.js +21 -0
  256. package/dist/hr-HR-B6U5Rzzw.js +61 -0
  257. package/dist/hr-HR-BAI0N9bo.js +13 -0
  258. package/dist/hr-HR-BF74vdPD.js +13 -0
  259. package/dist/hr-HR-Bjx-KdVs.js +13 -0
  260. package/dist/hr-HR-BtowKWUi.js +13 -0
  261. package/dist/hr-HR-BynZTNSB.js +38 -0
  262. package/dist/hr-HR-C0NLgF1r.js +75 -0
  263. package/dist/hr-HR-CbdP2tk-.js +63 -0
  264. package/dist/hr-HR-lIHN6Yl2.js +65 -0
  265. package/dist/hu-HU-B-lUkFnQ.js +13 -0
  266. package/dist/hu-HU-BLLoj5CX.js +61 -0
  267. package/dist/hu-HU-BpNDP1I8.js +13 -0
  268. package/dist/hu-HU-BtRIDozk.js +38 -0
  269. package/dist/hu-HU-CWdwNCev.js +65 -0
  270. package/dist/hu-HU-DU-5ujQK.js +75 -0
  271. package/dist/hu-HU-DYhMVR_c.js +13 -0
  272. package/dist/hu-HU-MHIPehPS.js +13 -0
  273. package/dist/hu-HU-pFpTvMiD.js +63 -0
  274. package/dist/id-blurred-B5lHEP8M.js +59 -0
  275. package/dist/id-cut-off-Ba1FRzKO.js +55 -0
  276. package/dist/id-front-CpNWN6nG.js +52 -0
  277. package/dist/id-glare-DgCQON8k.js +49 -0
  278. package/dist/iframeWidget-7rZG5Ja-.js +234 -0
  279. package/dist/image-CmB0ioUM.js +17 -0
  280. package/dist/info-Bb_-xIEK.js +21 -0
  281. package/dist/info-filled-CK8LB339.js +17 -0
  282. package/dist/instant-verification-UrnuHTYn.js +40 -0
  283. package/dist/isEmpty-DhGVlmpA.js +23 -0
  284. package/dist/isNewEntity-7Vw_eQBr.js +13 -0
  285. package/dist/it-IT-5a7NHVFo.js +65 -0
  286. package/dist/it-IT-BAvmkEF8.js +13 -0
  287. package/dist/it-IT-BRO0Hf5X.js +13 -0
  288. package/dist/it-IT-Cr20JO4o.js +61 -0
  289. package/dist/it-IT-D63gRTDc.js +13 -0
  290. package/dist/it-IT-DOBp2-MP.js +13 -0
  291. package/dist/it-IT-DZjw9LNC.js +63 -0
  292. package/dist/it-IT-Dhwa9Ecj.js +75 -0
  293. package/dist/it-IT-masgjk9F.js +38 -0
  294. package/dist/ja-JP-B3Y0VVpN.js +152 -0
  295. package/dist/ja-JP-BZb5ndp9.js +75 -0
  296. package/dist/ja-JP-BeeuQ_LL.js +61 -0
  297. package/dist/ja-JP-BqluCflj.js +63 -0
  298. package/dist/ja-JP-CaUe8KW7.js +27 -0
  299. package/dist/ja-JP-DL0IjTzn.js +13 -0
  300. package/dist/ja-JP-DSvZhFNY.js +65 -0
  301. package/dist/ja-JP-GX3l4yqn.js +125 -0
  302. package/dist/ja-JP-g6VOUGXZ.js +136 -0
  303. package/dist/ja-JP-vv3-YsHU.js +38 -0
  304. package/dist/japanSupportUtils-vwyJ0OrD.js +16 -0
  305. package/dist/jpAddressSchema-DEOyz9Yo.js +26 -0
  306. package/dist/localizeDateString-BjYXf_CF.js +27 -0
  307. package/dist/location-itJfxrDQ.js +17 -0
  308. package/dist/lt-LT-0WbfHH_o.js +61 -0
  309. package/dist/lt-LT-2BMif2Bk.js +38 -0
  310. package/dist/lt-LT-BX8dOAzK.js +13 -0
  311. package/dist/lt-LT-C8n1GZoU.js +75 -0
  312. package/dist/lt-LT-CXw4ywLM.js +63 -0
  313. package/dist/lt-LT-CgalYpUh.js +65 -0
  314. package/dist/lt-LT-DDs3ngzd.js +13 -0
  315. package/dist/lt-LT-DpszrZ9m.js +13 -0
  316. package/dist/lt-LT-WRulV980.js +13 -0
  317. package/dist/lv-LV-B3IqVQos.js +13 -0
  318. package/dist/lv-LV-BZN4-Xat.js +75 -0
  319. package/dist/lv-LV-BuuUUumH.js +61 -0
  320. package/dist/lv-LV-C9Dhkruv.js +13 -0
  321. package/dist/lv-LV-CHdEDRVO.js +38 -0
  322. package/dist/lv-LV-CmB2-IO5.js +13 -0
  323. package/dist/lv-LV-DYqBaW2-.js +63 -0
  324. package/dist/lv-LV-aAd9SEqx.js +65 -0
  325. package/dist/lv-LV-dA8yYdKe.js +13 -0
  326. package/dist/mail-VHTlAusn.js +14 -0
  327. package/dist/manual-verification-BO8zgAYT.js +41 -0
  328. package/dist/mapExistingFile-1MUQJf2c.js +230 -0
  329. package/dist/mapJpAddressSchemaToAddressLocalizations-BCWDaJEu.js +162 -0
  330. package/dist/mapLegalEntityToIndividualSchema-D7Eku9KI.js +206 -0
  331. package/dist/mapTransferInstrumentToPayoutAccount-BYNYjRzc.js +34 -0
  332. package/dist/minus-circle-filled-ZhtJ0GD3.js +17 -0
  333. package/dist/nl-NL-B0fvINJj.js +75 -0
  334. package/dist/nl-NL-CmURERx_.js +65 -0
  335. package/dist/nl-NL-CnvvqAEg.js +13 -0
  336. package/dist/nl-NL-D1b5RUJ0.js +38 -0
  337. package/dist/nl-NL-DV4NqPVW.js +13 -0
  338. package/dist/nl-NL-KQ6bciOb.js +13 -0
  339. package/dist/nl-NL-KsfqCp2v.js +61 -0
  340. package/dist/nl-NL-SjOGmGk5.js +13 -0
  341. package/dist/nl-NL-lcNM54vV.js +63 -0
  342. package/dist/no-NO-B9618F4_.js +13 -0
  343. package/dist/no-NO-BAWVf0GX.js +13 -0
  344. package/dist/no-NO-BdG6WnpB.js +61 -0
  345. package/dist/no-NO-CIKbQbKT.js +13 -0
  346. package/dist/no-NO-CTrVITNu.js +63 -0
  347. package/dist/no-NO-Dkh4SWbB.js +38 -0
  348. package/dist/no-NO-Ds3VioxT.js +13 -0
  349. package/dist/no-NO-Jw7Gae-a.js +75 -0
  350. package/dist/no-NO-qyqWODMp.js +65 -0
  351. package/dist/onfido-logo-BSkKPH10.js +14 -0
  352. package/dist/options-horizontal-GuXvLvV3.js +18 -0
  353. package/dist/partner-QD27Vy4w.js +18 -0
  354. package/dist/passport-blurred-CVG493IJ.js +59 -0
  355. package/dist/passport-cut-off-COzA_TmB.js +56 -0
  356. package/dist/passport-front-WJleLixT.js +52 -0
  357. package/dist/passport-front-green-CZVkCa1n.js +232 -0
  358. package/dist/passport-glare-BP5WnJZj.js +50 -0
  359. package/dist/patternValidators-Ddoxs0Q5.js +83 -0
  360. package/dist/pay-by-link-plane-BpY8Q6-B.js +22 -0
  361. package/dist/payout-DtB68BcZ.js +20 -0
  362. package/dist/payout-verification-instant-BzpfOQLD.js +41 -0
  363. package/dist/payout-verification-manual-gNEoeZkV.js +90 -0
  364. package/dist/person-IVZG3t3_.js +17 -0
  365. package/dist/pl-PL-BgbxWHGE.js +13 -0
  366. package/dist/pl-PL-BkGihn5Q.js +38 -0
  367. package/dist/pl-PL-Bmaq3IC3.js +75 -0
  368. package/dist/pl-PL-CErRPlR2.js +63 -0
  369. package/dist/pl-PL-CTOkaDMG.js +13 -0
  370. package/dist/pl-PL-DEMxxz7h.js +13 -0
  371. package/dist/pl-PL-DW9eaUml.js +61 -0
  372. package/dist/pl-PL-DqzUSnFK.js +13 -0
  373. package/dist/pl-PL-q9azN24o.js +65 -0
  374. package/dist/plaid-logo-FsZ7kfL-.js +14 -0
  375. package/dist/plus-DiALAL8-.js +14 -0
  376. package/dist/plus-circle-filled-BzHtTqEN.js +17 -0
  377. package/dist/process-field-configurations-BgkGx8kj.js +324 -0
  378. package/dist/pt-BR-BRdIEO2O.js +38 -0
  379. package/dist/pt-BR-BaTE6BB_.js +75 -0
  380. package/dist/pt-BR-BdfWE-a1.js +61 -0
  381. package/dist/pt-BR-BfDe_8iW.js +13 -0
  382. package/dist/pt-BR-BxoOF8jB.js +65 -0
  383. package/dist/pt-BR-CLUsrQAl.js +13 -0
  384. package/dist/pt-BR-Ct4s4jXV.js +13 -0
  385. package/dist/pt-BR-DA44Wgbt.js +63 -0
  386. package/dist/pt-BR-zuqB_CBf.js +13 -0
  387. package/dist/pt-PT-BLRgiqFj.js +13 -0
  388. package/dist/pt-PT-BfL7qUzo.js +38 -0
  389. package/dist/pt-PT-CFY1O_K0.js +13 -0
  390. package/dist/pt-PT-DBEsmXQX.js +13 -0
  391. package/dist/pt-PT-F1qPZJ2c.js +13 -0
  392. package/dist/pt-PT-PIiikho9.js +63 -0
  393. package/dist/pt-PT-c0ap84_F.js +75 -0
  394. package/dist/pt-PT-ej54BPbB.js +61 -0
  395. package/dist/pt-PT-pIChDwiI.js +65 -0
  396. package/dist/recurring-DKNs9K3x.js +17 -0
  397. package/dist/reporting-D5ABpLO_.js +16 -0
  398. package/dist/resolveEnvironment-BOoObZUD.js +84 -0
  399. package/dist/revenue-accelerate-D7Sp0V4a.js +17 -0
  400. package/dist/review-D4TUjcWF.js +17 -0
  401. package/dist/ro-RO-0vx6ZLWV.js +13 -0
  402. package/dist/ro-RO-1ZFmLikG.js +61 -0
  403. package/dist/ro-RO-7CJ4F5iB.js +13 -0
  404. package/dist/ro-RO-BPOHV6Wp.js +75 -0
  405. package/dist/ro-RO-BeA_YyJ8.js +13 -0
  406. package/dist/ro-RO-Bv9hZxwD.js +63 -0
  407. package/dist/ro-RO-C00Ig8CL.js +13 -0
  408. package/dist/ro-RO-C2yBVFht.js +38 -0
  409. package/dist/ro-RO-DRsaNX9j.js +65 -0
  410. package/dist/roleMetadata-45H_XXPF.js +66 -0
  411. package/dist/save-BfqO2JBI.js +14 -0
  412. package/dist/search-Cmzbf5zI.js +17 -0
  413. package/dist/show-IdbU1C6P.js +17 -0
  414. package/dist/singpass-logo-wY4xsmTX.js +17 -0
  415. package/dist/singpass-verification-instant-JCqTr7Mv.js +40 -0
  416. package/dist/singpass-verification-manual-DQ7XW6R3.js +34 -0
  417. package/dist/sk-SK-3_SoEn6P.js +75 -0
  418. package/dist/sk-SK-7-enbO1N.js +65 -0
  419. package/dist/sk-SK-BbJWayDh.js +13 -0
  420. package/dist/sk-SK-C74EF23u.js +38 -0
  421. package/dist/sk-SK-ChVwlbp0.js +63 -0
  422. package/dist/sk-SK-Dm-pif_7.js +61 -0
  423. package/dist/sk-SK-DuLm2CVx.js +13 -0
  424. package/dist/sk-SK-DubwJifw.js +13 -0
  425. package/dist/sk-SK-Og9MJXpR.js +13 -0
  426. package/dist/sl-SI-59OQIZ3f.js +13 -0
  427. package/dist/sl-SI-BAIm-qBe.js +13 -0
  428. package/dist/sl-SI-CoI7iOco.js +13 -0
  429. package/dist/sl-SI-CvUzNn9Z.js +38 -0
  430. package/dist/sl-SI-DTvJT7fC.js +65 -0
  431. package/dist/sl-SI-DZHePXbK.js +63 -0
  432. package/dist/sl-SI-DbfswGh0.js +75 -0
  433. package/dist/sl-SI-HO7231cu.js +61 -0
  434. package/dist/sl-SI-hxwQIw_i.js +13 -0
  435. package/dist/solution-payments-DpyE_sdS.js +14 -0
  436. package/dist/store-Btc4GcmU.js +14 -0
  437. package/dist/style.css +2846 -2814
  438. package/dist/styles-CLV89_hH.js +2846 -2814
  439. package/dist/summaryItem-CAQCQSkt.js +18 -0
  440. package/dist/sv-SE-0PQ-U1u6.js +13 -0
  441. package/dist/sv-SE-BZNey_8S.js +13 -0
  442. package/dist/sv-SE-BcJ8p_Tx.js +61 -0
  443. package/dist/sv-SE-BsLkPEzn.js +38 -0
  444. package/dist/sv-SE-CQWBP7n1.js +13 -0
  445. package/dist/sv-SE-ChoPzG_G.js +13 -0
  446. package/dist/sv-SE-D_Efxy3s.js +75 -0
  447. package/dist/sv-SE-Dq56vGlB.js +63 -0
  448. package/dist/sv-SE-N-Hqwcjq.js +65 -0
  449. package/dist/tax-reporting-graph-hgoilCHZ.js +504 -0
  450. package/dist/terminal-1-D1pwXCoi.js +18 -0
  451. package/dist/tink-logo-DDyjz5eJ.js +17 -0
  452. package/dist/types/api/address/useAddressCleanse.d.ts +1 -1
  453. package/dist/types/api/address/useRetrieveAddress.d.ts +1 -1
  454. package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +1 -1
  455. package/dist/types/api/address/useSearchAddress.d.ts +1 -2
  456. package/dist/types/api/businessLines/businessLines.types.d.ts +6 -1
  457. package/dist/types/api/businessLines/useBusinessLines.d.ts +3 -3
  458. package/dist/types/api/businessLines/useCreateBusinessLine.d.ts +2 -2
  459. package/dist/types/api/businessLines/useDeleteBusinessLine.d.ts +2 -2
  460. package/dist/types/api/businessLines/useUpdateBusinessLines.d.ts +2 -2
  461. package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +2 -2
  462. package/dist/types/api/check/useCheck.d.ts +1 -2
  463. package/dist/types/api/companyDataSet/companyDataset.types.d.ts +5 -0
  464. package/dist/types/api/companyDataSet/handleCompanyDataset.d.ts +6 -3
  465. package/dist/types/api/companyDataSet/useClearCompanyData.d.ts +2 -2
  466. package/dist/types/api/companySearch/companySearch.types.d.ts +8 -0
  467. package/dist/types/api/companySearch/useCompanySearch.d.ts +9 -4
  468. package/dist/types/api/companySelection/companySelection.types.d.ts +3 -3
  469. package/dist/types/api/companySelection/useCompanySelection.d.ts +2 -18
  470. package/dist/types/api/configurations/useScenarios.d.ts +3 -161
  471. package/dist/types/api/configurations/useSupportedCountries.d.ts +1 -1
  472. package/dist/types/api/configurations/useTaskTypes.d.ts +1 -1
  473. package/dist/types/api/configurations/useVersionConfiguration.d.ts +1 -1
  474. package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +2 -2
  475. package/dist/types/api/datasets/useLegalForms.d.ts +1 -1
  476. package/dist/types/api/datasets/useNaceCodes.d.ts +1 -1
  477. package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +1 -1
  478. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +2 -4
  479. package/dist/types/api/documents/useCreateDocument.d.ts +2 -2
  480. package/dist/types/api/documents/useDeleteDocument.d.ts +2 -2
  481. package/dist/types/api/documents/useDocument.d.ts +2 -2
  482. package/dist/types/api/documents/useDocuments.d.ts +4 -0
  483. package/dist/types/api/documents/useUpdateDocument.d.ts +2 -2
  484. package/dist/types/api/entityVerifications/useVerifyIdNumber.d.ts +2 -2
  485. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +3 -4
  486. package/dist/types/api/idVerificationProviders/idVerificationStartCheck.d.ts +2 -2
  487. package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +2 -2
  488. package/dist/types/api/idVerificationProviders/useIdVerificationToken.d.ts +3 -3
  489. package/dist/types/api/industryCodes/useIndustryCodes.d.ts +1 -2
  490. package/dist/types/api/legalEntity/useConfirmReview.d.ts +2 -2
  491. package/dist/types/api/legalEntity/useLegalEntity.d.ts +8 -389
  492. package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +5 -5
  493. package/dist/types/api/onboardingStatus/useGenerateOnboardingLink.d.ts +2 -2
  494. package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
  495. package/dist/types/api/openId/useOpenIdAuthorizationLink.d.ts +1 -2
  496. package/dist/types/api/pci/usePciQuestionnaireList.d.ts +1 -1
  497. package/dist/types/api/pci/usePciStatus.d.ts +1 -1
  498. package/dist/types/api/pci/usePciTemplate.d.ts +1 -1
  499. package/dist/types/api/pci/useSignPci.d.ts +2 -3
  500. package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +1 -1
  501. package/dist/types/api/queryKeys.d.ts +4 -2
  502. package/dist/types/api/taskStatus/useTaskStatus.d.ts +2 -2
  503. package/dist/types/api/taxClassification/useTaxClassification.d.ts +1 -1
  504. package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +2 -3
  505. package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +1 -7
  506. package/dist/types/api/termsOfService/useTermsOfService.d.ts +1 -1
  507. package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +1 -1
  508. package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +1 -1
  509. package/dist/types/api/tinVerification/useVerifyTin.d.ts +1 -1
  510. package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -1
  511. package/dist/types/api/transferInstruments/useCreateTrustedTransferInstrument.d.ts +1 -1
  512. package/dist/types/api/transferInstruments/useDeleteTransferInstrument.d.ts +1 -1
  513. package/dist/types/api/transferInstruments/useHandleBankVerificationError.d.ts +1 -1
  514. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +2 -2
  515. package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -1
  516. package/dist/types/api/transferInstruments/useUpdateTransferInstrument.d.ts +1 -1
  517. package/dist/types/api/transferInstruments/useUpdateTrustedTransferInstrument.d.ts +15 -0
  518. package/dist/types/api/types.d.ts +3 -2
  519. package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -2
  520. package/dist/types/api/uiAnalytics/usePushAnalyticEvent.d.ts +2 -2
  521. package/dist/types/api/validation/useValidateAccountIdentification.d.ts +2 -3
  522. package/dist/types/api/validation/useValidatePhoneNumber.d.ts +1 -1
  523. package/dist/types/components/Apps/tasks/TaskList/utils.d.ts +4 -0
  524. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +1 -2
  525. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +0 -1
  526. package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +1 -0
  527. package/dist/types/components/BankAccount/forms/BankVerification/verification/overlay/BankVerificationOverlay.d.ts +1 -1
  528. package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +2 -2
  529. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +0 -1
  530. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +439 -439
  531. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +3 -3
  532. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
  533. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
  534. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +1 -1
  535. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformation.d.ts +1 -4
  536. package/dist/types/components/Business/forms/AdditionalInformation/VerifiedBusinessCard/VerifiedBusinessCard.d.ts +8 -0
  537. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +4 -6
  538. package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +2 -5
  539. package/dist/types/components/Business/forms/BasicInformation/BasicInformation.d.ts +1 -4
  540. package/dist/types/components/Business/forms/BasicInformation/types.d.ts +5 -18
  541. package/dist/types/components/Business/forms/BusinessDetails/form-ids.d.ts +2 -0
  542. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +12 -46
  543. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -22
  544. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +8 -9
  545. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelection.d.ts +13 -3
  546. package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +0 -11
  547. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructure.d.ts +3 -4
  548. package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +0 -6
  549. package/dist/types/components/Business/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +4 -0
  550. package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +3 -0
  551. package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +3 -0
  552. package/dist/types/components/Business/forms/ProofOfDirectorDocument/ProofOfDirectorDocument.d.ts +1 -1
  553. package/dist/types/components/Business/forms/ProofOfDirectorDocument/types.d.ts +0 -3
  554. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/ProofOfOwnershipDocument.d.ts +1 -1
  555. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +0 -3
  556. package/dist/types/components/Business/forms/ProofOfSignatoryDocument/ProofOfSignatoryDocument.d.ts +1 -1
  557. package/dist/types/components/Business/forms/ProofOfSignatoryDocument/types.d.ts +0 -3
  558. package/dist/types/components/Business/forms/RegistrationDocument/RegistrationDocument.d.ts +1 -1
  559. package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +1 -3
  560. package/dist/types/components/Business/forms/TaxDocument/TaxDocument.d.ts +1 -1
  561. package/dist/types/components/Business/forms/TaxDocument/types.d.ts +1 -3
  562. package/dist/types/components/Business/forms/forms.types.d.ts +0 -3
  563. package/dist/types/components/Business/forms/rules.d.ts +10 -10
  564. package/dist/types/components/Business/mapping/businessDetails/businessBankAccountTaxIdUtils.d.ts +7 -0
  565. package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +4 -2
  566. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +8 -2
  567. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -2
  568. package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +3 -3
  569. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +0 -2
  570. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +14 -6
  571. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +24 -9
  572. package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +1 -1
  573. package/dist/types/components/Business/utils/companyUtil.d.ts +0 -10
  574. package/dist/types/components/Business/utils/formatDataForSummary.d.ts +5 -0
  575. package/dist/types/components/Business/utils/submit.d.ts +2 -0
  576. package/dist/types/components/Business/utils/useBusinessDetailsData.d.ts +21 -0
  577. package/dist/types/components/BusinessLines/constants.d.ts +10 -0
  578. package/dist/types/components/BusinessLines/fields/Carousel/Carousel.d.ts +10 -10
  579. package/dist/types/components/BusinessLines/fields/SctaField/SctaField.d.ts +2 -0
  580. package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +6 -0
  581. package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +1 -1
  582. package/dist/types/components/BusinessLines/forms/IndustryCodesForm/IndustryCodesForm.d.ts +1 -1
  583. package/dist/types/components/BusinessLines/forms/SctaForm/SctaForm.d.ts +2 -0
  584. package/dist/types/components/BusinessLines/forms/SctaForm/SctaInfoModal.d.ts +3 -0
  585. package/dist/types/components/BusinessLines/forms/SctaForm/types.d.ts +2 -0
  586. package/dist/types/components/BusinessLines/forms/rules.d.ts +2 -1
  587. package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +1 -2
  588. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLineModal/BusinessLineModal.d.ts +2 -1
  589. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +1 -1
  590. package/dist/types/components/BusinessLines/tasks/types.d.ts +4 -0
  591. package/dist/types/components/BusinessLines/tasks/utils.d.ts +26 -4
  592. package/dist/types/components/BusinessLines/tasks/validate.d.ts +2 -0
  593. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/ServiceAgreementDropin.d.ts +1 -1
  594. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +3 -3
  595. package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
  596. package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
  597. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5812 -582
  598. package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +3 -2
  599. package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -1
  600. package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +1 -2
  601. package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +1 -2
  602. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingSoleProprietor.d.ts +2 -0
  603. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSoleProprietorPersonalInformation.d.ts +4 -0
  604. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -0
  605. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +15 -4
  606. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +10 -1
  607. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +20 -21
  608. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +6 -4
  609. package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +1 -2
  610. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +2 -1
  611. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -2
  612. package/dist/types/components/EmbeddedDropins/InvitedDecisionMakerComponent/InvitedDecisionMakerComponent.d.ts +4 -0
  613. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
  614. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/RouterDropinComposer.d.ts +4 -0
  615. package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -1
  616. package/dist/types/components/Individual/fields/IdentityNumber/fieldConfig.d.ts +4 -3
  617. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +29 -0
  618. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/Identity.types.d.ts +13 -0
  619. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/TypeOfIdentity/index.d.ts +11 -0
  620. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/validate.d.ts +4 -0
  621. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/validate.d.ts +22 -0
  622. package/dist/types/components/Individual/forms/BasicDetails/BasicDetails.types.d.ts +22 -0
  623. package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +8 -0
  624. package/dist/types/components/Individual/forms/DataConflictsModal/ConflictRow.d.ts +12 -0
  625. package/dist/types/components/Individual/forms/DataConflictsModal/DataConflictsModal.d.ts +24 -0
  626. package/dist/types/components/Individual/forms/IdDocumentUpload/types.d.ts +43 -0
  627. package/dist/types/components/Individual/forms/IdDocumentUpload/utils.d.ts +3 -0
  628. package/dist/types/components/Individual/forms/IdNowVerificationModal/isIdNowModalOpen.d.ts +18 -0
  629. package/dist/types/components/Individual/forms/IdVerificationMethod/IdVerificationMethod.types.d.ts +21 -0
  630. package/dist/types/components/Individual/forms/IdVerificationMethod/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +7 -0
  631. package/dist/types/components/Individual/forms/IdVerificationMethod/UploadedDocument/UploadedDocument.d.ts +7 -0
  632. package/dist/types/components/Individual/forms/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +46 -0
  633. package/dist/types/components/Individual/forms/IdVerificationMethod/mapExtractionResultToSchema.d.ts +4 -0
  634. package/dist/types/components/Individual/forms/IdVerificationMethod/validateExtractionResult.d.ts +12 -0
  635. package/dist/types/components/Individual/forms/Individual.d.ts +56 -0
  636. package/dist/types/components/Individual/forms/Individual.rules.d.ts +45 -0
  637. package/dist/types/components/Individual/forms/Individual.types.d.ts +60 -0
  638. package/dist/types/components/Individual/forms/ProofOfRelationship/types.d.ts +14 -0
  639. package/dist/types/components/Individual/forms/ProofOfResidency/types.d.ts +39 -0
  640. package/dist/types/components/Individual/forms/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +6 -0
  641. package/dist/types/components/Individual/forms/UboQuestionnaire/UboQuestionnaire.types.d.ts +13 -0
  642. package/dist/types/components/Individual/forms/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +7 -0
  643. package/dist/types/components/Individual/forms/form-ids.d.ts +2 -0
  644. package/dist/types/components/Individual/helpers/bafinUtils.d.ts +3 -2
  645. package/dist/types/components/Individual/helpers/mandateIdVerificationForMotionCapture.d.ts +2 -3
  646. package/dist/types/components/Individual/helpers/roleUtils.d.ts +1 -1
  647. package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +1 -1
  648. package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +1 -1
  649. package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +6 -12
  650. package/dist/types/components/Individual/mapping/mapApiDocumentToIndividualDocuments.d.ts +2 -2
  651. package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -3
  652. package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +5 -0
  653. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualSchema.d.ts +3 -0
  654. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +6 -7
  655. package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +2 -2
  656. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -2
  657. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +2 -14
  658. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/remediation.config.d.ts +0 -2
  659. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +8 -0
  660. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +1 -1
  661. package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +2 -2
  662. package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +3 -3
  663. package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +0 -1
  664. package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
  665. package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +2 -2
  666. package/dist/types/components/Shared/Introduction/copy.d.ts +3 -3
  667. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
  668. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +10 -0
  669. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +2 -1
  670. package/dist/types/components/Shared/fields/CountryField/types.d.ts +2 -1
  671. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
  672. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
  673. package/dist/types/components/Shared/fields/Currency/Currency.d.ts +1 -1
  674. package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
  675. package/dist/types/components/Shared/fields/DBANameField/DBANameField.d.ts +1 -1
  676. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -1
  677. package/dist/types/components/Shared/fields/DateOfIncorporationField/DateOfIncorporationField.d.ts +1 -1
  678. package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +3 -1
  679. package/dist/types/components/Shared/fields/EInvoicingCodeField/EInvoicingCodeField.d.ts +1 -1
  680. package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
  681. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +117 -1
  682. package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +1 -1
  683. package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
  684. package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +12 -6
  685. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +3 -1
  686. package/dist/types/components/Shared/fields/LocalizedNameFields/types.d.ts +9 -0
  687. package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +5 -0
  688. package/dist/types/components/Shared/fields/NumberOfEmployees/NumberOfEmployees.d.ts +1 -1
  689. package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
  690. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
  691. package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +5 -0
  692. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -1
  693. package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
  694. package/dist/types/components/Shared/fields/StateField/fieldConfig.d.ts +8 -0
  695. package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
  696. package/dist/types/components/Shared/fields/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
  697. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  698. package/dist/types/components/Shared/fields/StockISINField/StockISINField.d.ts +1 -1
  699. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  700. package/dist/types/components/Shared/fields/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
  701. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  702. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -1
  703. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +6 -0
  704. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +2 -1
  705. package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
  706. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +1 -1
  707. package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
  708. package/dist/types/components/Shared/forms/Address/localized/jp/jpAddressSchema.d.ts +3 -1
  709. package/dist/types/components/Shared/forms/Address/types.d.ts +2 -2
  710. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  711. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +1 -1
  712. package/dist/types/components/Trust/forms/Trust/rules.d.ts +5 -4
  713. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
  714. package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -2
  715. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +3 -3
  716. package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +5 -5
  717. package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +2 -2
  718. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +1 -1
  719. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiform.d.ts +2 -1
  720. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiformDropin.d.ts +1 -1
  721. package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +1 -2
  722. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -1
  723. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +5 -5
  724. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +3 -3
  725. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +1 -1
  726. package/dist/types/components/ui/atoms/Card/Card.d.ts +19 -0
  727. package/dist/types/components/ui/atoms/Link/Link.types.d.ts +1 -1
  728. package/dist/types/components/ui/atoms/Loader/Loader.d.ts +11 -5
  729. package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
  730. package/dist/types/components/ui/atoms/MultiSelectList/MultiSelectList.d.ts +0 -1
  731. package/dist/types/components/ui/atoms/Svg/Svg.d.ts +0 -1
  732. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +4 -0
  733. package/dist/types/components/ui/atoms/Tile/Tile.d.ts +2 -1
  734. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +2 -2
  735. package/dist/types/components/ui/molecules/ErrorPanel/ErrorPanel.d.ts +0 -1
  736. package/dist/types/context/ExperimentContext/types.d.ts +28 -50
  737. package/dist/types/context/QueryContext/QueryClient.d.ts +1 -1
  738. package/dist/types/context/StateContext/types.d.ts +2 -3
  739. package/dist/types/core/models/api/individual.d.ts +3 -0
  740. package/dist/types/core/models/api/instant-id-verification.d.ts +1 -1
  741. package/dist/types/core/models/api/legal-arrangement.d.ts +3 -0
  742. package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
  743. package/dist/types/core/models/api/legal-entity.d.ts +1 -6
  744. package/dist/types/core/process-field-configurations.d.ts +0 -5
  745. package/dist/types/core/services/types.d.ts +1 -1
  746. package/dist/types/core/user-events.d.ts +4 -2
  747. package/dist/types/embeds/baseEmbedProps.d.ts +0 -21
  748. package/dist/types/embeds/business-financing/adyen-business-financing.d.ts +2 -1
  749. package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +2 -0
  750. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.d.ts +5 -1
  751. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +2 -2
  752. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.d.ts +5 -0
  753. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.types.d.ts +34 -0
  754. package/dist/types/embeds/onboarding/adyen-onboarding.d.ts +2 -1
  755. package/dist/types/embeds/terms-of-service-management/adyen-terms-of-service-management.d.ts +5 -1
  756. package/dist/types/embeds/transfer-instrument-configuration/adyen-transfer-instrument-configuration.d.ts +2 -1
  757. package/dist/types/embeds/verification-status/adyen-verification-status.d.ts +2 -1
  758. package/dist/types/hooks/useAssociatedLegalEntity.d.ts +1 -1
  759. package/dist/types/hooks/useForm/types.d.ts +0 -8
  760. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +4 -2
  761. package/dist/types/hooks/usePageLandedEvent.d.ts +7 -0
  762. package/dist/types/hooks/useUboQuestionnaire.d.ts +2 -2
  763. package/dist/types/language/types.d.ts +7 -2
  764. package/dist/types/language/utils.d.ts +1 -2
  765. package/dist/types/router/DefaultRouteRedirect.d.ts +8 -0
  766. package/dist/types/router/MemoryRouterContext.d.ts +9 -0
  767. package/dist/types/router/OnboardingRouter.d.ts +39 -0
  768. package/dist/types/router/SuspenseRoute.d.ts +7 -0
  769. package/dist/types/router/getDefaultTask.d.ts +16 -0
  770. package/dist/types/router/routeConfig.d.ts +68 -0
  771. package/dist/types/router/useCurrentTask.d.ts +5 -0
  772. package/dist/types/router/useNavigate.d.ts +7 -0
  773. package/dist/types/stores/formState.d.ts +2 -0
  774. package/dist/types/stores/globalStore/get-task-status.d.ts +6 -0
  775. package/dist/types/stores/globalStore/taskStatus.d.ts +5 -3
  776. package/dist/types/types/assert.d.ts +1 -0
  777. package/dist/types/types/datasets/currency.d.ts +0 -1
  778. package/dist/types/types/form.d.ts +0 -2
  779. package/dist/types/utils/addLinkedFields.d.ts +0 -2
  780. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +1 -0
  781. package/dist/types/utils/analytics/getPrefilledDetails.d.ts +28 -0
  782. package/dist/types/utils/api/documentUtils.d.ts +6 -0
  783. package/dist/types/utils/api/processCapabilitites.d.ts +14 -2
  784. package/dist/types/utils/birthDateUtils.d.ts +0 -17
  785. package/dist/types/utils/customerSupportUtils.d.ts +3 -0
  786. package/dist/types/utils/entityAssociationUtil.d.ts +3 -4
  787. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  788. package/dist/types/utils/fieldConfigurations.d.ts +0 -2
  789. package/dist/types/utils/formUtils.d.ts +1 -6
  790. package/dist/types/utils/getDisplayErrorMessage.d.ts +1 -2
  791. package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -3
  792. package/dist/types/utils/getName.d.ts +1 -1
  793. package/dist/types/utils/japanSupportUtils.d.ts +3 -0
  794. package/dist/types/utils/logger.d.ts +0 -1
  795. package/dist/types/utils/makeSelectItemForRole.d.ts +1 -1
  796. package/dist/types/utils/performance.d.ts +64 -0
  797. package/dist/types/utils/regex/patternValidators.d.ts +1 -1
  798. package/dist/types/utils/translation.d.ts +3 -2
  799. package/dist/types/utils/validatorUtils.d.ts +3 -1
  800. package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +3 -2
  801. package/dist/types-BW4HQI5X.js +142 -0
  802. package/dist/types-D7ibfssA.js +74 -0
  803. package/dist/types-DRjaiEYd.js +64 -0
  804. package/dist/types-DSsQZPmi.js +34 -0
  805. package/dist/unincorporated-partnership-MeN1dp53.js +97 -0
  806. package/dist/upload-BmUXjsaU.js +17 -0
  807. package/dist/us-check-C1rTBsCY.js +46 -0
  808. package/dist/us-check-account-number-9lI1dXNC.js +48 -0
  809. package/dist/us-check-routing-number-s_KaAGSM.js +49 -0
  810. package/dist/useAssociatedLegalEntity-jaSfQ9rQ.js +34 -0
  811. package/dist/useBusinessDetailsData-5O2km9MB.js +5310 -0
  812. package/dist/useBusinessLines-DuBQrvIQ.js +29 -0
  813. package/dist/useCanSeeIntroduction-Boj-VdF4.js +48 -0
  814. package/dist/useCreateLegalEntity-DQx1byaP.js +32 -0
  815. package/dist/useDataMissingRemediations-Drava4pQ.js +41 -0
  816. package/dist/useDataset-3t4wCptb.js +76 -0
  817. package/dist/useDeleteTransferInstrument-CUjrvIfw.js +32 -0
  818. package/dist/useForm-CsrT0zKF.js +582 -0
  819. package/dist/useFormContext-D1NuWw_2.js +201 -0
  820. package/dist/useGlobalData-vS5GxkpZ.js +68 -0
  821. package/dist/useId-BZ0PA7jP.js +24 -0
  822. package/dist/useMultiForm-82RYFvCF.js +873 -0
  823. package/dist/useNavigate-DLBqtyNN.js +265 -0
  824. package/dist/useOnboardingStatus-B3HSS36K.js +28 -0
  825. package/dist/usePciQuestionnaireList-B2425Wiw.js +29 -0
  826. package/dist/useSalesChannels-B9Z_g_9G.js +65 -0
  827. package/dist/useScenarios-DCRvLaxV.js +48 -0
  828. package/dist/useSetting-C108TWwa.js +19 -0
  829. package/dist/useTaskStatus-DjHWxlNL.js +51 -0
  830. package/dist/useTermsOfServiceStatus-BTLQKn3X.js +43 -0
  831. package/dist/useToastContext-CYdZ2BD2.js +49 -0
  832. package/dist/useTrustMembers-BvFhj1PW.js +163 -0
  833. package/dist/useUnincorporatedPartnershipMembers-wCGUg18Y.js +99 -0
  834. package/dist/useUpdateBusinessLines-DAHY8qXu.js +339 -0
  835. package/dist/useUpdateLegalEntity-B7VJAlhD.js +40 -0
  836. package/dist/utils-BCit-Kzj.js +58 -0
  837. package/dist/utils-BU2KHXr7.js +237 -0
  838. package/dist/utils-BiqRkf5f.js +159 -0
  839. package/dist/utils-C4cwFCf5.js +778 -0
  840. package/dist/utils-Cc8niKnm.js +29 -0
  841. package/dist/validate-BnkIeDb7.js +434 -0
  842. package/dist/validate-fYuz9-yq.js +108 -0
  843. package/dist/validationError-Bod1gd-k.js +86 -0
  844. package/dist/warning-circle-fill-DBvt921B.js +17 -0
  845. package/dist/warning-diamond-filled-Lb2od2ry.js +17 -0
  846. package/dist/webinar-m9nuFZBt.js +22 -0
  847. package/dist/yapily-logo-BduxhNRA.js +17 -0
  848. package/package.json +78 -57
  849. package/dist/4-people-BzyXLUF9.js +0 -24
  850. package/dist/AcceptTermsOfServiceComponent-B150yg9N.js +0 -659
  851. package/dist/Accordion-CVxApR1X.js +0 -88
  852. package/dist/AccountSetupRejected--dXDa8bC.js +0 -26
  853. package/dist/ActionBar-Tv1K68ZK.js +0 -31
  854. package/dist/Address-DrRgozSN.js +0 -1348
  855. package/dist/Alert-BVHHWVgg.js +0 -159
  856. package/dist/Avatar-sN35oNt2.js +0 -60
  857. package/dist/BG-DlvaKo4n.js +0 -27
  858. package/dist/BusinessDetailsMultiformDropin-BeJATuiX.js +0 -4220
  859. package/dist/BusinessFinancingComponent-CGBUx-zj.js +0 -54
  860. package/dist/BusinessFinancingDropin-DxKkpM-k.js +0 -1853
  861. package/dist/BusinessFinancingPage-JChGPCHT.js +0 -43
  862. package/dist/BusinessTypeSelectionPage-CH-OiNqT.js +0 -427
  863. package/dist/Card-B66f7NuH.js +0 -82
  864. package/dist/ConstitutionalDocument-DIW7X8rZ.js +0 -143
  865. package/dist/ContractViewer-Byp71k2e.js +0 -935
  866. package/dist/CountryField-D36v7bff.js +0 -843
  867. package/dist/CreateIndividualComponent-fmBoSuxQ.js +0 -71
  868. package/dist/CreateTransferInstrumentComponent-CViSbC6e.js +0 -63
  869. package/dist/Currency-DlHtZ9aJ.js +0 -183
  870. package/dist/CustomerSupport-L3PHpji7.js +0 -153
  871. package/dist/DebugModal-C1mi00fP.js +0 -413
  872. package/dist/DecisionMakerDetailsPage-li_HZWuV.js +0 -106
  873. package/dist/DecisionMakers-C8AjEnUh.js +0 -830
  874. package/dist/EmbeddedStatus-CrKg6woS.js +0 -99
  875. package/dist/EndStateLayout-CPXu6AzB.js +0 -71
  876. package/dist/EntityAssociation-SkprG-At.js +0 -159
  877. package/dist/EntityGuidanceStatus-D9lctwyX.js +0 -105
  878. package/dist/FormFlow-BVw3rIvU.js +0 -224
  879. package/dist/FormNavigation-Bag7ETpV.js +0 -144
  880. package/dist/FormWrapper-BfsyttAY.js +0 -135
  881. package/dist/IndividualOnfido-CmDDWqG_.js +0 -9594
  882. package/dist/IndividualOnfidoDropin-VMZXwhd7.js +0 -2497
  883. package/dist/InputText-DHRZ5RNd.js +0 -249
  884. package/dist/Introduction-Cht7yZI7.js +0 -300
  885. package/dist/JpAddress-DCky_der.js +0 -280
  886. package/dist/LegalRepresentativeDetailsPage-Bez436Rb.js +0 -60
  887. package/dist/ListItem-DrwSQslm.js +0 -69
  888. package/dist/ManageIndividualComponent-lLoElwga.js +0 -46
  889. package/dist/ManageTermsOfServiceComponent-CH1M-H1Y.js +0 -52
  890. package/dist/ManageTransferInstrumentComponent-NZ8vELQC.js +0 -287
  891. package/dist/MaybeModal-D4PWacZ0.js +0 -25
  892. package/dist/Modal-lDK70UQc.js +0 -149
  893. package/dist/OnboardingDropinComponent-Cljx74I-.js +0 -7908
  894. package/dist/PayoutDetailsDropin-p2t6lj8Z.js +0 -4841
  895. package/dist/Review-fdhuI2MF.js +0 -83
  896. package/dist/RootBusinessDetailsPage-Bb1mWkAw.js +0 -61
  897. package/dist/RootBusinessLinesPage-Bge83rhi.js +0 -1118
  898. package/dist/RootIndividualDetailsPage-B31dJO7o.js +0 -71
  899. package/dist/SignPCIComponent-C0P_OLXa.js +0 -304
  900. package/dist/SingpassSelection-B2rjBQ6u.js +0 -130
  901. package/dist/SoleProprietorshipPage-3S2tDRwx.js +0 -60
  902. package/dist/SourceOfFundsPage-BpV6fE8P.js +0 -2383
  903. package/dist/StepProgressIndicator-CBkt5fOY.js +0 -78
  904. package/dist/StoreProvider-l6WD5T55.js +0 -7674
  905. package/dist/Summary-Ccxu9A6C.js +0 -204
  906. package/dist/TaxReportingDropin-H22DcnSG.js +0 -502
  907. package/dist/TrustDetailsPage-BvIa1mbz.js +0 -2149
  908. package/dist/TrustMemberCompanyPage-VNaovE9r.js +0 -73
  909. package/dist/TrustMemberIndividualPage-Dp9kroxy.js +0 -66
  910. package/dist/TrustMemberRoleAndTypePage-BbbTPGJm.js +0 -985
  911. package/dist/TrustMembersOverview-Dd7lo_I5.js +0 -438
  912. package/dist/UnincorporatedPartnershipIndividualPage-CcLh5gtc.js +0 -65
  913. package/dist/UnincorporatedPartnershipMemberCompanyPage-DA-1RrVz.js +0 -76
  914. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-CgLeyHTs.js +0 -281
  915. package/dist/UnincorporatedPartnershipMembersOverview-CNONb63l.js +0 -172
  916. package/dist/VerificationErrorAlert-D7gb2Rqo.js +0 -79
  917. package/dist/ViewVerificationStatusComponent-DpeNbWSm.js +0 -180
  918. package/dist/arrow-right-KxA3SvQj.js +0 -14
  919. package/dist/bag-BPumznWh.js +0 -14
  920. package/dist/bank-D6FiNBhs.js +0 -14
  921. package/dist/bg-BG-B7Xs_t04.js +0 -13
  922. package/dist/bg-BG-CepHap8j.js +0 -68
  923. package/dist/bg-BG-D9J6LnkI.js +0 -57
  924. package/dist/bg-BG-DH45-0B-.js +0 -29
  925. package/dist/bg-BG-DRkMqyL8.js +0 -13
  926. package/dist/bg-BG-Dp4LxSP7.js +0 -37
  927. package/dist/bg-BG-DpIAKQve.js +0 -113
  928. package/dist/bg-BG-mLSjG76Q.js +0 -13
  929. package/dist/bg-BG-wVquMNtT.js +0 -55
  930. package/dist/bin-Bz6KOIeE.js +0 -18
  931. package/dist/business-lines-DboUCbXw.js +0 -135
  932. package/dist/capital-GVQ3svwN.js +0 -17
  933. package/dist/cash-stack-D9AoDDwt.js +0 -22
  934. package/dist/certificate-CdEWgHQf.js +0 -17
  935. package/dist/checkmark-Q7x6tGhy.js +0 -14
  936. package/dist/checkmark-circle-fill-CsvN5_PL.js +0 -17
  937. package/dist/checkmark-circle-x7dzbp3I.js +0 -20
  938. package/dist/checkmark-small-D35myntq.js +0 -14
  939. package/dist/chevron-down-C2iDorpW.js +0 -14
  940. package/dist/chevron-left-ztPO84q-.js +0 -14
  941. package/dist/chevron-right-C_JN0oDt.js +0 -14
  942. package/dist/chevron-up-CgG8n25g.js +0 -14
  943. package/dist/circle-Bt3Nlr3q.js +0 -17
  944. package/dist/circle-small-filled-YMzP6yQU.js +0 -14
  945. package/dist/clock-BZHremOA.js +0 -20
  946. package/dist/coins-fkAk6dCo.js +0 -17
  947. package/dist/contract-BTa4HltT.js +0 -14
  948. package/dist/cross-Cn09MtQ_.js +0 -14
  949. package/dist/cross-circle-fill-small-DCz52AuN.js +0 -14
  950. package/dist/cs-CZ--jOkoHVS.js +0 -55
  951. package/dist/cs-CZ-BDf9m4Rw.js +0 -113
  952. package/dist/cs-CZ-BP7niQM9.js +0 -68
  953. package/dist/cs-CZ-BSWXexr4.js +0 -13
  954. package/dist/cs-CZ-BsV9NiQ2.js +0 -13
  955. package/dist/cs-CZ-CyLqoG1j.js +0 -37
  956. package/dist/cs-CZ-DPVMeRye.js +0 -29
  957. package/dist/cs-CZ-DY_pQqAT.js +0 -57
  958. package/dist/cs-CZ-DalFZigH.js +0 -13
  959. package/dist/da-DK-CI-vfqPo.js +0 -113
  960. package/dist/da-DK-D4Ojw97o.js +0 -13
  961. package/dist/da-DK-DU4dCNEw.js +0 -29
  962. package/dist/da-DK-DYpfNZdP.js +0 -37
  963. package/dist/da-DK-Dc0QYG8m.js +0 -68
  964. package/dist/da-DK-JHZnsI59.js +0 -55
  965. package/dist/da-DK-P3YSaBqs.js +0 -13
  966. package/dist/da-DK-R_y7YwqQ.js +0 -13
  967. package/dist/da-DK-jK7c9UL0.js +0 -57
  968. package/dist/de-DE-BR6CLZw6.js +0 -13
  969. package/dist/de-DE-BXt1K0Tr.js +0 -37
  970. package/dist/de-DE-BcuLmcC8.js +0 -13
  971. package/dist/de-DE-Dz2OsS1F.js +0 -68
  972. package/dist/de-DE-Dz2l6jRl.js +0 -29
  973. package/dist/de-DE-VGGEkxUT.js +0 -55
  974. package/dist/de-DE-nG2MBigU.js +0 -113
  975. package/dist/de-DE-opyC1JO-.js +0 -13
  976. package/dist/de-DE-wmerDL2e.js +0 -57
  977. package/dist/debouncedInputEvent-Bifj90NU.js +0 -109
  978. package/dist/decision-makers-group-CgddXgrx.js +0 -1944
  979. package/dist/digital-wallet-D_IpxnkN.js +0 -46
  980. package/dist/document-1-C08ut-Dt.js +0 -14
  981. package/dist/document-blurred-2Zpodj3_.js +0 -37
  982. package/dist/document-cut-off-ClS7RiOp.js +0 -32
  983. package/dist/document-expired-CjksBq-N.js +0 -38
  984. package/dist/document-front-DiAairT3.js +0 -30
  985. package/dist/document-person-vxlA6C5f.js +0 -20
  986. package/dist/documentUtils-CunPooif.js +0 -218
  987. package/dist/download-Drhk9k1f.js +0 -17
  988. package/dist/dropinUtils-DSk8OL7G.js +0 -202
  989. package/dist/edit-1-CFoDTMvQ.js +0 -14
  990. package/dist/el-GR-B3FHqTOX.js +0 -13
  991. package/dist/el-GR-B90M6tcZ.js +0 -37
  992. package/dist/el-GR-BHG69mXl.js +0 -68
  993. package/dist/el-GR-BX-MyQZY.js +0 -113
  994. package/dist/el-GR-Btrk_npt.js +0 -57
  995. package/dist/el-GR-CWd7XYDU.js +0 -13
  996. package/dist/el-GR-CofvCav-.js +0 -13
  997. package/dist/el-GR-MLFY-Gg7.js +0 -29
  998. package/dist/el-GR-gkaKwnln.js +0 -55
  999. package/dist/en-US-BPI4FZwa.js +0 -113
  1000. package/dist/en-US-CzEL6t1W.js +0 -55
  1001. package/dist/en-US-D-B35AoN.js +0 -68
  1002. package/dist/en-US-DYo4OF-P.js +0 -29
  1003. package/dist/en-US-Dg505Oh3.js +0 -37
  1004. package/dist/en-US-fyGPkcqX.js +0 -13
  1005. package/dist/en-US-gsp7CD_E.js +0 -57
  1006. package/dist/es-ES-0ROz-BJh.js +0 -29
  1007. package/dist/es-ES-BAg3NqQO.js +0 -13
  1008. package/dist/es-ES-BI_jdT67.js +0 -68
  1009. package/dist/es-ES-BhINIOee.js +0 -13
  1010. package/dist/es-ES-BhNhIf08.js +0 -37
  1011. package/dist/es-ES-Bn9_0wK0.js +0 -55
  1012. package/dist/es-ES-CEp-ttVJ.js +0 -13
  1013. package/dist/es-ES-Q16q2JJ6.js +0 -113
  1014. package/dist/es-ES-Qnc0Q6JH.js +0 -57
  1015. package/dist/et-EE-BMgFCxds.js +0 -37
  1016. package/dist/et-EE-BYSnV6Iq.js +0 -55
  1017. package/dist/et-EE-Bk2IHQWP.js +0 -13
  1018. package/dist/et-EE-C_PZO2aI.js +0 -68
  1019. package/dist/et-EE-Ci8RU2wg.js +0 -13
  1020. package/dist/et-EE-DmShD6oS.js +0 -113
  1021. package/dist/et-EE-TzXANcP2.js +0 -57
  1022. package/dist/et-EE-esci5847.js +0 -29
  1023. package/dist/et-EE-x29FUaYN.js +0 -118
  1024. package/dist/external-link-DCMYUMfW.js +0 -14
  1025. package/dist/fi-FI-B_P4BAda.js +0 -113
  1026. package/dist/fi-FI-CDISJifz.js +0 -13
  1027. package/dist/fi-FI-DjlB2a7k.js +0 -13
  1028. package/dist/fi-FI-Dn2MC8uW.js +0 -57
  1029. package/dist/fi-FI-MiyuQqH8.js +0 -13
  1030. package/dist/fi-FI-PVFqd5Ra.js +0 -55
  1031. package/dist/fi-FI-hwzizPnr.js +0 -68
  1032. package/dist/fi-FI-xXrvDLFe.js +0 -29
  1033. package/dist/fi-FI-ysUrBilO.js +0 -37
  1034. package/dist/fieldConfigurations-D99U6JIQ.js +0 -1402
  1035. package/dist/fr-FR-BSvSKazD.js +0 -37
  1036. package/dist/fr-FR-BWX14yb7.js +0 -57
  1037. package/dist/fr-FR-Bw9O-QAU.js +0 -29
  1038. package/dist/fr-FR-CUdiBCVB.js +0 -113
  1039. package/dist/fr-FR-CYZXbwc9.js +0 -68
  1040. package/dist/fr-FR-DGMVrsJv.js +0 -13
  1041. package/dist/fr-FR-Dx-CiPdB.js +0 -13
  1042. package/dist/fr-FR-aJ3cg4x0.js +0 -13
  1043. package/dist/fr-FR-mJK4hjwD.js +0 -55
  1044. package/dist/funds-in-D8bj0aoE.js +0 -21
  1045. package/dist/getFieldsWithExistingData-BLXGczCN.js +0 -22
  1046. package/dist/getName-_U3PeNHl.js +0 -48
  1047. package/dist/gift-CQ_DEma7.js +0 -14
  1048. package/dist/graph-BJmqglH2.js +0 -21
  1049. package/dist/graph-up-Bq6adtlX.js +0 -20
  1050. package/dist/hasDataChanged-BwDHn0i2.js +0 -19
  1051. package/dist/headquarter-DNYyuuFq.js +0 -21
  1052. package/dist/hotel-BuNql78Z.js +0 -22
  1053. package/dist/house-B6sNRj-B.js +0 -21
  1054. package/dist/hr-HR-BHt_jklG.js +0 -13
  1055. package/dist/hr-HR-BLpGb4f2.js +0 -37
  1056. package/dist/hr-HR-CXpCIMhI.js +0 -113
  1057. package/dist/hr-HR-CZLSQruE.js +0 -57
  1058. package/dist/hr-HR-D8_yhtIo.js +0 -29
  1059. package/dist/hr-HR-VivDwwdW.js +0 -13
  1060. package/dist/hr-HR-bE6cvRCQ.js +0 -68
  1061. package/dist/hr-HR-n7aMHIpM.js +0 -13
  1062. package/dist/hr-HR-qmYyO-nT.js +0 -55
  1063. package/dist/hu-HU-CS-7iNS4.js +0 -55
  1064. package/dist/hu-HU-Ca9Hex26.js +0 -37
  1065. package/dist/hu-HU-DDsdPI5V.js +0 -13
  1066. package/dist/hu-HU-DG-NUDx4.js +0 -68
  1067. package/dist/hu-HU-D_DvlCMw.js +0 -13
  1068. package/dist/hu-HU-DqEBeq-w.js +0 -113
  1069. package/dist/hu-HU-KliQetm5.js +0 -29
  1070. package/dist/hu-HU-WEtpzb41.js +0 -13
  1071. package/dist/hu-HU-kp8Go5hZ.js +0 -57
  1072. package/dist/id-blurred-9dzBOWCE.js +0 -59
  1073. package/dist/id-cut-off-CohJCI2h.js +0 -55
  1074. package/dist/id-front-CSZfvdRg.js +0 -52
  1075. package/dist/id-glare-Q2JWo5ts.js +0 -49
  1076. package/dist/id-verification-instant-BUVBO4R3.js +0 -58
  1077. package/dist/id-verification-manual-B3YZALYU.js +0 -55
  1078. package/dist/iframeWidget-BEBSgwZP.js +0 -234
  1079. package/dist/image-BSihO8lR.js +0 -17
  1080. package/dist/info-vHTZWoJ7.js +0 -21
  1081. package/dist/instant-verification-Dvvkyfmp.js +0 -40
  1082. package/dist/it-IT-B0YGvVgW.js +0 -57
  1083. package/dist/it-IT-BTWkWSJq.js +0 -55
  1084. package/dist/it-IT-C2MZo4KT.js +0 -13
  1085. package/dist/it-IT-DLm11dH5.js +0 -13
  1086. package/dist/it-IT-Erh1DIlj.js +0 -68
  1087. package/dist/it-IT-MwpjRAG6.js +0 -29
  1088. package/dist/it-IT-NCFAqV1F.js +0 -113
  1089. package/dist/it-IT-Qfzc8jnW.js +0 -37
  1090. package/dist/it-IT-yV7ewjWU.js +0 -13
  1091. package/dist/ja-JP-2u5fqLWF.js +0 -29
  1092. package/dist/ja-JP-Bktpl_2b.js +0 -118
  1093. package/dist/ja-JP-CHQ64lw1.js +0 -37
  1094. package/dist/ja-JP-CSz7fEkn.js +0 -55
  1095. package/dist/ja-JP-CWe8f7m4.js +0 -13
  1096. package/dist/ja-JP-C_-moDrA.js +0 -113
  1097. package/dist/ja-JP-Ctsk4z4q.js +0 -151
  1098. package/dist/ja-JP-Dz9IVH4p.js +0 -57
  1099. package/dist/ja-JP-ThzG9vIo.js +0 -68
  1100. package/dist/ja-JP-bz7ekGnF.js +0 -27
  1101. package/dist/localizeDateString-RwwotuyP.js +0 -27
  1102. package/dist/location-Q4oKvnkl.js +0 -17
  1103. package/dist/lt-LT-0RKZeraM.js +0 -37
  1104. package/dist/lt-LT-B6XmKUXx.js +0 -55
  1105. package/dist/lt-LT-BEsBoIQ9.js +0 -29
  1106. package/dist/lt-LT-CU5qHa7a.js +0 -113
  1107. package/dist/lt-LT-CYiW52tl.js +0 -13
  1108. package/dist/lt-LT-Cg9c0kae.js +0 -13
  1109. package/dist/lt-LT-Nd1uRoIj.js +0 -68
  1110. package/dist/lt-LT-W6fTjwB5.js +0 -13
  1111. package/dist/lt-LT-l9rzkFg9.js +0 -57
  1112. package/dist/lv-LV-Bh-WQp0K.js +0 -37
  1113. package/dist/lv-LV-CgMxfFK8.js +0 -13
  1114. package/dist/lv-LV-CpGkmcLz.js +0 -113
  1115. package/dist/lv-LV-CxUmQHF9.js +0 -13
  1116. package/dist/lv-LV-DKhV24CI.js +0 -68
  1117. package/dist/lv-LV-DYbb5pkt.js +0 -57
  1118. package/dist/lv-LV-DsSpy50n.js +0 -55
  1119. package/dist/lv-LV-DsxFGThp.js +0 -13
  1120. package/dist/lv-LV-Veji7-on.js +0 -29
  1121. package/dist/mail-BOdyoVqB.js +0 -14
  1122. package/dist/manual-verification-BvZWqA00.js +0 -41
  1123. package/dist/mapExistingFile-nB9LIvV9.js +0 -156
  1124. package/dist/mapFinancialReportsToFinancialInformation-BgizOY0T.js +0 -67
  1125. package/dist/mapJpAddressSchemaToAddressLocalizations-DnDo_BVY.js +0 -63
  1126. package/dist/mapLegalEntityToIndividualOnfidoSchema-BpjOTE3z.js +0 -143
  1127. package/dist/mapTransferInstrumentToPayoutAccount-DMZUSLNm.js +0 -33
  1128. package/dist/minus-circle-filled-kC2IUvKz.js +0 -17
  1129. package/dist/nl-NL-BMUYBqlF.js +0 -57
  1130. package/dist/nl-NL-Bk-1-C0e.js +0 -13
  1131. package/dist/nl-NL-BuW3jWdI.js +0 -29
  1132. package/dist/nl-NL-CMw-FwQV.js +0 -13
  1133. package/dist/nl-NL-CTf7zH4M.js +0 -55
  1134. package/dist/nl-NL-D7gBNWEY.js +0 -37
  1135. package/dist/nl-NL-DKMs4pB2.js +0 -13
  1136. package/dist/nl-NL-DMpB18Te.js +0 -113
  1137. package/dist/nl-NL-O9GCHMDA.js +0 -68
  1138. package/dist/no-NO-B-oUwe9q.js +0 -13
  1139. package/dist/no-NO-C-gCYc9q.js +0 -37
  1140. package/dist/no-NO-CA0EizAy.js +0 -29
  1141. package/dist/no-NO-CA1aR6Wh.js +0 -68
  1142. package/dist/no-NO-Ca5qoVaU.js +0 -113
  1143. package/dist/no-NO-DKbWxgF-.js +0 -57
  1144. package/dist/no-NO-DN9qf-_I.js +0 -13
  1145. package/dist/no-NO-Dhj0Fh__.js +0 -13
  1146. package/dist/no-NO-RfTK9KAV.js +0 -55
  1147. package/dist/onfido-logo-BWSv__sQ.js +0 -14
  1148. package/dist/options-horizontal-CBmbNv7R.js +0 -18
  1149. package/dist/partner-CPjsrePY.js +0 -18
  1150. package/dist/passport-blurred-B4UDQfmc.js +0 -59
  1151. package/dist/passport-cut-off-C0N2mgLk.js +0 -56
  1152. package/dist/passport-front-BwA7wR91.js +0 -52
  1153. package/dist/passport-front-green-BL4HmtsB.js +0 -232
  1154. package/dist/passport-glare-Mg2ixsYA.js +0 -50
  1155. package/dist/pay-by-link-plane-BVZndh67.js +0 -22
  1156. package/dist/payout-ChUEoLjt.js +0 -20
  1157. package/dist/payout-verification-instant-5u-wvFKv.js +0 -41
  1158. package/dist/payout-verification-manual-BH2mu0UW.js +0 -90
  1159. package/dist/person-DGjUU4S4.js +0 -17
  1160. package/dist/pl-PL-B0zGy_b4.js +0 -57
  1161. package/dist/pl-PL-BKDK0_G8.js +0 -68
  1162. package/dist/pl-PL-BSI0zHO1.js +0 -113
  1163. package/dist/pl-PL-D7nhdbfR.js +0 -29
  1164. package/dist/pl-PL-DGSYzOx6.js +0 -13
  1165. package/dist/pl-PL-Duj3tncM.js +0 -13
  1166. package/dist/pl-PL-Dy8qWH39.js +0 -55
  1167. package/dist/pl-PL-LnVPufjb.js +0 -37
  1168. package/dist/pl-PL-p8YxqOFg.js +0 -13
  1169. package/dist/plaid-logo-CtActXTN.js +0 -14
  1170. package/dist/plus-CWXA5wdX.js +0 -14
  1171. package/dist/plus-circle-filled-CbC0u2Y1.js +0 -17
  1172. package/dist/process-field-configurations-6LtTXNwK.js +0 -324
  1173. package/dist/pt-BR--kaJvtE6.js +0 -57
  1174. package/dist/pt-BR-BbFJsIVX.js +0 -55
  1175. package/dist/pt-BR-Be5ZycMV.js +0 -13
  1176. package/dist/pt-BR-Cj8MlQyq.js +0 -113
  1177. package/dist/pt-BR-Cm4vZocb.js +0 -13
  1178. package/dist/pt-BR-D1nTSLod.js +0 -29
  1179. package/dist/pt-BR-DKrMpM6v.js +0 -13
  1180. package/dist/pt-BR-NtLaWlnZ.js +0 -68
  1181. package/dist/pt-BR-ur86nRrK.js +0 -37
  1182. package/dist/pt-PT-B4F_5NWi.js +0 -55
  1183. package/dist/pt-PT-B9L50746.js +0 -29
  1184. package/dist/pt-PT-BJjCTMYf.js +0 -13
  1185. package/dist/pt-PT-BJkVzfAJ.js +0 -113
  1186. package/dist/pt-PT-BR-BI5Jn.js +0 -13
  1187. package/dist/pt-PT-BZ5ZZm6G.js +0 -57
  1188. package/dist/pt-PT-Bh7v8xbp.js +0 -13
  1189. package/dist/pt-PT-CVNEcs32.js +0 -37
  1190. package/dist/pt-PT-DSxxVA0f.js +0 -68
  1191. package/dist/recurring-CkL4cCM2.js +0 -17
  1192. package/dist/reporting-DerosUNm.js +0 -16
  1193. package/dist/resolveEnvironment-BC4yY4gV.js +0 -164
  1194. package/dist/revenue-accelerate-Dp4Ns_5c.js +0 -17
  1195. package/dist/review-CxIN9azU.js +0 -17
  1196. package/dist/ro-RO-5I4Q_FyK.js +0 -13
  1197. package/dist/ro-RO-B8leE4ZJ.js +0 -13
  1198. package/dist/ro-RO-Bybq8JFn.js +0 -68
  1199. package/dist/ro-RO-CICjAFys.js +0 -55
  1200. package/dist/ro-RO-CdSsgoUG.js +0 -57
  1201. package/dist/ro-RO-DjGku_3y.js +0 -13
  1202. package/dist/ro-RO-DvG65dTt.js +0 -29
  1203. package/dist/ro-RO-RgC5M6CE.js +0 -113
  1204. package/dist/ro-RO-i7lojG2G.js +0 -37
  1205. package/dist/rules-ajv47uCu.js +0 -314
  1206. package/dist/save-Fgy7EDid.js +0 -14
  1207. package/dist/search-C4GZ-Rc1.js +0 -17
  1208. package/dist/show-yPjPmEf8.js +0 -17
  1209. package/dist/singpass-logo-BkMSwiGY.js +0 -17
  1210. package/dist/singpass-verification-instant-hY4eGFwl.js +0 -40
  1211. package/dist/singpass-verification-manual-DwhRpy5Q.js +0 -34
  1212. package/dist/sk-SK-0BVxI7bf.js +0 -113
  1213. package/dist/sk-SK-B5brxU1N.js +0 -37
  1214. package/dist/sk-SK-BMJgOJoa.js +0 -29
  1215. package/dist/sk-SK-BRd5TN22.js +0 -55
  1216. package/dist/sk-SK-BVmoP_EU.js +0 -13
  1217. package/dist/sk-SK-BWwRIx2d.js +0 -13
  1218. package/dist/sk-SK-Bb18qPBw.js +0 -13
  1219. package/dist/sk-SK-BiBWPJUf.js +0 -57
  1220. package/dist/sk-SK-C6rMIxpz.js +0 -68
  1221. package/dist/sl-SI-6s8xycKg.js +0 -13
  1222. package/dist/sl-SI-BMF8YtOm.js +0 -29
  1223. package/dist/sl-SI-BxImW_RL.js +0 -113
  1224. package/dist/sl-SI-CUCrzJQv.js +0 -37
  1225. package/dist/sl-SI-CaJmYb6p.js +0 -13
  1226. package/dist/sl-SI-D8dDckrW.js +0 -55
  1227. package/dist/sl-SI-DtdGMD6i.js +0 -57
  1228. package/dist/sl-SI-ZxyvdgdS.js +0 -13
  1229. package/dist/sl-SI-tPwbFvOI.js +0 -68
  1230. package/dist/solution-payments-CNAat9h7.js +0 -14
  1231. package/dist/store-IuAkDRAp.js +0 -14
  1232. package/dist/sv-SE-B1sbgsnh.js +0 -13
  1233. package/dist/sv-SE-BUq1X9F0.js +0 -113
  1234. package/dist/sv-SE-BYC_f8r7.js +0 -29
  1235. package/dist/sv-SE-C6uPh9g5.js +0 -37
  1236. package/dist/sv-SE-CCFIf86P.js +0 -13
  1237. package/dist/sv-SE-DGpvVvWj.js +0 -55
  1238. package/dist/sv-SE-D_ZnGxiQ.js +0 -13
  1239. package/dist/sv-SE-K1QT1cOt.js +0 -68
  1240. package/dist/sv-SE-kR514dO1.js +0 -57
  1241. package/dist/tax-reporting-graph-DjzwRgE6.js +0 -504
  1242. package/dist/terminal-1-_me9J9h0.js +0 -18
  1243. package/dist/tink-logo-BcIv93ND.js +0 -17
  1244. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformationMultiform.d.ts +0 -9
  1245. package/dist/types/components/Business/forms/AdditionalInformation/VerifiedBusinessCard.d.ts +0 -9
  1246. package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +0 -11
  1247. package/dist/types/components/Business/forms/BusinessDetails/BusinessDetails.d.ts +0 -3
  1248. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelectionMultiform.d.ts +0 -14
  1249. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructureMultiform.d.ts +0 -4
  1250. package/dist/types/components/Business/tasks/BusinessDetailsDropin/mandatoryFields.d.ts +0 -3
  1251. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiformDropin.d.ts +0 -5
  1252. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/types.d.ts +0 -2
  1253. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +0 -19
  1254. package/dist/types/components/Individual/fields/DecisionMakerRole/DecisionMakerRole.d.ts +0 -3
  1255. package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +0 -10
  1256. package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +0 -23
  1257. package/dist/types/components/Individual/fields/LocalizedNameFields/types.d.ts +0 -9
  1258. package/dist/types/components/Individual/fields/NameFields/validate.d.ts +0 -4
  1259. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentAlreadyUpload.d.ts +0 -2
  1260. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentInstantVerification.d.ts +0 -3
  1261. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentUpload.d.ts +0 -3
  1262. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +0 -53
  1263. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/utils.d.ts +0 -3
  1264. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +0 -3
  1265. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +0 -15
  1266. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/types.d.ts +0 -14
  1267. package/dist/types/components/Individual/forms/Individual/Individual.d.ts +0 -9
  1268. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/Identity.d.ts +0 -2
  1269. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +0 -2
  1270. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/validate.d.ts +0 -3
  1271. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +0 -2
  1272. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/validate.d.ts +0 -3
  1273. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +0 -2
  1274. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/validate.d.ts +0 -3
  1275. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/TypeOfIdentity/index.d.ts +0 -11
  1276. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/identityUS/IdentityUS.d.ts +0 -4
  1277. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/types.d.ts +0 -14
  1278. package/dist/types/components/Individual/forms/Individual/PersonalDetails/PersonalDetails.d.ts +0 -3
  1279. package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +0 -39
  1280. package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +0 -21
  1281. package/dist/types/components/Individual/forms/Individual/ProofOfRelationship/types.d.ts +0 -14
  1282. package/dist/types/components/Individual/forms/Individual/ProofOfResidency/types.d.ts +0 -39
  1283. package/dist/types/components/Individual/forms/Individual/rules.d.ts +0 -40
  1284. package/dist/types/components/Individual/forms/Individual/types.d.ts +0 -51
  1285. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +0 -29
  1286. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/Identity.types.d.ts +0 -13
  1287. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/TypeOfIdentity/index.d.ts +0 -11
  1288. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/validate.d.ts +0 -4
  1289. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +0 -22
  1290. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +0 -22
  1291. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/validate.d.ts +0 -6
  1292. package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/ConflictRow.d.ts +0 -12
  1293. package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/DataConflictsModal.d.ts +0 -24
  1294. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +0 -17
  1295. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +0 -20
  1296. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +0 -7
  1297. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/UploadedDocument/UploadedDocument.d.ts +0 -7
  1298. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +0 -46
  1299. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +0 -4
  1300. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/validateExtractionResult.d.ts +0 -12
  1301. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -52
  1302. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +0 -46
  1303. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +0 -59
  1304. package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +0 -6
  1305. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +0 -13
  1306. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +0 -7
  1307. package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +0 -4
  1308. package/dist/types/components/Individual/mapping/adjustIdentificationData.d.ts +0 -3
  1309. package/dist/types/components/Individual/mapping/getIdentityTypeToApiIdentityTypeMap.d.ts +0 -3
  1310. package/dist/types/components/Individual/mapping/individualOnfidoKeyMappings.d.ts +0 -8
  1311. package/dist/types/components/Individual/mapping/mapIndividualOnfidoSchemaToLegalEntity.d.ts +0 -5
  1312. package/dist/types/components/Individual/mapping/mapIndividualToLegalEntity.d.ts +0 -3
  1313. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividual.d.ts +0 -3
  1314. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualOnfidoSchema.d.ts +0 -3
  1315. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoDropin.d.ts +0 -2
  1316. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/individualOnfidoFormConfig.d.ts +0 -4
  1317. package/dist/types/components/Shared/forms/BusinessTypeSelection/EntityTypeRadioGroupCard.d.ts +0 -11
  1318. package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +0 -4
  1319. package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +0 -3
  1320. package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +0 -3
  1321. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +0 -8
  1322. package/dist/types/components/ui/molecules/Card/Card.d.ts +0 -3
  1323. package/dist/types/components/ui/molecules/Card/types.d.ts +0 -26
  1324. package/dist/types/embeds/EmbedBaseElement.d.ts +0 -41
  1325. package/dist/types/embeds/EmbedCore.d.ts +0 -22
  1326. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +0 -13
  1327. package/dist/types/embeds/individual-configuration/AdyenIndividual.d.ts +0 -12
  1328. package/dist/types/embeds/individual-status/AdyenManageIndividual.d.ts +0 -12
  1329. package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +0 -12
  1330. package/dist/types/embeds/terms-of-service-management/AdyenTermsOfService.d.ts +0 -12
  1331. package/dist/types/embeds/terms-of-service-status/AdyenManageTermsOfService.d.ts +0 -12
  1332. package/dist/types/embeds/transfer-instrument-configuration/AdyenTransferInstrument.d.ts +0 -16
  1333. package/dist/types/embeds/transfer-instrument-management/AdyenManageTransferInstrument.d.ts +0 -14
  1334. package/dist/types/embeds/verification-status/AdyenVerificationStatus.d.ts +0 -20
  1335. package/dist/types-6CojAGL0.js +0 -88
  1336. package/dist/types-DRdQDn19.js +0 -34
  1337. package/dist/types-DnURYYMD.js +0 -74
  1338. package/dist/types-f66rmUFy.js +0 -164
  1339. package/dist/upload-BF65P4KM.js +0 -17
  1340. package/dist/us-check-CYY6Crhr.js +0 -46
  1341. package/dist/us-check-account-number-C7KE5YzX.js +0 -48
  1342. package/dist/us-check-routing-number-DUbhsYAR.js +0 -49
  1343. package/dist/useAssociatedLegalEntity-DlO3x839.js +0 -33
  1344. package/dist/useCreateLegalEntity-bNnaPjOD.js +0 -31
  1345. package/dist/useDataset-ClAqXJGw.js +0 -220
  1346. package/dist/useForm-C8SA0ETz.js +0 -1623
  1347. package/dist/useGlobalData-VlkNij1C.js +0 -68
  1348. package/dist/useMultiForm-C3xbz4Qc.js +0 -864
  1349. package/dist/useOnboardingStatus-Co_xweKQ.js +0 -27
  1350. package/dist/useScenarios-1AMNJb7O.js +0 -46
  1351. package/dist/useTermsOfServiceStatus-DTT-jTFK.js +0 -42
  1352. package/dist/useToastContext-mFlAEux_.js +0 -60
  1353. package/dist/useUnincorporatedPartnershipMembers-DeGZrXXu.js +0 -99
  1354. package/dist/useUpdateBusinessLines-DVnOsDCX.js +0 -46
  1355. package/dist/useUpdateLegalEntity-Hn7ZLWeu.js +0 -39
  1356. package/dist/utils-BH-_hzMa.js +0 -237
  1357. package/dist/utils-BvNcGa2w.js +0 -774
  1358. package/dist/validate-CJSILaC_.js +0 -41
  1359. package/dist/validate-DDHUnwWC.js +0 -100
  1360. package/dist/validationError-CfIII-oi.js +0 -86
  1361. package/dist/warning-circle-fill-CEN1WL7A.js +0 -17
  1362. package/dist/warning-diamond-filled-BfXMlVrG.js +0 -17
  1363. package/dist/webinar-DqjqrNEv.js +0 -22
  1364. package/dist/yapily-logo-CZ4ywjwA.js +0 -17
  1365. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/PayoutAccountTaskListItem.d.ts +0 -0
  1366. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskList.d.ts +0 -0
  1367. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListGroup.d.ts +0 -0
  1368. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListItem.d.ts +0 -0
  1369. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/types.d.ts +0 -0
  1370. /package/dist/types/components/Business/{tasks/BusinessDetailsMultiformDropin → forms/BusinessDetails}/BusinessDetailsMultiform.d.ts +0 -0
  1371. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/FinancialInformation.d.ts +0 -0
  1372. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/ReportedValue.d.ts +0 -0
  1373. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/types.d.ts +0 -0
  1374. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/validate.d.ts +0 -0
  1375. /package/dist/types/components/Business/tasks/{BusinessDetailsMultiformDropin → BusinessDetailsDropin}/validate.d.ts +0 -0
  1376. /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/AdditionalPersonalDetails.d.ts +0 -0
  1377. /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/Identity/Identity.d.ts +0 -0
  1378. /package/dist/types/components/Individual/forms/{IndividualOnfido/BasicDetails → BasicDetails}/BasicDetails.d.ts +0 -0
  1379. /package/dist/types/components/Individual/forms/{IndividualOnfido/GuidanceQuestion → GuidanceQuestion}/GuidanceQuestion.d.ts +0 -0
  1380. /package/dist/types/components/Individual/forms/{Individual/IdDocumentUpload → IdDocumentUpload}/IdDocumentManualUpload.d.ts +0 -0
  1381. /package/dist/types/components/Individual/forms/{IndividualOnfido/IdNowVerificationModal → IdNowVerificationModal}/IdNowVerificationModal.d.ts +0 -0
  1382. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/IdVerification.d.ts +0 -0
  1383. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/idVerificationProviderId.d.ts +0 -0
  1384. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/types.d.ts +0 -0
  1385. /package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/IdVerificationMethod.d.ts +0 -0
  1386. /package/dist/types/components/Individual/forms/{IndividualOnfido/ManualIdUpload → ManualIdUpload}/ManualIdUpload.d.ts +0 -0
  1387. /package/dist/types/components/Individual/forms/{Individual/ProofOfRelationship → ProofOfRelationship}/index.d.ts +0 -0
  1388. /package/dist/types/components/Individual/forms/{Individual/ProofOfResidency → ProofOfResidency}/ProofOfResidency.d.ts +0 -0
  1389. /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaire.d.ts +0 -0
  1390. /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaireModalContent.d.ts +0 -0
  1391. /package/dist/types/components/Individual/forms/{IndividualOnfido/UboQuestionnaire → UboQuestionnaire}/UboQuestionnaire.d.ts +0 -0
  1392. /package/dist/types/components/Individual/tasks/{IndividualOnfidoDropin/IndividualOnfidoStore.d.ts → IndividualDropin/IndividualStore.d.ts} +0 -0
  1393. /package/dist/types/components/{Individual → Shared}/fields/LocalizedNameFields/LocalizedNameFields.d.ts +0 -0
@@ -1,4841 +0,0 @@
1
- ;
2
- {
3
- try {
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] = "d3d85f93-b586-44e8-8aca-f81c15a6c88f", e._sentryDebugIdIdentifier = "sentry-dbid-d3d85f93-b586-44e8-8aca-f81c15a6c88f");
6
- } catch (e) {
7
- }
8
- }
9
- ;
10
- import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { signal } from "@preact/signals";
12
- import { useState, useEffect, useRef, useMemo, useCallback, useContext } from "preact/hooks";
13
- import { b as useApiContext, j as useQuery, k as httpPost, m as httpGet, a1 as useMutation, a2 as useQueryClient, U as createLogger, C as CountryCodes, u as useTranslation, c as useLegalEntity, R as ROOT_LE, t as LegalEntityTypes, a as addResourceBundles, L as Loader, N as EntityTypes, _ as __variableDynamicImportRuntimeHelper, a0 as useAnalyticsContext, a3 as Icon, H as Typography, B as Button, aj as objectsDeepEqual, aU as doArraysMatch, X as isEmpty, p as useExperimentsContext, bf as getSdkToken, J as hasOwnEntityAssociationOfType, M as useAccountHolder, o as useSettingsContext, g as getLegalEntityCountry, an as Trans, bg as EEA_Countries, bh as isAccountIdentifierObscured, bi as hasEmptyFields, bj as extractFieldName, bk as concatenateFieldNames, ap as keysOf, az as getCapabilityProblems, P as TaskTypes, aA as cloneObject, x as skipToken } from "./StoreProvider-l6WD5T55.js";
14
- import { u as useTransferInstrument, m as mapTransferInstrumentToPayoutAccount } from "./mapTransferInstrumentToPayoutAccount-DMZUSLNm.js";
15
- import { u as useForm, F as Field, S as Select, L as LoaderWrapper } from "./useForm-C8SA0ETz.js";
16
- import { E as ExperimentNames } from "./types-f66rmUFy.js";
17
- import { I as InputText, S as SettingNames } from "./InputText-DHRZ5RNd.js";
18
- import { u as useGlobalDataSlice, a as useGlobalData, c as useResetGlobalData, b as useStateContext } from "./useGlobalData-VlkNij1C.js";
19
- import { c as useInvalidateRootLegalEntity, a as useToastContext } from "./useToastContext-mFlAEux_.js";
20
- import { a as augmentWithCountryConfigs, g as getPropsFromConfigurations } from "./process-field-configurations-6LtTXNwK.js";
21
- import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-DSk8OL7G.js";
22
- import { A as AdyenKycSdkError, p as payoutAccountFormat, m as mapExistingFile, g as getPageName, u as useScenarioConfiguration, b as useUnifyLoadingStatus } from "./mapExistingFile-nB9LIvV9.js";
23
- import { u as useDataset, d as datasetIdentifier, C as Confirm, a as datasetUtilities } from "./useDataset-ClAqXJGw.js";
24
- import { c as currencyByCountry, C as Currencies } from "./types-6CojAGL0.js";
25
- import { F as FormWrapper } from "./FormWrapper-BfsyttAY.js";
26
- import { i as isValidationError, p as processValidationErrors, b as isIdDocumentUploadError, c as isBankStatementUploadError, a as isMaintenanceModeError, m as mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable } from "./validationError-CfIII-oi.js";
27
- import { f as fileToBase64, a as getDocument, c as createDocumentRequest, d as documentApiUtils, b as getFileExtention } from "./documentUtils-CunPooif.js";
28
- import { g as getLegalEntityNameBasedOnType, b as getPayoutAccountHolderName } from "./getName-_U3PeNHl.js";
29
- import { I as IFrameWidget, o as omitObscuredFieldsIfUnchanged } from "./iframeWidget-BEBSgwZP.js";
30
- import { Show } from "@preact/signals/utils";
31
- import { s as summaryStep } from "./Summary-Ccxu9A6C.js";
32
- import { c as createFormUtils, H as Header, E as ErrorPanel, S as StackLayout, e as isNotEmptyValidator, m as mergeFieldMetadataIntoProps, d as getFieldProps, C as CountryField, a as Link, g as getFormProps, s as summaryItem } from "./CountryField-D36v7bff.js";
33
- import { u as useAssociatedLegalEntity } from "./useAssociatedLegalEntity-DlO3x839.js";
34
- import { i as useCapabilityProblems, j as getProblemsForEntity, D as DropzoneFile, p as bytesToSize, l as defaultFileValidationOptions, o as fileValidationRules, S as StateContextSetter, q as DocumentGuidance, t as TextArea, m as makeMask, n as numericInputs, c as nonInputs, s as spacer, k as customInputs, v as validatePatternOnBlur, r as resolveFieldMetadata, M as MaskedInput, b as alphanumericInputs, u as uppercase, d as alphaInputs, I as Image, R as RadioGroupCard, C as ContextGuidance, x as createFormRules } from "./fieldConfigurations-D99U6JIQ.js";
35
- import cx from "classnames";
36
- import { memo, useRef as useRef$1, useState as useState$1, useMemo as useMemo$1, useEffect as useEffect$1, lazy } from "preact/compat";
37
- import { u as useUnincorporatedPartnershipMembers } from "./useUnincorporatedPartnershipMembers-DeGZrXXu.js";
38
- import { b as bankStatementDescriptionPattern } from "./basePatterns-BwdnMQxI.js";
39
- import { M as Modal } from "./Modal-lDK70UQc.js";
40
- import { E as EndStateLayout } from "./EndStateLayout-CPXu6AzB.js";
41
- import { createContext } from "preact";
42
- import { a as Alert } from "./Alert-BVHHWVgg.js";
43
- import { A as ActionBar } from "./ActionBar-Tv1K68ZK.js";
44
- import OpenBankingSDK from "@adyen/openbankingsdk";
45
- import { T as Tag } from "./Tag-DdkVScyr.js";
46
- import { C as Card } from "./Card-B66f7NuH.js";
47
- const getCheck = async (legalEntityId, baseUrl, data) => {
48
- return httpPost(
49
- {
50
- baseUrl,
51
- path: `legalEntities/${legalEntityId}/checks/bankAccount`
52
- },
53
- data
54
- );
55
- };
56
- const useCheck = (data, options) => {
57
- const { rootLegalEntityId, baseUrl: url } = useApiContext();
58
- return useQuery({
59
- queryKey: ["checkAsAService", data],
60
- queryFn: () => getCheck(rootLegalEntityId.value, url.value, data),
61
- ...options
62
- });
63
- };
64
- const getBankVerificationProviders = async (legalEntityId, baseUrl, queryParams) => {
65
- const { country, locale, configId } = queryParams;
66
- const providerParams = new URLSearchParams({
67
- country,
68
- locale,
69
- ...configId && { configId }
70
- });
71
- return httpGet({
72
- baseUrl,
73
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted/providers?${providerParams}`
74
- });
75
- };
76
- const useBankVerificationProviders = (queryParams, options) => {
77
- const { rootLegalEntityId, baseUrl } = useApiContext();
78
- return useQuery({
79
- queryKey: ["bankVerificationProviders", queryParams],
80
- queryFn: () => getBankVerificationProviders(rootLegalEntityId.value, baseUrl.value, queryParams),
81
- ...options
82
- });
83
- };
84
- const createTransferInstrument = async (rootLegalEntityId, baseUrl, transferInstrument) => {
85
- return httpPost(
86
- {
87
- baseUrl,
88
- path: `legalEntities/${rootLegalEntityId}/transferInstruments`
89
- },
90
- transferInstrument
91
- );
92
- };
93
- const createTrustedTransferInstrument = async (legalEntityId, baseUrl, data) => {
94
- return httpPost(
95
- {
96
- baseUrl,
97
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted`
98
- },
99
- data
100
- );
101
- };
102
- const useCreateTrustedTransferInstrument = (options) => {
103
- const { rootLegalEntityId, baseUrl } = useApiContext();
104
- return useMutation({
105
- mutationFn: (data) => createTrustedTransferInstrument(rootLegalEntityId.value, baseUrl.value, data),
106
- ...options
107
- });
108
- };
109
- const updateTransferInstrument = async (legalEntityId, baseUrl, transferInstrument, transferInstrumentId) => {
110
- return httpPost(
111
- {
112
- baseUrl,
113
- path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`
114
- },
115
- transferInstrument
116
- );
117
- };
118
- const useUpdateTransferInstrument = (options) => {
119
- const { rootLegalEntityId, baseUrl } = useApiContext();
120
- const queryClient = useQueryClient();
121
- return useMutation({
122
- mutationFn: ({ transferInstrument, transferInstrumentId }) => updateTransferInstrument(
123
- rootLegalEntityId.value,
124
- baseUrl.value,
125
- transferInstrument,
126
- transferInstrumentId
127
- ),
128
- onSuccess: async (transferInstrument) => {
129
- queryClient.setQueryData(["transferInstrument", transferInstrument.id], transferInstrument);
130
- await queryClient.invalidateQueries({
131
- // Invalidate transfer instruments on root LE
132
- queryKey: ["transferInstruments"]
133
- });
134
- },
135
- ...options
136
- });
137
- };
138
- const accountFormatsImports = /* @__PURE__ */ Object.assign({ "../accountFormats/AD.json": () => import("./AD-BQAadLyG.js"), "../accountFormats/AE.json": () => import("./AE-mIZ12t47.js"), "../accountFormats/AI.json": () => import("./AI-CYOqGKk2.js"), "../accountFormats/AL.json": () => import("./AL-BX1fEo1A.js"), "../accountFormats/AR.json": () => import("./AR-C9kMRnHG.js"), "../accountFormats/AS.json": () => import("./AS-B0TMZQ6o.js"), "../accountFormats/AT.json": () => import("./AT-BI8ju2NH.js"), "../accountFormats/AU.json": () => import("./AU-B5LSe4bo.js"), "../accountFormats/AX.json": () => import("./AX-Z6f6EnJc.js"), "../accountFormats/AZ.json": () => import("./AZ-BqrKjWMH.js"), "../accountFormats/BA.json": () => import("./BA-BbP72Tn6.js"), "../accountFormats/BE.json": () => import("./BE-nWHKW0xQ.js"), "../accountFormats/BG.json": () => import("./BG-DlvaKo4n.js"), "../accountFormats/BH.json": () => import("./BH-Ded1Eyrc.js"), "../accountFormats/BM.json": () => import("./BM-CBl-UQUl.js"), "../accountFormats/BR.json": () => import("./BR-DsY9PZVZ.js"), "../accountFormats/BS.json": () => import("./BS-dBfArxRw.js"), "../accountFormats/BV.json": () => import("./BV-D0QBsH7-.js"), "../accountFormats/BY.json": () => import("./BY-BsQUo3fM.js"), "../accountFormats/CA.json": () => import("./CA-DT4cmOOe.js"), "../accountFormats/CH.json": () => import("./CH-TX4BTE2y.js"), "../accountFormats/CN.json": () => import("./CN-BV-5PSpq.js"), "../accountFormats/CR.json": () => import("./CR-Dtv-rXg9.js"), "../accountFormats/CY.json": () => import("./CY-D59Nypl7.js"), "../accountFormats/CZ.json": () => import("./CZ-B6iI1GbE.js"), "../accountFormats/DE.json": () => import("./DE-CsuX_tSL.js"), "../accountFormats/DK.json": () => import("./DK-oQEFrF6o.js"), "../accountFormats/DO.json": () => import("./DO-B1BWc3Iy.js"), "../accountFormats/EC.json": () => import("./EC-DbNXe71-.js"), "../accountFormats/EE.json": () => import("./EE-3WZV5Ejt.js"), "../accountFormats/ES.json": () => import("./ES-NfxpqbC2.js"), "../accountFormats/FI.json": () => import("./FI-CHQIvHa-.js"), "../accountFormats/FJ.json": () => import("./FJ-CBdbPf5l.js"), "../accountFormats/FO.json": () => import("./FO-1pD1p939.js"), "../accountFormats/FR.json": () => import("./FR-MWZyWX3x.js"), "../accountFormats/GB.json": () => import("./GB-CCYHTagl.js"), "../accountFormats/GE.json": () => import("./GE-Deog1a3Z.js"), "../accountFormats/GF.json": () => import("./GF-Cda8N7A4.js"), "../accountFormats/GG.json": () => import("./GG-CPoMVQPc.js"), "../accountFormats/GI.json": () => import("./GI-DxmBwVD_.js"), "../accountFormats/GL.json": () => import("./GL-0vO9Of9c.js"), "../accountFormats/GP.json": () => import("./GP-za-3opp-.js"), "../accountFormats/GR.json": () => import("./GR-Rk0pXlNw.js"), "../accountFormats/GT.json": () => import("./GT-C1jhs-Dx.js"), "../accountFormats/GU.json": () => import("./GU-CALV5vh1.js"), "../accountFormats/HK.json": () => import("./HK-BB3PIq-Z.js"), "../accountFormats/HR.json": () => import("./HR-WapHW2fw.js"), "../accountFormats/HU.json": () => import("./HU-DCOMuOhe.js"), "../accountFormats/ID.json": () => import("./ID-BcOv4SXj.js"), "../accountFormats/IE.json": () => import("./IE-BkgtVgDi.js"), "../accountFormats/IL.json": () => import("./IL-CQ0yHRRe.js"), "../accountFormats/IM.json": () => import("./IM-Wr4iDT94.js"), "../accountFormats/IN.json": () => import("./IN-BhEI9o7G.js"), "../accountFormats/IS.json": () => import("./IS-C-Cgc6zp.js"), "../accountFormats/IT.json": () => import("./IT-CXekiddL.js"), "../accountFormats/JE.json": () => import("./JE-B4gj54Hg.js"), "../accountFormats/JM.json": () => import("./JM-BMGgBK6y.js"), "../accountFormats/JO.json": () => import("./JO-rY8A8f9C.js"), "../accountFormats/JP.json": () => import("./JP-BQG5dF1Y.js"), "../accountFormats/KR.json": () => import("./KR-74SwXHka.js"), "../accountFormats/KW.json": () => import("./KW-CcVPOJ8B.js"), "../accountFormats/KY.json": () => import("./KY-DXCeltYA.js"), "../accountFormats/KZ.json": () => import("./KZ-CZNjdp22.js"), "../accountFormats/LB.json": () => import("./LB-DZ5YfAsO.js"), "../accountFormats/LI.json": () => import("./LI-L0ZAALRT.js"), "../accountFormats/LT.json": () => import("./LT-Ao2uagV9.js"), "../accountFormats/LU.json": () => import("./LU-B7LRUuc6.js"), "../accountFormats/LV.json": () => import("./LV-DZeGjA2G.js"), "../accountFormats/MC.json": () => import("./MC-EDVNGWhy.js"), "../accountFormats/MD.json": () => import("./MD-DVc0183a.js"), "../accountFormats/ME.json": () => import("./ME-DiJhSuli.js"), "../accountFormats/MK.json": () => import("./MK-BZxslBTS.js"), "../accountFormats/MP.json": () => import("./MP-7IpnbfCj.js"), "../accountFormats/MQ.json": () => import("./MQ-DusG_no1.js"), "../accountFormats/MR.json": () => import("./MR-DaBVNHqN.js"), "../accountFormats/MT.json": () => import("./MT-B9my7RlP.js"), "../accountFormats/MU.json": () => import("./MU-D3gGVu1R.js"), "../accountFormats/MX.json": () => import("./MX-CZVOFg3D.js"), "../accountFormats/MY.json": () => import("./MY-ym71svTa.js"), "../accountFormats/NC.json": () => import("./NC-xzMvjp9-.js"), "../accountFormats/NL.json": () => import("./NL-VXAFOhV5.js"), "../accountFormats/NO.json": () => import("./NO-Cx1VSh2W.js"), "../accountFormats/NZ.json": () => import("./NZ-BP7_Q9Om.js"), "../accountFormats/PE.json": () => import("./PE-CdxgPh3v.js"), "../accountFormats/PF.json": () => import("./PF-CstaOd9Z.js"), "../accountFormats/PH.json": () => import("./PH-BYgMDYIH.js"), "../accountFormats/PK.json": () => import("./PK-bLhtgsEk.js"), "../accountFormats/PL.json": () => import("./PL-BZW1hGvD.js"), "../accountFormats/PM.json": () => import("./PM-BWbxAh4u.js"), "../accountFormats/PR.json": () => import("./PR-CFPKXEXp.js"), "../accountFormats/PS.json": () => import("./PS-B8obOOWY.js"), "../accountFormats/PT.json": () => import("./PT-OpU4MU3L.js"), "../accountFormats/QA.json": () => import("./QA-CSfx-mvb.js"), "../accountFormats/RE.json": () => import("./RE-BApq1FJ6.js"), "../accountFormats/RO.json": () => import("./RO-Cz6Sh0ls.js"), "../accountFormats/RS.json": () => import("./RS-BCenke-W.js"), "../accountFormats/RU.json": () => import("./RU-D27RC7dq.js"), "../accountFormats/SA.json": () => import("./SA-C9VgxCgm.js"), "../accountFormats/SE.json": () => import("./SE-B5K-FkQd.js"), "../accountFormats/SG.json": () => import("./SG-DoCqjlFi.js"), "../accountFormats/SI.json": () => import("./SI-BOGTNLPa.js"), "../accountFormats/SJ.json": () => import("./SJ-Z9jwQQlz.js"), "../accountFormats/SK.json": () => import("./SK-BOVrp_Av.js"), "../accountFormats/SM.json": () => import("./SM-meowwILA.js"), "../accountFormats/TF.json": () => import("./TF-BOWng-Dz.js"), "../accountFormats/TH.json": () => import("./TH-CvyXLcZK.js"), "../accountFormats/TL.json": () => import("./TL-BWslydRz.js"), "../accountFormats/TN.json": () => import("./TN-Cjd3bM_V.js"), "../accountFormats/TR.json": () => import("./TR-BBx5CuWS.js"), "../accountFormats/TT.json": () => import("./TT-D4-z5BA-.js"), "../accountFormats/TW.json": () => import("./TW-BC8YpnMr.js"), "../accountFormats/UA.json": () => import("./UA-DrXUnAe6.js"), "../accountFormats/US.json": () => import("./US-D8dI5_i1.js"), "../accountFormats/UY.json": () => import("./UY-DEHqLXhX.js"), "../accountFormats/VA.json": () => import("./VA-DXsYTCoh.js"), "../accountFormats/VG.json": () => import("./VG-DnKAVCsi.js"), "../accountFormats/VI.json": () => import("./VI-CU9MA9ux.js"), "../accountFormats/VN.json": () => import("./VN-CTSqsmB6.js"), "../accountFormats/WF.json": () => import("./WF-CwHbsjtJ.js"), "../accountFormats/YT.json": () => import("./YT-BCyAAbo7.js"), "../accountFormats/ZA.json": () => import("./ZA-NU7slima.js") });
139
- const getAccountFormatsForCountry = async (country) => {
140
- const importForCountry = accountFormatsImports[`../accountFormats/${country}.json`];
141
- if (!importForCountry) {
142
- throw Error(`No account formats available for ${country}`);
143
- }
144
- const countryBankFormats = (await importForCountry()).default;
145
- const expandedBankFormats = {
146
- ...countryBankFormats,
147
- numberAndBic: {
148
- bankStatementRequirement: "OPTIONAL",
149
- fields: ["bankAccountNumber", "swiftCode"]
150
- }
151
- };
152
- return expandedBankFormats;
153
- };
154
- const validateAccountIdentification = async (baseUrl, data) => {
155
- return httpPost(
156
- {
157
- baseUrl,
158
- path: `validations/accountidentification`
159
- },
160
- {
161
- accountIdentification: {
162
- ...data
163
- }
164
- }
165
- );
166
- };
167
- const useValidateAccountIdentification = (options) => {
168
- const { baseUrl } = useApiContext();
169
- return useMutation({
170
- mutationFn: (data) => validateAccountIdentification(baseUrl.value, data),
171
- ...options
172
- });
173
- };
174
- const useAsyncAccountDetailsValidationRules = (payload, hasEmptyFields2, isAccountNumberMasked) => {
175
- const [timeoutId, setTimeoutId] = useState(null);
176
- const [accountValidationData, setAccountValidationData] = useState({
177
- invalidFields: [],
178
- valid: false
179
- });
180
- const { mutateAsync } = useValidateAccountIdentification();
181
- useEffect(() => {
182
- const fetchAccountDetails = async (accountIdentificationPayload) => {
183
- try {
184
- const accountIdentificationResponse = await mutateAsync(accountIdentificationPayload);
185
- setAccountValidationData(accountIdentificationResponse);
186
- } catch (error) {
187
- console.error("Error fetching account details:", error);
188
- }
189
- };
190
- if (payload && !hasEmptyFields2 && !isAccountNumberMasked) {
191
- if (timeoutId !== null) {
192
- clearTimeout(timeoutId);
193
- }
194
- setTimeoutId(
195
- setTimeout(() => {
196
- fetchAccountDetails(payload);
197
- setTimeoutId(null);
198
- }, 500)
199
- );
200
- }
201
- }, [mutateAsync, hasEmptyFields2, payload]);
202
- return accountValidationData;
203
- };
204
- const logger = createLogger();
205
- const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCountry, enabledCrossBorderPayouts) => {
206
- if ("iban" in payoutAccount && payoutAccount.iban) {
207
- return {
208
- type: "iban",
209
- iban: payoutAccount.iban
210
- };
211
- }
212
- if (enabledCrossBorderPayouts && "bankAccountNumber" in payoutAccount && payoutAccount.bankAccountNumber && "swiftCode" in payoutAccount && payoutAccount.swiftCode) {
213
- return {
214
- type: "numberAndBic",
215
- bic: payoutAccount.swiftCode,
216
- accountNumber: payoutAccount.bankAccountNumber
217
- };
218
- }
219
- switch (bankCountry) {
220
- case CountryCodes.Australia:
221
- return {
222
- type: "auLocal",
223
- accountNumber: payoutAccount.bankAccountNumber,
224
- bsbCode: payoutAccount.branchCode
225
- };
226
- case CountryCodes.Brazil:
227
- return {
228
- type: "brLocal",
229
- accountNumber: payoutAccount.bankAccountNumber,
230
- ispb: payoutAccount.bankCode,
231
- bankCode: payoutAccount.bankName,
232
- branchNumber: payoutAccount.branchCode
233
- };
234
- case CountryCodes.Canada:
235
- return {
236
- type: "caLocal",
237
- accountNumber: payoutAccount.bankAccountNumber,
238
- institutionNumber: payoutAccount.bankCode,
239
- transitNumber: payoutAccount.branchCode
240
- };
241
- case CountryCodes.CzechRepublic:
242
- return {
243
- type: "czLocal",
244
- accountNumber: payoutAccount.bankAccountNumber,
245
- bankCode: payoutAccount.bankCode
246
- };
247
- case CountryCodes.Denmark:
248
- return {
249
- type: "dkLocal",
250
- accountNumber: payoutAccount.bankAccountNumber,
251
- bankCode: payoutAccount.bankCode
252
- };
253
- case CountryCodes.HongKong:
254
- return {
255
- type: "hkLocal",
256
- accountNumber: payoutAccount.bankAccountNumber,
257
- clearingCode: payoutAccount.bankCode
258
- };
259
- case CountryCodes.NewZealand:
260
- return {
261
- type: "nzLocal",
262
- accountNumber: payoutAccount.bankAccountNumber?.replaceAll("-", "")
263
- };
264
- case CountryCodes.Sweden:
265
- return {
266
- type: "seLocal",
267
- accountNumber: payoutAccount.bankAccountNumber,
268
- clearingNumber: payoutAccount.branchCode
269
- };
270
- case CountryCodes.Singapore:
271
- return {
272
- type: "sgLocal",
273
- accountNumber: payoutAccount.bankAccountNumber,
274
- bic: payoutAccount.swiftCode
275
- };
276
- case CountryCodes.IsleOfMan:
277
- case CountryCodes.Guernsey:
278
- case CountryCodes.Gibraltar:
279
- case CountryCodes.Jersey:
280
- case CountryCodes.UnitedKingdom:
281
- return {
282
- type: "ukLocal",
283
- // for some reason GB's account identification is called `ukLocalAccountIdentification`
284
- accountNumber: payoutAccount.bankAccountNumber,
285
- sortCode: payoutAccount.branchCode
286
- };
287
- case CountryCodes.NorthernMarianaIslands:
288
- case CountryCodes.Guam:
289
- case CountryCodes.VirginIslandsUS:
290
- case CountryCodes.AmericanSamoa:
291
- case CountryCodes.PuertoRico:
292
- case CountryCodes.UnitedStates:
293
- return {
294
- type: "usLocal",
295
- accountNumber: payoutAccount.bankAccountNumber,
296
- routingNumber: payoutAccount.branchCode
297
- };
298
- default:
299
- logger.log(`${bankCountry.toLowerCase()}Local is not a configured region`);
300
- return {
301
- type: `${bankCountry.toLowerCase()}Local`,
302
- accountNumber: payoutAccount.bankAccountNumber
303
- };
304
- }
305
- };
306
- const mapPayoutAccountSchemaToApiBankAccount = (payoutAccount, bankCountry, preferredCurrency, enabledCrossBorderPayouts) => ({
307
- accountIdentification: getAccountIdentificationFromPayoutAccountSchema(
308
- payoutAccount,
309
- bankCountry,
310
- enabledCrossBorderPayouts
311
- ),
312
- preferredCurrencyCode: preferredCurrency,
313
- countryCode: bankCountry,
314
- bankName: payoutAccount.bankName
315
- });
316
- const showPayoutVerificationMethodError = signal(false);
317
- function PayoutDetailsPage({
318
- transferInstrumentId,
319
- setTransferInstrumentId,
320
- taskType,
321
- openBankingPartnerConfigId,
322
- onSubmit,
323
- handleHomeClick
324
- }) {
325
- const { i18n } = useTranslation();
326
- const { data: rootLe } = useLegalEntity(ROOT_LE);
327
- const { data: associatedLe, isLoading: associatedLeIsLoading } = useAssociatedLegalEntity(
328
- rootLe,
329
- [
330
- LegalEntityTypes.SOLE_PROPRIETORSHIP,
331
- LegalEntityTypes.TRUST,
332
- LegalEntityTypes.UNINCORPORATED_PARTNERSHIP
333
- ]
334
- );
335
- const capabilityProblems = useCapabilityProblems();
336
- addResourceBundles(i18n, [
337
- { ns: "banking", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../language/bg-BG.json": () => import("./bg-BG-DRkMqyL8.js"), "../language/cs-CZ.json": () => import("./cs-CZ-DalFZigH.js"), "../language/da-DK.json": () => import("./da-DK-P3YSaBqs.js"), "../language/de-DE.json": () => import("./de-DE-opyC1JO-.js"), "../language/el-GR.json": () => import("./el-GR-CWd7XYDU.js"), "../language/en-US.json": () => import("./en-US-h0JneJJl.js"), "../language/es-ES.json": () => import("./es-ES-BhINIOee.js"), "../language/et-EE.json": () => import("./et-EE-x29FUaYN.js"), "../language/fi-FI.json": () => import("./fi-FI-CDISJifz.js"), "../language/fr-FR.json": () => import("./fr-FR-aJ3cg4x0.js"), "../language/hr-HR.json": () => import("./hr-HR-VivDwwdW.js"), "../language/hu-HU.json": () => import("./hu-HU-WEtpzb41.js"), "../language/it-IT.json": () => import("./it-IT-C2MZo4KT.js"), "../language/ja-JP.json": () => import("./ja-JP-Bktpl_2b.js"), "../language/lt-LT.json": () => import("./lt-LT-W6fTjwB5.js"), "../language/lv-LV.json": () => import("./lv-LV-CxUmQHF9.js"), "../language/nl-NL.json": () => import("./nl-NL-Bk-1-C0e.js"), "../language/no-NO.json": () => import("./no-NO-DN9qf-_I.js"), "../language/pl-PL.json": () => import("./pl-PL-Duj3tncM.js"), "../language/pt-BR.json": () => import("./pt-BR-Cm4vZocb.js"), "../language/pt-PT.json": () => import("./pt-PT-BJjCTMYf.js"), "../language/ro-RO.json": () => import("./ro-RO-B8leE4ZJ.js"), "../language/sk-SK.json": () => import("./sk-SK-BWwRIx2d.js"), "../language/sl-SI.json": () => import("./sl-SI-6s8xycKg.js"), "../language/sv-SE.json": () => import("./sv-SE-B1sbgsnh.js") }), `../language/${lang}.json`, 3) }
338
- ]);
339
- if (!rootLe || associatedLeIsLoading) {
340
- return /* @__PURE__ */ jsx(Loader, {});
341
- }
342
- const problems = capabilityProblems && transferInstrumentId ? getProblemsForEntity(capabilityProblems, EntityTypes.BANK_ACCOUNT, transferInstrumentId) : void 0;
343
- return /* @__PURE__ */ jsx(
344
- PayoutDetailsDropin,
345
- {
346
- taskType,
347
- currentTransferInstrumentId: transferInstrumentId,
348
- setCurrentTransferInstrumentId: setTransferInstrumentId,
349
- legalEntityResponse: rootLe,
350
- associatedLegalArrangement: associatedLe,
351
- problems,
352
- onSubmit,
353
- handleHomeClick,
354
- navigateBackToTaskList: handleHomeClick,
355
- openBankingPartnerConfigId
356
- }
357
- );
358
- }
359
- const PayoutDetailsPage$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
360
- __proto__: null,
361
- PayoutDetailsPage,
362
- showPayoutVerificationMethodError
363
- }, Symbol.toStringTag, { value: "Module" }));
364
- function FilePicker({
365
- files,
366
- setFiles,
367
- isValid,
368
- errorMessage,
369
- multiple = false,
370
- label,
371
- name,
372
- iconPrefix = "generic-document",
373
- enableTracking = false,
374
- id,
375
- loading,
376
- // file validation options
377
- allowedFileTypes,
378
- maxSize,
379
- isOptional,
380
- maxNumberOfFiles,
381
- // a11y
382
- "aria-describedby": ariaDescribedBy,
383
- "aria-labelledby": ariaLabelledBy
384
- }) {
385
- const { t } = useTranslation("ui");
386
- const userEvents = useAnalyticsContext();
387
- const fileInput = useRef(null);
388
- const [dragged, setDragged] = useState(false);
389
- const hasRequiredError = errorMessage === "fieldIsRequired";
390
- const showDropzone = files.length < maxNumberOfFiles;
391
- const openFilePicker = () => fileInput.current?.click();
392
- const handleFileDelete = (fileToDelete) => setFiles(files.filter((file) => file !== fileToDelete));
393
- const handleDragEnter = (e) => {
394
- e.preventDefault();
395
- e.stopPropagation();
396
- };
397
- const handleDragLeave = (e) => {
398
- e.preventDefault();
399
- e.stopPropagation();
400
- setDragged(false);
401
- };
402
- const handleDragOver = (e) => {
403
- e.preventDefault();
404
- e.stopPropagation();
405
- setDragged(true);
406
- };
407
- const handleDrop = (e) => {
408
- e.preventDefault();
409
- e.stopPropagation();
410
- if (e.dataTransfer) addFiles(e.dataTransfer.files);
411
- setDragged(false);
412
- };
413
- const handleFilesChosen = (e) => {
414
- const fileInput2 = e.target;
415
- if (fileInput2.files) addFiles(fileInput2.files);
416
- };
417
- const addFiles = (newFiles) => {
418
- if (enableTracking) {
419
- userEvents.addFieldEvent("Interacted with form field", {
420
- actionType: "change",
421
- field: name || "dropzone"
422
- });
423
- }
424
- setFiles([...newFiles, ...files]);
425
- };
426
- const allowedFileTypesString = allowedFileTypes.join(", ");
427
- return /* @__PURE__ */ jsxs("div", { children: [
428
- label && /* @__PURE__ */ jsx(
429
- "div",
430
- {
431
- className: cx("adyen-kyc-label__text", {
432
- "adyen-kyc-label__text--error": hasRequiredError
433
- }),
434
- children: label
435
- }
436
- ),
437
- files.map((file) => /* @__PURE__ */ jsx(
438
- DropzoneFile,
439
- {
440
- file,
441
- onDelete: () => handleFileDelete(file),
442
- errorMessage,
443
- iconPrefix,
444
- loading
445
- },
446
- file
447
- )),
448
- showDropzone && /* @__PURE__ */ jsxs(
449
- "div",
450
- {
451
- role: "region",
452
- className: cx("adyen-kyc-dropzone", {
453
- "adyen-kyc-dropzone--dragged": dragged,
454
- "adyen-kyc-dropzone--error": !dragged && hasRequiredError
455
- }),
456
- onDrop: handleDrop,
457
- onDragOver: handleDragOver,
458
- onDragEnter: handleDragEnter,
459
- onDragLeave: handleDragLeave,
460
- children: [
461
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropzone__icon", children: /* @__PURE__ */ jsx(Icon, { name: "upload" }) }),
462
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-dropzone__labels", children: [
463
- /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-strongest", children: t(($) => $["dropFileToUpload"]) }),
464
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: t(($) => $["supportedFileTypes"], { fileTypes: allowedFileTypesString }) }),
465
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: t(($) => $["maxFileSize"], { maxSize: bytesToSize(maxSize) }) }),
466
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: t(($) => $["upToFiles"], { maxFiles: maxNumberOfFiles }) })
467
- ] }),
468
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropzone__button", children: /* @__PURE__ */ jsx(Button, { onClick: openFilePicker, variant: "secondary", children: t(($) => $["browseFiles"]) }) }),
469
- /* @__PURE__ */ jsx(
470
- "input",
471
- {
472
- id,
473
- className: "adyen-kyc-dropzone__input",
474
- ref: fileInput,
475
- multiple,
476
- accept: allowedFileTypesString,
477
- onChange: handleFilesChosen,
478
- type: "file",
479
- "aria-required": !isOptional,
480
- "aria-describedby": ariaDescribedBy,
481
- "aria-labelledby": ariaLabelledBy,
482
- "data-testid": "hidden-file-input",
483
- "aria-invalid": !isValid
484
- }
485
- )
486
- ]
487
- }
488
- ),
489
- hasRequiredError && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-error-text", children: t(($) => $["fieldIsRequired"]) })
490
- ] });
491
- }
492
- const bankDocument = "adyen-kyc-bank-document";
493
- const bankDocumentDocumentUpload = "adyen-kyc-bank-document-document-upload";
494
- const bankDocumentDocumentDescription = "adyen-kyc-bank-document-document-description";
495
- const styles$5 = {
496
- bankDocument,
497
- bankDocumentDocumentUpload,
498
- bankDocumentDocumentDescription
499
- };
500
- const documentRequirements$1 = "adyen-kyc-document-requirements";
501
- const documentRequirementsSubtitle = "adyen-kyc-document-requirements-subtitle";
502
- const styles$4 = {
503
- documentRequirements: documentRequirements$1,
504
- documentRequirementsSubtitle
505
- };
506
- const BankDocumentTypes = {
507
- BANK_STATEMENT: "bankStatement",
508
- DEPOSIT_SLIP: "depositSlip",
509
- SCREENSHOT_OF_BANK: "screenshotOfOnlineBankingEnviroment",
510
- A_LETTER_FROM_YOUR_BANK: "aLetterFromYourBank",
511
- CHECK: "check"
512
- };
513
- const bankDocumentOptions = [
514
- { id: BankDocumentTypes.BANK_STATEMENT, name: "bankStatementDocument" },
515
- { id: BankDocumentTypes.DEPOSIT_SLIP, name: "depositSlip" },
516
- { id: BankDocumentTypes.SCREENSHOT_OF_BANK, name: "screenshotOfOnlineBankingEnviroment" },
517
- { id: BankDocumentTypes.A_LETTER_FROM_YOUR_BANK, name: "aLetterFromYourBank" },
518
- { id: BankDocumentTypes.CHECK, name: "check" }
519
- ];
520
- const BankDocumentRequirement = {
521
- ACCOUNT_NAME_INDIVIDUAL: "bankAccountNameIndividual",
522
- ACCOUNT_NAME_ORGANIZATION: "bankAccountNameOrganization",
523
- ACCOUNT_NAME_WITH_SOLE_PROP: "bankAccountNameWithSoleProprietor",
524
- ACCOUNT_NAME_WITH_TRUST: "bankAccountNameWithTrust",
525
- ACCOUNT_NAME_WITH_UNINCORPORATED_PARTNERSHIP: "accountMustBeInTheNameOfUnincorporatedPartnership",
526
- ACCOUNT_NUMBER_OR_IBAN: "accountNumberOrIbanVisible",
527
- ACCOUNT_NUMBER: "accountNumberVisible",
528
- ACCOUNT_NUMBER_FULL_OR_PARTIAL: "accountNumberFullOrPartialVisible",
529
- DATE_ON_DOCUMENT: "datedInTheLastXMonths",
530
- COUNTRY_OF_BANK: "showsCountryOfBankAccount",
531
- OFFICIAL_DOCUMENT: "hasToBeOfficialDocumentFromBank",
532
- STAMP_OR_SIGNATURE: "hasBankStampOrBankSignature",
533
- HIGH_RESOLUTION_CHECK: "highResolutionCheck"
534
- };
535
- const accountNameRequirement = {
536
- [LegalEntityTypes.INDIVIDUAL]: {
537
- default: BankDocumentRequirement.ACCOUNT_NAME_INDIVIDUAL
538
- },
539
- [LegalEntityTypes.ORGANIZATION]: {
540
- default: BankDocumentRequirement.ACCOUNT_NAME_ORGANIZATION
541
- }
542
- };
543
- const accountNameRequirementWithLegalArrangement = {
544
- [LegalEntityTypes.INDIVIDUAL]: {
545
- [LegalEntityTypes.SOLE_PROPRIETORSHIP]: {
546
- default: BankDocumentRequirement.ACCOUNT_NAME_WITH_SOLE_PROP
547
- },
548
- [LegalEntityTypes.TRUST]: {
549
- [CountryCodes.UnitedStates]: "bankAccountNameWithTrust_US",
550
- default: BankDocumentRequirement.ACCOUNT_NAME_WITH_TRUST
551
- },
552
- [LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]: {
553
- default: BankDocumentRequirement.ACCOUNT_NAME_WITH_UNINCORPORATED_PARTNERSHIP
554
- }
555
- },
556
- [LegalEntityTypes.ORGANIZATION]: {
557
- [LegalEntityTypes.TRUST]: {
558
- [CountryCodes.UnitedStates]: "bankAccountNameWithTrust_US",
559
- default: BankDocumentRequirement.ACCOUNT_NAME_WITH_TRUST
560
- },
561
- [LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]: {
562
- default: BankDocumentRequirement.ACCOUNT_NAME_WITH_UNINCORPORATED_PARTNERSHIP
563
- }
564
- }
565
- };
566
- const applyNamedModifiers = (country, documentModifiers) => {
567
- if (!documentModifiers.associatedEntityType || !documentModifiers.associatedEntityLegalName) {
568
- switch (documentModifiers.rootEntityType) {
569
- case LegalEntityTypes.INDIVIDUAL:
570
- return {
571
- key: accountNameRequirement[LegalEntityTypes.INDIVIDUAL].default,
572
- options: { values: { individualLegalName: documentModifiers.rootEntityLegalName } }
573
- };
574
- case LegalEntityTypes.ORGANIZATION:
575
- default:
576
- return {
577
- key: accountNameRequirement[LegalEntityTypes.ORGANIZATION].default,
578
- options: { values: { companyLegalName: documentModifiers.rootEntityLegalName } }
579
- };
580
- }
581
- }
582
- switch (documentModifiers.rootEntityType) {
583
- case LegalEntityTypes.INDIVIDUAL:
584
- switch (documentModifiers.associatedEntityType) {
585
- case LegalEntityTypes.TRUST:
586
- return {
587
- key: accountNameRequirementWithLegalArrangement[LegalEntityTypes.INDIVIDUAL][LegalEntityTypes.TRUST]?.[country] ?? accountNameRequirementWithLegalArrangement[LegalEntityTypes.INDIVIDUAL][LegalEntityTypes.TRUST].default,
588
- options: {
589
- values: {
590
- trusteeName: documentModifiers.rootEntityLegalName,
591
- trustLegalName: documentModifiers.associatedEntityLegalName,
592
- trustTradingName: documentModifiers.associatedEntityTradingName ?? documentModifiers.associatedEntityLegalName
593
- }
594
- }
595
- };
596
- case LegalEntityTypes.UNINCORPORATED_PARTNERSHIP:
597
- return {
598
- key: accountNameRequirementWithLegalArrangement[LegalEntityTypes.INDIVIDUAL][LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]?.[country] ?? accountNameRequirementWithLegalArrangement[LegalEntityTypes.INDIVIDUAL][LegalEntityTypes.UNINCORPORATED_PARTNERSHIP].default,
599
- options: {
600
- values: {
601
- partnerNames: documentModifiers.unincorporatedPartnershipMembers || "",
602
- partnershipName: documentModifiers.associatedEntityLegalName
603
- }
604
- }
605
- };
606
- case LegalEntityTypes.SOLE_PROPRIETORSHIP:
607
- default:
608
- return {
609
- key: accountNameRequirementWithLegalArrangement[LegalEntityTypes.INDIVIDUAL][LegalEntityTypes.SOLE_PROPRIETORSHIP].default,
610
- options: {
611
- values: {
612
- individualLegalName: documentModifiers.rootEntityLegalName,
613
- soleProprietorshipName: documentModifiers.associatedEntityLegalName
614
- }
615
- }
616
- };
617
- }
618
- case LegalEntityTypes.ORGANIZATION:
619
- default:
620
- switch (documentModifiers.associatedEntityType) {
621
- case LegalEntityTypes.TRUST:
622
- return {
623
- key: accountNameRequirementWithLegalArrangement[LegalEntityTypes.ORGANIZATION][LegalEntityTypes.TRUST]?.[country] ?? accountNameRequirementWithLegalArrangement[LegalEntityTypes.ORGANIZATION][LegalEntityTypes.TRUST].default,
624
- options: {
625
- values: {
626
- trusteeName: documentModifiers.rootEntityLegalName,
627
- trustLegalName: documentModifiers.associatedEntityLegalName,
628
- trustTradingName: documentModifiers.associatedEntityTradingName ?? documentModifiers.associatedEntityLegalName
629
- }
630
- }
631
- };
632
- case LegalEntityTypes.UNINCORPORATED_PARTNERSHIP:
633
- return {
634
- key: accountNameRequirementWithLegalArrangement[LegalEntityTypes.ORGANIZATION][LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]?.[country] ?? accountNameRequirementWithLegalArrangement[LegalEntityTypes.ORGANIZATION][LegalEntityTypes.UNINCORPORATED_PARTNERSHIP].default,
635
- options: {
636
- values: {
637
- partnerNames: documentModifiers.unincorporatedPartnershipMembers || "",
638
- partnershipName: documentModifiers.associatedEntityLegalName
639
- }
640
- }
641
- };
642
- default:
643
- return { key: accountNameRequirement[LegalEntityTypes.ORGANIZATION].default };
644
- }
645
- }
646
- };
647
- const getBankDocumentRequirements = (country, documentType, documentModifiers) => {
648
- const isBasedInUS = country === "US";
649
- const baseRequirements = isBasedInUS ? [{ key: BankDocumentRequirement.OFFICIAL_DOCUMENT }] : [
650
- { key: BankDocumentRequirement.OFFICIAL_DOCUMENT },
651
- { key: BankDocumentRequirement.COUNTRY_OF_BANK }
652
- ];
653
- const accountNumberRequirement = isBasedInUS ? documentType === BankDocumentTypes.CHECK || documentType === BankDocumentTypes.DEPOSIT_SLIP ? [{ key: BankDocumentRequirement.ACCOUNT_NUMBER }] : [{ key: BankDocumentRequirement.ACCOUNT_NUMBER_FULL_OR_PARTIAL }] : [{ key: BankDocumentRequirement.ACCOUNT_NUMBER_OR_IBAN }];
654
- const requireLast12Months = isBasedInUS ? documentType === BankDocumentTypes.A_LETTER_FROM_YOUR_BANK || documentType === BankDocumentTypes.BANK_STATEMENT : documentType !== BankDocumentTypes.SCREENSHOT_OF_BANK;
655
- const requireStampOrSignature = !isBasedInUS && (documentType === BankDocumentTypes.DEPOSIT_SLIP || documentType === BankDocumentTypes.A_LETTER_FROM_YOUR_BANK);
656
- const requirements = [
657
- applyNamedModifiers(country, documentModifiers),
658
- ...accountNumberRequirement,
659
- ...baseRequirements
660
- ];
661
- if (requireLast12Months) {
662
- requirements.push({
663
- key: BankDocumentRequirement.DATE_ON_DOCUMENT,
664
- options: { values: { number: 12 } }
665
- });
666
- }
667
- if (requireStampOrSignature) {
668
- requirements.push({ key: BankDocumentRequirement.STAMP_OR_SIGNATURE });
669
- }
670
- if (isBasedInUS && documentType === BankDocumentTypes.CHECK) {
671
- requirements.push({ key: BankDocumentRequirement.HIGH_RESOLUTION_CHECK });
672
- }
673
- return requirements;
674
- };
675
- const BankDocumentRequirements = ({
676
- country,
677
- documentType,
678
- documentModifiers
679
- }) => {
680
- const { t } = useTranslation("banking");
681
- const { t: commonT } = useTranslation("common");
682
- const documentRequirements2 = getBankDocumentRequirements(
683
- country,
684
- documentType,
685
- documentModifiers
686
- );
687
- return /* @__PURE__ */ jsxs("div", { className: styles$4.documentRequirements, children: [
688
- /* @__PURE__ */ jsx("strong", { className: styles$4.documentRequirementsSubtitle, children: commonT(($) => $["documentRequirements"]) }),
689
- /* @__PURE__ */ jsx("ul", { children: documentRequirements2.map(({ key, options }, i) => /* @__PURE__ */ jsx("li", { "data-testid": key, children: t(($) => $[key], options?.values) }, i)) })
690
- ] });
691
- };
692
- const bankDocumentValidationRules = {
693
- description: {
694
- modes: ["blur"],
695
- validate: (description2) => description2 ? bankStatementDescriptionPattern.test(description2) : true,
696
- errorMessage: "invalidFormatBankStatementDescription"
697
- }
698
- };
699
- const getValidationIssuesKeys = (validationResponse) => {
700
- const issues2 = [];
701
- const { blurryOrLowQuality, documentType } = validationResponse;
702
- if (blurryOrLowQuality) {
703
- issues2.push("documentIsntReadable");
704
- }
705
- if (documentType === "other" || documentType !== "bankDocument") {
706
- issues2.push("documentIsNotBankDocument");
707
- }
708
- if (!documentType || documentType === "other") {
709
- issues2.push("documentNameMissing");
710
- }
711
- return issues2;
712
- };
713
- const CHARACTERS_LIMIT$1 = 200;
714
- const bankDocumentFields = [
715
- "documentType",
716
- "bankStatementDocument",
717
- "description"
718
- ];
719
- function BankDocument(props) {
720
- const {
721
- legalEntity,
722
- associatedLegalArrangement,
723
- country,
724
- optionalFields,
725
- validators,
726
- data: bankData,
727
- id,
728
- description: description2,
729
- heading,
730
- formIsActive,
731
- fieldValidationErrors,
732
- shouldValidate
733
- } = props;
734
- const { t } = useTranslation("banking");
735
- const { t: commonT } = useTranslation("common");
736
- const stateRef = useRef({ setState: null });
737
- const isBankStatementOptional = optionalFields?.includes("bankStatementDocument") ?? false;
738
- const formUtils = createFormUtils(props, commonT);
739
- const bankStatementValidationOptions = useMemo(
740
- () => ({
741
- ...defaultFileValidationOptions,
742
- isOptional: isBankStatementOptional
743
- }),
744
- [isBankStatementOptional]
745
- );
746
- const rules2 = useMemo(
747
- () => ({
748
- ...validators || bankDocumentValidationRules,
749
- bankStatementDocument: fileValidationRules(bankStatementValidationOptions)
750
- }),
751
- [bankStatementValidationOptions, validators]
752
- );
753
- const { handleChangeFor, data, setData, valid, fieldProblems, errors, triggerValidation } = useForm({
754
- ...props,
755
- schema: bankDocumentFields,
756
- defaultData: bankData,
757
- rules: rules2,
758
- fieldProblems: fieldValidationErrors,
759
- shouldValidate
760
- });
761
- useEffect(() => {
762
- if (formIsActive) {
763
- triggerValidation();
764
- }
765
- }, [formIsActive, triggerValidation]);
766
- const alreadyUploadedDocuments = useMemo(
767
- () => bankData?.bankStatementDocument ?? [],
768
- [bankData?.bankStatementDocument]
769
- );
770
- const hasAlreadyUploadedDocuments = alreadyUploadedDocuments.length > 0;
771
- const usingExistingUploadedDocuments = data.bankStatementDocument && doArraysMatch(alreadyUploadedDocuments, data.bankStatementDocument);
772
- useEffect(() => {
773
- if (hasAlreadyUploadedDocuments) {
774
- setData("bankStatementDocument", alreadyUploadedDocuments);
775
- if (bankData?.description) setData("description", bankData.description);
776
- triggerValidation();
777
- }
778
- }, [
779
- alreadyUploadedDocuments,
780
- hasAlreadyUploadedDocuments,
781
- bankData?.description,
782
- setData,
783
- triggerValidation
784
- ]);
785
- useEffect(() => {
786
- stateRef.current?.setState?.({
787
- type: "addToState",
788
- value: {
789
- data,
790
- valid,
791
- errors,
792
- fieldProblems,
793
- dataStoreId: id,
794
- schema: bankDocumentFields
795
- }
796
- });
797
- }, [data, valid, errors, fieldProblems, id]);
798
- const getBankDocumentOptions = () => bankDocumentOptions.map(({ id: id2, name }) => ({ id: id2, name: t(($) => $[name]) }));
799
- const unincorporatedPartnershipMembers = useUnincorporatedPartnershipMembers();
800
- const documentsModifiers = useMemo(
801
- () => ({
802
- rootEntityType: legalEntity.type,
803
- rootEntityLegalName: getLegalEntityNameBasedOnType(legalEntity),
804
- associatedEntityType: associatedLegalArrangement?.type,
805
- associatedEntityLegalName: associatedLegalArrangement?.[associatedLegalArrangement?.type]?.name,
806
- associatedEntityTradingName: associatedLegalArrangement?.[associatedLegalArrangement?.type]?.doingBusinessAs,
807
- unincorporatedPartnershipMembers: unincorporatedPartnershipMembers?.map((member) => member?.name)?.join(", ")
808
- }),
809
- [legalEntity, associatedLegalArrangement, unincorporatedPartnershipMembers]
810
- );
811
- return /* @__PURE__ */ jsxs("form", { className: styles$5.bankDocument, children: [
812
- /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
813
- heading && /* @__PURE__ */ jsx(Header, { title: heading, description: description2 }),
814
- /* @__PURE__ */ jsx(
815
- ErrorPanel,
816
- {
817
- verificationErrors: props?.formVerificationErrors,
818
- validationErrors: props?.fieldValidationErrors,
819
- formUtils,
820
- id: "ariaErrorField"
821
- }
822
- ),
823
- formUtils.isVisibleField("bankStatementDocument") && /* @__PURE__ */ jsxs(Fragment, { children: [
824
- !usingExistingUploadedDocuments && /* @__PURE__ */ jsx(
825
- Field,
826
- {
827
- name: "documentType",
828
- label: formUtils.getLabel("bankStatementDocument", "selectDocumentType"),
829
- className: "adyen-kyc-bank-document__document-type",
830
- children: (childProps) => /* @__PURE__ */ jsx(
831
- Select,
832
- {
833
- ...childProps,
834
- onChange: handleChangeFor("documentType"),
835
- name: "documentType",
836
- placeholder: commonT(($) => $["selectDocument"]),
837
- isInvalid: false,
838
- items: getBankDocumentOptions(),
839
- selected: data.documentType
840
- }
841
- )
842
- }
843
- ),
844
- data.documentType ? /* @__PURE__ */ jsxs(Fragment, { children: [
845
- country ? /* @__PURE__ */ jsx(
846
- BankDocumentRequirements,
847
- {
848
- country,
849
- documentType: data.documentType,
850
- documentModifiers: documentsModifiers
851
- }
852
- ) : void 0,
853
- /* @__PURE__ */ jsx(DocumentGuidance, { type: "bankStatement", className: "adyen-kyc-u-margin-y-24" })
854
- ] }) : null,
855
- data.documentType || usingExistingUploadedDocuments ? /* @__PURE__ */ jsx(
856
- Field,
857
- {
858
- className: cx(styles$5.bankDocumentDocumentUpload, "adyen-kyc-upload-field"),
859
- name: "bankStatementDocument",
860
- isValid: valid.bankStatementDocument,
861
- children: (childProps) => /* @__PURE__ */ jsx(
862
- FilePicker,
863
- {
864
- ...childProps,
865
- name: "bankStatementDocument",
866
- files: data.bankStatementDocument ?? [],
867
- setFiles: handleChangeFor("bankStatementDocument"),
868
- isValid: valid.bankStatementDocument ?? isBankStatementOptional,
869
- errorMessage: errors.bankStatementDocument?.errorMessage,
870
- ...bankStatementValidationOptions
871
- }
872
- )
873
- }
874
- ) : null
875
- ] }),
876
- data.documentType || usingExistingUploadedDocuments ? /* @__PURE__ */ jsx(
877
- Field,
878
- {
879
- className: cx(styles$5.bankDocumentDocumentDescription),
880
- name: "description",
881
- label: formUtils.getLabel("bankDocumentFileDescription"),
882
- errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
883
- isValid: valid.description,
884
- children: (childProps) => /* @__PURE__ */ jsx(
885
- TextArea,
886
- {
887
- ...childProps,
888
- name: "description",
889
- value: data.description,
890
- maxLength: CHARACTERS_LIMIT$1,
891
- onInput: handleChangeFor("description"),
892
- "aria-invalid": !valid.description
893
- }
894
- )
895
- }
896
- ) : null
897
- ] });
898
- }
899
- const MemoizedBankDocument = memo(
900
- BankDocument,
901
- (prevProps, nextProps) => objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.heading === nextProps.heading && prevProps.formIsActive === nextProps.formIsActive
902
- );
903
- const validateDocument = async (context, document2) => {
904
- const { baseUrl, rootLegalEntityId } = context;
905
- return httpPost(
906
- {
907
- baseUrl,
908
- path: `legalEntities/${rootLegalEntityId}/genai/classify`
909
- },
910
- document2
911
- );
912
- };
913
- const useValidateDocument = (options) => {
914
- const { rootLegalEntityId, baseUrl } = useApiContext();
915
- return useMutation({
916
- mutationFn: (payload) => validateDocument(
917
- { rootLegalEntityId: rootLegalEntityId.value, baseUrl: baseUrl.value },
918
- payload
919
- ),
920
- retry: 0,
921
- ...options
922
- });
923
- };
924
- const bankDocumentClassification = "adyen-kyc-bank-document-classification";
925
- const requirementsList = "adyen-kyc-requirements-list";
926
- const filePickerDisabled = "adyen-kyc-file-picker-disabled";
927
- const reviewModal = "adyen-kyc-review-modal";
928
- const preview = "adyen-kyc-preview";
929
- const previewImage = "adyen-kyc-preview-image";
930
- const content = "adyen-kyc-content";
931
- const actions = "adyen-kyc-actions";
932
- const title$1 = "adyen-kyc-title";
933
- const description = "adyen-kyc-description";
934
- const issues = "adyen-kyc-issues";
935
- const confirmationModal = "adyen-kyc-confirmation-modal";
936
- const styles$3 = {
937
- bankDocumentClassification,
938
- requirementsList,
939
- filePickerDisabled,
940
- reviewModal,
941
- preview,
942
- previewImage,
943
- content,
944
- actions,
945
- title: title$1,
946
- description,
947
- issues,
948
- confirmationModal
949
- };
950
- function RequirementsSection({ titleKey, requirementKeys }) {
951
- const { t } = useTranslation("banking");
952
- return /* @__PURE__ */ jsxs("div", { children: [
953
- /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "h4", className: "adyen-kyc-u-margin-bottom-8", children: t(($) => $[titleKey]) }),
954
- /* @__PURE__ */ jsx("ul", { children: requirementKeys.map((key) => /* @__PURE__ */ jsx("li", { children: t(($) => $[key]) }, key)) })
955
- ] });
956
- }
957
- const commonRequirementsKeys = [
958
- "bankAccountInYourName",
959
- "includesFullOrPartialAccountNumber",
960
- "includesBankLogoOrName"
961
- ];
962
- const documentRequirements = [
963
- {
964
- titleKey: "bankStatements",
965
- additionalKeys: ["datedInLast12Months"]
966
- },
967
- {
968
- titleKey: "depositSlips"
969
- },
970
- {
971
- titleKey: "onlineBankingScreenshots"
972
- },
973
- {
974
- titleKey: "lettersFromBank",
975
- additionalKeys: ["datedInLast12Months"]
976
- },
977
- {
978
- titleKey: "checks",
979
- additionalKeys: ["highResolutionImageFullCheck"]
980
- }
981
- ];
982
- function BankDocumentRequirementsModal({
983
- isOpen,
984
- onClose
985
- }) {
986
- const { t } = useTranslation("banking");
987
- if (!isOpen) return null;
988
- return /* @__PURE__ */ jsx(Modal, { ariaLabel: t(($) => $["moreAboutBankDocuments"]), onClose, size: "medium", inset: true, children: /* @__PURE__ */ jsxs(StackLayout, { gap: "large", children: [
989
- /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h1", children: t(($) => $["moreAboutBankDocuments"]) }),
990
- /* @__PURE__ */ jsxs("div", { children: [
991
- /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "h3", className: "adyen-kyc-u-margin-bottom-8", children: t(($) => $["whyDoIHaveToUploadBankDocument"]) }),
992
- /* @__PURE__ */ jsx(Typography, { variant: "body", children: t(($) => $["bankDocumentFraudPrevention"]) })
993
- ] }),
994
- /* @__PURE__ */ jsxs("div", { children: [
995
- /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "h3", className: "adyen-kyc-u-margin-bottom-8", children: t(($) => $["whatAreDocumentRequirements"]) }),
996
- /* @__PURE__ */ jsx(Typography, { variant: "body", children: t(($) => $["bankDocumentRequirementsIntro"]) })
997
- ] }),
998
- documentRequirements.map(({ titleKey, additionalKeys }) => /* @__PURE__ */ jsx(
999
- RequirementsSection,
1000
- {
1001
- titleKey,
1002
- requirementKeys: commonRequirementsKeys.concat(additionalKeys || [])
1003
- },
1004
- titleKey
1005
- ))
1006
- ] }) });
1007
- }
1008
- const CHARACTERS_LIMIT = 200;
1009
- const bankDocumentClassificationFields = [
1010
- "bankStatementDocument",
1011
- "description"
1012
- ];
1013
- function BankDocumentClassification(props) {
1014
- const {
1015
- legalEntity,
1016
- optionalFields,
1017
- validators,
1018
- data: bankData,
1019
- id,
1020
- formIsActive,
1021
- fieldValidationErrors,
1022
- formVerificationErrors,
1023
- shouldValidate
1024
- } = props;
1025
- const { t } = useTranslation("banking");
1026
- const { t: commonT } = useTranslation("common");
1027
- const stateRef = useRef$1({ setState: null });
1028
- const [showReviewModal, setShowReviewModal] = useState$1(false);
1029
- const [showConfirmationModal, setShowConfirmationModal] = useState$1(false);
1030
- const [showRequirementsModal, setShowRequirementsModal] = useState$1(false);
1031
- const [validationResponse, setValidationResponse] = useState$1(
1032
- null
1033
- );
1034
- const [showEndState, setShowEndState] = useState$1(false);
1035
- const inputRef = useRef$1(null);
1036
- const logger2 = createLogger();
1037
- const userEvents = useAnalyticsContext();
1038
- const isBankStatementOptional = optionalFields?.includes("bankStatementDocument") ?? false;
1039
- const formUtils = createFormUtils(props, commonT);
1040
- const bankStatementValidationOptions = useMemo$1(
1041
- () => ({
1042
- ...defaultFileValidationOptions,
1043
- isOptional: isBankStatementOptional
1044
- }),
1045
- [isBankStatementOptional]
1046
- );
1047
- const rules2 = useMemo$1(
1048
- () => ({
1049
- ...validators || bankDocumentValidationRules,
1050
- bankStatementDocument: fileValidationRules(bankStatementValidationOptions)
1051
- }),
1052
- [bankStatementValidationOptions, validators]
1053
- );
1054
- const { handleChangeFor, data, setData, valid, fieldProblems, errors, triggerValidation } = useForm({
1055
- ...props,
1056
- schema: bankDocumentClassificationFields,
1057
- defaultData: bankData,
1058
- rules: rules2,
1059
- fieldProblems: fieldValidationErrors,
1060
- shouldValidate
1061
- });
1062
- const validateDocumentMutation = useValidateDocument({
1063
- onSuccess: (response) => {
1064
- setValidationResponse(response);
1065
- if (response?.blurryOrLowQuality || response?.documentType === "other" || response?.documentType !== "bankDocument") {
1066
- userEvents.addEvent("Opened modal", {
1067
- actionType: "open",
1068
- actionLevel: "journey",
1069
- label: "bankDocumentClassification"
1070
- });
1071
- setShowReviewModal(true);
1072
- } else {
1073
- setShowEndState(true);
1074
- userEvents.addEvent("Success", {
1075
- actionType: "upload",
1076
- actionLevel: "journey",
1077
- label: "bankDocumentClassification"
1078
- });
1079
- setTimeout(() => {
1080
- setShowEndState(false);
1081
- setShowReviewModal(false);
1082
- }, 2e3);
1083
- }
1084
- },
1085
- onError: (error) => {
1086
- userEvents.addEvent("Encountered error", {
1087
- actionType: "upload",
1088
- actionLevel: "journey",
1089
- label: "bankDocumentClassification"
1090
- });
1091
- logger2.error("Document validation failed:", error);
1092
- setShowReviewModal(false);
1093
- setValidationResponse(null);
1094
- }
1095
- });
1096
- const handleDocumentUpload = async (files) => {
1097
- setData("bankStatementDocument", files);
1098
- triggerValidation();
1099
- if (files.length > 0) {
1100
- const file = files[0];
1101
- if (file && file instanceof File) {
1102
- try {
1103
- const base64Content = await fileToBase64(file);
1104
- const document2 = {
1105
- documentType: "bankStatement",
1106
- fileName: file.name,
1107
- sessionId: legalEntity.id,
1108
- attachments: [
1109
- {
1110
- content: base64Content,
1111
- pageName: file.name
1112
- }
1113
- ]
1114
- };
1115
- validateDocumentMutation.mutate(document2);
1116
- } catch (error) {
1117
- logger2.error("Error processing document:", error);
1118
- }
1119
- }
1120
- }
1121
- };
1122
- useEffect$1(() => {
1123
- if (formIsActive && isBankStatementOptional) {
1124
- triggerValidation();
1125
- }
1126
- }, [formIsActive, isBankStatementOptional, triggerValidation]);
1127
- const alreadyUploadedDocuments = useMemo$1(
1128
- () => bankData?.bankStatementDocument ?? [],
1129
- [bankData?.bankStatementDocument]
1130
- );
1131
- useEffect$1(() => {
1132
- if (alreadyUploadedDocuments.length > 0) {
1133
- setData("bankStatementDocument", alreadyUploadedDocuments);
1134
- if (bankData?.description) setData("description", bankData.description);
1135
- triggerValidation();
1136
- }
1137
- }, [alreadyUploadedDocuments, bankData?.description, setData, triggerValidation]);
1138
- useEffect$1(() => {
1139
- stateRef.current?.setState?.({
1140
- type: "addToState",
1141
- value: {
1142
- data,
1143
- valid,
1144
- errors,
1145
- fieldProblems,
1146
- dataStoreId: id,
1147
- schema: bankDocumentClassificationFields
1148
- }
1149
- });
1150
- }, [data, valid, errors, fieldProblems, id]);
1151
- const documentsModifiers = useMemo$1(
1152
- () => ({
1153
- rootEntityType: legalEntity.type,
1154
- rootEntityLegalName: getLegalEntityNameBasedOnType(legalEntity)
1155
- }),
1156
- [legalEntity]
1157
- );
1158
- const handleUploadNewDocument = () => {
1159
- userEvents.addEvent("Clicked button", {
1160
- actionType: "next",
1161
- actionLevel: "journey",
1162
- label: "bankDocumentClassificationUploadNewDocument"
1163
- });
1164
- inputRef.current?.click();
1165
- };
1166
- const handleContinueAnyway = () => {
1167
- setShowConfirmationModal(true);
1168
- };
1169
- const handleConfirmationCancel = () => {
1170
- setShowConfirmationModal(false);
1171
- };
1172
- const handleUseDocument = () => {
1173
- setShowConfirmationModal(false);
1174
- setShowReviewModal(false);
1175
- userEvents.addEvent("Clicked button", {
1176
- actionType: "next",
1177
- actionLevel: "journey",
1178
- label: "bankDocumentClassificationContinueAnyway"
1179
- });
1180
- };
1181
- const documentPreview = useMemo$1(() => {
1182
- if (!data.bankStatementDocument?.[0] || !showReviewModal) return null;
1183
- const file = data.bankStatementDocument?.[0];
1184
- return file.type === "application/pdf" || file.name.toLowerCase().endsWith(".pdf") ? /* @__PURE__ */ jsx(
1185
- "object",
1186
- {
1187
- width: "100%",
1188
- height: "100%",
1189
- data: URL.createObjectURL(file),
1190
- type: "application/pdf",
1191
- "aria-label": t(($) => $["reviewDocument"]),
1192
- "data-testid": "pdf-preview"
1193
- }
1194
- ) : /* @__PURE__ */ jsx("img", { src: URL.createObjectURL(file), alt: t(($) => $["reviewDocument"]) });
1195
- }, [data?.bankStatementDocument, showReviewModal, t]);
1196
- return /* @__PURE__ */ jsxs("div", { className: styles$3.bankDocumentPage, children: [
1197
- /* @__PURE__ */ jsxs("form", { className: styles$3.bankDocumentClassification, children: [
1198
- /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
1199
- /* @__PURE__ */ jsx(
1200
- Header,
1201
- {
1202
- title: t(
1203
- ($) => $[isBankStatementOptional ? "uploadABankDocumentOptional" : "uploadABankDocument"]
1204
- ),
1205
- description: t(($) => $["toVerifyYourBankAccountDetails"]),
1206
- children: /* @__PURE__ */ jsx(Button, { slot: "actions", variant: "link", onClick: () => setShowRequirementsModal(true), children: commonT(($) => $["learnMore"]) })
1207
- }
1208
- ),
1209
- /* @__PURE__ */ jsx(
1210
- ErrorPanel,
1211
- {
1212
- verificationErrors: formVerificationErrors,
1213
- validationErrors: fieldValidationErrors,
1214
- formUtils,
1215
- id: "ariaErrorField"
1216
- }
1217
- ),
1218
- /* @__PURE__ */ jsxs("div", { children: [
1219
- /* @__PURE__ */ jsx("h3", { className: styles$3.requirementsList, children: t(($) => $["documentRequirements"]) }),
1220
- /* @__PURE__ */ jsxs("ul", { className: styles$3.requirementsList, children: [
1221
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentRequirementNameOrBusiness"], {
1222
- businessName: documentsModifiers.rootEntityLegalName
1223
- }) }),
1224
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentRequirementAccountNumber"]) }),
1225
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentRequirementBankInfo"]) })
1226
- ] })
1227
- ] }),
1228
- /* @__PURE__ */ jsx(
1229
- Field,
1230
- {
1231
- className: cx("adyen-kyc-upload-field"),
1232
- name: "bankStatementDocument",
1233
- isValid: valid.bankStatementDocument,
1234
- children: (childProps) => /* @__PURE__ */ jsx("div", { className: validateDocumentMutation.isPending ? styles$3.filePickerDisabled : "", children: /* @__PURE__ */ jsx(
1235
- FilePicker,
1236
- {
1237
- ...childProps,
1238
- name: "bankStatementDocument",
1239
- files: data.bankStatementDocument ?? [],
1240
- setFiles: handleDocumentUpload,
1241
- isValid: valid.bankStatementDocument ?? isBankStatementOptional,
1242
- errorMessage: errors.bankStatementDocument?.errorMessage,
1243
- loading: validateDocumentMutation.isPending,
1244
- ...bankStatementValidationOptions
1245
- }
1246
- ) })
1247
- }
1248
- ),
1249
- data.bankStatementDocument?.length ? /* @__PURE__ */ jsx(
1250
- Field,
1251
- {
1252
- className: "adyen-kyc-document-description",
1253
- name: "description",
1254
- label: formUtils.getLabel("bankDocumentFileDescription"),
1255
- errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
1256
- isValid: valid.description,
1257
- children: (childProps) => /* @__PURE__ */ jsx(
1258
- TextArea,
1259
- {
1260
- ...childProps,
1261
- name: "description",
1262
- value: data.description,
1263
- maxLength: CHARACTERS_LIMIT,
1264
- onInput: handleChangeFor("description"),
1265
- "aria-invalid": !valid.description
1266
- }
1267
- )
1268
- }
1269
- ) : void 0
1270
- ] }),
1271
- showReviewModal && /* @__PURE__ */ jsx(
1272
- Modal,
1273
- {
1274
- ariaLabel: t(($) => $["reviewDocument"]),
1275
- size: showEndState ? "small" : "medium",
1276
- inset: showEndState,
1277
- showCloseButton: !showEndState,
1278
- onClose: !showEndState ? handleContinueAnyway : void 0,
1279
- children: showEndState ? /* @__PURE__ */ jsx(EndStateLayout, { title: t(($) => $["documentUploaded"]) }) : /* @__PURE__ */ jsxs("div", { className: styles$3.reviewModal, children: [
1280
- /* @__PURE__ */ jsx("div", { className: styles$3.preview, children: /* @__PURE__ */ jsx("div", { className: styles$3.previewImage, children: documentPreview }) }),
1281
- /* @__PURE__ */ jsxs("div", { className: styles$3.content, children: [
1282
- /* @__PURE__ */ jsx("h2", { className: styles$3.title, children: t(($) => $["reviewDocument"]) }),
1283
- /* @__PURE__ */ jsx("p", { className: styles$3.description, children: t(($) => $["reviewDocumentDescription"]) }),
1284
- /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setShowRequirementsModal(true), children: commonT(($) => $["learnMore"]) }),
1285
- /* @__PURE__ */ jsx("ul", { className: styles$3.issues, children: validationResponse && getValidationIssuesKeys(validationResponse).map((issue, index) => /* @__PURE__ */ jsx("li", { children: t(($) => $[issue]) }, index)) }),
1286
- /* @__PURE__ */ jsxs("div", { className: styles$3.actions, children: [
1287
- /* @__PURE__ */ jsx(
1288
- Button,
1289
- {
1290
- variant: "secondary",
1291
- disabled: validateDocumentMutation.isPending,
1292
- onClick: handleContinueAnyway,
1293
- children: commonT(($) => $["continue"])
1294
- }
1295
- ),
1296
- /* @__PURE__ */ jsx(
1297
- Button,
1298
- {
1299
- loading: validateDocumentMutation.isPending,
1300
- variant: "primary",
1301
- onClick: handleUploadNewDocument,
1302
- children: t(($) => $["uploadNewDocument"])
1303
- }
1304
- )
1305
- ] })
1306
- ] })
1307
- ] })
1308
- }
1309
- ),
1310
- showConfirmationModal && /* @__PURE__ */ jsx(
1311
- Modal,
1312
- {
1313
- ariaLabel: t(($) => $["useThisDocument"]),
1314
- size: "small",
1315
- onClose: handleConfirmationCancel,
1316
- children: /* @__PURE__ */ jsxs("div", { className: styles$3.confirmationModal, children: [
1317
- /* @__PURE__ */ jsx("h2", { className: styles$3.title, children: t(($) => $["useThisDocument"]) }),
1318
- /* @__PURE__ */ jsx("p", { className: styles$3.description, children: t(($) => $["thisDocumentNeedstoBeReviewedManually"]) }),
1319
- /* @__PURE__ */ jsxs("div", { className: styles$3.actions, children: [
1320
- /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleConfirmationCancel, children: commonT(($) => $["cancel"]) }),
1321
- /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleUseDocument, children: t(($) => $["useDocument"]) })
1322
- ] })
1323
- ] })
1324
- }
1325
- ),
1326
- /* @__PURE__ */ jsx(
1327
- BankDocumentRequirementsModal,
1328
- {
1329
- isOpen: showRequirementsModal,
1330
- onClose: () => setShowRequirementsModal(false)
1331
- }
1332
- ),
1333
- /* @__PURE__ */ jsx(
1334
- "input",
1335
- {
1336
- id,
1337
- ref: inputRef,
1338
- className: "adyen-kyc-dropzone__input",
1339
- onChange: (e) => {
1340
- const fileInput = e.target;
1341
- if (fileInput?.files?.length) handleDocumentUpload([...fileInput.files]);
1342
- },
1343
- type: "file",
1344
- accept: defaultFileValidationOptions.allowedFileTypes.join(", ")
1345
- }
1346
- )
1347
- ] });
1348
- }
1349
- const MemoizedBankDocumentClassification = memo(
1350
- BankDocumentClassification,
1351
- (prevProps, nextProps) => objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.heading === nextProps.heading && prevProps.formIsActive === nextProps.formIsActive
1352
- );
1353
- const bankVerificationValidationRules = {
1354
- verifiedAccountHolder: {
1355
- modes: ["blur"],
1356
- validate: (verifiedAccountHolder) => !isEmpty(verifiedAccountHolder),
1357
- errorMessage: "fieldIsRequired"
1358
- },
1359
- verifiedBankCountry: {
1360
- modes: ["blur"],
1361
- validate: (verifiedBankCountry) => !isEmpty(verifiedBankCountry),
1362
- errorMessage: "fieldIsRequired"
1363
- },
1364
- verifiedBankName: {
1365
- modes: ["blur"],
1366
- validate: (verifiedBankName) => !isEmpty(verifiedBankName),
1367
- errorMessage: "fieldIsRequired"
1368
- },
1369
- verifiedCurrencyCode: {
1370
- modes: ["blur"],
1371
- validate: (verifiedCurrencyCode) => !isEmpty(verifiedCurrencyCode),
1372
- errorMessage: "fieldIsRequired"
1373
- },
1374
- verifiedBankAccountNumber: {
1375
- modes: ["blur"],
1376
- validate: (verifiedBankAccountNumber) => !isEmpty(verifiedBankAccountNumber),
1377
- errorMessage: "fieldIsRequired"
1378
- }
1379
- };
1380
- const handleBankVerificationError = async (legalEntityId, baseUrl, bankVerificationErrorParams) => {
1381
- return httpPost(
1382
- {
1383
- baseUrl,
1384
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted/error`
1385
- },
1386
- bankVerificationErrorParams
1387
- );
1388
- };
1389
- const useHandleBankVerificationError = (options) => {
1390
- const { rootLegalEntityId, baseUrl } = useApiContext();
1391
- return useMutation({
1392
- mutationFn: (params) => handleBankVerificationError(rootLegalEntityId.value, baseUrl.value, params),
1393
- ...options
1394
- });
1395
- };
1396
- const VerificationWidgetCallbackActions = {
1397
- HANDLE_EXCEPTION: "handle_exception",
1398
- VERIFICATION_SUCCESS: "verification_success",
1399
- RETRY_VERIFICATION: "retry_verification",
1400
- HANDLE_EVENT: "handle_event"
1401
- };
1402
- const WIDGET_CONTAINER_CLASS$1 = `adyen-kyc-bank-verification-widget-container`;
1403
- function BankVerificationOverlay({
1404
- url,
1405
- setBankVerificationError,
1406
- onBack,
1407
- retrieveBankAccountInfo,
1408
- createTrustedTransferInstrument: createTrustedTransferInstrument2
1409
- }) {
1410
- const { t } = useTranslation("banking");
1411
- const userEvents = useAnalyticsContext();
1412
- const widgetContainerRef = useRef(null);
1413
- const { mutateAsync: handleBankVerificationError2 } = useHandleBankVerificationError();
1414
- const trackVerificationError = (returnValue) => {
1415
- userEvents.addPageEvent("Encountered error", {
1416
- actionType: "add",
1417
- returnType: "sdk error",
1418
- returnValue
1419
- });
1420
- };
1421
- const DEFAULT_ERROR = {
1422
- error: "UNKNOWN_ERROR",
1423
- message: t(($) => $["weCouldntCompleteTheAccountCheck"])
1424
- };
1425
- useEffect(() => {
1426
- setBankVerificationError(null);
1427
- }, [setBankVerificationError]);
1428
- const widgetCallback = useCallback(
1429
- (payload) => {
1430
- const errorContent = t(($) => $["tryAgainOrManualAccountDetails"]);
1431
- switch (payload.action) {
1432
- case VerificationWidgetCallbackActions.HANDLE_EXCEPTION: {
1433
- let errorTitle;
1434
- const { err } = payload;
1435
- switch (!(err instanceof Error) && err?.error) {
1436
- case "USER_CANCELLED":
1437
- errorTitle = "";
1438
- break;
1439
- case "CONNECTION_ERROR":
1440
- errorTitle = t(($) => $["couldNotEstablishBankConnection"]);
1441
- break;
1442
- case "GENERIC_ERROR":
1443
- errorTitle = t(($) => $["ranIntoTechnicalError"]);
1444
- break;
1445
- case "UNKNOWN_ERROR":
1446
- default: {
1447
- errorTitle = t(($) => $["couldNotCompleteAccountCheck"]);
1448
- break;
1449
- }
1450
- }
1451
- if (errorTitle) {
1452
- setBankVerificationError({ title: errorTitle, content: errorContent });
1453
- }
1454
- showInstantVerificationPayoutModal.value = false;
1455
- onBack?.();
1456
- break;
1457
- }
1458
- case VerificationWidgetCallbackActions.RETRY_VERIFICATION:
1459
- setBankVerificationError({
1460
- title: t(($) => $["failedInitializeInstantVerification"]),
1461
- content: errorContent
1462
- });
1463
- onBack?.();
1464
- break;
1465
- case VerificationWidgetCallbackActions.HANDLE_EVENT: {
1466
- const { name, provider } = payload.event;
1467
- if (name === "institution_selected" && provider === "plaid") {
1468
- widgetContainerRef.current?.classList.add(`${WIDGET_CONTAINER_CLASS$1}--plaid-modal`);
1469
- }
1470
- break;
1471
- }
1472
- case VerificationWidgetCallbackActions.VERIFICATION_SUCCESS: {
1473
- const { accounts } = payload.result;
1474
- if (accounts) retrieveBankAccountInfo(accounts[0]);
1475
- }
1476
- }
1477
- },
1478
- [t, retrieveBankAccountInfo, onBack, setBankVerificationError]
1479
- );
1480
- useEffect(() => {
1481
- const container = widgetContainerRef.current;
1482
- if (!container) return;
1483
- const openBanking = OpenBankingSDK.create({
1484
- divElement: container,
1485
- link: url,
1486
- successHandler: (code, state) => {
1487
- createTrustedTransferInstrument2?.(code, state).then((res) => {
1488
- userEvents.addPageEvent("Success", { actionType: "add" });
1489
- if (res) {
1490
- widgetCallback({
1491
- action: VerificationWidgetCallbackActions.VERIFICATION_SUCCESS,
1492
- result: res
1493
- });
1494
- }
1495
- }).catch(() => {
1496
- trackVerificationError(DEFAULT_ERROR.error);
1497
- widgetCallback({
1498
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1499
- err: DEFAULT_ERROR
1500
- });
1501
- });
1502
- },
1503
- errorHandler: (errorCode, errorMessage, state, metadata) => {
1504
- trackVerificationError(errorCode);
1505
- handleBankVerificationError2?.({
1506
- errorCode,
1507
- errorMessage,
1508
- state,
1509
- metadata: metadata && Object.fromEntries(metadata)
1510
- }).then(
1511
- (error) => widgetCallback({
1512
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1513
- err: error
1514
- })
1515
- ).catch(
1516
- () => widgetCallback({
1517
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1518
- err: DEFAULT_ERROR
1519
- })
1520
- );
1521
- },
1522
- eventHandler: (eventName, provider) => {
1523
- widgetCallback({
1524
- action: VerificationWidgetCallbackActions.HANDLE_EVENT,
1525
- event: { name: eventName, provider }
1526
- });
1527
- }
1528
- });
1529
- openBanking.open();
1530
- container.classList.add(WIDGET_CONTAINER_CLASS$1, `${WIDGET_CONTAINER_CLASS$1}--fullscreen`);
1531
- return () => {
1532
- openBanking?.destroy();
1533
- };
1534
- }, []);
1535
- return /* @__PURE__ */ jsx("div", { ref: widgetContainerRef });
1536
- }
1537
- const WIDGET_IFRAME_CLASS = "adyen-kyc-bank-verification-widget";
1538
- const WIDGET_CONTAINER_CLASS = `${WIDGET_IFRAME_CLASS}-container`;
1539
- function BankVerificationWidget({
1540
- url,
1541
- vendor,
1542
- setBankVerificationError,
1543
- setHideVerificationWidget,
1544
- onBack,
1545
- retrieveBankAccountInfo,
1546
- createTrustedTransferInstrument: createTrustedTransferInstrument2,
1547
- fullscreen
1548
- }) {
1549
- const { t } = useTranslation("banking");
1550
- const userEvents = useAnalyticsContext();
1551
- const { isExperimentEnabled } = useExperimentsContext();
1552
- const widgetContainerRef = useRef(null);
1553
- const sdkToken = getSdkToken();
1554
- const { mutateAsync: handleBankVerificationError2 } = useHandleBankVerificationError();
1555
- const trackVerificationError = (returnValue) => {
1556
- userEvents.addPageEvent("Encountered error", {
1557
- actionType: "add",
1558
- returnType: "sdk error",
1559
- returnValue
1560
- });
1561
- };
1562
- const DEFAULT_ERROR = {
1563
- error: "UNKNOWN_ERROR",
1564
- message: t(($) => $["weCouldntCompleteTheAccountCheck"])
1565
- };
1566
- setBankVerificationError(null);
1567
- const widgetCallback = useCallback(
1568
- (payload) => {
1569
- const errorContent = t(($) => $["tryAgainOrManualAccountDetails"]);
1570
- switch (payload.action) {
1571
- case VerificationWidgetCallbackActions.HANDLE_EXCEPTION: {
1572
- let errorTitle;
1573
- const { err } = payload;
1574
- switch (!(err instanceof Error) && err?.error) {
1575
- case "USER_CANCELLED":
1576
- errorTitle = "";
1577
- break;
1578
- case "CONNECTION_ERROR":
1579
- errorTitle = t(($) => $["couldNotEstablishBankConnection"]);
1580
- break;
1581
- case "GENERIC_ERROR":
1582
- errorTitle = t(($) => $["ranIntoTechnicalError"]);
1583
- break;
1584
- case "UNKNOWN_ERROR":
1585
- default: {
1586
- errorTitle = t(($) => $["couldNotCompleteAccountCheck"]);
1587
- break;
1588
- }
1589
- }
1590
- if (errorTitle) {
1591
- setBankVerificationError({ title: errorTitle, content: errorContent });
1592
- }
1593
- setHideVerificationWidget(true);
1594
- if (isExperimentEnabled(ExperimentNames.EnablePayoutVerificationMethodPageRedesign)) {
1595
- showInstantVerificationPayoutModal.value = false;
1596
- }
1597
- onBack?.();
1598
- break;
1599
- }
1600
- case VerificationWidgetCallbackActions.RETRY_VERIFICATION:
1601
- setBankVerificationError({
1602
- title: t(($) => $["failedInitializeInstantVerification"]),
1603
- content: errorContent
1604
- });
1605
- setHideVerificationWidget(true);
1606
- onBack?.();
1607
- break;
1608
- case VerificationWidgetCallbackActions.HANDLE_EVENT: {
1609
- const { name, provider } = payload.event;
1610
- if (name === "institution_selected" && provider === "plaid") {
1611
- widgetContainerRef.current?.classList.add(`${WIDGET_CONTAINER_CLASS}--plaid-modal`);
1612
- }
1613
- break;
1614
- }
1615
- case VerificationWidgetCallbackActions.VERIFICATION_SUCCESS: {
1616
- const { accounts } = payload.result;
1617
- if (accounts) retrieveBankAccountInfo(accounts[0]);
1618
- setHideVerificationWidget(true);
1619
- }
1620
- }
1621
- },
1622
- [t, retrieveBankAccountInfo, onBack, setBankVerificationError, setHideVerificationWidget]
1623
- );
1624
- useEffect(
1625
- () => {
1626
- const container = widgetContainerRef.current;
1627
- if (!container) return;
1628
- let iFrame;
1629
- let iFrameWidget;
1630
- let openBanking;
1631
- if (createTrustedTransferInstrument2) {
1632
- openBanking = OpenBankingSDK.create({
1633
- divElement: container,
1634
- link: url,
1635
- successHandler: (code, state) => {
1636
- createTrustedTransferInstrument2(code, state).then((res) => {
1637
- userEvents.addPageEvent("Success", { actionType: "add" });
1638
- if (res) {
1639
- widgetCallback({
1640
- action: VerificationWidgetCallbackActions.VERIFICATION_SUCCESS,
1641
- result: res
1642
- });
1643
- }
1644
- }).catch(() => {
1645
- trackVerificationError(DEFAULT_ERROR.error);
1646
- widgetCallback({
1647
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1648
- err: DEFAULT_ERROR
1649
- });
1650
- });
1651
- },
1652
- errorHandler: (errorCode, errorMessage, state, metadata) => {
1653
- trackVerificationError(errorCode);
1654
- handleBankVerificationError2?.({
1655
- errorCode,
1656
- errorMessage,
1657
- state,
1658
- metadata: metadata && Object.fromEntries(metadata)
1659
- }).then(
1660
- (error) => widgetCallback({
1661
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1662
- err: error
1663
- })
1664
- ).catch(
1665
- () => widgetCallback({
1666
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1667
- err: DEFAULT_ERROR
1668
- })
1669
- );
1670
- },
1671
- eventHandler: (eventName, provider) => {
1672
- widgetCallback({
1673
- action: VerificationWidgetCallbackActions.HANDLE_EVENT,
1674
- event: { name: eventName, provider }
1675
- });
1676
- }
1677
- });
1678
- openBanking.open();
1679
- } else {
1680
- iFrame = document.createElement("iframe");
1681
- iFrame.setAttribute("allowFullscreen", "true");
1682
- iFrame.classList.add(WIDGET_IFRAME_CLASS);
1683
- container.appendChild(iFrame);
1684
- requestAnimationFrame(async () => {
1685
- try {
1686
- iFrameWidget = new IFrameWidget(iFrame, url, vendor, sdkToken);
1687
- const result = await iFrameWidget.mountAndWaitForResponse();
1688
- widgetCallback({
1689
- action: VerificationWidgetCallbackActions.VERIFICATION_SUCCESS,
1690
- result
1691
- });
1692
- userEvents.addPageEvent("Success", { actionType: "add" });
1693
- } catch (err) {
1694
- if (err instanceof AdyenKycSdkError) {
1695
- switch (err.message) {
1696
- case "WIDGET_ACCOUNT_COMMIT_FAILURE":
1697
- return widgetCallback({
1698
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1699
- err: err.sourceError
1700
- });
1701
- case "WIDGET_LAUNCH_FAILED":
1702
- case "WIDGET_URL_MALFORMED":
1703
- case "WIDGET_TIMEOUT":
1704
- return widgetCallback({
1705
- action: VerificationWidgetCallbackActions.RETRY_VERIFICATION
1706
- });
1707
- default:
1708
- return widgetCallback({
1709
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1710
- err: {
1711
- error: err?.name ?? VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1712
- message: err.sourceError?.message ?? VerificationWidgetCallbackActions.HANDLE_EXCEPTION
1713
- }
1714
- });
1715
- }
1716
- }
1717
- trackVerificationError(err instanceof AdyenKycSdkError ? err.message : "sdk error");
1718
- return widgetCallback({
1719
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1720
- err
1721
- });
1722
- }
1723
- });
1724
- }
1725
- container.classList.add(WIDGET_CONTAINER_CLASS);
1726
- if (fullscreen) {
1727
- container.classList.add(`${WIDGET_CONTAINER_CLASS}--fullscreen`);
1728
- }
1729
- return () => {
1730
- iFrameWidget?.unmount();
1731
- iFrame?.remove();
1732
- openBanking?.destroy();
1733
- };
1734
- },
1735
- // Effect dependencies have been omitted here, which isn't intended. However, there seems to be
1736
- // some problematic behaviour in the overall flow with the dependencies present, which requires
1737
- // further debugging and tracing to resolve (totally out of the scope of this component).
1738
- // [url, vendor, widgetCallback]
1739
- []
1740
- );
1741
- return /* @__PURE__ */ jsx("div", { ref: widgetContainerRef });
1742
- }
1743
- const accountVerificationFields = [
1744
- "verifiedAccountHolder",
1745
- "verifiedBankCountry",
1746
- "verifiedBankName",
1747
- "verifiedCurrencyCode",
1748
- "verifiedBankAccountNumber"
1749
- ];
1750
- const InstantVerificationErrorContext = createContext(null);
1751
- const useInstantVerificationErrorNotification = (notificationVisibilityDuration) => {
1752
- const [errorNotification, setErrorNotification] = useState(null);
1753
- const dismissNotificationTimeoutRef = useRef();
1754
- const clearNotificationTimeout = useCallback(() => {
1755
- if (dismissNotificationTimeoutRef.current) {
1756
- clearTimeout(dismissNotificationTimeoutRef.current);
1757
- dismissNotificationTimeoutRef.current = void 0;
1758
- }
1759
- }, []);
1760
- useEffect(() => {
1761
- clearNotificationTimeout();
1762
- if (errorNotification && notificationVisibilityDuration > 0) {
1763
- dismissNotificationTimeoutRef.current = setTimeout(() => {
1764
- setErrorNotification(null);
1765
- clearNotificationTimeout();
1766
- }, notificationVisibilityDuration);
1767
- }
1768
- return () => clearNotificationTimeout();
1769
- }, [errorNotification, clearNotificationTimeout, notificationVisibilityDuration]);
1770
- return [errorNotification, setErrorNotification];
1771
- };
1772
- function BankVerification(props) {
1773
- const {
1774
- heading,
1775
- setBankVerificationError,
1776
- onBack,
1777
- hideSidebar,
1778
- setBankInfoValidated,
1779
- bankInfoValidated,
1780
- formIsActive,
1781
- createTrustedTransferInstrument: createTrustedTransferInstrument2,
1782
- country,
1783
- data: propData,
1784
- provider,
1785
- id,
1786
- fieldValidationErrors
1787
- } = props;
1788
- const { t } = useTranslation("banking");
1789
- const { t: commonT } = useTranslation("common");
1790
- const { isExperimentEnabled } = useExperimentsContext();
1791
- const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
1792
- const schema = accountVerificationFields;
1793
- const stateRef = useRef({ setState: null });
1794
- const [hideVerificationWidget, setHideVerificationWidget] = useState(false);
1795
- const isPayoutVerificationMethodPageRedesignEnabled = isExperimentEnabled(
1796
- ExperimentNames.EnablePayoutVerificationMethodPageRedesign
1797
- );
1798
- const { handleChangeFor, data, valid, errors, isValid, triggerValidation, fieldProblems } = useForm({
1799
- ...props,
1800
- schema,
1801
- defaultData: propData,
1802
- rules: bankVerificationValidationRules,
1803
- fieldProblems: fieldValidationErrors
1804
- });
1805
- const retrieveBankAccountInfo = async ({
1806
- realLastFour,
1807
- number,
1808
- bankName
1809
- }) => {
1810
- handleChangeFor("verifiedBankAccountNumber")(realLastFour ? `*******${realLastFour}` : number);
1811
- handleChangeFor("verifiedBankName")(bankName);
1812
- handleChangeFor("verifiedBankCountry")(country);
1813
- handleChangeFor("verifiedAccountHolder")(propData?.verifiedAccountHolder);
1814
- handleChangeFor("verifiedCurrencyCode")(
1815
- propData?.verifiedCurrencyCode ?? currencyByCountry[country]?.[0]
1816
- );
1817
- setBankInfoValidated?.(true);
1818
- hideSidebar?.(false);
1819
- triggerValidation();
1820
- await invalidateRootLegalEntity();
1821
- if (isPayoutVerificationMethodPageRedesignEnabled) {
1822
- showInstantVerificationPayoutModal.value = false;
1823
- }
1824
- };
1825
- const handleOnBack = () => {
1826
- setHideVerificationWidget(false);
1827
- onBack?.();
1828
- };
1829
- useEffect(() => {
1830
- stateRef.current.setState?.({
1831
- type: "addToState",
1832
- value: {
1833
- data,
1834
- valid,
1835
- errors,
1836
- fieldProblems,
1837
- dataStoreId: id,
1838
- schema
1839
- }
1840
- });
1841
- }, [data, valid, errors, isValid]);
1842
- useEffect(() => {
1843
- if (!isPayoutVerificationMethodPageRedesignEnabled) {
1844
- hideSidebar?.(formIsActive && !bankInfoValidated);
1845
- return () => hideSidebar?.(false);
1846
- }
1847
- }, [bankInfoValidated, formIsActive]);
1848
- if (isPayoutVerificationMethodPageRedesignEnabled && provider) {
1849
- if (bankInfoValidated) {
1850
- return null;
1851
- }
1852
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1853
- /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
1854
- /* @__PURE__ */ jsx(
1855
- BankVerificationOverlay,
1856
- {
1857
- url: provider.redirectUrl,
1858
- setBankVerificationError,
1859
- onBack: handleOnBack,
1860
- retrieveBankAccountInfo,
1861
- createTrustedTransferInstrument: createTrustedTransferInstrument2
1862
- }
1863
- )
1864
- ] });
1865
- }
1866
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1867
- /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
1868
- bankInfoValidated && /* @__PURE__ */ jsxs(Fragment, { children: [
1869
- heading && /* @__PURE__ */ jsx(Header, { title: heading }),
1870
- /* @__PURE__ */ jsx(Alert, { title: t(($) => $["youSuccessfullyVerifiedAccount"]), variant: "success" })
1871
- ] }),
1872
- provider && formIsActive && !bankInfoValidated && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-bank-verification-container", children: /* @__PURE__ */ jsx("form", { className: "adyen-kyc-bank-verification", children: !hideVerificationWidget ? /* @__PURE__ */ jsxs(Fragment, { children: [
1873
- /* @__PURE__ */ jsx(
1874
- BankVerificationWidget,
1875
- {
1876
- url: provider.redirectUrl,
1877
- vendor: provider.name,
1878
- setBankVerificationError,
1879
- setHideVerificationWidget,
1880
- onBack: handleOnBack,
1881
- retrieveBankAccountInfo,
1882
- createTrustedTransferInstrument: createTrustedTransferInstrument2
1883
- }
1884
- ),
1885
- /* @__PURE__ */ jsx(ActionBar, { onBack: handleOnBack, backButtonLabel: commonT(($) => $["goBack"]) })
1886
- ] }) : void 0 }) })
1887
- ] });
1888
- }
1889
- function BankAccountFormat(props) {
1890
- const { t } = useTranslation(["banking"]);
1891
- const { bankAccountFormat, handleAccountFormatChange } = props;
1892
- const bankFormatOptions = [
1893
- {
1894
- id: "iban",
1895
- name: t(($) => $["ibanFormat"])
1896
- },
1897
- {
1898
- id: "local",
1899
- name: t(($) => $["localFormat"])
1900
- }
1901
- ];
1902
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Field, { name: "bankAccountFormat", label: t(($) => $["bankAccountFormat"]), children: (childProps) => /* @__PURE__ */ jsx(
1903
- Select,
1904
- {
1905
- ...childProps,
1906
- onChange: (e) => handleAccountFormatChange?.(e?.target?.value),
1907
- name: "bankAccountFormat",
1908
- placeholder: t(($) => $["localFormat"]),
1909
- selected: bankAccountFormat,
1910
- items: bankFormatOptions
1911
- }
1912
- ) }) });
1913
- }
1914
- const simpleBankAccountNumberMetadata = (example, length, maxLength) => {
1915
- if (maxLength) {
1916
- return {
1917
- label: "bankAccountNumber",
1918
- validators: validatePatternOnBlur(new RegExp(`^\\d{${length},${maxLength}}$`)),
1919
- mask: {
1920
- mask: makeMask(...numericInputs(length), ...numericInputs(maxLength - length, true))
1921
- },
1922
- guidanceText: {
1923
- key: "enterAMaximumOfNDigitsForExample",
1924
- values: {
1925
- maxDigits: `${maxLength}`,
1926
- example
1927
- }
1928
- }
1929
- };
1930
- }
1931
- return {
1932
- label: "bankAccountNumber",
1933
- validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
1934
- mask: { mask: makeMask(...numericInputs(length)) },
1935
- guidanceText: {
1936
- key: "enterNDigitsForExample",
1937
- values: {
1938
- numDigits: `${length}`,
1939
- example
1940
- }
1941
- }
1942
- };
1943
- };
1944
- const defaultFieldMetadata$3 = {
1945
- label: "bankAccountNumber",
1946
- validators: isNotEmptyValidator
1947
- };
1948
- const defaultFieldConfig$3 = {
1949
- [CountryCodes.CzechRepublic]: {
1950
- // Validators & masks pulled from https://docs.adyen.com/api-explorer/legalentity/4/post/transferInstruments#request-bankAccount-accountIdentification-CZLocalAccountIdentification
1951
- label: "bankAccountNumber",
1952
- validators: validatePatternOnBlur(/^((\d{2}|\d{6})-)?\d*\d{2}$/),
1953
- mask: {
1954
- mask: makeMask(
1955
- ...numericInputs(2),
1956
- ...customInputs(1, /-|\d/),
1957
- ...numericInputs(3),
1958
- ...customInputs(1, /-|\d/),
1959
- ...numericInputs(10)
1960
- )
1961
- },
1962
- guidanceText: {
1963
- key: "enterXToYDigitsWithOrWithoutPrefixForExample",
1964
- values: {
1965
- minDigits: "2",
1966
- maxDigits: "16",
1967
- firstExample: "19-123457",
1968
- secondExample: "123457"
1969
- }
1970
- }
1971
- },
1972
- [CountryCodes.Denmark]: simpleBankAccountNumberMetadata("2621955959", 10),
1973
- [CountryCodes.Norway]: simpleBankAccountNumberMetadata("86011117947", 11),
1974
- [CountryCodes.UnitedKingdom]: simpleBankAccountNumberMetadata("10000003", 8),
1975
- [CountryCodes.Australia]: simpleBankAccountNumberMetadata("0001234", 5, 10),
1976
- [CountryCodes.Brazil]: simpleBankAccountNumberMetadata("0009795493", 4, 12),
1977
- [CountryCodes.Canada]: simpleBankAccountNumberMetadata("10220001111", 5, 12),
1978
- [CountryCodes.HongKong]: {
1979
- label: "bankAccountNumber",
1980
- validators: validatePatternOnBlur(new RegExp(`^\\d{${6},${18}}$`)),
1981
- mask: {
1982
- mask: makeMask(...numericInputs(6), ...numericInputs(12, true))
1983
- },
1984
- guidanceText: {
1985
- key: "enterAccountNumberWithBranchCodeForExample",
1986
- values: {
1987
- minDigits: "9",
1988
- maxDigits: "15",
1989
- example: "790000000"
1990
- }
1991
- }
1992
- },
1993
- [CountryCodes.Hungary]: simpleBankAccountNumberMetadata("117730161111101800000000", 24),
1994
- [CountryCodes.Singapore]: simpleBankAccountNumberMetadata("0052312891876", 4, 19),
1995
- [CountryCodes.Sweden]: simpleBankAccountNumberMetadata("123456789", 7, 10),
1996
- [CountryCodes.UnitedStates]: simpleBankAccountNumberMetadata("10220001111", 3, 17),
1997
- [CountryCodes.Poland]: {
1998
- label: "bankAccountNumber",
1999
- validators: validatePatternOnBlur(/^\d{26}$/),
2000
- mask: {
2001
- mask: makeMask(
2002
- ...numericInputs(2),
2003
- spacer,
2004
- ...numericInputs(4),
2005
- spacer,
2006
- ...numericInputs(4),
2007
- spacer,
2008
- ...numericInputs(4),
2009
- spacer,
2010
- ...numericInputs(4),
2011
- spacer,
2012
- ...numericInputs(4),
2013
- spacer,
2014
- ...numericInputs(4)
2015
- )
2016
- },
2017
- guidanceText: {
2018
- key: "enterNDigitsForExample",
2019
- values: {
2020
- numDigits: "26",
2021
- example: "98 1090 2402 7474 4662 2173 1624"
2022
- }
2023
- }
2024
- },
2025
- [CountryCodes.NewZealand]: {
2026
- label: "bankAccountNumber",
2027
- validators: validatePatternOnBlur(/^\d{15,16}$/),
2028
- mask: {
2029
- mask: makeMask(
2030
- ...numericInputs(2),
2031
- ...nonInputs(" - "),
2032
- ...numericInputs(4),
2033
- ...nonInputs(" - "),
2034
- ...numericInputs(7),
2035
- ...nonInputs(" - "),
2036
- ...numericInputs(2),
2037
- ...numericInputs(1, true)
2038
- )
2039
- },
2040
- guidanceText: {
2041
- key: "enterXToYDigitsForExample",
2042
- values: {
2043
- minDigits: "15",
2044
- maxDigits: "16",
2045
- example: "12-8765-9876543-043"
2046
- }
2047
- }
2048
- }
2049
- };
2050
- const bankAccountNumberFields = ["bankAccountNumber"];
2051
- function BankAccountNumber(props) {
2052
- const { t } = useTranslation("common");
2053
- const { country, fieldConfig = defaultFieldConfig$3, onFocus, onBlur } = props;
2054
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$3);
2055
- const mergedProps = mergeFieldMetadataIntoProps("bankAccountNumber", metadata, props);
2056
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2057
- ...mergedProps,
2058
- schema: bankAccountNumberFields,
2059
- rules: mergedProps.validators,
2060
- defaultData: mergedProps.data,
2061
- fieldProblems: mergedProps?.fieldValidationErrors,
2062
- obscuredFields: mergedProps.obscuredFields
2063
- });
2064
- const handleBlur = () => {
2065
- onBlur?.();
2066
- handleChangeFor("bankAccountNumber", "blur");
2067
- };
2068
- const { updateStateSlice } = useGlobalDataSlice(
2069
- "payoutAccountDetails"
2070
- );
2071
- useEffect(() => {
2072
- updateStateSlice({ data, valid, errors, fieldProblems });
2073
- }, [data, valid, errors]);
2074
- const formUtils = createFormUtils(mergedProps, t);
2075
- return /* @__PURE__ */ jsx(
2076
- MaskedInput,
2077
- {
2078
- name: "bankAccountNumber",
2079
- type: "text",
2080
- label: formUtils.getLabel("bankAccountNumber"),
2081
- formatGuidance: formUtils.getGuidanceText("bankAccountNumber"),
2082
- ...formUtils.getMask("bankAccountNumber"),
2083
- isValid: valid.bankAccountNumber,
2084
- errorMessage: formUtils.getErrorMessage("bankAccountNumber", errors, fieldProblems),
2085
- "aria-required": true,
2086
- "aria-invalid": !valid.bankAccountNumber,
2087
- onBlur: handleBlur,
2088
- onInput: handleChangeFor("bankAccountNumber", "input"),
2089
- onFocus,
2090
- readonly: formUtils.isReadOnly("bankAccountNumber"),
2091
- value: data.bankAccountNumber ?? "",
2092
- acceptObscuredValue: formUtils.isObscured("bankAccountNumber")
2093
- }
2094
- );
2095
- }
2096
- const bankCityFields = ["bankCity"];
2097
- function BankCity(props) {
2098
- const { t } = useTranslation("common");
2099
- const { validators, data: bankCityData, fieldValidationErrors } = props;
2100
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2101
- ...props,
2102
- schema: bankCityFields,
2103
- rules: validators,
2104
- defaultData: bankCityData,
2105
- fieldProblems: fieldValidationErrors
2106
- });
2107
- const { updateStateSlice } = useGlobalDataSlice(
2108
- "payoutAccountDetails"
2109
- );
2110
- useEffect(() => {
2111
- updateStateSlice({ data, valid, errors, fieldProblems });
2112
- }, [data, valid, errors]);
2113
- const formUtils = createFormUtils(props, t);
2114
- return /* @__PURE__ */ jsx(
2115
- Field,
2116
- {
2117
- name: "bankCity",
2118
- label: formUtils.getLabel("bankCity"),
2119
- errorMessage: formUtils.getErrorMessage("bankCity", errors, fieldProblems),
2120
- isValid: valid.bankCity,
2121
- children: (childProps) => /* @__PURE__ */ jsx(
2122
- InputText,
2123
- {
2124
- ...childProps,
2125
- name: "bankCity",
2126
- value: data.bankCity,
2127
- readonly: formUtils.isReadOnly("bankCity"),
2128
- onInput: handleChangeFor("bankCity", "input"),
2129
- onBlur: handleChangeFor("bankCity", "blur"),
2130
- "aria-required": true,
2131
- "aria-invalid": !valid.bankCity
2132
- }
2133
- )
2134
- }
2135
- );
2136
- }
2137
- const defaultFieldMetadata$2 = {
2138
- label: "bankCode",
2139
- validators: isNotEmptyValidator
2140
- };
2141
- const simpleBankCodeMetadata = (length, example, label) => ({
2142
- label: label ?? "bankCode",
2143
- validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
2144
- mask: {
2145
- mask: makeMask(...numericInputs(length))
2146
- },
2147
- guidanceText: {
2148
- key: "enterNDigitsForExample",
2149
- values: {
2150
- numDigits: `${length}`,
2151
- example
2152
- }
2153
- }
2154
- });
2155
- const defaultFieldConfig$2 = {
2156
- [CountryCodes.Brazil]: simpleBankCodeMetadata(3, "123"),
2157
- [CountryCodes.Canada]: simpleBankCodeMetadata(3, "100", "institutionNumber"),
2158
- [CountryCodes.CzechRepublic]: simpleBankCodeMetadata(4, "0800"),
2159
- [CountryCodes.Denmark]: simpleBankCodeMetadata(4, "5051"),
2160
- [CountryCodes.HongKong]: simpleBankCodeMetadata(3, "250", "bankCode"),
2161
- [CountryCodes.Norway]: simpleBankCodeMetadata(4, "8601"),
2162
- // Not yet implemented
2163
- [CountryCodes.Ecuador]: simpleBankCodeMetadata(4, "1234"),
2164
- [CountryCodes.Japan]: simpleBankCodeMetadata(4, "1234"),
2165
- [CountryCodes.Taiwan]: simpleBankCodeMetadata(3, "123")
2166
- };
2167
- const bankCodeFields = ["bankCode"];
2168
- function BankCode(props) {
2169
- const { t } = useTranslation("common");
2170
- const { country, fieldConfig = defaultFieldConfig$2 } = props;
2171
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$2);
2172
- const mergedProps = mergeFieldMetadataIntoProps("bankCode", metadata, props);
2173
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2174
- ...mergedProps,
2175
- schema: bankCodeFields,
2176
- rules: mergedProps.validators,
2177
- defaultData: mergedProps.data,
2178
- fieldProblems: mergedProps.fieldValidationErrors
2179
- });
2180
- const { updateStateSlice } = useGlobalDataSlice(
2181
- "payoutAccountDetails"
2182
- );
2183
- useEffect(() => {
2184
- updateStateSlice({ data, valid, errors, fieldProblems });
2185
- }, [data, valid, errors]);
2186
- const formUtils = createFormUtils(mergedProps, t);
2187
- return /* @__PURE__ */ jsx(
2188
- MaskedInput,
2189
- {
2190
- name: "bankCode",
2191
- type: "text",
2192
- label: formUtils.getLabel("bankCode"),
2193
- errorMessage: formUtils.getErrorMessage("bankCode", errors, fieldProblems),
2194
- formatGuidance: formUtils.getGuidanceText("bankCode"),
2195
- ...formUtils.getMask("bankCode"),
2196
- isValid: valid.bankCode,
2197
- value: data.bankCode ?? "",
2198
- readonly: formUtils.isReadOnly("bankCode"),
2199
- onInput: handleChangeFor("bankCode", "input"),
2200
- onBlur: handleChangeFor("bankCode", "blur"),
2201
- "aria-required": true,
2202
- "aria-invalid": !valid.bankCode
2203
- }
2204
- );
2205
- }
2206
- const bankNameFields = ["bankName"];
2207
- function BankName(props) {
2208
- const { t } = useTranslation("common");
2209
- const { validators, data: bankNameData, fieldValidationErrors } = props;
2210
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2211
- ...props,
2212
- schema: bankNameFields,
2213
- rules: validators,
2214
- defaultData: bankNameData,
2215
- fieldProblems: fieldValidationErrors
2216
- });
2217
- const { updateStateSlice } = useGlobalDataSlice(
2218
- "payoutAccountDetails"
2219
- );
2220
- useEffect(() => {
2221
- updateStateSlice({ data, valid, errors, fieldProblems });
2222
- }, [data, valid, errors]);
2223
- const formUtils = createFormUtils(props, t);
2224
- return /* @__PURE__ */ jsx(
2225
- Field,
2226
- {
2227
- name: "bankName",
2228
- label: formUtils.getLabel("bankName"),
2229
- errorMessage: formUtils.getErrorMessage("bankName", errors, fieldProblems),
2230
- isValid: valid.bankName,
2231
- children: (childProps) => /* @__PURE__ */ jsx(
2232
- InputText,
2233
- {
2234
- ...childProps,
2235
- name: "bankName",
2236
- value: data.bankName,
2237
- readonly: formUtils.isReadOnly("bankName"),
2238
- onInput: handleChangeFor("bankName", "input"),
2239
- onBlur: handleChangeFor("bankName", "blur"),
2240
- "aria-required": true,
2241
- "aria-invalid": !valid.bankName
2242
- }
2243
- )
2244
- }
2245
- );
2246
- }
2247
- const defaultFieldMetadata$1 = {
2248
- label: "branchCode",
2249
- validators: isNotEmptyValidator
2250
- };
2251
- const defaultFieldConfig$1 = {
2252
- [CountryCodes.UnitedKingdom]: {
2253
- label: "sortCode",
2254
- validators: validatePatternOnBlur(/^\d{6}$/),
2255
- mask: { mask: makeMask(...numericInputs(6)) },
2256
- guidanceText: {
2257
- key: "enterNDigitsForExample",
2258
- values: {
2259
- numDigits: "6",
2260
- example: "401199"
2261
- }
2262
- }
2263
- },
2264
- [CountryCodes.Australia]: {
2265
- label: "bsbNumber",
2266
- validators: validatePatternOnBlur(/^\d{6}$/),
2267
- mask: { mask: makeMask(...numericInputs(3), ...nonInputs(" - "), ...numericInputs(3)) },
2268
- guidanceText: {
2269
- key: "enterNDigitsForExample",
2270
- values: {
2271
- numDigits: "6",
2272
- example: "033-547"
2273
- }
2274
- }
2275
- },
2276
- [CountryCodes.Brazil]: {
2277
- label: "branchCode",
2278
- validators: validatePatternOnBlur(/^\d{1,5}$/),
2279
- mask: { mask: makeMask(...numericInputs(1), ...numericInputs(4, true)) },
2280
- guidanceText: {
2281
- key: "enterAMaximumOfNDigitsForExample",
2282
- values: {
2283
- maxDigits: "5",
2284
- example: "36257"
2285
- }
2286
- }
2287
- },
2288
- [CountryCodes.Canada]: {
2289
- label: "transitNumber",
2290
- validators: validatePatternOnBlur(/^\d{5}$/),
2291
- mask: { mask: makeMask(...numericInputs(5)) },
2292
- guidanceText: {
2293
- key: "enterNDigitsForExample",
2294
- values: {
2295
- numDigits: "5",
2296
- example: "27601"
2297
- }
2298
- }
2299
- },
2300
- [CountryCodes.UnitedStates]: {
2301
- label: "routingNumber",
2302
- validators: validatePatternOnBlur(/^\d{9}$/),
2303
- mask: { mask: makeMask(...numericInputs(9)) },
2304
- guidanceText: {
2305
- key: "enterNDigitsForExample",
2306
- values: {
2307
- numDigits: "9",
2308
- example: "107005432"
2309
- }
2310
- }
2311
- },
2312
- [CountryCodes.Sweden]: {
2313
- label: "branchCode",
2314
- validators: validatePatternOnBlur(/^\d{4,5}$/),
2315
- mask: {
2316
- mask: makeMask(
2317
- ...numericInputs(4),
2318
- ...nonInputs(" - ", { displayEagerly: false }),
2319
- ...numericInputs(1, true)
2320
- )
2321
- },
2322
- guidanceText: {
2323
- key: "enterXToYDigitsForExample",
2324
- values: {
2325
- minDigits: "4",
2326
- maxDigits: "5",
2327
- example: "5678 or 7635-2"
2328
- }
2329
- }
2330
- },
2331
- // Not yet implemented
2332
- [CountryCodes.Indonesia]: {
2333
- label: "clearingCode",
2334
- validators: isNotEmptyValidator
2335
- }
2336
- };
2337
- const branchCodeFields = ["branchCode"];
2338
- function BranchCode(props) {
2339
- const { t } = useTranslation("common");
2340
- const { country, fieldConfig = defaultFieldConfig$1, onFocus, onBlur } = props;
2341
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$1);
2342
- const mergedProps = mergeFieldMetadataIntoProps("branchCode", metadata, props);
2343
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2344
- ...mergedProps,
2345
- schema: branchCodeFields,
2346
- rules: mergedProps.validators,
2347
- defaultData: mergedProps.data,
2348
- fieldProblems: mergedProps?.fieldValidationErrors
2349
- });
2350
- const { updateStateSlice } = useGlobalDataSlice(
2351
- "payoutAccountDetails"
2352
- );
2353
- const handleBlur = () => {
2354
- onBlur?.();
2355
- handleChangeFor("branchCode", "blur");
2356
- };
2357
- useEffect(() => {
2358
- updateStateSlice({ data, valid, errors, fieldProblems });
2359
- }, [data, valid, errors]);
2360
- const formUtils = createFormUtils(mergedProps, t);
2361
- return /* @__PURE__ */ jsx(
2362
- MaskedInput,
2363
- {
2364
- name: "branchCode",
2365
- type: "text",
2366
- label: formUtils.getLabel("branchCode"),
2367
- formatGuidance: formUtils.getGuidanceText("branchCode"),
2368
- ...formUtils.getMask("branchCode"),
2369
- errorMessage: formUtils.getErrorMessage("branchCode", errors, fieldProblems),
2370
- isValid: valid.branchCode,
2371
- value: data.branchCode ?? "",
2372
- readonly: formUtils.isReadOnly("branchCode"),
2373
- onInput: handleChangeFor("branchCode", "input"),
2374
- onBlur: handleBlur,
2375
- onFocus,
2376
- "aria-required": true,
2377
- "aria-invalid": !valid.branchCode
2378
- }
2379
- );
2380
- }
2381
- const bbanPatternsByCountry = {
2382
- [CountryCodes.Albania]: /\d{8}[\dA-Z]{16}/,
2383
- [CountryCodes.Andorra]: /\d{8}[\dA-Z]{12}/,
2384
- [CountryCodes.Austria]: /\d{16}/,
2385
- [CountryCodes.Azerbaijan]: /[\dA-Z]{4}\d{20}/,
2386
- [CountryCodes.Belgium]: /\d{12}/,
2387
- [CountryCodes.Bahrain]: /[A-Z]{4}[\dA-Z]{14}/,
2388
- [CountryCodes.BosniaAndHerzegovina]: /\d{16}/,
2389
- [CountryCodes.Brazil]: /\d{23}[A-Z][\dA-Z]/,
2390
- [CountryCodes.Bulgaria]: /[A-Z]{4}\d{6}[\dA-Z]{8}/,
2391
- [CountryCodes.CostaRica]: /\d{17}/,
2392
- [CountryCodes.Croatia]: /\d{17}/,
2393
- [CountryCodes.Cyprus]: /\d{8}[\dA-Z]{16}/,
2394
- [CountryCodes.CzechRepublic]: /\d{20}/,
2395
- [CountryCodes.Denmark]: /\d{14}/,
2396
- [CountryCodes.DominicanRepublic]: /[A-Z]{4}\d{20}/,
2397
- [CountryCodes.Estonia]: /\d{16}/,
2398
- [CountryCodes.FaroeIslands]: /\d{14}/,
2399
- [CountryCodes.Finland]: /\d{14}/,
2400
- [CountryCodes.France]: /\d{10}[\dA-Z]{11}\d{2}/,
2401
- [CountryCodes.Georgia]: /[\dA-Z]{2}\d{16}/,
2402
- [CountryCodes.Germany]: /\d{18}/,
2403
- [CountryCodes.Gibraltar]: /[A-Z]{4}[\dA-Z]{15}/,
2404
- [CountryCodes.Greece]: /\d{7}[\dA-Z]{16}/,
2405
- [CountryCodes.Greenland]: /\d{14}/,
2406
- [CountryCodes.Guatemala]: /[\dA-Z]{4}[\dA-Z]{20}/,
2407
- [CountryCodes.Hungary]: /\d{24}/,
2408
- [CountryCodes.Iceland]: /\d{22}/,
2409
- [CountryCodes.Ireland]: /[\dA-Z]{4}\d{14}/,
2410
- [CountryCodes.Israel]: /\d{19}/,
2411
- [CountryCodes.Italy]: /[A-Z]\d{10}[\dA-Z]{12}/,
2412
- [CountryCodes.Kazakhstan]: /\d{3}[\dA-Z]{13}/,
2413
- [CountryCodes.Kuwait]: /[A-Z]{4}[\dA-Z]{22}/,
2414
- [CountryCodes.Latvia]: /[A-Z]{4}[\dA-Z]{13}/,
2415
- [CountryCodes.Lebanon]: /\d{4}[\dA-Z]{20}/,
2416
- [CountryCodes.Liechtenstein]: /\d{5}[\dA-Z]{12}/,
2417
- [CountryCodes.Lithuania]: /\d{16}/,
2418
- [CountryCodes.Luxembourg]: /\d{3}[\dA-Z]{13}/,
2419
- [CountryCodes.Macedonia]: /\d{3}[\dA-Z]{10}\d{2}/,
2420
- [CountryCodes.Malta]: /[A-Z]{4}\d{5}[\dA-Z]{18}/,
2421
- [CountryCodes.Mauritania]: /\d{23}/,
2422
- [CountryCodes.Mauritius]: /[A-Z]{4}\d{19}[A-Z]{3}/,
2423
- [CountryCodes.Monaco]: /\d{10}[\dA-Z]{11}\d{2}/,
2424
- [CountryCodes.Moldova]: /[\dA-Z]{2}\d{18}/,
2425
- [CountryCodes.Montenegro]: /\d{18}/,
2426
- [CountryCodes.Netherlands]: /[A-Z]{4}\d{10}/,
2427
- [CountryCodes.Norway]: /\d{11}/,
2428
- [CountryCodes.Pakistan]: /[\dA-Z]{4}\d{16}/,
2429
- [CountryCodes.PalestinianTerritory]: /[\dA-Z]{4}\d{21}/,
2430
- [CountryCodes.Poland]: /\d{24}/,
2431
- [CountryCodes.Portugal]: /\d{21}/,
2432
- [CountryCodes.Romania]: /[A-Z]{4}[\dA-Z]{16}/,
2433
- [CountryCodes.SanMarino]: /[A-Z]\d{10}[\dA-Z]{12}/,
2434
- [CountryCodes.SaudiArabia]: /\d{2}[\dA-Z]{18}/,
2435
- [CountryCodes.Serbia]: /\d{18}/,
2436
- [CountryCodes.Slovakia]: /\d{20}/,
2437
- [CountryCodes.Slovenia]: /\d{15}/,
2438
- [CountryCodes.Spain]: /\d{20}/,
2439
- [CountryCodes.Sweden]: /\d{20}/,
2440
- [CountryCodes.Switzerland]: /\d{5}[\dA-Z]{12}/,
2441
- [CountryCodes.Tunisia]: /\d{20}/,
2442
- [CountryCodes.Turkey]: /\d{5}[\dA-Z]{17}/,
2443
- [CountryCodes.UnitedArabEmirates]: /\d{3}\d{16}/,
2444
- [CountryCodes.UnitedKingdom]: /[A-Z]{4}\d{14}/,
2445
- [CountryCodes.VirginIslandsBritish]: /[\dA-Z]{4}\d{16}/
2446
- };
2447
- const customPrefixByCountry = {
2448
- [CountryCodes.Guernsey]: "GB",
2449
- [CountryCodes.Jersey]: "GB",
2450
- [CountryCodes.IsleOfMan]: "GB"
2451
- };
2452
- function ibanValidator(input, bankCountry) {
2453
- if (isEmpty(input)) return false;
2454
- const ibanInput = input.replace(/ /g, "").toUpperCase();
2455
- if (!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(ibanInput)) {
2456
- return false;
2457
- }
2458
- const countryCode = ibanInput.substring(0, 2);
2459
- const allowedPrefix = customPrefixByCountry[bankCountry] ?? bankCountry;
2460
- if (countryCode !== allowedPrefix) {
2461
- return {
2462
- key: "yourIbanShouldBeginWith_",
2463
- values: {
2464
- countryCode: allowedPrefix
2465
- }
2466
- };
2467
- }
2468
- const bbanPattern = bbanPatternsByCountry[countryCode];
2469
- if (bbanPattern) {
2470
- const ibanPattern = new RegExp(`^[A-Z]{2}\\d{2}${bbanPattern.source}$`, "");
2471
- if (!ibanPattern.test(ibanInput)) {
2472
- return false;
2473
- }
2474
- }
2475
- const ibanCheck = ibanInput.substring(4, ibanInput.length) + ibanInput.substring(0, 4);
2476
- let leadingZeroes = true;
2477
- let ibanCheckDigits = "";
2478
- for (let i = 0; i < ibanCheck.length; i += 1) {
2479
- const charAt = ibanCheck.charAt(i);
2480
- if (charAt !== "0") {
2481
- leadingZeroes = false;
2482
- }
2483
- if (!leadingZeroes) {
2484
- ibanCheckDigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
2485
- }
2486
- }
2487
- let cRest = 0;
2488
- for (let p = 0; p < ibanCheckDigits.length; p += 1) {
2489
- const cChar = ibanCheckDigits.charAt(p);
2490
- const cOperator = +`${cRest}${cChar}`;
2491
- cRest = cOperator % 97;
2492
- }
2493
- return cRest === 1;
2494
- }
2495
- const validateIbanOnBlurAndInput = (country) => ({
2496
- modes: ["blur", "input"],
2497
- validate: (iban) => ibanValidator(iban, country) === true,
2498
- errorMessage: (iban) => {
2499
- const result = ibanValidator(iban, country);
2500
- return typeof result === "boolean" ? void 0 : result;
2501
- }
2502
- });
2503
- const ibanMask = (country, inputLength, allowLettersInBban) => {
2504
- const tokens = [];
2505
- tokens.push(...nonInputs(country, { includeInValue: true }), ...numericInputs(2));
2506
- inputLength -= 2;
2507
- const inputToken = allowLettersInBban ? alphanumericInputs : numericInputs;
2508
- const numGroups = Math.floor(inputLength / 4);
2509
- const remainder = inputLength % 4;
2510
- for (let i = 0; i < numGroups; i += 1) {
2511
- tokens.push(spacer, ...inputToken(4));
2512
- }
2513
- if (remainder > 0) {
2514
- tokens.push(spacer, ...inputToken(remainder));
2515
- }
2516
- return {
2517
- mask: makeMask(...tokens),
2518
- transformOnType: allowLettersInBban ? uppercase : void 0
2519
- };
2520
- };
2521
- const ibanGuidance = (type, numDigitsOrChars, example) => type === "digits" ? {
2522
- key: "enterTheRemainingNDigitsForExample",
2523
- values: {
2524
- numDigits: `${numDigitsOrChars}`,
2525
- example
2526
- }
2527
- } : {
2528
- key: "enterTheRemainingNCharactersForExample",
2529
- values: {
2530
- numChars: `${numDigitsOrChars}`,
2531
- example
2532
- }
2533
- };
2534
- const ibanMetadata = (country, inputLength, example, allowLettersInBban) => ({
2535
- label: "iban",
2536
- validators: validateIbanOnBlurAndInput(country),
2537
- mask: ibanMask(country, inputLength, allowLettersInBban),
2538
- guidanceText: ibanGuidance(allowLettersInBban ? "characters" : "digits", inputLength, example)
2539
- });
2540
- const gbIbanMetadata = ibanMetadata(
2541
- CountryCodes.UnitedKingdom,
2542
- 20,
2543
- "GB09 BARC 2003 9554 8297 59",
2544
- true
2545
- );
2546
- const defaultFieldMetadata = {
2547
- label: "iban",
2548
- validators: isNotEmptyValidator
2549
- };
2550
- const defaultFieldConfig = {
2551
- [CountryCodes.Austria]: ibanMetadata(CountryCodes.Austria, 18, "AT88 5400 0746 7265 9747"),
2552
- [CountryCodes.Belgium]: ibanMetadata(CountryCodes.Belgium, 14, "BE59 9788 6743 2226"),
2553
- [CountryCodes.Croatia]: ibanMetadata(CountryCodes.Croatia, 19, "HR51 2484 0083 5929 6973 8"),
2554
- [CountryCodes.Cyprus]: ibanMetadata(
2555
- CountryCodes.Cyprus,
2556
- 26,
2557
- "CY16 5183 1221 8756 5858 5388 7678"
2558
- ),
2559
- [CountryCodes.CzechRepublic]: ibanMetadata(
2560
- CountryCodes.CzechRepublic,
2561
- 22,
2562
- "CZ23 5051 3674 5924 5233 3465"
2563
- ),
2564
- [CountryCodes.Denmark]: ibanMetadata(CountryCodes.Denmark, 16, "DK95 2000 0123 4567 89"),
2565
- [CountryCodes.Estonia]: ibanMetadata(CountryCodes.Estonia, 18, "EE26 1291 5123 1542 6371"),
2566
- [CountryCodes.Finland]: ibanMetadata(CountryCodes.Finland, 16, "FI03 9319 8995 3742 51"),
2567
- [CountryCodes.Germany]: ibanMetadata(CountryCodes.Germany, 20, "DE91 1000 0000 0123 4567 89"),
2568
- [CountryCodes.Greece]: ibanMetadata(CountryCodes.Greece, 25, "GR57 0107 7142 7681 6687 9575 217"),
2569
- [CountryCodes.Hungary]: ibanMetadata(
2570
- CountryCodes.Hungary,
2571
- 26,
2572
- "HU68 1070 0024 3428 4128 3192 4812"
2573
- ),
2574
- [CountryCodes.Lithuania]: ibanMetadata(CountryCodes.Lithuania, 18, "LT59 9244 6228 2176 2762"),
2575
- [CountryCodes.Luxembourg]: ibanMetadata(CountryCodes.Luxembourg, 18, "LU71 0106 9242 5365 8562"),
2576
- [CountryCodes.Norway]: ibanMetadata(CountryCodes.Norway, 13, "NO83 3000 1234 567"),
2577
- [CountryCodes.Poland]: ibanMetadata(
2578
- CountryCodes.Poland,
2579
- 26,
2580
- "PL98 1090 2402 7474 4662 2173 1624"
2581
- ),
2582
- [CountryCodes.Portugal]: ibanMetadata(
2583
- CountryCodes.Portugal,
2584
- 23,
2585
- "PT42 0035 0651 8646 9119 5263 5"
2586
- ),
2587
- [CountryCodes.Slovakia]: ibanMetadata(CountryCodes.Slovakia, 22, "SK25 5173 1333 4916 3219 3521"),
2588
- [CountryCodes.Slovenia]: ibanMetadata(CountryCodes.Slovenia, 17, "SI56 1920 0123 4567 892"),
2589
- [CountryCodes.Spain]: ibanMetadata(CountryCodes.Spain, 22, "ES76 1465 5599 9226 7623 2635"),
2590
- [CountryCodes.Sweden]: ibanMetadata(CountryCodes.Sweden, 22, "SE72 8000 0810 3400 0978 3242"),
2591
- // These include letters in the BBAN (bank account number)
2592
- [CountryCodes.Bulgaria]: ibanMetadata(
2593
- CountryCodes.Bulgaria,
2594
- 20,
2595
- "BG17 BNPA 9440 4432 7749 93",
2596
- true
2597
- ),
2598
- [CountryCodes.France]: ibanMetadata(
2599
- CountryCodes.France,
2600
- 25,
2601
- "FR64 1009 6000 4035 3425 9742 Y90",
2602
- true
2603
- ),
2604
- [CountryCodes.Gibraltar]: ibanMetadata(
2605
- CountryCodes.Gibraltar,
2606
- 21,
2607
- "GI96 JYJT 9899 9587 8655 898",
2608
- true
2609
- ),
2610
- [CountryCodes.Ireland]: ibanMetadata(
2611
- CountryCodes.Ireland,
2612
- 20,
2613
- "IE64 IRCE 9205 0112 3456 78",
2614
- true
2615
- ),
2616
- [CountryCodes.Italy]: ibanMetadata(
2617
- CountryCodes.Italy,
2618
- 25,
2619
- "IT06 L030 0203 2809 8485 8934 882",
2620
- true
2621
- ),
2622
- [CountryCodes.Latvia]: ibanMetadata(CountryCodes.Latvia, 19, "LV80 BANK 0000 4351 9500 1", true),
2623
- [CountryCodes.Liechtenstein]: ibanMetadata(
2624
- CountryCodes.Liechtenstein,
2625
- 19,
2626
- "LI21 0881 0000 2324 013A A",
2627
- true
2628
- ),
2629
- [CountryCodes.Malta]: ibanMetadata(
2630
- CountryCodes.Malta,
2631
- 29,
2632
- "MT03 VIXW 2487 8926 8575 8586 8929 858",
2633
- true
2634
- ),
2635
- [CountryCodes.Monaco]: ibanMetadata(
2636
- CountryCodes.Monaco,
2637
- 25,
2638
- "MC58 1122 2000 0101 2345 6789 030",
2639
- true
2640
- ),
2641
- [CountryCodes.Netherlands]: ibanMetadata(
2642
- CountryCodes.Netherlands,
2643
- 16,
2644
- "NL50 ABNA 4452 7591 49",
2645
- true
2646
- ),
2647
- [CountryCodes.Romania]: ibanMetadata(
2648
- CountryCodes.Romania,
2649
- 22,
2650
- "RO36 PORL 9596 9966 4965 4284",
2651
- true
2652
- ),
2653
- [CountryCodes.Switzerland]: ibanMetadata(
2654
- CountryCodes.Switzerland,
2655
- 19,
2656
- "CH56 0483 5012 3456 7800 9",
2657
- true
2658
- ),
2659
- [CountryCodes.UnitedKingdom]: gbIbanMetadata,
2660
- // IBANs for Guernsey, Jersey, and Isle of Man also use United Kingdom's format (starting with `GB`)
2661
- [CountryCodes.Guernsey]: gbIbanMetadata,
2662
- [CountryCodes.Jersey]: gbIbanMetadata,
2663
- [CountryCodes.IsleOfMan]: gbIbanMetadata
2664
- };
2665
- const ibanFields = ["iban"];
2666
- function Iban(props) {
2667
- const { t } = useTranslation("common");
2668
- const {
2669
- country,
2670
- fieldConfig = defaultFieldConfig,
2671
- data: ibanData,
2672
- obscuredFields,
2673
- fieldValidationErrors
2674
- } = props;
2675
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata);
2676
- const mergedProps = mergeFieldMetadataIntoProps("iban", metadata, props);
2677
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2678
- ...mergedProps,
2679
- schema: ibanFields,
2680
- rules: mergedProps.validators,
2681
- defaultData: ibanData,
2682
- fieldProblems: fieldValidationErrors,
2683
- obscuredFields
2684
- });
2685
- const { updateStateSlice } = useGlobalDataSlice(
2686
- "payoutAccountDetails"
2687
- );
2688
- useEffect(() => {
2689
- updateStateSlice({ data, valid, errors, fieldProblems });
2690
- }, [data, errors, valid]);
2691
- const formUtils = createFormUtils(mergedProps, t);
2692
- return /* @__PURE__ */ jsx(
2693
- MaskedInput,
2694
- {
2695
- name: "iban",
2696
- type: "text",
2697
- label: formUtils.getLabel("iban"),
2698
- formatGuidance: formUtils.getGuidanceText("iban"),
2699
- ...formUtils.getMask("iban"),
2700
- errorMessage: formUtils.getErrorMessage("iban", errors, fieldProblems),
2701
- isValid: valid.iban,
2702
- value: data.iban ?? "",
2703
- readonly: formUtils.isReadOnly("iban"),
2704
- onInput: handleChangeFor("iban", "blur"),
2705
- onBlur: handleChangeFor("iban", "blur"),
2706
- "aria-required": true,
2707
- "aria-invalid": !valid.iban,
2708
- acceptObscuredValue: formUtils.isObscured("iban")
2709
- }
2710
- );
2711
- }
2712
- const swiftCodeFieldMetadata = {
2713
- label: "bicSwift",
2714
- validators: validatePatternOnBlur(/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/),
2715
- mask: {
2716
- mask: makeMask(...alphaInputs(6), ...alphanumericInputs(2), ...alphanumericInputs(3, true)),
2717
- transformOnType: uppercase
2718
- },
2719
- guidanceText: {
2720
- key: "enterXOrYCharactersForExample",
2721
- values: {
2722
- xChars: "8",
2723
- yChars: "11",
2724
- example: "BANKDE65287"
2725
- }
2726
- }
2727
- };
2728
- const swiftCodeFields = ["swiftCode"];
2729
- function SwiftCode(props) {
2730
- const { t } = useTranslation("common");
2731
- const mergedProps = mergeFieldMetadataIntoProps("swiftCode", swiftCodeFieldMetadata, props);
2732
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2733
- ...mergedProps,
2734
- schema: swiftCodeFields,
2735
- rules: mergedProps.validators,
2736
- defaultData: mergedProps.data,
2737
- fieldProblems: mergedProps?.fieldValidationErrors
2738
- });
2739
- const { updateStateSlice } = useGlobalDataSlice(
2740
- "payoutAccountDetails"
2741
- );
2742
- useEffect(() => {
2743
- updateStateSlice({ data, valid, errors, fieldProblems });
2744
- }, [data, valid, errors]);
2745
- const formUtils = createFormUtils(mergedProps, t);
2746
- return /* @__PURE__ */ jsx(
2747
- MaskedInput,
2748
- {
2749
- name: "swiftCode",
2750
- type: "text",
2751
- label: formUtils.getLabel("swiftCode"),
2752
- formatGuidance: formUtils.getGuidanceText("swiftCode"),
2753
- ...formUtils.getMask("swiftCode"),
2754
- errorMessage: formUtils.getErrorMessage("swiftCode", errors, fieldProblems),
2755
- isValid: valid.swiftCode,
2756
- value: data.swiftCode ?? "",
2757
- readonly: formUtils.isReadOnly("swiftCode"),
2758
- onInput: handleChangeFor("swiftCode", "input"),
2759
- onBlur: handleChangeFor("swiftCode", "blur"),
2760
- "aria-required": true,
2761
- "aria-invalid": !valid.swiftCode
2762
- }
2763
- );
2764
- }
2765
- const countriesWithMultipleCurrencies = /* @__PURE__ */ new Set([
2766
- CountryCodes.Bulgaria,
2767
- CountryCodes.Canada,
2768
- CountryCodes.Croatia,
2769
- CountryCodes.CzechRepublic,
2770
- CountryCodes.Hungary,
2771
- CountryCodes.Romania,
2772
- CountryCodes.Switzerland
2773
- ]);
2774
- const countriesWithLocalFormat = /* @__PURE__ */ new Set([
2775
- CountryCodes.CzechRepublic,
2776
- CountryCodes.Denmark,
2777
- CountryCodes.Hungary,
2778
- CountryCodes.Norway,
2779
- CountryCodes.Poland,
2780
- CountryCodes.Sweden,
2781
- CountryCodes.UnitedKingdom
2782
- ]);
2783
- const payoutCurrencySupport = {
2784
- [CountryCodes.Sweden]: {
2785
- local: [Currencies.SEK],
2786
- iban: [Currencies.EUR, Currencies.SEK]
2787
- },
2788
- [CountryCodes.Canada]: {
2789
- local: [Currencies.CAD, Currencies.USD],
2790
- iban: [Currencies.CAD, Currencies.USD]
2791
- }
2792
- };
2793
- const shouldShowCheckGuidance = (country) => country === "US";
2794
- const shouldShowPayoutAccountFormatSelector = (country) => countriesWithLocalFormat.has(country);
2795
- const shouldShowPayoutAlert = (country) => shouldShowPayoutAccountFormatSelector(country) || countriesWithMultipleCurrencies.has(country);
2796
- const getSupportedCurrencyGuidance = (t, country, requiredFields) => {
2797
- const format = requiredFields.includes("iban") ? "iban" : "local";
2798
- if (!shouldShowPayoutAlert(country)) {
2799
- return;
2800
- }
2801
- const supportedCurrencies = getSupportedCurrenciesPerFormat(country, format);
2802
- if (!supportedCurrencies) {
2803
- return;
2804
- }
2805
- return supportedCurrencies.length > 1 ? t(($) => $["payoutIn_Or_"], {
2806
- currencyOne: supportedCurrencies[0],
2807
- currencyTwo: supportedCurrencies[1]
2808
- }) : t(($) => $["payoutInOnly_"], { currency: supportedCurrencies[0] });
2809
- };
2810
- const getSupportedCurrenciesPerFormat = (country, format) => {
2811
- const supportedCurrencies = payoutCurrencySupport[country];
2812
- if (!supportedCurrencies) {
2813
- const defaultCurrency = currencyByCountry[country]?.[0];
2814
- if (!defaultCurrency) {
2815
- return;
2816
- }
2817
- return format === "iban" ? [Currencies.EUR, defaultCurrency] : [defaultCurrency];
2818
- }
2819
- return supportedCurrencies[format];
2820
- };
2821
- const isLocalCurrency = (country, currency) => {
2822
- if (!country || !currency) {
2823
- return false;
2824
- }
2825
- const supportedCurrencies = currencyByCountry[country];
2826
- return supportedCurrencies?.includes(currency) ?? false;
2827
- };
2828
- const AccountHolderDescriptionFragment = ({
2829
- legalEntityResponse
2830
- }) => {
2831
- const { t } = useTranslation("banking");
2832
- const hasSolePropEntityAssociations = hasOwnEntityAssociationOfType(
2833
- LegalEntityTypes.SOLE_PROPRIETORSHIP,
2834
- legalEntityResponse.entityAssociations,
2835
- legalEntityResponse.id
2836
- );
2837
- const { accountHolder } = useAccountHolder();
2838
- const unincorporatedPartnershipMembers = useUnincorporatedPartnershipMembers();
2839
- if (accountHolder === "mySoleProprietorName" || hasSolePropEntityAssociations) {
2840
- const soleProp = legalEntityResponse.entityAssociations?.find(
2841
- (ea) => ea.entityType === "soleProprietorship"
2842
- );
2843
- const { individual: individual2 } = legalEntityResponse;
2844
- return /* @__PURE__ */ jsxs(Typography, { children: [
2845
- `${t(($) => $["bankAccountHasToBeInYourName"])} `,
2846
- /* @__PURE__ */ jsx(
2847
- Typography,
2848
- {
2849
- el: "span",
2850
- variant: "body-stronger",
2851
- children: `${individual2?.name.firstName} ${individual2?.name.lastName}`
2852
- }
2853
- ),
2854
- ` ${t(($) => $["orSoleProprietorshipName"])} `,
2855
- " ",
2856
- /* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: `${soleProp?.name ?? ""}` })
2857
- ] });
2858
- }
2859
- const hasTrustsEntityAssociations = hasOwnEntityAssociationOfType(
2860
- LegalEntityTypes.TRUST,
2861
- legalEntityResponse.entityAssociations,
2862
- legalEntityResponse.id
2863
- );
2864
- if (accountHolder === "aTrust" || hasTrustsEntityAssociations) {
2865
- const trust = legalEntityResponse.entityAssociations?.find((ea) => ea.entityType === "trust");
2866
- if (legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL) {
2867
- return /* @__PURE__ */ jsxs(Typography, { children: [
2868
- `${t(($) => $["bankAccountToHaveSameNameAsTrust"])} `,
2869
- /* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: t(($) => $["trusteeAsTrusteeForTrust"], {
2870
- trusteeName: `${legalEntityResponse?.individual?.name.firstName} ${legalEntityResponse?.individual?.name.lastName}`,
2871
- trustName: trust?.name ?? ""
2872
- }) })
2873
- ] });
2874
- }
2875
- const companyTrusteeBankAccountName = legalEntityResponse?.organization?.legalName !== legalEntityResponse?.organization?.doingBusinessAs ? t(($) => $["trusteeAsTrusteeForTrustDoingBusinessAs"], {
2876
- trusteeName: legalEntityResponse?.organization?.legalName ?? "",
2877
- trustName: trust?.name ?? "",
2878
- tradingName: legalEntityResponse?.organization?.doingBusinessAs
2879
- }) : t(($) => $["trusteeAsTrusteeForTrust"], {
2880
- trusteeName: legalEntityResponse?.organization?.legalName ?? "",
2881
- trustName: trust?.name ?? ""
2882
- });
2883
- return /* @__PURE__ */ jsxs(Typography, { children: [
2884
- `${t(($) => $["bankAccountToHaveSameNameAsTrust"])} `,
2885
- /* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: companyTrusteeBankAccountName })
2886
- ] });
2887
- }
2888
- const hasUnincorporatedPartnershipEntityAssociations = hasOwnEntityAssociationOfType(
2889
- LegalEntityTypes.UNINCORPORATED_PARTNERSHIP,
2890
- legalEntityResponse.entityAssociations,
2891
- legalEntityResponse.id
2892
- );
2893
- if (accountHolder === "anUnincorporatedPartnership" || hasUnincorporatedPartnershipEntityAssociations) {
2894
- const unincorporatedPartnership = legalEntityResponse?.entityAssociations?.find(
2895
- (ea) => ea.entityType === "unincorporatedPartnership"
2896
- );
2897
- const partnerNames = unincorporatedPartnershipMembers?.map((member) => member?.name)?.sort();
2898
- return /* @__PURE__ */ jsx(Typography, { children: `${t(($) => $["bankAccountToHaveSameNameAsUnincorporatedPartnership"], {
2899
- partnerNames: `${partnerNames?.join(", ")}`,
2900
- partnershipName: unincorporatedPartnership?.name ?? ""
2901
- })} ` });
2902
- }
2903
- if (legalEntityResponse.type === LegalEntityTypes.ORGANIZATION) {
2904
- return /* @__PURE__ */ jsxs(Typography, { children: [
2905
- `${t(($) => $["bankAccountHasToBeInYourCompanyName"])} `,
2906
- /* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: legalEntityResponse?.organization?.legalName })
2907
- ] });
2908
- }
2909
- const { individual } = legalEntityResponse;
2910
- return /* @__PURE__ */ jsxs(Typography, { children: [
2911
- `${t(($) => $["bankAccountHasToBeInYourName"])} `,
2912
- /* @__PURE__ */ jsx(
2913
- Typography,
2914
- {
2915
- el: "span",
2916
- variant: "body-stronger",
2917
- children: `${individual?.name.firstName} ${individual?.name.lastName}`
2918
- }
2919
- )
2920
- ] });
2921
- };
2922
- const checkGuidance = "adyen-kyc-check-guidance";
2923
- const checkGuidanceImage = "adyen-kyc-check-guidance-image";
2924
- const checkGuidanceAnnotated = "adyen-kyc-check-guidance-annotated";
2925
- const checkGuidanceInactive = "adyen-kyc-check-guidance-inactive";
2926
- const styles$2 = {
2927
- checkGuidance,
2928
- checkGuidanceImage,
2929
- checkGuidanceAnnotated,
2930
- checkGuidanceInactive
2931
- };
2932
- const usCheckAccount = lazy(() => import("./us-check-account-number-C7KE5YzX.js"));
2933
- const usCheckRouting = lazy(() => import("./us-check-routing-number-DUbhsYAR.js"));
2934
- const usCheck = lazy(() => import("./us-check-CYY6Crhr.js"));
2935
- const CheckGuidance = ({ annotated }) => {
2936
- return /* @__PURE__ */ jsxs("div", { className: styles$2.checkGuidance, children: [
2937
- /* @__PURE__ */ jsx(
2938
- Image,
2939
- {
2940
- lazyLoadedImage: usCheckAccount,
2941
- className: cx(styles$2.checkGuidanceImage, styles$2.checkGuidanceAnnotated, {
2942
- [styles$2.checkGuidanceInactive]: annotated !== "account"
2943
- })
2944
- }
2945
- ),
2946
- /* @__PURE__ */ jsx(
2947
- Image,
2948
- {
2949
- lazyLoadedImage: usCheckRouting,
2950
- className: cx(styles$2.checkGuidanceImage, styles$2.checkGuidanceAnnotated, {
2951
- [styles$2.checkGuidanceInactive]: annotated !== "routing"
2952
- })
2953
- }
2954
- ),
2955
- /* @__PURE__ */ jsx(Image, { lazyLoadedImage: usCheck, className: styles$2.checkGuidanceImage })
2956
- ] });
2957
- };
2958
- const payoutAccountFields = [
2959
- "accountHolder",
2960
- ...ibanFields,
2961
- ...branchCodeFields,
2962
- ...swiftCodeFields,
2963
- ...bankAccountNumberFields,
2964
- ...bankNameFields,
2965
- ...bankCodeFields
2966
- ];
2967
- function PayoutAccount(props) {
2968
- const accountFormat = payoutAccountFormat.value;
2969
- const { t } = useTranslation("banking");
2970
- const { t: commonT } = useTranslation("common");
2971
- const [checkAnnotation, setCheckAnnotation] = useState();
2972
- const { isExperimentEnabled } = useExperimentsContext();
2973
- const isCrossBorderPayoutsEnabled = isExperimentEnabled("EnableCrossBorderPayouts");
2974
- const { isSettingEnabled } = useSettingsContext();
2975
- const bankAccountFormatSelectionAllowed = isSettingEnabled(
2976
- SettingNames.AllowBankAccountFormatSelection
2977
- );
2978
- const {
2979
- heading,
2980
- country,
2981
- id,
2982
- legalEntityResponse,
2983
- requiredFields = [],
2984
- arePayoutAccountDetailsInvalid,
2985
- invalidFieldNames,
2986
- formVerificationErrors,
2987
- fieldValidationErrors,
2988
- preferredCurrencyCode
2989
- } = props;
2990
- const showCheckGuidance = shouldShowCheckGuidance(country);
2991
- const formUtils = createFormUtils({ ...props, requiredFields }, commonT);
2992
- const bankAccountNumberProps = getFieldProps(props, bankAccountNumberFields);
2993
- const swiftCodeProps = getFieldProps(props, swiftCodeFields);
2994
- const ibanProps = getFieldProps(
2995
- props,
2996
- ibanFields
2997
- );
2998
- const branchCodeProps = getFieldProps(props, branchCodeFields);
2999
- const bankNameProps = getFieldProps(props, bankNameFields);
3000
- const bankCodeProps = getFieldProps(props, bankCodeFields);
3001
- const bankCityProps = getFieldProps(props, bankCityFields);
3002
- const { clearStateSlice } = useGlobalDataSlice(
3003
- "payoutAccountDetails"
3004
- );
3005
- const handleAccountFormatChange = (accountFormat2) => {
3006
- clearStateSlice();
3007
- payoutAccountFormat.value = accountFormat2;
3008
- };
3009
- const localCurrency = isCrossBorderPayoutsEnabled ? isLocalCurrency(country, preferredCurrencyCode) : true;
3010
- const isEUR = preferredCurrencyCode === "EUR";
3011
- useEffect(() => {
3012
- if (!isCrossBorderPayoutsEnabled) {
3013
- return;
3014
- }
3015
- if (isEUR && localCurrency) {
3016
- handleAccountFormatChange?.("iban");
3017
- return;
3018
- }
3019
- if (!localCurrency) {
3020
- handleAccountFormatChange?.("numberAndBic");
3021
- }
3022
- }, [country, preferredCurrencyCode]);
3023
- return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__payout-account", "aria-describedby": "ariaErrorField", children: [
3024
- heading && /* @__PURE__ */ jsx(Header, { title: heading, children: /* @__PURE__ */ jsx(
3025
- AccountHolderDescriptionFragment,
3026
- {
3027
- slot: "description",
3028
- legalEntityResponse
3029
- }
3030
- ) }),
3031
- /* @__PURE__ */ jsx(
3032
- ErrorPanel,
3033
- {
3034
- verificationErrors: formVerificationErrors,
3035
- validationErrors: fieldValidationErrors,
3036
- formUtils,
3037
- id: "ariaErrorField"
3038
- }
3039
- ),
3040
- showCheckGuidance ? /* @__PURE__ */ jsx(CheckGuidance, { annotated: checkAnnotation }) : void 0,
3041
- bankAccountFormatSelectionAllowed && shouldShowPayoutAccountFormatSelector(country) && accountFormat && localCurrency && !isEUR && /* @__PURE__ */ jsx(
3042
- BankAccountFormat,
3043
- {
3044
- bankAccountFormat: accountFormat,
3045
- handleAccountFormatChange
3046
- }
3047
- ),
3048
- formUtils.isRequiredField("branchCode") && /* @__PURE__ */ jsx(
3049
- BranchCode,
3050
- {
3051
- ...branchCodeProps,
3052
- country,
3053
- dataStoreId: id,
3054
- onFocus: showCheckGuidance ? () => setCheckAnnotation("routing") : void 0,
3055
- onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
3056
- }
3057
- ),
3058
- formUtils.isRequiredField("bankAccountNumber") && /* @__PURE__ */ jsx(
3059
- BankAccountNumber,
3060
- {
3061
- ...bankAccountNumberProps,
3062
- country,
3063
- dataStoreId: id,
3064
- onFocus: showCheckGuidance ? () => setCheckAnnotation("account") : void 0,
3065
- onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
3066
- }
3067
- ),
3068
- formUtils.isRequiredField("iban") && /* @__PURE__ */ jsx(Iban, { ...ibanProps, dataStoreId: id, country }),
3069
- formUtils.isRequiredField("swiftCode") && /* @__PURE__ */ jsx(SwiftCode, { ...swiftCodeProps, dataStoreId: id }),
3070
- formUtils.isRequiredField("bankName") && /* @__PURE__ */ jsx(BankName, { ...bankNameProps, dataStoreId: id }),
3071
- formUtils.isRequiredField("bankCode") && /* @__PURE__ */ jsx(BankCode, { ...bankCodeProps, country, dataStoreId: id }),
3072
- formUtils.isRequiredField("bankCity") && /* @__PURE__ */ jsx(BankCity, { ...bankCityProps, dataStoreId: id }),
3073
- shouldShowPayoutAlert(country) && !isCrossBorderPayoutsEnabled && /* @__PURE__ */ jsx(
3074
- Alert,
3075
- {
3076
- title: getSupportedCurrencyGuidance(t, country, requiredFields),
3077
- className: "adyen-kyc-u-margin-bottom-8"
3078
- }
3079
- ),
3080
- !isCrossBorderPayoutsEnabled && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: t(($) => $["thisAccountWillBeVerifiedToPrevent"]) }),
3081
- arePayoutAccountDetailsInvalid && /* @__PURE__ */ jsx(
3082
- Alert,
3083
- {
3084
- className: "adyen-kyc-u-margin-top-16",
3085
- variant: "error",
3086
- title: invalidFieldNames ? t(($) => $["pleaseEnterValidField"], {
3087
- fieldNames: invalidFieldNames
3088
- }) : t(($) => $["pleaseEnterValidAccountDetails"])
3089
- }
3090
- )
3091
- ] });
3092
- }
3093
- const currenciesDataset = /* @__PURE__ */ JSON.parse('[{"currencyCode":"AED","description":"UAE Dirham","exponent":2,"symbol":""},{"currencyCode":"ALL","description":"Albanian Lek","exponent":2,"symbol":"L"},{"currencyCode":"AMD","description":"Armenian Dram","exponent":2,"symbol":""},{"currencyCode":"ANG","description":"Antillian Guilder","exponent":2,"symbol":"Naƒ"},{"currencyCode":"AOA","description":"Angolan kwanza","exponent":2,"symbol":""},{"currencyCode":"ARS","description":"Nuevo Argentine Peso","exponent":2,"symbol":"$"},{"currencyCode":"AUD","description":"Australian Dollar","exponent":2,"symbol":"A$"},{"currencyCode":"AWG","description":"Aruban Guilder","exponent":2,"symbol":""},{"currencyCode":"AZN","description":"Azerbaijani manat","exponent":2,"symbol":"man"},{"currencyCode":"BAM","description":"Bosnia and Herzegovina Convertible Marks","exponent":2,"symbol":""},{"currencyCode":"BBD","description":"Barbados Dollar","exponent":2,"symbol":""},{"currencyCode":"BDT","description":"Bangladesh Taka","exponent":2,"symbol":""},{"currencyCode":"BGL","description":"Bulgaria Lev","exponent":2,"symbol":""},{"currencyCode":"BGN","description":"New Bulgarian Lev","exponent":2,"symbol":""},{"currencyCode":"BHD","description":"Bahraini Dinar","exponent":3,"symbol":""},{"currencyCode":"BMD","description":"Bermudian Dollar","exponent":2,"symbol":""},{"currencyCode":"BND","description":"Brunei Dollar","exponent":2,"symbol":""},{"currencyCode":"BOB","description":"Bolivia Boliviano","exponent":2,"symbol":""},{"currencyCode":"BRL","description":"Brazilian Real","exponent":2,"symbol":"R$"},{"currencyCode":"BSD","description":"Bahamian Dollar","exponent":2,"symbol":""},{"currencyCode":"BTN","description":"Bhutan Ngultrum","exponent":2,"symbol":"Nu."},{"currencyCode":"BWP","description":"Botswana Pula","exponent":2,"symbol":""},{"currencyCode":"BYN","description":"Belarusian Ruble","exponent":2,"symbol":"Br"},{"currencyCode":"BYR","description":"Belarusian Ruble","exponent":0,"symbol":"Br"},{"currencyCode":"BZD","description":"Belize Dollar","exponent":2,"symbol":""},{"currencyCode":"CAD","description":"Canadian Dollar","exponent":2,"symbol":"$"},{"currencyCode":"CHF","description":"Swiss Franc","exponent":2,"symbol":""},{"currencyCode":"CLP","description":"Chilean Peso","exponent":2,"symbol":"$"},{"currencyCode":"CNY","description":"Yuan Renminbi","exponent":2,"symbol":"¥"},{"currencyCode":"COP","description":"Colombian Peso","exponent":2,"symbol":"₱"},{"currencyCode":"CRC","description":"Costa Rican Colon","exponent":2,"symbol":""},{"currencyCode":"CSD","description":"Serbian Dinar","exponent":2,"symbol":""},{"currencyCode":"CUP","description":"Cuban Peso","exponent":2,"symbol":""},{"currencyCode":"CVE","description":"Cape Verdi Escudo","exponent":0,"symbol":""},{"currencyCode":"CZK","description":"Czech Koruna","exponent":2,"symbol":""},{"currencyCode":"DJF","description":"Djibouti Franc","exponent":0,"symbol":""},{"currencyCode":"DKK","description":"Danish Krone","exponent":2,"symbol":"kr"},{"currencyCode":"DOP","description":"Dominican Republic Peso","exponent":2,"symbol":""},{"currencyCode":"DZD","description":"Algerian Dinar","exponent":2,"symbol":""},{"currencyCode":"EEK","description":"Estonian Krone","exponent":2,"symbol":""},{"currencyCode":"EGP","description":"Egyptian Pound","exponent":2,"symbol":"£"},{"currencyCode":"ETB","description":"Ethiopian Birr","exponent":2,"symbol":""},{"currencyCode":"EUR","description":"Euro","exponent":2,"symbol":"€"},{"currencyCode":"FJD","description":"Fiji Dollar","exponent":2,"symbol":"$"},{"currencyCode":"FKP","description":"Falkland Islands Pound","exponent":2,"symbol":""},{"currencyCode":"GBP","description":"Pound Sterling","exponent":2,"symbol":"£"},{"currencyCode":"GEL","description":"Georgian Lari","exponent":2,"symbol":""},{"currencyCode":"GHC","description":"Ghanaian Cedi (2nd)","exponent":0,"symbol":""},{"currencyCode":"GHS","description":"Ghanaian Cedi (3rd)","exponent":2,"symbol":"GH₵"},{"currencyCode":"GIP","description":"Gibraltar Pound","exponent":2,"symbol":""},{"currencyCode":"GMD","description":"Gambia Delasi","exponent":2,"symbol":""},{"currencyCode":"GNF","description":"Guinea Franc","exponent":0,"symbol":""},{"currencyCode":"GTQ","description":"Guatemala Quetzal","exponent":2,"symbol":""},{"currencyCode":"GYD","description":"Guyanese Dollar","exponent":2,"symbol":""},{"currencyCode":"HKD","description":"Hong Kong Dollar","exponent":2,"symbol":"$"},{"currencyCode":"HNL","description":"Honduras Lempira","exponent":2,"symbol":""},{"currencyCode":"HRK","description":"Croatia Kuna","exponent":2,"symbol":""},{"currencyCode":"HTG","description":"Haitian Gourde","exponent":2,"symbol":""},{"currencyCode":"HUF","description":"Hungarian Forint","exponent":2,"symbol":"Ft"},{"currencyCode":"IDR","description":"Indonesian Rupiah","exponent":0,"symbol":""},{"currencyCode":"ILS","description":"New Israeli Scheqel","exponent":2,"symbol":"₪"},{"currencyCode":"INR","description":"Indian Rupee","exponent":2,"symbol":"₨"},{"currencyCode":"IQD","description":"Iraqi Dinar","exponent":3,"symbol":""},{"currencyCode":"ISK","description":"Iceland Krona","exponent":2,"symbol":""},{"currencyCode":"JMD","description":"Jamaican Dollar","exponent":2,"symbol":""},{"currencyCode":"JOD","description":"Jordanian Dinar","exponent":3,"symbol":""},{"currencyCode":"JPY","description":"Japanese Yen","exponent":0,"symbol":"¥"},{"currencyCode":"KES","description":"Kenyan Shilling","exponent":2,"symbol":""},{"currencyCode":"KGS","description":"Kyrgyzstan Som","exponent":2,"symbol":""},{"currencyCode":"KHR","description":"Cambodia Riel","exponent":2,"symbol":""},{"currencyCode":"KMF","description":"Comoro Franc","exponent":0,"symbol":""},{"currencyCode":"KRW","description":"South-Korean Won","exponent":0,"symbol":"₩"},{"currencyCode":"KWD","description":"Kuwaiti Dinar","exponent":3,"symbol":""},{"currencyCode":"KYD","description":"Cayman Islands Dollar","exponent":2,"symbol":""},{"currencyCode":"KZT","description":"Kazakhstani Tenge","exponent":2,"symbol":"8"},{"currencyCode":"LAK","description":"Laos Kip","exponent":2,"symbol":""},{"currencyCode":"LBP","description":"Lebanese Pound","exponent":2,"symbol":"£"},{"currencyCode":"LKR","description":"Sri Lanka Rupee","exponent":2,"symbol":"₨"},{"currencyCode":"LTL","description":"Lithunianian Litas","exponent":2,"symbol":""},{"currencyCode":"LVL","description":"Latvian Lats","exponent":2,"symbol":""},{"currencyCode":"LYD","description":"Libyan Dinar","exponent":3,"symbol":""},{"currencyCode":"MAD","description":"Moroccan Dirham","exponent":2,"symbol":""},{"currencyCode":"MDL","description":"Moldovia Leu","exponent":2,"symbol":""},{"currencyCode":"MKD","description":"Macedonian Denar","exponent":2,"symbol":"ден"},{"currencyCode":"MMK","description":"Myanmar Kyat","exponent":2,"symbol":""},{"currencyCode":"MNT","description":"Mongolia Tugrik","exponent":2,"symbol":""},{"currencyCode":"MOP","description":"Macau Pataca","exponent":2,"symbol":""},{"currencyCode":"MRO","description":"Mauritania Ouguiya","exponent":1,"symbol":""},{"currencyCode":"MRU","description":"Mauritania Ouguiya","exponent":2,"symbol":""},{"currencyCode":"MUR","description":"Mauritius Rupee","exponent":2,"symbol":""},{"currencyCode":"MVR","description":"Maldives Rufiyaa","exponent":2,"symbol":""},{"currencyCode":"MWK","description":"Malawi Kwacha","exponent":2,"symbol":""},{"currencyCode":"MXN","description":"Mexican Peso","exponent":2,"symbol":"$"},{"currencyCode":"MXP","description":"Mexican Peso","exponent":2,"symbol":""},{"currencyCode":"MYR","description":"Malaysian Ringgit","exponent":2,"symbol":""},{"currencyCode":"MZN","description":"Mozambican Metical","exponent":2,"symbol":""},{"currencyCode":"NAD","description":"Namibian Dollar","exponent":2,"symbol":"$"},{"currencyCode":"NGN","description":"Nigerian naira","exponent":2,"symbol":"&"},{"currencyCode":"NIO","description":"Nicaragua Cordoba Oro","exponent":2,"symbol":""},{"currencyCode":"NOK","description":"Norwegian Krone","exponent":2,"symbol":""},{"currencyCode":"NPR","description":"Nepalese Rupee","exponent":2,"symbol":""},{"currencyCode":"NZD","description":"New Zealand Dollar","exponent":2,"symbol":"$"},{"currencyCode":"OMR","description":"Rial Omani","exponent":3,"symbol":"﷼"},{"currencyCode":"PAB","description":"Panamanian Balboa","exponent":2,"symbol":""},{"currencyCode":"PEN","description":"Peruvian Nuevo Sol","exponent":2,"symbol":"S/."},{"currencyCode":"PGK","description":"New Guinea Kina","exponent":2,"symbol":""},{"currencyCode":"PHP","description":"Philippine Peso","exponent":2,"symbol":"₱"},{"currencyCode":"PKR","description":"Pakistan Rupee","exponent":2,"symbol":"₨"},{"currencyCode":"PLN","description":"New Polish Zloty","exponent":2,"symbol":""},{"currencyCode":"PYG","description":"Paraguay Guarani","exponent":0,"symbol":""},{"currencyCode":"QAR","description":"Qatari Rial","exponent":2,"symbol":"﷼"},{"currencyCode":"ROL","description":"Romanian Lei","exponent":2,"symbol":""},{"currencyCode":"RON","description":"New Romanian Lei","exponent":2,"symbol":""},{"currencyCode":"RSD","description":"Serbian Dinar","exponent":2,"symbol":"РСД"},{"currencyCode":"RUB","description":"Russian Ruble","exponent":2,"symbol":"руб"},{"currencyCode":"RWF","description":"Rwanda Franc","exponent":0,"symbol":""},{"currencyCode":"SAR","description":"Saudi Riyal","exponent":2,"symbol":"﷼"},{"currencyCode":"SBD","description":"Solomon Island Dollar","exponent":2,"symbol":""},{"currencyCode":"SCR","description":"Seychelles Rupee","exponent":2,"symbol":""},{"currencyCode":"SEK","description":"Swedish Krone","exponent":2,"symbol":"kr"},{"currencyCode":"SGD","description":"Singapore Dollar","exponent":2,"symbol":"$"},{"currencyCode":"SHP","description":"St. Helena Pound","exponent":2,"symbol":""},{"currencyCode":"SKK","description":"Slovak Koruna","exponent":2,"symbol":""},{"currencyCode":"SLE","description":"Sierra Leone Leone","exponent":2,"symbol":"Le"},{"currencyCode":"SLL","description":"Sierra Leone Leone","exponent":2,"symbol":""},{"currencyCode":"SOS","description":"Somalia Shilling","exponent":2,"symbol":""},{"currencyCode":"SRD","description":"Surinamese dollar","exponent":2,"symbol":"Sr$"},{"currencyCode":"STD","description":"Sao Tome & Principe Dobra","exponent":2,"symbol":""},{"currencyCode":"STN","description":"Sao Tome & Principe Dobra","exponent":2,"symbol":""},{"currencyCode":"SVC","description":"El Salvador Colón","exponent":2,"symbol":"₡"},{"currencyCode":"SZL","description":"Swaziland Lilangeni","exponent":2,"symbol":""},{"currencyCode":"THB","description":"Thai Baht","exponent":2,"symbol":"฿"},{"currencyCode":"TND","description":"Tunisian Dinar","exponent":3,"symbol":""},{"currencyCode":"TOP","description":"Tonga Pa’anga","exponent":2,"symbol":""},{"currencyCode":"TRY","description":"New Turkish Lira","exponent":2,"symbol":"₤"},{"currencyCode":"TTD","description":"Trinidad & Tobago Dollar","exponent":2,"symbol":""},{"currencyCode":"TWD","description":"New Taiwan Dollar","exponent":2,"symbol":"元"},{"currencyCode":"TZS","description":"Tanzanian Shilling","exponent":2,"symbol":""},{"currencyCode":"UAH","description":"Ukraine Hryvnia","exponent":2,"symbol":""},{"currencyCode":"UGX","description":"Uganda Shilling","exponent":0,"symbol":""},{"currencyCode":"USD","description":"US Dollars","exponent":2,"symbol":"$"},{"currencyCode":"UYU","description":"Peso Uruguayo","exponent":2,"symbol":"₱"},{"currencyCode":"UZS","description":"Uzbekistani Som","exponent":2,"symbol":"som"},{"currencyCode":"VEF","description":"Venezuelan Bolívar","exponent":2,"symbol":"Bs.F."},{"currencyCode":"VND","description":"Vietnamese New Dong","exponent":0,"symbol":"₫"},{"currencyCode":"VUV","description":"Vanuatu Vatu","exponent":0,"symbol":""},{"currencyCode":"WST","description":"Samoan Tala","exponent":2,"symbol":""},{"currencyCode":"XAF","description":"CFA Franc BEAC","exponent":0,"symbol":""},{"currencyCode":"XCD","description":"East Carribean Dollar","exponent":2,"symbol":"EC$"},{"currencyCode":"XOF","description":"CFA Franc BCEAO","exponent":0,"symbol":""},{"currencyCode":"XPF","description":"CFP Franc","exponent":0,"symbol":""},{"currencyCode":"YER","description":"Yemeni Rial","exponent":2,"symbol":""},{"currencyCode":"ZAR","description":"South African Rand","exponent":2,"symbol":"R"},{"currencyCode":"ZMK","description":"Zambia Kwacha","exponent":2,"symbol":""},{"currencyCode":"ZMW","description":"Zambian Kwacha","exponent":2,"symbol":""}]');
3094
- const ALLOWED_PAYOUT_CURRENCIES = Object.keys(Currencies);
3095
- const PreferredCurrency = (props) => {
3096
- const { country, preferredCurrency, handleChangeFor } = props;
3097
- const { t } = useTranslation(["common", "banking"]);
3098
- const currencyDescriptionByCode = new Map(
3099
- currenciesDataset.map((currency) => [currency.currencyCode, currency.description])
3100
- );
3101
- const getPrioritizedCurrencies = () => {
3102
- const countryPreferredCurrencies = currencyByCountry[country] || [];
3103
- const allowedCountryCurrencies = countryPreferredCurrencies.filter(
3104
- (currency) => ALLOWED_PAYOUT_CURRENCIES.includes(currency)
3105
- );
3106
- const otherAllowedCurrencies = ALLOWED_PAYOUT_CURRENCIES.filter(
3107
- (currency) => !allowedCountryCurrencies.includes(currency)
3108
- );
3109
- if (allowedCountryCurrencies.length > 0 && otherAllowedCurrencies.length > 0) {
3110
- return [...allowedCountryCurrencies, null, ...otherAllowedCurrencies];
3111
- }
3112
- return [...allowedCountryCurrencies, ...otherAllowedCurrencies];
3113
- };
3114
- const prioritizedCurrencies = getPrioritizedCurrencies();
3115
- const currenciesAsOptions = prioritizedCurrencies.map((currency) => {
3116
- if (currency === null) {
3117
- return {
3118
- id: "separator",
3119
- name: " ",
3120
- disabled: true
3121
- };
3122
- }
3123
- const description2 = currencyDescriptionByCode.get(currency);
3124
- const label = description2 ? `${description2} (${currency})` : currency;
3125
- return {
3126
- id: currency,
3127
- name: label
3128
- };
3129
- });
3130
- const selectCurrency = (e) => {
3131
- if (e.id === "separator") {
3132
- return;
3133
- }
3134
- handleChangeFor("preferredCurrency")(e.id);
3135
- };
3136
- return /* @__PURE__ */ jsx(
3137
- Field,
3138
- {
3139
- name: "preferredCurrency",
3140
- label: t(($) => $["preferredPayoutCurrency"], { ns: "banking" }),
3141
- helper: t(($) => $["ifYouChooseAPayoutCurrencyThatDoesntMatchYourBankAccount"], {
3142
- ns: "banking"
3143
- }),
3144
- helperPosition: "below",
3145
- children: (childProps) => /* @__PURE__ */ jsx(
3146
- Select,
3147
- {
3148
- ...childProps,
3149
- onSelect: selectCurrency,
3150
- name: "preferredPayoutCurrency",
3151
- placeholder: t(($) => $["localFormat"], { ns: "banking" }),
3152
- selected: preferredCurrency,
3153
- items: currenciesAsOptions || []
3154
- }
3155
- )
3156
- }
3157
- );
3158
- };
3159
- const getMustHaveSameAccountHolderNameTransKey = (legalEntityType) => {
3160
- switch (legalEntityType) {
3161
- case "individual":
3162
- case "soleProprietorship":
3163
- return "theBankAccountHolderMustBeInYourName";
3164
- case "organization":
3165
- case "trust":
3166
- case "unincorporatedPartnership":
3167
- return "theBankAccountHolderMustHaveTheSameNameAsYourCompany";
3168
- default:
3169
- return "theBankAccountHolderMustHaveTheSameNameAsYourCompany";
3170
- }
3171
- };
3172
- const payoutModalContent = "adyen-kyc-payout-modal-content";
3173
- const title = "adyen-kyc-title";
3174
- const section = "adyen-kyc-section";
3175
- const sectionTitle = "adyen-kyc-section-title";
3176
- const sectionText = "adyen-kyc-section-text";
3177
- const simplerTermsBox = "adyen-kyc-simpler-terms-box";
3178
- const simplerTermsTitle = "adyen-kyc-simpler-terms-title";
3179
- const bulletList = "adyen-kyc-bullet-list";
3180
- const styles$1 = {
3181
- payoutModalContent,
3182
- title,
3183
- section,
3184
- sectionTitle,
3185
- sectionText,
3186
- simplerTermsBox,
3187
- simplerTermsTitle,
3188
- bulletList
3189
- };
3190
- function PayoutRequirementsModal({
3191
- isOpen,
3192
- onClose,
3193
- provider
3194
- }) {
3195
- const { t } = useTranslation("banking");
3196
- if (!isOpen) return null;
3197
- return /* @__PURE__ */ jsx(
3198
- Modal,
3199
- {
3200
- ariaLabel: t(($) => $["aboutPayoutBankAccounts"]),
3201
- onClose,
3202
- size: "medium",
3203
- showCloseButton: true,
3204
- inset: true,
3205
- children: /* @__PURE__ */ jsxs("div", { className: styles$1.payoutModalContent, children: [
3206
- /* @__PURE__ */ jsx(Typography, { variant: "title-m", el: "h1", className: styles$1.title, children: t(($) => $["aboutPayoutBankAccounts"]) }),
3207
- /* @__PURE__ */ jsxs("div", { className: styles$1.section, children: [
3208
- /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h3", className: styles$1.sectionTitle, children: t(($) => $["doesMyBankAccountNeedToBeInSameCountry"]) }),
3209
- /* @__PURE__ */ jsx(Typography, { variant: "body", className: styles$1.sectionText, children: t(($) => $["countryDependsExplanation"]) })
3210
- ] }),
3211
- /* @__PURE__ */ jsxs("div", { className: styles$1.section, children: [
3212
- /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h3", className: styles$1.sectionTitle, children: t(($) => $["whichPayoutCurrencyShouldIChoose"]) }),
3213
- /* @__PURE__ */ jsx(Typography, { variant: "body", className: styles$1.sectionText, children: t(($) => $["currencyRecommendation"]) }),
3214
- /* @__PURE__ */ jsxs("div", { className: styles$1.simplerTermsBox, children: [
3215
- /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h4", className: styles$1.simplerTermsTitle, children: t(($) => $["inSimplerTerms"]) }),
3216
- /* @__PURE__ */ jsx(Typography, { variant: "body", children: t(($) => $["currencySimplerTerms"]) })
3217
- ] })
3218
- ] }),
3219
- provider && /* @__PURE__ */ jsxs("div", { className: styles$1.section, children: [
3220
- /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h3", className: styles$1.sectionTitle, children: t(($) => $["howDoesVerificationWithOurPartnerWork"], {
3221
- provider: provider?.name
3222
- }) }),
3223
- /* @__PURE__ */ jsx(Typography, { className: styles$1.sectionText, children: t(($) => $["isOurTrustedPartnerHelpingSpeedUpSetup"], {
3224
- provider: provider?.name
3225
- }) }),
3226
- /* @__PURE__ */ jsxs("ul", { className: styles$1.bulletList, children: [
3227
- /* @__PURE__ */ jsx("li", { children: t(($) => $["selectTheBankToReceivePayouts"]) }),
3228
- /* @__PURE__ */ jsx("li", { children: t(($) => $["loginIntoYourBankingEnvironment"]) }),
3229
- /* @__PURE__ */ jsx("li", { children: t(($) => $["yourBankWillConfirmYourAccountDetails"]) })
3230
- ] }),
3231
- /* @__PURE__ */ jsx(Typography, { children: t(($) => $["adyenWillOnlyGetTemporaryAccess"]) })
3232
- ] })
3233
- ] })
3234
- }
3235
- );
3236
- }
3237
- const payoutCountryDetailsFields = [
3238
- "bankCountry",
3239
- "preferredCurrency"
3240
- ];
3241
- const DEFAULT_CURRENCY_FALLBACK = "USD";
3242
- const getDefaultCurrencyForCountry = (country) => currencyByCountry[country]?.[0] ?? DEFAULT_CURRENCY_FALLBACK;
3243
- const getCountryCodeFromEvent = (event) => event?.target?.value;
3244
- function PayoutCountryDetails(props) {
3245
- const { legalEntityResponse, data: propData, provider } = props;
3246
- const { t: commonT } = useTranslation("common");
3247
- const { t } = useTranslation("banking");
3248
- const { isSettingEnabled } = useSettingsContext();
3249
- const country = getLegalEntityCountry(legalEntityResponse);
3250
- const [isModalOpen, setIsModalOpen] = useState(false);
3251
- const legalEntityType = legalEntityResponse.type;
3252
- const defaultCurrency = getDefaultCurrencyForCountry(country);
3253
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
3254
- ...props,
3255
- schema: payoutCountryDetailsFields,
3256
- defaultData: {
3257
- bankCountry: propData?.bankCountry ?? country,
3258
- preferredCurrency: propData?.preferredCurrency ?? defaultCurrency
3259
- },
3260
- shouldValidate: true
3261
- });
3262
- const formUtils = createFormUtils(props, commonT);
3263
- const allowedBankCountries = Object.keys(currencyByCountry);
3264
- const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
3265
- const accountHolder = getPayoutAccountHolderName(legalEntityResponse, t);
3266
- const description2 = canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
3267
- t(($) => $["forYouToReceiveYourPayouts"]),
3268
- " ",
3269
- /* @__PURE__ */ jsx(
3270
- Trans,
3271
- {
3272
- t,
3273
- ns: "banking",
3274
- i18nKey: ($) => $[getMustHaveSameAccountHolderNameTransKey(legalEntityType)],
3275
- values: { name: accountHolder, companyName: accountHolder }
3276
- }
3277
- )
3278
- ] });
3279
- const descriptionExtra = /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-margin-bottom-12", children: /* @__PURE__ */ jsx(
3280
- Trans,
3281
- {
3282
- t,
3283
- ns: "banking",
3284
- i18nKey: ($) => $["payoutAccountsMustMeetSomeRequirements"],
3285
- components: {
3286
- requirementsLink: /* @__PURE__ */ jsx(
3287
- "button",
3288
- {
3289
- type: "button",
3290
- onClick: () => setIsModalOpen(true),
3291
- style: {
3292
- background: "none",
3293
- border: "none",
3294
- color: "inherit",
3295
- textDecoration: "underline",
3296
- cursor: "pointer",
3297
- padding: 0,
3298
- font: "inherit"
3299
- }
3300
- }
3301
- )
3302
- }
3303
- }
3304
- ) });
3305
- const { updateStateSlice } = useGlobalDataSlice(
3306
- "payoutCountryDetails"
3307
- );
3308
- useEffect(() => {
3309
- updateStateSlice({ data, valid, errors, fieldProblems });
3310
- }, [data, valid, errors, updateStateSlice, fieldProblems]);
3311
- const updateCountryField = (event) => {
3312
- const updatedCountry = getCountryCodeFromEvent(event);
3313
- handleChangeFor("bankCountry", "input")(updatedCountry);
3314
- handleChangeFor("preferredCurrency", "input")(getDefaultCurrencyForCountry(updatedCountry));
3315
- };
3316
- return /* @__PURE__ */ jsxs(Fragment, { children: [
3317
- /* @__PURE__ */ jsxs("form", { style: { minHeight: "480px" }, children: [
3318
- /* @__PURE__ */ jsx(Header, { title: t(($) => $["payoutBankAccount"]), children: /* @__PURE__ */ jsxs("div", { slot: "description", className: "adyen-kyc-form-header__description", children: [
3319
- description2,
3320
- descriptionExtra
3321
- ] }) }),
3322
- /* @__PURE__ */ jsx(
3323
- CountryField,
3324
- {
3325
- data: { country: data.bankCountry },
3326
- valid: { country: valid?.bankCountry },
3327
- errors: { country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems) },
3328
- labels: { country: t(($) => $["bankAccountCountryRegion"]) },
3329
- readonly: false,
3330
- allowedCountries: allowedBankCountries,
3331
- handleChangeFor: () => updateCountryField
3332
- }
3333
- ),
3334
- /* @__PURE__ */ jsx(
3335
- PreferredCurrency,
3336
- {
3337
- country: data.bankCountry,
3338
- preferredCurrency: data.preferredCurrency ?? defaultCurrency,
3339
- handleChangeFor
3340
- }
3341
- )
3342
- ] }),
3343
- /* @__PURE__ */ jsx(
3344
- PayoutRequirementsModal,
3345
- {
3346
- isOpen: isModalOpen,
3347
- onClose: () => setIsModalOpen(false),
3348
- provider
3349
- }
3350
- )
3351
- ] });
3352
- }
3353
- const regions = {
3354
- europe: [
3355
- ...EEA_Countries,
3356
- CountryCodes.Switzerland,
3357
- CountryCodes.UnitedKingdom,
3358
- CountryCodes.Gibraltar
3359
- ],
3360
- apac: [CountryCodes.NewZealand, CountryCodes.Australia]
3361
- };
3362
- const getAllowedBankCountries = (country) => Object.values(regions).find((countriesInARegion) => countriesInARegion.includes(country)) ?? [
3363
- country
3364
- ];
3365
- const tinkLogo = lazy(() => import("./tink-logo-BcIv93ND.js"));
3366
- const plaidLogo = lazy(() => import("./plaid-logo-CtActXTN.js"));
3367
- const yapilyLogo = lazy(() => import("./yapily-logo-CZ4ywjwA.js"));
3368
- const instantVerificationImage = lazy(
3369
- () => import("./instant-verification-Dvvkyfmp.js")
3370
- );
3371
- const manualVerificationImage = lazy(
3372
- () => import("./manual-verification-BvZWqA00.js")
3373
- );
3374
- const instantVerificationImageNew = lazy(
3375
- () => import("./payout-verification-instant-5u-wvFKv.js")
3376
- );
3377
- const manualVerificationImageNew = lazy(
3378
- () => import("./payout-verification-manual-BH2mu0UW.js")
3379
- );
3380
- const getProviderIconName = (providerName) => {
3381
- switch (providerName?.toLowerCase()) {
3382
- case "tink":
3383
- return tinkLogo;
3384
- case "plaid":
3385
- return plaidLogo;
3386
- case "yapily":
3387
- return yapilyLogo;
3388
- default:
3389
- return void 0;
3390
- }
3391
- };
3392
- const makePayoutVerificationMethodsMetadata = (instantVerificationProviderName, makePayoutVerificationMethodsMetadata2) => ({
3393
- instantVerification: {
3394
- name: "verifyViaMobileBankingAppOrWebsite",
3395
- subtitle: "instant",
3396
- svgImport: makePayoutVerificationMethodsMetadata2 ? instantVerificationImageNew : instantVerificationImage,
3397
- description: "instantVerificationDescription",
3398
- provider: instantVerificationProviderName ? {
3399
- name: instantVerificationProviderName,
3400
- svgImport: getProviderIconName(instantVerificationProviderName)
3401
- } : void 0
3402
- },
3403
- manualVerification: {
3404
- name: "uploadABankStatement",
3405
- subtitle: "mayTakeAFewDays",
3406
- description: "manualVerificationDescription",
3407
- svgImport: makePayoutVerificationMethodsMetadata2 ? manualVerificationImageNew : manualVerificationImage
3408
- }
3409
- });
3410
- const payoutVerificationMethods = ["instantVerification", "manualVerification"];
3411
- const fieldVerificationMethods = "adyen-kyc-field-verification-methods";
3412
- const fieldVerificationMethodsCard = "adyen-kyc-field-verification-methods-card";
3413
- const fieldVerificationMethodsFooter = "adyen-kyc-field-verification-methods-footer";
3414
- const fieldVerificationMethodsLogo = "adyen-kyc-field-verification-methods-logo";
3415
- const radioGroupCardIllustration = "adyen-kyc-radio-group-card-illustration";
3416
- const instantVerificationError = "adyen-kyc-instant-verification-error";
3417
- const payoutVerificationMethodCard = "adyen-kyc-payout-verification-method-card";
3418
- const payoutVerificationMethodCardDisabled = "adyen-kyc-payout-verification-method-card-disabled";
3419
- const payoutVerificationMethodCardImage = "adyen-kyc-payout-verification-method-card-image";
3420
- const payoutVerificationMethodCardContent = "adyen-kyc-payout-verification-method-card-content";
3421
- const payoutVerificationMethodCardTitle = "adyen-kyc-payout-verification-method-card-title";
3422
- const payoutVerificationMethodCardSubtitle = "adyen-kyc-payout-verification-method-card-subtitle";
3423
- const payoutVerificationMethodCardBody = "adyen-kyc-payout-verification-method-card-body";
3424
- const payoutVerificationMethodCardImageContainer = "adyen-kyc-payout-verification-method-card-image-container";
3425
- const styles = {
3426
- fieldVerificationMethods,
3427
- fieldVerificationMethodsCard,
3428
- fieldVerificationMethodsFooter,
3429
- fieldVerificationMethodsLogo,
3430
- radioGroupCardIllustration,
3431
- instantVerificationError,
3432
- payoutVerificationMethodCard,
3433
- payoutVerificationMethodCardDisabled,
3434
- payoutVerificationMethodCardImage,
3435
- payoutVerificationMethodCardContent,
3436
- payoutVerificationMethodCardTitle,
3437
- payoutVerificationMethodCardSubtitle,
3438
- payoutVerificationMethodCardBody,
3439
- payoutVerificationMethodCardImageContainer
3440
- };
3441
- const PayoutVerificationMethodOptionIcon = ({
3442
- method,
3443
- methodsMetadata
3444
- }) => {
3445
- const { svgImport } = methodsMetadata[method];
3446
- return /* @__PURE__ */ jsx(Image, { className: styles.payoutVerificationMethodCardImage, lazyLoadedImage: svgImport });
3447
- };
3448
- const PayoutVerificationMethodOptionCard = ({
3449
- payoutMethod,
3450
- title: title2,
3451
- subtitle,
3452
- tag,
3453
- selectVerificationMethod,
3454
- payoutVerificationMethod,
3455
- methodsMetadata,
3456
- bankInfoValidated,
3457
- instantVerificationAvailable
3458
- }) => {
3459
- const isInstantVerificationCard = payoutMethod === "instantVerification";
3460
- const isCardDisabled = bankInfoValidated || isInstantVerificationCard && !instantVerificationAvailable;
3461
- return /* @__PURE__ */ jsxs(
3462
- Card,
3463
- {
3464
- className: cx(styles.payoutVerificationMethodCard, {
3465
- "adyen-kyc-u-margin-bottom-8": isInstantVerificationCard,
3466
- [styles.payoutVerificationMethodCardDisabled]: isCardDisabled
3467
- }),
3468
- bodyClassName: styles.payoutVerificationMethodCardBody,
3469
- onClick: () => selectVerificationMethod(payoutMethod),
3470
- stateful: true,
3471
- active: payoutMethod === payoutVerificationMethod,
3472
- disabled: isCardDisabled,
3473
- children: [
3474
- /* @__PURE__ */ jsx("div", { className: styles.payoutVerificationMethodCardImageContainer, children: /* @__PURE__ */ jsx(
3475
- PayoutVerificationMethodOptionIcon,
3476
- {
3477
- method: payoutMethod,
3478
- methodsMetadata
3479
- }
3480
- ) }),
3481
- /* @__PURE__ */ jsxs("div", { className: styles.payoutVerificationMethodCardContent, children: [
3482
- tag,
3483
- /* @__PURE__ */ jsx(
3484
- Typography,
3485
- {
3486
- el: "h4",
3487
- variant: "body-strongest",
3488
- className: styles.payoutVerificationMethodCardTitle,
3489
- children: title2
3490
- }
3491
- ),
3492
- /* @__PURE__ */ jsx(
3493
- Typography,
3494
- {
3495
- el: "p",
3496
- variant: "body",
3497
- color: "secondary",
3498
- className: styles.payoutVerificationMethodCardSubtitle,
3499
- children: subtitle
3500
- }
3501
- )
3502
- ] })
3503
- ]
3504
- },
3505
- payoutMethod
3506
- );
3507
- };
3508
- const payoutVerificationMethodFields = ["payoutVerificationMethod", "bankCountry", ...accountVerificationFields];
3509
- function PayoutVerificationMethod(props) {
3510
- const {
3511
- heading,
3512
- country,
3513
- accountHolder,
3514
- provider,
3515
- bankVendorsLoadingStatus,
3516
- instantVerificationAvailable,
3517
- legalEntityResponse,
3518
- validators,
3519
- bankInfoValidated,
3520
- data: payoutVerificationMethodData,
3521
- fieldValidationErrors,
3522
- formVerificationErrors
3523
- } = props;
3524
- const { type: legalEntityType } = legalEntityResponse;
3525
- const { t } = useTranslation("banking");
3526
- const { t: commonT } = useTranslation("common");
3527
- const instantVerificationError2 = useContext(InstantVerificationErrorContext);
3528
- const { isSettingEnabled } = useSettingsContext();
3529
- const { isExperimentEnabled } = useExperimentsContext();
3530
- const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
3531
- const isPayoutVerificationMethodPageRedesignEnabled = isExperimentEnabled(
3532
- ExperimentNames.EnablePayoutVerificationMethodPageRedesign
3533
- );
3534
- const intraRegionCrossBorderPayoutsAllowed = isSettingEnabled(
3535
- SettingNames.AllowIntraRegionCrossBorderPayout
3536
- );
3537
- const enabledUnbiasedVerificationMethod = isExperimentEnabled(
3538
- "BankVerificationMethodAutonomy_UnbiasedSelection"
3539
- );
3540
- const [hasSelectedMethod, setHasSelectedMethod] = useState(false);
3541
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
3542
- ...props,
3543
- schema: payoutVerificationMethodFields,
3544
- defaultData: {
3545
- verifiedAccountHolder: accountHolder,
3546
- verifiedCurrencyCode: currencyByCountry[country]?.[0],
3547
- bankCountry: country,
3548
- ...payoutVerificationMethodData
3549
- },
3550
- rules: validators || {
3551
- payoutVerificationMethod: {
3552
- modes: ["blur"],
3553
- validate: (payoutVerificationMethod) => !enabledUnbiasedVerificationMethod || !!payoutVerificationMethod
3554
- }
3555
- },
3556
- fieldProblems: fieldValidationErrors
3557
- });
3558
- const formUtils = createFormUtils(props, commonT);
3559
- const { sliceData, updateStateSlice } = useGlobalDataSlice("payoutVerificationMethod");
3560
- const { clearStateSlice: clearPayoutAccountDetails } = useGlobalDataSlice("payoutAccountDetails");
3561
- useEffect(
3562
- () => updateStateSlice({ data: { ...sliceData, ...data }, errors, valid, fieldProblems }),
3563
- [data, errors, fieldProblems, valid]
3564
- );
3565
- const methodsMetadata = makePayoutVerificationMethodsMetadata(
3566
- provider?.name,
3567
- isPayoutVerificationMethodPageRedesignEnabled
3568
- );
3569
- const PayoutVerificationMethodOptionFooter = ({
3570
- method,
3571
- methodsMetadata: methodsMetadata2
3572
- }) => {
3573
- const { t: t2 } = useTranslation("common");
3574
- const { provider: provider2 } = methodsMetadata2[method];
3575
- return provider2 ? /* @__PURE__ */ jsxs(Typography, { el: "div", variant: "caption", className: styles.fieldVerificationMethodsFooter, children: [
3576
- t2(($) => $["poweredBy"]),
3577
- provider2.svgImport ? /* @__PURE__ */ jsx(
3578
- Image,
3579
- {
3580
- className: styles.fieldVerificationMethodsLogo,
3581
- lazyLoadedImage: provider2.svgImport
3582
- }
3583
- ) : ` ${provider2.name}`
3584
- ] }) : null;
3585
- };
3586
- const selectVerificationMethod = (method) => {
3587
- setHasSelectedMethod(true);
3588
- handleChangeFor("payoutVerificationMethod")(method);
3589
- };
3590
- useEffect(() => {
3591
- if (bankInfoValidated || enabledUnbiasedVerificationMethod) return;
3592
- if (!hasSelectedMethod && instantVerificationAvailable && data.payoutVerificationMethod !== "instantVerification") {
3593
- handleChangeFor("payoutVerificationMethod")("instantVerification");
3594
- }
3595
- if (!instantVerificationAvailable && data.payoutVerificationMethod !== "manualVerification") {
3596
- handleChangeFor("payoutVerificationMethod")("manualVerification");
3597
- }
3598
- }, [
3599
- data.payoutVerificationMethod,
3600
- handleChangeFor,
3601
- instantVerificationAvailable,
3602
- hasSelectedMethod,
3603
- bankInfoValidated
3604
- ]);
3605
- const { dataset: countries } = useDataset(datasetIdentifier.country);
3606
- const bankCountryName = countries.find((country2) => country2.id === data.bankCountry)?.name ?? data.bankCountry;
3607
- const allowedBankCountries = getAllowedBankCountries(country);
3608
- const countryField = /* @__PURE__ */ jsx(
3609
- CountryField,
3610
- {
3611
- data: { country: data.bankCountry },
3612
- valid: { country: valid?.bankCountry },
3613
- errors: { country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems) },
3614
- labels: { country: t(($) => $["bankAccountCountryRegion"]) },
3615
- readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1 || bankInfoValidated,
3616
- allowedCountries: allowedBankCountries,
3617
- handleChangeFor: () => (e) => {
3618
- clearPayoutAccountDetails();
3619
- return handleChangeFor("bankCountry", "input")(e);
3620
- },
3621
- helperText: {
3622
- country: intraRegionCrossBorderPayoutsAllowed ? void 0 : t(
3623
- ($) => $[legalEntityType === LegalEntityTypes.INDIVIDUAL ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered"]
3624
- )
3625
- }
3626
- }
3627
- );
3628
- const description2 = canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
3629
- t(($) => $["forYouToReceiveYourPayouts"]),
3630
- " ",
3631
- /* @__PURE__ */ jsx(
3632
- Trans,
3633
- {
3634
- t,
3635
- ns: "banking",
3636
- i18nKey: ($) => $[getMustHaveSameAccountHolderNameTransKey(legalEntityType)],
3637
- values: { name: accountHolder, companyName: accountHolder }
3638
- }
3639
- )
3640
- ] });
3641
- return /* @__PURE__ */ jsxs("form", { className: styles.payoutVerificationMethod, children: [
3642
- heading && /* @__PURE__ */ jsx(Header, { title: heading, children: /* @__PURE__ */ jsx("template", { slot: "description", children: description2 }) }),
3643
- instantVerificationError2 && /* @__PURE__ */ jsx(
3644
- Alert,
3645
- {
3646
- variant: "error",
3647
- className: styles.instantVerificationError,
3648
- title: instantVerificationError2.title,
3649
- children: instantVerificationError2.content && /* @__PURE__ */ jsx("p", { className: "adyen-kyc-u-margin-0", children: instantVerificationError2.content })
3650
- }
3651
- ),
3652
- !isExperimentEnabled(ExperimentNames.EnableCrossBorderPayouts) && countryField,
3653
- /* @__PURE__ */ jsx(
3654
- Field,
3655
- {
3656
- el: "fieldset",
3657
- name: "verificationMethods",
3658
- label: formUtils.getLabel("payoutVerificationMethod", "verificationMethod"),
3659
- errorMessage: formUtils.getErrorMessage("payoutVerificationMethod", errors, fieldProblems),
3660
- helper: instantVerificationAvailable ? void 0 : t(($) => $["weDoNotYetSupportInstantVerificationForBankAccountsIn"], {
3661
- countryName: bankCountryName
3662
- }),
3663
- children: (childProps) => isPayoutVerificationMethodPageRedesignEnabled ? /* @__PURE__ */ jsxs(Fragment, { children: [
3664
- /* @__PURE__ */ jsx(
3665
- PayoutVerificationMethodOptionCard,
3666
- {
3667
- payoutMethod: "instantVerification",
3668
- title: t(($) => $["logInWithYourBank"]),
3669
- subtitle: t(($) => $["theFastestWayToVerifyYourAccount"]),
3670
- tag: /* @__PURE__ */ jsx(Tag, { variant: "blue", className: "adyen-kyc-u-margin-bottom-8", children: t(($) => $["recommended"]) }),
3671
- selectVerificationMethod,
3672
- methodsMetadata,
3673
- payoutVerificationMethod: data.payoutVerificationMethod,
3674
- instantVerificationAvailable,
3675
- bankInfoValidated
3676
- }
3677
- ),
3678
- /* @__PURE__ */ jsx(
3679
- PayoutVerificationMethodOptionCard,
3680
- {
3681
- payoutMethod: "manualVerification",
3682
- title: t(($) => $["verifyManually"]),
3683
- subtitle: t(($) => $["enterYourAccountsDetailsOnYourOwn"]),
3684
- selectVerificationMethod,
3685
- methodsMetadata,
3686
- payoutVerificationMethod: data.payoutVerificationMethod
3687
- }
3688
- )
3689
- ] }) : /* @__PURE__ */ jsx(
3690
- RadioGroupCard,
3691
- {
3692
- ...childProps,
3693
- name: "verificationMethod",
3694
- options: payoutVerificationMethods,
3695
- onSelect: selectVerificationMethod,
3696
- selected: data.payoutVerificationMethod,
3697
- optionId: (method) => method,
3698
- optionName: (method) => t(($) => $[methodsMetadata[method].name]),
3699
- optionDescription: (method) => t(($) => $[methodsMetadata[method].description]),
3700
- optionSubtitle: (method) => t(($) => $[methodsMetadata[method].subtitle]),
3701
- className: styles.fieldVerificationMethods,
3702
- optionClassNames: () => ({
3703
- label: styles.fieldVerificationMethodsCard
3704
- }),
3705
- isOptionDisabled: (option) => bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
3706
- renderOptionIcon: (method) => /* @__PURE__ */ jsx("div", { className: styles.radioGroupCardIllustration, children: /* @__PURE__ */ jsx(
3707
- PayoutVerificationMethodOptionIcon,
3708
- {
3709
- method,
3710
- methodsMetadata
3711
- }
3712
- ) }),
3713
- renderOptionFooter: (method) => /* @__PURE__ */ jsx(
3714
- PayoutVerificationMethodOptionFooter,
3715
- {
3716
- method,
3717
- methodsMetadata
3718
- }
3719
- ),
3720
- floatingRadio: true
3721
- }
3722
- )
3723
- }
3724
- ),
3725
- /* @__PURE__ */ jsx(
3726
- ErrorPanel,
3727
- {
3728
- verificationErrors: formVerificationErrors,
3729
- validationErrors: fieldValidationErrors,
3730
- formUtils,
3731
- id: "ariaErrorField"
3732
- }
3733
- ),
3734
- provider && bankVendorsLoadingStatus === "success" ? /* @__PURE__ */ jsx(
3735
- ContextGuidance,
3736
- {
3737
- titleId: "howDoesVerificationWithOurPartnerWorks",
3738
- contentId: "bankVerificationWithPartnerSteps",
3739
- title: t(($) => $["howDoesVerificationWithOurPartnerWork"], {
3740
- provider: provider.name
3741
- }),
3742
- content: /* @__PURE__ */ jsxs(Fragment, { children: [
3743
- /* @__PURE__ */ jsx(Typography, { children: t(($) => $["isOurTrustedPartnerHelpingSpeedUpSetup"], {
3744
- provider: provider.name
3745
- }) }),
3746
- /* @__PURE__ */ jsxs("ul", { children: [
3747
- /* @__PURE__ */ jsx("li", { children: t(($) => $["selectTheBankToReceivePayouts"]) }),
3748
- /* @__PURE__ */ jsx("li", { children: t(($) => $["loginIntoYourBankingEnvironment"]) }),
3749
- /* @__PURE__ */ jsx("li", { children: t(($) => $["yourBankWillConfirmYourAccountDetails"]) })
3750
- ] }),
3751
- /* @__PURE__ */ jsx(Typography, { children: t(($) => $["adyenWillOnlyGetTemporaryAccess"]) }),
3752
- /* @__PURE__ */ jsx(Typography, { variant: "caption", children: /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/policies-and-disclaimer/privacy-policy", external: true, children: commonT(($) => $["adyenPrivacyPolicy"]) }) })
3753
- ] })
3754
- }
3755
- ) : void 0
3756
- ] });
3757
- }
3758
- const payoutSteps = {
3759
- payoutCountryDetails: {
3760
- formId: "payoutCountryDetails",
3761
- formName: "payoutCountryDetails",
3762
- fields: payoutCountryDetailsFields
3763
- },
3764
- payoutVerificationMethod: {
3765
- formId: "payoutVerificationMethod",
3766
- formName: "verificationMethod",
3767
- fields: payoutVerificationMethodFields
3768
- },
3769
- payoutAccountDetails: {
3770
- formId: "payoutAccountDetails",
3771
- formName: "bankAccount",
3772
- fields: payoutAccountFields
3773
- },
3774
- payoutAccountDocuments: {
3775
- formId: "payoutAccountDocuments",
3776
- formName: "bankDocument",
3777
- formHeader: "bankDocumentHeader",
3778
- fields: bankDocumentFields
3779
- },
3780
- payoutAccountVerification: {
3781
- formId: "payoutAccountVerification",
3782
- formName: "instantVerification",
3783
- fields: accountVerificationFields
3784
- }
3785
- };
3786
- const PayoutCountryDetailsFormID = payoutSteps.payoutCountryDetails.formId;
3787
- const PayoutVerificationMethodFormID = payoutSteps.payoutVerificationMethod.formId;
3788
- const PayoutAccountDocumentsFormID = payoutSteps.payoutAccountDocuments.formId;
3789
- const PayoutAccountVerificationFormID = payoutSteps.payoutAccountVerification.formId;
3790
- function PayoutDetails(props) {
3791
- const { t } = useTranslation("banking");
3792
- const { t: commonT } = useTranslation("common");
3793
- const {
3794
- activeForm,
3795
- legalEntityResponse,
3796
- associatedLegalArrangement,
3797
- provider,
3798
- bankVendorsLoadingStatus,
3799
- instantVerificationAvailable,
3800
- setHideSidebar,
3801
- setSkipSubmit,
3802
- createTrustedTransferInstrument: createTrustedTransferInstrument2,
3803
- accountDetailsFromInput,
3804
- country,
3805
- accountHolder,
3806
- data: propData,
3807
- onBack,
3808
- trustedTransferInstrumentId
3809
- } = props;
3810
- const [instantVerificationError2, setInstantVerificationError] = useInstantVerificationErrorNotification(1e4);
3811
- const payoutCountryDetailsFormProps = getFormProps(props, PayoutCountryDetailsFormID);
3812
- const verificationMethodFormProps = getFormProps(props, PayoutVerificationMethodFormID);
3813
- const accountVerificationFormProps = getFormProps(props, PayoutAccountVerificationFormID);
3814
- const payoutAccountFormProps = getFormProps(props, payoutSteps.payoutAccountDetails.formId);
3815
- const bankDocumentFormProps = getFormProps(props, PayoutAccountDocumentsFormID);
3816
- const { isExperimentEnabled } = useExperimentsContext();
3817
- const isCrossBorderPayoutsEnabled = isExperimentEnabled("EnableCrossBorderPayouts");
3818
- const isBankStatementDocumentOptional = createFormUtils(
3819
- bankDocumentFormProps ?? {},
3820
- commonT
3821
- ).isOptionalField("bankStatementDocument");
3822
- const globalData = useGlobalData();
3823
- const data = isEmpty(globalData) || propData?.payoutAccountDetails?.transferInstrumentId ? propData : globalData;
3824
- const resetData = useResetGlobalData();
3825
- const verifyInstantly = data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification";
3826
- const bankCountry = (isExperimentEnabled(ExperimentNames.EnableCrossBorderPayouts) ? data?.payoutCountryDetails?.bankCountry : data?.payoutVerificationMethod?.bankCountry) ?? country;
3827
- useEffect(() => resetData(), [resetData]);
3828
- useEffect(() => {
3829
- if (activeForm?.formId === summaryStep.formId && verifyInstantly && trustedTransferInstrumentId) {
3830
- setSkipSubmit?.(true);
3831
- }
3832
- }, [activeForm, trustedTransferInstrumentId]);
3833
- const [bankInfoValidated, setBankInfoValidated] = useState(false);
3834
- const [arePayoutAccountDetailsInvalid, setArePayoutAccountDetailsInvalid] = useState(false);
3835
- const [invalidFieldNames, setInvalidFieldNames] = useState("");
3836
- const payload = useMemo(
3837
- () => bankCountry && accountDetailsFromInput ? getAccountIdentificationFromPayoutAccountSchema(
3838
- accountDetailsFromInput,
3839
- bankCountry,
3840
- isCrossBorderPayoutsEnabled
3841
- ) : {},
3842
- [accountDetailsFromInput, bankCountry]
3843
- );
3844
- const validateAccountDetails = useAsyncAccountDetailsValidationRules(
3845
- payload,
3846
- hasEmptyFields(payload),
3847
- isAccountIdentifierObscured(payload)
3848
- );
3849
- const resetInvalidFieldState = () => {
3850
- setInvalidFieldNames("");
3851
- setArePayoutAccountDetailsInvalid(false);
3852
- };
3853
- useEffect(() => {
3854
- if (validateAccountDetails?.invalidFields && validateAccountDetails.invalidFields.length > 0) {
3855
- const fieldNames = validateAccountDetails.invalidFields.map((field) => extractFieldName(field.name)).map((key) => commonT(($) => $[key]));
3856
- const invalidFieldsString = concatenateFieldNames(fieldNames);
3857
- setInvalidFieldNames(invalidFieldsString);
3858
- setArePayoutAccountDetailsInvalid(true);
3859
- } else {
3860
- resetInvalidFieldState();
3861
- }
3862
- }, [t, validateAccountDetails]);
3863
- return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-payout", children: [
3864
- /* @__PURE__ */ jsx(
3865
- "div",
3866
- {
3867
- className: activeForm?.formId !== "payoutCountryDetails" ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
3868
- children: /* @__PURE__ */ jsx(
3869
- PayoutCountryDetails,
3870
- {
3871
- ...payoutCountryDetailsFormProps,
3872
- legalEntityResponse,
3873
- provider
3874
- }
3875
- )
3876
- }
3877
- ),
3878
- /* @__PURE__ */ jsx(
3879
- "div",
3880
- {
3881
- className: activeForm?.formId !== PayoutVerificationMethodFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
3882
- children: /* @__PURE__ */ jsx(InstantVerificationErrorContext.Provider, { value: instantVerificationError2, children: /* @__PURE__ */ jsx(
3883
- PayoutVerificationMethod,
3884
- {
3885
- ...verificationMethodFormProps,
3886
- id: PayoutVerificationMethodFormID,
3887
- heading: t(($) => $["addABankAccountForPayouts"]),
3888
- country,
3889
- accountHolder,
3890
- legalEntityResponse,
3891
- provider,
3892
- bankVendorsLoadingStatus,
3893
- bankInfoValidated,
3894
- instantVerificationAvailable
3895
- }
3896
- ) })
3897
- }
3898
- ),
3899
- verifyInstantly ? /* @__PURE__ */ jsx(
3900
- "div",
3901
- {
3902
- className: activeForm?.formId !== PayoutAccountVerificationFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
3903
- children: /* @__PURE__ */ jsx(
3904
- BankVerification,
3905
- {
3906
- ...accountVerificationFormProps,
3907
- heading: t(($) => $["bankAccountVerification"]),
3908
- id: PayoutAccountVerificationFormID,
3909
- provider,
3910
- country: bankCountry,
3911
- onBack,
3912
- hideSidebar: setHideSidebar,
3913
- setBankVerificationError: setInstantVerificationError,
3914
- bankInfoValidated,
3915
- setBankInfoValidated,
3916
- formIsActive: activeForm?.formId === PayoutAccountVerificationFormID,
3917
- createTrustedTransferInstrument: createTrustedTransferInstrument2
3918
- }
3919
- )
3920
- }
3921
- ) : /* @__PURE__ */ jsxs(Fragment, { children: [
3922
- /* @__PURE__ */ jsx(
3923
- "div",
3924
- {
3925
- className: activeForm?.formId !== payoutSteps.payoutAccountDetails.formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
3926
- children: /* @__PURE__ */ jsx(
3927
- PayoutAccount,
3928
- {
3929
- ...payoutAccountFormProps,
3930
- heading: t(($) => $["addABankAccountForPayouts"]),
3931
- id: payoutSteps.payoutAccountDetails.formId,
3932
- country: bankCountry,
3933
- legalEntityResponse,
3934
- arePayoutAccountDetailsInvalid,
3935
- invalidFieldNames,
3936
- preferredCurrencyCode: globalData?.payoutCountryDetails?.preferredCurrency
3937
- }
3938
- )
3939
- }
3940
- ),
3941
- /* @__PURE__ */ jsx(
3942
- "div",
3943
- {
3944
- className: activeForm?.formId !== PayoutAccountDocumentsFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
3945
- children: isExperimentEnabled(ExperimentNames.EnableBankDocumentClassification) ? /* @__PURE__ */ jsx(
3946
- MemoizedBankDocumentClassification,
3947
- {
3948
- ...bankDocumentFormProps,
3949
- id: PayoutAccountDocumentsFormID,
3950
- legalEntity: legalEntityResponse,
3951
- associatedLegalArrangement,
3952
- country: bankCountry,
3953
- formIsActive: activeForm?.formId === PayoutAccountDocumentsFormID
3954
- }
3955
- ) : /* @__PURE__ */ jsx(
3956
- MemoizedBankDocument,
3957
- {
3958
- ...bankDocumentFormProps,
3959
- heading: t(
3960
- ($) => $[isBankStatementDocumentOptional ? "uploadABankDocumentOptional" : "uploadABankDocument"]
3961
- ),
3962
- description: t(
3963
- ($) => $[legalEntityResponse.type === "individual" ? "toHelpVerifyYourBankDetailsIndividual" : "toHelpVerifyYourBankDetailsBusiness"]
3964
- ),
3965
- id: PayoutAccountDocumentsFormID,
3966
- legalEntity: legalEntityResponse,
3967
- associatedLegalArrangement,
3968
- country: bankCountry,
3969
- formIsActive: activeForm?.formId === PayoutAccountDocumentsFormID
3970
- }
3971
- )
3972
- }
3973
- )
3974
- ] }),
3975
- /* @__PURE__ */ jsx(Show, { when: showPayoutVerificationMethodError, children: /* @__PURE__ */ jsx(
3976
- Confirm,
3977
- {
3978
- analyticsEventLabel: "payoutVerificationMethodError",
3979
- title: t(($) => $["toContinuePleaseChooseAVerificationMethod"]),
3980
- confirmText: commonT(($) => $["ok"]),
3981
- onConfirm: () => {
3982
- showPayoutVerificationMethodError.value = false;
3983
- }
3984
- }
3985
- ) }),
3986
- /* @__PURE__ */ jsx(Show, { when: showInstantVerificationPayoutModal, children: /* @__PURE__ */ jsx(
3987
- BankVerification,
3988
- {
3989
- ...accountVerificationFormProps,
3990
- heading: t(($) => $["bankAccountVerification"]),
3991
- id: PayoutAccountVerificationFormID,
3992
- provider,
3993
- country: bankCountry,
3994
- onBack,
3995
- hideSidebar: setHideSidebar,
3996
- setBankVerificationError: setInstantVerificationError,
3997
- bankInfoValidated,
3998
- setBankInfoValidated,
3999
- formIsActive: activeForm?.formId === PayoutVerificationMethodFormID,
4000
- createTrustedTransferInstrument: createTrustedTransferInstrument2
4001
- }
4002
- ) })
4003
- ] });
4004
- }
4005
- const rules = ({
4006
- data,
4007
- requiredFields,
4008
- isExperimentEnabled
4009
- }) => createFormRules({
4010
- whenUsingManualVerification: () => {
4011
- if (!data.payoutVerificationMethod) return;
4012
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification") {
4013
- return "REQUIRED";
4014
- }
4015
- },
4016
- whenUsingInstantVerification: () => {
4017
- if (!data.payoutVerificationMethod) {
4018
- return "REQUIRED";
4019
- }
4020
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification") {
4021
- return "REQUIRED";
4022
- }
4023
- },
4024
- verifiedBankAccountNumber: () => {
4025
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification") {
4026
- return "REQUIRED";
4027
- }
4028
- },
4029
- bankStatementRequirement: () => {
4030
- if (data?.payoutVerificationMethod?.payoutVerificationMethod !== "instantVerification" && (isExperimentEnabled?.("EnableCheckOnCreateBankAccount") || isExperimentEnabled?.("BankVerificationFlowOptimization_CAASIntegration"))) {
4031
- return "REQUIRED";
4032
- }
4033
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification") {
4034
- return requiredFields?.bankStatementRequirement;
4035
- }
4036
- },
4037
- // "bankStatement description" field is always "optional" and it's coupled with bank statement document.
4038
- bankStatementDescription: () => {
4039
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification" && !!requiredFields?.bankStatementRequirement) {
4040
- return "OPTIONAL";
4041
- }
4042
- }
4043
- });
4044
- const mapApiDocumentToPayoutDocuments = (entityId) => {
4045
- const bankStatement = getDocument(entityId, "bankStatement");
4046
- if (!bankStatement) throw new Error(`bankStatement with id ${entityId} not found`);
4047
- return {
4048
- bankStatementDocument: [mapExistingFile(getPageName(bankStatement))],
4049
- description: bankStatement.description
4050
- };
4051
- };
4052
- const mapPayoutDetailsToTransferInstrument = ({
4053
- data,
4054
- legalEntity,
4055
- enabledCrossBorderPayouts
4056
- }) => {
4057
- if (!data.payoutAccountDetails || !data.payoutVerificationMethod) {
4058
- throw new Error("Missing payout details data");
4059
- }
4060
- if (enabledCrossBorderPayouts && !data.payoutCountryDetails) {
4061
- throw new Error("Missing payout details data");
4062
- }
4063
- const bankCountry = enabledCrossBorderPayouts ? data.payoutCountryDetails?.bankCountry : data.payoutVerificationMethod?.bankCountry;
4064
- const preferredCurrency = enabledCrossBorderPayouts ? data.payoutCountryDetails?.preferredCurrency : void 0;
4065
- return {
4066
- bankAccount: mapPayoutAccountSchemaToApiBankAccount(
4067
- data.payoutAccountDetails,
4068
- bankCountry,
4069
- preferredCurrency,
4070
- enabledCrossBorderPayouts
4071
- ),
4072
- legalEntityId: legalEntity.id,
4073
- type: "bankAccount"
4074
- };
4075
- };
4076
- const mapPayoutDocumentsToApiDocuments = async (data, entityId) => {
4077
- const { bankStatementDocument, description: description2 } = data.payoutAccountDocuments ?? {};
4078
- if (!bankStatementDocument) {
4079
- throw new Error("Bank statement document missing");
4080
- }
4081
- const page1 = bankStatementDocument[0];
4082
- if (!page1) {
4083
- throw new Error("Document needs at least one page");
4084
- }
4085
- const existingDocument = getDocument(entityId, "bankStatement");
4086
- return await createDocumentRequest({
4087
- entityId,
4088
- entityType: "bankAccount",
4089
- documentType: "bankStatement",
4090
- page1,
4091
- description: description2,
4092
- existingDocument
4093
- });
4094
- };
4095
- const CUSTOM_LABELS = {
4096
- verifiedAccountHolder: "accountHolder",
4097
- verifiedBankCountry: "bankCountry",
4098
- verifiedBankName: "bankName",
4099
- verifiedCurrencyCode: "currencyCode",
4100
- verifiedBankAccountNumber: "bankAccountNumber"
4101
- };
4102
- const formatAccountVerificationSummary = (data) => {
4103
- if (!data) return {};
4104
- const summary = {};
4105
- keysOf(CUSTOM_LABELS).forEach((key) => {
4106
- if (!data[key]) return;
4107
- summary[key] = summaryItem(CUSTOM_LABELS[key], data[key]);
4108
- });
4109
- return summary;
4110
- };
4111
- const obscuredPayoutFields = ["bankAccountNumber", "iban"];
4112
- const payoutDetailsCountryConfig = {
4113
- [CountryCodes.Canada]: {
4114
- bankStatementDocument: {
4115
- label: "listitemVoidedChequeBankLetterBankStatementOnline"
4116
- }
4117
- },
4118
- [CountryCodes.UnitedKingdom]: {
4119
- bankCity: {
4120
- label: "bankCityTown"
4121
- },
4122
- bankStatementDocument: {
4123
- label: "listitemVoidedChequeBankLetterBankStatementOnline"
4124
- }
4125
- }
4126
- };
4127
- const parseConfiguration = ({
4128
- requiredFields,
4129
- country,
4130
- bankVerificationAvailable
4131
- }) => parsePayoutScenarios({
4132
- requiredFields: requiredFields?.fields,
4133
- country,
4134
- bankVerificationAvailable
4135
- });
4136
- function parsePayoutScenarios({
4137
- requiredFields,
4138
- country,
4139
- bankVerificationAvailable
4140
- }) {
4141
- if (!requiredFields) return {};
4142
- let formConfig = {
4143
- payoutVerificationMethod: {
4144
- rule: "REQUIRED"
4145
- },
4146
- bankCountry: {
4147
- rule: "REQUIRED"
4148
- },
4149
- bankStatementDocument: {
4150
- rule: "bankStatementRequirement"
4151
- },
4152
- description: {
4153
- rule: "bankStatementDescription"
4154
- }
4155
- };
4156
- requiredFields.forEach((fieldName) => {
4157
- formConfig[fieldName] = {
4158
- rule: bankVerificationAvailable ? "whenUsingManualVerification" : "REQUIRED",
4159
- obscured: obscuredPayoutFields.includes(fieldName)
4160
- };
4161
- });
4162
- if (bankVerificationAvailable) {
4163
- formConfig = {
4164
- ...formConfig,
4165
- verifiedAccountHolder: {
4166
- rule: "whenUsingInstantVerification"
4167
- },
4168
- verifiedBankCountry: {
4169
- rule: "whenUsingInstantVerification"
4170
- },
4171
- verifiedBankName: {
4172
- rule: "whenUsingInstantVerification"
4173
- },
4174
- verifiedCurrencyCode: {
4175
- rule: "whenUsingInstantVerification"
4176
- },
4177
- verifiedBankAccountNumber: {
4178
- rule: "whenUsingInstantVerification"
4179
- }
4180
- };
4181
- }
4182
- return augmentWithCountryConfigs(payoutDetailsCountryConfig[country], formConfig);
4183
- }
4184
- const getAppropriatePayoutDetailsSteps = (isEditing, instantVerificationAvailable, canChangeCountry, isCrossBorderEnabled) => {
4185
- const dependentSteps = {
4186
- payoutCountryDetails: payoutSteps.payoutCountryDetails,
4187
- payoutVerificationMethod: payoutSteps.payoutVerificationMethod,
4188
- payoutAccountDetails: payoutSteps.payoutAccountDetails,
4189
- payoutAccountDocuments: payoutSteps.payoutAccountDocuments,
4190
- payoutAccountVerification: payoutSteps.payoutAccountVerification
4191
- };
4192
- if (!isCrossBorderEnabled) {
4193
- delete dependentSteps["payoutCountryDetails"];
4194
- }
4195
- if (isEditing || !instantVerificationAvailable && !canChangeCountry) {
4196
- delete dependentSteps["payoutVerificationMethod"];
4197
- }
4198
- return dependentSteps;
4199
- };
4200
- const getInvalidFieldsErrorHeader = (invalidField) => {
4201
- switch (invalidField) {
4202
- case "LEGAL_BUSINESS_NAME":
4203
- case "FIRST_NAME":
4204
- case "LAST_NAME":
4205
- return "caasBankAccountHolderDoesNotMatch";
4206
- default:
4207
- return "weCouldntCompleteTheAccountCheck";
4208
- }
4209
- };
4210
- const getInvalidFieldsErrorContent = (invalidField) => {
4211
- switch (invalidField) {
4212
- case "LEGAL_BUSINESS_NAME":
4213
- return "caasBankAccountMustBeInYourNameYourBusinessLegalNameOrDoingBusinessAs";
4214
- case "FIRST_NAME":
4215
- case "LAST_NAME":
4216
- return "caasBankAccountMustBeInYourName";
4217
- default:
4218
- return "weCouldntCompleteTheAccountCheck";
4219
- }
4220
- };
4221
- const defaultInvalidErrorMessage = {
4222
- header: "weCouldntCompleteTheAccountCheck",
4223
- content: "weCouldntCompleteTheAccountCheck"
4224
- };
4225
- const getInvalidFieldsErrorMessage = (errors) => {
4226
- if (!errors || errors.length === 0) {
4227
- return defaultInvalidErrorMessage;
4228
- }
4229
- const [firstError] = errors;
4230
- const { invalidFields } = firstError;
4231
- if (!invalidFields || invalidFields.length === 0) {
4232
- return defaultInvalidErrorMessage;
4233
- }
4234
- const [firstInvalidField] = invalidFields;
4235
- return {
4236
- header: getInvalidFieldsErrorHeader(firstInvalidField),
4237
- content: getInvalidFieldsErrorContent(firstInvalidField)
4238
- };
4239
- };
4240
- const getPayoutVerificationMethod = (transferInstrument, instantVerificationEnabled, enabledUnbiasedVerificationMethod) => {
4241
- if (transferInstrument) {
4242
- return "manualVerification";
4243
- } else {
4244
- return enabledUnbiasedVerificationMethod || !instantVerificationEnabled ? void 0 : "instantVerification";
4245
- }
4246
- };
4247
- const showInstantVerificationPayoutModal = signal(false);
4248
- function PayoutDetailsDropin({
4249
- legalEntityResponse,
4250
- associatedLegalArrangement,
4251
- problems: propProblems,
4252
- onSubmit: externalOnSubmit,
4253
- onChange,
4254
- asModal = false,
4255
- handleCloseClick,
4256
- taskType: propTaskType,
4257
- handleHomeClick,
4258
- currentTransferInstrumentId,
4259
- setCurrentTransferInstrumentId,
4260
- navigateBackToTaskList,
4261
- handleBackClick: externalBackClick,
4262
- hideSidebar,
4263
- openBankingPartnerConfigId
4264
- }) {
4265
- const { baseUrl, rootLegalEntityId } = useApiContext();
4266
- const {
4267
- data: transferInstrument,
4268
- refetch: refetchTransferInstrument,
4269
- isLoading: isTransferInstrumentLoading
4270
- } = useTransferInstrument(currentTransferInstrumentId ?? skipToken);
4271
- const { mutateAsync: handleUpdateTransferInstrument } = useUpdateTransferInstrument();
4272
- const {
4273
- mutateAsync: handleCreateTrustedTransferInstrument,
4274
- status: createTrustedTransferInstrumentStatus
4275
- } = useCreateTrustedTransferInstrument();
4276
- const [previousTrustedInstrumentStatus, setPreviousTrustedInstrumentStatus] = useState(
4277
- createTrustedTransferInstrumentStatus
4278
- );
4279
- const { t, i18n: i18next } = useTranslation("banking");
4280
- const { t: commonT } = useTranslation("common");
4281
- const userEvents = useAnalyticsContext();
4282
- const { showToast, clearToasts } = useToastContext();
4283
- const { isExperimentEnabled } = useExperimentsContext();
4284
- const { isSettingEnabled } = useSettingsContext();
4285
- const enabledCrossBorderPayouts = isExperimentEnabled(ExperimentNames.EnableCrossBorderPayouts);
4286
- const defaultPayoutCountry = getLegalEntityCountry(legalEntityResponse);
4287
- const existingPayoutDetails = useMemo(
4288
- () => transferInstrument ? mapTransferInstrumentToPayoutAccount(transferInstrument, enabledCrossBorderPayouts) : void 0,
4289
- [transferInstrument]
4290
- );
4291
- const [documents, setDocuments] = useState();
4292
- const [isCaasCalled, setIsCaasCalled] = useState(false);
4293
- const enableCheckOnCreateBankAccount = isExperimentEnabled("EnableCheckOnCreateBankAccount") || isExperimentEnabled("BankVerificationFlowOptimization_CAASIntegration");
4294
- const enabledUnbiasedVerificationMethod = isExperimentEnabled(
4295
- "BankVerificationMethodAutonomy_UnbiasedSelection"
4296
- );
4297
- const isPayoutVerificationMethodPageRedesignEnabled = isExperimentEnabled(
4298
- ExperimentNames.EnablePayoutVerificationMethodPageRedesign
4299
- );
4300
- const accountHolder = getPayoutAccountHolderName(legalEntityResponse, t);
4301
- const fallbackCurrency = currencyByCountry[defaultPayoutCountry]?.[0];
4302
- const accountHolderName = accountHolder || getLegalEntityNameBasedOnType(legalEntityResponse);
4303
- const instantVerificationEnabled = Boolean(
4304
- !isTransferInstrumentLoading && !transferInstrument && isSettingEnabled("instantBankVerification")
4305
- );
4306
- const taskType = propTaskType ?? TaskTypes.PAYOUT;
4307
- const [trustedTransferInstrumentId, setTrustedTransferInstrumentId] = useState();
4308
- const prefilledData = {
4309
- payoutCountryDetails: {
4310
- bankCountry: existingPayoutDetails?.payoutCountryDetails?.bankCountry ?? defaultPayoutCountry,
4311
- preferredCurrency: existingPayoutDetails?.payoutCountryDetails?.preferredCurrency
4312
- },
4313
- payoutAccountDetails: {
4314
- accountHolder: accountHolderName,
4315
- currency: fallbackCurrency,
4316
- ...existingPayoutDetails?.payoutAccountDetails
4317
- },
4318
- payoutVerificationMethod: {
4319
- payoutVerificationMethod: getPayoutVerificationMethod(
4320
- transferInstrument,
4321
- instantVerificationEnabled,
4322
- enabledUnbiasedVerificationMethod
4323
- ),
4324
- bankCountry: defaultPayoutCountry,
4325
- ...existingPayoutDetails?.payoutVerificationMethod
4326
- },
4327
- payoutAccountVerification: {
4328
- verifiedAccountHolder: accountHolderName,
4329
- verifiedBankCountry: defaultPayoutCountry,
4330
- ...existingPayoutDetails?.payoutAccountVerification
4331
- }
4332
- };
4333
- const documentUtils = documentApiUtils({
4334
- baseUrl: baseUrl.value,
4335
- rootLegalEntityId: rootLegalEntityId.value
4336
- });
4337
- const {
4338
- state: { currentState }
4339
- } = useStateContext();
4340
- const formValidity = currentState.validityByForm;
4341
- const bankAccountCountry = (enabledCrossBorderPayouts ? currentState?.data?.payoutCountryDetails?.bankCountry : currentState?.data?.payoutVerificationMethod?.bankCountry) ?? defaultPayoutCountry;
4342
- const [hideFooterAndSidebar, setHideFooterAndSidebar] = useState(false);
4343
- const [skipSubmit, setSkipSubmit] = useState(false);
4344
- const [loadingStatus, setLoadingStatus] = useState("loading");
4345
- const [isSubmitting, setIsSubmitting] = useState(false);
4346
- const [configurationLoadingStatus, setConfigurationLoadingStatus] = useState("loading");
4347
- const [data, setData] = useState(prefilledData);
4348
- const [problems, setProblems] = useState(
4349
- propProblems || (transferInstrument?.id ? getCapabilityProblems(legalEntityResponse, bankAccountCountry)?.BankAccount?.[transferInstrument.id] : void 0)
4350
- );
4351
- const [accountDetailsFromInput, setAccountDetailsFromInput] = useState(
4352
- prefilledData.payoutAccountDetails
4353
- );
4354
- const isMaskedBankAccountNumber = data.payoutAccountDetails?.bankAccountNumber?.includes("*") || data.payoutAccountDetails?.iban?.includes("*");
4355
- const existingBankAccountFormat = transferInstrument ? transferInstrument?.bankAccount?.accountIdentification?.type === "numberAndBic" ? "numberAndBic" : existingPayoutDetails?.payoutAccountDetails?.iban ? "iban" : "local" : void 0;
4356
- const checkAsAServiceAnalyticsProps = {
4357
- "Experiment name": ExperimentNames.BankVerificationFlowOptimization_CAASIntegration,
4358
- "Experiment value": enableCheckOnCreateBankAccount ? "TREATMENT" : "CONTROL"
4359
- };
4360
- useEffect(() => {
4361
- userEvents.updateBaseTrackingPayload({ task: taskType });
4362
- userEvents.addTaskEvent("Landed on page", {
4363
- actionType: "start",
4364
- ...checkAsAServiceAnalyticsProps
4365
- });
4366
- }, []);
4367
- useEffect(() => {
4368
- setData({
4369
- ...currentState.data,
4370
- payoutAccountDetails: {
4371
- ...currentState.data?.payoutAccountDetails,
4372
- currency: currencyByCountry[bankAccountCountry]?.[0]
4373
- }
4374
- });
4375
- onChange?.(currentState);
4376
- }, [bankAccountCountry, currentState, onChange]);
4377
- const {
4378
- data: providers,
4379
- refetch: refetchBankVerificationProviders,
4380
- status: bankVendorsLoadingStatus
4381
- } = useBankVerificationProviders(
4382
- {
4383
- country: bankAccountCountry,
4384
- configId: openBankingPartnerConfigId,
4385
- locale: i18next.language
4386
- },
4387
- {
4388
- enabled: instantVerificationEnabled
4389
- }
4390
- );
4391
- const instantVerificationAvailable = useMemo(
4392
- () => Boolean(instantVerificationEnabled && providers?.[0]?.redirectUrl),
4393
- [instantVerificationEnabled, providers]
4394
- );
4395
- const getPayoutAccountFormatData = useCallback(
4396
- async () => getAccountFormatsForCountry(bankAccountCountry),
4397
- [bankAccountCountry]
4398
- );
4399
- const { fieldConfigurations, requiredFields } = useScenarioConfiguration({
4400
- parseConfiguration,
4401
- legalEntityType: legalEntityResponse.type,
4402
- getPayoutAccountFormatData,
4403
- instantVerificationAvailable,
4404
- setLoadingStatus: setConfigurationLoadingStatus,
4405
- country: bankAccountCountry,
4406
- existingBankAccountFormat
4407
- });
4408
- const fieldsFromCustomRules = useMemo(
4409
- () => rules({
4410
- data,
4411
- requiredFields,
4412
- isExperimentEnabled
4413
- }),
4414
- [bankAccountCountry, data, taskType, isExperimentEnabled]
4415
- );
4416
- const apiBankAccount = useMemo(() => {
4417
- const payoutAccountDetails = data.payoutAccountDetails ?? { bankAccountNumber: "" };
4418
- return mapPayoutAccountSchemaToApiBankAccount(payoutAccountDetails, bankAccountCountry);
4419
- }, [data, bankAccountCountry]);
4420
- const {
4421
- data: checkAsAServiceData,
4422
- refetch: refetchCheckAsAService,
4423
- isLoading: isCheckAsAServiceLoading,
4424
- isError: isCheckAsAServiceError
4425
- } = useCheck(apiBankAccount.accountIdentification, {
4426
- enabled: false
4427
- });
4428
- const checkAsAServiceResultStatus = checkAsAServiceData?.status;
4429
- const checkAsAServiceResultErrors = checkAsAServiceData?.errors;
4430
- const provider = providers?.[0];
4431
- const isInstantVerificationFlow = data.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification";
4432
- const [isModalOpen, setIsModalOpen] = useState(false);
4433
- const payoutDetailsSteps = useMemo(() => {
4434
- const appropriatePayoutDetailsSteps = getAppropriatePayoutDetailsSteps(
4435
- Boolean(prefilledData?.payoutAccountDetails?.transferInstrumentId),
4436
- instantVerificationAvailable,
4437
- isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout),
4438
- enabledCrossBorderPayouts
4439
- );
4440
- if (enableCheckOnCreateBankAccount && !isCheckAsAServiceError && (checkAsAServiceResultStatus === "VALID" || checkAsAServiceResultStatus === void 0) && !isMaskedBankAccountNumber) {
4441
- delete appropriatePayoutDetailsSteps[payoutSteps.payoutAccountDocuments.formId];
4442
- }
4443
- return appropriatePayoutDetailsSteps;
4444
- }, [
4445
- providers,
4446
- enableCheckOnCreateBankAccount,
4447
- checkAsAServiceResultStatus,
4448
- isCheckAsAServiceError,
4449
- isMaskedBankAccountNumber
4450
- ]);
4451
- const derivedProps = useMemo(() => {
4452
- return getPropsFromConfigurations({
4453
- scenarioConfiguration: fieldConfigurations,
4454
- forms: payoutDetailsSteps,
4455
- remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
4456
- dataMissingErrors: problems?.missingData ?? [],
4457
- fieldsWithExistingData: [],
4458
- customRules: fieldsFromCustomRules,
4459
- legalEntityType: legalEntityResponse.type
4460
- });
4461
- }, [
4462
- fieldConfigurations,
4463
- payoutDetailsSteps,
4464
- problems?.remediationActions,
4465
- problems?.missingData,
4466
- fieldsFromCustomRules,
4467
- legalEntityResponse.type
4468
- ]);
4469
- useUnifyLoadingStatus(
4470
- setLoadingStatus,
4471
- configurationLoadingStatus,
4472
- // bank vendor loading status only matters when we fetch bank vendors
4473
- instantVerificationEnabled ? bankVendorsLoadingStatus : "success",
4474
- isSubmitting ? "loading" : "success"
4475
- );
4476
- const forms = useMemo(() => {
4477
- const requiredForms = getRequiredForms(
4478
- payoutDetailsSteps,
4479
- derivedProps?.requiredFields,
4480
- derivedProps?.optionalFields
4481
- );
4482
- return addValidityToForms(requiredForms, formValidity, problems);
4483
- }, [derivedProps, formValidity, problems, payoutDetailsSteps]);
4484
- useEffect(() => {
4485
- if (!transferInstrument?.documentDetails?.length) return;
4486
- if (transferInstrument.id) {
4487
- documentUtils.fetchDocuments(transferInstrument.documentDetails, transferInstrument.id).then(() => {
4488
- setDocuments(mapApiDocumentToPayoutDocuments(transferInstrument.id));
4489
- }).catch(() => {
4490
- showToast({
4491
- label: commonT(($) => $["failedToFetchRelevantDocuments"]),
4492
- variant: "error"
4493
- });
4494
- });
4495
- }
4496
- }, [transferInstrument?.documentDetails]);
4497
- const submitDocuments = async ({
4498
- forms: forms2,
4499
- transferInstrument: transferInstrument2,
4500
- dataSubmitted
4501
- }) => {
4502
- const isRequiredDocuments = isDocumentsRequired(forms2);
4503
- if (isRequiredDocuments) {
4504
- const documentToUpload = await mapPayoutDocumentsToApiDocuments(
4505
- dataSubmitted,
4506
- transferInstrument2.id
4507
- );
4508
- if (documentToUpload) {
4509
- try {
4510
- const documents2 = await documentUtils.uploadDocuments(
4511
- [documentToUpload],
4512
- transferInstrument2.id
4513
- );
4514
- documents2.forEach((document2) => {
4515
- userEvents.addTaskEvent("Success", {
4516
- actionType: "upload",
4517
- documentType: dataSubmitted.payoutAccountDocuments?.documentType ?? document2.type,
4518
- // tracks BankDocumentTypes
4519
- fileExtention: document2.attachments?.map((item) => getFileExtention(item.pageName ?? "")).filter((item) => item !== void 0) ?? void 0
4520
- });
4521
- });
4522
- } catch {
4523
- setProblems({
4524
- ...problems,
4525
- validationErrors: {
4526
- payoutAccountDocuments: { bankStatementDocument: true }
4527
- }
4528
- });
4529
- throw new Error(commonT(($) => $["remediationMessage_1_704"]));
4530
- } finally {
4531
- await refetchTransferInstrument?.();
4532
- }
4533
- }
4534
- }
4535
- };
4536
- useEffect(() => {
4537
- const payoutAccountData = cloneObject(data)?.payoutAccountDetails;
4538
- if (payoutAccountData) setAccountDetailsFromInput(payoutAccountData);
4539
- }, [data]);
4540
- const onSubmit = async () => {
4541
- setIsSubmitting(true);
4542
- const dataSubmitted = cloneObject(data);
4543
- const { payoutAccountDetails, payoutVerificationMethod } = dataSubmitted;
4544
- const baseTracking = {
4545
- actionType: "submit",
4546
- documentType: "bankStatement",
4547
- bankCountry: payoutVerificationMethod?.bankCountry ?? defaultPayoutCountry,
4548
- bankCurrency: payoutAccountDetails?.currency ?? null
4549
- };
4550
- let transferInstrumentFromInput = mapPayoutDetailsToTransferInstrument({
4551
- data: dataSubmitted,
4552
- legalEntity: legalEntityResponse,
4553
- enabledCrossBorderPayouts
4554
- });
4555
- transferInstrumentFromInput = omitObscuredFieldsIfUnchanged(
4556
- ["bankAccount.accountIdentification.accountNumber", "bankAccount.accountIdentification.iban"],
4557
- transferInstrumentFromInput,
4558
- transferInstrument
4559
- );
4560
- try {
4561
- if (!transferInstrumentFromInput) return;
4562
- const response = await (transferInstrument ? handleUpdateTransferInstrument({
4563
- transferInstrument: transferInstrumentFromInput,
4564
- transferInstrumentId: transferInstrument.id
4565
- }) : createTransferInstrument(
4566
- rootLegalEntityId.value,
4567
- baseUrl.value,
4568
- transferInstrumentFromInput
4569
- ));
4570
- setCurrentTransferInstrumentId?.(response?.id);
4571
- userEvents.addTaskEvent("Success", {
4572
- ...baseTracking,
4573
- ...checkAsAServiceAnalyticsProps
4574
- });
4575
- try {
4576
- await submitDocuments({ forms, transferInstrument: response, dataSubmitted });
4577
- clearToasts();
4578
- externalOnSubmit?.({ ...dataSubmitted, id: response?.id });
4579
- } catch (e) {
4580
- showToast({ label: e.message, variant: "error" });
4581
- } finally {
4582
- setIsSubmitting(false);
4583
- }
4584
- } catch (e) {
4585
- if (isValidationError(e)) {
4586
- const validationErrors = processValidationErrors(e, taskType);
4587
- setProblems({ ...problems, validationErrors });
4588
- } else if (isIdDocumentUploadError(e)) {
4589
- showToast({ label: t(($) => $["idDocumentAlreadyUploaded"]), variant: "error" });
4590
- } else if (isBankStatementUploadError(e)) {
4591
- showToast({ label: t(($) => $["bankStatementAlreadyUploaded"]), variant: "error" });
4592
- } else if (isMaintenanceModeError(e)) {
4593
- showToast({
4594
- label: commonT(($) => $["maintenanceModeMessage"]),
4595
- variant: "error",
4596
- duration: "indefinite"
4597
- });
4598
- } else {
4599
- const errorTranslatable = mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable(e);
4600
- showToast({ label: commonT(($) => $[errorTranslatable]), variant: "error" });
4601
- }
4602
- setIsSubmitting(false);
4603
- userEvents.addTaskEvent("Encountered error", {
4604
- ...baseTracking,
4605
- returnType: e?.errorCode || "backend",
4606
- returnValue: e?.title || e?.message,
4607
- ...checkAsAServiceAnalyticsProps
4608
- });
4609
- }
4610
- };
4611
- const isDocumentsRequired = (forms2) => forms2.some((form) => form.formId === payoutSteps.payoutAccountDocuments.formId);
4612
- const formatFileSummaryData = (bankDocuments) => {
4613
- const bankStatementDocument = bankDocuments?.bankStatementDocument?.[0];
4614
- return {
4615
- documentType: bankDocuments?.documentType && commonT(($) => $[bankDocuments?.documentType]),
4616
- fileName: bankStatementDocument?.name,
4617
- description: bankDocuments?.description
4618
- };
4619
- };
4620
- const canSubmit = () => {
4621
- if (isInstantVerificationFlow) {
4622
- return false;
4623
- }
4624
- const bankDetails = data.payoutAccountDetails;
4625
- return !isEmpty(bankDetails) && Object.values(bankDetails).every(Boolean);
4626
- };
4627
- const datasetUtils = datasetUtilities(i18next.language);
4628
- const formatDataForSummary = () => {
4629
- const summaryData = cloneObject(data);
4630
- summaryData.payoutAccountDetails.accountHolder = accountHolderName;
4631
- if (summaryData.payoutVerificationMethod?.bankCountry && summaryData.payoutAccountDetails) {
4632
- summaryData.payoutAccountDetails.bankCountry = datasetUtils.getCountryName(
4633
- summaryData.payoutVerificationMethod.bankCountry
4634
- );
4635
- }
4636
- if (summaryData.payoutAccountDocuments) {
4637
- summaryData.payoutAccountDocuments = formatFileSummaryData(data?.payoutAccountDocuments);
4638
- }
4639
- summaryData.payoutAccountVerification = formatAccountVerificationSummary(
4640
- data.payoutAccountVerification
4641
- );
4642
- return summaryData;
4643
- };
4644
- const createTrustedTransferInstrumentHandler = async (code, state) => {
4645
- try {
4646
- const trustedTransferInstrument = await handleCreateTrustedTransferInstrument({
4647
- code,
4648
- state
4649
- });
4650
- if (trustedTransferInstrument) {
4651
- setTrustedTransferInstrumentId(trustedTransferInstrument.verificationReference);
4652
- return trustedTransferInstrument;
4653
- }
4654
- } catch (e) {
4655
- refetchBankVerificationProviders();
4656
- const errorTranslatable = mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable(e);
4657
- if (errorTranslatable === "transferInstrumentLimitHasAlreadyBeenMet") {
4658
- showToast({ label: commonT(($) => $[errorTranslatable]), variant: "error" });
4659
- }
4660
- throw e;
4661
- }
4662
- };
4663
- const {
4664
- handleNextClick,
4665
- handleBackClick,
4666
- activeForm,
4667
- setShouldValidate,
4668
- gotoFormByFormIndex,
4669
- steps
4670
- } = useFormComposer({
4671
- problems,
4672
- forms,
4673
- externalBackClick,
4674
- navigationTrackingParams: {
4675
- ...checkAsAServiceAnalyticsProps
4676
- },
4677
- onSubmit: skipSubmit ? async () => {
4678
- if (enabledCrossBorderPayouts && trustedTransferInstrumentId) {
4679
- try {
4680
- await handleUpdateTransferInstrument({
4681
- transferInstrument: {
4682
- legalEntityId: rootLegalEntityId.value,
4683
- bankAccount: {
4684
- preferredCurrencyCode: data.payoutCountryDetails?.preferredCurrency,
4685
- trustedSource: true
4686
- },
4687
- type: "bankAccount"
4688
- },
4689
- transferInstrumentId: trustedTransferInstrumentId
4690
- });
4691
- } catch {
4692
- showToast({ label: commonT(($) => $["failedToUpdateDetails"]), variant: "error" });
4693
- }
4694
- }
4695
- if (trustedTransferInstrumentId) {
4696
- externalOnSubmit?.({ ...data, id: trustedTransferInstrumentId });
4697
- }
4698
- userEvents.addTaskEvent("Success", {
4699
- actionType: "submit"
4700
- });
4701
- navigateBackToTaskList?.();
4702
- } : onSubmit
4703
- });
4704
- useEffect(() => {
4705
- if (isCaasCalled && forms) {
4706
- if (checkAsAServiceResultStatus !== "VALID") {
4707
- const formIndex = forms.findIndex((f) => f.formId === "payoutAccountDocuments");
4708
- if (formIndex > -1) {
4709
- gotoFormByFormIndex(formIndex);
4710
- }
4711
- }
4712
- if (checkAsAServiceResultStatus === "VALID") {
4713
- handleNextClick();
4714
- }
4715
- }
4716
- setIsCaasCalled(false);
4717
- }, [forms, checkAsAServiceResultStatus, isCaasCalled]);
4718
- const handleFormNextClick = async () => {
4719
- if (isPayoutVerificationMethodPageRedesignEnabled && activeForm.formId === "payoutVerificationMethod") {
4720
- if (isInstantVerificationFlow) {
4721
- showInstantVerificationPayoutModal.value = true;
4722
- return;
4723
- } else {
4724
- handleNextClick();
4725
- }
4726
- }
4727
- if (!data?.payoutVerificationMethod?.payoutVerificationMethod) {
4728
- showPayoutVerificationMethodError.value = true;
4729
- return;
4730
- }
4731
- if (enableCheckOnCreateBankAccount && activeForm.formId === "payoutAccountDetails" && activeForm.isValid && data.payoutAccountDetails && !isMaskedBankAccountNumber) {
4732
- try {
4733
- const { data: response } = await refetchCheckAsAService();
4734
- setIsCaasCalled(true);
4735
- if (response?.status === "INCOMPLETE_INPUT") {
4736
- setIsModalOpen(true);
4737
- }
4738
- } catch {
4739
- handleNextClick();
4740
- }
4741
- } else {
4742
- handleNextClick();
4743
- }
4744
- };
4745
- if (previousTrustedInstrumentStatus !== createTrustedTransferInstrumentStatus) {
4746
- if (activeForm.formId === "payoutAccountVerification" && activeForm.isValid && createTrustedTransferInstrumentStatus === "success" && data.payoutAccountVerification?.verifiedBankAccountNumber) {
4747
- handleNextClick();
4748
- setPreviousTrustedInstrumentStatus(createTrustedTransferInstrumentStatus);
4749
- }
4750
- if (isExperimentEnabled(ExperimentNames.EnablePayoutVerificationMethodPageRedesign) && activeForm.formId === "payoutVerificationMethod" && createTrustedTransferInstrumentStatus === "success") {
4751
- gotoFormByFormIndex(forms.length - 1);
4752
- setPreviousTrustedInstrumentStatus(createTrustedTransferInstrumentStatus);
4753
- }
4754
- }
4755
- const omittedForms = data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification" ? [] : [payoutSteps.payoutVerificationMethod.formId];
4756
- const { header: invalidFieldHeader, content: invalidFieldContent } = getInvalidFieldsErrorMessage(
4757
- checkAsAServiceResultErrors ?? []
4758
- );
4759
- return /* @__PURE__ */ jsxs(
4760
- LoaderWrapper,
4761
- {
4762
- showSpinner: true,
4763
- status: isCheckAsAServiceLoading || isModalOpen || createTrustedTransferInstrumentStatus === "pending" ? "loading" : "success",
4764
- formOpacityWhenLoading: 0.3,
4765
- children: [
4766
- isModalOpen && /* @__PURE__ */ jsx(
4767
- Confirm,
4768
- {
4769
- title: t(($) => $[invalidFieldHeader]),
4770
- description: t(($) => $[invalidFieldContent]),
4771
- cancelText: commonT(($) => $["editDetails"]),
4772
- confirmText: t(($) => $["continueAnyway"]),
4773
- onConfirm: () => {
4774
- handleNextClick();
4775
- setIsModalOpen(false);
4776
- },
4777
- onCancel: () => {
4778
- gotoFormByFormIndex(0);
4779
- setIsModalOpen(false);
4780
- }
4781
- }
4782
- ),
4783
- /* @__PURE__ */ jsx(
4784
- FormWrapper,
4785
- {
4786
- taskName: taskType === TaskTypes.PAYIN ? "payinDetails" : "payoutDetails",
4787
- activeForm,
4788
- summary: {
4789
- data: formatDataForSummary(),
4790
- omitted: {
4791
- keys: ["transferInstrumentId", "payoutVerificationMethod"],
4792
- forms: omittedForms,
4793
- summaryEditButton: ["payoutVerificationMethod"]
4794
- }
4795
- },
4796
- handleBackClick: !isPayoutVerificationMethodPageRedesignEnabled || activeForm.formId !== "summary" ? handleBackClick : void 0,
4797
- handleNextClick: handleFormNextClick,
4798
- handleHomeClick,
4799
- handleCloseClick,
4800
- hideSidebar: hideSidebar || hideFooterAndSidebar,
4801
- hideFooter: hideFooterAndSidebar,
4802
- loadingStatus: isTransferInstrumentLoading ? "loading" : loadingStatus,
4803
- asModal,
4804
- forms,
4805
- onSubmit,
4806
- gotoFormByFormIndex,
4807
- validateForm: () => setShouldValidate(true),
4808
- canSubmit: canSubmit(),
4809
- problems,
4810
- steps,
4811
- children: (!isTransferInstrumentLoading || isSubmitting) && /* @__PURE__ */ jsx(
4812
- PayoutDetails,
4813
- {
4814
- ...derivedProps,
4815
- data: { ...prefilledData, payoutAccountDocuments: documents },
4816
- country: defaultPayoutCountry,
4817
- activeForm,
4818
- onBack: handleBackClick,
4819
- accountHolder: accountHolder ?? getLegalEntityNameBasedOnType(legalEntityResponse),
4820
- setHideSidebar: setHideFooterAndSidebar,
4821
- setSkipSubmit,
4822
- legalEntityResponse,
4823
- associatedLegalArrangement,
4824
- provider,
4825
- bankVendorsLoadingStatus,
4826
- instantVerificationAvailable,
4827
- createTrustedTransferInstrument: createTrustedTransferInstrumentHandler,
4828
- accountDetailsFromInput,
4829
- trustedTransferInstrumentId
4830
- }
4831
- )
4832
- }
4833
- )
4834
- ]
4835
- }
4836
- );
4837
- }
4838
- export {
4839
- PayoutDetailsDropin as P,
4840
- PayoutDetailsPage$1 as a
4841
- };