@remoteoss/remote-flows 1.49.1 → 1.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (679) hide show
  1. package/README.md +1 -0
  2. package/dist/CheckboxFieldDefault-23VE43PP.js +2 -0
  3. package/dist/CountryFieldDefault-FVAAL55P.js +2 -0
  4. package/dist/DatePickerFieldDefault-KXEMGK5B.js +2 -0
  5. package/dist/EmailFieldDefault-OFHDLOOT.js +2 -0
  6. package/dist/FileUploadFieldDefault-GX22C22E.js +2 -0
  7. package/dist/ForcedValueFieldDefault-ESITCZWK.js +2 -0
  8. package/dist/MultiSelectFieldDefault-DAUBH5JV.js +2 -0
  9. package/dist/NumberFieldDefault-MXZD7YVE.js +2 -0
  10. package/dist/PDFPreviewDefault-T6YPWXGY.js +2 -0
  11. package/dist/RadioGroupFieldDefault-QFUUJGSR.js +2 -0
  12. package/dist/SelectFieldDefault-3QTJE222.js +2 -0
  13. package/dist/TelFieldDefault-5U5X37LI.js +2 -0
  14. package/dist/TextAreaFieldDefault-JX2MVJVY.js +2 -0
  15. package/dist/TextFieldDefault-WCUD6XYS.js +2 -0
  16. package/dist/TimeFieldDefault-UNF7PKLT.js +2 -0
  17. package/dist/WorkScheduleFieldDefault-2A2RCDXV.js +2 -0
  18. package/dist/{chunk-C2HZNBMZ.js → chunk-235XZBTZ.js} +2 -2
  19. package/dist/chunk-2EXX7BNU.js +2 -0
  20. package/dist/{chunk-PUK2TIQX.js.map → chunk-2EXX7BNU.js.map} +1 -1
  21. package/dist/chunk-2KA6NZOQ.js +2 -0
  22. package/dist/chunk-2KA6NZOQ.js.map +1 -0
  23. package/dist/chunk-2L6AB46E.js +2 -0
  24. package/dist/{chunk-A7U3KJIP.js.map → chunk-2L6AB46E.js.map} +1 -1
  25. package/dist/{chunk-IRUWMZVH.js → chunk-2SD75ZFL.js} +2 -2
  26. package/dist/{chunk-3RQSRU7O.js → chunk-335N2CVQ.js} +2 -2
  27. package/dist/chunk-36DZMQHH.js +2 -0
  28. package/dist/chunk-36DZMQHH.js.map +1 -0
  29. package/dist/{chunk-5MH23AST.js → chunk-3BDWVNHX.js} +2 -2
  30. package/dist/chunk-3CGFAN3F.js +2 -0
  31. package/dist/{chunk-C5T75DEZ.js.map → chunk-3CGFAN3F.js.map} +1 -1
  32. package/dist/{chunk-BYTVIOOL.js → chunk-3DOSHTJS.js} +2 -2
  33. package/dist/{chunk-3VTHNE4H.js → chunk-3HMBTPH7.js} +2 -2
  34. package/dist/{chunk-6S5Q2OKC.js → chunk-3NC2JJM3.js} +2 -2
  35. package/dist/{chunk-5TOSVOLY.js → chunk-3OHORFIX.js} +2 -2
  36. package/dist/{chunk-FT4ZNBTA.js → chunk-3WRO57UF.js} +2 -2
  37. package/dist/{chunk-VYAJQ25J.js → chunk-4AQMMGXK.js} +2 -2
  38. package/dist/{chunk-JLM4O7ZW.js → chunk-4BFGSBOK.js} +2 -2
  39. package/dist/{chunk-R2D32OB6.js → chunk-57QHHIWL.js} +2 -2
  40. package/dist/{chunk-UU2IFOXR.js → chunk-57Y5XQ3D.js} +2 -2
  41. package/dist/{chunk-3LMZ3SOP.js → chunk-5DPOL3DT.js} +2 -2
  42. package/dist/{chunk-7XDU2VWN.js → chunk-5FST4WDH.js} +2 -2
  43. package/dist/chunk-5NN5RWBG.js +2 -0
  44. package/dist/chunk-5NN5RWBG.js.map +1 -0
  45. package/dist/{chunk-ANZ2YYUE.js → chunk-6OLV37C2.js} +2 -2
  46. package/dist/{chunk-RKP7EEAB.js → chunk-6UCTTR3O.js} +2 -2
  47. package/dist/{chunk-CHIWBD6E.js → chunk-6X4SQPQF.js} +2 -2
  48. package/dist/{chunk-F3DZUA7W.js → chunk-72EMS5WI.js} +2 -2
  49. package/dist/chunk-72ZOHLOK.js +2 -0
  50. package/dist/chunk-72ZOHLOK.js.map +1 -0
  51. package/dist/chunk-74ZX4KQG.js +2 -0
  52. package/dist/chunk-74ZX4KQG.js.map +1 -0
  53. package/dist/{chunk-JKHJR6HK.js → chunk-753FEV2S.js} +2 -2
  54. package/dist/{chunk-JKHJR6HK.js.map → chunk-753FEV2S.js.map} +1 -1
  55. package/dist/{chunk-3BQVEYHE.js → chunk-77LDJPXF.js} +2 -2
  56. package/dist/chunk-7UVH4WE2.js +2 -0
  57. package/dist/chunk-7UVH4WE2.js.map +1 -0
  58. package/dist/{chunk-BWM2MYPE.js → chunk-7Y4NHODP.js} +2 -2
  59. package/dist/{chunk-F3UUYQGY.js → chunk-AAHPOX44.js} +2 -2
  60. package/dist/{chunk-GBVBMT3H.js → chunk-ADL2ZH54.js} +2 -2
  61. package/dist/{chunk-UZFEJMO6.js → chunk-AFTFDGSD.js} +2 -2
  62. package/dist/chunk-ANPNVWCB.js +2 -0
  63. package/dist/{chunk-TC7EQZJK.js → chunk-AOE6FXVP.js} +2 -2
  64. package/dist/{chunk-TC7EQZJK.js.map → chunk-AOE6FXVP.js.map} +1 -1
  65. package/dist/{chunk-ORP6DY5I.js → chunk-APSKAXM2.js} +2 -2
  66. package/dist/chunk-AXZ4IDY7.js +2 -0
  67. package/dist/chunk-AXZ4IDY7.js.map +1 -0
  68. package/dist/chunk-BHHK7QQZ.js +2 -0
  69. package/dist/chunk-BHHK7QQZ.js.map +1 -0
  70. package/dist/chunk-BQGTMOIQ.js +2 -0
  71. package/dist/{chunk-PYNHR7NL.js.map → chunk-BQGTMOIQ.js.map} +1 -1
  72. package/dist/chunk-BQVCM5DQ.js +2 -0
  73. package/dist/chunk-BQVCM5DQ.js.map +1 -0
  74. package/dist/{chunk-TLJXBZII.js → chunk-BYD4TSDD.js} +2 -2
  75. package/dist/{chunk-F2SGCGXL.js → chunk-C3MUUZC6.js} +2 -2
  76. package/dist/chunk-C7KVPEVX.js +2 -0
  77. package/dist/chunk-C7KVPEVX.js.map +1 -0
  78. package/dist/{chunk-D737GUYZ.js → chunk-CWKXQZRT.js} +2 -2
  79. package/dist/chunk-D7F3QKN5.js +2 -0
  80. package/dist/chunk-D7F3QKN5.js.map +1 -0
  81. package/dist/{chunk-VNMUML3T.js → chunk-DAUDKN32.js} +5 -5
  82. package/dist/chunk-DAUDKN32.js.map +1 -0
  83. package/dist/{chunk-QHJ3BYJN.js → chunk-DIPYFRXX.js} +2 -2
  84. package/dist/chunk-DSJXT5ZP.js +2 -0
  85. package/dist/chunk-DSJXT5ZP.js.map +1 -0
  86. package/dist/{chunk-WGDZTF7Y.js → chunk-E7Y3YBZH.js} +2 -2
  87. package/dist/chunk-EOV3JMUQ.js +2 -0
  88. package/dist/chunk-EOV3JMUQ.js.map +1 -0
  89. package/dist/chunk-EP3BNRH3.js +2 -0
  90. package/dist/chunk-EP3BNRH3.js.map +1 -0
  91. package/dist/{chunk-BTZ57COZ.js → chunk-EQOOVJ7K.js} +2 -2
  92. package/dist/{chunk-IAR6BWUY.js → chunk-ESXBCNJM.js} +2 -2
  93. package/dist/chunk-EUQLCVA5.js +2 -0
  94. package/dist/chunk-EUQLCVA5.js.map +1 -0
  95. package/dist/chunk-F37FQXEZ.js +2 -0
  96. package/dist/chunk-F37FQXEZ.js.map +1 -0
  97. package/dist/{chunk-ZQVVHVAG.js → chunk-FF5OB2GF.js} +2 -2
  98. package/dist/{chunk-WYIU74JN.js → chunk-FFRROEPQ.js} +2 -2
  99. package/dist/chunk-FYCOEJEZ.js +2 -0
  100. package/dist/chunk-FYCOEJEZ.js.map +1 -0
  101. package/dist/{chunk-UAEQLFPK.js → chunk-G3BWBRCE.js} +2 -2
  102. package/dist/{chunk-LCUYP6VW.js → chunk-GGTV6IQ3.js} +2 -2
  103. package/dist/chunk-GGVW6SG6.js +2 -0
  104. package/dist/chunk-GGVW6SG6.js.map +1 -0
  105. package/dist/{chunk-6IDUDCVS.js → chunk-GIBD2ZCJ.js} +2 -2
  106. package/dist/{chunk-LCUURLXS.js → chunk-GNVGW65D.js} +2 -2
  107. package/dist/{chunk-QSF4XFSV.js → chunk-GRLZH65T.js} +2 -2
  108. package/dist/chunk-GSUGHAHA.js +2 -0
  109. package/dist/{chunk-4BHEQMZV.js.map → chunk-GSUGHAHA.js.map} +1 -1
  110. package/dist/{chunk-WDPJIOLG.js → chunk-H4NJGAN4.js} +2 -2
  111. package/dist/chunk-H6XROFQT.js +2 -0
  112. package/dist/chunk-H6XROFQT.js.map +1 -0
  113. package/dist/{chunk-EYZVDP6A.js → chunk-HRVJCCWJ.js} +2 -2
  114. package/dist/{chunk-2LSLWFZS.js → chunk-I53YCEOC.js} +2 -2
  115. package/dist/{chunk-SUVBETJS.js → chunk-I5NW7AQZ.js} +2 -2
  116. package/dist/{chunk-PJTMFMRJ.js → chunk-I65OXH33.js} +2 -2
  117. package/dist/chunk-IBQVGZMF.js +2 -0
  118. package/dist/{chunk-XFD3ULUF.js.map → chunk-IBQVGZMF.js.map} +1 -1
  119. package/dist/{chunk-WHDUZGVW.js → chunk-IJS67A57.js} +2 -2
  120. package/dist/{chunk-B3ESNTKY.js → chunk-ILPI4AFS.js} +2 -2
  121. package/dist/chunk-J244N33S.js +2 -0
  122. package/dist/chunk-J244N33S.js.map +1 -0
  123. package/dist/chunk-JKNE2D47.js +2 -0
  124. package/dist/{chunk-XTLTKB3S.js.map → chunk-JKNE2D47.js.map} +1 -1
  125. package/dist/{chunk-7NDAFJXR.js → chunk-JUSQGITN.js} +2 -2
  126. package/dist/{chunk-GMSYO53D.js → chunk-KD7UBTZG.js} +2 -2
  127. package/dist/chunk-KF52YXGI.js +2 -0
  128. package/dist/chunk-KF52YXGI.js.map +1 -0
  129. package/dist/{chunk-SNGQ2MKL.js → chunk-KFIUXU6I.js} +2 -2
  130. package/dist/chunk-KJRHRVFI.js +2 -0
  131. package/dist/chunk-KJRHRVFI.js.map +1 -0
  132. package/dist/chunk-KSSQR2CS.js +2 -0
  133. package/dist/chunk-KSSQR2CS.js.map +1 -0
  134. package/dist/{chunk-YUUUI4FY.js → chunk-L7FN3XPX.js} +2 -2
  135. package/dist/{chunk-4Y2INBAI.js → chunk-LJ32QPJF.js} +2 -2
  136. package/dist/chunk-LXABE3VR.js +2 -0
  137. package/dist/chunk-LXABE3VR.js.map +1 -0
  138. package/dist/chunk-LY5PCHQ2.js +2 -0
  139. package/dist/{chunk-B4O5YUYL.js.map → chunk-LY5PCHQ2.js.map} +1 -1
  140. package/dist/{chunk-5FGYC2RF.js → chunk-M7PZAJTR.js} +2 -2
  141. package/dist/{chunk-KZ5ZQTBF.js → chunk-NVOUXFGX.js} +2 -2
  142. package/dist/chunk-OEKL7QGO.js +2 -0
  143. package/dist/{chunk-V3C32X6R.js.map → chunk-OEKL7QGO.js.map} +1 -1
  144. package/dist/{chunk-5FJ64F6D.js → chunk-OFFUVHQJ.js} +2 -2
  145. package/dist/chunk-OHVXJXF4.js +1 -0
  146. package/dist/chunk-OHVXJXF4.js.map +1 -0
  147. package/dist/{chunk-WZOVZYNI.js → chunk-OJ4TXF6G.js} +2 -2
  148. package/dist/{chunk-5WTCN4WO.js → chunk-OT5JE2SM.js} +2 -2
  149. package/dist/{chunk-6L77BWCI.js → chunk-P3TTGECC.js} +2 -2
  150. package/dist/{chunk-2LR5N626.js → chunk-PAYZRCKY.js} +2 -2
  151. package/dist/{chunk-CFPKRLGM.js → chunk-PJAHLEOR.js} +2 -2
  152. package/dist/{chunk-Z7VNXKWB.js → chunk-PKORRCMX.js} +2 -2
  153. package/dist/chunk-QATHYZUV.js +2 -0
  154. package/dist/chunk-QATHYZUV.js.map +1 -0
  155. package/dist/chunk-QIV5OKOI.js +2 -0
  156. package/dist/chunk-QIV5OKOI.js.map +1 -0
  157. package/dist/{chunk-QEHEOSJT.js → chunk-QUJBIRNY.js} +2 -2
  158. package/dist/{chunk-POWC7LZN.js → chunk-R23HFBV4.js} +2 -2
  159. package/dist/{chunk-3LELUHRO.js → chunk-R2XDTYPZ.js} +2 -2
  160. package/dist/chunk-R4E37FVX.js +2 -0
  161. package/dist/chunk-R4E37FVX.js.map +1 -0
  162. package/dist/{chunk-FDTOQHOJ.js → chunk-R6VNUDBK.js} +2 -2
  163. package/dist/{chunk-WB52GW3H.js → chunk-ROVMQ5NT.js} +2 -2
  164. package/dist/{chunk-6IQJJCQ3.js → chunk-SDPYDCS7.js} +2 -2
  165. package/dist/chunk-SRLBVFNQ.js +2 -0
  166. package/dist/chunk-SRLBVFNQ.js.map +1 -0
  167. package/dist/{chunk-5WIBTOCI.js → chunk-SRNXXOUH.js} +2 -2
  168. package/dist/{chunk-5WIBTOCI.js.map → chunk-SRNXXOUH.js.map} +1 -1
  169. package/dist/{chunk-JRRPMAUO.js → chunk-SUGZPBET.js} +2 -2
  170. package/dist/{chunk-ZXGAFQXW.js → chunk-SYZIGZ2F.js} +2 -2
  171. package/dist/{chunk-ZXGAFQXW.js.map → chunk-SYZIGZ2F.js.map} +1 -1
  172. package/dist/chunk-TDKKCSKV.js +2 -0
  173. package/dist/{chunk-7IIQUZTH.js.map → chunk-TDKKCSKV.js.map} +1 -1
  174. package/dist/{chunk-J4CHUIPC.js → chunk-UNBTPLJ6.js} +2 -2
  175. package/dist/{chunk-TXOCMI5I.js → chunk-URNFXEOZ.js} +2 -2
  176. package/dist/{chunk-WH3QR2W5.js → chunk-UWIUECXU.js} +2 -2
  177. package/dist/{chunk-BFXBFGBH.js → chunk-UYOKK4QW.js} +2 -2
  178. package/dist/{chunk-BFXBFGBH.js.map → chunk-UYOKK4QW.js.map} +1 -1
  179. package/dist/{chunk-IJCTN52C.js → chunk-VDJJEIOD.js} +2 -2
  180. package/dist/{chunk-IJCTN52C.js.map → chunk-VDJJEIOD.js.map} +1 -1
  181. package/dist/{chunk-LMYJ6V44.js → chunk-VEQWK7QQ.js} +2 -2
  182. package/dist/{chunk-LMYJ6V44.js.map → chunk-VEQWK7QQ.js.map} +1 -1
  183. package/dist/chunk-VKORYYED.js +2 -0
  184. package/dist/{chunk-DLIVHNTT.js.map → chunk-VKORYYED.js.map} +1 -1
  185. package/dist/chunk-VSK4KV55.js +2 -0
  186. package/dist/chunk-VSK4KV55.js.map +1 -0
  187. package/dist/{chunk-PNNOU6BC.js → chunk-WHY2WNWH.js} +2 -2
  188. package/dist/{chunk-YRC6EEM3.js → chunk-WNOQNNRR.js} +2 -2
  189. package/dist/{chunk-YRC6EEM3.js.map → chunk-WNOQNNRR.js.map} +1 -1
  190. package/dist/{chunk-IUBHVGVV.js → chunk-WU66SHVJ.js} +2 -2
  191. package/dist/{chunk-MZK2U65W.js → chunk-XLHTMWJ3.js} +2 -2
  192. package/dist/{chunk-5J7DLDLW.js → chunk-XPLWBO73.js} +2 -2
  193. package/dist/{chunk-OTBCLDGR.js → chunk-XS5NKKW4.js} +2 -2
  194. package/dist/chunk-XTZJKL3C.js +2 -0
  195. package/dist/chunk-XTZJKL3C.js.map +1 -0
  196. package/dist/chunk-XWCE5BU6.js +2 -0
  197. package/dist/{chunk-4YFJOHSM.js.map → chunk-XWCE5BU6.js.map} +1 -1
  198. package/dist/{chunk-A5XRBDDO.js → chunk-XXBQQH47.js} +2 -2
  199. package/dist/{chunk-AP56UUME.js → chunk-Y2NCUO3F.js} +2 -2
  200. package/dist/{chunk-AP56UUME.js.map → chunk-Y2NCUO3F.js.map} +1 -1
  201. package/dist/{chunk-JQ3SLOUP.js → chunk-Y6FOZXIU.js} +2 -2
  202. package/dist/{chunk-K67Q5476.js → chunk-YANQP45B.js} +2 -2
  203. package/dist/{chunk-NX7MM6XR.js → chunk-YE6NRJ2L.js} +2 -2
  204. package/dist/{chunk-NX7MM6XR.js.map → chunk-YE6NRJ2L.js.map} +1 -1
  205. package/dist/{chunk-JMFCG5KA.js → chunk-YWLAZIIO.js} +2 -2
  206. package/dist/{chunk-S2QXSX4Q.js → chunk-YYIAA47F.js} +2 -2
  207. package/dist/{chunk-2GTY2DMO.js → chunk-ZHFGV2GB.js} +2 -2
  208. package/dist/{chunk-2GTY2DMO.js.map → chunk-ZHFGV2GB.js.map} +1 -1
  209. package/dist/{chunk-EQIWABAZ.js → chunk-ZJ55AKB6.js} +2 -2
  210. package/dist/{chunk-ILX6RI7K.js → chunk-ZRD3M74X.js} +2 -2
  211. package/dist/{chunk-H5OZSXSY.js → chunk-ZULOHKU6.js} +2 -2
  212. package/dist/default-components.d.ts +2 -2
  213. package/dist/default-components.js +1 -1
  214. package/dist/default-components.js.map +1 -1
  215. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  216. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  217. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  218. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  219. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  220. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  221. package/dist/flows/ContractAmendment/context.d.ts +4 -4
  222. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  223. package/dist/flows/ContractAmendment/hooks.js +1 -1
  224. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  225. package/dist/flows/ContractAmendment/index.js +1 -1
  226. package/dist/flows/ContractAmendment/types.d.ts +3 -3
  227. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  228. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +8 -5
  229. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  230. package/dist/flows/ContractorOnboarding/api.d.ts +180 -123
  231. package/dist/flows/ContractorOnboarding/api.js +1 -1
  232. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  233. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  234. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +8 -5
  235. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  236. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.d.ts +3 -3
  237. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.js +1 -1
  238. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  239. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  240. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +8 -5
  241. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  242. package/dist/flows/ContractorOnboarding/components/ContractReviewButton.js +1 -1
  243. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +8 -5
  244. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  245. package/dist/flows/ContractorOnboarding/components/CreateInvoiceScheduleStep.d.ts +3 -3
  246. package/dist/flows/ContractorOnboarding/components/CreateInvoiceScheduleStep.js +1 -1
  247. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +8 -5
  248. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  249. package/dist/flows/ContractorOnboarding/components/InvoiceScheduleStep.d.ts +8 -5
  250. package/dist/flows/ContractorOnboarding/components/InvoiceScheduleStep.js +1 -1
  251. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  252. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  253. package/dist/flows/ContractorOnboarding/components/PreviewInvoiceButton.d.ts +31 -0
  254. package/dist/flows/ContractorOnboarding/components/PreviewInvoiceButton.js +2 -0
  255. package/dist/flows/ContractorOnboarding/components/PreviewInvoiceButton.js.map +1 -0
  256. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +8 -5
  257. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  258. package/dist/flows/ContractorOnboarding/components/SaveDraftButton.d.ts +3 -3
  259. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  260. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  261. package/dist/flows/ContractorOnboarding/components/SkipInvoiceScheduleButton.d.ts +24 -0
  262. package/dist/flows/ContractorOnboarding/components/SkipInvoiceScheduleButton.js +2 -0
  263. package/dist/flows/ContractorOnboarding/components/SkipInvoiceScheduleButton.js.map +1 -0
  264. package/dist/flows/ContractorOnboarding/context.d.ts +16 -5
  265. package/dist/flows/ContractorOnboarding/hooks.d.ts +8 -5
  266. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  267. package/dist/flows/ContractorOnboarding/index.d.ts +8 -5
  268. package/dist/flows/ContractorOnboarding/index.js +1 -1
  269. package/dist/flows/ContractorOnboarding/invoiceScheduleConstants.d.ts +1 -0
  270. package/dist/flows/ContractorOnboarding/invoiceScheduleConstants.js +1 -1
  271. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +8 -5
  272. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  273. package/dist/flows/ContractorOnboarding/json-schemas/contractOrigin.d.ts +3 -0
  274. package/dist/flows/ContractorOnboarding/json-schemas/contractOrigin.js +1 -1
  275. package/dist/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule.d.ts +80 -6
  276. package/dist/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule.js +1 -1
  277. package/dist/flows/ContractorOnboarding/json-schemas/invoiceSchedule.d.ts +3 -0
  278. package/dist/flows/ContractorOnboarding/json-schemas/invoiceSchedule.js +1 -1
  279. package/dist/flows/ContractorOnboarding/json-schemas/selectContractorSubscriptionStep.d.ts +3 -0
  280. package/dist/flows/ContractorOnboarding/json-schemas/selectContractorSubscriptionStep.js +1 -1
  281. package/dist/flows/ContractorOnboarding/json-schemas/signature.d.ts +3 -0
  282. package/dist/flows/ContractorOnboarding/json-schemas/signature.js +1 -1
  283. package/dist/flows/ContractorOnboarding/types.d.ts +8 -5
  284. package/dist/flows/ContractorOnboarding/utils.d.ts +31 -21
  285. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  286. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  287. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  288. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  289. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  290. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +3 -3
  291. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  292. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +3 -3
  293. package/dist/flows/CostCalculator/api.d.ts +3 -3
  294. package/dist/flows/CostCalculator/api.js +1 -1
  295. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  296. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  297. package/dist/flows/CostCalculator/context.d.ts +3 -3
  298. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  299. package/dist/flows/CostCalculator/hooks.js +1 -1
  300. package/dist/flows/CostCalculator/index.d.ts +3 -3
  301. package/dist/flows/CostCalculator/index.js +1 -1
  302. package/dist/flows/CostCalculator/jsonSchema.d.ts +3 -0
  303. package/dist/flows/CostCalculator/jsonSchema.js +1 -1
  304. package/dist/flows/CostCalculator/types.d.ts +3 -3
  305. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  306. package/dist/flows/CostCalculator/utils.js +1 -1
  307. package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
  308. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  309. package/dist/flows/CreateCompany/api.d.ts +3 -3
  310. package/dist/flows/CreateCompany/api.js +1 -1
  311. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
  312. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  313. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
  314. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  315. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
  316. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  317. package/dist/flows/CreateCompany/context.d.ts +4 -4
  318. package/dist/flows/CreateCompany/hooks.d.ts +4 -4
  319. package/dist/flows/CreateCompany/hooks.js +1 -1
  320. package/dist/flows/CreateCompany/index.d.ts +4 -4
  321. package/dist/flows/CreateCompany/index.js +1 -1
  322. package/dist/flows/CreateCompany/json-schemas/companyBasicInformationStep.d.ts +3 -0
  323. package/dist/flows/CreateCompany/json-schemas/companyBasicInformationStep.js +1 -1
  324. package/dist/flows/CreateCompany/types.d.ts +4 -4
  325. package/dist/flows/InvoiceSchedule/InvoiceScheduleFlow.d.ts +36 -0
  326. package/dist/flows/InvoiceSchedule/InvoiceScheduleFlow.js +2 -0
  327. package/dist/flows/InvoiceSchedule/InvoiceScheduleFlow.js.map +1 -0
  328. package/dist/flows/InvoiceSchedule/InvoiceScheduleForm.d.ts +31 -0
  329. package/dist/flows/InvoiceSchedule/InvoiceScheduleForm.js +2 -0
  330. package/dist/flows/InvoiceSchedule/InvoiceScheduleForm.js.map +1 -0
  331. package/dist/flows/InvoiceSchedule/InvoiceSchedulePreviewButton.d.ts +33 -0
  332. package/dist/flows/InvoiceSchedule/InvoiceSchedulePreviewButton.js +2 -0
  333. package/dist/flows/InvoiceSchedule/InvoiceSchedulePreviewButton.js.map +1 -0
  334. package/dist/flows/InvoiceSchedule/InvoiceScheduleSubmitButton.d.ts +6 -0
  335. package/dist/flows/InvoiceSchedule/InvoiceScheduleSubmitButton.js +2 -0
  336. package/dist/flows/InvoiceSchedule/InvoiceScheduleSubmitButton.js.map +1 -0
  337. package/dist/flows/InvoiceSchedule/context.d.ts +51 -0
  338. package/dist/flows/InvoiceSchedule/context.js +2 -0
  339. package/dist/flows/InvoiceSchedule/context.js.map +1 -0
  340. package/dist/flows/InvoiceSchedule/hooks.d.ts +100 -0
  341. package/dist/flows/InvoiceSchedule/hooks.js +2 -0
  342. package/dist/flows/InvoiceSchedule/hooks.js.map +1 -0
  343. package/dist/flows/InvoiceSchedule/index.d.ts +16 -0
  344. package/dist/flows/InvoiceSchedule/index.js +2 -0
  345. package/dist/flows/InvoiceSchedule/index.js.map +1 -0
  346. package/dist/flows/InvoiceSchedule/types.d.ts +51 -0
  347. package/dist/flows/InvoiceSchedule/types.js +1 -0
  348. package/dist/flows/InvoiceSchedule/types.js.map +1 -0
  349. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.d.ts +3 -3
  350. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.js +1 -1
  351. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.d.ts +3 -3
  352. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.js +1 -1
  353. package/dist/flows/JsonSchemaPlayground/context.d.ts +3 -3
  354. package/dist/flows/JsonSchemaPlayground/hooks.d.ts +3 -3
  355. package/dist/flows/JsonSchemaPlayground/hooks.js +1 -1
  356. package/dist/flows/JsonSchemaPlayground/index.d.ts +3 -3
  357. package/dist/flows/JsonSchemaPlayground/index.js +1 -1
  358. package/dist/flows/JsonSchemaPlayground/types.d.ts +3 -3
  359. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  360. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  361. package/dist/flows/Onboarding/api.d.ts +4 -4
  362. package/dist/flows/Onboarding/api.js +1 -1
  363. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  364. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  365. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  366. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  367. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  368. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  369. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  370. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  371. package/dist/flows/Onboarding/components/DailySchedule/DailySchedule.d.ts +11 -0
  372. package/dist/flows/Onboarding/components/DailySchedule/DailySchedule.js +2 -0
  373. package/dist/flows/Onboarding/components/DailySchedule/DailySchedule.js.map +1 -0
  374. package/dist/flows/Onboarding/components/DailySchedule/DailyScheduleContainer.d.ts +16 -0
  375. package/dist/flows/Onboarding/components/DailySchedule/DailyScheduleContainer.js +2 -0
  376. package/dist/flows/Onboarding/components/DailySchedule/DailyScheduleContainer.js.map +1 -0
  377. package/dist/flows/Onboarding/components/DailySchedule/types.d.ts +68 -0
  378. package/dist/flows/Onboarding/components/DailySchedule/types.js +1 -0
  379. package/dist/flows/Onboarding/components/DailySchedule/types.js.map +1 -0
  380. package/dist/flows/Onboarding/components/DailySchedule/utils.d.ts +21 -0
  381. package/dist/flows/Onboarding/components/DailySchedule/utils.js +2 -0
  382. package/dist/flows/Onboarding/components/DailySchedule/utils.js.map +1 -0
  383. package/dist/flows/Onboarding/components/EmploymentAgreementInfoContent.js +1 -1
  384. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.d.ts +4 -4
  385. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.js +1 -1
  386. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  387. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  388. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  389. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  390. package/dist/flows/Onboarding/components/PreOnboardingRequirements.d.ts +4 -4
  391. package/dist/flows/Onboarding/components/PreOnboardingRequirements.js +1 -1
  392. package/dist/flows/Onboarding/components/PreviewEmploymentAgreementStep.js +1 -1
  393. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  394. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  395. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  396. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  397. package/dist/flows/Onboarding/context.d.ts +6 -6
  398. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  399. package/dist/flows/Onboarding/hooks.js +1 -1
  400. package/dist/flows/Onboarding/index.d.ts +4 -4
  401. package/dist/flows/Onboarding/index.js +1 -1
  402. package/dist/flows/Onboarding/json-schemas/selectCountryStep.d.ts +3 -0
  403. package/dist/flows/Onboarding/json-schemas/selectCountryStep.js +1 -1
  404. package/dist/flows/Onboarding/types.d.ts +4 -4
  405. package/dist/flows/Onboarding/utils.d.ts +4 -4
  406. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.d.ts +4 -4
  407. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.js +1 -1
  408. package/dist/flows/PayrollAdminOnboarding/api.d.ts +2 -2
  409. package/dist/flows/PayrollAdminOnboarding/api.js +1 -1
  410. package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.d.ts +3 -3
  411. package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.js +1 -1
  412. package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.d.ts +3 -3
  413. package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.js +1 -1
  414. package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.d.ts +3 -3
  415. package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.js +1 -1
  416. package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.d.ts +2 -2
  417. package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.js +1 -1
  418. package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.d.ts +3 -3
  419. package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.js +1 -1
  420. package/dist/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.d.ts +3 -3
  421. package/dist/flows/PayrollAdminOnboarding/context.d.ts +4 -4
  422. package/dist/flows/PayrollAdminOnboarding/hooks.d.ts +5 -5
  423. package/dist/flows/PayrollAdminOnboarding/hooks.js +1 -1
  424. package/dist/flows/PayrollAdminOnboarding/index.d.ts +4 -4
  425. package/dist/flows/PayrollAdminOnboarding/index.js +1 -1
  426. package/dist/flows/PayrollAdminOnboarding/json-schemas/selectCountryStep.d.ts +3 -0
  427. package/dist/flows/PayrollAdminOnboarding/json-schemas/selectCountryStep.js +1 -1
  428. package/dist/flows/PayrollAdminOnboarding/types.d.ts +4 -4
  429. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.d.ts +4 -4
  430. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.js +1 -1
  431. package/dist/flows/PayrollEmployeeOnboarding/api.d.ts +3 -3
  432. package/dist/flows/PayrollEmployeeOnboarding/api.js +1 -1
  433. package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.d.ts +3 -3
  434. package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.js +1 -1
  435. package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.d.ts +3 -3
  436. package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.js +1 -1
  437. package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.d.ts +3 -3
  438. package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.js +1 -1
  439. package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.d.ts +2 -2
  440. package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.js +1 -1
  441. package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.d.ts +3 -3
  442. package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.js +1 -1
  443. package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.d.ts +3 -3
  444. package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.js +1 -1
  445. package/dist/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.d.ts +3 -3
  446. package/dist/flows/PayrollEmployeeOnboarding/context.d.ts +4 -4
  447. package/dist/flows/PayrollEmployeeOnboarding/hooks.d.ts +5 -5
  448. package/dist/flows/PayrollEmployeeOnboarding/hooks.js +1 -1
  449. package/dist/flows/PayrollEmployeeOnboarding/index.d.ts +4 -4
  450. package/dist/flows/PayrollEmployeeOnboarding/index.js +1 -1
  451. package/dist/flows/PayrollEmployeeOnboarding/types.d.ts +4 -4
  452. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  453. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  454. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  455. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  456. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  457. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  458. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  459. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  460. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  461. package/dist/flows/Termination/TerminationFlow.js +1 -1
  462. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  463. package/dist/flows/Termination/TerminationForm.js +1 -1
  464. package/dist/flows/Termination/api.d.ts +5 -5
  465. package/dist/flows/Termination/api.js +1 -1
  466. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  467. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  468. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  469. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  470. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  471. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  472. package/dist/flows/Termination/context.d.ts +4 -4
  473. package/dist/flows/Termination/hooks.d.ts +4 -4
  474. package/dist/flows/Termination/hooks.js +1 -1
  475. package/dist/flows/Termination/index.d.ts +6 -6
  476. package/dist/flows/Termination/index.js +1 -1
  477. package/dist/flows/Termination/json-schemas/additionalInformation.d.ts +3 -0
  478. package/dist/flows/Termination/json-schemas/additionalInformation.js +1 -1
  479. package/dist/flows/Termination/json-schemas/defaultSchema.d.ts +3 -0
  480. package/dist/flows/Termination/json-schemas/defaultSchema.js +1 -1
  481. package/dist/flows/Termination/json-schemas/employeeComunication.d.ts +3 -0
  482. package/dist/flows/Termination/json-schemas/employeeComunication.js +1 -1
  483. package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +3 -0
  484. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  485. package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +3 -0
  486. package/dist/flows/Termination/json-schemas/paidTimeOff.js +1 -1
  487. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  488. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  489. package/dist/flows/Termination/json-schemas/terminationDetails.d.ts +3 -0
  490. package/dist/flows/Termination/json-schemas/terminationDetails.js +1 -1
  491. package/dist/flows/Termination/types.d.ts +4 -4
  492. package/dist/flows/Termination/utils.d.ts +4 -4
  493. package/dist/flows/types.d.ts +3 -3
  494. package/dist/flows/utils.d.ts +2 -2
  495. package/dist/index.css +1 -1
  496. package/dist/index.css.map +1 -1
  497. package/dist/index.d.ts +23 -14
  498. package/dist/index.js +2 -2
  499. package/dist/index.js.map +1 -1
  500. package/dist/internals.d.ts +4 -4
  501. package/dist/internals.js +1 -1
  502. package/dist/{mutations-DQjVuza-.d.ts → mutations-BGNKrV99.d.ts} +1 -1
  503. package/dist/{remoteFlows-B_JbhzWp.d.ts → remoteFlows-2MK_3sLb.d.ts} +2 -2
  504. package/dist/styles.css +1 -1
  505. package/dist/styles.css.map +1 -1
  506. package/dist/{types-D3U8Wi3X.d.ts → types-B2bPNE86.d.ts} +3 -3
  507. package/dist/{types-1mH_uuoA.d.ts → types-BOB-WNJe.d.ts} +2 -2
  508. package/dist/{types-CdC2MYpf.d.ts → types-BPLbQPfI.d.ts} +3 -3
  509. package/dist/{types-B0iYt6RL.d.ts → types-BZ58yiMu.d.ts} +37 -4
  510. package/dist/{types-Clzf4xjV.d.ts → types-CJocMMvX.d.ts} +6 -8
  511. package/dist/{types-CoYsxVTI.d.ts → types-DvJ4fXde.d.ts} +1 -1
  512. package/dist/types-DvsjrBmu.d.ts +15 -0
  513. package/dist/{types-BFzhRUSU.d.ts → types-Ke3uSWQH.d.ts} +3 -3
  514. package/dist/{types-B93nzmoE.d.ts → types-g4Cxg_cb.d.ts} +1 -1
  515. package/dist/{types.gen-BmtA4XNd.d.ts → types.gen-ByX93X_n.d.ts} +216 -17
  516. package/dist/{utils-DJgzqxq4.d.ts → utils-Douv08HR.d.ts} +1 -1
  517. package/package.json +6 -5
  518. package/dist/CheckboxFieldDefault-JXNMWIRK.js +0 -2
  519. package/dist/CountryFieldDefault-SO4WS7KE.js +0 -2
  520. package/dist/DatePickerFieldDefault-AZHJN2U6.js +0 -2
  521. package/dist/EmailFieldDefault-QVKXB67I.js +0 -2
  522. package/dist/FileUploadFieldDefault-K6PF6RP7.js +0 -2
  523. package/dist/ForcedValueFieldDefault-BEOC4MYU.js +0 -2
  524. package/dist/MultiSelectFieldDefault-QKXVTGF2.js +0 -2
  525. package/dist/NumberFieldDefault-O7OKTFG4.js +0 -2
  526. package/dist/PDFPreviewDefault-HSSMYKV5.js +0 -2
  527. package/dist/RadioGroupFieldDefault-ZHHXDUUU.js +0 -2
  528. package/dist/SelectFieldDefault-FWQ7D6DU.js +0 -2
  529. package/dist/TelFieldDefault-RA7IBELJ.js +0 -2
  530. package/dist/TextAreaFieldDefault-NEFWXEE2.js +0 -2
  531. package/dist/TextFieldDefault-RXNU36AX.js +0 -2
  532. package/dist/TimeFieldDefault-KIJNBWYF.js +0 -2
  533. package/dist/WorkScheduleFieldDefault-23WY3SVD.js +0 -2
  534. package/dist/chunk-4BHEQMZV.js +0 -2
  535. package/dist/chunk-4YFJOHSM.js +0 -2
  536. package/dist/chunk-7IIQUZTH.js +0 -2
  537. package/dist/chunk-A7U3KJIP.js +0 -2
  538. package/dist/chunk-ALHHN2LG.js +0 -2
  539. package/dist/chunk-ALHHN2LG.js.map +0 -1
  540. package/dist/chunk-AUPAAQUT.js +0 -2
  541. package/dist/chunk-AUPAAQUT.js.map +0 -1
  542. package/dist/chunk-B4O5YUYL.js +0 -2
  543. package/dist/chunk-C5T75DEZ.js +0 -2
  544. package/dist/chunk-DLIVHNTT.js +0 -2
  545. package/dist/chunk-FGYOG6XG.js +0 -2
  546. package/dist/chunk-FGYOG6XG.js.map +0 -1
  547. package/dist/chunk-G3KQCVQQ.js +0 -2
  548. package/dist/chunk-G3KQCVQQ.js.map +0 -1
  549. package/dist/chunk-HMJ4PIDI.js +0 -2
  550. package/dist/chunk-HMJ4PIDI.js.map +0 -1
  551. package/dist/chunk-IHGCXP2X.js +0 -2
  552. package/dist/chunk-IHGCXP2X.js.map +0 -1
  553. package/dist/chunk-IXS65MGJ.js +0 -2
  554. package/dist/chunk-IXS65MGJ.js.map +0 -1
  555. package/dist/chunk-KPDYUFCB.js +0 -2
  556. package/dist/chunk-KPDYUFCB.js.map +0 -1
  557. package/dist/chunk-NPVSJYM6.js +0 -2
  558. package/dist/chunk-NPVSJYM6.js.map +0 -1
  559. package/dist/chunk-PUK2TIQX.js +0 -2
  560. package/dist/chunk-PYNHR7NL.js +0 -2
  561. package/dist/chunk-QQPF2DUF.js +0 -2
  562. package/dist/chunk-QQPF2DUF.js.map +0 -1
  563. package/dist/chunk-QSBXRKYE.js +0 -2
  564. package/dist/chunk-SVVZOMLQ.js +0 -2
  565. package/dist/chunk-SVVZOMLQ.js.map +0 -1
  566. package/dist/chunk-UOJOO2DM.js +0 -2
  567. package/dist/chunk-UOJOO2DM.js.map +0 -1
  568. package/dist/chunk-V3C32X6R.js +0 -2
  569. package/dist/chunk-VFRHMNLJ.js +0 -2
  570. package/dist/chunk-VFRHMNLJ.js.map +0 -1
  571. package/dist/chunk-VNMUML3T.js.map +0 -1
  572. package/dist/chunk-VQRE3YLW.js +0 -2
  573. package/dist/chunk-VQRE3YLW.js.map +0 -1
  574. package/dist/chunk-WVJDCDGZ.js +0 -2
  575. package/dist/chunk-WVJDCDGZ.js.map +0 -1
  576. package/dist/chunk-XFD3ULUF.js +0 -2
  577. package/dist/chunk-XTLTKB3S.js +0 -2
  578. package/dist/chunk-XXQBX7ND.js +0 -2
  579. package/dist/chunk-XXQBX7ND.js.map +0 -1
  580. /package/dist/{CheckboxFieldDefault-JXNMWIRK.js.map → CheckboxFieldDefault-23VE43PP.js.map} +0 -0
  581. /package/dist/{CountryFieldDefault-SO4WS7KE.js.map → CountryFieldDefault-FVAAL55P.js.map} +0 -0
  582. /package/dist/{DatePickerFieldDefault-AZHJN2U6.js.map → DatePickerFieldDefault-KXEMGK5B.js.map} +0 -0
  583. /package/dist/{EmailFieldDefault-QVKXB67I.js.map → EmailFieldDefault-OFHDLOOT.js.map} +0 -0
  584. /package/dist/{FileUploadFieldDefault-K6PF6RP7.js.map → FileUploadFieldDefault-GX22C22E.js.map} +0 -0
  585. /package/dist/{ForcedValueFieldDefault-BEOC4MYU.js.map → ForcedValueFieldDefault-ESITCZWK.js.map} +0 -0
  586. /package/dist/{MultiSelectFieldDefault-QKXVTGF2.js.map → MultiSelectFieldDefault-DAUBH5JV.js.map} +0 -0
  587. /package/dist/{NumberFieldDefault-O7OKTFG4.js.map → NumberFieldDefault-MXZD7YVE.js.map} +0 -0
  588. /package/dist/{PDFPreviewDefault-HSSMYKV5.js.map → PDFPreviewDefault-T6YPWXGY.js.map} +0 -0
  589. /package/dist/{RadioGroupFieldDefault-ZHHXDUUU.js.map → RadioGroupFieldDefault-QFUUJGSR.js.map} +0 -0
  590. /package/dist/{SelectFieldDefault-FWQ7D6DU.js.map → SelectFieldDefault-3QTJE222.js.map} +0 -0
  591. /package/dist/{TelFieldDefault-RA7IBELJ.js.map → TelFieldDefault-5U5X37LI.js.map} +0 -0
  592. /package/dist/{TextAreaFieldDefault-NEFWXEE2.js.map → TextAreaFieldDefault-JX2MVJVY.js.map} +0 -0
  593. /package/dist/{TextFieldDefault-RXNU36AX.js.map → TextFieldDefault-WCUD6XYS.js.map} +0 -0
  594. /package/dist/{TimeFieldDefault-KIJNBWYF.js.map → TimeFieldDefault-UNF7PKLT.js.map} +0 -0
  595. /package/dist/{WorkScheduleFieldDefault-23WY3SVD.js.map → WorkScheduleFieldDefault-2A2RCDXV.js.map} +0 -0
  596. /package/dist/{chunk-C2HZNBMZ.js.map → chunk-235XZBTZ.js.map} +0 -0
  597. /package/dist/{chunk-IRUWMZVH.js.map → chunk-2SD75ZFL.js.map} +0 -0
  598. /package/dist/{chunk-3RQSRU7O.js.map → chunk-335N2CVQ.js.map} +0 -0
  599. /package/dist/{chunk-5MH23AST.js.map → chunk-3BDWVNHX.js.map} +0 -0
  600. /package/dist/{chunk-BYTVIOOL.js.map → chunk-3DOSHTJS.js.map} +0 -0
  601. /package/dist/{chunk-3VTHNE4H.js.map → chunk-3HMBTPH7.js.map} +0 -0
  602. /package/dist/{chunk-6S5Q2OKC.js.map → chunk-3NC2JJM3.js.map} +0 -0
  603. /package/dist/{chunk-5TOSVOLY.js.map → chunk-3OHORFIX.js.map} +0 -0
  604. /package/dist/{chunk-FT4ZNBTA.js.map → chunk-3WRO57UF.js.map} +0 -0
  605. /package/dist/{chunk-VYAJQ25J.js.map → chunk-4AQMMGXK.js.map} +0 -0
  606. /package/dist/{chunk-JLM4O7ZW.js.map → chunk-4BFGSBOK.js.map} +0 -0
  607. /package/dist/{chunk-R2D32OB6.js.map → chunk-57QHHIWL.js.map} +0 -0
  608. /package/dist/{chunk-UU2IFOXR.js.map → chunk-57Y5XQ3D.js.map} +0 -0
  609. /package/dist/{chunk-3LMZ3SOP.js.map → chunk-5DPOL3DT.js.map} +0 -0
  610. /package/dist/{chunk-7XDU2VWN.js.map → chunk-5FST4WDH.js.map} +0 -0
  611. /package/dist/{chunk-ANZ2YYUE.js.map → chunk-6OLV37C2.js.map} +0 -0
  612. /package/dist/{chunk-RKP7EEAB.js.map → chunk-6UCTTR3O.js.map} +0 -0
  613. /package/dist/{chunk-CHIWBD6E.js.map → chunk-6X4SQPQF.js.map} +0 -0
  614. /package/dist/{chunk-F3DZUA7W.js.map → chunk-72EMS5WI.js.map} +0 -0
  615. /package/dist/{chunk-3BQVEYHE.js.map → chunk-77LDJPXF.js.map} +0 -0
  616. /package/dist/{chunk-BWM2MYPE.js.map → chunk-7Y4NHODP.js.map} +0 -0
  617. /package/dist/{chunk-F3UUYQGY.js.map → chunk-AAHPOX44.js.map} +0 -0
  618. /package/dist/{chunk-GBVBMT3H.js.map → chunk-ADL2ZH54.js.map} +0 -0
  619. /package/dist/{chunk-UZFEJMO6.js.map → chunk-AFTFDGSD.js.map} +0 -0
  620. /package/dist/{chunk-QSBXRKYE.js.map → chunk-ANPNVWCB.js.map} +0 -0
  621. /package/dist/{chunk-ORP6DY5I.js.map → chunk-APSKAXM2.js.map} +0 -0
  622. /package/dist/{chunk-TLJXBZII.js.map → chunk-BYD4TSDD.js.map} +0 -0
  623. /package/dist/{chunk-F2SGCGXL.js.map → chunk-C3MUUZC6.js.map} +0 -0
  624. /package/dist/{chunk-D737GUYZ.js.map → chunk-CWKXQZRT.js.map} +0 -0
  625. /package/dist/{chunk-QHJ3BYJN.js.map → chunk-DIPYFRXX.js.map} +0 -0
  626. /package/dist/{chunk-WGDZTF7Y.js.map → chunk-E7Y3YBZH.js.map} +0 -0
  627. /package/dist/{chunk-BTZ57COZ.js.map → chunk-EQOOVJ7K.js.map} +0 -0
  628. /package/dist/{chunk-IAR6BWUY.js.map → chunk-ESXBCNJM.js.map} +0 -0
  629. /package/dist/{chunk-ZQVVHVAG.js.map → chunk-FF5OB2GF.js.map} +0 -0
  630. /package/dist/{chunk-WYIU74JN.js.map → chunk-FFRROEPQ.js.map} +0 -0
  631. /package/dist/{chunk-UAEQLFPK.js.map → chunk-G3BWBRCE.js.map} +0 -0
  632. /package/dist/{chunk-LCUYP6VW.js.map → chunk-GGTV6IQ3.js.map} +0 -0
  633. /package/dist/{chunk-6IDUDCVS.js.map → chunk-GIBD2ZCJ.js.map} +0 -0
  634. /package/dist/{chunk-LCUURLXS.js.map → chunk-GNVGW65D.js.map} +0 -0
  635. /package/dist/{chunk-QSF4XFSV.js.map → chunk-GRLZH65T.js.map} +0 -0
  636. /package/dist/{chunk-WDPJIOLG.js.map → chunk-H4NJGAN4.js.map} +0 -0
  637. /package/dist/{chunk-EYZVDP6A.js.map → chunk-HRVJCCWJ.js.map} +0 -0
  638. /package/dist/{chunk-2LSLWFZS.js.map → chunk-I53YCEOC.js.map} +0 -0
  639. /package/dist/{chunk-SUVBETJS.js.map → chunk-I5NW7AQZ.js.map} +0 -0
  640. /package/dist/{chunk-PJTMFMRJ.js.map → chunk-I65OXH33.js.map} +0 -0
  641. /package/dist/{chunk-WHDUZGVW.js.map → chunk-IJS67A57.js.map} +0 -0
  642. /package/dist/{chunk-B3ESNTKY.js.map → chunk-ILPI4AFS.js.map} +0 -0
  643. /package/dist/{chunk-7NDAFJXR.js.map → chunk-JUSQGITN.js.map} +0 -0
  644. /package/dist/{chunk-GMSYO53D.js.map → chunk-KD7UBTZG.js.map} +0 -0
  645. /package/dist/{chunk-SNGQ2MKL.js.map → chunk-KFIUXU6I.js.map} +0 -0
  646. /package/dist/{chunk-YUUUI4FY.js.map → chunk-L7FN3XPX.js.map} +0 -0
  647. /package/dist/{chunk-4Y2INBAI.js.map → chunk-LJ32QPJF.js.map} +0 -0
  648. /package/dist/{chunk-5FGYC2RF.js.map → chunk-M7PZAJTR.js.map} +0 -0
  649. /package/dist/{chunk-KZ5ZQTBF.js.map → chunk-NVOUXFGX.js.map} +0 -0
  650. /package/dist/{chunk-5FJ64F6D.js.map → chunk-OFFUVHQJ.js.map} +0 -0
  651. /package/dist/{chunk-WZOVZYNI.js.map → chunk-OJ4TXF6G.js.map} +0 -0
  652. /package/dist/{chunk-5WTCN4WO.js.map → chunk-OT5JE2SM.js.map} +0 -0
  653. /package/dist/{chunk-6L77BWCI.js.map → chunk-P3TTGECC.js.map} +0 -0
  654. /package/dist/{chunk-2LR5N626.js.map → chunk-PAYZRCKY.js.map} +0 -0
  655. /package/dist/{chunk-CFPKRLGM.js.map → chunk-PJAHLEOR.js.map} +0 -0
  656. /package/dist/{chunk-Z7VNXKWB.js.map → chunk-PKORRCMX.js.map} +0 -0
  657. /package/dist/{chunk-QEHEOSJT.js.map → chunk-QUJBIRNY.js.map} +0 -0
  658. /package/dist/{chunk-POWC7LZN.js.map → chunk-R23HFBV4.js.map} +0 -0
  659. /package/dist/{chunk-3LELUHRO.js.map → chunk-R2XDTYPZ.js.map} +0 -0
  660. /package/dist/{chunk-FDTOQHOJ.js.map → chunk-R6VNUDBK.js.map} +0 -0
  661. /package/dist/{chunk-WB52GW3H.js.map → chunk-ROVMQ5NT.js.map} +0 -0
  662. /package/dist/{chunk-6IQJJCQ3.js.map → chunk-SDPYDCS7.js.map} +0 -0
  663. /package/dist/{chunk-JRRPMAUO.js.map → chunk-SUGZPBET.js.map} +0 -0
  664. /package/dist/{chunk-J4CHUIPC.js.map → chunk-UNBTPLJ6.js.map} +0 -0
  665. /package/dist/{chunk-TXOCMI5I.js.map → chunk-URNFXEOZ.js.map} +0 -0
  666. /package/dist/{chunk-WH3QR2W5.js.map → chunk-UWIUECXU.js.map} +0 -0
  667. /package/dist/{chunk-PNNOU6BC.js.map → chunk-WHY2WNWH.js.map} +0 -0
  668. /package/dist/{chunk-IUBHVGVV.js.map → chunk-WU66SHVJ.js.map} +0 -0
  669. /package/dist/{chunk-MZK2U65W.js.map → chunk-XLHTMWJ3.js.map} +0 -0
  670. /package/dist/{chunk-5J7DLDLW.js.map → chunk-XPLWBO73.js.map} +0 -0
  671. /package/dist/{chunk-OTBCLDGR.js.map → chunk-XS5NKKW4.js.map} +0 -0
  672. /package/dist/{chunk-A5XRBDDO.js.map → chunk-XXBQQH47.js.map} +0 -0
  673. /package/dist/{chunk-JQ3SLOUP.js.map → chunk-Y6FOZXIU.js.map} +0 -0
  674. /package/dist/{chunk-K67Q5476.js.map → chunk-YANQP45B.js.map} +0 -0
  675. /package/dist/{chunk-JMFCG5KA.js.map → chunk-YWLAZIIO.js.map} +0 -0
  676. /package/dist/{chunk-S2QXSX4Q.js.map → chunk-YYIAA47F.js.map} +0 -0
  677. /package/dist/{chunk-EQIWABAZ.js.map → chunk-ZJ55AKB6.js.map} +0 -0
  678. /package/dist/{chunk-ILX6RI7K.js.map → chunk-ZRD3M74X.js.map} +0 -0
  679. /package/dist/{chunk-H5OZSXSY.js.map → chunk-ZULOHKU6.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js","../src/components/form/fields/CurrencyConversionField.tsx","../src/common/hooks.ts"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","import { ReactNode, useState, useCallback, useEffect, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport omit from 'lodash.omit';\nimport { TextField } from '@/src/components/form/fields/TextField';\nimport { useConvertCurrency } from '@/src/flows/Onboarding/api';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { HelpCenterDataProps } from '@/src/types/fields';\nimport { useFormFields } from '@/src/context';\nimport { useDebounce } from '@/src/common/hooks';\nimport { FormDescription } from '@/src/components/ui/form';\nimport { HelpCenter } from '@/src/components/shared/zendesk-drawer/HelpCenter';\nimport {\n convertFromCents,\n convertToCents,\n round,\n} from '@/src/components/form/utils';\n\ntype DescriptionWithConversionProps = {\n description: ReactNode;\n helpCenter: ReactNode;\n toggle: ReactNode;\n className: string;\n};\n\nconst DescriptionWithConversion = ({\n description,\n helpCenter,\n toggle,\n className,\n}: DescriptionWithConversionProps) => (\n <span className={className}>\n <FormDescription as='span' helpCenter={helpCenter}>\n {description}\n </FormDescription>{' '}\n {toggle}\n </span>\n);\n\ntype ConversionToggleProps = {\n showConversion: boolean;\n targetCurrency: string;\n className: string;\n onClick: (evt: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nconst ConversionToggle = ({\n showConversion,\n targetCurrency,\n className,\n onClick,\n}: ConversionToggleProps) => {\n const { components } = useFormFields();\n const label = showConversion\n ? `Hide ${targetCurrency} conversion`\n : `Show ${targetCurrency} conversion`;\n\n const CustomButton = components?.button;\n if (!CustomButton) {\n throw new Error(`Button component not found`);\n }\n\n return (\n <CustomButton className={className} data-type='inline' onClick={onClick}>\n {label}\n </CustomButton>\n );\n};\n\nexport type CurrencyConversionFieldProps = JSFField & {\n sourceCurrency: string;\n targetCurrency: string;\n mainFieldName?: string;\n conversionFieldName: string;\n conversionProperties?: {\n label?: string;\n description?: ReactNode;\n };\n useProxy?: boolean;\n classNamePrefix: string;\n conversionType?: 'spread' | 'no_spread';\n meta?: {\n helpCenter?: HelpCenterDataProps;\n };\n /**\n * Enabled by the 'split_salary_description' feature flag. When on, the description, the help\n * center link and the conversion toggle are handed to the text component as three separate\n * slots instead of being packed into the description node.\n */\n splitDescription?: boolean;\n};\n\nexport const CurrencyConversionField = ({\n sourceCurrency,\n targetCurrency,\n mainFieldName,\n conversionFieldName,\n conversionProperties,\n classNamePrefix,\n description,\n conversionType = 'spread',\n meta,\n splitDescription = false,\n ...props\n}: CurrencyConversionFieldProps) => {\n const [showConversion, setShowConversion] = useState(false);\n const { setValue, watch } = useFormContext();\n const fieldValue = watch(mainFieldName || props.name);\n const isFirstRender = useRef(true);\n\n const canShowConversion =\n sourceCurrency && targetCurrency && sourceCurrency !== targetCurrency;\n\n const { mutateAsync: convertCurrency } = useConvertCurrency({\n type: conversionType,\n });\n\n // we keep track of the last input the user used, so we can make sure\n // we keep consistent currency rates\n const lastInputFieldName = `${props.name}_converted`;\n useEffect(() => {\n setValue(lastInputFieldName, mainFieldName || props.name);\n }, [setValue, mainFieldName, props.name, lastInputFieldName]);\n\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n\n // when source currency changes, reset the conversion field\n setValue(conversionFieldName, '');\n }, [sourceCurrency, conversionFieldName, setValue]);\n\n const convertCurrencyCallback = useCallback(\n async (amount: number | null, fromCurrency: string, toCurrency: string) => {\n if (!amount || isNaN(amount) || amount <= 0) return;\n\n return convertCurrency({\n source_currency: fromCurrency,\n target_currency: toCurrency,\n amount,\n });\n },\n [convertCurrency],\n );\n\n const debouncedConvertCurrency = useDebounce(async (value: string) => {\n // The SDK sets the employer billing currency in the salary field, but internally we don't do it like this, is set based on the employee billing currency\n // That's why we need to do 1 / exchange rate to get the correct amount, if currencies were different, it would be done in the debouncedConvertCurrencyReverse\n // THE BE always transforms from the target currency to the source currency\n const amountInCents = convertToCents(value);\n const conversion = await convertCurrencyCallback(\n amountInCents,\n targetCurrency,\n sourceCurrency,\n );\n\n const exchangeRate =\n 1 / (conversion?.data?.data.conversion_data?.exchange_rate ?? 1);\n\n const amount = round(Number(amountInCents) * exchangeRate);\n\n setValue(conversionFieldName, convertFromCents(amount));\n }, 500);\n\n const debouncedConvertCurrencyReverse = useDebounce(async (value: string) => {\n const amount = convertToCents(value);\n const conversion = await convertCurrencyCallback(\n amount,\n targetCurrency,\n sourceCurrency,\n );\n\n const conversionAmount =\n conversion?.data?.data.conversion_data.target_amount;\n\n setValue(mainFieldName || props.name, convertFromCents(conversionAmount));\n }, 500);\n\n const handleMainFieldChange = (evt: React.ChangeEvent<HTMLInputElement>) => {\n setValue(lastInputFieldName, mainFieldName || props.name);\n if (showConversion) {\n debouncedConvertCurrency(evt.target.value);\n }\n };\n\n const handleConversionFieldChange = (\n evt: React.ChangeEvent<HTMLInputElement>,\n ) => {\n setValue(lastInputFieldName, conversionFieldName);\n debouncedConvertCurrencyReverse(evt.target.value);\n };\n\n const toggleConversion = (evt: React.MouseEvent<HTMLButtonElement>) => {\n evt.preventDefault();\n setShowConversion((prev) => !prev);\n\n if (!showConversion && fieldValue) {\n debouncedConvertCurrency(fieldValue);\n }\n };\n\n const conversionToggle = canShowConversion ? (\n <ConversionToggle\n targetCurrency={targetCurrency}\n showConversion={showConversion}\n className={`${classNamePrefix}-button`}\n onClick={toggleConversion}\n />\n ) : null;\n\n // With the split_salary_description feature, the toggle is handed over as a separate slot so the\n // text component stays free to render the description, the help center link and the toggle\n // however it wants. Without it, we keep packing them into the description node: it's the only\n // slot every text component is known to render, so the toggle can't get lost. The help center\n // link is then rendered by us and stripped from the meta we forward, to avoid rendering it twice\n // (FormDescription appends it after its children, which would put it after the toggle).\n const descriptionProps = splitDescription\n ? { meta, description, descriptionSuffix: conversionToggle }\n : {\n meta: conversionToggle ? omit(meta, 'helpCenter') : meta,\n description: conversionToggle ? (\n <DescriptionWithConversion\n description={description}\n helpCenter={<HelpCenter helpCenter={meta?.helpCenter} />}\n toggle={conversionToggle}\n className={`${classNamePrefix}-description`}\n />\n ) : (\n description\n ),\n };\n\n return (\n <>\n <TextField\n {...props}\n {...descriptionProps}\n name={mainFieldName || props.name}\n additionalProps={{ currency: sourceCurrency }}\n type='text'\n inputMode='decimal'\n pattern='^[0-9.]*$'\n maxLength={15}\n onChange={handleMainFieldChange}\n />\n {showConversion && (\n <TextField\n additionalProps={{ currency: targetCurrency }}\n name={conversionFieldName}\n label={conversionProperties?.label || 'Conversion'}\n description={conversionProperties?.description}\n type='text'\n inputMode='decimal'\n pattern='^[0-9.]*$'\n maxLength={15}\n onChange={handleConversionFieldChange}\n />\n )}\n <input\n type='hidden'\n name={lastInputFieldName}\n value={watch(lastInputFieldName) || mainFieldName || props.name}\n />\n </>\n );\n};\n","import { useCallback, useEffect, useRef } from 'react';\nimport debounce from 'lodash/debounce';\n\nexport function useDebounce(\n callback: (value: string) => Promise<void>,\n delay: number,\n) {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const debouncedFn = useRef(\n // WE NEED TO FIX: react-hooks/refs - Passing a ref to a function may read its value during render\n // oxlint-disable-next-line react-hooks/refs\n debounce((value: string) => {\n callbackRef.current(value);\n }, delay),\n ).current;\n\n return useCallback(\n (value: string) => {\n debouncedFn(value);\n },\n [debouncedFn],\n );\n}\n"],"mappings":"4TAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAyBA,SAASC,GAASC,EAAO,CACvB,IAAIC,EAAO,OAAOD,EAClB,OAAOA,GAAS,OAASC,GAAQ,UAAYA,GAAQ,WACvD,CAHSC,EAAAH,GAAA,YAKTD,EAAO,QAAUC,KC9BjB,IAAAI,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAa,OAAO,QAAU,UAAY,QAAU,OAAO,SAAW,QAAU,OAEpFD,EAAO,QAAUC,KCHjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAa,IAGbC,GAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,GAAOF,IAAcC,IAAY,SAAS,aAAa,EAAE,EAE7DF,EAAO,QAAUG,KCRjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAO,IAkBPC,GAAMC,EAAA,UAAW,CACnB,OAAOF,GAAK,KAAK,IAAI,CACvB,EAFU,OAIVD,EAAO,QAAUE,KCtBjB,IAAAE,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cACA,IAAIC,GAAe,KAUnB,SAASC,GAAgBC,EAAQ,CAG/B,QAFIC,EAAQD,EAAO,OAEZC,KAAWH,GAAa,KAAKE,EAAO,OAAOC,CAAK,CAAC,GAAG,CAC3D,OAA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UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUoC,EACZ,EAEFzD,EAAC,SACC,KAAK,SACL,KAAMsC,EACN,MAAOR,EAAMQ,CAAkB,GAAKnB,GAAiBO,EAAM,KAC7D,GACF,CAEJ,EA/KuC","names":["require_isObject","__commonJSMin","exports","module","isObject","value","type","__name","require_freeGlobal","__commonJSMin","exports","module","freeGlobal","require_root","__commonJSMin","exports","module","freeGlobal","freeSelf","root","require_now","__commonJSMin","exports","module","root","now","__name","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","__name","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","__name","require_Symbol","__commonJSMin","exports","module","root","Symbol","require_getRawTag","__commonJSMin","exports","module","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","value","isOwn","tag","unmasked","result","__name","require_objectToString","__commonJSMin","exports","module","objectProto","nativeObjectToString","objectToString","value","__name","require_baseGetTag","__commonJSMin","exports","module","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","baseGetTag","value","__name","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","__name","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","__name","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","__name","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","__name","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","useState","useCallback","useEffect","useRef","omit","import_debounce","useCallback","useEffect","useRef","useDebounce","callback","delay","callbackRef","useRef","useEffect","debouncedFn","debounce","value","useCallback","__name","Fragment","jsx","jsxs","DescriptionWithConversion","__name","description","helpCenter","toggle","className","FormDescription","ConversionToggle","showConversion","targetCurrency","onClick","components","useFormFields","label","CustomButton","CurrencyConversionField","sourceCurrency","mainFieldName","conversionFieldName","conversionProperties","classNamePrefix","conversionType","meta","splitDescription","props","setShowConversion","useState","setValue","watch","useFormContext","fieldValue","isFirstRender","useRef","canShowConversion","convertCurrency","useConvertCurrency","lastInputFieldName","useEffect","convertCurrencyCallback","useCallback","amount","fromCurrency","toCurrency","debouncedConvertCurrency","useDebounce","value","amountInCents","convertToCents","exchangeRate","round","convertFromCents","debouncedConvertCurrencyReverse","conversionAmount","handleMainFieldChange","evt","handleConversionFieldChange","toggleConversion","prev","conversionToggle","descriptionProps","omit","HelpCenter","TextField"]}
1
+ {"version":3,"sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js","../src/components/form/fields/CurrencyConversionField.tsx","../src/common/hooks.ts"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","import { ReactNode, useState, useCallback, useEffect, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport omit from 'lodash.omit';\nimport { TextField } from '@/src/components/form/fields/TextField';\nimport { useConvertCurrency } from '@/src/flows/Onboarding/api';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { HelpCenterDataProps } from '@/src/types/fields';\nimport { useFormFields } from '@/src/context';\nimport { useDebounce } from '@/src/common/hooks';\nimport { FormDescription } from '@/src/components/ui/form';\nimport { HelpCenter } from '@/src/components/shared/zendesk-drawer/HelpCenter';\nimport {\n convertFromCents,\n convertToCents,\n round,\n} from '@/src/components/form/utils';\n\ntype DescriptionWithConversionProps = {\n description: ReactNode;\n helpCenter: ReactNode;\n toggle: ReactNode;\n className: string;\n};\n\nconst DescriptionWithConversion = ({\n description,\n helpCenter,\n toggle,\n className,\n}: DescriptionWithConversionProps) => (\n <span className={className}>\n <FormDescription as='span' helpCenter={helpCenter}>\n {description}\n </FormDescription>{' '}\n {toggle}\n </span>\n);\n\ntype ConversionToggleProps = {\n showConversion: boolean;\n targetCurrency: string;\n className: string;\n onClick: (evt: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nconst ConversionToggle = ({\n showConversion,\n targetCurrency,\n className,\n onClick,\n}: ConversionToggleProps) => {\n const { components } = useFormFields();\n const label = showConversion\n ? `Hide ${targetCurrency} conversion`\n : `Show ${targetCurrency} conversion`;\n\n const CustomButton = components?.button;\n if (!CustomButton) {\n throw new Error(`Button component not found`);\n }\n\n return (\n <CustomButton className={className} data-type='inline' onClick={onClick}>\n {label}\n </CustomButton>\n );\n};\n\nexport type CurrencyConversionFieldProps = JSFField & {\n sourceCurrency: string;\n targetCurrency: string;\n mainFieldName?: string;\n conversionFieldName: string;\n conversionProperties?: {\n label?: string;\n description?: ReactNode;\n };\n useProxy?: boolean;\n classNamePrefix: string;\n conversionType?: 'spread' | 'no_spread';\n meta?: {\n helpCenter?: HelpCenterDataProps;\n };\n /**\n * Enabled by the 'split_salary_description' feature flag. When on, the description, the help\n * center link and the conversion toggle are handed to the text component as three separate\n * slots instead of being packed into the description node.\n */\n splitDescription?: boolean;\n};\n\nexport const CurrencyConversionField = ({\n sourceCurrency,\n targetCurrency,\n mainFieldName,\n conversionFieldName,\n conversionProperties,\n classNamePrefix,\n description,\n conversionType = 'spread',\n meta,\n splitDescription = false,\n ...props\n}: CurrencyConversionFieldProps) => {\n const [showConversion, setShowConversion] = useState(false);\n const { setValue, watch } = useFormContext();\n const fieldValue = watch(mainFieldName || props.name);\n const isFirstRender = useRef(true);\n\n const canShowConversion =\n sourceCurrency && targetCurrency && sourceCurrency !== targetCurrency;\n\n const { mutateAsync: convertCurrency } = useConvertCurrency({\n type: conversionType,\n });\n\n // we keep track of the last input the user used, so we can make sure\n // we keep consistent currency rates\n const lastInputFieldName = `${props.name}_converted`;\n useEffect(() => {\n setValue(lastInputFieldName, mainFieldName || props.name);\n }, [setValue, mainFieldName, props.name, lastInputFieldName]);\n\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n\n // when source currency changes, reset the conversion field\n setValue(conversionFieldName, '');\n }, [sourceCurrency, conversionFieldName, setValue]);\n\n const convertCurrencyCallback = useCallback(\n async (amount: number | null, fromCurrency: string, toCurrency: string) => {\n if (!amount || isNaN(amount) || amount <= 0) return;\n\n return convertCurrency({\n source_currency: fromCurrency,\n target_currency: toCurrency,\n amount,\n });\n },\n [convertCurrency],\n );\n\n const debouncedConvertCurrency = useDebounce(async (value: string) => {\n // The SDK sets the employer billing currency in the salary field, but internally we don't do it like this, is set based on the employee billing currency\n // That's why we need to do 1 / exchange rate to get the correct amount, if currencies were different, it would be done in the debouncedConvertCurrencyReverse\n // THE BE always transforms from the target currency to the source currency\n const amountInCents = convertToCents(value);\n const conversion = await convertCurrencyCallback(\n amountInCents,\n targetCurrency,\n sourceCurrency,\n );\n\n const exchangeRate =\n 1 / (conversion?.data?.data.conversion_data?.exchange_rate ?? 1);\n\n const amount = round(Number(amountInCents) * exchangeRate);\n\n setValue(conversionFieldName, convertFromCents(amount));\n }, 500);\n\n const debouncedConvertCurrencyReverse = useDebounce(async (value: string) => {\n const amount = convertToCents(value);\n const conversion = await convertCurrencyCallback(\n amount,\n targetCurrency,\n sourceCurrency,\n );\n\n const conversionAmount =\n conversion?.data?.data.conversion_data.target_amount;\n\n setValue(mainFieldName || props.name, convertFromCents(conversionAmount));\n }, 500);\n\n const handleMainFieldChange = (evt: React.ChangeEvent<HTMLInputElement>) => {\n setValue(lastInputFieldName, mainFieldName || props.name);\n if (showConversion) {\n debouncedConvertCurrency(evt.target.value);\n }\n };\n\n const handleConversionFieldChange = (\n evt: React.ChangeEvent<HTMLInputElement>,\n ) => {\n setValue(lastInputFieldName, conversionFieldName);\n debouncedConvertCurrencyReverse(evt.target.value);\n };\n\n const toggleConversion = (evt: React.MouseEvent<HTMLButtonElement>) => {\n evt.preventDefault();\n setShowConversion((prev) => !prev);\n\n if (!showConversion && fieldValue) {\n debouncedConvertCurrency(fieldValue);\n }\n };\n\n const conversionToggle = canShowConversion ? (\n <ConversionToggle\n targetCurrency={targetCurrency}\n showConversion={showConversion}\n className={`${classNamePrefix}-button`}\n onClick={toggleConversion}\n />\n ) : null;\n\n // With the split_salary_description feature, the toggle is handed over as a separate slot so the\n // text component stays free to render the description, the help center link and the toggle\n // however it wants. Without it, we keep packing them into the description node: it's the only\n // slot every text component is known to render, so the toggle can't get lost. The help center\n // link is then rendered by us and stripped from the meta we forward, to avoid rendering it twice\n // (FormDescription appends it after its children, which would put it after the toggle).\n const descriptionProps = splitDescription\n ? { meta, description, descriptionSuffix: conversionToggle }\n : {\n meta: conversionToggle ? omit(meta, 'helpCenter') : meta,\n description: conversionToggle ? (\n <DescriptionWithConversion\n description={description}\n helpCenter={<HelpCenter helpCenter={meta?.helpCenter} />}\n toggle={conversionToggle}\n className={`${classNamePrefix}-description`}\n />\n ) : (\n description\n ),\n };\n\n return (\n <>\n <TextField\n {...props}\n {...descriptionProps}\n name={mainFieldName || props.name}\n additionalProps={{ currency: sourceCurrency }}\n type='text'\n inputMode='decimal'\n pattern='^[0-9.]*$'\n maxLength={15}\n onChange={handleMainFieldChange}\n />\n {showConversion && (\n <TextField\n additionalProps={{ currency: targetCurrency }}\n name={conversionFieldName}\n label={conversionProperties?.label || 'Conversion'}\n description={conversionProperties?.description}\n type='text'\n inputMode='decimal'\n pattern='^[0-9.]*$'\n maxLength={15}\n onChange={handleConversionFieldChange}\n />\n )}\n <input\n type='hidden'\n name={lastInputFieldName}\n value={watch(lastInputFieldName) || mainFieldName || props.name}\n />\n </>\n );\n};\n","import { useCallback, useEffect, useRef } from 'react';\nimport debounce from 'lodash/debounce';\n\nexport function useDebounce(\n callback: (value: string) => Promise<void>,\n delay: number,\n) {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const debouncedFn = useRef(\n // WE NEED TO FIX: react-hooks/refs - Passing a ref to a function may read its value during render\n // oxlint-disable-next-line react-hooks/refs\n debounce((value: string) => {\n callbackRef.current(value);\n }, delay),\n ).current;\n\n return useCallback(\n (value: string) => {\n debouncedFn(value);\n },\n [debouncedFn],\n );\n}\n"],"mappings":"6VAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAyBA,SAASC,GAASC,EAAO,CACvB,IAAIC,EAAO,OAAOD,EAClB,OAAOA,GAAS,OAASC,GAAQ,UAAYA,GAAQ,WACvD,CAHSC,EAAAH,GAAA,YAKTD,EAAO,QAAUC,KC9BjB,IAAAI,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAa,OAAO,QAAU,UAAY,QAAU,OAAO,SAAW,QAAU,OAEpFD,EAAO,QAAUC,KCHjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAa,IAGbC,GAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,GAAOF,IAAcC,IAAY,SAAS,aAAa,EAAE,EAE7DF,EAAO,QAAUG,KCRjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAO,IAkBPC,GAAMC,EAAA,UAAW,CACnB,OAAOF,GAAK,K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AC7B,gBAAiB,CAAE,SAAUR,CAAe,EAC5C,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUqC,EACZ,EACC7C,GACCV,EAACgE,EAAA,CACC,gBAAiB,CAAE,SAAUrD,CAAe,EAC5C,KAAMS,EACN,MAAOC,GAAsB,OAAS,aACtC,YAAaA,GAAsB,YACnC,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUoC,EACZ,EAEFzD,EAAC,SACC,KAAK,SACL,KAAMsC,EACN,MAAOR,EAAMQ,CAAkB,GAAKnB,GAAiBO,EAAM,KAC7D,GACF,CAEJ,EA/KuC","names":["require_isObject","__commonJSMin","exports","module","isObject","value","type","__name","require_freeGlobal","__commonJSMin","exports","module","freeGlobal","require_root","__commonJSMin","exports","module","freeGlobal","freeSelf","root","require_now","__commonJSMin","exports","module","root","now","__name","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","__name","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","__name","require_Symbol","__commonJSMin","exports","module","root","Symbol","require_getRawTag","__commonJSMin","exports","module","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","value","isOwn","tag","unmasked","result","__name","require_objectToString","__commonJSMin","exports","module","objectProto","nativeObjectToString","objectToString","value","__name","require_baseGetTag","__commonJSMin","exports","module","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","baseGetTag","value","__name","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","__name","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","__name","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","__name","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","__name","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","useState","useCallback","useEffect","useRef","omit","import_debounce","useCallback","useEffect","useRef","useDebounce","callback","delay","callbackRef","useRef","useEffect","debouncedFn","debounce","value","useCallback","__name","Fragment","jsx","jsxs","DescriptionWithConversion","__name","description","helpCenter","toggle","className","FormDescription","ConversionToggle","showConversion","targetCurrency","onClick","components","useFormFields","label","CustomButton","CurrencyConversionField","sourceCurrency","mainFieldName","conversionFieldName","conversionProperties","classNamePrefix","conversionType","meta","splitDescription","props","setShowConversion","useState","setValue","watch","useFormContext","fieldValue","isFirstRender","useRef","canShowConversion","convertCurrency","useConvertCurrency","lastInputFieldName","useEffect","convertCurrencyCallback","useCallback","amount","fromCurrency","toCurrency","debouncedConvertCurrency","useDebounce","value","amountInCents","convertToCents","exchangeRate","round","convertFromCents","debouncedConvertCurrencyReverse","conversionAmount","handleMainFieldChange","evt","handleConversionFieldChange","toggleConversion","prev","conversionToggle","descriptionProps","omit","HelpCenter","TextField"]}
@@ -0,0 +1,2 @@
1
+ var e={"x-rmt-meta":{jsfOldVersion:!0},additionalProperties:!1,properties:{country_code:{title:"Country",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}}},required:["country_code"],type:"object","x-jsf-order":["country_code"]};export{e as a};
2
+ //# sourceMappingURL=chunk-VSK4KV55.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/PayrollAdminOnboarding/json-schemas/selectCountryStep.ts"],"sourcesContent":["export const gpSelectCountrySchema = {\n 'x-rmt-meta': { jsfOldVersion: true },\n additionalProperties: false,\n properties: {\n country_code: {\n title: 'Country',\n description: '',\n type: 'string',\n oneOf: [] as Array<{ const: string; title: string }>,\n 'x-jsf-presentation': { inputType: 'select' },\n },\n },\n required: ['country_code'],\n type: 'object',\n 'x-jsf-order': ['country_code'],\n};\n"],"mappings":"AAAO,IAAMA,EAAwB,CACnC,aAAc,CAAE,cAAe,EAAK,EACpC,qBAAsB,GACtB,WAAY,CACV,aAAc,CACZ,MAAO,UACP,YAAa,GACb,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CAAE,UAAW,QAAS,CAC9C,CACF,EACA,SAAU,CAAC,cAAc,EACzB,KAAM,SACN,cAAe,CAAC,cAAc,CAChC","names":["gpSelectCountrySchema"]}
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-LCUURLXS.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
2
- //# sourceMappingURL=chunk-PNNOU6BC.js.map
1
+ import{a as e}from"./chunk-GNVGW65D.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
2
+ //# sourceMappingURL=chunk-WHY2WNWH.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-ZXGAFQXW.js";import{a}from"./chunk-LMYJ6V44.js";import{a as e}from"./chunk-TC7EQZJK.js";import{a as r}from"./chunk-NX7MM6XR.js";var i={data:{version:7,schema:{additionalProperties:!1,allOf:[...e.data.schema.allOf,...t.data.schema.allOf,...r.data.schema.allOf,...a.data.schema.allOf],properties:{...e.data.schema.properties,...t.data.schema.properties,...r.data.schema.properties,...a.data.schema.properties},required:[...e.data.schema.required,...t.data.schema.required,...r.data.schema.required,...a.data.schema.required],type:"object","x-jsf-order":[...e.data.schema["x-jsf-order"],...t.data.schema["x-jsf-order"],...r.data.schema["x-jsf-order"],...a.data.schema["x-jsf-order"]]}}};export{i as a};
2
- //# sourceMappingURL=chunk-YRC6EEM3.js.map
1
+ import{a as r}from"./chunk-YE6NRJ2L.js";import{a as t}from"./chunk-SYZIGZ2F.js";import{a}from"./chunk-VEQWK7QQ.js";import{a as e}from"./chunk-AOE6FXVP.js";var i={data:{version:7,schema:{additionalProperties:!1,allOf:[...e.data.schema.allOf,...t.data.schema.allOf,...r.data.schema.allOf,...a.data.schema.allOf],properties:{...e.data.schema.properties,...t.data.schema.properties,...r.data.schema.properties,...a.data.schema.properties},required:[...e.data.schema.required,...t.data.schema.required,...r.data.schema.required,...a.data.schema.required],type:"object","x-jsf-order":[...e.data.schema["x-jsf-order"],...t.data.schema["x-jsf-order"],...r.data.schema["x-jsf-order"],...a.data.schema["x-jsf-order"]],"x-rmt-meta":{jsfOldVersion:!0}}}};export{i as a};
2
+ //# sourceMappingURL=chunk-WNOQNNRR.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/Termination/json-schemas/jsonSchema.ts"],"sourcesContent":["import { additionalInformationSchema } from '@/src/flows/Termination/json-schemas/additionalInformation';\nimport { employeeComunicationSchema } from '@/src/flows/Termination/json-schemas/employeeComunication';\nimport { paidTimeOffSchema } from '@/src/flows/Termination/json-schemas/paidTimeOff';\nimport { terminationDetailsSchema } from '@/src/flows/Termination/json-schemas/terminationDetails';\n\nexport const jsonSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n ...employeeComunicationSchema.data.schema.allOf,\n ...terminationDetailsSchema.data.schema.allOf,\n ...paidTimeOffSchema.data.schema.allOf,\n ...additionalInformationSchema.data.schema.allOf,\n ],\n properties: {\n ...employeeComunicationSchema.data.schema.properties,\n ...terminationDetailsSchema.data.schema.properties,\n ...paidTimeOffSchema.data.schema.properties,\n ...additionalInformationSchema.data.schema.properties,\n },\n required: [\n ...employeeComunicationSchema.data.schema.required,\n ...terminationDetailsSchema.data.schema.required,\n ...paidTimeOffSchema.data.schema.required,\n ...additionalInformationSchema.data.schema.required,\n ],\n type: 'object',\n 'x-jsf-order': [\n ...employeeComunicationSchema.data.schema['x-jsf-order'],\n ...terminationDetailsSchema.data.schema['x-jsf-order'],\n ...paidTimeOffSchema.data.schema['x-jsf-order'],\n ...additionalInformationSchema.data.schema['x-jsf-order'],\n ],\n },\n },\n};\n"],"mappings":"2JAKO,IAAMA,EAAa,CACxB,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,GAAGC,EAA2B,KAAK,OAAO,MAC1C,GAAGC,EAAyB,KAAK,OAAO,MACxC,GAAGC,EAAkB,KAAK,OAAO,MACjC,GAAGC,EAA4B,KAAK,OAAO,KAC7C,EACA,WAAY,CACV,GAAGH,EAA2B,KAAK,OAAO,WAC1C,GAAGC,EAAyB,KAAK,OAAO,WACxC,GAAGC,EAAkB,KAAK,OAAO,WACjC,GAAGC,EAA4B,KAAK,OAAO,UAC7C,EACA,SAAU,CACR,GAAGH,EAA2B,KAAK,OAAO,SAC1C,GAAGC,EAAyB,KAAK,OAAO,SACxC,GAAGC,EAAkB,KAAK,OAAO,SACjC,GAAGC,EAA4B,KAAK,OAAO,QAC7C,EACA,KAAM,SACN,cAAe,CACb,GAAGH,EAA2B,KAAK,OAAO,aAAa,EACvD,GAAGC,EAAyB,KAAK,OAAO,aAAa,EACrD,GAAGC,EAAkB,KAAK,OAAO,aAAa,EAC9C,GAAGC,EAA4B,KAAK,OAAO,aAAa,CAC1D,CACF,CACF,CACF","names":["jsonSchema","employeeComunicationSchema","terminationDetailsSchema","paidTimeOffSchema","additionalInformationSchema"]}
1
+ {"version":3,"sources":["../src/flows/Termination/json-schemas/jsonSchema.ts"],"sourcesContent":["import { additionalInformationSchema } from '@/src/flows/Termination/json-schemas/additionalInformation';\nimport { employeeComunicationSchema } from '@/src/flows/Termination/json-schemas/employeeComunication';\nimport { paidTimeOffSchema } from '@/src/flows/Termination/json-schemas/paidTimeOff';\nimport { terminationDetailsSchema } from '@/src/flows/Termination/json-schemas/terminationDetails';\n\nexport const jsonSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n ...employeeComunicationSchema.data.schema.allOf,\n ...terminationDetailsSchema.data.schema.allOf,\n ...paidTimeOffSchema.data.schema.allOf,\n ...additionalInformationSchema.data.schema.allOf,\n ],\n properties: {\n ...employeeComunicationSchema.data.schema.properties,\n ...terminationDetailsSchema.data.schema.properties,\n ...paidTimeOffSchema.data.schema.properties,\n ...additionalInformationSchema.data.schema.properties,\n },\n required: [\n ...employeeComunicationSchema.data.schema.required,\n ...terminationDetailsSchema.data.schema.required,\n ...paidTimeOffSchema.data.schema.required,\n ...additionalInformationSchema.data.schema.required,\n ],\n type: 'object',\n 'x-jsf-order': [\n ...employeeComunicationSchema.data.schema['x-jsf-order'],\n ...terminationDetailsSchema.data.schema['x-jsf-order'],\n ...paidTimeOffSchema.data.schema['x-jsf-order'],\n ...additionalInformationSchema.data.schema['x-jsf-order'],\n ],\n 'x-rmt-meta': {\n jsfOldVersion: true,\n },\n },\n },\n};\n"],"mappings":"2JAKO,IAAMA,EAAa,CACxB,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,GAAGC,EAA2B,KAAK,OAAO,MAC1C,GAAGC,EAAyB,KAAK,OAAO,MACxC,GAAGC,EAAkB,KAAK,OAAO,MACjC,GAAGC,EAA4B,KAAK,OAAO,KAC7C,EACA,WAAY,CACV,GAAGH,EAA2B,KAAK,OAAO,WAC1C,GAAGC,EAAyB,KAAK,OAAO,WACxC,GAAGC,EAAkB,KAAK,OAAO,WACjC,GAAGC,EAA4B,KAAK,OAAO,UAC7C,EACA,SAAU,CACR,GAAGH,EAA2B,KAAK,OAAO,SAC1C,GAAGC,EAAyB,KAAK,OAAO,SACxC,GAAGC,EAAkB,KAAK,OAAO,SACjC,GAAGC,EAA4B,KAAK,OAAO,QAC7C,EACA,KAAM,SACN,cAAe,CACb,GAAGH,EAA2B,KAAK,OAAO,aAAa,EACvD,GAAGC,EAAyB,KAAK,OAAO,aAAa,EACrD,GAAGC,EAAkB,KAAK,OAAO,aAAa,EAC9C,GAAGC,EAA4B,KAAK,OAAO,aAAa,CAC1D,EACA,aAAc,CACZ,cAAe,EACjB,CACF,CACF,CACF","names":["jsonSchema","employeeComunicationSchema","terminationDetailsSchema","paidTimeOffSchema","additionalInformationSchema"]}
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-UZFEJMO6.js";import{a as l}from"./chunk-VQRE3YLW.js";import{h as m}from"./chunk-AUPAAQUT.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";import{createElement as p}from"react";function c({onSubmit:a,defaultValues:n}){let{formId:d,employeeBag:e}=s(),o=t({handleValidation:e.handleValidation,defaultValues:n??{},checkFieldUpdates:e.setFieldValues});return p(m,{...o,key:`form-${e.stepState.currentStep.name}`},i("form",{id:d,onSubmit:o.handleSubmit(f=>a(f,o)),className:"space-y-4 RemoteFlows__PayrollEmployeeForm",children:i(l,{fields:e.fields,fieldsets:e.meta["x-jsf-fieldsets"],fieldValues:e.fieldValues})}))}r(c,"PayrollEmployeeForm");export{c as a};
2
- //# sourceMappingURL=chunk-IUBHVGVV.js.map
1
+ import{b as s}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-AFTFDGSD.js";import{a as l}from"./chunk-5NN5RWBG.js";import{b as m}from"./chunk-C7KVPEVX.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";import{createElement as p}from"react";function c({onSubmit:a,defaultValues:n}){let{formId:d,employeeBag:e}=s(),o=t({handleValidation:e.handleValidation,defaultValues:n??{},checkFieldUpdates:e.setFieldValues});return p(m,{...o,key:`form-${e.stepState.currentStep.name}`},i("form",{id:d,onSubmit:o.handleSubmit(f=>a(f,o)),className:"space-y-4 RemoteFlows__PayrollEmployeeForm",children:i(l,{fields:e.fields,fieldsets:e.meta["x-jsf-fieldsets"],fieldValues:e.fieldValues})}))}r(c,"PayrollEmployeeForm");export{c as a};
2
+ //# sourceMappingURL=chunk-WU66SHVJ.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-WYIU74JN.js";import{b as i}from"./chunk-Q3ALCPJN.js";import{x as n}from"./chunk-C4HFMTSB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as y}from"react/jsx-runtime";function E({onSubmit:c,onSuccess:s,onError:u}){let{contractorOnboardingBag:r}=i(),l=t(async(e,d)=>{try{await c?.({countryCode:e.country});let o=await r.onSubmit(e);if(o?.data){await s?.(o?.data),r?.next();return}}catch(o){let S=n(o,r.meta?.fields?.select_country,d);u?.(S)}},"handleSubmit"),m=r.stepState.values?.select_country||r.initialValues.select_country;return y(a,{defaultValues:m,onSubmit:l})}t(E,"SelectCountryStep");export{E as a};
2
- //# sourceMappingURL=chunk-MZK2U65W.js.map
1
+ import{a}from"./chunk-FFRROEPQ.js";import{b as i}from"./chunk-Q3ALCPJN.js";import{x as n}from"./chunk-C4HFMTSB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as y}from"react/jsx-runtime";function E({onSubmit:c,onSuccess:s,onError:u}){let{contractorOnboardingBag:r}=i(),l=t(async(e,d)=>{try{await c?.({countryCode:e.country});let o=await r.onSubmit(e);if(o?.data){await s?.(o?.data),r?.next();return}}catch(o){let S=n(o,r.meta?.fields?.select_country,d);u?.(S)}},"handleSubmit"),m=r.stepState.values?.select_country||r.initialValues.select_country;return y(a,{defaultValues:m,onSubmit:l})}t(E,"SelectCountryStep");export{E as a};
2
+ //# sourceMappingURL=chunk-XLHTMWJ3.js.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-YPBPOUGX.js";import{a as l}from"./chunk-IUBHVGVV.js";import{b as a}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function u(r){let{employeeBag:e}=a(),s=o(r);return e.taxStepsAvailability.federal_taxes.isAvailable?n(l,{onSubmit:s,defaultValues:{...e.initialValues?.federal_taxes,...e.stepState.values?.federal_taxes}}):null}t(u,"FederalTaxesStep");export{u as a};
2
- //# sourceMappingURL=chunk-5J7DLDLW.js.map
1
+ import{a as o}from"./chunk-YPBPOUGX.js";import{a as l}from"./chunk-WU66SHVJ.js";import{b as a}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function u(r){let{employeeBag:e}=a(),s=o(r);return e.taxStepsAvailability.federal_taxes.isAvailable?n(l,{onSubmit:s,defaultValues:{...e.initialValues?.federal_taxes,...e.stepState.values?.federal_taxes}}):null}t(u,"FederalTaxesStep");export{u as a};
2
+ //# sourceMappingURL=chunk-XPLWBO73.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-2LSLWFZS.js";import{a as p}from"./chunk-JK4CPPN4.js";import{a as m}from"./chunk-WDPJIOLG.js";import{a as l}from"./chunk-RKP7EEAB.js";import{a as i}from"./chunk-ORP6DY5I.js";import{a as d}from"./chunk-KGSH67IW.js";import{a as t}from"./chunk-S2QXSX4Q.js";import{a as n}from"./chunk-WCJZAOZR.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as u}from"react/jsx-runtime";var D=r(({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b,render:g})=>{let A=c(),o=t({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b});return u(n.Provider,{value:{formId:A,adminBag:o},children:g({adminBag:o,components:{SelectCountryStep:i,ContractDetailsStep:m,AdministrativeDetailsStep:a,InvitationStep:l,SubmitButton:d,BackButton:p}})})},"PayrollAdminOnboardingFlow");export{D as a};
2
- //# sourceMappingURL=chunk-OTBCLDGR.js.map
1
+ import{a as d}from"./chunk-KGSH67IW.js";import{a}from"./chunk-I53YCEOC.js";import{a as p}from"./chunk-JK4CPPN4.js";import{a as m}from"./chunk-H4NJGAN4.js";import{a as l}from"./chunk-6UCTTR3O.js";import{a as i}from"./chunk-APSKAXM2.js";import{a as t}from"./chunk-YYIAA47F.js";import{a as n}from"./chunk-WCJZAOZR.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as u}from"react/jsx-runtime";var D=r(({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b,render:g})=>{let A=c(),o=t({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b});return u(n.Provider,{value:{formId:A,adminBag:o},children:g({adminBag:o,components:{SelectCountryStep:i,ContractDetailsStep:m,AdministrativeDetailsStep:a,InvitationStep:l,SubmitButton:d,BackButton:p}})})},"PayrollAdminOnboardingFlow");export{D as a};
2
+ //# sourceMappingURL=chunk-XS5NKKW4.js.map
@@ -0,0 +1,2 @@
1
+ import{a as cn,b as ln,c as un}from"./chunk-FF5OB2GF.js";import{a as At,b as Bt,c as xt,d as Nt,e as Qt,f as Jt,g as Ut,i as Kt,j as Gt,k as $t,l as Ht,m as zt,n as Wt,o as Xt,p as Yt,q as Zt,r as en,s as tn,t as nn,u as on,v as rn,w as an,x as sn}from"./chunk-GGVW6SG6.js";import{a as vt,b as St,d as Ct,e as wt,f as Pt,g as It,h as Vt}from"./chunk-FYCOEJEZ.js";import{a as kt,b as Tt,f as Rt,g as qt,h as Lt,i as jt}from"./chunk-TDKKCSKV.js";import{a as N,b as pe,c as S,d as Ft,g as Dt}from"./chunk-PB6UQ4A4.js";import{a as Et,b as Mt}from"./chunk-R23HFBV4.js";import{f as gt,i as ht,j as bt}from"./chunk-ZHFGV2GB.js";import{Z as yt}from"./chunk-DAUDKN32.js";import{a as pt,b,d as mt,h as p,i as C,t as ft,u as L,v}from"./chunk-C4HFMTSB.js";import{a as Ot}from"./chunk-M3TA5X2H.js";import{e as _t}from"./chunk-H2O4CVKF.js";import{a as _}from"./chunk-P37U34EQ.js";import{useCallback as pn,useEffect as E,useMemo as a,useRef as mn,useState as w}from"react";import fn from"lodash.omit";import{useQuery as Ei}from"@tanstack/react-query";var Mi=_(()=>{let{client:$}=_t(),{data:Q}=Bt(),y=xt(Q)?Q?.company?.id??"":"";return Ei({queryKey:["legal-entities",y],queryFn:_(()=>yt({client:$,path:{company_id:y},query:{page_size:100}}),"queryFn"),select:_(J=>J.data?.data?.legal_entities,"select"),enabled:!!y})},"useLegalEntities"),dn=_(()=>{let{data:$}=Mi();return $?.find(Q=>Q.is_default)},"useDefaultLegalEntity");var Oi={select_country:null,basic_information:"employment_basic_information",contract_origin:null,invoice_schedule:null,create_invoice_schedule:null,contract_details:null,eligibility_questionnaire:null,pricing_plan:null,contract_preview:null,review:null},Fi={employment_basic_information:"basic_information"},_n={remote_contract:"provided_by_remote"},Di={provided_by_remote:"remote_contract"},ao=_(({countryCode:$,externalId:Q,employmentId:y,skipSteps:J,options:d,initialValues:c})=>{let yn=d?.excludeProducts||[],Ee=mn(d?.onContractReviewed);E(()=>{Ee.current=d?.onContractReviewed},[d?.onContractReviewed]);let[m,Me]=w($||null),[o,gn]=w(y),[P,Oe]=w(void 0),re=mn({select_country:{},basic_information:{},contract_origin:{},invoice_schedule:{},create_invoice_schedule:{},contract_details:{},contract_preview:{},pricing_plan:{},eligibility_questionnaire:{}}),[H,hn]=w(void 0),[Fe,De]=w(!1),[Ae,bn]=w(!0),[ke,vn]=w(!0),[Te,Sn]=w(!0),[j,Cn]=w(!1),[Re,qe]=w(!1),[me,Le]=w(null),{steps:wn,stepsArray:Pn}=a(()=>kt({includeSelectCountry:!J?.includes("select_country"),includeContractOrigin:Te,includeInvoiceSchedule:j,includeCreateInvoiceSchedule:Re,includeEligibilityQuestionnaire:Fe,includeContractDetails:ke,includeContractPreview:Ae}),[Te,j,Re,Fe,ke,Ae,J]),{fieldValues:l,stepState:t,setFieldValues:fe,previousStep:In,nextStep:Vn,goToStep:U,setStepValues:_e}=Ot(wn);E(()=>{me&&(U(me),Le(null))},[me,U]);let{data:u,isLoading:En,refetch:je}=Et({employmentId:o,queryParams:{exclude_files:!0}}),{data:ae,refetch:Mn}=Mt({employmentId:o,enabled:!!o}),On=dn(),{data:Be}=sn({options:{queryOptions:{enabled:t.currentStep.name==="review"}}}),{status:B}=u||{},R=B&&Rt.includes(B),Fn=B&&!qt.includes(B),Dn=a(()=>B&&["invited","initiated"].includes(B)?"invited":"not_invited",[B]),xe=ht(),Ne=bt(m,d),ye=Gt(),Qe=At(),{mutateAsync:Je}=zt(ye,Qe,l),Ue=Zt(),Ke=en(),Ge=nn(),$e=wt(),He=Pt(),ze=It(),We=Vt(),{mutateAsyncOrThrow:An}=b(Ne),Xe=Qt(),Ye=Kt(),Ze=tn(),{mutateAsyncOrThrow:kn}=b(xe),{mutateAsyncOrThrow:Tn}=b(ye),{mutateAsyncOrThrow:Rn}=b(Xe),{mutateAsyncOrThrow:et}=b(Ye),{mutateAsyncOrThrow:qn}=b(Ue),{mutateAsyncOrThrow:tt}=b(Ke),{mutateAsyncOrThrow:Ln}=b(Ze),{mutateAsyncOrThrow:jn}=b(Ge),{mutateAsyncOrThrow:Bn}=b($e),{mutateAsyncOrThrow:xn}=b(He),{mutateAsyncOrThrow:Nn}=b(ze),{mutateAsyncOrThrow:Qn}=b(We);y&&u?.country?.code&&!m&&Me(u.country.code);let{selectCountryForm:K,isLoading:Jn,countries:nt}=an({jsfModify:d?.jsfModify?.select_country}),ge=a(()=>nt?.find(e=>e.value===m),[nt,m]),Un=a(()=>ge?.label,[ge]),Kn=t.currentStep.name==="pricing_plan"||!!y&&R,{form:M,isLoading:Gn,contractorSubscriptions:se,filteredContractorSubscriptions:z,refetch:he,isEligibilityQuestionnaireBlocked:W}=Ht(o,ge,{jsonSchemaVersion:d?.jsonSchemaVersion,queryOptions:{enabled:Kn},excludeProducts:yn,jsfModify:d?.jsfModify?.pricing_plan}),x=a(()=>!!se?.find(e=>e.product.identifier===S)?.eligibility_questionnaire?.submitted_at,[se]),it=a(()=>x?!1:H===S,[x,H]),ot=u?.contractor_type!=="cor",rt=(t.currentStep.name==="contract_origin"?l.contract_origin:void 0)??t.values?.contract_origin?.contract_origin??ae?.contract_origin,$n=_n[rt]??rt,G=H===N&&$n==="provided_by_customer";E(()=>{vn(!G)},[G]),E(()=>{De(!G&&it)},[G,it]),E(()=>{bn(!G&&ot)},[G,ot]);let ce=a(()=>se?.find(e=>e.product.identifier===S)?.eligibility_questionnaire?.responses,[se]),Hn=Oi[t.currentStep.name]||"contractor_basic_information",zn=Fi[Hn],Wn=u?.[zn]||{},Xn=_(({form:e,options:n={},query:r={},jsonSchemaVersion:s})=>{let q=Object.keys(l).length>0?{...c,...t.values?.[t.currentStep.name],...l}:{...c,...Wn};return gt({countryCode:m,form:e,fieldValues:q,query:r,options:{...n,queryOptions:{enabled:n.queryOptions?.enabled??!0}},jsonSchemaVersion:s})},"useJSONSchema"),Yn=!!(m&&(t.currentStep.name==="basic_information"||y)),Zn=!!(m==="GBR"&&y&&t.currentStep.name==="basic_information"),{data:X,isLoading:ei}=Wt(y,{enabled:Zn}),{data:le,isLoading:ti}=Xt(o,{enabled:!!o});E(()=>{le&&le.length>0&&!P&&Oe(le[0].id)},[le,P]);let{data:I,isLoading:ni}=Xn({form:"contractor_basic_information",options:{jsfModify:ln(m,Un,d),queryOptions:{enabled:Yn}},jsonSchemaVersion:jt(d)}),ii=a(()=>Tt(u?.basic_information?.provisional_start_date,l?.service_duration?.provisional_start_date),[u?.basic_information?.provisional_start_date,l?.service_duration?.provisional_start_date]),h=a(()=>{let e={standard:N,plus:pe,cor:S};if(l.subscription)return l.subscription;let n=t.values?.pricing_plan?.subscription;if(n&&!W)return n;if(x&&!W)return S;if(W&&x)return N;if(z&&z.length>0)return e[u?.contractor_type]||N},[l,t.values,x,u?.contractor_type,W,z]);E(()=>{h&&h!==H&&hn(h)},[h,H]),E(()=>{Sn(!J?.includes("contract_origin")&&h===N)},[J,h]),E(()=>{Cn(d?.features?.includes("create_invoice_schedule")??!1)},[d?.features]);let oi=a(()=>({...ce,...c,...t.values?.eligibility_questionnaire,...l}),[ce,c,t.values?.eligibility_questionnaire,l]),ri=a(()=>h===S&&t.currentStep.name==="eligibility_questionnaire"||!!y&&R&&h===S,[h,t.currentStep.name,y,R]),{data:O,isLoading:ai}=Yt({options:{queryOptions:{enabled:ri},jsfModify:d?.jsfModify?.eligibility_questionnaire},fieldValues:oi}),si=!!(m&&t.currentStep.name==="contract_details"||R),{data:V,isLoading:ci}=vt({countryCode:m,fieldValues:l,employmentId:o,options:{queryOptions:{enabled:si},jsfModify:cn(d?.jsfModify?.contract_details,ii,h,l,h===S)}}),li=a(()=>t.currentStep.name==="contract_preview"||!!y&&R,[t.currentStep.name,y,R]),{data:F}=Nt({fieldValues:l,options:{queryOptions:{enabled:li},jsfModify:un(d,l)}}),{data:D}=on({fieldValues:l,options:{jsfModify:d?.jsfModify?.contract_origin}}),A=rn({enabled:j&&t.currentStep.name==="invoice_schedule",jsfModify:d?.jsfModify?.invoice_schedule}),{data:f,isLoading:ui,refetch:be}=Ct({employmentId:o,options:{queryOptions:{enabled:j&&!!o&&t.currentStep.name==="invoice_schedule"}}}),{data:k,isLoading:di}=St({enabled:j&&t.currentStep.name==="create_invoice_schedule",employmentId:o,jsfModify:d?.jsfModify?.create_invoice_schedule,fieldValues:l}),{data:ve,isLoading:pi,refetch:mi}=Jt({employmentId:o,contractDocumentId:P,options:{queryOptions:{enabled:!!P}}}),{hasCompanySignedContract:fi}=Ut({employmentId:o,contractDocumentId:P,options:{queryOptions:{enabled:!!P}}}),i=a(()=>({select_country:K?.fields||[],basic_information:I?.fields||[],contract_origin:D?.fields||[],invoice_schedule:A?.fields||[],create_invoice_schedule:k?.fields||[],pricing_plan:M?.fields||[],eligibility_questionnaire:O?.fields||[],contract_details:V?.fields||[],contract_preview:F?.fields||[],review:[]}),[K?.fields,I?.fields,D?.fields,A?.fields,k?.fields,M?.fields,V?.fields,F?.fields,O?.fields]),_i={select_country:null,basic_information:I?.meta["x-jsf-fieldsets"],contract_origin:null,invoice_schedule:null,create_invoice_schedule:null,pricing_plan:null,contract_details:V?.meta["x-jsf-fieldsets"],eligibility_questionnaire:null,contract_preview:null,review:null},yi={select_country:K?.meta?.["x-jsf-presentation"],basic_information:I?.meta?.["x-jsf-presentation"],contract_origin:D?.meta?.["x-jsf-presentation"],invoice_schedule:A?.meta?.["x-jsf-presentation"],create_invoice_schedule:k?.meta?.["x-jsf-presentation"],pricing_plan:M?.meta?.["x-jsf-presentation"],eligibility_questionnaire:O?.meta?.["x-jsf-presentation"],contract_details:V?.meta?.["x-jsf-presentation"],contract_preview:F?.meta?.["x-jsf-presentation"],review:null},{country:gi,basic_information:ue={},contract_details:at={}}=u||{},st=gi?.code,Y=a(()=>C(i.select_country,{country:m||st||""}),[i.select_country,m,st]),Se=a(()=>X?.content?mt(X.content,X.name):null,[X?.content,X?.name]),Z=a(()=>{let e={...c,...ue,ir35:u?.contract_details?.ir_35,nationality_status:u?.contract_details?.nationality,...Se&&{ir35_sds_file:[Se]}};return C(i.basic_information,e)},[c,ue,u?.contract_details?.ir_35,u?.contract_details?.nationality,Se,i.basic_information]),ct=a(()=>{let e={...c,contract_origin:_n[ae?.contract_origin]??ae?.contract_origin};return C(i.contract_origin,e)},[i.contract_origin,c,ae?.contract_origin]),lt=a(()=>{let e={...c,...f&&{invoice_schedule_preference:"schedule"}};return C(i.invoice_schedule,e)},[i.invoice_schedule,c,f]),ut=a(()=>{if(f){let n={currency:f.currency,periodicity:f.periodicity,start_date:f.start_date,number:f.number,note:f.note,nr_occurrences:f.nr_occurrences};return f.items?.forEach((r,s)=>{let g=s+1;n[`item_${g}_description`]=r.description,n[`item_${g}_amount`]=r.amount}),C(i.create_invoice_schedule,n)}let e={...c};return C(i.create_invoice_schedule,e)},[i.create_invoice_schedule,c,f]),ee=a(()=>{let n={...{service_duration:{provisional_start_date:ue.provisional_start_date}},...c,...at};return C(i.contract_details,n)},[i.contract_details,at,c,ue]),te=a(()=>{let e=ve?.contract_document?.signatories?.find(r=>r.type==="company"),n={...c,signature:e?.signature};return C(i.contract_preview,n)},[i.contract_preview,c,ve]),ne=a(()=>{let n={...{subscription:h},...c};return C(i.pricing_plan,n)},[i.pricing_plan,c,h]),ie=a(()=>{let e={...c,...ce};return C(i.eligibility_questionnaire,e)},[i.eligibility_questionnaire,c,ce]),hi=a(()=>({select_country:Y,basic_information:Z,contract_origin:ct,invoice_schedule:lt,create_invoice_schedule:ut,contract_details:ee,contract_preview:te,pricing_plan:ne,eligibility_questionnaire:ie}),[Y,Z,ct,lt,ut,ee,te,ne,ie]),Ce=!!(y&&R&&t.currentStep.name!=="review"),we=Jn||ni||En||ci||Gn||pi||ei||ti||ai||di||ui,dt=a(()=>{let n=u?.contractor_type==="cor"||i.contract_preview.length>0;return!!(Ce&&!we&&P&&i.basic_information.length>0&&i.contract_details.length>0&&n)},[Ce,we,P,i.basic_information.length,i.contract_details.length,i.contract_preview.length,u?.contractor_type]);E(()=>{dt&&(re.current={select_country:L(Y,i.select_country,{skipMoneyConversion:!0}),basic_information:L(Z,i.basic_information,{skipMoneyConversion:!0}),contract_origin:{},invoice_schedule:{},create_invoice_schedule:{},contract_details:L(ee,i.contract_details,{skipMoneyConversion:!0}),contract_preview:L(te,i.contract_preview,{skipMoneyConversion:!0}),pricing_plan:L(ne,i.pricing_plan,{skipMoneyConversion:!0}),eligibility_questionnaire:L(ie,i.eligibility_questionnaire,{skipMoneyConversion:!0})},_e({select_country:Y,basic_information:Z,contract_origin:{},invoice_schedule:{},create_invoice_schedule:{},contract_details:ee,contract_preview:te,pricing_plan:ne,eligibility_questionnaire:ie,review:{}}),U("review"))},[dt,U,Y,Z,ee,_e,i.select_country,i.basic_information,i.contract_details,i.pricing_plan,ne,i.contract_preview,te,i.eligibility_questionnaire,ie]);let bi=_(e=>{U(e)},"goTo"),Pe=_(async e=>K&&t.currentStep.name==="select_country"?e:I&&t.currentStep.name==="basic_information"?await p(e,I?.fields,{isPartialValidation:!1}):V&&t.currentStep.name==="contract_details"?await p(e,V?.fields,{isPartialValidation:!1}):F&&t.currentStep.name==="contract_preview"?await p(e,F?.fields,{isPartialValidation:!1}):M&&t.currentStep.name==="pricing_plan"?await p(e,M?.fields,{isPartialValidation:!1}):O&&t.currentStep.name==="eligibility_questionnaire"?await p(e,O?.fields,{isPartialValidation:!1}):D&&t.currentStep.name==="contract_origin"?await p(e,D?.fields,{isPartialValidation:!1}):A&&t.currentStep.name==="invoice_schedule"?await p(e,A?.fields,{isPartialValidation:!1}):k&&t.currentStep.name==="create_invoice_schedule"?await p(e,k?.fields,{isPartialValidation:!1}):{},"parseFormValues"),vi=_(e=>{if(!pt(e))return null;let n=e.normalizedErrors.services_and_deliverables,r=Array.isArray(n)?n[0]:n;return r?.source===Dt?{error:r.error,source:r.source,skippable:r.skippable}:null},"extractAiValidationError");async function Si(e){let n=t.currentStep.name,r=await Pe(e);switch(n in re.current&&(re.current[n]=L(r,i[n])),t.currentStep.name){case"select_country":return Me(r.country),Promise.resolve({data:{countryCode:r.country}});case"basic_information":{let s=!o&&m,g=o&&m&&u?.country&&u?.country.code!==m;if(s||g){let Ve={basic_information:fn(r,"nationality_status","ir35","ir35_sds_file"),type:"contractor",country_code:m,external_id:Q},de=await kn(Ve),T=de?.data?.employment?.id;if(!T)throw v("Employment ID not found");return await Je({employmentId:T}),gn(T),de}else if(o){let q=fn(r,"nationality_status","ir35","ir35_sds_file");return await Je({employmentId:o}),An({employmentId:o,basic_information:q})}return}case"contract_details":{let{services_and_deliverables_ai_warning:s,services_and_deliverables_error_skippable:g,...q}=r,Ve=l.services_and_deliverables_error_skippable===!0,de={contract_document:q,skip_ai_checks:Ve};try{let T=await Tn({employmentId:o,payload:de}),oe=T?.data?.contract_document?.id;if(!oe)throw v("Contract document ID not found");return Oe(oe),T}catch(T){let oe=vi(T);throw oe&&fe({...e,services_and_deliverables_ai_warning:Lt(h===S),services_and_deliverables_error_skippable:oe.skippable}),T}}case"contract_preview":{if(fi)return Promise.resolve({data:{contract_document:{id:P}}});let s=await Rn({employmentId:o,contractDocumentId:P,payload:{signature:r.signature}});return await mi(),s}case"pricing_plan":{if(e.subscription===Ft)return Promise.resolve({data:{subscription:e.subscription}});if(z.length===0)throw v("No available subscriptions.");if(!e.subscription&&z.length>0)throw v("Please select a subscription plan.");if(W&&[S,pe].includes(e.subscription))throw v(`This individual is not eligible for ${$t[e.subscription]}.`);if(x&&e.subscription!==S)try{await Ln({employmentId:o}),await he()}catch(g){if(g?.response?.status!==404)throw g;await he()}if(e.subscription==N)return et({employmentId:o,payload:{operation:"downgrade"}});if(e.subscription==pe)return et({employmentId:o,payload:{operation:"upgrade"}});if(e.subscription==S)return x&&u?.contractor_type!=="cor"?tt({employmentId:o}):Promise.resolve({data:{subscription:e.subscription}});throw v("invalid selection")}case"contract_origin":{let s=Di[r.contract_origin]??r.contract_origin,g=r.contract_origin==="provided_by_customer"?"contractor_agreement":"contractor_services_agreement";return await jn({employmentId:o,contractOrigin:s,templateType:g}),await Mn(),{data:{contractOrigin:e.contract_origin}}}case"invoice_schedule":{let s=e.invoice_schedule_preference==="schedule";return qe(s),{data:{invoiceSchedulePreference:e.invoice_schedule_preference}}}case"create_invoice_schedule":{if(!o)throw v("Employment ID is required");if(f?.id){let q=await xn({scheduleId:f.id,values:r});return await be(),q}let s=await Bn({employmentId:o,values:r}),g=s?.data?.failures;if(g&&g.length>0)throw v("Failed to create invoice schedule");return await be(),s}case"eligibility_questionnaire":try{if((await qn({employmentId:o,payload:r}))?.data?.is_blocking)throw De(!1),Le("pricing_plan"),v("This individual is not eligible for Contractor of Record.");return await tt({employmentId:o})}finally{await he()}default:throw v("Invalid step state")}}_(Si,"onSubmit");let Ci=_(()=>{Ee.current?.()},"markContractAsReviewed"),wi=_(async()=>{if(!f?.id)throw v("No invoice schedule to skip");await Nn({scheduleId:f.id}),await be(),qe(!1),_e({...t.values,invoice_schedule:{},create_invoice_schedule:{}}),U("invoice_schedule")},"skipInvoiceSchedule"),Pi=_(async e=>{if(!o)throw v("Employment ID is required");let n=await Pe(e),s=(await Qn({employmentId:o,values:n}))?.data?.contractor_invoice_preview;if(s)return{...s,content:ft(s.content)}},"previewContractorInvoice"),Ii=_(()=>{o&&je(),Vn()},"handleNextStep"),Ie=pn(async e=>{if(t.currentStep.name==="select_country")return K.handleValidation(e);if(I&&t.currentStep.name==="basic_information"){let n=await p(e,I?.fields,{isPartialValidation:!1});return I?.handleValidation(n)}if(V&&t.currentStep.name==="contract_details"){let n=await p(e,V?.fields,{isPartialValidation:!1});return V?.handleValidation(n)}if(F&&t.currentStep.name==="contract_preview"){let n=await p(e,F?.fields,{isPartialValidation:!0});return F?.handleValidation(n)}if(M&&t.currentStep.name==="pricing_plan"){let n=await p(e,M?.fields,{isPartialValidation:!1});return M?.handleValidation(n)}if(O&&t.currentStep.name==="eligibility_questionnaire"){let n=await p(e,O?.fields,{isPartialValidation:!1});return O?.handleValidation(n)}if(D&&t.currentStep.name==="contract_origin"){let n=await p(e,D?.fields,{isPartialValidation:!1});return D?.handleValidation(n)}if(A&&t.currentStep.name==="invoice_schedule"){let n=await p(e,A?.fields,{isPartialValidation:!1});return A?.handleValidation(n)}if(k&&t.currentStep.name==="create_invoice_schedule"){let n=await p(e,k?.fields,{isPartialValidation:!1});return k?.handleValidation(n)}return null},[t.currentStep.name,K,I,V,F,M,O,D,A,k]),Vi=pn(async e=>{fe(e),j&&["invoice_schedule","create_invoice_schedule"].includes(t.currentStep.name)&&await Ie(e)},[fe,j,t,Ie]);return{isLoading:we||Ce,fieldValues:l,stepState:t,checkFieldUpdates:Vi,markContractAsReviewed:Ci,existingInvoiceSchedule:f,skipInvoiceSchedule:wi,isSkippingInvoiceSchedule:ze.isPending,previewContractorInvoice:Pi,isPreviewingInvoiceSchedule:We.isPending,back:In,next:Ii,goTo:bi,onSubmit:Si,fields:i[t.currentStep.name],meta:{fields:re.current,fieldsets:_i[t.currentStep.name],presentation:yi[t.currentStep.name]},parseFormValues:Pe,canSkipAiValidation:l.services_and_deliverables_error_skippable===!0,handleValidation:Ie,initialValues:hi,employmentId:o,refetchEmployment:je,isSubmitting:xe.isPending||Ne.isPending||ye.isPending||Xe.isPending||Ye.isPending||Qe.isPending||Ue.isPending||Ke.isPending||Ze.isPending||Ge.isPending||$e.isPending||He.isPending,documentPreviewPdf:ve,canInvite:Fn,isEmploymentReadOnly:R,invitedStatus:Dn,employment:u,defaultLegalEntity:On,needsCompanyVerification:Be?.some(e=>e.type==="verify_company")??!1,needsRemotePaymentsSetup:Be?.some(e=>e.type==="setup_remote_payments")??!1,steps:Pn}},"useContractorOnboarding");export{ao as a};
2
+ //# sourceMappingURL=chunk-XTZJKL3C.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/hooks.tsx","../src/common/api/legal-entities.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { FieldValues } from 'react-hook-form';\nimport omit from 'lodash.omit';\nimport { $TSFixMe, JSFFields, NestedMeta } from '@/src/types/remoteFlows';\nimport {\n CreateContractDocument,\n Employment,\n EmploymentCreateParams,\n} from '@/src/client/types.gen';\nimport {\n getInitialValues,\n parseJSFToValidate,\n} from '@/src/components/form/utils';\nimport { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';\nimport {\n useCreateContractorContractDocument,\n useGetContractDocumentSignatureSchema,\n usePostManageContractorSubscriptions,\n useContractorSubscriptionSchemaField,\n useGetShowContractDocument,\n useSignContractDocument,\n useUpdateUKandSaudiFields,\n useGetIR35File,\n useGetContractDocuments,\n useGetEligibilityQuestionnaire,\n usePostCreateEligibilityQuestionnaire,\n usePostManageContractorCorSubscription,\n useDeleteContractorCorSubscription,\n useCountriesSchemaField,\n CONTRACT_PRODUCT_TITLES,\n useHasCompanySignedContract,\n useCompanyOpenTasks,\n useSetContractOrigin,\n useGetContractOriginSchema,\n useGetInvoiceScheduleSchema,\n useGetCreateInvoiceScheduleSchema,\n useCreateInvoiceSchedule,\n useUpdateInvoiceSchedule,\n useSkipInvoiceSchedule,\n usePreviewContractorInvoice,\n useGetExistingInvoiceSchedule,\n} from '@/src/flows/ContractorOnboarding/api';\nimport { useContractorContractDetailsSchema } from '@/src/common/api/contractor-contract-details';\nimport {\n ContractorOnboardingFlowProps,\n ContractorOnboardingHookOptions,\n} from '@/src/flows/ContractorOnboarding/types';\nimport {\n buildSteps,\n calculateProvisionalStartDateDescription,\n reviewStepAllowedEmploymentStatus,\n disabledInviteButtonEmploymentStatus,\n StepKeys,\n getBasicInformationSchemaVersion,\n} from '@/src/flows/ContractorOnboarding/utils';\nimport {\n useCreateEmployment,\n useJSONSchemaForm,\n useUpdateEmployment,\n} from '@/src/flows/Onboarding/api';\nimport { FlowOptions, JSFModify, JSONSchemaFormType } from '@/src/flows/types';\nimport { useStepState } from '@/src/flows/useStepState';\nimport { mutationToPromise, isMutationError } from '@/src/lib/mutations';\nimport {\n clearBase64Data,\n createStructuredError,\n prettifyFormValues,\n} from '@/src/lib/utils';\nimport { JSFFieldset } from '@/src/types/remoteFlows';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n corProductIdentifier,\n eorProductIdentifier,\n REMOTE_AI_ERROR_SOURCE,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport {\n buildBasicInformationJsfModify,\n buildContractDetailsJsfModify,\n buildContractPreviewJsfModify,\n} from '@/src/flows/ContractorOnboarding/jsfModify';\nimport { transformAiErrorResponse } from '@/src/flows/ContractorOnboarding/utils';\nimport {\n AiValidationError,\n ContractorInvoicePreview,\n} from '@/src/flows/ContractorOnboarding/types';\nimport { useUploadFile } from '@/src/common/api/files';\nimport { dataURLtoFile } from '@/src/lib/files';\nimport {\n useEmploymentQuery,\n useBasicInformationQuery,\n} from '@/src/common/api/employment';\nimport { useDefaultLegalEntity } from '@/src/common/api/legal-entities';\n\ntype useContractorOnboardingProps = Omit<\n ContractorOnboardingFlowProps,\n 'render' | 'options'\n> & {\n options: ContractorOnboardingHookOptions;\n};\n\nconst stepToFormSchemaMap: Record<StepKeys, JSONSchemaFormType | null> = {\n select_country: null,\n basic_information: 'employment_basic_information',\n contract_origin: null,\n invoice_schedule: null,\n create_invoice_schedule: null,\n contract_details: null,\n eligibility_questionnaire: null,\n pricing_plan: null,\n contract_preview: null,\n review: null,\n};\n\nconst jsonSchemaToEmployment: Partial<\n Record<JSONSchemaFormType, keyof Employment>\n> = {\n employment_basic_information: 'basic_information',\n};\n\nconst contractOriginMapping: Record<string, string> = {\n remote_contract: 'provided_by_remote',\n // Add other mappings as needed\n};\n\n// Inverse mapping: frontend -> backend\nconst contractOriginToBackend: Record<string, string> = {\n provided_by_remote: 'remote_contract',\n // Add other mappings as needed\n};\n\nexport const useContractorOnboarding = ({\n countryCode,\n externalId,\n employmentId,\n skipSteps,\n options,\n initialValues: onboardingInitialValues,\n}: useContractorOnboardingProps) => {\n const excludeProducts = options?.excludeProducts || [];\n\n const onContractReviewedRef = useRef(options?.onContractReviewed);\n\n useEffect(() => {\n onContractReviewedRef.current = options?.onContractReviewed;\n }, [options?.onContractReviewed]);\n\n const [internalCountryCode, setInternalCountryCode] = useState<string | null>(\n countryCode || null,\n );\n const [internalEmploymentId, setInternalEmploymentId] = useState<\n string | undefined\n >(employmentId);\n const [internalContractDocumentId, setInternalContractDocumentId] = useState<\n string | undefined\n >(undefined);\n const fieldsMetaRef = useRef<{\n select_country: NestedMeta;\n basic_information: NestedMeta;\n contract_origin: NestedMeta;\n invoice_schedule: NestedMeta;\n create_invoice_schedule: NestedMeta;\n contract_details: NestedMeta;\n contract_preview: NestedMeta;\n pricing_plan: NestedMeta;\n eligibility_questionnaire: NestedMeta;\n }>({\n select_country: {},\n basic_information: {},\n contract_origin: {},\n invoice_schedule: {},\n create_invoice_schedule: {},\n contract_details: {},\n contract_preview: {},\n pricing_plan: {},\n eligibility_questionnaire: {},\n });\n\n const [selectedProduct, setSelectedProduct] = useState<string | undefined>(\n undefined,\n );\n\n const [includeEligibilityQuestionnaire, setIncludeEligibilityQuestionnaire] =\n useState<boolean>(false);\n\n const [includeContractPreview, setIncludeContractPreview] =\n useState<boolean>(true);\n\n const [includeContractDetails, setIncludeContractDetails] =\n useState<boolean>(true);\n\n const [includeContractOrigin, setIncludeContractOrigin] =\n useState<boolean>(true);\n\n const [includeInvoiceSchedule, setIncludeInvoiceSchedule] =\n useState<boolean>(false);\n\n const [includeCreateInvoiceSchedule, setIncludeCreateInvoiceSchedule] =\n useState<boolean>(false);\n\n const [pendingNavigationStep, setPendingNavigationStep] =\n useState<StepKeys | null>(null);\n\n const { steps, stepsArray } = useMemo(\n () =>\n buildSteps({\n includeSelectCountry: !skipSteps?.includes('select_country'),\n includeContractOrigin: includeContractOrigin,\n includeInvoiceSchedule: includeInvoiceSchedule,\n includeCreateInvoiceSchedule: includeCreateInvoiceSchedule,\n includeEligibilityQuestionnaire: includeEligibilityQuestionnaire,\n includeContractDetails: includeContractDetails,\n includeContractPreview: includeContractPreview,\n }),\n [\n includeContractOrigin,\n includeInvoiceSchedule,\n includeCreateInvoiceSchedule,\n includeEligibilityQuestionnaire,\n includeContractDetails,\n includeContractPreview,\n skipSteps,\n ],\n );\n\n const {\n fieldValues,\n stepState,\n setFieldValues,\n previousStep,\n nextStep,\n goToStep,\n setStepValues,\n } = useStepState(steps);\n\n useEffect(() => {\n if (pendingNavigationStep) {\n // Now steps have been updated\n goToStep(pendingNavigationStep);\n setPendingNavigationStep(null);\n }\n }, [pendingNavigationStep, goToStep]);\n\n const {\n data: employment,\n isLoading: isLoadingEmployment,\n refetch: refetchEmployment,\n } = useEmploymentQuery({\n employmentId: internalEmploymentId as string,\n queryParams: { exclude_files: true },\n });\n\n const { data: basicInformation, refetch: refetchBasicInformation } =\n useBasicInformationQuery({\n employmentId: internalEmploymentId as string,\n enabled: !!internalEmploymentId,\n });\n\n const defaultLegalEntity = useDefaultLegalEntity();\n\n const { data: openTasks } = useCompanyOpenTasks({\n options: {\n queryOptions: {\n enabled: stepState.currentStep.name === 'review',\n },\n },\n });\n\n const { status: employmentStatus } = employment || {};\n\n const isEmploymentReadOnly =\n employmentStatus &&\n reviewStepAllowedEmploymentStatus.includes(employmentStatus);\n\n const canInvite =\n employmentStatus &&\n !disabledInviteButtonEmploymentStatus.includes(employmentStatus);\n\n const invitedStatus: 'invited' | 'not_invited' = useMemo(() => {\n const invitedStatuses = ['invited', 'initiated'];\n const isInvited =\n employmentStatus && invitedStatuses.includes(employmentStatus);\n\n return isInvited ? 'invited' : 'not_invited';\n }, [employmentStatus]);\n\n const createEmploymentMutation = useCreateEmployment();\n const updateEmploymentMutation = useUpdateEmployment(\n internalCountryCode as string,\n options as $TSFixMe, // TODO: done it as its shared between contractor and onboarding flows\n );\n const createContractorContractDocumentMutation =\n useCreateContractorContractDocument();\n const uploadFileMutation = useUploadFile();\n const { mutateAsync: updateUKandSaudiFieldsMutation } =\n useUpdateUKandSaudiFields(\n createContractorContractDocumentMutation,\n uploadFileMutation,\n fieldValues,\n );\n const createEligibilityQuestionnaireMutation =\n usePostCreateEligibilityQuestionnaire();\n const manageContractorCorSubscriptionMutation =\n usePostManageContractorCorSubscription();\n const setContractOriginMutation = useSetContractOrigin();\n const createInvoiceScheduleMutation = useCreateInvoiceSchedule();\n const updateInvoiceScheduleMutation = useUpdateInvoiceSchedule();\n const skipInvoiceScheduleMutation = useSkipInvoiceSchedule();\n const previewContractorInvoiceMutation = usePreviewContractorInvoice();\n\n const { mutateAsyncOrThrow: updateEmploymentMutationAsync } =\n mutationToPromise(updateEmploymentMutation);\n const signContractDocumentMutation = useSignContractDocument();\n const manageContractorSubscriptionMutation =\n usePostManageContractorSubscriptions();\n const deleteContractorCorSubscriptionMutation =\n useDeleteContractorCorSubscription();\n\n const { mutateAsyncOrThrow: createEmploymentMutationAsync } =\n mutationToPromise(createEmploymentMutation);\n\n const { mutateAsyncOrThrow: createContractorContractDocumentMutationAsync } =\n mutationToPromise(createContractorContractDocumentMutation);\n\n const { mutateAsyncOrThrow: signContractDocumentMutationAsync } =\n mutationToPromise(signContractDocumentMutation);\n\n const { mutateAsyncOrThrow: manageContractorSubscriptionMutationAsync } =\n mutationToPromise(manageContractorSubscriptionMutation);\n\n const { mutateAsyncOrThrow: createEligibilityQuestionnaireMutationAsync } =\n mutationToPromise(createEligibilityQuestionnaireMutation);\n\n const { mutateAsyncOrThrow: manageContractorCorSubscriptionMutationAsync } =\n mutationToPromise(manageContractorCorSubscriptionMutation);\n\n const { mutateAsyncOrThrow: deleteContractorCorSubscriptionMutationAsync } =\n mutationToPromise(deleteContractorCorSubscriptionMutation);\n\n const { mutateAsyncOrThrow: setContractOriginMutationAsync } =\n mutationToPromise(setContractOriginMutation);\n\n const { mutateAsyncOrThrow: createInvoiceScheduleMutationAsync } =\n mutationToPromise(createInvoiceScheduleMutation);\n\n const { mutateAsyncOrThrow: updateInvoiceScheduleMutationAsync } =\n mutationToPromise(updateInvoiceScheduleMutation);\n\n const { mutateAsyncOrThrow: skipInvoiceScheduleMutationAsync } =\n mutationToPromise(skipInvoiceScheduleMutation);\n\n const { mutateAsyncOrThrow: previewContractorInvoiceMutationAsync } =\n mutationToPromise(previewContractorInvoiceMutation);\n\n // if the employment is loaded, country code has not been set yet\n // we set the internal country code with the employment country code\n if (employmentId && employment?.country?.code && !internalCountryCode) {\n setInternalCountryCode(employment.country.code);\n }\n\n const {\n selectCountryForm,\n isLoading: isLoadingCountries,\n countries,\n } = useCountriesSchemaField({\n jsfModify: options?.jsfModify?.select_country,\n });\n\n const selectedCountry = useMemo(() => {\n return countries?.find((country) => country.value === internalCountryCode);\n }, [countries, internalCountryCode]);\n\n const countryName = useMemo(() => {\n return selectedCountry?.label;\n }, [selectedCountry]);\n\n const isPricingPlanEnabled =\n stepState.currentStep.name === 'pricing_plan' ||\n (Boolean(employmentId) && isEmploymentReadOnly);\n\n const {\n form: selectContractorSubscriptionForm,\n isLoading: isLoadingContractorSubscriptions,\n contractorSubscriptions,\n filteredContractorSubscriptions,\n refetch: refetchContractorSubscriptions,\n isEligibilityQuestionnaireBlocked,\n } = useContractorSubscriptionSchemaField(\n internalEmploymentId as string,\n selectedCountry,\n {\n jsonSchemaVersion: options?.jsonSchemaVersion,\n queryOptions: {\n enabled: isPricingPlanEnabled,\n },\n excludeProducts: excludeProducts,\n jsfModify: options?.jsfModify?.pricing_plan,\n },\n );\n\n const hasEligibilityQuestionnaireSubmitted = useMemo(() => {\n return Boolean(\n contractorSubscriptions?.find(\n (subscription) =>\n subscription.product.identifier === corProductIdentifier,\n )?.eligibility_questionnaire?.submitted_at,\n );\n }, [contractorSubscriptions]);\n\n const shouldIncludeEligibilityQuestionnaire = useMemo(() => {\n if (hasEligibilityQuestionnaireSubmitted) return false;\n return selectedProduct === corProductIdentifier;\n }, [hasEligibilityQuestionnaireSubmitted, selectedProduct]);\n\n const shouldIncludeContractPreview = employment?.contractor_type !== 'cor';\n\n const rawContractOrigin =\n (stepState.currentStep.name === 'contract_origin'\n ? fieldValues.contract_origin\n : undefined) ??\n stepState.values?.contract_origin?.contract_origin ??\n basicInformation?.contract_origin;\n\n const selectedContractOrigin =\n contractOriginMapping[rawContractOrigin] ?? rawContractOrigin;\n\n const isContractProvidedByCustomer =\n selectedProduct === contractorStandardProductIdentifier &&\n selectedContractOrigin === 'provided_by_customer';\n\n useEffect(() => {\n setIncludeContractDetails(!isContractProvidedByCustomer);\n }, [isContractProvidedByCustomer]);\n\n useEffect(() => {\n setIncludeEligibilityQuestionnaire(\n !isContractProvidedByCustomer && shouldIncludeEligibilityQuestionnaire,\n );\n }, [isContractProvidedByCustomer, shouldIncludeEligibilityQuestionnaire]);\n\n useEffect(() => {\n setIncludeContractPreview(\n !isContractProvidedByCustomer && shouldIncludeContractPreview,\n );\n }, [isContractProvidedByCustomer, shouldIncludeContractPreview]);\n\n const eligibilityAnswers = useMemo(() => {\n return contractorSubscriptions?.find(\n (subscription) =>\n subscription.product.identifier === corProductIdentifier,\n )?.eligibility_questionnaire?.responses;\n }, [contractorSubscriptions]);\n\n const formType =\n stepToFormSchemaMap[stepState.currentStep.name] ||\n 'contractor_basic_information';\n const employmentKey = jsonSchemaToEmployment[formType] as keyof Employment;\n const serverEmploymentData = (employment?.[employmentKey] || {}) as Record<\n string,\n unknown\n >;\n\n const useJSONSchema = ({\n form,\n options: jsonSchemaOptions = {},\n query = {},\n jsonSchemaVersion,\n }: {\n form: JSONSchemaFormType;\n options?: {\n jsfModify?: JSFModify;\n queryOptions?: { enabled?: boolean };\n jsonSchemaVersion?: FlowOptions['jsonSchemaVersion'];\n };\n query?: Record<string, string>;\n jsonSchemaVersion?: number | 'latest';\n }) => {\n const hasUserEnteredAnyValues = Object.keys(fieldValues).length > 0;\n // when you write on the fields, the values are stored in the fieldValues state\n // when values are stored in the stepState is when the user has navigated to the step\n // and then we have the values from the server and the onboardingInitialValues that the user can inject,\n const mergedFormValues = hasUserEnteredAnyValues\n ? {\n ...onboardingInitialValues,\n ...stepState.values?.[stepState.currentStep.name], // Restore values for the current step\n ...fieldValues,\n }\n : {\n ...onboardingInitialValues,\n ...serverEmploymentData,\n };\n\n return useJSONSchemaForm({\n countryCode: internalCountryCode as string,\n form: form,\n fieldValues: mergedFormValues,\n query,\n options: {\n ...jsonSchemaOptions,\n queryOptions: {\n enabled: jsonSchemaOptions.queryOptions?.enabled ?? true,\n },\n },\n jsonSchemaVersion,\n });\n };\n\n const isBasicInformationDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'basic_information' ||\n Boolean(employmentId)),\n );\n\n const isIR35FileEnabled = Boolean(\n internalCountryCode === 'GBR' &&\n employmentId &&\n stepState.currentStep.name === 'basic_information',\n );\n\n const { data: ir35File, isLoading: isLoadingIR35File } = useGetIR35File(\n employmentId as string,\n {\n enabled: isIR35FileEnabled,\n },\n );\n\n const { data: contractDocuments, isLoading: isLoadingContractDocuments } =\n useGetContractDocuments(internalEmploymentId as string, {\n enabled: Boolean(internalEmploymentId),\n });\n\n useEffect(() => {\n if (\n contractDocuments &&\n contractDocuments.length > 0 &&\n !internalContractDocumentId\n ) {\n setInternalContractDocumentId(contractDocuments[0].id);\n }\n }, [contractDocuments, internalContractDocumentId]);\n\n const {\n data: basicInformationForm,\n isLoading: isLoadingBasicInformationForm,\n } = useJSONSchema({\n form: 'contractor_basic_information',\n options: {\n jsfModify: buildBasicInformationJsfModify(\n internalCountryCode as string,\n countryName,\n options,\n ),\n queryOptions: {\n enabled: isBasicInformationDetailsEnabled,\n },\n },\n jsonSchemaVersion: getBasicInformationSchemaVersion(options),\n });\n\n const descriptionProvisionalStartDate = useMemo(() => {\n return calculateProvisionalStartDateDescription(\n employment?.basic_information?.provisional_start_date as string,\n fieldValues?.service_duration?.provisional_start_date as string,\n );\n }, [\n employment?.basic_information?.provisional_start_date,\n fieldValues?.service_duration?.provisional_start_date,\n ]);\n\n /**\n * When the user selects COR, the data isn't saved yet in the BE\n * We need to use the internalState to know what has happened\n */\n const selectedPricingPlan = useMemo(() => {\n const subscriptions = {\n standard: contractorStandardProductIdentifier,\n plus: contractorPlusProductIdentifier,\n cor: corProductIdentifier,\n };\n\n // HIGHEST PRIORITY: Current form value (user is actively selecting)\n if (fieldValues.subscription) {\n return fieldValues.subscription;\n }\n\n // SECOND: Previously submitted value in this session\n const subscription = stepState.values?.pricing_plan?.subscription;\n if (subscription && !isEligibilityQuestionnaireBlocked) {\n return subscription;\n }\n\n // THIRD: Backend state (eligibility submitted or employment contractor_type)\n if (\n hasEligibilityQuestionnaireSubmitted &&\n !isEligibilityQuestionnaireBlocked\n ) {\n return corProductIdentifier;\n }\n\n // Fourth: If the eligibility questionnaire is blocked and has been submitted, return the standard product\n if (\n isEligibilityQuestionnaireBlocked &&\n hasEligibilityQuestionnaireSubmitted\n ) {\n return contractorStandardProductIdentifier;\n }\n\n // Fifth: If there are no available subscriptions, return undefined\n const hasAvailableSubscriptions =\n filteredContractorSubscriptions &&\n filteredContractorSubscriptions.length > 0;\n\n if (!hasAvailableSubscriptions) {\n return undefined;\n }\n\n // FALLBACK: Employment contractor_type or default\n return (\n subscriptions[\n employment?.contractor_type as keyof typeof subscriptions\n ] || contractorStandardProductIdentifier\n );\n }, [\n fieldValues,\n stepState.values,\n hasEligibilityQuestionnaireSubmitted,\n employment?.contractor_type,\n isEligibilityQuestionnaireBlocked,\n filteredContractorSubscriptions,\n ]);\n\n useEffect(() => {\n if (selectedPricingPlan && selectedPricingPlan !== selectedProduct) {\n setSelectedProduct(selectedPricingPlan);\n }\n }, [selectedPricingPlan, selectedProduct]);\n\n useEffect(() => {\n setIncludeContractOrigin(\n !skipSteps?.includes('contract_origin') &&\n selectedPricingPlan === contractorStandardProductIdentifier,\n );\n }, [skipSteps, selectedPricingPlan]);\n\n useEffect(() => {\n setIncludeInvoiceSchedule(\n options?.features?.includes('create_invoice_schedule') ?? false,\n );\n }, [options?.features]);\n\n const eligibilityFields = useMemo(() => {\n return {\n ...eligibilityAnswers,\n ...onboardingInitialValues,\n ...stepState.values?.eligibility_questionnaire,\n ...fieldValues,\n };\n }, [\n eligibilityAnswers,\n onboardingInitialValues,\n stepState.values?.eligibility_questionnaire,\n fieldValues,\n ]);\n\n const isEligibilityQuestionnaireEnabled = useMemo(() => {\n return (\n (selectedPricingPlan === corProductIdentifier &&\n stepState.currentStep.name === 'eligibility_questionnaire') ||\n (Boolean(employmentId) &&\n isEmploymentReadOnly &&\n selectedPricingPlan === corProductIdentifier)\n );\n }, [\n selectedPricingPlan,\n stepState.currentStep.name,\n employmentId,\n isEmploymentReadOnly,\n ]);\n\n const {\n data: eligibilityQuestionnaireForm,\n isLoading: isLoadingEligibilityQuestionnaire,\n } = useGetEligibilityQuestionnaire({\n options: {\n queryOptions: {\n enabled: isEligibilityQuestionnaireEnabled,\n },\n jsfModify: options?.jsfModify?.eligibility_questionnaire,\n },\n fieldValues: eligibilityFields,\n });\n\n const isContractorOnboardingDetailsEnabled = Boolean(\n (internalCountryCode &&\n stepState.currentStep.name === 'contract_details') ||\n isEmploymentReadOnly,\n );\n\n const {\n data: contractorOnboardingDetailsForm,\n isLoading: isLoadingContractorOnboardingDetailsForm,\n } = useContractorContractDetailsSchema({\n countryCode: internalCountryCode as string,\n fieldValues: fieldValues,\n employmentId: internalEmploymentId as string,\n options: {\n queryOptions: {\n enabled: isContractorOnboardingDetailsEnabled,\n },\n jsfModify: buildContractDetailsJsfModify(\n options?.jsfModify?.contract_details,\n descriptionProvisionalStartDate,\n selectedPricingPlan,\n fieldValues,\n selectedPricingPlan === corProductIdentifier,\n ),\n },\n });\n\n const isSignatureSchemaEnabled = useMemo(() => {\n return (\n stepState.currentStep.name === 'contract_preview' ||\n (Boolean(employmentId) && isEmploymentReadOnly)\n );\n }, [stepState.currentStep.name, employmentId, isEmploymentReadOnly]);\n\n const { data: signatureSchemaForm } = useGetContractDocumentSignatureSchema({\n fieldValues: fieldValues,\n options: {\n queryOptions: {\n enabled: isSignatureSchemaEnabled,\n },\n jsfModify: buildContractPreviewJsfModify(options, fieldValues),\n },\n });\n\n const { data: contractOriginForm } = useGetContractOriginSchema({\n fieldValues: fieldValues,\n options: {\n jsfModify: options?.jsfModify?.contract_origin,\n },\n });\n\n const invoiceScheduleForm = useGetInvoiceScheduleSchema({\n enabled:\n includeInvoiceSchedule &&\n stepState.currentStep.name === 'invoice_schedule',\n jsfModify: options?.jsfModify?.invoice_schedule,\n });\n\n const {\n data: existingInvoiceSchedule,\n isLoading: isLoadingInvoiceSchedules,\n refetch: refetchInvoiceSchedule,\n } = useGetExistingInvoiceSchedule({\n employmentId: internalEmploymentId as string,\n options: {\n queryOptions: {\n enabled:\n includeInvoiceSchedule &&\n Boolean(internalEmploymentId) &&\n stepState.currentStep.name === 'invoice_schedule',\n },\n },\n });\n\n const {\n data: createInvoiceScheduleForm,\n isLoading: isLoadingCreateInvoiceScheduleForm,\n } = useGetCreateInvoiceScheduleSchema({\n enabled:\n includeInvoiceSchedule &&\n stepState.currentStep.name === 'create_invoice_schedule',\n employmentId: internalEmploymentId,\n jsfModify: options?.jsfModify?.create_invoice_schedule,\n // The schema hides item rows 2..10 until the row before them is filled in, and that\n // conditional is evaluated against the values handed to createHeadlessForm. Calling\n // handleValidation on change (see checkFieldUpdates) validates but does not re-derive\n // field visibility, so without the current values here every row past the first stays\n // hidden for good.\n fieldValues,\n });\n\n const {\n data: documentPreviewPdf,\n isLoading: isLoadingDocumentPreviewForm,\n refetch: refetchDocumentPreviewForm,\n } = useGetShowContractDocument({\n employmentId: internalEmploymentId as string,\n contractDocumentId: internalContractDocumentId as string,\n options: {\n queryOptions: {\n enabled: Boolean(internalContractDocumentId),\n },\n },\n });\n\n const { hasCompanySignedContract } = useHasCompanySignedContract({\n employmentId: internalEmploymentId as string,\n contractDocumentId: internalContractDocumentId as string,\n options: {\n queryOptions: {\n enabled: Boolean(internalContractDocumentId),\n },\n },\n });\n\n const stepFields: Record<StepKeys, JSFFields> = useMemo(\n () => ({\n select_country: selectCountryForm?.fields || [],\n basic_information: basicInformationForm?.fields || [],\n contract_origin: contractOriginForm?.fields || [],\n invoice_schedule: invoiceScheduleForm?.fields || [],\n create_invoice_schedule: createInvoiceScheduleForm?.fields || [],\n pricing_plan: selectContractorSubscriptionForm?.fields || [],\n eligibility_questionnaire: eligibilityQuestionnaireForm?.fields || [],\n contract_details: contractorOnboardingDetailsForm?.fields || [],\n contract_preview: signatureSchemaForm?.fields || [],\n review: [],\n }),\n [\n selectCountryForm?.fields,\n basicInformationForm?.fields,\n contractOriginForm?.fields,\n invoiceScheduleForm?.fields,\n createInvoiceScheduleForm?.fields,\n selectContractorSubscriptionForm?.fields,\n contractorOnboardingDetailsForm?.fields,\n signatureSchemaForm?.fields,\n eligibilityQuestionnaireForm?.fields,\n ],\n );\n\n const stepFieldsWithFlatFieldsets: Record<\n StepKeys,\n JSFFieldset | null | undefined\n > = {\n select_country: null,\n basic_information: basicInformationForm?.meta['x-jsf-fieldsets'],\n contract_origin: null,\n invoice_schedule: null,\n create_invoice_schedule: null,\n pricing_plan: null,\n contract_details: contractorOnboardingDetailsForm?.meta['x-jsf-fieldsets'],\n eligibility_questionnaire: null,\n contract_preview: null,\n review: null,\n };\n\n const stepPresentation: Record<\n StepKeys,\n Record<string, unknown> | null | undefined\n > = {\n select_country: selectCountryForm?.meta?.['x-jsf-presentation'],\n basic_information: basicInformationForm?.meta?.['x-jsf-presentation'],\n contract_origin: contractOriginForm?.meta?.['x-jsf-presentation'],\n invoice_schedule: invoiceScheduleForm?.meta?.['x-jsf-presentation'],\n create_invoice_schedule:\n createInvoiceScheduleForm?.meta?.['x-jsf-presentation'],\n pricing_plan:\n selectContractorSubscriptionForm?.meta?.['x-jsf-presentation'],\n eligibility_questionnaire:\n eligibilityQuestionnaireForm?.meta?.['x-jsf-presentation'],\n contract_details:\n contractorOnboardingDetailsForm?.meta?.['x-jsf-presentation'],\n contract_preview: signatureSchemaForm?.meta?.['x-jsf-presentation'],\n review: null,\n };\n\n const {\n country,\n basic_information: employmentBasicInformation = {},\n contract_details: employmentContractDetails = {},\n } = employment || {};\n\n const employmentCountryCode = country?.code;\n\n const selectCountryInitialValues = useMemo(\n () =>\n getInitialValues(stepFields.select_country, {\n country: internalCountryCode || employmentCountryCode || '',\n }),\n [stepFields.select_country, internalCountryCode, employmentCountryCode],\n );\n\n // memoize file conversion to avoid re-converting the file on every render\n // noticed performance issues when not doing memoizing individually\n const convertedIr35File = useMemo(() => {\n if (!ir35File?.content) return null;\n return dataURLtoFile(ir35File.content as unknown as string, ir35File.name);\n }, [ir35File?.content, ir35File?.name]);\n\n const basicInformationInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentBasicInformation,\n ir35: employment?.contract_details?.ir_35,\n nationality_status: employment?.contract_details?.nationality,\n ...(convertedIr35File && {\n ir35_sds_file: [convertedIr35File],\n }),\n };\n\n return getInitialValues(stepFields.basic_information, initialValues);\n }, [\n onboardingInitialValues,\n employmentBasicInformation,\n employment?.contract_details?.ir_35,\n employment?.contract_details?.nationality,\n convertedIr35File,\n stepFields.basic_information,\n ]);\n\n const contractOriginInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n contract_origin:\n contractOriginMapping[basicInformation?.contract_origin as string] ??\n basicInformation?.contract_origin,\n };\n return getInitialValues(stepFields.contract_origin, initialValues);\n }, [\n stepFields.contract_origin,\n onboardingInitialValues,\n basicInformation?.contract_origin,\n ]);\n\n const invoiceScheduleInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n // If an existing schedule exists, default to 'schedule' preference\n ...(existingInvoiceSchedule && {\n invoice_schedule_preference: 'schedule',\n }),\n };\n return getInitialValues(stepFields.invoice_schedule, initialValues);\n }, [\n stepFields.invoice_schedule,\n onboardingInitialValues,\n existingInvoiceSchedule,\n ]);\n\n const createInvoiceScheduleInitialValues = useMemo(() => {\n // If an existing schedule exists, transform it to form values\n if (existingInvoiceSchedule) {\n const formValues: Record<string, unknown> = {\n currency: existingInvoiceSchedule.currency,\n periodicity: existingInvoiceSchedule.periodicity,\n start_date: existingInvoiceSchedule.start_date,\n number: existingInvoiceSchedule.number,\n note: existingInvoiceSchedule.note,\n nr_occurrences: existingInvoiceSchedule.nr_occurrences,\n };\n\n existingInvoiceSchedule.items?.forEach((item, index: number) => {\n const itemNumber = index + 1;\n formValues[`item_${itemNumber}_description`] = item.description;\n formValues[`item_${itemNumber}_amount`] = item.amount;\n });\n\n return getInitialValues(stepFields.create_invoice_schedule, formValues);\n }\n\n const initialValues = {\n ...onboardingInitialValues,\n };\n return getInitialValues(stepFields.create_invoice_schedule, initialValues);\n }, [\n stepFields.create_invoice_schedule,\n onboardingInitialValues,\n existingInvoiceSchedule,\n ]);\n\n const contractDetailsInitialValues = useMemo(() => {\n const hardcodedValues = {\n service_duration: {\n provisional_start_date:\n employmentBasicInformation.provisional_start_date,\n },\n };\n const initialValues = {\n ...hardcodedValues,\n ...onboardingInitialValues,\n ...employmentContractDetails,\n };\n\n return getInitialValues(stepFields.contract_details, initialValues);\n }, [\n stepFields.contract_details,\n employmentContractDetails,\n onboardingInitialValues,\n employmentBasicInformation,\n ]);\n\n const contractPreviewInitialValues = useMemo(() => {\n const signature = documentPreviewPdf?.contract_document?.signatories?.find(\n (signatory) => signatory.type === 'company',\n );\n const initialValues = {\n ...onboardingInitialValues,\n signature: signature?.signature,\n };\n\n return getInitialValues(stepFields.contract_preview, initialValues);\n }, [\n stepFields.contract_preview,\n onboardingInitialValues,\n documentPreviewPdf,\n ]);\n\n const pricingPlanInitialValues = useMemo(() => {\n const preselectedPricingPlan = {\n subscription: selectedPricingPlan,\n };\n const initialValues = {\n ...preselectedPricingPlan,\n ...onboardingInitialValues,\n };\n\n return getInitialValues(stepFields.pricing_plan, initialValues);\n }, [stepFields.pricing_plan, onboardingInitialValues, selectedPricingPlan]);\n\n const eligibilityQuestionnaireInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...eligibilityAnswers,\n };\n return getInitialValues(\n stepFields.eligibility_questionnaire,\n initialValues,\n );\n }, [\n stepFields.eligibility_questionnaire,\n onboardingInitialValues,\n eligibilityAnswers,\n ]);\n\n const initialValues = useMemo(() => {\n return {\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_origin: contractOriginInitialValues,\n invoice_schedule: invoiceScheduleInitialValues,\n create_invoice_schedule: createInvoiceScheduleInitialValues,\n contract_details: contractDetailsInitialValues,\n contract_preview: contractPreviewInitialValues,\n pricing_plan: pricingPlanInitialValues,\n eligibility_questionnaire: eligibilityQuestionnaireInitialValues,\n };\n }, [\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractOriginInitialValues,\n invoiceScheduleInitialValues,\n createInvoiceScheduleInitialValues,\n contractDetailsInitialValues,\n contractPreviewInitialValues,\n pricingPlanInitialValues,\n eligibilityQuestionnaireInitialValues,\n ]);\n\n const shouldHandleReadOnlyEmployment = Boolean(\n employmentId &&\n isEmploymentReadOnly &&\n stepState.currentStep.name !== 'review',\n );\n\n const initialLoading =\n isLoadingCountries ||\n isLoadingBasicInformationForm ||\n isLoadingEmployment ||\n isLoadingContractorOnboardingDetailsForm ||\n isLoadingContractorSubscriptions ||\n isLoadingDocumentPreviewForm ||\n isLoadingIR35File ||\n isLoadingContractDocuments ||\n isLoadingEligibilityQuestionnaire ||\n isLoadingCreateInvoiceScheduleForm ||\n isLoadingInvoiceSchedules;\n\n const isNavigatingToReview = useMemo(() => {\n const isCor = employment?.contractor_type === 'cor';\n const hasContractPreviewFields =\n isCor || stepFields.contract_preview.length > 0;\n\n return Boolean(\n shouldHandleReadOnlyEmployment &&\n !initialLoading &&\n Boolean(internalContractDocumentId) &&\n stepFields.basic_information.length > 0 &&\n stepFields.contract_details.length > 0 &&\n hasContractPreviewFields,\n );\n }, [\n shouldHandleReadOnlyEmployment,\n initialLoading,\n internalContractDocumentId,\n stepFields.basic_information.length,\n stepFields.contract_details.length,\n stepFields.contract_preview.length,\n employment?.contractor_type,\n ]);\n\n useEffect(() => {\n if (isNavigatingToReview) {\n fieldsMetaRef.current = {\n select_country: prettifyFormValues(\n selectCountryInitialValues,\n stepFields.select_country,\n { skipMoneyConversion: true },\n ),\n basic_information: prettifyFormValues(\n basicInformationInitialValues,\n stepFields.basic_information,\n { skipMoneyConversion: true },\n ),\n contract_origin: {},\n invoice_schedule: {},\n create_invoice_schedule: {},\n contract_details: prettifyFormValues(\n contractDetailsInitialValues,\n stepFields.contract_details,\n { skipMoneyConversion: true },\n ),\n contract_preview: prettifyFormValues(\n contractPreviewInitialValues,\n stepFields.contract_preview,\n { skipMoneyConversion: true },\n ),\n pricing_plan: prettifyFormValues(\n pricingPlanInitialValues,\n stepFields.pricing_plan,\n { skipMoneyConversion: true },\n ),\n eligibility_questionnaire: prettifyFormValues(\n eligibilityQuestionnaireInitialValues,\n stepFields.eligibility_questionnaire,\n { skipMoneyConversion: true },\n ),\n };\n\n setStepValues({\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_origin: {},\n invoice_schedule: {},\n create_invoice_schedule: {},\n contract_details: contractDetailsInitialValues,\n contract_preview: contractPreviewInitialValues,\n pricing_plan: pricingPlanInitialValues,\n eligibility_questionnaire: eligibilityQuestionnaireInitialValues,\n review: {},\n });\n goToStep('review');\n }\n }, [\n isNavigatingToReview,\n goToStep,\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n setStepValues,\n stepFields.select_country,\n stepFields.basic_information,\n stepFields.contract_details,\n stepFields.pricing_plan,\n pricingPlanInitialValues,\n stepFields.contract_preview,\n contractPreviewInitialValues,\n stepFields.eligibility_questionnaire,\n eligibilityQuestionnaireInitialValues,\n ]);\n\n const goTo = (step: StepKeys) => {\n goToStep(step);\n };\n\n const parseFormValues = async (values: FieldValues) => {\n if (selectCountryForm && stepState.currentStep.name === 'select_country') {\n return values;\n }\n\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n return await parseJSFToValidate(values, basicInformationForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n contractorOnboardingDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n return await parseJSFToValidate(\n values,\n contractorOnboardingDetailsForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n if (\n signatureSchemaForm &&\n stepState.currentStep.name === 'contract_preview'\n ) {\n return await parseJSFToValidate(values, signatureSchemaForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n selectContractorSubscriptionForm &&\n stepState.currentStep.name === 'pricing_plan'\n ) {\n return await parseJSFToValidate(\n values,\n selectContractorSubscriptionForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n if (\n eligibilityQuestionnaireForm &&\n stepState.currentStep.name === 'eligibility_questionnaire'\n ) {\n return await parseJSFToValidate(\n values,\n eligibilityQuestionnaireForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n if (\n contractOriginForm &&\n stepState.currentStep.name === 'contract_origin'\n ) {\n return await parseJSFToValidate(values, contractOriginForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n invoiceScheduleForm &&\n stepState.currentStep.name === 'invoice_schedule'\n ) {\n return await parseJSFToValidate(values, invoiceScheduleForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n createInvoiceScheduleForm &&\n stepState.currentStep.name === 'create_invoice_schedule'\n ) {\n return await parseJSFToValidate(\n values,\n createInvoiceScheduleForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n return {};\n };\n\n /**\n * Extracts AI validation error from the error response\n * @param error - The error object from the API call\n * @returns The AI validation error if found, null otherwise\n */\n const extractAiValidationError = (\n error: unknown,\n ): AiValidationError | null => {\n if (!isMutationError(error)) {\n return null;\n }\n\n const rawError = error.normalizedErrors.services_and_deliverables;\n\n // The backend's normalize_errors wraps non-list values in an array,\n // so the AI validation error object arrives as a single-element array.\n const servicesAndDeliverablesError = (\n Array.isArray(rawError) ? rawError[0] : rawError\n ) as\n | {\n error: string[];\n source: string;\n skippable: boolean;\n }\n | undefined;\n\n if (servicesAndDeliverablesError?.source === REMOTE_AI_ERROR_SOURCE) {\n return {\n error: servicesAndDeliverablesError.error,\n source: servicesAndDeliverablesError.source,\n skippable: servicesAndDeliverablesError.skippable,\n };\n }\n return null;\n };\n\n async function onSubmit(values: FieldValues) {\n const currentStepName = stepState.currentStep.name;\n const parsedValues = await parseFormValues(values);\n\n if (currentStepName in fieldsMetaRef.current) {\n fieldsMetaRef.current[\n currentStepName as keyof typeof fieldsMetaRef.current\n ] = prettifyFormValues(parsedValues, stepFields[currentStepName]);\n }\n switch (stepState.currentStep.name) {\n case 'select_country': {\n setInternalCountryCode(parsedValues.country);\n return Promise.resolve({ data: { countryCode: parsedValues.country } });\n }\n case 'basic_information': {\n const isEmploymentNotLoaded =\n !internalEmploymentId && internalCountryCode;\n const hasChangedCountry =\n internalEmploymentId &&\n internalCountryCode &&\n employment?.country &&\n employment?.country.code !== internalCountryCode;\n\n if (isEmploymentNotLoaded || hasChangedCountry) {\n const basicInformationParsedValues = omit(\n parsedValues,\n 'nationality_status',\n 'ir35',\n 'ir35_sds_file',\n );\n const basicInformationPayload: EmploymentCreateParams = {\n basic_information: basicInformationParsedValues,\n type: 'contractor',\n country_code: internalCountryCode,\n external_id: externalId,\n };\n const response = await createEmploymentMutationAsync(\n basicInformationPayload,\n );\n const employmentId = response?.data?.employment?.id;\n if (!employmentId) {\n throw createStructuredError('Employment ID not found');\n }\n\n await updateUKandSaudiFieldsMutation({\n employmentId: employmentId as string,\n });\n\n // Only update state (triggers queries with fully consistent backend state) if not caused a bug\n // if one of the updateUKandSaudiFieldsMutation fails with a 422 for example\n setInternalEmploymentId(employmentId);\n\n return response;\n } else if (internalEmploymentId) {\n const basicInformationParsedValues = omit(\n parsedValues,\n 'nationality_status',\n 'ir35',\n 'ir35_sds_file',\n );\n\n await updateUKandSaudiFieldsMutation({\n employmentId: internalEmploymentId,\n });\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId,\n basic_information: basicInformationParsedValues,\n });\n }\n\n return;\n }\n case 'contract_details': {\n const {\n services_and_deliverables_ai_warning:\n _servicesAndDeliverablesAiWarning,\n services_and_deliverables_error_skippable:\n _servicesAndDeliverablesErrorSkippable,\n ...contractDetailsData\n } = parsedValues;\n\n const shouldSkipAiChecks =\n fieldValues.services_and_deliverables_error_skippable === true;\n const payload: CreateContractDocument = {\n contract_document: contractDetailsData,\n skip_ai_checks: shouldSkipAiChecks,\n };\n\n try {\n const response = await createContractorContractDocumentMutationAsync({\n employmentId: internalEmploymentId as string,\n payload,\n });\n const contractDocumentId = response?.data?.contract_document?.id;\n if (!contractDocumentId) {\n throw createStructuredError('Contract document ID not found');\n }\n setInternalContractDocumentId(contractDocumentId);\n\n return response;\n } catch (error) {\n const aiError = extractAiValidationError(error);\n if (aiError) {\n const isContractorOfRecord =\n selectedPricingPlan === corProductIdentifier;\n setFieldValues({\n ...values,\n services_and_deliverables_ai_warning:\n transformAiErrorResponse(isContractorOfRecord),\n services_and_deliverables_error_skippable: aiError.skippable,\n });\n }\n\n throw error;\n }\n }\n\n case 'contract_preview': {\n if (hasCompanySignedContract) {\n return Promise.resolve({\n data: {\n contract_document: {\n id: internalContractDocumentId,\n },\n },\n });\n }\n const response = await signContractDocumentMutationAsync({\n employmentId: internalEmploymentId as string,\n contractDocumentId: internalContractDocumentId as string,\n payload: {\n signature: parsedValues.signature,\n },\n });\n await refetchDocumentPreviewForm();\n return response;\n }\n case 'pricing_plan': {\n if (values.subscription === eorProductIdentifier) {\n // EOR selection - no API call needed at this step\n return Promise.resolve({\n data: {\n subscription: values.subscription,\n },\n });\n }\n // If there are no available contractor subscriptions, throw an error\n if (filteredContractorSubscriptions.length === 0) {\n throw createStructuredError('No available subscriptions.');\n }\n\n if (\n !values.subscription &&\n filteredContractorSubscriptions.length > 0\n ) {\n throw createStructuredError('Please select a subscription plan.');\n }\n\n const blockedProductsEligibility = [\n corProductIdentifier,\n contractorPlusProductIdentifier,\n ];\n\n if (\n isEligibilityQuestionnaireBlocked &&\n blockedProductsEligibility.includes(values.subscription)\n ) {\n throw createStructuredError(\n `This individual is not eligible for ${\n CONTRACT_PRODUCT_TITLES[\n values.subscription as keyof typeof CONTRACT_PRODUCT_TITLES\n ]\n }.`,\n );\n }\n\n if (\n hasEligibilityQuestionnaireSubmitted &&\n values.subscription !== corProductIdentifier\n ) {\n try {\n await deleteContractorCorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n });\n await refetchContractorSubscriptions();\n } catch (error) {\n if ((error as $TSFixMe)?.response?.status !== 404) {\n throw error;\n }\n // Still refetch to update the UI state\n await refetchContractorSubscriptions();\n }\n }\n\n if (values.subscription == contractorStandardProductIdentifier) {\n return manageContractorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: {\n operation: 'downgrade',\n },\n });\n } else if (values.subscription == contractorPlusProductIdentifier) {\n return manageContractorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: {\n operation: 'upgrade',\n },\n });\n } else if (values.subscription == corProductIdentifier) {\n if (\n hasEligibilityQuestionnaireSubmitted &&\n employment?.contractor_type !== 'cor'\n ) {\n return manageContractorCorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n });\n } else {\n return Promise.resolve({\n data: { subscription: values.subscription },\n });\n }\n }\n\n throw createStructuredError('invalid selection');\n }\n\n case 'contract_origin': {\n // provided_by_remote -> remote_contract to maintain retrocompatibility with the backend\n // provided_by_remote doesn't exist in the backend, so we need to map it to remote_contract\n const contractOrigin: $TSFixMe =\n contractOriginToBackend[parsedValues.contract_origin] ??\n parsedValues.contract_origin;\n const templateType =\n parsedValues.contract_origin === 'provided_by_customer'\n ? 'contractor_agreement'\n : 'contractor_services_agreement';\n await setContractOriginMutationAsync({\n employmentId: internalEmploymentId as string,\n contractOrigin,\n templateType,\n });\n // Refetch basic information to get the updated contract_origin from server\n await refetchBasicInformation();\n\n return {\n data: { contractOrigin: values.contract_origin },\n };\n }\n\n case 'invoice_schedule': {\n // Show create_invoice_schedule step only when user selects 'schedule'\n const shouldShowCreateStep =\n values.invoice_schedule_preference === 'schedule';\n setIncludeCreateInvoiceSchedule(shouldShowCreateStep);\n\n return {\n data: {\n invoiceSchedulePreference: values.invoice_schedule_preference,\n },\n };\n }\n\n case 'create_invoice_schedule': {\n if (!internalEmploymentId) {\n throw createStructuredError('Employment ID is required');\n }\n\n // Use update if we have an existing schedule, otherwise create\n if (existingInvoiceSchedule?.id) {\n const response = await updateInvoiceScheduleMutationAsync({\n scheduleId: existingInvoiceSchedule.id,\n values: parsedValues,\n });\n await refetchInvoiceSchedule();\n return response;\n }\n\n const response = await createInvoiceScheduleMutationAsync({\n employmentId: internalEmploymentId,\n values: parsedValues,\n });\n\n const failures = response?.data?.failures;\n if (failures && failures.length > 0) {\n throw createStructuredError('Failed to create invoice schedule');\n }\n\n await refetchInvoiceSchedule();\n return response;\n }\n\n case 'eligibility_questionnaire': {\n try {\n const response = await createEligibilityQuestionnaireMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: parsedValues,\n });\n\n const isEligibilityQuestionnaireBlocked = response?.data?.is_blocking;\n\n if (isEligibilityQuestionnaireBlocked) {\n setIncludeEligibilityQuestionnaire(false);\n setPendingNavigationStep('pricing_plan');\n throw createStructuredError(\n 'This individual is not eligible for Contractor of Record.',\n );\n }\n\n return await manageContractorCorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n });\n } finally {\n // Always refetch to keep state in sync, even on error\n await refetchContractorSubscriptions();\n }\n }\n\n default: {\n throw createStructuredError('Invalid step state');\n }\n }\n }\n\n const markContractAsReviewed = () => {\n // Notify parent to sync form state\n onContractReviewedRef.current?.();\n };\n\n const skipInvoiceSchedule = async () => {\n if (!existingInvoiceSchedule?.id) {\n throw createStructuredError('No invoice schedule to skip');\n }\n\n await skipInvoiceScheduleMutationAsync({\n scheduleId: existingInvoiceSchedule.id,\n });\n await refetchInvoiceSchedule();\n setIncludeCreateInvoiceSchedule(false);\n setStepValues({\n ...stepState.values,\n invoice_schedule: {},\n create_invoice_schedule: {},\n } as Record<StepKeys, FieldValues>);\n goToStep('invoice_schedule');\n };\n\n const previewContractorInvoice = async (values: FieldValues) => {\n if (!internalEmploymentId) {\n throw createStructuredError('Employment ID is required');\n }\n\n // fieldValues are the raw, unparsed form values (e.g. money fields still\n // in display units) — run them through the same parsing/type-coercion\n // pipeline a real submit would use before building the preview payload.\n const parsedValues = await parseFormValues(values);\n\n const response = await previewContractorInvoiceMutationAsync({\n employmentId: internalEmploymentId,\n values: parsedValues,\n });\n\n // The API returns `content` as a `data:application/pdf;base64,...` string,\n // not the `Blob | File` the OpenAPI spec's `format: binary` implies.\n const preview = response?.data?.contractor_invoice_preview as\n | ContractorInvoicePreview\n | undefined;\n\n if (!preview) {\n return undefined;\n }\n\n // Same normalization the contract document preview does — the data URI\n // prefix is what makes the content renderable in an iframe / downloadable.\n return { ...preview, content: clearBase64Data(preview.content) };\n };\n\n const handleNextStep = () => {\n if (internalEmploymentId) {\n refetchEmployment();\n }\n nextStep();\n };\n\n const handleValidation = useCallback(\n async (values: FieldValues): Promise<ValidationResult | null> => {\n if (stepState.currentStep.name === 'select_country') {\n return selectCountryForm.handleValidation(values);\n }\n\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n basicInformationForm?.fields,\n { isPartialValidation: false },\n );\n return basicInformationForm?.handleValidation(parsedValues);\n }\n\n if (\n contractorOnboardingDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n contractorOnboardingDetailsForm?.fields,\n { isPartialValidation: false },\n );\n return contractorOnboardingDetailsForm?.handleValidation(parsedValues);\n }\n\n if (\n signatureSchemaForm &&\n stepState.currentStep.name === 'contract_preview'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n signatureSchemaForm?.fields,\n { isPartialValidation: true },\n );\n return signatureSchemaForm?.handleValidation(parsedValues);\n }\n\n if (\n selectContractorSubscriptionForm &&\n stepState.currentStep.name === 'pricing_plan'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n selectContractorSubscriptionForm?.fields,\n { isPartialValidation: false },\n );\n return selectContractorSubscriptionForm?.handleValidation(parsedValues);\n }\n\n if (\n eligibilityQuestionnaireForm &&\n stepState.currentStep.name === 'eligibility_questionnaire'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n eligibilityQuestionnaireForm?.fields,\n { isPartialValidation: false },\n );\n return eligibilityQuestionnaireForm?.handleValidation(parsedValues);\n }\n\n if (\n contractOriginForm &&\n stepState.currentStep.name === 'contract_origin'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n contractOriginForm?.fields,\n { isPartialValidation: false },\n );\n return contractOriginForm?.handleValidation(parsedValues);\n }\n\n if (\n invoiceScheduleForm &&\n stepState.currentStep.name === 'invoice_schedule'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n invoiceScheduleForm?.fields,\n { isPartialValidation: false },\n );\n return invoiceScheduleForm?.handleValidation(parsedValues);\n }\n\n if (\n createInvoiceScheduleForm &&\n stepState.currentStep.name === 'create_invoice_schedule'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n createInvoiceScheduleForm?.fields,\n { isPartialValidation: false },\n );\n return createInvoiceScheduleForm?.handleValidation(parsedValues);\n }\n\n return null;\n },\n [\n stepState.currentStep.name,\n selectCountryForm,\n basicInformationForm,\n contractorOnboardingDetailsForm,\n signatureSchemaForm,\n selectContractorSubscriptionForm,\n eligibilityQuestionnaireForm,\n contractOriginForm,\n invoiceScheduleForm,\n createInvoiceScheduleForm,\n ],\n );\n\n const checkFieldUpdates = useCallback(\n async (values: FieldValues) => {\n setFieldValues(values);\n // new steps or refactor ones should rely on json-schema-form-mutability\n // instead of passing fieldValues\n const stepsUsingHandleValidation = [\n 'invoice_schedule',\n 'create_invoice_schedule',\n ];\n\n if (\n includeInvoiceSchedule &&\n stepsUsingHandleValidation.includes(stepState.currentStep.name)\n ) {\n await handleValidation(values);\n }\n },\n [setFieldValues, includeInvoiceSchedule, stepState, handleValidation],\n );\n\n const isLoading = initialLoading || shouldHandleReadOnlyEmployment;\n\n return {\n /**\n * Loading state indicating if the flow is loading data\n */\n isLoading,\n\n /**\n * Current state of the form fields for the current step.\n */\n fieldValues,\n\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates,\n\n /**\n * Function to mark the contract as reviewed\n * @param values - New form values to check\n * @returns {boolean}\n */\n markContractAsReviewed,\n\n /**\n * The existing invoice schedule for the current employment, if any.\n */\n existingInvoiceSchedule,\n\n /**\n * Skips (cancels) the existing invoice schedule and returns to the\n * invoice_schedule step.\n * @returns {Promise<void>}\n */\n skipInvoiceSchedule,\n\n /**\n * Whether a skip-invoice-schedule request is in flight.\n */\n isSkippingInvoiceSchedule: skipInvoiceScheduleMutation.isPending,\n\n /**\n * Previews a contractor invoice as a draft PDF from the given (typically\n * unsaved) form values, without persisting anything.\n * @param values - Form values to build the preview from\n * @returns {Promise<{name: string; content: string} | undefined>}\n */\n previewContractorInvoice,\n\n /**\n * Whether a preview-contractor-invoice request is in flight.\n */\n isPreviewingInvoiceSchedule: previewContractorInvoiceMutation.isPending,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back: previousStep,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next: handleNextStep,\n\n /**\n * Function to handle going to a specific step\n * @param step The step to go to.\n * @returns {void}\n */\n goTo: goTo,\n\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n\n /**\n * Array of form fields from the onboarding schema\n */\n fields: stepFields[stepState.currentStep.name],\n\n /**\n * Fields metadata for each step\n */\n meta: {\n fields: fieldsMetaRef.current,\n fieldsets: stepFieldsWithFlatFieldsets[stepState.currentStep.name],\n presentation: stepPresentation[stepState.currentStep.name],\n },\n\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues,\n\n /**\n * Indicates whether AI validation errors can be skipped (user can continue at their own risk).\n * True when there's a skippable AI validation error on services_and_deliverables field.\n * @returns {boolean}\n */\n canSkipAiValidation:\n fieldValues.services_and_deliverables_error_skippable === true,\n\n /**\n * Function to validate form values against the onboarding schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation,\n\n /**\n * Initial form values\n */\n initialValues,\n\n /**\n * Employment id\n */\n employmentId: internalEmploymentId,\n\n /**\n * Function to refetch the employment data\n * @returns {void}\n */\n refetchEmployment: refetchEmployment,\n\n /**\n * Loading state indicating if the onboarding mutation is in progress\n */\n isSubmitting:\n createEmploymentMutation.isPending ||\n updateEmploymentMutation.isPending ||\n createContractorContractDocumentMutation.isPending ||\n signContractDocumentMutation.isPending ||\n manageContractorSubscriptionMutation.isPending ||\n uploadFileMutation.isPending ||\n createEligibilityQuestionnaireMutation.isPending ||\n manageContractorCorSubscriptionMutation.isPending ||\n deleteContractorCorSubscriptionMutation.isPending ||\n setContractOriginMutation.isPending ||\n createInvoiceScheduleMutation.isPending ||\n updateInvoiceScheduleMutation.isPending,\n\n /**\n * Document preview PDF data\n */\n documentPreviewPdf,\n\n /**\n * let's the user know if the company can invite employees\n * @returns {boolean}\n */\n canInvite,\n\n /**\n * let's the user know that the employment cannot be edited, happens when employment.status is invited\n * @returns {boolean}\n */\n isEmploymentReadOnly,\n /**\n * let's the user know if the employment is invited or not\n * @returns {'invited' | 'not_invited'}\n */\n invitedStatus,\n\n /**\n * Employment data\n * @returns {Employment}\n */\n employment,\n\n /**\n * Default legal entity\n * @returns {CompanyLegalEntity}\n */\n defaultLegalEntity,\n\n /**\n * Whether the company needs to complete KYB verification before contractors can be paid.\n * Use this to show a company verification nudge banner on the review step.\n */\n needsCompanyVerification:\n openTasks?.some((a) => a.type === 'verify_company') ?? false,\n\n /**\n * Whether the company needs to set up Remote Payments.\n * Use this to show a Remote Payments setup nudge banner on the review step.\n */\n needsRemotePaymentsSetup:\n openTasks?.some((a) => a.type === 'setup_remote_payments') ?? false,\n\n /**\n * Steps array\n * @returns {Array<{name: string, index: number, visible: boolean, label: string}>}\n */\n steps: stepsArray,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport {\n getV1CompaniesCompanyIdLegalEntities,\n CompanyLegalEntity,\n} from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useClient } from '@/src/context';\nimport { useIdentity } from '@/src/common/api/identity';\nimport { hasCompany } from '@/src/common/api/companies';\n\n/**\n * Hook to get the legal entities for a company\n * @param companyId - The company ID\n * @returns The legal entities\n */\nexport const useLegalEntities = () => {\n const { client } = useClient();\n const { data: identity } = useIdentity();\n const companyId = hasCompany(identity) ? (identity?.company?.id ?? '') : '';\n\n return useQuery({\n queryKey: ['legal-entities', companyId],\n queryFn: () =>\n getV1CompaniesCompanyIdLegalEntities({\n client: client as Client,\n path: {\n company_id: companyId,\n },\n query: {\n page_size: 100,\n },\n }),\n select: (data) => data.data?.data?.legal_entities,\n enabled: !!companyId,\n });\n};\n\nexport const useDefaultLegalEntity = () => {\n const { data: legalEntities } = useLegalEntities();\n return legalEntities?.find(\n (legalEntity: CompanyLegalEntity) => legalEntity.is_default,\n );\n};\n"],"mappings":"k2BAAA,OAAS,eAAAA,GAAa,aAAAC,EAAW,WAAAC,EAAS,UAAAC,GAAQ,YAAAC,MAAgB,QAElE,OAAOC,OAAU,cCFjB,OAAS,YAAAC,OAAgB,wBAelB,IAAMC,GAAmBC,EAAA,IAAM,CACpC,GAAM,CAAE,OAAAC,CAAO,EAAIC,GAAU,EACvB,CAAE,KAAMC,CAAS,EAAIC,GAAY,EACjCC,EAAYC,GAAWH,CAAQ,EAAKA,GAAU,SAAS,IAAM,GAAM,GAEzE,OAAOI,GAAS,CACd,SAAU,CAAC,iBAAkBF,CAAS,EACtC,QAASL,EAAA,IACPQ,GAAqC,CACnC,OAAQP,EACR,KAAM,CACJ,WAAYI,CACd,EACA,MAAO,CACL,UAAW,GACb,CACF,CAAC,EATM,WAUT,OAAQL,EAACS,GAASA,EAAK,MAAM,MAAM,eAA3B,UACR,QAAS,CAAC,CAACJ,CACb,CAAC,CACH,EApBgC,oBAsBnBK,GAAwBV,EAAA,IAAM,CACzC,GAAM,CAAE,KAAMW,CAAc,EAAIZ,GAAiB,EACjD,OAAOY,GAAe,KACnBC,GAAoCA,EAAY,UACnD,CACF,EALqC,yBDgErC,IAAMC,GAAmE,CACvE,eAAgB,KAChB,kBAAmB,+BACnB,gBAAiB,KACjB,iBAAkB,KAClB,wBAAyB,KACzB,iBAAkB,KAClB,0BAA2B,KAC3B,aAAc,KACd,iBAAkB,KAClB,OAAQ,IACV,EAEMC,GAEF,CACF,6BAA8B,mBAChC,EAEMC,GAAgD,CACpD,gBAAiB,oBAEnB,EAGMC,GAAkD,CACtD,mBAAoB,iBAEtB,EAEaC,GAA0BC,EAAA,CAAC,CACtC,YAAAC,EACA,WAAAC,EACA,aAAAC,EACA,UAAAC,EACA,QAAAC,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,oBAAA+E,GAKA,0BAA2B7K,GAA4B,UAQvD,yBAAA8K,GAKA,4BAA6B5K,GAAiC,UAM9D,KAAM5C,GAMN,KAAM2N,GAON,KAAMxC,GAON,SAAAW,GAKA,OAAQzC,EAAWvJ,EAAU,YAAY,IAAI,EAK7C,KAAM,CACJ,OAAQtB,GAAc,QACtB,UAAW8K,GAA4BxJ,EAAU,YAAY,IAAI,EACjE,aAAcyJ,GAAiBzJ,EAAU,YAAY,IAAI,CAC3D,EAOA,gBAAAuL,GAOA,oBACExL,EAAY,4CAA8C,GAO5D,iBAAA+N,GAKA,cAAA5D,GAKA,aAAc5L,EAMd,kBAAmBmC,GAKnB,aACEe,GAAyB,WACzBE,GAAyB,WACzBE,GAAyC,WACzCsB,GAA6B,WAC7BE,GAAqC,WACrCtB,GAAmB,WACnBI,GAAuC,WACvCE,GAAwC,WACxCkB,GAAwC,WACxChB,GAA0B,WAC1BE,GAA8B,WAC9BE,GAA8B,UAKhC,mBAAAuG,GAMA,UAAA5H,GAMA,qBAAAF,EAKA,cAAAI,GAMA,WAAAhB,EAMA,mBAAAO,GAMA,yBACEE,IAAW,KAAMiN,GAAMA,EAAE,OAAS,gBAAgB,GAAK,GAMzD,yBACEjN,IAAW,KAAMiN,GAAMA,EAAE,OAAS,uBAAuB,GAAK,GAMhE,MAAOrO,EACT,CACF,EAr3DuC","names":["useCallback","useEffect","useMemo","useRef","useState","omit","useQuery","useLegalEntities","__name","client","useClient","identity","useIdentity","companyId","hasCompany","useQuery","getV1CompaniesCompanyIdLegalEntities","data","useDefaultLegalEntity","legalEntities","legalEntity","stepToFormSchemaMap","jsonSchemaToEmployment","contractOriginMapping","contractOriginToBackend","useContractorOnboarding","__name","countryCode","externalId","employmentId","skipSteps","options","onboardingInitialValues","excludeProducts","onContractReviewedRef","useRef","useEffect","internalCountryCode","setInternalCountryCode","useState","internalEmploymentId","setInternalEmploymentId","internalContractDocumentId","setInternalContractDocumentId","fieldsMetaRef","selectedProduct","setSelectedProduct","includeEligibilityQuestionnaire","setIncludeEligibilityQuestionnaire","includeContractPreview","setIncludeContractPreview","includeContractDetails","setIncludeContractDetails","includeContractOrigin","setIncludeContractOrigin","includeInvoiceSchedule","setIncludeInvoiceSchedule","includeCreateInvoiceSchedule","setIncludeCreateInvoiceSchedule","pendingNavigationStep","setPendingNavigationStep","steps","stepsArray","useMemo","buildSteps","fieldValues","stepState","setFieldValues","previousStep","nextStep","goToStep","setStepValues","useStepState","employment","isLoadingEmployment","refetchEmployment","useEmploymentQuery","basicInformation","refetchBasicInformation","useBasicInformationQuery","defaultLegalEntity","useDefaultLegalEntity","openTasks","useCompanyOpenTasks","employmentStatus","isEmploymentReadOnly","reviewStepAllowedEmploymentStatus","canInvite","disabledInviteButtonEmploymentStatus","invitedStatus","createEmploymentMutation","useCreateEmployment","updateEmploymentMutation","useUpdateEmployment","createContractorContractDocumentMutation","useCreateContractorContractDocument","uploadFileMutation","useUploadFile","updateUKandSaudiFieldsMutation","useUpdateUKandSaudiFields","createEligibilityQuestionnaireMutation","usePostCreateEligibilityQuestionnaire","manageContractorCorSubscriptionMutation","usePostManageContractorCorSubscription","setContractOriginMutation","useSetContractOrigin","createInvoiceScheduleMutation","useCreateInvoiceSchedule","updateInvoiceScheduleMutation","useUpdateInvoiceSchedule","skipInvoiceScheduleMutation","useSkipInvoiceSchedule","previewContractorInvoiceMutation","usePreviewContractorInvoice","updateEmploymentMutationAsync","mutationToPromise","signContractDocumentMutation","useSignContractDocument","manageContractorSubscriptionMutation","usePostManageContractorSubscriptions","deleteContractorCorSubscriptionMutation","useDeleteContractorCorSubscription","createEmploymentMutationAsync","createContractorContractDocumentMutationAsync","signContractDocumentMutationAsync","manageContractorSubscriptionMutationAsync","createEligibilityQuestionnaireMutationAsync","manageContractorCorSubscriptionMutationAsync","deleteContractorCorSubscriptionMutationAsync","setContractOriginMutationAsync","createInvoiceScheduleMutationAsync","updateInvoiceScheduleMutationAsync","skipInvoiceScheduleMutationAsync","previewContractorInvoiceMutationAsync","selectCountryForm","isLoadingCountries","countries","useCountriesSchemaField","selectedCountry","country","countryName","isPricingPlanEnabled","selectContractorSubscriptionForm","isLoadingContractorSubscriptions","contractorSubscriptions","filteredContractorSubscriptions","refetchContractorSubscriptions","isEligibilityQuestionnaireBlocked","useContractorSubscriptionSchemaField","hasEligibilityQuestionnaireSubmitted","subscription","corProductIdentifier","shouldIncludeEligibilityQuestionnaire","shouldIncludeContractPreview","rawContractOrigin","selectedContractOrigin","isContractProvidedByCustomer","contractorStandardProductIdentifier","eligibilityAnswers","formType","employmentKey","serverEmploymentData","useJSONSchema","form","jsonSchemaOptions","query","jsonSchemaVersion","mergedFormValues","useJSONSchemaForm","isBasicInformationDetailsEnabled","isIR35FileEnabled","ir35File","isLoadingIR35File","useGetIR35File","contractDocuments","isLoadingContractDocuments","useGetContractDocuments","basicInformationForm","isLoadingBasicInformationForm","buildBasicInformationJsfModify","getBasicInformationSchemaVersion","descriptionProvisionalStartDate","calculateProvisionalStartDateDescription","selectedPricingPlan","subscriptions","contractorPlusProductIdentifier","eligibilityFields","isEligibilityQuestionnaireEnabled","eligibilityQuestionnaireForm","isLoadingEligibilityQuestionnaire","useGetEligibilityQuestionnaire","isContractorOnboardingDetailsEnabled","contractorOnboardingDetailsForm","isLoadingContractorOnboardingDetailsForm","useContractorContractDetailsSchema","buildContractDetailsJsfModify","isSignatureSchemaEnabled","signatureSchemaForm","useGetContractDocumentSignatureSchema","buildContractPreviewJsfModify","contractOriginForm","useGetContractOriginSchema","invoiceScheduleForm","useGetInvoiceScheduleSchema","existingInvoiceSchedule","isLoadingInvoiceSchedules","refetchInvoiceSchedule","useGetExistingInvoiceSchedule","createInvoiceScheduleForm","isLoadingCreateInvoiceScheduleForm","useGetCreateInvoiceScheduleSchema","documentPreviewPdf","isLoadingDocumentPreviewForm","refetchDocumentPreviewForm","useGetShowContractDocument","hasCompanySignedContract","useHasCompanySignedContract","stepFields","stepFieldsWithFlatFieldsets","stepPresentation","employmentBasicInformation","employmentContractDetails","employmentCountryCode","selectCountryInitialValues","getInitialValues","convertedIr35File","dataURLtoFile","basicInformationInitialValues","initialValues","contractOriginInitialValues","invoiceScheduleInitialValues","createInvoiceScheduleInitialValues","formValues","item","index","itemNumber","contractDetailsInitialValues","contractPreviewInitialValues","signature","signatory","pricingPlanInitialValues","eligibilityQuestionnaireInitialValues","shouldHandleReadOnlyEmployment","initialLoading","isNavigatingToReview","hasContractPreviewFields","prettifyFormValues","goTo","step","parseFormValues","values","parseJSFToValidate","extractAiValidationError","error","isMutationError","rawError","servicesAndDeliverablesError","REMOTE_AI_ERROR_SOURCE","onSubmit","currentStepName","parsedValues","isEmploymentNotLoaded","hasChangedCountry","basicInformationPayload","omit","response","createStructuredError","basicInformationParsedValues","_servicesAndDeliverablesAiWarning","_servicesAndDeliverablesErrorSkippable","contractDetailsData","shouldSkipAiChecks","payload","contractDocumentId","aiError","transformAiErrorResponse","eorProductIdentifier","CONTRACT_PRODUCT_TITLES","contractOrigin","templateType","shouldShowCreateStep","failures","markContractAsReviewed","skipInvoiceSchedule","previewContractorInvoice","preview","clearBase64Data","handleNextStep","handleValidation","useCallback","checkFieldUpdates","a"]}
@@ -0,0 +1,2 @@
1
+ import{a as y}from"./chunk-VKORYYED.js";import{a as m}from"./chunk-3OHORFIX.js";import{a as l}from"./chunk-GPWQPJQ7.js";import{e as c}from"./chunk-SRLBVFNQ.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as p}from"react";import{Fragment as N,jsx as v,jsxs as C}from"react/jsx-runtime";var R=t(({currencies:{from:d,to:F},shouldSwapOrder:s,salary_conversion_properties:a,conversionType:_="no_spread",defaultValue:r,splitDescription:f,...e})=>{let{setValue:n,getValues:i}=c(),g={label:a?.label||"Salary conversion",description:a?.description||C(N,{children:["The conversion is based on the Remote FX rate."," ",v(m,{className:"text-sm",zendeskId:l.remoteFxRate,children:"Learn more \u2197"})]})},u=s?"salary_conversion":e.name,b=s?e.name:"salary_conversion";return p(()=>{if(s){let o=i(e.name);o?(n("salary_conversion",o),n("salary_converted","salary_conversion")):r&&(n("salary_conversion",r),n("salary_converted","salary_conversion"))}else{let o=i("salary_conversion");o?(n(e.name,o),n("salary_converted",e.name)):r&&(n(e.name,r),n("salary_converted",e.name))}},[s,r,n,i,e.name]),v(y,{...e,sourceCurrency:d,targetCurrency:F,mainFieldName:u,conversionFieldName:b,conversionProperties:g,classNamePrefix:"RemoteFlows-Salary",conversionType:_,splitDescription:f})},"SalaryField");export{R as a};
2
+ //# sourceMappingURL=chunk-XWCE5BU6.js.map