@adyen/kyc-components 4.0.0-compact.3 → 4.0.0-compact.7

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 (1064) hide show
  1. package/dist/4-people-BtDi7O9A.js +24 -0
  2. package/dist/AcceptTermsOfServiceComponent-BFqDontt.js +650 -0
  3. package/dist/Accordion-B2vSnESS.js +88 -0
  4. package/dist/AccountSetupRejected-f8rcBzZj.js +26 -0
  5. package/dist/ActionBar-CijauUSe.js +31 -0
  6. package/dist/Address-Bj7zJ6yZ.js +1112 -0
  7. package/dist/Alert-CFmX9yNV.js +169 -0
  8. package/dist/Avatar-DWU7t_0U.js +60 -0
  9. package/dist/BusinessFinancingComponent-_DvatBRp.js +55 -0
  10. package/dist/BusinessFinancingDropin-BuATaIOz.js +2235 -0
  11. package/dist/BusinessFinancingPage-Bpu78Ynn.js +43 -0
  12. package/dist/BusinessTypeSelectionPage-gsT7g7u8.js +446 -0
  13. package/dist/Card-OQuFzmxm.js +90 -0
  14. package/dist/Checkbox-5Sc5pzsh.js +74 -0
  15. package/dist/Confirm-C0J_JwMM.js +64 -0
  16. package/dist/ConstitutionalDocument-Bw5T0g5Q.js +2361 -0
  17. package/dist/ContactDetails-CXTim9KR.js +396 -0
  18. package/dist/ContextGuidance-074d6FWy.js +34 -0
  19. package/dist/ContractViewer-DcQHIGMU.js +935 -0
  20. package/dist/CountryField-DxZlK1rV.js +66 -0
  21. package/dist/CreateIndividualComponent-BppUrKMC.js +65 -0
  22. package/dist/CreateTransferInstrumentComponent-Cl2NOJb6.js +56 -0
  23. package/dist/Currency-CIgj9KwH.js +238 -0
  24. package/dist/CustomerSupport-UenL9SqQ.js +156 -0
  25. package/dist/DebugModal-KXKodU9u.js +416 -0
  26. package/dist/DecisionMakerDetailsPage-Xwe1qYtH.js +104 -0
  27. package/dist/DecisionMakers-CJDodZSl.js +858 -0
  28. package/dist/Dropzone-kpihpy7N.js +224 -0
  29. package/dist/EmbeddedStatus-BJjPDUeS.js +97 -0
  30. package/dist/EndStateLayout-Cx1NUGVq.js +71 -0
  31. package/dist/EntityAssociation-BtQeHZOq.js +178 -0
  32. package/dist/EntityGuidanceStatus-DyMVy3R4.js +106 -0
  33. package/dist/ErrorPanel-CAALFKmE.js +194 -0
  34. package/dist/Field-Bs7wGDqk.js +141 -0
  35. package/dist/FormNavigation-BtSvWPRY.js +144 -0
  36. package/dist/FormWrapper-B3N3YosC.js +135 -0
  37. package/dist/Header-vslG1ugE.js +83 -0
  38. package/dist/Image-CAucF9wz.js +27 -0
  39. package/dist/Individual.rules-CP2tzjmO.js +383 -0
  40. package/dist/IndividualDropin-xfXkDkrM.js +5168 -0
  41. package/dist/InputDate-CLxqciJA.js +43 -0
  42. package/dist/InputGroup-WBfGDV5F.js +32 -0
  43. package/dist/InputText-BdCbTzL9.js +134 -0
  44. package/dist/Introduction-BRWdnVv5.js +256 -0
  45. package/dist/JpAddress-BSEenMj0.js +329 -0
  46. package/dist/LandingLayout-kl7TkBGx.js +60 -0
  47. package/dist/LegalCompanyNameField-DzAxAnD9.js +138 -0
  48. package/dist/LegalRepresentativeDetailsPage--yY_D66i.js +55 -0
  49. package/dist/Link-CXYU8cLY.js +35 -0
  50. package/dist/List-BAzyC6sw.js +83 -0
  51. package/dist/ListItem-HD5_HiQ2.js +69 -0
  52. package/dist/LoaderWrapper-C2PvjjQc.js +42 -0
  53. package/dist/ManageIndividualComponent-BGaAbJjj.js +46 -0
  54. package/dist/ManageTermsOfServiceComponent-DFjaajE4.js +52 -0
  55. package/dist/ManageTransferInstrumentComponent-Dndkwh_d.js +292 -0
  56. package/dist/MaskedInput-BSW18fxr.js +811 -0
  57. package/dist/MaybeModal-xIjl3I31.js +36 -0
  58. package/dist/Modal-CZ-HuGUO.js +147 -0
  59. package/dist/Name-D6EhveoK.js +81 -0
  60. package/dist/OnboardingDropinComponent-CHtcVTHh.js +2672 -0
  61. package/dist/PayoutDetailsDropin-C2pNMAZS.js +4978 -0
  62. package/dist/Radio-BMtxBpnn.js +39 -0
  63. package/dist/RadioGroup-CxcIXYzs.js +100 -0
  64. package/dist/RadioGroupCard-Y214QWmQ.js +152 -0
  65. package/dist/Review-B2NCN4h_.js +84 -0
  66. package/dist/RootBusinessDetailsPage-hr5fLCIH.js +50 -0
  67. package/dist/RootBusinessLinesPage-DSna9haW.js +1553 -0
  68. package/dist/RootIndividualDetailsPage-BItguz9n.js +62 -0
  69. package/dist/Select-DaCJsYNl.js +868 -0
  70. package/dist/SignPCIComponent-C2YjBxQM.js +307 -0
  71. package/dist/SingpassSelection-B3ozCH9I.js +132 -0
  72. package/dist/SoleProprietorshipPage-DIzzhgjr.js +50 -0
  73. package/dist/SourceOfFundsPage-C3kXyE7G.js +2162 -0
  74. package/dist/Spacer-BK3jDget.js +18 -0
  75. package/dist/StepProgressIndicator-BSGlNU3K.js +78 -0
  76. package/dist/StoreProvider-99-ewU62.js +4793 -0
  77. package/dist/StructuredList-CVMZBzwq.js +61 -0
  78. package/dist/Summary-D0GcSMNn.js +220 -0
  79. package/dist/TaskVerificationStatus-DZIw2ztV.js +129 -0
  80. package/dist/TaxInformationField-BxQvx1zK.js +3741 -0
  81. package/dist/TaxReportingDropin-BqvAQH2c.js +503 -0
  82. package/dist/TextArea-BjsWgkR-.js +103 -0
  83. package/dist/TileGroup-C-5-VREz.js +203 -0
  84. package/dist/TrustDetailsPage-YROGiuFJ.js +2172 -0
  85. package/dist/TrustMemberCompanyPage-Z2EuqPEI.js +68 -0
  86. package/dist/TrustMemberIndividualPage-DmNp3D89.js +64 -0
  87. package/dist/TrustMemberRoleAndTypePage-BEOtdItr.js +1087 -0
  88. package/dist/TrustMembersOverview-GybHMIEU.js +439 -0
  89. package/dist/UnincorporatedPartnershipIndividualPage-BCYxSTlv.js +63 -0
  90. package/dist/UnincorporatedPartnershipMemberCompanyPage-Buez4OHl.js +71 -0
  91. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-Cfpe0BuU.js +292 -0
  92. package/dist/UnincorporatedPartnershipMembersOverview-B3Vi088r.js +173 -0
  93. package/dist/VerificationErrorAlert-C6_ewC7c.js +60 -0
  94. package/dist/ViewVerificationStatusComponent-DpA4jlct.js +181 -0
  95. package/dist/accountHolderUtils-Btu9mMnM.js +66 -0
  96. package/dist/adyen-business-financing.js +8 -4
  97. package/dist/adyen-individual-configuration.js +8 -4
  98. package/dist/adyen-individual-status.js +5 -4
  99. package/dist/adyen-invited-decision-maker.js +87 -0
  100. package/dist/adyen-kyc-components.js +23 -21
  101. package/dist/adyen-onboarding.js +8 -4
  102. package/dist/adyen-terms-of-service-management.js +8 -4
  103. package/dist/adyen-terms-of-service-status.js +5 -4
  104. package/dist/adyen-transfer-instrument-configuration.js +8 -4
  105. package/dist/adyen-transfer-instrument-management.js +5 -4
  106. package/dist/adyen-verification-status.js +8 -4
  107. package/dist/arrow-right-BoqwUH_d.js +14 -0
  108. package/dist/bafinUtils-CIGv_BK8.js +80 -0
  109. package/dist/bag-BXVWLrwo.js +14 -0
  110. package/dist/bank-1GvaHPAZ.js +14 -0
  111. package/dist/bin-Ba-3ll8T.js +18 -0
  112. package/dist/business-lines-BAqTbnBw.js +135 -0
  113. package/dist/capital-9TKHySO7.js +17 -0
  114. package/dist/cash-stack-DwYu4xNy.js +22 -0
  115. package/dist/certificate-N2YFedpI.js +17 -0
  116. package/dist/checkmark-D9dGhGpG.js +14 -0
  117. package/dist/checkmark-circle-CFWClLQ6.js +20 -0
  118. package/dist/checkmark-circle-fill-DEB-tuGl.js +17 -0
  119. package/dist/checkmark-small-D3VNx2lo.js +14 -0
  120. package/dist/chevron-down-C7SUSYfl.js +14 -0
  121. package/dist/chevron-left-BXmd-S46.js +14 -0
  122. package/dist/chevron-right-jE6RwM2B.js +14 -0
  123. package/dist/chevron-up-BdfNcqzq.js +14 -0
  124. package/dist/circle-BJPTMCWB.js +17 -0
  125. package/dist/circle-small-filled-BuO8Vg8j.js +14 -0
  126. package/dist/clock-DAzaBRWk.js +20 -0
  127. package/dist/coins-DYdzG5e_.js +17 -0
  128. package/dist/commonValidators-DTt6he7v.js +24 -0
  129. package/dist/company-types-value-D_mKv5PT.js +23 -0
  130. package/dist/contract-BfJb1t6M.js +14 -0
  131. package/dist/cross-CDS_eot4.js +14 -0
  132. package/dist/cross-circle-fill-C-EJ57Yn.js +17 -0
  133. package/dist/cross-circle-fill-small-DkPjsuBH.js +14 -0
  134. package/dist/currency-CrdnaaDu.js +35 -0
  135. package/dist/da-DK-B3Pg-MWO.js +13 -0
  136. package/dist/da-DK-CGWvmdkq.js +38 -0
  137. package/dist/da-DK-Cd5IQPv3.js +75 -0
  138. package/dist/da-DK-DQ4ZYSea.js +65 -0
  139. package/dist/da-DK-DzcTI92X.js +13 -0
  140. package/dist/da-DK-vcVNQJbX.js +63 -0
  141. package/dist/datasetUtil-BHQp0-xL.js +58 -0
  142. package/dist/de-DE-C9NH2zMh.js +75 -0
  143. package/dist/de-DE-CWEW2yqg.js +63 -0
  144. package/dist/de-DE-CkbOZ6S_.js +65 -0
  145. package/dist/de-DE-DHDJhahG.js +38 -0
  146. package/dist/de-DE-S6qDey1L.js +13 -0
  147. package/dist/de-DE-dPfrbCii.js +13 -0
  148. package/dist/debouncedInputEvent-Cv2S512Y.js +46 -0
  149. package/dist/decision-makers-group-DrvpnEqj.js +1944 -0
  150. package/dist/digital-wallet-Bx5YM1LY.js +46 -0
  151. package/dist/document-1-qlSTF558.js +14 -0
  152. package/dist/document-blurred-BiWap0xs.js +37 -0
  153. package/dist/document-cut-off-aQezqOif.js +32 -0
  154. package/dist/document-expired-BhBXaWWQ.js +38 -0
  155. package/dist/document-front-DYuhZGeQ.js +30 -0
  156. package/dist/document-person-CDbnTOdV.js +20 -0
  157. package/dist/download-BZQB1WkZ.js +17 -0
  158. package/dist/dropinUtils--st1YpV6.js +200 -0
  159. package/dist/edit-1-DAqtnOIx.js +14 -0
  160. package/dist/en-US-BSQXKu6d.js +54 -0
  161. package/dist/en-US-CjjPhkB5.js +65 -0
  162. package/dist/en-US-D1sB335h.js +61 -0
  163. package/dist/en-US-DLY20x1O.js +13 -0
  164. package/dist/en-US-DYP6rAvA.js +75 -0
  165. package/dist/en-US-DoiQhi0j.js +38 -0
  166. package/dist/en-US-cVpRgdC8.js +13 -0
  167. package/dist/es-ES--IvNed_Q.js +13 -0
  168. package/dist/es-ES-BAolMrZ0.js +65 -0
  169. package/dist/es-ES-BYl5-PFR.js +13 -0
  170. package/dist/es-ES-CDgjGql5.js +63 -0
  171. package/dist/es-ES-CxnsKEh4.js +38 -0
  172. package/dist/es-ES-DK-7qtDf.js +75 -0
  173. package/dist/external-link-Cg6pJaSJ.js +14 -0
  174. package/dist/fi-FI-57-xkioo.js +38 -0
  175. package/dist/fi-FI-BJLU1JHw.js +75 -0
  176. package/dist/fi-FI-BUixKfXH.js +13 -0
  177. package/dist/fi-FI-CsZlDJFb.js +63 -0
  178. package/dist/fi-FI-D8WrLxxq.js +65 -0
  179. package/dist/fi-FI-DFxljML-.js +13 -0
  180. package/dist/fieldConfigurations-BUT9DTUH.js +21 -0
  181. package/dist/filterProblemsByTaskForms-Cz7iQtms.js +30 -0
  182. package/dist/form-rules-DhbF2mY4.js +13 -0
  183. package/dist/formUtils-C_sWWLS3.js +107 -0
  184. package/dist/fr-FR-B2je0smB.js +75 -0
  185. package/dist/fr-FR-BM-qNLci.js +13 -0
  186. package/dist/fr-FR-Beljeilc.js +65 -0
  187. package/dist/fr-FR-BxiX8Zfi.js +38 -0
  188. package/dist/fr-FR-DPehHVb6.js +13 -0
  189. package/dist/fr-FR-VoxPkXSc.js +63 -0
  190. package/dist/funds-in-CInoUdmG.js +21 -0
  191. package/dist/getName-CnZDw7kV.js +41 -0
  192. package/dist/getProblemsForEntity-D8qEVVOM.js +24 -0
  193. package/dist/getProps-Cc3J2-z9.js +148 -0
  194. package/dist/getTrustedFields-C5-mXl-l.js +64 -0
  195. package/dist/gift-omNInZeB.js +14 -0
  196. package/dist/graph-DunG_uu1.js +21 -0
  197. package/dist/graph-up-BZze4i6m.js +20 -0
  198. package/dist/headquarter-BhpSibFO.js +21 -0
  199. package/dist/hotel-Cp7VgGCJ.js +22 -0
  200. package/dist/house-BhyBQdR3.js +21 -0
  201. package/dist/id-blurred-B5lHEP8M.js +59 -0
  202. package/dist/id-cut-off-Ba1FRzKO.js +55 -0
  203. package/dist/id-front-CpNWN6nG.js +52 -0
  204. package/dist/id-glare-DgCQON8k.js +49 -0
  205. package/dist/iframeWidget-DqeucjDU.js +234 -0
  206. package/dist/image-CmB0ioUM.js +17 -0
  207. package/dist/info-Bb_-xIEK.js +21 -0
  208. package/dist/info-filled-CK8LB339.js +17 -0
  209. package/dist/instant-verification-UrnuHTYn.js +40 -0
  210. package/dist/isEmpty-CUuXL9Na.js +23 -0
  211. package/dist/isNewEntity-7Vw_eQBr.js +13 -0
  212. package/dist/it-IT-5a7NHVFo.js +65 -0
  213. package/dist/it-IT-D63gRTDc.js +13 -0
  214. package/dist/it-IT-DOBp2-MP.js +13 -0
  215. package/dist/it-IT-DZjw9LNC.js +63 -0
  216. package/dist/it-IT-Dhwa9Ecj.js +75 -0
  217. package/dist/it-IT-masgjk9F.js +38 -0
  218. package/dist/ja-JP-B3wVYIJU.js +151 -0
  219. package/dist/ja-JP-Bc4U0S8-.js +75 -0
  220. package/dist/ja-JP-BoxeBgOv.js +32 -0
  221. package/dist/ja-JP-BqluCflj.js +63 -0
  222. package/dist/ja-JP-Bv3ru9Xq.js +125 -0
  223. package/dist/ja-JP-CbgaW99b.js +54 -0
  224. package/dist/ja-JP-CceCDXLB.js +55 -0
  225. package/dist/ja-JP-CvNJvxkQ.js +218 -0
  226. package/dist/ja-JP-DL0IjTzn.js +13 -0
  227. package/dist/ja-JP-DSvZhFNY.js +65 -0
  228. package/dist/ja-JP-FWHXsXlW.js +24 -0
  229. package/dist/ja-JP-bz7ekGnF.js +27 -0
  230. package/dist/ja-JP-g6VOUGXZ.js +136 -0
  231. package/dist/ja-JP-vv3-YsHU.js +38 -0
  232. package/dist/japanSupportUtils-CGWcXGP2.js +16 -0
  233. package/dist/jpAddressSchema-DEOyz9Yo.js +26 -0
  234. package/dist/localizeDateString-D6tFShQu.js +27 -0
  235. package/dist/location-itJfxrDQ.js +17 -0
  236. package/dist/mail-VHTlAusn.js +14 -0
  237. package/dist/manual-verification-BO8zgAYT.js +41 -0
  238. package/dist/mapExistingFile-BM9f5AeG.js +230 -0
  239. package/dist/mapJpAddressSchemaToAddressLocalizations-Cu4hdrYE.js +162 -0
  240. package/dist/mapLegalEntityToIndividualSchema-DVKTWyvx.js +206 -0
  241. package/dist/mapTransferInstrumentToPayoutAccount--gtugk3J.js +34 -0
  242. package/dist/minus-circle-filled-ZhtJ0GD3.js +17 -0
  243. package/dist/nl-NL-B0fvINJj.js +75 -0
  244. package/dist/nl-NL-CmURERx_.js +65 -0
  245. package/dist/nl-NL-D1b5RUJ0.js +38 -0
  246. package/dist/nl-NL-KQ6bciOb.js +13 -0
  247. package/dist/nl-NL-SjOGmGk5.js +13 -0
  248. package/dist/nl-NL-lcNM54vV.js +63 -0
  249. package/dist/no-NO-BAWVf0GX.js +13 -0
  250. package/dist/no-NO-CTrVITNu.js +63 -0
  251. package/dist/no-NO-Dkh4SWbB.js +38 -0
  252. package/dist/no-NO-Ds3VioxT.js +13 -0
  253. package/dist/no-NO-Jw7Gae-a.js +75 -0
  254. package/dist/no-NO-qyqWODMp.js +65 -0
  255. package/dist/onfido-logo-BSkKPH10.js +14 -0
  256. package/dist/options-horizontal-GuXvLvV3.js +18 -0
  257. package/dist/partner-QD27Vy4w.js +18 -0
  258. package/dist/passport-blurred-CVG493IJ.js +59 -0
  259. package/dist/passport-cut-off-COzA_TmB.js +56 -0
  260. package/dist/passport-front-WJleLixT.js +52 -0
  261. package/dist/passport-front-green-CZVkCa1n.js +232 -0
  262. package/dist/passport-glare-BP5WnJZj.js +50 -0
  263. package/dist/patternValidators-vYKnE5-t.js +83 -0
  264. package/dist/pay-by-link-plane-BpY8Q6-B.js +22 -0
  265. package/dist/payout-DtB68BcZ.js +20 -0
  266. package/dist/payout-verification-instant-BzpfOQLD.js +41 -0
  267. package/dist/payout-verification-manual-gNEoeZkV.js +90 -0
  268. package/dist/person-IVZG3t3_.js +17 -0
  269. package/dist/plaid-logo-FsZ7kfL-.js +14 -0
  270. package/dist/plus-DiALAL8-.js +14 -0
  271. package/dist/plus-circle-filled-BzHtTqEN.js +17 -0
  272. package/dist/process-field-configurations-Dl2Isz78.js +324 -0
  273. package/dist/pt-BR-BRdIEO2O.js +38 -0
  274. package/dist/pt-BR-BaTE6BB_.js +75 -0
  275. package/dist/pt-BR-BfDe_8iW.js +13 -0
  276. package/dist/pt-BR-BxoOF8jB.js +65 -0
  277. package/dist/pt-BR-Ct4s4jXV.js +13 -0
  278. package/dist/pt-BR-DA44Wgbt.js +63 -0
  279. package/dist/recurring-DKNs9K3x.js +17 -0
  280. package/dist/reporting-D5ABpLO_.js +16 -0
  281. package/dist/resolveEnvironment-B_JokQ0n.js +84 -0
  282. package/dist/revenue-accelerate-D7Sp0V4a.js +17 -0
  283. package/dist/review-D4TUjcWF.js +17 -0
  284. package/dist/roleMetadata-eM6T7GeQ.js +66 -0
  285. package/dist/save-BfqO2JBI.js +14 -0
  286. package/dist/search-Cmzbf5zI.js +17 -0
  287. package/dist/show-IdbU1C6P.js +17 -0
  288. package/dist/singpass-logo-wY4xsmTX.js +17 -0
  289. package/dist/singpass-verification-instant-JCqTr7Mv.js +40 -0
  290. package/dist/singpass-verification-manual-DQ7XW6R3.js +34 -0
  291. package/dist/sl-SI-BAIm-qBe.js +13 -0
  292. package/dist/sl-SI-BZpXMHiG.js +13 -0
  293. package/dist/sl-SI-CvUzNn9Z.js +38 -0
  294. package/dist/sl-SI-D8dDckrW.js +55 -0
  295. package/dist/sl-SI-DEaeEVKB.js +24 -0
  296. package/dist/sl-SI-DTvJT7fC.js +65 -0
  297. package/dist/sl-SI-DZHePXbK.js +63 -0
  298. package/dist/sl-SI-DbfswGh0.js +75 -0
  299. package/dist/sl-SI-DqUEy_Cm.js +32 -0
  300. package/dist/sl-SI-hxwQIw_i.js +13 -0
  301. package/dist/solution-payments-DpyE_sdS.js +14 -0
  302. package/dist/store-Btc4GcmU.js +14 -0
  303. package/dist/style.css +2642 -2946
  304. package/dist/styles-CLV89_hH.js +2642 -2946
  305. package/dist/summaryItem-CAQCQSkt.js +18 -0
  306. package/dist/sv-SE-0PQ-U1u6.js +13 -0
  307. package/dist/sv-SE-BZNey_8S.js +13 -0
  308. package/dist/sv-SE-BsLkPEzn.js +38 -0
  309. package/dist/sv-SE-D_Efxy3s.js +75 -0
  310. package/dist/sv-SE-Dq56vGlB.js +63 -0
  311. package/dist/sv-SE-N-Hqwcjq.js +65 -0
  312. package/dist/tax-reporting-graph-hgoilCHZ.js +504 -0
  313. package/dist/terminal-1-D1pwXCoi.js +18 -0
  314. package/dist/tink-logo-DDyjz5eJ.js +17 -0
  315. package/dist/types/api/address/useAddressCleanse.d.ts +1 -1
  316. package/dist/types/api/address/useRetrieveAddress.d.ts +1 -1
  317. package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +1 -1
  318. package/dist/types/api/address/useSearchAddress.d.ts +1 -2
  319. package/dist/types/api/businessLines/useBusinessLines.d.ts +3 -3
  320. package/dist/types/api/businessLines/useCreateBusinessLine.d.ts +2 -2
  321. package/dist/types/api/businessLines/useDeleteBusinessLine.d.ts +2 -2
  322. package/dist/types/api/businessLines/useUpdateBusinessLines.d.ts +2 -2
  323. package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +2 -2
  324. package/dist/types/api/check/useCheck.d.ts +1 -2
  325. package/dist/types/api/companyDataSet/useClearCompanyData.d.ts +2 -2
  326. package/dist/types/api/companySearch/useCompanySearch.d.ts +1 -2
  327. package/dist/types/api/companySelection/useCompanySelection.d.ts +1 -1
  328. package/dist/types/api/configurations/useScenarios.d.ts +3 -161
  329. package/dist/types/api/configurations/useSupportedCountries.d.ts +1 -1
  330. package/dist/types/api/configurations/useTaskTypes.d.ts +1 -1
  331. package/dist/types/api/configurations/useVersionConfiguration.d.ts +1 -1
  332. package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +2 -2
  333. package/dist/types/api/datasets/useLegalForms.d.ts +1 -1
  334. package/dist/types/api/datasets/useNaceCodes.d.ts +1 -1
  335. package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +1 -1
  336. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +2 -4
  337. package/dist/types/api/documents/useCreateDocument.d.ts +2 -2
  338. package/dist/types/api/documents/useDeleteDocument.d.ts +2 -2
  339. package/dist/types/api/documents/useDocument.d.ts +2 -2
  340. package/dist/types/api/documents/useDocuments.d.ts +4 -0
  341. package/dist/types/api/documents/useUpdateDocument.d.ts +2 -2
  342. package/dist/types/api/entityVerifications/useVerifyIdNumber.d.ts +2 -2
  343. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +3 -4
  344. package/dist/types/api/idVerificationProviders/idVerificationStartCheck.d.ts +2 -2
  345. package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +2 -2
  346. package/dist/types/api/idVerificationProviders/useIdVerificationToken.d.ts +3 -3
  347. package/dist/types/api/industryCodes/useIndustryCodes.d.ts +1 -2
  348. package/dist/types/api/legalEntity/useConfirmReview.d.ts +2 -2
  349. package/dist/types/api/legalEntity/useLegalEntity.d.ts +8 -389
  350. package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +2 -2
  351. package/dist/types/api/onboardingStatus/useGenerateOnboardingLink.d.ts +2 -2
  352. package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
  353. package/dist/types/api/openId/useOpenIdAuthorizationLink.d.ts +1 -2
  354. package/dist/types/api/pci/usePciQuestionnaireList.d.ts +1 -1
  355. package/dist/types/api/pci/usePciStatus.d.ts +1 -1
  356. package/dist/types/api/pci/usePciTemplate.d.ts +1 -1
  357. package/dist/types/api/pci/useSignPci.d.ts +2 -3
  358. package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +1 -1
  359. package/dist/types/api/queryKeys.d.ts +4 -2
  360. package/dist/types/api/taskStatus/useTaskStatus.d.ts +2 -2
  361. package/dist/types/api/taxClassification/useTaxClassification.d.ts +1 -1
  362. package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +2 -3
  363. package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +1 -7
  364. package/dist/types/api/termsOfService/useTermsOfService.d.ts +1 -1
  365. package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +1 -1
  366. package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +1 -1
  367. package/dist/types/api/tinVerification/useVerifyTin.d.ts +1 -1
  368. package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -1
  369. package/dist/types/api/transferInstruments/useCreateTrustedTransferInstrument.d.ts +1 -1
  370. package/dist/types/api/transferInstruments/useDeleteTransferInstrument.d.ts +1 -1
  371. package/dist/types/api/transferInstruments/useHandleBankVerificationError.d.ts +1 -1
  372. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +2 -2
  373. package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -1
  374. package/dist/types/api/transferInstruments/useUpdateTransferInstrument.d.ts +1 -1
  375. package/dist/types/api/transferInstruments/useUpdateTrustedTransferInstrument.d.ts +15 -0
  376. package/dist/types/api/types.d.ts +3 -2
  377. package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -2
  378. package/dist/types/api/uiAnalytics/usePushAnalyticEvent.d.ts +2 -2
  379. package/dist/types/api/validation/useValidateAccountIdentification.d.ts +2 -3
  380. package/dist/types/api/validation/useValidatePhoneNumber.d.ts +1 -1
  381. package/dist/types/components/Apps/tasks/TaskList/utils.d.ts +4 -0
  382. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +1 -2
  383. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +0 -1
  384. package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +1 -0
  385. package/dist/types/components/BankAccount/forms/BankVerification/verification/overlay/BankVerificationOverlay.d.ts +1 -1
  386. package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +1 -1
  387. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +0 -1
  388. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +439 -439
  389. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +3 -3
  390. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
  391. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
  392. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +1 -1
  393. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformation.d.ts +0 -2
  394. package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +0 -3
  395. package/dist/types/components/Business/forms/BusinessDetails/form-ids.d.ts +2 -0
  396. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +12 -11
  397. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -1
  398. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +4 -4
  399. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructure.d.ts +0 -1
  400. package/dist/types/components/Business/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +4 -0
  401. package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +3 -0
  402. package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +3 -0
  403. package/dist/types/components/Business/forms/rules.d.ts +10 -10
  404. package/dist/types/components/Business/mapping/businessDetails/businessBankAccountTaxIdUtils.d.ts +7 -0
  405. package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +4 -2
  406. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +8 -1
  407. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -2
  408. package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +1 -1
  409. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +0 -2
  410. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +7 -2
  411. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +3 -4
  412. package/dist/types/components/Business/utils/companyUtil.d.ts +0 -10
  413. package/dist/types/components/Business/utils/useBusinessDetailsData.d.ts +21 -0
  414. package/dist/types/components/BusinessLines/constants.d.ts +2 -0
  415. package/dist/types/components/BusinessLines/fields/Carousel/Carousel.d.ts +10 -10
  416. package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +1 -1
  417. package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +1 -1
  418. package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +1 -2
  419. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLineModal/BusinessLineModal.d.ts +2 -1
  420. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +1 -1
  421. package/dist/types/components/BusinessLines/tasks/types.d.ts +2 -0
  422. package/dist/types/components/BusinessLines/tasks/utils.d.ts +10 -7
  423. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -1
  424. package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
  425. package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
  426. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5771 -541
  427. package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +3 -2
  428. package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -1
  429. package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +1 -2
  430. package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +1 -2
  431. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingSoleProprietor.d.ts +2 -0
  432. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSoleProprietorPersonalInformation.d.ts +4 -0
  433. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -0
  434. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +14 -3
  435. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +10 -1
  436. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +20 -21
  437. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +6 -4
  438. package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +1 -2
  439. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +2 -1
  440. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -2
  441. package/dist/types/components/EmbeddedDropins/InvitedDecisionMakerComponent/InvitedDecisionMakerComponent.d.ts +4 -0
  442. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
  443. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/RouterDropinComposer.d.ts +4 -0
  444. package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -1
  445. package/dist/types/components/Individual/fields/IdentityNumber/fieldConfig.d.ts +4 -3
  446. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +29 -0
  447. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/Identity.types.d.ts +13 -0
  448. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/TypeOfIdentity/index.d.ts +11 -0
  449. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/validate.d.ts +4 -0
  450. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/validate.d.ts +22 -0
  451. package/dist/types/components/Individual/forms/BasicDetails/BasicDetails.types.d.ts +22 -0
  452. package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +8 -0
  453. package/dist/types/components/Individual/forms/DataConflictsModal/ConflictRow.d.ts +12 -0
  454. package/dist/types/components/Individual/forms/DataConflictsModal/DataConflictsModal.d.ts +24 -0
  455. package/dist/types/components/Individual/forms/IdDocumentUpload/types.d.ts +43 -0
  456. package/dist/types/components/Individual/forms/IdDocumentUpload/utils.d.ts +3 -0
  457. package/dist/types/components/Individual/forms/IdNowVerificationModal/isIdNowModalOpen.d.ts +18 -0
  458. package/dist/types/components/Individual/forms/IdVerificationMethod/IdVerificationMethod.types.d.ts +21 -0
  459. package/dist/types/components/Individual/forms/IdVerificationMethod/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +7 -0
  460. package/dist/types/components/Individual/forms/IdVerificationMethod/UploadedDocument/UploadedDocument.d.ts +7 -0
  461. package/dist/types/components/Individual/forms/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +46 -0
  462. package/dist/types/components/Individual/forms/IdVerificationMethod/mapExtractionResultToSchema.d.ts +4 -0
  463. package/dist/types/components/Individual/forms/IdVerificationMethod/validateExtractionResult.d.ts +12 -0
  464. package/dist/types/components/Individual/forms/Individual.d.ts +56 -0
  465. package/dist/types/components/Individual/forms/Individual.rules.d.ts +45 -0
  466. package/dist/types/components/Individual/forms/Individual.types.d.ts +60 -0
  467. package/dist/types/components/Individual/forms/ProofOfRelationship/types.d.ts +14 -0
  468. package/dist/types/components/Individual/forms/ProofOfResidency/types.d.ts +39 -0
  469. package/dist/types/components/Individual/forms/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +6 -0
  470. package/dist/types/components/Individual/forms/UboQuestionnaire/UboQuestionnaire.types.d.ts +13 -0
  471. package/dist/types/components/Individual/forms/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +7 -0
  472. package/dist/types/components/Individual/forms/form-ids.d.ts +2 -0
  473. package/dist/types/components/Individual/helpers/bafinUtils.d.ts +3 -2
  474. package/dist/types/components/Individual/helpers/mandateIdVerificationForMotionCapture.d.ts +2 -3
  475. package/dist/types/components/Individual/helpers/roleUtils.d.ts +1 -1
  476. package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +1 -1
  477. package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +1 -1
  478. package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +6 -12
  479. package/dist/types/components/Individual/mapping/mapApiDocumentToIndividualDocuments.d.ts +2 -2
  480. package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -3
  481. package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +5 -0
  482. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualSchema.d.ts +3 -0
  483. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +6 -7
  484. package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +2 -2
  485. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -2
  486. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +2 -14
  487. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/remediation.config.d.ts +0 -2
  488. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +8 -0
  489. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +1 -1
  490. package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +2 -2
  491. package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +3 -3
  492. package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +0 -1
  493. package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
  494. package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +2 -0
  495. package/dist/types/components/Shared/Introduction/copy.d.ts +3 -3
  496. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
  497. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +10 -0
  498. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +2 -1
  499. package/dist/types/components/Shared/fields/CountryField/types.d.ts +2 -1
  500. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
  501. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
  502. package/dist/types/components/Shared/fields/Currency/Currency.d.ts +1 -1
  503. package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
  504. package/dist/types/components/Shared/fields/DBANameField/DBANameField.d.ts +1 -1
  505. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -1
  506. package/dist/types/components/Shared/fields/DateOfIncorporationField/DateOfIncorporationField.d.ts +1 -1
  507. package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +3 -1
  508. package/dist/types/components/Shared/fields/EInvoicingCodeField/EInvoicingCodeField.d.ts +1 -1
  509. package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
  510. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +121 -1
  511. package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +1 -1
  512. package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
  513. package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +12 -6
  514. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +3 -1
  515. package/dist/types/components/Shared/fields/LocalizedNameFields/types.d.ts +9 -0
  516. package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +5 -0
  517. package/dist/types/components/Shared/fields/NumberOfEmployees/NumberOfEmployees.d.ts +1 -1
  518. package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
  519. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
  520. package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +5 -0
  521. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -1
  522. package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
  523. package/dist/types/components/Shared/fields/StateField/fieldConfig.d.ts +8 -0
  524. package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
  525. package/dist/types/components/Shared/fields/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
  526. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  527. package/dist/types/components/Shared/fields/StockISINField/StockISINField.d.ts +1 -1
  528. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  529. package/dist/types/components/Shared/fields/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
  530. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  531. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -1
  532. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +6 -0
  533. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +2 -1
  534. package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
  535. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +1 -1
  536. package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
  537. package/dist/types/components/Shared/forms/Address/localized/jp/jpAddressSchema.d.ts +3 -1
  538. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  539. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +1 -1
  540. package/dist/types/components/Trust/forms/Trust/rules.d.ts +2 -2
  541. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
  542. package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -2
  543. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +3 -3
  544. package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +5 -5
  545. package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +2 -2
  546. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +1 -1
  547. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiform.d.ts +2 -1
  548. package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +1 -2
  549. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -1
  550. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +5 -5
  551. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +3 -3
  552. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +1 -1
  553. package/dist/types/components/ui/atoms/Card/Card.d.ts +19 -0
  554. package/dist/types/components/ui/atoms/Loader/Loader.d.ts +11 -1
  555. package/dist/types/components/ui/atoms/MultiSelectList/MultiSelectList.d.ts +0 -1
  556. package/dist/types/components/ui/atoms/Svg/Svg.d.ts +0 -1
  557. package/dist/types/components/ui/atoms/Tile/Tile.d.ts +2 -1
  558. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +2 -2
  559. package/dist/types/components/ui/molecules/ErrorPanel/ErrorPanel.d.ts +0 -1
  560. package/dist/types/context/ExperimentContext/types.d.ts +19 -42
  561. package/dist/types/context/QueryContext/QueryClient.d.ts +1 -1
  562. package/dist/types/context/StateContext/types.d.ts +2 -3
  563. package/dist/types/core/models/api/individual.d.ts +3 -0
  564. package/dist/types/core/models/api/instant-id-verification.d.ts +1 -1
  565. package/dist/types/core/models/api/legal-arrangement.d.ts +3 -0
  566. package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
  567. package/dist/types/core/process-field-configurations.d.ts +0 -5
  568. package/dist/types/core/services/types.d.ts +1 -1
  569. package/dist/types/core/user-events.d.ts +4 -2
  570. package/dist/types/embeds/baseEmbedProps.d.ts +0 -21
  571. package/dist/types/embeds/business-financing/adyen-business-financing.d.ts +2 -1
  572. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.d.ts +5 -1
  573. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +2 -2
  574. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.d.ts +5 -0
  575. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.types.d.ts +34 -0
  576. package/dist/types/embeds/onboarding/adyen-onboarding.d.ts +2 -1
  577. package/dist/types/embeds/terms-of-service-management/adyen-terms-of-service-management.d.ts +5 -1
  578. package/dist/types/embeds/transfer-instrument-configuration/adyen-transfer-instrument-configuration.d.ts +2 -1
  579. package/dist/types/embeds/verification-status/adyen-verification-status.d.ts +2 -1
  580. package/dist/types/hooks/useAssociatedLegalEntity.d.ts +1 -1
  581. package/dist/types/hooks/useForm/types.d.ts +0 -8
  582. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +4 -2
  583. package/dist/types/hooks/usePageLandedEvent.d.ts +7 -0
  584. package/dist/types/hooks/useUboQuestionnaire.d.ts +2 -2
  585. package/dist/types/language/types.d.ts +7 -2
  586. package/dist/types/language/utils.d.ts +1 -2
  587. package/dist/types/router/DefaultRouteRedirect.d.ts +8 -0
  588. package/dist/types/router/MemoryRouterContext.d.ts +9 -0
  589. package/dist/types/router/OnboardingRouter.d.ts +39 -0
  590. package/dist/types/router/SuspenseRoute.d.ts +7 -0
  591. package/dist/types/router/getDefaultTask.d.ts +16 -0
  592. package/dist/types/router/routeConfig.d.ts +68 -0
  593. package/dist/types/router/useCurrentTask.d.ts +5 -0
  594. package/dist/types/router/useNavigate.d.ts +7 -0
  595. package/dist/types/stores/formState.d.ts +1 -1
  596. package/dist/types/stores/globalStore/taskStatus.d.ts +5 -3
  597. package/dist/types/types/assert.d.ts +1 -0
  598. package/dist/types/types/form-rules.d.ts +0 -1
  599. package/dist/types/utils/addLinkedFields.d.ts +0 -2
  600. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +1 -0
  601. package/dist/types/utils/analytics/getPrefilledDetails.d.ts +28 -0
  602. package/dist/types/utils/api/documentUtils.d.ts +6 -0
  603. package/dist/types/utils/api/processCapabilitites.d.ts +14 -2
  604. package/dist/types/utils/birthDateUtils.d.ts +0 -17
  605. package/dist/types/utils/entityAssociationUtil.d.ts +3 -4
  606. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  607. package/dist/types/utils/fieldConfigurations.d.ts +0 -2
  608. package/dist/types/utils/formUtils.d.ts +1 -6
  609. package/dist/types/utils/getDisplayErrorMessage.d.ts +1 -2
  610. package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -3
  611. package/dist/types/utils/getName.d.ts +1 -1
  612. package/dist/types/utils/japanSupportUtils.d.ts +2 -1
  613. package/dist/types/utils/logger.d.ts +0 -1
  614. package/dist/types/utils/makeSelectItemForRole.d.ts +1 -1
  615. package/dist/types/utils/performance.d.ts +64 -0
  616. package/dist/types/utils/regex/patternValidators.d.ts +1 -1
  617. package/dist/types/utils/translation.d.ts +3 -2
  618. package/dist/types/utils/validatorUtils.d.ts +2 -1
  619. package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +3 -2
  620. package/dist/types-B7GElie6.js +138 -0
  621. package/dist/types-BQL9Lsg4.js +74 -0
  622. package/dist/types-C8io4KaH.js +64 -0
  623. package/dist/types-DwXc_yI8.js +34 -0
  624. package/dist/unincorporated-partnership-MeN1dp53.js +97 -0
  625. package/dist/upload-BmUXjsaU.js +17 -0
  626. package/dist/us-check-C1rTBsCY.js +46 -0
  627. package/dist/us-check-account-number-9lI1dXNC.js +48 -0
  628. package/dist/us-check-routing-number-s_KaAGSM.js +49 -0
  629. package/dist/useAssociatedLegalEntity-ETDoz1H2.js +34 -0
  630. package/dist/useBusinessDetailsData-FrL0b9Ni.js +5197 -0
  631. package/dist/useBusinessLines-C5NQ5pE8.js +29 -0
  632. package/dist/useCanSeeIntroduction-BdZJ7k-_.js +48 -0
  633. package/dist/useCreateLegalEntity-DrcLoNYT.js +32 -0
  634. package/dist/useDataMissingRemediations-Zgtpw7uZ.js +41 -0
  635. package/dist/useDataset-Cap5ZjTr.js +76 -0
  636. package/dist/useDeleteTransferInstrument-B2wRj-qL.js +32 -0
  637. package/dist/useForm-DqUW2TbW.js +582 -0
  638. package/dist/useFormContext-CkuaJPUI.js +201 -0
  639. package/dist/useGlobalData-5Z6W3or1.js +68 -0
  640. package/dist/useId-BZ0PA7jP.js +24 -0
  641. package/dist/useMultiForm-Dm2IEMH9.js +873 -0
  642. package/dist/useNavigate-CI0N-POy.js +265 -0
  643. package/dist/useOnboardingStatus-H7Xqe2GC.js +28 -0
  644. package/dist/usePciQuestionnaireList-BF7TPjbQ.js +29 -0
  645. package/dist/useSalesChannels-DYGRfKeh.js +65 -0
  646. package/dist/useScenarios-CibP5LVa.js +48 -0
  647. package/dist/useSetting-CbBaitp6.js +19 -0
  648. package/dist/useTaskStatus-1OZ2clnm.js +51 -0
  649. package/dist/useTermsOfServiceStatus-Dg_nBQgt.js +43 -0
  650. package/dist/useToastContext-D643iewp.js +49 -0
  651. package/dist/useTrustMembers-BTCDIu6B.js +163 -0
  652. package/dist/useUnincorporatedPartnershipMembers-BM9dNg4i.js +99 -0
  653. package/dist/useUpdateBusinessLines-BuW6Vnof.js +339 -0
  654. package/dist/useUpdateLegalEntity-tRw1V_Mt.js +40 -0
  655. package/dist/utils-BasWTkqk.js +159 -0
  656. package/dist/utils-BnolcW6V.js +237 -0
  657. package/dist/utils-D9h2Aq2w.js +778 -0
  658. package/dist/utils-PkTZS9uf.js +58 -0
  659. package/dist/utils-b_KUV0wb.js +29 -0
  660. package/dist/validate-CtxacqMv.js +434 -0
  661. package/dist/validate-K0fmvoFj.js +108 -0
  662. package/dist/validationError-DdlWONz2.js +86 -0
  663. package/dist/warning-circle-fill-DBvt921B.js +17 -0
  664. package/dist/warning-diamond-filled-Lb2od2ry.js +17 -0
  665. package/dist/webinar-m9nuFZBt.js +22 -0
  666. package/dist/yapily-logo-BduxhNRA.js +17 -0
  667. package/package.json +88 -56
  668. package/dist/4-people-BzyXLUF9.js +0 -24
  669. package/dist/AcceptTermsOfServiceComponent-DmtE39CC.js +0 -642
  670. package/dist/Accordion-C-BvE1VA.js +0 -88
  671. package/dist/AccountSetupRejected-DDoI43lB.js +0 -26
  672. package/dist/ActionBar-Dzrzolec.js +0 -31
  673. package/dist/Address-e41CN3CB.js +0 -1317
  674. package/dist/Alert-Dk-oZlnx.js +0 -159
  675. package/dist/Avatar-efxn8pKz.js +0 -60
  676. package/dist/BusinessDetailsDropin-DDh_D2hv.js +0 -2359
  677. package/dist/BusinessFinancingComponent-C04uRrhE.js +0 -55
  678. package/dist/BusinessFinancingDropin-_OlSqohS.js +0 -1843
  679. package/dist/BusinessFinancingPage-DdMugwOa.js +0 -43
  680. package/dist/BusinessTypeSelectionPage-vkCTEFEJ.js +0 -426
  681. package/dist/Card-CqXQA0AI.js +0 -82
  682. package/dist/ConstitutionalDocument-CcwyClZ7.js +0 -143
  683. package/dist/ContractViewer-Byp71k2e.js +0 -935
  684. package/dist/CountryField-CzRN1OE8.js +0 -843
  685. package/dist/CreateIndividualComponent-BNeY6u8q.js +0 -71
  686. package/dist/CreateTransferInstrumentComponent-B8cNHRdF.js +0 -63
  687. package/dist/Currency-BBt4yo5i.js +0 -183
  688. package/dist/CustomerSupport-CObTT8cH.js +0 -153
  689. package/dist/DebugModal-DJcim6UP.js +0 -413
  690. package/dist/DecisionMakerDetailsPage-CrQgRW8X.js +0 -106
  691. package/dist/DecisionMakers-B-3aMddf.js +0 -842
  692. package/dist/EmbeddedStatus-C_5DguHv.js +0 -99
  693. package/dist/EndStateLayout-CwdrDEYY.js +0 -71
  694. package/dist/EntityAssociation-C413vcu6.js +0 -159
  695. package/dist/EntityGuidanceStatus-C6b8i7os.js +0 -105
  696. package/dist/FormFlow-PppMJ6OA.js +0 -186
  697. package/dist/FormNavigation-DL47b_QR.js +0 -144
  698. package/dist/FormWrapper-BOrTn1C8.js +0 -135
  699. package/dist/IndividualOnfido-CmmyKC7J.js +0 -9631
  700. package/dist/IndividualOnfidoDropin-BsCb6dvy.js +0 -2569
  701. package/dist/InputText-BfL9DgWp.js +0 -249
  702. package/dist/Introduction-CBMl7v2M.js +0 -300
  703. package/dist/JpAddress-BCwWQ0Ul.js +0 -271
  704. package/dist/LegalRepresentativeDetailsPage-CDURNY_v.js +0 -60
  705. package/dist/ListItem-BhUSZdS5.js +0 -69
  706. package/dist/ManageIndividualComponent-wYIuZdQ8.js +0 -46
  707. package/dist/ManageTermsOfServiceComponent-6RBHbbsn.js +0 -52
  708. package/dist/ManageTransferInstrumentComponent-BDyWbySW.js +0 -287
  709. package/dist/MaybeModal-CG0BAO68.js +0 -36
  710. package/dist/Modal-CJ_hgcGb.js +0 -149
  711. package/dist/OnboardingDropinComponent-D3dYF_4W.js +0 -7617
  712. package/dist/PayoutDetailsDropin-DxALk48X.js +0 -4840
  713. package/dist/Review-C_JnI94L.js +0 -83
  714. package/dist/RootBusinessDetailsPage-BE3Uck1r.js +0 -46
  715. package/dist/RootBusinessLinesPage-DknXuZgi.js +0 -1484
  716. package/dist/RootIndividualDetailsPage-BIj988Sh.js +0 -71
  717. package/dist/SignPCIComponent-BjVEKTlw.js +0 -304
  718. package/dist/SingpassSelection-Bkbz_bGo.js +0 -130
  719. package/dist/SoleProprietorshipPage-DSOEsSfJ.js +0 -46
  720. package/dist/SourceOfFundsPage-cWwthA_A.js +0 -2383
  721. package/dist/Spacer-D4I0f08n.js +0 -1416
  722. package/dist/StepProgressIndicator-FNAEisRr.js +0 -78
  723. package/dist/StoreProvider-jtUYKLRz.js +0 -7707
  724. package/dist/Summary-COehg8IT.js +0 -204
  725. package/dist/TaxReportingDropin-BBkhMcPn.js +0 -501
  726. package/dist/TrustDetailsPage-50i4_lFA.js +0 -2149
  727. package/dist/TrustMemberCompanyPage-v2Md1srF.js +0 -57
  728. package/dist/TrustMemberIndividualPage-Bn6TXkhN.js +0 -66
  729. package/dist/TrustMemberRoleAndTypePage-C_NPNe6_.js +0 -985
  730. package/dist/TrustMembersOverview-FcSsQZ3Z.js +0 -438
  731. package/dist/UnincorporatedPartnershipIndividualPage-zsyk9RTz.js +0 -65
  732. package/dist/UnincorporatedPartnershipMemberCompanyPage-FP75ZgOg.js +0 -60
  733. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-n6SndOAj.js +0 -281
  734. package/dist/UnincorporatedPartnershipMembersOverview-BbW2q9EI.js +0 -172
  735. package/dist/VerificationErrorAlert-B7jRGdgn.js +0 -79
  736. package/dist/ViewVerificationStatusComponent-CuUmC319.js +0 -180
  737. package/dist/arrow-right-KxA3SvQj.js +0 -14
  738. package/dist/bag-BPumznWh.js +0 -14
  739. package/dist/bank-D6FiNBhs.js +0 -14
  740. package/dist/bin-Bz6KOIeE.js +0 -18
  741. package/dist/business-lines-DboUCbXw.js +0 -135
  742. package/dist/capital-GVQ3svwN.js +0 -17
  743. package/dist/cash-stack-D9AoDDwt.js +0 -22
  744. package/dist/certificate-CdEWgHQf.js +0 -17
  745. package/dist/checkmark-Q7x6tGhy.js +0 -14
  746. package/dist/checkmark-circle-fill-CsvN5_PL.js +0 -17
  747. package/dist/checkmark-circle-x7dzbp3I.js +0 -20
  748. package/dist/checkmark-small-D35myntq.js +0 -14
  749. package/dist/chevron-down-C2iDorpW.js +0 -14
  750. package/dist/chevron-left-ztPO84q-.js +0 -14
  751. package/dist/chevron-right-C_JN0oDt.js +0 -14
  752. package/dist/chevron-up-CgG8n25g.js +0 -14
  753. package/dist/circle-Bt3Nlr3q.js +0 -17
  754. package/dist/circle-small-filled-YMzP6yQU.js +0 -14
  755. package/dist/clock-BZHremOA.js +0 -20
  756. package/dist/coins-fkAk6dCo.js +0 -17
  757. package/dist/contract-BTa4HltT.js +0 -14
  758. package/dist/cross-Cn09MtQ_.js +0 -14
  759. package/dist/cross-circle-fill-maan7Z5S.js +0 -17
  760. package/dist/cross-circle-fill-small-DCz52AuN.js +0 -14
  761. package/dist/da-DK-BlU1EczG.js +0 -30
  762. package/dist/da-DK-DEdQ-QPp.js +0 -13
  763. package/dist/da-DK-DYpfNZdP.js +0 -37
  764. package/dist/da-DK-Dc0QYG8m.js +0 -68
  765. package/dist/da-DK-DqkN5oIu.js +0 -13
  766. package/dist/da-DK-jK7c9UL0.js +0 -57
  767. package/dist/de-DE-BXt1K0Tr.js +0 -37
  768. package/dist/de-DE-COuUdtao.js +0 -13
  769. package/dist/de-DE-DrSSblam.js +0 -13
  770. package/dist/de-DE-Dz2OsS1F.js +0 -68
  771. package/dist/de-DE-s0B-XZyp.js +0 -30
  772. package/dist/de-DE-wmerDL2e.js +0 -57
  773. package/dist/debouncedInputEvent-HhImBs4O.js +0 -109
  774. package/dist/decision-makers-group-CgddXgrx.js +0 -1944
  775. package/dist/digital-wallet-D_IpxnkN.js +0 -46
  776. package/dist/document-1-C08ut-Dt.js +0 -14
  777. package/dist/document-blurred-2Zpodj3_.js +0 -37
  778. package/dist/document-cut-off-ClS7RiOp.js +0 -32
  779. package/dist/document-expired-CjksBq-N.js +0 -38
  780. package/dist/document-front-DiAairT3.js +0 -30
  781. package/dist/document-person-vxlA6C5f.js +0 -20
  782. package/dist/documentUtils-DIcRD9lR.js +0 -218
  783. package/dist/download-Drhk9k1f.js +0 -17
  784. package/dist/dropinUtils-BK1u6OTG.js +0 -200
  785. package/dist/edit-1-CFoDTMvQ.js +0 -14
  786. package/dist/el-GR-CdgLZhuO.js +0 -13
  787. package/dist/en-US-CzEL6t1W.js +0 -55
  788. package/dist/en-US-D-B35AoN.js +0 -68
  789. package/dist/en-US-Dg505Oh3.js +0 -37
  790. package/dist/en-US-d4WBvUW7.js +0 -118
  791. package/dist/en-US-fyGPkcqX.js +0 -13
  792. package/dist/en-US-gsp7CD_E.js +0 -57
  793. package/dist/es-ES-BI_jdT67.js +0 -68
  794. package/dist/es-ES-BhNhIf08.js +0 -37
  795. package/dist/es-ES-DNGEW6V_.js +0 -13
  796. package/dist/es-ES-Qnc0Q6JH.js +0 -57
  797. package/dist/es-ES-ShWaSuJd.js +0 -13
  798. package/dist/es-ES-esfwvKwz.js +0 -30
  799. package/dist/external-link-DCMYUMfW.js +0 -14
  800. package/dist/fi-FI-ChApf7lf.js +0 -13
  801. package/dist/fi-FI-CjB6QC01.js +0 -30
  802. package/dist/fi-FI-CoI_94Fv.js +0 -13
  803. package/dist/fi-FI-Dn2MC8uW.js +0 -57
  804. package/dist/fi-FI-hwzizPnr.js +0 -68
  805. package/dist/fi-FI-ysUrBilO.js +0 -37
  806. package/dist/fr-FR-BSvSKazD.js +0 -37
  807. package/dist/fr-FR-BWX14yb7.js +0 -57
  808. package/dist/fr-FR-Br7OeDIe.js +0 -13
  809. package/dist/fr-FR-C1XqLftn.js +0 -30
  810. package/dist/fr-FR-CYZXbwc9.js +0 -68
  811. package/dist/fr-FR-Q3urMjbl.js +0 -13
  812. package/dist/funds-in-D8bj0aoE.js +0 -21
  813. package/dist/getFieldsWithExistingData-DxCFyXNd.js +0 -22
  814. package/dist/getName-BS-pHwl0.js +0 -41
  815. package/dist/gift-CQ_DEma7.js +0 -14
  816. package/dist/graph-BJmqglH2.js +0 -21
  817. package/dist/graph-up-Bq6adtlX.js +0 -20
  818. package/dist/hasDataChanged-CWdnpJrE.js +0 -19
  819. package/dist/headquarter-DNYyuuFq.js +0 -21
  820. package/dist/hotel-BuNql78Z.js +0 -22
  821. package/dist/house-B6sNRj-B.js +0 -21
  822. package/dist/id-blurred-9dzBOWCE.js +0 -59
  823. package/dist/id-cut-off-CohJCI2h.js +0 -55
  824. package/dist/id-front-CSZfvdRg.js +0 -52
  825. package/dist/id-glare-Q2JWo5ts.js +0 -49
  826. package/dist/id-verification-instant-BUVBO4R3.js +0 -58
  827. package/dist/id-verification-manual-B3YZALYU.js +0 -55
  828. package/dist/iframeWidget-Uz4rHS0r.js +0 -234
  829. package/dist/image-BSihO8lR.js +0 -17
  830. package/dist/info-filled-SQotHmT9.js +0 -17
  831. package/dist/info-vHTZWoJ7.js +0 -21
  832. package/dist/instant-verification-Dvvkyfmp.js +0 -40
  833. package/dist/it-IT-B0YGvVgW.js +0 -57
  834. package/dist/it-IT-BAvsF2TB.js +0 -13
  835. package/dist/it-IT-C_YDqVNT.js +0 -30
  836. package/dist/it-IT-Erh1DIlj.js +0 -68
  837. package/dist/it-IT-Qfzc8jnW.js +0 -37
  838. package/dist/it-IT-vdMlF0Ha.js +0 -13
  839. package/dist/localizeDateString-DgSdo3D5.js +0 -27
  840. package/dist/location-Q4oKvnkl.js +0 -17
  841. package/dist/mail-BOdyoVqB.js +0 -14
  842. package/dist/manual-verification-BvZWqA00.js +0 -41
  843. package/dist/mapExistingFile-CqrlnmFQ.js +0 -156
  844. package/dist/mapFinancialReportsToFinancialInformation-ZmhVRj3f.js +0 -67
  845. package/dist/mapJpAddressSchemaToAddressLocalizations-D6HjhjJT.js +0 -63
  846. package/dist/mapLegalEntityToIndividualOnfidoSchema-COcit7Hx.js +0 -146
  847. package/dist/mapTransferInstrumentToPayoutAccount-DfJHF9H8.js +0 -33
  848. package/dist/minus-circle-filled-kC2IUvKz.js +0 -17
  849. package/dist/nl-NL-BMUYBqlF.js +0 -57
  850. package/dist/nl-NL-BwKrj-29.js +0 -13
  851. package/dist/nl-NL-C3YJkSIj.js +0 -13
  852. package/dist/nl-NL-D7gBNWEY.js +0 -37
  853. package/dist/nl-NL-DyeSX0PH.js +0 -30
  854. package/dist/nl-NL-O9GCHMDA.js +0 -68
  855. package/dist/no-NO-B6OPS2CA.js +0 -13
  856. package/dist/no-NO-C-gCYc9q.js +0 -37
  857. package/dist/no-NO-CA1aR6Wh.js +0 -68
  858. package/dist/no-NO-D4BECLky.js +0 -130
  859. package/dist/no-NO-DKbWxgF-.js +0 -57
  860. package/dist/no-NO-DPRsAb_o.js +0 -30
  861. package/dist/onfido-logo-BWSv__sQ.js +0 -14
  862. package/dist/options-horizontal-CBmbNv7R.js +0 -18
  863. package/dist/partner-CPjsrePY.js +0 -18
  864. package/dist/passport-blurred-B4UDQfmc.js +0 -59
  865. package/dist/passport-cut-off-C0N2mgLk.js +0 -56
  866. package/dist/passport-front-BwA7wR91.js +0 -52
  867. package/dist/passport-front-green-BL4HmtsB.js +0 -232
  868. package/dist/passport-glare-Mg2ixsYA.js +0 -50
  869. package/dist/pay-by-link-plane-BVZndh67.js +0 -22
  870. package/dist/payout-ChUEoLjt.js +0 -20
  871. package/dist/payout-verification-instant-5u-wvFKv.js +0 -41
  872. package/dist/payout-verification-manual-BH2mu0UW.js +0 -90
  873. package/dist/person-DGjUU4S4.js +0 -17
  874. package/dist/plaid-logo-CtActXTN.js +0 -14
  875. package/dist/plus-CWXA5wdX.js +0 -14
  876. package/dist/plus-circle-filled-CbC0u2Y1.js +0 -17
  877. package/dist/process-field-configurations-N1jHgPa8.js +0 -324
  878. package/dist/pt-BR--kaJvtE6.js +0 -57
  879. package/dist/pt-BR-BKQRvAfq.js +0 -13
  880. package/dist/pt-BR-C-C4ZJ9x.js +0 -30
  881. package/dist/pt-BR-NtLaWlnZ.js +0 -68
  882. package/dist/pt-BR-gh27BC86.js +0 -13
  883. package/dist/pt-BR-ur86nRrK.js +0 -37
  884. package/dist/pt-PT-B4F_5NWi.js +0 -55
  885. package/dist/pt-PT-BZ5ZZm6G.js +0 -57
  886. package/dist/pt-PT-Bf4IV7wp.js +0 -13
  887. package/dist/pt-PT-CFY1O_K0.js +0 -13
  888. package/dist/pt-PT-CIo3mlXL.js +0 -24
  889. package/dist/pt-PT-CVNEcs32.js +0 -37
  890. package/dist/pt-PT-D2Xe-OdG.js +0 -13
  891. package/dist/pt-PT-DSxxVA0f.js +0 -68
  892. package/dist/pt-PT-DVKtHjIY.js +0 -13
  893. package/dist/pt-PT-DYihdcJx.js +0 -13
  894. package/dist/pt-PT-Dm5DRDrd.js +0 -32
  895. package/dist/pt-PT-DpDxAynk.js +0 -13
  896. package/dist/pt-PT-JVqqgvPs.js +0 -54
  897. package/dist/pt-PT-LbneTcRx.js +0 -30
  898. package/dist/pt-PT-TKg5FLat.js +0 -27
  899. package/dist/recurring-CkL4cCM2.js +0 -17
  900. package/dist/reporting-DerosUNm.js +0 -16
  901. package/dist/resolveEnvironment-DZ77JxLV.js +0 -164
  902. package/dist/revenue-accelerate-Dp4Ns_5c.js +0 -17
  903. package/dist/review-CxIN9azU.js +0 -17
  904. package/dist/rules-_v8BprU3.js +0 -317
  905. package/dist/save-Fgy7EDid.js +0 -14
  906. package/dist/search-C4GZ-Rc1.js +0 -17
  907. package/dist/show-yPjPmEf8.js +0 -17
  908. package/dist/singpass-logo-BkMSwiGY.js +0 -17
  909. package/dist/singpass-verification-instant-hY4eGFwl.js +0 -40
  910. package/dist/singpass-verification-manual-DwhRpy5Q.js +0 -34
  911. package/dist/sl-SI-8SzKx7XD.js +0 -30
  912. package/dist/sl-SI-CUCrzJQv.js +0 -37
  913. package/dist/sl-SI-DdjgSySI.js +0 -13
  914. package/dist/sl-SI-DtdGMD6i.js +0 -57
  915. package/dist/solution-payments-CNAat9h7.js +0 -14
  916. package/dist/store-IuAkDRAp.js +0 -14
  917. package/dist/sv-SE-B7cpKp1l.js +0 -30
  918. package/dist/sv-SE-BHkYspm-.js +0 -130
  919. package/dist/sv-SE-C6uPh9g5.js +0 -37
  920. package/dist/sv-SE-K1QT1cOt.js +0 -68
  921. package/dist/sv-SE-kR514dO1.js +0 -57
  922. package/dist/sv-SE-zTiw1bUU.js +0 -13
  923. package/dist/tax-reporting-graph-DjzwRgE6.js +0 -504
  924. package/dist/terminal-1-_me9J9h0.js +0 -18
  925. package/dist/tink-logo-BcIv93ND.js +0 -17
  926. package/dist/types/components/Business/tasks/BusinessDetailsDropin/mandatoryFields.d.ts +0 -3
  927. package/dist/types/components/Individual/fields/DecisionMakerRole/DecisionMakerRole.d.ts +0 -3
  928. package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +0 -10
  929. package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +0 -23
  930. package/dist/types/components/Individual/fields/LocalizedNameFields/types.d.ts +0 -9
  931. package/dist/types/components/Individual/fields/NameFields/validate.d.ts +0 -4
  932. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentAlreadyUpload.d.ts +0 -2
  933. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentInstantVerification.d.ts +0 -3
  934. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentUpload.d.ts +0 -3
  935. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +0 -53
  936. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/utils.d.ts +0 -3
  937. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +0 -3
  938. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +0 -15
  939. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/types.d.ts +0 -14
  940. package/dist/types/components/Individual/forms/Individual/Individual.d.ts +0 -9
  941. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/Identity.d.ts +0 -2
  942. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +0 -2
  943. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/validate.d.ts +0 -3
  944. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +0 -2
  945. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/validate.d.ts +0 -3
  946. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +0 -2
  947. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/validate.d.ts +0 -3
  948. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/TypeOfIdentity/index.d.ts +0 -11
  949. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/identityUS/IdentityUS.d.ts +0 -4
  950. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/types.d.ts +0 -14
  951. package/dist/types/components/Individual/forms/Individual/PersonalDetails/PersonalDetails.d.ts +0 -3
  952. package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +0 -41
  953. package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +0 -21
  954. package/dist/types/components/Individual/forms/Individual/ProofOfRelationship/types.d.ts +0 -14
  955. package/dist/types/components/Individual/forms/Individual/ProofOfResidency/types.d.ts +0 -39
  956. package/dist/types/components/Individual/forms/Individual/rules.d.ts +0 -40
  957. package/dist/types/components/Individual/forms/Individual/types.d.ts +0 -51
  958. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +0 -29
  959. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/Identity.types.d.ts +0 -13
  960. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/TypeOfIdentity/index.d.ts +0 -11
  961. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/validate.d.ts +0 -4
  962. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +0 -22
  963. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +0 -22
  964. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/validate.d.ts +0 -6
  965. package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/ConflictRow.d.ts +0 -12
  966. package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/DataConflictsModal.d.ts +0 -24
  967. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +0 -17
  968. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +0 -20
  969. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +0 -7
  970. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/UploadedDocument/UploadedDocument.d.ts +0 -7
  971. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +0 -46
  972. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +0 -4
  973. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/validateExtractionResult.d.ts +0 -12
  974. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -52
  975. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +0 -46
  976. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +0 -59
  977. package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +0 -6
  978. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +0 -13
  979. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +0 -7
  980. package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +0 -4
  981. package/dist/types/components/Individual/mapping/adjustIdentificationData.d.ts +0 -3
  982. package/dist/types/components/Individual/mapping/getIdentityTypeToApiIdentityTypeMap.d.ts +0 -3
  983. package/dist/types/components/Individual/mapping/individualOnfidoKeyMappings.d.ts +0 -8
  984. package/dist/types/components/Individual/mapping/mapIndividualOnfidoSchemaToLegalEntity.d.ts +0 -5
  985. package/dist/types/components/Individual/mapping/mapIndividualToLegalEntity.d.ts +0 -3
  986. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividual.d.ts +0 -3
  987. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualOnfidoSchema.d.ts +0 -3
  988. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoDropin.d.ts +0 -2
  989. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/individualOnfidoFormConfig.d.ts +0 -4
  990. package/dist/types/components/Shared/forms/BusinessTypeSelection/EntityTypeRadioGroupCard.d.ts +0 -11
  991. package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +0 -4
  992. package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +0 -3
  993. package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +0 -3
  994. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +0 -8
  995. package/dist/types/components/ui/molecules/Card/Card.d.ts +0 -3
  996. package/dist/types/components/ui/molecules/Card/types.d.ts +0 -26
  997. package/dist/types/embeds/EmbedBaseElement.d.ts +0 -41
  998. package/dist/types/embeds/EmbedCore.d.ts +0 -22
  999. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +0 -14
  1000. package/dist/types/embeds/individual-configuration/AdyenIndividual.d.ts +0 -12
  1001. package/dist/types/embeds/individual-status/AdyenManageIndividual.d.ts +0 -12
  1002. package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +0 -12
  1003. package/dist/types/embeds/terms-of-service-management/AdyenTermsOfService.d.ts +0 -12
  1004. package/dist/types/embeds/terms-of-service-status/AdyenManageTermsOfService.d.ts +0 -12
  1005. package/dist/types/embeds/transfer-instrument-configuration/AdyenTransferInstrument.d.ts +0 -16
  1006. package/dist/types/embeds/transfer-instrument-management/AdyenManageTransferInstrument.d.ts +0 -14
  1007. package/dist/types/embeds/verification-status/AdyenVerificationStatus.d.ts +0 -20
  1008. package/dist/types-BnnF5_7m.js +0 -34
  1009. package/dist/types-D0u3f6aG.js +0 -87
  1010. package/dist/types-Dk94b8kx.js +0 -161
  1011. package/dist/types-sYQKhaSL.js +0 -74
  1012. package/dist/upload-BF65P4KM.js +0 -17
  1013. package/dist/us-check-CYY6Crhr.js +0 -46
  1014. package/dist/us-check-account-number-C7KE5YzX.js +0 -48
  1015. package/dist/us-check-routing-number-DUbhsYAR.js +0 -49
  1016. package/dist/useAssociatedLegalEntity-00JVCmQ7.js +0 -33
  1017. package/dist/useCreateLegalEntity-BvvwB9r0.js +0 -31
  1018. package/dist/useDataset-8WyOJBhU.js +0 -220
  1019. package/dist/useForm-DLxHtZTP.js +0 -1624
  1020. package/dist/useGlobalData-D9dz7GIi.js +0 -68
  1021. package/dist/useMultiForm--sSlt50X.js +0 -864
  1022. package/dist/useOnboardingStatus-91zhqzLd.js +0 -27
  1023. package/dist/useScenarios-CqKpYbe_.js +0 -46
  1024. package/dist/useTermsOfServiceStatus-DLQVpbik.js +0 -42
  1025. package/dist/useToastContext-FI3dwzzs.js +0 -60
  1026. package/dist/useUnincorporatedPartnershipMembers-CdQDPlZq.js +0 -99
  1027. package/dist/useUpdateBusinessLines-BulhyPjH.js +0 -46
  1028. package/dist/useUpdateLegalEntity-Q3Icdeo6.js +0 -39
  1029. package/dist/utils-DQLhii3U.js +0 -774
  1030. package/dist/utils-DV0_GilJ.js +0 -237
  1031. package/dist/validate-BD3wn-YX.js +0 -100
  1032. package/dist/validate-H-iE__-w.js +0 -41
  1033. package/dist/validationError-B5aoMbe_.js +0 -86
  1034. package/dist/warning-circle-fill-CEN1WL7A.js +0 -17
  1035. package/dist/warning-diamond-filled-BfXMlVrG.js +0 -17
  1036. package/dist/webinar-DqjqrNEv.js +0 -22
  1037. package/dist/yapily-logo-CZ4ywjwA.js +0 -17
  1038. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/PayoutAccountTaskListItem.d.ts +0 -0
  1039. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskList.d.ts +0 -0
  1040. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListGroup.d.ts +0 -0
  1041. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListItem.d.ts +0 -0
  1042. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/types.d.ts +0 -0
  1043. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/FinancialInformation.d.ts +0 -0
  1044. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/ReportedValue.d.ts +0 -0
  1045. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/types.d.ts +0 -0
  1046. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/validate.d.ts +0 -0
  1047. /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/AdditionalPersonalDetails.d.ts +0 -0
  1048. /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/Identity/Identity.d.ts +0 -0
  1049. /package/dist/types/components/Individual/forms/{IndividualOnfido/BasicDetails → BasicDetails}/BasicDetails.d.ts +0 -0
  1050. /package/dist/types/components/Individual/forms/{IndividualOnfido/GuidanceQuestion → GuidanceQuestion}/GuidanceQuestion.d.ts +0 -0
  1051. /package/dist/types/components/Individual/forms/{Individual/IdDocumentUpload → IdDocumentUpload}/IdDocumentManualUpload.d.ts +0 -0
  1052. /package/dist/types/components/Individual/forms/{IndividualOnfido/IdNowVerificationModal → IdNowVerificationModal}/IdNowVerificationModal.d.ts +0 -0
  1053. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/IdVerification.d.ts +0 -0
  1054. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/idVerificationProviderId.d.ts +0 -0
  1055. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/types.d.ts +0 -0
  1056. /package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/IdVerificationMethod.d.ts +0 -0
  1057. /package/dist/types/components/Individual/forms/{IndividualOnfido/ManualIdUpload → ManualIdUpload}/ManualIdUpload.d.ts +0 -0
  1058. /package/dist/types/components/Individual/forms/{Individual/ProofOfRelationship → ProofOfRelationship}/index.d.ts +0 -0
  1059. /package/dist/types/components/Individual/forms/{Individual/ProofOfResidency → ProofOfResidency}/ProofOfResidency.d.ts +0 -0
  1060. /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaire.d.ts +0 -0
  1061. /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaireModalContent.d.ts +0 -0
  1062. /package/dist/types/components/Individual/forms/{IndividualOnfido/UboQuestionnaire → UboQuestionnaire}/UboQuestionnaire.d.ts +0 -0
  1063. /package/dist/types/components/Individual/tasks/{IndividualOnfidoDropin/IndividualOnfidoStore.d.ts → IndividualDropin/IndividualStore.d.ts} +0 -0
  1064. /package/dist/types/components/{Individual → Shared}/fields/LocalizedNameFields/LocalizedNameFields.d.ts +0 -0
@@ -0,0 +1,2162 @@
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] = "cd1ddbca-725b-4a9b-8c6a-fdf2a75eab46", e._sentryDebugIdIdentifier = "sentry-dbid-cd1ddbca-725b-4a9b-8c6a-fdf2a75eab46");
6
+ } catch (e) {
7
+ }
8
+ }
9
+ ;
10
+ import { b as useApiContext, $ as httpPost, k as httpGet, u as useTranslation, z as Typography, V as Button, aa as useI18nContext, L as Loader, r as Icon, t as IconButton, H as TASK_STATUS_POLLING_INTERVAL_MS, a3 as createLogger, c as useLegalEntity, R as ROOT_LE, p as useAnalyticsContext, bE as useLegalEntities, a as addResourceBundles, a8 as EntityTypes, g as getLegalEntityCountry, _ as __variableDynamicImportRuntimeHelper } from "./StoreProvider-99-ewU62.js";
11
+ import { jsxs, Fragment, jsx } from "preact/jsx-runtime";
12
+ import { u as useCapabilityProblems, g as getProblemsForEntity } from "./getProblemsForEntity-D8qEVVOM.js";
13
+ import { useState, useMemo, useCallback, useEffect } from "preact/hooks";
14
+ import { u as useBusinessLines } from "./useBusinessLines-C5NQ5pE8.js";
15
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/preact-query";
16
+ import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-D643iewp.js";
17
+ import { u as useCreateLegalEntity } from "./useCreateLegalEntity-DrcLoNYT.js";
18
+ import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-tRw1V_Mt.js";
19
+ import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-CkuaJPUI.js";
20
+ import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils--st1YpV6.js";
21
+ import { u as useMultiForm } from "./useMultiForm-Dm2IEMH9.js";
22
+ import { c as createDocumentRequest, d as documentApiUtils } from "./validate-CtxacqMv.js";
23
+ import { f as formatObject } from "./utils-DNSfZiio.js";
24
+ import { signal } from "@preact/signals";
25
+ import { E as ErrorPanel } from "./ErrorPanel-CAALFKmE.js";
26
+ import { c as createFormUtils } from "./formUtils-C_sWWLS3.js";
27
+ import { F as Field } from "./Field-Bs7wGDqk.js";
28
+ import { S as Select } from "./Select-DaCJsYNl.js";
29
+ import { T as TextArea } from "./TextArea-BjsWgkR-.js";
30
+ import { I as InputDate } from "./InputDate-CLxqciJA.js";
31
+ import { I as InputGroup } from "./InputGroup-WBfGDV5F.js";
32
+ import { I as InputText } from "./InputText-BdCbTzL9.js";
33
+ import { a as allowedCurrencies, T as TODAY_DATE, S as SOF_CHARACTERS_LIMIT, b as formatDateForInput, g as getInputErrors, c as formatAmountWithCurrency, s as sofCategoryItemMapper, d as getPageHeadings, e as getServiceTranslationSelectTitle, h as getSofCardDetails, i as getGettingStartedCardDetails, j as getAdditionalDataSchemaKeys, k as getServiceTranslation, p as parseSOFDocumentDescription, l as getRelevantErrors, m as getUniqueRemediationActions, n as SOF_INVALID_INPUT_ERROR_CODES, o as getServiceTranslationKey, q as getDocumentRequirements, r as getDocumentLists, t as getSourceOfFundsRequiredFields, M as MISSING_DATA_SOF_UPLOAD_CODE, u as parseOriginatorDetails, v as getSourceOfFundsRequiredForms, w as getSourceOfFundsPayload, A as ALLOWED_SOF_SERVICES, x as parseSofOriginatorPayload } from "./utils-D9h2Aq2w.js";
34
+ import { R as RadioGroup } from "./RadioGroup-CxcIXYzs.js";
35
+ import { C as CountryField } from "./CountryField-DxZlK1rV.js";
36
+ import { A as Avatar } from "./Avatar-DWU7t_0U.js";
37
+ import { a as Alert } from "./Alert-CFmX9yNV.js";
38
+ import { M as Modal } from "./Modal-CZ-HuGUO.js";
39
+ import { C as Confirm } from "./Confirm-C0J_JwMM.js";
40
+ import { T as TileGroup } from "./TileGroup-C-5-VREz.js";
41
+ import { lazy } from "preact/compat";
42
+ import { u as useTaskStatus } from "./useTaskStatus-1OZ2clnm.js";
43
+ import { H as Header } from "./Header-vslG1ugE.js";
44
+ import { I as Image } from "./Image-CAucF9wz.js";
45
+ import { L as LandingLayout } from "./LandingLayout-kl7TkBGx.js";
46
+ import { S as StackLayout } from "./unincorporated-partnership-MeN1dp53.js";
47
+ import { i as isEmpty } from "./isEmpty-CUuXL9Na.js";
48
+ import { C as Card } from "./Card-OQuFzmxm.js";
49
+ import { S as StructuredList } from "./StructuredList-CVMZBzwq.js";
50
+ import { D as Dropzone } from "./Dropzone-kpihpy7N.js";
51
+ import { v as validateDateNotInTheFuture } from "./validate-K0fmvoFj.js";
52
+ const updateSourceOfFunds = async (businessLineId, legalEntityId, baseUrl, data) => {
53
+ return httpPost(
54
+ {
55
+ baseUrl,
56
+ path: `legalEntities/${legalEntityId}/businessLines/${businessLineId}/sourceOfFunds`
57
+ },
58
+ data
59
+ );
60
+ };
61
+ const useUpdateSourceOfFunds = (options) => {
62
+ const { rootLegalEntityId, baseUrl } = useApiContext();
63
+ const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
64
+ return useMutation({
65
+ mutationFn: ({ businessLineId, ...requestData }) => updateSourceOfFunds(businessLineId, rootLegalEntityId.value, baseUrl.value, requestData),
66
+ onSuccess: async () => {
67
+ await invalidateRootLegalEntity();
68
+ },
69
+ ...options
70
+ });
71
+ };
72
+ const sourceOfFundsBaseMapping = {
73
+ "sourceOfFundsType.type": "sourceOfFunds.type",
74
+ "additionalData.description": "sourceOfFunds.description",
75
+ "additionalData.amount": "sourceOfFunds.amount",
76
+ "additionalData.dateOfFundsReceived": "sourceOfFunds.dateOfFundsReceived",
77
+ "additionalData.purpose": "sourceOfFunds.purpose",
78
+ "additionalData.relationship": "sourceOfFunds.relationship",
79
+ "additionalData.originatorLegalEntityId": "sourceOfFunds.originatorLegalEntityId",
80
+ "additionalData.financiers": "sourceOfFunds.financiers",
81
+ "additionalData.cryptocurrencyExchange": "sourceOfFunds.cryptocurrencyExchange",
82
+ "additionalData.dateOfSourceEvent": "sourceOfFunds.dateOfSourceEvent",
83
+ "additionalData.website": "sourceOfFunds.website",
84
+ "additionalData.legalName": "sourceOfFunds.legalName",
85
+ "additionalData.firstName": "sourceOfFunds.firstName",
86
+ "additionalData.lastName": "sourceOfFunds.lastName",
87
+ "additionalData.country": "sourceOfFunds.country",
88
+ "additionalData.originatorType": "sourceOfFunds.originatorType"
89
+ };
90
+ const sourceOfFundsComponentsKeyMapping = {
91
+ ...sourceOfFundsBaseMapping
92
+ };
93
+ const mapSourceOfFundToSourceOfFundsSchema = (businessLine) => formatObject(businessLine, sourceOfFundsComponentsKeyMapping);
94
+ const sofErrorMessage = signal(void 0);
95
+ const setSofErrorMessage = (message) => {
96
+ sofErrorMessage.value = message;
97
+ };
98
+ const clearSofErrorMessage = () => {
99
+ sofErrorMessage.value = void 0;
100
+ };
101
+ const getSourceOfFundsTypes = async (baseUrl) => {
102
+ return httpGet({
103
+ baseUrl,
104
+ path: `datasets/sourceOfFundsTypes`
105
+ });
106
+ };
107
+ const useSourceOfFundsTypes = (options) => {
108
+ const { baseUrl } = useApiContext();
109
+ return useQuery({
110
+ queryKey: ["sourceOfFundsTypes"],
111
+ queryFn: () => getSourceOfFundsTypes(baseUrl.value),
112
+ ...options
113
+ });
114
+ };
115
+ const sourceOfFunds = "adyen-kyc-source-of-funds";
116
+ const sourceOfFundsWrapperLoading = "adyen-kyc-source-of-funds-wrapper-loading";
117
+ const sourceOfFundsWrapperHeading = "adyen-kyc-source-of-funds-wrapper-heading";
118
+ const sourceOfFundsWrapperDescription = "adyen-kyc-source-of-funds-wrapper-description";
119
+ const sourceOfFundsGettingStarted = "adyen-kyc-source-of-funds-getting-started";
120
+ const sourceOfFundsGettingStartedError = "adyen-kyc-source-of-funds-getting-started-error";
121
+ const sourceOfFundsGettingStartedErrorActions = "adyen-kyc-source-of-funds-getting-started-error-actions";
122
+ const sourceOfFundsGettingStartedCards = "adyen-kyc-source-of-funds-getting-started-cards";
123
+ const sourceOfFundsGettingStartedCardsCardHeader = "adyen-kyc-source-of-funds-getting-started-cards-card-header";
124
+ const sourceOfFundsGettingStartedCardsCardBody = "adyen-kyc-source-of-funds-getting-started-cards-card-body";
125
+ const sourceOfFundsGettingStartedActions = "adyen-kyc-source-of-funds-getting-started-actions";
126
+ const sourceOfFundsAdditionalDataForm = "adyen-kyc-source-of-funds-additional-data-form";
127
+ const sourceOfFundsThirdPartyFundingFinancierGroup = "adyen-kyc-source-of-funds-third-party-funding-financier-group";
128
+ const sourceOfFundsThirdPartyFundingNameAvatarGroup = "adyen-kyc-source-of-funds-third-party-funding-name-avatar-group";
129
+ const sourceOfFundsThirdPartyFundingNameAddressGroup = "adyen-kyc-source-of-funds-third-party-funding-name-address-group";
130
+ const sourceOfFundsSofFinancierFormError = "adyen-kyc-source-of-funds-sof-financier-form-error";
131
+ const sourceOfFundsSofFinancierFormNameGroup = "adyen-kyc-source-of-funds-sof-financier-form-name-group";
132
+ const sourceOfFundsFinancierFooter = "adyen-kyc-source-of-funds-financier-footer";
133
+ const sourceOfFundsGridContainer = "adyen-kyc-source-of-funds-grid-container";
134
+ const sourceOfFundsUploadModalContentField = "adyen-kyc-source-of-funds-upload-modal-content-field";
135
+ const sourceOfFundsUploadModalContentFieldRadioGroup = "adyen-kyc-source-of-funds-upload-modal-content-field-radio-group";
136
+ const sourceOfFundsUploadModalContentRequirementsContainer = "adyen-kyc-source-of-funds-upload-modal-content-requirements-container";
137
+ const sourceOfFundsUploadListHeading = "adyen-kyc-source-of-funds-upload-list-heading";
138
+ const sourceOfFundsModal = "adyen-kyc-source-of-funds-modal";
139
+ const styles = {
140
+ sourceOfFunds,
141
+ sourceOfFundsWrapperLoading,
142
+ sourceOfFundsWrapperHeading,
143
+ sourceOfFundsWrapperDescription,
144
+ sourceOfFundsGettingStarted,
145
+ sourceOfFundsGettingStartedError,
146
+ sourceOfFundsGettingStartedErrorActions,
147
+ sourceOfFundsGettingStartedCards,
148
+ sourceOfFundsGettingStartedCardsCardHeader,
149
+ sourceOfFundsGettingStartedCardsCardBody,
150
+ sourceOfFundsGettingStartedActions,
151
+ sourceOfFundsAdditionalDataForm,
152
+ sourceOfFundsThirdPartyFundingFinancierGroup,
153
+ sourceOfFundsThirdPartyFundingNameAvatarGroup,
154
+ sourceOfFundsThirdPartyFundingNameAddressGroup,
155
+ sourceOfFundsSofFinancierFormError,
156
+ sourceOfFundsSofFinancierFormNameGroup,
157
+ sourceOfFundsFinancierFooter,
158
+ sourceOfFundsGridContainer,
159
+ sourceOfFundsUploadModalContentField,
160
+ sourceOfFundsUploadModalContentFieldRadioGroup,
161
+ sourceOfFundsUploadModalContentRequirementsContainer,
162
+ sourceOfFundsUploadListHeading,
163
+ sourceOfFundsModal
164
+ };
165
+ function AdditionalDataForAssetSale(props) {
166
+ const [isFocused, setIsFocused] = useState(false);
167
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
168
+ const { t: commonT } = useTranslation("common");
169
+ const handleOnAmountBlur = () => {
170
+ setIsFocused(false);
171
+ handleAmountChange("amount");
172
+ };
173
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
174
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsGridContainer, children: [
175
+ /* @__PURE__ */ jsx(
176
+ Field,
177
+ {
178
+ el: "fieldset",
179
+ name: "amount",
180
+ label: formUtils.getLabel("amount", "saleAmount"),
181
+ errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
182
+ children: (childProps) => /* @__PURE__ */ jsxs(
183
+ InputGroup,
184
+ {
185
+ ...childProps,
186
+ id: "currencyGroup",
187
+ isFocused,
188
+ isInvalid: Boolean(!valid.amount && errors.amount),
189
+ children: [
190
+ /* @__PURE__ */ jsx(
191
+ Select,
192
+ {
193
+ name: "currency",
194
+ "aria-label": commonT(($) => $["currency"]),
195
+ isMulti: false,
196
+ items: allowedCurrencies,
197
+ selected: data.amount?.currency,
198
+ placeholder: commonT(($) => $["select"]),
199
+ onChange: handleAmountChange("currency"),
200
+ minimal: true
201
+ }
202
+ ),
203
+ /* @__PURE__ */ jsx(
204
+ InputText,
205
+ {
206
+ ...childProps,
207
+ name: "amount",
208
+ value: data.amount?.value,
209
+ readonly: formUtils.isReadOnly("amount"),
210
+ onInput: handleAmountChange("amount"),
211
+ onBlur: handleOnAmountBlur,
212
+ "aria-required": true,
213
+ "aria-invalid": !valid.amount,
214
+ isValid: valid.amount,
215
+ onFocusHandler: () => setIsFocused(true)
216
+ }
217
+ )
218
+ ]
219
+ }
220
+ )
221
+ }
222
+ ),
223
+ /* @__PURE__ */ jsx(
224
+ Field,
225
+ {
226
+ name: "dateOfSourceEvent",
227
+ label: formUtils.getLabel("dateOfSourceEvent", "dateOfSale"),
228
+ errorMessage: formUtils.getErrorMessage("dateOfSourceEvent", errors, fieldProblems),
229
+ isValid: valid.dateOfSourceEvent,
230
+ children: (childProps) => /* @__PURE__ */ jsx(
231
+ InputDate,
232
+ {
233
+ ...childProps,
234
+ name: "dateOfSourceEvent",
235
+ value: data.dateOfSourceEvent,
236
+ onInput: handleChangeFor("dateOfSourceEvent", "input"),
237
+ onBlur: handleChangeFor("dateOfSourceEvent", "blur"),
238
+ "aria-required": true,
239
+ "aria-invalid": !valid.dateOfSourceEvent,
240
+ max: TODAY_DATE
241
+ }
242
+ )
243
+ }
244
+ )
245
+ ] }),
246
+ /* @__PURE__ */ jsx(
247
+ Field,
248
+ {
249
+ name: "description",
250
+ label: formUtils.getLabel("description", "propertyDescription"),
251
+ errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
252
+ isValid: valid.description,
253
+ children: (childProps) => /* @__PURE__ */ jsx(
254
+ TextArea,
255
+ {
256
+ ...childProps,
257
+ name: "description",
258
+ value: data.description,
259
+ maxLength: SOF_CHARACTERS_LIMIT,
260
+ onInput: handleChangeFor("description"),
261
+ onBlur: handleChangeFor("description"),
262
+ "aria-invalid": !valid.description
263
+ }
264
+ )
265
+ }
266
+ )
267
+ ] });
268
+ }
269
+ function AdditionalDataForBusiness(props) {
270
+ const [isFocused, setIsFocused] = useState(false);
271
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
272
+ const { t: commonT } = useTranslation("common");
273
+ const handleOnAmountBlur = () => {
274
+ setIsFocused(false);
275
+ handleAmountChange("amount");
276
+ };
277
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
278
+ /* @__PURE__ */ jsx(
279
+ Field,
280
+ {
281
+ el: "fieldset",
282
+ name: "amount",
283
+ label: formUtils.getLabel("amount", "annualTurnover"),
284
+ errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
285
+ helper: commonT(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
286
+ helperPosition: "below",
287
+ children: (childProps) => /* @__PURE__ */ jsxs(
288
+ InputGroup,
289
+ {
290
+ ...childProps,
291
+ id: "currencyGroup",
292
+ isFocused,
293
+ isInvalid: Boolean(!valid.amount && errors.amount),
294
+ children: [
295
+ /* @__PURE__ */ jsx(
296
+ Select,
297
+ {
298
+ name: "currency",
299
+ "aria-label": commonT(($) => $["currency"]),
300
+ isMulti: false,
301
+ items: allowedCurrencies,
302
+ selected: data.amount?.currency,
303
+ placeholder: commonT(($) => $["select"]),
304
+ onChange: handleAmountChange("currency"),
305
+ minimal: true
306
+ }
307
+ ),
308
+ /* @__PURE__ */ jsx(
309
+ InputText,
310
+ {
311
+ ...childProps,
312
+ name: "amount",
313
+ value: data.amount?.value,
314
+ readonly: formUtils.isReadOnly("amount"),
315
+ onInput: handleAmountChange("amount"),
316
+ onBlur: handleOnAmountBlur,
317
+ "aria-required": true,
318
+ "aria-invalid": !valid.amount,
319
+ isValid: valid.amount,
320
+ onFocusHandler: () => setIsFocused(true)
321
+ }
322
+ )
323
+ ]
324
+ }
325
+ )
326
+ }
327
+ ),
328
+ /* @__PURE__ */ jsx(
329
+ Field,
330
+ {
331
+ name: "description",
332
+ label: formUtils.getLabel("description", "businessDescription"),
333
+ errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
334
+ isValid: valid.description,
335
+ children: (childProps) => /* @__PURE__ */ jsx(
336
+ TextArea,
337
+ {
338
+ ...childProps,
339
+ name: "description",
340
+ value: data.description,
341
+ maxLength: SOF_CHARACTERS_LIMIT,
342
+ onInput: handleChangeFor("description"),
343
+ onBlur: handleChangeFor("description"),
344
+ "aria-invalid": !valid.description
345
+ }
346
+ )
347
+ }
348
+ )
349
+ ] });
350
+ }
351
+ function AdditionalDataForCryptocurrency(props) {
352
+ const { t: sofT } = useTranslation("sof");
353
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor } = props;
354
+ return /* @__PURE__ */ jsx(
355
+ Field,
356
+ {
357
+ name: "cryptocurrencyExchange",
358
+ label: formUtils.getLabel("cryptocurrencyExchange", "cryptocurrencyExchange"),
359
+ errorMessage: formUtils.getErrorMessage("cryptocurrencyExchange", errors, fieldProblems),
360
+ isValid: valid.cryptocurrencyExchange,
361
+ helper: sofT(($) => $["nameOfTheExchangeWhereTheCryptocurrencyWasHeldPriorToSale"]),
362
+ helperPosition: "below",
363
+ children: (childProps) => /* @__PURE__ */ jsx(
364
+ InputText,
365
+ {
366
+ ...childProps,
367
+ name: "cryptocurrencyExchange",
368
+ value: data.cryptocurrencyExchange,
369
+ readonly: formUtils.isReadOnly("cryptocurrencyExchange"),
370
+ onInput: handleChangeFor("cryptocurrencyExchange", "input"),
371
+ onBlur: handleChangeFor("cryptocurrencyExchange", "blur"),
372
+ "aria-required": true,
373
+ "aria-invalid": !valid.cryptocurrencyExchange,
374
+ isValid: valid.cryptocurrencyExchange
375
+ }
376
+ )
377
+ }
378
+ );
379
+ }
380
+ const radioItems = [
381
+ {
382
+ id: "individual",
383
+ name: "individual"
384
+ },
385
+ {
386
+ id: "organization",
387
+ name: "organization"
388
+ }
389
+ ];
390
+ function AdditionalDataOriginatorLegalEntity(props) {
391
+ const { t: sofT } = useTranslation("sof");
392
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, sourceOfFundsType } = props;
393
+ const isDonations = useMemo(() => sourceOfFundsType === "donations", [sourceOfFundsType]);
394
+ const countryTranslationKey = isDonations && data?.originatorType === "individual" ? "donorsCountryOfResidence" : data?.originatorType === "organization" ? "organizationsCountryOfOperation" : "decedentsCountryOfDeath";
395
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
396
+ /* @__PURE__ */ jsx(
397
+ Field,
398
+ {
399
+ el: "fieldset",
400
+ name: "originatorType",
401
+ className: styles.sourceOfFundsUploadModalContentField,
402
+ label: sofT(
403
+ ($) => $[isDonations ? "whereDidThisGiftOrDonationComeFrom" : "whereDidThisInheritanceComeFrom"]
404
+ ),
405
+ errorMessage: formUtils.getErrorMessage("originatorType", errors, fieldProblems),
406
+ isValid: valid.originatorType,
407
+ children: (childProps) => /* @__PURE__ */ jsx(
408
+ RadioGroup,
409
+ {
410
+ ...childProps,
411
+ name: "originatorType",
412
+ className: styles.sourceOfFundsUploadModalContentFieldRadioGroup,
413
+ items: radioItems,
414
+ value: data.originatorType,
415
+ disabled: false,
416
+ onChange: handleChangeFor("originatorType", "input"),
417
+ "aria-required": true
418
+ }
419
+ )
420
+ }
421
+ ),
422
+ data?.originatorType === "organization" && /* @__PURE__ */ jsx(
423
+ Field,
424
+ {
425
+ name: "legalName",
426
+ label: formUtils.getLabel("legalName", "organizationsLegalName"),
427
+ errorMessage: formUtils.getErrorMessage("legalName", errors, fieldProblems),
428
+ isValid: valid.legalName,
429
+ children: (childProps) => /* @__PURE__ */ jsx(
430
+ InputText,
431
+ {
432
+ ...childProps,
433
+ name: "legalName",
434
+ value: data.legalName,
435
+ readonly: formUtils.isReadOnly("legalName"),
436
+ onInput: handleChangeFor("legalName", "input"),
437
+ onBlur: handleChangeFor("legalName", "blur"),
438
+ "aria-required": true,
439
+ "aria-invalid": !valid.legalName,
440
+ isValid: valid.legalName
441
+ }
442
+ )
443
+ }
444
+ ),
445
+ data?.originatorType === "individual" && /* @__PURE__ */ jsxs(Fragment, { children: [
446
+ /* @__PURE__ */ jsx(
447
+ Field,
448
+ {
449
+ name: "firstName",
450
+ label: formUtils.getLabel(
451
+ "firstName",
452
+ isDonations ? "donorsLegalFirstName" : "decedentsLegalFirstName"
453
+ ),
454
+ errorMessage: formUtils.getErrorMessage("firstName", errors, fieldProblems),
455
+ isValid: valid.firstName,
456
+ children: (childProps) => /* @__PURE__ */ jsx(
457
+ InputText,
458
+ {
459
+ ...childProps,
460
+ name: "firstName",
461
+ value: data.firstName,
462
+ readonly: formUtils.isReadOnly("firstName"),
463
+ onInput: handleChangeFor("firstName", "input"),
464
+ onBlur: handleChangeFor("firstName", "blur"),
465
+ "aria-required": true,
466
+ "aria-invalid": !valid.firstName,
467
+ isValid: valid.firstName
468
+ }
469
+ )
470
+ }
471
+ ),
472
+ /* @__PURE__ */ jsx(
473
+ Field,
474
+ {
475
+ name: "lastName",
476
+ label: formUtils.getLabel(
477
+ "lastName",
478
+ isDonations ? "donorsLegalLastName" : "decedentsLegalLastName"
479
+ ),
480
+ errorMessage: formUtils.getErrorMessage("lastName", errors, fieldProblems),
481
+ isValid: valid.lastName,
482
+ children: (childProps) => /* @__PURE__ */ jsx(
483
+ InputText,
484
+ {
485
+ ...childProps,
486
+ name: "lastName",
487
+ value: data.lastName,
488
+ readonly: formUtils.isReadOnly("lastName"),
489
+ onInput: handleChangeFor("lastName", "input"),
490
+ onBlur: handleChangeFor("lastName", "blur"),
491
+ "aria-required": true,
492
+ "aria-invalid": !valid.lastName,
493
+ isValid: valid.lastName
494
+ }
495
+ )
496
+ }
497
+ )
498
+ ] }),
499
+ data?.originatorType && /* @__PURE__ */ jsxs(Fragment, { children: [
500
+ /* @__PURE__ */ jsx(
501
+ Field,
502
+ {
503
+ name: "relationship",
504
+ label: formUtils.getLabel(
505
+ "relationship",
506
+ isDonations && data?.originatorType === "individual" ? "yourRelationshipToDonor" : data?.originatorType === "organization" ? "yourRelationshipToOrganization" : "yourRelationshipToDecedent"
507
+ ),
508
+ errorMessage: formUtils.getErrorMessage("relationship", errors, fieldProblems),
509
+ isValid: valid.relationship,
510
+ children: (childProps) => /* @__PURE__ */ jsx(
511
+ InputText,
512
+ {
513
+ ...childProps,
514
+ name: "relationship",
515
+ value: data.relationship,
516
+ readonly: formUtils.isReadOnly("relationship"),
517
+ onInput: handleChangeFor("relationship", "input"),
518
+ onBlur: handleChangeFor("relationship", "blur"),
519
+ "aria-required": true,
520
+ "aria-invalid": !valid.relationship,
521
+ isValid: valid.relationship
522
+ }
523
+ )
524
+ }
525
+ ),
526
+ /* @__PURE__ */ jsx(
527
+ CountryField,
528
+ {
529
+ data: { country: data.country },
530
+ valid: { country: valid.country },
531
+ errors: {
532
+ country: formUtils.getErrorMessage("country", errors, fieldProblems)
533
+ },
534
+ labels: {
535
+ country: sofT(($) => $[countryTranslationKey])
536
+ },
537
+ readonly: formUtils.isReadOnly("country"),
538
+ handleChangeFor
539
+ }
540
+ )
541
+ ] })
542
+ ] });
543
+ }
544
+ function AdditionalDataForDonation(props) {
545
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor } = props;
546
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
547
+ /* @__PURE__ */ jsx(
548
+ AdditionalDataOriginatorLegalEntity,
549
+ {
550
+ formUtils,
551
+ handleChangeFor,
552
+ data,
553
+ errors,
554
+ valid,
555
+ fieldProblems,
556
+ sourceOfFundsType: "donations"
557
+ }
558
+ ),
559
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsGridContainer, children: [
560
+ /* @__PURE__ */ jsx(
561
+ Field,
562
+ {
563
+ name: "purpose",
564
+ label: formUtils.getLabel("purpose", "reason"),
565
+ errorMessage: formUtils.getErrorMessage("purpose", errors, fieldProblems),
566
+ isValid: valid.purpose,
567
+ children: (childProps) => /* @__PURE__ */ jsx(
568
+ InputText,
569
+ {
570
+ ...childProps,
571
+ name: "purpose",
572
+ value: data.purpose,
573
+ readonly: formUtils.isReadOnly("purpose"),
574
+ onInput: handleChangeFor("purpose", "input"),
575
+ onBlur: handleChangeFor("purpose", "blur"),
576
+ "aria-required": true,
577
+ "aria-invalid": !valid.purpose,
578
+ isValid: valid.purpose
579
+ }
580
+ )
581
+ }
582
+ ),
583
+ /* @__PURE__ */ jsx(
584
+ Field,
585
+ {
586
+ name: "dateOfFundsReceived",
587
+ label: formUtils.getLabel("dateOfFundsReceived", "date"),
588
+ errorMessage: formUtils.getErrorMessage("dateOfFundsReceived", errors, fieldProblems),
589
+ isValid: valid.dateOfFundsReceived,
590
+ children: (childProps) => /* @__PURE__ */ jsx(
591
+ InputDate,
592
+ {
593
+ ...childProps,
594
+ name: "dateOfFundsReceived",
595
+ value: formatDateForInput(data.dateOfFundsReceived),
596
+ onInput: handleChangeFor("dateOfFundsReceived", "input"),
597
+ onBlur: handleChangeFor("dateOfFundsReceived", "blur"),
598
+ "aria-required": true,
599
+ "aria-invalid": !valid.dateOfFundsReceived,
600
+ max: TODAY_DATE
601
+ }
602
+ )
603
+ }
604
+ )
605
+ ] })
606
+ ] });
607
+ }
608
+ function AdditionalDataForGambling(props) {
609
+ const { t: commonT } = useTranslation("common");
610
+ const [focusedInput, setFocusedInput] = useState();
611
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
612
+ const handleOnAmountBlur = () => {
613
+ setFocusedInput(void 0);
614
+ handleAmountChange("amount");
615
+ };
616
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
617
+ /* @__PURE__ */ jsx(
618
+ Field,
619
+ {
620
+ el: "fieldset",
621
+ name: "amount",
622
+ label: formUtils.getLabel("amount", "totalAmountWon"),
623
+ errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
624
+ children: (childProps) => /* @__PURE__ */ jsxs(
625
+ InputGroup,
626
+ {
627
+ ...childProps,
628
+ id: "currencyGroup",
629
+ isFocused: focusedInput === "amount",
630
+ isInvalid: Boolean(!valid.amount && errors.amount),
631
+ children: [
632
+ /* @__PURE__ */ jsx(
633
+ Select,
634
+ {
635
+ name: "currency",
636
+ "aria-label": commonT(($) => $["currency"]),
637
+ isMulti: false,
638
+ items: allowedCurrencies,
639
+ selected: data.amount?.currency,
640
+ placeholder: commonT(($) => $["select"]),
641
+ onChange: handleAmountChange("currency"),
642
+ minimal: true
643
+ }
644
+ ),
645
+ /* @__PURE__ */ jsx(
646
+ InputText,
647
+ {
648
+ ...childProps,
649
+ name: "amount",
650
+ value: data.amount?.value,
651
+ readonly: formUtils.isReadOnly("amount"),
652
+ onInput: handleAmountChange("amount"),
653
+ onBlur: handleOnAmountBlur,
654
+ "aria-required": true,
655
+ "aria-invalid": !valid.amount,
656
+ isValid: valid.amount,
657
+ onFocusHandler: () => setFocusedInput("amount")
658
+ }
659
+ )
660
+ ]
661
+ }
662
+ )
663
+ }
664
+ ),
665
+ /* @__PURE__ */ jsx(
666
+ Field,
667
+ {
668
+ name: "dateOfSourceEvent",
669
+ label: formUtils.getLabel("dateOfSourceEvent", "dateOfWinning"),
670
+ errorMessage: formUtils.getErrorMessage("dateOfSourceEvent", errors, fieldProblems),
671
+ isValid: valid.dateOfSourceEvent,
672
+ children: (childProps) => /* @__PURE__ */ jsx(
673
+ InputDate,
674
+ {
675
+ ...childProps,
676
+ name: "dateOfSourceEvent",
677
+ value: formatDateForInput(data.dateOfSourceEvent),
678
+ onInput: handleChangeFor("dateOfSourceEvent", "input"),
679
+ onBlur: handleChangeFor("dateOfSourceEvent", "blur"),
680
+ "aria-required": true,
681
+ "aria-invalid": !valid.dateOfSourceEvent,
682
+ max: TODAY_DATE
683
+ }
684
+ )
685
+ }
686
+ ),
687
+ /* @__PURE__ */ jsx(
688
+ Field,
689
+ {
690
+ name: "website",
691
+ label: formUtils.getLabel("website", "gamblingEstablishmentWebsite"),
692
+ errorMessage: formUtils.getErrorMessage("website", errors, fieldProblems),
693
+ children: (childProps) => /* @__PURE__ */ jsx(
694
+ InputGroup,
695
+ {
696
+ ...childProps,
697
+ id: "websiteGroup",
698
+ isFocused: focusedInput === "website",
699
+ isInvalid: Boolean(!valid.website && errors.website),
700
+ children: /* @__PURE__ */ jsx(
701
+ InputText,
702
+ {
703
+ ...childProps,
704
+ placeholder: "https://",
705
+ name: "website",
706
+ value: data.website,
707
+ readonly: formUtils.isReadOnly("website"),
708
+ onInput: handleChangeFor("website", "input"),
709
+ onBlur: handleChangeFor("website", "blur"),
710
+ "aria-required": true,
711
+ "aria-invalid": !valid.website,
712
+ isValid: valid.website,
713
+ onFocusHandler: () => setFocusedInput("website")
714
+ }
715
+ )
716
+ }
717
+ )
718
+ }
719
+ )
720
+ ] });
721
+ }
722
+ function AdditionalDataForInheritance(props) {
723
+ const [isFocused, setIsFocused] = useState(false);
724
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
725
+ const { t: commonT } = useTranslation("common");
726
+ const handleOnAmountBlur = () => {
727
+ setIsFocused(false);
728
+ handleAmountChange("amount");
729
+ };
730
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
731
+ /* @__PURE__ */ jsx(
732
+ AdditionalDataOriginatorLegalEntity,
733
+ {
734
+ formUtils,
735
+ handleChangeFor,
736
+ data,
737
+ errors,
738
+ valid,
739
+ fieldProblems,
740
+ sourceOfFundsType: "inheritance"
741
+ }
742
+ ),
743
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsGridContainer, children: [
744
+ /* @__PURE__ */ jsx(
745
+ Field,
746
+ {
747
+ el: "fieldset",
748
+ name: "amount",
749
+ label: formUtils.getLabel("amount", "inheritanceAmount"),
750
+ errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
751
+ children: (childProps) => /* @__PURE__ */ jsxs(
752
+ InputGroup,
753
+ {
754
+ ...childProps,
755
+ id: "currencyGroup",
756
+ isFocused,
757
+ isInvalid: Boolean(!valid.amount && errors.amount),
758
+ children: [
759
+ /* @__PURE__ */ jsx(
760
+ Select,
761
+ {
762
+ name: "currency",
763
+ "aria-label": commonT(($) => $["currency"]),
764
+ isMulti: false,
765
+ items: allowedCurrencies ?? [],
766
+ selected: data.amount?.currency,
767
+ placeholder: commonT(($) => $["select"]),
768
+ onChange: handleAmountChange("currency"),
769
+ minimal: true
770
+ }
771
+ ),
772
+ /* @__PURE__ */ jsx(
773
+ InputText,
774
+ {
775
+ ...childProps,
776
+ name: "amount",
777
+ value: data.amount?.value,
778
+ readonly: formUtils.isReadOnly("amount"),
779
+ onInput: handleAmountChange("amount"),
780
+ onBlur: handleOnAmountBlur,
781
+ "aria-required": true,
782
+ "aria-invalid": !valid.amount,
783
+ isValid: valid.amount,
784
+ onFocusHandler: () => setIsFocused(true)
785
+ }
786
+ )
787
+ ]
788
+ }
789
+ )
790
+ }
791
+ ),
792
+ /* @__PURE__ */ jsx(
793
+ Field,
794
+ {
795
+ name: "dateOfFundsReceived",
796
+ label: formUtils.getLabel("dateOfFundsReceived", "inheritanceReceivedOn"),
797
+ errorMessage: formUtils.getErrorMessage("dateOfFundsReceived", errors, fieldProblems),
798
+ isValid: valid.dateOfFundsReceived,
799
+ children: (childProps) => /* @__PURE__ */ jsx(
800
+ InputDate,
801
+ {
802
+ ...childProps,
803
+ name: "dateOfFundsReceived",
804
+ value: formatDateForInput(data.dateOfFundsReceived),
805
+ onInput: handleChangeFor("dateOfFundsReceived", "input"),
806
+ onBlur: handleChangeFor("dateOfFundsReceived", "blur"),
807
+ "aria-required": true,
808
+ "aria-invalid": !valid.dateOfFundsReceived,
809
+ max: TODAY_DATE
810
+ }
811
+ )
812
+ }
813
+ )
814
+ ] })
815
+ ] });
816
+ }
817
+ const SOFFinancierModal = (props) => {
818
+ const { t: sofT } = useTranslation("sof");
819
+ const { t: commonT } = useTranslation("common");
820
+ const { financier, handleModalClose, indexNumber, handleFinancierUpdate } = props;
821
+ const [formData, setFormData] = useState(financier);
822
+ const [formErrors, setFormErrors] = useState({});
823
+ const [confirmOpen, setConfirmOpen] = useState(false);
824
+ const [isFocused, setIsFocused] = useState(false);
825
+ const [errorMessage, setErrorMessage] = useState("");
826
+ const handleInputUpdate = (key, e) => {
827
+ const inputEl = e.target;
828
+ setErrorMessage("");
829
+ const value = inputEl?.value;
830
+ let inputData = {
831
+ [key]: value
832
+ };
833
+ if (["amount", "currency"].includes(key)) {
834
+ const amountValue = {
835
+ currency: key === "currency" ? value : formData?.amount?.currency,
836
+ value: key === "currency" ? formData?.amount?.value : value
837
+ };
838
+ inputData = { amount: amountValue };
839
+ }
840
+ const data = {
841
+ ...formData,
842
+ ...inputData
843
+ };
844
+ setFormData(data);
845
+ const errors = getInputErrors({ formErrors, data, key, value });
846
+ setFormErrors(errors);
847
+ };
848
+ const handleOnAmountBlur = () => {
849
+ setIsFocused(false);
850
+ const errors = getInputErrors({
851
+ formErrors,
852
+ data: formData,
853
+ key: "amount",
854
+ value: formData?.amount?.value
855
+ });
856
+ setFormErrors(errors);
857
+ };
858
+ const allFieldsFilled = (data) => {
859
+ return data?.firstName && data?.lastName && data?.location && data?.amount?.currency && !Number.isNaN(Number(data?.amount?.value));
860
+ };
861
+ const handleFinancierSave = () => {
862
+ if (formData && allFieldsFilled(formData)) {
863
+ handleFinancierUpdate({ formData, indexNumber });
864
+ handleModalClose();
865
+ } else {
866
+ const fields = [
867
+ "firstName",
868
+ "lastName",
869
+ "location",
870
+ "amount"
871
+ ];
872
+ const errors = fields.reduce((acc, key) => {
873
+ const value = key === "amount" ? formData?.amount?.value : formData?.[key];
874
+ return {
875
+ ...acc,
876
+ ...getInputErrors({
877
+ formErrors: void 0,
878
+ data: formData,
879
+ key,
880
+ value
881
+ })
882
+ };
883
+ }, {});
884
+ setFormErrors(errors);
885
+ setErrorMessage(sofT(($) => $["pleaseFillInAllFields"]));
886
+ }
887
+ };
888
+ const handleFinancierDelete = async () => {
889
+ handleFinancierUpdate({ indexNumber });
890
+ handleModalClose();
891
+ };
892
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
893
+ /* @__PURE__ */ jsx(Modal, { onClose: handleModalClose, ariaLabel: sofT(($) => $["investorDetails"]), inset: true, children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsModal, children: [
894
+ /* @__PURE__ */ jsx(
895
+ Typography,
896
+ {
897
+ variant: "title-l",
898
+ el: "h3",
899
+ className: styles.sourceOfFundsGettingStartedHelpHeader,
900
+ children: sofT(($) => $["investorDetails"])
901
+ }
902
+ ),
903
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsSofFinancierForm, children: [
904
+ errorMessage && /* @__PURE__ */ jsx(
905
+ Alert,
906
+ {
907
+ title: sofT(($) => $["errorSubmittingData"]),
908
+ variant: "error",
909
+ className: styles.sourceOfFundsSofFinancierFormError,
910
+ children: errorMessage
911
+ }
912
+ ),
913
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsSofFinancierFormNameGroup, children: [
914
+ /* @__PURE__ */ jsx(
915
+ Field,
916
+ {
917
+ name: "firstName",
918
+ label: commonT(($) => $["firstName"]),
919
+ errorMessage: formErrors.firstName,
920
+ isValid: !formErrors.firstName,
921
+ children: (childProps) => /* @__PURE__ */ jsx(
922
+ InputText,
923
+ {
924
+ ...childProps,
925
+ name: "firstName",
926
+ value: formData?.firstName,
927
+ onInput: (e) => handleInputUpdate("firstName", e),
928
+ onBlur: (e) => handleInputUpdate("firstName", e),
929
+ "aria-required": true,
930
+ "aria-invalid": Boolean(formErrors.firstName),
931
+ isValid: !formErrors.firstName
932
+ }
933
+ )
934
+ }
935
+ ),
936
+ /* @__PURE__ */ jsx(
937
+ Field,
938
+ {
939
+ name: "lastName",
940
+ label: commonT(($) => $["lastName"]),
941
+ errorMessage: formErrors.lastName,
942
+ isValid: !formErrors.lastName,
943
+ children: (childProps) => /* @__PURE__ */ jsx(
944
+ InputText,
945
+ {
946
+ ...childProps,
947
+ name: "lastName",
948
+ value: formData?.lastName,
949
+ onInput: (e) => handleInputUpdate("lastName", e),
950
+ onBlur: (e) => handleInputUpdate("lastName", e),
951
+ "aria-required": true,
952
+ "aria-invalid": Boolean(formErrors.lastName),
953
+ isValid: !formErrors.lastName
954
+ }
955
+ )
956
+ }
957
+ )
958
+ ] }),
959
+ /* @__PURE__ */ jsx(
960
+ Field,
961
+ {
962
+ name: "location",
963
+ label: sofT(($) => $["investorLocation"]),
964
+ errorMessage: formErrors.location,
965
+ isValid: !formErrors.location,
966
+ helperPosition: "below",
967
+ showErrorIconBottom: true,
968
+ helper: sofT(($) => $["theCityAndCountryRegion"]),
969
+ children: (childProps) => /* @__PURE__ */ jsx(
970
+ InputText,
971
+ {
972
+ ...childProps,
973
+ name: "location",
974
+ value: formData?.location,
975
+ onInput: (e) => handleInputUpdate("location", e),
976
+ onBlur: (e) => handleInputUpdate("location", e),
977
+ "aria-required": true,
978
+ "aria-invalid": Boolean(formErrors.location),
979
+ isValid: !formErrors.location
980
+ }
981
+ )
982
+ }
983
+ ),
984
+ /* @__PURE__ */ jsx(
985
+ Field,
986
+ {
987
+ el: "fieldset",
988
+ name: "amount",
989
+ label: sofT(($) => $["investmentAmount"]),
990
+ errorMessage: formErrors.amount,
991
+ isValid: !formErrors.amount,
992
+ children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, { ...childProps, id: "currencyGroup", isFocused, children: [
993
+ /* @__PURE__ */ jsx(
994
+ Select,
995
+ {
996
+ minimal: true,
997
+ name: "currency",
998
+ "aria-label": commonT(($) => $["currency"]),
999
+ isMulti: false,
1000
+ items: allowedCurrencies,
1001
+ selected: formData?.amount?.currency,
1002
+ placeholder: commonT(($) => $["select"]),
1003
+ onChange: (e) => handleInputUpdate("currency", e)
1004
+ }
1005
+ ),
1006
+ /* @__PURE__ */ jsx(
1007
+ InputText,
1008
+ {
1009
+ ...childProps,
1010
+ name: "amount",
1011
+ value: formData?.amount?.value,
1012
+ onInput: (e) => handleInputUpdate("amount", e),
1013
+ onBlur: handleOnAmountBlur,
1014
+ "aria-required": true,
1015
+ onFocusHandler: () => setIsFocused(true)
1016
+ }
1017
+ )
1018
+ ] })
1019
+ }
1020
+ )
1021
+ ] }),
1022
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsFinancierFooter, children: [
1023
+ /* @__PURE__ */ jsx(Button, { onClick: handleFinancierSave, children: commonT(($) => $["save"]) }),
1024
+ Number.isFinite(indexNumber) && /* @__PURE__ */ jsx(Button, { variant: "tertiary", onClick: () => setConfirmOpen(true), children: sofT(($) => $["deleteInvestorDetails"]) })
1025
+ ] })
1026
+ ] }) }),
1027
+ confirmOpen && /* @__PURE__ */ jsx(
1028
+ Confirm,
1029
+ {
1030
+ title: sofT(($) => $["areYouSureYouWantToDeleteThisInvestorDetails"]),
1031
+ confirmText: commonT(($) => $["delete"]),
1032
+ onConfirm: handleFinancierDelete,
1033
+ onCancel: () => setConfirmOpen(false),
1034
+ critical: true
1035
+ }
1036
+ )
1037
+ ] });
1038
+ };
1039
+ function AdditionalDataForThirdParty(props) {
1040
+ const [showFinancierModal, setShowFinancierModal] = useState(false);
1041
+ const [activeFinancier, setActiveFinancier] = useState();
1042
+ const [activeIndex, setActiveIndex] = useState();
1043
+ const { data, fieldProblems, errors, handleChangeFor, formUtils, valid } = props;
1044
+ const { t: sofT } = useTranslation("sof");
1045
+ const { i18n } = useI18nContext();
1046
+ const handleToggleFinancierModal = () => {
1047
+ setActiveFinancier(void 0);
1048
+ setActiveIndex(void 0);
1049
+ setShowFinancierModal(!showFinancierModal);
1050
+ };
1051
+ const handleShowUpdateFinancierModal = (index) => {
1052
+ if (!data.financiers) {
1053
+ return;
1054
+ }
1055
+ const financier = data.financiers[index];
1056
+ setActiveFinancier(financier);
1057
+ setActiveIndex(index);
1058
+ setShowFinancierModal(true);
1059
+ };
1060
+ const handleFinancierUpdate = ({
1061
+ formData,
1062
+ indexNumber
1063
+ }) => {
1064
+ const existingFinanciers = data.financiers || [];
1065
+ let newFinanciers = [];
1066
+ if (!formData) {
1067
+ if (indexNumber !== void 0) {
1068
+ newFinanciers = existingFinanciers.filter((_, index) => index !== indexNumber);
1069
+ }
1070
+ } else {
1071
+ newFinanciers = [...existingFinanciers, formData];
1072
+ if (Number.isFinite(indexNumber)) {
1073
+ newFinanciers = existingFinanciers.map(
1074
+ (existingFinancier, i) => i === indexNumber ? formData : existingFinancier
1075
+ );
1076
+ }
1077
+ }
1078
+ const financierEvent = {
1079
+ target: {
1080
+ name: "financiers",
1081
+ value: newFinanciers
1082
+ }
1083
+ };
1084
+ handleChangeFor("financiers")(financierEvent);
1085
+ };
1086
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1087
+ errors.financiers && !valid.financiers && /* @__PURE__ */ jsx(
1088
+ Alert,
1089
+ {
1090
+ title: i18n.get(
1091
+ formUtils.getErrorMessage("financiers", errors, fieldProblems)
1092
+ ),
1093
+ variant: "error",
1094
+ className: styles.sourceOfFundsSofFinancierFormError,
1095
+ children: sofT(($) => $["addAtLeastOneInvestor"])
1096
+ }
1097
+ ),
1098
+ data.financiers?.map((financier, index) => /* @__PURE__ */ jsxs(
1099
+ "button",
1100
+ {
1101
+ type: "button",
1102
+ onClick: () => handleShowUpdateFinancierModal(index),
1103
+ className: styles.sourceOfFundsThirdPartyFundingFinancierGroup,
1104
+ children: [
1105
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
1106
+ /* @__PURE__ */ jsx(Avatar, { iconName: "user", circle: true }),
1107
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
1108
+ /* @__PURE__ */ jsxs(Typography, { el: "div", variant: "body-strongest", children: [
1109
+ financier.firstName,
1110
+ " ",
1111
+ financier.lastName
1112
+ ] }),
1113
+ /* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: financier.location })
1114
+ ] })
1115
+ ] }),
1116
+ /* @__PURE__ */ jsx("div", { children: financier.amount?.currency && financier.amount?.value ? formatAmountWithCurrency(
1117
+ financier.amount.value,
1118
+ financier.amount?.currency
1119
+ ) : "" })
1120
+ ]
1121
+ },
1122
+ index
1123
+ )),
1124
+ /* @__PURE__ */ jsx(
1125
+ "button",
1126
+ {
1127
+ type: "button",
1128
+ className: styles.sourceOfFundsThirdPartyFundingFinancierGroup,
1129
+ onClick: handleToggleFinancierModal,
1130
+ children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
1131
+ /* @__PURE__ */ jsx(Avatar, { iconName: "plus", variant: "tertiary", circle: true }),
1132
+ /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: sofT(($) => $["addInvestor"]) })
1133
+ ] })
1134
+ }
1135
+ ),
1136
+ showFinancierModal && /* @__PURE__ */ jsx(
1137
+ SOFFinancierModal,
1138
+ {
1139
+ financier: activeFinancier,
1140
+ indexNumber: activeIndex,
1141
+ handleModalClose: handleToggleFinancierModal,
1142
+ handleFinancierUpdate
1143
+ }
1144
+ )
1145
+ ] });
1146
+ }
1147
+ function SourceOfFundsAdditionalData(props) {
1148
+ const { t } = useTranslation("common");
1149
+ const { form } = useFormContext();
1150
+ const {
1151
+ handleChangeFor: multiFormHandleChangeFor,
1152
+ data: { additionalData: data, sourceOfFundsType },
1153
+ errors: { additionalData: errors },
1154
+ valid: { additionalData: valid },
1155
+ fieldProblems: { additionalData: fieldProblems }
1156
+ } = form;
1157
+ const handleChangeFor = useMemo(
1158
+ () => (key, mode) => multiFormHandleChangeFor(key, "additionalData", mode),
1159
+ [multiFormHandleChangeFor]
1160
+ );
1161
+ const handleAmountChange = (key) => (e) => {
1162
+ const rawValue = e.target.value;
1163
+ const updatedAmount = {
1164
+ ...data?.amount,
1165
+ ...key === "currency" ? { currency: rawValue } : { value: rawValue === "" ? void 0 : Number(rawValue) }
1166
+ };
1167
+ handleChangeFor("amount")({ target: { name: "amount", value: updatedAmount } });
1168
+ };
1169
+ const formUtils = createFormUtils(props, t);
1170
+ const additionalDataProps = {
1171
+ formUtils,
1172
+ handleChangeFor,
1173
+ data,
1174
+ errors,
1175
+ valid,
1176
+ fieldProblems,
1177
+ handleAmountChange
1178
+ };
1179
+ const renderSubForms = () => {
1180
+ switch (sourceOfFundsType?.type) {
1181
+ case "gamblingWinnings":
1182
+ return /* @__PURE__ */ jsx(AdditionalDataForGambling, { ...additionalDataProps });
1183
+ case "cryptocurrencyIncome":
1184
+ return /* @__PURE__ */ jsx(AdditionalDataForCryptocurrency, { ...additionalDataProps });
1185
+ case "business":
1186
+ return /* @__PURE__ */ jsx(AdditionalDataForBusiness, { ...additionalDataProps });
1187
+ case "assetSale":
1188
+ return /* @__PURE__ */ jsx(AdditionalDataForAssetSale, { ...additionalDataProps });
1189
+ case "thirdPartyFunding":
1190
+ return /* @__PURE__ */ jsx(AdditionalDataForThirdParty, { ...additionalDataProps });
1191
+ case "inheritance":
1192
+ return /* @__PURE__ */ jsx(AdditionalDataForInheritance, { ...additionalDataProps });
1193
+ case "donations":
1194
+ return /* @__PURE__ */ jsx(AdditionalDataForDonation, { ...additionalDataProps });
1195
+ default:
1196
+ return null;
1197
+ }
1198
+ };
1199
+ return /* @__PURE__ */ jsxs("form", { className: styles.sourceOfFundsAdditionalDataForm, children: [
1200
+ /* @__PURE__ */ jsx(
1201
+ ErrorPanel,
1202
+ {
1203
+ verificationErrors: props?.formVerificationErrors,
1204
+ validationErrors: props?.fieldValidationErrors,
1205
+ formUtils,
1206
+ id: "ariaErrorField"
1207
+ }
1208
+ ),
1209
+ renderSubForms()
1210
+ ] });
1211
+ }
1212
+ function SourceOfFundsType(props) {
1213
+ const { t } = useTranslation(["common", "sof"]);
1214
+ const { i18n } = useI18nContext();
1215
+ const {
1216
+ data: formData,
1217
+ categories,
1218
+ errors: formErrors,
1219
+ fieldValidationErrors: formFieldProblems
1220
+ } = props;
1221
+ const { form } = useFormContext();
1222
+ const { handleChangeFor } = form;
1223
+ const handleFieldChange = (fieldName, mode) => handleChangeFor(fieldName, "sourceOfFundsType", mode);
1224
+ const formUtils = createFormUtils(props, t);
1225
+ const categoryItems = [
1226
+ {
1227
+ value: "adyen",
1228
+ label: t(($) => $["transactionsOnThisPlatform"], { ns: "sof" }),
1229
+ icon: getIconById("adyen")
1230
+ },
1231
+ ...categories?.map((item) => ({
1232
+ value: item.id,
1233
+ label: t(($) => $[sofCategoryItemMapper[item.name]], { ns: "sof" }),
1234
+ icon: getIconById(item.id)
1235
+ })) ?? []
1236
+ ];
1237
+ const errorMessage = formUtils.getErrorMessage("type", formErrors, formFieldProblems);
1238
+ return /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: () => /* @__PURE__ */ jsx(
1239
+ TileGroup,
1240
+ {
1241
+ name: "type",
1242
+ tiles: categoryItems,
1243
+ errorMessage: typeof errorMessage !== "boolean" ? i18n.get(errorMessage) : errorMessage,
1244
+ selected: formData?.type ? formData.type : [],
1245
+ onChange: handleFieldChange("type", "input")
1246
+ }
1247
+ ) });
1248
+ }
1249
+ function getIconById(id) {
1250
+ switch (id) {
1251
+ case "adyen":
1252
+ return "store";
1253
+ case "business":
1254
+ return "revenue-accelerate";
1255
+ case "assetSale":
1256
+ return "house";
1257
+ case "dividendIncome":
1258
+ return "graph-up";
1259
+ case "thirdPartyFunding":
1260
+ return "graph";
1261
+ case "employment":
1262
+ return "headquarter";
1263
+ case "donations":
1264
+ return "gift";
1265
+ case "inheritance":
1266
+ return "certificate";
1267
+ case "financialAid":
1268
+ return "capital";
1269
+ case "rentalIncome":
1270
+ return "house";
1271
+ case "royaltyIncome":
1272
+ return "cash-stack";
1273
+ case "pensionIncome":
1274
+ return "bank";
1275
+ case "insuranceSettlement":
1276
+ return "funds-in";
1277
+ case "cryptocurrencyIncome":
1278
+ return "coins";
1279
+ case "loans":
1280
+ return "capital";
1281
+ case "gamblingWinnings":
1282
+ return "cash-stack";
1283
+ default:
1284
+ return "contract";
1285
+ }
1286
+ }
1287
+ function SourceOfFunds(props) {
1288
+ const { activeForm, activeBusinessLine, sourceOfFundsType } = props;
1289
+ const { form } = useFormContext();
1290
+ const { data: formData, errors, valid, fieldProblems: fieldValidationErrors } = form;
1291
+ const { data: sourceOfFundsTypesData, isLoading } = useSourceOfFundsTypes();
1292
+ const { t: sofT } = useTranslation("sof");
1293
+ const pageHeadings = useMemo(
1294
+ () => getPageHeadings(sourceOfFundsType ?? "adyen"),
1295
+ [sourceOfFundsType]
1296
+ );
1297
+ return isLoading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
1298
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsWrapperHeading, children: [
1299
+ /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: activeForm?.formId === "additionalData" ? sofT(($) => $[pageHeadings.heading]) : sofT(($) => $["selectASourceOfFunding"], {
1300
+ type: getServiceTranslationSelectTitle(
1301
+ sofT,
1302
+ activeBusinessLine?.service || ""
1303
+ ).toLowerCase()
1304
+ }) }),
1305
+ /* @__PURE__ */ jsxs(Typography, { className: styles.sourceOfFundsWrapperDescription, children: [
1306
+ activeForm?.formId === "additionalData" && pageHeadings.description && sofT(($) => $[pageHeadings.description]),
1307
+ sourceOfFundsTypesData?.length === 0 && sofT(($) => $["noCategoriesAvailable"])
1308
+ ] })
1309
+ ] }),
1310
+ sofErrorMessage.value && /* @__PURE__ */ jsxs(
1311
+ Typography,
1312
+ {
1313
+ variant: "caption",
1314
+ color: "critical",
1315
+ "aria-live": "polite",
1316
+ className: "adyen-kyc-u-justify-content-center adyen-kyc-u-display-flex",
1317
+ children: [
1318
+ /* @__PURE__ */ jsx(Icon, { name: "field-error", className: "adyen-kyc-u-margin-right-2" }),
1319
+ /* @__PURE__ */ jsx("span", { children: sofErrorMessage.value })
1320
+ ]
1321
+ }
1322
+ ),
1323
+ activeForm?.formId === "sourceOfFundsType" && /* @__PURE__ */ jsx(
1324
+ SourceOfFundsType,
1325
+ {
1326
+ categories: sourceOfFundsTypesData,
1327
+ data: formData?.sourceOfFundsType,
1328
+ errors: errors?.sourceOfFundsType,
1329
+ valid: valid?.sourceOfFundsType,
1330
+ fieldValidationErrors: fieldValidationErrors?.sourceOfFundsType
1331
+ }
1332
+ ),
1333
+ activeForm?.formId === "additionalData" && /* @__PURE__ */ jsx(
1334
+ SourceOfFundsAdditionalData,
1335
+ {
1336
+ fieldValidationErrors: fieldValidationErrors?.additionalData
1337
+ }
1338
+ ),
1339
+ activeForm?.formId === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { children: sofT(($) => $["uploadADocument"]) })
1340
+ ] });
1341
+ }
1342
+ function SourceOfFundsGettingStartedCard(props) {
1343
+ const { id, title, onClick, isEdit, meta } = props;
1344
+ const { t: commonT } = useTranslation("common");
1345
+ return /* @__PURE__ */ jsxs(Card, { variant: "secondary", children: [
1346
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsGettingStartedCardsCardHeader, children: [
1347
+ /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: title }),
1348
+ isEdit ? /* @__PURE__ */ jsx(IconButton, { ariaLabel: "edit", icon: "edit", onClick, variant: "tertiary" }) : /* @__PURE__ */ jsx(
1349
+ Button,
1350
+ {
1351
+ variant: "primary",
1352
+ testId: "source-of-funds-getting-card-secondary-button",
1353
+ onClick,
1354
+ children: commonT(($) => $["start"])
1355
+ }
1356
+ )
1357
+ ] }),
1358
+ isEdit && meta?.length && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedCardsCardBody, children: /* @__PURE__ */ jsx(
1359
+ StructuredList,
1360
+ {
1361
+ className: styles.sourceOfFundsGettingStartedCardsCardDescription,
1362
+ items: meta
1363
+ }
1364
+ ) })
1365
+ ] }, id);
1366
+ }
1367
+ const digitalWallet = lazy(() => import("./digital-wallet-Bx5YM1LY.js"));
1368
+ const SourceOfFundsGettingStarted = ({
1369
+ handleGettingStartedClick,
1370
+ handleCancelClick,
1371
+ handleSourceOfFundsClick,
1372
+ businessLines,
1373
+ handleNavigateToUploadPage,
1374
+ problems,
1375
+ legalEntity,
1376
+ isSoFDocumentMissing
1377
+ }) => {
1378
+ const { t: sofT } = useTranslation("sof");
1379
+ const { t: commonT } = useTranslation("common");
1380
+ const { i18n } = useI18nContext();
1381
+ const hasSourceOfFunds = businessLines?.some(
1382
+ (businessLine) => !isEmpty(businessLine.sourceOfFunds)
1383
+ );
1384
+ const { data: normalizedTasks } = useTaskStatus({
1385
+ refetchInterval: TASK_STATUS_POLLING_INTERVAL_MS
1386
+ });
1387
+ const sofDocuments = useMemo(
1388
+ () => legalEntity?.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [],
1389
+ [legalEntity]
1390
+ );
1391
+ const mapBusinessLines = useCallback(
1392
+ (lines) => {
1393
+ const completedBusinessLines = businessLines.every((line) => line?.sourceOfFunds?.type);
1394
+ const cards = lines.map((line) => {
1395
+ const SoF = mapSourceOfFundToSourceOfFundsSchema(line);
1396
+ return {
1397
+ title: getServiceTranslation(sofT, line.service || ""),
1398
+ type: line?.sourceOfFunds?.type,
1399
+ isEdit: !!line?.sourceOfFunds?.type || !!line?.sourceOfFunds?.adyenProcessedFunds,
1400
+ onClick: () => handleSourceOfFundsClick(SoF, line),
1401
+ meta: [
1402
+ {
1403
+ term: sofT(($) => $["sourceOfFunds"]),
1404
+ details: getSofCardDetails(sofT, line?.sourceOfFunds)
1405
+ },
1406
+ ...getGettingStartedCardDetails(
1407
+ getAdditionalDataSchemaKeys(
1408
+ line?.sourceOfFunds?.type || "adyen",
1409
+ line?.sourceOfFunds?.originatorType
1410
+ ),
1411
+ sofT,
1412
+ line?.sourceOfFunds
1413
+ )
1414
+ ]
1415
+ };
1416
+ }).sort((a) => a?.type ? 1 : -1);
1417
+ const uploadCard = {
1418
+ title: getServiceTranslation(sofT),
1419
+ type: "",
1420
+ isEdit: !!sofDocuments?.length,
1421
+ onClick: handleNavigateToUploadPage,
1422
+ meta: sofDocuments?.length ? sofDocuments.map((doc) => ({
1423
+ term: sofT(($) => $["fileName"]),
1424
+ details: [
1425
+ doc?.fileName,
1426
+ /* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(sofT, doc?.description) || "" }, "docDescription")
1427
+ ]
1428
+ })) : []
1429
+ };
1430
+ if (completedBusinessLines && (isSoFDocumentMissing || sofDocuments?.length)) {
1431
+ if (uploadCard.meta?.length) {
1432
+ cards.push(uploadCard);
1433
+ } else {
1434
+ cards.unshift(uploadCard);
1435
+ }
1436
+ }
1437
+ return cards.map((item, index) => {
1438
+ return /* @__PURE__ */ jsx(
1439
+ SourceOfFundsGettingStartedCard,
1440
+ {
1441
+ id: index,
1442
+ isEdit: !!item.isEdit,
1443
+ title: item.title,
1444
+ onClick: item.onClick,
1445
+ meta: item.meta
1446
+ },
1447
+ index
1448
+ );
1449
+ });
1450
+ },
1451
+ [handleSourceOfFundsClick, i18n, sofDocuments]
1452
+ );
1453
+ const errorObjects = useMemo(
1454
+ () => getRelevantErrors(problems, SOF_INVALID_INPUT_ERROR_CODES),
1455
+ [problems]
1456
+ );
1457
+ return /* @__PURE__ */ jsxs(
1458
+ "div",
1459
+ {
1460
+ className: styles.sourceOfFundsGettingStarted,
1461
+ "data-testid": "source-of-funds-getting-started",
1462
+ children: [
1463
+ !hasSourceOfFunds && /* @__PURE__ */ jsx(
1464
+ LandingLayout,
1465
+ {
1466
+ media: /* @__PURE__ */ jsx(Image, { lazyLoadedImage: digitalWallet }),
1467
+ title: sofT(($) => $["fundingSourcesForFinancialProducts"]),
1468
+ description: sofT(($) => $["inTheNextStepWellCollectInformation"]),
1469
+ actions: /* @__PURE__ */ jsxs(Fragment, { children: [
1470
+ /* @__PURE__ */ jsx(
1471
+ Button,
1472
+ {
1473
+ fullWidth: true,
1474
+ testId: "source-of-funds-getting-primary-button",
1475
+ onClick: handleGettingStartedClick,
1476
+ children: sofT(($) => $["getStarted"])
1477
+ }
1478
+ ),
1479
+ handleCancelClick && /* @__PURE__ */ jsx(
1480
+ Button,
1481
+ {
1482
+ variant: "tertiary",
1483
+ fullWidth: true,
1484
+ testId: "source-of-funds-getting-cancel-button",
1485
+ onClick: handleCancelClick,
1486
+ children: commonT(($) => $["backToTaskList"])
1487
+ }
1488
+ )
1489
+ ] })
1490
+ }
1491
+ ),
1492
+ hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
1493
+ /* @__PURE__ */ jsx(
1494
+ Header,
1495
+ {
1496
+ title: sofT(($) => $["fundingSourcesForFinancialProducts"]),
1497
+ description: sofT(($) => $["addAllSourcesOfFundsBeingUsed"]),
1498
+ status: normalizedTasks?.SOURCE_OF_FUNDS?.status,
1499
+ align: "center"
1500
+ }
1501
+ ),
1502
+ errorObjects && errorObjects.map((errorObj, index) => {
1503
+ const uniqueActions = getUniqueRemediationActions(errorObj);
1504
+ const errorItems = errorObj.subErrors?.map((subError) => subError.message) || [];
1505
+ return /* @__PURE__ */ jsxs(
1506
+ Alert,
1507
+ {
1508
+ title: errorObj.message,
1509
+ className: styles.sourceOfFundsGettingStartedError,
1510
+ variant: "error",
1511
+ children: [
1512
+ errorObj?.subErrors?.length && /* @__PURE__ */ jsx("ul", { children: errorItems.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) }),
1513
+ uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedErrorActions, children: uniqueActions.filter((action) => action.code !== "1_519").map((action, i) => /* @__PURE__ */ jsx(
1514
+ Button,
1515
+ {
1516
+ variant: "tertiary",
1517
+ testId: `remediate-action-${i}`,
1518
+ onClick: handleNavigateToUploadPage,
1519
+ children: action.message
1520
+ },
1521
+ `action-${i}`
1522
+ )) })
1523
+ ]
1524
+ },
1525
+ `error-${index}`
1526
+ );
1527
+ }),
1528
+ /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedCards, children: /* @__PURE__ */ jsx(StackLayout, { children: mapBusinessLines(businessLines) }) }),
1529
+ handleCancelClick && /* @__PURE__ */ jsx(
1530
+ Button,
1531
+ {
1532
+ variant: "secondary",
1533
+ testId: "source-of-funds-getting-return-button",
1534
+ onClick: handleCancelClick,
1535
+ children: commonT(($) => $["backToTaskList"])
1536
+ }
1537
+ )
1538
+ ] })
1539
+ ]
1540
+ }
1541
+ );
1542
+ };
1543
+ const SOFUploadModal = (props) => {
1544
+ const { showToast } = useToastContext();
1545
+ const logger2 = createLogger();
1546
+ const { t: sofT } = useTranslation("sof");
1547
+ const { t: commonT } = useTranslation("common");
1548
+ const { businessLines, handleModalClose, documentUtils } = props;
1549
+ const firstService = businessLines?.length === 1 ? businessLines?.[0]?.service : void 0;
1550
+ const [selectedService, setSelectedService] = useState(
1551
+ firstService
1552
+ );
1553
+ const [documentType, setDocumentType] = useState();
1554
+ const onRadioChange = (selectedId) => {
1555
+ setSelectedService(selectedId);
1556
+ setDocumentType(void 0);
1557
+ };
1558
+ const onDocumentTypeChange = (e) => {
1559
+ setDocumentType(e.target.value);
1560
+ };
1561
+ const serviceRadioItems = useMemo(() => {
1562
+ return businessLines.map((businessLine) => ({
1563
+ id: businessLine.service,
1564
+ name: sofT(($) => $[getServiceTranslationKey(businessLine?.service || "")])
1565
+ }));
1566
+ }, [businessLines, sofT]);
1567
+ const canUpload = useMemo(() => selectedService && documentType, [selectedService, documentType]);
1568
+ const selectedBusinessLineId = businessLines?.find((businessLine) => businessLine.service === selectedService)?.id || "";
1569
+ const documentLists = useMemo(() => {
1570
+ const selectedType = businessLines?.find(
1571
+ (businessLine) => businessLine.service === selectedService
1572
+ )?.sourceOfFunds?.type;
1573
+ if (selectedType) {
1574
+ const lists = getDocumentLists(selectedType);
1575
+ const items = lists.map((list) => ({
1576
+ id: list,
1577
+ name: sofT(($) => $[list])
1578
+ }));
1579
+ return items;
1580
+ }
1581
+ return [];
1582
+ }, [businessLines, sofT, selectedService]);
1583
+ const documentRequirements = useMemo(() => {
1584
+ return documentType ? getDocumentRequirements[documentType] : [];
1585
+ }, [documentType]);
1586
+ const onFileUpload = async (files) => {
1587
+ if (!canUpload) {
1588
+ showToast({ label: sofT(($) => $["unableToUploadDocument"]), variant: "error" });
1589
+ return;
1590
+ }
1591
+ const formattedDocument = await createDocumentRequest({
1592
+ entityId: selectedBusinessLineId,
1593
+ entityType: "businessLine",
1594
+ documentType: "proofOfFundingOrWealthSource",
1595
+ page1: files[0],
1596
+ description: `$SERVICE_NAME:${selectedService}--TYPE_NAME:${documentType}`
1597
+ });
1598
+ if (formattedDocument) {
1599
+ try {
1600
+ await documentUtils.uploadDocuments([formattedDocument], selectedBusinessLineId);
1601
+ showToast({
1602
+ label: sofT(($) => $["documentUploadedSuccessfully"]),
1603
+ variant: "success",
1604
+ duration: 1e4
1605
+ });
1606
+ handleModalClose();
1607
+ } catch (e) {
1608
+ logger2.log(e);
1609
+ showToast({ label: sofT(($) => $["unableToUploadDocument"]), variant: "error" });
1610
+ }
1611
+ }
1612
+ };
1613
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1614
+ Modal,
1615
+ {
1616
+ onClose: handleModalClose,
1617
+ ariaLabel: sofT(($) => $["uploadASupportingDocument"]),
1618
+ inset: true,
1619
+ children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsModal, children: [
1620
+ /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: sofT(($) => $["uploadASupportingDocument"]) }),
1621
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContent, children: [
1622
+ businessLines?.length > 1 ? /* @__PURE__ */ jsx(
1623
+ Field,
1624
+ {
1625
+ el: "fieldset",
1626
+ name: "service",
1627
+ className: styles.sourceOfFundsUploadModalContentField,
1628
+ label: sofT(($) => $["whatFinancialProductIsThisFor"]),
1629
+ children: (childProps) => /* @__PURE__ */ jsx(
1630
+ RadioGroup,
1631
+ {
1632
+ ...childProps,
1633
+ name: "service",
1634
+ className: styles.sourceOfFundsUploadModalContentFieldRadioGroup,
1635
+ items: serviceRadioItems,
1636
+ value: selectedService,
1637
+ disabled: false,
1638
+ onChange: onRadioChange,
1639
+ "aria-required": true
1640
+ }
1641
+ )
1642
+ }
1643
+ ) : null,
1644
+ selectedService && /* @__PURE__ */ jsx(
1645
+ Field,
1646
+ {
1647
+ name: "documentType",
1648
+ label: commonT(($) => $["documentType"]),
1649
+ "data-testid": "documentType",
1650
+ className: styles.sourceOfFundsUploadModalContentField,
1651
+ children: (childProps) => /* @__PURE__ */ jsx(
1652
+ Select,
1653
+ {
1654
+ ...childProps,
1655
+ name: "documentType",
1656
+ placeholder: commonT(($) => $["selectOne"]),
1657
+ selected: documentType,
1658
+ items: documentLists,
1659
+ onChange: onDocumentTypeChange
1660
+ }
1661
+ )
1662
+ }
1663
+ ),
1664
+ documentRequirements?.length ? /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContentRequirementsContainer, children: [
1665
+ /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "div", children: sofT(($) => $["documentShouldShow"]) }),
1666
+ /* @__PURE__ */ jsx("ul", { children: documentRequirements?.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "div", children: sofT(($) => $[requirement]) }) }, requirement)) })
1667
+ ] }) : null,
1668
+ canUpload && /* @__PURE__ */ jsx(
1669
+ Dropzone,
1670
+ {
1671
+ disabled: !canUpload,
1672
+ onChange: onFileUpload,
1673
+ showMinimal: true,
1674
+ hidePageCount: true,
1675
+ maxSize: 4194304,
1676
+ enableTracking: true,
1677
+ name: "documentField",
1678
+ allowedFileTypes: ["JPG", "JPEG", "PNG", "PDF"]
1679
+ }
1680
+ )
1681
+ ] })
1682
+ ] })
1683
+ }
1684
+ ) });
1685
+ };
1686
+ const SourceOfFundsUpload = ({
1687
+ businessLines,
1688
+ documentUtils,
1689
+ legalEntity,
1690
+ handleNavigateToSummary
1691
+ }) => {
1692
+ const [showUploadModal, setShowUploadModal] = useState(false);
1693
+ const [docToDelete, setDocToDelete] = useState(void 0);
1694
+ const { showToast } = useToastContext();
1695
+ const logger2 = createLogger();
1696
+ const queryClient = useQueryClient();
1697
+ const { t: sofT } = useTranslation("sof");
1698
+ const { t: commonT } = useTranslation("common");
1699
+ const handleModalClose = async () => {
1700
+ setShowUploadModal(false);
1701
+ await queryClient.invalidateQueries({
1702
+ queryKey: ["legalEntity", legalEntity.id]
1703
+ });
1704
+ };
1705
+ const openUploadModal = () => {
1706
+ setShowUploadModal(true);
1707
+ };
1708
+ const documents = useMemo(
1709
+ () => legalEntity.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [],
1710
+ [legalEntity]
1711
+ );
1712
+ const sourceOfFundsCategories = businessLines?.map((line) => line.sourceOfFunds?.type)?.filter(Boolean);
1713
+ const getTranslatedCategoryName = (categoryKey) => {
1714
+ const translationKey2 = sofCategoryItemMapper[categoryKey];
1715
+ if (!categoryKey || !translationKey2) {
1716
+ return "";
1717
+ }
1718
+ return sofT(($) => $[translationKey2]).toLowerCase();
1719
+ };
1720
+ let translationKey;
1721
+ let translationParams;
1722
+ if (sourceOfFundsCategories?.length > 1) {
1723
+ translationKey = "weNeedProofOfFundingForMultipleCategories";
1724
+ translationParams = {
1725
+ category1_name: getTranslatedCategoryName(sourceOfFundsCategories[0]),
1726
+ category2_name: getTranslatedCategoryName(sourceOfFundsCategories[1])
1727
+ };
1728
+ } else if (sourceOfFundsCategories?.length === 1) {
1729
+ translationKey = "weNeedProofOfFunding";
1730
+ translationParams = {
1731
+ category_name: getTranslatedCategoryName(sourceOfFundsCategories[0])
1732
+ };
1733
+ } else {
1734
+ translationKey = "weNeedProofOfFundingForNoCategory";
1735
+ }
1736
+ const handleFileDelete = async (documentId) => {
1737
+ if (documentUtils.deleteDocument) {
1738
+ try {
1739
+ await documentUtils.deleteDocument(documentId, legalEntity.id);
1740
+ await queryClient.invalidateQueries({
1741
+ queryKey: ["legalEntity", legalEntity.id]
1742
+ });
1743
+ showToast({
1744
+ label: sofT(($) => $["documentDeletedSuccessfully"]),
1745
+ variant: "success",
1746
+ duration: 1e4
1747
+ });
1748
+ } catch (e) {
1749
+ logger2.log(e);
1750
+ showToast({ label: sofT(($) => $["unableToDeleteDocument"]), variant: "error" });
1751
+ }
1752
+ }
1753
+ };
1754
+ return /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadList, children: [
1755
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadListHeading, children: [
1756
+ /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: sofT(($) => $["supportingDocuments"]) }),
1757
+ /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children: sofT(($) => $[translationKey], translationParams) })
1758
+ ] }),
1759
+ documents?.map((document) => /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
1760
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
1761
+ /* @__PURE__ */ jsx(Avatar, { iconName: "document", circle: true }),
1762
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
1763
+ /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: document.fileName }),
1764
+ /* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: parseSOFDocumentDescription(sofT, document.description) })
1765
+ ] })
1766
+ ] }),
1767
+ /* @__PURE__ */ jsx(
1768
+ IconButton,
1769
+ {
1770
+ ariaLabel: commonT(($) => $["deleteDocument"]),
1771
+ variant: "tertiary",
1772
+ icon: "cross",
1773
+ onClick: () => setDocToDelete(document),
1774
+ testId: "source-of-funds-remove-button"
1775
+ }
1776
+ )
1777
+ ] }, document.id)),
1778
+ /* @__PURE__ */ jsx(
1779
+ "button",
1780
+ {
1781
+ type: "button",
1782
+ className: styles.sourceOfFundsThirdPartyFundingFinancierGroup,
1783
+ onClick: openUploadModal,
1784
+ "data-testId": "source-of-funds-upload-button",
1785
+ children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
1786
+ /* @__PURE__ */ jsx(Avatar, { label: sofT(($) => $["addDocument"]), iconName: "plus", circle: true }),
1787
+ /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: sofT(($) => $["addDocument"]) })
1788
+ ] })
1789
+ }
1790
+ ),
1791
+ handleNavigateToSummary && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedActions, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children: documents?.length > 0 ? commonT(($) => $["finish"]) : commonT(($) => $["cancel"]) }) }),
1792
+ !!docToDelete && /* @__PURE__ */ jsx(
1793
+ Confirm,
1794
+ {
1795
+ title: sofT(($) => $["areYouSureYouWantToDeleteThisDocument"], {
1796
+ documentName: docToDelete?.fileName || ""
1797
+ }),
1798
+ confirmText: commonT(($) => $["delete"]),
1799
+ onConfirm: () => handleFileDelete(docToDelete?.id),
1800
+ onCancel: () => setDocToDelete(void 0),
1801
+ critical: true
1802
+ }
1803
+ ),
1804
+ showUploadModal && /* @__PURE__ */ jsx(
1805
+ SOFUploadModal,
1806
+ {
1807
+ documentUtils,
1808
+ handleModalClose,
1809
+ businessLines
1810
+ }
1811
+ )
1812
+ ] });
1813
+ };
1814
+ function canParseUrl(url) {
1815
+ if (URL.canParse) {
1816
+ return URL.canParse(url);
1817
+ }
1818
+ try {
1819
+ new URL(url);
1820
+ return true;
1821
+ } catch {
1822
+ return false;
1823
+ }
1824
+ }
1825
+ const sourceOfFundsTypeValidations = {};
1826
+ const HAS_PROTOCOL_REGEX = /^https?:\/\//i;
1827
+ const sourceOfFundsAdditionalDataValidations = {
1828
+ website: {
1829
+ modes: ["blur"],
1830
+ validate: (val) => !!val && canParseUrl(val),
1831
+ errorMessage: (val) => {
1832
+ if (val && !HAS_PROTOCOL_REGEX.test(val)) return "validationUrlMustStartWithHttpOrHttps";
1833
+ return "validationPleaseEnterAValidUrl";
1834
+ }
1835
+ },
1836
+ amount: {
1837
+ modes: ["blur"],
1838
+ validate: (amount) => amount?.value != null && !Number.isNaN(Number(amount.value)),
1839
+ errorMessage: "pleaseEnterAValidAmount"
1840
+ },
1841
+ dateOfSourceEvent: {
1842
+ modes: ["blur"],
1843
+ validate: (dateOfSourceEvent) => validateDateNotInTheFuture(dateOfSourceEvent),
1844
+ errorMessage: "dateCannotBeInTheFuture"
1845
+ },
1846
+ dateOfFundsReceived: {
1847
+ modes: ["blur"],
1848
+ validate: (dateOfFundsReceived) => validateDateNotInTheFuture(dateOfFundsReceived),
1849
+ errorMessage: "dateCannotBeInTheFuture"
1850
+ }
1851
+ };
1852
+ const logger = createLogger();
1853
+ function SourceOfFundsDropin({
1854
+ country,
1855
+ problems,
1856
+ handleHomeClick
1857
+ }) {
1858
+ const { data: legalEntity, isLoading: isLoadingRootLegalEntity } = useLegalEntity(ROOT_LE);
1859
+ const [loadingStatus, setLoadingStatus] = useState("success");
1860
+ const [activeBusinessLine, setActiveBusinessLine] = useState();
1861
+ const [activeSourceOfFund, setActiveSourceOfFund] = useState({
1862
+ sourceOfFundsType: {},
1863
+ additionalData: {}
1864
+ });
1865
+ const [allBusinessLines, setAllBusinessLines] = useState([]);
1866
+ const [gettingStarted, setGettingStarted] = useState(true);
1867
+ const [showUploadPage, setShowUploadPage] = useState(false);
1868
+ const [loading, setLoading] = useState(false);
1869
+ const { baseUrl, rootLegalEntityId } = useApiContext();
1870
+ const { t: sofT } = useTranslation("sof");
1871
+ const userEvents = useAnalyticsContext();
1872
+ const { showToast } = useToastContext();
1873
+ const { data: sofBusinessLines, isLoading: isLoadingBusinessLines } = useBusinessLines(ALLOWED_SOF_SERVICES);
1874
+ const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
1875
+ const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
1876
+ const { mutateAsync: updateSoFMutation } = useUpdateSourceOfFunds();
1877
+ const form = useMultiForm({
1878
+ requiredFields: getSourceOfFundsRequiredFields,
1879
+ rules: {
1880
+ sourceOfFundsType: sourceOfFundsTypeValidations,
1881
+ additionalData: sourceOfFundsAdditionalDataValidations
1882
+ },
1883
+ defaultData: activeSourceOfFund
1884
+ });
1885
+ const {
1886
+ data = activeSourceOfFund,
1887
+ setFormData,
1888
+ requiredFields,
1889
+ isValid,
1890
+ triggerValidation
1891
+ } = form;
1892
+ const isSoFDocumentMissing = useMemo(
1893
+ () => legalEntity?.problems?.some(
1894
+ (problem) => problem?.verificationErrors?.some(
1895
+ (verificationError) => verificationError?.code === MISSING_DATA_SOF_UPLOAD_CODE
1896
+ )
1897
+ ) ?? false,
1898
+ [legalEntity?.problems]
1899
+ );
1900
+ const idsToFetch = sofBusinessLines?.map((businessLine) => businessLine.sourceOfFunds?.originatorLegalEntityId).filter((id) => Boolean(id)) ?? [];
1901
+ const legalEntityResults = useLegalEntities(idsToFetch, {
1902
+ staleTime: 5 * 60 * 1e3
1903
+ // 5 minutes
1904
+ });
1905
+ const areLegalEntitiesLoading = legalEntityResults.some((result) => result.isLoading);
1906
+ const normalizedBusinessLines = useMemo(() => {
1907
+ if (!sofBusinessLines) {
1908
+ return null;
1909
+ }
1910
+ return sofBusinessLines.map((businessLine, index) => {
1911
+ const result = legalEntityResults[index];
1912
+ let updatedBusinessLine = { ...businessLine };
1913
+ if (result && result.data) {
1914
+ updatedBusinessLine = parseOriginatorDetails(result.data, updatedBusinessLine);
1915
+ } else if (result && result.isError) {
1916
+ logger.error(`Error fetching legal entity for BL ${businessLine.id}:`, result.error);
1917
+ showToast({ label: sofT(($) => $["unableToLoadRelatedEntity"]), variant: "error" });
1918
+ }
1919
+ if (updatedBusinessLine.sourceOfFunds?.adyenProcessedFunds) {
1920
+ updatedBusinessLine.sourceOfFunds.type = "adyen";
1921
+ }
1922
+ return updatedBusinessLine;
1923
+ });
1924
+ }, [
1925
+ sofBusinessLines,
1926
+ // This is because the result of useQueries is not referentially stable, even though the individual query results are, so eslint complains
1927
+ // Also, this is generally safe, since this is typically what React Query returns
1928
+ JSON.stringify(
1929
+ legalEntityResults.map((r) => ({
1930
+ data: r.data,
1931
+ isError: r.isError,
1932
+ error: r.error,
1933
+ isLoading: r.isLoading
1934
+ }))
1935
+ )
1936
+ ]);
1937
+ useEffect(() => {
1938
+ if (sofBusinessLines && !areLegalEntitiesLoading && normalizedBusinessLines) {
1939
+ clearSofErrorMessage();
1940
+ setLoading(true);
1941
+ try {
1942
+ if (normalizedBusinessLines.length) {
1943
+ const firstBusinessLine = normalizedBusinessLines[0];
1944
+ const sourceOfFundsMap = normalizedBusinessLines.map(
1945
+ (businessLine) => mapSourceOfFundToSourceOfFundsSchema(businessLine)
1946
+ );
1947
+ if (firstBusinessLine) {
1948
+ setActiveBusinessLine(firstBusinessLine);
1949
+ const mappedSof = sourceOfFundsMap[0];
1950
+ setActiveSourceOfFund(mappedSof);
1951
+ setAllBusinessLines(normalizedBusinessLines);
1952
+ if (mappedSof?.sourceOfFundsType) {
1953
+ setFormData("sourceOfFundsType", mappedSof.sourceOfFundsType);
1954
+ }
1955
+ if (mappedSof?.additionalData) {
1956
+ setFormData("additionalData", mappedSof.additionalData);
1957
+ }
1958
+ }
1959
+ }
1960
+ } catch (error) {
1961
+ showToast({ label: sofT(($) => $["unableToLoadRelatedEntity"]), variant: "error" });
1962
+ logger.error(error);
1963
+ } finally {
1964
+ setLoading(false);
1965
+ }
1966
+ }
1967
+ }, [sofBusinessLines, areLegalEntitiesLoading, normalizedBusinessLines, sofT, logger]);
1968
+ useEffect(() => {
1969
+ userEvents.addTaskEvent("Landed on page", {
1970
+ actionType: "start"
1971
+ });
1972
+ }, [userEvents]);
1973
+ const sourceOfFundsRequiredForms = useMemo(
1974
+ () => getSourceOfFundsRequiredForms(data?.sourceOfFundsType),
1975
+ [data?.sourceOfFundsType]
1976
+ );
1977
+ const forms = useMemo(() => {
1978
+ const requiredForms = getRequiredForms(
1979
+ sourceOfFundsRequiredForms,
1980
+ requiredFields,
1981
+ void 0,
1982
+ true
1983
+ );
1984
+ return addValidityToForms(requiredForms, isValid, problems);
1985
+ }, [sourceOfFundsRequiredForms, requiredFields, isValid, problems]);
1986
+ const createOrUpdateOriginator = async (additionalData, prevAdditionalData) => {
1987
+ let originatorLegalEntityId;
1988
+ const sofOriginator = parseSofOriginatorPayload(additionalData);
1989
+ if (additionalData?.originatorLegalEntityId && additionalData?.originatorType === prevAdditionalData?.originatorType) {
1990
+ try {
1991
+ sofOriginator.id = additionalData?.originatorLegalEntityId;
1992
+ if (sofOriginator.type) {
1993
+ delete sofOriginator.type;
1994
+ }
1995
+ const patchLegalEntity = {
1996
+ ...sofOriginator,
1997
+ id: sofOriginator.id
1998
+ };
1999
+ const le = await updateLegalEntity(patchLegalEntity);
2000
+ originatorLegalEntityId = le?.id;
2001
+ } catch (e) {
2002
+ logger.log("Error updating originator legal entity", e);
2003
+ }
2004
+ } else {
2005
+ try {
2006
+ const le = await createLegalEntity(sofOriginator);
2007
+ originatorLegalEntityId = le?.id;
2008
+ } catch (e) {
2009
+ logger.log("Error creating originator legal entity", e);
2010
+ }
2011
+ }
2012
+ return originatorLegalEntityId;
2013
+ };
2014
+ const handleSubmit = useCallback(async () => {
2015
+ const sofData = { ...data };
2016
+ const sofType = sofData?.sourceOfFundsType?.type;
2017
+ if (!sofType || !activeBusinessLine?.id) {
2018
+ return;
2019
+ }
2020
+ const eventsAdditionalData = {};
2021
+ setLoadingStatus("loading");
2022
+ const { additionalData } = sofData;
2023
+ const sofPayload = getSourceOfFundsPayload(sofType, additionalData);
2024
+ if (sofType === "donations" || sofType === "inheritance") {
2025
+ try {
2026
+ sofPayload.originatorLegalEntityId = await createOrUpdateOriginator(
2027
+ additionalData,
2028
+ activeSourceOfFund?.additionalData
2029
+ );
2030
+ } catch (e) {
2031
+ setSofErrorMessage(e?.message || sofT(($) => $["errorUpdatingSourceOfFunds"]));
2032
+ logger.log("Error updating source of funds", e);
2033
+ }
2034
+ eventsAdditionalData.originatorType = additionalData?.originatorType ?? "";
2035
+ }
2036
+ if (sofType === "thirdPartyFunding") {
2037
+ eventsAdditionalData.financiers = `${additionalData?.financiers?.length || 0} investor(s)`;
2038
+ }
2039
+ const sofMutationPayload = {
2040
+ ...sofPayload,
2041
+ businessLineId: activeBusinessLine.id
2042
+ };
2043
+ try {
2044
+ await updateSoFMutation(sofMutationPayload);
2045
+ userEvents.addTaskEvent("Success", {
2046
+ actionType: "submit",
2047
+ returnValue: sofType,
2048
+ additionalData: eventsAdditionalData
2049
+ });
2050
+ setGettingStarted(true);
2051
+ setShowUploadPage(false);
2052
+ setActiveSourceOfFund({ sourceOfFundsType: {}, additionalData: {} });
2053
+ gotoFormByFormIndex(0);
2054
+ setSofErrorMessage("");
2055
+ showToast({ label: sofT(($) => $["successAddedFundingSources"]), variant: "success" });
2056
+ handleHomeClick?.();
2057
+ } catch (e) {
2058
+ setSofErrorMessage(sofT(($) => $["errorUpdatingSourceOfFunds"]));
2059
+ logger.log("Error updating source of funds", e);
2060
+ }
2061
+ setLoadingStatus("success");
2062
+ }, [data, activeSourceOfFund, handleHomeClick]);
2063
+ const handleGettingStarted = useCallback(() => {
2064
+ setGettingStarted(!gettingStarted);
2065
+ }, [gettingStarted]);
2066
+ const handleSourceOfFundsClick = (SoF, businessLine) => {
2067
+ setActiveBusinessLine(businessLine);
2068
+ setActiveSourceOfFund(SoF);
2069
+ setGettingStarted(false);
2070
+ };
2071
+ const { handleNextClick, activeForm, gotoFormByFormIndex, steps, handleBackClick } = useFormComposer({
2072
+ problems,
2073
+ forms,
2074
+ onSubmit: handleSubmit,
2075
+ triggerValidation
2076
+ });
2077
+ const documentUtils = documentApiUtils({
2078
+ baseUrl: baseUrl.value,
2079
+ rootLegalEntityId: rootLegalEntityId.value
2080
+ });
2081
+ const handleNavigateToSummary = async () => {
2082
+ setShowUploadPage(false);
2083
+ setGettingStarted(true);
2084
+ };
2085
+ const handleNavigateToUploadPage = () => {
2086
+ setShowUploadPage(true);
2087
+ };
2088
+ return /* @__PURE__ */ jsx("div", { className: styles.sourceOfFunds, children: loading || isLoadingRootLegalEntity || isLoadingBusinessLines || areLegalEntitiesLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
2089
+ gettingStarted && !showUploadPage && legalEntity && /* @__PURE__ */ jsx(
2090
+ SourceOfFundsGettingStarted,
2091
+ {
2092
+ handleCancelClick: handleHomeClick,
2093
+ handleGettingStartedClick: handleGettingStarted,
2094
+ businessLines: allBusinessLines,
2095
+ problems: legalEntity?.problems,
2096
+ handleSourceOfFundsClick,
2097
+ handleNavigateToUploadPage,
2098
+ legalEntity,
2099
+ isSoFDocumentMissing
2100
+ }
2101
+ ),
2102
+ showUploadPage && legalEntity && /* @__PURE__ */ jsx(
2103
+ SourceOfFundsUpload,
2104
+ {
2105
+ businessLines: allBusinessLines,
2106
+ documentUtils,
2107
+ legalEntity,
2108
+ handleNavigateToSummary
2109
+ }
2110
+ ),
2111
+ !gettingStarted && !showUploadPage && /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
2112
+ FormFlow,
2113
+ {
2114
+ forms,
2115
+ disableNextButton: !activeForm.isValid,
2116
+ activeForm,
2117
+ gotoFormByFormIndex,
2118
+ handleBackClick: steps.current === 0 ? handleGettingStarted : handleBackClick,
2119
+ handleCancelClick: handleHomeClick,
2120
+ handleNextClick,
2121
+ loadingStatus,
2122
+ currentStep: steps.current,
2123
+ totalSteps: steps.total,
2124
+ children: /* @__PURE__ */ jsx(
2125
+ SourceOfFunds,
2126
+ {
2127
+ country,
2128
+ activeForm,
2129
+ activeBusinessLine,
2130
+ sourceOfFundsType: data?.sourceOfFundsType?.type,
2131
+ data: activeSourceOfFund
2132
+ }
2133
+ )
2134
+ }
2135
+ ) })
2136
+ ] }) });
2137
+ }
2138
+ const SourceOfFundsPage = ({ onSubmit, handleHomeClick }) => {
2139
+ const { data: rootLe } = useLegalEntity(ROOT_LE);
2140
+ const capabilityProblems = useCapabilityProblems();
2141
+ const { i18n } = useTranslation();
2142
+ addResourceBundles(i18n, [
2143
+ { ns: "sof", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../tasks/SourceOfFundsDropin/language/da-DK.json": () => import("./da-DK-DZwlENGe.js"), "../tasks/SourceOfFundsDropin/language/de-DE.json": () => import("./de-DE-DXR3EpEc.js"), "../tasks/SourceOfFundsDropin/language/en-US.json": () => import("./en-US-CozY33On.js"), "../tasks/SourceOfFundsDropin/language/es-ES.json": () => import("./es-ES-yMXcOjDL.js"), "../tasks/SourceOfFundsDropin/language/fi-FI.json": () => import("./fi-FI-xqnQ38yC.js"), "../tasks/SourceOfFundsDropin/language/fr-FR.json": () => import("./fr-FR-BSynpexF.js"), "../tasks/SourceOfFundsDropin/language/it-IT.json": () => import("./it-IT-C_651bEP.js"), "../tasks/SourceOfFundsDropin/language/ja-JP.json": () => import("./ja-JP-CvNJvxkQ.js"), "../tasks/SourceOfFundsDropin/language/nl-NL.json": () => import("./nl-NL-JChnFdCY.js"), "../tasks/SourceOfFundsDropin/language/no-NO.json": () => import("./no-NO--OoWld_l.js"), "../tasks/SourceOfFundsDropin/language/pt-BR.json": () => import("./pt-BR-C0I_kTQ6.js"), "../tasks/SourceOfFundsDropin/language/sl-SI.json": () => import("./sl-SI-BZpXMHiG.js"), "../tasks/SourceOfFundsDropin/language/sv-SE.json": () => import("./sv-SE-DsPdegWB.js") }), `../tasks/SourceOfFundsDropin/language/${lang}.json`, 5) }
2144
+ ]);
2145
+ if (!rootLe) {
2146
+ return /* @__PURE__ */ jsx(Loader, {});
2147
+ }
2148
+ const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, rootLe.id) : void 0;
2149
+ return /* @__PURE__ */ jsx(
2150
+ SourceOfFundsDropin,
2151
+ {
2152
+ legalEntityResponse: rootLe,
2153
+ country: getLegalEntityCountry(rootLe),
2154
+ problems,
2155
+ onSubmit,
2156
+ handleHomeClick
2157
+ }
2158
+ );
2159
+ };
2160
+ export {
2161
+ SourceOfFundsPage
2162
+ };