@adyen/kyc-components 4.0.0-compact.4 → 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 (754) hide show
  1. package/dist/{4-people-BzyXLUF9.js → 4-people-BtDi7O9A.js} +2 -2
  2. package/dist/{AcceptTermsOfServiceComponent-BpEgUWXz.js → AcceptTermsOfServiceComponent-BFqDontt.js} +37 -29
  3. package/dist/{Accordion-C7tT1-lq.js → Accordion-B2vSnESS.js} +2 -2
  4. package/dist/{AccountSetupRejected-Bx9bf2P2.js → AccountSetupRejected-f8rcBzZj.js} +4 -4
  5. package/dist/{ActionBar-BYag3Mhx.js → ActionBar-CijauUSe.js} +2 -2
  6. package/dist/{Address-BG5_sFfZ.js → Address-Bj7zJ6yZ.js} +83 -288
  7. package/dist/{Alert-CjdHpM1t.js → Alert-CFmX9yNV.js} +3 -3
  8. package/dist/{Avatar-BbYg2DuO.js → Avatar-DWU7t_0U.js} +2 -2
  9. package/dist/{BusinessFinancingComponent-C6IiU1SV.js → BusinessFinancingComponent-_DvatBRp.js} +7 -7
  10. package/dist/{BusinessFinancingDropin-BGSfIRyw.js → BusinessFinancingDropin-BuATaIOz.js} +691 -300
  11. package/dist/{BusinessFinancingPage-B6B4tyGt.js → BusinessFinancingPage-Bpu78Ynn.js} +5 -5
  12. package/dist/{BusinessTypeSelectionPage-0jkL0xW-.js → BusinessTypeSelectionPage-gsT7g7u8.js} +59 -39
  13. package/dist/Card-OQuFzmxm.js +90 -0
  14. package/dist/{debouncedInputEvent-BdLyqQK5.js → Checkbox-5Sc5pzsh.js} +3 -38
  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-Byp71k2e.js → ContractViewer-DcQHIGMU.js} +2 -2
  20. package/dist/CountryField-DxZlK1rV.js +66 -0
  21. package/dist/CreateIndividualComponent-BppUrKMC.js +65 -0
  22. package/dist/{CreateTransferInstrumentComponent-BNvXg6_9.js → CreateTransferInstrumentComponent-Cl2NOJb6.js} +6 -13
  23. package/dist/{Currency-DpseKPZa.js → Currency-CIgj9KwH.js} +68 -13
  24. package/dist/{CustomerSupport-BzpGH7XC.js → CustomerSupport-UenL9SqQ.js} +13 -10
  25. package/dist/{DebugModal-DyH69DXv.js → DebugModal-KXKodU9u.js} +12 -9
  26. package/dist/{DecisionMakerDetailsPage-BiCWUl-E.js → DecisionMakerDetailsPage-Xwe1qYtH.js} +19 -21
  27. package/dist/{DecisionMakers-WTQe_49J.js → DecisionMakers-CJDodZSl.js} +41 -25
  28. package/dist/Dropzone-kpihpy7N.js +224 -0
  29. package/dist/{EmbeddedStatus-CcwyilpG.js → EmbeddedStatus-BJjPDUeS.js} +3 -3
  30. package/dist/{EndStateLayout-DUFAp0sp.js → EndStateLayout-Cx1NUGVq.js} +2 -2
  31. package/dist/EntityAssociation-BtQeHZOq.js +178 -0
  32. package/dist/{EntityGuidanceStatus-Bpa8WnR_.js → EntityGuidanceStatus-DyMVy3R4.js} +4 -3
  33. package/dist/ErrorPanel-CAALFKmE.js +194 -0
  34. package/dist/Field-Bs7wGDqk.js +141 -0
  35. package/dist/{FormNavigation-BP2ZV8AF.js → FormNavigation-BtSvWPRY.js} +3 -3
  36. package/dist/{FormWrapper-D2abCVld.js → FormWrapper-B3N3YosC.js} +10 -10
  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-Ee8931m9.js → Introduction-BRWdnVv5.js} +4 -4
  45. package/dist/{JpAddress-Br78ZY9o.js → JpAddress-BSEenMj0.js} +62 -28
  46. package/dist/LandingLayout-kl7TkBGx.js +60 -0
  47. package/dist/LegalCompanyNameField-DzAxAnD9.js +138 -0
  48. package/dist/{LegalRepresentativeDetailsPage-kZbXv8m2.js → LegalRepresentativeDetailsPage--yY_D66i.js} +7 -12
  49. package/dist/Link-CXYU8cLY.js +35 -0
  50. package/dist/List-BAzyC6sw.js +83 -0
  51. package/dist/{ListItem-DKLPtRMQ.js → ListItem-HD5_HiQ2.js} +3 -3
  52. package/dist/LoaderWrapper-C2PvjjQc.js +42 -0
  53. package/dist/{ManageIndividualComponent-CrAC6lmI.js → ManageIndividualComponent-BGaAbJjj.js} +5 -5
  54. package/dist/{ManageTermsOfServiceComponent-D188174Y.js → ManageTermsOfServiceComponent-DFjaajE4.js} +5 -5
  55. package/dist/{ManageTransferInstrumentComponent-DDIhJrq3.js → ManageTransferInstrumentComponent-Dndkwh_d.js} +20 -15
  56. package/dist/{Spacer-BT5nYRXK.js → MaskedInput-BSW18fxr.js} +29 -635
  57. package/dist/{MaybeModal-QG3JQV0A.js → MaybeModal-xIjl3I31.js} +3 -3
  58. package/dist/{Modal-B8fxl0iP.js → Modal-CZ-HuGUO.js} +5 -5
  59. package/dist/Name-D6EhveoK.js +81 -0
  60. package/dist/OnboardingDropinComponent-CHtcVTHh.js +2672 -0
  61. package/dist/{PayoutDetailsDropin-D_ee4PgW.js → PayoutDetailsDropin-C2pNMAZS.js} +257 -161
  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-BDXmgIlE.js → Review-B2NCN4h_.js} +8 -7
  66. package/dist/RootBusinessDetailsPage-hr5fLCIH.js +50 -0
  67. package/dist/{RootBusinessLinesPage-CbaRG8zg.js → RootBusinessLinesPage-DSna9haW.js} +166 -82
  68. package/dist/{RootIndividualDetailsPage-D4hpO1W0.js → RootIndividualDetailsPage-BItguz9n.js} +10 -19
  69. package/dist/{useForm-BsQfbbso.js → Select-DaCJsYNl.js} +22 -779
  70. package/dist/{SignPCIComponent-4qzKpijW.js → SignPCIComponent-C2YjBxQM.js} +16 -13
  71. package/dist/{SingpassSelection-BB6R98e_.js → SingpassSelection-B3ozCH9I.js} +9 -7
  72. package/dist/{SoleProprietorshipPage-Z5lqmwWa.js → SoleProprietorshipPage-DIzzhgjr.js} +6 -5
  73. package/dist/{SourceOfFundsPage-BA638WTW.js → SourceOfFundsPage-C3kXyE7G.js} +200 -421
  74. package/dist/Spacer-BK3jDget.js +18 -0
  75. package/dist/{StepProgressIndicator-Bs1V38Kt.js → StepProgressIndicator-BSGlNU3K.js} +2 -2
  76. package/dist/StoreProvider-99-ewU62.js +4793 -0
  77. package/dist/StructuredList-CVMZBzwq.js +61 -0
  78. package/dist/{Summary-BOSxxPjv.js → Summary-D0GcSMNn.js} +22 -6
  79. package/dist/{InputText-qTMbrUXW.js → TaskVerificationStatus-DZIw2ztV.js} +3 -123
  80. package/dist/TaxInformationField-BxQvx1zK.js +3741 -0
  81. package/dist/{TaxReportingDropin-CQzNhf9Q.js → TaxReportingDropin-BqvAQH2c.js} +38 -37
  82. package/dist/TextArea-BjsWgkR-.js +103 -0
  83. package/dist/TileGroup-C-5-VREz.js +203 -0
  84. package/dist/{TrustDetailsPage-BLNK52Za.js → TrustDetailsPage-YROGiuFJ.js} +59 -37
  85. package/dist/TrustMemberCompanyPage-Z2EuqPEI.js +68 -0
  86. package/dist/{TrustMemberIndividualPage-q2iayL78.js → TrustMemberIndividualPage-DmNp3D89.js} +13 -15
  87. package/dist/{TrustMemberRoleAndTypePage-C1WVoqKI.js → TrustMemberRoleAndTypePage-BEOtdItr.js} +136 -35
  88. package/dist/{TrustMembersOverview-5UGm_iG9.js → TrustMembersOverview-GybHMIEU.js} +14 -13
  89. package/dist/{UnincorporatedPartnershipIndividualPage-CyqUGlhC.js → UnincorporatedPartnershipIndividualPage-BCYxSTlv.js} +12 -14
  90. package/dist/{UnincorporatedPartnershipMemberCompanyPage-D_J_JQ00.js → UnincorporatedPartnershipMemberCompanyPage-Buez4OHl.js} +11 -7
  91. package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-C98KZ4pT.js → UnincorporatedPartnershipMemberRoleAndTypePage-Cfpe0BuU.js} +28 -17
  92. package/dist/{UnincorporatedPartnershipMembersOverview-C5jfbcPJ.js → UnincorporatedPartnershipMembersOverview-B3Vi088r.js} +10 -9
  93. package/dist/{VerificationErrorAlert-BJ9X1Bkv.js → VerificationErrorAlert-C6_ewC7c.js} +4 -23
  94. package/dist/{ViewVerificationStatusComponent-KnTqf4d6.js → ViewVerificationStatusComponent-DpA4jlct.js} +5 -4
  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 +22 -20
  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-KxA3SvQj.js → arrow-right-BoqwUH_d.js} +2 -2
  108. package/dist/bafinUtils-CIGv_BK8.js +80 -0
  109. package/dist/{bag-BPumznWh.js → bag-BXVWLrwo.js} +2 -2
  110. package/dist/{bank-D6FiNBhs.js → bank-1GvaHPAZ.js} +2 -2
  111. package/dist/{bin-Bz6KOIeE.js → bin-Ba-3ll8T.js} +2 -2
  112. package/dist/{business-lines-DboUCbXw.js → business-lines-BAqTbnBw.js} +2 -2
  113. package/dist/{capital-GVQ3svwN.js → capital-9TKHySO7.js} +2 -2
  114. package/dist/{cash-stack-D9AoDDwt.js → cash-stack-DwYu4xNy.js} +2 -2
  115. package/dist/{certificate-CdEWgHQf.js → certificate-N2YFedpI.js} +2 -2
  116. package/dist/{checkmark-Q7x6tGhy.js → checkmark-D9dGhGpG.js} +2 -2
  117. package/dist/{checkmark-circle-x7dzbp3I.js → checkmark-circle-CFWClLQ6.js} +2 -2
  118. package/dist/{checkmark-circle-fill-CsvN5_PL.js → checkmark-circle-fill-DEB-tuGl.js} +2 -2
  119. package/dist/{checkmark-small-D35myntq.js → checkmark-small-D3VNx2lo.js} +2 -2
  120. package/dist/{chevron-down-C2iDorpW.js → chevron-down-C7SUSYfl.js} +2 -2
  121. package/dist/{chevron-left-ztPO84q-.js → chevron-left-BXmd-S46.js} +2 -2
  122. package/dist/{chevron-right-C_JN0oDt.js → chevron-right-jE6RwM2B.js} +2 -2
  123. package/dist/{chevron-up-CgG8n25g.js → chevron-up-BdfNcqzq.js} +2 -2
  124. package/dist/{circle-Bt3Nlr3q.js → circle-BJPTMCWB.js} +2 -2
  125. package/dist/{circle-small-filled-YMzP6yQU.js → circle-small-filled-BuO8Vg8j.js} +2 -2
  126. package/dist/{clock-BZHremOA.js → clock-DAzaBRWk.js} +2 -2
  127. package/dist/{coins-fkAk6dCo.js → coins-DYdzG5e_.js} +2 -2
  128. package/dist/commonValidators-DTt6he7v.js +24 -0
  129. package/dist/company-types-value-D_mKv5PT.js +23 -0
  130. package/dist/{contract-BTa4HltT.js → contract-BfJb1t6M.js} +2 -2
  131. package/dist/{cross-Cn09MtQ_.js → cross-CDS_eot4.js} +2 -2
  132. package/dist/{cross-circle-fill-maan7Z5S.js → cross-circle-fill-C-EJ57Yn.js} +2 -2
  133. package/dist/{cross-circle-fill-small-DCz52AuN.js → cross-circle-fill-small-DkPjsuBH.js} +2 -2
  134. package/dist/currency-CrdnaaDu.js +35 -0
  135. package/dist/da-DK-B3Pg-MWO.js +13 -0
  136. package/dist/{da-DK-Dc0QYG8m.js → da-DK-Cd5IQPv3.js} +8 -1
  137. package/dist/{da-DK-CoTdzXlA.js → da-DK-DQ4ZYSea.js} +2 -2
  138. package/dist/da-DK-DzcTI92X.js +13 -0
  139. package/dist/datasetUtil-BHQp0-xL.js +58 -0
  140. package/dist/{de-DE-Dz2OsS1F.js → de-DE-C9NH2zMh.js} +8 -1
  141. package/dist/{de-DE-z0cPgxGN.js → de-DE-CkbOZ6S_.js} +2 -2
  142. package/dist/de-DE-S6qDey1L.js +13 -0
  143. package/dist/de-DE-dPfrbCii.js +13 -0
  144. package/dist/debouncedInputEvent-Cv2S512Y.js +46 -0
  145. package/dist/{decision-makers-group-CgddXgrx.js → decision-makers-group-DrvpnEqj.js} +2 -2
  146. package/dist/{digital-wallet-D_IpxnkN.js → digital-wallet-Bx5YM1LY.js} +2 -2
  147. package/dist/{document-1-C08ut-Dt.js → document-1-qlSTF558.js} +2 -2
  148. package/dist/{document-blurred-2Zpodj3_.js → document-blurred-BiWap0xs.js} +2 -2
  149. package/dist/{document-cut-off-ClS7RiOp.js → document-cut-off-aQezqOif.js} +2 -2
  150. package/dist/{document-expired-CjksBq-N.js → document-expired-BhBXaWWQ.js} +2 -2
  151. package/dist/{document-front-DiAairT3.js → document-front-DYuhZGeQ.js} +2 -2
  152. package/dist/{document-person-vxlA6C5f.js → document-person-CDbnTOdV.js} +2 -2
  153. package/dist/{download-Drhk9k1f.js → download-BZQB1WkZ.js} +2 -2
  154. package/dist/{dropinUtils-BYk71qFP.js → dropinUtils--st1YpV6.js} +4 -4
  155. package/dist/{edit-1-CFoDTMvQ.js → edit-1-DAqtnOIx.js} +2 -2
  156. package/dist/{en-US-BzrLvydZ.js → en-US-CjjPhkB5.js} +2 -2
  157. package/dist/{en-US-CzEL6t1W.js → en-US-D1sB335h.js} +9 -3
  158. package/dist/en-US-DLY20x1O.js +13 -0
  159. package/dist/{en-US-D-B35AoN.js → en-US-DYP6rAvA.js} +8 -1
  160. package/dist/{en-US-fyGPkcqX.js → en-US-cVpRgdC8.js} +2 -2
  161. package/dist/es-ES--IvNed_Q.js +13 -0
  162. package/dist/{es-ES-DUn82eVS.js → es-ES-BAolMrZ0.js} +2 -2
  163. package/dist/es-ES-BYl5-PFR.js +13 -0
  164. package/dist/{es-ES-BI_jdT67.js → es-ES-DK-7qtDf.js} +8 -1
  165. package/dist/{external-link-DCMYUMfW.js → external-link-Cg6pJaSJ.js} +2 -2
  166. package/dist/{fi-FI-hwzizPnr.js → fi-FI-BJLU1JHw.js} +8 -1
  167. package/dist/fi-FI-BUixKfXH.js +13 -0
  168. package/dist/{fi-FI-C3TTCFBv.js → fi-FI-D8WrLxxq.js} +2 -2
  169. package/dist/fi-FI-DFxljML-.js +13 -0
  170. package/dist/fieldConfigurations-BUT9DTUH.js +21 -0
  171. package/dist/filterProblemsByTaskForms-Cz7iQtms.js +30 -0
  172. package/dist/form-rules-DhbF2mY4.js +13 -0
  173. package/dist/formUtils-C_sWWLS3.js +107 -0
  174. package/dist/{fr-FR-CYZXbwc9.js → fr-FR-B2je0smB.js} +8 -1
  175. package/dist/fr-FR-BM-qNLci.js +13 -0
  176. package/dist/{fr-FR-BbKadiaZ.js → fr-FR-Beljeilc.js} +2 -2
  177. package/dist/fr-FR-DPehHVb6.js +13 -0
  178. package/dist/{funds-in-D8bj0aoE.js → funds-in-CInoUdmG.js} +2 -2
  179. package/dist/{getName-9MyzlDpt.js → getName-CnZDw7kV.js} +2 -2
  180. package/dist/getProblemsForEntity-D8qEVVOM.js +24 -0
  181. package/dist/getProps-Cc3J2-z9.js +148 -0
  182. package/dist/getTrustedFields-C5-mXl-l.js +64 -0
  183. package/dist/{gift-CQ_DEma7.js → gift-omNInZeB.js} +2 -2
  184. package/dist/{graph-BJmqglH2.js → graph-DunG_uu1.js} +2 -2
  185. package/dist/{graph-up-Bq6adtlX.js → graph-up-BZze4i6m.js} +2 -2
  186. package/dist/{headquarter-DNYyuuFq.js → headquarter-BhpSibFO.js} +2 -2
  187. package/dist/{hotel-BuNql78Z.js → hotel-Cp7VgGCJ.js} +2 -2
  188. package/dist/{house-B6sNRj-B.js → house-BhyBQdR3.js} +2 -2
  189. package/dist/{id-blurred-9dzBOWCE.js → id-blurred-B5lHEP8M.js} +2 -2
  190. package/dist/{id-cut-off-CohJCI2h.js → id-cut-off-Ba1FRzKO.js} +2 -2
  191. package/dist/{id-front-CSZfvdRg.js → id-front-CpNWN6nG.js} +2 -2
  192. package/dist/{id-glare-Q2JWo5ts.js → id-glare-DgCQON8k.js} +2 -2
  193. package/dist/{iframeWidget-OATZoluK.js → iframeWidget-DqeucjDU.js} +4 -4
  194. package/dist/{image-BSihO8lR.js → image-CmB0ioUM.js} +2 -2
  195. package/dist/{info-vHTZWoJ7.js → info-Bb_-xIEK.js} +2 -2
  196. package/dist/{info-filled-SQotHmT9.js → info-filled-CK8LB339.js} +2 -2
  197. package/dist/{instant-verification-Dvvkyfmp.js → instant-verification-UrnuHTYn.js} +2 -2
  198. package/dist/isEmpty-CUuXL9Na.js +23 -0
  199. package/dist/isNewEntity-7Vw_eQBr.js +13 -0
  200. package/dist/{it-IT-CGhQqmiU.js → it-IT-5a7NHVFo.js} +2 -2
  201. package/dist/it-IT-D63gRTDc.js +13 -0
  202. package/dist/it-IT-DOBp2-MP.js +13 -0
  203. package/dist/{it-IT-Erh1DIlj.js → it-IT-Dhwa9Ecj.js} +8 -1
  204. package/dist/{ja-JP-D1vtig2x.js → ja-JP-B3wVYIJU.js} +38 -38
  205. package/dist/{ja-JP-ThzG9vIo.js → ja-JP-Bc4U0S8-.js} +9 -2
  206. package/dist/{ja-JP-DGNXrNMK.js → ja-JP-Bv3ru9Xq.js} +21 -14
  207. package/dist/{ja-JP-CSz7fEkn.js → ja-JP-CceCDXLB.js} +2 -2
  208. package/dist/ja-JP-DL0IjTzn.js +13 -0
  209. package/dist/{ja-JP-CvREJ56h.js → ja-JP-DSvZhFNY.js} +5 -5
  210. package/dist/{ja-JP-C6Go-kaC.js → ja-JP-g6VOUGXZ.js} +4 -4
  211. package/dist/japanSupportUtils-CGWcXGP2.js +16 -0
  212. package/dist/jpAddressSchema-DEOyz9Yo.js +26 -0
  213. package/dist/{localizeDateString-CtnAUzr_.js → localizeDateString-D6tFShQu.js} +2 -2
  214. package/dist/{location-Q4oKvnkl.js → location-itJfxrDQ.js} +2 -2
  215. package/dist/{mail-BOdyoVqB.js → mail-VHTlAusn.js} +2 -2
  216. package/dist/{manual-verification-BvZWqA00.js → manual-verification-BO8zgAYT.js} +2 -2
  217. package/dist/{mapExistingFile-Iep6Rez8.js → mapExistingFile-BM9f5AeG.js} +81 -7
  218. package/dist/mapJpAddressSchemaToAddressLocalizations-Cu4hdrYE.js +162 -0
  219. package/dist/{mapLegalEntityToIndividualOnfidoSchema-BGAZ4tOn.js → mapLegalEntityToIndividualSchema-DVKTWyvx.js} +63 -3
  220. package/dist/{mapTransferInstrumentToPayoutAccount-C6ha6E0S.js → mapTransferInstrumentToPayoutAccount--gtugk3J.js} +3 -2
  221. package/dist/{minus-circle-filled-kC2IUvKz.js → minus-circle-filled-ZhtJ0GD3.js} +2 -2
  222. package/dist/{nl-NL-O9GCHMDA.js → nl-NL-B0fvINJj.js} +8 -1
  223. package/dist/{nl-NL-OHlJx2bn.js → nl-NL-CmURERx_.js} +2 -2
  224. package/dist/nl-NL-KQ6bciOb.js +13 -0
  225. package/dist/nl-NL-SjOGmGk5.js +13 -0
  226. package/dist/no-NO-BAWVf0GX.js +13 -0
  227. package/dist/no-NO-Ds3VioxT.js +13 -0
  228. package/dist/{no-NO-CA1aR6Wh.js → no-NO-Jw7Gae-a.js} +8 -1
  229. package/dist/{no-NO-DEYydng4.js → no-NO-qyqWODMp.js} +2 -2
  230. package/dist/{onfido-logo-BWSv__sQ.js → onfido-logo-BSkKPH10.js} +2 -2
  231. package/dist/{options-horizontal-CBmbNv7R.js → options-horizontal-GuXvLvV3.js} +2 -2
  232. package/dist/{partner-CPjsrePY.js → partner-QD27Vy4w.js} +2 -2
  233. package/dist/{passport-blurred-B4UDQfmc.js → passport-blurred-CVG493IJ.js} +2 -2
  234. package/dist/{passport-cut-off-C0N2mgLk.js → passport-cut-off-COzA_TmB.js} +2 -2
  235. package/dist/{passport-front-BwA7wR91.js → passport-front-WJleLixT.js} +2 -2
  236. package/dist/{passport-front-green-BL4HmtsB.js → passport-front-green-CZVkCa1n.js} +2 -2
  237. package/dist/{passport-glare-Mg2ixsYA.js → passport-glare-BP5WnJZj.js} +2 -2
  238. package/dist/patternValidators-vYKnE5-t.js +83 -0
  239. package/dist/{pay-by-link-plane-BVZndh67.js → pay-by-link-plane-BpY8Q6-B.js} +2 -2
  240. package/dist/{payout-ChUEoLjt.js → payout-DtB68BcZ.js} +2 -2
  241. package/dist/{payout-verification-instant-5u-wvFKv.js → payout-verification-instant-BzpfOQLD.js} +2 -2
  242. package/dist/{payout-verification-manual-BH2mu0UW.js → payout-verification-manual-gNEoeZkV.js} +2 -2
  243. package/dist/{person-DGjUU4S4.js → person-IVZG3t3_.js} +2 -2
  244. package/dist/{plaid-logo-CtActXTN.js → plaid-logo-FsZ7kfL-.js} +2 -2
  245. package/dist/{plus-CWXA5wdX.js → plus-DiALAL8-.js} +2 -2
  246. package/dist/{plus-circle-filled-CbC0u2Y1.js → plus-circle-filled-BzHtTqEN.js} +2 -2
  247. package/dist/{process-field-configurations-BBc1EBeB.js → process-field-configurations-Dl2Isz78.js} +4 -4
  248. package/dist/{pt-BR-NtLaWlnZ.js → pt-BR-BaTE6BB_.js} +8 -1
  249. package/dist/pt-BR-BfDe_8iW.js +13 -0
  250. package/dist/{pt-BR-DWAziFjb.js → pt-BR-BxoOF8jB.js} +2 -2
  251. package/dist/pt-BR-Ct4s4jXV.js +13 -0
  252. package/dist/{recurring-CkL4cCM2.js → recurring-DKNs9K3x.js} +2 -2
  253. package/dist/{reporting-DerosUNm.js → reporting-D5ABpLO_.js} +2 -2
  254. package/dist/resolveEnvironment-B_JokQ0n.js +84 -0
  255. package/dist/{revenue-accelerate-Dp4Ns_5c.js → revenue-accelerate-D7Sp0V4a.js} +2 -2
  256. package/dist/{review-CxIN9azU.js → review-D4TUjcWF.js} +2 -2
  257. package/dist/roleMetadata-eM6T7GeQ.js +66 -0
  258. package/dist/{save-Fgy7EDid.js → save-BfqO2JBI.js} +2 -2
  259. package/dist/{search-C4GZ-Rc1.js → search-Cmzbf5zI.js} +2 -2
  260. package/dist/{show-yPjPmEf8.js → show-IdbU1C6P.js} +2 -2
  261. package/dist/{singpass-logo-BkMSwiGY.js → singpass-logo-wY4xsmTX.js} +2 -2
  262. package/dist/{singpass-verification-instant-hY4eGFwl.js → singpass-verification-instant-JCqTr7Mv.js} +2 -2
  263. package/dist/{singpass-verification-manual-DwhRpy5Q.js → singpass-verification-manual-DQ7XW6R3.js} +2 -2
  264. package/dist/sl-SI-BAIm-qBe.js +13 -0
  265. package/dist/{sl-SI-C5vfq7vv.js → sl-SI-DTvJT7fC.js} +2 -2
  266. package/dist/{sl-SI-tPwbFvOI.js → sl-SI-DbfswGh0.js} +8 -1
  267. package/dist/sl-SI-hxwQIw_i.js +13 -0
  268. package/dist/{solution-payments-CNAat9h7.js → solution-payments-DpyE_sdS.js} +2 -2
  269. package/dist/{store-IuAkDRAp.js → store-Btc4GcmU.js} +2 -2
  270. package/dist/style.css +1364 -1368
  271. package/dist/styles-CLV89_hH.js +1364 -1368
  272. package/dist/summaryItem-CAQCQSkt.js +18 -0
  273. package/dist/sv-SE-0PQ-U1u6.js +13 -0
  274. package/dist/sv-SE-BZNey_8S.js +13 -0
  275. package/dist/{sv-SE-K1QT1cOt.js → sv-SE-D_Efxy3s.js} +8 -1
  276. package/dist/{sv-SE-BrO9NKWs.js → sv-SE-N-Hqwcjq.js} +2 -2
  277. package/dist/{tax-reporting-graph-DjzwRgE6.js → tax-reporting-graph-hgoilCHZ.js} +2 -2
  278. package/dist/{terminal-1-_me9J9h0.js → terminal-1-D1pwXCoi.js} +2 -2
  279. package/dist/{tink-logo-BcIv93ND.js → tink-logo-DDyjz5eJ.js} +2 -2
  280. package/dist/types/api/address/useAddressCleanse.d.ts +1 -1
  281. package/dist/types/api/address/useRetrieveAddress.d.ts +1 -1
  282. package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +1 -1
  283. package/dist/types/api/address/useSearchAddress.d.ts +1 -2
  284. package/dist/types/api/businessLines/useBusinessLines.d.ts +3 -3
  285. package/dist/types/api/businessLines/useCreateBusinessLine.d.ts +2 -2
  286. package/dist/types/api/businessLines/useDeleteBusinessLine.d.ts +2 -2
  287. package/dist/types/api/businessLines/useUpdateBusinessLines.d.ts +2 -2
  288. package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +2 -2
  289. package/dist/types/api/check/useCheck.d.ts +1 -2
  290. package/dist/types/api/companyDataSet/useClearCompanyData.d.ts +2 -2
  291. package/dist/types/api/companySearch/useCompanySearch.d.ts +1 -2
  292. package/dist/types/api/companySelection/useCompanySelection.d.ts +1 -1
  293. package/dist/types/api/configurations/useScenarios.d.ts +3 -161
  294. package/dist/types/api/configurations/useSupportedCountries.d.ts +1 -1
  295. package/dist/types/api/configurations/useTaskTypes.d.ts +1 -1
  296. package/dist/types/api/configurations/useVersionConfiguration.d.ts +1 -1
  297. package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +2 -2
  298. package/dist/types/api/datasets/useLegalForms.d.ts +1 -1
  299. package/dist/types/api/datasets/useNaceCodes.d.ts +1 -1
  300. package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +1 -1
  301. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +2 -4
  302. package/dist/types/api/documents/useCreateDocument.d.ts +2 -2
  303. package/dist/types/api/documents/useDeleteDocument.d.ts +2 -2
  304. package/dist/types/api/documents/useDocument.d.ts +2 -2
  305. package/dist/types/api/documents/useDocuments.d.ts +1 -1
  306. package/dist/types/api/documents/useUpdateDocument.d.ts +2 -2
  307. package/dist/types/api/entityVerifications/useVerifyIdNumber.d.ts +2 -2
  308. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +3 -4
  309. package/dist/types/api/idVerificationProviders/idVerificationStartCheck.d.ts +2 -2
  310. package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +2 -2
  311. package/dist/types/api/idVerificationProviders/useIdVerificationToken.d.ts +3 -3
  312. package/dist/types/api/industryCodes/useIndustryCodes.d.ts +1 -2
  313. package/dist/types/api/legalEntity/useConfirmReview.d.ts +2 -2
  314. package/dist/types/api/legalEntity/useLegalEntity.d.ts +8 -389
  315. package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +2 -2
  316. package/dist/types/api/onboardingStatus/useGenerateOnboardingLink.d.ts +2 -2
  317. package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
  318. package/dist/types/api/openId/useOpenIdAuthorizationLink.d.ts +1 -2
  319. package/dist/types/api/pci/usePciQuestionnaireList.d.ts +1 -1
  320. package/dist/types/api/pci/usePciStatus.d.ts +1 -1
  321. package/dist/types/api/pci/usePciTemplate.d.ts +1 -1
  322. package/dist/types/api/pci/useSignPci.d.ts +2 -3
  323. package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +1 -1
  324. package/dist/types/api/queryKeys.d.ts +1 -1
  325. package/dist/types/api/taskStatus/useTaskStatus.d.ts +2 -2
  326. package/dist/types/api/taxClassification/useTaxClassification.d.ts +1 -1
  327. package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +2 -3
  328. package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +1 -7
  329. package/dist/types/api/termsOfService/useTermsOfService.d.ts +1 -1
  330. package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +1 -1
  331. package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +1 -1
  332. package/dist/types/api/tinVerification/useVerifyTin.d.ts +1 -1
  333. package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -1
  334. package/dist/types/api/transferInstruments/useCreateTrustedTransferInstrument.d.ts +1 -1
  335. package/dist/types/api/transferInstruments/useDeleteTransferInstrument.d.ts +1 -1
  336. package/dist/types/api/transferInstruments/useHandleBankVerificationError.d.ts +1 -1
  337. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +2 -2
  338. package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -1
  339. package/dist/types/api/transferInstruments/useUpdateTransferInstrument.d.ts +1 -1
  340. package/dist/types/api/transferInstruments/useUpdateTrustedTransferInstrument.d.ts +1 -1
  341. package/dist/types/api/types.d.ts +3 -2
  342. package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -2
  343. package/dist/types/api/uiAnalytics/usePushAnalyticEvent.d.ts +2 -2
  344. package/dist/types/api/validation/useValidateAccountIdentification.d.ts +2 -3
  345. package/dist/types/api/validation/useValidatePhoneNumber.d.ts +1 -1
  346. package/dist/types/components/{Shared → Apps}/tasks/TaskList/utils.d.ts +1 -5
  347. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +1 -2
  348. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +0 -1
  349. package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +1 -0
  350. package/dist/types/components/BankAccount/forms/BankVerification/verification/overlay/BankVerificationOverlay.d.ts +1 -1
  351. package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +1 -1
  352. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +0 -1
  353. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +439 -439
  354. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +3 -3
  355. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
  356. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
  357. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +1 -1
  358. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformation.d.ts +0 -2
  359. package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +0 -3
  360. package/dist/types/components/Business/forms/BusinessDetails/form-ids.d.ts +2 -0
  361. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +12 -11
  362. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -1
  363. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +4 -4
  364. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructure.d.ts +0 -1
  365. package/dist/types/components/{Shared → Business}/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
  366. package/dist/types/components/{Shared → Business}/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
  367. package/dist/types/components/{Shared → Business}/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +1 -1
  368. package/dist/types/components/Business/forms/rules.d.ts +11 -11
  369. package/dist/types/components/Business/mapping/businessDetails/businessBankAccountTaxIdUtils.d.ts +7 -0
  370. package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +4 -2
  371. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +8 -1
  372. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -2
  373. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +0 -2
  374. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +4 -2
  375. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +3 -4
  376. package/dist/types/components/Business/utils/companyUtil.d.ts +0 -10
  377. package/dist/types/components/BusinessLines/constants.d.ts +2 -0
  378. package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +1 -1
  379. package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +1 -1
  380. package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +1 -2
  381. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLineModal/BusinessLineModal.d.ts +2 -1
  382. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +1 -1
  383. package/dist/types/components/BusinessLines/tasks/types.d.ts +2 -0
  384. package/dist/types/components/BusinessLines/tasks/utils.d.ts +8 -4
  385. package/dist/types/components/BusinessLines/tasks/validate.d.ts +0 -2
  386. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -1
  387. package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
  388. package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
  389. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5771 -541
  390. package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +3 -2
  391. package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -1
  392. package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +1 -2
  393. package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +1 -2
  394. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingSoleProprietor.d.ts +2 -0
  395. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSoleProprietorPersonalInformation.d.ts +4 -0
  396. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -0
  397. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +14 -3
  398. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +10 -1
  399. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +20 -21
  400. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +6 -4
  401. package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +1 -2
  402. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +2 -1
  403. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -2
  404. package/dist/types/components/EmbeddedDropins/InvitedDecisionMakerComponent/InvitedDecisionMakerComponent.d.ts +4 -0
  405. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
  406. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/RouterDropinComposer.d.ts +4 -0
  407. package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -1
  408. package/dist/types/components/Individual/fields/IdentityNumber/fieldConfig.d.ts +4 -3
  409. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +29 -0
  410. package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/Identity/Identity.types.d.ts +3 -3
  411. package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/Identity/TypeOfIdentity/index.d.ts +2 -2
  412. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/validate.d.ts +4 -0
  413. package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/validate.d.ts +8 -8
  414. package/dist/types/components/Individual/forms/BasicDetails/BasicDetails.types.d.ts +22 -0
  415. package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +8 -0
  416. package/dist/types/components/Individual/forms/{IndividualOnfido/DataConflictsModal → DataConflictsModal}/ConflictRow.d.ts +1 -1
  417. package/dist/types/components/Individual/forms/{IndividualOnfido/DataConflictsModal → DataConflictsModal}/DataConflictsModal.d.ts +1 -1
  418. package/dist/types/components/Individual/forms/{Individual/IdDocumentUpload → IdDocumentUpload}/types.d.ts +5 -15
  419. package/dist/types/components/Individual/forms/{Individual/IdDocumentUpload → IdDocumentUpload}/utils.d.ts +1 -1
  420. package/dist/types/components/Individual/forms/IdNowVerificationModal/isIdNowModalOpen.d.ts +18 -0
  421. package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/IdVerificationMethod.types.d.ts +5 -4
  422. package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +1 -1
  423. package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/UploadedDocument/UploadedDocument.d.ts +1 -1
  424. package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/individualOnfidoConflictsSchema.d.ts +5 -5
  425. package/dist/types/components/Individual/forms/IdVerificationMethod/mapExtractionResultToSchema.d.ts +4 -0
  426. package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/validateExtractionResult.d.ts +3 -3
  427. package/dist/types/components/Individual/forms/{IndividualOnfido/IndividualOnfido.d.ts → Individual.d.ts} +6 -2
  428. package/dist/types/components/Individual/forms/{IndividualOnfido/IndividualOnfido.rules.d.ts → Individual.rules.d.ts} +8 -9
  429. package/dist/types/components/Individual/forms/{IndividualOnfido/IndividualOnfido.types.d.ts → Individual.types.d.ts} +16 -15
  430. package/dist/types/components/Individual/forms/{Individual/ProofOfRelationship → ProofOfRelationship}/types.d.ts +1 -1
  431. package/dist/types/components/Individual/forms/{Individual/ProofOfResidency → ProofOfResidency}/types.d.ts +1 -1
  432. package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaire.types.d.ts +1 -1
  433. package/dist/types/components/Individual/forms/{IndividualOnfido/UboQuestionnaire → UboQuestionnaire}/UboQuestionnaire.types.d.ts +2 -2
  434. package/dist/types/components/Individual/forms/{IndividualOnfido/UboQuestionnaire → UboQuestionnaire}/UboQuestionnaireModalContent.d.ts +1 -1
  435. package/dist/types/components/Individual/forms/form-ids.d.ts +2 -0
  436. package/dist/types/components/Individual/helpers/bafinUtils.d.ts +3 -2
  437. package/dist/types/components/Individual/helpers/mandateIdVerificationForMotionCapture.d.ts +2 -3
  438. package/dist/types/components/Individual/helpers/roleUtils.d.ts +1 -1
  439. package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +1 -1
  440. package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +1 -1
  441. package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +6 -12
  442. package/dist/types/components/Individual/mapping/mapApiDocumentToIndividualDocuments.d.ts +2 -2
  443. package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -3
  444. package/dist/types/components/Individual/mapping/{mapIndividualOnfidoSchemaToLegalEntity.d.ts → mapIndividualSchemaToLegalEntity.d.ts} +1 -1
  445. package/dist/types/components/Individual/mapping/{mapLegalEntityToIndividualOnfidoSchema.d.ts → mapLegalEntityToIndividualSchema.d.ts} +1 -1
  446. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +6 -7
  447. package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +2 -2
  448. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -2
  449. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +2 -14
  450. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/remediation.config.d.ts +0 -2
  451. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +8 -0
  452. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +1 -1
  453. package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +2 -2
  454. package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +3 -3
  455. package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +0 -1
  456. package/dist/types/components/Shared/Introduction/copy.d.ts +1 -1
  457. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
  458. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +10 -0
  459. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +2 -1
  460. package/dist/types/components/Shared/fields/CountryField/types.d.ts +2 -1
  461. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
  462. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
  463. package/dist/types/components/Shared/fields/Currency/Currency.d.ts +1 -1
  464. package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
  465. package/dist/types/components/Shared/fields/DBANameField/DBANameField.d.ts +1 -1
  466. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -1
  467. package/dist/types/components/Shared/fields/DateOfIncorporationField/DateOfIncorporationField.d.ts +1 -1
  468. package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +3 -1
  469. package/dist/types/components/Shared/fields/EInvoicingCodeField/EInvoicingCodeField.d.ts +1 -1
  470. package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
  471. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +119 -1
  472. package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +1 -1
  473. package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
  474. package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +12 -6
  475. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +3 -1
  476. package/dist/types/components/{Individual → Shared}/fields/LocalizedNameFields/types.d.ts +2 -2
  477. package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +5 -0
  478. package/dist/types/components/Shared/fields/NumberOfEmployees/NumberOfEmployees.d.ts +1 -1
  479. package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
  480. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
  481. package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +5 -0
  482. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -1
  483. package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
  484. package/dist/types/components/Shared/fields/StateField/fieldConfig.d.ts +8 -0
  485. package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
  486. package/dist/types/components/Shared/fields/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
  487. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  488. package/dist/types/components/Shared/fields/StockISINField/StockISINField.d.ts +1 -1
  489. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  490. package/dist/types/components/Shared/fields/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
  491. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  492. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -1
  493. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +6 -0
  494. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +2 -1
  495. package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
  496. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +1 -1
  497. package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
  498. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  499. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +1 -1
  500. package/dist/types/components/Trust/forms/Trust/rules.d.ts +2 -2
  501. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
  502. package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -2
  503. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +3 -3
  504. package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +5 -5
  505. package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +2 -2
  506. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +1 -1
  507. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiform.d.ts +2 -1
  508. package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +1 -2
  509. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -1
  510. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +5 -5
  511. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +3 -3
  512. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +1 -1
  513. package/dist/types/components/ui/atoms/Card/Card.d.ts +19 -0
  514. package/dist/types/components/ui/atoms/Loader/Loader.d.ts +11 -1
  515. package/dist/types/components/ui/atoms/MultiSelectList/MultiSelectList.d.ts +0 -1
  516. package/dist/types/components/ui/atoms/Svg/Svg.d.ts +0 -1
  517. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +1 -1
  518. package/dist/types/components/ui/molecules/ErrorPanel/ErrorPanel.d.ts +0 -1
  519. package/dist/types/context/ExperimentContext/types.d.ts +19 -42
  520. package/dist/types/context/QueryContext/QueryClient.d.ts +1 -1
  521. package/dist/types/context/StateContext/types.d.ts +2 -3
  522. package/dist/types/core/models/api/individual.d.ts +3 -0
  523. package/dist/types/core/models/api/instant-id-verification.d.ts +1 -1
  524. package/dist/types/core/models/api/legal-arrangement.d.ts +3 -0
  525. package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
  526. package/dist/types/core/process-field-configurations.d.ts +0 -5
  527. package/dist/types/core/services/types.d.ts +1 -1
  528. package/dist/types/core/user-events.d.ts +4 -2
  529. package/dist/types/embeds/baseEmbedProps.d.ts +0 -21
  530. package/dist/types/embeds/business-financing/adyen-business-financing.d.ts +2 -1
  531. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.d.ts +5 -1
  532. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +2 -2
  533. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.d.ts +5 -0
  534. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.types.d.ts +34 -0
  535. package/dist/types/embeds/onboarding/adyen-onboarding.d.ts +2 -1
  536. package/dist/types/embeds/terms-of-service-management/adyen-terms-of-service-management.d.ts +5 -1
  537. package/dist/types/embeds/transfer-instrument-configuration/adyen-transfer-instrument-configuration.d.ts +2 -1
  538. package/dist/types/embeds/verification-status/adyen-verification-status.d.ts +2 -1
  539. package/dist/types/hooks/useAssociatedLegalEntity.d.ts +1 -1
  540. package/dist/types/hooks/useForm/types.d.ts +0 -8
  541. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +4 -2
  542. package/dist/types/hooks/usePageLandedEvent.d.ts +7 -0
  543. package/dist/types/hooks/useUboQuestionnaire.d.ts +2 -2
  544. package/dist/types/language/types.d.ts +7 -2
  545. package/dist/types/language/utils.d.ts +1 -2
  546. package/dist/types/router/DefaultRouteRedirect.d.ts +8 -0
  547. package/dist/types/router/MemoryRouterContext.d.ts +9 -0
  548. package/dist/types/router/OnboardingRouter.d.ts +39 -0
  549. package/dist/types/router/SuspenseRoute.d.ts +7 -0
  550. package/dist/types/router/getDefaultTask.d.ts +16 -0
  551. package/dist/types/router/routeConfig.d.ts +68 -0
  552. package/dist/types/router/useCurrentTask.d.ts +5 -0
  553. package/dist/types/router/useNavigate.d.ts +7 -0
  554. package/dist/types/stores/formState.d.ts +1 -1
  555. package/dist/types/stores/globalStore/taskStatus.d.ts +5 -3
  556. package/dist/types/types/assert.d.ts +1 -0
  557. package/dist/types/types/form-rules.d.ts +0 -1
  558. package/dist/types/utils/addLinkedFields.d.ts +0 -2
  559. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +1 -0
  560. package/dist/types/utils/analytics/getPrefilledDetails.d.ts +28 -0
  561. package/dist/types/utils/api/processCapabilitites.d.ts +14 -2
  562. package/dist/types/utils/birthDateUtils.d.ts +0 -17
  563. package/dist/types/utils/entityAssociationUtil.d.ts +3 -4
  564. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  565. package/dist/types/utils/fieldConfigurations.d.ts +0 -2
  566. package/dist/types/utils/formUtils.d.ts +1 -6
  567. package/dist/types/utils/getDisplayErrorMessage.d.ts +1 -2
  568. package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -3
  569. package/dist/types/utils/getName.d.ts +1 -1
  570. package/dist/types/utils/japanSupportUtils.d.ts +2 -1
  571. package/dist/types/utils/logger.d.ts +0 -1
  572. package/dist/types/utils/makeSelectItemForRole.d.ts +1 -1
  573. package/dist/types/utils/performance.d.ts +64 -0
  574. package/dist/types/utils/regex/patternValidators.d.ts +1 -1
  575. package/dist/types/utils/translation.d.ts +3 -2
  576. package/dist/types/utils/validatorUtils.d.ts +2 -1
  577. package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +3 -2
  578. package/dist/{types-Dk94b8kx.js → types-B7GElie6.js} +21 -44
  579. package/dist/{types-Q8QbiVOz.js → types-BQL9Lsg4.js} +2 -2
  580. package/dist/{types-DtV30rT3.js → types-C8io4KaH.js} +3 -26
  581. package/dist/{types-fRMvVcuU.js → types-DwXc_yI8.js} +2 -2
  582. package/dist/unincorporated-partnership-MeN1dp53.js +97 -0
  583. package/dist/{upload-BF65P4KM.js → upload-BmUXjsaU.js} +2 -2
  584. package/dist/{us-check-CYY6Crhr.js → us-check-C1rTBsCY.js} +2 -2
  585. package/dist/{us-check-account-number-C7KE5YzX.js → us-check-account-number-9lI1dXNC.js} +2 -2
  586. package/dist/{us-check-routing-number-DUbhsYAR.js → us-check-routing-number-s_KaAGSM.js} +2 -2
  587. package/dist/{useAssociatedLegalEntity-CtNg5gYS.js → useAssociatedLegalEntity-ETDoz1H2.js} +3 -2
  588. package/dist/useBusinessDetailsData-FrL0b9Ni.js +5197 -0
  589. package/dist/useBusinessLines-C5NQ5pE8.js +29 -0
  590. package/dist/useCanSeeIntroduction-BdZJ7k-_.js +48 -0
  591. package/dist/{useCreateLegalEntity-DIzVLIrw.js → useCreateLegalEntity-DrcLoNYT.js} +3 -2
  592. package/dist/useDataMissingRemediations-Zgtpw7uZ.js +41 -0
  593. package/dist/useDataset-Cap5ZjTr.js +76 -0
  594. package/dist/useDeleteTransferInstrument-B2wRj-qL.js +32 -0
  595. package/dist/useForm-DqUW2TbW.js +582 -0
  596. package/dist/{FormFlow-DX2A0gcf.js → useFormContext-CkuaJPUI.js} +26 -31
  597. package/dist/{useGlobalData-CO2a2RhB.js → useGlobalData-5Z6W3or1.js} +3 -3
  598. package/dist/useId-BZ0PA7jP.js +24 -0
  599. package/dist/{useMultiForm-BkNgL1zi.js → useMultiForm-Dm2IEMH9.js} +46 -37
  600. package/dist/useNavigate-CI0N-POy.js +265 -0
  601. package/dist/{useOnboardingStatus-BB5IzxTg.js → useOnboardingStatus-H7Xqe2GC.js} +3 -2
  602. package/dist/usePciQuestionnaireList-BF7TPjbQ.js +29 -0
  603. package/dist/useSalesChannels-DYGRfKeh.js +65 -0
  604. package/dist/{useScenarios-yIXrDacU.js → useScenarios-CibP5LVa.js} +7 -5
  605. package/dist/useSetting-CbBaitp6.js +19 -0
  606. package/dist/useTaskStatus-1OZ2clnm.js +51 -0
  607. package/dist/{useTermsOfServiceStatus-BRdLkis6.js → useTermsOfServiceStatus-Dg_nBQgt.js} +3 -2
  608. package/dist/{useToastContext-BQYYaLd-.js → useToastContext-D643iewp.js} +6 -17
  609. package/dist/useTrustMembers-BTCDIu6B.js +163 -0
  610. package/dist/{useUnincorporatedPartnershipMembers-fl3LbBcx.js → useUnincorporatedPartnershipMembers-BM9dNg4i.js} +5 -5
  611. package/dist/useUpdateBusinessLines-BuW6Vnof.js +339 -0
  612. package/dist/{useUpdateLegalEntity-CIZP-vhE.js → useUpdateLegalEntity-tRw1V_Mt.js} +4 -3
  613. package/dist/utils-BasWTkqk.js +159 -0
  614. package/dist/{utils-_N6wjH1k.js → utils-BnolcW6V.js} +6 -6
  615. package/dist/{utils-BtBmicYe.js → utils-D9h2Aq2w.js} +26 -22
  616. package/dist/utils-PkTZS9uf.js +58 -0
  617. package/dist/utils-b_KUV0wb.js +29 -0
  618. package/dist/{documentUtils-CmY7W1gB.js → validate-CtxacqMv.js} +171 -6
  619. package/dist/{validate-yIqc2enK.js → validate-K0fmvoFj.js} +10 -2
  620. package/dist/{validationError-BcmQ2z0b.js → validationError-DdlWONz2.js} +3 -3
  621. package/dist/{warning-circle-fill-CEN1WL7A.js → warning-circle-fill-DBvt921B.js} +2 -2
  622. package/dist/{warning-diamond-filled-BfXMlVrG.js → warning-diamond-filled-Lb2od2ry.js} +2 -2
  623. package/dist/{webinar-DqjqrNEv.js → webinar-m9nuFZBt.js} +2 -2
  624. package/dist/{yapily-logo-CZ4ywjwA.js → yapily-logo-BduxhNRA.js} +2 -2
  625. package/package.json +88 -56
  626. package/dist/Card-BHab7Kyt.js +0 -82
  627. package/dist/ConstitutionalDocument--Z--xpF7.js +0 -143
  628. package/dist/CountryField-BIYJvEAW.js +0 -843
  629. package/dist/CreateIndividualComponent-3t1p_6gB.js +0 -71
  630. package/dist/EntityAssociation-0B8bfpR4.js +0 -159
  631. package/dist/IndividualOnfido-BxhmIQwc.js +0 -9662
  632. package/dist/IndividualOnfidoDropin-Cy08-w8F.js +0 -2575
  633. package/dist/OnboardingDropinComponent-Cu2pv74K.js +0 -7623
  634. package/dist/RootBusinessDetailsPage-ChobUam3.js +0 -49
  635. package/dist/StoreProvider-DTMSAVgy.js +0 -7707
  636. package/dist/TrustMemberCompanyPage-DwVARA6c.js +0 -64
  637. package/dist/da-DK-CrtuBoDC.js +0 -118
  638. package/dist/da-DK-uHPPFvD-.js +0 -13
  639. package/dist/de-DE-SMf6w4NJ.js +0 -13
  640. package/dist/de-DE-mH3MobT9.js +0 -13
  641. package/dist/en-US-d4WBvUW7.js +0 -118
  642. package/dist/es-ES-BqpvBqmR.js +0 -13
  643. package/dist/es-ES-CnyVffM-.js +0 -118
  644. package/dist/fi-FI-DPegZzTc.js +0 -13
  645. package/dist/fi-FI-kXC-0USa.js +0 -118
  646. package/dist/fr-FR-6YOKsDLQ.js +0 -13
  647. package/dist/fr-FR-BPGwsLDa.js +0 -13
  648. package/dist/getFieldsWithExistingData-D6K7_vTh.js +0 -22
  649. package/dist/hasDataChanged-6p9Ib-IH.js +0 -19
  650. package/dist/id-verification-instant-BUVBO4R3.js +0 -58
  651. package/dist/id-verification-manual-B3YZALYU.js +0 -55
  652. package/dist/it-IT-B1eJg9RL.js +0 -13
  653. package/dist/it-IT-DyCHFg-b.js +0 -118
  654. package/dist/ja-JP-PnqAHl14.js +0 -13
  655. package/dist/mapFinancialReportsToFinancialInformation-CeqxQKYv.js +0 -67
  656. package/dist/mapJpAddressSchemaToAddressLocalizations-C22nFO39.js +0 -63
  657. package/dist/nl-NL-DkbhmJAw.js +0 -118
  658. package/dist/nl-NL-cVVIDG7s.js +0 -13
  659. package/dist/no-NO-C_tmZ39d.js +0 -13
  660. package/dist/no-NO-Df5qUoTc.js +0 -118
  661. package/dist/pt-BR-BOOm5lRR.js +0 -118
  662. package/dist/pt-BR-CMiGlY3k.js +0 -13
  663. package/dist/resolveEnvironment-DV8jSeQ4.js +0 -164
  664. package/dist/rules-Cu3mKCzh.js +0 -317
  665. package/dist/sl-SI-C3nGkfNb.js +0 -13
  666. package/dist/sl-SI-CGvCdquD.js +0 -118
  667. package/dist/sv-SE-BP2Oun8l.js +0 -118
  668. package/dist/sv-SE-CXn28ybc.js +0 -13
  669. package/dist/types/components/Business/tasks/BusinessDetailsDropin/mandatoryFields.d.ts +0 -3
  670. package/dist/types/components/Individual/fields/DecisionMakerRole/DecisionMakerRole.d.ts +0 -3
  671. package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +0 -10
  672. package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +0 -23
  673. package/dist/types/components/Individual/fields/NameFields/validate.d.ts +0 -4
  674. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentAlreadyUpload.d.ts +0 -2
  675. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentInstantVerification.d.ts +0 -3
  676. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentUpload.d.ts +0 -3
  677. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +0 -3
  678. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +0 -15
  679. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/types.d.ts +0 -14
  680. package/dist/types/components/Individual/forms/Individual/Individual.d.ts +0 -9
  681. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/Identity.d.ts +0 -2
  682. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +0 -2
  683. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/validate.d.ts +0 -3
  684. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +0 -2
  685. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/validate.d.ts +0 -3
  686. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +0 -2
  687. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/validate.d.ts +0 -3
  688. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/TypeOfIdentity/index.d.ts +0 -11
  689. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/identityUS/IdentityUS.d.ts +0 -4
  690. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/types.d.ts +0 -14
  691. package/dist/types/components/Individual/forms/Individual/PersonalDetails/PersonalDetails.d.ts +0 -3
  692. package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +0 -41
  693. package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +0 -21
  694. package/dist/types/components/Individual/forms/Individual/rules.d.ts +0 -40
  695. package/dist/types/components/Individual/forms/Individual/types.d.ts +0 -51
  696. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +0 -29
  697. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/validate.d.ts +0 -4
  698. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +0 -22
  699. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/validate.d.ts +0 -6
  700. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +0 -17
  701. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +0 -4
  702. package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +0 -4
  703. package/dist/types/components/Individual/mapping/adjustIdentificationData.d.ts +0 -3
  704. package/dist/types/components/Individual/mapping/getIdentityTypeToApiIdentityTypeMap.d.ts +0 -3
  705. package/dist/types/components/Individual/mapping/individualOnfidoKeyMappings.d.ts +0 -8
  706. package/dist/types/components/Individual/mapping/mapIndividualToLegalEntity.d.ts +0 -3
  707. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividual.d.ts +0 -3
  708. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoDropin.d.ts +0 -2
  709. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/individualOnfidoFormConfig.d.ts +0 -4
  710. package/dist/types/components/Shared/forms/BusinessTypeSelection/EntityTypeRadioGroupCard.d.ts +0 -11
  711. package/dist/types/components/ui/molecules/Card/Card.d.ts +0 -3
  712. package/dist/types/components/ui/molecules/Card/types.d.ts +0 -26
  713. package/dist/types/embeds/EmbedBaseElement.d.ts +0 -41
  714. package/dist/types/embeds/EmbedCore.d.ts +0 -22
  715. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +0 -14
  716. package/dist/types/embeds/individual-configuration/AdyenIndividual.d.ts +0 -12
  717. package/dist/types/embeds/individual-status/AdyenManageIndividual.d.ts +0 -12
  718. package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +0 -12
  719. package/dist/types/embeds/terms-of-service-management/AdyenTermsOfService.d.ts +0 -12
  720. package/dist/types/embeds/terms-of-service-status/AdyenManageTermsOfService.d.ts +0 -12
  721. package/dist/types/embeds/transfer-instrument-configuration/AdyenTransferInstrument.d.ts +0 -16
  722. package/dist/types/embeds/transfer-instrument-management/AdyenManageTransferInstrument.d.ts +0 -14
  723. package/dist/types/embeds/verification-status/AdyenVerificationStatus.d.ts +0 -20
  724. package/dist/useBusinessDetailsData-kMDQy2r1.js +0 -2441
  725. package/dist/useDataset-D1R4kueP.js +0 -220
  726. package/dist/useUpdateBusinessLines-DWsML109.js +0 -46
  727. package/dist/validate-C4R1LPcu.js +0 -41
  728. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/PayoutAccountTaskListItem.d.ts +0 -0
  729. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskList.d.ts +0 -0
  730. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListGroup.d.ts +0 -0
  731. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListItem.d.ts +0 -0
  732. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/types.d.ts +0 -0
  733. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/FinancialInformation.d.ts +0 -0
  734. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/ReportedValue.d.ts +0 -0
  735. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/types.d.ts +0 -0
  736. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/validate.d.ts +0 -0
  737. /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/AdditionalPersonalDetails.d.ts +0 -0
  738. /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/Identity/Identity.d.ts +0 -0
  739. /package/dist/types/components/Individual/forms/{IndividualOnfido/BasicDetails → BasicDetails}/BasicDetails.d.ts +0 -0
  740. /package/dist/types/components/Individual/forms/{IndividualOnfido/GuidanceQuestion → GuidanceQuestion}/GuidanceQuestion.d.ts +0 -0
  741. /package/dist/types/components/Individual/forms/{Individual/IdDocumentUpload → IdDocumentUpload}/IdDocumentManualUpload.d.ts +0 -0
  742. /package/dist/types/components/Individual/forms/{IndividualOnfido/IdNowVerificationModal → IdNowVerificationModal}/IdNowVerificationModal.d.ts +0 -0
  743. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/IdVerification.d.ts +0 -0
  744. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/idVerificationProviderId.d.ts +0 -0
  745. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/types.d.ts +0 -0
  746. /package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/IdVerificationMethod.d.ts +0 -0
  747. /package/dist/types/components/Individual/forms/{IndividualOnfido/ManualIdUpload → ManualIdUpload}/ManualIdUpload.d.ts +0 -0
  748. /package/dist/types/components/Individual/forms/{Individual/ProofOfRelationship → ProofOfRelationship}/index.d.ts +0 -0
  749. /package/dist/types/components/Individual/forms/{Individual/ProofOfResidency → ProofOfResidency}/ProofOfResidency.d.ts +0 -0
  750. /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaire.d.ts +0 -0
  751. /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaireModalContent.d.ts +0 -0
  752. /package/dist/types/components/Individual/forms/{IndividualOnfido/UboQuestionnaire → UboQuestionnaire}/UboQuestionnaire.d.ts +0 -0
  753. /package/dist/types/components/Individual/tasks/{IndividualOnfidoDropin/IndividualOnfidoStore.d.ts → IndividualDropin/IndividualStore.d.ts} +0 -0
  754. /package/dist/types/components/{Individual → Shared}/fields/LocalizedNameFields/LocalizedNameFields.d.ts +0 -0
@@ -0,0 +1,2672 @@
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] = "9565fef4-c10c-424b-8115-47d745377ba1", e._sentryDebugIdIdentifier = "sentry-dbid-9565fef4-c10c-424b-8115-47d745377ba1");
6
+ } catch (e) {
7
+ }
8
+ }
9
+ ;
10
+ import { j as TaskTypes, b as useApiContext, k as httpGet, m as useAccountHolder, o as LegalEntityTypes, u as useTranslation, p as useAnalyticsContext, q as TaskStatuses, r as Icon, t as IconButton, v as useExperimentsContext, w as isInstantVerifiedAccount, x as getObscuredAccountNumber, y as useGetTaskStatus, z as Typography, c as useLegalEntity, R as ROOT_LE, L as Loader, B as useSettingsContext, C as useGlobalStore, G as TASK_STATUS_COMPLETED_POLLING_INTERVAL_MS, H as TASK_STATUS_POLLING_INTERVAL_MS, J as isPartOfTrustFromLegalEntity, K as isPartOfUnincorporatedPartnership, M as hasSolePropInLegalEntity, N as doesLegalEntityRequiresLegalRepresentative, O as getLegalRepresentative, P as getOwnSignatories, U as getOwnDecisionMakersLegalEntityIds, V as Button, W as getOwnSolePropProblems, X as getOwnTrustProblems, Y as getOwnUnincorporatedPartnershipProblems, Z as useLocalStorage, $ as httpPost, g as getLegalEntityCountry, a0 as CountryCodes, a1 as Skeleton, a2 as translateStringOrObject, a3 as createLogger, a4 as hasAllCapabilitiesResolved, a5 as hasRejectedCapabilities, a6 as objectsDeepEqual, a7 as noop, a as addResourceBundles, _ as __variableDynamicImportRuntimeHelper } from "./StoreProvider-99-ewU62.js";
11
+ import { jsxs, Fragment, jsx } from "preact/jsx-runtime";
12
+ import { useQuery, skipToken } from "@tanstack/preact-query";
13
+ import { lazy, Suspense } from "preact/compat";
14
+ import { useState, useEffect, useReducer, useMemo, useCallback, useContext, useRef } from "preact/hooks";
15
+ import { u as useBusinessLines } from "./useBusinessLines-C5NQ5pE8.js";
16
+ import { u as usePciQuestionnaireList, g as getPciQuestionnaireList } from "./usePciQuestionnaireList-BF7TPjbQ.js";
17
+ import { u as useSalesChannels, a as usePciStatus } from "./useSalesChannels-DYGRfKeh.js";
18
+ import { g as getAccountTaskStatus, u as useTaskStatus } from "./useTaskStatus-1OZ2clnm.js";
19
+ import { u as useTermsOfServiceStatus, a as useTermsOfServiceAcceptanceInfos } from "./useTermsOfServiceStatus-Dg_nBQgt.js";
20
+ import { C as Card } from "./Card-OQuFzmxm.js";
21
+ import { T as TaskVerificationStatus, S as SettingNames } from "./TaskVerificationStatus-DZIw2ztV.js";
22
+ import { u as useSetting } from "./useSetting-CbBaitp6.js";
23
+ import { u as useToastContext } from "./useToastContext-D643iewp.js";
24
+ import { u as useCanSeeIntroduction } from "./useCanSeeIntroduction-BdZJ7k-_.js";
25
+ import { C as CompanyTypesValues } from "./company-types-value-D_mKv5PT.js";
26
+ import { g as getDefaultAccountHolderType } from "./accountHolderUtils-Btu9mMnM.js";
27
+ import { u as useDataMissingRemediations } from "./useDataMissingRemediations-Zgtpw7uZ.js";
28
+ import { S as StackLayout, U as UnincorporatedPartnershipMemberTypes } from "./unincorporated-partnership-MeN1dp53.js";
29
+ import { u as useCapabilityProblems } from "./getProblemsForEntity-D8qEVVOM.js";
30
+ import { d as downloadFile } from "./file-CiG1D0zy.js";
31
+ import { f as filterProblemsByTaskForms } from "./filterProblemsByTaskForms-Cz7iQtms.js";
32
+ import { u as useDeleteTransferInstrument } from "./useDeleteTransferInstrument-B2wRj-qL.js";
33
+ import { A as Avatar } from "./Avatar-DWU7t_0U.js";
34
+ import { L as LoaderWrapper } from "./LoaderWrapper-C2PvjjQc.js";
35
+ import { a as Alert } from "./Alert-CFmX9yNV.js";
36
+ import { V as VerificationErrorAlert } from "./VerificationErrorAlert-C6_ewC7c.js";
37
+ import { C as Confirm } from "./Confirm-C0J_JwMM.js";
38
+ import { E as ExperimentNames } from "./types-B7GElie6.js";
39
+ import { T as TrustedFieldsProviders, I as Image } from "./Image-CAucF9wz.js";
40
+ import { g as getTrustedFieldsProvider } from "./getTrustedFields-C5-mXl-l.js";
41
+ import { u as useAssociatedLegalEntity } from "./useAssociatedLegalEntity-ETDoz1H2.js";
42
+ import cx from "classnames";
43
+ import { i as isNewEntity } from "./isNewEntity-7Vw_eQBr.js";
44
+ import { i as isBafinSignatoryFlow, s as showIdNowModal, a as idNowPostSubmit } from "./bafinUtils-CIGv_BK8.js";
45
+ import { u as useTrustMembers } from "./useTrustMembers-BTCDIu6B.js";
46
+ import { Route, Switch, useRouter, useLocation, matchRoute, Router } from "wouter-preact";
47
+ import { memoryLocation } from "wouter-preact/memory-location";
48
+ import { createContext } from "preact";
49
+ import { u as useNavigate, R as ROUTE_PATHS, I as Introduction$1, B as BusinessTypeSelectionPage$1, S as SingpassSelection$1, A as AccountSetupRejected$1, a as RootIndividualDetailsPage$1, b as RootBusinessDetailsPage$1, D as DecisionMakers$1, C as CustomerSupport$1, c as Review$1, d as DecisionMakerDetailsPage$1, P as PayoutDetailsPage$1, T as TrustMembersOverview$1, e as TrustMemberRoleAndTypePage$1, f as TrustMemberIndividualPage$1, g as TrustMemberCompanyPage$1, h as TrustDetailsPage$1, U as UnincorporatedPartnershipMembersOverview$1, i as UnincorporatedPartnershipMemberRoleAndTypePage$1, j as UnincorporatedPartnershipIndividualPage$1, k as UnincorporatedPartnershipMemberCompanyPage$1, l as SignPCIComponent$1, m as SoleProprietorshipPage$1, n as AcceptTermsOfService$1, L as LegalRepresentativeDetailsPage$1, o as SourceOfFundsPage$1, p as BusinessFinancingPage$1, q as TaxReportingDropin$1, r as RootBusinessLinesPage$1, s as detectBasePath } from "./useNavigate-CI0N-POy.js";
50
+ const getDefaultTask$1 = ({
51
+ legalEntity,
52
+ canSeeEntitySelection,
53
+ canChangeEntityType,
54
+ showIntroduction,
55
+ shouldShowSingpassSelection,
56
+ showServiceAgreementsFirst,
57
+ showBusinessFinancingFirst
58
+ }) => {
59
+ const hasLegalEntityProgressedBeyondEntitySelection = hasProgressedBeyondEntitySelection$1(legalEntity);
60
+ if (showServiceAgreementsFirst) {
61
+ return TaskTypes.SERVICE_AGREEMENT;
62
+ }
63
+ if (showBusinessFinancingFirst) {
64
+ return TaskTypes.BUSINESS_FINANCING;
65
+ }
66
+ if (canChangeEntityType && canSeeEntitySelection && !hasLegalEntityProgressedBeyondEntitySelection)
67
+ return TaskTypes.BUSINESS_TYPE_SELECTION;
68
+ if (showIntroduction) return TaskTypes.INTRODUCTION;
69
+ if (shouldShowSingpassSelection) return TaskTypes.SINGPASS_SELECTION;
70
+ return TaskTypes.TASKS_OVERVIEW;
71
+ };
72
+ const hasProgressedBeyondEntitySelection$1 = (legalEntity) => {
73
+ const hasOwnEntityAssocation = legalEntity.entityAssociations?.some(
74
+ (ea) => ea.associatorId === legalEntity.id
75
+ );
76
+ const hasOrganizationType = legalEntity.organization?.type;
77
+ const hasIndividualData = !!legalEntity.individual;
78
+ return hasOwnEntityAssocation || !!hasOrganizationType || hasIndividualData;
79
+ };
80
+ const getTaskTypes = async (id, baseUrl) => {
81
+ return httpGet({
82
+ baseUrl,
83
+ path: `legalEntities/${id}/configurations/tasks`
84
+ });
85
+ };
86
+ const useTaskTypes = (options) => {
87
+ const { rootLegalEntityId, baseUrl } = useApiContext();
88
+ return useQuery({
89
+ queryKey: ["taskTypes"],
90
+ queryFn: () => getTaskTypes(rootLegalEntityId.value, baseUrl.value),
91
+ ...options
92
+ });
93
+ };
94
+ const getPciQuestionnaire = async (legalEntityId, baseUrl, documentId) => {
95
+ return httpGet({
96
+ baseUrl,
97
+ path: `legalEntities/${legalEntityId}/pci/questionnaires/${documentId}`
98
+ });
99
+ };
100
+ const BusinessTypes = {
101
+ INDIVIDUAL: "individual",
102
+ COMPANY: "company",
103
+ INCORPORATED_PARTNERSHIP: "partnershipIncorporated",
104
+ UNINCORPORATED_PARTNERSHIP: "partnershipUnincorporated",
105
+ INDIVIDUAL_TRUSTEE: "individualTrustee",
106
+ COMPANY_TRUSTEE: "companyTrustee",
107
+ SOLE_PROPRIETORSHIP: "soleProprietorship",
108
+ INCORPORATE_ASSOCIATION: "associationIncorporated"
109
+ };
110
+ const businessTypeMapping = {
111
+ myName: {
112
+ [LegalEntityTypes.INDIVIDUAL]: BusinessTypes.INDIVIDUAL
113
+ },
114
+ theCompanyIWorkFor: {
115
+ [LegalEntityTypes.ORGANIZATION]: BusinessTypes.COMPANY
116
+ },
117
+ mySoleProprietorName: {
118
+ [LegalEntityTypes.INDIVIDUAL]: BusinessTypes.SOLE_PROPRIETORSHIP
119
+ },
120
+ aTrust: {
121
+ [LegalEntityTypes.INDIVIDUAL]: BusinessTypes.INDIVIDUAL_TRUSTEE,
122
+ [LegalEntityTypes.ORGANIZATION]: BusinessTypes.COMPANY_TRUSTEE
123
+ },
124
+ anUnincorporatedPartnership: {
125
+ [LegalEntityTypes.INDIVIDUAL]: BusinessTypes.UNINCORPORATED_PARTNERSHIP,
126
+ [LegalEntityTypes.ORGANIZATION]: BusinessTypes.UNINCORPORATED_PARTNERSHIP
127
+ }
128
+ };
129
+ const companyTypesMapping = {
130
+ [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: BusinessTypes.INCORPORATED_PARTNERSHIP,
131
+ [CompanyTypesValues.INCORPORATED_ASSOCIATION]: BusinessTypes.INCORPORATE_ASSOCIATION,
132
+ [CompanyTypesValues.PUBLIC_COMPANY]: BusinessTypes.COMPANY,
133
+ [CompanyTypesValues.PRIVATE_COMPANY]: BusinessTypes.COMPANY,
134
+ [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: BusinessTypes.COMPANY,
135
+ [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: BusinessTypes.COMPANY,
136
+ [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: BusinessTypes.COMPANY,
137
+ [CompanyTypesValues.SOLE_PROPRIETORSHIP]: BusinessTypes.SOLE_PROPRIETORSHIP
138
+ };
139
+ const useBusinessSetup = (legalEntityResponse) => {
140
+ const { accountHolder } = useAccountHolder();
141
+ const accountHolderType = accountHolder || getDefaultAccountHolderType(legalEntityResponse);
142
+ const organizationType = legalEntityResponse.organization?.type;
143
+ const businessSetup = accountHolderType === "theCompanyIWorkFor" && organizationType ? companyTypesMapping[organizationType] : businessTypeMapping[accountHolderType]?.[legalEntityResponse.type];
144
+ return businessSetup;
145
+ };
146
+ const businessFormIds = [
147
+ "basicInformation",
148
+ "businessSelection",
149
+ "companyStructure",
150
+ "additionalInformation",
151
+ "companyRegistrationDocument",
152
+ "companyTaxDocument",
153
+ "companyProofOfDirectorDocument",
154
+ "companyProofOfSignatoryDocument",
155
+ "companyProofOfOwnershipDocument",
156
+ "companyFinancialInformation",
157
+ "companyConstitutionalDocument"
158
+ ];
159
+ const individualOnfidoFormIds = [
160
+ "signatoryQuestionnaire",
161
+ "uboQuestionnaire",
162
+ "basicDetails",
163
+ "idVerificationMethod",
164
+ "additionalPersonalDetails",
165
+ "manualIdUpload",
166
+ "proofOfResidency",
167
+ "proofOfNationalId",
168
+ "proofOfRelationship"
169
+ ];
170
+ const TaskListItem = ({
171
+ titleKey,
172
+ title,
173
+ icon,
174
+ status,
175
+ onNavigateToTask,
176
+ disabled = false,
177
+ problems,
178
+ downloadHandler,
179
+ info,
180
+ loading = false,
181
+ showErrorAlerts = "onErrorStatus",
182
+ warningMessage,
183
+ deleteEntity,
184
+ testId,
185
+ enableTracking = true,
186
+ fallbackErrorMessage
187
+ }) => {
188
+ const { t } = useTranslation("common");
189
+ const userEvents = useAnalyticsContext();
190
+ const [isConfirmShown, setIsConfirmShown] = useState(false);
191
+ const isDeletable = !!deleteEntity;
192
+ const isDownloadable = !!downloadHandler && status === TaskStatuses.DOWNLOAD;
193
+ const shouldShowErrorAlert = showErrorAlerts === "always" || showErrorAlerts === "onErrorStatus" && status === TaskStatuses.ERROR || !!problems?.verificationErrors;
194
+ const handleNavigateToTask = () => {
195
+ if (enableTracking) {
196
+ userEvents.addJourneyEvent("Clicked button", {
197
+ actionType: "open",
198
+ task: void 0,
199
+ label: titleKey
200
+ });
201
+ }
202
+ onNavigateToTask?.();
203
+ };
204
+ const avatarVariant = disabled ? "disabled" : "primary";
205
+ const handleRemoveIntent = (event) => {
206
+ event.stopPropagation();
207
+ setIsConfirmShown(true);
208
+ };
209
+ const dismissConfirm = () => {
210
+ setIsConfirmShown(false);
211
+ };
212
+ const getTaskAccessory = () => {
213
+ switch (status) {
214
+ case TaskStatuses.SIGN:
215
+ return t(($) => $["sign"]);
216
+ case TaskStatuses.DETAILS_REQUIRED:
217
+ case TaskStatuses.EMPTY:
218
+ return t(($) => $["add"]);
219
+ default:
220
+ return /* @__PURE__ */ jsx(TaskVerificationStatus, { status });
221
+ }
222
+ };
223
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
224
+ /* @__PURE__ */ jsx(Card, { onClick: handleNavigateToTask, disabled: loading || disabled, children: /* @__PURE__ */ jsxs(
225
+ LoaderWrapper,
226
+ {
227
+ status: loading ? "loading" : "success",
228
+ formOpacityWhenLoading: 0.3,
229
+ loaderSize: "medium",
230
+ children: [
231
+ /* @__PURE__ */ jsxs("div", { className: "adyen-task-item", "data-testid": testId, children: [
232
+ /* @__PURE__ */ jsxs("div", { className: "adyen-task-item__header", children: [
233
+ /* @__PURE__ */ jsxs("div", { className: "adyen-task-item__heading", children: [
234
+ /* @__PURE__ */ jsx(Avatar, { variant: avatarVariant, iconName: icon }),
235
+ /* @__PURE__ */ jsx("div", { className: "adyen-task-item__body", children: /* @__PURE__ */ jsx("span", { className: "adyen-task-item__title", children: title || t(($) => $[titleKey]) }) })
236
+ ] }),
237
+ info && /* @__PURE__ */ jsxs("div", { className: "adyen-task-item__info", children: [
238
+ /* @__PURE__ */ jsx(Icon, { name: "info-circle" }),
239
+ /* @__PURE__ */ jsx("span", { children: info })
240
+ ] })
241
+ ] }),
242
+ /* @__PURE__ */ jsxs("aside", { className: "adyen-task-item__status", children: [
243
+ getTaskAccessory(),
244
+ isDownloadable && /* @__PURE__ */ jsx(
245
+ IconButton,
246
+ {
247
+ ariaLabel: t(($) => $["download"]),
248
+ icon: "download",
249
+ onClick: downloadHandler,
250
+ variant: "tertiary"
251
+ }
252
+ ),
253
+ isDeletable && /* @__PURE__ */ jsx(
254
+ IconButton,
255
+ {
256
+ ariaLabel: t(($) => $["delete"]),
257
+ icon: "bin",
258
+ variant: "tertiary",
259
+ onClick: handleRemoveIntent,
260
+ disabled: isConfirmShown
261
+ }
262
+ ),
263
+ !isDownloadable && !isDeletable && /* @__PURE__ */ jsx(Icon, { name: "chevron-right" })
264
+ ] })
265
+ ] }),
266
+ warningMessage ? /* @__PURE__ */ jsx(
267
+ Alert,
268
+ {
269
+ variant: "warning",
270
+ title: warningMessage,
271
+ className: "adyen-task-item__warning-message"
272
+ }
273
+ ) : void 0,
274
+ shouldShowErrorAlert && /* @__PURE__ */ jsx(
275
+ VerificationErrorAlert,
276
+ {
277
+ className: "adyen-task-item-alert",
278
+ problems,
279
+ fallbackErrorMessage
280
+ }
281
+ )
282
+ ]
283
+ }
284
+ ) }),
285
+ isConfirmShown && isDeletable && /* @__PURE__ */ jsx(
286
+ Confirm,
287
+ {
288
+ title: t(($) => $["deleteItem"], { item: title }),
289
+ description: t(($) => $["thisActionIsPermanent"]),
290
+ onConfirm: deleteEntity,
291
+ confirmText: t(($) => $["delete"]),
292
+ onCancel: dismissConfirm,
293
+ critical: true
294
+ }
295
+ )
296
+ ] });
297
+ };
298
+ const PayoutAccountTaskListItem = ({
299
+ account,
300
+ capabilityProblems,
301
+ onNavigateToTask,
302
+ payinPayoutTaskStatus
303
+ }) => {
304
+ const { t } = useTranslation("common");
305
+ const { showToast } = useToastContext();
306
+ const { isExperimentEnabled } = useExperimentsContext();
307
+ const { mutateAsync: deleteTransferInstrument } = useDeleteTransferInstrument();
308
+ const isInstantVerificationAccount = isInstantVerifiedAccount(account);
309
+ const obscuredAccountNumber = getObscuredAccountNumber(account);
310
+ const getTaskStatus = useGetTaskStatus();
311
+ const status = isExperimentEnabled("UseTaskStatusApiForPayout") ? getAccountTaskStatus(account.id, payinPayoutTaskStatus) : getTaskStatus(TaskTypes.PAYOUT, account.id);
312
+ const handleDeleteTransferInstrument = async () => {
313
+ try {
314
+ await deleteTransferInstrument(account.id);
315
+ showToast({ label: t(($) => $["transferInstrumentDeleted"]), variant: "success" });
316
+ } catch {
317
+ showToast({ label: t(($) => $["failedToDeletePayoutAccount"]), variant: "error" });
318
+ }
319
+ };
320
+ return /* @__PURE__ */ jsx(
321
+ TaskListItem,
322
+ {
323
+ disabled: isInstantVerificationAccount && status === TaskStatuses.PROCESSING,
324
+ onNavigateToTask: isInstantVerificationAccount ? void 0 : onNavigateToTask,
325
+ icon: "payout",
326
+ titleKey: "accountNumber",
327
+ title: obscuredAccountNumber,
328
+ status,
329
+ problems: capabilityProblems?.BankAccount?.[account.id],
330
+ fallbackErrorMessage: isInstantVerificationAccount ? t(($) => $["verificationErrorMessageTrustedTransferInstrument"]) : void 0,
331
+ deleteEntity: handleDeleteTransferInstrument
332
+ }
333
+ );
334
+ };
335
+ const TaskListGroup = ({ title, children }) => /* @__PURE__ */ jsxs("article", { className: "adyen-task-list-group", children: [
336
+ title && /* @__PURE__ */ jsx("header", { className: "adyen-task-list-group__header", children: /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-stronger", color: "secondary", children: title }) }),
337
+ /* @__PURE__ */ jsx("div", { className: "adyen-kyc-card__body", children: /* @__PURE__ */ jsx(StackLayout, { gap: "xSmall", children }) })
338
+ ] });
339
+ const LEGAL_ENTITY_BASE_TASKS = [
340
+ TaskTypes.INDIVIDUAL,
341
+ TaskTypes.BUSINESS_DETAILS,
342
+ TaskTypes.DECISION_MAKER_OVERVIEW
343
+ ];
344
+ const CONTRACT_TASKS = [TaskTypes.SERVICE_AGREEMENT, TaskTypes.PCI_DSS];
345
+ function TaskList({ onNavigateToTask, singpassComponent }) {
346
+ const { data: rootLe, isLoading } = useLegalEntity(ROOT_LE);
347
+ const { data: existingBusinessLines, isLoading: isLoadingBl } = useBusinessLines([
348
+ "paymentProcessing"
349
+ ]);
350
+ const capabilityProblems = useCapabilityProblems() ?? {};
351
+ if (isLoading || !rootLe || isLoadingBl) {
352
+ return /* @__PURE__ */ jsx(Loader, { size: "large" });
353
+ }
354
+ return /* @__PURE__ */ jsx(
355
+ TaskListInner,
356
+ {
357
+ onNavigateToTask,
358
+ singpassComponent,
359
+ legalEntityResponse: rootLe,
360
+ capabilityProblems,
361
+ existingBusinessLines
362
+ }
363
+ );
364
+ }
365
+ function TaskListInner({
366
+ onNavigateToTask,
367
+ legalEntityResponse,
368
+ capabilityProblems,
369
+ singpassComponent,
370
+ existingBusinessLines
371
+ }) {
372
+ const userEvents = useAnalyticsContext();
373
+ const { t } = useTranslation("common");
374
+ const { showToast } = useToastContext();
375
+ const { rootLegalEntityId, baseUrl } = useApiContext();
376
+ const { isSettingEnabled } = useSettingsContext();
377
+ const { isExperimentEnabled } = useExperimentsContext();
378
+ const { accountHolder } = useAccountHolder();
379
+ const tasks = useGlobalStore().tasks.value;
380
+ const getTaskStatus = useGetTaskStatus();
381
+ const businessSetup = useBusinessSetup(legalEntityResponse);
382
+ const canSeeIntroduction = useCanSeeIntroduction({ legalEntity: legalEntityResponse });
383
+ const additionalSalesChannels = useSalesChannels();
384
+ const { remediationMessages } = useDataMissingRemediations({
385
+ legalEntityId: legalEntityResponse.id,
386
+ problems: capabilityProblems
387
+ });
388
+ const { data: pciStatus } = usePciStatus({ additionalSalesChannels });
389
+ const { data: pciQuestionnaireList } = usePciQuestionnaireList();
390
+ const { data: termsOfServiceStatus } = useTermsOfServiceStatus();
391
+ const { data: termsOfServiceStatusAcceptanceInfos } = useTermsOfServiceAcceptanceInfos();
392
+ const { data: normalizedTasks } = useTaskStatus({
393
+ refetchInterval: (query) => {
394
+ const { data: response } = query.state || {};
395
+ const statuses = response?.statuses;
396
+ const areAllTasksFinishedOrEmpty = statuses?.length === 0 || statuses?.every((task) => task.status === "FINISHED");
397
+ return areAllTasksFinishedOrEmpty ? TASK_STATUS_COMPLETED_POLLING_INTERVAL_MS : TASK_STATUS_POLLING_INTERVAL_MS;
398
+ }
399
+ });
400
+ const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
401
+ const hidePayoutAccountTaskExperiment = isExperimentEnabled("HidePayoutAccountTask");
402
+ const showCustomerSupportV4 = isExperimentEnabled("ShowCustomerSupportV4");
403
+ const transferInstrumentLimit = useSetting("transferInstrumentLimit");
404
+ const payinPayoutTaskStatus = normalizedTasks?.PAYOUT ?? normalizedTasks?.PAYIN;
405
+ const businessDetailsTaskStatus = normalizedTasks?.BUSINESS_DETAILS?.status ?? TaskStatuses.DETAILS_REQUIRED;
406
+ const businessLinesTaskStatus = normalizedTasks?.ACQUIRING_BUSINESS_LINE?.status ?? TaskStatuses.DETAILS_REQUIRED;
407
+ const rootLegalEntityProblems = capabilityProblems?.LegalEntity?.[legalEntityResponse.id];
408
+ const isReview = Boolean(rootLegalEntityProblems?.isReviewRequired);
409
+ const hasTrust = accountHolder === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
410
+ const hasUnincorporatedPartnership = accountHolder === "anUnincorporatedPartnership" || isPartOfUnincorporatedPartnership(legalEntityResponse);
411
+ const hasSoleProprietorship = accountHolder === "mySoleProprietorName" || hasSolePropInLegalEntity(legalEntityResponse);
412
+ const isLegalRepresentativeRequired = isExperimentEnabled("EnableAgeVerification") && doesLegalEntityRequiresLegalRepresentative(legalEntityResponse);
413
+ const legalRepresentative = isLegalRepresentativeRequired && getLegalRepresentative(legalEntityResponse);
414
+ const transferInstruments = legalEntityResponse?.transferInstruments || [];
415
+ const canAddPayoutAccount = legalEntityResponse?.organization?.legalName || legalEntityResponse?.individual?.name;
416
+ const hasPayinTaskNotPayout = tasks.includes(TaskTypes.PAYIN) && !tasks.includes(TaskTypes.PAYOUT);
417
+ const payoutTaskDescriptionKey = isReview ? "payoutAccountsDescriptionReview" : "payoutAccountsDescription";
418
+ const pciHasDocuments = !!pciQuestionnaireList?.data?.length;
419
+ const canDownloadPci = !pciStatus?.signingRequired && pciHasDocuments;
420
+ const hasCreatedBusinessLines = !!existingBusinessLines?.length;
421
+ const hasPciSigners = !!legalEntityResponse?.entityAssociations?.length;
422
+ const pciIsActionable = pciStatus?.signingRequired || canDownloadPci;
423
+ const serviceAgreementTypes = termsOfServiceStatus?.termsOfServiceTypes ?? [];
424
+ const serviceAgreementAcceptanceInfos = termsOfServiceStatusAcceptanceInfos?.data ?? [];
425
+ const hasServiceAgreementSigners = legalEntityResponse.type === LegalEntityTypes.ORGANIZATION && getOwnSignatories(legalEntityResponse).length || Boolean(legalRepresentative) || legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL && !!legalEntityResponse?.individual;
426
+ const hasTaskOfGroupAccountDetails = tasks.some((task) => LEGAL_ENTITY_BASE_TASKS.includes(task));
427
+ const hasContractTasks = tasks.some((task) => CONTRACT_TASKS.includes(task));
428
+ const hasFinancingTasks = tasks.includes(TaskTypes.BUSINESS_FINANCING) || tasks.includes(TaskTypes.SOURCE_OF_FUNDS);
429
+ const showServiceAgreementTask = tasks.includes(TaskTypes.SERVICE_AGREEMENT) && (serviceAgreementTypes.length > 0 || serviceAgreementAcceptanceInfos.length > 0);
430
+ const showPciTask = isSettingEnabled("allowBusinessLines") ? tasks.includes("PCI_DSS") : tasks.includes("PCI_DSS") && pciIsActionable;
431
+ const shouldSignPciFirst = showServiceAgreementTask && showPciTask && !pciHasDocuments;
432
+ const pciTaskState = (() => {
433
+ if (!hasPciSigners) {
434
+ return { disabled: true, infoMessage: t(($) => $["requiresDecisionMakers"]) };
435
+ }
436
+ if (isSettingEnabled("allowBusinessLines") && !hasCreatedBusinessLines) {
437
+ return { disabled: true, infoMessage: t(($) => $["requiresBusinessLine"]) };
438
+ }
439
+ return { disabled: !pciStatus?.signingRequired, infoMessage: void 0 };
440
+ })();
441
+ const serviceAgreementTaskState = (() => {
442
+ if (isSettingEnabled("allowBusinessLines") && shouldSignPciFirst) {
443
+ return { disabled: true, infoMessage: t(($) => $["signPciFirst"]) };
444
+ }
445
+ if (!hasServiceAgreementSigners) {
446
+ return { disabled: true, infoMessage: t(($) => $["requiresSignatory"]) };
447
+ }
448
+ return { disabled: false, infoMessage: void 0 };
449
+ })();
450
+ const getBusinessTaskListTitleKey = () => {
451
+ if (hasUnincorporatedPartnership) {
452
+ return "tellUsMoreAboutPrimaryPartner";
453
+ } else if (tasks.includes(TaskTypes.BUSINESS_DETAILS)) {
454
+ return isReview ? "businessAccountDetailsDescriptionReview" : "businessAccountDetailsDescription";
455
+ } else if (canChangeEntityType) {
456
+ return "provideFewDetailsAboutYourself";
457
+ } else {
458
+ return "accountDetailsDescription";
459
+ }
460
+ };
461
+ const getEmptyBankAccountProblems = () => {
462
+ const transferInstrumentId = legalEntityResponse?.transferInstruments?.[0]?.id;
463
+ return transferInstrumentId ? capabilityProblems?.BankAccount?.[transferInstrumentId] : void 0;
464
+ };
465
+ const onEditBusinessSetupClick = () => {
466
+ userEvents.addTaskEvent("Clicked button", {
467
+ task: TaskTypes.TASKS_OVERVIEW,
468
+ actionType: "edit"
469
+ });
470
+ onNavigateToTask(TaskTypes.BUSINESS_TYPE_SELECTION);
471
+ };
472
+ const onPciDownload = async () => {
473
+ try {
474
+ const response = await getPciQuestionnaireList(rootLegalEntityId.value, baseUrl.value);
475
+ if (!response.data) return;
476
+ await Promise.all(
477
+ response.data.map(async (pciQuestionnaireInfo) => {
478
+ const pciQuestionnaire = await getPciQuestionnaire(
479
+ rootLegalEntityId.value,
480
+ baseUrl.value,
481
+ pciQuestionnaireInfo.id
482
+ );
483
+ await downloadFile(pciQuestionnaire.content, `${pciQuestionnaire.id}.pdf`);
484
+ })
485
+ );
486
+ } catch {
487
+ showToast({ label: t(($) => $["failedToDownloadPci"]), variant: "error" });
488
+ } finally {
489
+ userEvents.addTaskEvent("Clicked button", {
490
+ task: TaskTypes.PCI_DSS,
491
+ actionType: "download"
492
+ });
493
+ }
494
+ };
495
+ const handleOnNavigateToTaskReview = () => onNavigateToTask(TaskTypes.REVIEW);
496
+ const handleOnNavigateToTaskIndividual = () => onNavigateToTask(TaskTypes.INDIVIDUAL);
497
+ const handleOnNavigateToTaskBusinessDetails = () => onNavigateToTask(TaskTypes.BUSINESS_DETAILS);
498
+ const handleOnNavigateToTaskBusinessLines = () => onNavigateToTask(TaskTypes.ACQUIRING_BUSINESS_LINE);
499
+ const handleOnNavigateToTaskCustomerSupport = () => onNavigateToTask(TaskTypes.CUSTOMER_SUPPORT);
500
+ const handleOnNavigateToTaskDecisionMaker = () => onNavigateToTask(TaskTypes.DECISION_MAKER_OVERVIEW);
501
+ const handleOnNavigateToTaskTrust = () => onNavigateToTask(TaskTypes.TRUST);
502
+ const handleOnNavigateToTaskTrustMember = () => onNavigateToTask(TaskTypes.TRUST_MEMBER_OVERVIEW);
503
+ const handleOnNavigateToTaskPayout = (id) => hasPayinTaskNotPayout ? onNavigateToTask(TaskTypes.PAYIN, id) : onNavigateToTask(TaskTypes.PAYOUT, id);
504
+ const handleOnNavigateToPci = () => !canDownloadPci && onNavigateToTask(TaskTypes.PCI_DSS);
505
+ const handleOnNavigateToSoleProp = () => onNavigateToTask(TaskTypes.SOLE_PROPRIETOR_COMPANY);
506
+ const handleOnNavigateToServiceAgreement = () => onNavigateToTask(TaskTypes.SERVICE_AGREEMENT);
507
+ const handleOnNavigateToTaskLegalRepresentative = () => onNavigateToTask(TaskTypes.LEGAL_REPRESENTATIVE_DETAILS);
508
+ const handleOnNavigateToSourceOfFunds = () => onNavigateToTask(TaskTypes.SOURCE_OF_FUNDS);
509
+ const handleOnNavigateToBusinessFinancing = () => onNavigateToTask(TaskTypes.BUSINESS_FINANCING);
510
+ const handleOnNavigateToTaxReporting = () => onNavigateToTask(TaskTypes.TAX_REPORTING);
511
+ const fullIndividualFormIds = [...individualOnfidoFormIds];
512
+ const showDecisionMakersWarning = Boolean(
513
+ getOwnDecisionMakersLegalEntityIds(legalEntityResponse).length && remediationMessages.DECISION_MAKER
514
+ );
515
+ useEffect(() => {
516
+ if (showDecisionMakersWarning) {
517
+ userEvents.addTaskEvent("Encountered error", {
518
+ task: TaskTypes.TASKS_OVERVIEW,
519
+ actionType: "alert",
520
+ returnValue: "missingDecisionMaker"
521
+ });
522
+ }
523
+ }, [showDecisionMakersWarning, userEvents]);
524
+ return /* @__PURE__ */ jsxs("div", { className: "adyen-task-list__container", children: [
525
+ canSeeIntroduction && /* @__PURE__ */ jsx("div", { className: "adyen-task-list__nav", children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => onNavigateToTask(TaskTypes.INTRODUCTION), children: t(($) => $["goToIntroduction"]) }) }),
526
+ canChangeEntityType && /* @__PURE__ */ jsxs("header", { className: "adyen-task-list__heading", children: [
527
+ /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: t(($) => $["setUpYourAccount"]) }),
528
+ /* @__PURE__ */ jsxs(Typography, { el: "p", variant: "title", className: "adyen-task-list__description", children: [
529
+ /* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-strongest", children: t(($) => $["yourBusinessSetup"], {
530
+ businessSetup: businessSetup ? t(($) => $[businessSetup]) : t(($) => $["unknown"])
531
+ }) }),
532
+ /* @__PURE__ */ jsx(
533
+ IconButton,
534
+ {
535
+ ariaLabel: t(($) => $["editBusinessSetup"]),
536
+ icon: "edit",
537
+ variant: "tertiary",
538
+ onClick: onEditBusinessSetupClick
539
+ }
540
+ )
541
+ ] })
542
+ ] }),
543
+ singpassComponent,
544
+ /* @__PURE__ */ jsxs(StackLayout, { children: [
545
+ hasTaskOfGroupAccountDetails && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $[getBusinessTaskListTitleKey()]), children: [
546
+ tasks.includes(TaskTypes.INDIVIDUAL) && /* @__PURE__ */ jsx(
547
+ TaskListItem,
548
+ {
549
+ onNavigateToTask: handleOnNavigateToTaskIndividual,
550
+ icon: "decision-maker",
551
+ titleKey: hasTrust ? "trusteePersonalDetails" : hasUnincorporatedPartnership ? "primaryPartnerDetails" : "personalDetails",
552
+ status: getTaskStatus(TaskTypes.INDIVIDUAL),
553
+ problems: filterProblemsByTaskForms(rootLegalEntityProblems, fullIndividualFormIds)
554
+ }
555
+ ),
556
+ tasks.includes(TaskTypes.BUSINESS_DETAILS) && /* @__PURE__ */ jsx(
557
+ TaskListItem,
558
+ {
559
+ testId: TaskTypes.BUSINESS_DETAILS,
560
+ onNavigateToTask: handleOnNavigateToTaskBusinessDetails,
561
+ icon: "company",
562
+ titleKey: hasTrust ? "businessTrusteeDetails" : hasUnincorporatedPartnership ? "primaryPartnerDetails" : "businessDetails",
563
+ status: businessDetailsTaskStatus,
564
+ problems: filterProblemsByTaskForms(rootLegalEntityProblems, businessFormIds)
565
+ }
566
+ ),
567
+ hasSoleProprietorship && /* @__PURE__ */ jsx(
568
+ TaskListItem,
569
+ {
570
+ onNavigateToTask: handleOnNavigateToSoleProp,
571
+ icon: "company",
572
+ titleKey: canChangeEntityType ? "soleProprietorshipDetails" : "soleProprietorDetails",
573
+ status: getTaskStatus(TaskTypes.SOLE_PROPRIETOR_COMPANY),
574
+ problems: getOwnSolePropProblems(legalEntityResponse, capabilityProblems)
575
+ }
576
+ ),
577
+ isLegalRepresentativeRequired && /* @__PURE__ */ jsx(
578
+ TaskListItem,
579
+ {
580
+ onNavigateToTask: handleOnNavigateToTaskLegalRepresentative,
581
+ icon: "decision-maker",
582
+ titleKey: "legalRepresentative",
583
+ status: getTaskStatus(TaskTypes.LEGAL_REPRESENTATIVE_DETAILS)
584
+ }
585
+ ),
586
+ tasks.includes(TaskTypes.DECISION_MAKER_OVERVIEW) && /* @__PURE__ */ jsx(
587
+ TaskListItem,
588
+ {
589
+ onNavigateToTask: handleOnNavigateToTaskDecisionMaker,
590
+ icon: "decision-maker",
591
+ titleKey: hasUnincorporatedPartnership ? "entityDecisionMakers" : "decisionMakers",
592
+ status: getTaskStatus(TaskTypes.DECISION_MAKER_OVERVIEW),
593
+ warningMessage: showDecisionMakersWarning ? remediationMessages[TaskTypes.DECISION_MAKER] : void 0
594
+ }
595
+ ),
596
+ tasks.includes(TaskTypes.ACQUIRING_BUSINESS_LINE) && /* @__PURE__ */ jsx(
597
+ TaskListItem,
598
+ {
599
+ testId: TaskTypes.ACQUIRING_BUSINESS_LINE,
600
+ onNavigateToTask: handleOnNavigateToTaskBusinessLines,
601
+ icon: "solutionPayments",
602
+ titleKey: "businessLines",
603
+ status: businessLinesTaskStatus
604
+ }
605
+ ),
606
+ showCustomerSupportV4 && tasks.includes(TaskTypes.CUSTOMER_SUPPORT) && /* @__PURE__ */ jsx(
607
+ TaskListItem,
608
+ {
609
+ onNavigateToTask: handleOnNavigateToTaskCustomerSupport,
610
+ icon: "webinar",
611
+ titleKey: "customerSupport",
612
+ status: normalizedTasks?.CUSTOMER_SUPPORT?.status ?? TaskStatuses.DETAILS_REQUIRED,
613
+ problems: filterProblemsByTaskForms(rootLegalEntityProblems, ["customerSupport"])
614
+ }
615
+ )
616
+ ] }),
617
+ hasTrust && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $["trustDetailsDescription"]), children: [
618
+ /* @__PURE__ */ jsx(
619
+ TaskListItem,
620
+ {
621
+ onNavigateToTask: handleOnNavigateToTaskTrust,
622
+ icon: "trust",
623
+ titleKey: "trustDetails",
624
+ status: getTaskStatus(TaskTypes.TRUST),
625
+ problems: getOwnTrustProblems(legalEntityResponse, capabilityProblems)
626
+ }
627
+ ),
628
+ /* @__PURE__ */ jsx(
629
+ TaskListItem,
630
+ {
631
+ onNavigateToTask: handleOnNavigateToTaskTrustMember,
632
+ icon: "decision-maker",
633
+ titleKey: "trustMembers",
634
+ status: getTaskStatus(TaskTypes.TRUST_MEMBER_OVERVIEW)
635
+ }
636
+ )
637
+ ] }),
638
+ hasUnincorporatedPartnership && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $["partnershipUnincorporated"]), children: [
639
+ /* @__PURE__ */ jsx(
640
+ TaskListItem,
641
+ {
642
+ onNavigateToTask: () => onNavigateToTask(TaskTypes.UNINCORPORATED_PARTNERSHIP),
643
+ icon: "trust",
644
+ titleKey: "unincorporatedDetails",
645
+ status: getTaskStatus(TaskTypes.UNINCORPORATED_PARTNERSHIP),
646
+ problems: getOwnUnincorporatedPartnershipProblems(
647
+ legalEntityResponse,
648
+ capabilityProblems
649
+ )
650
+ }
651
+ ),
652
+ /* @__PURE__ */ jsx(
653
+ TaskListItem,
654
+ {
655
+ onNavigateToTask: () => {
656
+ if (!isPartOfUnincorporatedPartnership(legalEntityResponse)) {
657
+ onNavigateToTask(TaskTypes.UNINCORPORATED_PARTNERSHIP);
658
+ } else {
659
+ onNavigateToTask(TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW);
660
+ }
661
+ },
662
+ icon: "decision-maker",
663
+ titleKey: "unincorporatedPartnershipMembers",
664
+ status: getTaskStatus(TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW)
665
+ }
666
+ )
667
+ ] }),
668
+ hasFinancingTasks && /* @__PURE__ */ jsxs(TaskListGroup, { children: [
669
+ tasks.includes(TaskTypes.SOURCE_OF_FUNDS) && /* @__PURE__ */ jsx(
670
+ TaskListItem,
671
+ {
672
+ onNavigateToTask: handleOnNavigateToSourceOfFunds,
673
+ icon: "cash-stack",
674
+ titleKey: "fundingSources",
675
+ status: normalizedTasks?.SOURCE_OF_FUNDS?.status ?? TaskStatuses.DETAILS_REQUIRED
676
+ }
677
+ ),
678
+ tasks.includes(TaskTypes.BUSINESS_FINANCING) && /* @__PURE__ */ jsx(
679
+ TaskListItem,
680
+ {
681
+ onNavigateToTask: handleOnNavigateToBusinessFinancing,
682
+ icon: "capital",
683
+ titleKey: "businessFinancing",
684
+ status: normalizedTasks?.BUSINESS_FINANCING?.status ?? TaskStatuses.DETAILS_REQUIRED
685
+ }
686
+ )
687
+ ] }),
688
+ tasks.includes(TaskTypes.TAX_REPORTING) && /* @__PURE__ */ jsx(TaskListGroup, { children: /* @__PURE__ */ jsx(
689
+ TaskListItem,
690
+ {
691
+ onNavigateToTask: handleOnNavigateToTaxReporting,
692
+ icon: "reporting",
693
+ titleKey: "taxReporting",
694
+ status: normalizedTasks?.TAX_REPORTING?.status ?? TaskStatuses.DETAILS_REQUIRED
695
+ }
696
+ ) }),
697
+ (tasks.includes(TaskTypes.PAYOUT) || tasks.includes(TaskTypes.PAYIN)) && !hidePayoutAccountTaskExperiment && /* @__PURE__ */ jsx(
698
+ TaskListGroup,
699
+ {
700
+ title: canChangeEntityType ? t(($) => $["payoutBankAccounts"]) : t(
701
+ ($) => $[hasPayinTaskNotPayout ? "payinAccountsDescription" : payoutTaskDescriptionKey]
702
+ ),
703
+ children: transferInstruments.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
704
+ transferInstruments.map((transferInstrument) => /* @__PURE__ */ jsx(
705
+ PayoutAccountTaskListItem,
706
+ {
707
+ account: transferInstrument,
708
+ capabilityProblems,
709
+ onNavigateToTask: () => handleOnNavigateToTaskPayout(transferInstrument.id),
710
+ payinPayoutTaskStatus
711
+ },
712
+ transferInstrument.id
713
+ )),
714
+ !transferInstrumentLimit || transferInstruments.length < transferInstrumentLimit ? /* @__PURE__ */ jsxs(
715
+ Card,
716
+ {
717
+ onClick: () => handleOnNavigateToTaskPayout(),
718
+ disabled: !canAddPayoutAccount,
719
+ children: [
720
+ /* @__PURE__ */ jsx(Icon, { name: "plus", className: "adyen-task-list__card-icon " }),
721
+ /* @__PURE__ */ jsx("span", { children: canChangeEntityType ? t(($) => $["addExtraBankAccount"]) : t(
722
+ ($) => $[hasPayinTaskNotPayout ? "addExtraPayinAccount" : "addExtraPayoutAccount"]
723
+ ) })
724
+ ]
725
+ }
726
+ ) : null
727
+ ] }) : /* @__PURE__ */ jsx(
728
+ TaskListItem,
729
+ {
730
+ onNavigateToTask: () => handleOnNavigateToTaskPayout(),
731
+ icon: "payout",
732
+ titleKey: canChangeEntityType ? "bankAccountDetails" : hasPayinTaskNotPayout ? "payinDetails" : "payoutDetails",
733
+ status: TaskStatuses.DETAILS_REQUIRED,
734
+ disabled: !canAddPayoutAccount,
735
+ problems: getEmptyBankAccountProblems()
736
+ }
737
+ )
738
+ }
739
+ ),
740
+ hasContractTasks && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $["reviewAndSignLegalDisclosures"]), children: [
741
+ showPciTask && /* @__PURE__ */ jsx(
742
+ TaskListItem,
743
+ {
744
+ onNavigateToTask: handleOnNavigateToPci,
745
+ icon: "pci",
746
+ titleKey: "pciDssQuestionnaire",
747
+ status: canDownloadPci ? TaskStatuses.DOWNLOAD : TaskStatuses.SIGN,
748
+ info: pciTaskState.infoMessage,
749
+ downloadHandler: onPciDownload,
750
+ disabled: pciTaskState.disabled
751
+ }
752
+ ),
753
+ showServiceAgreementTask && /* @__PURE__ */ jsx(
754
+ TaskListItem,
755
+ {
756
+ onNavigateToTask: handleOnNavigateToServiceAgreement,
757
+ icon: "contract",
758
+ titleKey: "signServiceAgreement",
759
+ disabled: serviceAgreementTaskState.disabled,
760
+ status: serviceAgreementTypes.length ? TaskStatuses.SIGN : TaskStatuses.SIGNED,
761
+ info: serviceAgreementTaskState.infoMessage
762
+ }
763
+ )
764
+ ] }),
765
+ isReview && /* @__PURE__ */ jsx(TaskListGroup, { title: t(($) => $["pleaseEnsureTheFollowing"]), children: /* @__PURE__ */ jsx(
766
+ TaskListItem,
767
+ {
768
+ onNavigateToTask: handleOnNavigateToTaskReview,
769
+ icon: "review",
770
+ titleKey: "submitReviewOfYourData",
771
+ status: TaskStatuses.SUBMIT,
772
+ problems: rootLegalEntityProblems,
773
+ showErrorAlerts: "always"
774
+ }
775
+ ) })
776
+ ] })
777
+ ] });
778
+ }
779
+ const getHasSeenIntroductionStorageKey = (legalEntityId) => `COMPLETED_INTRO-${legalEntityId}`;
780
+ const useHasSeenIntroduction = ({ legalEntityId }) => {
781
+ const [hasSeenIntroduction, setHasSeenIntroduction] = useLocalStorage(
782
+ getHasSeenIntroductionStorageKey(legalEntityId),
783
+ false
784
+ );
785
+ return { hasSeenIntroduction, setHasSeenIntroduction };
786
+ };
787
+ const getHasSeenSingpassSelectionStorageKey = (legalEntityId) => `COMPLETED_SINGPASS_SELECTION-${legalEntityId}`;
788
+ const useHasSeenSingpassSelection = ({
789
+ legalEntityId
790
+ }) => {
791
+ const [hasSeenSingpassSelection, setHasSeenSingpassSelection] = useLocalStorage(
792
+ getHasSeenSingpassSelectionStorageKey(legalEntityId),
793
+ false
794
+ );
795
+ return { hasSeenSingpassSelection, setHasSeenSingpassSelection };
796
+ };
797
+ async function convertToSingpassLinkResponse(openIdInitiateResponse) {
798
+ const response = await Promise.resolve(openIdInitiateResponse);
799
+ const item = { authUrl: response.authUrl, success: true };
800
+ return { item };
801
+ }
802
+ const useOpenIdAuthorizationLink = (options) => {
803
+ const { rootLegalEntityId, baseUrl } = useApiContext();
804
+ return useQuery({
805
+ queryKey: ["openIdAuthorizationLink"],
806
+ queryFn: () => getOpenIdAuthorizationLink(rootLegalEntityId.value, baseUrl.value),
807
+ ...options
808
+ });
809
+ };
810
+ const getOpenIdAuthorizationLink = async (legalEntityId, baseUrl) => {
811
+ return convertToSingpassLinkResponse(
812
+ httpPost({
813
+ baseUrl,
814
+ path: `/legalEntities/${legalEntityId}/openid/initiate`
815
+ })
816
+ );
817
+ };
818
+ const SingpassMyInfoLoginActionTypes = {
819
+ LOADING: "LOADING",
820
+ SUCCESS: "SUCCESS",
821
+ FAILURE: "FAILURE",
822
+ RESET: "RESET"
823
+ };
824
+ const defaultSingpassState = { isLoading: false, isSuccess: false };
825
+ const singpassReducer = (state, action) => {
826
+ switch (action.type) {
827
+ case SingpassMyInfoLoginActionTypes.LOADING:
828
+ return { ...state, isLoading: true };
829
+ case SingpassMyInfoLoginActionTypes.SUCCESS:
830
+ return { isLoading: false, isSuccess: true };
831
+ case SingpassMyInfoLoginActionTypes.FAILURE:
832
+ return { isLoading: false, isSuccess: false, errorMessage: action.errorMessage };
833
+ case SingpassMyInfoLoginActionTypes.RESET:
834
+ return defaultSingpassState;
835
+ default:
836
+ return state;
837
+ }
838
+ };
839
+ const useSingpassMyInfoLogin = ({
840
+ legalEntity,
841
+ accountHolder
842
+ }) => {
843
+ const existingProvider = getTrustedFieldsProvider(legalEntity);
844
+ const defaultState = {
845
+ isLoading: false,
846
+ isSuccess: existingProvider === TrustedFieldsProviders.SINGPASS
847
+ };
848
+ const [state, dispatch] = useReducer(
849
+ singpassReducer,
850
+ defaultState
851
+ );
852
+ const { refetch: fetchOpenIdAuthorizationLink } = useOpenIdAuthorizationLink({ enabled: false });
853
+ const isEligibleForSingpass = useMemo(() => {
854
+ if (!legalEntity) {
855
+ return false;
856
+ }
857
+ if (getLegalEntityCountry(legalEntity) !== CountryCodes.Singapore) {
858
+ return false;
859
+ }
860
+ if (accountHolder) {
861
+ return accountHolder === "theCompanyIWorkFor" || accountHolder === "myName";
862
+ }
863
+ const legalEntityType = legalEntity.type;
864
+ const isPartOfTrust = isPartOfTrustFromLegalEntity(legalEntity);
865
+ const isVanillaOrganization = legalEntityType === LegalEntityTypes.ORGANIZATION && !isPartOfTrust;
866
+ const hasSoleProprietor = hasSolePropInLegalEntity(legalEntity);
867
+ const isVanillaIndividual = legalEntityType === LegalEntityTypes.INDIVIDUAL && !hasSoleProprietor;
868
+ return isVanillaOrganization || isVanillaIndividual;
869
+ }, [legalEntity, accountHolder]);
870
+ const handleInitiateSingpassMyInfoLogin = async () => {
871
+ dispatch({ ...state, type: SingpassMyInfoLoginActionTypes.LOADING });
872
+ const { data } = await fetchOpenIdAuthorizationLink();
873
+ return data?.item.authUrl;
874
+ };
875
+ const handleSingpassMyInfoLoginSuccess = () => {
876
+ dispatch({ ...state, type: SingpassMyInfoLoginActionTypes.SUCCESS });
877
+ };
878
+ const handleSingpassMyInfoLoginFailure = (errorMessage) => {
879
+ dispatch({ ...state, errorMessage, type: SingpassMyInfoLoginActionTypes.FAILURE });
880
+ };
881
+ const handleSingpassMyInfoLoginReset = () => {
882
+ dispatch({ ...state, type: SingpassMyInfoLoginActionTypes.RESET });
883
+ };
884
+ return {
885
+ isEligibleForSingpass,
886
+ state,
887
+ handleInitiateSingpassMyInfoLogin,
888
+ handleSingpassMyInfoLoginSuccess,
889
+ handleSingpassMyInfoLoginFailure,
890
+ handleSingpassMyInfoLoginReset
891
+ };
892
+ };
893
+ const useAssociatedLegalRepresentative = (legalEntity) => {
894
+ const matchingAssociation = useMemo(() => {
895
+ return getLegalRepresentative(legalEntity);
896
+ }, [legalEntity]);
897
+ const { data } = useLegalEntity(
898
+ doesLegalEntityRequiresLegalRepresentative(legalEntity) && matchingAssociation?.legalEntityId ? matchingAssociation.legalEntityId : skipToken
899
+ );
900
+ return data;
901
+ };
902
+ const getCanSeeEntitySelectionStorageKey = (legalEntityId) => `ENTITY_SELECTION_SEEN-${legalEntityId}`;
903
+ const useCanSeeEntitySelection = (legalEntityId) => {
904
+ const [canSeeEntitySelectionFromLocalStorage, setCanSeeEntitySelectionIntoLocalStorage] = useLocalStorage(getCanSeeEntitySelectionStorageKey(legalEntityId), true);
905
+ return {
906
+ canSeeEntitySelection: canSeeEntitySelectionFromLocalStorage,
907
+ setCanSeeEntitySelection: setCanSeeEntitySelectionIntoLocalStorage
908
+ };
909
+ };
910
+ const providerButton = "adyen-kyc-provider-button";
911
+ const providerButtonDisplayName = "adyen-kyc-provider-button-display-name";
912
+ const styles = {
913
+ providerButton,
914
+ providerButtonDisplayName
915
+ };
916
+ const singpassLogo = lazy(
917
+ () => import("./singpass-logo-wY4xsmTX.js")
918
+ );
919
+ const ProviderButton = ({ provider, onClick }) => {
920
+ const { t } = useTranslation("ui");
921
+ const providerDisplayName = {
922
+ singpassMyInfo: "Singpass",
923
+ singpassMyInfoBusiness: "Singpass"
924
+ };
925
+ const buttonLabel = {
926
+ singpassMyInfo: t(($) => $["retrieveMyinfo"]),
927
+ singpassMyInfoBusiness: t(($) => $["retrieveMyinfoBusiness"])
928
+ };
929
+ return /* @__PURE__ */ jsx(Button, { onClick, fullWidth: true, variant: "secondary", children: /* @__PURE__ */ jsxs("div", { className: styles.providerButton, children: [
930
+ buttonLabel[provider],
931
+ /* @__PURE__ */ jsx("span", { className: styles.providerButtonDisplayName, children: providerDisplayName[provider] }),
932
+ /* @__PURE__ */ jsx(Image, { lazyLoadedImage: singpassLogo })
933
+ ] }) });
934
+ };
935
+ const legalEntityTypeToSubtitleTranslationKey = {
936
+ [LegalEntityTypes.INDIVIDUAL]: "myInfoYouCanGetVerifiedDetails",
937
+ [LegalEntityTypes.ORGANIZATION]: "myInfoBusinessYouCanGetVerifiedDetails"
938
+ };
939
+ const legalEntityTypeToProviderButtonKey = {
940
+ [LegalEntityTypes.INDIVIDUAL]: "singpassMyInfo",
941
+ [LegalEntityTypes.ORGANIZATION]: "singpassMyInfoBusiness"
942
+ };
943
+ const successAlertTitleText = {
944
+ [LegalEntityTypes.INDIVIDUAL]: "myinfoDetailsRetrieved",
945
+ [LegalEntityTypes.ORGANIZATION]: "myinfoBusinessDetailsRetrieved"
946
+ };
947
+ const successAlertContentText = {
948
+ [LegalEntityTypes.INDIVIDUAL]: "yourDetailsArePreFilledInTheRelevantSections",
949
+ [LegalEntityTypes.ORGANIZATION]: "yourBusinesssDetailsArePreFilledInTheRelevantSections"
950
+ };
951
+ const SingpassBanner = ({
952
+ isLoading,
953
+ isSuccess,
954
+ errorMessage,
955
+ onClick,
956
+ onAlertClose,
957
+ onMessage,
958
+ legalEntityType
959
+ }) => {
960
+ const { t } = useTranslation("common");
961
+ const { baseUrl, rootLegalEntityId } = useApiContext();
962
+ const singpassEventListener = useCallback(
963
+ (event) => {
964
+ if (event.origin !== new URL(baseUrl.value).origin) return;
965
+ if (event.data.legalEntityReference !== rootLegalEntityId.value) return;
966
+ onMessage({ data: { isSuccessful: event.data.isSuccessful } });
967
+ },
968
+ [baseUrl.value, rootLegalEntityId.value, onMessage]
969
+ );
970
+ useEffect(() => {
971
+ window.addEventListener("message", singpassEventListener);
972
+ return () => window.removeEventListener("message", singpassEventListener);
973
+ }, [singpassEventListener]);
974
+ if (isLoading) {
975
+ return /* @__PURE__ */ jsx(Skeleton, {});
976
+ }
977
+ if (isSuccess) {
978
+ const successTitleText = successAlertTitleText[legalEntityType];
979
+ const successContentText = successAlertContentText[legalEntityType];
980
+ return /* @__PURE__ */ jsx(
981
+ Alert,
982
+ {
983
+ variant: "success",
984
+ title: successTitleText && t(($) => $[successTitleText]),
985
+ onClose: onAlertClose,
986
+ children: successContentText && t(($) => $[successContentText])
987
+ }
988
+ );
989
+ }
990
+ const providerName = legalEntityTypeToProviderButtonKey[legalEntityType];
991
+ if (errorMessage) {
992
+ return /* @__PURE__ */ jsx(
993
+ Alert,
994
+ {
995
+ variant: "warning",
996
+ title: translateStringOrObject(t, errorMessage),
997
+ onClose: onAlertClose,
998
+ children: /* @__PURE__ */ jsxs(Typography, { variant: "body", children: [
999
+ t(($) => $["tryAgainOrContinueEnteringTheDetailsYourself"]),
1000
+ providerName && /* @__PURE__ */ jsx(ProviderButton, { provider: providerName, onClick })
1001
+ ] })
1002
+ }
1003
+ );
1004
+ }
1005
+ const subtitleTranslationKey = legalEntityTypeToSubtitleTranslationKey[legalEntityType];
1006
+ return /* @__PURE__ */ jsxs(
1007
+ Alert,
1008
+ {
1009
+ className: cx("adyen-task-list-singpass-banner"),
1010
+ icon: false,
1011
+ title: t(($) => $["getSetUpInstantly"]),
1012
+ children: [
1013
+ subtitleTranslationKey && /* @__PURE__ */ jsx("div", { className: cx("adyen-task-list-singpass-banner__subtitle"), children: t(($) => $[subtitleTranslationKey]) }),
1014
+ providerName && /* @__PURE__ */ jsx(ProviderButton, { provider: providerName, onClick })
1015
+ ]
1016
+ }
1017
+ );
1018
+ };
1019
+ const useTrustMemberNavigation = ({ navigateTo, trust }) => {
1020
+ const { t } = useTranslation("trust");
1021
+ const { showToast } = useToastContext();
1022
+ const [trustMember, setTrustMember] = useState();
1023
+ const { setTrustMembers } = useGlobalStore();
1024
+ const trustMembers = useTrustMembers();
1025
+ const memberId = trustMember?.trustMemberType === "undefinedBeneficiary" ? trustMember.reference : trustMember?.legalEntityId;
1026
+ useEffect(() => setTrustMembers(trustMembers), [trustMembers]);
1027
+ const onNavigateToTrustMemberEditDetails = async (tm) => {
1028
+ try {
1029
+ if (tm.legalEntityId === isNewEntity) {
1030
+ setTrustMember(tm);
1031
+ }
1032
+ const id = tm.legalEntityId === isNewEntity ? void 0 : tm.legalEntityId;
1033
+ navigateTo(
1034
+ tm.trustMemberType === "company" ? TaskTypes.TRUST_MEMBER_COMPANY : TaskTypes.TRUST_MEMBER_INDIVIDUAL,
1035
+ id ? { memberId: id } : void 0
1036
+ );
1037
+ } catch {
1038
+ showToast({ label: t(($) => $["failedToFetchTrustMemberDetails"]), variant: "error" });
1039
+ }
1040
+ };
1041
+ const onNavigateToTrustMemberRoleAndType = (tm) => {
1042
+ setTrustMember(tm === "new" ? void 0 : tm);
1043
+ let id;
1044
+ if (tm !== "new") {
1045
+ if (tm.trustMemberType === "undefinedBeneficiary") {
1046
+ id = tm.reference !== isNewEntity ? tm.reference : void 0;
1047
+ } else if (tm.legalEntityId !== isNewEntity) {
1048
+ id = tm.legalEntityId;
1049
+ }
1050
+ }
1051
+ navigateTo(TaskTypes.TRUST_MEMBER_ROLE_AND_TYPE, id ? { memberId: id } : void 0);
1052
+ };
1053
+ const onNavigateToTrust = async (task = TaskTypes.TRUST) => {
1054
+ try {
1055
+ if (trust) {
1056
+ navigateTo(task);
1057
+ } else {
1058
+ navigateTo(TaskTypes.TRUST);
1059
+ }
1060
+ } catch {
1061
+ showToast({ label: t(($) => $["failedToFetchTrustDetails"]), variant: "error" });
1062
+ }
1063
+ };
1064
+ return {
1065
+ trustMember,
1066
+ trustMemberId: memberId === isNewEntity ? void 0 : memberId,
1067
+ trustMembers,
1068
+ onNavigateToTrust,
1069
+ onNavigateToTrustMemberRoleAndType,
1070
+ onNavigateToTrustMemberEditDetails
1071
+ };
1072
+ };
1073
+ const createDefaultMember = (selectedMember, selectedEntityType, selectedRoles) => {
1074
+ const firstRole = selectedRoles?.[0];
1075
+ return {
1076
+ memberType: selectedMember?.memberType || firstRole,
1077
+ roles: selectedRoles || selectedMember?.roles || [UnincorporatedPartnershipMemberTypes.SECONDARY_PARTNER],
1078
+ legalEntityType: selectedEntityType,
1079
+ legalEntityId: selectedMember?.legalEntityId || "",
1080
+ name: selectedMember?.name || ""
1081
+ };
1082
+ };
1083
+ const useUnincorporatedPartnershipNavigation = ({ navigateTo }) => {
1084
+ const [activeMember, setActiveMember] = useState();
1085
+ const { rootLegalEntityId } = useApiContext();
1086
+ const onNavigateToMember = async ({
1087
+ selectedMember,
1088
+ selectedRoles,
1089
+ selectedEntityType,
1090
+ roleAndType
1091
+ }) => {
1092
+ const createdMember = createDefaultMember(selectedMember, selectedEntityType, selectedRoles);
1093
+ setActiveMember(createdMember);
1094
+ if (rootLegalEntityId.value === createdMember?.legalEntityId) {
1095
+ navigateTo(
1096
+ createdMember.legalEntityType === LegalEntityTypes.INDIVIDUAL ? TaskTypes.INDIVIDUAL : TaskTypes.BUSINESS_DETAILS
1097
+ );
1098
+ return;
1099
+ }
1100
+ const memberParams = createdMember.legalEntityId ? { memberId: createdMember.legalEntityId } : void 0;
1101
+ if (roleAndType) {
1102
+ navigateTo(TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_ROLE_AND_TYPE, memberParams);
1103
+ return;
1104
+ }
1105
+ navigateTo(
1106
+ createdMember?.legalEntityType === LegalEntityTypes.ORGANIZATION ? TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY : TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL,
1107
+ memberParams
1108
+ );
1109
+ };
1110
+ return {
1111
+ onNavigateToMember,
1112
+ activeMember,
1113
+ setActiveMember
1114
+ };
1115
+ };
1116
+ const MemoryRouterContext = createContext(null);
1117
+ const useMemoryRouter = () => useContext(MemoryRouterContext);
1118
+ const useShouldShowIntroduction = ({
1119
+ legalEntity
1120
+ }) => {
1121
+ const canSeeIntroduction = useCanSeeIntroduction({ legalEntity });
1122
+ const { hasSeenIntroduction } = useHasSeenIntroduction({ legalEntityId: legalEntity.id });
1123
+ return canSeeIntroduction && !hasSeenIntroduction;
1124
+ };
1125
+ function DefaultRouteRedirect({ legalEntity, children }) {
1126
+ const navigate = useNavigate();
1127
+ const { isSettingEnabled } = useSettingsContext();
1128
+ const { accountHolder } = useAccountHolder();
1129
+ const { canSeeEntitySelection } = useCanSeeEntitySelection(legalEntity.id);
1130
+ const { hasSeenSingpassSelection } = useHasSeenSingpassSelection({
1131
+ legalEntityId: legalEntity.id
1132
+ });
1133
+ const { isEligibleForSingpass } = useSingpassMyInfoLogin({ legalEntity, accountHolder });
1134
+ const showIntroduction = useShouldShowIntroduction({ legalEntity });
1135
+ const showServiceAgreementsFirst = isSettingEnabled(SettingNames.ShowServiceAgreementsFirst);
1136
+ const showBusinessFinancingFirst = isSettingEnabled(SettingNames.ShowBusinessFinancingFirst);
1137
+ const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
1138
+ const shouldShowSingpassSelection = isEligibleForSingpass && !hasSeenSingpassSelection;
1139
+ const defaultTask = useMemo(
1140
+ () => getDefaultTask$1({
1141
+ legalEntity,
1142
+ canSeeEntitySelection,
1143
+ canChangeEntityType,
1144
+ showIntroduction,
1145
+ shouldShowSingpassSelection,
1146
+ showServiceAgreementsFirst,
1147
+ showBusinessFinancingFirst
1148
+ }),
1149
+ [
1150
+ legalEntity,
1151
+ canSeeEntitySelection,
1152
+ canChangeEntityType,
1153
+ showIntroduction,
1154
+ shouldShowSingpassSelection,
1155
+ showServiceAgreementsFirst,
1156
+ showBusinessFinancingFirst
1157
+ ]
1158
+ );
1159
+ const shouldRenderInline = defaultTask === TaskTypes.TASKS_OVERVIEW && !!children;
1160
+ useEffect(() => {
1161
+ if (shouldRenderInline) return;
1162
+ navigate.replace(defaultTask);
1163
+ }, [defaultTask, navigate, shouldRenderInline]);
1164
+ if (shouldRenderInline) {
1165
+ return /* @__PURE__ */ jsx(Fragment, { children });
1166
+ }
1167
+ return /* @__PURE__ */ jsx(Loader, {});
1168
+ }
1169
+ function SuspenseRoute({ path, children }) {
1170
+ return /* @__PURE__ */ jsx(Route, { path, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children }) });
1171
+ }
1172
+ function OnboardingRouter({
1173
+ legalEntity,
1174
+ rootLegalEntityCountry,
1175
+ trust,
1176
+ unincorporatedPartnership,
1177
+ soleProp,
1178
+ associatedLegalRepresentative,
1179
+ refetchLegalEntity,
1180
+ refetchTrust,
1181
+ refetchUnincorporatedPartnership,
1182
+ onExternalSubmit,
1183
+ accountHolder,
1184
+ setAccountHolder,
1185
+ setCanSeeEntitySelection,
1186
+ setHasSeenIntroduction,
1187
+ taskTypes,
1188
+ targetLegalEntityType,
1189
+ setTargetLegalEntityType,
1190
+ trustMember,
1191
+ onNavigateToTrust,
1192
+ onNavigateToTrustMemberRoleAndType,
1193
+ onNavigateToTrustMemberEditDetails,
1194
+ unincorporatedPartnershipMember,
1195
+ setActiveMember,
1196
+ onNavigateToMember,
1197
+ singpassBanner,
1198
+ handleSingpassSelectionNextClick,
1199
+ openBankingPartnerConfigId
1200
+ }) {
1201
+ const navigate = useNavigate();
1202
+ const userEvents = useAnalyticsContext();
1203
+ const handleOnSubmit = async (data, backStepCount) => {
1204
+ onExternalSubmit?.(data);
1205
+ await refetchLegalEntity();
1206
+ navigate.back(backStepCount);
1207
+ };
1208
+ const onNavigateToDecisionMakerIndividual = (task, decisionMakerId, parentId) => {
1209
+ navigate.to(task, {
1210
+ parentId: parentId ?? legalEntity.id,
1211
+ ...decisionMakerId ? { decisionMakerId } : {},
1212
+ // For company-owner routes, memberId in the URL = parentId (the member company)
1213
+ ...parentId ? { memberId: parentId } : {}
1214
+ });
1215
+ };
1216
+ const onNavigateToTask = async (task, id) => {
1217
+ switch (task) {
1218
+ case TaskTypes.PAYOUT:
1219
+ case TaskTypes.PAYIN:
1220
+ navigate.to(task, id ? { transferInstrumentId: id } : {});
1221
+ break;
1222
+ case TaskTypes.TRUST:
1223
+ case TaskTypes.TRUST_MEMBER_OVERVIEW:
1224
+ await onNavigateToTrust(
1225
+ task === TaskTypes.TRUST_MEMBER_OVERVIEW ? TaskTypes.TRUST_MEMBER_OVERVIEW : void 0
1226
+ );
1227
+ break;
1228
+ default:
1229
+ navigate.to(task);
1230
+ }
1231
+ };
1232
+ return /* @__PURE__ */ jsxs(Switch, { children: [
1233
+ /* @__PURE__ */ jsx(Route, { path: ROUTE_PATHS[TaskTypes.TASKS_OVERVIEW], children: /* @__PURE__ */ jsx(TaskList, { onNavigateToTask, singpassComponent: singpassBanner }) }),
1234
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.INTRODUCTION], children: /* @__PURE__ */ jsx(
1235
+ Introduction$1,
1236
+ {
1237
+ onExitIntroduction: () => {
1238
+ setHasSeenIntroduction(true);
1239
+ navigate.to("default");
1240
+ },
1241
+ tasks: taskTypes
1242
+ }
1243
+ ) }),
1244
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.BUSINESS_TYPE_SELECTION], children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-display-flex adyen-kyc-u-justify-content-center", children: /* @__PURE__ */ jsx(
1245
+ BusinessTypeSelectionPage$1,
1246
+ {
1247
+ onComplete: async (newAccountHolder) => {
1248
+ setAccountHolder(newAccountHolder);
1249
+ setCanSeeEntitySelection(false);
1250
+ await refetchLegalEntity();
1251
+ navigate.to("default");
1252
+ },
1253
+ onBack: () => navigate.back()
1254
+ }
1255
+ ) }) }),
1256
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.SINGPASS_SELECTION], children: /* @__PURE__ */ jsx(
1257
+ SingpassSelection$1,
1258
+ {
1259
+ handleNextClick: handleSingpassSelectionNextClick,
1260
+ accountHolder,
1261
+ legalEntityType: legalEntity.type
1262
+ }
1263
+ ) }),
1264
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.CAPABILITY_REJECTED], children: /* @__PURE__ */ jsx(AccountSetupRejected$1, {}) }),
1265
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.INDIVIDUAL], children: /* @__PURE__ */ jsx(
1266
+ RootIndividualDetailsPage$1,
1267
+ {
1268
+ onSubmit: async (data) => {
1269
+ onExternalSubmit?.(data);
1270
+ await refetchLegalEntity();
1271
+ navigate.to(TaskTypes.TASKS_OVERVIEW);
1272
+ setTargetLegalEntityType(void 0);
1273
+ },
1274
+ handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW),
1275
+ isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.INDIVIDUAL
1276
+ }
1277
+ ) }),
1278
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.BUSINESS_DETAILS], children: /* @__PURE__ */ jsx(
1279
+ RootBusinessDetailsPage$1,
1280
+ {
1281
+ onSubmit: async (data) => {
1282
+ onExternalSubmit?.(data);
1283
+ await refetchLegalEntity();
1284
+ navigate.to(TaskTypes.TASKS_OVERVIEW);
1285
+ setTargetLegalEntityType(void 0);
1286
+ },
1287
+ handleHomeClick: () => navigate.back(),
1288
+ isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
1289
+ }
1290
+ ) }),
1291
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.DECISION_MAKER_OVERVIEW], children: /* @__PURE__ */ jsx(
1292
+ DecisionMakers$1,
1293
+ {
1294
+ onNavigateToIndividual: (legalEntityId) => onNavigateToDecisionMakerIndividual(TaskTypes.DECISION_MAKER, legalEntityId),
1295
+ navigateBackToTaskList: () => navigate.back()
1296
+ }
1297
+ ) }),
1298
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.CUSTOMER_SUPPORT], children: /* @__PURE__ */ jsx(
1299
+ CustomerSupport$1,
1300
+ {
1301
+ country: rootLegalEntityCountry,
1302
+ onSubmit: () => navigate.to(TaskTypes.TASKS_OVERVIEW)
1303
+ }
1304
+ ) }),
1305
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.REVIEW], children: /* @__PURE__ */ jsx(Review$1, { handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW) }) }),
1306
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.DECISION_MAKER], children: /* @__PURE__ */ jsx(
1307
+ DecisionMakerDetailsPage$1,
1308
+ {
1309
+ onSubmit: async (data, scenario) => {
1310
+ onExternalSubmit?.(data);
1311
+ await refetchLegalEntity();
1312
+ if (isBafinSignatoryFlow({
1313
+ taskType: TaskTypes.DECISION_MAKER,
1314
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1315
+ // @ts-ignore basicDetails will be there when it's IndividualOnfidoSchema
1316
+ data,
1317
+ scenarios: scenario
1318
+ })) {
1319
+ showIdNowModal.value = true;
1320
+ idNowPostSubmit.value = true;
1321
+ } else {
1322
+ navigate.back();
1323
+ }
1324
+ },
1325
+ handleHomeClick: () => navigate.back()
1326
+ }
1327
+ ) }),
1328
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.PAYOUT], children: /* @__PURE__ */ jsx(
1329
+ PayoutDetailsPage$1,
1330
+ {
1331
+ taskType: TaskTypes.PAYOUT,
1332
+ handleHomeClick: () => navigate.back(),
1333
+ openBankingPartnerConfigId,
1334
+ onSubmit: handleOnSubmit
1335
+ }
1336
+ ) }),
1337
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.PAYIN], children: /* @__PURE__ */ jsx(
1338
+ PayoutDetailsPage$1,
1339
+ {
1340
+ taskType: TaskTypes.PAYIN,
1341
+ handleHomeClick: () => navigate.back(),
1342
+ openBankingPartnerConfigId,
1343
+ onSubmit: handleOnSubmit
1344
+ }
1345
+ ) }),
1346
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST_MEMBER_OVERVIEW], children: /* @__PURE__ */ jsx(
1347
+ TrustMembersOverview$1,
1348
+ {
1349
+ navigateBackToTaskList: () => navigate.back(),
1350
+ navigateToEditTrustMember: onNavigateToTrustMemberRoleAndType,
1351
+ navigateToEditTrustMemberOwner: (trustMemberOwnerId, trustMemberId) => onNavigateToDecisionMakerIndividual(
1352
+ TaskTypes.TRUST_MEMBER_COMPANY_OWNER,
1353
+ trustMemberOwnerId,
1354
+ trustMemberId
1355
+ )
1356
+ }
1357
+ ) }),
1358
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST_MEMBER_ROLE_AND_TYPE], children: /* @__PURE__ */ jsx(
1359
+ TrustMemberRoleAndTypePage$1,
1360
+ {
1361
+ trustId: trust?.id,
1362
+ navigateToFullDropinFor: onNavigateToTrustMemberEditDetails,
1363
+ navigateBack: async () => {
1364
+ await refetchTrust();
1365
+ navigate.back();
1366
+ }
1367
+ }
1368
+ ) }),
1369
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST_MEMBER_COMPANY_OWNER], children: /* @__PURE__ */ jsx(
1370
+ DecisionMakerDetailsPage$1,
1371
+ {
1372
+ taskType: TaskTypes.TRUST_MEMBER_COMPANY_OWNER,
1373
+ onSubmit: async (data) => {
1374
+ await handleOnSubmit(data);
1375
+ await refetchTrust();
1376
+ },
1377
+ handleHomeClick: () => navigate.back()
1378
+ }
1379
+ ) }),
1380
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST_MEMBER_INDIVIDUAL], children: /* @__PURE__ */ jsx(
1381
+ TrustMemberIndividualPage$1,
1382
+ {
1383
+ trustId: trust?.id,
1384
+ newMember: trustMember?.legalEntityId === isNewEntity ? trustMember : void 0,
1385
+ onSubmit: async (data) => {
1386
+ await handleOnSubmit(data, 2);
1387
+ await refetchTrust();
1388
+ },
1389
+ handleBackClick: () => navigate.back(),
1390
+ handleHomeClick: () => navigate.to(TaskTypes.TRUST_MEMBER_OVERVIEW)
1391
+ }
1392
+ ) }),
1393
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST_MEMBER_COMPANY], children: /* @__PURE__ */ jsx(
1394
+ TrustMemberCompanyPage$1,
1395
+ {
1396
+ trustId: trust?.id,
1397
+ newMember: trustMember?.legalEntityId === isNewEntity ? trustMember : void 0,
1398
+ onSubmit: async (data) => {
1399
+ await handleOnSubmit(data, 2);
1400
+ await refetchTrust();
1401
+ },
1402
+ handleHomeClick: () => navigate.back()
1403
+ }
1404
+ ) }),
1405
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST], children: /* @__PURE__ */ jsx(
1406
+ TrustDetailsPage$1,
1407
+ {
1408
+ taskType: TaskTypes.TRUST,
1409
+ trustId: trust?.id,
1410
+ onSubmit: (data) => handleOnSubmit(data, 1),
1411
+ handleHomeClick: () => navigate.back()
1412
+ }
1413
+ ) }),
1414
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW], children: /* @__PURE__ */ jsx(
1415
+ UnincorporatedPartnershipMembersOverview$1,
1416
+ {
1417
+ navigateBackToTaskList: () => navigate.back(),
1418
+ navigateToEditMember: (member) => onNavigateToMember({
1419
+ selectedMember: member,
1420
+ selectedEntityType: member?.legalEntityType,
1421
+ selectedRoles: member?.roles,
1422
+ roleAndType: true
1423
+ }),
1424
+ navigateToEditMemberOwner: (memberOwnerId, memberId) => {
1425
+ setActiveMember({
1426
+ legalEntityId: memberId
1427
+ });
1428
+ onNavigateToDecisionMakerIndividual(
1429
+ TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER,
1430
+ memberOwnerId,
1431
+ memberId
1432
+ );
1433
+ }
1434
+ }
1435
+ ) }),
1436
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_ROLE_AND_TYPE], children: /* @__PURE__ */ jsx(
1437
+ UnincorporatedPartnershipMemberRoleAndTypePage$1,
1438
+ {
1439
+ onNavigateToMember,
1440
+ navigateBack: async () => {
1441
+ await refetchUnincorporatedPartnership();
1442
+ navigate.back();
1443
+ }
1444
+ }
1445
+ ) }),
1446
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER], children: /* @__PURE__ */ jsx(
1447
+ DecisionMakerDetailsPage$1,
1448
+ {
1449
+ taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER,
1450
+ onSubmit: async (data) => {
1451
+ await handleOnSubmit(data);
1452
+ await refetchUnincorporatedPartnership();
1453
+ },
1454
+ handleHomeClick: () => navigate.back()
1455
+ }
1456
+ ) }),
1457
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL], children: /* @__PURE__ */ jsx(
1458
+ UnincorporatedPartnershipIndividualPage$1,
1459
+ {
1460
+ partnershipId: unincorporatedPartnership?.id,
1461
+ member: unincorporatedPartnershipMember,
1462
+ onSubmit: (data) => {
1463
+ handleOnSubmit(data, 2);
1464
+ refetchUnincorporatedPartnership();
1465
+ },
1466
+ handleBackClick: () => navigate.back(),
1467
+ handleHomeClick: () => navigate.to(TaskTypes.TRUST_MEMBER_OVERVIEW)
1468
+ }
1469
+ ) }),
1470
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY], children: /* @__PURE__ */ jsx(
1471
+ UnincorporatedPartnershipMemberCompanyPage$1,
1472
+ {
1473
+ partnershipId: unincorporatedPartnership?.id,
1474
+ newMember: unincorporatedPartnershipMember?.legalEntityId === "" ? unincorporatedPartnershipMember : void 0,
1475
+ onSubmit: (data) => handleOnSubmit(data, 2),
1476
+ handleHomeClick: () => navigate.back()
1477
+ }
1478
+ ) }),
1479
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP], children: /* @__PURE__ */ jsx(
1480
+ TrustDetailsPage$1,
1481
+ {
1482
+ taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP,
1483
+ trustId: unincorporatedPartnership?.id,
1484
+ onSubmit: (data) => handleOnSubmit(data, 1),
1485
+ handleHomeClick: () => navigate.back()
1486
+ }
1487
+ ) }),
1488
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.PCI_DSS], children: /* @__PURE__ */ jsx(SignPCIComponent$1, { onClose: () => navigate.back() }) }),
1489
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.SOLE_PROPRIETOR_COMPANY], children: /* @__PURE__ */ jsx(
1490
+ SoleProprietorshipPage$1,
1491
+ {
1492
+ solePropId: soleProp?.id,
1493
+ onSubmit: (data) => handleOnSubmit(data, 1),
1494
+ handleHomeClick: () => navigate.back()
1495
+ }
1496
+ ) }),
1497
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.SERVICE_AGREEMENT], children: /* @__PURE__ */ jsx(
1498
+ AcceptTermsOfService$1,
1499
+ {
1500
+ legalEntityId: legalEntity.id,
1501
+ onClose: () => {
1502
+ userEvents.addPageEvent("Clicked button", {
1503
+ actionType: "back",
1504
+ label: "back"
1505
+ });
1506
+ navigate.back();
1507
+ },
1508
+ asEmbedded: false,
1509
+ handleAddSigner: () => {
1510
+ onNavigateToDecisionMakerIndividual(TaskTypes.DECISION_MAKER);
1511
+ }
1512
+ }
1513
+ ) }),
1514
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.LEGAL_REPRESENTATIVE_DETAILS], children: /* @__PURE__ */ jsx(
1515
+ LegalRepresentativeDetailsPage$1,
1516
+ {
1517
+ legalRepresentativeId: associatedLegalRepresentative?.id,
1518
+ onSubmit: handleOnSubmit,
1519
+ handleHomeClick: () => navigate.back()
1520
+ }
1521
+ ) }),
1522
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.SOURCE_OF_FUNDS], children: /* @__PURE__ */ jsx(
1523
+ SourceOfFundsPage$1,
1524
+ {
1525
+ onSubmit: handleOnSubmit,
1526
+ handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW)
1527
+ }
1528
+ ) }),
1529
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.BUSINESS_FINANCING], children: /* @__PURE__ */ jsx(
1530
+ BusinessFinancingPage$1,
1531
+ {
1532
+ onSubmit: async (data) => {
1533
+ onExternalSubmit?.(data);
1534
+ await refetchLegalEntity();
1535
+ navigate.to(TaskTypes.TASKS_OVERVIEW);
1536
+ },
1537
+ handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW)
1538
+ }
1539
+ ) }),
1540
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TAX_REPORTING], children: /* @__PURE__ */ jsx(TaxReportingDropin$1, { handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW) }) }),
1541
+ /* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.ACQUIRING_BUSINESS_LINE], children: /* @__PURE__ */ jsx(RootBusinessLinesPage$1, { handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW) }) }),
1542
+ /* @__PURE__ */ jsx(Route, { path: "/", children: /* @__PURE__ */ jsx(DefaultRouteRedirect, { legalEntity, children: /* @__PURE__ */ jsx(TaskList, { onNavigateToTask, singpassComponent: singpassBanner }) }) }),
1543
+ /* @__PURE__ */ jsx(Route, { children: /* @__PURE__ */ jsx(DefaultRouteRedirect, { legalEntity }) })
1544
+ ] });
1545
+ }
1546
+ const useCurrentTask = () => {
1547
+ const { parser } = useRouter();
1548
+ const [location] = useLocation();
1549
+ for (const [taskType, routePath] of Object.entries(ROUTE_PATHS)) {
1550
+ const [match] = matchRoute(parser, routePath, location);
1551
+ if (match) return taskType;
1552
+ }
1553
+ return void 0;
1554
+ };
1555
+ function isIn$1(values, x) {
1556
+ return values.includes(x);
1557
+ }
1558
+ const PAGES_WITH_POLLING$1 = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
1559
+ const logger$1 = createLogger();
1560
+ function URLRouterDropinComposer(props) {
1561
+ const { parser } = useRouter();
1562
+ const basePath = useMemo(() => detectBasePath(parser), [parser]);
1563
+ return /* @__PURE__ */ jsx(Router, { base: basePath, children: /* @__PURE__ */ jsx(WouterDropinComposerInner, { ...props }) });
1564
+ }
1565
+ const MEMORY_ROUTER_SESSION_KEY = "ho-memory-router-path";
1566
+ const MEMORY_ROUTER_LE_KEY = "ho-memory-router-le";
1567
+ function MemoryRouterDropinComposer({ legalEntityResponse, ...rest }) {
1568
+ const leId = legalEntityResponse.id;
1569
+ const memoryRouter = useMemo(() => {
1570
+ const previousLeId = sessionStorage.getItem(MEMORY_ROUTER_LE_KEY);
1571
+ if (previousLeId !== leId) {
1572
+ sessionStorage.removeItem(MEMORY_ROUTER_SESSION_KEY);
1573
+ sessionStorage.setItem(MEMORY_ROUTER_LE_KEY, leId);
1574
+ }
1575
+ const savedPath = sessionStorage.getItem(MEMORY_ROUTER_SESSION_KEY) ?? "/";
1576
+ return memoryLocation({ path: savedPath, record: true });
1577
+ }, [leId]);
1578
+ const handle = useMemo(
1579
+ () => ({ navigate: memoryRouter.navigate, history: memoryRouter.history }),
1580
+ [memoryRouter]
1581
+ );
1582
+ return /* @__PURE__ */ jsx(Router, { hook: memoryRouter.hook, children: /* @__PURE__ */ jsxs(MemoryRouterContext.Provider, { value: handle, children: [
1583
+ /* @__PURE__ */ jsx(MemoryRouterPathSync, {}),
1584
+ /* @__PURE__ */ jsx(WouterDropinComposerInner, { legalEntityResponse, ...rest })
1585
+ ] }) });
1586
+ }
1587
+ const HISTORY_STATE_KEY = "kycMemoryPath";
1588
+ function MemoryRouterPathSync() {
1589
+ const [location] = useLocation();
1590
+ const memoryRouter = useMemoryRouter();
1591
+ const isPopstateNav = useRef(false);
1592
+ useEffect(() => {
1593
+ sessionStorage.setItem(MEMORY_ROUTER_SESSION_KEY, location);
1594
+ if (isPopstateNav.current) {
1595
+ isPopstateNav.current = false;
1596
+ return;
1597
+ }
1598
+ const currentState = window.history.state;
1599
+ if (currentState?.[HISTORY_STATE_KEY] === location) return;
1600
+ window.history.pushState({ [HISTORY_STATE_KEY]: location }, "");
1601
+ }, [location]);
1602
+ useEffect(() => {
1603
+ if (!memoryRouter) return;
1604
+ const onPopState = (event) => {
1605
+ const path = event.state?.[HISTORY_STATE_KEY];
1606
+ if (path != null) {
1607
+ isPopstateNav.current = true;
1608
+ memoryRouter.navigate(path, { replace: true });
1609
+ }
1610
+ };
1611
+ window.addEventListener("popstate", onPopState);
1612
+ return () => window.removeEventListener("popstate", onPopState);
1613
+ }, [memoryRouter]);
1614
+ useEffect(() => {
1615
+ if (!window.history.state?.[HISTORY_STATE_KEY]) {
1616
+ window.history.replaceState({ [HISTORY_STATE_KEY]: location }, "");
1617
+ }
1618
+ }, []);
1619
+ return null;
1620
+ }
1621
+ function WouterDropinComposerInner({
1622
+ legalEntityResponse,
1623
+ onSubmit,
1624
+ onNavigate = noop,
1625
+ openBankingPartnerConfigId
1626
+ }) {
1627
+ const { accountHolder, setAccountHolder } = useAccountHolder();
1628
+ const { setCanSeeEntitySelection } = useCanSeeEntitySelection(legalEntityResponse.id);
1629
+ const userEvents = useAnalyticsContext();
1630
+ const { experiments } = useExperimentsContext();
1631
+ const navigate = useNavigate();
1632
+ const currentTask = useCurrentTask();
1633
+ const { setHasSeenSingpassSelection } = useHasSeenSingpassSelection({
1634
+ legalEntityId: legalEntityResponse.id
1635
+ });
1636
+ const { setHasSeenIntroduction } = useHasSeenIntroduction({
1637
+ legalEntityId: legalEntityResponse.id
1638
+ });
1639
+ const {
1640
+ rootLegalEntity: rootLegalEntitySignal,
1641
+ rootLegalEntityCountry: rootLegalEntityCountrySignal,
1642
+ taskTypes: taskTypesSignal,
1643
+ setRootLegalEntity,
1644
+ setTaskTypes,
1645
+ setAccountHolder: setAccountHolderInGlobalStore
1646
+ } = useGlobalStore();
1647
+ const rootLegalEntity = rootLegalEntitySignal.value;
1648
+ const rootLegalEntityCountry = rootLegalEntityCountrySignal.value;
1649
+ const taskTypes = taskTypesSignal.value;
1650
+ const { data: rawTaskTypes, isLoading: isLoadingConfiguration } = useTaskTypes();
1651
+ const { isSettingEnabled } = useSettingsContext();
1652
+ useEffect(() => {
1653
+ if (!rawTaskTypes) {
1654
+ return;
1655
+ }
1656
+ let filteredTasks = rawTaskTypes;
1657
+ if (!isSettingEnabled(SettingNames.AllowBusinessLines)) {
1658
+ filteredTasks = rawTaskTypes?.filter((task) => task !== TaskTypes.ACQUIRING_BUSINESS_LINE);
1659
+ }
1660
+ setTaskTypes(filteredTasks);
1661
+ }, [rawTaskTypes, setTaskTypes]);
1662
+ const { data: legalEntityData, refetch: refetchLegalEntity } = useLegalEntity(
1663
+ legalEntityResponse.id,
1664
+ {
1665
+ refetchInterval: (query) => {
1666
+ const legalEntityData2 = query.state.data;
1667
+ if (legalEntityData2) {
1668
+ return !currentTask || !isIn$1(PAGES_WITH_POLLING$1, currentTask) || hasAllCapabilitiesResolved(legalEntityData2) || hasRejectedCapabilities(legalEntityData2) ? false : 3e3;
1669
+ }
1670
+ return 3e3;
1671
+ }
1672
+ }
1673
+ );
1674
+ useEffect(() => {
1675
+ if (legalEntityData && !objectsDeepEqual(legalEntityData, rootLegalEntity)) {
1676
+ setRootLegalEntity(legalEntityData);
1677
+ }
1678
+ }, [legalEntityData]);
1679
+ const {
1680
+ isEligibleForSingpass,
1681
+ state: singpassLoginState,
1682
+ handleInitiateSingpassMyInfoLogin,
1683
+ handleSingpassMyInfoLoginSuccess,
1684
+ handleSingpassMyInfoLoginFailure,
1685
+ handleSingpassMyInfoLoginReset
1686
+ } = useSingpassMyInfoLogin({
1687
+ legalEntity: rootLegalEntity,
1688
+ accountHolder
1689
+ });
1690
+ const singpassTabRef = useRef(null);
1691
+ const { data: trust, refetch: refetchTrust } = useAssociatedLegalEntity(
1692
+ rootLegalEntity,
1693
+ LegalEntityTypes.TRUST
1694
+ );
1695
+ const { data: unincorporatedPartnership, refetch: refetchUnincorporatedPartnership } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityTypes.UNINCORPORATED_PARTNERSHIP);
1696
+ const { data: soleProp } = useAssociatedLegalEntity(
1697
+ rootLegalEntity,
1698
+ LegalEntityTypes.SOLE_PROPRIETORSHIP
1699
+ );
1700
+ const associatedLegalRepresentative = useAssociatedLegalRepresentative(rootLegalEntity);
1701
+ const [targetLegalEntityType, setTargetLegalEntityType] = useState();
1702
+ const {
1703
+ trustMember,
1704
+ onNavigateToTrust,
1705
+ onNavigateToTrustMemberRoleAndType,
1706
+ onNavigateToTrustMemberEditDetails
1707
+ } = useTrustMemberNavigation({
1708
+ trust,
1709
+ navigateTo: navigate.to
1710
+ });
1711
+ const {
1712
+ onNavigateToMember,
1713
+ activeMember: unincorporatedPartnershipMember,
1714
+ setActiveMember
1715
+ } = useUnincorporatedPartnershipNavigation({
1716
+ navigateTo: navigate.to
1717
+ });
1718
+ const handleSingpassSelectionNextClick = async (method) => {
1719
+ if (method === "singpass") {
1720
+ try {
1721
+ const authUrl = await handleInitiateSingpassMyInfoLogin();
1722
+ if (!authUrl) {
1723
+ throw new Error("OpenId authentication url not");
1724
+ }
1725
+ setHasSeenSingpassSelection(true);
1726
+ singpassTabRef.current = window.open(authUrl, "_blank");
1727
+ singpassTabRef.current?.focus();
1728
+ } catch (e) {
1729
+ logger$1.error(e);
1730
+ if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
1731
+ }
1732
+ }
1733
+ if (method === "manual") {
1734
+ setHasSeenSingpassSelection(true);
1735
+ }
1736
+ navigate.to(TaskTypes.TASKS_OVERVIEW);
1737
+ };
1738
+ useEffect(() => {
1739
+ userEvents.addJourneyEvent("Landed on page", { actionType: "start" });
1740
+ }, []);
1741
+ useEffect(() => {
1742
+ userEvents.updateBaseTrackingPayload({ task: currentTask });
1743
+ }, [currentTask]);
1744
+ useEffect(() => {
1745
+ if (currentTask) onNavigate(currentTask);
1746
+ }, [currentTask]);
1747
+ useEffect(() => {
1748
+ if (hasRejectedCapabilities(rootLegalEntity)) {
1749
+ navigate.replace(TaskTypes.CAPABILITY_REJECTED);
1750
+ }
1751
+ }, [rootLegalEntity]);
1752
+ useEffect(() => {
1753
+ const newAccountHolder = getDefaultAccountHolderType(rootLegalEntity, false, accountHolder);
1754
+ if (newAccountHolder !== accountHolder) setAccountHolder(newAccountHolder);
1755
+ }, [accountHolder, rootLegalEntity]);
1756
+ useEffect(() => setAccountHolderInGlobalStore(accountHolder), [accountHolder]);
1757
+ const { rootLegalEntityId } = useApiContext();
1758
+ rootLegalEntityId.value = rootLegalEntity.id;
1759
+ useEffect(() => {
1760
+ const enabledExperimentNames = Object.entries(experiments).filter(([key, value]) => key.includes("_") && value).map(([key]) => key);
1761
+ if (!enabledExperimentNames.length) return;
1762
+ enabledExperimentNames.forEach((experiment) => {
1763
+ const [name, variant] = experiment.split("_");
1764
+ userEvents.trackExperiment({ name, variant });
1765
+ });
1766
+ }, [experiments]);
1767
+ const singpassBanner = isEligibleForSingpass ? /* @__PURE__ */ jsx(
1768
+ SingpassBanner,
1769
+ {
1770
+ ...singpassLoginState,
1771
+ onAlertClose: () => {
1772
+ handleSingpassMyInfoLoginReset();
1773
+ },
1774
+ onClick: async () => {
1775
+ try {
1776
+ const authUrl = await handleInitiateSingpassMyInfoLogin();
1777
+ singpassTabRef.current = window.open(authUrl);
1778
+ singpassTabRef.current?.focus();
1779
+ } catch (e) {
1780
+ logger$1.error(e);
1781
+ if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
1782
+ }
1783
+ },
1784
+ onMessage: async ({ data: { isSuccessful } }) => {
1785
+ if (isSuccessful) {
1786
+ handleSingpassMyInfoLoginSuccess();
1787
+ await refetchLegalEntity();
1788
+ singpassTabRef.current?.close();
1789
+ } else {
1790
+ handleSingpassMyInfoLoginFailure(
1791
+ legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL ? "weCouldntConnectToMyinfo" : "weCouldntConnectToMyinfoBusiness"
1792
+ );
1793
+ }
1794
+ },
1795
+ legalEntityType: legalEntityResponse?.type
1796
+ }
1797
+ ) : void 0;
1798
+ if (isLoadingConfiguration) {
1799
+ return /* @__PURE__ */ jsx(Skeleton, {});
1800
+ }
1801
+ return /* @__PURE__ */ jsx(
1802
+ OnboardingRouter,
1803
+ {
1804
+ legalEntity: rootLegalEntity,
1805
+ rootLegalEntityCountry,
1806
+ trust,
1807
+ unincorporatedPartnership,
1808
+ soleProp,
1809
+ associatedLegalRepresentative,
1810
+ refetchLegalEntity,
1811
+ refetchTrust,
1812
+ refetchUnincorporatedPartnership,
1813
+ onExternalSubmit: onSubmit,
1814
+ accountHolder,
1815
+ setAccountHolder,
1816
+ setCanSeeEntitySelection,
1817
+ setHasSeenIntroduction,
1818
+ taskTypes,
1819
+ targetLegalEntityType,
1820
+ setTargetLegalEntityType,
1821
+ trustMember,
1822
+ onNavigateToTrust,
1823
+ onNavigateToTrustMemberRoleAndType,
1824
+ onNavigateToTrustMemberEditDetails,
1825
+ unincorporatedPartnershipMember,
1826
+ setActiveMember,
1827
+ onNavigateToMember,
1828
+ singpassBanner,
1829
+ handleSingpassSelectionNextClick,
1830
+ openBankingPartnerConfigId
1831
+ }
1832
+ );
1833
+ }
1834
+ const useNavigation = ({ legalEntity, onNavigate }) => {
1835
+ const { isSettingEnabled } = useSettingsContext();
1836
+ const userEvents = useAnalyticsContext();
1837
+ const showServiceAgreementsFirst = isSettingEnabled(SettingNames.ShowServiceAgreementsFirst);
1838
+ const showBusinessFinancingFirst = isSettingEnabled(SettingNames.ShowBusinessFinancingFirst);
1839
+ const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
1840
+ const showIntroduction = useShouldShowIntroduction({ legalEntity });
1841
+ const { hasSeenSingpassSelection } = useHasSeenSingpassSelection({
1842
+ legalEntityId: legalEntity.id
1843
+ });
1844
+ const { accountHolder } = useAccountHolder();
1845
+ const { canSeeEntitySelection } = useCanSeeEntitySelection(legalEntity.id);
1846
+ const { isEligibleForSingpass } = useSingpassMyInfoLogin({
1847
+ legalEntity,
1848
+ accountHolder
1849
+ });
1850
+ const shouldShowSingpassSelection = isEligibleForSingpass && !hasSeenSingpassSelection;
1851
+ const [taskHistory, setTaskHistory] = useState(["default"]);
1852
+ const actualTasks = taskHistory.filter((task) => task !== "default");
1853
+ const handleNavigation = useCallback(
1854
+ (task) => {
1855
+ userEvents.updateBaseTrackingPayload({ task });
1856
+ onNavigate?.(task);
1857
+ },
1858
+ [onNavigate]
1859
+ );
1860
+ const navigateTo = useCallback(
1861
+ (task, deletePreviousHistory = false) => {
1862
+ const pushNewTask = () => setTaskHistory((taskHistory2) => deletePreviousHistory ? [task] : [...taskHistory2, task]);
1863
+ if (task === "default") {
1864
+ setTimeout(pushNewTask);
1865
+ } else {
1866
+ pushNewTask();
1867
+ handleNavigation(task);
1868
+ }
1869
+ },
1870
+ [handleNavigation]
1871
+ );
1872
+ const navigateBack = useCallback(
1873
+ (stepCount = 1) => {
1874
+ if (taskHistory.length <= 1) return;
1875
+ const prevTask = taskHistory[taskHistory.length - (stepCount + 1)];
1876
+ if (prevTask === "default") {
1877
+ throw Error("Cannot navigate back to 'default' task");
1878
+ }
1879
+ if (prevTask === TaskTypes.TASKS_OVERVIEW) {
1880
+ setTaskHistory([TaskTypes.TASKS_OVERVIEW]);
1881
+ handleNavigation?.(TaskTypes.TASKS_OVERVIEW);
1882
+ return;
1883
+ }
1884
+ setTaskHistory(taskHistory.slice(0, -1 * stepCount));
1885
+ handleNavigation?.(prevTask);
1886
+ userEvents.updateBaseTrackingPayload({ task: prevTask });
1887
+ },
1888
+ [taskHistory, handleNavigation]
1889
+ );
1890
+ useEffect(() => {
1891
+ if (!window.history.state) window.history.pushState({}, "");
1892
+ const handleBrowserBackButton = () => {
1893
+ if (window.history.state === null) window.history.pushState({}, "");
1894
+ navigateTo(TaskTypes.TASKS_OVERVIEW);
1895
+ };
1896
+ window.addEventListener("popstate", handleBrowserBackButton);
1897
+ return () => {
1898
+ window.removeEventListener("popstate", handleBrowserBackButton);
1899
+ };
1900
+ }, [navigateTo]);
1901
+ useEffect(() => {
1902
+ const pushedTask = taskHistory[taskHistory.length - 1];
1903
+ if (pushedTask === "default") {
1904
+ const defaultTask = getDefaultTask({
1905
+ legalEntity,
1906
+ canSeeEntitySelection,
1907
+ showIntroduction,
1908
+ canChangeEntityType,
1909
+ shouldShowSingpassSelection,
1910
+ showServiceAgreementsFirst,
1911
+ showBusinessFinancingFirst
1912
+ });
1913
+ setTaskHistory([...taskHistory.slice(0, taskHistory.length - 1), defaultTask]);
1914
+ }
1915
+ }, [
1916
+ legalEntity,
1917
+ accountHolder,
1918
+ showIntroduction,
1919
+ canChangeEntityType,
1920
+ shouldShowSingpassSelection,
1921
+ showServiceAgreementsFirst,
1922
+ taskHistory,
1923
+ showBusinessFinancingFirst
1924
+ ]);
1925
+ return {
1926
+ currentTask: actualTasks[actualTasks.length - 1],
1927
+ previousTask: actualTasks[actualTasks.length - 2],
1928
+ navigateBack,
1929
+ navigateTo
1930
+ };
1931
+ };
1932
+ const getDefaultTask = ({
1933
+ legalEntity,
1934
+ canSeeEntitySelection,
1935
+ canChangeEntityType,
1936
+ showIntroduction,
1937
+ shouldShowSingpassSelection,
1938
+ showServiceAgreementsFirst,
1939
+ showBusinessFinancingFirst
1940
+ }) => {
1941
+ const hasLegalEntityProgressedBeyondEntitySelection = hasProgressedBeyondEntitySelection(legalEntity);
1942
+ if (showServiceAgreementsFirst) {
1943
+ return TaskTypes.SERVICE_AGREEMENT;
1944
+ }
1945
+ if (showBusinessFinancingFirst) {
1946
+ return TaskTypes.BUSINESS_FINANCING;
1947
+ }
1948
+ if (canChangeEntityType && canSeeEntitySelection && !hasLegalEntityProgressedBeyondEntitySelection)
1949
+ return TaskTypes.BUSINESS_TYPE_SELECTION;
1950
+ if (showIntroduction) return TaskTypes.INTRODUCTION;
1951
+ if (shouldShowSingpassSelection) return TaskTypes.SINGPASS_SELECTION;
1952
+ return TaskTypes.TASKS_OVERVIEW;
1953
+ };
1954
+ const hasProgressedBeyondEntitySelection = (legalEntity) => {
1955
+ const hasOwnEntityAssocation = legalEntity.entityAssociations?.some(
1956
+ (ea) => ea.associatorId === legalEntity.id
1957
+ );
1958
+ const hasOrganizationType = legalEntity.organization?.type;
1959
+ return hasOwnEntityAssocation || !!hasOrganizationType;
1960
+ };
1961
+ const Introduction = lazy(
1962
+ async () => (await import("./Introduction-BRWdnVv5.js")).Introduction
1963
+ );
1964
+ const BusinessTypeSelectionPage = lazy(
1965
+ async () => (await import("./BusinessTypeSelectionPage-gsT7g7u8.js")).BusinessTypeSelectionPage
1966
+ );
1967
+ const SingpassSelection = lazy(
1968
+ async () => (await import("./SingpassSelection-B3ozCH9I.js")).SingpassSelection
1969
+ );
1970
+ const AccountSetupRejected = lazy(
1971
+ async () => (await import("./AccountSetupRejected-f8rcBzZj.js")).AccountSetupRejected
1972
+ );
1973
+ const DecisionMakers = lazy(
1974
+ async () => (await import("./DecisionMakers-CJDodZSl.js")).DecisionMakers
1975
+ );
1976
+ const CustomerSupport = lazy(
1977
+ async () => (await import("./CustomerSupport-UenL9SqQ.js")).CustomerSupport
1978
+ );
1979
+ const Review = lazy(async () => (await import("./Review-B2NCN4h_.js")).Review);
1980
+ const SignPCIComponent = lazy(
1981
+ async () => (await import("./SignPCIComponent-C2YjBxQM.js")).SignPCIComponent
1982
+ );
1983
+ const AcceptTermsOfService = lazy(
1984
+ async () => (await import("./AcceptTermsOfServiceComponent-BFqDontt.js")).AcceptTermsOfServiceComponent
1985
+ );
1986
+ const TaxReportingDropin = lazy(
1987
+ async () => (await import("./TaxReportingDropin-BqvAQH2c.js")).TaxReportingDropin
1988
+ );
1989
+ const PayoutDetailsPage = lazy(
1990
+ async () => (await import("./PayoutDetailsDropin-C2pNMAZS.js").then((n) => n.a)).PayoutDetailsPage
1991
+ );
1992
+ const RootBusinessDetailsPage = lazy(
1993
+ async () => (await import("./RootBusinessDetailsPage-hr5fLCIH.js")).RootBusinessDetailsPage
1994
+ );
1995
+ const RootBusinessLinesPage = lazy(
1996
+ async () => (await import("./RootBusinessLinesPage-DSna9haW.js")).RootBusinessLinesPage
1997
+ );
1998
+ const SoleProprietorshipPage = lazy(
1999
+ async () => (await import("./SoleProprietorshipPage-DIzzhgjr.js")).SoleProprietorshipPage
2000
+ );
2001
+ const TrustMemberCompanyPage = lazy(
2002
+ async () => (await import("./TrustMemberCompanyPage-Z2EuqPEI.js")).TrustMemberCompanyPage
2003
+ );
2004
+ const TrustMemberIndividualPage = lazy(
2005
+ async () => (await import("./TrustMemberIndividualPage-DmNp3D89.js")).TrustMemberIndividualPage
2006
+ );
2007
+ const TrustMemberRoleAndTypePage = lazy(
2008
+ async () => (await import("./TrustMemberRoleAndTypePage-BEOtdItr.js")).TrustMemberRoleAndTypePage
2009
+ );
2010
+ const TrustMembersOverview = lazy(
2011
+ async () => (await import("./TrustMembersOverview-GybHMIEU.js")).TrustMembersOverview
2012
+ );
2013
+ const UnincorporatedPartnershipMemberCompanyPage = lazy(
2014
+ async () => (await import("./UnincorporatedPartnershipMemberCompanyPage-Buez4OHl.js")).UnincorporatedPartnershipMemberCompanyPage
2015
+ );
2016
+ const UnincorporatedPartnershipIndividualPage = lazy(
2017
+ async () => (await import("./UnincorporatedPartnershipIndividualPage-BCYxSTlv.js")).UnincorporatedPartnershipIndividualPage
2018
+ );
2019
+ const UnincorporatedPartnershipMemberRoleAndTypePage = lazy(
2020
+ async () => (await import("./UnincorporatedPartnershipMemberRoleAndTypePage-Cfpe0BuU.js")).UnincorporatedPartnershipMemberRoleAndTypePage
2021
+ );
2022
+ const UnincorporatedPartnershipMembersOverview = lazy(
2023
+ async () => (await import("./UnincorporatedPartnershipMembersOverview-B3Vi088r.js")).UnincorporatedPartnershipMembersOverview
2024
+ );
2025
+ const BusinessFinancingPage = lazy(
2026
+ async () => (await import("./BusinessFinancingPage-Bpu78Ynn.js")).BusinessFinancingPage
2027
+ );
2028
+ const TrustDetailsPage = lazy(
2029
+ async () => (await import("./TrustDetailsPage-YROGiuFJ.js")).TrustDetailsPage
2030
+ );
2031
+ const SourceOfFundsPage = lazy(
2032
+ async () => (await import("./SourceOfFundsPage-C3kXyE7G.js")).SourceOfFundsPage
2033
+ );
2034
+ const RootIndividualDetailsPage = lazy(
2035
+ async () => (await import("./RootIndividualDetailsPage-BItguz9n.js")).RootIndividualDetailsPage
2036
+ );
2037
+ const LegalRepresentativeDetailsPage = lazy(
2038
+ async () => (await import("./LegalRepresentativeDetailsPage--yY_D66i.js")).LegalRepresentativeDetailsPage
2039
+ );
2040
+ const DecisionMakerDetailsPage = lazy(
2041
+ async () => (await import("./DecisionMakerDetailsPage-Xwe1qYtH.js")).DecisionMakerDetailsPage
2042
+ );
2043
+ function isIn(values, x) {
2044
+ return values.includes(x);
2045
+ }
2046
+ const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
2047
+ const logger = createLogger();
2048
+ function DropinComposer(props) {
2049
+ const { isExperimentEnabled } = useExperimentsContext();
2050
+ const useURLRouter = isExperimentEnabled(ExperimentNames.EnableURLRouterForHostedOnboarding);
2051
+ const useMemoryRouter2 = isExperimentEnabled(
2052
+ ExperimentNames.EnableMemoryRouterForHostedOnboarding
2053
+ );
2054
+ if (useMemoryRouter2) {
2055
+ return /* @__PURE__ */ jsx(MemoryRouterDropinComposer, { ...props });
2056
+ }
2057
+ if (useURLRouter) {
2058
+ return /* @__PURE__ */ jsx(URLRouterDropinComposer, { ...props });
2059
+ }
2060
+ return /* @__PURE__ */ jsx(LegacyDropinComposer, { ...props });
2061
+ }
2062
+ function LegacyDropinComposer({
2063
+ legalEntityResponse,
2064
+ onSubmit,
2065
+ onNavigate = noop,
2066
+ openBankingPartnerConfigId
2067
+ }) {
2068
+ const { accountHolder, setAccountHolder } = useAccountHolder();
2069
+ const { setCanSeeEntitySelection } = useCanSeeEntitySelection(legalEntityResponse.id);
2070
+ const userEvents = useAnalyticsContext();
2071
+ const { experiments } = useExperimentsContext();
2072
+ const { setHasSeenSingpassSelection } = useHasSeenSingpassSelection({
2073
+ legalEntityId: legalEntityResponse.id
2074
+ });
2075
+ const { setHasSeenIntroduction } = useHasSeenIntroduction({
2076
+ legalEntityId: legalEntityResponse.id
2077
+ });
2078
+ const { currentTask, previousTask, navigateTo, navigateBack } = useNavigation({
2079
+ legalEntity: legalEntityResponse,
2080
+ onNavigate
2081
+ });
2082
+ const {
2083
+ rootLegalEntity: rootLegalEntitySignal,
2084
+ rootLegalEntityCountry: rootLegalEntityCountrySignal,
2085
+ taskTypes: taskTypesSignal,
2086
+ setRootLegalEntity,
2087
+ setTaskTypes,
2088
+ setAccountHolder: setAccountHolderInGlobalStore
2089
+ } = useGlobalStore();
2090
+ const rootLegalEntity = rootLegalEntitySignal.value;
2091
+ const rootLegalEntityCountry = rootLegalEntityCountrySignal.value;
2092
+ const taskTypes = taskTypesSignal.value;
2093
+ const { data: rawTaskTypes, isLoading: isLoadingConfiguration } = useTaskTypes();
2094
+ const { isSettingEnabled } = useSettingsContext();
2095
+ useEffect(() => {
2096
+ if (!rawTaskTypes) {
2097
+ return;
2098
+ }
2099
+ let filteredTasks = rawTaskTypes;
2100
+ if (!isSettingEnabled(SettingNames.AllowBusinessLines)) {
2101
+ filteredTasks = rawTaskTypes?.filter((task) => task !== TaskTypes.ACQUIRING_BUSINESS_LINE);
2102
+ }
2103
+ setTaskTypes(filteredTasks);
2104
+ }, [rawTaskTypes, setTaskTypes]);
2105
+ const { data: legalEntityData, refetch: refetchLegalEntity } = useLegalEntity(
2106
+ legalEntityResponse.id,
2107
+ {
2108
+ refetchInterval: (query) => {
2109
+ const legalEntityData2 = query.state.data;
2110
+ if (legalEntityData2) {
2111
+ return !currentTask || !isIn(PAGES_WITH_POLLING, currentTask) || hasAllCapabilitiesResolved(legalEntityData2) || hasRejectedCapabilities(legalEntityData2) ? false : 3e3;
2112
+ }
2113
+ return 3e3;
2114
+ }
2115
+ }
2116
+ );
2117
+ useEffect(() => {
2118
+ if (legalEntityData && !objectsDeepEqual(legalEntityData, rootLegalEntity)) {
2119
+ setRootLegalEntity(legalEntityData);
2120
+ }
2121
+ }, [legalEntityData]);
2122
+ const [currentTransferInstrumentId, setCurrentTransferInstrumentId] = useState();
2123
+ const {
2124
+ isEligibleForSingpass,
2125
+ state: singpassLoginState,
2126
+ handleInitiateSingpassMyInfoLogin,
2127
+ handleSingpassMyInfoLoginSuccess,
2128
+ handleSingpassMyInfoLoginFailure,
2129
+ handleSingpassMyInfoLoginReset
2130
+ } = useSingpassMyInfoLogin({
2131
+ legalEntity: rootLegalEntity,
2132
+ accountHolder
2133
+ });
2134
+ const singpassTabRef = useRef(null);
2135
+ const { data: trust, refetch: refetchTrust } = useAssociatedLegalEntity(
2136
+ rootLegalEntity,
2137
+ LegalEntityTypes.TRUST
2138
+ );
2139
+ const { data: unincorporatedPartnership, refetch: refetchUnincorporatedPartnership } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityTypes.UNINCORPORATED_PARTNERSHIP);
2140
+ const { data: soleProp } = useAssociatedLegalEntity(
2141
+ rootLegalEntity,
2142
+ LegalEntityTypes.SOLE_PROPRIETORSHIP
2143
+ );
2144
+ const [parentId, setParentId] = useState();
2145
+ const [currentDecisionMakerId, setCurrentDecisionMakerId] = useState();
2146
+ const { data: currentDecisionMaker } = useLegalEntity(currentDecisionMakerId ?? skipToken);
2147
+ const associatedLegalRepresentative = useAssociatedLegalRepresentative(rootLegalEntity);
2148
+ const [targetLegalEntityType, setTargetLegalEntityType] = useState();
2149
+ const legacyNavigateTo = (task, _params) => navigateTo(task);
2150
+ const {
2151
+ trustMember,
2152
+ trustMemberId,
2153
+ onNavigateToTrust,
2154
+ onNavigateToTrustMemberRoleAndType,
2155
+ onNavigateToTrustMemberEditDetails
2156
+ } = useTrustMemberNavigation({
2157
+ trust,
2158
+ navigateTo: legacyNavigateTo
2159
+ });
2160
+ const {
2161
+ onNavigateToMember,
2162
+ activeMember: unincorporatedPartnershipMember,
2163
+ setActiveMember
2164
+ } = useUnincorporatedPartnershipNavigation({
2165
+ navigateTo: legacyNavigateTo
2166
+ });
2167
+ const handleSingpassSelectionNextClick = async (method) => {
2168
+ if (method === "singpass") {
2169
+ try {
2170
+ const authUrl = await handleInitiateSingpassMyInfoLogin();
2171
+ if (!authUrl) {
2172
+ throw new Error("OpenId authentication url not");
2173
+ }
2174
+ setHasSeenSingpassSelection(true);
2175
+ singpassTabRef.current = window.open(authUrl, "_blank");
2176
+ singpassTabRef.current?.focus();
2177
+ } catch (e) {
2178
+ logger.error(e);
2179
+ if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
2180
+ }
2181
+ }
2182
+ if (method === "manual") {
2183
+ setHasSeenSingpassSelection(true);
2184
+ }
2185
+ navigateTo(TaskTypes.TASKS_OVERVIEW);
2186
+ };
2187
+ const onNavigateToDecisionMakerIndividual = async (task, id, parentId2) => {
2188
+ setParentId(parentId2 ?? rootLegalEntity.id);
2189
+ setCurrentDecisionMakerId(id);
2190
+ navigateTo(task);
2191
+ };
2192
+ const onNavigateToPayinOrPayout = async (id, task = TaskTypes.PAYOUT) => {
2193
+ if (id) {
2194
+ try {
2195
+ setCurrentTransferInstrumentId(id);
2196
+ } finally {
2197
+ navigateTo(task);
2198
+ }
2199
+ } else {
2200
+ setCurrentTransferInstrumentId(void 0);
2201
+ navigateTo(task);
2202
+ }
2203
+ };
2204
+ const onNavigateToTask = async (task, id) => {
2205
+ switch (task) {
2206
+ case TaskTypes.PAYOUT:
2207
+ await onNavigateToPayinOrPayout(id, TaskTypes.PAYOUT);
2208
+ break;
2209
+ case TaskTypes.PAYIN:
2210
+ await onNavigateToPayinOrPayout(id, TaskTypes.PAYIN);
2211
+ break;
2212
+ case TaskTypes.TRUST: {
2213
+ await onNavigateToTrust();
2214
+ break;
2215
+ }
2216
+ case TaskTypes.TRUST_MEMBER_OVERVIEW: {
2217
+ await onNavigateToTrust(TaskTypes.TRUST_MEMBER_OVERVIEW);
2218
+ break;
2219
+ }
2220
+ case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
2221
+ await navigateTo(TaskTypes.SOLE_PROPRIETOR_COMPANY);
2222
+ break;
2223
+ }
2224
+ default:
2225
+ navigateTo(task);
2226
+ }
2227
+ };
2228
+ const handleOnSubmit = async (data, backStepCount) => {
2229
+ onSubmit?.(data);
2230
+ await refetchLegalEntity();
2231
+ navigateBack(backStepCount);
2232
+ };
2233
+ useEffect(() => {
2234
+ userEvents.addJourneyEvent("Landed on page", { actionType: "start" });
2235
+ }, []);
2236
+ useEffect(() => {
2237
+ userEvents.updateBaseTrackingPayload({ task: currentTask });
2238
+ }, [currentTask]);
2239
+ useEffect(() => {
2240
+ if (hasRejectedCapabilities(rootLegalEntity)) {
2241
+ navigateTo(TaskTypes.CAPABILITY_REJECTED, true);
2242
+ }
2243
+ }, [rootLegalEntity]);
2244
+ useEffect(() => {
2245
+ const newAccountHolder = getDefaultAccountHolderType(rootLegalEntity, false, accountHolder);
2246
+ if (newAccountHolder !== accountHolder) setAccountHolder(newAccountHolder);
2247
+ }, [accountHolder, rootLegalEntity]);
2248
+ useEffect(() => setAccountHolderInGlobalStore(accountHolder), [accountHolder]);
2249
+ const { rootLegalEntityId } = useApiContext();
2250
+ rootLegalEntityId.value = rootLegalEntity.id;
2251
+ useEffect(() => {
2252
+ const enabledExperimentNames = Object.entries(experiments).filter(([key, value]) => key.includes("_") && value).map(([key]) => key);
2253
+ if (!enabledExperimentNames.length) return;
2254
+ enabledExperimentNames.forEach((experiment) => {
2255
+ const [name, variant] = experiment.split("_");
2256
+ userEvents.trackExperiment({ name, variant });
2257
+ });
2258
+ }, [experiments]);
2259
+ const singpassBanner = isEligibleForSingpass ? /* @__PURE__ */ jsx(
2260
+ SingpassBanner,
2261
+ {
2262
+ ...singpassLoginState,
2263
+ onAlertClose: () => {
2264
+ handleSingpassMyInfoLoginReset();
2265
+ },
2266
+ onClick: async () => {
2267
+ try {
2268
+ const authUrl = await handleInitiateSingpassMyInfoLogin();
2269
+ singpassTabRef.current = window.open(authUrl);
2270
+ singpassTabRef.current?.focus();
2271
+ } catch (e) {
2272
+ logger.error(e);
2273
+ if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
2274
+ }
2275
+ },
2276
+ onMessage: async ({ data: { isSuccessful } }) => {
2277
+ if (isSuccessful) {
2278
+ handleSingpassMyInfoLoginSuccess();
2279
+ await refetchLegalEntity();
2280
+ singpassTabRef.current?.close();
2281
+ } else {
2282
+ handleSingpassMyInfoLoginFailure(
2283
+ legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL ? "weCouldntConnectToMyinfo" : "weCouldntConnectToMyinfoBusiness"
2284
+ );
2285
+ }
2286
+ },
2287
+ legalEntityType: legalEntityResponse?.type
2288
+ }
2289
+ ) : void 0;
2290
+ if (isLoadingConfiguration) {
2291
+ return /* @__PURE__ */ jsx(Skeleton, {});
2292
+ }
2293
+ switch (currentTask) {
2294
+ case TaskTypes.BUSINESS_TYPE_SELECTION:
2295
+ return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-display-flex adyen-kyc-u-justify-content-center", children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2296
+ BusinessTypeSelectionPage,
2297
+ {
2298
+ onComplete: async (newAccountHolder) => {
2299
+ setAccountHolder(newAccountHolder);
2300
+ setCanSeeEntitySelection(false);
2301
+ await refetchLegalEntity();
2302
+ navigateTo("default");
2303
+ },
2304
+ onBack: previousTask ? navigateBack : void 0
2305
+ }
2306
+ ) }) });
2307
+ case TaskTypes.SINGPASS_SELECTION:
2308
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2309
+ SingpassSelection,
2310
+ {
2311
+ handleNextClick: handleSingpassSelectionNextClick,
2312
+ accountHolder,
2313
+ legalEntityType: rootLegalEntity.type
2314
+ }
2315
+ ) });
2316
+ case TaskTypes.INTRODUCTION:
2317
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2318
+ Introduction,
2319
+ {
2320
+ onExitIntroduction: () => {
2321
+ setHasSeenIntroduction(true);
2322
+ navigateTo("default");
2323
+ },
2324
+ tasks: taskTypes
2325
+ }
2326
+ ) });
2327
+ case TaskTypes.CAPABILITY_REJECTED:
2328
+ return /* @__PURE__ */ jsxs(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: [
2329
+ /* @__PURE__ */ jsx(AccountSetupRejected, {}),
2330
+ ";"
2331
+ ] });
2332
+ case TaskTypes.TASKS_OVERVIEW:
2333
+ return /* @__PURE__ */ jsx(TaskList, { onNavigateToTask, singpassComponent: singpassBanner });
2334
+ case TaskTypes.DECISION_MAKER_OVERVIEW:
2335
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2336
+ DecisionMakers,
2337
+ {
2338
+ onNavigateToIndividual: (legalEntityId) => onNavigateToDecisionMakerIndividual(TaskTypes.DECISION_MAKER, legalEntityId),
2339
+ navigateBackToTaskList: navigateBack
2340
+ }
2341
+ ) });
2342
+ case TaskTypes.INDIVIDUAL:
2343
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2344
+ RootIndividualDetailsPage,
2345
+ {
2346
+ onSubmit: async (data) => {
2347
+ onSubmit?.(data);
2348
+ await refetchLegalEntity();
2349
+ navigateTo(TaskTypes.TASKS_OVERVIEW);
2350
+ setTargetLegalEntityType(void 0);
2351
+ },
2352
+ handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW),
2353
+ isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.INDIVIDUAL
2354
+ }
2355
+ ) });
2356
+ case TaskTypes.CUSTOMER_SUPPORT:
2357
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2358
+ CustomerSupport,
2359
+ {
2360
+ country: rootLegalEntityCountry,
2361
+ onSubmit: () => navigateTo(TaskTypes.TASKS_OVERVIEW)
2362
+ }
2363
+ ) });
2364
+ case TaskTypes.REVIEW:
2365
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(Review, { handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW) }) });
2366
+ case TaskTypes.DECISION_MAKER:
2367
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2368
+ DecisionMakerDetailsPage,
2369
+ {
2370
+ decisionMakerId: currentDecisionMaker?.id,
2371
+ parentCompanyId: parentId,
2372
+ onSubmit: async (data, scenario) => {
2373
+ onSubmit?.(data);
2374
+ await refetchLegalEntity();
2375
+ if (isBafinSignatoryFlow({
2376
+ taskType: TaskTypes.DECISION_MAKER,
2377
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2378
+ // @ts-ignore basicDetails will be there when it's IndividualOnfidoSchema
2379
+ data,
2380
+ scenarios: scenario
2381
+ })) {
2382
+ showIdNowModal.value = true;
2383
+ idNowPostSubmit.value = true;
2384
+ } else {
2385
+ navigateBack();
2386
+ }
2387
+ },
2388
+ handleHomeClick: navigateBack
2389
+ }
2390
+ ) });
2391
+ case TaskTypes.TRUST_MEMBER_COMPANY_OWNER:
2392
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2393
+ DecisionMakerDetailsPage,
2394
+ {
2395
+ taskType: TaskTypes.TRUST_MEMBER_COMPANY_OWNER,
2396
+ parentCompanyId: parentId,
2397
+ decisionMakerId: currentDecisionMakerId,
2398
+ onSubmit: async (data) => {
2399
+ await handleOnSubmit(data);
2400
+ await refetchTrust();
2401
+ },
2402
+ handleHomeClick: navigateBack
2403
+ }
2404
+ ) });
2405
+ case TaskTypes.TRUST_MEMBER_INDIVIDUAL:
2406
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2407
+ TrustMemberIndividualPage,
2408
+ {
2409
+ memberId: trustMemberId,
2410
+ trustId: trust.id,
2411
+ newMember: trustMember?.legalEntityId === isNewEntity ? trustMember : void 0,
2412
+ onSubmit: async (data) => {
2413
+ await handleOnSubmit(data, 2);
2414
+ await refetchTrust();
2415
+ },
2416
+ handleBackClick: navigateBack,
2417
+ handleHomeClick: () => navigateTo(TaskTypes.TRUST_MEMBER_OVERVIEW)
2418
+ }
2419
+ ) });
2420
+ case TaskTypes.TRUST_MEMBER_COMPANY:
2421
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2422
+ TrustMemberCompanyPage,
2423
+ {
2424
+ trustId: trust.id,
2425
+ trustMemberCompanyId: trustMemberId,
2426
+ newMember: trustMember?.legalEntityId === isNewEntity ? trustMember : void 0,
2427
+ onSubmit: async (data) => {
2428
+ await handleOnSubmit(data, 2);
2429
+ await refetchTrust();
2430
+ },
2431
+ handleHomeClick: navigateBack
2432
+ }
2433
+ ) });
2434
+ case TaskTypes.BUSINESS_DETAILS:
2435
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2436
+ RootBusinessDetailsPage,
2437
+ {
2438
+ onSubmit: async (data) => {
2439
+ onSubmit?.(data);
2440
+ await refetchLegalEntity();
2441
+ navigateTo(TaskTypes.TASKS_OVERVIEW);
2442
+ setTargetLegalEntityType(void 0);
2443
+ },
2444
+ handleHomeClick: navigateBack,
2445
+ isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
2446
+ }
2447
+ ) });
2448
+ case TaskTypes.PAYOUT:
2449
+ case TaskTypes.PAYIN:
2450
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2451
+ PayoutDetailsPage,
2452
+ {
2453
+ taskType: currentTask,
2454
+ transferInstrumentId: currentTransferInstrumentId,
2455
+ setTransferInstrumentId: setCurrentTransferInstrumentId,
2456
+ handleHomeClick: navigateBack,
2457
+ openBankingPartnerConfigId,
2458
+ onSubmit: handleOnSubmit
2459
+ }
2460
+ ) });
2461
+ case TaskTypes.TRUST:
2462
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2463
+ TrustDetailsPage,
2464
+ {
2465
+ taskType: TaskTypes.TRUST,
2466
+ trustId: trust?.id,
2467
+ onSubmit: (data) => handleOnSubmit(data, 1),
2468
+ handleHomeClick: navigateBack
2469
+ }
2470
+ ) });
2471
+ case TaskTypes.TRUST_MEMBER_OVERVIEW:
2472
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2473
+ TrustMembersOverview,
2474
+ {
2475
+ navigateBackToTaskList: navigateBack,
2476
+ navigateToEditTrustMember: onNavigateToTrustMemberRoleAndType,
2477
+ navigateToEditTrustMemberOwner: (trustMemberOwnerId, trustMemberId2) => onNavigateToDecisionMakerIndividual(
2478
+ TaskTypes.TRUST_MEMBER_COMPANY_OWNER,
2479
+ trustMemberOwnerId,
2480
+ trustMemberId2
2481
+ )
2482
+ }
2483
+ ) });
2484
+ case TaskTypes.TRUST_MEMBER_ROLE_AND_TYPE:
2485
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2486
+ TrustMemberRoleAndTypePage,
2487
+ {
2488
+ trustId: trust.id,
2489
+ memberId: trustMemberId,
2490
+ navigateToFullDropinFor: onNavigateToTrustMemberEditDetails,
2491
+ navigateBack: async () => {
2492
+ await refetchTrust();
2493
+ navigateBack();
2494
+ }
2495
+ }
2496
+ ) });
2497
+ case TaskTypes.UNINCORPORATED_PARTNERSHIP:
2498
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2499
+ TrustDetailsPage,
2500
+ {
2501
+ taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP,
2502
+ trustId: unincorporatedPartnership?.id,
2503
+ onSubmit: (data) => handleOnSubmit(data, 1),
2504
+ handleHomeClick: navigateBack
2505
+ }
2506
+ ) });
2507
+ case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW:
2508
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2509
+ UnincorporatedPartnershipMembersOverview,
2510
+ {
2511
+ navigateBackToTaskList: navigateBack,
2512
+ navigateToEditMember: (member) => onNavigateToMember({
2513
+ selectedMember: member,
2514
+ selectedEntityType: member?.legalEntityType,
2515
+ selectedRoles: member?.roles,
2516
+ roleAndType: true
2517
+ }),
2518
+ navigateToEditMemberOwner: (memberOwnerId, memberId) => {
2519
+ setActiveMember({ legalEntityId: memberId });
2520
+ onNavigateToDecisionMakerIndividual(
2521
+ TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER,
2522
+ memberOwnerId,
2523
+ memberId
2524
+ );
2525
+ }
2526
+ }
2527
+ ) });
2528
+ case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY:
2529
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2530
+ UnincorporatedPartnershipMemberCompanyPage,
2531
+ {
2532
+ partnershipId: unincorporatedPartnership.id,
2533
+ partnershipMemberCompanyId: unincorporatedPartnershipMember?.legalEntityId,
2534
+ newMember: (
2535
+ // empty string for legalEntityId means it's a new member
2536
+ unincorporatedPartnershipMember?.legalEntityId === "" ? unincorporatedPartnershipMember : void 0
2537
+ ),
2538
+ onSubmit: (data) => handleOnSubmit(data, 2),
2539
+ handleHomeClick: navigateBack
2540
+ }
2541
+ ) });
2542
+ case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER:
2543
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2544
+ DecisionMakerDetailsPage,
2545
+ {
2546
+ taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER,
2547
+ parentCompanyId: unincorporatedPartnershipMember?.legalEntityId,
2548
+ decisionMakerId: currentDecisionMakerId,
2549
+ onSubmit: async (data) => {
2550
+ await handleOnSubmit(data);
2551
+ await refetchUnincorporatedPartnership();
2552
+ },
2553
+ handleHomeClick: navigateBack
2554
+ }
2555
+ ) });
2556
+ case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL:
2557
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2558
+ UnincorporatedPartnershipIndividualPage,
2559
+ {
2560
+ memberId: unincorporatedPartnershipMember?.legalEntityId,
2561
+ partnershipId: unincorporatedPartnership.id,
2562
+ member: unincorporatedPartnershipMember,
2563
+ onSubmit: (data) => {
2564
+ handleOnSubmit(data, 2);
2565
+ refetchUnincorporatedPartnership();
2566
+ },
2567
+ handleBackClick: navigateBack,
2568
+ handleHomeClick: () => navigateTo(TaskTypes.TRUST_MEMBER_OVERVIEW)
2569
+ }
2570
+ ) });
2571
+ case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_ROLE_AND_TYPE:
2572
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2573
+ UnincorporatedPartnershipMemberRoleAndTypePage,
2574
+ {
2575
+ memberId: unincorporatedPartnershipMember?.legalEntityId,
2576
+ onNavigateToMember,
2577
+ navigateBack: async () => {
2578
+ await refetchUnincorporatedPartnership();
2579
+ navigateBack();
2580
+ }
2581
+ }
2582
+ ) });
2583
+ case TaskTypes.PCI_DSS:
2584
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(SignPCIComponent, { onClose: navigateBack }) });
2585
+ case TaskTypes.SOLE_PROPRIETOR_COMPANY:
2586
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2587
+ SoleProprietorshipPage,
2588
+ {
2589
+ solePropId: soleProp?.id,
2590
+ onSubmit: (data) => handleOnSubmit(data, 1),
2591
+ handleHomeClick: navigateBack
2592
+ }
2593
+ ) });
2594
+ case TaskTypes.SERVICE_AGREEMENT:
2595
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2596
+ AcceptTermsOfService,
2597
+ {
2598
+ legalEntityId: rootLegalEntity.id,
2599
+ onClose: () => {
2600
+ userEvents.addPageEvent("Clicked button", {
2601
+ actionType: "back",
2602
+ label: "back"
2603
+ });
2604
+ navigateBack();
2605
+ },
2606
+ asEmbedded: false,
2607
+ handleAddSigner: () => {
2608
+ onNavigateToDecisionMakerIndividual(TaskTypes.DECISION_MAKER);
2609
+ }
2610
+ }
2611
+ ) });
2612
+ case TaskTypes.LEGAL_REPRESENTATIVE_DETAILS:
2613
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2614
+ LegalRepresentativeDetailsPage,
2615
+ {
2616
+ legalRepresentativeId: associatedLegalRepresentative?.id,
2617
+ onSubmit: handleOnSubmit,
2618
+ handleHomeClick: navigateBack
2619
+ }
2620
+ ) });
2621
+ case TaskTypes.SOURCE_OF_FUNDS:
2622
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2623
+ SourceOfFundsPage,
2624
+ {
2625
+ onSubmit: handleOnSubmit,
2626
+ handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW)
2627
+ }
2628
+ ) });
2629
+ case TaskTypes.BUSINESS_FINANCING:
2630
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2631
+ BusinessFinancingPage,
2632
+ {
2633
+ onSubmit: async (data) => {
2634
+ onSubmit?.(data);
2635
+ await refetchLegalEntity();
2636
+ navigateTo(TaskTypes.TASKS_OVERVIEW);
2637
+ },
2638
+ handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW)
2639
+ }
2640
+ ) });
2641
+ case TaskTypes.TAX_REPORTING:
2642
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(TaxReportingDropin, { handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW) }) });
2643
+ case TaskTypes.ACQUIRING_BUSINESS_LINE:
2644
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(RootBusinessLinesPage, { handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW) }) });
2645
+ default:
2646
+ return null;
2647
+ }
2648
+ }
2649
+ function OnboardingDropinComponent({
2650
+ legalEntityId,
2651
+ openBankingPartnerConfigId
2652
+ }) {
2653
+ if (!legalEntityId) {
2654
+ throw new Error("Must provide at-least legalEntityId");
2655
+ }
2656
+ const { i18n } = useTranslation();
2657
+ addResourceBundles(i18n, [
2658
+ { ns: "common", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../../language/locales/da-DK.json": () => import("./da-DK-DzcTI92X.js"), "../../../language/locales/de-DE.json": () => import("./de-DE-dPfrbCii.js"), "../../../language/locales/en-US.instructions.json": () => import("./en-US.instructions-Ddr7AO05.js"), "../../../language/locales/en-US.json": () => import("./StoreProvider-99-ewU62.js").then((n) => n.bF), "../../../language/locales/es-ES.json": () => import("./es-ES--IvNed_Q.js"), "../../../language/locales/fi-FI.json": () => import("./fi-FI-BUixKfXH.js"), "../../../language/locales/fr-FR.json": () => import("./fr-FR-BM-qNLci.js"), "../../../language/locales/it-IT.json": () => import("./it-IT-D63gRTDc.js"), "../../../language/locales/ja-JP.json": () => import("./ja-JP-DL0IjTzn.js"), "../../../language/locales/nl-NL.json": () => import("./nl-NL-KQ6bciOb.js"), "../../../language/locales/no-NO.json": () => import("./no-NO-Ds3VioxT.js"), "../../../language/locales/pt-BR.json": () => import("./pt-BR-Ct4s4jXV.js"), "../../../language/locales/sl-SI.json": () => import("./sl-SI-hxwQIw_i.js"), "../../../language/locales/sv-SE.json": () => import("./sv-SE-0PQ-U1u6.js") }), `../../../language/locales/${lang}.json`, 6) },
2659
+ { ns: "ui", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../ui/language/da-DK.json": () => import("./da-DK-DQ4ZYSea.js"), "../../ui/language/de-DE.json": () => import("./de-DE-CkbOZ6S_.js"), "../../ui/language/en-US.json": () => import("./en-US-CjjPhkB5.js"), "../../ui/language/es-ES.json": () => import("./es-ES-BAolMrZ0.js"), "../../ui/language/fi-FI.json": () => import("./fi-FI-D8WrLxxq.js"), "../../ui/language/fr-FR.json": () => import("./fr-FR-Beljeilc.js"), "../../ui/language/it-IT.json": () => import("./it-IT-5a7NHVFo.js"), "../../ui/language/ja-JP.json": () => import("./ja-JP-DSvZhFNY.js"), "../../ui/language/nl-NL.json": () => import("./nl-NL-CmURERx_.js"), "../../ui/language/no-NO.json": () => import("./no-NO-qyqWODMp.js"), "../../ui/language/pt-BR.json": () => import("./pt-BR-BxoOF8jB.js"), "../../ui/language/sl-SI.json": () => import("./sl-SI-DTvJT7fC.js"), "../../ui/language/sv-SE.json": () => import("./sv-SE-N-Hqwcjq.js") }), `../../ui/language/${lang}.json`, 5) }
2660
+ ]);
2661
+ const { data: legalEntityData } = useLegalEntity(ROOT_LE);
2662
+ return !legalEntityData ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
2663
+ DropinComposer,
2664
+ {
2665
+ legalEntityResponse: legalEntityData,
2666
+ openBankingPartnerConfigId
2667
+ }
2668
+ );
2669
+ }
2670
+ export {
2671
+ OnboardingDropinComponent as O
2672
+ };