@remoteoss/remote-flows 1.41.1 → 1.42.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 (368) hide show
  1. package/dist/CheckboxFieldDefault-OK7JODEG.js +2 -0
  2. package/dist/CountryFieldDefault-ORC6XVVK.js +2 -0
  3. package/dist/DatePickerFieldDefault-EUPACNZD.js +2 -0
  4. package/dist/RadioGroupFieldDefault-XR37OID5.js +2 -0
  5. package/dist/TextAreaFieldDefault-5YJYIBAO.js +2 -0
  6. package/dist/{chunk-SKQZ6BPK.js → chunk-2TAVZJPX.js} +2 -2
  7. package/dist/{chunk-O3KGCVBO.js → chunk-3QSHWQS3.js} +2 -2
  8. package/dist/{chunk-KRZGFZUS.js → chunk-3U4PZ4KB.js} +2 -2
  9. package/dist/{chunk-XFQS2BVE.js → chunk-44F5FY7C.js} +2 -2
  10. package/dist/{chunk-4WBEA4IY.js → chunk-4KKA35AX.js} +2 -2
  11. package/dist/chunk-4LQDSIUG.js +2 -0
  12. package/dist/chunk-4LQDSIUG.js.map +1 -0
  13. package/dist/{chunk-BLCINT3L.js → chunk-4QJUNKBR.js} +2 -2
  14. package/dist/chunk-4RVJJ33G.js +2 -0
  15. package/dist/{chunk-MQTRTRV6.js.map → chunk-4RVJJ33G.js.map} +1 -1
  16. package/dist/{chunk-7EKNQYS5.js → chunk-6NKXOUJW.js} +2 -2
  17. package/dist/{chunk-6YBDMERC.js → chunk-6TKWWM5A.js} +2 -2
  18. package/dist/{chunk-ZY7RAGEL.js → chunk-6WGW27VH.js} +2 -2
  19. package/dist/{chunk-2PMYCCWO.js → chunk-7XZP24UE.js} +2 -2
  20. package/dist/{chunk-MBOKEWSX.js → chunk-A5SRPVT2.js} +2 -2
  21. package/dist/{chunk-UBBUH2DE.js → chunk-A675PPWA.js} +2 -2
  22. package/dist/chunk-BFXBFGBH.js +2 -0
  23. package/dist/chunk-BFXBFGBH.js.map +1 -0
  24. package/dist/{chunk-OKSKBEIR.js → chunk-BJZXTS47.js} +2 -2
  25. package/dist/{chunk-B3OYZQSP.js → chunk-BS2B4OOE.js} +2 -2
  26. package/dist/{chunk-KWIWHDBS.js → chunk-BYDNNJHZ.js} +2 -2
  27. package/dist/chunk-BYDNNJHZ.js.map +1 -0
  28. package/dist/{chunk-HADEU7QX.js → chunk-C332PSLT.js} +2 -2
  29. package/dist/chunk-DN6BXTAC.js +2 -0
  30. package/dist/{chunk-GGULUMOP.js → chunk-EI44AIUW.js} +2 -2
  31. package/dist/{chunk-YXHSALDR.js → chunk-F74X2V2N.js} +2 -2
  32. package/dist/{chunk-NIDRVYUJ.js → chunk-FJGDFNEH.js} +2 -2
  33. package/dist/chunk-G7N6QIOB.js +2 -0
  34. package/dist/chunk-G7N6QIOB.js.map +1 -0
  35. package/dist/{chunk-PIIWY632.js → chunk-GHHMGTM4.js} +2 -2
  36. package/dist/{chunk-PMRAJKJ5.js → chunk-GNDFT5KG.js} +2 -2
  37. package/dist/{chunk-3PYZQWDY.js → chunk-GR6QMP4Z.js} +2 -2
  38. package/dist/{chunk-MZZFNRW5.js → chunk-H6Z54SNM.js} +2 -2
  39. package/dist/{chunk-ZTNH2YIM.js → chunk-HYNJ3ITY.js} +2 -2
  40. package/dist/{chunk-HGIMRQIZ.js → chunk-ID4S6FWD.js} +2 -2
  41. package/dist/{chunk-NEKE5PRJ.js → chunk-IF42CZJH.js} +2 -2
  42. package/dist/{chunk-KBUBBK2E.js → chunk-IVDF2PMA.js} +2 -2
  43. package/dist/{chunk-HHFDREGB.js → chunk-J3HIQRZO.js} +2 -2
  44. package/dist/{chunk-TJLXZ2ZK.js → chunk-K7HS55JD.js} +2 -2
  45. package/dist/chunk-K7HS55JD.js.map +1 -0
  46. package/dist/{chunk-B5KAHNYW.js → chunk-KSJLZDGY.js} +2 -2
  47. package/dist/{chunk-FEWMPYBF.js → chunk-L3ZVE4JS.js} +2 -2
  48. package/dist/{chunk-7R7AQHV2.js → chunk-LES7J6H4.js} +2 -2
  49. package/dist/{chunk-KFFTPU6V.js → chunk-LVTBMTOU.js} +2 -2
  50. package/dist/{chunk-GTU6MTZH.js → chunk-LXNEYPO5.js} +2 -2
  51. package/dist/{chunk-W5QXZPMY.js → chunk-MG6UYSCR.js} +2 -2
  52. package/dist/{chunk-VMZQN4WU.js → chunk-NRGNFMIO.js} +2 -2
  53. package/dist/{chunk-KEYWBQH2.js → chunk-NZHABET6.js} +2 -2
  54. package/dist/{chunk-XE6HQVLQ.js → chunk-O4CLVNOP.js} +2 -2
  55. package/dist/{chunk-SHOGXN3C.js → chunk-OPDKYPYM.js} +2 -2
  56. package/dist/{chunk-PJPYUB2R.js → chunk-PSCFVUJB.js} +2 -2
  57. package/dist/{chunk-7KMXTQ4C.js → chunk-Q7SMO5VI.js} +2 -2
  58. package/dist/{chunk-UFAQ7CQH.js → chunk-QGC2HCZG.js} +2 -2
  59. package/dist/{chunk-PET4EGTM.js → chunk-QK3FQD6C.js} +2 -2
  60. package/dist/{chunk-FOUXLCEA.js → chunk-QKSYPFRB.js} +2 -2
  61. package/dist/{chunk-VPFGVFXE.js → chunk-QQ3PZHXO.js} +2 -2
  62. package/dist/{chunk-MZXFOY5T.js → chunk-QZMSDP2S.js} +2 -2
  63. package/dist/{chunk-P6H7QMKK.js → chunk-RFVHV6RE.js} +2 -2
  64. package/dist/{chunk-OVU2VJM6.js → chunk-S4QKVG2B.js} +2 -2
  65. package/dist/{chunk-57G3ZAX3.js → chunk-SJO4XFQD.js} +2 -2
  66. package/dist/{chunk-VV3LCB77.js → chunk-T7QVVLKT.js} +2 -2
  67. package/dist/{chunk-ZSN43HMP.js → chunk-TMBL5YM4.js} +2 -2
  68. package/dist/{chunk-UD24LBJ6.js → chunk-TNGJKUUV.js} +2 -2
  69. package/dist/{chunk-QV7CEES3.js → chunk-TWULMMMY.js} +2 -2
  70. package/dist/{chunk-WRCHICCJ.js → chunk-TZGC6PWQ.js} +2 -2
  71. package/dist/{chunk-W2WMUANF.js → chunk-UJWKHGH5.js} +2 -2
  72. package/dist/{chunk-INPMEOFL.js → chunk-UOWQ7UKA.js} +2 -2
  73. package/dist/{chunk-3D7HWCNX.js → chunk-UZBAOB4W.js} +2 -2
  74. package/dist/{chunk-FXJM54I4.js → chunk-V7YF7ICV.js} +2 -2
  75. package/dist/{chunk-I7JKBQHL.js → chunk-VCF327FJ.js} +2 -2
  76. package/dist/{chunk-ZBIXHOET.js → chunk-VUQH44VX.js} +2 -2
  77. package/dist/{chunk-ZMQTQ4UQ.js → chunk-W4BOTAD6.js} +2 -2
  78. package/dist/{chunk-YOFPHSYV.js → chunk-WKAVKFP6.js} +2 -2
  79. package/dist/{chunk-FAJ5I4Q4.js → chunk-WTVYMT5N.js} +2 -2
  80. package/dist/{chunk-XLURXRQT.js → chunk-X25ZOPO6.js} +2 -2
  81. package/dist/{chunk-UELAVKG5.js → chunk-X4IJ52GQ.js} +2 -2
  82. package/dist/{chunk-GJV6HJ3D.js → chunk-XEK3MUYF.js} +2 -2
  83. package/dist/chunk-XGXXXWTH.js +2 -0
  84. package/dist/chunk-XGXXXWTH.js.map +1 -0
  85. package/dist/chunk-XS5ASVWY.js +2 -0
  86. package/dist/chunk-XS5ASVWY.js.map +1 -0
  87. package/dist/{chunk-YQQHCS4S.js → chunk-YADHCTR7.js} +2 -2
  88. package/dist/chunk-YPLIXSIP.js +2 -0
  89. package/dist/chunk-YPLIXSIP.js.map +1 -0
  90. package/dist/{chunk-KH4DEFZT.js → chunk-YW4FHEYJ.js} +2 -2
  91. package/dist/{chunk-S7DDWZOR.js → chunk-ZF3JITFM.js} +2 -2
  92. package/dist/default-components.d.ts +2 -2
  93. package/dist/default-components.js +1 -1
  94. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  95. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  96. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  97. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  98. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  99. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  100. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  101. package/dist/flows/ContractAmendment/hooks.js +1 -1
  102. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  103. package/dist/flows/ContractAmendment/index.js +1 -1
  104. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  105. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  106. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +6 -5
  107. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  108. package/dist/flows/ContractorOnboarding/api.d.ts +26 -3
  109. package/dist/flows/ContractorOnboarding/api.js +1 -1
  110. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  111. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  112. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +6 -5
  113. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  114. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.d.ts +27 -0
  115. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.js +2 -0
  116. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.js.map +1 -0
  117. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  118. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  119. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +6 -5
  120. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  121. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +6 -5
  122. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  123. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +6 -5
  124. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  125. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  126. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  127. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +6 -5
  128. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  129. package/dist/flows/ContractorOnboarding/components/SaveDraftButton.d.ts +3 -3
  130. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  131. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  132. package/dist/flows/ContractorOnboarding/context.d.ts +13 -5
  133. package/dist/flows/ContractorOnboarding/hooks.d.ts +6 -5
  134. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  135. package/dist/flows/ContractorOnboarding/index.d.ts +6 -5
  136. package/dist/flows/ContractorOnboarding/index.js +1 -1
  137. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +6 -5
  138. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  139. package/dist/flows/ContractorOnboarding/json-schemas/contractOrigin.d.ts +22 -0
  140. package/dist/flows/ContractorOnboarding/json-schemas/contractOrigin.js +2 -0
  141. package/dist/flows/ContractorOnboarding/json-schemas/contractOrigin.js.map +1 -0
  142. package/dist/flows/ContractorOnboarding/types.d.ts +6 -5
  143. package/dist/flows/ContractorOnboarding/utils.d.ts +7 -5
  144. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  145. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  146. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  147. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  148. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  149. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  150. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  151. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  152. package/dist/flows/CostCalculator/api.d.ts +2 -2
  153. package/dist/flows/CostCalculator/api.js +1 -1
  154. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  155. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  156. package/dist/flows/CostCalculator/context.d.ts +3 -3
  157. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  158. package/dist/flows/CostCalculator/hooks.js +1 -1
  159. package/dist/flows/CostCalculator/index.d.ts +3 -3
  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 +4 -4
  165. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  166. package/dist/flows/CreateCompany/api.d.ts +2 -2
  167. package/dist/flows/CreateCompany/api.js +1 -1
  168. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
  169. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  170. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
  171. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  172. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
  173. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  174. package/dist/flows/CreateCompany/context.d.ts +4 -4
  175. package/dist/flows/CreateCompany/hooks.d.ts +4 -4
  176. package/dist/flows/CreateCompany/hooks.js +1 -1
  177. package/dist/flows/CreateCompany/index.d.ts +4 -4
  178. package/dist/flows/CreateCompany/index.js +1 -1
  179. package/dist/flows/CreateCompany/types.d.ts +4 -4
  180. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  181. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  182. package/dist/flows/Onboarding/api.d.ts +4 -4
  183. package/dist/flows/Onboarding/api.js +1 -1
  184. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  185. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  186. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  187. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  188. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  189. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  190. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  191. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  192. package/dist/flows/Onboarding/components/EmploymentAgreementInfoContent.js +1 -1
  193. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.d.ts +4 -4
  194. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.js +1 -1
  195. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  196. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  197. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  198. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  199. package/dist/flows/Onboarding/components/PreOnboardingRequirements.d.ts +4 -4
  200. package/dist/flows/Onboarding/components/PreOnboardingRequirements.js +1 -1
  201. package/dist/flows/Onboarding/components/PreviewEmploymentAgreementStep.js +1 -1
  202. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  203. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  204. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  205. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  206. package/dist/flows/Onboarding/context.d.ts +4 -4
  207. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  208. package/dist/flows/Onboarding/hooks.js +1 -1
  209. package/dist/flows/Onboarding/index.d.ts +4 -4
  210. package/dist/flows/Onboarding/index.js +1 -1
  211. package/dist/flows/Onboarding/types.d.ts +4 -4
  212. package/dist/flows/Onboarding/utils.d.ts +4 -4
  213. package/dist/flows/Onboarding/utils.js +1 -1
  214. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.d.ts +3 -3
  215. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.js +1 -1
  216. package/dist/flows/PayrollAdminOnboarding/context.d.ts +3 -3
  217. package/dist/flows/PayrollAdminOnboarding/hooks.d.ts +3 -3
  218. package/dist/flows/PayrollAdminOnboarding/hooks.js +1 -1
  219. package/dist/flows/PayrollAdminOnboarding/index.d.ts +3 -3
  220. package/dist/flows/PayrollAdminOnboarding/index.js +1 -1
  221. package/dist/flows/PayrollAdminOnboarding/types.d.ts +3 -3
  222. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.d.ts +3 -3
  223. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.js +1 -1
  224. package/dist/flows/PayrollEmployeeOnboarding/context.d.ts +3 -3
  225. package/dist/flows/PayrollEmployeeOnboarding/hooks.d.ts +3 -3
  226. package/dist/flows/PayrollEmployeeOnboarding/hooks.js +1 -1
  227. package/dist/flows/PayrollEmployeeOnboarding/index.d.ts +3 -3
  228. package/dist/flows/PayrollEmployeeOnboarding/index.js +1 -1
  229. package/dist/flows/PayrollEmployeeOnboarding/types.d.ts +3 -3
  230. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  231. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  232. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  233. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  234. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  235. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  236. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  237. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  238. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  239. package/dist/flows/Termination/TerminationFlow.js +1 -1
  240. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  241. package/dist/flows/Termination/TerminationForm.js +1 -1
  242. package/dist/flows/Termination/api.d.ts +5 -5
  243. package/dist/flows/Termination/api.js +1 -1
  244. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  245. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  246. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  247. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  248. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  249. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  250. package/dist/flows/Termination/context.d.ts +4 -4
  251. package/dist/flows/Termination/hooks.d.ts +4 -4
  252. package/dist/flows/Termination/hooks.js +1 -1
  253. package/dist/flows/Termination/index.d.ts +6 -6
  254. package/dist/flows/Termination/index.js +1 -1
  255. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  256. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  257. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  258. package/dist/flows/Termination/types.d.ts +4 -4
  259. package/dist/flows/Termination/utils.d.ts +4 -4
  260. package/dist/flows/types.d.ts +2 -2
  261. package/dist/flows/utils.d.ts +2 -2
  262. package/dist/index.d.ts +14 -13
  263. package/dist/index.js +2 -2
  264. package/dist/index.js.map +1 -1
  265. package/dist/internals.d.ts +3 -3
  266. package/dist/internals.js +1 -1
  267. package/dist/{mutations-m4qazTov.d.ts → mutations-HzXri7rU.d.ts} +1 -1
  268. package/dist/{remoteFlows-C2zCZMFB.d.ts → remoteFlows-D6N3P-Z8.d.ts} +1 -1
  269. package/dist/{types-MJCCG0Lf.d.ts → types-BA5HatKg.d.ts} +1 -1
  270. package/dist/{types-CXORFHbV.d.ts → types-BxGIDgr8.d.ts} +2 -2
  271. package/dist/{types-6XtKFWen.d.ts → types-CKY2s5Tl.d.ts} +15 -6
  272. package/dist/{types-CS5H5ZXt.d.ts → types-CeMJCc7f.d.ts} +3 -3
  273. package/dist/{types-B9XgAugQ.d.ts → types-OIG1NWJB.d.ts} +3 -3
  274. package/dist/{types-TE7ZVOnO.d.ts → types-PiIfh75U.d.ts} +1 -1
  275. package/dist/{types-BdAf8qBk.d.ts → types-SOAhi2Xb.d.ts} +1 -1
  276. package/dist/{types.gen-ByDz5nJy.d.ts → types.gen-DCswUxeu.d.ts} +24 -2
  277. package/dist/{utils-D2hJxOb4.d.ts → utils-VhDQSRx8.d.ts} +1 -1
  278. package/package.json +3 -3
  279. package/dist/CheckboxFieldDefault-OBDOMMWQ.js +0 -2
  280. package/dist/CountryFieldDefault-NEFHRUUS.js +0 -2
  281. package/dist/DatePickerFieldDefault-NYHK6I2G.js +0 -2
  282. package/dist/RadioGroupFieldDefault-GF4XVARF.js +0 -2
  283. package/dist/TextAreaFieldDefault-HPEUG5UI.js +0 -2
  284. package/dist/chunk-COAJUZSE.js +0 -2
  285. package/dist/chunk-COAJUZSE.js.map +0 -1
  286. package/dist/chunk-KWIWHDBS.js.map +0 -1
  287. package/dist/chunk-MQTRTRV6.js +0 -2
  288. package/dist/chunk-NJNJACVL.js +0 -2
  289. package/dist/chunk-NJNJACVL.js.map +0 -1
  290. package/dist/chunk-RATFUMTL.js +0 -2
  291. package/dist/chunk-RATFUMTL.js.map +0 -1
  292. package/dist/chunk-SC7YWKOW.js +0 -2
  293. package/dist/chunk-TJLXZ2ZK.js.map +0 -1
  294. package/dist/chunk-UAMKMIHP.js +0 -2
  295. package/dist/chunk-UAMKMIHP.js.map +0 -1
  296. /package/dist/{CheckboxFieldDefault-OBDOMMWQ.js.map → CheckboxFieldDefault-OK7JODEG.js.map} +0 -0
  297. /package/dist/{CountryFieldDefault-NEFHRUUS.js.map → CountryFieldDefault-ORC6XVVK.js.map} +0 -0
  298. /package/dist/{DatePickerFieldDefault-NYHK6I2G.js.map → DatePickerFieldDefault-EUPACNZD.js.map} +0 -0
  299. /package/dist/{RadioGroupFieldDefault-GF4XVARF.js.map → RadioGroupFieldDefault-XR37OID5.js.map} +0 -0
  300. /package/dist/{TextAreaFieldDefault-HPEUG5UI.js.map → TextAreaFieldDefault-5YJYIBAO.js.map} +0 -0
  301. /package/dist/{chunk-SKQZ6BPK.js.map → chunk-2TAVZJPX.js.map} +0 -0
  302. /package/dist/{chunk-O3KGCVBO.js.map → chunk-3QSHWQS3.js.map} +0 -0
  303. /package/dist/{chunk-KRZGFZUS.js.map → chunk-3U4PZ4KB.js.map} +0 -0
  304. /package/dist/{chunk-XFQS2BVE.js.map → chunk-44F5FY7C.js.map} +0 -0
  305. /package/dist/{chunk-4WBEA4IY.js.map → chunk-4KKA35AX.js.map} +0 -0
  306. /package/dist/{chunk-BLCINT3L.js.map → chunk-4QJUNKBR.js.map} +0 -0
  307. /package/dist/{chunk-7EKNQYS5.js.map → chunk-6NKXOUJW.js.map} +0 -0
  308. /package/dist/{chunk-6YBDMERC.js.map → chunk-6TKWWM5A.js.map} +0 -0
  309. /package/dist/{chunk-ZY7RAGEL.js.map → chunk-6WGW27VH.js.map} +0 -0
  310. /package/dist/{chunk-2PMYCCWO.js.map → chunk-7XZP24UE.js.map} +0 -0
  311. /package/dist/{chunk-MBOKEWSX.js.map → chunk-A5SRPVT2.js.map} +0 -0
  312. /package/dist/{chunk-UBBUH2DE.js.map → chunk-A675PPWA.js.map} +0 -0
  313. /package/dist/{chunk-OKSKBEIR.js.map → chunk-BJZXTS47.js.map} +0 -0
  314. /package/dist/{chunk-B3OYZQSP.js.map → chunk-BS2B4OOE.js.map} +0 -0
  315. /package/dist/{chunk-HADEU7QX.js.map → chunk-C332PSLT.js.map} +0 -0
  316. /package/dist/{chunk-SC7YWKOW.js.map → chunk-DN6BXTAC.js.map} +0 -0
  317. /package/dist/{chunk-GGULUMOP.js.map → chunk-EI44AIUW.js.map} +0 -0
  318. /package/dist/{chunk-YXHSALDR.js.map → chunk-F74X2V2N.js.map} +0 -0
  319. /package/dist/{chunk-NIDRVYUJ.js.map → chunk-FJGDFNEH.js.map} +0 -0
  320. /package/dist/{chunk-PIIWY632.js.map → chunk-GHHMGTM4.js.map} +0 -0
  321. /package/dist/{chunk-PMRAJKJ5.js.map → chunk-GNDFT5KG.js.map} +0 -0
  322. /package/dist/{chunk-3PYZQWDY.js.map → chunk-GR6QMP4Z.js.map} +0 -0
  323. /package/dist/{chunk-MZZFNRW5.js.map → chunk-H6Z54SNM.js.map} +0 -0
  324. /package/dist/{chunk-ZTNH2YIM.js.map → chunk-HYNJ3ITY.js.map} +0 -0
  325. /package/dist/{chunk-HGIMRQIZ.js.map → chunk-ID4S6FWD.js.map} +0 -0
  326. /package/dist/{chunk-NEKE5PRJ.js.map → chunk-IF42CZJH.js.map} +0 -0
  327. /package/dist/{chunk-KBUBBK2E.js.map → chunk-IVDF2PMA.js.map} +0 -0
  328. /package/dist/{chunk-HHFDREGB.js.map → chunk-J3HIQRZO.js.map} +0 -0
  329. /package/dist/{chunk-B5KAHNYW.js.map → chunk-KSJLZDGY.js.map} +0 -0
  330. /package/dist/{chunk-FEWMPYBF.js.map → chunk-L3ZVE4JS.js.map} +0 -0
  331. /package/dist/{chunk-7R7AQHV2.js.map → chunk-LES7J6H4.js.map} +0 -0
  332. /package/dist/{chunk-KFFTPU6V.js.map → chunk-LVTBMTOU.js.map} +0 -0
  333. /package/dist/{chunk-GTU6MTZH.js.map → chunk-LXNEYPO5.js.map} +0 -0
  334. /package/dist/{chunk-W5QXZPMY.js.map → chunk-MG6UYSCR.js.map} +0 -0
  335. /package/dist/{chunk-VMZQN4WU.js.map → chunk-NRGNFMIO.js.map} +0 -0
  336. /package/dist/{chunk-KEYWBQH2.js.map → chunk-NZHABET6.js.map} +0 -0
  337. /package/dist/{chunk-XE6HQVLQ.js.map → chunk-O4CLVNOP.js.map} +0 -0
  338. /package/dist/{chunk-SHOGXN3C.js.map → chunk-OPDKYPYM.js.map} +0 -0
  339. /package/dist/{chunk-PJPYUB2R.js.map → chunk-PSCFVUJB.js.map} +0 -0
  340. /package/dist/{chunk-7KMXTQ4C.js.map → chunk-Q7SMO5VI.js.map} +0 -0
  341. /package/dist/{chunk-UFAQ7CQH.js.map → chunk-QGC2HCZG.js.map} +0 -0
  342. /package/dist/{chunk-PET4EGTM.js.map → chunk-QK3FQD6C.js.map} +0 -0
  343. /package/dist/{chunk-FOUXLCEA.js.map → chunk-QKSYPFRB.js.map} +0 -0
  344. /package/dist/{chunk-VPFGVFXE.js.map → chunk-QQ3PZHXO.js.map} +0 -0
  345. /package/dist/{chunk-MZXFOY5T.js.map → chunk-QZMSDP2S.js.map} +0 -0
  346. /package/dist/{chunk-P6H7QMKK.js.map → chunk-RFVHV6RE.js.map} +0 -0
  347. /package/dist/{chunk-OVU2VJM6.js.map → chunk-S4QKVG2B.js.map} +0 -0
  348. /package/dist/{chunk-57G3ZAX3.js.map → chunk-SJO4XFQD.js.map} +0 -0
  349. /package/dist/{chunk-VV3LCB77.js.map → chunk-T7QVVLKT.js.map} +0 -0
  350. /package/dist/{chunk-ZSN43HMP.js.map → chunk-TMBL5YM4.js.map} +0 -0
  351. /package/dist/{chunk-UD24LBJ6.js.map → chunk-TNGJKUUV.js.map} +0 -0
  352. /package/dist/{chunk-QV7CEES3.js.map → chunk-TWULMMMY.js.map} +0 -0
  353. /package/dist/{chunk-WRCHICCJ.js.map → chunk-TZGC6PWQ.js.map} +0 -0
  354. /package/dist/{chunk-W2WMUANF.js.map → chunk-UJWKHGH5.js.map} +0 -0
  355. /package/dist/{chunk-INPMEOFL.js.map → chunk-UOWQ7UKA.js.map} +0 -0
  356. /package/dist/{chunk-3D7HWCNX.js.map → chunk-UZBAOB4W.js.map} +0 -0
  357. /package/dist/{chunk-FXJM54I4.js.map → chunk-V7YF7ICV.js.map} +0 -0
  358. /package/dist/{chunk-I7JKBQHL.js.map → chunk-VCF327FJ.js.map} +0 -0
  359. /package/dist/{chunk-ZBIXHOET.js.map → chunk-VUQH44VX.js.map} +0 -0
  360. /package/dist/{chunk-ZMQTQ4UQ.js.map → chunk-W4BOTAD6.js.map} +0 -0
  361. /package/dist/{chunk-YOFPHSYV.js.map → chunk-WKAVKFP6.js.map} +0 -0
  362. /package/dist/{chunk-FAJ5I4Q4.js.map → chunk-WTVYMT5N.js.map} +0 -0
  363. /package/dist/{chunk-XLURXRQT.js.map → chunk-X25ZOPO6.js.map} +0 -0
  364. /package/dist/{chunk-UELAVKG5.js.map → chunk-X4IJ52GQ.js.map} +0 -0
  365. /package/dist/{chunk-GJV6HJ3D.js.map → chunk-XEK3MUYF.js.map} +0 -0
  366. /package/dist/{chunk-YQQHCS4S.js.map → chunk-YADHCTR7.js.map} +0 -0
  367. /package/dist/{chunk-KH4DEFZT.js.map → chunk-YW4FHEYJ.js.map} +0 -0
  368. /package/dist/{chunk-S7DDWZOR.js.map → chunk-ZF3JITFM.js.map} +0 -0
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/api/index.ts","../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/lib/version.ts","../src/auth/createClient.ts","../src/components/error-handling/RemoteFlowsErrorBoundary.tsx","../src/components/error-handling/utils.ts","../src/components/error-handling/telemetryService.ts","../src/lazy-default-components.ts","../src/components/form/FormLoadingFallback.tsx","../src/components/form/DelayedFallback.tsx","../src/queryConfig.ts"],"sourcesContent":["import { useMutation } from '@tanstack/react-query';\nimport { MagicLinkParams, postV1MagicLink } from '@/src/client';\nimport { useClient } from '@/src/context';\n\nimport { Client } from '@/src/client/client';\n\nexport const useMagicLink = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (params: MagicLinkParams) => {\n return postV1MagicLink({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n body: params,\n });\n },\n });\n};\n","import { QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React, { useMemo, Suspense, useRef } from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { createClient } from '@/src/auth/createClient';\nimport { Client } from '@/src/client/client';\nimport { RemoteFlowsErrorBoundary } from '@/src/components/error-handling/RemoteFlowsErrorBoundary';\nimport { lazyDefaultComponents } from './lazy-default-components';\nimport { FormLoadingFallback } from '@/src/components/form/FormLoadingFallback';\nimport { DelayedFallback } from '@/src/components/form/DelayedFallback';\nimport { getQueryClient } from '@/src/queryConfig';\nimport { ErrorContextProvider } from '@/src/components/error-handling/ErrorContext';\n\ntype RemoteFlowContextWrapperProps = {\n children: React.ReactNode;\n environment?: RemoteFlowsSDKProps['environment'];\n debug?: RemoteFlowsSDKProps['debug'];\n client: Client;\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n client,\n}: RemoteFlowContextWrapperProps) {\n return (\n <RemoteFlowContext.Provider value={{ client }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components: userComponents = {},\n transformHtmlToComponents,\n}: PropsWithChildren<{\n components?: Components;\n transformHtmlToComponents?: RemoteFlowsSDKProps['transformHtmlToComponents'];\n}>) {\n // Merge user components with lazy defaults\n // User-provided components take precedence, lazy defaults are only used as fallback\n const resolvedComponents = useMemo(() => {\n // Spread lazy defaults first, then override with user components\n return {\n ...lazyDefaultComponents,\n ...userComponents,\n } as Components;\n }, [userComponents]);\n\n // Memoize the context value to avoid unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n components: resolvedComponents,\n transformHtmlToComponents,\n }),\n [resolvedComponents, transformHtmlToComponents],\n );\n\n return (\n <FormFieldsContext.Provider value={contextValue}>\n <Suspense\n fallback={\n <DelayedFallback fallback={<FormLoadingFallback />} delay={200} />\n }\n >\n {children}\n </Suspense>\n </FormFieldsContext.Provider>\n );\n}\n\nconst queryClient = getQueryClient();\n\nexport function RemoteFlows({\n auth,\n children,\n components,\n theme,\n proxy,\n environment,\n errorBoundary = { useParentErrorBoundary: true },\n debug = false,\n credentials,\n transformHtmlToComponents,\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n // WE NEED TO FIX: react-hooks/refs - Cannot access refs during render\n // oxlint-disable-next-line react-hooks/refs\n const remoteApiClient = useRef(\n createClient(auth, { proxy, environment, credentials }),\n ).current;\n\n return (\n <ErrorContextProvider>\n <RemoteFlowsErrorBoundary\n errorBoundary={errorBoundary}\n debug={debug}\n environment={environment}\n client={remoteApiClient}\n >\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider\n components={components}\n transformHtmlToComponents={transformHtmlToComponents}\n >\n <RemoteFlowContextWrapper\n environment={environment}\n debug={debug}\n client={remoteApiClient}\n >\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n </RemoteFlowsErrorBoundary>\n </ErrorContextProvider>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export type Environment =\n | 'local'\n | 'partners'\n | 'production'\n | 'sandbox'\n | 'staging';\n\nexport const ENVIRONMENTS: Record<Environment, string> = {\n local: 'http://localhost:4000/api/eor',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n\nexport const defaultEnvironment: Environment = 'production';\n","/**\n * SDK version constant\n * Retrieved from package.json at build time\n * Falls back to 'unknown' if VERSION env var is not set\n */\nexport const npmPackageVersion = process.env.VERSION || 'unknown';\n","import { createClient as createHeyApiClient } from '@/src/client/client';\nimport { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { npmPackageVersion } from '@/src/lib/version';\nimport { RemoteFlowsSDKProps } from '@/src/types/remoteFlows';\nimport { debug } from '@/src/lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n credentials: RemoteFlowsSDKProps['credentials'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport function createClient(\n auth?: () => Promise<AuthResponse>,\n options?: Options,\n) {\n const sessionRef = {\n current: null as { accessToken: string; expiresAt: number } | null,\n };\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return createHeyApiClient({\n ...clientConfig,\n ...(options?.credentials && { credentials: options.credentials }),\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n if (!auth) {\n return undefined;\n }\n\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n\n if (\n !sessionRef.current ||\n hasTokenExpired(sessionRef.current.expiresAt)\n ) {\n try {\n const data = await auth();\n sessionRef.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n } catch (error) {\n console.error('Failed to fetch auth token:', error);\n return undefined;\n }\n }\n\n return sessionRef.current?.accessToken;\n },\n });\n}\n","import { Component, ErrorInfo, ReactNode } from 'react';\nimport { reportTelemetryError } from '@/src/components/error-handling/telemetryService';\nimport { npmPackageVersion } from '@/src/lib/version';\nimport {\n ErrorContext,\n ErrorContextValue,\n} from '@/src/components/error-handling/ErrorContext';\nimport { Environment } from '@/src/environments';\nimport { Client } from '@/src/client/client';\n\ntype ErrorBoundaryState = {\n hasError: boolean;\n error: Error | null;\n};\n\ninterface RemoteFlowsErrorBoundaryProps {\n children: ReactNode;\n /**\n * Debug mode to enable logging of errors to the console.\n * @default false\n */\n debug: boolean;\n /**\n * Environment to use for API calls.\n * If not provided, the SDK will use production environment.\n */\n environment?: Environment;\n\n /**\n * Client to use for API calls.\n * If not provided, the SDK will crash\n */\n client: Client;\n /**\n * Error boundary configuration.\n */\n errorBoundary?: {\n /**\n * If true, re-throws errors to parent error boundary.\n * If false, shows fallback UI to prevent crashes.\n * @default false\n */\n useParentErrorBoundary?: boolean;\n /**\n * Custom fallback UI to show when an error occurs.\n * fallback only works when rethrow is false.\n * If not provided, shows default error message.\n */\n fallback?: ReactNode | ((error: Error) => ReactNode);\n };\n}\n\nexport const FallbackErrorBoundary = () => {\n return (\n <div\n style={{\n padding: '20px',\n border: '1px solid #dc2626',\n borderRadius: '4px',\n backgroundColor: '#fef2f2',\n color: '#991b1b',\n }}\n >\n Something went wrong in RemoteFlows. Please refresh the page.\n </div>\n );\n};\n\nexport class RemoteFlowsErrorBoundary extends Component<\n RemoteFlowsErrorBoundaryProps,\n ErrorBoundaryState\n> {\n constructor(props: RemoteFlowsErrorBoundaryProps) {\n super(props);\n this.state = {\n hasError: false,\n error: null,\n };\n }\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return {\n hasError: true,\n error,\n };\n }\n\n static contextType = ErrorContext;\n declare context: ErrorContextValue | undefined;\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n console.error('[RemoteFlows] Error caught:', error, errorInfo);\n\n const errorContext = this.context?.errorContextRef.current;\n const params = {\n error,\n sdkVersion: npmPackageVersion,\n client: this.props.client,\n environment: this.props.environment,\n };\n\n reportTelemetryError(params, errorContext, {\n debugMode: this.props.debug,\n });\n\n if (this.props.errorBoundary?.useParentErrorBoundary) {\n throw error;\n }\n }\n\n render(): ReactNode {\n if (this.state.hasError && this.state.error) {\n // If custom fallback provided, use it\n if (this.props.errorBoundary?.fallback) {\n return typeof this.props.errorBoundary?.fallback === 'function'\n ? this.props.errorBoundary?.fallback(this.state.error)\n : this.props.errorBoundary?.fallback;\n }\n\n // Default fallback\n return <FallbackErrorBoundary />;\n }\n\n return this.props.children;\n }\n}\n","import {\n ErrorCategory,\n ErrorSeverity,\n} from '@/src/components/error-handling/types';\n\n/**\n * Error pattern matching configuration\n * Patterns are checked in order - first match wins\n */\ntype ErrorPattern = {\n category: ErrorCategory;\n severity: ErrorSeverity;\n messagePatterns: string[];\n namePatterns: string[];\n};\n\n/**\n * Configuration for error categorization and severity determination\n * Order matters - patterns are checked from top to bottom\n */\nconst ERROR_PATTERNS: readonly ErrorPattern[] = [\n // Priority 1: React rendering errors (most critical)\n {\n category: 'RENDER_ERROR',\n severity: 'critical',\n messagePatterns: [\n 'element type is invalid',\n 'hydration',\n 'rendered more hooks',\n 'rendered fewer hooks',\n ],\n namePatterns: ['invariantviolation'],\n },\n\n // Priority 2: Hook errors (critical React violations)\n {\n category: 'HOOK_ERROR',\n severity: 'critical',\n messagePatterns: ['hook', 'useeffect', 'usestate', 'usecontext'],\n namePatterns: [],\n },\n\n // Priority 4: State errors (must come before render to avoid \"render\" keyword collision)\n {\n category: 'STATE_ERROR',\n severity: 'error',\n messagePatterns: ['state', 'context', 'provider'],\n namePatterns: [],\n },\n\n // Priority 6: Lower priority render errors\n {\n category: 'RENDER_ERROR',\n severity: 'critical',\n messagePatterns: ['render', 'component'],\n namePatterns: [],\n },\n\n // Priority 7: Runtime errors (critical TypeErrors and ReferenceErrors)\n {\n category: 'RUNTIME_ERROR',\n severity: 'critical',\n messagePatterns: [],\n namePatterns: ['typeerror', 'referenceerror'],\n },\n\n // Priority 8: Range errors (non-critical runtime errors)\n {\n category: 'RUNTIME_ERROR',\n severity: 'error',\n messagePatterns: [],\n namePatterns: ['rangeerror'],\n },\n] as const;\n\n/**\n * Additional severity patterns that override category-based severity\n */\nconst CRITICAL_MESSAGE_PATTERNS = [\n 'cannot read property',\n 'is not a function',\n 'is not defined',\n] as const;\n\nconst WARNING_MESSAGE_PATTERNS = ['warning', 'deprecated'] as const;\n\n/**\n * Categorizes error based on error message and name using pattern matching\n */\nexport const categorizeError = (error: Error): ErrorCategory => {\n const message = error.message.toLowerCase();\n const name = error.name.toLowerCase();\n\n // Early return for warnings to prevent categorization as other error types\n if (WARNING_MESSAGE_PATTERNS.some((p) => message.includes(p))) {\n return 'UNKNOWN_ERROR';\n }\n\n // Check each pattern in priority order\n for (const pattern of ERROR_PATTERNS) {\n const matchesMessage = pattern.messagePatterns.some((p) =>\n message.includes(p),\n );\n const matchesName = pattern.namePatterns.some((p) => name.includes(p));\n\n if (matchesMessage || matchesName) {\n return pattern.category;\n }\n }\n\n return 'UNKNOWN_ERROR';\n};\n\n/**\n * Determines error severity based on category and message patterns\n */\nexport const determineErrorSeverity = (\n error: Error,\n category: ErrorCategory,\n): ErrorSeverity => {\n const message = error.message.toLowerCase();\n const name = error.name.toLowerCase();\n\n // Check for warning patterns first\n if (WARNING_MESSAGE_PATTERNS.some((p) => message.includes(p))) {\n return 'warning';\n }\n\n // Check for critical message patterns that override category\n if (CRITICAL_MESSAGE_PATTERNS.some((p) => message.includes(p))) {\n return 'critical';\n }\n\n // Find the exact pattern that matched this error\n // We need to re-match to get the correct severity for errors with multiple patterns\n for (const pattern of ERROR_PATTERNS) {\n if (pattern.category !== category) continue;\n\n const matchesMessage = pattern.messagePatterns.some((p) =>\n message.includes(p),\n );\n const matchesName = pattern.namePatterns.some((p) => name.includes(p));\n\n if (matchesMessage || matchesName) {\n return pattern.severity;\n }\n }\n\n // Default to error for unknown categories\n return 'error';\n};\n","import { Client } from '@/src/client/client';\nimport {\n ErrorContextData,\n ErrorPayload,\n} from '@/src/components/error-handling/types';\nimport {\n categorizeError,\n determineErrorSeverity,\n} from '@/src/components/error-handling/utils';\nimport { defaultEnvironment, Environment } from '@/src/environments';\nimport { postV1SdkTelemetryErrors } from '@/src/client/sdk.gen';\n\nconst recentlyReported = new Map<string, number>();\nconst DEDUPE_WINDOW_MS = 100; // 100ms should catch Strict Mode double-invokes\n\nfunction getErrorSignature(error: Error): string {\n return `${error.name}:${error.message}:${error.stack?.substring(0, 100) || ''}`;\n}\n\n/**\n * Checks if the error has been reported recently to avoid duplicate reports\n * This is caused by React Strict Mode double-invoking the error boundary.\n * @param error - The error to check\n * @returns True if the error has been reported recently, false otherwise\n */\nfunction wasRecentlyReported(error: Error): boolean {\n const signature = getErrorSignature(error);\n const lastReported = recentlyReported.get(signature);\n const now = Date.now();\n\n if (lastReported && now - lastReported < DEDUPE_WINDOW_MS) {\n return true;\n }\n\n recentlyReported.set(signature, now);\n\n // Cleanup old entries periodically\n if (recentlyReported.size > 100) {\n for (const [sig, timestamp] of recentlyReported.entries()) {\n if (now - timestamp > DEDUPE_WINDOW_MS) {\n recentlyReported.delete(sig);\n }\n }\n }\n\n return false;\n}\n\n/**\n * Logs error payload to console in debug mode\n * Shows what would be sent to telemetry API\n */\nexport const logDebugPayload = (\n payload: ErrorPayload,\n debugMode: boolean,\n): void => {\n if (!debugMode) return;\n\n const severityEmoji = {\n critical: '🔴',\n error: '🟠',\n warning: '🟡',\n info: '🔵',\n };\n\n console.group('📮 [RemoteFlows] Error Report (Debug Mode)');\n console.log('─────────────────────────────────────────');\n console.log('❌ Error:', payload.error.message);\n console.log('📛 Name:', payload.error.name);\n console.log(\n `${severityEmoji[payload.error.severity]} Severity:`,\n payload.error.severity.toUpperCase(),\n );\n console.log('🏷️ Category:', payload.error.category);\n\n if (payload.context?.flow) {\n console.log('🔄 Flow:', payload.context.flow);\n }\n\n if (payload.context?.step !== undefined) {\n console.log('📍 Step:', payload.context.step);\n }\n\n if (payload.context?.metadata) {\n console.log('📝 Context Metadata:', payload.context.metadata);\n }\n\n console.log('⏰ Timestamp:', payload.metadata.timestamp);\n console.log('🌐 URL:', payload.metadata.url);\n console.log('📦 SDK Version:', payload.metadata.sdk_version);\n\n if (payload.error.stack) {\n console.log('\\n📚 Stack Trace:');\n console.log(payload.error.stack);\n }\n\n console.log('\\n📋 Full Payload (would be sent to telemetry):');\n console.log(JSON.stringify(payload, null, 2));\n console.log('─────────────────────────────────────────');\n console.groupEnd();\n};\n\nconst getUrl = () => {\n if (typeof window !== 'undefined') {\n return window.location.href;\n }\n return 'unknown';\n};\n\nconst encodeStack = (stack?: string) => {\n return stack ? btoa(stack) : '';\n};\n\nexport function buildErrorPayload(\n error: Error,\n sdkVersion: string,\n environment: Environment,\n context?: ErrorContextData,\n): ErrorPayload {\n const category = categorizeError(error);\n const severity = determineErrorSeverity(error, category);\n const url = getUrl();\n const encodedStack = encodeStack(error.stack);\n\n const payload: ErrorPayload = {\n error: {\n message: error.message,\n stack: encodedStack,\n name: error.name,\n category,\n severity,\n },\n context,\n metadata: {\n sdk_version: sdkVersion,\n timestamp: new Date().toISOString(),\n url,\n user_agent:\n typeof navigator !== 'undefined' ? navigator.userAgent : 'unknown',\n environment: environment,\n },\n };\n\n return payload;\n}\n\n/**\n * Determines if telemetry should be sent based on environment and URL\n * Send telemetry when environment and URL \"match\":\n * - local env + localhost URL → send (local testing)\n * - production env + production URL → send (real errors)\n * - local env + production URL → skip (edge case)\n * - production env + localhost URL → skip (edge case)\n */\nfunction shouldSendTelemetry(environment: Environment, url: string): boolean {\n const isLocalEnv = environment === 'local';\n const isLocalhostUrl = url.includes('localhost') || url.includes('127.0.0.1');\n\n // Send when both are local OR both are production\n return isLocalEnv === isLocalhostUrl;\n}\n\nexport function reportTelemetryError(\n params: {\n error: Error;\n sdkVersion: string;\n client: Client;\n environment?: Environment;\n },\n context?: ErrorContextData,\n options: {\n debugMode?: boolean;\n } = {\n debugMode: false,\n },\n): void {\n const { error, sdkVersion, client, environment } = params;\n if (wasRecentlyReported(error)) {\n if (options.debugMode) {\n console.log('[RemoteFlows] Skipping duplicate error report');\n }\n return;\n }\n\n const payload: ErrorPayload = buildErrorPayload(\n error,\n sdkVersion,\n environment ?? defaultEnvironment,\n context,\n );\n\n // Log to console in debug mode\n if (options.debugMode) {\n logDebugPayload(payload, Boolean(options.debugMode));\n }\n\n const shouldSend = shouldSendTelemetry(\n environment ?? defaultEnvironment,\n payload.metadata.url,\n );\n\n if (!shouldSend) {\n if (options.debugMode) {\n console.log(\n '[RemoteFlows] Skipping telemetry API call (local environment)',\n );\n }\n return;\n }\n\n postV1SdkTelemetryErrors({\n client,\n body: payload,\n }).catch((err: unknown) => {\n // Silently fail - don't crash if telemetry reporting fails\n if (options.debugMode) {\n console.warn('[RemoteFlows] Failed to report error telemetry:', err);\n }\n });\n}\n","import { lazy } from 'react';\nimport type { Components } from './types/remoteFlows';\n\n/**\n * Lazy-loaded default field components for RemoteFlows.\n *\n * These components are loaded on-demand using React.lazy() and code-splitting.\n * Only components that are not provided by the user will be loaded.\n *\n * This reduces the initial bundle size for users who provide custom components.\n */\nexport const lazyDefaultComponents: Components = {\n button: lazy(() =>\n import('./components/form/fields/default/ButtonDefault').then((m) => ({\n default: m.ButtonDefault,\n })),\n ),\n checkbox: lazy(() =>\n import('./components/form/fields/default/CheckboxFieldDefault').then(\n (m) => ({\n default: m.CheckboxFieldDefault,\n }),\n ),\n ),\n countries: lazy(() =>\n import('./components/form/fields/default/CountryFieldDefault').then(\n (m) => ({\n default: m.CountryFieldDefault,\n }),\n ),\n ),\n date: lazy(() =>\n import('./components/form/fields/default/DatePickerFieldDefault').then(\n (m) => ({\n default: m.DatePickerFieldDefault,\n }),\n ),\n ),\n drawer: lazy(() =>\n import('./components/shared/drawer/DrawerDefault').then((m) => ({\n default: m.DrawerDefault,\n })),\n ),\n email: lazy(() =>\n import('./components/form/fields/default/EmailFieldDefault').then((m) => ({\n default: m.EmailFieldDefault,\n })),\n ),\n fieldsetToggle: lazy(() =>\n import('./components/form/fields/default/FieldsetToggleButtonDefault').then(\n (m) => ({\n default: m.FieldsetToggleButtonDefault,\n }),\n ),\n ),\n file: lazy(() =>\n import('./components/form/fields/default/FileUploadFieldDefault').then(\n (m) => ({\n default: m.FileUploadFieldDefault,\n }),\n ),\n ),\n 'multi-select': lazy(() =>\n import('./components/form/fields/default/MultiSelectFieldDefault').then(\n (m) => ({\n default: m.MultiSelectFieldDefault,\n }),\n ),\n ),\n number: lazy(() =>\n import('./components/form/fields/default/NumberFieldDefault').then((m) => ({\n default: m.NumberFieldDefault,\n })),\n ),\n pdfViewer: lazy(() =>\n import('./components/shared/pdf-preview/PDFPreviewDefault').then((m) => ({\n default: m.PDFPreviewDefault,\n })),\n ),\n radio: lazy(() =>\n import('./components/form/fields/default/RadioGroupFieldDefault').then(\n (m) => ({\n default: m.RadioGroupFieldDefault,\n }),\n ),\n ),\n select: lazy(() =>\n import('./components/form/fields/default/SelectFieldDefault').then((m) => ({\n default: m.SelectFieldDefault,\n })),\n ),\n statement: lazy(() =>\n import('./components/form/fields/default/StatementDefault').then((m) => ({\n default: m.StatementDefault,\n })),\n ),\n table: lazy(() =>\n import('./components/shared/table/TableFieldDefault').then((m) => ({\n default: m.TableFieldDefault,\n })),\n ),\n textarea: lazy(() =>\n import('./components/form/fields/default/TextAreaFieldDefault').then(\n (m) => ({\n default: m.TextAreaFieldDefault,\n }),\n ),\n ),\n tel: lazy(() =>\n import('./components/form/fields/default/TelFieldDefault').then((m) => ({\n default: m.TelFieldDefault,\n })),\n ),\n text: lazy(() =>\n import('./components/form/fields/default/TextFieldDefault').then((m) => ({\n default: m.TextFieldDefault,\n })),\n ),\n time: lazy(() =>\n import('./components/form/fields/default/TimeFieldDefault').then((m) => ({\n default: m.TimeFieldDefault,\n })),\n ),\n 'work-schedule': lazy(() =>\n import('./components/form/fields/default/WorkScheduleFieldDefault').then(\n (m) => ({\n default: m.WorkScheduleFieldDefault,\n }),\n ),\n ),\n zendeskDrawer: lazy(() =>\n import('./components/shared/zendesk-drawer/ZendeskDrawerDefault').then(\n (m) => ({\n default: m.ZendeskDrawerDefault,\n }),\n ),\n ),\n};\n","/**\n * Loading fallback component shown while lazy-loaded form components are being fetched.\n *\n * This component displays a skeleton loading state using pulse animation\n * while React Suspense loads the default field components.\n */\nexport function FormLoadingFallback() {\n return (\n <div className='animate-pulse space-y-4 p-4'>\n <div className='h-4 bg-gray-200 rounded w-1/4' />\n <div className='h-10 bg-gray-200 rounded' />\n <div className='h-4 bg-gray-200 rounded w-1/4' />\n <div className='h-10 bg-gray-200 rounded' />\n </div>\n );\n}\n","import { useState, useEffect, ReactNode } from 'react';\n\ntype DelayedFallbackProps = {\n /** The fallback component to show after the delay */\n fallback: ReactNode;\n /** Delay in milliseconds before showing the fallback (default: 200ms) */\n delay?: number;\n};\n\n/**\n * A wrapper component that delays showing a fallback for a specified time.\n *\n * This prevents UI flashing when lazy-loaded components resolve quickly.\n * If the component loads within the delay period, no fallback is shown at all.\n *\n * @example\n * <Suspense fallback={<DelayedFallback fallback={<LoadingSkeleton />} />}>\n * <LazyComponent />\n * </Suspense>\n */\nexport function DelayedFallback({\n fallback,\n delay = 200,\n}: DelayedFallbackProps) {\n const [showFallback, setShowFallback] = useState(false);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setShowFallback(true);\n }, delay);\n\n return () => clearTimeout(timer);\n }, [delay]);\n\n return showFallback ? <>{fallback}</> : null;\n}\n","import { QueryClient } from '@tanstack/react-query';\n\nexport const getQueryClient = () => new QueryClient();\n"],"mappings":"s9JAAA,OAAS,eAAAA,OAAmB,wBAMrB,IAAMC,GAAeC,EAAA,IAAM,CAChC,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,GAAY,CACjB,WAAYH,EAACI,GACJC,EAAgB,CACrB,OAAQJ,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAMG,CACR,CAAC,EAPS,aASd,CAAC,CACH,EAb4B,gBCN5B,OAAS,uBAAAE,OAA2B,wBAEpC,OAAgB,WAAAC,EAAS,YAAAC,GAAU,UAAAC,OAAc,QCQjD,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAAO,SAAS,gBACtB,OAAO,KAAKD,CAAS,EAAE,QAASE,GAAM,CACpC,IAAMC,EAAcH,EAAUE,CAAC,EAC3BC,GAC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ACF,EACF,EACF,EACF,CAEJ,CA3CgBG,EAAAc,GAAA","names":["useMutation","useMagicLink","__name","client","useClient","useMutation","params","postV1MagicLink","QueryClientProvider","useMemo","Suspense","useRef","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","defaultEnvironment","npmPackageVersion","isValidUrl","url","__name","createClient","auth","options","sessionRef","baseUrl","ENVIRONMENTS","clientConfig","client","debug","npmPackageVersion","isValidProxy","hasTokenExpired","expiresAt","data","error","Component","ERROR_PATTERNS","CRITICAL_MESSAGE_PATTERNS","WARNING_MESSAGE_PATTERNS","categorizeError","__name","error","message","name","p","pattern","matchesMessage","matchesName","determineErrorSeverity","category","recentlyReported","DEDUPE_WINDOW_MS","getErrorSignature","error","__name","wasRecentlyReported","signature","lastReported","now","sig","timestamp","logDebugPayload","payload","debugMode","severityEmoji","getUrl","encodeStack","stack","buildErrorPayload","sdkVersion","environment","context","category","categorizeError","severity","determineErrorSeverity","url","encodedStack","shouldSendTelemetry","isLocalEnv","isLocalhostUrl","reportTelemetryError","params","options","client","defaultEnvironment","postV1SdkTelemetryErrors","err","jsx","FallbackErrorBoundary","__name","RemoteFlowsErrorBoundary","Component","props","error","ErrorContext","errorInfo","errorContext","params","npmPackageVersion","reportTelemetryError","lazy","lazyDefaultComponents","m","jsx","jsxs","FormLoadingFallback","__name","useState","useEffect","Fragment","jsx","DelayedFallback","fallback","delay","showFallback","setShowFallback","useState","useEffect","timer","__name","QueryClient","getQueryClient","__name","QueryClient","jsx","RemoteFlowContextWrapper","children","client","RemoteFlowContext","__name","FormFieldsProvider","userComponents","transformHtmlToComponents","resolvedComponents","useMemo","lazyDefaultComponents","contextValue","FormFieldsContext","Suspense","DelayedFallback","FormLoadingFallback","queryClient","getQueryClient","RemoteFlows","auth","components","theme","proxy","environment","errorBoundary","debug","credentials","remoteApiClient","useRef","createClient","ErrorContextProvider","RemoteFlowsErrorBoundary","QueryClientProvider","ThemeProvider"]}
1
+ {"version":3,"sources":["../src/common/api/index.ts","../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/lib/version.ts","../src/auth/createClient.ts","../src/components/error-handling/RemoteFlowsErrorBoundary.tsx","../src/components/error-handling/utils.ts","../src/components/error-handling/telemetryService.ts","../src/lazy-default-components.ts","../src/components/form/FormLoadingFallback.tsx","../src/components/form/DelayedFallback.tsx","../src/queryConfig.ts"],"sourcesContent":["import { useMutation } from '@tanstack/react-query';\nimport { MagicLinkParams, postV1MagicLink } from '@/src/client';\nimport { useClient } from '@/src/context';\n\nimport { Client } from '@/src/client/client';\n\nexport const useMagicLink = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (params: MagicLinkParams) => {\n return postV1MagicLink({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n body: params,\n });\n },\n });\n};\n","import { QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React, { useMemo, Suspense, useRef } from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { createClient } from '@/src/auth/createClient';\nimport { Client } from '@/src/client/client';\nimport { RemoteFlowsErrorBoundary } from '@/src/components/error-handling/RemoteFlowsErrorBoundary';\nimport { lazyDefaultComponents } from './lazy-default-components';\nimport { FormLoadingFallback } from '@/src/components/form/FormLoadingFallback';\nimport { DelayedFallback } from '@/src/components/form/DelayedFallback';\nimport { getQueryClient } from '@/src/queryConfig';\nimport { ErrorContextProvider } from '@/src/components/error-handling/ErrorContext';\n\ntype RemoteFlowContextWrapperProps = {\n children: React.ReactNode;\n environment?: RemoteFlowsSDKProps['environment'];\n debug?: RemoteFlowsSDKProps['debug'];\n client: Client;\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n client,\n}: RemoteFlowContextWrapperProps) {\n return (\n <RemoteFlowContext.Provider value={{ client }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components: userComponents = {},\n transformHtmlToComponents,\n}: PropsWithChildren<{\n components?: Components;\n transformHtmlToComponents?: RemoteFlowsSDKProps['transformHtmlToComponents'];\n}>) {\n // Merge user components with lazy defaults\n // User-provided components take precedence, lazy defaults are only used as fallback\n const resolvedComponents = useMemo(() => {\n // Spread lazy defaults first, then override with user components\n return {\n ...lazyDefaultComponents,\n ...userComponents,\n } as Components;\n }, [userComponents]);\n\n // Memoize the context value to avoid unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n components: resolvedComponents,\n transformHtmlToComponents,\n }),\n [resolvedComponents, transformHtmlToComponents],\n );\n\n return (\n <FormFieldsContext.Provider value={contextValue}>\n <Suspense\n fallback={\n <DelayedFallback fallback={<FormLoadingFallback />} delay={200} />\n }\n >\n {children}\n </Suspense>\n </FormFieldsContext.Provider>\n );\n}\n\nconst queryClient = getQueryClient();\n\nexport function RemoteFlows({\n auth,\n children,\n components,\n theme,\n proxy,\n environment,\n errorBoundary = { useParentErrorBoundary: true },\n debug = false,\n credentials,\n transformHtmlToComponents,\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n // WE NEED TO FIX: react-hooks/refs - Cannot access refs during render\n // oxlint-disable-next-line react-hooks/refs\n const remoteApiClient = useRef(\n createClient(auth, { proxy, environment, credentials }),\n ).current;\n\n return (\n <ErrorContextProvider>\n <RemoteFlowsErrorBoundary\n errorBoundary={errorBoundary}\n debug={debug}\n environment={environment}\n client={remoteApiClient}\n >\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider\n components={components}\n transformHtmlToComponents={transformHtmlToComponents}\n >\n <RemoteFlowContextWrapper\n environment={environment}\n debug={debug}\n client={remoteApiClient}\n >\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n </RemoteFlowsErrorBoundary>\n </ErrorContextProvider>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export type Environment =\n | 'local'\n | 'partners'\n | 'production'\n | 'sandbox'\n | 'staging';\n\nexport const ENVIRONMENTS: Record<Environment, string> = {\n local: 'http://localhost:4000/api/eor',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n\nexport const defaultEnvironment: Environment = 'production';\n","/**\n * SDK version constant\n * Retrieved from package.json at build time\n * Falls back to 'unknown' if VERSION env var is not set\n */\nexport const npmPackageVersion = process.env.VERSION || 'unknown';\n","import { createClient as createHeyApiClient } from '@/src/client/client';\nimport { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { npmPackageVersion } from '@/src/lib/version';\nimport { RemoteFlowsSDKProps } from '@/src/types/remoteFlows';\nimport { debug } from '@/src/lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n credentials: RemoteFlowsSDKProps['credentials'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport function createClient(\n auth?: () => Promise<AuthResponse>,\n options?: Options,\n) {\n const sessionRef = {\n current: null as { accessToken: string; expiresAt: number } | null,\n };\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return createHeyApiClient({\n ...clientConfig,\n ...(options?.credentials && { credentials: options.credentials }),\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n if (!auth) {\n return undefined;\n }\n\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n\n if (\n !sessionRef.current ||\n hasTokenExpired(sessionRef.current.expiresAt)\n ) {\n try {\n const data = await auth();\n sessionRef.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n } catch (error) {\n console.error('Failed to fetch auth token:', error);\n return undefined;\n }\n }\n\n return sessionRef.current?.accessToken;\n },\n });\n}\n","import { Component, ErrorInfo, ReactNode } from 'react';\nimport { reportTelemetryError } from '@/src/components/error-handling/telemetryService';\nimport { npmPackageVersion } from '@/src/lib/version';\nimport {\n ErrorContext,\n ErrorContextValue,\n} from '@/src/components/error-handling/ErrorContext';\nimport { Environment } from '@/src/environments';\nimport { Client } from '@/src/client/client';\n\ntype ErrorBoundaryState = {\n hasError: boolean;\n error: Error | null;\n};\n\ninterface RemoteFlowsErrorBoundaryProps {\n children: ReactNode;\n /**\n * Debug mode to enable logging of errors to the console.\n * @default false\n */\n debug: boolean;\n /**\n * Environment to use for API calls.\n * If not provided, the SDK will use production environment.\n */\n environment?: Environment;\n\n /**\n * Client to use for API calls.\n * If not provided, the SDK will crash\n */\n client: Client;\n /**\n * Error boundary configuration.\n */\n errorBoundary?: {\n /**\n * If true, re-throws errors to parent error boundary.\n * If false, shows fallback UI to prevent crashes.\n * @default false\n */\n useParentErrorBoundary?: boolean;\n /**\n * Custom fallback UI to show when an error occurs.\n * fallback only works when rethrow is false.\n * If not provided, shows default error message.\n */\n fallback?: ReactNode | ((error: Error) => ReactNode);\n };\n}\n\nexport const FallbackErrorBoundary = () => {\n return (\n <div\n style={{\n padding: '20px',\n border: '1px solid #dc2626',\n borderRadius: '4px',\n backgroundColor: '#fef2f2',\n color: '#991b1b',\n }}\n >\n Something went wrong in RemoteFlows. Please refresh the page.\n </div>\n );\n};\n\nexport class RemoteFlowsErrorBoundary extends Component<\n RemoteFlowsErrorBoundaryProps,\n ErrorBoundaryState\n> {\n constructor(props: RemoteFlowsErrorBoundaryProps) {\n super(props);\n this.state = {\n hasError: false,\n error: null,\n };\n }\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return {\n hasError: true,\n error,\n };\n }\n\n static contextType = ErrorContext;\n declare context: ErrorContextValue | undefined;\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n console.error('[RemoteFlows] Error caught:', error, errorInfo);\n\n const errorContext = this.context?.errorContextRef.current;\n const params = {\n error,\n sdkVersion: npmPackageVersion,\n client: this.props.client,\n environment: this.props.environment,\n };\n\n reportTelemetryError(params, errorContext, {\n debugMode: this.props.debug,\n });\n\n if (this.props.errorBoundary?.useParentErrorBoundary) {\n throw error;\n }\n }\n\n render(): ReactNode {\n if (this.state.hasError && this.state.error) {\n // If custom fallback provided, use it\n if (this.props.errorBoundary?.fallback) {\n return typeof this.props.errorBoundary?.fallback === 'function'\n ? this.props.errorBoundary?.fallback(this.state.error)\n : this.props.errorBoundary?.fallback;\n }\n\n // Default fallback\n return <FallbackErrorBoundary />;\n }\n\n return this.props.children;\n }\n}\n","import {\n ErrorCategory,\n ErrorSeverity,\n} from '@/src/components/error-handling/types';\n\n/**\n * Error pattern matching configuration\n * Patterns are checked in order - first match wins\n */\ntype ErrorPattern = {\n category: ErrorCategory;\n severity: ErrorSeverity;\n messagePatterns: string[];\n namePatterns: string[];\n};\n\n/**\n * Configuration for error categorization and severity determination\n * Order matters - patterns are checked from top to bottom\n */\nconst ERROR_PATTERNS: readonly ErrorPattern[] = [\n // Priority 1: React rendering errors (most critical)\n {\n category: 'RENDER_ERROR',\n severity: 'critical',\n messagePatterns: [\n 'element type is invalid',\n 'hydration',\n 'rendered more hooks',\n 'rendered fewer hooks',\n ],\n namePatterns: ['invariantviolation'],\n },\n\n // Priority 2: Hook errors (critical React violations)\n {\n category: 'HOOK_ERROR',\n severity: 'critical',\n messagePatterns: ['hook', 'useeffect', 'usestate', 'usecontext'],\n namePatterns: [],\n },\n\n // Priority 4: State errors (must come before render to avoid \"render\" keyword collision)\n {\n category: 'STATE_ERROR',\n severity: 'error',\n messagePatterns: ['state', 'context', 'provider'],\n namePatterns: [],\n },\n\n // Priority 6: Lower priority render errors\n {\n category: 'RENDER_ERROR',\n severity: 'critical',\n messagePatterns: ['render', 'component'],\n namePatterns: [],\n },\n\n // Priority 7: Runtime errors (critical TypeErrors and ReferenceErrors)\n {\n category: 'RUNTIME_ERROR',\n severity: 'critical',\n messagePatterns: [],\n namePatterns: ['typeerror', 'referenceerror'],\n },\n\n // Priority 8: Range errors (non-critical runtime errors)\n {\n category: 'RUNTIME_ERROR',\n severity: 'error',\n messagePatterns: [],\n namePatterns: ['rangeerror'],\n },\n] as const;\n\n/**\n * Additional severity patterns that override category-based severity\n */\nconst CRITICAL_MESSAGE_PATTERNS = [\n 'cannot read property',\n 'is not a function',\n 'is not defined',\n] as const;\n\nconst WARNING_MESSAGE_PATTERNS = ['warning', 'deprecated'] as const;\n\n/**\n * Categorizes error based on error message and name using pattern matching\n */\nexport const categorizeError = (error: Error): ErrorCategory => {\n const message = error.message.toLowerCase();\n const name = error.name.toLowerCase();\n\n // Early return for warnings to prevent categorization as other error types\n if (WARNING_MESSAGE_PATTERNS.some((p) => message.includes(p))) {\n return 'UNKNOWN_ERROR';\n }\n\n // Check each pattern in priority order\n for (const pattern of ERROR_PATTERNS) {\n const matchesMessage = pattern.messagePatterns.some((p) =>\n message.includes(p),\n );\n const matchesName = pattern.namePatterns.some((p) => name.includes(p));\n\n if (matchesMessage || matchesName) {\n return pattern.category;\n }\n }\n\n return 'UNKNOWN_ERROR';\n};\n\n/**\n * Determines error severity based on category and message patterns\n */\nexport const determineErrorSeverity = (\n error: Error,\n category: ErrorCategory,\n): ErrorSeverity => {\n const message = error.message.toLowerCase();\n const name = error.name.toLowerCase();\n\n // Check for warning patterns first\n if (WARNING_MESSAGE_PATTERNS.some((p) => message.includes(p))) {\n return 'warning';\n }\n\n // Check for critical message patterns that override category\n if (CRITICAL_MESSAGE_PATTERNS.some((p) => message.includes(p))) {\n return 'critical';\n }\n\n // Find the exact pattern that matched this error\n // We need to re-match to get the correct severity for errors with multiple patterns\n for (const pattern of ERROR_PATTERNS) {\n if (pattern.category !== category) continue;\n\n const matchesMessage = pattern.messagePatterns.some((p) =>\n message.includes(p),\n );\n const matchesName = pattern.namePatterns.some((p) => name.includes(p));\n\n if (matchesMessage || matchesName) {\n return pattern.severity;\n }\n }\n\n // Default to error for unknown categories\n return 'error';\n};\n","import { Client } from '@/src/client/client';\nimport {\n ErrorContextData,\n ErrorPayload,\n} from '@/src/components/error-handling/types';\nimport {\n categorizeError,\n determineErrorSeverity,\n} from '@/src/components/error-handling/utils';\nimport { defaultEnvironment, Environment } from '@/src/environments';\nimport { postV1SdkTelemetryErrors } from '@/src/client/sdk.gen';\n\nconst recentlyReported = new Map<string, number>();\nconst DEDUPE_WINDOW_MS = 100; // 100ms should catch Strict Mode double-invokes\n\nfunction getErrorSignature(error: Error): string {\n return `${error.name}:${error.message}:${error.stack?.substring(0, 100) || ''}`;\n}\n\n/**\n * Checks if the error has been reported recently to avoid duplicate reports\n * This is caused by React Strict Mode double-invoking the error boundary.\n * @param error - The error to check\n * @returns True if the error has been reported recently, false otherwise\n */\nfunction wasRecentlyReported(error: Error): boolean {\n const signature = getErrorSignature(error);\n const lastReported = recentlyReported.get(signature);\n const now = Date.now();\n\n if (lastReported && now - lastReported < DEDUPE_WINDOW_MS) {\n return true;\n }\n\n recentlyReported.set(signature, now);\n\n // Cleanup old entries periodically\n if (recentlyReported.size > 100) {\n for (const [sig, timestamp] of recentlyReported.entries()) {\n if (now - timestamp > DEDUPE_WINDOW_MS) {\n recentlyReported.delete(sig);\n }\n }\n }\n\n return false;\n}\n\n/**\n * Logs error payload to console in debug mode\n * Shows what would be sent to telemetry API\n */\nexport const logDebugPayload = (\n payload: ErrorPayload,\n debugMode: boolean,\n): void => {\n if (!debugMode) return;\n\n const severityEmoji = {\n critical: '🔴',\n error: '🟠',\n warning: '🟡',\n info: '🔵',\n };\n\n console.group('📮 [RemoteFlows] Error Report (Debug Mode)');\n console.log('─────────────────────────────────────────');\n console.log('❌ Error:', payload.error.message);\n console.log('📛 Name:', payload.error.name);\n console.log(\n `${severityEmoji[payload.error.severity]} Severity:`,\n payload.error.severity.toUpperCase(),\n );\n console.log('🏷️ Category:', payload.error.category);\n\n if (payload.context?.flow) {\n console.log('🔄 Flow:', payload.context.flow);\n }\n\n if (payload.context?.step !== undefined) {\n console.log('📍 Step:', payload.context.step);\n }\n\n if (payload.context?.metadata) {\n console.log('📝 Context Metadata:', payload.context.metadata);\n }\n\n console.log('⏰ Timestamp:', payload.metadata.timestamp);\n console.log('🌐 URL:', payload.metadata.url);\n console.log('📦 SDK Version:', payload.metadata.sdk_version);\n\n if (payload.error.stack) {\n console.log('\\n📚 Stack Trace:');\n console.log(payload.error.stack);\n }\n\n console.log('\\n📋 Full Payload (would be sent to telemetry):');\n console.log(JSON.stringify(payload, null, 2));\n console.log('─────────────────────────────────────────');\n console.groupEnd();\n};\n\nconst getUrl = () => {\n if (typeof window !== 'undefined') {\n return window.location.href;\n }\n return 'unknown';\n};\n\nconst encodeStack = (stack?: string) => {\n return stack ? btoa(stack) : '';\n};\n\nexport function buildErrorPayload(\n error: Error,\n sdkVersion: string,\n environment: Environment,\n context?: ErrorContextData,\n): ErrorPayload {\n const category = categorizeError(error);\n const severity = determineErrorSeverity(error, category);\n const url = getUrl();\n const encodedStack = encodeStack(error.stack);\n\n const payload: ErrorPayload = {\n error: {\n message: error.message,\n stack: encodedStack,\n name: error.name,\n category,\n severity,\n },\n context,\n metadata: {\n sdk_version: sdkVersion,\n timestamp: new Date().toISOString(),\n url,\n user_agent:\n typeof navigator !== 'undefined' ? navigator.userAgent : 'unknown',\n environment: environment,\n },\n };\n\n return payload;\n}\n\n/**\n * Determines if telemetry should be sent based on environment and URL\n * Send telemetry when environment and URL \"match\":\n * - local env + localhost URL → send (local testing)\n * - production env + production URL → send (real errors)\n * - local env + production URL → skip (edge case)\n * - production env + localhost URL → skip (edge case)\n */\nfunction shouldSendTelemetry(environment: Environment, url: string): boolean {\n const isLocalEnv = environment === 'local';\n const isLocalhostUrl = url.includes('localhost') || url.includes('127.0.0.1');\n\n // Send when both are local OR both are production\n return isLocalEnv === isLocalhostUrl;\n}\n\nexport function reportTelemetryError(\n params: {\n error: Error;\n sdkVersion: string;\n client: Client;\n environment?: Environment;\n },\n context?: ErrorContextData,\n options: {\n debugMode?: boolean;\n } = {\n debugMode: false,\n },\n): void {\n const { error, sdkVersion, client, environment } = params;\n if (wasRecentlyReported(error)) {\n if (options.debugMode) {\n console.log('[RemoteFlows] Skipping duplicate error report');\n }\n return;\n }\n\n const payload: ErrorPayload = buildErrorPayload(\n error,\n sdkVersion,\n environment ?? defaultEnvironment,\n context,\n );\n\n // Log to console in debug mode\n if (options.debugMode) {\n logDebugPayload(payload, Boolean(options.debugMode));\n }\n\n const shouldSend = shouldSendTelemetry(\n environment ?? defaultEnvironment,\n payload.metadata.url,\n );\n\n if (!shouldSend) {\n if (options.debugMode) {\n console.log(\n '[RemoteFlows] Skipping telemetry API call (local environment)',\n );\n }\n return;\n }\n\n postV1SdkTelemetryErrors({\n client,\n body: payload,\n }).catch((err: unknown) => {\n // Silently fail - don't crash if telemetry reporting fails\n if (options.debugMode) {\n console.warn('[RemoteFlows] Failed to report error telemetry:', err);\n }\n });\n}\n","import { lazy } from 'react';\nimport type { Components } from './types/remoteFlows';\n\n/**\n * Lazy-loaded default field components for RemoteFlows.\n *\n * These components are loaded on-demand using React.lazy() and code-splitting.\n * Only components that are not provided by the user will be loaded.\n *\n * This reduces the initial bundle size for users who provide custom components.\n */\nexport const lazyDefaultComponents: Components = {\n button: lazy(() =>\n import('./components/form/fields/default/ButtonDefault').then((m) => ({\n default: m.ButtonDefault,\n })),\n ),\n checkbox: lazy(() =>\n import('./components/form/fields/default/CheckboxFieldDefault').then(\n (m) => ({\n default: m.CheckboxFieldDefault,\n }),\n ),\n ),\n countries: lazy(() =>\n import('./components/form/fields/default/CountryFieldDefault').then(\n (m) => ({\n default: m.CountryFieldDefault,\n }),\n ),\n ),\n date: lazy(() =>\n import('./components/form/fields/default/DatePickerFieldDefault').then(\n (m) => ({\n default: m.DatePickerFieldDefault,\n }),\n ),\n ),\n drawer: lazy(() =>\n import('./components/shared/drawer/DrawerDefault').then((m) => ({\n default: m.DrawerDefault,\n })),\n ),\n email: lazy(() =>\n import('./components/form/fields/default/EmailFieldDefault').then((m) => ({\n default: m.EmailFieldDefault,\n })),\n ),\n fieldsetToggle: lazy(() =>\n import('./components/form/fields/default/FieldsetToggleButtonDefault').then(\n (m) => ({\n default: m.FieldsetToggleButtonDefault,\n }),\n ),\n ),\n file: lazy(() =>\n import('./components/form/fields/default/FileUploadFieldDefault').then(\n (m) => ({\n default: m.FileUploadFieldDefault,\n }),\n ),\n ),\n 'multi-select': lazy(() =>\n import('./components/form/fields/default/MultiSelectFieldDefault').then(\n (m) => ({\n default: m.MultiSelectFieldDefault,\n }),\n ),\n ),\n number: lazy(() =>\n import('./components/form/fields/default/NumberFieldDefault').then((m) => ({\n default: m.NumberFieldDefault,\n })),\n ),\n pdfViewer: lazy(() =>\n import('./components/shared/pdf-preview/PDFPreviewDefault').then((m) => ({\n default: m.PDFPreviewDefault,\n })),\n ),\n radio: lazy(() =>\n import('./components/form/fields/default/RadioGroupFieldDefault').then(\n (m) => ({\n default: m.RadioGroupFieldDefault,\n }),\n ),\n ),\n select: lazy(() =>\n import('./components/form/fields/default/SelectFieldDefault').then((m) => ({\n default: m.SelectFieldDefault,\n })),\n ),\n statement: lazy(() =>\n import('./components/form/fields/default/StatementDefault').then((m) => ({\n default: m.StatementDefault,\n })),\n ),\n table: lazy(() =>\n import('./components/shared/table/TableFieldDefault').then((m) => ({\n default: m.TableFieldDefault,\n })),\n ),\n textarea: lazy(() =>\n import('./components/form/fields/default/TextAreaFieldDefault').then(\n (m) => ({\n default: m.TextAreaFieldDefault,\n }),\n ),\n ),\n tel: lazy(() =>\n import('./components/form/fields/default/TelFieldDefault').then((m) => ({\n default: m.TelFieldDefault,\n })),\n ),\n text: lazy(() =>\n import('./components/form/fields/default/TextFieldDefault').then((m) => ({\n default: m.TextFieldDefault,\n })),\n ),\n time: lazy(() =>\n import('./components/form/fields/default/TimeFieldDefault').then((m) => ({\n default: m.TimeFieldDefault,\n })),\n ),\n 'work-schedule': lazy(() =>\n import('./components/form/fields/default/WorkScheduleFieldDefault').then(\n (m) => ({\n default: m.WorkScheduleFieldDefault,\n }),\n ),\n ),\n zendeskDrawer: lazy(() =>\n import('./components/shared/zendesk-drawer/ZendeskDrawerDefault').then(\n (m) => ({\n default: m.ZendeskDrawerDefault,\n }),\n ),\n ),\n};\n","/**\n * Loading fallback component shown while lazy-loaded form components are being fetched.\n *\n * This component displays a skeleton loading state using pulse animation\n * while React Suspense loads the default field components.\n */\nexport function FormLoadingFallback() {\n return (\n <div className='animate-pulse space-y-4 p-4'>\n <div className='h-4 bg-gray-200 rounded w-1/4' />\n <div className='h-10 bg-gray-200 rounded' />\n <div className='h-4 bg-gray-200 rounded w-1/4' />\n <div className='h-10 bg-gray-200 rounded' />\n </div>\n );\n}\n","import { useState, useEffect, ReactNode } from 'react';\n\ntype DelayedFallbackProps = {\n /** The fallback component to show after the delay */\n fallback: ReactNode;\n /** Delay in milliseconds before showing the fallback (default: 200ms) */\n delay?: number;\n};\n\n/**\n * A wrapper component that delays showing a fallback for a specified time.\n *\n * This prevents UI flashing when lazy-loaded components resolve quickly.\n * If the component loads within the delay period, no fallback is shown at all.\n *\n * @example\n * <Suspense fallback={<DelayedFallback fallback={<LoadingSkeleton />} />}>\n * <LazyComponent />\n * </Suspense>\n */\nexport function DelayedFallback({\n fallback,\n delay = 200,\n}: DelayedFallbackProps) {\n const [showFallback, setShowFallback] = useState(false);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setShowFallback(true);\n }, delay);\n\n return () => clearTimeout(timer);\n }, [delay]);\n\n return showFallback ? <>{fallback}</> : null;\n}\n","import { QueryClient } from '@tanstack/react-query';\n\nexport const getQueryClient = () => new QueryClient();\n"],"mappings":"8gKAAA,OAAS,eAAAA,OAAmB,wBAMrB,IAAMC,GAAeC,EAAA,IAAM,CAChC,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,GAAY,CACjB,WAAYH,EAACI,GACJC,EAAgB,CACrB,OAAQJ,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAMG,CACR,CAAC,EAPS,aASd,CAAC,CACH,EAb4B,gBCN5B,OAAS,uBAAAE,OAA2B,wBAEpC,OAAgB,WAAAC,EAAS,YAAAC,GAAU,UAAAC,OAAc,QCQjD,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAAO,SAAS,gBACtB,OAAO,KAAKD,CAAS,EAAE,QAASE,GAAM,CACpC,IAAMC,EAAcH,EAAUE,CAAC,EAC3BC,GACFF,EAAK,MAAM,YAAYC,EAAGC,CAAW,CAEzC,CAAC,CACH,CARSC,EAAAL,EAAA,oBAUT,SAASM,GAAeC,EAAqC,CAC3D,IAAMC,EAAyB,CAAC,EAChC,cAAO,KAAKD,CAAM,EAAE,QAASE,GAAQ,CACnCD,EAAO,KAAKC,CAAG,EAA0B,EACvCF,EAAOE,CAAwB,CACnC,CAAC,EACMD,CACT,CAPSH,EAAAC,GAAA,kBAST,SAASI,GAAgBC,EAAkC,CACzD,MAAO,CACL,YAAaA,CACf,CACF,CAJSN,EAAAK,GAAA,mBAMT,SAASE,GAAqBC,EAAsC,CAClE,MAAO,CACL,WAAYA,CACd,CACF,CAJSR,EAAAO,GAAA,wBAMT,SAASE,GAAaC,EAA+B,CACnD,MAAO,CACL,iBAAkBA,EAAK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AAI,MAAO,IAAK,EAGjE,SAAAd,EACH,EACF,CAEJ,CAtCgBG,EAAAC,GAAA,sBAwChB,IAAMW,GAAcC,EAAe,EAE5B,SAASC,GAAY,CAC1B,KAAAC,EACA,SAAAlB,EACA,WAAAmB,EACA,MAAAC,EACA,MAAAC,EACA,YAAAC,EACA,cAAAC,EAAgB,CAAE,uBAAwB,EAAK,EAC/C,MAAAC,EAAQ,GACR,YAAAC,EACA,0BAAAnB,CACF,EAA2C,CAGzC,IAAMoB,EAAkBC,GACtBC,EAAaV,EAAM,CAAE,MAAAG,EAAO,YAAAC,EAAa,YAAAG,CAAY,CAAC,CACxD,EAAE,QAEF,OACE3B,EAAC+B,EAAA,CACC,SAAA/B,EAACgC,EAAA,CACC,cAAeP,EACf,MAAOC,EACP,YAAaF,EACb,OAAQI,EAER,SAAA5B,EAACiC,GAAA,CAAoB,OAAQhB,GAC3B,SAAAjB,EAACM,GAAA,CACC,WAAYe,EACZ,0BAA2Bb,EAE3B,SAAAR,EAACC,GAAA,CACC,YAAauB,EACb,MAAOE,EACP,OAAQE,EAER,SAAA5B,EAACkC,EAAA,CAAc,MAAOZ,EAAQ,SAAApB,EAAS,EACzC,EACF,EACF,EACF,EACF,CAEJ,CA3CgBG,EAAAc,GAAA","names":["useMutation","useMagicLink","__name","client","useClient","useMutation","params","postV1MagicLink","QueryClientProvider","useMemo","Suspense","useRef","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","defaultEnvironment","npmPackageVersion","isValidUrl","url","__name","createClient","auth","options","sessionRef","baseUrl","ENVIRONMENTS","clientConfig","client","debug","npmPackageVersion","isValidProxy","hasTokenExpired","expiresAt","data","error","Component","ERROR_PATTERNS","CRITICAL_MESSAGE_PATTERNS","WARNING_MESSAGE_PATTERNS","categorizeError","__name","error","message","name","p","pattern","matchesMessage","matchesName","determineErrorSeverity","category","recentlyReported","DEDUPE_WINDOW_MS","getErrorSignature","error","__name","wasRecentlyReported","signature","lastReported","now","sig","timestamp","logDebugPayload","payload","debugMode","severityEmoji","getUrl","encodeStack","stack","buildErrorPayload","sdkVersion","environment","context","category","categorizeError","severity","determineErrorSeverity","url","encodedStack","shouldSendTelemetry","isLocalEnv","isLocalhostUrl","reportTelemetryError","params","options","client","defaultEnvironment","postV1SdkTelemetryErrors","err","jsx","FallbackErrorBoundary","__name","RemoteFlowsErrorBoundary","Component","props","error","ErrorContext","errorInfo","errorContext","params","npmPackageVersion","reportTelemetryError","lazy","lazyDefaultComponents","m","jsx","jsxs","FormLoadingFallback","__name","useState","useEffect","Fragment","jsx","DelayedFallback","fallback","delay","showFallback","setShowFallback","useState","useEffect","timer","__name","QueryClient","getQueryClient","__name","QueryClient","jsx","RemoteFlowContextWrapper","children","client","RemoteFlowContext","__name","FormFieldsProvider","userComponents","transformHtmlToComponents","resolvedComponents","useMemo","lazyDefaultComponents","contextValue","FormFieldsContext","Suspense","DelayedFallback","FormLoadingFallback","queryClient","getQueryClient","RemoteFlows","auth","components","theme","proxy","environment","errorBoundary","debug","credentials","remoteApiClient","useRef","createClient","ErrorContextProvider","RemoteFlowsErrorBoundary","QueryClientProvider","ThemeProvider"]}
@@ -1,4 +1,4 @@
1
- export { c as cn, s as sanitizeHtml } from './utils-D2hJxOb4.js';
1
+ export { c as cn, s as sanitizeHtml } from './utils-VhDQSRx8.js';
2
2
  import * as class_variance_authority_types from 'class-variance-authority/types';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
  import * as React$1 from 'react';
@@ -13,8 +13,8 @@ import * as SelectPrimitive from '@radix-ui/react-select';
13
13
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
14
14
  import 'clsx';
15
15
  import 'yup';
16
- import './remoteFlows-C2zCZMFB.js';
17
- import './types.gen-ByDz5nJy.js';
16
+ import './remoteFlows-D6N3P-Z8.js';
17
+ import './types.gen-DCswUxeu.js';
18
18
  import 'react-hook-form';
19
19
 
20
20
  declare const buttonVariants: (props?: ({
package/dist/internals.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as N,b as O,c as P,d as Q,e as R,f as S,g as T,h as U,i as V,j as W,k as X,l as Y,m as Z,n as _,o as $,p as aa}from"./chunk-MQTRTRV6.js";import{a as M}from"./chunk-ZE3YT3Q6.js";import{a as G,b as H,c as I,d as J,e as K,f as L}from"./chunk-N6XLGYRK.js";import"./chunk-ZMQTQ4UQ.js";import"./chunk-TJLXZ2ZK.js";import"./chunk-WVJDCDGZ.js";import"./chunk-HGIMRQIZ.js";import"./chunk-UELAVKG5.js";import"./chunk-MBOKEWSX.js";import"./chunk-OXTA4W4J.js";import"./chunk-LKVQ32ZK.js";import{a as z}from"./chunk-JXZX66MM.js";import{a as A,b as B,c as C,d as D,e as E}from"./chunk-S3EXF5DV.js";import{a as F}from"./chunk-QJJZTAG2.js";import{a as g,c as h,d as i,e as j,f as k}from"./chunk-LJUWER2H.js";import{a as n,b as o,c as p,d as q,e as r,f as s,g as t}from"./chunk-MHIY35CK.js";import{a as x,b as y}from"./chunk-3UBFABDS.js";import{a as l,b as m}from"./chunk-ZOTY3CAM.js";import{a as f}from"./chunk-R4TM2Y3K.js";import{a as u,b as v,c as w}from"./chunk-BUOHZMK6.js";import"./chunk-RR57VT45.js";import"./chunk-FQFLC6YA.js";import"./chunk-SHOGXN3C.js";import{a as d,b as e}from"./chunk-T5J2Z6ZR.js";import"./chunk-OV6PV4N5.js";import"./chunk-P6H7QMKK.js";import{g as c}from"./chunk-Y3CJRZLA.js";import"./chunk-KWIWHDBS.js";import{n as a,r as b}from"./chunk-G2LZFGZA.js";import"./chunk-626FTNKA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{u as Alert,w as AlertDescription,v as AlertTitle,m as Badge,M as BasicTooltip,e as Button,G as Card,K as CardContent,J as CardDescription,L as CardFooter,H as CardHeader,I as CardTitle,F as Checkbox,N as Collapsible,P as CollapsibleContent,O as CollapsibleTrigger,n as Dialog,p as DialogContent,t as DialogDescription,r as DialogFooter,q as DialogHeader,s as DialogTitle,o as DialogTrigger,A as Drawer,C as DrawerContent,D as DrawerHeader,E as DrawerTitle,B as DrawerTrigger,f as FileUploader,Q as FullScreenDialog,S as FullScreenDialogContent,W as FullScreenDialogDescription,U as FullScreenDialogFooter,T as FullScreenDialogHeader,V as FullScreenDialogTitle,R as FullScreenDialogTrigger,z as Input,aa as JsonSchemaComparison,c as Label,x as RadioGroup,y as RadioGroupItem,$ as ScrollArea,g as Select,j as SelectContent,k as SelectItem,i as SelectTrigger,h as SelectValue,X as Tabs,_ as TabsContent,Y as TabsList,Z as TabsTrigger,l as badgeVariants,d as buttonVariants,a as cn,b as sanitizeHtml};
1
+ import{a as N,b as O,c as P,d as Q,e as R,f as S,g as T,h as U,i as V,j as W,k as X,l as Y,m as Z,n as _,o as $,p as aa}from"./chunk-4RVJJ33G.js";import{a as M}from"./chunk-ZE3YT3Q6.js";import{a as G,b as H,c as I,d as J,e as K,f as L}from"./chunk-N6XLGYRK.js";import"./chunk-W4BOTAD6.js";import"./chunk-K7HS55JD.js";import"./chunk-WVJDCDGZ.js";import"./chunk-ID4S6FWD.js";import"./chunk-X4IJ52GQ.js";import"./chunk-A5SRPVT2.js";import"./chunk-OXTA4W4J.js";import"./chunk-LKVQ32ZK.js";import{a as F}from"./chunk-QJJZTAG2.js";import{a as x,b as y}from"./chunk-3UBFABDS.js";import{a as z}from"./chunk-JXZX66MM.js";import{a as A,b as B,c as C,d as D,e as E}from"./chunk-S3EXF5DV.js";import{a as f}from"./chunk-R4TM2Y3K.js";import{a as g,c as h,d as i,e as j,f as k}from"./chunk-LJUWER2H.js";import{a as n,b as o,c as p,d as q,e as r,f as s,g as t}from"./chunk-MHIY35CK.js";import{a as l,b as m}from"./chunk-ZOTY3CAM.js";import{a as u,b as v,c as w}from"./chunk-BUOHZMK6.js";import"./chunk-FQFLC6YA.js";import"./chunk-RR57VT45.js";import"./chunk-OPDKYPYM.js";import{a as d,b as e}from"./chunk-T5J2Z6ZR.js";import"./chunk-OV6PV4N5.js";import"./chunk-RFVHV6RE.js";import{g as c}from"./chunk-Y3CJRZLA.js";import"./chunk-BYDNNJHZ.js";import{n as a,r as b}from"./chunk-G2LZFGZA.js";import"./chunk-626FTNKA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{u as Alert,w as AlertDescription,v as AlertTitle,m as Badge,M as BasicTooltip,e as Button,G as Card,K as CardContent,J as CardDescription,L as CardFooter,H as CardHeader,I as CardTitle,F as Checkbox,N as Collapsible,P as CollapsibleContent,O as CollapsibleTrigger,n as Dialog,p as DialogContent,t as DialogDescription,r as DialogFooter,q as DialogHeader,s as DialogTitle,o as DialogTrigger,A as Drawer,C as DrawerContent,D as DrawerHeader,E as DrawerTitle,B as DrawerTrigger,f as FileUploader,Q as FullScreenDialog,S as FullScreenDialogContent,W as FullScreenDialogDescription,U as FullScreenDialogFooter,T as FullScreenDialogHeader,V as FullScreenDialogTitle,R as FullScreenDialogTrigger,z as Input,aa as JsonSchemaComparison,c as Label,x as RadioGroup,y as RadioGroupItem,$ as ScrollArea,g as Select,j as SelectContent,k as SelectItem,i as SelectTrigger,h as SelectValue,X as Tabs,_ as TabsContent,Y as TabsList,Z as TabsTrigger,l as badgeVariants,d as buttonVariants,a as cn,b as sanitizeHtml};
2
2
  //# sourceMappingURL=internals.js.map
@@ -1,4 +1,4 @@
1
- import './remoteFlows-C2zCZMFB.js';
1
+ import './remoteFlows-D6N3P-Z8.js';
2
2
 
3
3
  interface SuccessResponse<D> {
4
4
  data: D;
@@ -1,6 +1,6 @@
1
1
  import { PropsWithChildren, ReactNode } from 'react';
2
2
  import { AnySchema } from 'yup';
3
- import { aa as HelpCenterArticle } from './types.gen-ByDz5nJy.js';
3
+ import { aa as HelpCenterArticle } from './types.gen-DCswUxeu.js';
4
4
  import { ControllerRenderProps, FieldValues, ControllerFieldState } from 'react-hook-form';
5
5
 
6
6
  type ThemeProviderProps = PropsWithChildren<{
@@ -1,6 +1,6 @@
1
1
  import { FlowOptions } from './flows/types.js';
2
2
  import * as _tanstack_query_core from '@tanstack/query-core';
3
- import { Z as Step$1, _ as SubStep } from './types.gen-ByDz5nJy.js';
3
+ import { Z as Step$1, _ as SubStep } from './types.gen-DCswUxeu.js';
4
4
  import * as react_hook_form from 'react-hook-form';
5
5
  import { Step } from './flows/useStepState.js';
6
6
 
@@ -1,6 +1,6 @@
1
- import { O as OffboardingResponse, a9 as PayrollCalendarEor, E as Employment, x as TerminationDetailsParams, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, R as RequestError } from './types.gen-ByDz5nJy.js';
1
+ import { O as OffboardingResponse, a9 as PayrollCalendarEor, E as Employment, x as TerminationDetailsParams, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, R as RequestError } from './types.gen-DCswUxeu.js';
2
2
  import * as React$1 from 'react';
3
- import { E as ErrorResponse, S as SuccessResponse } from './mutations-m4qazTov.js';
3
+ import { E as ErrorResponse, S as SuccessResponse } from './mutations-HzXri7rU.js';
4
4
  import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
5
5
  import * as _remoteoss_json_schema_form_v0_deprecated from '@remoteoss/json-schema-form-v0-deprecated';
6
6
  import { Step } from './flows/useStepState.js';
@@ -1,19 +1,20 @@
1
- import { d as EmploymentCreationResponse, S as SuccessResponse, e as EmploymentResponse, E as Employment, f as Signatory, g as ContractorContractDocumentStatus, h as CompanyLegalEntity, H as CreateContractDocumentResponse, A as SignContractDocument } from './types.gen-ByDz5nJy.js';
1
+ import { d as EmploymentCreationResponse, S as SuccessResponse, e as EmploymentResponse, E as Employment, f as Signatory, g as ContractorContractDocumentStatus, h as CompanyLegalEntity, H as CreateContractDocumentResponse, A as SignContractDocument } from './types.gen-DCswUxeu.js';
2
2
  import { OnboardingBack } from './flows/ContractorOnboarding/components/OnboardingBack.js';
3
3
  import { OnboardingSubmit } from './flows/ContractorOnboarding/components/OnboardingSubmit.js';
4
4
  import * as React$1 from 'react';
5
- import { C as Components, J as JSFFields, M as Meta, a as JSFFieldset } from './remoteFlows-C2zCZMFB.js';
6
- import { N as NormalizedFieldError } from './mutations-m4qazTov.js';
5
+ import { C as Components, J as JSFFields, M as Meta, a as JSFFieldset } from './remoteFlows-D6N3P-Z8.js';
6
+ import { N as NormalizedFieldError } from './mutations-HzXri7rU.js';
7
7
  import * as _tanstack_query_core from '@tanstack/query-core';
8
8
  import { Step } from './flows/useStepState.js';
9
9
  import { FieldValues } from 'react-hook-form';
10
10
  import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
11
11
  import { StepKeys } from './flows/ContractorOnboarding/utils.js';
12
12
  import { BasicInformationStep } from './flows/ContractorOnboarding/components/BasicInformationStep.js';
13
- import { h as SelectCountryStep } from './types-B9XgAugQ.js';
13
+ import { h as SelectCountryStep } from './types-OIG1NWJB.js';
14
14
  import { FlowOptions, JSFModify } from './flows/types.js';
15
15
  import { OnboardingInvite } from './flows/ContractorOnboarding/components/OnboardingInvite.js';
16
16
  import { ContractReviewButton } from './flows/ContractorOnboarding/components/ContractReviewButton.js';
17
+ import { ContractOriginStep } from './flows/ContractorOnboarding/components/ContractOriginStep.js';
17
18
  import { ProductType } from './flows/ContractorOnboarding/constants.js';
18
19
  import { SaveDraftButton } from './flows/ContractorOnboarding/components/SaveDraftButton.js';
19
20
 
@@ -55,6 +56,7 @@ declare const useContractorOnboarding: ({ countryCode, externalId, employmentId,
55
56
  contract_details: FieldValues;
56
57
  select_country: FieldValues;
57
58
  basic_information: FieldValues;
59
+ contract_origin: FieldValues;
58
60
  eligibility_questionnaire: FieldValues;
59
61
  contract_preview: FieldValues;
60
62
  pricing_plan: FieldValues;
@@ -106,6 +108,10 @@ declare const useContractorOnboarding: ({ countryCode, externalId, employmentId,
106
108
  data: {
107
109
  subscription: any;
108
110
  };
111
+ } | {
112
+ data: {
113
+ contractOrigin: any;
114
+ };
109
115
  } | undefined>;
110
116
  /**
111
117
  * Array of form fields from the onboarding schema
@@ -118,6 +124,7 @@ declare const useContractorOnboarding: ({ countryCode, externalId, employmentId,
118
124
  fields: {
119
125
  select_country: Meta;
120
126
  basic_information: Meta;
127
+ contract_origin: Meta;
121
128
  contract_details: Meta;
122
129
  contract_preview: Meta;
123
130
  pricing_plan: Meta;
@@ -150,6 +157,7 @@ declare const useContractorOnboarding: ({ countryCode, externalId, employmentId,
150
157
  initialValues: {
151
158
  select_country: Record<string, unknown>;
152
159
  basic_information: Record<string, unknown>;
160
+ contract_origin: Record<string, unknown>;
153
161
  contract_details: Record<string, unknown>;
154
162
  contract_preview: Record<string, unknown>;
155
163
  pricing_plan: Record<string, unknown>;
@@ -289,6 +297,7 @@ type ContractorOnboardingRenderProps = {
289
297
  BackButton: typeof OnboardingBack;
290
298
  SubmitButton: typeof OnboardingSubmit;
291
299
  PricingPlanStep: typeof PricingPlanStep;
300
+ ContractOriginStep: typeof ContractOriginStep;
292
301
  ContractDetailsStep: typeof ContractDetailsStep;
293
302
  ContractPreviewStep: typeof ContractPreviewStep;
294
303
  OnboardingInvite: typeof OnboardingInvite;
@@ -334,9 +343,9 @@ type ContractorOnboardingFlowProps = {
334
343
  */
335
344
  externalId?: string;
336
345
  /**
337
- * The steps to skip for the onboarding. We only support skipping the select_country step for now.
346
+ * The steps to skip for the onboarding.
338
347
  */
339
- skipSteps?: ['select_country'];
348
+ skipSteps?: Array<'select_country' | 'contract_origin'>;
340
349
  /**
341
350
  * The render prop function with the params passed by the useContractorOnboarding hook and the components available to use for this flow
342
351
  */
@@ -1,8 +1,8 @@
1
- import { l as CompanyResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse } from './types.gen-ByDz5nJy.js';
2
- import { F as FieldError, N as NormalizedFieldError } from './mutations-m4qazTov.js';
1
+ import { t as CompanyResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse } from './types.gen-DCswUxeu.js';
2
+ import { F as FieldError, N as NormalizedFieldError } from './mutations-HzXri7rU.js';
3
3
  import * as React$1 from 'react';
4
4
  import { FieldValues } from 'react-hook-form';
5
- import { J as JSFFields, M as Meta, a as JSFFieldset } from './remoteFlows-C2zCZMFB.js';
5
+ import { J as JSFFields, M as Meta, a as JSFFieldset } from './remoteFlows-D6N3P-Z8.js';
6
6
  import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
7
7
  import { FlowOptions, JSFModify } from './flows/types.js';
8
8
  import { CreateCompanySubmit } from './flows/CreateCompany/components/CreateCompanySubmit.js';
@@ -1,10 +1,10 @@
1
- import { d as EmploymentCreationResponse, e as EmploymentResponse, S as SuccessResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, v as ConflictResponse, B as BadRequestResponse, F as ForbiddenResponse, N as NotFoundResponse, E as Employment$1, w as File, ab as PreOnboardingDocumentRequirement, a8 as Company, a as UnauthorizedResponse, ac as EmploymentCreateParams, ad as EmploymentFullParams, ae as EmploymentEngagementAgreementDetailsParams, af as UnifiedEmploymentUpsertBenefitOffersRequest, ag as ConvertCurrencyResponse, ah as ConvertCurrencyParams, ai as CreateContractEligibilityParams, aj as CreatePreOnboardingDocumentResponse, ak as FindOrCreatePreOnboardingDocumentParams, f as Signatory, g as ContractorContractDocumentStatus } from './types.gen-ByDz5nJy.js';
1
+ import { d as EmploymentCreationResponse, e as EmploymentResponse, S as SuccessResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, v as ConflictResponse, B as BadRequestResponse, F as ForbiddenResponse, N as NotFoundResponse, E as Employment$1, w as File, ab as PreOnboardingDocumentRequirement, a8 as Company, a as UnauthorizedResponse, ac as EmploymentCreateParams, ad as EmploymentFullParams, ae as EmploymentEngagementAgreementDetailsParams, af as UnifiedEmploymentUpsertBenefitOffersRequest, ag as ConvertCurrencyResponse, ah as ConvertCurrencyParams, ai as CreateContractEligibilityParams, aj as CreatePreOnboardingDocumentResponse, ak as FindOrCreatePreOnboardingDocumentParams, f as Signatory, g as ContractorContractDocumentStatus } from './types.gen-DCswUxeu.js';
2
2
  import * as React$1 from 'react';
3
3
  import { OnboardingBack } from './flows/Onboarding/components/OnboardingBack.js';
4
4
  import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
5
- import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-m4qazTov.js';
5
+ import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-HzXri7rU.js';
6
6
  import { OnboardingSubmit } from './flows/Onboarding/components/OnboardingSubmit.js';
7
- import { C as Components, J as JSFFields, N as NestedMeta, a as JSFFieldset } from './remoteFlows-C2zCZMFB.js';
7
+ import { C as Components, J as JSFFields, N as NestedMeta, a as JSFFieldset } from './remoteFlows-D6N3P-Z8.js';
8
8
  import * as _tanstack_query_core from '@tanstack/query-core';
9
9
  import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
10
10
  import { Step } from './flows/useStepState.js';
@@ -1,7 +1,7 @@
1
1
  import { FlowOptions } from './flows/types.js';
2
2
  import * as _tanstack_query_core from '@tanstack/query-core';
3
3
  import * as React$1 from 'react';
4
- import { Z as Step$1 } from './types.gen-ByDz5nJy.js';
4
+ import { Z as Step$1 } from './types.gen-DCswUxeu.js';
5
5
  import * as react_hook_form from 'react-hook-form';
6
6
  import { Step } from './flows/useStepState.js';
7
7
 
@@ -1,4 +1,4 @@
1
- import { $ as ListTimeoffResponse, a0 as TimeoffStatus, a1 as TimeoffType, a2 as ListLeavePoliciesSummaryResponse, E as Employment } from './types.gen-ByDz5nJy.js';
1
+ import { $ as ListTimeoffResponse, a0 as TimeoffStatus, a1 as TimeoffType, a2 as ListLeavePoliciesSummaryResponse, E as Employment } from './types.gen-DCswUxeu.js';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
3
  import { UseQueryResult } from '@tanstack/react-query';
4
4
  import { BookedTimeoffBeforeDateResponse, SummaryTimeOffDataResponse } from './flows/Termination/api.js';
@@ -314,6 +314,12 @@ type Employment = {
314
314
  work_address_details: {
315
315
  [key: string]: unknown;
316
316
  };
317
+ /**
318
+ * BillToLegalEntityID
319
+ *
320
+ * The unique identifier (UUID) of the legal entity that is billed for this employment.
321
+ */
322
+ bill_to_legal_entity_id?: string | null;
317
323
  /**
318
324
  * The employee's work email address, typically provided by the employer.
319
325
  */
@@ -384,6 +390,12 @@ type Employment = {
384
390
  * The unique identifier (UUID) of the currently active contract for this employment.
385
391
  */
386
392
  active_contract_id?: string;
393
+ /**
394
+ * EngagedByLegalEntityID
395
+ *
396
+ * The unique identifier (UUID) of the legal entity that engaged this employment.
397
+ */
398
+ engaged_by_legal_entity_id?: string | null;
387
399
  /**
388
400
  * Billing address information. Its properties may vary depending on the country.
389
401
  */
@@ -2869,6 +2881,10 @@ type EmploymentCreateParams = {
2869
2881
  basic_information: {
2870
2882
  [key: string]: unknown;
2871
2883
  };
2884
+ /**
2885
+ * Id of the legal entity that should be billed for the employment. If omitted, falls back to `engaged_by_legal_entity_id`. For EOR and Contractor employments this may differ from `engaged_by_legal_entity_id`. For Global Payroll and Direct (HRIS) employments it must match `engaged_by_legal_entity_id`.
2886
+ */
2887
+ bill_to_legal_entity_id?: string;
2872
2888
  /**
2873
2889
  * This optional field is deprecated.
2874
2890
  */
@@ -2878,9 +2894,15 @@ type EmploymentCreateParams = {
2878
2894
  */
2879
2895
  country_code: string;
2880
2896
  /**
2881
- * This field is required to create a global payroll employee.
2897
+ * Deprecated alias for `engaged_by_legal_entity_id`. Use `engaged_by_legal_entity_id` instead.
2898
+ *
2899
+ * @deprecated
2882
2900
  */
2883
2901
  engaged_by_entity_slug?: string;
2902
+ /**
2903
+ * Id of the legal entity that engages the employee or contractor. Required for Global Payroll employees. For EOR and Contractor employments this may differ from `bill_to_legal_entity_id`. For Global Payroll and Direct (HRIS) employments it must match `bill_to_legal_entity_id`.
2904
+ */
2905
+ engaged_by_legal_entity_id?: string;
2884
2906
  /**
2885
2907
  * A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system.
2886
2908
  */
@@ -3098,4 +3120,4 @@ type PostV1ContractAmendmentsAutomatableErrors = {
3098
3120
  };
3099
3121
  type PostV1ContractAmendmentsAutomatableError = PostV1ContractAmendmentsAutomatableErrors[keyof PostV1ContractAmendmentsAutomatableErrors];
3100
3122
 
3101
- export type { ListTimeoffResponse as $, SignContractDocument as A, BadRequestResponse as B, ContractAmendmentAutomatableResponse as C, ContractorSubscriptionsSummary as D, Employment as E, ForbiddenResponse as F, ManageContractorPlusSubscriptionOperationsParams as G, CreateContractDocumentResponse as H, CreateContractDocument as I, Country as J, DateTimeIso8601 as K, ContractDocumentItem as L, MinimalRegion as M, NotFoundResponse as N, OffboardingResponse as O, PostV1ContractAmendmentsError as P, EligibilityQuestionnaireResponse as Q, RequestError as R, SuccessResponse as S, TooManyRequestsResponse as T, UnprocessableEntityResponse as U, ValidationError as V, ConflictErrorResponse as W, SubmitEligibilityQuestionnaireRequest as X, CompanyAction as Y, Step as Z, SubStep as _, UnauthorizedResponse as a, TimeoffStatus as a0, TimeoffType as a1, ListLeavePoliciesSummaryResponse as a2, CreateOffboardingParams as a3, MagicLinkResponse as a4, MagicLinkParams as a5, GetV1EmploymentsEmploymentIdResponse as a6, Currency as a7, Company as a8, PayrollCalendarEor as a9, HelpCenterArticle as aa, PreOnboardingDocumentRequirement as ab, EmploymentCreateParams as ac, EmploymentFullParams as ad, EmploymentEngagementAgreementDetailsParams as ae, UnifiedEmploymentUpsertBenefitOffersRequest as af, ConvertCurrencyResponse as ag, ConvertCurrencyParams as ah, CreateContractEligibilityParams as ai, CreatePreOnboardingDocumentResponse as aj, FindOrCreatePreOnboardingDocumentParams as ak, ContractAmendmentResponse as b, PostV1ContractAmendmentsAutomatableError as c, EmploymentCreationResponse as d, EmploymentResponse as e, Signatory as f, ContractorContractDocumentStatus as g, CompanyLegalEntity as h, CompanyCreationResponse as i, CompanyCreationConflictErrorResponse as j, CreateCompanyParams as k, CompanyResponse as l, UpdateCompanyParams as m, CostCalculatorEstimateResponse as n, CostCalculatorEstimatePdfResponse as o, CostCalculatorEstimateParams as p, CostCalculatorEstimateCsvResponse as q, MinimalCountry as r, EmploymentTermType as s, CostCalculatorEmployment as t, PostV1CostCalculatorEstimationError as u, ConflictResponse as v, File as w, TerminationDetailsParams as x, UploadFileResponse as y, FileParams as z };
3123
+ export type { ListTimeoffResponse as $, SignContractDocument as A, BadRequestResponse as B, ContractAmendmentAutomatableResponse as C, ContractorSubscriptionsSummary as D, Employment as E, ForbiddenResponse as F, ManageContractorPlusSubscriptionOperationsParams as G, CreateContractDocumentResponse as H, CreateContractDocument as I, Country as J, DateTimeIso8601 as K, ContractDocumentItem as L, MinimalRegion as M, NotFoundResponse as N, OffboardingResponse as O, PostV1ContractAmendmentsError as P, EligibilityQuestionnaireResponse as Q, RequestError as R, SuccessResponse as S, TooManyRequestsResponse as T, UnprocessableEntityResponse as U, ValidationError as V, ConflictErrorResponse as W, SubmitEligibilityQuestionnaireRequest as X, CompanyAction as Y, Step as Z, SubStep as _, UnauthorizedResponse as a, TimeoffStatus as a0, TimeoffType as a1, ListLeavePoliciesSummaryResponse as a2, CreateOffboardingParams as a3, MagicLinkResponse as a4, MagicLinkParams as a5, GetV1EmploymentsEmploymentIdResponse as a6, Currency as a7, Company as a8, PayrollCalendarEor as a9, HelpCenterArticle as aa, PreOnboardingDocumentRequirement as ab, EmploymentCreateParams as ac, EmploymentFullParams as ad, EmploymentEngagementAgreementDetailsParams as ae, UnifiedEmploymentUpsertBenefitOffersRequest as af, ConvertCurrencyResponse as ag, ConvertCurrencyParams as ah, CreateContractEligibilityParams as ai, CreatePreOnboardingDocumentResponse as aj, FindOrCreatePreOnboardingDocumentParams as ak, ContractAmendmentResponse as b, PostV1ContractAmendmentsAutomatableError as c, EmploymentCreationResponse as d, EmploymentResponse as e, Signatory as f, ContractorContractDocumentStatus as g, CompanyLegalEntity as h, CostCalculatorEstimateResponse as i, CostCalculatorEstimatePdfResponse as j, CostCalculatorEstimateParams as k, CostCalculatorEstimateCsvResponse as l, MinimalCountry as m, EmploymentTermType as n, CostCalculatorEmployment as o, PostV1CostCalculatorEstimationError as p, CompanyCreationResponse as q, CompanyCreationConflictErrorResponse as r, CreateCompanyParams as s, CompanyResponse as t, UpdateCompanyParams as u, ConflictResponse as v, File as w, TerminationDetailsParams as x, UploadFileResponse as y, FileParams as z };
@@ -1,6 +1,6 @@
1
1
  import { ClassValue } from 'clsx';
2
2
  import { ValidationError } from 'yup';
3
- import './remoteFlows-C2zCZMFB.js';
3
+ import './remoteFlows-D6N3P-Z8.js';
4
4
 
5
5
  declare function cn(...inputs: ClassValue[]): string;
6
6
  type YupError = Pick<ValidationError, 'type' | 'errors'> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/remote-flows",
3
- "version": "1.41.1",
3
+ "version": "1.42.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/remoteoss/remote-flows.git"
@@ -115,7 +115,7 @@
115
115
  "lodash.mergewith": "4.6.2",
116
116
  "lodash.omit": "4.18.0",
117
117
  "lodash.omitby": "4.6.0",
118
- "lucide-react": "1.16.0",
118
+ "lucide-react": "1.21.0",
119
119
  "postcss": "8.5.14",
120
120
  "react-day-picker": "8.10.2",
121
121
  "react-flagpack": "2.0.6",
@@ -148,7 +148,7 @@
148
148
  "gzip-size": "7.0.0",
149
149
  "jsdom": "29.1.1",
150
150
  "msw": "2.14.6",
151
- "oxfmt": "0.55.0",
151
+ "oxfmt": "0.56.0",
152
152
  "oxlint": "1.70.0",
153
153
  "tsup": "8.5.1",
154
154
  "tsx": "4.22.4",
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-YOFPHSYV.js";import"./chunk-QJJZTAG2.js";import"./chunk-SHOGXN3C.js";import"./chunk-P6H7QMKK.js";import"./chunk-Y3CJRZLA.js";import"./chunk-KWIWHDBS.js";import"./chunk-G2LZFGZA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as CheckboxFieldDefault};
2
- //# sourceMappingURL=CheckboxFieldDefault-OBDOMMWQ.js.map
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-7EKNQYS5.js";import"./chunk-DJIQISA2.js";import"./chunk-3B6BHFDV.js";import"./chunk-MHIY35CK.js";import"./chunk-ZOTY3CAM.js";import"./chunk-SHOGXN3C.js";import"./chunk-T5J2Z6ZR.js";import"./chunk-P6H7QMKK.js";import"./chunk-Y3CJRZLA.js";import"./chunk-KWIWHDBS.js";import"./chunk-G2LZFGZA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as CountryFieldDefault};
2
- //# sourceMappingURL=CountryFieldDefault-NEFHRUUS.js.map
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-ZY7RAGEL.js";import"./chunk-3B6BHFDV.js";import"./chunk-SHOGXN3C.js";import"./chunk-T5J2Z6ZR.js";import"./chunk-P6H7QMKK.js";import"./chunk-Y3CJRZLA.js";import"./chunk-KWIWHDBS.js";import"./chunk-G2LZFGZA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as DatePickerFieldDefault};
2
- //# sourceMappingURL=DatePickerFieldDefault-NYHK6I2G.js.map
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-KEYWBQH2.js";import"./chunk-3UBFABDS.js";import"./chunk-ZOTY3CAM.js";import"./chunk-SHOGXN3C.js";import"./chunk-P6H7QMKK.js";import"./chunk-Y3CJRZLA.js";import"./chunk-KWIWHDBS.js";import"./chunk-G2LZFGZA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as RadioGroupFieldDefault};
2
- //# sourceMappingURL=RadioGroupFieldDefault-GF4XVARF.js.map
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-PJPYUB2R.js";import"./chunk-SHOGXN3C.js";import"./chunk-P6H7QMKK.js";import"./chunk-Y3CJRZLA.js";import"./chunk-KWIWHDBS.js";import"./chunk-G2LZFGZA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as TextAreaFieldDefault};
2
- //# sourceMappingURL=TextAreaFieldDefault-HPEUG5UI.js.map
@@ -1,2 +0,0 @@
1
- import{a,b as s,e as l,h as c,i as d}from"./chunk-PB6UQ4A4.js";import{a as i}from"./chunk-P37U34EQ.js";function _(e={}){let o=[{name:"select_country",label:"Select Country",visible:!!e?.includeSelectCountry},{name:"basic_information",label:"Basic Information",visible:!0},{name:"pricing_plan",label:"Pricing Plan",visible:!0},{name:"eligibility_questionnaire",label:"Eligibility Questionnaire",visible:!!e?.includeEligibilityQuestionnaire},{name:"contract_details",label:"Contract Details",visible:!0},{name:"contract_preview",label:"Contract Preview",visible:!!e?.includeContractPreview},{name:"review",label:"Review",visible:!0}].map((n,r)=>({name:n.name,index:r,label:n.label,visible:n.visible}));return{steps:o.reduce((n,r)=>(n[r.name]={index:r.index,name:r.name,visible:r.visible},n),{}),stepsArray:o}}i(_,"buildSteps");var E=i((e,t)=>{if(e&&t&&e!==t)return`When the contractor will start providing service to your company. ${`This date does not match the date you provided in the Basic Information step - ${e} - and will override it only when both parties have signed the contract.`}`},"calculateProvisionalStartDateDescription"),v=i(e=>e===a||e===s,"isCMOrCMPlus"),p=["SAU","KWT","OMN","QAT","BHR"],g=i(e=>p.includes(e),"isNationalityCountryCode"),y=i((e,t)=>!t||t.length===0?!0:!t.some(o=>l[o]===e),"shouldIncludeProduct"),S=["initiated","invited","created_awaiting_reserve","created_reserve_paid"],f=["initiated","created_awaiting_reserve","invited"];function R(e){return e?d:c}i(R,"transformAiErrorResponse");export{_ as a,E as b,v as c,g as d,y as e,S as f,f as g,R as h};
2
- //# sourceMappingURL=chunk-COAJUZSE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/ContractorOnboarding/utils.ts"],"sourcesContent":["import { Step } from '@/src/flows/useStepState';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n ProductType,\n PRODUCT_IDENTIFIER_MAP,\n REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE,\n REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { Employment } from '@/src/flows/Onboarding/types';\n\nexport type StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'contract_details'\n | 'eligibility_questionnaire'\n | 'contract_preview'\n | 'pricing_plan'\n | 'review';\n\ntype StepConfig = {\n includeSelectCountry?: boolean;\n includeEligibilityQuestionnaire?: boolean;\n includeContractPreview?: boolean;\n};\n\nexport function buildSteps(config: StepConfig = {}) {\n const stepDefinitions: Array<{\n name: StepKeys;\n label: string;\n visible: boolean;\n }> = [\n {\n name: 'select_country',\n label: 'Select Country',\n visible: Boolean(config?.includeSelectCountry),\n },\n {\n name: 'basic_information',\n label: 'Basic Information',\n visible: true,\n },\n {\n name: 'pricing_plan',\n label: 'Pricing Plan',\n visible: true,\n },\n {\n name: 'eligibility_questionnaire',\n label: 'Eligibility Questionnaire',\n visible: Boolean(config?.includeEligibilityQuestionnaire),\n },\n {\n name: 'contract_details',\n label: 'Contract Details',\n visible: true,\n },\n {\n name: 'contract_preview',\n label: 'Contract Preview',\n visible: Boolean(config?.includeContractPreview),\n },\n {\n name: 'review',\n label: 'Review',\n visible: true,\n },\n ];\n\n const stepsArray = stepDefinitions.map((step, index) => ({\n name: step.name,\n index,\n label: step.label,\n visible: step.visible,\n }));\n\n const steps = stepsArray.reduce(\n (acc, step) => {\n acc[step.name] = {\n index: step.index,\n name: step.name,\n visible: step.visible,\n };\n return acc;\n },\n {} as Record<string, Step<StepKeys>>,\n );\n\n return { steps, stepsArray };\n}\n\n/**\n * Calculates the description for the provisional start date field\n * based on whether the dates match between basic information and contract details steps\n */\nexport const calculateProvisionalStartDateDescription = (\n employmentProvisionalStartDate: string | undefined,\n fieldProvisionalStartDate: string | undefined,\n): string | undefined => {\n const datesNotMatching =\n employmentProvisionalStartDate &&\n fieldProvisionalStartDate &&\n employmentProvisionalStartDate !== fieldProvisionalStartDate;\n\n if (datesNotMatching) {\n const datesDontMatchWarning = `This date does not match the date you provided in the Basic Information step - ${\n employmentProvisionalStartDate\n } - and will override it only when both parties have signed the contract.`;\n return `When the contractor will start providing service to your company. ${datesDontMatchWarning}`;\n }\n return undefined;\n};\n\n/**\n * Checks if the selected pricing plan is CM (standard) or CM+ (plus)\n */\nexport const isCMOrCMPlus = (subscription: string | undefined): boolean => {\n return (\n subscription === contractorStandardProductIdentifier ||\n subscription === contractorPlusProductIdentifier\n );\n};\n\nconst NATIONALITY_COUNTRY_CODES = ['SAU', 'KWT', 'OMN', 'QAT', 'BHR'];\n\n/**\n * Checks if the country code is a country code that requires nationality status field\n */\nexport const isNationalityCountryCode = (countryCode: string) => {\n return NATIONALITY_COUNTRY_CODES.includes(countryCode);\n};\n\n/**\n * Checks if a product should be included based on the excludeProducts list\n * @param productIdentifier - The product identifier to check\n * @param excludeProducts - Array of products to exclude\n * @returns true if the product should be included, false otherwise\n */\nexport const shouldIncludeProduct = (\n productIdentifier: string,\n excludeProducts?: ProductType[],\n): boolean => {\n if (!excludeProducts || excludeProducts.length === 0) {\n return true;\n }\n\n return !excludeProducts.some(\n (excluded) => PRODUCT_IDENTIFIER_MAP[excluded] === productIdentifier,\n );\n};\n\n/**\n * Array of employment statuses that are allowed to proceed to the review step.\n * These statuses indicate that the employment is in a final state and the employment cannot be modified further.\n * @type {Employment['status'][]}\n * @constant\n */\nexport const reviewStepAllowedEmploymentStatus: Employment['status'][] = [\n 'initiated',\n 'invited',\n 'created_awaiting_reserve',\n 'created_reserve_paid',\n];\n\nexport const disabledInviteButtonEmploymentStatus: Employment['status'][] = [\n 'initiated',\n 'created_awaiting_reserve',\n 'invited',\n];\n\n/**\n * Transforms AI error messages to use default localized messages\n * @param isContractorOfRecord - Whether the contractor is a Contractor of Record\n * @param errors - Array of error messages from the API\n * @returns Array containing the appropriate default error message\n */\nexport function transformAiErrorResponse(\n isContractorOfRecord: boolean,\n): string {\n const remoteAiErrorMessage = isContractorOfRecord\n ? REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE\n : REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE;\n return remoteAiErrorMessage;\n}\n"],"mappings":"uGA0BO,SAASA,EAAWC,EAAqB,CAAC,EAAG,CA2ClD,IAAMC,EAtCD,CACH,CACE,KAAM,iBACN,MAAO,iBACP,QAAS,EAAQD,GAAQ,oBAC3B,EACA,CACE,KAAM,oBACN,MAAO,oBACP,QAAS,EACX,EACA,CACE,KAAM,eACN,MAAO,eACP,QAAS,EACX,EACA,CACE,KAAM,4BACN,MAAO,4BACP,QAAS,EAAQA,GAAQ,+BAC3B,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EACX,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EAAQA,GAAQ,sBAC3B,EACA,CACE,KAAM,SACN,MAAO,SACP,QAAS,EACX,CACF,EAEmC,IAAI,CAACE,EAAMC,KAAW,CACvD,KAAMD,EAAK,KACX,MAAAC,EACA,MAAOD,EAAK,MACZ,QAASA,EAAK,OAChB,EAAE,EAcF,MAAO,CAAE,MAZKD,EAAW,OACvB,CAACG,EAAKF,KACJE,EAAIF,EAAK,IAAI,EAAI,CACf,MAAOA,EAAK,MACZ,KAAMA,EAAK,KACX,QAASA,EAAK,OAChB,EACOE,GAET,CAAC,CACH,EAEgB,WAAAH,CAAW,CAC7B,CA/DgBI,EAAAN,EAAA,cAqET,IAAMO,EAA2CD,EAAA,CACtDE,EACAC,IACuB,CAMvB,GAJED,GACAC,GACAD,IAAmCC,EAMnC,MAAO,qEAHuB,kFAC5BD,CACF,0EACiG,EAGrG,EAhBwD,4CAqB3CE,EAAeJ,EAACK,GAEzBA,IAAiBC,GACjBD,IAAiBE,EAHO,gBAOtBC,EAA4B,CAAC,MAAO,MAAO,MAAO,MAAO,KAAK,EAKvDC,EAA2BT,EAACU,GAChCF,EAA0B,SAASE,CAAW,EADf,4BAU3BC,EAAuBX,EAAA,CAClCY,EACAC,IAEI,CAACA,GAAmBA,EAAgB,SAAW,EAC1C,GAGF,CAACA,EAAgB,KACrBC,GAAaC,EAAuBD,CAAQ,IAAMF,CACrD,EAVkC,wBAmBvBI,EAA4D,CACvE,YACA,UACA,2BACA,sBACF,EAEaC,EAA+D,CAC1E,YACA,2BACA,SACF,EAQO,SAASC,EACdC,EACQ,CAIR,OAH6BA,EACzBC,EACAC,CAEN,CAPgBrB,EAAAkB,EAAA","names":["buildSteps","config","stepsArray","step","index","acc","__name","calculateProvisionalStartDateDescription","employmentProvisionalStartDate","fieldProvisionalStartDate","isCMOrCMPlus","subscription","contractorStandardProductIdentifier","contractorPlusProductIdentifier","NATIONALITY_COUNTRY_CODES","isNationalityCountryCode","countryCode","shouldIncludeProduct","productIdentifier","excludeProducts","excluded","PRODUCT_IDENTIFIER_MAP","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus","transformAiErrorResponse","isContractorOfRecord","REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE","REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE"]}