@remoteoss/remote-flows 0.21.0 → 0.21.1

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 (277) hide show
  1. package/dist/{chunk-6F4YCVZE.js → chunk-3GDPOMQP.js} +2 -2
  2. package/dist/{chunk-VXCCAIWS.js → chunk-3MS7FYSY.js} +2 -2
  3. package/dist/{chunk-QFZ3XVDT.js → chunk-3T43ERBA.js} +2 -2
  4. package/dist/{chunk-NCS6X3XL.js → chunk-47A5JNKX.js} +2 -2
  5. package/dist/{chunk-2QGDCMCE.js → chunk-4NLAHGUV.js} +2 -2
  6. package/dist/{chunk-VRVK3X2R.js → chunk-4Q7KTWXP.js} +2 -2
  7. package/dist/{chunk-I3O6X5XB.js → chunk-56D2YDS2.js} +2 -2
  8. package/dist/{chunk-B3WXLC2R.js → chunk-5JGYNS2O.js} +2 -2
  9. package/dist/{chunk-A7ZEA2WU.js → chunk-A6QURRVL.js} +2 -2
  10. package/dist/{chunk-ASKKS4Z3.js → chunk-AKHJDD35.js} +2 -2
  11. package/dist/{chunk-4Q4OTL2P.js → chunk-AWK7AF5V.js} +2 -2
  12. package/dist/{chunk-CWEPL5J3.js → chunk-AXES4NFY.js} +2 -2
  13. package/dist/{chunk-C737VJYN.js → chunk-BCSSGG6E.js} +2 -2
  14. package/dist/{chunk-U2THNES3.js → chunk-C535PFLI.js} +2 -2
  15. package/dist/{chunk-X4GAGLFN.js → chunk-CCW6FKQ3.js} +2 -2
  16. package/dist/{chunk-LB35HMUG.js → chunk-CKHZP3O3.js} +2 -2
  17. package/dist/{chunk-FE5CZPR7.js → chunk-CLW7CVDG.js} +2 -2
  18. package/dist/{chunk-VCO2QEJU.js → chunk-DPIKH7BI.js} +2 -2
  19. package/dist/{chunk-GYX4DKK2.js → chunk-EAIJKDY4.js} +2 -2
  20. package/dist/{chunk-MORMQBAF.js → chunk-EKK7R3M6.js} +2 -2
  21. package/dist/{chunk-7IHBNPZK.js → chunk-FCAGJMPU.js} +2 -2
  22. package/dist/{chunk-I5X2IPYD.js → chunk-G2NIQGHZ.js} +2 -2
  23. package/dist/{chunk-ZCMFMCSZ.js → chunk-G343WOO7.js} +2 -2
  24. package/dist/{chunk-LE3JY644.js → chunk-GFNIN6CJ.js} +2 -2
  25. package/dist/{chunk-JDK2CKH7.js → chunk-GSNOUE4L.js} +2 -2
  26. package/dist/{chunk-QBECPUJM.js → chunk-H6G4PPLM.js} +2 -2
  27. package/dist/chunk-HC56JKI2.js +2 -0
  28. package/dist/chunk-HC56JKI2.js.map +1 -0
  29. package/dist/{chunk-TGU24WSW.js → chunk-HH4YP6QX.js} +2 -2
  30. package/dist/{chunk-GETLSRVM.js → chunk-I2URNHWK.js} +2 -2
  31. package/dist/{chunk-ZN4VWMV2.js → chunk-IQ2HRDC4.js} +2 -2
  32. package/dist/{chunk-HRA6BY3O.js → chunk-ISWLTY4E.js} +2 -2
  33. package/dist/{chunk-GNZJOPIS.js → chunk-JE2MYS37.js} +2 -2
  34. package/dist/{chunk-DZ4UXMF3.js → chunk-JNPIBIHZ.js} +2 -2
  35. package/dist/{chunk-OIBVTGB4.js → chunk-KSHPBRPW.js} +2 -2
  36. package/dist/{chunk-CSHVGHQR.js → chunk-L2GYSHXS.js} +2 -2
  37. package/dist/{chunk-3RAEG64W.js → chunk-L5CORHOG.js} +2 -2
  38. package/dist/{chunk-C4VLCUWK.js → chunk-LJ36642G.js} +2 -2
  39. package/dist/{chunk-MCAK5KPI.js → chunk-LSGVE623.js} +2 -2
  40. package/dist/{chunk-YLBQWZOK.js → chunk-ODI4OPN7.js} +2 -2
  41. package/dist/{chunk-JWZIWG4T.js → chunk-OEEUSIOB.js} +2 -2
  42. package/dist/{chunk-OJNWWRD5.js → chunk-ORBIA4S3.js} +2 -2
  43. package/dist/{chunk-4ULJIT4W.js → chunk-OUO2RTM4.js} +2 -2
  44. package/dist/{chunk-XVW2URFK.js → chunk-PAZGF4C3.js} +2 -2
  45. package/dist/{chunk-33L3KAS5.js → chunk-PTACLZHT.js} +2 -2
  46. package/dist/{chunk-3PCSFTM3.js → chunk-QBEJBOGL.js} +2 -2
  47. package/dist/{chunk-BRENSYKE.js → chunk-QMUSEX2P.js} +2 -2
  48. package/dist/{chunk-7YVCTEDW.js → chunk-RLLBHQWS.js} +2 -2
  49. package/dist/{chunk-PBXOHZN5.js → chunk-RVEQJNZI.js} +2 -2
  50. package/dist/{chunk-R2VVXLL7.js → chunk-S2AQQVM7.js} +2 -2
  51. package/dist/{chunk-LTJBNOLY.js → chunk-SDIBOMMT.js} +2 -2
  52. package/dist/{chunk-E5IJ2M63.js → chunk-SFX34GRA.js} +2 -2
  53. package/dist/{chunk-YL46DDPK.js → chunk-SV2PWH6Y.js} +2 -2
  54. package/dist/{chunk-R52D2I6X.js → chunk-TK6JU3ZG.js} +2 -2
  55. package/dist/{chunk-2ZT2TLPE.js → chunk-U3XZWSEU.js} +2 -2
  56. package/dist/{chunk-WKTJKMHC.js → chunk-UCLVNY25.js} +2 -2
  57. package/dist/{chunk-ZJ3JHILJ.js → chunk-VHJFIDOX.js} +2 -2
  58. package/dist/{chunk-SERAGBDA.js → chunk-VOJHAIEH.js} +2 -2
  59. package/dist/{chunk-DS565IWX.js → chunk-VOW6W24S.js} +2 -2
  60. package/dist/{chunk-WCHQEQF5.js → chunk-VSUEF4AY.js} +2 -2
  61. package/dist/{chunk-IQRBTXZ4.js → chunk-W676SMID.js} +2 -2
  62. package/dist/{chunk-M4EVWRWB.js → chunk-WPMPTV76.js} +2 -2
  63. package/dist/{chunk-FS27V36X.js → chunk-WY3KCHHG.js} +2 -2
  64. package/dist/{chunk-NDR27PRO.js → chunk-X5F5HHFQ.js} +2 -2
  65. package/dist/{chunk-U23SN7CM.js → chunk-XASIKHZL.js} +2 -2
  66. package/dist/{chunk-Y36KZYCU.js → chunk-XGPCOHUF.js} +2 -2
  67. package/dist/{chunk-BR7CQPJA.js → chunk-XQ5TL23G.js} +2 -2
  68. package/dist/{chunk-YQKD74UF.js → chunk-XRB4Y7WT.js} +2 -2
  69. package/dist/{chunk-PNET2M7R.js → chunk-XRU2O525.js} +2 -2
  70. package/dist/{chunk-2I5DIIJP.js → chunk-Z2G2XC43.js} +2 -2
  71. package/dist/{chunk-KN4F5TMS.js → chunk-ZXA3CCPB.js} +2 -2
  72. package/dist/{chunk-M3B3ASM4.js → chunk-ZZ6MU7PF.js} +2 -2
  73. package/dist/{chunk-UQYM3PBZ.js → chunk-ZZNI7IY2.js} +2 -2
  74. package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
  75. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  76. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  77. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  78. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  79. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  80. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  81. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
  82. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  83. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  84. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  85. package/dist/flows/ContractAmendment/index.js +1 -1
  86. package/dist/flows/ContractAmendment/utils.d.ts +1 -1
  87. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
  88. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  89. package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
  90. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  91. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  92. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
  93. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  94. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
  95. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  96. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
  97. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  98. package/dist/flows/ContractorOnboarding/components/OnboardingBack.js +1 -1
  99. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  100. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  101. package/dist/flows/ContractorOnboarding/components/OnboardingSubmit.js +1 -1
  102. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
  103. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  104. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  105. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  106. package/dist/flows/ContractorOnboarding/context.d.ts +6 -6
  107. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
  108. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  109. package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
  110. package/dist/flows/ContractorOnboarding/index.js +1 -1
  111. package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
  112. package/dist/flows/CostCalculator/CostCalculatorDisclaimer.js +1 -1
  113. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  114. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  115. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  116. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  117. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  118. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  119. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +1 -1
  120. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  121. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
  122. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
  123. package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
  124. package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
  125. package/dist/flows/CostCalculator/Results/CostCalculatorIndirectTax.js +1 -1
  126. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
  127. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  128. package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js +1 -1
  129. package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.js +1 -1
  130. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +1 -1
  131. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
  132. package/dist/flows/CostCalculator/api.d.ts +1 -1
  133. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  134. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  135. package/dist/flows/CostCalculator/context.d.ts +3 -3
  136. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  137. package/dist/flows/CostCalculator/hooks.js +1 -1
  138. package/dist/flows/CostCalculator/index.d.ts +3 -3
  139. package/dist/flows/CostCalculator/index.js +1 -1
  140. package/dist/flows/CostCalculator/types.d.ts +1 -1
  141. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  142. package/dist/flows/CostCalculator/utils.js +1 -1
  143. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  144. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  145. package/dist/flows/Onboarding/api.d.ts +6 -6
  146. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  147. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  148. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  149. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  150. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  151. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  152. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  153. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  154. package/dist/flows/Onboarding/components/OnboardingBack.js +1 -1
  155. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  156. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  157. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  158. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  159. package/dist/flows/Onboarding/components/OnboardingSubmit.js +1 -1
  160. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  161. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  162. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  163. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  164. package/dist/flows/Onboarding/context.d.ts +5 -5
  165. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  166. package/dist/flows/Onboarding/hooks.js +1 -1
  167. package/dist/flows/Onboarding/index.d.ts +4 -4
  168. package/dist/flows/Onboarding/index.js +1 -1
  169. package/dist/flows/Onboarding/types.d.ts +4 -4
  170. package/dist/flows/Onboarding/utils.d.ts +4 -4
  171. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +1 -1
  172. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  173. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +1 -1
  174. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  175. package/dist/flows/Termination/PaidTimeOffForm.d.ts +1 -1
  176. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  177. package/dist/flows/Termination/TerminationBack.js +1 -1
  178. package/dist/flows/Termination/TerminationDetailsForm.d.ts +1 -1
  179. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  180. package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  181. package/dist/flows/Termination/TerminationFlow.d.ts +3 -3
  182. package/dist/flows/Termination/TerminationFlow.js +1 -1
  183. package/dist/flows/Termination/TerminationForm.d.ts +1 -1
  184. package/dist/flows/Termination/TerminationForm.js +1 -1
  185. package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +1 -1
  186. package/dist/flows/Termination/TerminationSubmit.js +1 -1
  187. package/dist/flows/Termination/TimeOff.d.ts +1 -1
  188. package/dist/flows/Termination/context.d.ts +4 -4
  189. package/dist/flows/Termination/hooks.d.ts +4 -4
  190. package/dist/flows/Termination/hooks.js +1 -1
  191. package/dist/flows/Termination/index.d.ts +3 -3
  192. package/dist/flows/Termination/index.js +1 -1
  193. package/dist/flows/Termination/types.d.ts +1 -1
  194. package/dist/flows/api.d.ts +1 -1
  195. package/dist/index.d.ts +7 -7
  196. package/dist/index.js +1 -1
  197. package/dist/internals.d.ts +2 -2
  198. package/dist/internals.js +1 -1
  199. package/dist/{mutations-CK4Y5P1M.d.ts → mutations-B7htnE-g.d.ts} +1 -1
  200. package/dist/{remoteFlows-CeiBUgpD.d.ts → remoteFlows-DR6mSxki.d.ts} +1 -1
  201. package/dist/{types-DeIKH9Nn.d.ts → types-DEybNxfT.d.ts} +4 -4
  202. package/dist/{types-8MKjvKH1.d.ts → types-XaAblF6e.d.ts} +5 -5
  203. package/dist/{types.gen-Bb9d9VOg.d.ts → types.gen-N_N1mlfc.d.ts} +1 -1
  204. package/package.json +1 -1
  205. package/dist/chunk-54KJP7WD.js +0 -2
  206. package/dist/chunk-54KJP7WD.js.map +0 -1
  207. /package/dist/{chunk-6F4YCVZE.js.map → chunk-3GDPOMQP.js.map} +0 -0
  208. /package/dist/{chunk-VXCCAIWS.js.map → chunk-3MS7FYSY.js.map} +0 -0
  209. /package/dist/{chunk-QFZ3XVDT.js.map → chunk-3T43ERBA.js.map} +0 -0
  210. /package/dist/{chunk-NCS6X3XL.js.map → chunk-47A5JNKX.js.map} +0 -0
  211. /package/dist/{chunk-2QGDCMCE.js.map → chunk-4NLAHGUV.js.map} +0 -0
  212. /package/dist/{chunk-VRVK3X2R.js.map → chunk-4Q7KTWXP.js.map} +0 -0
  213. /package/dist/{chunk-I3O6X5XB.js.map → chunk-56D2YDS2.js.map} +0 -0
  214. /package/dist/{chunk-B3WXLC2R.js.map → chunk-5JGYNS2O.js.map} +0 -0
  215. /package/dist/{chunk-A7ZEA2WU.js.map → chunk-A6QURRVL.js.map} +0 -0
  216. /package/dist/{chunk-ASKKS4Z3.js.map → chunk-AKHJDD35.js.map} +0 -0
  217. /package/dist/{chunk-4Q4OTL2P.js.map → chunk-AWK7AF5V.js.map} +0 -0
  218. /package/dist/{chunk-CWEPL5J3.js.map → chunk-AXES4NFY.js.map} +0 -0
  219. /package/dist/{chunk-C737VJYN.js.map → chunk-BCSSGG6E.js.map} +0 -0
  220. /package/dist/{chunk-U2THNES3.js.map → chunk-C535PFLI.js.map} +0 -0
  221. /package/dist/{chunk-X4GAGLFN.js.map → chunk-CCW6FKQ3.js.map} +0 -0
  222. /package/dist/{chunk-LB35HMUG.js.map → chunk-CKHZP3O3.js.map} +0 -0
  223. /package/dist/{chunk-FE5CZPR7.js.map → chunk-CLW7CVDG.js.map} +0 -0
  224. /package/dist/{chunk-VCO2QEJU.js.map → chunk-DPIKH7BI.js.map} +0 -0
  225. /package/dist/{chunk-GYX4DKK2.js.map → chunk-EAIJKDY4.js.map} +0 -0
  226. /package/dist/{chunk-MORMQBAF.js.map → chunk-EKK7R3M6.js.map} +0 -0
  227. /package/dist/{chunk-7IHBNPZK.js.map → chunk-FCAGJMPU.js.map} +0 -0
  228. /package/dist/{chunk-I5X2IPYD.js.map → chunk-G2NIQGHZ.js.map} +0 -0
  229. /package/dist/{chunk-ZCMFMCSZ.js.map → chunk-G343WOO7.js.map} +0 -0
  230. /package/dist/{chunk-LE3JY644.js.map → chunk-GFNIN6CJ.js.map} +0 -0
  231. /package/dist/{chunk-JDK2CKH7.js.map → chunk-GSNOUE4L.js.map} +0 -0
  232. /package/dist/{chunk-QBECPUJM.js.map → chunk-H6G4PPLM.js.map} +0 -0
  233. /package/dist/{chunk-TGU24WSW.js.map → chunk-HH4YP6QX.js.map} +0 -0
  234. /package/dist/{chunk-GETLSRVM.js.map → chunk-I2URNHWK.js.map} +0 -0
  235. /package/dist/{chunk-ZN4VWMV2.js.map → chunk-IQ2HRDC4.js.map} +0 -0
  236. /package/dist/{chunk-HRA6BY3O.js.map → chunk-ISWLTY4E.js.map} +0 -0
  237. /package/dist/{chunk-GNZJOPIS.js.map → chunk-JE2MYS37.js.map} +0 -0
  238. /package/dist/{chunk-DZ4UXMF3.js.map → chunk-JNPIBIHZ.js.map} +0 -0
  239. /package/dist/{chunk-OIBVTGB4.js.map → chunk-KSHPBRPW.js.map} +0 -0
  240. /package/dist/{chunk-CSHVGHQR.js.map → chunk-L2GYSHXS.js.map} +0 -0
  241. /package/dist/{chunk-3RAEG64W.js.map → chunk-L5CORHOG.js.map} +0 -0
  242. /package/dist/{chunk-C4VLCUWK.js.map → chunk-LJ36642G.js.map} +0 -0
  243. /package/dist/{chunk-MCAK5KPI.js.map → chunk-LSGVE623.js.map} +0 -0
  244. /package/dist/{chunk-YLBQWZOK.js.map → chunk-ODI4OPN7.js.map} +0 -0
  245. /package/dist/{chunk-JWZIWG4T.js.map → chunk-OEEUSIOB.js.map} +0 -0
  246. /package/dist/{chunk-OJNWWRD5.js.map → chunk-ORBIA4S3.js.map} +0 -0
  247. /package/dist/{chunk-4ULJIT4W.js.map → chunk-OUO2RTM4.js.map} +0 -0
  248. /package/dist/{chunk-XVW2URFK.js.map → chunk-PAZGF4C3.js.map} +0 -0
  249. /package/dist/{chunk-33L3KAS5.js.map → chunk-PTACLZHT.js.map} +0 -0
  250. /package/dist/{chunk-3PCSFTM3.js.map → chunk-QBEJBOGL.js.map} +0 -0
  251. /package/dist/{chunk-BRENSYKE.js.map → chunk-QMUSEX2P.js.map} +0 -0
  252. /package/dist/{chunk-7YVCTEDW.js.map → chunk-RLLBHQWS.js.map} +0 -0
  253. /package/dist/{chunk-PBXOHZN5.js.map → chunk-RVEQJNZI.js.map} +0 -0
  254. /package/dist/{chunk-R2VVXLL7.js.map → chunk-S2AQQVM7.js.map} +0 -0
  255. /package/dist/{chunk-LTJBNOLY.js.map → chunk-SDIBOMMT.js.map} +0 -0
  256. /package/dist/{chunk-E5IJ2M63.js.map → chunk-SFX34GRA.js.map} +0 -0
  257. /package/dist/{chunk-YL46DDPK.js.map → chunk-SV2PWH6Y.js.map} +0 -0
  258. /package/dist/{chunk-R52D2I6X.js.map → chunk-TK6JU3ZG.js.map} +0 -0
  259. /package/dist/{chunk-2ZT2TLPE.js.map → chunk-U3XZWSEU.js.map} +0 -0
  260. /package/dist/{chunk-WKTJKMHC.js.map → chunk-UCLVNY25.js.map} +0 -0
  261. /package/dist/{chunk-ZJ3JHILJ.js.map → chunk-VHJFIDOX.js.map} +0 -0
  262. /package/dist/{chunk-SERAGBDA.js.map → chunk-VOJHAIEH.js.map} +0 -0
  263. /package/dist/{chunk-DS565IWX.js.map → chunk-VOW6W24S.js.map} +0 -0
  264. /package/dist/{chunk-WCHQEQF5.js.map → chunk-VSUEF4AY.js.map} +0 -0
  265. /package/dist/{chunk-IQRBTXZ4.js.map → chunk-W676SMID.js.map} +0 -0
  266. /package/dist/{chunk-M4EVWRWB.js.map → chunk-WPMPTV76.js.map} +0 -0
  267. /package/dist/{chunk-FS27V36X.js.map → chunk-WY3KCHHG.js.map} +0 -0
  268. /package/dist/{chunk-NDR27PRO.js.map → chunk-X5F5HHFQ.js.map} +0 -0
  269. /package/dist/{chunk-U23SN7CM.js.map → chunk-XASIKHZL.js.map} +0 -0
  270. /package/dist/{chunk-Y36KZYCU.js.map → chunk-XGPCOHUF.js.map} +0 -0
  271. /package/dist/{chunk-BR7CQPJA.js.map → chunk-XQ5TL23G.js.map} +0 -0
  272. /package/dist/{chunk-YQKD74UF.js.map → chunk-XRB4Y7WT.js.map} +0 -0
  273. /package/dist/{chunk-PNET2M7R.js.map → chunk-XRU2O525.js.map} +0 -0
  274. /package/dist/{chunk-2I5DIIJP.js.map → chunk-Z2G2XC43.js.map} +0 -0
  275. /package/dist/{chunk-KN4F5TMS.js.map → chunk-ZXA3CCPB.js.map} +0 -0
  276. /package/dist/{chunk-M3B3ASM4.js.map → chunk-ZZ6MU7PF.js.map} +0 -0
  277. /package/dist/{chunk-UQYM3PBZ.js.map → chunk-ZZNI7IY2.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{c as d,d as S}from"./chunk-YQKD74UF.js";import{a as u}from"./chunk-HN5HLFTB.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-CFIJKJXD.js";import{f as y}from"./chunk-U23SN7CM.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 i=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,s)=>!e&&!r?.management_fee&&n?i(u,n,s):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:s,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(g=>{m(g);let a=i(u,g,n.managementFees);a&&c.setValue("management.management_fee",a)},"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:"",hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b},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(l=>l.value===e.currencySlug)?.label;if(a){m(a);let l=i(u,a,n.managementFees);c.setValue("management.management_fee",l)}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:s(t)})},"CostCalculatorFlow");export{W as a};
2
- //# sourceMappingURL=chunk-3RAEG64W.js.map
1
+ import{a as f}from"./chunk-KSHK3ZPX.js";import{c as d,d as S}from"./chunk-XRB4Y7WT.js";import{a as u}from"./chunk-HN5HLFTB.js";import{b as C}from"./chunk-CFIJKJXD.js";import{f as y}from"./chunk-XASIKHZL.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 i=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,s)=>!e&&!r?.management_fee&&n?i(u,n,s):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:s,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(g=>{m(g);let a=i(u,g,n.managementFees);a&&c.setValue("management.management_fee",a)},"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:"",hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b},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(l=>l.value===e.currencySlug)?.label;if(a){m(a);let l=i(u,a,n.managementFees);c.setValue("management.management_fee",l)}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:s(t)})},"CostCalculatorFlow");export{W as a};
2
+ //# sourceMappingURL=chunk-L5CORHOG.js.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-5KHLOGTR.js";import{a as f}from"./chunk-7YVCTEDW.js";import{a as n}from"./chunk-GETLSRVM.js";import{a as p}from"./chunk-E5IJ2M63.js";import{a as s}from"./chunk-LE3JY644.js";import{a as m}from"./chunk-I5X2IPYD.js";import{a}from"./chunk-FE5CZPR7.js";import{a as i}from"./chunk-MCAK5KPI.js";import{a as e}from"./chunk-NCS6X3XL.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-C4VLCUWK.js.map
1
+ import{a as m}from"./chunk-G2NIQGHZ.js";import{a}from"./chunk-CLW7CVDG.js";import{a as i}from"./chunk-LSGVE623.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-5KHLOGTR.js";import{a as f}from"./chunk-RLLBHQWS.js";import{a as n}from"./chunk-I2URNHWK.js";import{a as p}from"./chunk-SFX34GRA.js";import{a as s}from"./chunk-GFNIN6CJ.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-47A5JNKX.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-LJ36642G.js.map
@@ -1,2 +1,2 @@
1
- import{b as e}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-2QGDCMCE.js";import{b as m}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({children:t,...o}){let{formId:n}=e(),{components:f}=m(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(i,{...o,form:n,children:t})}u(p,"OnboardingSubmit");export{p as a};
2
- //# sourceMappingURL=chunk-MCAK5KPI.js.map
1
+ import{b as e}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-4NLAHGUV.js";import{b as m}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({children:t,...o}){let{formId:n}=e(),{components:f}=m(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(i,{...o,form:n,children:t})}u(p,"OnboardingSubmit");export{p as a};
2
+ //# sourceMappingURL=chunk-LSGVE623.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-FS27V36X.js";import{b as n}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function u({onSubmit:m}){let{terminationBag:i}=n();return a(r,{onSubmit:o(async t=>{await m?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(u,"TerminationDetailsForm");export{u as a};
2
- //# sourceMappingURL=chunk-YLBQWZOK.js.map
1
+ import{a as r}from"./chunk-WY3KCHHG.js";import{b as n}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function u({onSubmit:m}){let{terminationBag:i}=n();return a(r,{onSubmit:o(async t=>{await m?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(u,"TerminationDetailsForm");export{u as a};
2
+ //# sourceMappingURL=chunk-ODI4OPN7.js.map
@@ -1,2 +1,2 @@
1
- import{b as e}from"./chunk-2QGDCMCE.js";import{b as u}from"./chunk-3ZWDIEEM.js";import{b as i}from"./chunk-TVZAFTPT.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({children:t,...o}){let{formId:n}=i(),{components:f}=u(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(e,{...o,form:n,children:t})}m(d,"ContractAmendmentSubmit");export{d as a};
2
- //# sourceMappingURL=chunk-JWZIWG4T.js.map
1
+ import{b as e}from"./chunk-4NLAHGUV.js";import{b as u}from"./chunk-3ZWDIEEM.js";import{b as i}from"./chunk-TVZAFTPT.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({children:t,...o}){let{formId:n}=i(),{components:f}=u(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(e,{...o,form:n,children:t})}m(d,"ContractAmendmentSubmit");export{d as a};
2
+ //# sourceMappingURL=chunk-OEEUSIOB.js.map
@@ -1,2 +1,2 @@
1
- import{b as l}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-2QGDCMCE.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{a as c}from"./chunk-54KJP7WD.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function R({children:e,...t}){let{form:r,formId:n,costCalculatorBag:s}=l(),{components:f}=i(),m=f?.button;return m?a(m,{...t,type:"reset",form:n,onClick:o=>{s?.resetForm(),r.reset(),t.onClick?.(o)},children:e}):a(C,{...t,type:"reset",className:c("RemoteFlows__CostCalculatorForm__ResetButton",t.className),form:n,onClick:o=>{s?.resetForm(),r.reset(),t.onClick?.(o)},children:e})}u(R,"CostCalculatorResetButton");export{R as a};
2
- //# sourceMappingURL=chunk-OJNWWRD5.js.map
1
+ import{b as l}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-4NLAHGUV.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{a as c}from"./chunk-HC56JKI2.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function R({children:e,...t}){let{form:r,formId:n,costCalculatorBag:s}=l(),{components:f}=i(),m=f?.button;return m?a(m,{...t,type:"reset",form:n,onClick:o=>{s?.resetForm(),r.reset(),t.onClick?.(o)},children:e}):a(C,{...t,type:"reset",className:c("RemoteFlows__CostCalculatorForm__ResetButton",t.className),form:n,onClick:o=>{s?.resetForm(),r.reset(),t.onClick?.(o)},children:e})}u(R,"CostCalculatorResetButton");export{R as a};
2
+ //# sourceMappingURL=chunk-ORBIA4S3.js.map
@@ -1,2 +1,2 @@
1
- import{a as B}from"./chunk-ZJ3JHILJ.js";import{a as he,b as Ue,c as Ve,d as ze,e as Ge,f as Je,g as qe,h as Ke,i as Ye,j as ye,k as Xe,l as ve,m as Ce,o as xe,q as Qe,r as Ze,s as et}from"./chunk-C737VJYN.js";import{b as je}from"./chunk-R2VVXLL7.js";import{a as _e,b as $}from"./chunk-2QGDCMCE.js";import{b}from"./chunk-3ZWDIEEM.js";import{a as re,b as ae,c as x,d as Le,e as He,f as Be,g as Ae,h as k,i as w,j as N,k as P,l as R,m as D}from"./chunk-U23SN7CM.js";import{g as Oe}from"./chunk-PAQW5BFW.js";import{a as _,e as ee}from"./chunk-54KJP7WD.js";import{a as r}from"./chunk-P37U34EQ.js";import{Fragment as Ht,jsx as O,jsxs as ne}from"react/jsx-runtime";function se({name:e,defaultValue:t,description:a,label:o,onChange:l,multiple:d,options:c,component:F,...f}){let{components:i}=b(),{control:n}=x(),u=r((m,s,g)=>{let p=g.value?[...g.value]:[];s?p.includes(m)||g.onChange([...p,m]):g.onChange(p.filter(h=>h!==m))},"handleCheckboxChange");return O(k,{control:n,name:e,defaultValue:t,render:({field:m,fieldState:s})=>{let g=F||i?.checkbox;if(g){let p={name:e,description:a,label:o,defaultValue:t,multiple:d,options:c,...f};return O(g,{field:{...m,onChange:r(h=>{if(d){let{checked:S,value:C}=h.target;u(C,S,m),l?.(S);return}m.onChange(h),l?.(h)},"onChange")},fieldState:s,fieldData:p})}return ne(w,{"data-field":e,className:_(`RemoteFlows__CheckBoxField__Item__${e}`),children:[O(P,{children:ne(Ht,{children:[c&&d?O(N,{children:o}):null,c&&d?c.map(p=>ne("div",{className:"flex space-x-2",children:[O(he,{id:p.value,onCheckedChange:h=>{u(p.value,h===!0,m),l?.(h,p.value)},checked:m.value?.includes(p.value),className:"RemoteFlows__CheckBox__Input"}),O(N,{htmlFor:p.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:p.label})]},p.value)):ne("div",{className:"flex space-x-2",children:[O(he,{id:e,onCheckedChange:p=>{m.onChange(p),l?.(p)},checked:m.value,className:"RemoteFlows__CheckBox__Input"}),O(N,{htmlFor:e,className:"mb-0 RemoteFlows__CheckBox__Label",children:o})]})]})}),a&&O(R,{children:a}),s.error&&O(D,{})]})}})}r(se,"CheckBoxField");import{CalendarIcon as Ut}from"lucide-react";import{PopoverClose as Vt}from"@radix-ui/react-popover";import{ChevronLeft as Bt,ChevronRight as Ot}from"lucide-react";import{DayPicker as At}from"react-day-picker";import{jsx as be}from"react/jsx-runtime";function tt({className:e,classNames:t,showOutsideDays:a=!0,...o}){return be(At,{showOutsideDays:a,className:_("p-3",e),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:_(_e({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:_("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",o.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:_(_e({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",...t},components:{IconLeft:r(({className:l,...d})=>be(Bt,{className:_("size-4",l),...d}),"IconLeft"),IconRight:r(({className:l,...d})=>be(Ot,{className:_("size-4",l),...d}),"IconRight")},...o})}r(tt,"Calendar");import*as A from"@radix-ui/react-popover";import{jsx as le}from"react/jsx-runtime";function ie({...e}){return le(A.Root,{"data-slot":"popover",...e})}r(ie,"Popover");function me({...e}){return le(A.Trigger,{"data-slot":"popover-trigger",...e})}r(me,"PopoverTrigger");function de({className:e,align:t="center",sideOffset:a=4,...o}){return le(A.Portal,{children:le(A.Content,{"data-slot":"popover-content",align:t,sideOffset:a,className:_("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}r(de,"PopoverContent");import{format as ot}from"date-fns";import{Fragment as zt,jsx as E,jsxs as Se}from"react/jsx-runtime";function rt({description:e,label:t,name:a,minDate:o,onChange:l,component:d,...c}){let{components:F}=b(),{control:f}=x(),i;return c.meta?.mot&&typeof c.meta.mot=="number"?i=Oe(c.meta.mot):o&&(i=new Date(o)),E(k,{control:f,name:a,render:({field:n,fieldState:u})=>{let m=d||F?.date;if(m){let s={description:e,label:t,name:a,onChange:l,...i&&{minDate:i.toISOString()},...c};return E(m,{field:{...n,onChange:r(g=>{n.onChange(g),l?.(g)},"onChange")},fieldState:u,fieldData:s})}return Se(w,{"data-field":a,className:`flex flex-col RemoteFlows__DatePickerField__Item__${a}`,children:[E(N,{className:"RemoteFlows__DatePickerField__Label",children:t}),Se(ie,{children:[E(me,{asChild:!0,children:E(P,{children:E("div",{children:Se($,{type:"button",variant:"outline",className:_("w-full pl-3 text-left font-normal",!n.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${a}`,children:[n.value&&E(zt,{children:ot(n.value,"yyyy-MM-dd")}),E(Ut,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),E(de,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:E(tt,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:n.value?new Date(n.value):void 0,onSelect:s=>{n.onChange(s?ot(s,"yyyy-MM-dd"):null),l?.(s)},defaultMonth:i,components:{DayContent:r(s=>E(Vt,{children:s.date.getDate()}),"DayContent")},...i&&{disabled:r(s=>s<i,"disabled")}})})]}),e?E(R,{children:e}):null,u.error&&E(D,{className:"RemoteFlows__DatePickerField__Error"})]})}})}r(rt,"DatePickerField");import{useState as Gt,useRef as Jt}from"react";import{Upload as qt,X as Kt}from"lucide-react";import{jsx as U,jsxs as ke}from"react/jsx-runtime";function at({onChange:e,className:t,multiple:a}){let[o,l]=Gt([]),d=Jt(null),c=r(i=>{i.preventDefault(),d.current?.click()},"handleClick"),F=r(i=>{if(i.target.files&&i.target.files.length>0){let n=Array.from(i.target.files);l(n),e(i)}},"handleChange"),f=r(i=>{l(n=>n.filter(u=>u!==i))},"onRemoveFile");return ke("div",{className:_("flex flex-col items-start gap-4",t),children:[U("input",{type:"file",ref:d,onChange:F,className:"hidden","aria-label":"File upload",multiple:a}),ke($,{type:"button",onClick:c,className:"gap-2",children:[U(qt,{className:"h-4 w-4"}),"Choose File"]}),o.length===0&&U("div",{className:"text-sm",children:a?U("span",{className:"font-medium",children:"No files selected. You can select multiple files"}):U("span",{className:"font-medium",children:"No file selected."})}),o.length>0&&o.map((i,n)=>ke("div",{className:"text-sm flex items-center gap-2",children:["Selected file: ",U("span",{className:"font-medium",children:i.name})," (",Math.round(i.size/1024)," KB)",U($,{variant:"ghost",onClick:()=>f(i),children:U(Kt,{})})]},n))]})}r(at,"FileUploader");import{jsx as V,jsxs as jt}from"react/jsx-runtime";var Yt=r(e=>new Promise((t,a)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>t(o.result),o.onerror=l=>a(l)}),"toBase64"),nt=r(async e=>{let t=e.target.files?Array.from(e.target.files):[];return await Promise.all(t.map(async o=>{let l=await Yt(o);return{name:o.name,content:l.split(",")[1]}}))},"convertFilesToBase64");function st({name:e,description:t,label:a,multiple:o,onChange:l,component:d,...c}){let{components:F}=b(),{control:f}=x();return V(k,{control:f,name:e,render:({field:i,fieldState:n})=>{let u=d||F?.file;if(u){let m={name:e,description:t,label:a,multiple:o,...c};return V(u,{field:{...i,value:null,onChange:r(async s=>{let g=await nt(s);i.onChange(g),l?.(g)},"onChange")},fieldState:n,fieldData:m})}return jt(w,{"data-field":e,className:`RemoteFlows__FileUpload__Item__${e}`,children:[V(N,{className:"RemoteFlows__FileUpload__Label",children:a}),V(P,{children:V(at,{onChange:async m=>{let s=await nt(m);i.onChange(s),l?.(s)},multiple:o,className:_("RemoteFlows__FileUpload__Input")})}),t&&V("div",{className:"flex items-center justify-between",children:V(R,{className:"RemoteFlows__FileUpload__Description",children:t})}),n.error&&V(D,{className:"RemoteFlows__FileUpload__Error"})]})}})}r(st,"FileUploadField");import{jsx as Ne}from"react/jsx-runtime";function ce(e){let{components:t}=b(),{control:a}=x(),o=e.component||t?.number;return o?Ne(k,{control:a,name:e.name,render:({field:l,fieldState:d})=>Ne(o,{field:{...l,onChange:r(c=>{l.onChange(c),e.onChange?.(c)},"onChange")},fieldState:d,fieldData:e})}):Ne(B,{...e,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$"})}r(ce,"NumberField");import{Fragment as Xt}from"react";import{jsx as W,jsxs as we}from"react/jsx-runtime";function lt({name:e,defaultValue:t,description:a,label:o,options:l,onChange:d,component:c,...F}){let{components:f}=b(),{control:i}=x();return W(k,{control:i,name:e,defaultValue:t,render:({field:n,fieldState:u})=>{let m=c||f?.radio;if(m){let s={name:e,defaultValue:t,description:a,label:o,options:l,...F};return W(m,{field:{...n,onChange:r(g=>{n.onChange(g),d?.(g)},"onChange")},fieldState:u,fieldData:s})}return we(w,{className:_("space-y-3",`RemoteFlows__RadioGroupField__Item__${e}`),"data-field":e,children:[W(N,{children:o}),W(P,{children:W(Ue,{"aria-label":o||e,onValueChange:s=>{n.onChange(s),d?.(s)},value:n.value,className:"flex flex-col space-y-3",children:l?.map(s=>W(Xt,{children:we(w,{"data-field":e,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[W(P,{children:W(Ve,{value:s.value,className:"RemoteFlows__RadioField__Input",disabled:s.disabled})}),we("div",{children:[W(N,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:s.label}),s.description&&W(R,{className:"mt-2",children:s.description})]})]})},s.value))})}),a&&W(R,{children:a}),u.error&&W(D,{})]})}})}r(lt,"RadioGroupField");import{jsx as M,jsxs as it}from"react/jsx-runtime";function mt({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,component:c,...F}){let{control:f}=x(),{components:i}=b();return M(k,{defaultValue:o,control:f,name:t,render:({field:n,fieldState:u})=>{let m=c||i?.select;if(m){let s={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,...F};return M(m,{field:{...n,onChange:r(g=>{let p=F.jsonType==="number"?Number(g):g;n.onChange(p),d?.(p)},"onChange")},fieldState:u,fieldData:s})}return it(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[M(N,{className:"RemoteFlows__SelectField__Label",children:e}),M(P,{children:M("div",{className:"relative",children:it(ze,{value:n.value||"",onValueChange:s=>{let g=F.jsonType==="number"?Number(s):s;n.onChange(g),d?.(g)},children:[M(qe,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!u.error,"aria-label":e,children:M("span",{className:"absolute",children:M(Je,{placeholder:e})})}),M(Ke,{className:"RemoteFlows__SelectField__Content",children:M(Ge,{className:"RemoteFlows__SelectField__Group",children:a.map(s=>M(Ye,{value:s.value,className:"RemoteFlows__SelectField__SelectItem",disabled:s.disabled,children:s.label},s.value))})})]})})}),l&&M(R,{children:l}),u.error&&M(D,{})]})}})}r(mt,"SelectField");import{useState as ro}from"react";import{Fragment as Qt,useState as Zt}from"react";import{Check as eo,ChevronDownIcon as to,X as oo}from"lucide-react";import{Command as Y}from"cmdk";import{SearchIcon as jr}from"lucide-react";import{jsx as j,jsxs as ea}from"react/jsx-runtime";function dt({className:e,...t}){return j(Y,{"data-slot":"command",className:_("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}r(dt,"Command");function ct({className:e,...t}){return j(Y.List,{"data-slot":"command-list",className:_("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}r(ct,"CommandList");function ut({...e}){return j(Y.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}r(ut,"CommandEmpty");function pt({className:e,...t}){return j(Y.Group,{"data-slot":"command-group",className:_("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}r(pt,"CommandGroup");function ft({className:e,...t}){return j(Y.Separator,{"data-slot":"command-separator",className:_("bg-border -mx-1 h-px",e),...t})}r(ft,"CommandSeparator");function Ft({className:e,...t}){return j(Y.Item,{"data-slot":"command-item",className:_("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}r(Ft,"CommandItem");import{jsx as L,jsxs as X}from"react/jsx-runtime";function ue({options:e,selected:t,onChange:a,placeholder:o,...l}){let[d,c]=Zt(!1),F=r(n=>{a(t.filter(u=>u.value!==n.value))},"handleUnselect"),f=e.some(n=>n.category),i=e.reduce((n,u)=>{let m=u.category||"Uncategorized";return n[m]||(n[m]=[]),n[m].push(u),n},{});return X(ie,{open:d,onOpenChange:c,...l,children:[L(me,{children:X($,{variant:"outline",role:"combobox","aria-expanded":d,className:"w-full justify-between font-normal",type:"button",children:[L("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center",children:t.length>0?t.map(n=>X(je,{variant:"secondary",className:"mr-1 mb-1",children:[n.label,L("div",{role:"button",tabIndex:0,"aria-label":`remove ${n.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:u=>{u.key==="Enter"&&F(n)},onMouseDown:u=>{u.preventDefault(),u.stopPropagation()},onClick:()=>F(n),children:L(oo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},n.label)):L("span",{className:"text-foreground",children:o})}),L(to,{className:"size-4"})]})}),L(de,{align:"start",className:"w-full p-0",children:L(dt,{children:X(ct,{children:[L(ut,{children:"No item found."}),Object.entries(i).map(([n,u],m)=>X(Qt,{children:[m>0&&L(ft,{}),L(pt,{heading:f?n:void 0,children:u.map(s=>{let g=t.some(p=>p.value===s.value);return X(Ft,{onSelect:()=>{a(g?t.filter(p=>p.value!==s.value):[...t,s])},children:[L(eo,{className:_("mr-2 h-4 w-4",g?"opacity-100":"opacity-0")}),s.label]},s.label)})})]},n))]})})})]})}r(ue,"MultiSelect");import{jsx as J,jsxs as ao}from"react/jsx-runtime";function gt({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,$meta:c,component:F,...f}){let{control:i}=x(),{components:n}=b(),[u,m]=ro([]);return J(k,{defaultValue:o,control:i,name:t,render:({field:s,fieldState:g})=>{let p=F||n?.countries;if(p){let C={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,$meta:c,...f};return J(p,{field:{...s,onChange:r(T=>{s.onChange(T),d?.(T)},"onChange")},fieldState:g,fieldData:C})}let h=[...Object.entries(c?.regions||{}).map(([C,T])=>({value:T,label:C,category:"Regions"})),...Object.entries(c?.subregions||{}).map(([C,T])=>({value:T,label:C,category:"Subregions"})),...a.map(C=>({...C,value:C.value,label:C.label,category:"Countries"}))],S=r(C=>{let T=C.map(({value:G})=>G);s.onChange(T),d?.(T),m(C)},"handleChange");return ao(w,{"data-field":t,className:`RemoteFlows__CountryField__Item__${t}`,children:[J(N,{className:"RemoteFlows__CountryField__Label",children:e}),J(P,{children:J(ue,{options:h,selected:u,onChange:S,...f})}),l&&J(R,{children:l}),g.error&&J(D,{})]})}})}r(gt,"CountryField");import*as ht from"react";import{jsx as no}from"react/jsx-runtime";var Pe=ht.forwardRef(({className:e,...t},a)=>no("textarea",{className:_("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...t}));Pe.displayName="Textarea";import{jsx as q,jsxs as Re}from"react/jsx-runtime";function _t({name:e,description:t,label:a,onChange:o,maxLength:l,component:d,...c}){let{components:F}=b(),{control:f}=x();return q(k,{control:f,name:e,render:({field:i,fieldState:n})=>{let u=d||F?.textarea;if(u){let s={name:e,description:t,label:a,maxLength:l,...c};return q(u,{field:{...i,onChange:r(g=>{i.onChange(g),o?.(g)},"onChange")},fieldState:n,fieldData:s})}let m=i.value?.length??0;return Re(w,{"data-field":e,className:`RemoteFlows__TextArea__Item__${e}`,children:[q(N,{className:"RemoteFlows__TextArea__Label",children:a}),q(P,{children:q(Pe,{...i,value:i.value??"",onChange:s=>{i.onChange(s),o?.(s)},className:_(n.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:a})}),(t||l)&&Re("div",{className:"flex items-center justify-between",children:[t&&q(R,{className:"RemoteFlows__TextArea__Description",children:t}),l&&Re("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[m,"/",l]})]}),n.error&&q(D,{className:"RemoteFlows__TextArea__Error"})]})}})}r(_t,"TextAreaField");import{jsx as De}from"react/jsx-runtime";function yt(e){let{components:t}=b(),{control:a}=x(),o=e.component||t?.email;return o?De(k,{control:a,name:e.name,render:({field:l,fieldState:d})=>De(o,{field:{...l,onChange:r(c=>{l.onChange(c),e.onChange?.(c)},"onChange")},fieldState:d,fieldData:e})}):De(B,{...e,type:"email"})}r(yt,"EmailField");import{jsx as vt}from"react/jsx-runtime";function Ct(e){let{control:t}=x();return vt(k,{control:t,name:e.name,render:({field:a})=>vt("input",{...a,type:"hidden"})})}r(Ct,"HiddenField");import po,{useEffect as fo,useState as Dt}from"react";var xt=r((e,t,a)=>{if(e&&"reportValidity"in e){let o=re(a,t);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},"r"),Te=r((e,t)=>{for(let a in t.fields){let o=t.fields[a];o&&o.ref&&"reportValidity"in o.ref?xt(o.ref,a,e):o&&o.refs&&o.refs.forEach(l=>xt(l,a,e))}},"o"),St=r((e,t)=>{t.shouldUseNativeValidation&&Te(e,t);let a={};for(let o in e){let l=re(t.fields,o),d=Object.assign(e[o]||{},{ref:l&&l.ref});if(so(t.names||Object.keys(e),o)){let c=Object.assign({},re(a,o));ae(c,"root",d),ae(a,o,c)}else ae(a,o,d)}return a},"s"),so=r((e,t)=>{let a=bt(t);return e.some(o=>bt(o).match(`^${a}\\.\\d+`))},"i");function bt(e){return e.replace(/\]|\[/g,"")}r(bt,"n");function kt(e,t,a){return t===void 0&&(t={}),a===void 0&&(a={}),function(o,l,d){try{return Promise.resolve(function(c,F){try{var f=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[a.mode==="sync"?"validateSync":"validate"](o,Object.assign({abortEarly:!1},t,{context:l}))).then(function(i){return d.shouldUseNativeValidation&&Te({},d),{values:a.raw?Object.assign({},o):i,errors:{}}}))}catch(i){return F(i)}return f&&f.then?f.then(void 0,F):f}(0,function(c){if(!c.inner)throw c;return{values:{},errors:St((F=c,f=!d.shouldUseNativeValidation&&d.criteriaMode==="all",(F.inner||[]).reduce(function(i,n){if(i[n.path]||(i[n.path]={message:n.message,type:n.type}),f){var u=i[n.path].types,m=u&&u[n.type];i[n.path]=Le(n.path,f,i,n.type,m?[].concat(m,n.message):n.message)}return i},{})),d)};var F,f}))}catch(c){return Promise.reject(c)}}}r(kt,"o");import*as I from"yup";import Nt from"lodash.groupby";import Q from"lodash.capitalize";var wt=60,pe=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function lo(e){if(e<60)return`${e}m`;let t=Math.floor(e/wt),a=e%wt;return a>0?`${t}h${a}m`:`${t}h`}r(lo,"convertBreakDurationToHours");function Pt(e){let t=e.reduce((a,o)=>o.hours+a,0);return Number(t.toFixed(2))}r(Pt,"calculateTotalWorkHours");function io(e,t){let a=t.map(({day:d})=>d.toLowerCase()),o=a.indexOf(e),l=null;for(;o<a.length&&!l;){let d=a[o],c=a[o+1],F=pe.indexOf(d)+1;pe[F]===c||(l=d),o+=1}return l}r(io,"findLastConsecutiveDay");function mo(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}r(mo,"shouldSummarizeSchedule");function co(e){return Number.parseInt(e.break_duration_minutes)>0}r(co,"shouldSummarizeBreaks");function Rt(e){let t=e.filter(mo),a=Nt(t,F=>`${F.start_time}|${F.end_time}`),o=e.filter(co),l=Nt(o,"break_duration_minutes"),d=Object.keys(a).map(F=>{let f=a[F],i=f[0].day,[n,u]=F.split("|"),m=`from <span>${n.replace(":","h")}</span> to <span>${u.replace(":","h")}</span>`,s=io(i,f),p=(s?f.findIndex(h=>h.day===s):-1)===f.length-1;return f.length===1?`${Q(i)}, ${m}`:!p||!s?f.reduce((h,S,C)=>{let T=Q(S.day);return C===f.length-1?`${h}and ${T}, ${m}`:`${h}<span>${T}</span>, `},""):`<span>${Q(i)}</span> to <span>${Q(s)}</span>, ${m}`}),c=Object.keys(l).reverse().map((F,f)=>{let i=f===0,n=l[F],u=lo(parseInt(F,10));if(Object.keys(l).length===1)return`With ${u} daily breaks`;if(n.length===1){let m=`${u} break on ${Q(n[0].day)}.`;return i?`With ${m}`:m}return n.reduce((m,s,g)=>{let p=Q(s.day);return g===0?`${m} ${p}`:g===n.length-1?`${m}, and ${p}.`:`${m}, ${p}`},i?`With ${u} break on`:`${u} break on`)});return{workHoursSummary:d,breakSummary:c}}r(Rt,"buildWorkScheduleSummary");function Ie(e){let{checked:t,start_time:a,end_time:o,break_duration_minutes:l}=e;if(!t)return 0;let[d,c]=a.split(":").map(Number),[F,f]=o.split(":").map(Number),i=d*60+c,m=(F*60+f-i-Number.parseInt(l||"0"))/60;return m===Math.floor(m)?m:Number(m.toFixed(2))}r(Ie,"calculateHours");var uo={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function fe(e){return uo[e]}r(fe,"getShortWeekday");import{jsx as y,jsxs as H}from"react/jsx-runtime";var Fo=I.object({day:I.string().required(),checked:I.boolean().required(),start_time:I.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:r(e=>e.required("Required"),"then"),otherwise:r(e=>e.optional().nullable(),"otherwise")}),end_time:I.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:r(e=>e.required("Required"),"then"),otherwise:r(e=>e.optional().nullable(),"otherwise")}),hours:I.number().default(0),break_duration_minutes:I.string().default("0")}),go=I.object({schedule:I.array(Fo)});function ho({defaultSchedule:e,onSubmit:t}){let[a,o]=Dt(!1),l=pe.map(p=>{let h=e.find(S=>S.day.toLowerCase()===fe(p).toLowerCase()||S.day.toLowerCase()===p.toLowerCase());return h?{...h,day:fe(p),checked:!0}:{...e[0],checked:!1,day:fe(p)}}),d=Be({defaultValues:{schedule:l},resolver:kt(go)}),{handleSubmit:c,watch:F,reset:f,control:i,formState:n}=d,{fields:u}=He({name:"schedule",control:i}),m=F("schedule");function s(p){let h=p.schedule.filter(({checked:S})=>S).map(S=>({...S,hours:Ie(S)}));t(h),o(!1)}r(s,"handleSubmitWorkingHours");function g(){f(),o(!1)}return r(g,"handleCancel"),y("div",{className:"flex items-center justify-between",children:H(ye,{open:a,onOpenChange:o,children:[y(Xe,{asChild:!0,children:y($,{variant:"link",className:"flex items-center p-0 RemoteFlows__WorkScheduleSelectionForm__Trigger",children:"Edit Schedule"})}),H(ve,{className:"max-w-5xl max-h-[90vh] overflow-y-auto px-8 py-4 RemoteFlows__WorkScheduleSelectionForm__Content",children:[y(Ce,{children:y(xe,{className:"RemoteFlows__WorkScheduleSelectionForm__Title",children:"Edit employee working hours"})}),y(Ae,{...d,children:H("form",{className:"space-y-4 RemoteFlows__WorkScheduleSelectionForm__Form",children:[H("div",{className:"rounded-lg",children:[y("p",{className:"text-gray-600 text-sm mb-4 RemoteFlows__WorkScheduleSelectionForm__Description",children:"The times displayed are in the employee's time zone in the 24-hour format."}),H("div",{className:"grid grid-cols-12 gap-4 text-sm font-medium text-gray-500 uppercase tracking-wide RemoteFlows__WorkScheduleSelectionForm__Header",children:[y("div",{className:"col-span-2"}),y("div",{className:"col-span-3 text-center",children:"START"}),y("div",{className:"col-span-1 text-center"}),y("div",{className:"col-span-3 text-center",children:"END"}),y("div",{className:"col-span-2 text-center",children:"HOURS"})]}),y("div",{className:"RemoteFlows__WorkScheduleSelectionForm__Rows",children:u.map((p,h)=>{let S=m[h],C=Ie(S);return H(po.Fragment,{children:[H("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Hours",children:[y("div",{className:"col-span-2 flex items-center gap-3",children:y(se,{label:p.day,name:`schedule.${h}.checked`})}),y("div",{className:"col-span-3",children:y(B,{name:`schedule.${h}.start_time`,includeErrorMessage:!1})}),y("div",{className:"col-span-1 text-center text-gray-500",children:"to"}),y("div",{className:"col-span-3",children:y(B,{name:`schedule.${h}.end_time`,includeErrorMessage:!1})}),y("div",{className:"col-span-2 text-center text-gray-600",children:isNaN(C)?"-":`${C} hours`})]}),H("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Break",children:[y("div",{className:"col-span-2 text-gray-500",children:"Break"}),y("div",{className:"col-span-2",children:y(B,{name:`schedule.${h}.break_duration_minutes`,includeErrorMessage:!1})}),y("div",{className:"col-span-2 text-gray-500",children:"minutes"}),y("div",{className:"col-span-4"})]})]},p.id)})})]}),Object.keys(n.errors).length>0&&y("p",{className:"text-destructive text-sm mb-0",children:"Invalid time format (HH:mm)"}),H("div",{className:"flex gap-4 pt-4",children:[y($,{type:"button",className:"reset-button",variant:"outline",onClick:g,children:"Cancel"}),y($,{type:"button",className:"submit-button",onClick:c(s),children:"Save Schedule"})]})]})})]})]})})}r(ho,"WorkScheduleSelectionForm");function Tt(e){let{components:t}=b(),{setValue:a,control:o,watch:l}=x(),d=l(e.name),[c,F]=Dt(d),{workHoursSummary:f,breakSummary:i}=Rt(c),n=Pt(c);fo(()=>{a(e.name,c)},[c,e.name,a]);function u(s){F(s)}r(u,"onSubmit");let m=e.component||t?.["work-schedule"];return m?y(k,{control:o,name:e.name,render:({field:s,fieldState:g})=>y(m,{field:{...s,onChange:r(p=>{s.onChange(p),e.onChange?.(p)},"onChange")},fieldState:g,fieldData:{...e,defaultFormattedValue:{workHoursSummary:f,breakSummary:i,totalWorkHours:n}}})}):H("div",{className:"flex flex-col gap-3 RemoteFlows__WorkScheduleField",children:[y("p",{className:"text-sm RemoteFlows__WorkScheduleField__Title",children:"Work hours"}),H("div",{className:"flex flex-col gap-1 RemoteFlows__WorkScheduleField__Summary",children:[y("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__WorkHours",dangerouslySetInnerHTML:{__html:f.join(", ")}}),y("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Break",children:i.join()}),H("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Total",children:["Total of ",y("span",{children:n})," hours per week"]}),y(ho,{defaultSchedule:c,onSubmit:u})]})]})}r(Tt,"WorkScheduleField");import{useState as _o}from"react";import{jsx as K,jsxs as yo}from"react/jsx-runtime";function It({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,component:c,...F}){let{control:f}=x(),{components:i}=b(),[n,u]=_o();return K(k,{defaultValue:o,control:f,name:t,render:({field:m,fieldState:s})=>{let g=c||i?.["multi-select"];if(g){let h={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,...F};return K(g,{field:{...m,onChange:r(S=>{m.onChange(S),d?.(S)},"onChange")},fieldState:s,fieldData:h})}let p=n||a.filter(h=>m.value.includes(h.value));return yo(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[K(N,{className:"RemoteFlows__SelectField__Label",children:e}),K(P,{children:K(ue,{options:a,selected:p,onChange:h=>{let S=h.map(({value:C})=>C);m.onChange(S),d?.(S),u(h)},...F})}),l&&K(R,{children:l}),s.error&&K(D,{})]})}})}r(It,"MultiSelectField");import{jsx as vo}from"react/jsx-runtime";var $t=r(e=>vo(ce,{maxLength:15,...e}),"MoneyField");var $e={checkbox:se,text:B,email:yt,money:$t,select:mt,"multi-select":It,radio:lt,number:ce,file:st,date:rt,textarea:_t,countries:gt,hidden:Ct,"work-schedule":Tt};import{AlertCircle as Co}from"lucide-react";import{jsx as Fe,jsxs as xo}from"react/jsx-runtime";function Et({title:e,description:t,severity:a}){let{components:o}=b();if(o?.statement){let l=o?.statement;return Fe(l,{data:{title:e,description:ee(t),severity:a}})}return xo(Qe,{variant:"warning",children:[Fe(Co,{className:"h-4 w-4"}),e&&Fe(Ze,{children:e}),t&&Fe(et,{dangerouslySetInnerHTML:{__html:ee(t)}})]})}r(Et,"Statement");import{Fragment as bo,useEffect as So,useRef as Mt}from"react";import{jsx as z,jsxs as te}from"react/jsx-runtime";var ko=r(({isExpanded:e,onToggle:t,className:a,...o})=>z($,{type:"button",className:_("RemoteFlows__Button RemoteFlows__FieldSetField__ToggleButton",a),variant:"default",onClick:t,...o,children:e?"Remove":"Define"}),"DefaultToggleButton");function ss({label:e,name:t,fields:a,description:o,components:l,statement:d,isFlatFieldset:c,extra:F,variant:f="outset",features:i}){let{watch:n,setValue:u,trigger:m,formState:s}=x(),{components:g}=b(),p=i?.toggle?.stateField,h=p?n(p):i?.toggle?.defaultExpanded??!0,S=a.map(({name:v})=>`${t}.${v}`),C=n(S),T=Mt(C),G=Mt(null),Wt=r(()=>{p&&u(p,!h)},"toggleExpanded");So(()=>{let v=C,oe=T.current,ge=s.isSubmitted||s.submitCount>0,We=!1;for(let Z=0;Z<v.length;Z++)if(v[Z]!==void 0&&oe[Z]!==v[Z]){We=!0;break}return We&&ge&&(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{m()},50)),T.current=[...v],()=>{G.current&&clearTimeout(G.current)}},[C,m,s.isSubmitted,s.submitCount]);let Lt=g?.fieldsetToggle||ko,Ee=`${t}-content`,Me=`${t}-header`;return te("fieldset",{className:_("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${t}`),children:[z("legend",{className:_("text-sm font-semibold px-2",f==="inset"&&"hidden"),children:e}),f==="inset"&&te("div",{className:"RemoteFlows__FieldSetField__Header",id:Me,"data-state":h?"expanded":"collapsed","aria-expanded":h,children:[z("h3",{className:_("RemoteFlows__FieldSetField__Title"),children:e}),i?.toggle?.enabled&&z(Lt,{isExpanded:h,onToggle:Wt,"aria-expanded":h,"aria-controls":Ee,"aria-label":`${h?"Hide":"Show"} ${e}`,className:_("RemoteFlows__FieldSetField__Toggle",i.toggle?.className),children:h?i.toggle.labels?.collapse??"Remove":i.toggle.labels?.expand??"Define"})]}),h&&te("div",{id:Ee,"aria-labelledby":Me,role:"region",children:[o?z("div",{className:"mb-5 RemoteFlows__FieldSetField__Description",dangerouslySetInnerHTML:{__html:ee(o)}}):null,te("div",{className:"grid gap-4",children:[a.map(v=>{v.calculateDynamicProperties&&(v={...v,...v.calculateDynamicProperties(C,v)||{}});let oe=$e[v.type];if(v.isVisible===!1||v.deprecated)return null;if(v.Component){let{Component:ge}=v;return z(ge,{...v},v.name)}return v.type==="select"&&v.multiple&&(oe=$e["multi-select"]),te(bo,{children:[z(oe,{...v,name:`${c?v.name:`${t}.${v.name}`}`,component:l?.[v.type]}),v.extra?v.extra:null]},`${c?v.name:`${t}.${v.name}`}`)}),F||null,d?z(Et,{...d}):null]})]})]})}r(ss,"FieldSetField");export{$e as a,Et as b,ss as c};
2
- //# sourceMappingURL=chunk-4ULJIT4W.js.map
1
+ import{a as B}from"./chunk-VHJFIDOX.js";import{a as he,b as Ue,c as Ve,d as ze,e as Ge,f as Je,g as qe,h as Ke,i as Ye,j as ye,k as Xe,l as ve,m as Ce,o as xe,q as Qe,r as Ze,s as et}from"./chunk-BCSSGG6E.js";import{b as je}from"./chunk-S2AQQVM7.js";import{a as _e,b as $}from"./chunk-4NLAHGUV.js";import{b}from"./chunk-3ZWDIEEM.js";import{a as re,b as ae,c as x,d as Le,e as He,f as Be,g as Ae,h as k,i as w,j as N,k as P,l as R,m as D}from"./chunk-XASIKHZL.js";import{g as Oe}from"./chunk-PAQW5BFW.js";import{a as _,e as ee}from"./chunk-HC56JKI2.js";import{a as r}from"./chunk-P37U34EQ.js";import{Fragment as Ht,jsx as O,jsxs as ne}from"react/jsx-runtime";function se({name:e,defaultValue:t,description:a,label:o,onChange:l,multiple:d,options:c,component:F,...f}){let{components:i}=b(),{control:n}=x(),u=r((m,s,g)=>{let p=g.value?[...g.value]:[];s?p.includes(m)||g.onChange([...p,m]):g.onChange(p.filter(h=>h!==m))},"handleCheckboxChange");return O(k,{control:n,name:e,defaultValue:t,render:({field:m,fieldState:s})=>{let g=F||i?.checkbox;if(g){let p={name:e,description:a,label:o,defaultValue:t,multiple:d,options:c,...f};return O(g,{field:{...m,onChange:r(h=>{if(d){let{checked:S,value:C}=h.target;u(C,S,m),l?.(S);return}m.onChange(h),l?.(h)},"onChange")},fieldState:s,fieldData:p})}return ne(w,{"data-field":e,className:_(`RemoteFlows__CheckBoxField__Item__${e}`),children:[O(P,{children:ne(Ht,{children:[c&&d?O(N,{children:o}):null,c&&d?c.map(p=>ne("div",{className:"flex space-x-2",children:[O(he,{id:p.value,onCheckedChange:h=>{u(p.value,h===!0,m),l?.(h,p.value)},checked:m.value?.includes(p.value),className:"RemoteFlows__CheckBox__Input"}),O(N,{htmlFor:p.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:p.label})]},p.value)):ne("div",{className:"flex space-x-2",children:[O(he,{id:e,onCheckedChange:p=>{m.onChange(p),l?.(p)},checked:m.value,className:"RemoteFlows__CheckBox__Input"}),O(N,{htmlFor:e,className:"mb-0 RemoteFlows__CheckBox__Label",children:o})]})]})}),a&&O(R,{children:a}),s.error&&O(D,{})]})}})}r(se,"CheckBoxField");import{CalendarIcon as Ut}from"lucide-react";import{PopoverClose as Vt}from"@radix-ui/react-popover";import{ChevronLeft as Bt,ChevronRight as Ot}from"lucide-react";import{DayPicker as At}from"react-day-picker";import{jsx as be}from"react/jsx-runtime";function tt({className:e,classNames:t,showOutsideDays:a=!0,...o}){return be(At,{showOutsideDays:a,className:_("p-3",e),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:_(_e({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:_("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",o.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:_(_e({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",...t},components:{IconLeft:r(({className:l,...d})=>be(Bt,{className:_("size-4",l),...d}),"IconLeft"),IconRight:r(({className:l,...d})=>be(Ot,{className:_("size-4",l),...d}),"IconRight")},...o})}r(tt,"Calendar");import*as A from"@radix-ui/react-popover";import{jsx as le}from"react/jsx-runtime";function ie({...e}){return le(A.Root,{"data-slot":"popover",...e})}r(ie,"Popover");function me({...e}){return le(A.Trigger,{"data-slot":"popover-trigger",...e})}r(me,"PopoverTrigger");function de({className:e,align:t="center",sideOffset:a=4,...o}){return le(A.Portal,{children:le(A.Content,{"data-slot":"popover-content",align:t,sideOffset:a,className:_("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}r(de,"PopoverContent");import{format as ot}from"date-fns";import{Fragment as zt,jsx as E,jsxs as Se}from"react/jsx-runtime";function rt({description:e,label:t,name:a,minDate:o,onChange:l,component:d,...c}){let{components:F}=b(),{control:f}=x(),i;return c.meta?.mot&&typeof c.meta.mot=="number"?i=Oe(c.meta.mot):o&&(i=new Date(o)),E(k,{control:f,name:a,render:({field:n,fieldState:u})=>{let m=d||F?.date;if(m){let s={description:e,label:t,name:a,onChange:l,...i&&{minDate:i.toISOString()},...c};return E(m,{field:{...n,onChange:r(g=>{n.onChange(g),l?.(g)},"onChange")},fieldState:u,fieldData:s})}return Se(w,{"data-field":a,className:`flex flex-col RemoteFlows__DatePickerField__Item__${a}`,children:[E(N,{className:"RemoteFlows__DatePickerField__Label",children:t}),Se(ie,{children:[E(me,{asChild:!0,children:E(P,{children:E("div",{children:Se($,{type:"button",variant:"outline",className:_("w-full pl-3 text-left font-normal",!n.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${a}`,children:[n.value&&E(zt,{children:ot(n.value,"yyyy-MM-dd")}),E(Ut,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),E(de,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:E(tt,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:n.value?new Date(n.value):void 0,onSelect:s=>{n.onChange(s?ot(s,"yyyy-MM-dd"):null),l?.(s)},defaultMonth:i,components:{DayContent:r(s=>E(Vt,{children:s.date.getDate()}),"DayContent")},...i&&{disabled:r(s=>s<i,"disabled")}})})]}),e?E(R,{children:e}):null,u.error&&E(D,{className:"RemoteFlows__DatePickerField__Error"})]})}})}r(rt,"DatePickerField");import{useState as Gt,useRef as Jt}from"react";import{Upload as qt,X as Kt}from"lucide-react";import{jsx as U,jsxs as ke}from"react/jsx-runtime";function at({onChange:e,className:t,multiple:a}){let[o,l]=Gt([]),d=Jt(null),c=r(i=>{i.preventDefault(),d.current?.click()},"handleClick"),F=r(i=>{if(i.target.files&&i.target.files.length>0){let n=Array.from(i.target.files);l(n),e(i)}},"handleChange"),f=r(i=>{l(n=>n.filter(u=>u!==i))},"onRemoveFile");return ke("div",{className:_("flex flex-col items-start gap-4",t),children:[U("input",{type:"file",ref:d,onChange:F,className:"hidden","aria-label":"File upload",multiple:a}),ke($,{type:"button",onClick:c,className:"gap-2",children:[U(qt,{className:"h-4 w-4"}),"Choose File"]}),o.length===0&&U("div",{className:"text-sm",children:a?U("span",{className:"font-medium",children:"No files selected. You can select multiple files"}):U("span",{className:"font-medium",children:"No file selected."})}),o.length>0&&o.map((i,n)=>ke("div",{className:"text-sm flex items-center gap-2",children:["Selected file: ",U("span",{className:"font-medium",children:i.name})," (",Math.round(i.size/1024)," KB)",U($,{variant:"ghost",onClick:()=>f(i),children:U(Kt,{})})]},n))]})}r(at,"FileUploader");import{jsx as V,jsxs as jt}from"react/jsx-runtime";var Yt=r(e=>new Promise((t,a)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>t(o.result),o.onerror=l=>a(l)}),"toBase64"),nt=r(async e=>{let t=e.target.files?Array.from(e.target.files):[];return await Promise.all(t.map(async o=>{let l=await Yt(o);return{name:o.name,content:l.split(",")[1]}}))},"convertFilesToBase64");function st({name:e,description:t,label:a,multiple:o,onChange:l,component:d,...c}){let{components:F}=b(),{control:f}=x();return V(k,{control:f,name:e,render:({field:i,fieldState:n})=>{let u=d||F?.file;if(u){let m={name:e,description:t,label:a,multiple:o,...c};return V(u,{field:{...i,value:null,onChange:r(async s=>{let g=await nt(s);i.onChange(g),l?.(g)},"onChange")},fieldState:n,fieldData:m})}return jt(w,{"data-field":e,className:`RemoteFlows__FileUpload__Item__${e}`,children:[V(N,{className:"RemoteFlows__FileUpload__Label",children:a}),V(P,{children:V(at,{onChange:async m=>{let s=await nt(m);i.onChange(s),l?.(s)},multiple:o,className:_("RemoteFlows__FileUpload__Input")})}),t&&V("div",{className:"flex items-center justify-between",children:V(R,{className:"RemoteFlows__FileUpload__Description",children:t})}),n.error&&V(D,{className:"RemoteFlows__FileUpload__Error"})]})}})}r(st,"FileUploadField");import{jsx as Ne}from"react/jsx-runtime";function ce(e){let{components:t}=b(),{control:a}=x(),o=e.component||t?.number;return o?Ne(k,{control:a,name:e.name,render:({field:l,fieldState:d})=>Ne(o,{field:{...l,onChange:r(c=>{l.onChange(c),e.onChange?.(c)},"onChange")},fieldState:d,fieldData:e})}):Ne(B,{...e,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$"})}r(ce,"NumberField");import{Fragment as Xt}from"react";import{jsx as W,jsxs as we}from"react/jsx-runtime";function lt({name:e,defaultValue:t,description:a,label:o,options:l,onChange:d,component:c,...F}){let{components:f}=b(),{control:i}=x();return W(k,{control:i,name:e,defaultValue:t,render:({field:n,fieldState:u})=>{let m=c||f?.radio;if(m){let s={name:e,defaultValue:t,description:a,label:o,options:l,...F};return W(m,{field:{...n,onChange:r(g=>{n.onChange(g),d?.(g)},"onChange")},fieldState:u,fieldData:s})}return we(w,{className:_("space-y-3",`RemoteFlows__RadioGroupField__Item__${e}`),"data-field":e,children:[W(N,{children:o}),W(P,{children:W(Ue,{"aria-label":o||e,onValueChange:s=>{n.onChange(s),d?.(s)},value:n.value,className:"flex flex-col space-y-3",children:l?.map(s=>W(Xt,{children:we(w,{"data-field":e,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[W(P,{children:W(Ve,{value:s.value,className:"RemoteFlows__RadioField__Input",disabled:s.disabled})}),we("div",{children:[W(N,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:s.label}),s.description&&W(R,{className:"mt-2",children:s.description})]})]})},s.value))})}),a&&W(R,{children:a}),u.error&&W(D,{})]})}})}r(lt,"RadioGroupField");import{jsx as M,jsxs as it}from"react/jsx-runtime";function mt({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,component:c,...F}){let{control:f}=x(),{components:i}=b();return M(k,{defaultValue:o,control:f,name:t,render:({field:n,fieldState:u})=>{let m=c||i?.select;if(m){let s={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,...F};return M(m,{field:{...n,onChange:r(g=>{let p=F.jsonType==="number"?Number(g):g;n.onChange(p),d?.(p)},"onChange")},fieldState:u,fieldData:s})}return it(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[M(N,{className:"RemoteFlows__SelectField__Label",children:e}),M(P,{children:M("div",{className:"relative",children:it(ze,{value:n.value||"",onValueChange:s=>{let g=F.jsonType==="number"?Number(s):s;n.onChange(g),d?.(g)},children:[M(qe,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!u.error,"aria-label":e,children:M("span",{className:"absolute",children:M(Je,{placeholder:e})})}),M(Ke,{className:"RemoteFlows__SelectField__Content",children:M(Ge,{className:"RemoteFlows__SelectField__Group",children:a.map(s=>M(Ye,{value:s.value,className:"RemoteFlows__SelectField__SelectItem",disabled:s.disabled,children:s.label},s.value))})})]})})}),l&&M(R,{children:l}),u.error&&M(D,{})]})}})}r(mt,"SelectField");import{useState as ro}from"react";import{Fragment as Qt,useState as Zt}from"react";import{Check as eo,ChevronDownIcon as to,X as oo}from"lucide-react";import{Command as Y}from"cmdk";import{SearchIcon as jr}from"lucide-react";import{jsx as j,jsxs as ea}from"react/jsx-runtime";function dt({className:e,...t}){return j(Y,{"data-slot":"command",className:_("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}r(dt,"Command");function ct({className:e,...t}){return j(Y.List,{"data-slot":"command-list",className:_("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}r(ct,"CommandList");function ut({...e}){return j(Y.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}r(ut,"CommandEmpty");function pt({className:e,...t}){return j(Y.Group,{"data-slot":"command-group",className:_("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}r(pt,"CommandGroup");function ft({className:e,...t}){return j(Y.Separator,{"data-slot":"command-separator",className:_("bg-border -mx-1 h-px",e),...t})}r(ft,"CommandSeparator");function Ft({className:e,...t}){return j(Y.Item,{"data-slot":"command-item",className:_("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}r(Ft,"CommandItem");import{jsx as L,jsxs as X}from"react/jsx-runtime";function ue({options:e,selected:t,onChange:a,placeholder:o,...l}){let[d,c]=Zt(!1),F=r(n=>{a(t.filter(u=>u.value!==n.value))},"handleUnselect"),f=e.some(n=>n.category),i=e.reduce((n,u)=>{let m=u.category||"Uncategorized";return n[m]||(n[m]=[]),n[m].push(u),n},{});return X(ie,{open:d,onOpenChange:c,...l,children:[L(me,{children:X($,{variant:"outline",role:"combobox","aria-expanded":d,className:"w-full justify-between font-normal",type:"button",children:[L("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center",children:t.length>0?t.map(n=>X(je,{variant:"secondary",className:"mr-1 mb-1",children:[n.label,L("div",{role:"button",tabIndex:0,"aria-label":`remove ${n.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:u=>{u.key==="Enter"&&F(n)},onMouseDown:u=>{u.preventDefault(),u.stopPropagation()},onClick:()=>F(n),children:L(oo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},n.label)):L("span",{className:"text-foreground",children:o})}),L(to,{className:"size-4"})]})}),L(de,{align:"start",className:"w-full p-0",children:L(dt,{children:X(ct,{children:[L(ut,{children:"No item found."}),Object.entries(i).map(([n,u],m)=>X(Qt,{children:[m>0&&L(ft,{}),L(pt,{heading:f?n:void 0,children:u.map(s=>{let g=t.some(p=>p.value===s.value);return X(Ft,{onSelect:()=>{a(g?t.filter(p=>p.value!==s.value):[...t,s])},children:[L(eo,{className:_("mr-2 h-4 w-4",g?"opacity-100":"opacity-0")}),s.label]},s.label)})})]},n))]})})})]})}r(ue,"MultiSelect");import{jsx as J,jsxs as ao}from"react/jsx-runtime";function gt({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,$meta:c,component:F,...f}){let{control:i}=x(),{components:n}=b(),[u,m]=ro([]);return J(k,{defaultValue:o,control:i,name:t,render:({field:s,fieldState:g})=>{let p=F||n?.countries;if(p){let C={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,$meta:c,...f};return J(p,{field:{...s,onChange:r(T=>{s.onChange(T),d?.(T)},"onChange")},fieldState:g,fieldData:C})}let h=[...Object.entries(c?.regions||{}).map(([C,T])=>({value:T,label:C,category:"Regions"})),...Object.entries(c?.subregions||{}).map(([C,T])=>({value:T,label:C,category:"Subregions"})),...a.map(C=>({...C,value:C.value,label:C.label,category:"Countries"}))],S=r(C=>{let T=C.map(({value:G})=>G);s.onChange(T),d?.(T),m(C)},"handleChange");return ao(w,{"data-field":t,className:`RemoteFlows__CountryField__Item__${t}`,children:[J(N,{className:"RemoteFlows__CountryField__Label",children:e}),J(P,{children:J(ue,{options:h,selected:u,onChange:S,...f})}),l&&J(R,{children:l}),g.error&&J(D,{})]})}})}r(gt,"CountryField");import*as ht from"react";import{jsx as no}from"react/jsx-runtime";var Pe=ht.forwardRef(({className:e,...t},a)=>no("textarea",{className:_("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...t}));Pe.displayName="Textarea";import{jsx as q,jsxs as Re}from"react/jsx-runtime";function _t({name:e,description:t,label:a,onChange:o,maxLength:l,component:d,...c}){let{components:F}=b(),{control:f}=x();return q(k,{control:f,name:e,render:({field:i,fieldState:n})=>{let u=d||F?.textarea;if(u){let s={name:e,description:t,label:a,maxLength:l,...c};return q(u,{field:{...i,onChange:r(g=>{i.onChange(g),o?.(g)},"onChange")},fieldState:n,fieldData:s})}let m=i.value?.length??0;return Re(w,{"data-field":e,className:`RemoteFlows__TextArea__Item__${e}`,children:[q(N,{className:"RemoteFlows__TextArea__Label",children:a}),q(P,{children:q(Pe,{...i,value:i.value??"",onChange:s=>{i.onChange(s),o?.(s)},className:_(n.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:a})}),(t||l)&&Re("div",{className:"flex items-center justify-between",children:[t&&q(R,{className:"RemoteFlows__TextArea__Description",children:t}),l&&Re("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[m,"/",l]})]}),n.error&&q(D,{className:"RemoteFlows__TextArea__Error"})]})}})}r(_t,"TextAreaField");import{jsx as De}from"react/jsx-runtime";function yt(e){let{components:t}=b(),{control:a}=x(),o=e.component||t?.email;return o?De(k,{control:a,name:e.name,render:({field:l,fieldState:d})=>De(o,{field:{...l,onChange:r(c=>{l.onChange(c),e.onChange?.(c)},"onChange")},fieldState:d,fieldData:e})}):De(B,{...e,type:"email"})}r(yt,"EmailField");import{jsx as vt}from"react/jsx-runtime";function Ct(e){let{control:t}=x();return vt(k,{control:t,name:e.name,render:({field:a})=>vt("input",{...a,type:"hidden"})})}r(Ct,"HiddenField");import po,{useEffect as fo,useState as Dt}from"react";var xt=r((e,t,a)=>{if(e&&"reportValidity"in e){let o=re(a,t);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},"r"),Te=r((e,t)=>{for(let a in t.fields){let o=t.fields[a];o&&o.ref&&"reportValidity"in o.ref?xt(o.ref,a,e):o&&o.refs&&o.refs.forEach(l=>xt(l,a,e))}},"o"),St=r((e,t)=>{t.shouldUseNativeValidation&&Te(e,t);let a={};for(let o in e){let l=re(t.fields,o),d=Object.assign(e[o]||{},{ref:l&&l.ref});if(so(t.names||Object.keys(e),o)){let c=Object.assign({},re(a,o));ae(c,"root",d),ae(a,o,c)}else ae(a,o,d)}return a},"s"),so=r((e,t)=>{let a=bt(t);return e.some(o=>bt(o).match(`^${a}\\.\\d+`))},"i");function bt(e){return e.replace(/\]|\[/g,"")}r(bt,"n");function kt(e,t,a){return t===void 0&&(t={}),a===void 0&&(a={}),function(o,l,d){try{return Promise.resolve(function(c,F){try{var f=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[a.mode==="sync"?"validateSync":"validate"](o,Object.assign({abortEarly:!1},t,{context:l}))).then(function(i){return d.shouldUseNativeValidation&&Te({},d),{values:a.raw?Object.assign({},o):i,errors:{}}}))}catch(i){return F(i)}return f&&f.then?f.then(void 0,F):f}(0,function(c){if(!c.inner)throw c;return{values:{},errors:St((F=c,f=!d.shouldUseNativeValidation&&d.criteriaMode==="all",(F.inner||[]).reduce(function(i,n){if(i[n.path]||(i[n.path]={message:n.message,type:n.type}),f){var u=i[n.path].types,m=u&&u[n.type];i[n.path]=Le(n.path,f,i,n.type,m?[].concat(m,n.message):n.message)}return i},{})),d)};var F,f}))}catch(c){return Promise.reject(c)}}}r(kt,"o");import*as I from"yup";import Nt from"lodash.groupby";import Q from"lodash.capitalize";var wt=60,pe=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function lo(e){if(e<60)return`${e}m`;let t=Math.floor(e/wt),a=e%wt;return a>0?`${t}h${a}m`:`${t}h`}r(lo,"convertBreakDurationToHours");function Pt(e){let t=e.reduce((a,o)=>o.hours+a,0);return Number(t.toFixed(2))}r(Pt,"calculateTotalWorkHours");function io(e,t){let a=t.map(({day:d})=>d.toLowerCase()),o=a.indexOf(e),l=null;for(;o<a.length&&!l;){let d=a[o],c=a[o+1],F=pe.indexOf(d)+1;pe[F]===c||(l=d),o+=1}return l}r(io,"findLastConsecutiveDay");function mo(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}r(mo,"shouldSummarizeSchedule");function co(e){return Number.parseInt(e.break_duration_minutes)>0}r(co,"shouldSummarizeBreaks");function Rt(e){let t=e.filter(mo),a=Nt(t,F=>`${F.start_time}|${F.end_time}`),o=e.filter(co),l=Nt(o,"break_duration_minutes"),d=Object.keys(a).map(F=>{let f=a[F],i=f[0].day,[n,u]=F.split("|"),m=`from <span>${n.replace(":","h")}</span> to <span>${u.replace(":","h")}</span>`,s=io(i,f),p=(s?f.findIndex(h=>h.day===s):-1)===f.length-1;return f.length===1?`${Q(i)}, ${m}`:!p||!s?f.reduce((h,S,C)=>{let T=Q(S.day);return C===f.length-1?`${h}and ${T}, ${m}`:`${h}<span>${T}</span>, `},""):`<span>${Q(i)}</span> to <span>${Q(s)}</span>, ${m}`}),c=Object.keys(l).reverse().map((F,f)=>{let i=f===0,n=l[F],u=lo(parseInt(F,10));if(Object.keys(l).length===1)return`With ${u} daily breaks`;if(n.length===1){let m=`${u} break on ${Q(n[0].day)}.`;return i?`With ${m}`:m}return n.reduce((m,s,g)=>{let p=Q(s.day);return g===0?`${m} ${p}`:g===n.length-1?`${m}, and ${p}.`:`${m}, ${p}`},i?`With ${u} break on`:`${u} break on`)});return{workHoursSummary:d,breakSummary:c}}r(Rt,"buildWorkScheduleSummary");function Ie(e){let{checked:t,start_time:a,end_time:o,break_duration_minutes:l}=e;if(!t)return 0;let[d,c]=a.split(":").map(Number),[F,f]=o.split(":").map(Number),i=d*60+c,m=(F*60+f-i-Number.parseInt(l||"0"))/60;return m===Math.floor(m)?m:Number(m.toFixed(2))}r(Ie,"calculateHours");var uo={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function fe(e){return uo[e]}r(fe,"getShortWeekday");import{jsx as y,jsxs as H}from"react/jsx-runtime";var Fo=I.object({day:I.string().required(),checked:I.boolean().required(),start_time:I.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:r(e=>e.required("Required"),"then"),otherwise:r(e=>e.optional().nullable(),"otherwise")}),end_time:I.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:r(e=>e.required("Required"),"then"),otherwise:r(e=>e.optional().nullable(),"otherwise")}),hours:I.number().default(0),break_duration_minutes:I.string().default("0")}),go=I.object({schedule:I.array(Fo)});function ho({defaultSchedule:e,onSubmit:t}){let[a,o]=Dt(!1),l=pe.map(p=>{let h=e.find(S=>S.day.toLowerCase()===fe(p).toLowerCase()||S.day.toLowerCase()===p.toLowerCase());return h?{...h,day:fe(p),checked:!0}:{...e[0],checked:!1,day:fe(p)}}),d=Be({defaultValues:{schedule:l},resolver:kt(go)}),{handleSubmit:c,watch:F,reset:f,control:i,formState:n}=d,{fields:u}=He({name:"schedule",control:i}),m=F("schedule");function s(p){let h=p.schedule.filter(({checked:S})=>S).map(S=>({...S,hours:Ie(S)}));t(h),o(!1)}r(s,"handleSubmitWorkingHours");function g(){f(),o(!1)}return r(g,"handleCancel"),y("div",{className:"flex items-center justify-between",children:H(ye,{open:a,onOpenChange:o,children:[y(Xe,{asChild:!0,children:y($,{variant:"link",className:"flex items-center p-0 RemoteFlows__WorkScheduleSelectionForm__Trigger",children:"Edit Schedule"})}),H(ve,{className:"max-w-5xl max-h-[90vh] overflow-y-auto px-8 py-4 RemoteFlows__WorkScheduleSelectionForm__Content",children:[y(Ce,{children:y(xe,{className:"RemoteFlows__WorkScheduleSelectionForm__Title",children:"Edit employee working hours"})}),y(Ae,{...d,children:H("form",{className:"space-y-4 RemoteFlows__WorkScheduleSelectionForm__Form",children:[H("div",{className:"rounded-lg",children:[y("p",{className:"text-gray-600 text-sm mb-4 RemoteFlows__WorkScheduleSelectionForm__Description",children:"The times displayed are in the employee's time zone in the 24-hour format."}),H("div",{className:"grid grid-cols-12 gap-4 text-sm font-medium text-gray-500 uppercase tracking-wide RemoteFlows__WorkScheduleSelectionForm__Header",children:[y("div",{className:"col-span-2"}),y("div",{className:"col-span-3 text-center",children:"START"}),y("div",{className:"col-span-1 text-center"}),y("div",{className:"col-span-3 text-center",children:"END"}),y("div",{className:"col-span-2 text-center",children:"HOURS"})]}),y("div",{className:"RemoteFlows__WorkScheduleSelectionForm__Rows",children:u.map((p,h)=>{let S=m[h],C=Ie(S);return H(po.Fragment,{children:[H("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Hours",children:[y("div",{className:"col-span-2 flex items-center gap-3",children:y(se,{label:p.day,name:`schedule.${h}.checked`})}),y("div",{className:"col-span-3",children:y(B,{name:`schedule.${h}.start_time`,includeErrorMessage:!1})}),y("div",{className:"col-span-1 text-center text-gray-500",children:"to"}),y("div",{className:"col-span-3",children:y(B,{name:`schedule.${h}.end_time`,includeErrorMessage:!1})}),y("div",{className:"col-span-2 text-center text-gray-600",children:isNaN(C)?"-":`${C} hours`})]}),H("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Break",children:[y("div",{className:"col-span-2 text-gray-500",children:"Break"}),y("div",{className:"col-span-2",children:y(B,{name:`schedule.${h}.break_duration_minutes`,includeErrorMessage:!1})}),y("div",{className:"col-span-2 text-gray-500",children:"minutes"}),y("div",{className:"col-span-4"})]})]},p.id)})})]}),Object.keys(n.errors).length>0&&y("p",{className:"text-destructive text-sm mb-0",children:"Invalid time format (HH:mm)"}),H("div",{className:"flex gap-4 pt-4",children:[y($,{type:"button",className:"reset-button",variant:"outline",onClick:g,children:"Cancel"}),y($,{type:"button",className:"submit-button",onClick:c(s),children:"Save Schedule"})]})]})})]})]})})}r(ho,"WorkScheduleSelectionForm");function Tt(e){let{components:t}=b(),{setValue:a,control:o,watch:l}=x(),d=l(e.name),[c,F]=Dt(d),{workHoursSummary:f,breakSummary:i}=Rt(c),n=Pt(c);fo(()=>{a(e.name,c)},[c,e.name,a]);function u(s){F(s)}r(u,"onSubmit");let m=e.component||t?.["work-schedule"];return m?y(k,{control:o,name:e.name,render:({field:s,fieldState:g})=>y(m,{field:{...s,onChange:r(p=>{s.onChange(p),e.onChange?.(p)},"onChange")},fieldState:g,fieldData:{...e,defaultFormattedValue:{workHoursSummary:f,breakSummary:i,totalWorkHours:n}}})}):H("div",{className:"flex flex-col gap-3 RemoteFlows__WorkScheduleField",children:[y("p",{className:"text-sm RemoteFlows__WorkScheduleField__Title",children:"Work hours"}),H("div",{className:"flex flex-col gap-1 RemoteFlows__WorkScheduleField__Summary",children:[y("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__WorkHours",dangerouslySetInnerHTML:{__html:f.join(", ")}}),y("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Break",children:i.join()}),H("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Total",children:["Total of ",y("span",{children:n})," hours per week"]}),y(ho,{defaultSchedule:c,onSubmit:u})]})]})}r(Tt,"WorkScheduleField");import{useState as _o}from"react";import{jsx as K,jsxs as yo}from"react/jsx-runtime";function It({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,component:c,...F}){let{control:f}=x(),{components:i}=b(),[n,u]=_o();return K(k,{defaultValue:o,control:f,name:t,render:({field:m,fieldState:s})=>{let g=c||i?.["multi-select"];if(g){let h={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,...F};return K(g,{field:{...m,onChange:r(S=>{m.onChange(S),d?.(S)},"onChange")},fieldState:s,fieldData:h})}let p=n||a.filter(h=>m.value.includes(h.value));return yo(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[K(N,{className:"RemoteFlows__SelectField__Label",children:e}),K(P,{children:K(ue,{options:a,selected:p,onChange:h=>{let S=h.map(({value:C})=>C);m.onChange(S),d?.(S),u(h)},...F})}),l&&K(R,{children:l}),s.error&&K(D,{})]})}})}r(It,"MultiSelectField");import{jsx as vo}from"react/jsx-runtime";var $t=r(e=>vo(ce,{maxLength:15,...e}),"MoneyField");var $e={checkbox:se,text:B,email:yt,money:$t,select:mt,"multi-select":It,radio:lt,number:ce,file:st,date:rt,textarea:_t,countries:gt,hidden:Ct,"work-schedule":Tt};import{AlertCircle as Co}from"lucide-react";import{jsx as Fe,jsxs as xo}from"react/jsx-runtime";function Et({title:e,description:t,severity:a}){let{components:o}=b();if(o?.statement){let l=o?.statement;return Fe(l,{data:{title:e,description:ee(t),severity:a}})}return xo(Qe,{variant:"warning",children:[Fe(Co,{className:"h-4 w-4"}),e&&Fe(Ze,{children:e}),t&&Fe(et,{dangerouslySetInnerHTML:{__html:ee(t)}})]})}r(Et,"Statement");import{Fragment as bo,useEffect as So,useRef as Mt}from"react";import{jsx as z,jsxs as te}from"react/jsx-runtime";var ko=r(({isExpanded:e,onToggle:t,className:a,...o})=>z($,{type:"button",className:_("RemoteFlows__Button RemoteFlows__FieldSetField__ToggleButton",a),variant:"default",onClick:t,...o,children:e?"Remove":"Define"}),"DefaultToggleButton");function ss({label:e,name:t,fields:a,description:o,components:l,statement:d,isFlatFieldset:c,extra:F,variant:f="outset",features:i}){let{watch:n,setValue:u,trigger:m,formState:s}=x(),{components:g}=b(),p=i?.toggle?.stateField,h=p?n(p):i?.toggle?.defaultExpanded??!0,S=a.map(({name:v})=>`${t}.${v}`),C=n(S),T=Mt(C),G=Mt(null),Wt=r(()=>{p&&u(p,!h)},"toggleExpanded");So(()=>{let v=C,oe=T.current,ge=s.isSubmitted||s.submitCount>0,We=!1;for(let Z=0;Z<v.length;Z++)if(v[Z]!==void 0&&oe[Z]!==v[Z]){We=!0;break}return We&&ge&&(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{m()},50)),T.current=[...v],()=>{G.current&&clearTimeout(G.current)}},[C,m,s.isSubmitted,s.submitCount]);let Lt=g?.fieldsetToggle||ko,Ee=`${t}-content`,Me=`${t}-header`;return te("fieldset",{className:_("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${t}`),children:[z("legend",{className:_("text-sm font-semibold px-2",f==="inset"&&"hidden"),children:e}),f==="inset"&&te("div",{className:"RemoteFlows__FieldSetField__Header",id:Me,"data-state":h?"expanded":"collapsed","aria-expanded":h,children:[z("h3",{className:_("RemoteFlows__FieldSetField__Title"),children:e}),i?.toggle?.enabled&&z(Lt,{isExpanded:h,onToggle:Wt,"aria-expanded":h,"aria-controls":Ee,"aria-label":`${h?"Hide":"Show"} ${e}`,className:_("RemoteFlows__FieldSetField__Toggle",i.toggle?.className),children:h?i.toggle.labels?.collapse??"Remove":i.toggle.labels?.expand??"Define"})]}),h&&te("div",{id:Ee,"aria-labelledby":Me,role:"region",children:[o?z("div",{className:"mb-5 RemoteFlows__FieldSetField__Description",dangerouslySetInnerHTML:{__html:ee(o)}}):null,te("div",{className:"grid gap-4",children:[a.map(v=>{v.calculateDynamicProperties&&(v={...v,...v.calculateDynamicProperties(C,v)||{}});let oe=$e[v.type];if(v.isVisible===!1||v.deprecated)return null;if(v.Component){let{Component:ge}=v;return z(ge,{...v},v.name)}return v.type==="select"&&v.multiple&&(oe=$e["multi-select"]),te(bo,{children:[z(oe,{...v,name:`${c?v.name:`${t}.${v.name}`}`,component:l?.[v.type]}),v.extra?v.extra:null]},`${c?v.name:`${t}.${v.name}`}`)}),F||null,d?z(Et,{...d}):null]})]})]})}r(ss,"FieldSetField");export{$e as a,Et as b,ss as c};
2
+ //# sourceMappingURL=chunk-OUO2RTM4.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import*as o from"@radix-ui/react-label";import{jsx as r}from"react/jsx-runtime";function l({className:a,...i}){return r(o.Root,{"data-slot":"label",className:t("flex items-center gap-2 text-sm leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",a),...i})}e(l,"Label");export{l as a};
2
- //# sourceMappingURL=chunk-XVW2URFK.js.map
1
+ import{a as t}from"./chunk-HC56JKI2.js";import{a as e}from"./chunk-P37U34EQ.js";import*as o from"@radix-ui/react-label";import{jsx as r}from"react/jsx-runtime";function l({className:a,...i}){return r(o.Root,{"data-slot":"label",className:t("flex items-center gap-2 text-sm leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",a),...i})}e(l,"Label");export{l as a};
2
+ //# sourceMappingURL=chunk-PAZGF4C3.js.map
@@ -1,2 +1,2 @@
1
- import{a as R,b as x,c as N,d as A}from"./chunk-CWEPL5J3.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as f}from"./chunk-32GSS4UM.js";import{a as C}from"./chunk-ASKKS4Z3.js";import{a as w}from"./chunk-TGU24WSW.js";import{b as B}from"./chunk-2QGDCMCE.js";import{a as i,b as n,e as F}from"./chunk-54KJP7WD.js";import{a as d}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:l,"data-testid":a}){let[_,m]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":a,variant:"ghost","aria-label":l,className:"h-8 w-8 p-0",onClick:()=>m(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>m(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${a}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),m(!1)},disabled:c.disabled,children:c.label},u))})]})]})}d(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=d(({title:e,country:r,region:l,annualGrossSalary:a,onDelete:_,onExportPdf:m,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:m},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",l?` (${l.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",a]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=d(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:f.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",l),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(a=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:a.title})," ","- ",a.description]},a.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(w,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}d(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:l,country:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",a.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[l&&o("a",{href:l,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}d(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}d(J,"EstimationHeaders");function I({label:e,amounts:r,className:l,children:a}){let[_,m]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",l),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>m(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&a&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:a})]})}d(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:l=0}){let[a,_]=O(!1),m=e.children&&e.children.length>0,c=l>0,u=e.isCollapsible||m;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!a),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(w,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),m&&a&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:l+1})})]})}d(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:l,level:a}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",l),children:e.map((_,m)=>o(Q,{item:_,isMultipleCurrency:r,level:a},m))})}d(k,"BreakdownList");var pe=d(({estimation:e,title:r,components:l,onDelete:a,onExportPdf:_,onEdit:m})=>{let c=l?.HiringSection||q,u=l?.OnboardingTimeline||Y,z=l?.Header||K,h=l?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:a,onExportPdf:_,onEdit:m})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.symbol),zendeskId:f.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.symbol)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
2
- //# sourceMappingURL=chunk-33L3KAS5.js.map
1
+ import{a as R,b as x,c as N,d as A}from"./chunk-AXES4NFY.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as f}from"./chunk-32GSS4UM.js";import{a as C}from"./chunk-AKHJDD35.js";import{a as w}from"./chunk-HH4YP6QX.js";import{b as B}from"./chunk-4NLAHGUV.js";import{a as i,b as n,e as F}from"./chunk-HC56JKI2.js";import{a as d}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:l,"data-testid":a}){let[_,m]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":a,variant:"ghost","aria-label":l,className:"h-8 w-8 p-0",onClick:()=>m(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>m(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${a}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),m(!1)},disabled:c.disabled,children:c.label},u))})]})]})}d(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=d(({title:e,country:r,region:l,annualGrossSalary:a,onDelete:_,onExportPdf:m,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:m},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",l?` (${l.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",a]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=d(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:f.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",l),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(a=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:a.title})," ","- ",a.description]},a.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(w,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}d(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:l,country:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",a.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[l&&o("a",{href:l,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}d(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}d(J,"EstimationHeaders");function I({label:e,amounts:r,className:l,children:a}){let[_,m]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",l),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>m(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&a&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:a})]})}d(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:l=0}){let[a,_]=O(!1),m=e.children&&e.children.length>0,c=l>0,u=e.isCollapsible||m;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!a),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(w,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),m&&a&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:l+1})})]})}d(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:l,level:a}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",l),children:e.map((_,m)=>o(Q,{item:_,isMultipleCurrency:r,level:a},m))})}d(k,"BreakdownList");var pe=d(({estimation:e,title:r,components:l,onDelete:a,onExportPdf:_,onEdit:m})=>{let c=l?.HiringSection||q,u=l?.OnboardingTimeline||Y,z=l?.Header||K,h=l?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:a,onExportPdf:_,onEdit:m})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.symbol),zendeskId:f.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.symbol)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
2
+ //# sourceMappingURL=chunk-PTACLZHT.js.map
@@ -1,2 +1,2 @@
1
- import{b as r}from"./chunk-54KJP7WD.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as t,jsxs as e}from"react/jsx-runtime";function n({totalCost:a,currency:s}){return t("div",{className:"pt-2 mt-4 border-t-2 border-gray-200",children:e("div",{className:"flex justify-between items-center",children:[t("h3",{className:"font-bold text-primary-foreground-800",children:"Total Cost"}),t("span",{className:"font-bold text-xl",children:r(a,s)})]})})}o(n,"CostCalculatorTotalCost");export{n as a};
2
- //# sourceMappingURL=chunk-3PCSFTM3.js.map
1
+ import{b as r}from"./chunk-HC56JKI2.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as t,jsxs as e}from"react/jsx-runtime";function n({totalCost:a,currency:s}){return t("div",{className:"pt-2 mt-4 border-t-2 border-gray-200",children:e("div",{className:"flex justify-between items-center",children:[t("h3",{className:"font-bold text-primary-foreground-800",children:"Total Cost"}),t("span",{className:"font-bold text-xl",children:r(a,s)})]})})}o(n,"CostCalculatorTotalCost");export{n as a};
2
+ //# sourceMappingURL=chunk-QBEJBOGL.js.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-ZE3YT3Q6.js";import{a as p}from"./chunk-QFZ3XVDT.js";import{a as i}from"./chunk-TGU24WSW.js";import{b as m}from"./chunk-2QGDCMCE.js";import{b as a}from"./chunk-54KJP7WD.js";import{a as o}from"./chunk-P37U34EQ.js";import{Info as f}from"lucide-react";import{Fragment as d,jsx as e,jsxs as s}from"react/jsx-runtime";function B({contributionsTotal:u,currency:n,contributionsBreakdown:r}){return s("div",{children:[s("div",{className:"flex justify-between items-center mb-2",children:[e("h3",{className:"font-medium text-primary-foreground",children:"Employer Contributions"}),e("span",{className:"font-semibold text-lg",children:a(u,n)})]}),r?s(d,{children:[e(p,{className:"mb-3"}),e("div",{className:"space-y-3 pl-2",children:r.map((t,c)=>s("div",{className:"flex justify-between items-start text-sm",children:[s("div",{className:"flex items-start gap-2",children:[e("span",{children:t.name}),t.description&&e(l,{content:s(d,{children:[e("span",{children:t.description})," ",t.zendesk_article_url&&e(i,{zendeskId:Number(t.zendesk_article_id),children:"Learn more"})]}),children:s(m,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[e(f,{className:"h-3 w-3 text-gray-400"}),e("span",{className:"sr-only",children:"Info"})]})})]}),e("span",{children:a(t.amount,n)})]},c))})]}):null]})}o(B,"CostCalculatorContributionsBreakdown");export{B as a};
2
- //# sourceMappingURL=chunk-BRENSYKE.js.map
1
+ import{a as l}from"./chunk-ZE3YT3Q6.js";import{a as p}from"./chunk-3T43ERBA.js";import{a as i}from"./chunk-HH4YP6QX.js";import{b as m}from"./chunk-4NLAHGUV.js";import{b as a}from"./chunk-HC56JKI2.js";import{a as o}from"./chunk-P37U34EQ.js";import{Info as f}from"lucide-react";import{Fragment as d,jsx as e,jsxs as s}from"react/jsx-runtime";function B({contributionsTotal:u,currency:n,contributionsBreakdown:r}){return s("div",{children:[s("div",{className:"flex justify-between items-center mb-2",children:[e("h3",{className:"font-medium text-primary-foreground",children:"Employer Contributions"}),e("span",{className:"font-semibold text-lg",children:a(u,n)})]}),r?s(d,{children:[e(p,{className:"mb-3"}),e("div",{className:"space-y-3 pl-2",children:r.map((t,c)=>s("div",{className:"flex justify-between items-start text-sm",children:[s("div",{className:"flex items-start gap-2",children:[e("span",{children:t.name}),t.description&&e(l,{content:s(d,{children:[e("span",{children:t.description})," ",t.zendesk_article_url&&e(i,{zendeskId:Number(t.zendesk_article_id),children:"Learn more"})]}),children:s(m,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[e(f,{className:"h-3 w-3 text-gray-400"}),e("span",{className:"sr-only",children:"Info"})]})})]}),e("span",{children:a(t.amount,n)})]},c))})]}):null]})}o(B,"CostCalculatorContributionsBreakdown");export{B as a};
2
+ //# sourceMappingURL=chunk-QMUSEX2P.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-ZN4VWMV2.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-7YVCTEDW.js.map
1
+ import{a}from"./chunk-IQ2HRDC4.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-RLLBHQWS.js.map
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-TOA3JILU.js";import{b as u}from"./chunk-2QGDCMCE.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function C({children:o,onClick:a,...n}){let{contractorOnboardingBag:{back:m,isEmploymentReadOnly:B}}=s(),{components:d}=i(),r=t(p=>{B||m(),a?.(p)},"onBackHandler"),e=d?.button;return e?c(e,{...n,onClick:r,children:o}):c(u,{...n,onClick:r,children:o})}t(C,"OnboardingBack");export{C as a};
2
- //# sourceMappingURL=chunk-PBXOHZN5.js.map
1
+ import{b as s}from"./chunk-TOA3JILU.js";import{b as u}from"./chunk-4NLAHGUV.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function C({children:o,onClick:a,...n}){let{contractorOnboardingBag:{back:m,isEmploymentReadOnly:B}}=s(),{components:d}=i(),r=t(p=>{B||m(),a?.(p)},"onBackHandler"),e=d?.button;return e?c(e,{...n,onClick:r,children:o}):c(u,{...n,onClick:r,children:o})}t(C,"OnboardingBack");export{C as a};
2
+ //# sourceMappingURL=chunk-RVEQJNZI.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import{Slot as i}from"@radix-ui/react-slot";import{cva as d}from"class-variance-authority";import{jsx as u}from"react/jsx-runtime";var s=d("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-badge text-badge-foreground rounded-full [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground rounded-full [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white rounded-full [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"text-foreground rounded-full [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function g({className:t,variant:a,asChild:o=!1,...n}){return u(o?i:"span",{"data-slot":"badge",className:r(s({variant:a}),t),...n})}e(g,"Badge");export{s as a,g as b};
2
- //# sourceMappingURL=chunk-R2VVXLL7.js.map
1
+ import{a as r}from"./chunk-HC56JKI2.js";import{a as e}from"./chunk-P37U34EQ.js";import{Slot as i}from"@radix-ui/react-slot";import{cva as d}from"class-variance-authority";import{jsx as u}from"react/jsx-runtime";var s=d("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-badge text-badge-foreground rounded-full [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground rounded-full [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white rounded-full [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"text-foreground rounded-full [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function g({className:t,variant:a,asChild:o=!1,...n}){return u(o?i:"span",{"data-slot":"badge",className:r(s({variant:a}),t),...n})}e(g,"Badge");export{s as a,g as b};
2
+ //# sourceMappingURL=chunk-S2AQQVM7.js.map
@@ -1,2 +1,2 @@
1
- import{a as b}from"./chunk-IQRBTXZ4.js";import{b as P}from"./chunk-TOA3JILU.js";import{b as g}from"./chunk-7XRPOR7L.js";import{b as m}from"./chunk-2QGDCMCE.js";import{a}from"./chunk-P37U34EQ.js";import{useState as f,useMemo as S}from"react";import{Document as k,Page as C,pdfjs as x}from"react-pdf";import{jsx as r,jsxs as i}from"react/jsx-runtime";x.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${x.version}/build/pdf.worker.min.mjs`;function N({base64Data:c,fileName:l="document.pdf"}){let[n,t]=f(0),[s,u]=f(1),[p,o]=f(!0),[d,w]=f(""),v=S(()=>{if(!c)return"";let e=c.trim();return e.startsWith("data:application/pdf;base64,")||e.startsWith("data:")?e:`data:application/pdf;base64,${e}`},[c]),h=a(({numPages:e})=>{t(e),o(!1),w("")},"onDocumentLoadSuccess"),y=a(e=>{console.error("Error loading PDF:",e),w("Failed to load PDF document"),o(!1)},"onDocumentLoadError"),E=a(()=>{u(e=>Math.max(1,e-1))},"goToPrevPage"),D=a(()=>{u(e=>Math.min(n,e+1))},"goToNextPage");return v?i("div",{className:"w-full space-y-4",children:[i("div",{children:[i("div",{className:"flex justify-center items-center min-h-[600px] p-4 bg-gray-50",children:[p&&i("div",{className:"text-center",children:[r("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto mb-4"}),r("p",{className:"text-gray-600",children:"Loading PDF..."})]}),d&&i("div",{className:"text-center space-y-4",children:[r("p",{className:"text-red-600",children:d}),r(m,{asChild:!0,children:r("a",{href:v,download:l,children:"Download PDF Instead"})})]}),!d&&r(k,{file:v,onLoadSuccess:h,onLoadError:y,loading:"",className:"flex flex-col items-center",children:r(C,{pageNumber:s,renderTextLayer:!0,renderAnnotationLayer:!0,className:"shadow-lg",width:Math.min(window.innerWidth-100,800)})})]}),n>0&&!d&&r("div",{className:"border-t bg-white px-4 py-3",children:i("div",{className:"flex items-center justify-between",children:[r(m,{onClick:E,disabled:s<=1,variant:"outline",size:"sm",children:"\u2190 Previous"}),i("div",{className:"text-sm text-gray-600",children:["Page ",s," of ",n]}),r(m,{onClick:D,disabled:s>=n,variant:"outline",size:"sm",children:"Next \u2192"})]})})]}),i("div",{className:"flex justify-between items-center text-sm",children:[r("p",{className:"text-gray-600",children:l}),r(m,{variant:"link",size:"link",asChild:!0,children:i("a",{href:v,download:l,className:"flex items-center gap-1",children:[r("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download PDF"]})})]})]}):r("div",{className:"w-full border rounded p-8 text-center bg-gray-50",children:r("p",{className:"text-gray-500",children:"No PDF data available"})})}a(N,"PDFPreview");import{jsx as F,jsxs as L}from"react/jsx-runtime";function I({onSubmit:c,onSuccess:l,onError:n}){let{contractorOnboardingBag:t}=P(),s=a(async p=>{try{await c?.(t.parseFormValues(p));let o=await t.onSubmit(p);if(o?.data){await l?.(o?.data),t?.next();return}if(o?.error){let d=g(o?.fieldErrors||[],t.meta?.fields?.contract_preview);n?.({error:o?.error,rawError:o?.rawError,fieldErrors:d})}}catch(o){n?.({error:o,rawError:o,fieldErrors:[]})}},"handleSubmit"),u=t.stepState.values?.contract_preview||t.initialValues.contract_preview;return L("div",{className:"space-y-4",children:[F(N,{base64Data:t.documentPreviewPdf?.contract_document.content}),F(b,{defaultValues:u,onSubmit:s})]})}a(I,"ContractPreviewStep");export{I as a};
2
- //# sourceMappingURL=chunk-LTJBNOLY.js.map
1
+ import{a as b}from"./chunk-W676SMID.js";import{b as P}from"./chunk-TOA3JILU.js";import{b as g}from"./chunk-7XRPOR7L.js";import{b as m}from"./chunk-4NLAHGUV.js";import{a}from"./chunk-P37U34EQ.js";import{useState as f,useMemo as S}from"react";import{Document as k,Page as C,pdfjs as x}from"react-pdf";import{jsx as r,jsxs as i}from"react/jsx-runtime";x.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${x.version}/build/pdf.worker.min.mjs`;function N({base64Data:c,fileName:l="document.pdf"}){let[n,t]=f(0),[s,u]=f(1),[p,o]=f(!0),[d,w]=f(""),v=S(()=>{if(!c)return"";let e=c.trim();return e.startsWith("data:application/pdf;base64,")||e.startsWith("data:")?e:`data:application/pdf;base64,${e}`},[c]),h=a(({numPages:e})=>{t(e),o(!1),w("")},"onDocumentLoadSuccess"),y=a(e=>{console.error("Error loading PDF:",e),w("Failed to load PDF document"),o(!1)},"onDocumentLoadError"),E=a(()=>{u(e=>Math.max(1,e-1))},"goToPrevPage"),D=a(()=>{u(e=>Math.min(n,e+1))},"goToNextPage");return v?i("div",{className:"w-full space-y-4",children:[i("div",{children:[i("div",{className:"flex justify-center items-center min-h-[600px] p-4 bg-gray-50",children:[p&&i("div",{className:"text-center",children:[r("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto mb-4"}),r("p",{className:"text-gray-600",children:"Loading PDF..."})]}),d&&i("div",{className:"text-center space-y-4",children:[r("p",{className:"text-red-600",children:d}),r(m,{asChild:!0,children:r("a",{href:v,download:l,children:"Download PDF Instead"})})]}),!d&&r(k,{file:v,onLoadSuccess:h,onLoadError:y,loading:"",className:"flex flex-col items-center",children:r(C,{pageNumber:s,renderTextLayer:!0,renderAnnotationLayer:!0,className:"shadow-lg",width:Math.min(window.innerWidth-100,800)})})]}),n>0&&!d&&r("div",{className:"border-t bg-white px-4 py-3",children:i("div",{className:"flex items-center justify-between",children:[r(m,{onClick:E,disabled:s<=1,variant:"outline",size:"sm",children:"\u2190 Previous"}),i("div",{className:"text-sm text-gray-600",children:["Page ",s," of ",n]}),r(m,{onClick:D,disabled:s>=n,variant:"outline",size:"sm",children:"Next \u2192"})]})})]}),i("div",{className:"flex justify-between items-center text-sm",children:[r("p",{className:"text-gray-600",children:l}),r(m,{variant:"link",size:"link",asChild:!0,children:i("a",{href:v,download:l,className:"flex items-center gap-1",children:[r("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download PDF"]})})]})]}):r("div",{className:"w-full border rounded p-8 text-center bg-gray-50",children:r("p",{className:"text-gray-500",children:"No PDF data available"})})}a(N,"PDFPreview");import{jsx as F,jsxs as L}from"react/jsx-runtime";function I({onSubmit:c,onSuccess:l,onError:n}){let{contractorOnboardingBag:t}=P(),s=a(async p=>{try{await c?.(t.parseFormValues(p));let o=await t.onSubmit(p);if(o?.data){await l?.(o?.data),t?.next();return}if(o?.error){let d=g(o?.fieldErrors||[],t.meta?.fields?.contract_preview);n?.({error:o?.error,rawError:o?.rawError,fieldErrors:d})}}catch(o){n?.({error:o,rawError:o,fieldErrors:[]})}},"handleSubmit"),u=t.stepState.values?.contract_preview||t.initialValues.contract_preview;return L("div",{className:"space-y-4",children:[F(N,{base64Data:t.documentPreviewPdf?.contract_document.content}),F(b,{defaultValues:u,onSubmit:s})]})}a(I,"ContractPreviewStep");export{I as a};
2
+ //# sourceMappingURL=chunk-SDIBOMMT.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-ZN4VWMV2.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-7XRPOR7L.js";import{d as s}from"./chunk-PAQW5BFW.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=s(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=t(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
2
- //# sourceMappingURL=chunk-E5IJ2M63.js.map
1
+ import{a as m}from"./chunk-IQ2HRDC4.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-7XRPOR7L.js";import{d as s}from"./chunk-PAQW5BFW.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=s(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=t(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
2
+ //# sourceMappingURL=chunk-SFX34GRA.js.map
@@ -1,2 +1,2 @@
1
- import{a as d,b as _,c}from"./chunk-4ULJIT4W.js";import{c as F}from"./chunk-U23SN7CM.js";import{e as y}from"./chunk-PAQW5BFW.js";import{e as m}from"./chunk-54KJP7WD.js";import{a as p}from"./chunk-P37U34EQ.js";import{Fragment as V}from"react";var u={...d,fieldset:c,"fieldset-flat":c};import{useEffect as h}from"react";import{Fragment as x,jsx as i,jsxs as C}from"react/jsx-runtime";function g({name:t,value:a,description:s,statement:r,label:l}){let{setValue:e}=F();return h(()=>{e(t,a)},[]),i("div",{children:r?C(x,{children:[i("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${t}`,dangerouslySetInnerHTML:{__html:m(r?.title||l)}}),i("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${t}`,dangerouslySetInnerHTML:{__html:m(r?.description||s)}})]}):i("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${t}`,dangerouslySetInnerHTML:{__html:m(s)}})})}p(g,"ForcedValueField");import{Fragment as P,jsx as o,jsxs as S}from"react/jsx-runtime";function k(t){return t.const!==void 0&&t.const===t.default&&t.inputType!=="checkbox"&&t.inputType!=="hidden"}p(k,"checkFieldHasForcedValue");var q=p(({fields:t,fieldsets:a,fieldValues:s,components:r})=>{if(!t||t.length===0)return null;let l=a&&s?y({fields:t,fieldsets:a,values:s}):t;return o(P,{children:l.map(e=>{if(e.calculateDynamicProperties&&(e={...e,...e.calculateDynamicProperties(s,e)||{}}),e.isVisible===!1||e.deprecated||e.hidden)return null;if(k(e))return o(g,{name:e.name,description:e.description,value:e.const,statement:e.statement,label:e.label},e.name);if(e.Component){let{Component:T}=e;return o(T,{...e},e.name)}let n=u[e.type];return e.type==="select"&&e.multiple&&(n=u["multi-select"]),e.type==="fieldset"?o(n,{...e,components:r},e.name):e.type==="fieldset-flat"?o(n,{...e,components:r,isFlatFieldset:!0},e.name):n?S(V,{children:[o(n,{...e,component:r&&r[e.type]}),e.statement?o(_,{...e.statement}):null,e.extra?e.extra:null]},e.name):S("p",{className:"error",children:["Field type ",e.type," not supported"]})})})},"JSONSchemaFormFields");export{q as a};
2
- //# sourceMappingURL=chunk-YL46DDPK.js.map
1
+ import{a as d,b as _,c}from"./chunk-OUO2RTM4.js";import{c as F}from"./chunk-XASIKHZL.js";import{e as y}from"./chunk-PAQW5BFW.js";import{e as m}from"./chunk-HC56JKI2.js";import{a as p}from"./chunk-P37U34EQ.js";import{Fragment as V}from"react";var u={...d,fieldset:c,"fieldset-flat":c};import{useEffect as h}from"react";import{Fragment as x,jsx as i,jsxs as C}from"react/jsx-runtime";function g({name:t,value:a,description:s,statement:r,label:l}){let{setValue:e}=F();return h(()=>{e(t,a)},[]),i("div",{children:r?C(x,{children:[i("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${t}`,dangerouslySetInnerHTML:{__html:m(r?.title||l)}}),i("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${t}`,dangerouslySetInnerHTML:{__html:m(r?.description||s)}})]}):i("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${t}`,dangerouslySetInnerHTML:{__html:m(s)}})})}p(g,"ForcedValueField");import{Fragment as P,jsx as o,jsxs as S}from"react/jsx-runtime";function k(t){return t.const!==void 0&&t.const===t.default&&t.inputType!=="checkbox"&&t.inputType!=="hidden"}p(k,"checkFieldHasForcedValue");var q=p(({fields:t,fieldsets:a,fieldValues:s,components:r})=>{if(!t||t.length===0)return null;let l=a&&s?y({fields:t,fieldsets:a,values:s}):t;return o(P,{children:l.map(e=>{if(e.calculateDynamicProperties&&(e={...e,...e.calculateDynamicProperties(s,e)||{}}),e.isVisible===!1||e.deprecated||e.hidden)return null;if(k(e))return o(g,{name:e.name,description:e.description,value:e.const,statement:e.statement,label:e.label},e.name);if(e.Component){let{Component:T}=e;return o(T,{...e},e.name)}let n=u[e.type];return e.type==="select"&&e.multiple&&(n=u["multi-select"]),e.type==="fieldset"?o(n,{...e,components:r},e.name):e.type==="fieldset-flat"?o(n,{...e,components:r,isFlatFieldset:!0},e.name):n?S(V,{children:[o(n,{...e,component:r&&r[e.type]}),e.statement?o(_,{...e.statement}):null,e.extra?e.extra:null]},e.name):S("p",{className:"error",children:["Field type ",e.type," not supported"]})})})},"JSONSchemaFormFields");export{q as a};
2
+ //# sourceMappingURL=chunk-SV2PWH6Y.js.map
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-YL46DDPK.js";import{b as p}from"./chunk-7XRPOR7L.js";import{g as C}from"./chunk-U23SN7CM.js";import{f as E}from"./chunk-54KJP7WD.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as u}from"react/jsx-runtime";function T({onSubmit:S,onError:w,onSuccess:y,onErrorWithFields:c,shouldResetForm:d,resetFields:a}){let{form:e,formId:V,costCalculatorBag:o}=f(),{formState:{isSubmitSuccessful:s}}=e;R(()=>{if(s&&d){o?.resetForm(),e.reset();return}if(s&&a){let t={...e.getValues()};a.forEach(r=>{t[r]=""}),o?.resetForm(),e.reset(t)}},[s,e,d,o,a]);let b=n(async i=>{try{let t=o?.parseFormValues(i);o?.meta?.fields&&(o.meta.fields=E(i,o.fields),o.meta.fields.employer_currency_slug=o.meta.fields.currency);let r=await o?.onSubmit(t);if(await S?.(t),r?.data&&!r.error){let l={data:{...r.data.data,employments:r.data.data.employments?.map(m=>({...m,title:t.estimation_title}))}};await y?.(l)}else throw{data:null,error:r?.error,fieldErrors:r?.fieldErrors,rawError:r?.rawError}}catch(t){let r=t,l=r.fieldErrors;if(c){let m=o?.meta?.fields,h=p(l,m);c({error:r.error,rawError:r.rawError,fieldErrors:h})}else w?.(r.error)}},"handleSubmit");return u(C,{...e,children:u("form",{id:V,onSubmit:e.handleSubmit(b),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:u(F,{fields:o?.fields??[]})})})}n(T,"CostCalculatorForm");export{T as a};
2
- //# sourceMappingURL=chunk-R52D2I6X.js.map
1
+ import{b as f}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-SV2PWH6Y.js";import{b as p}from"./chunk-7XRPOR7L.js";import{g as C}from"./chunk-XASIKHZL.js";import{f as E}from"./chunk-HC56JKI2.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as u}from"react/jsx-runtime";function T({onSubmit:S,onError:w,onSuccess:y,onErrorWithFields:c,shouldResetForm:d,resetFields:a}){let{form:e,formId:V,costCalculatorBag:o}=f(),{formState:{isSubmitSuccessful:s}}=e;R(()=>{if(s&&d){o?.resetForm(),e.reset();return}if(s&&a){let t={...e.getValues()};a.forEach(r=>{t[r]=""}),o?.resetForm(),e.reset(t)}},[s,e,d,o,a]);let b=n(async i=>{try{let t=o?.parseFormValues(i);o?.meta?.fields&&(o.meta.fields=E(i,o.fields),o.meta.fields.employer_currency_slug=o.meta.fields.currency);let r=await o?.onSubmit(t);if(await S?.(t),r?.data&&!r.error){let l={data:{...r.data.data,employments:r.data.data.employments?.map(m=>({...m,title:t.estimation_title}))}};await y?.(l)}else throw{data:null,error:r?.error,fieldErrors:r?.fieldErrors,rawError:r?.rawError}}catch(t){let r=t,l=r.fieldErrors;if(c){let m=o?.meta?.fields,h=p(l,m);c({error:r.error,rawError:r.rawError,fieldErrors:h})}else w?.(r.error)}},"handleSubmit");return u(C,{...e,children:u("form",{id:V,onSubmit:e.handleSubmit(b),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:u(F,{fields:o?.fields??[]})})})}n(T,"CostCalculatorForm");export{T as a};
2
+ //# sourceMappingURL=chunk-TK6JU3ZG.js.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-FS27V36X.js";import{b as m}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";function p({onSubmit:e}){let{terminationBag:i}=m();return r(n,{onSubmit:o(async t=>{await e?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(p,"EmployeeCommunicationForm");export{p as a};
2
- //# sourceMappingURL=chunk-2ZT2TLPE.js.map
1
+ import{a as n}from"./chunk-WY3KCHHG.js";import{b as m}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";function p({onSubmit:e}){let{terminationBag:i}=m();return r(n,{onSubmit:o(async t=>{await e?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(p,"EmployeeCommunicationForm");export{p as a};
2
+ //# sourceMappingURL=chunk-U3XZWSEU.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-6F4YCVZE.js";import{a}from"./chunk-JWZIWG4T.js";import{a as c}from"./chunk-2GCMLKO2.js";import{a as e}from"./chunk-UQYM3PBZ.js";import{a as m}from"./chunk-B3WXLC2R.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-WKTJKMHC.js.map
1
+ import{a as r}from"./chunk-3GDPOMQP.js";import{a}from"./chunk-OEEUSIOB.js";import{a as c}from"./chunk-2GCMLKO2.js";import{a as e}from"./chunk-ZZNI7IY2.js";import{a as m}from"./chunk-5JGYNS2O.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-UCLVNY25.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-7IHBNPZK.js";import{b as c}from"./chunk-3ZWDIEEM.js";import{c as _,h as d,i as u,j as x,k as C,l as T,m as R}from"./chunk-U23SN7CM.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as E}from"react/jsx-runtime";function J({name:t,description:m,label:r,type:f,onChange:s,component:w,includeErrorMessage:I=!0,additionalProps:P={},maxLength:l,...h}){let{components:N}=c(),{control:D}=_();return o(d,{control:D,name:t,render:({field:e,fieldState:F})=>{let i=w||N?.text;if(i){let n={name:t,description:m,label:r,type:f,onChange:s,metadata:P,maxLength:l,...h};return o(i,{field:{...e,onChange:a(p=>{e.onChange(p),s?.(p)},"onChange")},fieldState:F,fieldData:n})}return E(u,{"data-field":t,className:`RemoteFlows__TextField__Item__${t}`,children:[r&&o(x,{className:"RemoteFlows__TextField__Label",children:r}),o(C,{children:o(g,{...e,value:e.value??"",onChange:n=>{e.onChange(n),s?.(n)},className:"RemoteFlows__TextField__Input",placeholder:r,maxLength:l})}),m&&o(T,{className:"RemoteFlows__TextField__Description",children:m}),I&&F.error&&o(R,{className:"RemoteFlows__TextField__Error"})]})}})}a(J,"TextField");export{J as a};
2
- //# sourceMappingURL=chunk-ZJ3JHILJ.js.map
1
+ import{a as g}from"./chunk-FCAGJMPU.js";import{b as c}from"./chunk-3ZWDIEEM.js";import{c as _,h as d,i as u,j as x,k as C,l as T,m as R}from"./chunk-XASIKHZL.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as E}from"react/jsx-runtime";function J({name:t,description:m,label:r,type:f,onChange:s,component:w,includeErrorMessage:I=!0,additionalProps:P={},maxLength:l,...h}){let{components:N}=c(),{control:D}=_();return o(d,{control:D,name:t,render:({field:e,fieldState:F})=>{let i=w||N?.text;if(i){let n={name:t,description:m,label:r,type:f,onChange:s,metadata:P,maxLength:l,...h};return o(i,{field:{...e,onChange:a(p=>{e.onChange(p),s?.(p)},"onChange")},fieldState:F,fieldData:n})}return E(u,{"data-field":t,className:`RemoteFlows__TextField__Item__${t}`,children:[r&&o(x,{className:"RemoteFlows__TextField__Label",children:r}),o(C,{children:o(g,{...e,value:e.value??"",onChange:n=>{e.onChange(n),s?.(n)},className:"RemoteFlows__TextField__Input",placeholder:r,maxLength:l})}),m&&o(T,{className:"RemoteFlows__TextField__Description",children:m}),I&&F.error&&o(R,{className:"RemoteFlows__TextField__Error"})]})}})}a(J,"TextField");export{J as a};
2
+ //# sourceMappingURL=chunk-VHJFIDOX.js.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-MRYRNB7Y.js";import{b as m}from"./chunk-2QGDCMCE.js";import{b as e}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function f({children:n,...t}){let{terminationBag:{back:i}}=c(),{components:B}=e(),r=B?.button;return r?s(r,{...t,onClick:o=>{i(),t.onClick?.(o)},children:n}):s(m,{...t,onClick:o=>{i(),t.onClick?.(o)},children:n})}u(f,"TerminationBack");export{f as a};
2
- //# sourceMappingURL=chunk-SERAGBDA.js.map
1
+ import{b as c}from"./chunk-MRYRNB7Y.js";import{b as m}from"./chunk-4NLAHGUV.js";import{b as e}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function f({children:n,...t}){let{terminationBag:{back:i}}=c(),{components:B}=e(),r=B?.button;return r?s(r,{...t,onClick:o=>{i(),t.onClick?.(o)},children:n}):s(m,{...t,onClick:o=>{i(),t.onClick?.(o)},children:n})}u(f,"TerminationBack");export{f as a};
2
+ //# sourceMappingURL=chunk-VOJHAIEH.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-ZE3YT3Q6.js";import{a as l}from"./chunk-QFZ3XVDT.js";import{a as o}from"./chunk-TGU24WSW.js";import{b as i}from"./chunk-2QGDCMCE.js";import{b as r}from"./chunk-54KJP7WD.js";import{a as n}from"./chunk-P37U34EQ.js";import{Info as p}from"lucide-react";import{Fragment as f,jsx as t,jsxs as e}from"react/jsx-runtime";function B({extraStatutoryPaymentsTotal:d,extraStatutoryPaymentsBreakdown:u,currency:s}){return e("div",{children:[e("div",{className:"flex justify-between items-center mb-2",children:[t("h3",{className:"font-medium text-primary-foreground-800",children:"Extra Statutory Payments"}),t("span",{className:"font-semibold text-lg",children:r(d,s)})]}),t(l,{className:"mb-3"}),t("div",{className:"space-y-3 pl-2",children:u.map((a,c)=>e("div",{className:"flex justify-between items-start text-sm",children:[e("div",{className:"flex items-start gap-2",children:[t("span",{children:a.name}),a.description&&t(m,{content:e(f,{children:[t("span",{children:a.description})," ",a.zendesk_article_url&&t(o,{zendeskId:Number(a.zendesk_article_id),children:"Learn more"})]}),children:e(i,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[t(p,{className:"h-3 w-3 text-gray-400"}),t("span",{className:"sr-only",children:"Info"})]})})]}),t("span",{children:r(a.amount,s)})]},c))})]})}n(B,"CostCalculatorExtraStatutoryPaymentsBreakdown");export{B as a};
2
- //# sourceMappingURL=chunk-DS565IWX.js.map
1
+ import{a as m}from"./chunk-ZE3YT3Q6.js";import{a as l}from"./chunk-3T43ERBA.js";import{a as o}from"./chunk-HH4YP6QX.js";import{b as i}from"./chunk-4NLAHGUV.js";import{b as r}from"./chunk-HC56JKI2.js";import{a as n}from"./chunk-P37U34EQ.js";import{Info as p}from"lucide-react";import{Fragment as f,jsx as t,jsxs as e}from"react/jsx-runtime";function B({extraStatutoryPaymentsTotal:d,extraStatutoryPaymentsBreakdown:u,currency:s}){return e("div",{children:[e("div",{className:"flex justify-between items-center mb-2",children:[t("h3",{className:"font-medium text-primary-foreground-800",children:"Extra Statutory Payments"}),t("span",{className:"font-semibold text-lg",children:r(d,s)})]}),t(l,{className:"mb-3"}),t("div",{className:"space-y-3 pl-2",children:u.map((a,c)=>e("div",{className:"flex justify-between items-start text-sm",children:[e("div",{className:"flex items-start gap-2",children:[t("span",{children:a.name}),a.description&&t(m,{content:e(f,{children:[t("span",{children:a.description})," ",a.zendesk_article_url&&t(o,{zendeskId:Number(a.zendesk_article_id),children:"Learn more"})]}),children:e(i,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[t(p,{className:"h-3 w-3 text-gray-400"}),t("span",{className:"sr-only",children:"Info"})]})})]}),t("span",{children:r(a.amount,s)})]},c))})]})}n(B,"CostCalculatorExtraStatutoryPaymentsBreakdown");export{B as a};
2
+ //# sourceMappingURL=chunk-VOW6W24S.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-IQRBTXZ4.js";import{b as e}from"./chunk-TOA3JILU.js";import{b as t}from"./chunk-7XRPOR7L.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function S({onSubmit:m,onSuccess:d,onError:a}){let{contractorOnboardingBag:o}=e(),l=i(async n=>{try{await m?.(o.parseFormValues(n));let r=await o.onSubmit(n);if(r?.data){await d?.(r?.data),o?.next();return}if(r?.error){let f=t(r?.fieldErrors||[],o.meta?.fields?.basic_information);a?.({error:r?.error,rawError:r?.rawError,fieldErrors:f})}}catch(r){a?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),c=o.stepState.values?.basic_information||o.initialValues.basic_information;return p(s,{defaultValues:c,onSubmit:l})}i(S,"BasicInformationStep");export{S as a};
2
- //# sourceMappingURL=chunk-WCHQEQF5.js.map
1
+ import{a as s}from"./chunk-W676SMID.js";import{b as e}from"./chunk-TOA3JILU.js";import{b as t}from"./chunk-7XRPOR7L.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function S({onSubmit:m,onSuccess:d,onError:a}){let{contractorOnboardingBag:o}=e(),l=i(async n=>{try{await m?.(o.parseFormValues(n));let r=await o.onSubmit(n);if(r?.data){await d?.(r?.data),o?.next();return}if(r?.error){let f=t(r?.fieldErrors||[],o.meta?.fields?.basic_information);a?.({error:r?.error,rawError:r?.rawError,fieldErrors:f})}}catch(r){a?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),c=o.stepState.values?.basic_information||o.initialValues.basic_information;return p(s,{defaultValues:c,onSubmit:l})}i(S,"BasicInformationStep");export{S as a};
2
+ //# sourceMappingURL=chunk-VSUEF4AY.js.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-TOA3JILU.js";import{b as s}from"./chunk-CFIJKJXD.js";import{a as l}from"./chunk-YL46DDPK.js";import{f as m,g as d}from"./chunk-U23SN7CM.js";import{a as e}from"./chunk-P37U34EQ.js";import{useEffect as f}from"react";import{jsx as p}from"react/jsx-runtime";import{createElement as P}from"react";function B({defaultValues:i,onSubmit:F,components:u}){let{formId:y,contractorOnboardingBag:o}=c(),b=s(o.handleValidation),r=m({resolver:b,defaultValues:i,shouldUnregister:!1,mode:"onBlur"});f(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),f(()=>{let n=r?.watch(t=>{Object.keys(t).some(a=>t[a]!==i[a])&&o?.checkFieldUpdates(t)});return()=>n?.unsubscribe()},[]);let g=e(async n=>{F(n)},"handleSubmit");return P(d,{...r,key:`form-${o.stepState.currentStep.name}`},p("form",{id:y,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:p(l,{components:u,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}e(B,"ContractorOnboardingForm");export{B as a};
2
- //# sourceMappingURL=chunk-IQRBTXZ4.js.map
1
+ import{b as c}from"./chunk-TOA3JILU.js";import{a as l}from"./chunk-SV2PWH6Y.js";import{b as s}from"./chunk-CFIJKJXD.js";import{f as m,g as d}from"./chunk-XASIKHZL.js";import{a as e}from"./chunk-P37U34EQ.js";import{useEffect as f}from"react";import{jsx as p}from"react/jsx-runtime";import{createElement as P}from"react";function B({defaultValues:i,onSubmit:F,components:u}){let{formId:y,contractorOnboardingBag:o}=c(),b=s(o.handleValidation),r=m({resolver:b,defaultValues:i,shouldUnregister:!1,mode:"onBlur"});f(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),f(()=>{let n=r?.watch(t=>{Object.keys(t).some(a=>t[a]!==i[a])&&o?.checkFieldUpdates(t)});return()=>n?.unsubscribe()},[]);let g=e(async n=>{F(n)},"handleSubmit");return P(d,{...r,key:`form-${o.stepState.currentStep.name}`},p("form",{id:y,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:p(l,{components:u,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}e(B,"ContractorOnboardingForm");export{B as a};
2
+ //# sourceMappingURL=chunk-W676SMID.js.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-54KJP7WD.js";import{a as s}from"./chunk-P37U34EQ.js";import*as t from"@radix-ui/react-tabs";import{jsx as n}from"react/jsx-runtime";function r({className:e,...i}){return n(t.Root,{"data-slot":"tabs",className:o("flex flex-col gap-2",e),...i})}s(r,"Tabs");function c({className:e,...i}){return n(t.List,{"data-slot":"tabs-list",className:o("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",e),...i})}s(c,"TabsList");function l({className:e,...i}){return n(t.Trigger,{"data-slot":"tabs-trigger",className:o("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i})}s(l,"TabsTrigger");function m({className:e,...i}){return n(t.Content,{"data-slot":"tabs-content",className:o("flex-1 outline-none",e),...i})}s(m,"TabsContent");export{r as a,c as b,l as c,m as d};
2
- //# sourceMappingURL=chunk-M4EVWRWB.js.map
1
+ import{a as o}from"./chunk-HC56JKI2.js";import{a as s}from"./chunk-P37U34EQ.js";import*as t from"@radix-ui/react-tabs";import{jsx as n}from"react/jsx-runtime";function r({className:e,...i}){return n(t.Root,{"data-slot":"tabs",className:o("flex flex-col gap-2",e),...i})}s(r,"Tabs");function c({className:e,...i}){return n(t.List,{"data-slot":"tabs-list",className:o("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",e),...i})}s(c,"TabsList");function l({className:e,...i}){return n(t.Trigger,{"data-slot":"tabs-trigger",className:o("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i})}s(l,"TabsTrigger");function m({className:e,...i}){return n(t.Content,{"data-slot":"tabs-content",className:o("flex-1 outline-none",e),...i})}s(m,"TabsContent");export{r as a,c as b,l as c,m as d};
2
+ //# sourceMappingURL=chunk-WPMPTV76.js.map
@@ -1,2 +1,2 @@
1
- import{b as d}from"./chunk-MRYRNB7Y.js";import{b as a}from"./chunk-CFIJKJXD.js";import{a as f}from"./chunk-YL46DDPK.js";import{f as s,g as l}from"./chunk-U23SN7CM.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as T}from"react";import{jsx as e}from"react/jsx-runtime";function A({fields:m,onSubmit:F}){let{formId:u,terminationBag:o}=d(),c=a(o.handleValidation),i=s({resolver:c,defaultValues:o?.initialValues,shouldUnregister:!1,mode:"onBlur"});T(()=>{let y=i?.watch(r=>{Object.keys(r).some(t=>r[t]!==o?.initialValues?.[t])&&o?.checkFieldUpdates(r)});return()=>y?.unsubscribe()},[]);let p=m||(o?.fields??[]);return e(l,{...i,children:e("form",{id:u,onSubmit:i.handleSubmit(F),className:"space-y-4 RemoteFlows__TerminationForm",children:e(f,{fields:p})})})}n(A,"TerminationForm");export{A as a};
2
- //# sourceMappingURL=chunk-FS27V36X.js.map
1
+ import{b as d}from"./chunk-MRYRNB7Y.js";import{a as f}from"./chunk-SV2PWH6Y.js";import{b as a}from"./chunk-CFIJKJXD.js";import{f as s,g as l}from"./chunk-XASIKHZL.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as T}from"react";import{jsx as e}from"react/jsx-runtime";function A({fields:m,onSubmit:F}){let{formId:u,terminationBag:o}=d(),c=a(o.handleValidation),i=s({resolver:c,defaultValues:o?.initialValues,shouldUnregister:!1,mode:"onBlur"});T(()=>{let y=i?.watch(r=>{Object.keys(r).some(t=>r[t]!==o?.initialValues?.[t])&&o?.checkFieldUpdates(r)});return()=>y?.unsubscribe()},[]);let p=m||(o?.fields??[]);return e(l,{...i,children:e("form",{id:u,onSubmit:i.handleSubmit(F),className:"space-y-4 RemoteFlows__TerminationForm",children:e(f,{fields:p})})})}n(A,"TerminationForm");export{A as a};
2
+ //# sourceMappingURL=chunk-WY3KCHHG.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-YLBQWZOK.js";import{a as m}from"./chunk-A7ZEA2WU.js";import{a as n}from"./chunk-B25LAMRX.js";import{a as e}from"./chunk-LB35HMUG.js";import{a as T}from"./chunk-QBECPUJM.js";import{a}from"./chunk-2ZT2TLPE.js";import{a as f}from"./chunk-DZ4UXMF3.js";import{a as r}from"./chunk-SERAGBDA.js";import{a as t}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as u}from"react/jsx-runtime";var A=i(({employmentId:d,render:s,options:l})=>{let y=c(),o=e({employmentId:d,options:l});return u(t.Provider,{value:{formId:y,terminationBag:o},children:s({terminationBag:o,components:{SubmitButton:m,TimeOff:n,Back:r,EmployeeComunicationStep:a,TerminationDetailsStep:p,PaidTimeOffStep:f,AdditionalDetailsStep:T}})})},"TerminationFlow");export{A as a};
2
- //# sourceMappingURL=chunk-NDR27PRO.js.map
1
+ import{a as p}from"./chunk-ODI4OPN7.js";import{a as m}from"./chunk-A6QURRVL.js";import{a as n}from"./chunk-B25LAMRX.js";import{a as e}from"./chunk-CKHZP3O3.js";import{a as T}from"./chunk-H6G4PPLM.js";import{a}from"./chunk-U3XZWSEU.js";import{a as f}from"./chunk-JNPIBIHZ.js";import{a as r}from"./chunk-VOJHAIEH.js";import{a as t}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as u}from"react/jsx-runtime";var A=i(({employmentId:d,render:s,options:l})=>{let y=c(),o=e({employmentId:d,options:l});return u(t.Provider,{value:{formId:y,terminationBag:o},children:s({terminationBag:o,components:{SubmitButton:m,TimeOff:n,Back:r,EmployeeComunicationStep:a,TerminationDetailsStep:p,PaidTimeOffStep:f,AdditionalDetailsStep:T}})})},"TerminationFlow");export{A as a};
2
+ //# sourceMappingURL=chunk-X5F5HHFQ.js.map