@remoteoss/remote-flows 1.16.0 → 1.18.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 (332) hide show
  1. package/dist/CountryFieldDefault-KSVYDH5T.js +2 -0
  2. package/dist/DatePickerFieldDefault-TZEI446Y.js +2 -0
  3. package/dist/PDFPreviewDefault-HSSMYKV5.js +2 -0
  4. package/dist/RadioGroupFieldDefault-U44JTO4O.js +2 -0
  5. package/dist/chunk-2IA5ZHU4.js +6 -0
  6. package/dist/chunk-2IA5ZHU4.js.map +1 -0
  7. package/dist/{chunk-WEAO46EO.js → chunk-36MJ5ORQ.js} +2 -2
  8. package/dist/{chunk-YHROBX2M.js → chunk-3GYINB3B.js} +2 -2
  9. package/dist/{chunk-MLVB5MYU.js → chunk-545OW3ET.js} +2 -2
  10. package/dist/{chunk-JGJTFYHN.js → chunk-5BBQUGAN.js} +2 -2
  11. package/dist/{chunk-UMVMNUPH.js → chunk-5D4AKL3N.js} +2 -2
  12. package/dist/{chunk-EDLQ3JNY.js → chunk-5L2ELV4L.js} +2 -2
  13. package/dist/{chunk-R7BHA5RA.js → chunk-6P53J6DA.js} +2 -2
  14. package/dist/{chunk-A232PIG7.js → chunk-AK4FXJFO.js} +2 -2
  15. package/dist/{chunk-NAH5PAUK.js → chunk-BCO3C476.js} +2 -2
  16. package/dist/{chunk-VBQVXR4U.js → chunk-C6ND527K.js} +2 -2
  17. package/dist/{chunk-XHAJ544L.js → chunk-CPXEQRNG.js} +2 -2
  18. package/dist/{chunk-B7EJ2OAA.js → chunk-CUANSH3E.js} +2 -2
  19. package/dist/chunk-DAXHNASW.js +2 -0
  20. package/dist/chunk-DAXHNASW.js.map +1 -0
  21. package/dist/{chunk-AJIDQALB.js → chunk-DM5RRWPM.js} +2 -2
  22. package/dist/{chunk-PHPCCABU.js → chunk-EKJK34DS.js} +2 -2
  23. package/dist/{chunk-EWL6BSEP.js → chunk-EQVUP5ZR.js} +2 -2
  24. package/dist/{chunk-H3BUOBWO.js → chunk-FBWPGUBC.js} +2 -2
  25. package/dist/chunk-FHYOWPXB.js +2 -0
  26. package/dist/chunk-FHYOWPXB.js.map +1 -0
  27. package/dist/{chunk-UB6PYKNX.js → chunk-FJ6WBG3H.js} +2 -2
  28. package/dist/{chunk-BG66XH5L.js → chunk-FQHFTFUZ.js} +2 -2
  29. package/dist/chunk-GCBEPX4V.js +2 -0
  30. package/dist/chunk-GCBEPX4V.js.map +1 -0
  31. package/dist/{chunk-XNAFFHZH.js → chunk-GCVM3FO4.js} +2 -2
  32. package/dist/{chunk-7PWZAW7M.js → chunk-GDJP7TMP.js} +2 -2
  33. package/dist/{chunk-W4ECFBIA.js → chunk-I2NE5CCG.js} +2 -2
  34. package/dist/chunk-IHGCXP2X.js +2 -0
  35. package/dist/chunk-IHGCXP2X.js.map +1 -0
  36. package/dist/chunk-IZGJP7OI.js +2 -0
  37. package/dist/chunk-IZGJP7OI.js.map +1 -0
  38. package/dist/{chunk-ERSP6CZ3.js → chunk-J6HS3UVY.js} +2 -2
  39. package/dist/{chunk-IZGSVS3I.js → chunk-JPA3IMPE.js} +2 -2
  40. package/dist/chunk-K5S6JRYY.js +2 -0
  41. package/dist/chunk-K5S6JRYY.js.map +1 -0
  42. package/dist/{chunk-WEOIHTBU.js → chunk-L4P7572F.js} +2 -2
  43. package/dist/{chunk-AW7JELYX.js → chunk-M53HKCJ5.js} +2 -2
  44. package/dist/{chunk-DFAY4TWC.js → chunk-MCWXQT7A.js} +2 -2
  45. package/dist/{chunk-4UO7KLRK.js → chunk-N3Q636ZK.js} +2 -2
  46. package/dist/{chunk-62O3CKKH.js → chunk-NAGIFFJS.js} +2 -2
  47. package/dist/{chunk-FSK2DR6Z.js → chunk-NNW7S5AY.js} +2 -2
  48. package/dist/{chunk-YPUP5LNV.js → chunk-OHCA7HXR.js} +2 -2
  49. package/dist/{chunk-4N4MQECC.js → chunk-OXAEJWEQ.js} +2 -2
  50. package/dist/{chunk-TPGN6QTL.js → chunk-OZKZKV5C.js} +2 -2
  51. package/dist/{chunk-JI4CYPLW.js → chunk-PGVAOMQU.js} +2 -2
  52. package/dist/{chunk-LVXV3GHT.js → chunk-QGGPXNVY.js} +2 -2
  53. package/dist/{chunk-MHAY555P.js → chunk-QI6E2NJU.js} +2 -2
  54. package/dist/{chunk-3B6XXK5H.js → chunk-QNWTCGRD.js} +2 -2
  55. package/dist/{chunk-HOR3KPOZ.js → chunk-SAKDBD4P.js} +2 -2
  56. package/dist/chunk-SD3LBJUH.js +2 -0
  57. package/dist/{chunk-246D2A55.js.map → chunk-SD3LBJUH.js.map} +1 -1
  58. package/dist/{chunk-G7EVUAYE.js → chunk-SJ5IZCJP.js} +2 -2
  59. package/dist/{chunk-SLLDKJ7K.js → chunk-SNRZPCZ7.js} +2 -2
  60. package/dist/{chunk-HYYILYKU.js → chunk-T3GSGHZJ.js} +2 -2
  61. package/dist/chunk-TMWN4PEK.js +2 -0
  62. package/dist/chunk-TMWN4PEK.js.map +1 -0
  63. package/dist/{chunk-TVIUQXLE.js → chunk-UPJDLAKU.js} +2 -2
  64. package/dist/{chunk-OEXY56S2.js → chunk-URJI6IZB.js} +2 -2
  65. package/dist/chunk-URJI6IZB.js.map +1 -0
  66. package/dist/{chunk-BVFQ6LFD.js → chunk-V6LOIP27.js} +2 -2
  67. package/dist/{chunk-7WGZGAQY.js → chunk-V74BLD3D.js} +2 -2
  68. package/dist/{chunk-WO54IG4S.js → chunk-VKE3F6V7.js} +2 -2
  69. package/dist/{chunk-YWZHBXEI.js → chunk-WH6BDFVD.js} +2 -2
  70. package/dist/{chunk-37RMY44V.js → chunk-WOH5UQMK.js} +2 -2
  71. package/dist/chunk-WUFJP4GG.js +2 -0
  72. package/dist/chunk-WUFJP4GG.js.map +1 -0
  73. package/dist/{chunk-BGRX3DBF.js → chunk-X6ZOK7H5.js} +2 -2
  74. package/dist/{chunk-CARPUKT7.js → chunk-XFDNQDDA.js} +2 -2
  75. package/dist/{chunk-A7CLJBJI.js → chunk-XFGSO4WQ.js} +2 -2
  76. package/dist/chunk-XOK42FJS.js +2 -0
  77. package/dist/chunk-XOK42FJS.js.map +1 -0
  78. package/dist/{chunk-IF42CZJH.js → chunk-YRC6EEM3.js} +2 -2
  79. package/dist/{chunk-4EMAROPQ.js → chunk-ZTKZWB7I.js} +2 -2
  80. package/dist/chunk-ZVUQDK2E.js +2 -0
  81. package/dist/default-components.d.ts +2 -2
  82. package/dist/default-components.js +1 -1
  83. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  84. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  85. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  86. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  87. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  88. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  89. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  90. package/dist/flows/ContractAmendment/hooks.js +1 -1
  91. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  92. package/dist/flows/ContractAmendment/index.js +1 -1
  93. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  94. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  95. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -6
  96. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  97. package/dist/flows/ContractorOnboarding/api.d.ts +9 -19
  98. package/dist/flows/ContractorOnboarding/api.js +1 -1
  99. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  100. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  101. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -6
  102. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  103. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  104. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  105. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -6
  106. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  107. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -6
  108. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  109. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +5 -6
  110. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  111. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  112. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  113. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -6
  114. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  115. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  116. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  117. package/dist/flows/ContractorOnboarding/context.d.ts +6 -11
  118. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -6
  119. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  120. package/dist/flows/ContractorOnboarding/index.d.ts +5 -6
  121. package/dist/flows/ContractorOnboarding/index.js +1 -1
  122. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -6
  123. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  124. package/dist/flows/ContractorOnboarding/types.d.ts +8 -9
  125. package/dist/flows/ContractorOnboarding/utils.d.ts +5 -5
  126. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  127. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  128. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  129. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  130. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  131. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  132. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  133. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  134. package/dist/flows/CostCalculator/api.d.ts +2 -2
  135. package/dist/flows/CostCalculator/api.js +1 -1
  136. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  137. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  138. package/dist/flows/CostCalculator/context.d.ts +3 -3
  139. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  140. package/dist/flows/CostCalculator/hooks.js +1 -1
  141. package/dist/flows/CostCalculator/index.d.ts +3 -3
  142. package/dist/flows/CostCalculator/index.js +1 -1
  143. package/dist/flows/CostCalculator/types.d.ts +2 -2
  144. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  145. package/dist/flows/CostCalculator/utils.js +1 -1
  146. package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
  147. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  148. package/dist/flows/CreateCompany/api.d.ts +2 -2
  149. package/dist/flows/CreateCompany/api.js +1 -1
  150. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
  151. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  152. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
  153. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  154. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
  155. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  156. package/dist/flows/CreateCompany/context.d.ts +4 -4
  157. package/dist/flows/CreateCompany/hooks.d.ts +4 -4
  158. package/dist/flows/CreateCompany/hooks.js +1 -1
  159. package/dist/flows/CreateCompany/index.d.ts +4 -4
  160. package/dist/flows/CreateCompany/index.js +1 -1
  161. package/dist/flows/CreateCompany/types.d.ts +4 -4
  162. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  163. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  164. package/dist/flows/Onboarding/api.d.ts +13 -5
  165. package/dist/flows/Onboarding/api.js +1 -1
  166. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  167. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  168. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  169. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  170. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  171. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  172. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  173. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  174. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  175. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  176. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  177. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  178. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  179. package/dist/flows/Onboarding/components/ReviewStep.js +1 -1
  180. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  181. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  182. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  183. package/dist/flows/Onboarding/context.d.ts +5 -4
  184. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  185. package/dist/flows/Onboarding/hooks.js +1 -1
  186. package/dist/flows/Onboarding/index.d.ts +4 -4
  187. package/dist/flows/Onboarding/index.js +1 -1
  188. package/dist/flows/Onboarding/types.d.ts +4 -4
  189. package/dist/flows/Onboarding/utils.d.ts +4 -4
  190. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  191. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  192. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  193. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  194. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  195. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  196. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  197. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  198. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  199. package/dist/flows/Termination/TerminationFlow.js +1 -1
  200. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  201. package/dist/flows/Termination/TerminationForm.js +1 -1
  202. package/dist/flows/Termination/api.d.ts +5 -5
  203. package/dist/flows/Termination/api.js +1 -1
  204. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  205. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  206. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  207. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  208. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  209. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  210. package/dist/flows/Termination/context.d.ts +4 -4
  211. package/dist/flows/Termination/hooks.d.ts +4 -4
  212. package/dist/flows/Termination/hooks.js +1 -1
  213. package/dist/flows/Termination/index.d.ts +6 -6
  214. package/dist/flows/Termination/index.js +1 -1
  215. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  216. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  217. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  218. package/dist/flows/Termination/types.d.ts +4 -4
  219. package/dist/flows/Termination/utils.d.ts +4 -4
  220. package/dist/flows/types.d.ts +2 -2
  221. package/dist/index.css +1 -1
  222. package/dist/index.css.map +1 -1
  223. package/dist/index.d.ts +11 -12
  224. package/dist/index.js +2 -2
  225. package/dist/index.js.map +1 -1
  226. package/dist/internals.d.ts +3 -3
  227. package/dist/internals.js +1 -1
  228. package/dist/{mutations-DfpgjZty.d.ts → mutations-C70g1hf2.d.ts} +1 -1
  229. package/dist/{remoteFlows-PN8ksydr.d.ts → remoteFlows-S2ZmIMR3.d.ts} +1 -1
  230. package/dist/styles.css +1 -1
  231. package/dist/styles.css.map +1 -1
  232. package/dist/{types-BxoBKn3U.d.ts → types-Bt3Nvzma.d.ts} +1 -1
  233. package/dist/{types-D9-E_Ywz.d.ts → types-DAJZFuKz.d.ts} +12 -15
  234. package/dist/{types-BOd-0F3b.d.ts → types-DP9U0M1b.d.ts} +3 -3
  235. package/dist/{types-BK2JZJKy.d.ts → types-DXC7D8qf.d.ts} +8 -3
  236. package/dist/{types-kzU5HUpO.d.ts → types-Dq-2OENN.d.ts} +2 -2
  237. package/dist/{types.gen-COTll5I0.d.ts → types.gen-BSxAhJ_V.d.ts} +5 -1
  238. package/dist/{utils-CfntV90o.d.ts → utils-BaHnOWNw.d.ts} +1 -1
  239. package/package.json +1 -6
  240. package/dist/CountryFieldDefault-JZDE75HS.js +0 -2
  241. package/dist/DatePickerFieldDefault-LJV4QSEP.js +0 -2
  242. package/dist/PDFPreviewDefault-RJNE7QSF.js +0 -2
  243. package/dist/RadioGroupFieldDefault-CXY33ONT.js +0 -2
  244. package/dist/chunk-246D2A55.js +0 -2
  245. package/dist/chunk-2NDVHQRP.js +0 -2
  246. package/dist/chunk-2NDVHQRP.js.map +0 -1
  247. package/dist/chunk-42R2H2DW.js +0 -2
  248. package/dist/chunk-7ENB7H4E.js +0 -6
  249. package/dist/chunk-7ENB7H4E.js.map +0 -1
  250. package/dist/chunk-E2LBPO5Z.js +0 -2
  251. package/dist/chunk-E2LBPO5Z.js.map +0 -1
  252. package/dist/chunk-E6256SK7.js +0 -2
  253. package/dist/chunk-E6256SK7.js.map +0 -1
  254. package/dist/chunk-FJVQQ4XB.js +0 -2
  255. package/dist/chunk-FJVQQ4XB.js.map +0 -1
  256. package/dist/chunk-FRCFJ64I.js +0 -2
  257. package/dist/chunk-FRCFJ64I.js.map +0 -1
  258. package/dist/chunk-HQAHUE5P.js +0 -2
  259. package/dist/chunk-HQAHUE5P.js.map +0 -1
  260. package/dist/chunk-OENTT2KT.js +0 -2
  261. package/dist/chunk-OENTT2KT.js.map +0 -1
  262. package/dist/chunk-OEXY56S2.js.map +0 -1
  263. package/dist/chunk-QECFSTI4.js +0 -2
  264. package/dist/chunk-QECFSTI4.js.map +0 -1
  265. package/dist/chunk-SLD227LM.js +0 -2
  266. package/dist/chunk-SLD227LM.js.map +0 -1
  267. package/dist/chunk-Z3EAYQ5D.js +0 -2
  268. package/dist/chunk-Z3EAYQ5D.js.map +0 -1
  269. package/dist/chunk-Z7WBY27D.js +0 -2
  270. package/dist/chunk-Z7WBY27D.js.map +0 -1
  271. package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.d.ts +0 -29
  272. package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.js +0 -2
  273. package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.js.map +0 -1
  274. package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.d.ts +0 -23
  275. package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.js +0 -2
  276. package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.js.map +0 -1
  277. /package/dist/{CountryFieldDefault-JZDE75HS.js.map → CountryFieldDefault-KSVYDH5T.js.map} +0 -0
  278. /package/dist/{DatePickerFieldDefault-LJV4QSEP.js.map → DatePickerFieldDefault-TZEI446Y.js.map} +0 -0
  279. /package/dist/{PDFPreviewDefault-RJNE7QSF.js.map → PDFPreviewDefault-HSSMYKV5.js.map} +0 -0
  280. /package/dist/{RadioGroupFieldDefault-CXY33ONT.js.map → RadioGroupFieldDefault-U44JTO4O.js.map} +0 -0
  281. /package/dist/{chunk-WEAO46EO.js.map → chunk-36MJ5ORQ.js.map} +0 -0
  282. /package/dist/{chunk-YHROBX2M.js.map → chunk-3GYINB3B.js.map} +0 -0
  283. /package/dist/{chunk-MLVB5MYU.js.map → chunk-545OW3ET.js.map} +0 -0
  284. /package/dist/{chunk-JGJTFYHN.js.map → chunk-5BBQUGAN.js.map} +0 -0
  285. /package/dist/{chunk-UMVMNUPH.js.map → chunk-5D4AKL3N.js.map} +0 -0
  286. /package/dist/{chunk-EDLQ3JNY.js.map → chunk-5L2ELV4L.js.map} +0 -0
  287. /package/dist/{chunk-R7BHA5RA.js.map → chunk-6P53J6DA.js.map} +0 -0
  288. /package/dist/{chunk-A232PIG7.js.map → chunk-AK4FXJFO.js.map} +0 -0
  289. /package/dist/{chunk-NAH5PAUK.js.map → chunk-BCO3C476.js.map} +0 -0
  290. /package/dist/{chunk-VBQVXR4U.js.map → chunk-C6ND527K.js.map} +0 -0
  291. /package/dist/{chunk-XHAJ544L.js.map → chunk-CPXEQRNG.js.map} +0 -0
  292. /package/dist/{chunk-B7EJ2OAA.js.map → chunk-CUANSH3E.js.map} +0 -0
  293. /package/dist/{chunk-AJIDQALB.js.map → chunk-DM5RRWPM.js.map} +0 -0
  294. /package/dist/{chunk-PHPCCABU.js.map → chunk-EKJK34DS.js.map} +0 -0
  295. /package/dist/{chunk-EWL6BSEP.js.map → chunk-EQVUP5ZR.js.map} +0 -0
  296. /package/dist/{chunk-H3BUOBWO.js.map → chunk-FBWPGUBC.js.map} +0 -0
  297. /package/dist/{chunk-UB6PYKNX.js.map → chunk-FJ6WBG3H.js.map} +0 -0
  298. /package/dist/{chunk-BG66XH5L.js.map → chunk-FQHFTFUZ.js.map} +0 -0
  299. /package/dist/{chunk-XNAFFHZH.js.map → chunk-GCVM3FO4.js.map} +0 -0
  300. /package/dist/{chunk-7PWZAW7M.js.map → chunk-GDJP7TMP.js.map} +0 -0
  301. /package/dist/{chunk-W4ECFBIA.js.map → chunk-I2NE5CCG.js.map} +0 -0
  302. /package/dist/{chunk-ERSP6CZ3.js.map → chunk-J6HS3UVY.js.map} +0 -0
  303. /package/dist/{chunk-IZGSVS3I.js.map → chunk-JPA3IMPE.js.map} +0 -0
  304. /package/dist/{chunk-WEOIHTBU.js.map → chunk-L4P7572F.js.map} +0 -0
  305. /package/dist/{chunk-AW7JELYX.js.map → chunk-M53HKCJ5.js.map} +0 -0
  306. /package/dist/{chunk-DFAY4TWC.js.map → chunk-MCWXQT7A.js.map} +0 -0
  307. /package/dist/{chunk-4UO7KLRK.js.map → chunk-N3Q636ZK.js.map} +0 -0
  308. /package/dist/{chunk-62O3CKKH.js.map → chunk-NAGIFFJS.js.map} +0 -0
  309. /package/dist/{chunk-FSK2DR6Z.js.map → chunk-NNW7S5AY.js.map} +0 -0
  310. /package/dist/{chunk-YPUP5LNV.js.map → chunk-OHCA7HXR.js.map} +0 -0
  311. /package/dist/{chunk-4N4MQECC.js.map → chunk-OXAEJWEQ.js.map} +0 -0
  312. /package/dist/{chunk-TPGN6QTL.js.map → chunk-OZKZKV5C.js.map} +0 -0
  313. /package/dist/{chunk-JI4CYPLW.js.map → chunk-PGVAOMQU.js.map} +0 -0
  314. /package/dist/{chunk-LVXV3GHT.js.map → chunk-QGGPXNVY.js.map} +0 -0
  315. /package/dist/{chunk-MHAY555P.js.map → chunk-QI6E2NJU.js.map} +0 -0
  316. /package/dist/{chunk-3B6XXK5H.js.map → chunk-QNWTCGRD.js.map} +0 -0
  317. /package/dist/{chunk-HOR3KPOZ.js.map → chunk-SAKDBD4P.js.map} +0 -0
  318. /package/dist/{chunk-G7EVUAYE.js.map → chunk-SJ5IZCJP.js.map} +0 -0
  319. /package/dist/{chunk-SLLDKJ7K.js.map → chunk-SNRZPCZ7.js.map} +0 -0
  320. /package/dist/{chunk-HYYILYKU.js.map → chunk-T3GSGHZJ.js.map} +0 -0
  321. /package/dist/{chunk-TVIUQXLE.js.map → chunk-UPJDLAKU.js.map} +0 -0
  322. /package/dist/{chunk-BVFQ6LFD.js.map → chunk-V6LOIP27.js.map} +0 -0
  323. /package/dist/{chunk-7WGZGAQY.js.map → chunk-V74BLD3D.js.map} +0 -0
  324. /package/dist/{chunk-WO54IG4S.js.map → chunk-VKE3F6V7.js.map} +0 -0
  325. /package/dist/{chunk-YWZHBXEI.js.map → chunk-WH6BDFVD.js.map} +0 -0
  326. /package/dist/{chunk-37RMY44V.js.map → chunk-WOH5UQMK.js.map} +0 -0
  327. /package/dist/{chunk-BGRX3DBF.js.map → chunk-X6ZOK7H5.js.map} +0 -0
  328. /package/dist/{chunk-CARPUKT7.js.map → chunk-XFDNQDDA.js.map} +0 -0
  329. /package/dist/{chunk-A7CLJBJI.js.map → chunk-XFGSO4WQ.js.map} +0 -0
  330. /package/dist/{chunk-IF42CZJH.js.map → chunk-YRC6EEM3.js.map} +0 -0
  331. /package/dist/{chunk-4EMAROPQ.js.map → chunk-ZTKZWB7I.js.map} +0 -0
  332. /package/dist/{chunk-42R2H2DW.js.map → chunk-ZVUQDK2E.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{b as y}from"./chunk-PGWKJ6FK.js";import{b as F}from"./chunk-LNV36S6D.js";import{a as u}from"./chunk-SLLDKJ7K.js";import{f,g as p}from"./chunk-H2JFQGQJ.js";import{b as c}from"./chunk-X6ZAR7ZL.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as S}from"react";import{jsx as b}from"react/jsx-runtime";import{createElement as V}from"react";function N({defaultValues:d,onSubmit:g,components:E}){let{formId:w,onboardingBag:o}=y(),k=F(o.handleValidation),r=f({resolver:k,defaultValues:d,shouldUnregister:!1,mode:"onBlur"});S(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),S(()=>{let t=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==d[i])&&o?.checkFieldUpdates(e)});return()=>t?.unsubscribe()},[]);let h=m(async(t,e)=>{let s=e?.nativeEvent;if(s?.isDraftSubmission){let{onSuccess:i,onError:l}=s.draftCallbacks;try{if(!await r.trigger())return;let n=await o.onSubmit(t);if(n?.data)i?.();else if(n?.error){let P=o.stepState.currentStep.name,B=o.meta?.fields?.[P],O=c(n?.fieldErrors||[],B);l?.({error:n.error,rawError:n.rawError,fieldErrors:O})}}catch(a){l?.({error:a,rawError:a,fieldErrors:[]})}}else await g(t)},"handleSubmit");return V(p,{...r,key:`form-${o.stepState.currentStep.name}`},b("form",{id:w,onSubmit:r.handleSubmit(h),className:"space-y-4 RemoteFlows__OnboardingForm",children:b(u,{components:E,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}m(N,"OnboardingForm");export{N as a};
2
- //# sourceMappingURL=chunk-WEAO46EO.js.map
1
+ import{b as y}from"./chunk-PGWKJ6FK.js";import{b as F}from"./chunk-LNV36S6D.js";import{a as u}from"./chunk-SNRZPCZ7.js";import{f,g as p}from"./chunk-H2JFQGQJ.js";import{b as c}from"./chunk-X6ZAR7ZL.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as S}from"react";import{jsx as b}from"react/jsx-runtime";import{createElement as V}from"react";function N({defaultValues:d,onSubmit:g,components:E}){let{formId:w,onboardingBag:o}=y(),k=F(o.handleValidation),r=f({resolver:k,defaultValues:d,shouldUnregister:!1,mode:"onBlur"});S(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),S(()=>{let t=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==d[i])&&o?.checkFieldUpdates(e)});return()=>t?.unsubscribe()},[]);let h=m(async(t,e)=>{let s=e?.nativeEvent;if(s?.isDraftSubmission){let{onSuccess:i,onError:l}=s.draftCallbacks;try{if(!await r.trigger())return;let n=await o.onSubmit(t);if(n?.data)i?.();else if(n?.error){let P=o.stepState.currentStep.name,B=o.meta?.fields?.[P],O=c(n?.fieldErrors||[],B);l?.({error:n.error,rawError:n.rawError,fieldErrors:O})}}catch(a){l?.({error:a,rawError:a,fieldErrors:[]})}}else await g(t)},"handleSubmit");return V(p,{...r,key:`form-${o.stepState.currentStep.name}`},b("form",{id:w,onSubmit:r.handleSubmit(h),className:"space-y-4 RemoteFlows__OnboardingForm",children:b(u,{components:E,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}m(N,"OnboardingForm");export{N as a};
2
+ //# sourceMappingURL=chunk-36MJ5ORQ.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-OEXY56S2.js";import{b as a}from"./chunk-Q3ALCPJN.js";import{k as n}from"./chunk-VIGKOVHP.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as S}from"react/jsx-runtime";function C({onSubmit:c,onSuccess:s,onError:u}){let{contractorOnboardingBag:r}=a(),l=t(async e=>{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 m=n(o,r.meta?.fields?.select_country);u?.(m)}},"handleSubmit"),d=r.stepState.values?.select_country||r.initialValues.select_country;return S(i,{defaultValues:d,onSubmit:l})}t(C,"SelectCountryStep");export{C as a};
2
- //# sourceMappingURL=chunk-YHROBX2M.js.map
1
+ import{a as i}from"./chunk-URJI6IZB.js";import{b as a}from"./chunk-Q3ALCPJN.js";import{k as n}from"./chunk-VIGKOVHP.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as S}from"react/jsx-runtime";function C({onSubmit:c,onSuccess:s,onError:u}){let{contractorOnboardingBag:r}=a(),l=t(async e=>{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 m=n(o,r.meta?.fields?.select_country);u?.(m)}},"handleSubmit"),d=r.stepState.values?.select_country||r.initialValues.select_country;return S(i,{defaultValues:d,onSubmit:l})}t(C,"SelectCountryStep");export{C as a};
2
+ //# sourceMappingURL=chunk-3GYINB3B.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-XU3B7N3C.js";import{a as r}from"./chunk-BG66XH5L.js";import{a}from"./chunk-U6LRMWRI.js";import{a as c}from"./chunk-BGRX3DBF.js";import{a as e}from"./chunk-D5AR26AI.js";import{a as o}from"./chunk-TVZAFTPT.js";import{a as n}from"./chunk-P37U34EQ.js";import{useId as f}from"react";import{jsx as s}from"react/jsx-runtime";function k({employmentId:d,countryCode:C,options:p,render:A}){let t=c({employmentId:d,countryCode:C,options:p}),i=f();return s(o.Provider,{value:{formId:i,contractAmendmentBag:t},children:A({contractAmendmentBag:t,components:{Form:r,SubmitButton:a,ConfirmationForm:m,BackButton:e}})})}n(k,"ContractAmendmentFlow");export{k as a};
2
- //# sourceMappingURL=chunk-MLVB5MYU.js.map
1
+ import{a as m}from"./chunk-XU3B7N3C.js";import{a as r}from"./chunk-FQHFTFUZ.js";import{a}from"./chunk-U6LRMWRI.js";import{a as c}from"./chunk-X6ZOK7H5.js";import{a as e}from"./chunk-D5AR26AI.js";import{a as o}from"./chunk-TVZAFTPT.js";import{a as n}from"./chunk-P37U34EQ.js";import{useId as f}from"react";import{jsx as s}from"react/jsx-runtime";function k({employmentId:d,countryCode:C,options:p,render:A}){let t=c({employmentId:d,countryCode:C,options:p}),i=f();return s(o.Provider,{value:{formId:i,contractAmendmentBag:t},children:A({contractAmendmentBag:t,components:{Form:r,SubmitButton:a,ConfirmationForm:m,BackButton:e}})})}n(k,"ContractAmendmentFlow");export{k as a};
2
+ //# sourceMappingURL=chunk-545OW3ET.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-KRJETP7I.js";import{a}from"./chunk-OENTT2KT.js";import{a as i}from"./chunk-W7YC2IO2.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-YIMWF5GR.js";import{a as f}from"./chunk-EDLQ3JNY.js";import{a as n}from"./chunk-YWZHBXEI.js";import{a as p}from"./chunk-LVXV3GHT.js";import{a as s}from"./chunk-TPGN6QTL.js";import{c as e}from"./chunk-FJVQQ4XB.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as D,useState as P}from"react";import{jsx as R}from"react/jsx-runtime";var L=t(({employmentId:d,companyId:u,countryCode:b,type:l="employee",externalId:v,skipSteps:g,initialValues:B,render:I,options:O})=>{let w=D(),o=e({companyId:u,countryCode:b,employmentId:d,type:l,options:O,skipSteps:g,externalId:v,initialValues:B}),[C,h]=P({showReserveInvoice:!1,showInviteSuccessful:!1});return R(r.Provider,{value:{formId:w,onboardingBag:o,creditScore:C,setCreditScore:h},children:I({onboardingBag:o,components:{BasicInformationStep:n,ContractDetailsStep:s,BenefitsStep:p,SubmitButton:i,SaveDraftButton:S,BackButton:m,OnboardingInvite:a,SelectCountryStep:f,ReviewStep:c}})})},"OnboardingFlow");export{L as a};
2
- //# sourceMappingURL=chunk-JGJTFYHN.js.map
1
+ import{a}from"./chunk-GCBEPX4V.js";import{a as i}from"./chunk-W7YC2IO2.js";import{a as c}from"./chunk-FHYOWPXB.js";import{a as S}from"./chunk-YIMWF5GR.js";import{a as f}from"./chunk-5L2ELV4L.js";import{a as n}from"./chunk-WH6BDFVD.js";import{a as p}from"./chunk-QGGPXNVY.js";import{a as s}from"./chunk-OZKZKV5C.js";import{a as m}from"./chunk-KRJETP7I.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{c as e}from"./chunk-XOK42FJS.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as D,useState as P}from"react";import{jsx as R}from"react/jsx-runtime";var L=t(({employmentId:d,companyId:u,countryCode:b,type:l="employee",externalId:v,skipSteps:g,initialValues:B,render:I,options:O})=>{let w=D(),o=e({companyId:u,countryCode:b,employmentId:d,type:l,options:O,skipSteps:g,externalId:v,initialValues:B}),[C,h]=P({showReserveInvoice:!1,showInviteSuccessful:!1});return R(r.Provider,{value:{formId:w,onboardingBag:o,creditScore:C,setCreditScore:h},children:I({onboardingBag:o,components:{BasicInformationStep:n,ContractDetailsStep:s,BenefitsStep:p,SubmitButton:i,SaveDraftButton:S,BackButton:m,OnboardingInvite:a,SelectCountryStep:f,ReviewStep:c}})})},"OnboardingFlow");export{L as a};
2
+ //# sourceMappingURL=chunk-5BBQUGAN.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-BVFQ6LFD.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function p({onSubmit:n}){let{terminationBag:o}=e(),a=m(async t=>{let r=await o?.parseFormValues(t);await n?.(r),o?.next()},"handleSubmit");return u(i,{defaultValues:o.fieldValues,onSubmit:a})}m(p,"EmployeeCommunicationForm");export{p as a};
2
- //# sourceMappingURL=chunk-UMVMNUPH.js.map
1
+ import{a as i}from"./chunk-V6LOIP27.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function p({onSubmit:n}){let{terminationBag:o}=e(),a=m(async t=>{let r=await o?.parseFormValues(t);await n?.(r),o?.next()},"handleSubmit");return u(i,{defaultValues:o.fieldValues,onSubmit:a})}m(p,"EmployeeCommunicationForm");export{p as a};
2
+ //# sourceMappingURL=chunk-5D4AKL3N.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-WEAO46EO.js";import{b as i}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:s,onSuccess:c,onError:t}){let{onboardingBag:o}=i(),u=e(async n=>{try{await s?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await c?.(r?.data),o?.next();return}r?.error&&t?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(a,{defaultValues:l,onSubmit:u})}e(y,"SelectCountryStep");export{y as a};
2
- //# sourceMappingURL=chunk-EDLQ3JNY.js.map
1
+ import{a}from"./chunk-36MJ5ORQ.js";import{b as i}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:s,onSuccess:c,onError:t}){let{onboardingBag:o}=i(),u=e(async n=>{try{await s?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await c?.(r?.data),o?.next();return}r?.error&&t?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(a,{defaultValues:l,onSubmit:u})}e(y,"SelectCountryStep");export{y as a};
2
+ //# sourceMappingURL=chunk-5L2ELV4L.js.map
@@ -1,2 +1,2 @@
1
- import{l as J}from"./chunk-SLD227LM.js";import{b as G,c as M,d as L}from"./chunk-T7O3YYOG.js";import{a as k}from"./chunk-TOQPDTGG.js";import{c as B,l as A}from"./chunk-H2JFQGQJ.js";import{b as H}from"./chunk-KQPDXXG3.js";import{a as n,b as d,c as qe}from"./chunk-P37U34EQ.js";var D=d((En,U)=>{"use strict";function we(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(we,"isObject");U.exports=we});var X=d((In,V)=>{"use strict";var Fe=typeof global=="object"&&global&&global.Object===Object&&global;V.exports=Fe});var _=d((qn,z)=>{"use strict";var Pe=X(),ke=typeof self=="object"&&self&&self.Object===Object&&self,Me=Pe||ke||Function("return this")();z.exports=Me});var Q=d((wn,K)=>{"use strict";var Le=_(),De=n(function(){return Le.Date.now()},"now");K.exports=De});var Z=d((Pn,Y)=>{"use strict";var _e=/\s/;function $e(e){for(var t=e.length;t--&&_e.test(e.charAt(t)););return t}n($e,"trimmedEndIndex");Y.exports=$e});var ne=d((Mn,ee)=>{"use strict";var Ne=Z(),We=/^\s+/;function Be(e){return e&&e.slice(0,Ne(e)+1).replace(We,"")}n(Be,"baseTrim");ee.exports=Be});var $=d((Dn,te)=>{"use strict";var Ae=_(),He=Ae.Symbol;te.exports=He});var se=d((_n,ie)=>{"use strict";var re=$(),oe=Object.prototype,Ge=oe.hasOwnProperty,Je=oe.toString,O=re?re.toStringTag:void 0;function Ue(e){var t=Ge.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch{}var u=Je.call(e);return i&&(t?e[O]=r:delete e[O]),u}n(Ue,"getRawTag");ie.exports=Ue});var ce=d((Nn,ae)=>{"use strict";var Ve=Object.prototype,Xe=Ve.toString;function ze(e){return Xe.call(e)}n(ze,"objectToString");ae.exports=ze});var le=d((Bn,de)=>{"use strict";var ue=$(),Ke=se(),Qe=ce(),Ye="[object Null]",Ze="[object Undefined]",fe=ue?ue.toStringTag:void 0;function en(e){return e==null?e===void 0?Ze:Ye:fe&&fe in Object(e)?Ke(e):Qe(e)}n(en,"baseGetTag");de.exports=en});var pe=d((Hn,me)=>{"use strict";function nn(e){return e!=null&&typeof e=="object"}n(nn,"isObjectLike");me.exports=nn});var be=d((Jn,ge)=>{"use strict";var tn=le(),rn=pe(),on="[object Symbol]";function sn(e){return typeof e=="symbol"||rn(e)&&tn(e)==on}n(sn,"isSymbol");ge.exports=sn});var Ce=d((Vn,xe)=>{"use strict";var an=ne(),ve=D(),cn=be(),ye=NaN,un=/^[-+]0x[0-9a-f]+$/i,fn=/^0b[01]+$/i,dn=/^0o[0-7]+$/i,ln=parseInt;function mn(e){if(typeof e=="number")return e;if(cn(e))return ye;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=an(e);var r=fn.test(e);return r||dn.test(e)?ln(e.slice(2),r?2:8):un.test(e)?ye:+e}n(mn,"toNumber");xe.exports=mn});var Se=d((zn,Te)=>{"use strict";var pn=D(),N=Q(),he=Ce(),gn="Expected a function",bn=Math.max,vn=Math.min;function yn(e,t,r){var i,u,b,l,s,a,p=0,E=!1,f=!1,x=!0;if(typeof e!="function")throw new TypeError(gn);t=he(t)||0,pn(r)&&(E=!!r.leading,f="maxWait"in r,b=f?bn(he(r.maxWait)||0,t):b,x="trailing"in r?!!r.trailing:x);function C(o){var g=i,y=u;return i=u=void 0,p=o,l=e.apply(y,g),l}n(C,"invokeFunc");function R(o){return p=o,s=setTimeout(m,t),E?C(o):l}n(R,"leadingEdge");function q(o){var g=o-a,y=o-p,c=t-g;return f?vn(c,b-y):c}n(q,"remainingWait");function T(o){var g=o-a,y=o-p;return a===void 0||g>=t||g<0||f&&y>=b}n(T,"shouldInvoke");function m(){var o=N();if(T(o))return S(o);s=setTimeout(m,q(o))}n(m,"timerExpired");function S(o){return s=void 0,x&&i?C(o):(i=u=void 0,l)}n(S,"trailingEdge");function I(){s!==void 0&&clearTimeout(s),p=0,i=a=u=s=void 0}n(I,"cancel");function w(){return s===void 0?l:S(N())}n(w,"flush");function j(){var o=N(),g=T(o);if(i=arguments,u=this,a=o,g){if(s===void 0)return R(a);if(f)return clearTimeout(s),s=setTimeout(m,t),C(a)}return s===void 0&&(s=setTimeout(m,t)),l}return n(j,"debounced"),j.cancel=I,j.flush=w,j}n(yn,"debounce");Te.exports=yn});import{useState as hn,useCallback as Tn,useEffect as Ee,useRef as Sn}from"react";var Oe=qe(Se(),1);import{useCallback as xn,useEffect as Cn,useRef as je}from"react";function W(e,t){let r=je(e);Cn(()=>{r.current=e},[e]);let i=je((0,Oe.default)(u=>{r.current(u)},t)).current;return xn(u=>{i(u)},[i])}n(W,"useDebounce");import{Fragment as On,jsx as h,jsxs as Re}from"react/jsx-runtime";var jn=n(({description:e,showConversion:t,targetCurrency:r,className:i,onClick:u})=>{let{components:b}=H(),l=t?`Hide ${r} conversion`:`Show ${r} conversion`,s=b?.button;if(!s)throw new Error("Button component not found");return Re("span",{className:i,children:[h(A,{as:"span",children:e})," ",h(s,{className:`${i.replace("-description","-button")}`,"data-type":"inline",onClick:u,children:l})]})},"DescriptionWithConversion"),ut=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:i,conversionProperties:u,classNamePrefix:b,description:l,conversionType:s="spread",...a})=>{let[p,E]=hn(!1),{setValue:f,watch:x}=B(),C=x(r||a.name),R=Sn(!0),q=e&&t&&e!==t,{mutateAsync:T}=J({type:s}),m=`${a.name}_converted`;Ee(()=>{f(m,r||a.name)},[f,r,a.name,m]),Ee(()=>{if(R.current){R.current=!1;return}f(i,"")},[e,i,f]);let S=Tn(async(c,v,F)=>{if(!(!c||isNaN(c)||c<=0))return T({source_currency:v,target_currency:F,amount:c})},[T]),I=W(async c=>{let v=M(c),P=1/((await S(v,t,e))?.data?.data.conversion_data?.exchange_rate??1),Ie=G(Number(v)*P);f(i,L(Ie))},500),w=W(async c=>{let v=M(c),P=(await S(v,t,e))?.data?.data.conversion_data.target_amount;f(r||a.name,L(P))},500),j=n(c=>{f(m,r||a.name),p&&I(c.target.value)},"handleMainFieldChange"),o=n(c=>{f(m,i),w(c.target.value)},"handleConversionFieldChange"),g=n(c=>{c.preventDefault(),E(v=>!v),!p&&C&&I(C)},"toggleConversion"),y=q?h(jn,{targetCurrency:t,description:l,showConversion:p,className:`${b}-description`,onClick:g}):l;return Re(On,{children:[h(k,{...a,name:r||a.name,additionalProps:{currency:e},description:y,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:j}),p&&h(k,{additionalProps:{currency:t},name:i,label:u?.label||"Conversion",description:u?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:o}),h("input",{type:"hidden",name:m,value:x(m)||r||a.name})]})},"CurrencyConversionField");export{ut as a};
2
- //# sourceMappingURL=chunk-R7BHA5RA.js.map
1
+ import{l as J}from"./chunk-WUFJP4GG.js";import{b as G,c as M,d as L}from"./chunk-T7O3YYOG.js";import{a as k}from"./chunk-TOQPDTGG.js";import{c as B,l as A}from"./chunk-H2JFQGQJ.js";import{b as H}from"./chunk-KQPDXXG3.js";import{a as n,b as d,c as qe}from"./chunk-P37U34EQ.js";var D=d((En,U)=>{"use strict";function we(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(we,"isObject");U.exports=we});var X=d((In,V)=>{"use strict";var Fe=typeof global=="object"&&global&&global.Object===Object&&global;V.exports=Fe});var _=d((qn,z)=>{"use strict";var Pe=X(),ke=typeof self=="object"&&self&&self.Object===Object&&self,Me=Pe||ke||Function("return this")();z.exports=Me});var Q=d((wn,K)=>{"use strict";var Le=_(),De=n(function(){return Le.Date.now()},"now");K.exports=De});var Z=d((Pn,Y)=>{"use strict";var _e=/\s/;function $e(e){for(var t=e.length;t--&&_e.test(e.charAt(t)););return t}n($e,"trimmedEndIndex");Y.exports=$e});var ne=d((Mn,ee)=>{"use strict";var Ne=Z(),We=/^\s+/;function Be(e){return e&&e.slice(0,Ne(e)+1).replace(We,"")}n(Be,"baseTrim");ee.exports=Be});var $=d((Dn,te)=>{"use strict";var Ae=_(),He=Ae.Symbol;te.exports=He});var se=d((_n,ie)=>{"use strict";var re=$(),oe=Object.prototype,Ge=oe.hasOwnProperty,Je=oe.toString,O=re?re.toStringTag:void 0;function Ue(e){var t=Ge.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch{}var u=Je.call(e);return i&&(t?e[O]=r:delete e[O]),u}n(Ue,"getRawTag");ie.exports=Ue});var ce=d((Nn,ae)=>{"use strict";var Ve=Object.prototype,Xe=Ve.toString;function ze(e){return Xe.call(e)}n(ze,"objectToString");ae.exports=ze});var le=d((Bn,de)=>{"use strict";var ue=$(),Ke=se(),Qe=ce(),Ye="[object Null]",Ze="[object Undefined]",fe=ue?ue.toStringTag:void 0;function en(e){return e==null?e===void 0?Ze:Ye:fe&&fe in Object(e)?Ke(e):Qe(e)}n(en,"baseGetTag");de.exports=en});var pe=d((Hn,me)=>{"use strict";function nn(e){return e!=null&&typeof e=="object"}n(nn,"isObjectLike");me.exports=nn});var be=d((Jn,ge)=>{"use strict";var tn=le(),rn=pe(),on="[object Symbol]";function sn(e){return typeof e=="symbol"||rn(e)&&tn(e)==on}n(sn,"isSymbol");ge.exports=sn});var Ce=d((Vn,xe)=>{"use strict";var an=ne(),ve=D(),cn=be(),ye=NaN,un=/^[-+]0x[0-9a-f]+$/i,fn=/^0b[01]+$/i,dn=/^0o[0-7]+$/i,ln=parseInt;function mn(e){if(typeof e=="number")return e;if(cn(e))return ye;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=an(e);var r=fn.test(e);return r||dn.test(e)?ln(e.slice(2),r?2:8):un.test(e)?ye:+e}n(mn,"toNumber");xe.exports=mn});var Se=d((zn,Te)=>{"use strict";var pn=D(),N=Q(),he=Ce(),gn="Expected a function",bn=Math.max,vn=Math.min;function yn(e,t,r){var i,u,b,l,s,a,p=0,E=!1,f=!1,x=!0;if(typeof e!="function")throw new TypeError(gn);t=he(t)||0,pn(r)&&(E=!!r.leading,f="maxWait"in r,b=f?bn(he(r.maxWait)||0,t):b,x="trailing"in r?!!r.trailing:x);function C(o){var g=i,y=u;return i=u=void 0,p=o,l=e.apply(y,g),l}n(C,"invokeFunc");function R(o){return p=o,s=setTimeout(m,t),E?C(o):l}n(R,"leadingEdge");function q(o){var g=o-a,y=o-p,c=t-g;return f?vn(c,b-y):c}n(q,"remainingWait");function T(o){var g=o-a,y=o-p;return a===void 0||g>=t||g<0||f&&y>=b}n(T,"shouldInvoke");function m(){var o=N();if(T(o))return S(o);s=setTimeout(m,q(o))}n(m,"timerExpired");function S(o){return s=void 0,x&&i?C(o):(i=u=void 0,l)}n(S,"trailingEdge");function I(){s!==void 0&&clearTimeout(s),p=0,i=a=u=s=void 0}n(I,"cancel");function w(){return s===void 0?l:S(N())}n(w,"flush");function j(){var o=N(),g=T(o);if(i=arguments,u=this,a=o,g){if(s===void 0)return R(a);if(f)return clearTimeout(s),s=setTimeout(m,t),C(a)}return s===void 0&&(s=setTimeout(m,t)),l}return n(j,"debounced"),j.cancel=I,j.flush=w,j}n(yn,"debounce");Te.exports=yn});import{useState as hn,useCallback as Tn,useEffect as Ee,useRef as Sn}from"react";var Oe=qe(Se(),1);import{useCallback as xn,useEffect as Cn,useRef as je}from"react";function W(e,t){let r=je(e);Cn(()=>{r.current=e},[e]);let i=je((0,Oe.default)(u=>{r.current(u)},t)).current;return xn(u=>{i(u)},[i])}n(W,"useDebounce");import{Fragment as On,jsx as h,jsxs as Re}from"react/jsx-runtime";var jn=n(({description:e,showConversion:t,targetCurrency:r,className:i,onClick:u})=>{let{components:b}=H(),l=t?`Hide ${r} conversion`:`Show ${r} conversion`,s=b?.button;if(!s)throw new Error("Button component not found");return Re("span",{className:i,children:[h(A,{as:"span",children:e})," ",h(s,{className:`${i.replace("-description","-button")}`,"data-type":"inline",onClick:u,children:l})]})},"DescriptionWithConversion"),ut=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:i,conversionProperties:u,classNamePrefix:b,description:l,conversionType:s="spread",...a})=>{let[p,E]=hn(!1),{setValue:f,watch:x}=B(),C=x(r||a.name),R=Sn(!0),q=e&&t&&e!==t,{mutateAsync:T}=J({type:s}),m=`${a.name}_converted`;Ee(()=>{f(m,r||a.name)},[f,r,a.name,m]),Ee(()=>{if(R.current){R.current=!1;return}f(i,"")},[e,i,f]);let S=Tn(async(c,v,F)=>{if(!(!c||isNaN(c)||c<=0))return T({source_currency:v,target_currency:F,amount:c})},[T]),I=W(async c=>{let v=M(c),P=1/((await S(v,t,e))?.data?.data.conversion_data?.exchange_rate??1),Ie=G(Number(v)*P);f(i,L(Ie))},500),w=W(async c=>{let v=M(c),P=(await S(v,t,e))?.data?.data.conversion_data.target_amount;f(r||a.name,L(P))},500),j=n(c=>{f(m,r||a.name),p&&I(c.target.value)},"handleMainFieldChange"),o=n(c=>{f(m,i),w(c.target.value)},"handleConversionFieldChange"),g=n(c=>{c.preventDefault(),E(v=>!v),!p&&C&&I(C)},"toggleConversion"),y=q?h(jn,{targetCurrency:t,description:l,showConversion:p,className:`${b}-description`,onClick:g}):l;return Re(On,{children:[h(k,{...a,name:r||a.name,additionalProps:{currency:e},description:y,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:j}),p&&h(k,{additionalProps:{currency:t},name:i,label:u?.label||"Conversion",description:u?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:o}),h("input",{type:"hidden",name:m,value:x(m)||r||a.name})]})},"CurrencyConversionField");export{ut as a};
2
+ //# sourceMappingURL=chunk-6P53J6DA.js.map
@@ -1,2 +1,2 @@
1
- import{j as g}from"./chunk-7ENB7H4E.js";import{a as m,f as u}from"./chunk-VIGKOVHP.js";import{b as f,d as b}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";var P={disclaimerCostCalculator:4668194326797,engagingContractors:43161434169613,employeeOnboardingTimeline:4411262104589,extraPayments:4466822781709,internationalPricing:4410698586893,pricingPlanOptions:43161720465421,ir35Status:42810224523917,remoteFxRate:33271144977421,terminationEmployeeCommunication:4411585179661,terminationNoticePeriods:5831900985613,involuntaryOffboardingServiceCharge:4406932229133,reconciliationInvoice:17604014808589},l=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL");import{useQuery as y}from"@tanstack/react-query";var k=e((r,t)=>{let{client:i}=b();return y({queryKey:["zendesk-article",r],queryFn:e(async()=>{let n=await g({client:i,path:{id:Number(r)}});if(n.error)throw new Error(n.error.message||"Failed to fetch article");return n},"queryFn"),select:e(n=>{let o=n.data?.data.help_center_article;return o&&{...o,body:u(o.body||"")}},"select"),retry:!1,...t})},"useZendeskArticle");import{jsx as R}from"react/jsx-runtime";var C=e(({Trigger:r,zendeskId:t,open:i,onClose:n})=>{let{components:o}=f(),c=l(t),s=e(()=>{n?.()},"handleClose"),{data:a,isLoading:h,error:w}=k(t,{enabled:i}),p=o?.zendeskDrawer;if(!p)throw new Error("Zendesk drawer component not found");return R(p,{open:i,onClose:s,data:a,isLoading:h,error:w,zendeskURL:c,Trigger:r})},"ZendeskDrawer");import{useState as x}from"react";import{jsx as d}from"react/jsx-runtime";var Z="RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block text-xs bg-transparent border-none cursor-pointer p-0";function Q({zendeskId:r,className:t,onClick:i,children:n,external:o=!1}){let[c,s]=x(!1),a=e(()=>{o||s(!0),i?.(r)},"handleClick");return o?d("a",{href:l(r),target:"_blank",rel:"noopener noreferrer",onClick:a,className:m(Z,t),children:n}):d(C,{zendeskId:r,open:c,onClose:()=>s(!1),Trigger:d("button",{onClick:a,className:m(Z,t),children:n})})}e(Q,"ZendeskTriggerButton");export{P as a,Q as b};
2
- //# sourceMappingURL=chunk-A232PIG7.js.map
1
+ import{k as g}from"./chunk-2IA5ZHU4.js";import{a as m,f as u}from"./chunk-VIGKOVHP.js";import{b as f,d as b}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";var P={disclaimerCostCalculator:4668194326797,engagingContractors:43161434169613,employeeOnboardingTimeline:4411262104589,extraPayments:4466822781709,internationalPricing:4410698586893,pricingPlanOptions:43161720465421,ir35Status:42810224523917,remoteFxRate:33271144977421,terminationEmployeeCommunication:4411585179661,terminationNoticePeriods:5831900985613,involuntaryOffboardingServiceCharge:4406932229133,reconciliationInvoice:17604014808589},l=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL");import{useQuery as y}from"@tanstack/react-query";var k=e((r,t)=>{let{client:i}=b();return y({queryKey:["zendesk-article",r],queryFn:e(async()=>{let n=await g({client:i,path:{id:Number(r)}});if(n.error)throw new Error(n.error.message||"Failed to fetch article");return n},"queryFn"),select:e(n=>{let o=n.data?.data.help_center_article;return o&&{...o,body:u(o.body||"")}},"select"),retry:!1,...t})},"useZendeskArticle");import{jsx as R}from"react/jsx-runtime";var C=e(({Trigger:r,zendeskId:t,open:i,onClose:n})=>{let{components:o}=f(),c=l(t),s=e(()=>{n?.()},"handleClose"),{data:a,isLoading:h,error:w}=k(t,{enabled:i}),p=o?.zendeskDrawer;if(!p)throw new Error("Zendesk drawer component not found");return R(p,{open:i,onClose:s,data:a,isLoading:h,error:w,zendeskURL:c,Trigger:r})},"ZendeskDrawer");import{useState as x}from"react";import{jsx as d}from"react/jsx-runtime";var Z="RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block text-xs bg-transparent border-none cursor-pointer p-0";function Q({zendeskId:r,className:t,onClick:i,children:n,external:o=!1}){let[c,s]=x(!1),a=e(()=>{o||s(!0),i?.(r)},"handleClick");return o?d("a",{href:l(r),target:"_blank",rel:"noopener noreferrer",onClick:a,className:m(Z,t),children:n}):d(C,{zendeskId:r,open:c,onClose:()=>s(!1),Trigger:d("button",{onClick:a,className:m(Z,t),children:n})})}e(Q,"ZendeskTriggerButton");export{P as a,Q as b};
2
+ //# sourceMappingURL=chunk-AK4FXJFO.js.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-PHPCCABU.js";import{b as i}from"./chunk-76ZDXC2T.js";import{k as a}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function C({onSubmit:m,onSuccess:l,onError:t}){let{createCompanyBag:e}=i(),p=o(async d=>{try{await m?.(d);let r=await e.onSubmit(d);if(r?.data){await l?.(r?.data);return}if(r?.error){let s=a(r,e.meta?.fields?.address_details);t?.(s)}}catch(r){let s=a(r,e.meta?.fields?.address_details);t?.(s)}},"handleSubmit"),u=e.stepState.values?.address_details||e.initialValues.address_details;return c(n,{defaultValues:u,onSubmit:p})}o(C,"AddressDetailsStep");export{C as a};
2
- //# sourceMappingURL=chunk-NAH5PAUK.js.map
1
+ import{a as n}from"./chunk-EKJK34DS.js";import{b as i}from"./chunk-76ZDXC2T.js";import{k as a}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function C({onSubmit:m,onSuccess:l,onError:t}){let{createCompanyBag:e}=i(),p=o(async d=>{try{await m?.(d);let r=await e.onSubmit(d);if(r?.data){await l?.(r?.data);return}if(r?.error){let s=a(r,e.meta?.fields?.address_details);t?.(s)}}catch(r){let s=a(r,e.meta?.fields?.address_details);t?.(s)}},"handleSubmit"),u=e.stepState.values?.address_details||e.initialValues.address_details;return c(n,{defaultValues:u,onSubmit:p})}o(C,"AddressDetailsStep");export{C as a};
2
+ //# sourceMappingURL=chunk-BCO3C476.js.map
@@ -1,2 +1,2 @@
1
- import{a as n,b as i}from"./chunk-A232PIG7.js";import{a as e}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
2
- //# sourceMappingURL=chunk-VBQVXR4U.js.map
1
+ import{a as n,b as i}from"./chunk-AK4FXJFO.js";import{a as e}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
2
+ //# sourceMappingURL=chunk-C6ND527K.js.map
@@ -1,2 +1,2 @@
1
- import{a as y}from"./chunk-R7BHA5RA.js";import{a as l,b as m}from"./chunk-A232PIG7.js";import{c}from"./chunk-H2JFQGQJ.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as N}from"react";import{Fragment as b,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,...e})=>{let{setValue:n,getValues:i}=c(),f={label:a?.label||"Salary conversion",description:a?.description||C(b,{children:["The conversion is based on the Remote FX rate."," ",v(m,{className:"text-sm",zendeskId:l.remoteFxRate,children:"Learn more \u2197"})]})},g=s?"salary_conversion":e.name,u=s?e.name:"salary_conversion";return N(()=>{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:g,conversionFieldName:u,conversionProperties:f,classNamePrefix:"RemoteFlows-Salary",conversionType:_})},"SalaryField");export{R as a};
2
- //# sourceMappingURL=chunk-XHAJ544L.js.map
1
+ import{a as y}from"./chunk-6P53J6DA.js";import{a as l,b as m}from"./chunk-AK4FXJFO.js";import{c}from"./chunk-H2JFQGQJ.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as N}from"react";import{Fragment as b,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,...e})=>{let{setValue:n,getValues:i}=c(),f={label:a?.label||"Salary conversion",description:a?.description||C(b,{children:["The conversion is based on the Remote FX rate."," ",v(m,{className:"text-sm",zendeskId:l.remoteFxRate,children:"Learn more \u2197"})]})},g=s?"salary_conversion":e.name,u=s?e.name:"salary_conversion";return N(()=>{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:g,conversionFieldName:u,conversionProperties:f,classNamePrefix:"RemoteFlows-Salary",conversionType:_})},"SalaryField");export{R as a};
2
+ //# sourceMappingURL=chunk-CPXEQRNG.js.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-DFAY4TWC.js";import{a as C,b as w,c as F,d as P}from"./chunk-MSBCYMSH.js";import{i as _,j as v,k as x,l as h,m as b}from"./chunk-H2JFQGQJ.js";import{a as u,b as D}from"./chunk-RJY6AEJB.js";import{a as t}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{CalendarIcon as L}from"lucide-react";import{format as R}from"date-fns";import{ChevronLeft as I,ChevronRight as M}from"lucide-react";import{DayPicker as z}from"react-day-picker";import{jsx as p}from"react/jsx-runtime";function N({className:r,classNames:i,showOutsideDays:s=!0,...n}){return p(z,{showOutsideDays:s,className:t("p-3",r),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:t(u({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:t("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:t(u({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...i},components:{IconLeft:o(({className:d,...l})=>p(I,{className:t("size-4",d),...l}),"IconLeft"),IconRight:o(({className:d,...l})=>p(M,{className:t("size-4",d),...l}),"IconRight")},...n})}o(N,"Calendar");import{Fragment as V,jsx as e,jsxs as m}from"react/jsx-runtime";function X({field:r,fieldData:i,fieldState:s}){let{name:n,label:d,description:l,minDate:f,maxDate:g}=i,c=f?new Date(f):void 0,y=g?new Date(g):void 0;return m(_,{"data-field":n,className:`flex flex-col RemoteFlows__DatePickerField__Item__${n}`,children:[e(v,{className:"RemoteFlows__DatePickerField__Label",children:d}),m(w,{children:[e(F,{asChild:!0,children:e(x,{children:e("div",{children:m(D,{type:"button",variant:"outline",className:t("w-full pl-3 text-left font-normal",!r.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${n}`,children:[r.value&&e(V,{children:R(r.value,"yyyy-MM-dd")}),e(L,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),e(P,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:e(N,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:r.value?new Date(r.value):void 0,onSelect:a=>{r.onChange(a?R(a,"yyyy-MM-dd"):null)},defaultMonth:c,components:{DayContent:o(a=>e(C,{children:a.date.getDate()}),"DayContent")},disabled:a=>!!(c&&a<c||y&&a>y)})})]}),l?m(h,{children:[l," ",e(k,{helpCenter:i.meta?.helpCenter})]}):null,s.error&&e(b,{className:"RemoteFlows__DatePickerField__Error"})]})}o(X,"DatePickerFieldDefault");export{X as a};
2
- //# sourceMappingURL=chunk-B7EJ2OAA.js.map
1
+ import{a as k}from"./chunk-MCWXQT7A.js";import{a as C,b as w,c as F,d as P}from"./chunk-MSBCYMSH.js";import{i as _,j as v,k as x,l as h,m as b}from"./chunk-H2JFQGQJ.js";import{a as u,b as D}from"./chunk-RJY6AEJB.js";import{a as t}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{CalendarIcon as L}from"lucide-react";import{format as R}from"date-fns";import{ChevronLeft as I,ChevronRight as M}from"lucide-react";import{DayPicker as z}from"react-day-picker";import{jsx as p}from"react/jsx-runtime";function N({className:r,classNames:i,showOutsideDays:s=!0,...n}){return p(z,{showOutsideDays:s,className:t("p-3",r),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:t(u({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:t("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:t(u({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...i},components:{IconLeft:o(({className:d,...l})=>p(I,{className:t("size-4",d),...l}),"IconLeft"),IconRight:o(({className:d,...l})=>p(M,{className:t("size-4",d),...l}),"IconRight")},...n})}o(N,"Calendar");import{Fragment as V,jsx as e,jsxs as m}from"react/jsx-runtime";function X({field:r,fieldData:i,fieldState:s}){let{name:n,label:d,description:l,minDate:f,maxDate:g}=i,c=f?new Date(f):void 0,y=g?new Date(g):void 0;return m(_,{"data-field":n,className:`flex flex-col RemoteFlows__DatePickerField__Item__${n}`,children:[e(v,{className:"RemoteFlows__DatePickerField__Label",children:d}),m(w,{children:[e(F,{asChild:!0,children:e(x,{children:e("div",{children:m(D,{type:"button",variant:"outline",className:t("w-full pl-3 text-left font-normal",!r.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${n}`,children:[r.value&&e(V,{children:R(r.value,"yyyy-MM-dd")}),e(L,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),e(P,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:e(N,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:r.value?new Date(r.value):void 0,onSelect:a=>{r.onChange(a?R(a,"yyyy-MM-dd"):null)},defaultMonth:c,components:{DayContent:o(a=>e(C,{children:a.date.getDate()}),"DayContent")},disabled:a=>!!(c&&a<c||y&&a>y)})})]}),l?m(h,{children:[l," ",e(k,{helpCenter:i.meta?.helpCenter})]}):null,s.error&&e(b,{className:"RemoteFlows__DatePickerField__Error"})]})}o(X,"DatePickerFieldDefault");export{X as a};
2
+ //# sourceMappingURL=chunk-CUANSH3E.js.map
@@ -0,0 +1,2 @@
1
+ import{a as H}from"./chunk-AP56UUME.js";import{a as z}from"./chunk-IJCTN52C.js";import{a as N}from"./chunk-WVJDCDGZ.js";import{a as W}from"./chunk-FJ6WBG3H.js";import{e as E}from"./chunk-IZGJP7OI.js";import{a as P,b as Y,c as X,d as _,f as q}from"./chunk-LHEF2FN7.js";import{a as b}from"./chunk-EUSCQL4H.js";import{d as x}from"./chunk-T7O3YYOG.js";import{$ as B,B as v,F as U,N as J,Q as K,S as j,U as A,V as G,W as V,X as k,_ as $,f as I,h as M,p as D,r as T,s as L,t as Q}from"./chunk-2IA5ZHU4.js";import{g as w}from"./chunk-VIGKOVHP.js";import{a as O}from"./chunk-X6ZAR7ZL.js";import{d as a}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useMemo as be}from"react";import{useMutation as f,useQuery as p}from"@tanstack/react-query";import{useMutation as de,useQuery as Z}from"@tanstack/react-query";var Re=n(()=>{let{client:e}=a();return de({mutationFn:n(t=>j({client:e,body:t,headers:{Authorization:""}}),"mutationFn")})},"useUploadFile"),ee=n(e=>{let{client:t}=a();return Z({queryKey:["download-file",e],queryFn:n(async()=>{let o=await v({client:t,path:{id:e}});if(o.error)throw o.error;return o.data},"queryFn"),select:n(({data:o})=>o?.file,"select"),enabled:!!e})},"useDownloadFile"),te=n((e,t,o)=>{let{client:r}=a();return Z({queryKey:["employment-files",e],queryFn:n(async()=>{let i=await K({client:r,path:{employment_id:e},query:t});if(i.error)throw i.error;return i.data},"queryFn"),...o})},"useEmploymentFiles");import{useQuery as me}from"@tanstack/react-query";import{useQuery as pe}from"@tanstack/react-query";var ne=n(()=>{let{client:e}=a();return pe({queryKey:["identity"],queryFn:n(()=>G({client:e,headers:{Authorization:""}}),"queryFn"),select:n(t=>t.data?.data,"select")})},"useIdentity");function ye(e){return e!=null&&"company"in e}n(ye,"hasCompany");var oe=n((e={enabled:!0})=>{let{data:t}=ne(),o=ye(t)?t?.company?.id??"":"",{client:r}=a();return me({queryKey:["pricing-plans",o],queryFn:n(()=>I({client:r,path:{company_id:o}}),"queryFn"),select:n(i=>i.data?.data?.pricing_plans,"select"),enabled:!!e?.enabled&&!!o})},"useCompanyPricingPlans");var fe=n(({employmentId:e,options:t})=>{let{client:o}=a();return p({queryKey:["contractor-currencies",e],queryFn:n(async()=>Q({client:o,path:{employment_id:e},query:{restrict_to_guaranteed_pay_out_currencies:!1}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useContractorCurrencies"),yt=n(({fieldValues:e,options:t})=>p({queryKey:["contract-document-signature",e.review_completed,t?.jsfModify],queryFn:n(async()=>b(z,e,{jsfModify:t?.jsfModify}),"queryFn"),enabled:t?.queryOptions?.enabled}),"useGetContractDocumentSignatureSchema"),bt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,contractDocumentId:o,payload:r})=>A({client:e,body:r,path:{employment_id:t,contract_document_id:o}}),"mutationFn")})},"useSignContractDocument"),ft=n(({employmentId:e,contractDocumentId:t,options:o})=>{let{client:r}=a();return p({queryKey:["contract-document",e,t],queryFn:n(async()=>T({client:r,path:{employment_id:e,id:t}}),"queryFn"),enabled:o?.queryOptions?.enabled,select:n(({data:i})=>({...i?.data,contract_document:{...i?.data?.contract_document,content:w(i?.data?.contract_document?.content)}}),"select")})},"useGetShowContractDocument"),Ce=n(({employmentId:e,options:t})=>{let{client:o}=a();return p({queryKey:["contractor-subscriptions",e],queryFn:n(async()=>D({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useGetContractorSubscriptions"),Ct=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>k({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorSubscriptions"),gt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>J({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"useCreateContractorContractDocument"),ge=n(({countryCode:e,employmentId:t,fieldValues:o,options:r})=>{let{client:i}=a();return p({queryKey:["contractor-onboarding-details-schema",e,t],retry:!1,queryFn:n(async()=>M({client:i,path:{country_code:e},query:{json_schema_version:1,employment_id:t}}),"queryFn"),enabled:r?.queryOptions?.enabled,select:n(({data:s})=>{let c=s?.data?.schema||{};return b(c,o,r)},"select")})},"useContractorOnboardingDetailsSchema"),Fe={[P]:"Contractor Management",[Y]:"Contractor Management Plus",[X]:"Contractor of Record"},Se=n(e=>{let{data:t,isLoading:o}=oe({enabled:e?.enabled}),r=t?.find(s=>s.product.name==="EOR Monthly");return{eorSubscription:{product:{identifier:_,short_name:"EOR"},currency:r?.price.currency,price:{amount:x(r?.price.amount??0)},features:["Contract between Remote and employee","Remote manages onboarding, payroll, and compliance","Manages taxes, benefits, and time-off tracking","Handles contracts, transfers, and terminations"],description:"Enables hiring in countries without a local entity",label:"Employer of Record",value:_},isLoading:o}},"useEorSubscription"),he=n((e,t,o)=>(E(_,o)&&e.push({label:t.label,value:t.value,description:t.description,meta:{features:t.features,price:{amount:t.price.amount,currencyCode:t.currency?.code??""}},disabled:!1}),e),"addEorToFieldOptions"),Ft=n((e,t,o)=>{let{data:r,isLoading:i,refetch:s}=Ce({employmentId:e,options:{queryOptions:o?.queryOptions}}),c=r?.length===0,u=r?.length===1,l=r?.find(S=>S.product.short_name==="COR")?.eligibility_questionnaire?.is_blocking,d=(u||l===!0||c)&&t?.eor_onboarding,{eorSubscription:C,isLoading:re}=Se({enabled:d}),R=b(H.data.schema,{},o);if(r){let S=R.fields.find(h=>h.name==="subscription");if(S){let h=r.filter(m=>E(m.product.identifier??"",o?.excludeProducts)).map(m=>{let y=m.product,ie=m.price.amount,ae=m.currency.code,se=Fe[y.identifier]??"",ce=y.identifier??"",le=y.description??"",ue={features:y.features??[],price:{amount:x(ie),currencyCode:ae}};return{label:se,value:ce,description:le,meta:ue,disabled:l&&y.identifier!==P}});h.sort((m,y)=>m.label.localeCompare(y.label));let g=[];d&&(he(g,C,o?.excludeProducts),g.length>0&&(g[0].meta={...g[0].meta,groupSeparator:{show:!0}})),S.options=[...h,...g]}}return{isLoading:i||re,form:R,contractorSubscriptions:r,refetch:s,isEligibilityQuestionnaireBlocked:l}},"useContractorSubscriptionSchemaField"),St=n((e,t,o)=>{let{mutateAsyncOrThrow:r}=O(t),{mutateAsyncOrThrow:i}=O(e);return{mutateAsync:n(async({employmentId:s})=>{let{nationality_status:c,ir35:u,ir35_sds_file:F}=o,l={contract_document:{ir_35:u}},d={contract_document:{nationality:c}};return u?(await i({employmentId:s,payload:l}),F?r({employment_id:s,file:F,sub_type:q}):Promise.resolve()):c?i({employmentId:s,payload:d}):Promise.resolve()},"mutateAsync")}},"useUpdateUKandSaudiFields"),ht=n((e,t)=>{let{data:o,isLoading:r}=te(e,{sub_type:q},{...t,select:n(({data:c})=>c?.files?.filter(u=>u.sub_type===q),"select")}),i=o?.[0]?.id,s=ee(i);return{...s,isLoading:r||s.isLoading}},"useGetIR35File"),_t=n((e,t)=>{let{client:o}=a();return p({queryKey:["contract-documents",e],queryFn:n(async()=>L({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.enabled,select:n(({data:r})=>r?.data?.contract_documents,"select")})},"useGetContractDocuments"),qt=n(({options:e,fieldValues:t})=>{let{client:o}=a();return p({queryKey:["eligibility-questionnaire"],queryFn:n(async()=>{let r=await V({client:o,query:{type:"contractor_of_record",json_schema_version:1}});if(r.error)throw new Error("Failed to fetch eligibility questionnaire");return r.data.data},"queryFn"),select:n(r=>{let i=r?.schema||{};return b(i,t,{jsfModify:e?.jsfModify})},"select"),enabled:e?.queryOptions?.enabled})},"useGetEligibilityQuestionnaire"),Ot=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>U({client:e,body:{employment_slug:t,responses:o,type:"contractor_of_record"},query:{json_schema_version:1}}),"mutationFn")})},"usePostCreateEligibilityQuestionnaire"),xt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t})=>B({client:e,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorCorSubscription"),Pt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t})=>$({client:e,path:{employment_id:t}}),"mutationFn")})},"useDeleteContractorCorSubscription"),Et=n(e=>{let{client:t}=a(),{data:o,isLoading:r}=p({...W(t,"contractor-onboarding-countries"),select:n(s=>s.data?.data?.map(c=>({label:c.name,value:c.code,eor_onboarding:c.eor_onboarding,contractor_products_available:c.contractor_products_available}))||[],"select"),enabled:e?.queryOptions?.enabled}),i=b(N.data.schema,{},e);if(o){let s=i.fields.find(c=>c.name==="country");s&&(s.options=o)}return{isLoading:r,selectCountryForm:i,countries:o}},"useCountriesSchemaField"),Rt=n(({countryCode:e,employmentId:t,fieldValues:o,options:r})=>{let i=ge({countryCode:e,employmentId:t,fieldValues:o,options:r}),{data:s,isLoading:c}=fe({employmentId:t,options:{queryOptions:{enabled:r?.queryOptions?.enabled}}}),u=be(()=>!i.data||!s?i.data:{...i.data,fields:i.data.fields.map(l=>l.name!=="payment_terms"?l:{...l,fields:l.fields?.map(d=>d.name!=="compensation_currency_code"?d:{...d,options:s.map(C=>({label:C.code,value:C.code,meta:{source:C.source}}))})})},[i.data,s]);return{...i,data:u,isLoading:i.isLoading||c}},"useContractorOnboardingDetailsSchemaWithCurrencies");export{Re as a,ne as b,ye as c,yt as d,bt as e,ft as f,Ce as g,Ct as h,gt as i,Fe as j,Ft as k,St as l,ht as m,_t as n,qt as o,Ot as p,xt as q,Pt as r,Et as s,Rt as t};
2
+ //# sourceMappingURL=chunk-DAXHNASW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/api.ts","../src/common/api/files.ts","../src/common/api/companies.ts","../src/common/api/identity.ts"],"sourcesContent":["import { FormResult } from '@remoteoss/remote-json-schema-form-kit';\nimport { useMemo } from 'react';\nimport {\n CreateContractDocument,\n getShowContractDocument,\n getShowContractorContractDetailsCountry,\n getIndexSubscription,\n ManageContractorPlusSubscriptionOperationsParams,\n postCreateContractDocument,\n postManageContractorPlusSubscriptionSubscription,\n postSignContractDocument,\n SignContractDocument,\n getIndexEmploymentContractDocument,\n EligibilityQuestionnaireJsonSchemaResponse,\n getShowEligibilityQuestionnaire,\n SubmitEligibilityQuestionnaireRequest,\n postCreateEligibilityQuestionnaire,\n postManageContractorCorSubscriptionSubscription,\n deleteDeleteContractorCorSubscriptionSubscription,\n getIndexContractorCurrency,\n Country,\n} from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { signatureSchema } from '@/src/flows/ContractorOnboarding/json-schemas/signature';\nimport { selectContractorSubscriptionStepSchema } from '@/src/flows/ContractorOnboarding/json-schemas/selectContractorSubscriptionStep';\nimport {\n JSONSchemaFormResultWithFieldsets,\n FlowOptions,\n JSFModify,\n} from '@/src/flows/types';\nimport { clearBase64Data } from '@/src/lib/utils';\nimport { Client } from '@/src/client/client';\nimport { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport { useMutation, useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { FieldValues } from 'react-hook-form';\nimport {\n contractorPlusProductIdentifier,\n contractorStandardProductIdentifier,\n corProductIdentifier,\n eorProductIdentifier,\n IR35_FILE_SUBTYPE,\n ProductType,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { $TSFixMe, JSFField } from '@/src/types/remoteFlows';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport {\n useDownloadFile,\n useEmploymentFiles,\n useUploadFile,\n} from '@/src/common/api/files';\nimport { convertFromCents } from '@/src/components/form/utils';\nimport { countriesOptions } from '@/src/common/api/countries';\nimport { selectCountryStepSchema } from '@/src/flows/Onboarding/json-schemas/selectCountryStep';\nimport { shouldIncludeProduct } from '@/src/flows/ContractorOnboarding/utils';\nimport { useCompanyPricingPlans } from '@/src/common/api/companies';\n\nconst useContractorCurrencies = ({\n employmentId,\n options,\n}: {\n employmentId: string;\n options?: { queryOptions?: { enabled?: boolean } };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contractor-currencies', employmentId],\n queryFn: async () => {\n return getIndexContractorCurrency({\n client: client as Client,\n path: { employment_id: employmentId },\n query: {\n restrict_to_guaranteed_pay_out_currencies: false,\n },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return data?.data;\n },\n });\n};\n\n/**\n * Get the contract document signature schema\n * @param fieldValues - The field values\n * @param options - The options\n * @returns The contract document signature schema\n */\nexport const useGetContractDocumentSignatureSchema = ({\n fieldValues,\n options,\n}: {\n fieldValues: FieldValues;\n options?: { queryOptions?: { enabled?: boolean }; jsfModify?: JSFModify };\n}) => {\n return useQuery({\n queryKey: [\n 'contract-document-signature',\n fieldValues.review_completed,\n options?.jsfModify,\n ],\n queryFn: async () => {\n return createHeadlessForm(signatureSchema, fieldValues, {\n jsfModify: options?.jsfModify,\n });\n },\n enabled: options?.queryOptions?.enabled,\n });\n};\n\n/**\n * Signs the contract document\n * @param employmentId - The employment ID\n * @param contractDocumentId - The contract document ID\n * @param payload - The payload\n * @returns The signed contract document\n */\nexport const useSignContractDocument = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n contractDocumentId,\n payload,\n }: {\n employmentId: string;\n contractDocumentId: string;\n payload: SignContractDocument;\n }) => {\n return postSignContractDocument({\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n contract_document_id: contractDocumentId,\n },\n });\n },\n });\n};\n\n/**\n * Get the contract document for a given employment and contract document ID\n * @param employmentId - The employment ID\n * @param contractDocumentId - The contract document ID\n * @returns The contract document\n */\nexport const useGetShowContractDocument = ({\n employmentId,\n contractDocumentId,\n options,\n}: {\n employmentId: string;\n contractDocumentId: string;\n options?: { queryOptions?: { enabled?: boolean }; jsfModify?: JSFModify };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contract-document', employmentId, contractDocumentId],\n queryFn: async () => {\n return getShowContractDocument({\n client: client as Client,\n path: { employment_id: employmentId, id: contractDocumentId },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return {\n ...data?.data,\n contract_document: {\n ...data?.data?.contract_document,\n content: clearBase64Data(\n data?.data?.contract_document?.content as $TSFixMe,\n ),\n },\n };\n },\n });\n};\n\n/**\n * Get the contractor subscriptions for the given employment id\n * @param employmentId - The employment ID\n * @returns The contractor subscriptions available\n */\nexport const useGetContractorSubscriptions = ({\n employmentId,\n options,\n}: {\n employmentId: string;\n options?: { queryOptions?: { enabled?: boolean } };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contractor-subscriptions', employmentId],\n queryFn: async () => {\n return getIndexSubscription({\n client: client as Client,\n path: { employment_id: employmentId },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return data?.data;\n },\n });\n};\n\n/**\n * Upgrade or downgrade contractor subscription\n */\nexport const usePostManageContractorSubscriptions = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: ManageContractorPlusSubscriptionOperationsParams;\n }) => {\n return postManageContractorPlusSubscriptionSubscription({\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n },\n });\n },\n });\n};\n\n/**\n * Saves the contractor details data\n * @param employmentId - The employment ID\n * @param payload - The payload\n * @returns The contractor contract document\n */\nexport const useCreateContractorContractDocument = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: CreateContractDocument;\n }) => {\n return postCreateContractDocument({\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n },\n });\n },\n });\n};\n\n/**\n * Get the contractor onboarding details schema for a given country\n * @param countryCode - The country code\n * @param fieldValues - The field values\n * @param options - The options\n * @returns The contractor onboarding details schema\n */\nconst useContractorOnboardingDetailsSchema = ({\n countryCode,\n employmentId,\n fieldValues,\n options,\n}: {\n countryCode: string;\n fieldValues: FieldValues;\n employmentId: string;\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n query?: Record<string, unknown>;\n}): UseQueryResult<JSONSchemaFormResultWithFieldsets> => {\n const { client } = useClient();\n return useQuery({\n queryKey: [\n 'contractor-onboarding-details-schema',\n countryCode,\n employmentId,\n ],\n retry: false,\n queryFn: async () => {\n return getShowContractorContractDetailsCountry({\n client: client as Client,\n path: { country_code: countryCode },\n query: {\n json_schema_version: 1,\n employment_id: employmentId,\n },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n const jsfSchema = data?.data?.schema || {};\n return createHeadlessForm(jsfSchema, fieldValues, options);\n },\n });\n};\n\nexport const CONTRACT_PRODUCT_TITLES = {\n [contractorStandardProductIdentifier]: 'Contractor Management',\n [contractorPlusProductIdentifier]: 'Contractor Management Plus',\n [corProductIdentifier]: 'Contractor of Record',\n};\n\nconst useEorSubscription = (options?: { enabled?: boolean }) => {\n const { data: pricingPlans, isLoading: isLoadingPricingPlans } =\n useCompanyPricingPlans({\n enabled: options?.enabled,\n });\n\n const eorPricingPlan = pricingPlans?.find(\n (plan) => plan.product.name === 'EOR Monthly',\n );\n\n const eorSubscription = {\n product: {\n identifier: eorProductIdentifier,\n short_name: 'EOR',\n },\n currency: eorPricingPlan?.price.currency,\n price: {\n amount: convertFromCents(eorPricingPlan?.price.amount ?? 0),\n },\n features: [\n 'Contract between Remote and employee',\n 'Remote manages onboarding, payroll, and compliance',\n 'Manages taxes, benefits, and time-off tracking',\n 'Handles contracts, transfers, and terminations',\n ],\n description: 'Enables hiring in countries without a local entity',\n label: 'Employer of Record',\n value: eorProductIdentifier,\n };\n\n return { eorSubscription, isLoading: isLoadingPricingPlans };\n};\n\ntype SelectedCountry =\n | (Pick<Country, 'eor_onboarding' | 'contractor_products_available'> & {\n label: string;\n })\n | undefined;\n\nconst addEorToFieldOptions = (\n fieldOptions: $TSFixMe[],\n eorSubscription: ReturnType<typeof useEorSubscription>['eorSubscription'],\n excludeProducts?: ProductType[],\n) => {\n if (shouldIncludeProduct(eorProductIdentifier, excludeProducts)) {\n fieldOptions.push({\n label: eorSubscription.label,\n value: eorSubscription.value,\n description: eorSubscription.description,\n meta: {\n features: eorSubscription.features,\n price: {\n amount: eorSubscription.price.amount,\n currencyCode: eorSubscription.currency?.code ?? '',\n },\n },\n disabled: false,\n });\n }\n return fieldOptions;\n};\n\nexport const useContractorSubscriptionSchemaField = (\n employmentId: string,\n selectedCountry: SelectedCountry,\n options?: FlowOptions & {\n queryOptions?: { enabled?: boolean };\n excludeProducts?: ProductType[];\n },\n) => {\n const {\n data: contractorSubscriptions,\n isLoading: isLoading,\n refetch,\n } = useGetContractorSubscriptions({\n employmentId: employmentId,\n options: {\n queryOptions: options?.queryOptions,\n },\n });\n\n const isEmptyContractorSubscriptions = contractorSubscriptions?.length === 0;\n\n const isSingleSubscription = contractorSubscriptions?.length === 1;\n\n const corSubscription = contractorSubscriptions?.find(\n (subscription) => subscription.product.short_name === 'COR',\n );\n\n const isEligibilityQuestionnaireBlocked =\n corSubscription?.eligibility_questionnaire?.is_blocking;\n\n const showEorSubscription =\n (isSingleSubscription ||\n isEligibilityQuestionnaireBlocked === true ||\n isEmptyContractorSubscriptions) &&\n selectedCountry?.eor_onboarding;\n\n const { eorSubscription, isLoading: isLoadingEorSubscription } =\n useEorSubscription({\n enabled: showEorSubscription,\n });\n\n const form = createHeadlessForm(\n selectContractorSubscriptionStepSchema.data.schema,\n {},\n options,\n );\n\n if (contractorSubscriptions) {\n const field: JSFField | undefined = form.fields.find(\n (field) => field.name === 'subscription',\n ) as JSFField | undefined;\n\n if (field) {\n // Start with contractor management options\n const contractorOptions = contractorSubscriptions\n .filter((opts) =>\n shouldIncludeProduct(\n opts.product.identifier ?? '',\n options?.excludeProducts,\n ),\n )\n .map((opts) => {\n const product = opts.product;\n const price = opts.price.amount;\n const currencyCode = opts.currency.code;\n const title =\n CONTRACT_PRODUCT_TITLES[\n product.identifier as keyof typeof CONTRACT_PRODUCT_TITLES\n ] ?? '';\n const label = title;\n const value = product.identifier ?? '';\n const description = product.description ?? '';\n const features = product.features ?? [];\n const meta = {\n features,\n price: {\n amount: convertFromCents(price),\n currencyCode: currencyCode,\n },\n };\n return {\n label,\n value,\n description,\n meta,\n disabled:\n isEligibilityQuestionnaireBlocked &&\n product.identifier !== contractorStandardProductIdentifier,\n };\n });\n\n // Sort contractor options\n contractorOptions.sort((a, b) => a.label.localeCompare(b.label));\n\n // Build otherSubscriptions (EOR) with separator metadata\n const otherOptions: $TSFixMe[] = [];\n if (showEorSubscription) {\n addEorToFieldOptions(\n otherOptions as unknown as $TSFixMe[],\n eorSubscription,\n options?.excludeProducts,\n );\n\n // Add separator metadata to first \"other\" option\n // only the first option to avoid problems when iterating over the options\n if (otherOptions.length > 0) {\n otherOptions[0].meta = {\n ...otherOptions[0].meta,\n groupSeparator: {\n show: true,\n },\n };\n }\n }\n\n // Combine all options into the single field\n field.options = [...contractorOptions, ...otherOptions];\n }\n }\n\n return {\n isLoading: isLoading || isLoadingEorSubscription,\n form,\n contractorSubscriptions,\n refetch,\n isEligibilityQuestionnaireBlocked,\n };\n};\n\nexport const useUpdateUKandSaudiFields = (\n createContractorContractDocumentMutation: ReturnType<\n typeof useCreateContractorContractDocument\n >,\n uploadFileMutation: ReturnType<typeof useUploadFile>,\n parsedValues: FieldValues,\n) => {\n const { mutateAsyncOrThrow: uploadFileMutationAsync } =\n mutationToPromise(uploadFileMutation);\n const { mutateAsyncOrThrow: createContractorContractDocumentMutationAsync } =\n mutationToPromise(createContractorContractDocumentMutation);\n\n return {\n mutateAsync: async ({ employmentId }: { employmentId: string }) => {\n const {\n nationality_status: nationalityStatus,\n ir35: ir35Status,\n ir35_sds_file: ir35SdsFile,\n } = parsedValues;\n const ir35ContractDetailsPayload = {\n contract_document: {\n ir_35: ir35Status,\n },\n };\n const nationalityContractDetailsPayload = {\n contract_document: {\n nationality: nationalityStatus,\n },\n };\n if (ir35Status) {\n await createContractorContractDocumentMutationAsync({\n employmentId: employmentId,\n payload: ir35ContractDetailsPayload,\n });\n\n if (ir35SdsFile) {\n return uploadFileMutationAsync({\n employment_id: employmentId,\n file: ir35SdsFile,\n sub_type: IR35_FILE_SUBTYPE,\n });\n }\n return Promise.resolve();\n }\n // nationality status is sent for the countries SAU, KWT, OMN, QAT, BHR\n if (nationalityStatus) {\n return createContractorContractDocumentMutationAsync({\n employmentId: employmentId,\n payload: nationalityContractDetailsPayload,\n });\n }\n\n return Promise.resolve();\n },\n };\n};\n\nexport const useGetIR35File = (\n employmentId: string,\n options?: { enabled?: boolean },\n) => {\n const { data: ir35Files, isLoading: isLoadingFiles } = useEmploymentFiles(\n employmentId,\n {\n sub_type: IR35_FILE_SUBTYPE,\n },\n {\n ...options,\n select: ({ data }) =>\n data?.files?.filter((file) => file.sub_type === IR35_FILE_SUBTYPE),\n },\n );\n const id = ir35Files?.[0]?.id;\n\n const downloadQuery = useDownloadFile(id as string);\n\n return {\n ...downloadQuery,\n isLoading: isLoadingFiles || downloadQuery.isLoading,\n };\n};\n\n/**\n * Get the contract documents for a given employment\n * @param employmentId - The employment ID\n * @param options - The options\n * @returns The contract documents\n */\nexport const useGetContractDocuments = (\n employmentId: string,\n options?: { enabled?: boolean },\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contract-documents', employmentId],\n queryFn: async () => {\n return getIndexEmploymentContractDocument({\n client: client as Client,\n path: { employment_id: employmentId },\n });\n },\n enabled: options?.enabled,\n select: ({ data }) => {\n return data?.data?.contract_documents;\n },\n });\n};\n\nexport const useGetEligibilityQuestionnaire = ({\n options,\n fieldValues,\n}: {\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n fieldValues: FieldValues;\n}) => {\n const { client } = useClient();\n return useQuery<\n EligibilityQuestionnaireJsonSchemaResponse['data'],\n Error,\n FormResult\n >({\n queryKey: ['eligibility-questionnaire'],\n queryFn: async (): Promise<\n EligibilityQuestionnaireJsonSchemaResponse['data']\n > => {\n const response = await getShowEligibilityQuestionnaire({\n client: client as Client,\n query: {\n type: 'contractor_of_record',\n json_schema_version: 1,\n },\n });\n\n // Extract the data from the response wrapper\n if (response.error) {\n throw new Error('Failed to fetch eligibility questionnaire');\n }\n\n return response.data\n .data as EligibilityQuestionnaireJsonSchemaResponse['data'];\n },\n select: (data: EligibilityQuestionnaireJsonSchemaResponse['data']) => {\n const schema = data?.schema || {};\n return createHeadlessForm(schema, fieldValues, {\n jsfModify: options?.jsfModify,\n });\n },\n enabled: options?.queryOptions?.enabled,\n });\n};\n\nexport const usePostCreateEligibilityQuestionnaire = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: SubmitEligibilityQuestionnaireRequest['responses'];\n }) => {\n return postCreateEligibilityQuestionnaire({\n client: client as Client,\n body: {\n employment_slug: employmentId,\n responses: payload,\n type: 'contractor_of_record',\n },\n query: {\n json_schema_version: 1, // TODO: json_schema_version should be dynamic but fixed for now\n },\n });\n },\n });\n};\n\nexport const usePostManageContractorCorSubscription = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({ employmentId }: { employmentId: string }) => {\n return postManageContractorCorSubscriptionSubscription({\n client: client as Client,\n path: {\n employment_id: employmentId,\n },\n });\n },\n });\n};\n\nexport const useDeleteContractorCorSubscription = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({ employmentId }: { employmentId: string }) => {\n return deleteDeleteContractorCorSubscriptionSubscription({\n client: client as Client,\n path: { employment_id: employmentId },\n });\n },\n });\n};\n\nexport const useCountriesSchemaField = (\n options?: Omit<FlowOptions, 'jsonSchemaVersion'> & {\n queryOptions?: { enabled?: boolean };\n },\n) => {\n const { client } = useClient();\n const { data: countries, isLoading } = useQuery({\n ...countriesOptions(client as Client, 'contractor-onboarding-countries'),\n select: (response) => {\n return (\n response.data?.data?.map((country) => {\n return {\n label: country.name,\n value: country.code,\n eor_onboarding: country.eor_onboarding,\n contractor_products_available:\n country.contractor_products_available,\n };\n }) || []\n );\n },\n enabled: options?.queryOptions?.enabled,\n });\n\n const selectCountryForm = createHeadlessForm(\n selectCountryStepSchema.data.schema,\n {},\n options,\n );\n\n if (countries) {\n const countryField = selectCountryForm.fields.find(\n (field) => field.name === 'country',\n );\n if (countryField) {\n countryField.options = countries;\n }\n }\n\n return {\n isLoading,\n selectCountryForm,\n countries,\n };\n};\n\n/**\n * Get contractor onboarding details schema with currency options overridden\n * from the getIndexContractorCurrency endpoint\n */\nexport const useContractorOnboardingDetailsSchemaWithCurrencies = ({\n countryCode,\n employmentId,\n fieldValues,\n options,\n}: {\n countryCode: string;\n fieldValues: FieldValues;\n employmentId: string;\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n}) => {\n const schemaQuery = useContractorOnboardingDetailsSchema({\n countryCode,\n employmentId,\n fieldValues,\n options,\n });\n\n const { data: currencies, isLoading: isLoadingCurrencies } =\n useContractorCurrencies({\n employmentId,\n options: {\n queryOptions: { enabled: options?.queryOptions?.enabled },\n },\n });\n\n const dataWithCurrencies = useMemo(() => {\n if (!schemaQuery.data || !currencies) {\n return schemaQuery.data;\n }\n\n const form = {\n ...schemaQuery.data,\n fields: schemaQuery.data.fields.map((field) => {\n if (field.name !== 'payment_terms') {\n return field;\n }\n\n return {\n ...field,\n fields: (field.fields as $TSFixMe[])?.map((nestedField: $TSFixMe) => {\n if (nestedField.name !== 'compensation_currency_code') {\n return nestedField;\n }\n\n // Return a new object with overridden options\n return {\n ...nestedField,\n options: currencies.map((currency) => ({\n label: currency.code,\n value: currency.code,\n meta: { source: currency.source },\n })),\n };\n }),\n };\n }),\n };\n\n return form;\n }, [schemaQuery.data, currencies]);\n\n return {\n ...schemaQuery,\n data: dataWithCurrencies as $TSFixMe,\n isLoading: schemaQuery.isLoading || isLoadingCurrencies,\n };\n};\n","import { useMutation, useQuery, UseQueryOptions } from '@tanstack/react-query';\nimport { Client } from '@/src/client/client';\nimport {\n getIndexEmploymentFile,\n getShowFile,\n postUploadEmployeeFileFile,\n} from '@/src/client/sdk.gen';\nimport {\n GetIndexEmploymentFileData,\n GetIndexEmploymentFileErrors,\n File as ApiFile,\n ListFilesResponse,\n PostUploadEmployeeFileFileData,\n} from '@/src/client/types.gen';\nimport { useClient } from '@/src/context';\n\n/**\n * Hook to upload a file associated with a specified employment.\n * @returns A mutation result for uploading employee files.\n */\nexport const useUploadFile = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (params: PostUploadEmployeeFileFileData['body']) => {\n return postUploadEmployeeFileFile({\n client: client as Client,\n body: params,\n headers: {\n Authorization: ``,\n },\n });\n },\n });\n};\n\n/**\n * Hook to download a file by its ID.\n * @param id - The ID of the file to download.\n * @returns A query result containing the file data.\n */\nexport const useDownloadFile = (id: string) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['download-file', id],\n queryFn: async () => {\n const result = await getShowFile({\n client: client as Client,\n path: { id: id },\n });\n\n if (result.error) {\n throw result.error;\n }\n\n return result.data;\n },\n select: ({ data }) => data?.file,\n enabled: !!id,\n });\n};\n\n/**\n * Hook to retrieve files associated with a specific employment.\n * @param employmentId - The ID of the employment to retrieve files for.\n * @param queryParams - The query parameters to filter the files.\n * @param queryOptions - Optional TanStack Query options to customize the query behavior.\n * @returns A query result containing the employment files.\n */\nexport const useEmploymentFiles = (\n employmentId: string,\n queryParams: GetIndexEmploymentFileData['query'],\n queryOptions?: Omit<\n UseQueryOptions<\n ListFilesResponse,\n GetIndexEmploymentFileErrors,\n ApiFile[] | undefined,\n unknown[]\n >,\n 'queryKey' | 'queryFn'\n >,\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['employment-files', employmentId],\n queryFn: async () => {\n const result = await getIndexEmploymentFile({\n client: client as Client,\n path: { employment_id: employmentId },\n query: queryParams,\n });\n\n if (result.error) {\n throw result.error;\n }\n\n return result.data;\n },\n ...queryOptions,\n });\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useClient } from '@/src/context';\nimport {\n getIndexCompanyPricingPlan,\n IdentityCurrentResponse,\n} from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useIdentity } from '@/src/common/api/identity';\n\nexport function hasCompany(\n identity: IdentityCurrentResponse['data'] | undefined,\n): identity is Extract<\n IdentityCurrentResponse['data'],\n { company: { id: string } }\n> {\n return identity != null && 'company' in identity;\n}\n\nexport const useCompanyPricingPlans = (\n queryOptions: { enabled?: boolean } = { enabled: true },\n) => {\n const { data: identity } = useIdentity();\n const companyId = hasCompany(identity) ? (identity?.company?.id ?? '') : '';\n const { client } = useClient();\n return useQuery({\n queryKey: ['pricing-plans', companyId],\n queryFn: () =>\n getIndexCompanyPricingPlan({\n client: client as Client,\n path: { company_id: companyId },\n }),\n select: (data) => data.data?.data?.pricing_plans,\n enabled: Boolean(queryOptions?.enabled) && !!companyId,\n });\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { getCurrentIdentity } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { Client } from '@/src/client/client';\n\nexport const useIdentity = () => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['identity'],\n queryFn: () =>\n getCurrentIdentity({\n client: client as Client,\n headers: { Authorization: `` },\n }),\n select: (data) => data.data?.data,\n });\n};\n"],"mappings":"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","names":["useMemo","useMutation","useQuery","useMutation","useQuery","useUploadFile","__name","client","useClient","useMutation","params","postUploadEmployeeFileFile","useDownloadFile","id","useQuery","result","getShowFile","data","useEmploymentFiles","employmentId","queryParams","queryOptions","getIndexEmploymentFile","useQuery","useQuery","useIdentity","__name","client","useClient","useQuery","getCurrentIdentity","data","hasCompany","identity","__name","useCompanyPricingPlans","queryOptions","useIdentity","companyId","client","useClient","useQuery","getIndexCompanyPricingPlan","data","useContractorCurrencies","__name","employmentId","options","client","useClient","useQuery","getIndexContractorCurrency","data","useGetContractDocumentSignatureSchema","fieldValues","createHeadlessForm","signatureSchema","useSignContractDocument","useMutation","contractDocumentId","payload","postSignContractDocument","useGetShowContractDocument","getShowContractDocument","clearBase64Data","useGetContractorSubscriptions","getIndexSubscription","usePostManageContractorSubscriptions","postManageContractorPlusSubscriptionSubscription","useCreateContractorContractDocument","postCreateContractDocument","useContractorOnboardingDetailsSchema","countryCode","getShowContractorContractDetailsCountry","jsfSchema","CONTRACT_PRODUCT_TITLES","contractorStandardProductIdentifier","contractorPlusProductIdentifier","corProductIdentifier","useEorSubscription","pricingPlans","isLoadingPricingPlans","useCompanyPricingPlans","eorPricingPlan","plan","eorProductIdentifier","convertFromCents","addEorToFieldOptions","fieldOptions","eorSubscription","excludeProducts","shouldIncludeProduct","useContractorSubscriptionSchemaField","selectedCountry","contractorSubscriptions","isLoading","refetch","isEmptyContractorSubscriptions","isSingleSubscription","isEligibilityQuestionnaireBlocked","subscription","showEorSubscription","isLoadingEorSubscription","form","selectContractorSubscriptionStepSchema","field","contractorOptions","opts","product","price","currencyCode","label","value","description","meta","a","b","otherOptions","useUpdateUKandSaudiFields","createContractorContractDocumentMutation","uploadFileMutation","parsedValues","uploadFileMutationAsync","mutationToPromise","createContractorContractDocumentMutationAsync","nationalityStatus","ir35Status","ir35SdsFile","ir35ContractDetailsPayload","nationalityContractDetailsPayload","IR35_FILE_SUBTYPE","useGetIR35File","ir35Files","isLoadingFiles","useEmploymentFiles","file","id","downloadQuery","useDownloadFile","useGetContractDocuments","getIndexEmploymentContractDocument","useGetEligibilityQuestionnaire","response","getShowEligibilityQuestionnaire","schema","usePostCreateEligibilityQuestionnaire","postCreateEligibilityQuestionnaire","usePostManageContractorCorSubscription","postManageContractorCorSubscriptionSubscription","useDeleteContractorCorSubscription","deleteDeleteContractorCorSubscriptionSubscription","useCountriesSchemaField","countries","countriesOptions","country","selectCountryForm","selectCountryStepSchema","countryField","useContractorOnboardingDetailsSchemaWithCurrencies","schemaQuery","currencies","isLoadingCurrencies","dataWithCurrencies","useMemo","nestedField","currency"]}
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-BVFQ6LFD.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-AJIDQALB.js.map
1
+ import{a as e}from"./chunk-V6LOIP27.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-DM5RRWPM.js.map
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-LNV36S6D.js";import{a as c}from"./chunk-SLLDKJ7K.js";import{f as a,g as d}from"./chunk-H2JFQGQJ.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
2
- //# sourceMappingURL=chunk-PHPCCABU.js.map
1
+ import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-LNV36S6D.js";import{a as c}from"./chunk-SNRZPCZ7.js";import{f as a,g as d}from"./chunk-H2JFQGQJ.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
2
+ //# sourceMappingURL=chunk-EKJK34DS.js.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-XFD3ULUF.js";import{a as S}from"./chunk-42R2H2DW.js";import{a as m,b as d,c as h,d as _}from"./chunk-DFJNVGK4.js";import{a as y}from"./chunk-TXSUZLOI.js";import{a as g}from"./chunk-EUSCQL4H.js";import{C as T,X as b,c as D}from"./chunk-7ENB7H4E.js";import{d as i}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useQuery as v}from"@tanstack/react-query";var c=n(({employmentId:e,status:t,timeoffType:a,options:o})=>{let{client:r}=i();return v({queryKey:["timeoff",e,t],retry:!1,queryFn:n(()=>b({client:r,headers:{Authorization:""},query:{employment_id:e,status:t,timeoff_type:a}}),"queryFn"),select:n(({data:s})=>o?.select?.(s)??s,"select"),enabled:o?.enabled})},"useTimeOffQuery"),R=n((e,t)=>{let a=y(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),o=y(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return`${a} \u2192 ${o}`},"formatDateRange"),N=n(({employmentId:e,options:t})=>c({employmentId:e,timeoffType:"paid_time_off",options:{enabled:t?.enabled,select:n(a=>({bookedDays:a?.data?.timeoffs?.reduce((o,r)=>o+(r?.timeoff_days?.filter(s=>s.hours!=null&&s.hours>0).length||0),0)||0,timeoffs:a?.data?.timeoffs?.map(o=>{let r=o?.timeoff_days?.filter(s=>s.hours>0).length||0;return{status:o?.status,duration:r,startDate:o?.start_date,endDate:o?.end_date,formattedDate:R(o?.start_date,o?.end_date)}})||[]}),"select")}}),"usePaidTimeoffBreakdownQuery"),A=n(({employmentId:e})=>{let{client:t}=i();return v({queryKey:["timeoff-balance",e],retry:!1,queryFn:n(()=>T({client:t,headers:{Authorization:""},path:{employment_id:e}}),"queryFn"),select:n(({data:a})=>a,"select")})},"useTimeOffLeavePoliciesSummaryQuery");import{useMutation as E,useQuery as Q}from"@tanstack/react-query";function F(e){return Object.entries(e).reduce((t,[a,o])=>({...t,[a]:h(o)}),{})}n(F,"formatTimeoffValues");function q(e){let t=e?.contract_details?.available_pto,a=e?.contract_details?.available_pto_type;return e?.country?.code==="USA"&&a==="unlimited"?{value:t===0?20:t}:a==="unlimited"&&t>0?{value:t}:{value:t}}n(q,"getMinimumStatutoryDays");function U(e,t){let a=0,o=0;return e.forEach(r=>{r.timeoff_days?.forEach(s=>{new Date(s.day)<=t?a+=s.hours||0:o+=s.hours||0})}),{before:a,after:o}}n(U,"getAllTimeoffHoursBeforeDate");var V=n(({employmentId:e,date:t,options:a})=>c({employmentId:e,timeoffType:"paid_time_off",status:"approved",options:{enabled:a?.enabled,select:n(o=>{let{before:r,after:s}=U(o?.data?.timeoffs||[],new Date(t));return{bookedDaysBeforeTermination:d(r),bookedDaysAfterTermination:d(s)}},"select")}}),"useBookedTimeoffBeforeAndAfterTerminationQuery"),me=n(({employmentId:e,proposedTerminationDate:t,employment:a})=>{let{value:o=0}=q(a),r=A({employmentId:e}),s=V({employmentId:e,date:t}),p=r.data?.data?.[0].annual_entitlement.type==="limited"?{days:r.data?.data?.[0].annual_entitlement.days,hours:r.data?.data?.[0].annual_entitlement.hours}:{days:o,hours:0},u={days:r.data?.data?.[0].booked.days||0,hours:r.data?.data?.[0].booked.hours||0},f=r.data?.data?.[0].current_entitlement.type==="limited"?{days:r.data?.data?.[0].current_entitlement.days||0,hours:r.data?.data?.[0].current_entitlement.hours||0}:{days:o,hours:0},l={days:r.data?.data?.[0].used.days||0,hours:r.data?.data?.[0].used.hours||0},B=s.data?.bookedDaysBeforeTermination||{days:0,hours:0},C=s.data?.bookedDaysAfterTermination||{days:0,hours:0},x=m(f.days,f.hours),H=m(l.days,l.hours),P=m(u.days,u.hours),L=x-H-P,O=_(d(L));return{data:{...F({entitledDays:p,bookedDays:u,usedDays:l,approvedDaysBeforeTermination:B,approvedDaysAfterTermination:C,remainingDays:O,currentEntitlementDays:f}),isUnlimitedPto:a?.contract_details?.available_pto_type==="unlimited"},isLoading:r.isLoading||s.isLoading,isError:r.isError||s.isError,error:r.error||s.error}},"useSummaryTimeOffDataQuery"),de=n(()=>{let{client:e}=i();return E({mutationFn:n(t=>D({client:e,body:t}),"mutationFn")})},"useCreateTermination"),ue=n(({formValues:e,jsfModify:t,step:a})=>Q({queryKey:["rmt-flows-termination-schema",a],queryFn:n(()=>S[a]??k,"queryFn"),select:n(({data:o})=>{let r=o?.schema||{};return g(r,e||{},{jsfModify:t})},"select")}),"useTerminationSchema");export{c as a,N as b,A as c,V as d,me as e,de as f,ue as g};
2
- //# sourceMappingURL=chunk-EWL6BSEP.js.map
1
+ import{a as k}from"./chunk-XFD3ULUF.js";import{a as S}from"./chunk-ZVUQDK2E.js";import{a as m,b as d,c as h,d as _}from"./chunk-DFJNVGK4.js";import{a as y}from"./chunk-TXSUZLOI.js";import{a as g}from"./chunk-EUSCQL4H.js";import{D as T,Y as b,c as D}from"./chunk-2IA5ZHU4.js";import{d as i}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useQuery as v}from"@tanstack/react-query";var c=n(({employmentId:e,status:t,timeoffType:a,options:o})=>{let{client:r}=i();return v({queryKey:["timeoff",e,t],retry:!1,queryFn:n(()=>b({client:r,headers:{Authorization:""},query:{employment_id:e,status:t,timeoff_type:a}}),"queryFn"),select:n(({data:s})=>o?.select?.(s)??s,"select"),enabled:o?.enabled})},"useTimeOffQuery"),R=n((e,t)=>{let a=y(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),o=y(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return`${a} \u2192 ${o}`},"formatDateRange"),N=n(({employmentId:e,options:t})=>c({employmentId:e,timeoffType:"paid_time_off",options:{enabled:t?.enabled,select:n(a=>({bookedDays:a?.data?.timeoffs?.reduce((o,r)=>o+(r?.timeoff_days?.filter(s=>s.hours!=null&&s.hours>0).length||0),0)||0,timeoffs:a?.data?.timeoffs?.map(o=>{let r=o?.timeoff_days?.filter(s=>s.hours>0).length||0;return{status:o?.status,duration:r,startDate:o?.start_date,endDate:o?.end_date,formattedDate:R(o?.start_date,o?.end_date)}})||[]}),"select")}}),"usePaidTimeoffBreakdownQuery"),A=n(({employmentId:e})=>{let{client:t}=i();return v({queryKey:["timeoff-balance",e],retry:!1,queryFn:n(()=>T({client:t,headers:{Authorization:""},path:{employment_id:e}}),"queryFn"),select:n(({data:a})=>a,"select")})},"useTimeOffLeavePoliciesSummaryQuery");import{useMutation as E,useQuery as Q}from"@tanstack/react-query";function F(e){return Object.entries(e).reduce((t,[a,o])=>({...t,[a]:h(o)}),{})}n(F,"formatTimeoffValues");function q(e){let t=e?.contract_details?.available_pto,a=e?.contract_details?.available_pto_type;return e?.country?.code==="USA"&&a==="unlimited"?{value:t===0?20:t}:a==="unlimited"&&t>0?{value:t}:{value:t}}n(q,"getMinimumStatutoryDays");function U(e,t){let a=0,o=0;return e.forEach(r=>{r.timeoff_days?.forEach(s=>{new Date(s.day)<=t?a+=s.hours||0:o+=s.hours||0})}),{before:a,after:o}}n(U,"getAllTimeoffHoursBeforeDate");var V=n(({employmentId:e,date:t,options:a})=>c({employmentId:e,timeoffType:"paid_time_off",status:"approved",options:{enabled:a?.enabled,select:n(o=>{let{before:r,after:s}=U(o?.data?.timeoffs||[],new Date(t));return{bookedDaysBeforeTermination:d(r),bookedDaysAfterTermination:d(s)}},"select")}}),"useBookedTimeoffBeforeAndAfterTerminationQuery"),me=n(({employmentId:e,proposedTerminationDate:t,employment:a})=>{let{value:o=0}=q(a),r=A({employmentId:e}),s=V({employmentId:e,date:t}),p=r.data?.data?.[0].annual_entitlement.type==="limited"?{days:r.data?.data?.[0].annual_entitlement.days,hours:r.data?.data?.[0].annual_entitlement.hours}:{days:o,hours:0},u={days:r.data?.data?.[0].booked.days||0,hours:r.data?.data?.[0].booked.hours||0},f=r.data?.data?.[0].current_entitlement.type==="limited"?{days:r.data?.data?.[0].current_entitlement.days||0,hours:r.data?.data?.[0].current_entitlement.hours||0}:{days:o,hours:0},l={days:r.data?.data?.[0].used.days||0,hours:r.data?.data?.[0].used.hours||0},B=s.data?.bookedDaysBeforeTermination||{days:0,hours:0},C=s.data?.bookedDaysAfterTermination||{days:0,hours:0},x=m(f.days,f.hours),H=m(l.days,l.hours),P=m(u.days,u.hours),L=x-H-P,O=_(d(L));return{data:{...F({entitledDays:p,bookedDays:u,usedDays:l,approvedDaysBeforeTermination:B,approvedDaysAfterTermination:C,remainingDays:O,currentEntitlementDays:f}),isUnlimitedPto:a?.contract_details?.available_pto_type==="unlimited"},isLoading:r.isLoading||s.isLoading,isError:r.isError||s.isError,error:r.error||s.error}},"useSummaryTimeOffDataQuery"),de=n(()=>{let{client:e}=i();return E({mutationFn:n(t=>D({client:e,body:t}),"mutationFn")})},"useCreateTermination"),ue=n(({formValues:e,jsfModify:t,step:a})=>Q({queryKey:["rmt-flows-termination-schema",a],queryFn:n(()=>S[a]??k,"queryFn"),select:n(({data:o})=>{let r=o?.schema||{};return g(r,e||{},{jsfModify:t})},"select")}),"useTerminationSchema");export{c as a,N as b,A as c,V as d,me as e,de as f,ue as g};
2
+ //# sourceMappingURL=chunk-EQVUP5ZR.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-OEXY56S2.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{k as t}from"./chunk-VIGKOVHP.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function E({components:l,onSubmit:p,onSuccess:c,onError:m}){let{contractorOnboardingBag:r}=e(),d=i(async a=>{try{let n=await r.parseFormValues(a);await p?.(n);let o=await r.onSubmit(a);if(o?.data){await c?.(o?.data),r?.next();return}}catch(n){let o=t(n,r.meta?.fields?.pricing_plan);m?.(o)}},"handleSubmit"),P=r.stepState.values?.pricing_plan||r.initialValues.pricing_plan;return u(s,{components:l,defaultValues:P,onSubmit:d})}i(E,"PricingPlanStep");export{E as a};
2
- //# sourceMappingURL=chunk-H3BUOBWO.js.map
1
+ import{a as s}from"./chunk-URJI6IZB.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{k as t}from"./chunk-VIGKOVHP.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function E({components:l,onSubmit:p,onSuccess:c,onError:m}){let{contractorOnboardingBag:r}=e(),d=i(async a=>{try{let n=await r.parseFormValues(a);await p?.(n);let o=await r.onSubmit(a);if(o?.data){await c?.(o?.data),r?.next();return}}catch(n){let o=t(n,r.meta?.fields?.pricing_plan);m?.(o)}},"handleSubmit"),P=r.stepState.values?.pricing_plan||r.initialValues.pricing_plan;return u(s,{components:l,defaultValues:P,onSubmit:d})}i(E,"PricingPlanStep");export{E as a};
2
+ //# sourceMappingURL=chunk-FBWPGUBC.js.map
@@ -0,0 +1,2 @@
1
+ import{b as o}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";var k=["invited","created_reserve_paid"],l=["deposit_required","referred"];function v({render:d}){let{onboardingBag:t,creditScore:s}=o(),u=t.creditRiskStatus==="deposit_required",n=t.onboardingReservesStatus==="deposit_required",i=u||n,c=t.creditRiskStatus==="referred",r=t.employment?.status&&k.includes(t.employment.status),a=t.creditRiskStatus&&l.includes(t.creditRiskStatus),R=i&&t.employment?.status&&!r,S=!i&&t.creditRiskStatus&&!a||t.employment?.status&&r,p=e(()=>c?"referred":R?s.showReserveInvoice?"deposit_required_successful":"deposit_required":S?s.showInviteSuccessful?"invite_successful":"invite":null,"getCreditRiskState")();return d({creditRiskState:p,creditRiskStatus:t.creditRiskStatus})}e(v,"ReviewStep");export{v as a};
2
+ //# sourceMappingURL=chunk-FHYOWPXB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Onboarding/components/ReviewStep.tsx"],"sourcesContent":["import { useOnboardingContext } from '@/src/flows/Onboarding/context';\nimport {\n CreditRiskStatus,\n CreditRiskState,\n Employment,\n} from '@/src/flows/Onboarding/types';\n\ntype ReviewStepProps = {\n /**\n * Render prop function for customizing the review step credit risk flow UI\n *\n * @param props - Object containing credit risk information\n * @param props.creditRiskState - Current state of the credit risk flow\n * - 'referred': Company has been referred for manual review\n * - 'deposit_required': Deposit payment is required but not yet paid\n * - 'deposit_required_successful': Deposit payment has been successfully processed\n * - 'invite': Regular invite flow is available (no deposit required)\n * - 'invite_successful': Invitation has been successfully sent\n * - null: No specific credit risk state applies\n *\n * @param props.creditRiskStatus - Credit risk status from the backend\n * - 'not_started': Credit risk assessment has not been initiated\n * - 'ready': Ready for credit risk assessment\n * - 'in_progress': Credit risk assessment is in progress\n * - 'referred': Company has been referred for manual review\n * - 'fail': Credit risk assessment failed\n * - 'deposit_required': Company requires a deposit payment\n * - 'no_deposit_required': No deposit is required for this company\n * - undefined: Credit risk status not yet determined\n * @returns React.ReactNode to render for the review step\n */\n render: (props: {\n creditRiskState: CreditRiskState;\n creditRiskStatus: CreditRiskStatus | undefined;\n }) => React.ReactNode;\n};\n\nconst statusesToNotShowDeposit: Employment['status'][] = [\n 'invited',\n 'created_reserve_paid',\n];\n\nconst CREDIT_RISK_STATUSES: CreditRiskStatus[] = [\n 'deposit_required',\n 'referred',\n];\n\nexport function ReviewStep({ render }: ReviewStepProps) {\n const { onboardingBag, creditScore } = useOnboardingContext();\n\n // Helper variables to make logic more readable\n const isDepositRequiredCreditRisk =\n onboardingBag.creditRiskStatus === 'deposit_required';\n\n const isDepositRequiredReservesStatus =\n onboardingBag.onboardingReservesStatus === 'deposit_required';\n\n const isDepositRequired =\n isDepositRequiredCreditRisk || isDepositRequiredReservesStatus;\n\n const isReferred = onboardingBag.creditRiskStatus === 'referred';\n\n const hasEmploymentStatusThatHidesDeposit =\n onboardingBag.employment?.status &&\n statusesToNotShowDeposit.includes(onboardingBag.employment.status);\n\n const isCreditRiskStatusInExclusionList =\n onboardingBag.creditRiskStatus &&\n CREDIT_RISK_STATUSES.includes(onboardingBag.creditRiskStatus);\n\n const shouldShowDepositFlow =\n isDepositRequired &&\n onboardingBag.employment?.status &&\n !hasEmploymentStatusThatHidesDeposit;\n\n const shouldShowInviteFlow =\n (!isDepositRequired &&\n onboardingBag.creditRiskStatus &&\n !isCreditRiskStatusInExclusionList) ||\n (onboardingBag.employment?.status && hasEmploymentStatusThatHidesDeposit);\n\n const getCreditRiskState = (): CreditRiskState => {\n // check if the company is referred\n if (isReferred) {\n return 'referred';\n }\n\n // Deposit required flow\n if (shouldShowDepositFlow) {\n return creditScore.showReserveInvoice\n ? 'deposit_required_successful'\n : 'deposit_required';\n }\n\n // Invite flow\n if (shouldShowInviteFlow) {\n return creditScore.showInviteSuccessful ? 'invite_successful' : 'invite';\n }\n\n // Default case\n return null;\n };\n\n const creditRiskState = getCreditRiskState();\n\n return render({\n creditRiskState,\n creditRiskStatus: onboardingBag.creditRiskStatus,\n });\n}\n"],"mappings":"gFAqCA,IAAMA,EAAmD,CACvD,UACA,sBACF,EAEMC,EAA2C,CAC/C,mBACA,UACF,EAEO,SAASC,EAAW,CAAE,OAAAC,CAAO,EAAoB,CACtD,GAAM,CAAE,cAAAC,EAAe,YAAAC,CAAY,EAAIC,EAAqB,EAGtDC,EACJH,EAAc,mBAAqB,mBAE/BI,EACJJ,EAAc,2BAA6B,mBAEvCK,EACJF,GAA+BC,EAE3BE,EAAaN,EAAc,mBAAqB,WAEhDO,EACJP,EAAc,YAAY,QAC1BJ,EAAyB,SAASI,EAAc,WAAW,MAAM,EAE7DQ,EACJR,EAAc,kBACdH,EAAqB,SAASG,EAAc,gBAAgB,EAExDS,EACJJ,GACAL,EAAc,YAAY,QAC1B,CAACO,EAEGG,EACH,CAACL,GACAL,EAAc,kBACd,CAACQ,GACFR,EAAc,YAAY,QAAUO,EAwBjCI,EAtBqBC,EAAA,IAErBN,EACK,WAILG,EACKR,EAAY,mBACf,8BACA,mBAIFS,EACKT,EAAY,qBAAuB,oBAAsB,SAI3D,KAnBkB,sBAsBgB,EAE3C,OAAOF,EAAO,CACZ,gBAAAY,EACA,iBAAkBX,EAAc,gBAClC,CAAC,CACH,CA9DgBY,EAAAd,EAAA","names":["statusesToNotShowDeposit","CREDIT_RISK_STATUSES","ReviewStep","render","onboardingBag","creditScore","useOnboardingContext","isDepositRequiredCreditRisk","isDepositRequiredReservesStatus","isDepositRequired","isReferred","hasEmploymentStatusThatHidesDeposit","isCreditRiskStatusInExclusionList","shouldShowDepositFlow","shouldShowInviteFlow","creditRiskState","__name"]}
@@ -1,2 +1,2 @@
1
- import{J as e}from"./chunk-7ENB7H4E.js";import{a as t}from"./chunk-P37U34EQ.js";import{queryOptions as i}from"@tanstack/react-query";var a=t((o,n="default")=>i({queryKey:["countries",n],retry:!1,queryFn:t(async()=>{let r=await e({client:o,headers:{Authorization:""}});if(r.error||!r.data)throw new Error("Failed to fetch supported countries");return r},"queryFn")}),"countriesOptions");export{a};
2
- //# sourceMappingURL=chunk-UB6PYKNX.js.map
1
+ import{K as e}from"./chunk-2IA5ZHU4.js";import{a as t}from"./chunk-P37U34EQ.js";import{queryOptions as i}from"@tanstack/react-query";var a=t((o,n="default")=>i({queryKey:["countries",n],retry:!1,queryFn:t(async()=>{let r=await e({client:o,headers:{Authorization:""}});if(r.error||!r.data)throw new Error("Failed to fetch supported countries");return r},"queryFn")}),"countriesOptions");export{a};
2
+ //# sourceMappingURL=chunk-FJ6WBG3H.js.map
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-LNV36S6D.js";import{a as F}from"./chunk-SLLDKJ7K.js";import{e as p}from"./chunk-T7O3YYOG.js";import{f as l,g as u}from"./chunk-H2JFQGQJ.js";import{b as _}from"./chunk-TVZAFTPT.js";import{a}from"./chunk-P37U34EQ.js";import{useEffect as w}from"react";import{jsx as r}from"react/jsx-runtime";var R=["effective_date","reason_for_change","reason_for_change_description","additional_comments","additional_comments_toggle"];function x({onSubmit:b,onError:m,onSuccess:A}){let{formId:C,contractAmendment:{checkFieldUpdates:h,fields:s,onSubmit:y,stepState:S,initialValues:i,handleValidation:g}}=_(),V=f(g),e=l({resolver:V,defaultValues:S.values?.form||i,shouldUnregister:!0,mode:"onBlur"});w(()=>{let t=e?.watch(o=>{(Object.keys(e.formState.dirtyFields).length>0||e.formState.isDirty)&&h(o)});return()=>t?.unsubscribe()},[]);let v=a(async t=>{let o=!1;for(let[c,P]of Object.entries(t))if(!R.includes(c)&&i[c]!==P){o=!0;break}if(!o)return m?.({message:"no_changes_detected_contract_details"});let d=await p(t,s,{isPartialValidation:!1});await b?.(d);let n=await y(t);n.error?m?.(n.error):await A?.(n.data)},"handleSubmit");return r(u,{...e,children:r("form",{id:C,"data-testid":"contract-amendment-form",onSubmit:e.handleSubmit(v),className:"space-y-4 RemoteFlows__ContractAmendmentForm",children:r(F,{fields:s})})})}a(x,"ContractAmendmentForm");export{x as a};
2
- //# sourceMappingURL=chunk-BG66XH5L.js.map
1
+ import{b as f}from"./chunk-LNV36S6D.js";import{a as F}from"./chunk-SNRZPCZ7.js";import{e as p}from"./chunk-T7O3YYOG.js";import{f as l,g as u}from"./chunk-H2JFQGQJ.js";import{b as _}from"./chunk-TVZAFTPT.js";import{a}from"./chunk-P37U34EQ.js";import{useEffect as w}from"react";import{jsx as r}from"react/jsx-runtime";var R=["effective_date","reason_for_change","reason_for_change_description","additional_comments","additional_comments_toggle"];function x({onSubmit:b,onError:m,onSuccess:A}){let{formId:C,contractAmendment:{checkFieldUpdates:h,fields:s,onSubmit:y,stepState:S,initialValues:i,handleValidation:g}}=_(),V=f(g),e=l({resolver:V,defaultValues:S.values?.form||i,shouldUnregister:!0,mode:"onBlur"});w(()=>{let t=e?.watch(o=>{(Object.keys(e.formState.dirtyFields).length>0||e.formState.isDirty)&&h(o)});return()=>t?.unsubscribe()},[]);let v=a(async t=>{let o=!1;for(let[c,P]of Object.entries(t))if(!R.includes(c)&&i[c]!==P){o=!0;break}if(!o)return m?.({message:"no_changes_detected_contract_details"});let d=await p(t,s,{isPartialValidation:!1});await b?.(d);let n=await y(t);n.error?m?.(n.error):await A?.(n.data)},"handleSubmit");return r(u,{...e,children:r("form",{id:C,"data-testid":"contract-amendment-form",onSubmit:e.handleSubmit(v),className:"space-y-4 RemoteFlows__ContractAmendmentForm",children:r(F,{fields:s})})})}a(x,"ContractAmendmentForm");export{x as a};
2
+ //# sourceMappingURL=chunk-FQHFTFUZ.js.map
@@ -0,0 +1,2 @@
1
+ import{b as w}from"./chunk-PGWKJ6FK.js";import{d as v,e as y}from"./chunk-WUFJP4GG.js";import{a as i}from"./chunk-X6ZAR7ZL.js";import{b as l}from"./chunk-KQPDXXG3.js";import{a as s}from"./chunk-P37U34EQ.js";import{jsx as _}from"react/jsx-runtime";function P({onSubmit:f,onSuccess:a,onError:t,render:E,...o}){let{components:R}=l(),{onboardingBag:r,setCreditScore:m}=w(),d=v(),u=y(),{mutateAsync:g}=i(d),{mutateAsync:S}=i(u),c=r.creditRiskStatus==="deposit_required"||r.onboardingReservesStatus==="deposit_required",I=s(async()=>{try{if(await f?.(),c&&r.employmentId&&r.employment?.status&&!r.isEmploymentReadOnly){let e=await S({employment_slug:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),m?.(n=>({...n,showReserveInvoice:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(r.employmentId){let e=await g({employment_id:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"invited"}),m?.(n=>({...n,showInviteSuccessful:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){t?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),b=c&&r.employment?.status&&!r.isEmploymentReadOnly,p=R?.button;if(!p)throw new Error("Button component not found");return _(p,{...o,disabled:d.isPending||u.isPending||o.disabled,onClick:e=>{I(),o.onClick?.(e)},children:E({employmentStatus:b?"created_awaiting_reserve":"invited"})})}s(P,"OnboardingInvite");export{P as a};
2
+ //# sourceMappingURL=chunk-GCBEPX4V.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Onboarding/components/OnboardingInvite.tsx"],"sourcesContent":["import { ButtonHTMLAttributes, ReactNode } from 'react';\nimport { useEmploymentInvite } from '@/src/flows/Onboarding/api';\nimport { useCreateReserveInvoice } from '@/src/flows/Onboarding/api';\nimport { FieldError, mutationToPromise } from '@/src/lib/mutations';\nimport { SuccessResponse } from '@/src/client';\nimport { useOnboardingContext } from '@/src/flows/Onboarding/context';\nimport { useFormFields } from '@/src/context';\n\nexport type OnboardingInviteProps = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'onError'\n> & {\n onSuccess?: ({\n data,\n employmentStatus,\n }: {\n data: SuccessResponse;\n employmentStatus: 'invited' | 'created_awaiting_reserve';\n }) => void | Promise<void>;\n onError?: ({\n error,\n rawError,\n fieldErrors,\n }: {\n error: Error;\n rawError: Record<string, unknown>;\n fieldErrors: FieldError[];\n }) => void;\n onSubmit?: () => void | Promise<void>;\n render: (props: {\n employmentStatus: 'invited' | 'created_awaiting_reserve';\n }) => ReactNode;\n} & Record<string, unknown>;\n\nexport function OnboardingInvite({\n onSubmit,\n onSuccess,\n onError,\n render,\n ...props\n}: OnboardingInviteProps) {\n const { components } = useFormFields();\n const { onboardingBag, setCreditScore } = useOnboardingContext();\n const employmentInviteMutation = useEmploymentInvite();\n const useCreateReserveInvoiceMutation = useCreateReserveInvoice();\n\n const { mutateAsync: employmentInviteMutationAsync } = mutationToPromise(\n employmentInviteMutation,\n );\n\n const { mutateAsync: createReserveInvoiceMutationAsync } = mutationToPromise(\n useCreateReserveInvoiceMutation,\n );\n\n const isDepositRequired =\n onboardingBag.creditRiskStatus === 'deposit_required' ||\n onboardingBag.onboardingReservesStatus === 'deposit_required';\n\n const handleSubmit = async () => {\n try {\n await onSubmit?.();\n if (\n isDepositRequired &&\n onboardingBag.employmentId &&\n onboardingBag.employment?.status &&\n !onboardingBag.isEmploymentReadOnly\n ) {\n const response = await createReserveInvoiceMutationAsync({\n employment_slug: onboardingBag.employmentId,\n });\n if (response.data) {\n await onSuccess?.({\n data: response.data as SuccessResponse,\n employmentStatus: 'created_awaiting_reserve',\n });\n setCreditScore?.((prev) => ({\n ...prev,\n showReserveInvoice: true,\n }));\n onboardingBag.refetchEmployment();\n return;\n }\n\n if (response.error) {\n onError?.({\n error: response.error,\n rawError: response.rawError,\n fieldErrors: [],\n });\n }\n } else if (onboardingBag.employmentId) {\n const response = await employmentInviteMutationAsync({\n employment_id: onboardingBag.employmentId,\n });\n if (response.data) {\n await onSuccess?.({\n data: response.data as SuccessResponse,\n employmentStatus: 'invited',\n });\n setCreditScore?.((prev) => ({\n ...prev,\n showInviteSuccessful: true,\n }));\n onboardingBag.refetchEmployment();\n return;\n }\n if (response.error) {\n onError?.({\n error: response.error,\n rawError: response.rawError,\n fieldErrors: [],\n });\n }\n }\n } catch (error: unknown) {\n onError?.({\n error: error as Error,\n rawError: error as Record<string, unknown>,\n fieldErrors: [],\n });\n }\n };\n\n const isReserveFlow =\n isDepositRequired &&\n onboardingBag.employment?.status &&\n !onboardingBag.isEmploymentReadOnly;\n\n const CustomButton = components?.button;\n if (!CustomButton) {\n throw new Error(`Button component not found`);\n }\n\n return (\n <CustomButton\n {...props}\n disabled={\n employmentInviteMutation.isPending ||\n useCreateReserveInvoiceMutation.isPending ||\n props.disabled\n }\n onClick={(evt) => {\n handleSubmit();\n props.onClick?.(evt);\n }}\n >\n {render({\n employmentStatus: isReserveFlow\n ? 'created_awaiting_reserve'\n : 'invited',\n })}\n </CustomButton>\n );\n}\n"],"mappings":"+MAsII,cAAAA,MAAA,oBApGG,SAASC,EAAiB,CAC/B,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,OAAAC,EACA,GAAGC,CACL,EAA0B,CACxB,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAC/B,CAAE,cAAAC,EAAe,eAAAC,CAAe,EAAIC,EAAqB,EACzDC,EAA2BC,EAAoB,EAC/CC,EAAkCC,EAAwB,EAE1D,CAAE,YAAaC,CAA8B,EAAIC,EACrDL,CACF,EAEM,CAAE,YAAaM,CAAkC,EAAID,EACzDH,CACF,EAEMK,EACJV,EAAc,mBAAqB,oBACnCA,EAAc,2BAA6B,mBAEvCW,EAAeC,EAAA,SAAY,CAC/B,GAAI,CAEF,GADA,MAAMnB,IAAW,EAEfiB,GACAV,EAAc,cACdA,EAAc,YAAY,QAC1B,CAACA,EAAc,qBACf,CACA,IAAMa,EAAW,MAAMJ,EAAkC,CACvD,gBAAiBT,EAAc,YACjC,CAAC,EACD,GAAIa,EAAS,KAAM,CACjB,MAAMnB,IAAY,CAChB,KAAMmB,EAAS,KACf,iBAAkB,0BACpB,CAAC,EACDZ,IAAkBa,IAAU,CAC1B,GAAGA,EACH,mBAAoB,EACtB,EAAE,EACFd,EAAc,kBAAkB,EAChC,MACF,CAEIa,EAAS,OACXlB,IAAU,CACR,MAAOkB,EAAS,MAChB,SAAUA,EAAS,SACnB,YAAa,CAAC,CAChB,CAAC,CAEL,SAAWb,EAAc,aAAc,CACrC,IAAMa,EAAW,MAAMN,EAA8B,CACnD,cAAeP,EAAc,YAC/B,CAAC,EACD,GAAIa,EAAS,KAAM,CACjB,MAAMnB,IAAY,CAChB,KAAMmB,EAAS,KACf,iBAAkB,SACpB,CAAC,EACDZ,IAAkBa,IAAU,CAC1B,GAAGA,EACH,qBAAsB,EACxB,EAAE,EACFd,EAAc,kBAAkB,EAChC,MACF,CACIa,EAAS,OACXlB,IAAU,CACR,MAAOkB,EAAS,MAChB,SAAUA,EAAS,SACnB,YAAa,CAAC,CAChB,CAAC,CAEL,CACF,OAASE,EAAgB,CACvBpB,IAAU,CACR,MAAOoB,EACP,SAAUA,EACV,YAAa,CAAC,CAChB,CAAC,CACH,CACF,EA/DqB,gBAiEfC,EACJN,GACAV,EAAc,YAAY,QAC1B,CAACA,EAAc,qBAEXiB,EAAenB,GAAY,OACjC,GAAI,CAACmB,EACH,MAAM,IAAI,MAAM,4BAA4B,EAG9C,OACE1B,EAAC0B,EAAA,CACE,GAAGpB,EACJ,SACEM,EAAyB,WACzBE,EAAgC,WAChCR,EAAM,SAER,QAAUqB,GAAQ,CAChBP,EAAa,EACbd,EAAM,UAAUqB,CAAG,CACrB,EAEC,SAAAtB,EAAO,CACN,iBAAkBoB,EACd,2BACA,SACN,CAAC,EACH,CAEJ,CAvHgBJ,EAAApB,EAAA","names":["jsx","OnboardingInvite","onSubmit","onSuccess","onError","render","props","components","useFormFields","onboardingBag","setCreditScore","useOnboardingContext","employmentInviteMutation","useEmploymentInvite","useCreateReserveInvoiceMutation","useCreateReserveInvoice","employmentInviteMutationAsync","mutationToPromise","createReserveInvoiceMutationAsync","isDepositRequired","handleSubmit","__name","response","prev","error","isReserveFlow","CustomButton","evt"]}
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-OEXY56S2.js";import{b as n}from"./chunk-Q3ALCPJN.js";import{k as i}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function P({onSubmit:d,onSuccess:m,onError:p}){let{contractorOnboardingBag:r}=n(),l=e(async a=>{try{let t=await r.parseFormValues(a);await d?.(t);let o=await r.onSubmit(a);if(o?.data){await m?.(o?.data),r?.next();return}}catch(t){let o=i(t,r.meta?.fields?.contract_preview);p?.(o)}},"handleSubmit"),u=r.stepState.values?.contract_preview||r.initialValues.contract_preview;return c("div",{className:"space-y-4",children:c(s,{defaultValues:u,onSubmit:l})})}e(P,"ContractPreviewStep");export{P as a};
2
- //# sourceMappingURL=chunk-XNAFFHZH.js.map
1
+ import{a as s}from"./chunk-URJI6IZB.js";import{b as n}from"./chunk-Q3ALCPJN.js";import{k as i}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function P({onSubmit:d,onSuccess:m,onError:p}){let{contractorOnboardingBag:r}=n(),l=e(async a=>{try{let t=await r.parseFormValues(a);await d?.(t);let o=await r.onSubmit(a);if(o?.data){await m?.(o?.data),r?.next();return}}catch(t){let o=i(t,r.meta?.fields?.contract_preview);p?.(o)}},"handleSubmit"),u=r.stepState.values?.contract_preview||r.initialValues.contract_preview;return c("div",{className:"space-y-4",children:c(s,{defaultValues:u,onSubmit:l})})}e(P,"ContractPreviewStep");export{P as a};
2
+ //# sourceMappingURL=chunk-GCVM3FO4.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-YPUP5LNV.js";import{a as r}from"./chunk-MJQUJZCD.js";import{a as t}from"./chunk-WEOIHTBU.js";import{a as f}from"./chunk-4UO7KLRK.js";import{a as e}from"./chunk-UMVMNUPH.js";import{a as p}from"./chunk-AJIDQALB.js";import{a as n}from"./chunk-WR5DSTKP.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
2
- //# sourceMappingURL=chunk-7PWZAW7M.js.map
1
+ import{a as n}from"./chunk-WR5DSTKP.js";import{a}from"./chunk-OHCA7HXR.js";import{a as r}from"./chunk-MJQUJZCD.js";import{a as t}from"./chunk-L4P7572F.js";import{a as f}from"./chunk-N3Q636ZK.js";import{a as e}from"./chunk-5D4AKL3N.js";import{a as p}from"./chunk-DM5RRWPM.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
2
+ //# sourceMappingURL=chunk-GDJP7TMP.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-7RP5F62S.js";import{a as F}from"./chunk-DFAY4TWC.js";import{i as p,j as l,k as i,l as a,m as c}from"./chunk-H2JFQGQJ.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as $,useState as v}from"react";import{jsx as n,jsxs as C}from"react/jsx-runtime";function L({field:t,fieldState:b,fieldData:o}){let[g,s]=v([]),_=m(e=>{let r=e.map(({value:S})=>S);t.onChange(r),s(e)},"handleChange");$(()=>{t.value&&o.options&&s(t.value.map(e=>o?.options?.find(r=>r.value===e)))},[t.value,o.options]);let y=[...Object.entries(o.$meta?.regions||{}).map(([e,r])=>({value:r,label:e,category:"Regions"})),...Object.entries(o.$meta?.subregions||{}).map(([e,r])=>({value:r,label:e,category:"Subregions"})),...o.options?.map(e=>({...e,value:e.value,label:e.label,category:"Countries"}))||[]];return C(p,{"data-field":t.name,className:`RemoteFlows__CountryField__Item__${t.name}`,children:[n(l,{className:"RemoteFlows__CountryField__Label",children:o.label}),n(i,{children:n(u,{options:y,selected:g,onChange:_})}),o.description&&C(a,{children:[o.description," ",n(F,{helpCenter:o.meta?.helpCenter})]}),b.error&&n(c,{})]})}m(L,"CountryFieldDefault");export{L as a};
2
- //# sourceMappingURL=chunk-W4ECFBIA.js.map
1
+ import{a as u}from"./chunk-7RP5F62S.js";import{a as F}from"./chunk-MCWXQT7A.js";import{i as p,j as l,k as i,l as a,m as c}from"./chunk-H2JFQGQJ.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as $,useState as v}from"react";import{jsx as n,jsxs as C}from"react/jsx-runtime";function L({field:t,fieldState:b,fieldData:o}){let[g,s]=v([]),_=m(e=>{let r=e.map(({value:S})=>S);t.onChange(r),s(e)},"handleChange");$(()=>{t.value&&o.options&&s(t.value.map(e=>o?.options?.find(r=>r.value===e)))},[t.value,o.options]);let y=[...Object.entries(o.$meta?.regions||{}).map(([e,r])=>({value:r,label:e,category:"Regions"})),...Object.entries(o.$meta?.subregions||{}).map(([e,r])=>({value:r,label:e,category:"Subregions"})),...o.options?.map(e=>({...e,value:e.value,label:e.label,category:"Countries"}))||[]];return C(p,{"data-field":t.name,className:`RemoteFlows__CountryField__Item__${t.name}`,children:[n(l,{className:"RemoteFlows__CountryField__Label",children:o.label}),n(i,{children:n(u,{options:y,selected:g,onChange:_})}),o.description&&C(a,{children:[o.description," ",n(F,{helpCenter:o.meta?.helpCenter})]}),b.error&&n(c,{})]})}m(L,"CountryFieldDefault");export{L as a};
2
+ //# sourceMappingURL=chunk-I2NE5CCG.js.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as a}from"react/jsx-runtime";function l({base64Data:r,fileName:t="document.pdf"}){return r?a("div",{className:"w-full space-y-4",children:[e("iframe",{src:r,className:"w-full h-[600px] border rounded",title:t}),a("div",{className:"flex justify-between items-center text-sm",children:[e("p",{className:"text-gray-600",children:t}),e("a",{href:r,download:t,className:"text-blue-600 hover:underline",children:"Download PDF"})]})]}):e("div",{className:"w-full border rounded p-8 text-center bg-gray-50",children:e("p",{className:"text-gray-500",children:"No PDF data available"})})}o(l,"PDFPreviewDefault");export{l as a};
2
+ //# sourceMappingURL=chunk-IHGCXP2X.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/shared/pdf-preview/PDFPreviewDefault.tsx"],"sourcesContent":["import { PDFPreviewComponentProps } from '@/src/types/remoteFlows';\n\nexport function PDFPreviewDefault({\n base64Data,\n fileName = 'document.pdf',\n}: PDFPreviewComponentProps) {\n if (!base64Data) {\n return (\n <div className='w-full border rounded p-8 text-center bg-gray-50'>\n <p className='text-gray-500'>No PDF data available</p>\n </div>\n );\n }\n\n return (\n <div className='w-full space-y-4'>\n <iframe\n src={base64Data}\n className='w-full h-[600px] border rounded'\n title={fileName}\n />\n <div className='flex justify-between items-center text-sm'>\n <p className='text-gray-600'>{fileName}</p>\n <a\n href={base64Data}\n download={fileName}\n className='text-blue-600 hover:underline'\n >\n Download PDF\n </a>\n </div>\n </div>\n );\n}\n"],"mappings":"wCASQ,cAAAA,EAYF,QAAAC,MAZE,oBAPD,SAASC,EAAkB,CAChC,WAAAC,EACA,SAAAC,EAAW,cACb,EAA6B,CAC3B,OAAKD,EASHF,EAAC,OAAI,UAAU,mBACb,UAAAD,EAAC,UACC,IAAKG,EACL,UAAU,kCACV,MAAOC,EACT,EACAH,EAAC,OAAI,UAAU,4CACb,UAAAD,EAAC,KAAE,UAAU,gBAAiB,SAAAI,EAAS,EACvCJ,EAAC,KACC,KAAMG,EACN,SAAUC,EACV,UAAU,gCACX,wBAED,GACF,GACF,EAvBEJ,EAAC,OAAI,UAAU,mDACb,SAAAA,EAAC,KAAE,UAAU,gBAAgB,iCAAqB,EACpD,CAuBN,CA/BgBK,EAAAH,EAAA","names":["jsx","jsxs","PDFPreviewDefault","base64Data","fileName","__name"]}
@@ -0,0 +1,2 @@
1
+ import{a,b as l,e as s}from"./chunk-LHEF2FN7.js";import{a as o}from"./chunk-P37U34EQ.js";function b(e={}){let r=[{name:"select_country",label:"Select Country",visible:!!e?.includeSelectCountry},{name:"basic_information",label:"Basic Information",visible:!0},{name:"pricing_plan",label:"Pricing Plan",visible:!0},{name:"eligibility_questionnaire",label:"Eligibility Questionnaire",visible:!!e?.includeEligibilityQuestionnaire},{name:"contract_details",label:"Contract Details",visible:!0},{name:"contract_preview",label:"Contract Preview",visible:!!e?.includeContractPreview},{name:"review",label:"Review",visible:!0}].map((n,i)=>({name:n.name,index:i,label:n.label,visible:n.visible}));return{steps:r.reduce((n,i)=>(n[i.name]={index:i.index,name:i.name,visible:i.visible},n),{}),stepsArray:r}}o(b,"buildSteps");var m=o((e,t)=>{if(e&&t&&e!==t)return`When the contractor will start providing service to your company. ${`This date does not match the date you provided in the Basic Information step - ${e} - and will override it only when both parties have signed the contract.`}`},"calculateProvisionalStartDateDescription"),y=o(e=>e===a||e===l,"isCMOrCMPlus"),u=["SAU","KWT","OMN","QAT","BHR"],v=o(e=>u.includes(e),"isNationalityCountryCode"),g=o((e,t)=>!t||t.length===0?!0:!t.some(r=>s[r]===e),"shouldIncludeProduct"),f=["invited"],h=["invited"];export{b as a,m as b,y as c,v as d,g as e,f,h as g};
2
+ //# sourceMappingURL=chunk-IZGJP7OI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/utils.ts"],"sourcesContent":["import { Step } from '@/src/flows/useStepState';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n ProductType,\n PRODUCT_IDENTIFIER_MAP,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { Employment } from '@/src/flows/Onboarding/types';\n\nexport type StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'contract_details'\n | 'eligibility_questionnaire'\n | 'contract_preview'\n | 'pricing_plan'\n | 'review';\n\ntype StepConfig = {\n includeSelectCountry?: boolean;\n includeEligibilityQuestionnaire?: boolean;\n includeContractPreview?: boolean;\n};\n\nexport function buildSteps(config: StepConfig = {}) {\n const stepDefinitions: Array<{\n name: StepKeys;\n label: string;\n visible: boolean;\n }> = [\n {\n name: 'select_country',\n label: 'Select Country',\n visible: Boolean(config?.includeSelectCountry),\n },\n {\n name: 'basic_information',\n label: 'Basic Information',\n visible: true,\n },\n {\n name: 'pricing_plan',\n label: 'Pricing Plan',\n visible: true,\n },\n {\n name: 'eligibility_questionnaire',\n label: 'Eligibility Questionnaire',\n visible: Boolean(config?.includeEligibilityQuestionnaire),\n },\n {\n name: 'contract_details',\n label: 'Contract Details',\n visible: true,\n },\n {\n name: 'contract_preview',\n label: 'Contract Preview',\n visible: Boolean(config?.includeContractPreview),\n },\n {\n name: 'review',\n label: 'Review',\n visible: true,\n },\n ];\n\n const stepsArray = stepDefinitions.map((step, index) => ({\n name: step.name,\n index,\n label: step.label,\n visible: step.visible,\n }));\n\n const steps = stepsArray.reduce(\n (acc, step) => {\n acc[step.name] = {\n index: step.index,\n name: step.name,\n visible: step.visible,\n };\n return acc;\n },\n {} as Record<string, Step<StepKeys>>,\n );\n\n return { steps, stepsArray };\n}\n\n/**\n * Calculates the description for the provisional start date field\n * based on whether the dates match between basic information and contract details steps\n */\nexport const calculateProvisionalStartDateDescription = (\n employmentProvisionalStartDate: string | undefined,\n fieldProvisionalStartDate: string | undefined,\n): string | undefined => {\n const datesNotMatching =\n employmentProvisionalStartDate &&\n fieldProvisionalStartDate &&\n employmentProvisionalStartDate !== fieldProvisionalStartDate;\n\n if (datesNotMatching) {\n const datesDontMatchWarning = `This date does not match the date you provided in the Basic Information step - ${\n employmentProvisionalStartDate\n } - and will override it only when both parties have signed the contract.`;\n return `When the contractor will start providing service to your company. ${datesDontMatchWarning}`;\n }\n return undefined;\n};\n\n/**\n * Checks if the selected pricing plan is CM (standard) or CM+ (plus)\n */\nexport const isCMOrCMPlus = (subscription: string | undefined): boolean => {\n return (\n subscription === contractorStandardProductIdentifier ||\n subscription === contractorPlusProductIdentifier\n );\n};\n\nconst NATIONALITY_COUNTRY_CODES = ['SAU', 'KWT', 'OMN', 'QAT', 'BHR'];\n\n/**\n * Checks if the country code is a country code that requires nationality status field\n */\nexport const isNationalityCountryCode = (countryCode: string) => {\n return NATIONALITY_COUNTRY_CODES.includes(countryCode);\n};\n\n/**\n * Checks if a product should be included based on the excludeProducts list\n * @param productIdentifier - The product identifier to check\n * @param excludeProducts - Array of products to exclude\n * @returns true if the product should be included, false otherwise\n */\nexport const shouldIncludeProduct = (\n productIdentifier: string,\n excludeProducts?: ProductType[],\n): boolean => {\n if (!excludeProducts || excludeProducts.length === 0) {\n return true;\n }\n\n return !excludeProducts.some(\n (excluded) => PRODUCT_IDENTIFIER_MAP[excluded] === productIdentifier,\n );\n};\n\n/**\n * Array of employment statuses that are allowed to proceed to the review step.\n * These statuses indicate that the employment is in a final state and the employment cannot be modified further.\n * @type {Employment['status'][]}\n * @constant\n */\nexport const reviewStepAllowedEmploymentStatus: Employment['status'][] = [\n 'invited',\n];\n\nexport const disabledInviteButtonEmploymentStatus: Employment['status'][] = [\n 'invited',\n];\n"],"mappings":"yFAwBO,SAASA,EAAWC,EAAqB,CAAC,EAAG,CA2ClD,IAAMC,EAtCD,CACH,CACE,KAAM,iBACN,MAAO,iBACP,QAAS,EAAQD,GAAQ,oBAC3B,EACA,CACE,KAAM,oBACN,MAAO,oBACP,QAAS,EACX,EACA,CACE,KAAM,eACN,MAAO,eACP,QAAS,EACX,EACA,CACE,KAAM,4BACN,MAAO,4BACP,QAAS,EAAQA,GAAQ,+BAC3B,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EACX,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EAAQA,GAAQ,sBAC3B,EACA,CACE,KAAM,SACN,MAAO,SACP,QAAS,EACX,CACF,EAEmC,IAAI,CAACE,EAAMC,KAAW,CACvD,KAAMD,EAAK,KACX,MAAAC,EACA,MAAOD,EAAK,MACZ,QAASA,EAAK,OAChB,EAAE,EAcF,MAAO,CAAE,MAZKD,EAAW,OACvB,CAACG,EAAKF,KACJE,EAAIF,EAAK,IAAI,EAAI,CACf,MAAOA,EAAK,MACZ,KAAMA,EAAK,KACX,QAASA,EAAK,OAChB,EACOE,GAET,CAAC,CACH,EAEgB,WAAAH,CAAW,CAC7B,CA/DgBI,EAAAN,EAAA,cAqET,IAAMO,EAA2CD,EAAA,CACtDE,EACAC,IACuB,CAMvB,GAJED,GACAC,GACAD,IAAmCC,EAMnC,MAAO,qEAHuB,kFAC5BD,CACF,0EACiG,EAGrG,EAhBwD,4CAqB3CE,EAAeJ,EAACK,GAEzBA,IAAiBC,GACjBD,IAAiBE,EAHO,gBAOtBC,EAA4B,CAAC,MAAO,MAAO,MAAO,MAAO,KAAK,EAKvDC,EAA2BT,EAACU,GAChCF,EAA0B,SAASE,CAAW,EADf,4BAU3BC,EAAuBX,EAAA,CAClCY,EACAC,IAEI,CAACA,GAAmBA,EAAgB,SAAW,EAC1C,GAGF,CAACA,EAAgB,KACrBC,GAAaC,EAAuBD,CAAQ,IAAMF,CACrD,EAVkC,wBAmBvBI,EAA4D,CACvE,SACF,EAEaC,EAA+D,CAC1E,SACF","names":["buildSteps","config","stepsArray","step","index","acc","__name","calculateProvisionalStartDateDescription","employmentProvisionalStartDate","fieldProvisionalStartDate","isCMOrCMPlus","subscription","contractorStandardProductIdentifier","contractorPlusProductIdentifier","NATIONALITY_COUNTRY_CODES","isNationalityCountryCode","countryCode","shouldIncludeProduct","productIdentifier","excludeProducts","excluded","PRODUCT_IDENTIFIER_MAP","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus"]}
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-DFAY4TWC.js";import{i as a,j as c,k as l,l as m,m as _}from"./chunk-H2JFQGQJ.js";import{a as u,b as R}from"./chunk-SNBAM7SA.js";import{a as F}from"./chunk-VIGKOVHP.js";import{a as p}from"./chunk-P37U34EQ.js";import{Fragment as g}from"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var w=p(({field:s,fieldData:i,fieldState:C})=>{let{name:r,label:d,description:n,options:b}=i;return e("fieldset",{className:F("space-y-3",`RemoteFlows__RadioGroupField__Item__${r}`),"data-field":r,children:t(a,{children:[e("legend",{children:d}),n&&e(m,{helpCenter:e(f,{helpCenter:i.meta?.helpCenter}),children:n}),e(l,{children:e(u,{"aria-label":d||r,onValueChange:o=>{s.onChange(o)},value:s.value,className:"flex flex-col space-y-3",children:b?.map(o=>e(g,{children:t(a,{"data-field":r,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[e(l,{children:e(R,{value:o.value,className:"RemoteFlows__RadioField__Input",disabled:o.disabled})}),t("div",{children:[e(c,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:o.label}),o.description&&e(m,{className:"mt-2",children:o.description})]})]})},o.value))})}),C.error&&e(_,{})]})})},"RadioGroupFieldDefault");export{w as a};
2
- //# sourceMappingURL=chunk-ERSP6CZ3.js.map
1
+ import{a as f}from"./chunk-MCWXQT7A.js";import{i as a,j as c,k as l,l as m,m as _}from"./chunk-H2JFQGQJ.js";import{a as u,b as R}from"./chunk-SNBAM7SA.js";import{a as F}from"./chunk-VIGKOVHP.js";import{a as p}from"./chunk-P37U34EQ.js";import{Fragment as g}from"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var w=p(({field:s,fieldData:i,fieldState:C})=>{let{name:r,label:d,description:n,options:b}=i;return e("fieldset",{className:F("space-y-3",`RemoteFlows__RadioGroupField__Item__${r}`),"data-field":r,children:t(a,{children:[e("legend",{children:d}),n&&e(m,{helpCenter:e(f,{helpCenter:i.meta?.helpCenter}),children:n}),e(l,{children:e(u,{"aria-label":d||r,onValueChange:o=>{s.onChange(o)},value:s.value,className:"flex flex-col space-y-3",children:b?.map(o=>e(g,{children:t(a,{"data-field":r,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[e(l,{children:e(R,{value:o.value,className:"RemoteFlows__RadioField__Input",disabled:o.disabled})}),t("div",{children:[e(c,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:o.label}),o.description&&e(m,{className:"mt-2",children:o.description})]})]})},o.value))})}),C.error&&e(_,{})]})})},"RadioGroupFieldDefault");export{w as a};
2
+ //# sourceMappingURL=chunk-J6HS3UVY.js.map
@@ -1,2 +1,2 @@
1
- import{c as d,d as S}from"./chunk-4N4MQECC.js";import{a as u}from"./chunk-HN5HLFTB.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-LNV36S6D.js";import{f as y}from"./chunk-H2JFQGQJ.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var l=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,g)=>!e&&!r?.management_fee&&n?l(u,n,g):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:g,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(s=>{m(s);let a=l(u,s,n.managementFees);a&&c.setValue("management.management_fee",a.toString())},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:void 0,hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b?.toString()||""},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(i=>i.value===e.currencySlug)?.label;if(a){m(a);let i=l(u,a,n.managementFees);c.setValue("management.management_fee",i?.toString()||"")}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:g(t)})},"CostCalculatorFlow");export{W as a};
2
- //# sourceMappingURL=chunk-IZGSVS3I.js.map
1
+ import{c as d,d as S}from"./chunk-OXAEJWEQ.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{a as u}from"./chunk-HN5HLFTB.js";import{b as C}from"./chunk-LNV36S6D.js";import{f as y}from"./chunk-H2JFQGQJ.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var l=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,g)=>!e&&!r?.management_fee&&n?l(u,n,g):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:g,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(s=>{m(s);let a=l(u,s,n.managementFees);a&&c.setValue("management.management_fee",a.toString())},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:void 0,hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b?.toString()||""},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(i=>i.value===e.currencySlug)?.label;if(a){m(a);let i=l(u,a,n.managementFees);c.setValue("management.management_fee",i?.toString()||"")}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:g(t)})},"CostCalculatorFlow");export{W as a};
2
+ //# sourceMappingURL=chunk-JPA3IMPE.js.map