@remoteoss/remote-flows 1.40.0 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/README.md +2 -0
  2. package/dist/CheckboxFieldDefault-OBDOMMWQ.js +2 -0
  3. package/dist/CountryFieldDefault-NEFHRUUS.js +2 -0
  4. package/dist/DatePickerFieldDefault-NYHK6I2G.js +2 -0
  5. package/dist/RadioGroupFieldDefault-GF4XVARF.js +2 -0
  6. package/dist/TextAreaFieldDefault-HPEUG5UI.js +2 -0
  7. package/dist/{WorkScheduleFieldDefault-6DC7RDII.js → WorkScheduleFieldDefault-D6TGVPHC.js} +2 -2
  8. package/dist/{chunk-V62JQXIC.js → chunk-2PMYCCWO.js} +2 -2
  9. package/dist/{chunk-W7MCRAQ4.js → chunk-3D7HWCNX.js} +2 -2
  10. package/dist/chunk-3GCJILCE.js +2 -0
  11. package/dist/chunk-3GCJILCE.js.map +1 -0
  12. package/dist/{chunk-TOOCSXXQ.js → chunk-3PYZQWDY.js} +2 -2
  13. package/dist/{chunk-KN2Q5NOL.js → chunk-4WBEA4IY.js} +2 -2
  14. package/dist/{chunk-7FCKRGGD.js → chunk-57G3ZAX3.js} +2 -2
  15. package/dist/{chunk-PTPNWD53.js → chunk-6VODJDBH.js} +2 -2
  16. package/dist/{chunk-4TNJXIDB.js → chunk-6YBDMERC.js} +2 -2
  17. package/dist/{chunk-UOYIAURS.js → chunk-7EKNQYS5.js} +2 -2
  18. package/dist/{chunk-YD54NZIX.js → chunk-7KMXTQ4C.js} +2 -2
  19. package/dist/{chunk-V5EBEJON.js → chunk-7R7AQHV2.js} +2 -2
  20. package/dist/{chunk-TCFTRE7G.js → chunk-ABQLD4SS.js} +2 -2
  21. package/dist/{chunk-W2WHWA5J.js → chunk-B3OYZQSP.js} +2 -2
  22. package/dist/{chunk-NG562U46.js → chunk-B5KAHNYW.js} +2 -2
  23. package/dist/{chunk-Y34DKDJI.js → chunk-BLCINT3L.js} +2 -2
  24. package/dist/{chunk-G556HMVA.js → chunk-COAJUZSE.js} +2 -2
  25. package/dist/{chunk-M5ARBNKW.js → chunk-FAJ5I4Q4.js} +2 -2
  26. package/dist/{chunk-AC4MDLIM.js → chunk-FEWMPYBF.js} +2 -2
  27. package/dist/{chunk-32ERURM2.js → chunk-FOUXLCEA.js} +2 -2
  28. package/dist/{chunk-VYZOGC65.js → chunk-FXJM54I4.js} +2 -2
  29. package/dist/{chunk-6Y5WCCMH.js → chunk-GGULUMOP.js} +2 -2
  30. package/dist/{chunk-DNAPYU5I.js → chunk-GJV6HJ3D.js} +2 -2
  31. package/dist/{chunk-JSTCIALQ.js → chunk-GTU6MTZH.js} +2 -2
  32. package/dist/{chunk-HAACNERA.js → chunk-HADEU7QX.js} +2 -2
  33. package/dist/{chunk-54Z4QJ3Q.js → chunk-HGIMRQIZ.js} +2 -2
  34. package/dist/{chunk-34U3WJ75.js → chunk-HHFDREGB.js} +2 -2
  35. package/dist/{chunk-5DGTMYWR.js → chunk-I7JKBQHL.js} +2 -2
  36. package/dist/{chunk-ODXNPBKO.js → chunk-ICNC2RV5.js} +2 -2
  37. package/dist/{chunk-EFC4EDTM.js → chunk-IL3IFNO5.js} +2 -2
  38. package/dist/{chunk-LIPJXO2R.js → chunk-INPMEOFL.js} +2 -2
  39. package/dist/{chunk-UEPT6OBL.js → chunk-KBUBBK2E.js} +2 -2
  40. package/dist/{chunk-MF3W2PJ7.js → chunk-KEYWBQH2.js} +2 -2
  41. package/dist/{chunk-6P536SW2.js → chunk-KFFTPU6V.js} +2 -2
  42. package/dist/{chunk-MUXNVLZO.js → chunk-KH4DEFZT.js} +2 -2
  43. package/dist/{chunk-ELM6CPRT.js → chunk-KRZGFZUS.js} +2 -2
  44. package/dist/{chunk-GZUP2IE6.js → chunk-KWIWHDBS.js} +2 -2
  45. package/dist/chunk-KWIWHDBS.js.map +1 -0
  46. package/dist/{chunk-3YTML5RG.js → chunk-MBOKEWSX.js} +2 -2
  47. package/dist/{chunk-R2JJUSD3.js → chunk-MQTRTRV6.js} +2 -2
  48. package/dist/{chunk-QIAK5VU7.js → chunk-MZXFOY5T.js} +2 -2
  49. package/dist/{chunk-JBQOE3XL.js → chunk-MZZFNRW5.js} +2 -2
  50. package/dist/{chunk-JFPOX7SW.js → chunk-NJNJACVL.js} +2 -2
  51. package/dist/{chunk-QI4MWDJS.js → chunk-O3KGCVBO.js} +2 -2
  52. package/dist/{chunk-XNDOPTDJ.js → chunk-OKSKBEIR.js} +2 -2
  53. package/dist/{chunk-YYJH3TPJ.js → chunk-OVU2VJM6.js} +2 -2
  54. package/dist/{chunk-2Q462FT7.js → chunk-P6H7QMKK.js} +2 -2
  55. package/dist/{chunk-Q2OGLLBA.js → chunk-PB6UQ4A4.js} +2 -2
  56. package/dist/{chunk-Q2OGLLBA.js.map → chunk-PB6UQ4A4.js.map} +1 -1
  57. package/dist/{chunk-ENV2K73V.js → chunk-PET4EGTM.js} +2 -2
  58. package/dist/{chunk-DPXSK2UQ.js → chunk-PIIWY632.js} +2 -2
  59. package/dist/{chunk-ITDU6XPR.js → chunk-PJPYUB2R.js} +2 -2
  60. package/dist/{chunk-PJ6KPGIE.js → chunk-PMRAJKJ5.js} +2 -2
  61. package/dist/{chunk-VTWVHO4F.js → chunk-QV7CEES3.js} +2 -2
  62. package/dist/chunk-RATFUMTL.js +2 -0
  63. package/dist/chunk-RATFUMTL.js.map +1 -0
  64. package/dist/{chunk-QZFKUU4A.js → chunk-S7DDWZOR.js} +2 -2
  65. package/dist/{chunk-LLHJODMO.js → chunk-SHOGXN3C.js} +2 -2
  66. package/dist/{chunk-TBGXSWRX.js → chunk-SKQZ6BPK.js} +2 -2
  67. package/dist/chunk-UAMKMIHP.js +2 -0
  68. package/dist/chunk-UAMKMIHP.js.map +1 -0
  69. package/dist/{chunk-75XZ4KIX.js → chunk-UBBUH2DE.js} +2 -2
  70. package/dist/{chunk-UW3TUDJR.js → chunk-UD24LBJ6.js} +2 -2
  71. package/dist/{chunk-W5MWHAAI.js → chunk-UELAVKG5.js} +2 -2
  72. package/dist/{chunk-VNHXMVTF.js → chunk-UFAQ7CQH.js} +2 -2
  73. package/dist/{chunk-3EYFXA3W.js → chunk-VMZQN4WU.js} +2 -2
  74. package/dist/{chunk-WMJP2BO5.js → chunk-VV3LCB77.js} +2 -2
  75. package/dist/{chunk-LD5KN4ZF.js → chunk-VWO7PDZ4.js} +2 -2
  76. package/dist/{chunk-7BPB4PXN.js → chunk-WIFDQWVX.js} +2 -2
  77. package/dist/{chunk-KXQVUSLI.js → chunk-WRCHICCJ.js} +2 -2
  78. package/dist/{chunk-YQOONCKH.js → chunk-XE6HQVLQ.js} +2 -2
  79. package/dist/{chunk-76VZ4ARW.js → chunk-XFQS2BVE.js} +2 -2
  80. package/dist/{chunk-YWJS3RL5.js → chunk-XLURXRQT.js} +2 -2
  81. package/dist/{chunk-KY4PEPYW.js → chunk-YOFPHSYV.js} +2 -2
  82. package/dist/{chunk-HK4LGSS7.js → chunk-YQQHCS4S.js} +2 -2
  83. package/dist/{chunk-XV7SBFS5.js → chunk-YXHSALDR.js} +2 -2
  84. package/dist/{chunk-UYGDMJF2.js → chunk-ZMQTQ4UQ.js} +2 -2
  85. package/dist/{chunk-DRAQLW6C.js → chunk-ZSN43HMP.js} +2 -2
  86. package/dist/{chunk-AXDL47BE.js → chunk-ZTNH2YIM.js} +2 -2
  87. package/dist/{chunk-HSVLNS27.js → chunk-ZY7RAGEL.js} +2 -2
  88. package/dist/default-components.d.ts +2 -2
  89. package/dist/default-components.js +1 -1
  90. package/dist/flows/ContractAmendment/ContractAmendmentBack.d.ts +2 -2
  91. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +3 -3
  92. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +5 -6
  93. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  94. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +3 -3
  95. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  96. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.d.ts +2 -2
  97. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  98. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  99. package/dist/flows/ContractAmendment/hooks.js +1 -1
  100. package/dist/flows/ContractAmendment/index.d.ts +4 -5
  101. package/dist/flows/ContractAmendment/index.js +1 -1
  102. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  103. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  104. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +7 -8
  105. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  106. package/dist/flows/ContractorOnboarding/api.d.ts +50 -43
  107. package/dist/flows/ContractorOnboarding/api.js +1 -1
  108. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +6 -7
  109. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  110. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -6
  111. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  112. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +4 -5
  113. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +4 -5
  114. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -6
  115. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  116. package/dist/flows/ContractorOnboarding/components/ContractReviewButton.d.ts +2 -2
  117. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +7 -8
  118. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  119. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +5 -6
  120. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  121. package/dist/flows/ContractorOnboarding/components/OnboardingBack.d.ts +2 -2
  122. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +5 -5
  123. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  124. package/dist/flows/ContractorOnboarding/components/OnboardingSubmit.d.ts +2 -2
  125. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -6
  126. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  127. package/dist/flows/ContractorOnboarding/components/SaveDraftButton.d.ts +5 -5
  128. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +6 -7
  129. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  130. package/dist/flows/ContractorOnboarding/components/StatementOfWorkDisclaimer.d.ts +2 -2
  131. package/dist/flows/ContractorOnboarding/components/StatementOfWorkDisclaimer.js +1 -1
  132. package/dist/flows/ContractorOnboarding/constants.js +1 -1
  133. package/dist/flows/ContractorOnboarding/context.d.ts +9 -8
  134. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -6
  135. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  136. package/dist/flows/ContractorOnboarding/index.d.ts +6 -7
  137. package/dist/flows/ContractorOnboarding/index.js +1 -1
  138. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -6
  139. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  140. package/dist/flows/ContractorOnboarding/types.d.ts +5 -6
  141. package/dist/flows/ContractorOnboarding/utils.d.ts +4 -5
  142. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  143. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +4 -5
  144. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  145. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +5 -6
  146. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  147. package/dist/flows/CostCalculator/CostCalculatorResetButton.d.ts +2 -2
  148. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.d.ts +2 -2
  149. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +4 -5
  150. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  151. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +4 -5
  152. package/dist/flows/CostCalculator/api.d.ts +7 -7
  153. package/dist/flows/CostCalculator/api.js +1 -1
  154. package/dist/flows/CostCalculator/components/SalaryField.d.ts +4 -5
  155. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  156. package/dist/flows/CostCalculator/context.d.ts +5 -5
  157. package/dist/flows/CostCalculator/hooks.d.ts +5 -5
  158. package/dist/flows/CostCalculator/hooks.js +1 -1
  159. package/dist/flows/CostCalculator/index.d.ts +3 -4
  160. package/dist/flows/CostCalculator/index.js +1 -1
  161. package/dist/flows/CostCalculator/types.d.ts +2 -2
  162. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  163. package/dist/flows/CostCalculator/utils.js +1 -1
  164. package/dist/flows/CreateCompany/CreateCompany.d.ts +6 -7
  165. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  166. package/dist/flows/CreateCompany/api.d.ts +3 -3
  167. package/dist/flows/CreateCompany/api.js +1 -1
  168. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -5
  169. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  170. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -5
  171. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  172. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +4 -5
  173. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  174. package/dist/flows/CreateCompany/components/CreateCompanySubmit.d.ts +2 -2
  175. package/dist/flows/CreateCompany/context.d.ts +4 -5
  176. package/dist/flows/CreateCompany/hooks.d.ts +4 -5
  177. package/dist/flows/CreateCompany/hooks.js +1 -1
  178. package/dist/flows/CreateCompany/index.d.ts +4 -5
  179. package/dist/flows/CreateCompany/index.js +1 -1
  180. package/dist/flows/CreateCompany/types.d.ts +4 -5
  181. package/dist/flows/Onboarding/OnboardingFlow.d.ts +6 -7
  182. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  183. package/dist/flows/Onboarding/api.d.ts +19 -20
  184. package/dist/flows/Onboarding/api.js +1 -1
  185. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +4 -5
  186. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  187. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +5 -6
  188. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  189. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -5
  190. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  191. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +5 -6
  192. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  193. package/dist/flows/Onboarding/components/EmploymentAgreementInfoContent.d.ts +2 -2
  194. package/dist/flows/Onboarding/components/EmploymentAgreementInfoContent.js +1 -1
  195. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.d.ts +4 -5
  196. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.js +1 -1
  197. package/dist/flows/Onboarding/components/EquityPriceDetails.d.ts +2 -2
  198. package/dist/flows/Onboarding/components/OnboardingBack.d.ts +2 -2
  199. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +6 -7
  200. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  201. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +5 -5
  202. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  203. package/dist/flows/Onboarding/components/OnboardingSubmit.d.ts +2 -2
  204. package/dist/flows/Onboarding/components/PreOnboardingRequirements.d.ts +5 -5
  205. package/dist/flows/Onboarding/components/PreOnboardingRequirements.js +1 -1
  206. package/dist/flows/Onboarding/components/PreviewEmploymentAgreementStep.d.ts +2 -2
  207. package/dist/flows/Onboarding/components/PreviewEmploymentAgreementStep.js +1 -1
  208. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -5
  209. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +5 -5
  210. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +5 -6
  211. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  212. package/dist/flows/Onboarding/context.d.ts +6 -7
  213. package/dist/flows/Onboarding/hooks.d.ts +4 -5
  214. package/dist/flows/Onboarding/hooks.js +1 -1
  215. package/dist/flows/Onboarding/index.d.ts +4 -5
  216. package/dist/flows/Onboarding/index.js +1 -1
  217. package/dist/flows/Onboarding/types.d.ts +4 -5
  218. package/dist/flows/Onboarding/utils.d.ts +5 -6
  219. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.d.ts +5 -6
  220. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.js +1 -1
  221. package/dist/flows/PayrollAdminOnboarding/context.d.ts +3 -3
  222. package/dist/flows/PayrollAdminOnboarding/hooks.d.ts +3 -3
  223. package/dist/flows/PayrollAdminOnboarding/hooks.js +1 -1
  224. package/dist/flows/PayrollAdminOnboarding/index.d.ts +4 -5
  225. package/dist/flows/PayrollAdminOnboarding/index.js +1 -1
  226. package/dist/flows/PayrollAdminOnboarding/types.d.ts +3 -3
  227. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.d.ts +5 -6
  228. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.js +1 -1
  229. package/dist/flows/PayrollEmployeeOnboarding/context.d.ts +3 -3
  230. package/dist/flows/PayrollEmployeeOnboarding/hooks.d.ts +3 -3
  231. package/dist/flows/PayrollEmployeeOnboarding/hooks.js +1 -1
  232. package/dist/flows/PayrollEmployeeOnboarding/index.d.ts +4 -5
  233. package/dist/flows/PayrollEmployeeOnboarding/index.js +1 -1
  234. package/dist/flows/PayrollEmployeeOnboarding/types.d.ts +3 -3
  235. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -5
  236. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  237. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -5
  238. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  239. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -5
  240. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  241. package/dist/flows/Termination/TerminationBack.d.ts +2 -2
  242. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -5
  243. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  244. package/dist/flows/Termination/TerminationFlow.d.ts +6 -7
  245. package/dist/flows/Termination/TerminationFlow.js +1 -1
  246. package/dist/flows/Termination/TerminationForm.d.ts +6 -7
  247. package/dist/flows/Termination/TerminationForm.js +1 -1
  248. package/dist/flows/Termination/TerminationSubmit.d.ts +2 -2
  249. package/dist/flows/Termination/api.d.ts +7 -8
  250. package/dist/flows/Termination/api.js +1 -1
  251. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.d.ts +2 -2
  252. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.d.ts +2 -2
  253. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  254. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +9 -10
  255. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +7 -8
  256. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  257. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +7 -8
  258. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.d.ts +2 -2
  259. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  260. package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.d.ts +2 -2
  261. package/dist/flows/Termination/context.d.ts +4 -5
  262. package/dist/flows/Termination/hooks.d.ts +4 -5
  263. package/dist/flows/Termination/hooks.js +1 -1
  264. package/dist/flows/Termination/index.d.ts +7 -8
  265. package/dist/flows/Termination/index.js +1 -1
  266. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -5
  267. package/dist/flows/Termination/types.d.ts +4 -5
  268. package/dist/flows/Termination/utils.d.ts +4 -5
  269. package/dist/flows/types.d.ts +2 -2
  270. package/dist/flows/utils.d.ts +2 -2
  271. package/dist/index.d.ts +19 -19
  272. package/dist/index.js +2 -2
  273. package/dist/internals.d.ts +48 -48
  274. package/dist/internals.js +1 -1
  275. package/dist/{mutations-DZjKx4tI.d.ts → mutations-CS4-N6rs.d.ts} +1 -1
  276. package/dist/{remoteFlows-C4Vv3_7t.d.ts → remoteFlows-XblLRuXf.d.ts} +1 -1
  277. package/dist/{types---jTQSYP.d.ts → types-Cn2zpFdH.d.ts} +3 -3
  278. package/dist/{types-Cjy498SD.d.ts → types-CoXYbvEX.d.ts} +3 -3
  279. package/dist/{types-5jgrwYf3.d.ts → types-D-BG15n_.d.ts} +6 -7
  280. package/dist/{types-BDhuq1UF.d.ts → types-DB-5lvAd.d.ts} +21 -12
  281. package/dist/{types-Buo22VR2.d.ts → types-DTBS32xf.d.ts} +5 -6
  282. package/dist/{types-5vsf9upM.d.ts → types-d4sOtWU0.d.ts} +11 -12
  283. package/dist/{types-STTuXABa.d.ts → types-xaJ4vNIC.d.ts} +4 -5
  284. package/dist/{types.gen-CTQ9C-mR.d.ts → types.gen-lBDxKNB_.d.ts} +23 -1
  285. package/dist/{utils-B2zQN-4q.d.ts → utils-DC8X38CO.d.ts} +1 -1
  286. package/package.json +20 -20
  287. package/dist/CheckboxFieldDefault-H6DFZZRM.js +0 -2
  288. package/dist/CountryFieldDefault-ZPDRAEWF.js +0 -2
  289. package/dist/DatePickerFieldDefault-BSMELDX2.js +0 -2
  290. package/dist/RadioGroupFieldDefault-SGZXCPSL.js +0 -2
  291. package/dist/TextAreaFieldDefault-TTCPVIBZ.js +0 -2
  292. package/dist/chunk-GZUP2IE6.js.map +0 -1
  293. package/dist/chunk-OQIJAVBT.js +0 -2
  294. package/dist/chunk-OQIJAVBT.js.map +0 -1
  295. package/dist/chunk-UI4AZZD5.js +0 -2
  296. package/dist/chunk-UI4AZZD5.js.map +0 -1
  297. package/dist/chunk-XYCFKCVZ.js +0 -2
  298. package/dist/chunk-XYCFKCVZ.js.map +0 -1
  299. /package/dist/{CheckboxFieldDefault-H6DFZZRM.js.map → CheckboxFieldDefault-OBDOMMWQ.js.map} +0 -0
  300. /package/dist/{CountryFieldDefault-ZPDRAEWF.js.map → CountryFieldDefault-NEFHRUUS.js.map} +0 -0
  301. /package/dist/{DatePickerFieldDefault-BSMELDX2.js.map → DatePickerFieldDefault-NYHK6I2G.js.map} +0 -0
  302. /package/dist/{RadioGroupFieldDefault-SGZXCPSL.js.map → RadioGroupFieldDefault-GF4XVARF.js.map} +0 -0
  303. /package/dist/{TextAreaFieldDefault-TTCPVIBZ.js.map → TextAreaFieldDefault-HPEUG5UI.js.map} +0 -0
  304. /package/dist/{WorkScheduleFieldDefault-6DC7RDII.js.map → WorkScheduleFieldDefault-D6TGVPHC.js.map} +0 -0
  305. /package/dist/{chunk-V62JQXIC.js.map → chunk-2PMYCCWO.js.map} +0 -0
  306. /package/dist/{chunk-W7MCRAQ4.js.map → chunk-3D7HWCNX.js.map} +0 -0
  307. /package/dist/{chunk-TOOCSXXQ.js.map → chunk-3PYZQWDY.js.map} +0 -0
  308. /package/dist/{chunk-KN2Q5NOL.js.map → chunk-4WBEA4IY.js.map} +0 -0
  309. /package/dist/{chunk-7FCKRGGD.js.map → chunk-57G3ZAX3.js.map} +0 -0
  310. /package/dist/{chunk-PTPNWD53.js.map → chunk-6VODJDBH.js.map} +0 -0
  311. /package/dist/{chunk-4TNJXIDB.js.map → chunk-6YBDMERC.js.map} +0 -0
  312. /package/dist/{chunk-UOYIAURS.js.map → chunk-7EKNQYS5.js.map} +0 -0
  313. /package/dist/{chunk-YD54NZIX.js.map → chunk-7KMXTQ4C.js.map} +0 -0
  314. /package/dist/{chunk-V5EBEJON.js.map → chunk-7R7AQHV2.js.map} +0 -0
  315. /package/dist/{chunk-TCFTRE7G.js.map → chunk-ABQLD4SS.js.map} +0 -0
  316. /package/dist/{chunk-W2WHWA5J.js.map → chunk-B3OYZQSP.js.map} +0 -0
  317. /package/dist/{chunk-NG562U46.js.map → chunk-B5KAHNYW.js.map} +0 -0
  318. /package/dist/{chunk-Y34DKDJI.js.map → chunk-BLCINT3L.js.map} +0 -0
  319. /package/dist/{chunk-G556HMVA.js.map → chunk-COAJUZSE.js.map} +0 -0
  320. /package/dist/{chunk-M5ARBNKW.js.map → chunk-FAJ5I4Q4.js.map} +0 -0
  321. /package/dist/{chunk-AC4MDLIM.js.map → chunk-FEWMPYBF.js.map} +0 -0
  322. /package/dist/{chunk-32ERURM2.js.map → chunk-FOUXLCEA.js.map} +0 -0
  323. /package/dist/{chunk-VYZOGC65.js.map → chunk-FXJM54I4.js.map} +0 -0
  324. /package/dist/{chunk-6Y5WCCMH.js.map → chunk-GGULUMOP.js.map} +0 -0
  325. /package/dist/{chunk-DNAPYU5I.js.map → chunk-GJV6HJ3D.js.map} +0 -0
  326. /package/dist/{chunk-JSTCIALQ.js.map → chunk-GTU6MTZH.js.map} +0 -0
  327. /package/dist/{chunk-HAACNERA.js.map → chunk-HADEU7QX.js.map} +0 -0
  328. /package/dist/{chunk-54Z4QJ3Q.js.map → chunk-HGIMRQIZ.js.map} +0 -0
  329. /package/dist/{chunk-34U3WJ75.js.map → chunk-HHFDREGB.js.map} +0 -0
  330. /package/dist/{chunk-5DGTMYWR.js.map → chunk-I7JKBQHL.js.map} +0 -0
  331. /package/dist/{chunk-ODXNPBKO.js.map → chunk-ICNC2RV5.js.map} +0 -0
  332. /package/dist/{chunk-EFC4EDTM.js.map → chunk-IL3IFNO5.js.map} +0 -0
  333. /package/dist/{chunk-LIPJXO2R.js.map → chunk-INPMEOFL.js.map} +0 -0
  334. /package/dist/{chunk-UEPT6OBL.js.map → chunk-KBUBBK2E.js.map} +0 -0
  335. /package/dist/{chunk-MF3W2PJ7.js.map → chunk-KEYWBQH2.js.map} +0 -0
  336. /package/dist/{chunk-6P536SW2.js.map → chunk-KFFTPU6V.js.map} +0 -0
  337. /package/dist/{chunk-MUXNVLZO.js.map → chunk-KH4DEFZT.js.map} +0 -0
  338. /package/dist/{chunk-ELM6CPRT.js.map → chunk-KRZGFZUS.js.map} +0 -0
  339. /package/dist/{chunk-3YTML5RG.js.map → chunk-MBOKEWSX.js.map} +0 -0
  340. /package/dist/{chunk-R2JJUSD3.js.map → chunk-MQTRTRV6.js.map} +0 -0
  341. /package/dist/{chunk-QIAK5VU7.js.map → chunk-MZXFOY5T.js.map} +0 -0
  342. /package/dist/{chunk-JBQOE3XL.js.map → chunk-MZZFNRW5.js.map} +0 -0
  343. /package/dist/{chunk-JFPOX7SW.js.map → chunk-NJNJACVL.js.map} +0 -0
  344. /package/dist/{chunk-QI4MWDJS.js.map → chunk-O3KGCVBO.js.map} +0 -0
  345. /package/dist/{chunk-XNDOPTDJ.js.map → chunk-OKSKBEIR.js.map} +0 -0
  346. /package/dist/{chunk-YYJH3TPJ.js.map → chunk-OVU2VJM6.js.map} +0 -0
  347. /package/dist/{chunk-2Q462FT7.js.map → chunk-P6H7QMKK.js.map} +0 -0
  348. /package/dist/{chunk-ENV2K73V.js.map → chunk-PET4EGTM.js.map} +0 -0
  349. /package/dist/{chunk-DPXSK2UQ.js.map → chunk-PIIWY632.js.map} +0 -0
  350. /package/dist/{chunk-ITDU6XPR.js.map → chunk-PJPYUB2R.js.map} +0 -0
  351. /package/dist/{chunk-PJ6KPGIE.js.map → chunk-PMRAJKJ5.js.map} +0 -0
  352. /package/dist/{chunk-VTWVHO4F.js.map → chunk-QV7CEES3.js.map} +0 -0
  353. /package/dist/{chunk-QZFKUU4A.js.map → chunk-S7DDWZOR.js.map} +0 -0
  354. /package/dist/{chunk-LLHJODMO.js.map → chunk-SHOGXN3C.js.map} +0 -0
  355. /package/dist/{chunk-TBGXSWRX.js.map → chunk-SKQZ6BPK.js.map} +0 -0
  356. /package/dist/{chunk-75XZ4KIX.js.map → chunk-UBBUH2DE.js.map} +0 -0
  357. /package/dist/{chunk-UW3TUDJR.js.map → chunk-UD24LBJ6.js.map} +0 -0
  358. /package/dist/{chunk-W5MWHAAI.js.map → chunk-UELAVKG5.js.map} +0 -0
  359. /package/dist/{chunk-VNHXMVTF.js.map → chunk-UFAQ7CQH.js.map} +0 -0
  360. /package/dist/{chunk-3EYFXA3W.js.map → chunk-VMZQN4WU.js.map} +0 -0
  361. /package/dist/{chunk-WMJP2BO5.js.map → chunk-VV3LCB77.js.map} +0 -0
  362. /package/dist/{chunk-LD5KN4ZF.js.map → chunk-VWO7PDZ4.js.map} +0 -0
  363. /package/dist/{chunk-7BPB4PXN.js.map → chunk-WIFDQWVX.js.map} +0 -0
  364. /package/dist/{chunk-KXQVUSLI.js.map → chunk-WRCHICCJ.js.map} +0 -0
  365. /package/dist/{chunk-YQOONCKH.js.map → chunk-XE6HQVLQ.js.map} +0 -0
  366. /package/dist/{chunk-76VZ4ARW.js.map → chunk-XFQS2BVE.js.map} +0 -0
  367. /package/dist/{chunk-YWJS3RL5.js.map → chunk-XLURXRQT.js.map} +0 -0
  368. /package/dist/{chunk-KY4PEPYW.js.map → chunk-YOFPHSYV.js.map} +0 -0
  369. /package/dist/{chunk-HK4LGSS7.js.map → chunk-YQQHCS4S.js.map} +0 -0
  370. /package/dist/{chunk-XV7SBFS5.js.map → chunk-YXHSALDR.js.map} +0 -0
  371. /package/dist/{chunk-UYGDMJF2.js.map → chunk-ZMQTQ4UQ.js.map} +0 -0
  372. /package/dist/{chunk-DRAQLW6C.js.map → chunk-ZSN43HMP.js.map} +0 -0
  373. /package/dist/{chunk-AXDL47BE.js.map → chunk-ZTNH2YIM.js.map} +0 -0
  374. /package/dist/{chunk-HSVLNS27.js.map → chunk-ZY7RAGEL.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as J}from"./chunk-OXTA4W4J.js";import{a as re}from"./chunk-RR57VT45.js";import{b as ne,c as ie,f as le}from"./chunk-FQFLC6YA.js";import{a as oe}from"./chunk-LLHJODMO.js";import{a as te}from"./chunk-OV6PV4N5.js";import{c as G}from"./chunk-2Q462FT7.js";import{c as g,i as T,m as B}from"./chunk-Y3CJRZLA.js";import{l as j,m as ee,n as H,r as O}from"./chunk-G2LZFGZA.js";import{b as S,c as x}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{Fragment as no,useEffect as io,useRef as We}from"react";import V from"lodash.omit";import{jsx as se}from"react/jsx-runtime";function me({description:e,label:o,name:t,minDate:r,maxDate:i,onChange:l,component:a,...s}){let{components:p}=S(),{control:u}=g(),F=x(),m;s.meta?.mot&&typeof s.meta.mot=="number"?m=j(s.meta.mot):typeof r=="string"&&(m=new Date(`${r}T00:00:00`));let f;return i&&(f=new Date(`${i}T23:59:59`)),se(T,{control:u,name:t,render:({field:C,fieldState:h})=>{let c=a||p?.date;if(!c)throw new Error(`Date picker component not found for field ${t}`);let P={description:e,label:o,name:t,onChange:l,transformHtml:F,...m&&{minDate:m.toISOString()},...f&&{maxDate:f.toISOString()},...s};return se(c,{field:{...C,onChange:n(y=>{C.onChange(y),l?.(y)},"onChange")},fieldState:h,fieldData:P})}})}n(me,"DatePickerField");import{jsx as ae}from"react/jsx-runtime";var Oe=n((e,o)=>{if(!o)return null;for(let t of e)if(t.size>o){let r=Math.round(o/1048576),i=Math.round(t.size/(1024*1024));return`File "${t.name}" exceeds maximum size of ${r}MB (file is ${i}MB)`}return null},"validateFileSize");function de({name:e,description:o,label:t,multiple:r,onChange:i,component:l,accept:a,maxSize:s,...p}){let{components:u}=S(),{control:F,setError:m,clearErrors:f}=g(),C=x(),h=n(async(c,P)=>{let y=Oe(c,s);if(y){m(e,{message:y});return}f(e),P.onChange(c),i?.(c)},"handleOnChange");return ae(T,{control:F,name:e,render:({field:c,fieldState:P})=>{let y=l||u.file;if(!y)throw new Error(`File upload component not found for field ${e}`);let b={name:e,description:o,label:t,multiple:r,accept:a,maxFileSize:s,transformHtml:C,...p};return ae(y,{field:{...c,value:c.value,onChange:n(async w=>h(w,c),"onChange")},fieldState:P,fieldData:b})}})}n(de,"FileUploadField");import{jsx as pe}from"react/jsx-runtime";function I({component:e,onChange:o,...t}){let{components:r}=S(),{control:i}=g(),l=x();return pe(T,{control:i,name:t.name,render:({field:a,fieldState:s})=>{let p=e||r.number;if(!p)throw new Error(`Number component not found for field ${t.name}`);let u={onChange:o,transformHtml:l,...t};return pe(p,{field:{...a,onChange:n(F=>{a.onChange(F),o?.(F)},"onChange")},fieldState:s,fieldData:u})}})}n(I,"NumberField");import{jsx as ce}from"react/jsx-runtime";function ue({name:e,defaultValue:o,description:t,label:r,options:i,onChange:l,component:a,...s}){let{components:p}=S(),{control:u}=g(),F=x();return ce(T,{control:u,name:e,defaultValue:o,render:({field:m,fieldState:f})=>{let C=a||p?.radio;if(!C)throw new Error(`Radio group component not found for field ${e}`);let h={name:e,defaultValue:o,description:t,label:r,options:i,transformHtml:F,...s};return ce(C,{field:{...m,onChange:n(c=>{m.onChange(c),l?.(c)},"onChange")},fieldState:f,fieldData:h})}})}n(ue,"RadioGroupField");import{jsx as Fe}from"react/jsx-runtime";function fe({label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,component:a,...s}){let{control:p}=g(),{components:u}=S(),F=x();return Fe(T,{defaultValue:r,control:p,name:o,render:({field:m,fieldState:f})=>{let C=a||u?.select;if(!C)throw new Error(`Select component not found for field ${o}`);let h={label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,transformHtml:F,...s};return Fe(C,{field:{...m,onChange:n(c=>{let y=(Array.isArray(s.jsonType)?s.jsonType.includes("number"):s.jsonType==="number")?Number(c):c;m.onChange(y),l?.(y)},"onChange")},fieldState:f,fieldData:h})}})}n(fe,"SelectField");import{jsx as Ce}from"react/jsx-runtime";function ge({label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,$meta:a,component:s,...p}){let{control:u}=g(),{components:F}=S(),m=x();return Ce(T,{defaultValue:r,control:u,name:o,render:({field:f,fieldState:C})=>{let h=s||F.countries;if(!h)throw new Error(`Country component not found for field ${o}`);let c={label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,$meta:a,transformHtml:m,...p};return Ce(h,{field:{...f,onChange:n(P=>{f.onChange(P),l?.(P)},"onChange")},fieldState:C,fieldData:c})}})}n(ge,"CountryField");import{jsx as he}from"react/jsx-runtime";function Se({name:e,description:o,label:t,onChange:r,maxLength:i,component:l,...a}){let{components:s}=S(),{control:p}=g(),u=x();return he(T,{control:p,name:e,render:({field:F,fieldState:m})=>{let f=l||s.textarea;if(!f)throw new Error(`Text area component not found for field ${e}`);let C={name:e,description:o,label:t,maxLength:i,transformHtml:u,...a};return he(f,{field:{...F,onChange:n(h=>{F.onChange(h),r?.(h)},"onChange")},fieldState:m,fieldData:C})}})}n(Se,"TextAreaField");import{jsx as Te}from"react/jsx-runtime";function xe({component:e,onChange:o,...t}){let{components:r}=S(),{control:i}=g(),l=x();return Te(T,{control:i,name:t.name,render:({field:a,fieldState:s})=>{let p=e||r.email;if(!p)throw new Error(`Email component not found for field ${t.name}`);let u={onChange:o,transformHtml:l,...t};return Te(p,{field:{...a,onChange:n(F=>{a.onChange(F),o?.(F)},"onChange")},fieldState:s,fieldData:u})}})}n(xe,"EmailField");import{useEffect as Ge}from"react";import{jsx as ye}from"react/jsx-runtime";function be(e){let{control:o,setValue:t}=g();return Ge(()=>{e.const!==void 0&&e.const===e.default&&e.name&&t(e.name,e.const)},[e.const,e.default,e.name,t]),ye(T,{control:o,name:e.name,render:({field:r})=>ye("input",{...r,type:"hidden"})})}n(be,"HiddenField");import{useEffect as Ue,useState as Ze}from"react";import{jsx as Pe}from"react/jsx-runtime";function $e(e){let{components:o}=S(),{setValue:t,control:r,watch:i}=g(),l=x(),a=i(e.name),[s,p]=Ze(a),{workHoursSummary:u,breakSummary:F}=ie(s),m=ne(s);Ue(()=>{t(e.name,s)},[s,e.name,t]);function f(c){p(c)}n(f,"onSubmit");let C=e.component||o["work-schedule"];if(!C)throw new Error(`Work schedule component not found for field ${e.name}`);let h={...e,onSubmit:f,currentSchedule:s,transformHtml:l,defaultFormattedValue:{workHoursSummary:u,breakSummary:F,totalWorkHours:m}};return Pe(T,{control:r,name:e.name,render:({field:c,fieldState:P})=>Pe(C,{field:{...c,onChange:n(y=>{c.onChange(y),e.onChange?.(y)},"onChange")},fieldState:P,fieldData:h})})}n($e,"WorkScheduleField");import{jsx as De}from"react/jsx-runtime";function Re({label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,component:a,...s}){let{control:p}=g(),{components:u}=S(),F=x();return De(T,{defaultValue:r,control:p,name:o,render:({field:m,fieldState:f})=>{let C=a||u?.["multi-select"];if(!C)throw new Error(`Multi select component not found for field ${o}`);let h={label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,transformHtml:F,...s};return De(C,{field:{...m,onChange:n(c=>{m.onChange(c),l?.(c)},"onChange")},fieldState:f,fieldData:h})}})}n(Re,"MultiSelectField");import{jsx as Ke}from"react/jsx-runtime";var ve=n(e=>Ke(I,{maxLength:15,...e}),"MoneyField");import{useMemo as L,useCallback as we,useState as qe,useEffect as Qe,useRef as Xe}from"react";import{jsx as U}from"react/jsx-runtime";function Ye(e){return e.replace(/\s/g,"")}n(Ye,"removeSpaces");function _e(e="",o){let t=new RegExp(`^(\\+|00)(\\d{${o?.dialCode?.length??0}})(.*)$`),r=e?.match(t);if(!r)return{prefix:"",dialCode:"",phoneNumber:e};let[,i,l,a]=r;return{prefix:i,dialCode:l,phoneNumber:a}}n(_e,"getStructuredNumberFromInternationalNumber");function Ee({dialCodes:e,dialCodeMaxLength:o},t){let{prefix:r}=_e(t);if(r)for(let i=o+r.length;i>r.length;i--){let l=t.slice(r.length,i);if(e[l])return e[l]}}n(Ee,"getCountryFromPhoneNumber");function Me(e){let o={},t=0;return e.forEach(r=>{r.areaCodes?r.areaCodes.forEach(i=>{let l=r.dialCode+i;o[l]=r,l.length>t&&(t=l.length)}):(o[r.dialCode]=r,r.dialCode.length>t&&(t=r.dialCode.length))}),{dialCodes:o,dialCodeMaxLength:t}}n(Me,"getCountryDataByCountryCode");function je(e=""){let o=/\(([^)]+)\)/g,t=e.match(o);if(t?.length===2)return t[1].replace(/\(|\)/g,"").split("|")}n(je,"getAreaCodesFromPattern");function eo(e){return e.map(o=>({name:o.label,dialCode:o.meta.countryCode,pattern:o.pattern,areaCodes:je(o.pattern)}))}n(eo,"transformSchemaToCountries");function oo({field:e,fieldState:o,fieldData:t,component:r,onChangeCountryCode:i,onChangePhoneNumber:l}){let{value:a}=e,{options:s}=t,p=L(()=>eo(s),[s]),u=L(()=>Me(p),[p]),F=Xe(!1),[m,f]=qe(()=>Ee(Me(p),a||""));Qe(()=>{if((!a||a==="+")&&(F.current=!1),F.current)return;let b=Ee(u,a||"");f(b)},[a,u]);let{prefix:C,phoneNumber:h}=L(()=>_e(a,m),[a,m]),c=we(b=>{if(!b)return;let w=`+${b.dialCode}${h}`;F.current=!0,f(b),e.onChange(w),i&&i(b)},[h,e,i]),P=we(b=>{let w=Ye(b.target.value),_;if(m?_=`${C}${m.dialCode}${w}`:_=`${C}${w}`,e.onChange(_),l){let N={target:{value:_,name:e.name}};l(N)}},[m,C,e,l]),y=L(()=>({...t,onChangeCountryCode:c,onChangePhoneNumber:P,currentCountry:m,nationalPhoneNumber:h}),[t,c,P,m,h]);return U(r,{field:e,fieldState:o,fieldData:y})}n(oo,"TelFieldRenderer");function Ne({name:e,description:o,label:t,onChangeCountryCode:r,onChangePhoneNumber:i,component:l,...a}){let{components:s}=S(),{control:p}=g(),u=x();return U(T,{control:p,name:e,render:({field:F,fieldState:m})=>{let f=l||s.tel;if(!f)throw new Error(`Tel component not found for field ${e}`);let C={name:e,description:o,label:t,transformHtml:u,...a};return U(oo,{field:F,fieldState:m,fieldData:C,component:f,onChangeCountryCode:r,onChangePhoneNumber:i})}})}n(Ne,"TelField");import{jsx as ke}from"react/jsx-runtime";function He({name:e,description:o,label:t,type:r,onChange:i,component:l,maxLength:a,...s}){let{components:p}=S(),{control:u}=g(),F=x();return ke(T,{control:u,name:e,render:({field:m,fieldState:f})=>{let C=l||p?.time;if(!C)throw new Error(`Time component not found for field ${e}`);let h={name:e,description:o,label:t,type:r,onChange:i,maxLength:a,transformHtml:F,...s};return ke(C,{field:{...m,onChange:n(c=>{m.onChange(c),i?.(c)},"onChange")},fieldState:f,fieldData:h})}})}n(He,"TimeField");var Z={checkbox:le,text:te,email:xe,money:ve,select:fe,"multi-select":Re,radio:ue,number:I,file:de,date:me,textarea:Se,countries:ge,hidden:be,tel:Ne,time:He,"work-schedule":$e};import{useEffect as to}from"react";import{jsx as K,jsxs as ro}from"react/jsx-runtime";function Ve({name:e,value:o,description:t,statement:r,label:i,helpCenter:l}){let{setValue:a}=g(),s=r?.description||t,p=r?.title?O(r?.title):O(i),u=`forced-value-${e}-title`,F=`forced-value-${e}-description`;return to(()=>{a(e,o)},[e,o,a]),!s&&!r?.title?null:ro("div",{role:"group","aria-labelledby":p?u:void 0,"aria-describedby":s?F:void 0,children:[p&&K("p",{id:u,className:`text-sm RemoteFlows__ForcedValue__Title__${e}`,dangerouslySetInnerHTML:{__html:p}}),K(B,{as:"span",id:F,className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,helpCenter:K(oe,{className:"RemoteFlows__ForcedValue__HelpCenterLink",helpCenter:l}),children:s})]})}n(Ve,"ForcedValueField");import{Fragment as q,jsx as $,jsxs as M}from"react/jsx-runtime";function Ae({label:e,name:o,fields:t,description:r,components:i,statement:l,isFlatFieldset:a,extra:s,variant:p="outset",features:u,meta:F}){let{helpCenter:m}=F||{},{watch:f,setValue:C,trigger:h,formState:c}=g(),{components:P}=S(),y=u?.toggle?.stateField,b=y?f(y):u?.toggle?.defaultExpanded??!0,w=t.map(({name:d})=>`${o}.${d}`),_=t.some(d=>d.calculateDynamicProperties),N=f(w),Be=_?f():N,Q=We(N),k=We(null),Je=n(()=>{y&&C(y,!b)},"toggleExpanded");io(()=>{let d=N,E=Q.current,R=c.isSubmitted||c.submitCount>0,W=!1;for(let v=0;v<d.length;v++)if(d[v]!==void 0&&E[v]!==d[v]){W=!0;break}return W&&R&&(k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{h()},50)),Q.current=[...d],()=>{k.current&&clearTimeout(k.current)}},[N,h,c.isSubmitted,c.submitCount]);let Ie=P?.fieldsetToggle||re,X=`${o}-content`,Y=`${o}-header`;return M("fieldset",{className:H("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${o}`),children:[$("legend",{className:H("text-sm font-semibold px-2",p==="inset"&&"hidden"),children:e}),m?.callToAction&&m?.id&&p==="outset"&&$(G,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:m.id,children:m.callToAction}),p==="inset"&&M(q,{children:[M("div",{className:"RemoteFlows__FieldSetField__Header",id:Y,"data-state":b?"expanded":"collapsed","aria-expanded":b,children:[$("h3",{className:H("RemoteFlows__FieldSetField__Title"),children:e}),u?.toggle?.enabled&&$(Ie,{isExpanded:b,onToggle:Je,"aria-expanded":b,"aria-controls":X,"aria-label":`${b?"Hide":"Show"} ${e}`,className:H("RemoteFlows__FieldSetField__Toggle",u.toggle?.className),children:b?u.toggle.labels?.collapse??"Remove":u.toggle.labels?.expand??"Define"})]}),m?.callToAction&&m?.id&&$(G,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:m.id,children:m.callToAction})]}),b&&M("div",{id:X,"aria-labelledby":Y,role:"region",children:[r?$(B,{as:"div",className:"mb-5 RemoteFlows__FieldSetField__Description",children:r}):null,M("div",{className:"grid gap-4",children:[t.map(d=>{if(d.calculateDynamicProperties&&(d={...d,...d.calculateDynamicProperties(Be,d)||{}}),d.isVisible===!1||d.deprecated)return null;let E=d.type,R=`${a?d.name:`${o}.${d.name}`}`,W=ee(d),v=n((D,A)=>d.WrapperComponent?$(d.WrapperComponent,{children:D},A):$(no,{children:D},A),"wrapWithCustomWrapper");if(W){let D=V(d,"WrapperComponent");return v($(Ve,{name:R,description:D.description,value:D.const,statement:D.statement,label:D.label,helpCenter:D.meta?.helpCenter}),R)}if(E==="fieldset"){let D=V(d,"WrapperComponent");return v($(Ae,{...D,name:R,components:i}),R)}if(E==="fieldset-flat"){let D=V(d,"WrapperComponent");return v($(Ae,{...D,name:R,components:i,isFlatFieldset:!0}),R)}let z=Z[E];if(d.Component){let{Component:D}=d,A=V(d,"WrapperComponent");return v(M(q,{children:[$(D,{...A,value:f(R),setValue:ze=>{C(R,ze)}}),d.statement?$(J,{...d.statement}):null,d.extra?d.extra:null]}),R)}if(!z)return M("p",{className:"error",children:["Field type ",E," not supported"]});E==="select"&&d.multiple&&(z=Z["multi-select"]);let Le=V(d,"WrapperComponent");return v(M(q,{children:[$(z,{...Le,name:R,component:i?.[E]}),d.statement?$(J,{...d.statement}):null,d.extra?d.extra:null]}),R)}),s||null,l?$(J,{...l}):null]})]})]})}n(Ae,"FieldSetField");export{Z as a,Ve as b,Ae as c};
2
- //# sourceMappingURL=chunk-3YTML5RG.js.map
1
+ import{a as J}from"./chunk-OXTA4W4J.js";import{a as re}from"./chunk-RR57VT45.js";import{b as ne,c as ie,f as le}from"./chunk-FQFLC6YA.js";import{a as oe}from"./chunk-SHOGXN3C.js";import{a as te}from"./chunk-OV6PV4N5.js";import{c as G}from"./chunk-P6H7QMKK.js";import{c as g,i as T,m as B}from"./chunk-Y3CJRZLA.js";import{l as j,m as ee,n as H,r as O}from"./chunk-G2LZFGZA.js";import{b as S,c as x}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{Fragment as no,useEffect as io,useRef as We}from"react";import V from"lodash.omit";import{jsx as se}from"react/jsx-runtime";function me({description:e,label:o,name:t,minDate:r,maxDate:i,onChange:l,component:a,...s}){let{components:p}=S(),{control:u}=g(),F=x(),m;s.meta?.mot&&typeof s.meta.mot=="number"?m=j(s.meta.mot):typeof r=="string"&&(m=new Date(`${r}T00:00:00`));let f;return i&&(f=new Date(`${i}T23:59:59`)),se(T,{control:u,name:t,render:({field:C,fieldState:h})=>{let c=a||p?.date;if(!c)throw new Error(`Date picker component not found for field ${t}`);let P={description:e,label:o,name:t,onChange:l,transformHtml:F,...m&&{minDate:m.toISOString()},...f&&{maxDate:f.toISOString()},...s};return se(c,{field:{...C,onChange:n(y=>{C.onChange(y),l?.(y)},"onChange")},fieldState:h,fieldData:P})}})}n(me,"DatePickerField");import{jsx as ae}from"react/jsx-runtime";var Oe=n((e,o)=>{if(!o)return null;for(let t of e)if(t.size>o){let r=Math.round(o/1048576),i=Math.round(t.size/(1024*1024));return`File "${t.name}" exceeds maximum size of ${r}MB (file is ${i}MB)`}return null},"validateFileSize");function de({name:e,description:o,label:t,multiple:r,onChange:i,component:l,accept:a,maxSize:s,...p}){let{components:u}=S(),{control:F,setError:m,clearErrors:f}=g(),C=x(),h=n(async(c,P)=>{let y=Oe(c,s);if(y){m(e,{message:y});return}f(e),P.onChange(c),i?.(c)},"handleOnChange");return ae(T,{control:F,name:e,render:({field:c,fieldState:P})=>{let y=l||u.file;if(!y)throw new Error(`File upload component not found for field ${e}`);let b={name:e,description:o,label:t,multiple:r,accept:a,maxFileSize:s,transformHtml:C,...p};return ae(y,{field:{...c,value:c.value,onChange:n(async w=>h(w,c),"onChange")},fieldState:P,fieldData:b})}})}n(de,"FileUploadField");import{jsx as pe}from"react/jsx-runtime";function I({component:e,onChange:o,...t}){let{components:r}=S(),{control:i}=g(),l=x();return pe(T,{control:i,name:t.name,render:({field:a,fieldState:s})=>{let p=e||r.number;if(!p)throw new Error(`Number component not found for field ${t.name}`);let u={onChange:o,transformHtml:l,...t};return pe(p,{field:{...a,onChange:n(F=>{a.onChange(F),o?.(F)},"onChange")},fieldState:s,fieldData:u})}})}n(I,"NumberField");import{jsx as ce}from"react/jsx-runtime";function ue({name:e,defaultValue:o,description:t,label:r,options:i,onChange:l,component:a,...s}){let{components:p}=S(),{control:u}=g(),F=x();return ce(T,{control:u,name:e,defaultValue:o,render:({field:m,fieldState:f})=>{let C=a||p?.radio;if(!C)throw new Error(`Radio group component not found for field ${e}`);let h={name:e,defaultValue:o,description:t,label:r,options:i,transformHtml:F,...s};return ce(C,{field:{...m,onChange:n(c=>{m.onChange(c),l?.(c)},"onChange")},fieldState:f,fieldData:h})}})}n(ue,"RadioGroupField");import{jsx as Fe}from"react/jsx-runtime";function fe({label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,component:a,...s}){let{control:p}=g(),{components:u}=S(),F=x();return Fe(T,{defaultValue:r,control:p,name:o,render:({field:m,fieldState:f})=>{let C=a||u?.select;if(!C)throw new Error(`Select component not found for field ${o}`);let h={label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,transformHtml:F,...s};return Fe(C,{field:{...m,onChange:n(c=>{let y=(Array.isArray(s.jsonType)?s.jsonType.includes("number"):s.jsonType==="number")?Number(c):c;m.onChange(y),l?.(y)},"onChange")},fieldState:f,fieldData:h})}})}n(fe,"SelectField");import{jsx as Ce}from"react/jsx-runtime";function ge({label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,$meta:a,component:s,...p}){let{control:u}=g(),{components:F}=S(),m=x();return Ce(T,{defaultValue:r,control:u,name:o,render:({field:f,fieldState:C})=>{let h=s||F.countries;if(!h)throw new Error(`Country component not found for field ${o}`);let c={label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,$meta:a,transformHtml:m,...p};return Ce(h,{field:{...f,onChange:n(P=>{f.onChange(P),l?.(P)},"onChange")},fieldState:C,fieldData:c})}})}n(ge,"CountryField");import{jsx as he}from"react/jsx-runtime";function Se({name:e,description:o,label:t,onChange:r,maxLength:i,component:l,...a}){let{components:s}=S(),{control:p}=g(),u=x();return he(T,{control:p,name:e,render:({field:F,fieldState:m})=>{let f=l||s.textarea;if(!f)throw new Error(`Text area component not found for field ${e}`);let C={name:e,description:o,label:t,maxLength:i,transformHtml:u,...a};return he(f,{field:{...F,onChange:n(h=>{F.onChange(h),r?.(h)},"onChange")},fieldState:m,fieldData:C})}})}n(Se,"TextAreaField");import{jsx as Te}from"react/jsx-runtime";function xe({component:e,onChange:o,...t}){let{components:r}=S(),{control:i}=g(),l=x();return Te(T,{control:i,name:t.name,render:({field:a,fieldState:s})=>{let p=e||r.email;if(!p)throw new Error(`Email component not found for field ${t.name}`);let u={onChange:o,transformHtml:l,...t};return Te(p,{field:{...a,onChange:n(F=>{a.onChange(F),o?.(F)},"onChange")},fieldState:s,fieldData:u})}})}n(xe,"EmailField");import{useEffect as Ge}from"react";import{jsx as ye}from"react/jsx-runtime";function be(e){let{control:o,setValue:t}=g();return Ge(()=>{e.const!==void 0&&e.const===e.default&&e.name&&t(e.name,e.const)},[e.const,e.default,e.name,t]),ye(T,{control:o,name:e.name,render:({field:r})=>ye("input",{...r,type:"hidden"})})}n(be,"HiddenField");import{useEffect as Ue,useState as Ze}from"react";import{jsx as Pe}from"react/jsx-runtime";function $e(e){let{components:o}=S(),{setValue:t,control:r,watch:i}=g(),l=x(),a=i(e.name),[s,p]=Ze(a),{workHoursSummary:u,breakSummary:F}=ie(s),m=ne(s);Ue(()=>{t(e.name,s)},[s,e.name,t]);function f(c){p(c)}n(f,"onSubmit");let C=e.component||o["work-schedule"];if(!C)throw new Error(`Work schedule component not found for field ${e.name}`);let h={...e,onSubmit:f,currentSchedule:s,transformHtml:l,defaultFormattedValue:{workHoursSummary:u,breakSummary:F,totalWorkHours:m}};return Pe(T,{control:r,name:e.name,render:({field:c,fieldState:P})=>Pe(C,{field:{...c,onChange:n(y=>{c.onChange(y),e.onChange?.(y)},"onChange")},fieldState:P,fieldData:h})})}n($e,"WorkScheduleField");import{jsx as De}from"react/jsx-runtime";function Re({label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,component:a,...s}){let{control:p}=g(),{components:u}=S(),F=x();return De(T,{defaultValue:r,control:p,name:o,render:({field:m,fieldState:f})=>{let C=a||u?.["multi-select"];if(!C)throw new Error(`Multi select component not found for field ${o}`);let h={label:e,name:o,options:t,defaultValue:r,description:i,onChange:l,transformHtml:F,...s};return De(C,{field:{...m,onChange:n(c=>{m.onChange(c),l?.(c)},"onChange")},fieldState:f,fieldData:h})}})}n(Re,"MultiSelectField");import{jsx as Ke}from"react/jsx-runtime";var ve=n(e=>Ke(I,{maxLength:15,...e}),"MoneyField");import{useMemo as L,useCallback as we,useState as qe,useEffect as Qe,useRef as Xe}from"react";import{jsx as U}from"react/jsx-runtime";function Ye(e){return e.replace(/\s/g,"")}n(Ye,"removeSpaces");function _e(e="",o){let t=new RegExp(`^(\\+|00)(\\d{${o?.dialCode?.length??0}})(.*)$`),r=e?.match(t);if(!r)return{prefix:"",dialCode:"",phoneNumber:e};let[,i,l,a]=r;return{prefix:i,dialCode:l,phoneNumber:a}}n(_e,"getStructuredNumberFromInternationalNumber");function Ee({dialCodes:e,dialCodeMaxLength:o},t){let{prefix:r}=_e(t);if(r)for(let i=o+r.length;i>r.length;i--){let l=t.slice(r.length,i);if(e[l])return e[l]}}n(Ee,"getCountryFromPhoneNumber");function Me(e){let o={},t=0;return e.forEach(r=>{r.areaCodes?r.areaCodes.forEach(i=>{let l=r.dialCode+i;o[l]=r,l.length>t&&(t=l.length)}):(o[r.dialCode]=r,r.dialCode.length>t&&(t=r.dialCode.length))}),{dialCodes:o,dialCodeMaxLength:t}}n(Me,"getCountryDataByCountryCode");function je(e=""){let o=/\(([^)]+)\)/g,t=e.match(o);if(t?.length===2)return t[1].replace(/\(|\)/g,"").split("|")}n(je,"getAreaCodesFromPattern");function eo(e){return e.map(o=>({name:o.label,dialCode:o.meta.countryCode,pattern:o.pattern,areaCodes:je(o.pattern)}))}n(eo,"transformSchemaToCountries");function oo({field:e,fieldState:o,fieldData:t,component:r,onChangeCountryCode:i,onChangePhoneNumber:l}){let{value:a}=e,{options:s}=t,p=L(()=>eo(s),[s]),u=L(()=>Me(p),[p]),F=Xe(!1),[m,f]=qe(()=>Ee(Me(p),a||""));Qe(()=>{if((!a||a==="+")&&(F.current=!1),F.current)return;let b=Ee(u,a||"");f(b)},[a,u]);let{prefix:C,phoneNumber:h}=L(()=>_e(a,m),[a,m]),c=we(b=>{if(!b)return;let w=`+${b.dialCode}${h}`;F.current=!0,f(b),e.onChange(w),i&&i(b)},[h,e,i]),P=we(b=>{let w=Ye(b.target.value),_;if(m?_=`${C}${m.dialCode}${w}`:_=`${C}${w}`,e.onChange(_),l){let N={target:{value:_,name:e.name}};l(N)}},[m,C,e,l]),y=L(()=>({...t,onChangeCountryCode:c,onChangePhoneNumber:P,currentCountry:m,nationalPhoneNumber:h}),[t,c,P,m,h]);return U(r,{field:e,fieldState:o,fieldData:y})}n(oo,"TelFieldRenderer");function Ne({name:e,description:o,label:t,onChangeCountryCode:r,onChangePhoneNumber:i,component:l,...a}){let{components:s}=S(),{control:p}=g(),u=x();return U(T,{control:p,name:e,render:({field:F,fieldState:m})=>{let f=l||s.tel;if(!f)throw new Error(`Tel component not found for field ${e}`);let C={name:e,description:o,label:t,transformHtml:u,...a};return U(oo,{field:F,fieldState:m,fieldData:C,component:f,onChangeCountryCode:r,onChangePhoneNumber:i})}})}n(Ne,"TelField");import{jsx as ke}from"react/jsx-runtime";function He({name:e,description:o,label:t,type:r,onChange:i,component:l,maxLength:a,...s}){let{components:p}=S(),{control:u}=g(),F=x();return ke(T,{control:u,name:e,render:({field:m,fieldState:f})=>{let C=l||p?.time;if(!C)throw new Error(`Time component not found for field ${e}`);let h={name:e,description:o,label:t,type:r,onChange:i,maxLength:a,transformHtml:F,...s};return ke(C,{field:{...m,onChange:n(c=>{m.onChange(c),i?.(c)},"onChange")},fieldState:f,fieldData:h})}})}n(He,"TimeField");var Z={checkbox:le,text:te,email:xe,money:ve,select:fe,"multi-select":Re,radio:ue,number:I,file:de,date:me,textarea:Se,countries:ge,hidden:be,tel:Ne,time:He,"work-schedule":$e};import{useEffect as to}from"react";import{jsx as K,jsxs as ro}from"react/jsx-runtime";function Ve({name:e,value:o,description:t,statement:r,label:i,helpCenter:l}){let{setValue:a}=g(),s=r?.description||t,p=r?.title?O(r?.title):O(i),u=`forced-value-${e}-title`,F=`forced-value-${e}-description`;return to(()=>{a(e,o)},[e,o,a]),!s&&!r?.title?null:ro("div",{role:"group","aria-labelledby":p?u:void 0,"aria-describedby":s?F:void 0,children:[p&&K("p",{id:u,className:`text-sm RemoteFlows__ForcedValue__Title__${e}`,dangerouslySetInnerHTML:{__html:p}}),K(B,{as:"span",id:F,className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,helpCenter:K(oe,{className:"RemoteFlows__ForcedValue__HelpCenterLink",helpCenter:l}),children:s})]})}n(Ve,"ForcedValueField");import{Fragment as q,jsx as $,jsxs as M}from"react/jsx-runtime";function Ae({label:e,name:o,fields:t,description:r,components:i,statement:l,isFlatFieldset:a,extra:s,variant:p="outset",features:u,meta:F}){let{helpCenter:m}=F||{},{watch:f,setValue:C,trigger:h,formState:c}=g(),{components:P}=S(),y=u?.toggle?.stateField,b=y?f(y):u?.toggle?.defaultExpanded??!0,w=t.map(({name:d})=>`${o}.${d}`),_=t.some(d=>d.calculateDynamicProperties),N=f(w),Be=_?f():N,Q=We(N),k=We(null),Je=n(()=>{y&&C(y,!b)},"toggleExpanded");io(()=>{let d=N,E=Q.current,R=c.isSubmitted||c.submitCount>0,W=!1;for(let v=0;v<d.length;v++)if(d[v]!==void 0&&E[v]!==d[v]){W=!0;break}return W&&R&&(k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{h()},50)),Q.current=[...d],()=>{k.current&&clearTimeout(k.current)}},[N,h,c.isSubmitted,c.submitCount]);let Ie=P?.fieldsetToggle||re,X=`${o}-content`,Y=`${o}-header`;return M("fieldset",{className:H("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${o}`),children:[$("legend",{className:H("text-sm font-semibold px-2",p==="inset"&&"hidden"),children:e}),m?.callToAction&&m?.id&&p==="outset"&&$(G,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:m.id,children:m.callToAction}),p==="inset"&&M(q,{children:[M("div",{className:"RemoteFlows__FieldSetField__Header",id:Y,"data-state":b?"expanded":"collapsed","aria-expanded":b,children:[$("h3",{className:H("RemoteFlows__FieldSetField__Title"),children:e}),u?.toggle?.enabled&&$(Ie,{isExpanded:b,onToggle:Je,"aria-expanded":b,"aria-controls":X,"aria-label":`${b?"Hide":"Show"} ${e}`,className:H("RemoteFlows__FieldSetField__Toggle",u.toggle?.className),children:b?u.toggle.labels?.collapse??"Remove":u.toggle.labels?.expand??"Define"})]}),m?.callToAction&&m?.id&&$(G,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:m.id,children:m.callToAction})]}),b&&M("div",{id:X,"aria-labelledby":Y,role:"region",children:[r?$(B,{as:"div",className:"mb-5 RemoteFlows__FieldSetField__Description",children:r}):null,M("div",{className:"grid gap-4",children:[t.map(d=>{if(d.calculateDynamicProperties&&(d={...d,...d.calculateDynamicProperties(Be,d)||{}}),d.isVisible===!1||d.deprecated)return null;let E=d.type,R=`${a?d.name:`${o}.${d.name}`}`,W=ee(d),v=n((D,A)=>d.WrapperComponent?$(d.WrapperComponent,{children:D},A):$(no,{children:D},A),"wrapWithCustomWrapper");if(W){let D=V(d,"WrapperComponent");return v($(Ve,{name:R,description:D.description,value:D.const,statement:D.statement,label:D.label,helpCenter:D.meta?.helpCenter}),R)}if(E==="fieldset"){let D=V(d,"WrapperComponent");return v($(Ae,{...D,name:R,components:i}),R)}if(E==="fieldset-flat"){let D=V(d,"WrapperComponent");return v($(Ae,{...D,name:R,components:i,isFlatFieldset:!0}),R)}let z=Z[E];if(d.Component){let{Component:D}=d,A=V(d,"WrapperComponent");return v(M(q,{children:[$(D,{...A,value:f(R),setValue:ze=>{C(R,ze)}}),d.statement?$(J,{...d.statement}):null,d.extra?d.extra:null]}),R)}if(!z)return M("p",{className:"error",children:["Field type ",E," not supported"]});E==="select"&&d.multiple&&(z=Z["multi-select"]);let Le=V(d,"WrapperComponent");return v(M(q,{children:[$(z,{...Le,name:R,component:i?.[E]}),d.statement?$(J,{...d.statement}):null,d.extra?d.extra:null]}),R)}),s||null,l?$(J,{...l}):null]})]})]})}n(Ae,"FieldSetField");export{Z as a,Ve as b,Ae as c};
2
+ //# sourceMappingURL=chunk-MBOKEWSX.js.map
@@ -1,2 +1,2 @@
1
- import{a as L,b as H,c as U,e as O}from"./chunk-N6XLGYRK.js";import{f as W}from"./chunk-UYGDMJF2.js";import{a as oe}from"./chunk-54Z4QJ3Q.js";import{a as ie}from"./chunk-W5MWHAAI.js";import{a as _,c as I,d as k,e as J,f as j}from"./chunk-LJUWER2H.js";import{f as le,g as A,h as te}from"./chunk-Y3CJRZLA.js";import{n as g}from"./chunk-G2LZFGZA.js";import{e as ae}from"./chunk-H2O4CVKF.js";import{a as i}from"./chunk-P37U34EQ.js";import*as M from"@radix-ui/react-collapsible";var ge=M.Root,ye=M.CollapsibleTrigger,Se=M.CollapsibleContent;import*as y from"@radix-ui/react-dialog";import{XIcon as he}from"lucide-react";import{jsx as F,jsxs as K}from"react/jsx-runtime";function Ne({...e}){return F(y.Root,{"data-slot":"full-screen-dialog",...e})}i(Ne,"FullScreenDialog");function xe({...e}){return F(y.Trigger,{"data-slot":"full-screen-dialog-trigger",...e})}i(xe,"FullScreenDialogTrigger");function Te({...e}){return F(y.Portal,{"data-slot":"full-screen-dialog-portal",...e})}i(Te,"FullScreenDialogPortal");function Fe({className:e,...l}){return F(y.Overlay,{"data-slot":"full-screen-dialog-overlay",className:g("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...l})}i(Fe,"FullScreenDialogOverlay");function Ce({className:e,children:l,...a}){return K(Te,{"data-slot":"full-screen-dialog-portal",children:[F(Fe,{}),K(y.Content,{"data-slot":"full-screen-dialog-content",className:g("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 flex flex-col",e),...a,children:[l,K(y.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 RemoteFlows__FullScreenDialog__Close",children:[F(he,{}),F("span",{className:"sr-only",children:"Close"})]})]})]})}i(Ce,"FullScreenDialogContent");function De({className:e,...l}){return F("div",{"data-slot":"full-screen-dialog-header",className:g("flex flex-col gap-2 text-center sm:text-left",e),...l})}i(De,"FullScreenDialogHeader");function we({className:e,...l}){return F("div",{"data-slot":"full-screen-dialog-footer",className:g("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...l})}i(we,"FullScreenDialogFooter");function Re({className:e,...l}){return F(y.Title,{"data-slot":"full-screen-dialog-title",className:g("text-lg leading-none font-semibold",e),...l})}i(Re,"FullScreenDialogTitle");function Pe({className:e,...l}){return F(y.Description,{"data-slot":"full-screen-dialog-description",className:g("text-muted-foreground text-sm",e),...l})}i(Pe,"FullScreenDialogDescription");import*as R from"@radix-ui/react-tabs";import{jsx as B}from"react/jsx-runtime";function z({className:e,...l}){return B(R.Root,{"data-slot":"tabs",className:g("flex flex-col gap-2",e),...l})}i(z,"Tabs");function $({className:e,...l}){return B(R.List,{"data-slot":"tabs-list",className:g("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",e),...l})}i($,"TabsList");function X({className:e,...l}){return B(R.Trigger,{"data-slot":"tabs-trigger",className:g("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),...l})}i(X,"TabsTrigger");function Ve({className:e,...l}){return B(R.Content,{"data-slot":"tabs-content",className:g("flex-1 outline-none",e),...l})}i(Ve,"TabsContent");import*as Z from"react";import*as x from"@radix-ui/react-scroll-area";import{jsx as q,jsxs as Ae}from"react/jsx-runtime";var ne=Z.forwardRef(({className:e,children:l,...a},s)=>Ae(x.Root,{ref:s,className:g("relative overflow-hidden",e),...a,children:[q(x.Viewport,{className:"h-full w-full rounded-[inherit]",children:l}),q(se,{}),q(x.Corner,{})]}));ne.displayName=x.Root.displayName;var se=Z.forwardRef(({className:e,orientation:l="vertical",...a},s)=>q(x.ScrollAreaScrollbar,{ref:s,orientation:l,className:g("flex touch-none select-none transition-colors",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:q(x.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));se.displayName=x.ScrollAreaScrollbar.displayName;import{useState as Y,useEffect as ke,useMemo as Je}from"react";import{useQuery as je}from"@tanstack/react-query";import E from"fast-deep-equal";var re=i(e=>e.name?e.type?!0:(console.warn(`Field "${e.name}" missing required "type" property`),!1):(console.warn('Field missing required "name" property:',e),!1),"validateField"),Le=i((e,l)=>{if(E(e,l))return;let a=new Map((e||[]).map(t=>[t.value,t])),s=new Map((l||[]).map(t=>[t.value,t])),u=[],m=[],p=[];if(s.forEach((t,c)=>{a.has(c)||u.push({value:t.value,label:t.label})}),a.forEach((t,c)=>{if(!s.has(c))m.push({value:t.value,label:t.label});else{let S=s.get(c);if(!E(t,S)){let b={};t.label!==S.label&&(b.label={old:t.label,new:S.label}),Object.keys(b).length>0&&p.push({value:c,changes:b})}}}),!(u.length===0&&m.length===0&&p.length===0))return{added:u,removed:m,modified:p}},"compareOptions"),Oe=i((e,l)=>{let a=e.fields,s=l.fields;if(!a&&!s)return;let u=G(a||[],s||[]);if(u.added.length>0||u.removed.length>0||u.modified.length>0)return Array.from(u.fieldDiffs.values())},"compareNestedFields"),Me=i((e,l)=>{let a={label:e.label!==l.label,required:e.required!==l.required,inputType:e.inputType!==l.inputType,type:e.type!==l.type,jsonType:!E(e.jsonType,l.jsonType),name:e.name!==l.name,defaultValue:e.defaultValue!==l.defaultValue,minDate:e.minDate!==l.minDate,maxDate:e.maxDate!==l.maxDate,maxLength:e.maxLength!==l.maxLength,multiple:e.multiple!==l.multiple,isVisible:e.isVisible!==l.isVisible,options:!E(e.options,l.options)},s=(()=>{let m=e.fields,p=l.fields;if(!m&&!p)return!1;if(!m||!p)return!0;let t=G(m,p);return t.added.length>0||t.removed.length>0||t.modified.length>0})();return Object.values(a).some(m=>m)||s},"isFieldModified"),Ee=i((e,l)=>{let a={};e.label!==l.label&&(a.label={old:e.label,new:l.label}),e.required!==l.required&&(a.required={old:e.required,new:l.required}),e.type!==l.type&&(a.type={old:e.type,new:l.type}),e.inputType!==l.inputType&&(a.inputType={old:e.inputType,new:l.inputType}),E(e.jsonType,l.jsonType)||(a.jsonType={old:e.jsonType,new:l.jsonType}),E(e.defaultValue,l.defaultValue)||(a.defaultValue={old:e.defaultValue,new:l.defaultValue}),e.minDate!==l.minDate&&(a.minDate={old:e.minDate||"",new:l.minDate||""}),e.maxDate!==l.maxDate&&(a.maxDate={old:e.maxDate||"",new:l.maxDate||""}),e.maxLength!==l.maxLength&&(a.maxLength={old:e.maxLength||0,new:l.maxLength||0}),e.multiple!==l.multiple&&(a.multiple={old:e.multiple||!1,new:l.multiple||!1}),e.isVisible!==l.isVisible&&(a.isVisible={old:e.isVisible,new:l.isVisible});let s=Le(e.options,l.options);s&&(a.options=s);let u=Oe(e,l);return u&&(a.nestedFields=u),Object.keys(a).length>0?a:void 0},"getFieldChanges"),G=i((e=[],l=[])=>{let a=e.filter(re),s=l.filter(re),u=new Map(a.map(f=>[f.name,{field:f}])),m=new Map(s.map(f=>[f.name,{field:f}])),p=[],t=[],c=[],S=[],b=new Map;return m.forEach((f,d)=>{u.has(d)||(p.push(d),b.set(d,{fieldName:d,diffType:"added"}))}),u.forEach(({field:f},d)=>{if(!m.has(d))t.push(d),b.set(d,{fieldName:d,diffType:"removed"});else{let{field:N}=m.get(d);Me(f,N)?(c.push(d),b.set(d,{fieldName:d,diffType:"modified",changes:Ee(f,N)})):(S.push(d),b.set(d,{fieldName:d,diffType:"unchanged"}))}}),{added:p,removed:t,modified:c,unchanged:S,fieldDiffs:b}},"compareFormFields"),de=i(e=>{switch(e){case"added":return"bg-green-50 border-l-4 border-green-500";case"removed":return"bg-red-50 border-l-4 border-red-500";case"modified":return"bg-yellow-50 border-l-4 border-yellow-500";default:return""}},"getDiffStyles");import{useMemo as ve,useRef as Q,useEffect as _e}from"react";import{jsx as o,jsxs as v}from"react/jsx-runtime";var Ie=i(({children:e,diffType:l,changes:a})=>{let s=de(l);if(l==="unchanged")return o("div",{children:e});let m={added:o("span",{className:"text-xs font-semibold text-green-700 bg-green-100 px-2 py-1 rounded",children:"NEW"}),removed:o("span",{className:"text-xs font-semibold text-red-700 bg-red-100 px-2 py-1 rounded",children:"REMOVED"}),modified:o("span",{className:"text-xs font-semibold text-yellow-700 bg-yellow-100 px-2 py-1 rounded",children:"MODIFIED"})}[l],p=i(()=>{if(!a||l!=="modified")return null;let t=[];if(a.label&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Label:"})," ",o("span",{className:"line-through text-red-600",children:a.label.old})," ","\u2192 ",o("span",{className:"text-green-600",children:a.label.new})]},"label")),a.required&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Required:"})," ",o("span",{className:"line-through text-red-600",children:a.required.old?"Yes":"No"})," ","\u2192"," ",o("span",{className:"text-green-600",children:a.required.new?"Yes":"No"})]},"required")),a.type&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Type:"})," ",o("span",{className:"line-through text-red-600",children:a.type.old})," ","\u2192 ",o("span",{className:"text-green-600",children:a.type.new})]},"type")),a.inputType&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Input Type:"})," ",o("span",{className:"line-through text-red-600",children:a.inputType.old})," ","\u2192 ",o("span",{className:"text-green-600",children:a.inputType.new})]},"inputType")),a.jsonType){let c=Array.isArray(a.jsonType.old)?a.jsonType.old.join(" | "):a.jsonType.old,S=Array.isArray(a.jsonType.new)?a.jsonType.new.join(" | "):a.jsonType.new;t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"JSON Type:"})," ",o("span",{className:"line-through text-red-600",children:c})," \u2192"," ",o("span",{className:"text-green-600",children:S})]},"jsonType"))}return a.defaultValue!==void 0&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Default Value:"})," ",o("span",{className:"line-through text-red-600",children:JSON.stringify(a.defaultValue.old)})," ","\u2192"," ",o("span",{className:"text-green-600",children:JSON.stringify(a.defaultValue.new)})]},"defaultValue")),a.options&&(a.options.added.length>0&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold text-green-700",children:"Options Added:"})," ",a.options.added.map(c=>c.label).join(", ")]},"options-added")),a.options.removed.length>0&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold text-red-700",children:"Options Removed:"})," ",a.options.removed.map(c=>c.label).join(", ")]},"options-removed")),a.options.modified.length>0&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Options Modified:"})," ",a.options.modified.length," option(s)"]},"options-modified"))),a.nestedFields&&a.nestedFields.length>0&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Nested Fields:"})," ",a.nestedFields.length," field(s) changed"]},"nestedFields")),t.length===0?null:v("div",{className:"mt-2 p-2 bg-yellow-50 rounded border border-yellow-200 space-y-1",children:[o("div",{className:"text-xs font-semibold text-yellow-800 mb-1",children:"Changes:"}),t]})},"renderChanges");return v("div",{className:`p-3 mb-2 rounded ${s} relative`,children:[o("div",{className:"absolute top-2 right-2",children:m}),e,p()]})},"FieldWrapper"),ue=i(({version:e,fields:l,fieldsets:a,diffMap:s,title:u,scrollRef:m})=>{let p=le({mode:"onBlur"}),t=ve(()=>{let c=i((S,b)=>S.map(f=>{let d=b.get(f.name),N=d?.diffType||"unchanged",T=d?.changes,C=f.fields,P=f;if(C&&Array.isArray(C)){let V=new Map;T&&typeof T=="object"&&"nestedFields"in T&&Array.isArray(T.nestedFields)&&T.nestedFields.forEach(n=>{V.set(n.fieldName,{diffType:n.diffType,changes:n.changes})});let D=c(C,V);P={...f,fields:D}}return{...P,WrapperComponent:i(({children:V})=>o(Ie,{diffType:N,fieldName:f.name,changes:T,children:V}),"WrapperComponent")}}),"applyWrappers");return c(l,s)},[l,s]);return v(L,{className:"h-full",children:[o(H,{children:v(U,{children:[u," - Version ",e]})}),o(O,{ref:m,className:"overflow-y-auto max-h-[600px]",children:o(te,{...p,children:o("form",{className:"space-y-4",children:o(ie,{fields:t,fieldsets:a,fieldValues:{}})})})})]})},"FormPanel"),me=i(({topVersion:e,bottomVersion:l,topFields:a,bottomFields:s,topFieldsets:u,bottomFieldsets:m,isLoading:p})=>{let t=ve(()=>G(a,s),[a,s]),c=Q(null),S=Q(null),b=Q(!1);if(_e(()=>{let d=c.current,N=S.current;if(!d||!N)return;let T=i(()=>{b.current||(b.current=!0,N.scrollTop=d.scrollTop,requestAnimationFrame(()=>{b.current=!1}))},"handleLeftScroll"),C=i(()=>{b.current||(b.current=!0,d.scrollTop=N.scrollTop,requestAnimationFrame(()=>{b.current=!1}))},"handleRightScroll");return d.addEventListener("scroll",T),N.addEventListener("scroll",C),()=>{d.removeEventListener("scroll",T),N.removeEventListener("scroll",C)}},[a,s]),p)return o("div",{className:"flex items-center justify-center h-96",children:v("div",{className:"text-center",children:[o("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto"}),o("p",{className:"mt-4 text-gray-600",children:"Loading schemas..."})]})});let f=t.added.length===0&&t.removed.length===0&&t.modified.length===0;return v("div",{className:"space-y-6",children:[o(L,{children:o(O,{className:"pt-6",children:f?o("p",{className:"text-center text-gray-600",children:"No differences detected between the two versions"}):v("div",{className:"flex gap-6 justify-center",children:[t.added.length>0&&v("div",{className:"flex items-center gap-2",children:[o("span",{className:"w-4 h-4 bg-green-500 rounded"}),v("span",{className:"text-sm",children:[t.added.length," field",t.added.length>1?"s":""," ","added"]})]}),t.removed.length>0&&v("div",{className:"flex items-center gap-2",children:[o("span",{className:"w-4 h-4 bg-red-500 rounded"}),v("span",{className:"text-sm",children:[t.removed.length," field",t.removed.length>1?"s":""," removed"]})]}),t.modified.length>0&&v("div",{className:"flex items-center gap-2",children:[o("span",{className:"w-4 h-4 bg-yellow-500 rounded"}),v("span",{className:"text-sm",children:[t.modified.length," field",t.modified.length>1?"s":""," modified"]})]})]})})}),v("div",{className:"grid grid-cols-2 gap-6",children:[o(ue,{version:e,fields:a,fieldsets:u,diffMap:t.fieldDiffs,title:"Left",scrollRef:c}),o(ue,{version:l,fields:s,fieldsets:m,diffMap:t.fieldDiffs,title:"Right",scrollRef:S})]})]})},"SchemaFormComparison");var pe=[{value:1,label:"v1 (Legacy)"},{value:3,label:"v3 (Recommended)"}],ee={ALB:[{value:1,label:"v1"}],ARE:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],ARG:[{value:1,label:"v1"}],ARM:[{value:1,label:"v1"}],AUS:[{value:1,label:"v1"}],AUT:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BEL:[{value:1,label:"v1"},{value:2,label:"v2"}],BGD:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BGR:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BIH:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BLR:[{value:1,label:"v1"},{value:2,label:"v2"}],BOL:[{value:1,label:"v1"}],BRA:[{value:1,label:"v1"}],CAN:[{value:1,label:"v1"},{value:2,label:"v2"}],CHE:[{value:1,label:"v1"},{value:2,label:"v2"}],CHL:[{value:1,label:"v1"}],CHN:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],COL:[{value:1,label:"v1"}],CRI:[{value:1,label:"v1"}],CYP:[{value:1,label:"v1"}],CZE:[{value:1,label:"v1"},{value:2,label:"v2"}],DEU:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],DNK:[{value:1,label:"v1"}],DOM:[{value:1,label:"v1"}],ECU:[{value:1,label:"v1"}],EGY:[{value:1,label:"v1"},{value:2,label:"v2"}],ESP:[{value:1,label:"v1"},{value:2,label:"v2"}],EST:[{value:1,label:"v1"}],FIN:[{value:1,label:"v1"}],FRA:[{value:1,label:"v1"},{value:2,label:"v2"}],GBR:[{value:1,label:"v1"},{value:2,label:"v2"}],GEO:[{value:1,label:"v1"}],GRC:[{value:1,label:"v1"}],GTM:[{value:1,label:"v1"}],HKG:[{value:1,label:"v1"},{value:2,label:"v2"}],HND:[{value:1,label:"v1"}],HRV:[{value:1,label:"v1"},{value:2,label:"v2"}],HUN:[{value:1,label:"v1"}],IDN:[{value:1,label:"v1"}],IND:[{value:1,label:"v1"},{value:2,label:"v2"}],IRL:[{value:1,label:"v1"}],ISL:[{value:1,label:"v1"},{value:2,label:"v2"}],ISR:[{value:1,label:"v1"}],ITA:[{value:1,label:"v1"}],JAM:[{value:1,label:"v1"},{value:2,label:"v2"}],JPN:[{value:1,label:"v1"},{value:2,label:"v2"}],KEN:[{value:1,label:"v1"},{value:2,label:"v2"}],KGZ:[{value:1,label:"v1"}],KHM:[{value:1,label:"v1"}],KOR:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],LBN:[{value:1,label:"v1"},{value:2,label:"v2"}],LKA:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],LTU:[{value:1,label:"v1"}],LUX:[{value:1,label:"v1"}],LVA:[{value:1,label:"v1"},{value:2,label:"v2"}],MAR:[{value:1,label:"v1"}],MDA:[{value:1,label:"v1"}],MEX:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],MKD:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],MLT:[{value:1,label:"v1"}],MNG:[{value:1,label:"v1"}],MUS:[{value:1,label:"v1"},{value:2,label:"v2"}],MYS:[{value:1,label:"v1"},{value:2,label:"v2"}],NGA:[{value:1,label:"v1"},{value:2,label:"v2"}],NIC:[{value:1,label:"v1"}],NLD:[{value:1,label:"v1"}],NOR:[{value:1,label:"v1"},{value:2,label:"v2"}],NZL:[{value:1,label:"v1"},{value:2,label:"v2"}],PAK:[{value:1,label:"v1"},{value:2,label:"v2"}],PAN:[{value:1,label:"v1"}],PER:[{value:1,label:"v1"}],PHL:[{value:1,label:"v1"}],POL:[{value:1,label:"v1"}],PRI:[{value:1,label:"v1"}],PRT:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],PRY:[{value:1,label:"v1"}],ROU:[{value:1,label:"v1"}],SAU:[{value:1,label:"v1"},{value:2,label:"v2"}],SGP:[{value:1,label:"v1"},{value:2,label:"v2"}],SLV:[{value:1,label:"v1"}],SRB:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],SVK:[{value:1,label:"v1"}],SVN:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],SWE:[{value:1,label:"v1"},{value:2,label:"v2"}],THA:[{value:1,label:"v1"},{value:2,label:"v2"}],TUN:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],TUR:[{value:1,label:"v1"}],TWN:[{value:1,label:"v1"}],UGA:[{value:1,label:"v1"}],UKR:[{value:1,label:"v1"}],URY:[{value:1,label:"v1"}],USA:[{value:1,label:"v1"}],VNM:[{value:1,label:"v1"},{value:2,label:"v2"}],XKX:[{value:1,label:"v1"}],ZAF:[{value:1,label:"v1"}],ZWE:[{value:1,label:"v1"}]},ce=Object.fromEntries(Object.entries(ee).filter(([,e])=>e.length>1)),be=[{value:"employment_basic_information",label:"Basic Information"},{value:"contract_details",label:"Contract Details"}];import{jsx as r,jsxs as h}from"react/jsx-runtime";var fe=i(()=>{let[e,l]=Y("employment_basic_information"),[a,s]=Y(1),[u,m]=Y(1),[p,t]=Y("ARE"),{client:c}=ae(),{data:S}=je({...oe(c,"schema-comparison"),select:i(n=>n.data?.data?.filter(w=>w.eor_onboarding).filter(w=>Object.keys(ce).includes(w.code)).map(w=>({label:w.name,value:w.code}))||[],"select")}),b=e==="contract_details",{data:f,isLoading:d}=W({countryCode:p,form:e,fieldValues:{},jsonSchemaVersion:a,options:{queryOptions:{enabled:!0}}}),{data:N,isLoading:T}=W({countryCode:p,form:e,fieldValues:{},jsonSchemaVersion:u,options:{queryOptions:{enabled:!0}}}),C=d||T,P=ee[p],V=P!==void 0,D=Je(()=>e==="employment_basic_information"?pe:P||[{value:"latest",label:"Latest"}],[e,P]);return ke(()=>{let n=D.map(w=>w.value);n.includes(a)||s(D[0].value),n.includes(u)||m(D[0].value)},[e,p,D,a,u]),h("div",{className:"space-y-6",children:[h(L,{children:[r(H,{children:r(U,{children:"Configuration"})}),h(O,{className:"space-y-4",children:[h("div",{children:[r(A,{className:"mb-2 block",children:"Form Type"}),r(z,{value:e,onValueChange:n=>l(n),children:r($,{className:"grid w-full grid-cols-2",children:be.map(n=>r(X,{value:n.value,children:n.label},n.value))})})]}),b&&!V&&r("div",{className:"rounded-md bg-yellow-50 p-4 border border-yellow-200",children:h("div",{className:"flex",children:[r("div",{className:"flex-shrink-0",children:r("svg",{className:"h-5 w-5 text-yellow-400",viewBox:"0 0 20 20",fill:"currentColor",children:r("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}),h("div",{className:"ml-3",children:[r("h3",{className:"text-sm font-medium text-yellow-800",children:"Version mappings not found"}),r("div",{className:"mt-2 text-sm text-yellow-700",children:h("p",{children:["Country"," ",r("span",{className:"font-semibold",children:p})," is not configured in COUNTRY_CONTRACT_VERSIONS. Using default (latest only)."]})})]})]})}),b&&h("div",{children:[r(A,{htmlFor:"country-select",className:"mb-2 block",children:"Country"}),h(_,{value:p,onValueChange:t,children:[r(k,{id:"country-select",children:r(I,{placeholder:"Select a country"})}),r(J,{children:S?.map(n=>r(j,{value:n.value,children:n.label},n.value))})]})]}),h("div",{className:"grid grid-cols-2 gap-4",children:[h("div",{children:[r(A,{htmlFor:"top-version",className:"mb-2 block",children:"Left Version"}),h(_,{value:String(a),onValueChange:n=>s(n==="latest"?"latest":Number(n)),children:[r(k,{id:"top-version",children:r(I,{placeholder:"Select version"})}),r(J,{children:D.map(n=>r(j,{value:String(n.value),children:n.label},String(n.value)))})]})]}),h("div",{children:[r(A,{htmlFor:"bottom-version",className:"mb-2 block",children:"Right Version"}),h(_,{value:String(u),onValueChange:n=>m(n==="latest"?"latest":Number(n)),children:[r(k,{id:"bottom-version",children:r(I,{placeholder:"Select version"})}),r(J,{children:D.map(n=>r(j,{value:String(n.value),children:n.label},String(n.value)))})]})]})]})]})]}),r(me,{topVersion:a,bottomVersion:u,topFields:f?.fields||[],bottomFields:N?.fields||[],topFieldsets:f?.meta?.["x-jsf-fieldsets"],bottomFieldsets:N?.meta?.["x-jsf-fieldsets"],isLoading:C})]})},"JsonSchemaComparison");export{ge as a,ye as b,Se as c,Ne as d,xe as e,Ce as f,De as g,we as h,Re as i,Pe as j,z as k,$ as l,X as m,Ve as n,ne as o,fe as p};
2
- //# sourceMappingURL=chunk-R2JJUSD3.js.map
1
+ import{a as L,b as H,c as U,e as O}from"./chunk-N6XLGYRK.js";import{f as W}from"./chunk-ZMQTQ4UQ.js";import{a as oe}from"./chunk-HGIMRQIZ.js";import{a as ie}from"./chunk-UELAVKG5.js";import{a as _,c as I,d as k,e as J,f as j}from"./chunk-LJUWER2H.js";import{f as le,g as A,h as te}from"./chunk-Y3CJRZLA.js";import{n as g}from"./chunk-G2LZFGZA.js";import{e as ae}from"./chunk-H2O4CVKF.js";import{a as i}from"./chunk-P37U34EQ.js";import*as M from"@radix-ui/react-collapsible";var ge=M.Root,ye=M.CollapsibleTrigger,Se=M.CollapsibleContent;import*as y from"@radix-ui/react-dialog";import{XIcon as he}from"lucide-react";import{jsx as F,jsxs as K}from"react/jsx-runtime";function Ne({...e}){return F(y.Root,{"data-slot":"full-screen-dialog",...e})}i(Ne,"FullScreenDialog");function xe({...e}){return F(y.Trigger,{"data-slot":"full-screen-dialog-trigger",...e})}i(xe,"FullScreenDialogTrigger");function Te({...e}){return F(y.Portal,{"data-slot":"full-screen-dialog-portal",...e})}i(Te,"FullScreenDialogPortal");function Fe({className:e,...l}){return F(y.Overlay,{"data-slot":"full-screen-dialog-overlay",className:g("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...l})}i(Fe,"FullScreenDialogOverlay");function Ce({className:e,children:l,...a}){return K(Te,{"data-slot":"full-screen-dialog-portal",children:[F(Fe,{}),K(y.Content,{"data-slot":"full-screen-dialog-content",className:g("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 flex flex-col",e),...a,children:[l,K(y.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 RemoteFlows__FullScreenDialog__Close",children:[F(he,{}),F("span",{className:"sr-only",children:"Close"})]})]})]})}i(Ce,"FullScreenDialogContent");function De({className:e,...l}){return F("div",{"data-slot":"full-screen-dialog-header",className:g("flex flex-col gap-2 text-center sm:text-left",e),...l})}i(De,"FullScreenDialogHeader");function we({className:e,...l}){return F("div",{"data-slot":"full-screen-dialog-footer",className:g("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...l})}i(we,"FullScreenDialogFooter");function Re({className:e,...l}){return F(y.Title,{"data-slot":"full-screen-dialog-title",className:g("text-lg leading-none font-semibold",e),...l})}i(Re,"FullScreenDialogTitle");function Pe({className:e,...l}){return F(y.Description,{"data-slot":"full-screen-dialog-description",className:g("text-muted-foreground text-sm",e),...l})}i(Pe,"FullScreenDialogDescription");import*as R from"@radix-ui/react-tabs";import{jsx as B}from"react/jsx-runtime";function z({className:e,...l}){return B(R.Root,{"data-slot":"tabs",className:g("flex flex-col gap-2",e),...l})}i(z,"Tabs");function $({className:e,...l}){return B(R.List,{"data-slot":"tabs-list",className:g("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",e),...l})}i($,"TabsList");function X({className:e,...l}){return B(R.Trigger,{"data-slot":"tabs-trigger",className:g("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),...l})}i(X,"TabsTrigger");function Ve({className:e,...l}){return B(R.Content,{"data-slot":"tabs-content",className:g("flex-1 outline-none",e),...l})}i(Ve,"TabsContent");import*as Z from"react";import*as x from"@radix-ui/react-scroll-area";import{jsx as q,jsxs as Ae}from"react/jsx-runtime";var ne=Z.forwardRef(({className:e,children:l,...a},s)=>Ae(x.Root,{ref:s,className:g("relative overflow-hidden",e),...a,children:[q(x.Viewport,{className:"h-full w-full rounded-[inherit]",children:l}),q(se,{}),q(x.Corner,{})]}));ne.displayName=x.Root.displayName;var se=Z.forwardRef(({className:e,orientation:l="vertical",...a},s)=>q(x.ScrollAreaScrollbar,{ref:s,orientation:l,className:g("flex touch-none select-none transition-colors",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:q(x.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));se.displayName=x.ScrollAreaScrollbar.displayName;import{useState as Y,useEffect as ke,useMemo as Je}from"react";import{useQuery as je}from"@tanstack/react-query";import E from"fast-deep-equal";var re=i(e=>e.name?e.type?!0:(console.warn(`Field "${e.name}" missing required "type" property`),!1):(console.warn('Field missing required "name" property:',e),!1),"validateField"),Le=i((e,l)=>{if(E(e,l))return;let a=new Map((e||[]).map(t=>[t.value,t])),s=new Map((l||[]).map(t=>[t.value,t])),u=[],m=[],p=[];if(s.forEach((t,c)=>{a.has(c)||u.push({value:t.value,label:t.label})}),a.forEach((t,c)=>{if(!s.has(c))m.push({value:t.value,label:t.label});else{let S=s.get(c);if(!E(t,S)){let b={};t.label!==S.label&&(b.label={old:t.label,new:S.label}),Object.keys(b).length>0&&p.push({value:c,changes:b})}}}),!(u.length===0&&m.length===0&&p.length===0))return{added:u,removed:m,modified:p}},"compareOptions"),Oe=i((e,l)=>{let a=e.fields,s=l.fields;if(!a&&!s)return;let u=G(a||[],s||[]);if(u.added.length>0||u.removed.length>0||u.modified.length>0)return Array.from(u.fieldDiffs.values())},"compareNestedFields"),Me=i((e,l)=>{let a={label:e.label!==l.label,required:e.required!==l.required,inputType:e.inputType!==l.inputType,type:e.type!==l.type,jsonType:!E(e.jsonType,l.jsonType),name:e.name!==l.name,defaultValue:e.defaultValue!==l.defaultValue,minDate:e.minDate!==l.minDate,maxDate:e.maxDate!==l.maxDate,maxLength:e.maxLength!==l.maxLength,multiple:e.multiple!==l.multiple,isVisible:e.isVisible!==l.isVisible,options:!E(e.options,l.options)},s=(()=>{let m=e.fields,p=l.fields;if(!m&&!p)return!1;if(!m||!p)return!0;let t=G(m,p);return t.added.length>0||t.removed.length>0||t.modified.length>0})();return Object.values(a).some(m=>m)||s},"isFieldModified"),Ee=i((e,l)=>{let a={};e.label!==l.label&&(a.label={old:e.label,new:l.label}),e.required!==l.required&&(a.required={old:e.required,new:l.required}),e.type!==l.type&&(a.type={old:e.type,new:l.type}),e.inputType!==l.inputType&&(a.inputType={old:e.inputType,new:l.inputType}),E(e.jsonType,l.jsonType)||(a.jsonType={old:e.jsonType,new:l.jsonType}),E(e.defaultValue,l.defaultValue)||(a.defaultValue={old:e.defaultValue,new:l.defaultValue}),e.minDate!==l.minDate&&(a.minDate={old:e.minDate||"",new:l.minDate||""}),e.maxDate!==l.maxDate&&(a.maxDate={old:e.maxDate||"",new:l.maxDate||""}),e.maxLength!==l.maxLength&&(a.maxLength={old:e.maxLength||0,new:l.maxLength||0}),e.multiple!==l.multiple&&(a.multiple={old:e.multiple||!1,new:l.multiple||!1}),e.isVisible!==l.isVisible&&(a.isVisible={old:e.isVisible,new:l.isVisible});let s=Le(e.options,l.options);s&&(a.options=s);let u=Oe(e,l);return u&&(a.nestedFields=u),Object.keys(a).length>0?a:void 0},"getFieldChanges"),G=i((e=[],l=[])=>{let a=e.filter(re),s=l.filter(re),u=new Map(a.map(f=>[f.name,{field:f}])),m=new Map(s.map(f=>[f.name,{field:f}])),p=[],t=[],c=[],S=[],b=new Map;return m.forEach((f,d)=>{u.has(d)||(p.push(d),b.set(d,{fieldName:d,diffType:"added"}))}),u.forEach(({field:f},d)=>{if(!m.has(d))t.push(d),b.set(d,{fieldName:d,diffType:"removed"});else{let{field:N}=m.get(d);Me(f,N)?(c.push(d),b.set(d,{fieldName:d,diffType:"modified",changes:Ee(f,N)})):(S.push(d),b.set(d,{fieldName:d,diffType:"unchanged"}))}}),{added:p,removed:t,modified:c,unchanged:S,fieldDiffs:b}},"compareFormFields"),de=i(e=>{switch(e){case"added":return"bg-green-50 border-l-4 border-green-500";case"removed":return"bg-red-50 border-l-4 border-red-500";case"modified":return"bg-yellow-50 border-l-4 border-yellow-500";default:return""}},"getDiffStyles");import{useMemo as ve,useRef as Q,useEffect as _e}from"react";import{jsx as o,jsxs as v}from"react/jsx-runtime";var Ie=i(({children:e,diffType:l,changes:a})=>{let s=de(l);if(l==="unchanged")return o("div",{children:e});let m={added:o("span",{className:"text-xs font-semibold text-green-700 bg-green-100 px-2 py-1 rounded",children:"NEW"}),removed:o("span",{className:"text-xs font-semibold text-red-700 bg-red-100 px-2 py-1 rounded",children:"REMOVED"}),modified:o("span",{className:"text-xs font-semibold text-yellow-700 bg-yellow-100 px-2 py-1 rounded",children:"MODIFIED"})}[l],p=i(()=>{if(!a||l!=="modified")return null;let t=[];if(a.label&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Label:"})," ",o("span",{className:"line-through text-red-600",children:a.label.old})," ","\u2192 ",o("span",{className:"text-green-600",children:a.label.new})]},"label")),a.required&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Required:"})," ",o("span",{className:"line-through text-red-600",children:a.required.old?"Yes":"No"})," ","\u2192"," ",o("span",{className:"text-green-600",children:a.required.new?"Yes":"No"})]},"required")),a.type&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Type:"})," ",o("span",{className:"line-through text-red-600",children:a.type.old})," ","\u2192 ",o("span",{className:"text-green-600",children:a.type.new})]},"type")),a.inputType&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Input Type:"})," ",o("span",{className:"line-through text-red-600",children:a.inputType.old})," ","\u2192 ",o("span",{className:"text-green-600",children:a.inputType.new})]},"inputType")),a.jsonType){let c=Array.isArray(a.jsonType.old)?a.jsonType.old.join(" | "):a.jsonType.old,S=Array.isArray(a.jsonType.new)?a.jsonType.new.join(" | "):a.jsonType.new;t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"JSON Type:"})," ",o("span",{className:"line-through text-red-600",children:c})," \u2192"," ",o("span",{className:"text-green-600",children:S})]},"jsonType"))}return a.defaultValue!==void 0&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Default Value:"})," ",o("span",{className:"line-through text-red-600",children:JSON.stringify(a.defaultValue.old)})," ","\u2192"," ",o("span",{className:"text-green-600",children:JSON.stringify(a.defaultValue.new)})]},"defaultValue")),a.options&&(a.options.added.length>0&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold text-green-700",children:"Options Added:"})," ",a.options.added.map(c=>c.label).join(", ")]},"options-added")),a.options.removed.length>0&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold text-red-700",children:"Options Removed:"})," ",a.options.removed.map(c=>c.label).join(", ")]},"options-removed")),a.options.modified.length>0&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Options Modified:"})," ",a.options.modified.length," option(s)"]},"options-modified"))),a.nestedFields&&a.nestedFields.length>0&&t.push(v("div",{className:"text-xs",children:[o("span",{className:"font-semibold",children:"Nested Fields:"})," ",a.nestedFields.length," field(s) changed"]},"nestedFields")),t.length===0?null:v("div",{className:"mt-2 p-2 bg-yellow-50 rounded border border-yellow-200 space-y-1",children:[o("div",{className:"text-xs font-semibold text-yellow-800 mb-1",children:"Changes:"}),t]})},"renderChanges");return v("div",{className:`p-3 mb-2 rounded ${s} relative`,children:[o("div",{className:"absolute top-2 right-2",children:m}),e,p()]})},"FieldWrapper"),ue=i(({version:e,fields:l,fieldsets:a,diffMap:s,title:u,scrollRef:m})=>{let p=le({mode:"onBlur"}),t=ve(()=>{let c=i((S,b)=>S.map(f=>{let d=b.get(f.name),N=d?.diffType||"unchanged",T=d?.changes,C=f.fields,P=f;if(C&&Array.isArray(C)){let V=new Map;T&&typeof T=="object"&&"nestedFields"in T&&Array.isArray(T.nestedFields)&&T.nestedFields.forEach(n=>{V.set(n.fieldName,{diffType:n.diffType,changes:n.changes})});let D=c(C,V);P={...f,fields:D}}return{...P,WrapperComponent:i(({children:V})=>o(Ie,{diffType:N,fieldName:f.name,changes:T,children:V}),"WrapperComponent")}}),"applyWrappers");return c(l,s)},[l,s]);return v(L,{className:"h-full",children:[o(H,{children:v(U,{children:[u," - Version ",e]})}),o(O,{ref:m,className:"overflow-y-auto max-h-[600px]",children:o(te,{...p,children:o("form",{className:"space-y-4",children:o(ie,{fields:t,fieldsets:a,fieldValues:{}})})})})]})},"FormPanel"),me=i(({topVersion:e,bottomVersion:l,topFields:a,bottomFields:s,topFieldsets:u,bottomFieldsets:m,isLoading:p})=>{let t=ve(()=>G(a,s),[a,s]),c=Q(null),S=Q(null),b=Q(!1);if(_e(()=>{let d=c.current,N=S.current;if(!d||!N)return;let T=i(()=>{b.current||(b.current=!0,N.scrollTop=d.scrollTop,requestAnimationFrame(()=>{b.current=!1}))},"handleLeftScroll"),C=i(()=>{b.current||(b.current=!0,d.scrollTop=N.scrollTop,requestAnimationFrame(()=>{b.current=!1}))},"handleRightScroll");return d.addEventListener("scroll",T),N.addEventListener("scroll",C),()=>{d.removeEventListener("scroll",T),N.removeEventListener("scroll",C)}},[a,s]),p)return o("div",{className:"flex items-center justify-center h-96",children:v("div",{className:"text-center",children:[o("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto"}),o("p",{className:"mt-4 text-gray-600",children:"Loading schemas..."})]})});let f=t.added.length===0&&t.removed.length===0&&t.modified.length===0;return v("div",{className:"space-y-6",children:[o(L,{children:o(O,{className:"pt-6",children:f?o("p",{className:"text-center text-gray-600",children:"No differences detected between the two versions"}):v("div",{className:"flex gap-6 justify-center",children:[t.added.length>0&&v("div",{className:"flex items-center gap-2",children:[o("span",{className:"w-4 h-4 bg-green-500 rounded"}),v("span",{className:"text-sm",children:[t.added.length," field",t.added.length>1?"s":""," ","added"]})]}),t.removed.length>0&&v("div",{className:"flex items-center gap-2",children:[o("span",{className:"w-4 h-4 bg-red-500 rounded"}),v("span",{className:"text-sm",children:[t.removed.length," field",t.removed.length>1?"s":""," removed"]})]}),t.modified.length>0&&v("div",{className:"flex items-center gap-2",children:[o("span",{className:"w-4 h-4 bg-yellow-500 rounded"}),v("span",{className:"text-sm",children:[t.modified.length," field",t.modified.length>1?"s":""," modified"]})]})]})})}),v("div",{className:"grid grid-cols-2 gap-6",children:[o(ue,{version:e,fields:a,fieldsets:u,diffMap:t.fieldDiffs,title:"Left",scrollRef:c}),o(ue,{version:l,fields:s,fieldsets:m,diffMap:t.fieldDiffs,title:"Right",scrollRef:S})]})]})},"SchemaFormComparison");var pe=[{value:1,label:"v1 (Legacy)"},{value:3,label:"v3 (Recommended)"}],ee={ALB:[{value:1,label:"v1"}],ARE:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],ARG:[{value:1,label:"v1"}],ARM:[{value:1,label:"v1"}],AUS:[{value:1,label:"v1"}],AUT:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BEL:[{value:1,label:"v1"},{value:2,label:"v2"}],BGD:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BGR:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BIH:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BLR:[{value:1,label:"v1"},{value:2,label:"v2"}],BOL:[{value:1,label:"v1"}],BRA:[{value:1,label:"v1"}],CAN:[{value:1,label:"v1"},{value:2,label:"v2"}],CHE:[{value:1,label:"v1"},{value:2,label:"v2"}],CHL:[{value:1,label:"v1"}],CHN:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],COL:[{value:1,label:"v1"}],CRI:[{value:1,label:"v1"}],CYP:[{value:1,label:"v1"}],CZE:[{value:1,label:"v1"},{value:2,label:"v2"}],DEU:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],DNK:[{value:1,label:"v1"}],DOM:[{value:1,label:"v1"}],ECU:[{value:1,label:"v1"}],EGY:[{value:1,label:"v1"},{value:2,label:"v2"}],ESP:[{value:1,label:"v1"},{value:2,label:"v2"}],EST:[{value:1,label:"v1"}],FIN:[{value:1,label:"v1"}],FRA:[{value:1,label:"v1"},{value:2,label:"v2"}],GBR:[{value:1,label:"v1"},{value:2,label:"v2"}],GEO:[{value:1,label:"v1"}],GRC:[{value:1,label:"v1"}],GTM:[{value:1,label:"v1"}],HKG:[{value:1,label:"v1"},{value:2,label:"v2"}],HND:[{value:1,label:"v1"}],HRV:[{value:1,label:"v1"},{value:2,label:"v2"}],HUN:[{value:1,label:"v1"}],IDN:[{value:1,label:"v1"}],IND:[{value:1,label:"v1"},{value:2,label:"v2"}],IRL:[{value:1,label:"v1"}],ISL:[{value:1,label:"v1"},{value:2,label:"v2"}],ISR:[{value:1,label:"v1"}],ITA:[{value:1,label:"v1"}],JAM:[{value:1,label:"v1"},{value:2,label:"v2"}],JPN:[{value:1,label:"v1"},{value:2,label:"v2"}],KEN:[{value:1,label:"v1"},{value:2,label:"v2"}],KGZ:[{value:1,label:"v1"}],KHM:[{value:1,label:"v1"}],KOR:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],LBN:[{value:1,label:"v1"},{value:2,label:"v2"}],LKA:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],LTU:[{value:1,label:"v1"}],LUX:[{value:1,label:"v1"}],LVA:[{value:1,label:"v1"},{value:2,label:"v2"}],MAR:[{value:1,label:"v1"}],MDA:[{value:1,label:"v1"}],MEX:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],MKD:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],MLT:[{value:1,label:"v1"}],MNG:[{value:1,label:"v1"}],MUS:[{value:1,label:"v1"},{value:2,label:"v2"}],MYS:[{value:1,label:"v1"},{value:2,label:"v2"}],NGA:[{value:1,label:"v1"},{value:2,label:"v2"}],NIC:[{value:1,label:"v1"}],NLD:[{value:1,label:"v1"}],NOR:[{value:1,label:"v1"},{value:2,label:"v2"}],NZL:[{value:1,label:"v1"},{value:2,label:"v2"}],PAK:[{value:1,label:"v1"},{value:2,label:"v2"}],PAN:[{value:1,label:"v1"}],PER:[{value:1,label:"v1"}],PHL:[{value:1,label:"v1"}],POL:[{value:1,label:"v1"}],PRI:[{value:1,label:"v1"}],PRT:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],PRY:[{value:1,label:"v1"}],ROU:[{value:1,label:"v1"}],SAU:[{value:1,label:"v1"},{value:2,label:"v2"}],SGP:[{value:1,label:"v1"},{value:2,label:"v2"}],SLV:[{value:1,label:"v1"}],SRB:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],SVK:[{value:1,label:"v1"}],SVN:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],SWE:[{value:1,label:"v1"},{value:2,label:"v2"}],THA:[{value:1,label:"v1"},{value:2,label:"v2"}],TUN:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],TUR:[{value:1,label:"v1"}],TWN:[{value:1,label:"v1"}],UGA:[{value:1,label:"v1"}],UKR:[{value:1,label:"v1"}],URY:[{value:1,label:"v1"}],USA:[{value:1,label:"v1"}],VNM:[{value:1,label:"v1"},{value:2,label:"v2"}],XKX:[{value:1,label:"v1"}],ZAF:[{value:1,label:"v1"}],ZWE:[{value:1,label:"v1"}]},ce=Object.fromEntries(Object.entries(ee).filter(([,e])=>e.length>1)),be=[{value:"employment_basic_information",label:"Basic Information"},{value:"contract_details",label:"Contract Details"}];import{jsx as r,jsxs as h}from"react/jsx-runtime";var fe=i(()=>{let[e,l]=Y("employment_basic_information"),[a,s]=Y(1),[u,m]=Y(1),[p,t]=Y("ARE"),{client:c}=ae(),{data:S}=je({...oe(c,"schema-comparison"),select:i(n=>n.data?.data?.filter(w=>w.eor_onboarding).filter(w=>Object.keys(ce).includes(w.code)).map(w=>({label:w.name,value:w.code}))||[],"select")}),b=e==="contract_details",{data:f,isLoading:d}=W({countryCode:p,form:e,fieldValues:{},jsonSchemaVersion:a,options:{queryOptions:{enabled:!0}}}),{data:N,isLoading:T}=W({countryCode:p,form:e,fieldValues:{},jsonSchemaVersion:u,options:{queryOptions:{enabled:!0}}}),C=d||T,P=ee[p],V=P!==void 0,D=Je(()=>e==="employment_basic_information"?pe:P||[{value:"latest",label:"Latest"}],[e,P]);return ke(()=>{let n=D.map(w=>w.value);n.includes(a)||s(D[0].value),n.includes(u)||m(D[0].value)},[e,p,D,a,u]),h("div",{className:"space-y-6",children:[h(L,{children:[r(H,{children:r(U,{children:"Configuration"})}),h(O,{className:"space-y-4",children:[h("div",{children:[r(A,{className:"mb-2 block",children:"Form Type"}),r(z,{value:e,onValueChange:n=>l(n),children:r($,{className:"grid w-full grid-cols-2",children:be.map(n=>r(X,{value:n.value,children:n.label},n.value))})})]}),b&&!V&&r("div",{className:"rounded-md bg-yellow-50 p-4 border border-yellow-200",children:h("div",{className:"flex",children:[r("div",{className:"flex-shrink-0",children:r("svg",{className:"h-5 w-5 text-yellow-400",viewBox:"0 0 20 20",fill:"currentColor",children:r("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}),h("div",{className:"ml-3",children:[r("h3",{className:"text-sm font-medium text-yellow-800",children:"Version mappings not found"}),r("div",{className:"mt-2 text-sm text-yellow-700",children:h("p",{children:["Country"," ",r("span",{className:"font-semibold",children:p})," is not configured in COUNTRY_CONTRACT_VERSIONS. Using default (latest only)."]})})]})]})}),b&&h("div",{children:[r(A,{htmlFor:"country-select",className:"mb-2 block",children:"Country"}),h(_,{value:p,onValueChange:t,children:[r(k,{id:"country-select",children:r(I,{placeholder:"Select a country"})}),r(J,{children:S?.map(n=>r(j,{value:n.value,children:n.label},n.value))})]})]}),h("div",{className:"grid grid-cols-2 gap-4",children:[h("div",{children:[r(A,{htmlFor:"top-version",className:"mb-2 block",children:"Left Version"}),h(_,{value:String(a),onValueChange:n=>s(n==="latest"?"latest":Number(n)),children:[r(k,{id:"top-version",children:r(I,{placeholder:"Select version"})}),r(J,{children:D.map(n=>r(j,{value:String(n.value),children:n.label},String(n.value)))})]})]}),h("div",{children:[r(A,{htmlFor:"bottom-version",className:"mb-2 block",children:"Right Version"}),h(_,{value:String(u),onValueChange:n=>m(n==="latest"?"latest":Number(n)),children:[r(k,{id:"bottom-version",children:r(I,{placeholder:"Select version"})}),r(J,{children:D.map(n=>r(j,{value:String(n.value),children:n.label},String(n.value)))})]})]})]})]})]}),r(me,{topVersion:a,bottomVersion:u,topFields:f?.fields||[],bottomFields:N?.fields||[],topFieldsets:f?.meta?.["x-jsf-fieldsets"],bottomFieldsets:N?.meta?.["x-jsf-fieldsets"],isLoading:C})]})},"JsonSchemaComparison");export{ge as a,ye as b,Se as c,Ne as d,xe as e,Ce as f,De as g,we as h,Re as i,Pe as j,z as k,$ as l,X as m,Ve as n,ne as o,fe as p};
2
+ //# sourceMappingURL=chunk-MQTRTRV6.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-Y34DKDJI.js";import{b as a}from"./chunk-Q3ALCPJN.js";import{x as n}from"./chunk-G2LZFGZA.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function S({onSubmit:l,onSuccess:u,onError:m}){let{contractorOnboardingBag:i}=a(),d=e(async(t,b)=>{try{let o=await i.parseFormValues(t);await l?.(o);let r=await i.onSubmit(t);if(r?.data){await u?.(r?.data),r?._skipNextStep||i?.next();return}}catch(o){let r=n(o,i.meta?.fields?.eligibility_questionnaire,b);m?.(r)}},"handleSubmit"),p=i.stepState.values?.eligibility_questionnaire||i.initialValues.eligibility_questionnaire;return E(s,{defaultValues:p,onSubmit:d})}e(S,"EligibilityQuestionnaireStep");export{S as a};
2
- //# sourceMappingURL=chunk-QIAK5VU7.js.map
1
+ import{a as s}from"./chunk-BLCINT3L.js";import{b as a}from"./chunk-Q3ALCPJN.js";import{x as n}from"./chunk-G2LZFGZA.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function S({onSubmit:l,onSuccess:u,onError:m}){let{contractorOnboardingBag:i}=a(),d=e(async(t,b)=>{try{let o=await i.parseFormValues(t);await l?.(o);let r=await i.onSubmit(t);if(r?.data){await u?.(r?.data),r?._skipNextStep||i?.next();return}}catch(o){let r=n(o,i.meta?.fields?.eligibility_questionnaire,b);m?.(r)}},"handleSubmit"),p=i.stepState.values?.eligibility_questionnaire||i.initialValues.eligibility_questionnaire;return E(s,{defaultValues:p,onSubmit:d})}e(S,"EligibilityQuestionnaireStep");export{S as a};
2
+ //# sourceMappingURL=chunk-MZXFOY5T.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-ENV2K73V.js";import{b as m}from"./chunk-76ZDXC2T.js";import{x as i}from"./chunk-G2LZFGZA.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function l({onSubmit:c,onSuccess:p,onError:t}){let{createCompanyBag:o}=m(),u=a(async r=>{try{await c?.({countryCode:r.country_code,companyOwnerEmail:r.company_owner_email,companyOwnerName:r.company_owner_name,desiredCurrency:r.desired_currency,name:r.name,phoneNumber:r.phone_number,taxNumber:r.tax_number});let n=await o.onSubmit(r);if(n?.data){await p?.(n?.data),o?.next();return}if(n?.error){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}}catch(n){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}},"handleSubmit"),f=o.stepState.values?.company_basic_information||o.initialValues.company_basic_information;return d(s,{defaultValues:f,onSubmit:u})}a(l,"CompanyBasicInformationStep");export{l as a};
2
- //# sourceMappingURL=chunk-JBQOE3XL.js.map
1
+ import{a as s}from"./chunk-PET4EGTM.js";import{b as m}from"./chunk-76ZDXC2T.js";import{x as i}from"./chunk-G2LZFGZA.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function l({onSubmit:c,onSuccess:p,onError:t}){let{createCompanyBag:o}=m(),u=a(async r=>{try{await c?.({countryCode:r.country_code,companyOwnerEmail:r.company_owner_email,companyOwnerName:r.company_owner_name,desiredCurrency:r.desired_currency,name:r.name,phoneNumber:r.phone_number,taxNumber:r.tax_number});let n=await o.onSubmit(r);if(n?.data){await p?.(n?.data),o?.next();return}if(n?.error){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}}catch(n){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}},"handleSubmit"),f=o.stepState.values?.company_basic_information||o.initialValues.company_basic_information;return d(s,{defaultValues:f,onSubmit:u})}a(l,"CompanyBasicInformationStep");export{l as a};
2
+ //# sourceMappingURL=chunk-MZZFNRW5.js.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-KVUKJU5U.js";import{a as i}from"./chunk-6P536SW2.js";import{a as u}from"./chunk-34U3WJ75.js";import{a as d}from"./chunk-SVVZOMLQ.js";import{a as S}from"./chunk-QIAK5VU7.js";import{a as e}from"./chunk-CW7CHRMN.js";import{a as s}from"./chunk-DNAPYU5I.js";import{a as p}from"./chunk-DB4JHJ3Z.js";import{a as c}from"./chunk-W7MCRAQ4.js";import{a as m}from"./chunk-V62JQXIC.js";import{a as f}from"./chunk-32ERURM2.js";import{a as n}from"./chunk-Q3ALCPJN.js";import{a}from"./chunk-UI4AZZD5.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as I,useRef as F,useMemo as y}from"react";import{jsx as D}from"react/jsx-runtime";var J=t(({render:g,employmentId:C,externalId:b,countryCode:v,skipSteps:B,initialValues:O,options:w})=>{let P=I(),o=F(void 0),R=y(()=>({setValue:o}),[]),r=a({options:{...w,onContractReviewed:t(()=>{o.current&&o.current("review_completed",!0)},"onContractReviewed")},employmentId:C,externalId:b,countryCode:v,skipSteps:B,initialValues:O});return D(n.Provider,{value:{contractorOnboardingBag:r,formId:P,formRef:R},children:g({contractorOnboardingBag:r,components:{BasicInformationStep:m,SelectCountryStep:i,BackButton:e,SubmitButton:p,PricingPlanStep:c,EligibilityQuestionnaireStep:S,ContractDetailsStep:f,ContractPreviewStep:u,OnboardingInvite:s,ContractReviewButton:d,SaveDraftButton:l}})})},"ContractorOnboardingFlow");export{J as a};
2
- //# sourceMappingURL=chunk-JFPOX7SW.js.map
1
+ import{a as l}from"./chunk-KVUKJU5U.js";import{a as i}from"./chunk-KFFTPU6V.js";import{a as u}from"./chunk-HHFDREGB.js";import{a as d}from"./chunk-SVVZOMLQ.js";import{a as S}from"./chunk-MZXFOY5T.js";import{a as e}from"./chunk-CW7CHRMN.js";import{a as s}from"./chunk-GJV6HJ3D.js";import{a as p}from"./chunk-DB4JHJ3Z.js";import{a as c}from"./chunk-3D7HWCNX.js";import{a as m}from"./chunk-2PMYCCWO.js";import{a as f}from"./chunk-FOUXLCEA.js";import{a as n}from"./chunk-Q3ALCPJN.js";import{a}from"./chunk-UAMKMIHP.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as I,useRef as F,useMemo as y}from"react";import{jsx as D}from"react/jsx-runtime";var J=t(({render:g,employmentId:C,externalId:b,countryCode:v,skipSteps:B,initialValues:O,options:w})=>{let P=I(),o=F(void 0),R=y(()=>({setValue:o}),[]),r=a({options:{...w,onContractReviewed:t(()=>{o.current&&o.current("review_completed",!0)},"onContractReviewed")},employmentId:C,externalId:b,countryCode:v,skipSteps:B,initialValues:O});return D(n.Provider,{value:{contractorOnboardingBag:r,formId:P,formRef:R},children:g({contractorOnboardingBag:r,components:{BasicInformationStep:m,SelectCountryStep:i,BackButton:e,SubmitButton:p,PricingPlanStep:c,EligibilityQuestionnaireStep:S,ContractDetailsStep:f,ContractPreviewStep:u,OnboardingInvite:s,ContractReviewButton:d,SaveDraftButton:l}})})},"ContractorOnboardingFlow");export{J as a};
2
+ //# sourceMappingURL=chunk-NJNJACVL.js.map
@@ -1,2 +1,2 @@
1
- import{c as e}from"./chunk-2Q462FT7.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as t}from"react/jsx-runtime";var a=n(({involuntaryOffboardingServiceChargeZendeskId:r,reconciliationInvoiceZendeskId:i})=>t("p",{className:"RemoteFlows__AcknowledgeInformationFees text-xs text-[#71717A]",children:["You'll receive an"," ",o(e,{zendeskId:r,className:"align-baseline",children:"involuntary offboarding service charge \u2197"})," ","on your"," ",o(e,{zendeskId:i,children:"reconciliation invoice \u2197"})]}),"AcknowledgeInformationFees");export{a};
2
- //# sourceMappingURL=chunk-QI4MWDJS.js.map
1
+ import{c as e}from"./chunk-P6H7QMKK.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as t}from"react/jsx-runtime";var a=n(({involuntaryOffboardingServiceChargeZendeskId:r,reconciliationInvoiceZendeskId:i})=>t("p",{className:"RemoteFlows__AcknowledgeInformationFees text-xs text-[#71717A]",children:["You'll receive an"," ",o(e,{zendeskId:r,className:"align-baseline",children:"involuntary offboarding service charge \u2197"})," ","on your"," ",o(e,{zendeskId:i,children:"reconciliation invoice \u2197"})]}),"AcknowledgeInformationFees");export{a};
2
+ //# sourceMappingURL=chunk-O3KGCVBO.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-KN2Q5NOL.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({onSubmit:t}){let{terminationBag:o}=a(),n=i(async r=>{let m=await o?.parseFormValues(r);await t?.(m),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:n})}i(p,"TerminationDetailsForm");export{p as a};
2
- //# sourceMappingURL=chunk-XNDOPTDJ.js.map
1
+ import{a as e}from"./chunk-4WBEA4IY.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({onSubmit:t}){let{terminationBag:o}=a(),n=i(async r=>{let m=await o?.parseFormValues(r);await t?.(m),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:n})}i(p,"TerminationDetailsForm");export{p as a};
2
+ //# sourceMappingURL=chunk-OKSKBEIR.js.map
@@ -1,2 +1,2 @@
1
- import{a as R,b as x,c as N,d as A}from"./chunk-DMNKKWLY.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-N6XLGYRK.js";import{b as B}from"./chunk-T5J2Z6ZR.js";import{a as w,c as f}from"./chunk-2Q462FT7.js";import{n as i,o as n,r as F}from"./chunk-G2LZFGZA.js";import{a as m}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:a,"data-testid":l}){let[_,d]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!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":`${l}-${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(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(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=m(({title:e,country:r,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{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," ",a?` (${a.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:"})," ",l]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=m(()=>({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:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:a}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),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(l=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}m(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:a,country:l}){return o(R,{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 ",l.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,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"})]})})]})})}m(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"})]})]})}m(J,"EstimationHeaders");function I({label:e,amounts:r,className:a,children:l}){let[_,d]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",a),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:()=>d(!_),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})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:a=0}){let[l,_]=O(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;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:()=>_(!l),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 ${l?"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(f,{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"})]}),d&&l&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:a+1})})]})}m(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(Q,{item:_,isMultipleCurrency:r,level:l},d))})}m(k,"BreakdownList");var pe=m(({estimation:e,title:r,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||q,u=a?.OnboardingTimeline||Y,z=a?.Header||K,h=a?.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.code);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:l,onExportPdf:_,onEdit:d})}),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.code),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.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.code),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),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.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),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.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),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.code),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),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.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),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.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),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.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),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-YYJH3TPJ.js.map
1
+ import{a as R,b as x,c as N,d as A}from"./chunk-DMNKKWLY.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-N6XLGYRK.js";import{b as B}from"./chunk-T5J2Z6ZR.js";import{a as w,c as f}from"./chunk-P6H7QMKK.js";import{n as i,o as n,r as F}from"./chunk-G2LZFGZA.js";import{a as m}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:a,"data-testid":l}){let[_,d]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!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":`${l}-${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(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(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=m(({title:e,country:r,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{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," ",a?` (${a.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:"})," ",l]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=m(()=>({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:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:a}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),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(l=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}m(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:a,country:l}){return o(R,{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 ",l.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,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"})]})})]})})}m(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"})]})]})}m(J,"EstimationHeaders");function I({label:e,amounts:r,className:a,children:l}){let[_,d]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",a),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:()=>d(!_),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})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:a=0}){let[l,_]=O(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;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:()=>_(!l),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 ${l?"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(f,{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"})]}),d&&l&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:a+1})})]})}m(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(Q,{item:_,isMultipleCurrency:r,level:l},d))})}m(k,"BreakdownList");var pe=m(({estimation:e,title:r,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||q,u=a?.OnboardingTimeline||Y,z=a?.Header||K,h=a?.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.code);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:l,onExportPdf:_,onEdit:d})}),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.code),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.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.code),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),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.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),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.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),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.code),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),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.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),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.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),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.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),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.code),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),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-OVU2VJM6.js.map
@@ -1,2 +1,2 @@
1
- import{k as b}from"./chunk-GZUP2IE6.js";import{n as m,s as u}from"./chunk-G2LZFGZA.js";import{b as g,e as f}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";var L={disclaimerCostCalculator:4668194326797,engagingContractors:43161434169613,employmentAgreements:39266991211149,employeeOnboardingTimeline:4411262104589,extraPayments:4466822781709,germanyLaborLeasing:43002165606541,internationalPricing:4410698586893,pricingPlanOptions:43161720465421,ir35Status:42810224523917,remoteFxRate:33271144977421,terminationEmployeeCommunication:4411585179661,terminationNoticePeriods:5831900985613,involuntaryOffboardingServiceCharge:4406932229133,reconciliationInvoice:17604014808589},l=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL");import{useQuery as w}from"@tanstack/react-query";var k=e((r,t)=>{let{client:i}=f();return w({queryKey:["zendesk-article",r],queryFn:e(async()=>{let n=await b({client:i,path:{id:Number(r)}});if(n.error)throw new Error(n.error.message||"Failed to fetch article");return n},"queryFn"),select:e(n=>{let o=n.data?.data.help_center_article;return o&&{...o,body:u(o.body||"")}},"select"),retry:!1,...t})},"useZendeskArticle");import{jsx as R}from"react/jsx-runtime";var C=e(({Trigger:r,zendeskId:t,open:i,onClose:n})=>{let{components:o}=g(),c=l(t),s=e(()=>{n?.()},"handleClose"),{data:a,isLoading:Z,error:h}=k(t,{enabled:i}),p=o?.zendeskDrawer;if(!p)throw new Error("Zendesk drawer component not found");return R(p,{open:i,onClose:s,data:a,isLoading:Z,error:h,zendeskURL:c,Trigger:r})},"ZendeskDrawer");import{useState as x}from"react";import{jsx as d}from"react/jsx-runtime";var y="RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block text-xs bg-transparent border-none cursor-pointer p-0";function Q({zendeskId:r,className:t,onClick:i,children:n,external:o=!1}){let[c,s]=x(!1),a=e(()=>{o||s(!0),i?.(r)},"handleClick");return o?d("a",{href:l(r),target:"_blank",rel:"noopener noreferrer",onClick:a,className:m(y,t),children:n}):d(C,{zendeskId:r,open:c,onClose:()=>s(!1),Trigger:d("button",{onClick:a,className:m(y,t),children:n})})}e(Q,"ZendeskTriggerButton");export{L as a,l as b,Q as c};
2
- //# sourceMappingURL=chunk-2Q462FT7.js.map
1
+ import{k as b}from"./chunk-KWIWHDBS.js";import{n as m,s as u}from"./chunk-G2LZFGZA.js";import{b as g,e as f}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";var L={disclaimerCostCalculator:4668194326797,engagingContractors:43161434169613,employmentAgreements:39266991211149,employeeOnboardingTimeline:4411262104589,extraPayments:4466822781709,germanyLaborLeasing:43002165606541,internationalPricing:4410698586893,pricingPlanOptions:43161720465421,ir35Status:42810224523917,remoteFxRate:33271144977421,terminationEmployeeCommunication:4411585179661,terminationNoticePeriods:5831900985613,involuntaryOffboardingServiceCharge:4406932229133,reconciliationInvoice:17604014808589},l=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL");import{useQuery as w}from"@tanstack/react-query";var k=e((r,t)=>{let{client:i}=f();return w({queryKey:["zendesk-article",r],queryFn:e(async()=>{let n=await b({client:i,path:{id:Number(r)}});if(n.error)throw new Error(n.error.message||"Failed to fetch article");return n},"queryFn"),select:e(n=>{let o=n.data?.data.help_center_article;return o&&{...o,body:u(o.body||"")}},"select"),retry:!1,...t})},"useZendeskArticle");import{jsx as R}from"react/jsx-runtime";var C=e(({Trigger:r,zendeskId:t,open:i,onClose:n})=>{let{components:o}=g(),c=l(t),s=e(()=>{n?.()},"handleClose"),{data:a,isLoading:Z,error:h}=k(t,{enabled:i}),p=o?.zendeskDrawer;if(!p)throw new Error("Zendesk drawer component not found");return R(p,{open:i,onClose:s,data:a,isLoading:Z,error:h,zendeskURL:c,Trigger:r})},"ZendeskDrawer");import{useState as x}from"react";import{jsx as d}from"react/jsx-runtime";var y="RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block text-xs bg-transparent border-none cursor-pointer p-0";function Q({zendeskId:r,className:t,onClick:i,children:n,external:o=!1}){let[c,s]=x(!1),a=e(()=>{o||s(!0),i?.(r)},"handleClick");return o?d("a",{href:l(r),target:"_blank",rel:"noopener noreferrer",onClick:a,className:m(y,t),children:n}):d(C,{zendeskId:r,open:c,onClose:()=>s(!1),Trigger:d("button",{onClick:a,className:m(y,t),children:n})})}e(Q,"ZendeskTriggerButton");export{L as a,l as b,Q as c};
2
+ //# sourceMappingURL=chunk-P6H7QMKK.js.map
@@ -1,2 +1,2 @@
1
- var t="urn:remotecom:resource:product:contractor:standard:monthly",e="urn:remotecom:resource:product:contractor:plus:monthly",o="urn:remotecom:resource:product:contractor:aor:monthly",n="urn:remotecom:resource:product:eor:monthly",c={cm:t,"cm+":e,cor:o,eor:n},i="ir_35",s="REMOTE_AI",d="You cannot control how a contractor completes the Services and Deliverables. This means, for example, that you can't specify their working hours or use of subcontractors. Please make sure this field includes only project names, descriptions, and deliverables. We do not allow hyperlinks.",l="The content You have entered may not be consistent with the Contractor of Record terms. You are responsible before proceeding for ensuring that the language entered herein accurately reflects those terms and your relationship with Subcontractors.",r=[{title:"You add a new contractor and their details in Remote.",id:"add-contractor-details"},{title:"Contractor accepts invite to join Remote.",id:"contractor-accepts-invite"},{title:"Ask your contractor to sign their agreement with your company.",id:"ask-contractor-to-sign-agreement"},{title:"Once the agreement is signed, the contractor can begin work.",id:"agreement-signed-begin-work"},{title:"The contractor will submit invoices on a date specified by you.",id:"contractor-submits-invoices"},{title:"You will pay the contractor according to the agreed-upon terms.",id:"pay-contractor"}],a=[{title:"You add a new contractor and their details in Remote, and reconfirm our Terms of Service.",description:"Review all details carefully, as we'll use this information to draft the contract.",id:"add-contractor-details-and-reconfirm-terms"},{title:"You pay the reserve amount required to add the contractor.",id:"pay-reserve-amount"},{title:"The contractor is invited to the platform.",id:"contractor-invited-to-platform"},{title:"The contractor completes onboarding on Remote.",id:"contractor-completes-onboarding"},{title:"The contractor signs the services agreement with Remote.",id:"contractor-signs-services-agreement"},{title:"Contractor begins working.",id:"contractor-begins-working"},{title:"Contractor submits an invoice to Remote.",id:"contractor-submits-invoice"},{title:"You review and approve the invoice.",id:"review-and-approve-invoice"},{title:"A COR contractor payment invoice is generated, which you pay.",id:"cor-contractor-payment-invoice-generated"},{title:"Remote receives payment and pays contractor.",id:"remote-receives-payment-and-pays-contractor"},{title:"Contractor receives payment.",id:"contractor-receives-payment"}],m={[t]:r,[e]:r,[o]:a},p={[t]:{title:"Contractor Management",subtitle:"Engage and pay contractors compliantly",listItems:["Ideal for businesses wanting a straightforward solution to manage and pay contractors directly.","Helps with everything from contractor onboarding, invoicing, payments, and compliance.","Full control remains with you."],contractPillText:"Contract between you and contractor"},[e]:{title:"Contractor Management Plus",subtitle:"Engage and pay contractors with indemnity coverage",listItems:["Great for businesses concerned about contractor classification risks.","Helps with everything from contractor onboarding, invoicing, payments, and compliance.","Offers a warranty on Remote's localized, compliant contracts.","Control remains with you"],contractPillText:"Contract between you and contractor"},[o]:{title:"Contractor of Record",subtitle:"Remote reduces liability by directly engaging the contractor",listItems:["Ideal for businesses who want admin relief and have low risk tolerance.","No need to be experts in local labor laws; Remote manages its compliance with contractors.","Indemnity protection, Remote backs its compliance in administering and paying contractors"],contractPillText:"Contract between Remote and contractor"},[n]:{title:"Employer of Record",subtitle:"Remote engages the employee on your behalf",listItems:["Remote manages onboarding, payroll, and compliance","Manages taxes, benefits, and time-off tracking","Handles contracts, transfers, and terminations"],contractPillText:"Contract between Remote and employee"}},u={[t]:["Contract between you and contractor","Localized contract templates","AI-powered features to reduce misclassification risks","Experts on hand to identify misclassification risks","Only pay for active contractors","Work with contractors in 200+ countries and jurisdictions"],[e]:["Contract between you and contractor","Access to all Contractor Management features","$100K indemnity coverage for penalties","4X monetary coverage than our competitors\xA0 in case of penalties"],[o]:["Contract between Remote and the contractor","Our most comprehensive option for compliance and flexibility","Locally compliant agreements","Localized contract templates","Indemnity coverage for losses related to Remote\u2019s administration and contractor payments"]};export{t as a,e as b,o as c,n as d,c as e,i as f,s as g,d as h,l as i,a as j,m as k,p as l,u as m};
2
- //# sourceMappingURL=chunk-Q2OGLLBA.js.map
1
+ var t="urn:remotecom:resource:product:contractor:standard:monthly",e="urn:remotecom:resource:product:contractor:plus:monthly",o="urn:remotecom:resource:product:contractor:aor:monthly",n="urn:remotecom:resource:product:eor:monthly",c={cm:t,"cm+":e,cor:o,eor:n},i="ir_35",s="REMOTE_AI",d="You cannot control how a contractor completes the Services and Deliverables. This means, for example, that you can't specify their working hours or use of subcontractors. Please make sure this field includes only project names, descriptions, and deliverables. We do not allow hyperlinks.",l="The content You have entered may not be consistent with the Contractor of Record terms. You are responsible before proceeding for ensuring that the language entered herein accurately reflects those terms and your relationship with Subcontractors.",r=[{title:"You add a new contractor and their details in Remote.",id:"add-contractor-details"},{title:"Contractor accepts invite to join Remote.",id:"contractor-accepts-invite"},{title:"Ask your contractor to sign their agreement with your company.",id:"ask-contractor-to-sign-agreement"},{title:"Once the agreement is signed, the contractor can begin work.",id:"agreement-signed-begin-work"},{title:"The contractor will submit invoices on a date specified by you.",id:"contractor-submits-invoices"},{title:"You will pay the contractor according to the agreed-upon terms.",id:"pay-contractor"}],a=[{title:"You add a new contractor and their details in Remote, and reconfirm our Terms of Service.",description:"Review all details carefully, as we'll use this information to draft the contract.",id:"add-contractor-details-and-reconfirm-terms"},{title:"You pay the reserve amount required to add the contractor.",id:"pay-reserve-amount"},{title:"The contractor is invited to the platform.",id:"contractor-invited-to-platform"},{title:"The contractor completes onboarding on Remote.",id:"contractor-completes-onboarding"},{title:"The contractor signs the services agreement with Remote.",id:"contractor-signs-services-agreement"},{title:"Contractor begins working.",id:"contractor-begins-working"},{title:"Contractor submits an invoice to Remote.",id:"contractor-submits-invoice"},{title:"You review and approve the invoice.",id:"review-and-approve-invoice"},{title:"A COR contractor payment invoice is generated, which you pay.",id:"cor-contractor-payment-invoice-generated"},{title:"Remote receives payment and pays contractor.",id:"remote-receives-payment-and-pays-contractor"},{title:"Contractor receives payment.",id:"contractor-receives-payment"}],m={[t]:r,[e]:r,[o]:a},p={[t]:{title:"Contractor Management",subtitle:"Engage and pay contractors compliantly",listItems:["Ideal for businesses wanting a straightforward solution to manage and pay contractors directly.","Helps with everything from contractor onboarding, invoicing, payments, and compliance.","Full control remains with you."],contractPillText:"Contract between you and contractor"},[e]:{title:"Contractor Management Plus",subtitle:"Engage and pay contractors with indemnity coverage",listItems:["Great for businesses concerned about contractor classification risks.","Helps with everything from contractor onboarding, invoicing, payments, and compliance.","Offers a warranty on Remote's localized, compliant contracts.","Control remains with you."],contractPillText:"Contract between you and contractor"},[o]:{title:"Contractor of Record",subtitle:"Remote reduces liability by directly engaging the contractor",listItems:["Ideal for businesses who want admin relief and have low risk tolerance.","No need to be experts in local labor laws; Remote manages its compliance with contractors.","Indemnity protection, Remote backs its compliance in administering and paying contractors."],contractPillText:"Contract between Remote and contractor"},[n]:{title:"Employer of Record",subtitle:"Remote engages the employee on your behalf",listItems:["Remote manages onboarding, payroll, and compliance.","Manages taxes, benefits, and time-off tracking.","Handles contracts, transfers, and terminations."],contractPillText:"Contract between Remote and employee"}},u={[t]:["Contract between you and contractor","Localized contract templates","AI-powered features to reduce misclassification risks","Experts on hand to identify misclassification risks","Only pay for active contractors","Work with contractors in 200+ countries and jurisdictions"],[e]:["Contract between you and contractor","Access to all Contractor Management features","$100K indemnity coverage for penalties","4X monetary coverage than our competitors\xA0 in case of penalties"],[o]:["Contract between Remote and the contractor","Our most comprehensive option for compliance and flexibility","Locally compliant agreements","Localized contract templates","Indemnity coverage for losses related to Remote\u2019s administration and contractor payments"]};export{t as a,e as b,o as c,n as d,c as e,i as f,s as g,d as h,l as i,a as j,m as k,p as l,u as m};
2
+ //# sourceMappingURL=chunk-PB6UQ4A4.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/ContractorOnboarding/constants.ts"],"sourcesContent":["export const contractorStandardProductIdentifier =\n 'urn:remotecom:resource:product:contractor:standard:monthly';\nexport const contractorPlusProductIdentifier =\n 'urn:remotecom:resource:product:contractor:plus:monthly';\nexport const corProductIdentifier =\n 'urn:remotecom:resource:product:contractor:aor:monthly';\nexport const eorProductIdentifier =\n 'urn:remotecom:resource:product:eor:monthly';\n\nexport type ProductType = 'cm' | 'cm+' | 'cor' | 'eor';\n\nexport const PRODUCT_IDENTIFIER_MAP: Record<ProductType, string> = {\n cm: contractorStandardProductIdentifier,\n 'cm+': contractorPlusProductIdentifier,\n cor: corProductIdentifier,\n eor: eorProductIdentifier,\n};\n\nexport const IR35_FILE_SUBTYPE = 'ir_35';\n\nexport const REMOTE_AI_ERROR_SOURCE = 'REMOTE_AI';\n\nexport const REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE =\n \"You cannot control how a contractor completes the Services and Deliverables. This means, for example, that you can't specify their working hours or use of subcontractors. Please make sure this field includes only project names, descriptions, and deliverables. We do not allow hyperlinks.\";\n\nexport const REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE =\n 'The content You have entered may not be consistent with the Contractor of Record terms. You are responsible before proceeding for ensuring that the language entered herein accurately reflects those terms and your relationship with Subcontractors.';\n\nconst standardOnboardingWorkflow = [\n {\n title: 'You add a new contractor and their details in Remote.',\n id: 'add-contractor-details',\n },\n {\n title: 'Contractor accepts invite to join Remote.',\n id: 'contractor-accepts-invite',\n },\n {\n title: 'Ask your contractor to sign their agreement with your company.',\n id: 'ask-contractor-to-sign-agreement',\n },\n {\n title: 'Once the agreement is signed, the contractor can begin work.',\n id: 'agreement-signed-begin-work',\n },\n {\n title: 'The contractor will submit invoices on a date specified by you.',\n id: 'contractor-submits-invoices',\n },\n {\n title: 'You will pay the contractor according to the agreed-upon terms.',\n id: 'pay-contractor',\n },\n];\n\nexport const corOnboardingWorkflow = [\n {\n title:\n 'You add a new contractor and their details in Remote, and reconfirm our Terms of Service.',\n description:\n \"Review all details carefully, as we'll use this information to draft the contract.\",\n id: 'add-contractor-details-and-reconfirm-terms',\n },\n {\n title: 'You pay the reserve amount required to add the contractor.',\n id: 'pay-reserve-amount',\n },\n {\n title: 'The contractor is invited to the platform.',\n id: 'contractor-invited-to-platform',\n },\n {\n title: 'The contractor completes onboarding on Remote.',\n id: 'contractor-completes-onboarding',\n },\n {\n title: 'The contractor signs the services agreement with Remote.',\n id: 'contractor-signs-services-agreement',\n },\n {\n title: 'Contractor begins working.',\n id: 'contractor-begins-working',\n },\n {\n title: 'Contractor submits an invoice to Remote.',\n id: 'contractor-submits-invoice',\n },\n {\n title: 'You review and approve the invoice.',\n id: 'review-and-approve-invoice',\n },\n {\n title: 'A COR contractor payment invoice is generated, which you pay.',\n id: 'cor-contractor-payment-invoice-generated',\n },\n {\n title: 'Remote receives payment and pays contractor.',\n id: 'remote-receives-payment-and-pays-contractor',\n },\n {\n title: 'Contractor receives payment.',\n id: 'contractor-receives-payment',\n },\n];\n\n/**\n * Onboarding workflows for each pricing plan\n */\nexport const onboardingWorkflows: Record<\n string,\n { title: string; id: string; description?: string }[]\n> = {\n [contractorStandardProductIdentifier]: standardOnboardingWorkflow,\n // we assign the same workflow as its the same for standard and plus\n [contractorPlusProductIdentifier]: standardOnboardingWorkflow,\n [corProductIdentifier]: corOnboardingWorkflow,\n};\n\nexport const pricingPlanDetails = {\n [contractorStandardProductIdentifier]: {\n title: 'Contractor Management',\n subtitle: 'Engage and pay contractors compliantly',\n listItems: [\n 'Ideal for businesses wanting a straightforward solution to manage and pay contractors directly.',\n 'Helps with everything from contractor onboarding, invoicing, payments, and compliance.',\n 'Full control remains with you.',\n ],\n contractPillText: 'Contract between you and contractor',\n },\n [contractorPlusProductIdentifier]: {\n title: 'Contractor Management Plus',\n subtitle: 'Engage and pay contractors with indemnity coverage',\n listItems: [\n 'Great for businesses concerned about contractor classification risks.',\n 'Helps with everything from contractor onboarding, invoicing, payments, and compliance.',\n \"Offers a warranty on Remote's localized, compliant contracts.\",\n 'Control remains with you',\n ],\n contractPillText: 'Contract between you and contractor',\n },\n [corProductIdentifier]: {\n title: 'Contractor of Record',\n subtitle: 'Remote reduces liability by directly engaging the contractor',\n listItems: [\n 'Ideal for businesses who want admin relief and have low risk tolerance.',\n 'No need to be experts in local labor laws; Remote manages its compliance with contractors.',\n 'Indemnity protection, Remote backs its compliance in administering and paying contractors',\n ],\n contractPillText: 'Contract between Remote and contractor',\n },\n [eorProductIdentifier]: {\n title: 'Employer of Record',\n subtitle: 'Remote engages the employee on your behalf',\n listItems: [\n 'Remote manages onboarding, payroll, and compliance',\n 'Manages taxes, benefits, and time-off tracking',\n 'Handles contracts, transfers, and terminations',\n ],\n contractPillText: 'Contract between Remote and employee',\n },\n};\n\nexport const FEATURES_BY_IDENTIFIER: Record<string, string[]> = {\n [contractorStandardProductIdentifier]: [\n 'Contract between you and contractor',\n 'Localized contract templates',\n 'AI-powered features to reduce misclassification risks',\n 'Experts on hand to identify misclassification risks',\n 'Only pay for active contractors',\n 'Work with contractors in 200+ countries and jurisdictions',\n ],\n [contractorPlusProductIdentifier]: [\n 'Contract between you and contractor',\n 'Access to all Contractor Management features',\n '$100K indemnity coverage for penalties',\n '4X monetary coverage than our competitors  in case of penalties',\n ],\n [corProductIdentifier]: [\n 'Contract between Remote and the contractor',\n 'Our most comprehensive option for compliance and flexibility',\n 'Locally compliant agreements',\n 'Localized contract templates',\n 'Indemnity coverage for losses related to Remote’s administration and contractor payments',\n ],\n};\n"],"mappings":"AAAO,IAAMA,EACX,6DACWC,EACX,yDACWC,EACX,wDACWC,EACX,6CAIWC,EAAsD,CACjE,GAAIJ,EACJ,MAAOC,EACP,IAAKC,EACL,IAAKC,CACP,EAEaE,EAAoB,QAEpBC,EAAyB,YAEzBC,EACX,kSAEWC,EACX,yPAEIC,EAA6B,CACjC,CACE,MAAO,wDACP,GAAI,wBACN,EACA,CACE,MAAO,4CACP,GAAI,2BACN,EACA,CACE,MAAO,iEACP,GAAI,kCACN,EACA,CACE,MAAO,+DACP,GAAI,6BACN,EACA,CACE,MAAO,kEACP,GAAI,6BACN,EACA,CACE,MAAO,kEACP,GAAI,gBACN,CACF,EAEaC,EAAwB,CACnC,CACE,MACE,4FACF,YACE,qFACF,GAAI,4CACN,EACA,CACE,MAAO,6DACP,GAAI,oBACN,EACA,CACE,MAAO,6CACP,GAAI,gCACN,EACA,CACE,MAAO,iDACP,GAAI,iCACN,EACA,CACE,MAAO,2DACP,GAAI,qCACN,EACA,CACE,MAAO,6BACP,GAAI,2BACN,EACA,CACE,MAAO,2CACP,GAAI,4BACN,EACA,CACE,MAAO,sCACP,GAAI,4BACN,EACA,CACE,MAAO,gEACP,GAAI,0CACN,EACA,CACE,MAAO,+CACP,GAAI,6CACN,EACA,CACE,MAAO,+BACP,GAAI,6BACN,CACF,EAKaC,EAGT,CACF,CAACX,CAAmC,EAAGS,EAEvC,CAACR,CAA+B,EAAGQ,EACnC,CAACP,CAAoB,EAAGQ,CAC1B,EAEaE,EAAqB,CAChC,CAACZ,CAAmC,EAAG,CACrC,MAAO,wBACP,SAAU,yCACV,UAAW,CACT,kGACA,yFACA,gCACF,EACA,iBAAkB,qCACpB,EACA,CAACC,CAA+B,EAAG,CACjC,MAAO,6BACP,SAAU,qDACV,UAAW,CACT,wEACA,yFACA,gEACA,0BACF,EACA,iBAAkB,qCACpB,EACA,CAACC,CAAoB,EAAG,CACtB,MAAO,uBACP,SAAU,+DACV,UAAW,CACT,0EACA,6FACA,2FACF,EACA,iBAAkB,wCACpB,EACA,CAACC,CAAoB,EAAG,CACtB,MAAO,qBACP,SAAU,6CACV,UAAW,CACT,qDACA,iDACA,gDACF,EACA,iBAAkB,sCACpB,CACF,EAEaU,EAAmD,CAC9D,CAACb,CAAmC,EAAG,CACrC,sCACA,+BACA,wDACA,sDACA,kCACA,2DACF,EACA,CAACC,CAA+B,EAAG,CACjC,sCACA,+CACA,yCACA,oEACF,EACA,CAACC,CAAoB,EAAG,CACtB,6CACA,+DACA,+BACA,+BACA,+FACF,CACF","names":["contractorStandardProductIdentifier","contractorPlusProductIdentifier","corProductIdentifier","eorProductIdentifier","PRODUCT_IDENTIFIER_MAP","IR35_FILE_SUBTYPE","REMOTE_AI_ERROR_SOURCE","REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE","REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE","standardOnboardingWorkflow","corOnboardingWorkflow","onboardingWorkflows","pricingPlanDetails","FEATURES_BY_IDENTIFIER"]}
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/constants.ts"],"sourcesContent":["export const contractorStandardProductIdentifier =\n 'urn:remotecom:resource:product:contractor:standard:monthly';\nexport const contractorPlusProductIdentifier =\n 'urn:remotecom:resource:product:contractor:plus:monthly';\nexport const corProductIdentifier =\n 'urn:remotecom:resource:product:contractor:aor:monthly';\nexport const eorProductIdentifier =\n 'urn:remotecom:resource:product:eor:monthly';\n\nexport type ProductType = 'cm' | 'cm+' | 'cor' | 'eor';\n\nexport const PRODUCT_IDENTIFIER_MAP: Record<ProductType, string> = {\n cm: contractorStandardProductIdentifier,\n 'cm+': contractorPlusProductIdentifier,\n cor: corProductIdentifier,\n eor: eorProductIdentifier,\n};\n\nexport const IR35_FILE_SUBTYPE = 'ir_35';\n\nexport const REMOTE_AI_ERROR_SOURCE = 'REMOTE_AI';\n\nexport const REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE =\n \"You cannot control how a contractor completes the Services and Deliverables. This means, for example, that you can't specify their working hours or use of subcontractors. Please make sure this field includes only project names, descriptions, and deliverables. We do not allow hyperlinks.\";\n\nexport const REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE =\n 'The content You have entered may not be consistent with the Contractor of Record terms. You are responsible before proceeding for ensuring that the language entered herein accurately reflects those terms and your relationship with Subcontractors.';\n\nconst standardOnboardingWorkflow = [\n {\n title: 'You add a new contractor and their details in Remote.',\n id: 'add-contractor-details',\n },\n {\n title: 'Contractor accepts invite to join Remote.',\n id: 'contractor-accepts-invite',\n },\n {\n title: 'Ask your contractor to sign their agreement with your company.',\n id: 'ask-contractor-to-sign-agreement',\n },\n {\n title: 'Once the agreement is signed, the contractor can begin work.',\n id: 'agreement-signed-begin-work',\n },\n {\n title: 'The contractor will submit invoices on a date specified by you.',\n id: 'contractor-submits-invoices',\n },\n {\n title: 'You will pay the contractor according to the agreed-upon terms.',\n id: 'pay-contractor',\n },\n];\n\nexport const corOnboardingWorkflow = [\n {\n title:\n 'You add a new contractor and their details in Remote, and reconfirm our Terms of Service.',\n description:\n \"Review all details carefully, as we'll use this information to draft the contract.\",\n id: 'add-contractor-details-and-reconfirm-terms',\n },\n {\n title: 'You pay the reserve amount required to add the contractor.',\n id: 'pay-reserve-amount',\n },\n {\n title: 'The contractor is invited to the platform.',\n id: 'contractor-invited-to-platform',\n },\n {\n title: 'The contractor completes onboarding on Remote.',\n id: 'contractor-completes-onboarding',\n },\n {\n title: 'The contractor signs the services agreement with Remote.',\n id: 'contractor-signs-services-agreement',\n },\n {\n title: 'Contractor begins working.',\n id: 'contractor-begins-working',\n },\n {\n title: 'Contractor submits an invoice to Remote.',\n id: 'contractor-submits-invoice',\n },\n {\n title: 'You review and approve the invoice.',\n id: 'review-and-approve-invoice',\n },\n {\n title: 'A COR contractor payment invoice is generated, which you pay.',\n id: 'cor-contractor-payment-invoice-generated',\n },\n {\n title: 'Remote receives payment and pays contractor.',\n id: 'remote-receives-payment-and-pays-contractor',\n },\n {\n title: 'Contractor receives payment.',\n id: 'contractor-receives-payment',\n },\n];\n\n/**\n * Onboarding workflows for each pricing plan\n */\nexport const onboardingWorkflows: Record<\n string,\n { title: string; id: string; description?: string }[]\n> = {\n [contractorStandardProductIdentifier]: standardOnboardingWorkflow,\n // we assign the same workflow as its the same for standard and plus\n [contractorPlusProductIdentifier]: standardOnboardingWorkflow,\n [corProductIdentifier]: corOnboardingWorkflow,\n};\n\nexport const pricingPlanDetails = {\n [contractorStandardProductIdentifier]: {\n title: 'Contractor Management',\n subtitle: 'Engage and pay contractors compliantly',\n listItems: [\n 'Ideal for businesses wanting a straightforward solution to manage and pay contractors directly.',\n 'Helps with everything from contractor onboarding, invoicing, payments, and compliance.',\n 'Full control remains with you.',\n ],\n contractPillText: 'Contract between you and contractor',\n },\n [contractorPlusProductIdentifier]: {\n title: 'Contractor Management Plus',\n subtitle: 'Engage and pay contractors with indemnity coverage',\n listItems: [\n 'Great for businesses concerned about contractor classification risks.',\n 'Helps with everything from contractor onboarding, invoicing, payments, and compliance.',\n \"Offers a warranty on Remote's localized, compliant contracts.\",\n 'Control remains with you.',\n ],\n contractPillText: 'Contract between you and contractor',\n },\n [corProductIdentifier]: {\n title: 'Contractor of Record',\n subtitle: 'Remote reduces liability by directly engaging the contractor',\n listItems: [\n 'Ideal for businesses who want admin relief and have low risk tolerance.',\n 'No need to be experts in local labor laws; Remote manages its compliance with contractors.',\n 'Indemnity protection, Remote backs its compliance in administering and paying contractors.',\n ],\n contractPillText: 'Contract between Remote and contractor',\n },\n [eorProductIdentifier]: {\n title: 'Employer of Record',\n subtitle: 'Remote engages the employee on your behalf',\n listItems: [\n 'Remote manages onboarding, payroll, and compliance.',\n 'Manages taxes, benefits, and time-off tracking.',\n 'Handles contracts, transfers, and terminations.',\n ],\n contractPillText: 'Contract between Remote and employee',\n },\n};\n\nexport const FEATURES_BY_IDENTIFIER: Record<string, string[]> = {\n [contractorStandardProductIdentifier]: [\n 'Contract between you and contractor',\n 'Localized contract templates',\n 'AI-powered features to reduce misclassification risks',\n 'Experts on hand to identify misclassification risks',\n 'Only pay for active contractors',\n 'Work with contractors in 200+ countries and jurisdictions',\n ],\n [contractorPlusProductIdentifier]: [\n 'Contract between you and contractor',\n 'Access to all Contractor Management features',\n '$100K indemnity coverage for penalties',\n '4X monetary coverage than our competitors  in case of penalties',\n ],\n [corProductIdentifier]: [\n 'Contract between Remote and the contractor',\n 'Our most comprehensive option for compliance and flexibility',\n 'Locally compliant agreements',\n 'Localized contract templates',\n 'Indemnity coverage for losses related to Remote’s administration and contractor payments',\n ],\n};\n"],"mappings":"AAAO,IAAMA,EACX,6DACWC,EACX,yDACWC,EACX,wDACWC,EACX,6CAIWC,EAAsD,CACjE,GAAIJ,EACJ,MAAOC,EACP,IAAKC,EACL,IAAKC,CACP,EAEaE,EAAoB,QAEpBC,EAAyB,YAEzBC,EACX,kSAEWC,EACX,yPAEIC,EAA6B,CACjC,CACE,MAAO,wDACP,GAAI,wBACN,EACA,CACE,MAAO,4CACP,GAAI,2BACN,EACA,CACE,MAAO,iEACP,GAAI,kCACN,EACA,CACE,MAAO,+DACP,GAAI,6BACN,EACA,CACE,MAAO,kEACP,GAAI,6BACN,EACA,CACE,MAAO,kEACP,GAAI,gBACN,CACF,EAEaC,EAAwB,CACnC,CACE,MACE,4FACF,YACE,qFACF,GAAI,4CACN,EACA,CACE,MAAO,6DACP,GAAI,oBACN,EACA,CACE,MAAO,6CACP,GAAI,gCACN,EACA,CACE,MAAO,iDACP,GAAI,iCACN,EACA,CACE,MAAO,2DACP,GAAI,qCACN,EACA,CACE,MAAO,6BACP,GAAI,2BACN,EACA,CACE,MAAO,2CACP,GAAI,4BACN,EACA,CACE,MAAO,sCACP,GAAI,4BACN,EACA,CACE,MAAO,gEACP,GAAI,0CACN,EACA,CACE,MAAO,+CACP,GAAI,6CACN,EACA,CACE,MAAO,+BACP,GAAI,6BACN,CACF,EAKaC,EAGT,CACF,CAACX,CAAmC,EAAGS,EAEvC,CAACR,CAA+B,EAAGQ,EACnC,CAACP,CAAoB,EAAGQ,CAC1B,EAEaE,EAAqB,CAChC,CAACZ,CAAmC,EAAG,CACrC,MAAO,wBACP,SAAU,yCACV,UAAW,CACT,kGACA,yFACA,gCACF,EACA,iBAAkB,qCACpB,EACA,CAACC,CAA+B,EAAG,CACjC,MAAO,6BACP,SAAU,qDACV,UAAW,CACT,wEACA,yFACA,gEACA,2BACF,EACA,iBAAkB,qCACpB,EACA,CAACC,CAAoB,EAAG,CACtB,MAAO,uBACP,SAAU,+DACV,UAAW,CACT,0EACA,6FACA,4FACF,EACA,iBAAkB,wCACpB,EACA,CAACC,CAAoB,EAAG,CACtB,MAAO,qBACP,SAAU,6CACV,UAAW,CACT,sDACA,kDACA,iDACF,EACA,iBAAkB,sCACpB,CACF,EAEaU,EAAmD,CAC9D,CAACb,CAAmC,EAAG,CACrC,sCACA,+BACA,wDACA,sDACA,kCACA,2DACF,EACA,CAACC,CAA+B,EAAG,CACjC,sCACA,+CACA,yCACA,oEACF,EACA,CAACC,CAAoB,EAAG,CACtB,6CACA,+DACA,+BACA,+BACA,+FACF,CACF","names":["contractorStandardProductIdentifier","contractorPlusProductIdentifier","corProductIdentifier","eorProductIdentifier","PRODUCT_IDENTIFIER_MAP","IR35_FILE_SUBTYPE","REMOTE_AI_ERROR_SOURCE","REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE","REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE","standardOnboardingWorkflow","corOnboardingWorkflow","onboardingWorkflows","pricingPlanDetails","FEATURES_BY_IDENTIFIER"]}
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-KFYWUBRS.js";import{a as c}from"./chunk-W5MWHAAI.js";import{f as a,h as d}from"./chunk-Y3CJRZLA.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
2
- //# sourceMappingURL=chunk-ENV2K73V.js.map
1
+ import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-KFYWUBRS.js";import{a as c}from"./chunk-UELAVKG5.js";import{f as a,h as d}from"./chunk-Y3CJRZLA.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
2
+ //# sourceMappingURL=chunk-PET4EGTM.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-AC4MDLIM.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{c as s,i as t}from"./chunk-G2LZFGZA.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=t(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=s(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-DPXSK2UQ.js.map
1
+ import{a as m}from"./chunk-FEWMPYBF.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{c as s,i as t}from"./chunk-G2LZFGZA.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=t(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=s(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-PIIWY632.js.map
@@ -1,2 +1,2 @@
1
- import{a as b}from"./chunk-LLHJODMO.js";import{j as _,k as d,l as x,n as u,o as f}from"./chunk-Y3CJRZLA.js";import{n as a}from"./chunk-G2LZFGZA.js";import{a as c}from"./chunk-P37U34EQ.js";import*as g from"react";import{jsx as h}from"react/jsx-runtime";var s=g.forwardRef(({className:e,...r},t)=>h("textarea",{className:a("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:t,...r}));s.displayName="Textarea";import{jsx as o,jsxs as l}from"react/jsx-runtime";function y({field:e,fieldState:r,fieldData:t}){let{name:i,label:p,description:n,maxLength:m}=t,F=e.value?.length??0;return l(_,{"data-field":i,className:`RemoteFlows__TextArea__Item__${i}`,children:[o(d,{className:"RemoteFlows__TextArea__Label",children:p}),o(x,{children:o(s,{...e,value:e.value??"",onChange:T=>{e.onChange(T)},className:a(r.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:p})}),(n||m)&&l("div",{className:"flex items-center justify-between",children:[n&&o(u,{className:"RemoteFlows__TextArea__Description",helpCenter:o(b,{helpCenter:t.meta?.helpCenter}),children:n}),m&&l("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[F,"/",m]})]}),r.error&&o(f,{className:"RemoteFlows__TextArea__Error"})]})}c(y,"TextAreaFieldDefault");export{y as a};
2
- //# sourceMappingURL=chunk-ITDU6XPR.js.map
1
+ import{a as b}from"./chunk-SHOGXN3C.js";import{j as _,k as d,l as x,n as u,o as f}from"./chunk-Y3CJRZLA.js";import{n as a}from"./chunk-G2LZFGZA.js";import{a as c}from"./chunk-P37U34EQ.js";import*as g from"react";import{jsx as h}from"react/jsx-runtime";var s=g.forwardRef(({className:e,...r},t)=>h("textarea",{className:a("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:t,...r}));s.displayName="Textarea";import{jsx as o,jsxs as l}from"react/jsx-runtime";function y({field:e,fieldState:r,fieldData:t}){let{name:i,label:p,description:n,maxLength:m}=t,F=e.value?.length??0;return l(_,{"data-field":i,className:`RemoteFlows__TextArea__Item__${i}`,children:[o(d,{className:"RemoteFlows__TextArea__Label",children:p}),o(x,{children:o(s,{...e,value:e.value??"",onChange:T=>{e.onChange(T)},className:a(r.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:p})}),(n||m)&&l("div",{className:"flex items-center justify-between",children:[n&&o(u,{className:"RemoteFlows__TextArea__Description",helpCenter:o(b,{helpCenter:t.meta?.helpCenter}),children:n}),m&&l("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[F,"/",m]})]}),r.error&&o(f,{className:"RemoteFlows__TextArea__Error"})]})}c(y,"TextAreaFieldDefault");export{y as a};
2
+ //# sourceMappingURL=chunk-PJPYUB2R.js.map
@@ -1,2 +1,2 @@
1
- import{L as r,d as m}from"./chunk-GZUP2IE6.js";import{e as o}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as l,useQuery as p}from"@tanstack/react-query";var E=e(({employmentId:t,queryParams:n})=>{let{client:s}=o();return p({queryKey:["employment",t],retry:!1,queryFn:e(()=>r({client:s,headers:{Authorization:""},path:{employment_id:t},query:n}),"queryFn"),enabled:!!t,select:e(({data:i})=>i?.data?.employment,"select")})},"useEmploymentQuery"),f=e(()=>{let{client:t}=o();return l({mutationFn:e(({employmentId:n})=>m({client:t,headers:{Authorization:""},path:{employment_id:n}}),"mutationFn")})},"useDiscardEmploymentMutation");export{E as a,f as b};
2
- //# sourceMappingURL=chunk-PJ6KPGIE.js.map
1
+ import{L as r,d as m}from"./chunk-KWIWHDBS.js";import{e as o}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as l,useQuery as p}from"@tanstack/react-query";var E=e(({employmentId:t,queryParams:n})=>{let{client:s}=o();return p({queryKey:["employment",t],retry:!1,queryFn:e(()=>r({client:s,headers:{Authorization:""},path:{employment_id:t},query:n}),"queryFn"),enabled:!!t,select:e(({data:i})=>i?.data?.employment,"select")})},"useEmploymentQuery"),f=e(()=>{let{client:t}=o();return l({mutationFn:e(({employmentId:n})=>m({client:t,headers:{Authorization:""},path:{employment_id:n}}),"mutationFn")})},"useDiscardEmploymentMutation");export{E as a,f as b};
2
+ //# sourceMappingURL=chunk-PMRAJKJ5.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-LKVQ32ZK.js";import{F as c,N as m,R as C,W as d,o as l,y as u}from"./chunk-GZUP2IE6.js";import{e as i}from"./chunk-H2O4CVKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as n,useQuery as r}from"@tanstack/react-query";var q=t(({includePremiumBenefits:e})=>{let{client:o}=i();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:o,query:{include_premium_benefits:e}}),"queryFn"),select:t(a=>a.data?.data.filter(s=>s.availability==="active").map(s=>({value:s.region_slug,label:s.name,childRegions:s.child_regions,hasAdditionalFields:s.has_additional_fields,regionSlug:s.region_slug,currency:s.currency.code})),"select")})},"useCostCalculatorCountries"),P=t(()=>{let{client:e}=i();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(o=>o.data?.data?.company_currencies.map(a=>({value:a.slug,label:a.code})),"select")})},"useCompanyCurrencies"),h=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>l({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimation"),v=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>u({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimationPdf"),x=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>C({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimationCsv"),V=t((e,{includePremiumBenefits:o,options:a})=>{let{client:s}=i();return r({queryKey:["cost-calculator-region-fields",e,o],queryFn:t(()=>m({client:s,path:{slug:e},query:{include_premium_benefits:o}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,a)},"select")})},"useRegionFields");export{q as a,P as b,h as c,v as d,x as e,V as f};
2
- //# sourceMappingURL=chunk-VTWVHO4F.js.map
1
+ import{a as p}from"./chunk-LKVQ32ZK.js";import{F as c,N as m,R as C,W as d,o as l,y as u}from"./chunk-KWIWHDBS.js";import{e as i}from"./chunk-H2O4CVKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as n,useQuery as r}from"@tanstack/react-query";var q=t(({includePremiumBenefits:e})=>{let{client:o}=i();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:o,query:{include_premium_benefits:e}}),"queryFn"),select:t(a=>a.data?.data.filter(s=>s.availability==="active").map(s=>({value:s.region_slug,label:s.name,childRegions:s.child_regions,hasAdditionalFields:s.has_additional_fields,regionSlug:s.region_slug,currency:s.currency.code})),"select")})},"useCostCalculatorCountries"),P=t(()=>{let{client:e}=i();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(o=>o.data?.data?.company_currencies.map(a=>({value:a.slug,label:a.code})),"select")})},"useCompanyCurrencies"),h=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>l({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimation"),v=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>u({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimationPdf"),x=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>C({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimationCsv"),V=t((e,{includePremiumBenefits:o,options:a})=>{let{client:s}=i();return r({queryKey:["cost-calculator-region-fields",e,o],queryFn:t(()=>m({client:s,path:{slug:e},query:{include_premium_benefits:o}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,a)},"select")})},"useRegionFields");export{q as a,P as b,h as c,v as d,x as e,V as f};
2
+ //# sourceMappingURL=chunk-QV7CEES3.js.map
@@ -0,0 +1,2 @@
1
+ import{a as te}from"./chunk-AP56UUME.js";import{a as ee}from"./chunk-IJCTN52C.js";import{e as R}from"./chunk-COAJUZSE.js";import{a as I,b as ne,c as P,d as _,f as h,m as oe}from"./chunk-PB6UQ4A4.js";import{a as X}from"./chunk-WVJDCDGZ.js";import{a as Z}from"./chunk-HGIMRQIZ.js";import{a as b}from"./chunk-LKVQ32ZK.js";import{$,E as j,K as J,S as K,V as N,X as k,_ as G,aa as B,ba as W,ea as H,f as w,ga as Y,h as Q,ha as z,r as A,t as L,u as U,v}from"./chunk-KWIWHDBS.js";import{b as q,g as O,t as V}from"./chunk-G2LZFGZA.js";import{e as a}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{useMemo as ce}from"react";import{useMutation as g,useQuery as m}from"@tanstack/react-query";import{useMutation as be,useQuery as re}from"@tanstack/react-query";var Ve=n(()=>{let{client:e}=a();return be({mutationFn:n(t=>k({client:e,body:t,headers:{Authorization:""}}),"mutationFn")})},"useUploadFile"),ie=n(e=>{let{client:t}=a();return re({queryKey:["download-file",e],queryFn:n(async()=>{let o=await j({client:t,path:{id:e}});if(o.error)throw o.error;return o.data},"queryFn"),select:n(({data:o})=>o?.file,"select"),enabled:!!e})},"useDownloadFile"),se=n((e,t,o)=>{let{client:r}=a();return re({queryKey:["employment-files",e],queryFn:n(async()=>{let i=await N({client:r,path:{employment_id:e},query:t});if(i.error)throw i.error;return i.data},"queryFn"),...o})},"useEmploymentFiles");import{useQuery as Fe}from"@tanstack/react-query";import{useQuery as ge}from"@tanstack/react-query";var E=n(()=>{let{client:e}=a();return ge({queryKey:["identity"],queryFn:n(()=>$({client:e,headers:{Authorization:""}}),"queryFn"),select:n(t=>t.data?.data,"select")})},"useIdentity");function M(e){return e!=null&&"company"in e}n(M,"hasCompany");var ae=n((e={enabled:!0})=>{let{data:t}=E(),o=M(t)?t?.company?.id??"":"",{client:r}=a();return Fe({queryKey:["pricing-plans",o],queryFn:n(()=>w({client:r,path:{company_id:o}}),"queryFn"),select:n(i=>i.data?.data?.pricing_plans,"select"),enabled:!!e?.enabled&&!!o})},"useCompanyPricingPlans");var Se=n(({employmentId:e,options:t})=>{let{client:o}=a();return m({queryKey:["contractor-currencies",e],queryFn:n(async()=>v({client:o,path:{employment_id:e},query:{restrict_to_guaranteed_pay_out_currencies:!1}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useContractorCurrencies"),_t=n(({fieldValues:e,options:t})=>m({queryKey:["contract-document-signature",e.review_completed,t?.jsfModify],queryFn:n(async()=>b(ee,e,{jsfModify:t?.jsfModify}),"queryFn"),enabled:t?.queryOptions?.enabled}),"useGetContractDocumentSignatureSchema"),ht=n(()=>{let{client:e}=a();return g({mutationFn:n(async({employmentId:t,contractDocumentId:o,payload:r})=>G({client:e,body:r,path:{employment_id:t,contract_document_id:o}}),"mutationFn")})},"useSignContractDocument"),_e=n(({employmentId:e,contractDocumentId:t,options:o})=>{let{client:r}=a();return m({queryKey:["contract-document",e,t],queryFn:n(async()=>L({client:r,path:{employment_id:e,id:t}}),"queryFn"),enabled:o?.queryOptions?.enabled,select:n(({data:i})=>({...i?.data,contract_document:{...i?.data?.contract_document,content:V(i?.data?.contract_document?.content)}}),"select")})},"useGetShowContractDocument"),Et=n(({employmentId:e,contractDocumentId:t,options:o})=>{let{data:r}=_e({employmentId:e,contractDocumentId:t,options:{queryOptions:{enabled:o?.queryOptions?.enabled}}});return{hasCompanySignedContract:r?.contract_document?.signatories?.some(s=>s.type==="company"&&s.status==="signed")}},"useHasCompanySignedContract"),he=n(({employmentId:e,options:t})=>{let{client:o}=a();return m({queryKey:["contractor-subscriptions",e],queryFn:n(async()=>A({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useGetContractorSubscriptions"),qt=n(()=>{let{client:e}=a();return g({mutationFn:n(async({employmentId:t,payload:o})=>W({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorSubscriptions"),Ot=n(()=>{let{client:e}=a();return g({mutationFn:n(async({employmentId:t,payload:o})=>K({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"useCreateContractorContractDocument"),Ee=n(({countryCode:e,employmentId:t,fieldValues:o,options:r})=>{let{client:i}=a();return m({queryKey:["contractor-onboarding-details-schema",e,t],retry:!1,queryFn:n(async()=>Q({client:i,path:{country_code:e},query:{json_schema_version:1,employment_id:t}}),"queryFn"),enabled:r?.queryOptions?.enabled,select:n(({data:s})=>{let c=s?.data?.schema||{};return b(c,o,r)},"select")})},"useContractorOnboardingDetailsSchema"),qe={[I]:"Contractor Management",[ne]:"Contractor Management Plus",[P]:"Contractor of Record"},Oe=n(e=>{let{data:t,isLoading:o}=ae({enabled:e?.enabled}),r=t?.find(s=>s.product.name==="EOR Monthly");return{eorSubscription:r?{product:{identifier:_,short_name:"EOR"},currency:r.price.currency,price:{amount:O(r.price.amount)},features:["Contract between Remote and employee","Remote manages onboarding, payroll, and compliance","Manages taxes, benefits, and time-off tracking","Handles contracts, transfers, and terminations"],description:"Enables hiring in countries without a local entity",label:"Employer of Record",value:_}:null,isLoading:o}},"useEorSubscription"),Ie=n((e,t,o)=>(t&&R(_,o)&&e.push({label:t.label,value:t.value,description:t.description,meta:{features:t.features,price:{amount:t.price.amount,currencyCode:t.currency?.code??""}},disabled:!1}),e),"addEorToFieldOptions"),It=n((e,t,o)=>{let{data:r,isLoading:i,refetch:s}=he({employmentId:e,options:{queryOptions:o?.queryOptions}}),c=ce(()=>r?.filter(u=>R(u.product.identifier??"",o?.excludeProducts))??[],[r,o?.excludeProducts]),F=r?r?.length<3:!1,d=r?.find(u=>u.product.identifier===P)?.eligibility_questionnaire?.is_blocking,C=(F||d)&&t?.eor_onboarding&&!o?.excludeProducts?.includes("eor"),{eorSubscription:T,isLoading:le}=Oe({enabled:C}),ue=c.length>0||C&&T!==null,x=b(te.data.schema,{},{...o,jsfModify:{...o?.jsfModify,required:ue?o?.jsfModify?.required:u=>u.filter(f=>f!=="subscription")}}),D=x.fields.find(u=>u.name==="subscription");if(D){let u=c.map(S=>{let l=S.product,de=S.price.amount,me=S.currency.code,pe=qe[l.identifier]??"",ye=l.identifier??"",Ce=l.description??"";l.description||console.error(`[Data Integrity] Missing description for product: ${l.identifier}`,{product:l});let fe={features:l.features??oe[l.identifier]??[],price:{amount:O(de),currencyCode:me}};return{label:pe,value:ye,description:Ce,meta:fe,disabled:d&&l.identifier!==I}});u.sort((S,l)=>S.label.localeCompare(l.label));let f=[];C&&(Ie(f,T,o?.excludeProducts),f.length>0&&(f[0].meta={...f[0].meta,groupSeparator:{show:!0}})),D.options=[...u,...f]}return{isLoading:i||le,form:x,contractorSubscriptions:r,filteredContractorSubscriptions:c,refetch:s,isEligibilityQuestionnaireBlocked:d}},"useContractorSubscriptionSchemaField"),Pt=n((e,t,o)=>{let{mutateAsyncOrThrow:r}=q(t),{mutateAsyncOrThrow:i}=q(e);return{mutateAsync:n(async({employmentId:s})=>{let{nationality_status:c,ir35:p,ir35_sds_file:F}=o,y={contract_document:{ir_35:p}},d={contract_document:{nationality:c}};return p?(await i({employmentId:s,payload:y}),F?r({employment_id:s,file:F,sub_type:h}):Promise.resolve()):c?i({employmentId:s,payload:d}):Promise.resolve()},"mutateAsync")}},"useUpdateUKandSaudiFields"),Rt=n((e,t)=>{let{data:o,isLoading:r}=se(e,{sub_type:h},{...t,select:n(({data:c})=>c?.files?.filter(p=>p.sub_type===h),"select")}),i=o?.[0]?.id,s=ie(i);return{...s,isLoading:r||s.isLoading}},"useGetIR35File"),Mt=n((e,t)=>{let{client:o}=a();return m({queryKey:["contract-documents",e],queryFn:n(async()=>U({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.enabled,select:n(({data:r})=>r?.data?.contract_documents,"select")})},"useGetContractDocuments"),Tt=n(({options:e,fieldValues:t})=>{let{client:o}=a();return m({queryKey:["eligibility-questionnaire"],queryFn:n(async()=>{let r=await B({client:o,query:{type:"contractor_of_record",json_schema_version:1}});if(r.error)throw new Error("Failed to fetch eligibility questionnaire");return r.data.data},"queryFn"),select:n(r=>{let i=r?.schema||{};return b(i,t,{jsfModify:e?.jsfModify})},"select"),enabled:e?.queryOptions?.enabled})},"useGetEligibilityQuestionnaire"),xt=n(()=>{let{client:e}=a();return g({mutationFn:n(async({employmentId:t,payload:o})=>J({client:e,body:{employment_slug:t,responses:o,type:"contractor_of_record"},query:{json_schema_version:1}}),"mutationFn")})},"usePostCreateEligibilityQuestionnaire"),Dt=n(()=>{let{client:e}=a();return g({mutationFn:n(async({employmentId:t})=>z({client:e,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorCorSubscription"),Vt=n(()=>{let{client:e}=a();return g({mutationFn:n(async({employmentId:t})=>Y({client:e,path:{employment_id:t}}),"mutationFn")})},"useDeleteContractorCorSubscription"),wt=n(e=>{let{client:t}=a(),{data:o,isLoading:r}=m({...Z(t,"contractor-onboarding-countries"),select:n(s=>s.data?.data?.map(c=>({label:c.name,value:c.code,eor_onboarding:c.eor_onboarding,contractor_products_available:c.contractor_products_available}))||[],"select"),enabled:e?.queryOptions?.enabled}),i=b(X.data.schema,{},e);if(o){let s=i.fields.find(c=>c.name==="country");s&&(s.options=o)}return{isLoading:r,selectCountryForm:i,countries:o}},"useCountriesSchemaField"),Qt=n(({countryCode:e,employmentId:t,fieldValues:o,options:r})=>{let i=Ee({countryCode:e,employmentId:t,fieldValues:o,options:r}),{data:s,isLoading:c}=Se({employmentId:t,options:{queryOptions:{enabled:r?.queryOptions?.enabled}}}),p=ce(()=>!i.data||!s?i.data:{...i.data,fields:i.data.fields.map(y=>y.name!=="payment_terms"?y:{...y,fields:y.fields?.map(d=>d.name!=="compensation_currency_code"?d:{...d,options:s.map(C=>({label:C.code,value:C.code,meta:{source:C.source}}))})})},[i.data,s]);return{...i,data:p,isLoading:i.isLoading||c}},"useContractorOnboardingDetailsSchemaWithCurrencies"),At=n(({options:e}={})=>{let{data:t}=E(),o=M(t)?t?.company?.id??"":"",{client:r}=a();return m({queryKey:["company-open-tasks",o],queryFn:n(()=>H({client:r,path:{company_id:o}}),"queryFn"),select:n(({data:i})=>i?.data?.actions??[],"select"),enabled:(e?.queryOptions?.enabled??!0)&&!!o})},"useCompanyOpenTasks");export{Ve as a,E as b,M as c,_t as d,ht as e,_e as f,Et as g,he as h,qt as i,Ot as j,qe as k,It as l,Pt as m,Rt as n,Mt as o,Tt as p,xt as q,Dt as r,Vt as s,wt as t,Qt as u,At as v};
2
+ //# sourceMappingURL=chunk-RATFUMTL.js.map