@keystrokehq/platform 1.0.11 → 1.0.12

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 (295) hide show
  1. package/dist/{awk2-LA3USKJP-jPsH1ZBD.cjs → awk2-LA3USKJP-C6DWhWoc.cjs} +2 -2
  2. package/dist/{awk2-LA3USKJP-jPsH1ZBD.cjs.map → awk2-LA3USKJP-C6DWhWoc.cjs.map} +1 -1
  3. package/dist/{awk2-LA3USKJP-DgniWEuN.mjs → awk2-LA3USKJP-Cbs5JuVA.mjs} +2 -2
  4. package/dist/{awk2-LA3USKJP-DgniWEuN.mjs.map → awk2-LA3USKJP-Cbs5JuVA.mjs.map} +1 -1
  5. package/dist/{base64-C2AIWVNC-CVi5yHZw.cjs → base64-C2AIWVNC-Bwz3eLJj.cjs} +2 -2
  6. package/dist/{base64-C2AIWVNC-CVi5yHZw.cjs.map → base64-C2AIWVNC-Bwz3eLJj.cjs.map} +1 -1
  7. package/dist/{base64-C2AIWVNC-DN_Qb8hT.mjs → base64-C2AIWVNC-Ec8ivVJh.mjs} +2 -2
  8. package/dist/{base64-C2AIWVNC-DN_Qb8hT.mjs.map → base64-C2AIWVNC-Ec8ivVJh.mjs.map} +1 -1
  9. package/dist/{bash-YZ33HQZQ-BayVouzQ.mjs → bash-YZ33HQZQ-C63hlxLw.mjs} +2 -2
  10. package/dist/{bash-YZ33HQZQ-BayVouzQ.mjs.map → bash-YZ33HQZQ-C63hlxLw.mjs.map} +1 -1
  11. package/dist/{bash-YZ33HQZQ-BMNV4YEK.cjs → bash-YZ33HQZQ-DaDfS53C.cjs} +2 -2
  12. package/dist/{bash-YZ33HQZQ-BMNV4YEK.cjs.map → bash-YZ33HQZQ-DaDfS53C.cjs.map} +1 -1
  13. package/dist/{cat-TSFMZVYS-DUZVEuWd.mjs → cat-TSFMZVYS-BU60kzHS.mjs} +3 -3
  14. package/dist/{cat-TSFMZVYS-DUZVEuWd.mjs.map → cat-TSFMZVYS-BU60kzHS.mjs.map} +1 -1
  15. package/dist/{cat-TSFMZVYS-CVPTaS5T.cjs → cat-TSFMZVYS-BvJCrPRL.cjs} +3 -3
  16. package/dist/{cat-TSFMZVYS-CVPTaS5T.cjs.map → cat-TSFMZVYS-BvJCrPRL.cjs.map} +1 -1
  17. package/dist/{chunk-5H5SCKJM-80BMl5Jh.cjs → chunk-5H5SCKJM-BAhx56OG.cjs} +2 -2
  18. package/dist/{chunk-5H5SCKJM-80BMl5Jh.cjs.map → chunk-5H5SCKJM-BAhx56OG.cjs.map} +1 -1
  19. package/dist/{chunk-5H5SCKJM-C4LrayGq.mjs → chunk-5H5SCKJM-DUpmnSr5.mjs} +2 -2
  20. package/dist/{chunk-5H5SCKJM-C4LrayGq.mjs.map → chunk-5H5SCKJM-DUpmnSr5.mjs.map} +1 -1
  21. package/dist/{chunk-AQ6FYS2X-DR-rXKG-.mjs → chunk-AQ6FYS2X-BtD4mNJU.mjs} +2 -2
  22. package/dist/{chunk-AQ6FYS2X-DR-rXKG-.mjs.map → chunk-AQ6FYS2X-BtD4mNJU.mjs.map} +1 -1
  23. package/dist/{chunk-AQ6FYS2X-D3UWAE5x.cjs → chunk-AQ6FYS2X-ClT8fRjI.cjs} +2 -2
  24. package/dist/{chunk-AQ6FYS2X-D3UWAE5x.cjs.map → chunk-AQ6FYS2X-ClT8fRjI.cjs.map} +1 -1
  25. package/dist/{chunk-CHFEPBH4-BM6K51b-.mjs → chunk-CHFEPBH4-39PrhR88.mjs} +2 -2
  26. package/dist/{chunk-CHFEPBH4-BM6K51b-.mjs.map → chunk-CHFEPBH4-39PrhR88.mjs.map} +1 -1
  27. package/dist/{chunk-CHFEPBH4-CwZJWJUn.cjs → chunk-CHFEPBH4-DwaTdMTs.cjs} +2 -2
  28. package/dist/{chunk-CHFEPBH4-CwZJWJUn.cjs.map → chunk-CHFEPBH4-DwaTdMTs.cjs.map} +1 -1
  29. package/dist/{chunk-EBAPSGAO-D8sKs0MS.mjs → chunk-EBAPSGAO-C1DiLONp.mjs} +2 -2
  30. package/dist/{chunk-EBAPSGAO-D8sKs0MS.mjs.map → chunk-EBAPSGAO-C1DiLONp.mjs.map} +1 -1
  31. package/dist/{chunk-EBAPSGAO-DmWZsVIk.cjs → chunk-EBAPSGAO-atOs9kds.cjs} +2 -2
  32. package/dist/{chunk-EBAPSGAO-DmWZsVIk.cjs.map → chunk-EBAPSGAO-atOs9kds.cjs.map} +1 -1
  33. package/dist/{chunk-LEKBROJD-DeSGuiZ0.mjs → chunk-LEKBROJD-BVcmuctu.mjs} +2 -2
  34. package/dist/{chunk-LEKBROJD-DeSGuiZ0.mjs.map → chunk-LEKBROJD-BVcmuctu.mjs.map} +1 -1
  35. package/dist/{chunk-LEKBROJD-h5Ib9sQv.cjs → chunk-LEKBROJD-D1Nsbm47.cjs} +2 -2
  36. package/dist/{chunk-LEKBROJD-h5Ib9sQv.cjs.map → chunk-LEKBROJD-D1Nsbm47.cjs.map} +1 -1
  37. package/dist/{chunk-VPADYNBD-6Delt_OF.cjs → chunk-VPADYNBD-eQFHIGFd.cjs} +2 -2
  38. package/dist/{chunk-VPADYNBD-6Delt_OF.cjs.map → chunk-VPADYNBD-eQFHIGFd.cjs.map} +1 -1
  39. package/dist/{chunk-VPADYNBD-D3XoYgsH.mjs → chunk-VPADYNBD-k8grR5QE.mjs} +2 -2
  40. package/dist/{chunk-VPADYNBD-D3XoYgsH.mjs.map → chunk-VPADYNBD-k8grR5QE.mjs.map} +1 -1
  41. package/dist/{chunk-YCLFEX4T-aBlxr7E7.mjs → chunk-YCLFEX4T-Cr6nQfwN.mjs} +2 -2
  42. package/dist/{chunk-YCLFEX4T-aBlxr7E7.mjs.map → chunk-YCLFEX4T-Cr6nQfwN.mjs.map} +1 -1
  43. package/dist/{chunk-YCLFEX4T-CFb_8KYT.cjs → chunk-YCLFEX4T-D3gv9UpB.cjs} +2 -2
  44. package/dist/{chunk-YCLFEX4T-CFb_8KYT.cjs.map → chunk-YCLFEX4T-D3gv9UpB.cjs.map} +1 -1
  45. package/dist/{column-XT6UFXNQ-Bs6ab5RP.mjs → column-XT6UFXNQ-BwfJcBvS.mjs} +2 -2
  46. package/dist/{column-XT6UFXNQ-Bs6ab5RP.mjs.map → column-XT6UFXNQ-BwfJcBvS.mjs.map} +1 -1
  47. package/dist/{column-XT6UFXNQ-CvPUU2qn.cjs → column-XT6UFXNQ-ClDhPMmW.cjs} +2 -2
  48. package/dist/{column-XT6UFXNQ-CvPUU2qn.cjs.map → column-XT6UFXNQ-ClDhPMmW.cjs.map} +1 -1
  49. package/dist/{comm-VV2LDX2J-BceGRkiY.mjs → comm-VV2LDX2J-D6TvhkbM.mjs} +2 -2
  50. package/dist/{comm-VV2LDX2J-BceGRkiY.mjs.map → comm-VV2LDX2J-D6TvhkbM.mjs.map} +1 -1
  51. package/dist/{comm-VV2LDX2J-Dv9b3vPH.cjs → comm-VV2LDX2J-DXE-w1HV.cjs} +2 -2
  52. package/dist/{comm-VV2LDX2J-Dv9b3vPH.cjs.map → comm-VV2LDX2J-DXE-w1HV.cjs.map} +1 -1
  53. package/dist/config.cjs +1 -1
  54. package/dist/config.mjs +1 -1
  55. package/dist/{cp-BISAAS7A-Odq5owVs.cjs → cp-BISAAS7A-CQdE6z5j.cjs} +2 -2
  56. package/dist/{cp-BISAAS7A-Odq5owVs.cjs.map → cp-BISAAS7A-CQdE6z5j.cjs.map} +1 -1
  57. package/dist/{cp-BISAAS7A-Be4v2wqs.mjs → cp-BISAAS7A-CTF27QOo.mjs} +2 -2
  58. package/dist/{cp-BISAAS7A-Be4v2wqs.mjs.map → cp-BISAAS7A-CTF27QOo.mjs.map} +1 -1
  59. package/dist/{cut-OKARJCCV-B6ZP8IKs.cjs → cut-OKARJCCV-DK7W2vRV.cjs} +3 -3
  60. package/dist/{cut-OKARJCCV-B6ZP8IKs.cjs.map → cut-OKARJCCV-DK7W2vRV.cjs.map} +1 -1
  61. package/dist/{cut-OKARJCCV-CVcevNsq.mjs → cut-OKARJCCV-Dd9hEegE.mjs} +3 -3
  62. package/dist/{cut-OKARJCCV-CVcevNsq.mjs.map → cut-OKARJCCV-Dd9hEegE.mjs.map} +1 -1
  63. package/dist/{diff-MWJFIG7X-G3kD63gP.cjs → diff-MWJFIG7X-B7GDXrNl.cjs} +2 -2
  64. package/dist/{diff-MWJFIG7X-G3kD63gP.cjs.map → diff-MWJFIG7X-B7GDXrNl.cjs.map} +1 -1
  65. package/dist/{diff-MWJFIG7X-FrFK0uIO.mjs → diff-MWJFIG7X-gvKGQ4Vm.mjs} +2 -2
  66. package/dist/{diff-MWJFIG7X-FrFK0uIO.mjs.map → diff-MWJFIG7X-gvKGQ4Vm.mjs.map} +1 -1
  67. package/dist/{dist-ChqR_h8h.cjs → dist-CCtsJoyT.cjs} +132 -15
  68. package/dist/dist-CCtsJoyT.cjs.map +1 -0
  69. package/dist/{dist-Ccqkv6G-.mjs → dist-DMbNZqSO.mjs} +133 -16
  70. package/dist/dist-DMbNZqSO.mjs.map +1 -0
  71. package/dist/{du-572XNP42-C6OIF82F.mjs → du-572XNP42-DD3oY3pM.mjs} +2 -2
  72. package/dist/{du-572XNP42-C6OIF82F.mjs.map → du-572XNP42-DD3oY3pM.mjs.map} +1 -1
  73. package/dist/{du-572XNP42-CDgxFrHv.cjs → du-572XNP42-JQYSDDdg.cjs} +2 -2
  74. package/dist/{du-572XNP42-CDgxFrHv.cjs.map → du-572XNP42-JQYSDDdg.cjs.map} +1 -1
  75. package/dist/{env-36M5BO7M-TpV-zxan.mjs → env-36M5BO7M-C616oykA.mjs} +2 -2
  76. package/dist/{env-36M5BO7M-TpV-zxan.mjs.map → env-36M5BO7M-C616oykA.mjs.map} +1 -1
  77. package/dist/{env-36M5BO7M-BZNEAbHV.cjs → env-36M5BO7M-DcYbMKAc.cjs} +2 -2
  78. package/dist/{env-36M5BO7M-BZNEAbHV.cjs.map → env-36M5BO7M-DcYbMKAc.cjs.map} +1 -1
  79. package/dist/{expand-JSPG6VOP-CJrjjs40.cjs → expand-JSPG6VOP-Bd6Mjgku.cjs} +2 -2
  80. package/dist/{expand-JSPG6VOP-CJrjjs40.cjs.map → expand-JSPG6VOP-Bd6Mjgku.cjs.map} +1 -1
  81. package/dist/{expand-JSPG6VOP-CWJ0LBtp.mjs → expand-JSPG6VOP-BuKij0DO.mjs} +2 -2
  82. package/dist/{expand-JSPG6VOP-CWJ0LBtp.mjs.map → expand-JSPG6VOP-BuKij0DO.mjs.map} +1 -1
  83. package/dist/{expr-5JAACS4X-DniSTC07.mjs → expr-5JAACS4X-CC4E9D15.mjs} +2 -2
  84. package/dist/{expr-5JAACS4X-DniSTC07.mjs.map → expr-5JAACS4X-CC4E9D15.mjs.map} +1 -1
  85. package/dist/{expr-5JAACS4X-BOHZsN2R.cjs → expr-5JAACS4X-CQTXBymQ.cjs} +2 -2
  86. package/dist/{expr-5JAACS4X-BOHZsN2R.cjs.map → expr-5JAACS4X-CQTXBymQ.cjs.map} +1 -1
  87. package/dist/{find-INTH3OLC-CGVDJQIZ.mjs → find-INTH3OLC-D3kx289J.mjs} +3 -3
  88. package/dist/{find-INTH3OLC-CGVDJQIZ.mjs.map → find-INTH3OLC-D3kx289J.mjs.map} +1 -1
  89. package/dist/{find-INTH3OLC-CviqjoPD.cjs → find-INTH3OLC-kfcELKpW.cjs} +3 -3
  90. package/dist/{find-INTH3OLC-CviqjoPD.cjs.map → find-INTH3OLC-kfcELKpW.cjs.map} +1 -1
  91. package/dist/{fold-4TQNYMSW-DBge6cne.mjs → fold-4TQNYMSW-D0iL0Nkb.mjs} +2 -2
  92. package/dist/{fold-4TQNYMSW-DBge6cne.mjs.map → fold-4TQNYMSW-D0iL0Nkb.mjs.map} +1 -1
  93. package/dist/{fold-4TQNYMSW-B5wPK9V1.cjs → fold-4TQNYMSW-DQ5taXF2.cjs} +2 -2
  94. package/dist/{fold-4TQNYMSW-B5wPK9V1.cjs.map → fold-4TQNYMSW-DQ5taXF2.cjs.map} +1 -1
  95. package/dist/{grep-V3LQVMRQ-CLoyraY-.cjs → grep-V3LQVMRQ-C8pEgEgD.cjs} +4 -4
  96. package/dist/{grep-V3LQVMRQ-CLoyraY-.cjs.map → grep-V3LQVMRQ-C8pEgEgD.cjs.map} +1 -1
  97. package/dist/{grep-V3LQVMRQ-BbvwTp41.mjs → grep-V3LQVMRQ-_4izyNCV.mjs} +4 -4
  98. package/dist/{grep-V3LQVMRQ-BbvwTp41.mjs.map → grep-V3LQVMRQ-_4izyNCV.mjs.map} +1 -1
  99. package/dist/{gzip-O5ASJAFY-JgyEYx6u.mjs → gzip-O5ASJAFY-BnmMA0R6.mjs} +2 -2
  100. package/dist/{gzip-O5ASJAFY-JgyEYx6u.mjs.map → gzip-O5ASJAFY-BnmMA0R6.mjs.map} +1 -1
  101. package/dist/{gzip-O5ASJAFY-Cy0Y79yo.cjs → gzip-O5ASJAFY-DojzCog1.cjs} +2 -2
  102. package/dist/{gzip-O5ASJAFY-Cy0Y79yo.cjs.map → gzip-O5ASJAFY-DojzCog1.cjs.map} +1 -1
  103. package/dist/{head-442HYESI-CSif9wmv.cjs → head-442HYESI-ivR6TqXi.cjs} +2 -2
  104. package/dist/{head-442HYESI-CSif9wmv.cjs.map → head-442HYESI-ivR6TqXi.cjs.map} +1 -1
  105. package/dist/{head-442HYESI-BX8PiyxQ.mjs → head-442HYESI-wZ_4JDHI.mjs} +2 -2
  106. package/dist/{head-442HYESI-BX8PiyxQ.mjs.map → head-442HYESI-wZ_4JDHI.mjs.map} +1 -1
  107. package/dist/{help-HZ6M2CKN-CJeltn0F.mjs → help-HZ6M2CKN--V0MINGj.mjs} +2 -2
  108. package/dist/{help-HZ6M2CKN-CJeltn0F.mjs.map → help-HZ6M2CKN--V0MINGj.mjs.map} +1 -1
  109. package/dist/{help-HZ6M2CKN-BRG_Hg9L.cjs → help-HZ6M2CKN-BTcYglAI.cjs} +2 -2
  110. package/dist/{help-HZ6M2CKN-BRG_Hg9L.cjs.map → help-HZ6M2CKN-BTcYglAI.cjs.map} +1 -1
  111. package/dist/{html-to-markdown-JW4MSQZO-0vkjwwF-.cjs → html-to-markdown-JW4MSQZO-DGAfruBd.cjs} +3 -3
  112. package/dist/{html-to-markdown-JW4MSQZO-0vkjwwF-.cjs.map → html-to-markdown-JW4MSQZO-DGAfruBd.cjs.map} +1 -1
  113. package/dist/{html-to-markdown-JW4MSQZO-DnkOWMG8.mjs → html-to-markdown-JW4MSQZO-by02BD7Q.mjs} +3 -3
  114. package/dist/{html-to-markdown-JW4MSQZO-DnkOWMG8.mjs.map → html-to-markdown-JW4MSQZO-by02BD7Q.mjs.map} +1 -1
  115. package/dist/{join-TBRGI3LQ-DHA29wVh.mjs → join-TBRGI3LQ-CmSMyw6i.mjs} +2 -2
  116. package/dist/{join-TBRGI3LQ-DHA29wVh.mjs.map → join-TBRGI3LQ-CmSMyw6i.mjs.map} +1 -1
  117. package/dist/{join-TBRGI3LQ-DUaFtSxr.cjs → join-TBRGI3LQ-CufEGKf6.cjs} +2 -2
  118. package/dist/{join-TBRGI3LQ-DUaFtSxr.cjs.map → join-TBRGI3LQ-CufEGKf6.cjs.map} +1 -1
  119. package/dist/{jq-4XLYLOS5-C29W5FMo.cjs → jq-4XLYLOS5-C8EQwN1K.cjs} +4 -4
  120. package/dist/{jq-4XLYLOS5-C29W5FMo.cjs.map → jq-4XLYLOS5-C8EQwN1K.cjs.map} +1 -1
  121. package/dist/{jq-4XLYLOS5-BVQKVm0c.mjs → jq-4XLYLOS5-Dyc13Vb6.mjs} +4 -4
  122. package/dist/{jq-4XLYLOS5-BVQKVm0c.mjs.map → jq-4XLYLOS5-Dyc13Vb6.mjs.map} +1 -1
  123. package/dist/{js-exec-N5KEZBH7-BbIoWgLR.mjs → js-exec-N5KEZBH7-BDtZgI8f.mjs} +3 -3
  124. package/dist/{js-exec-N5KEZBH7-BbIoWgLR.mjs.map → js-exec-N5KEZBH7-BDtZgI8f.mjs.map} +1 -1
  125. package/dist/{js-exec-N5KEZBH7-BmSE9ztR.cjs → js-exec-N5KEZBH7-Diy2DVOG.cjs} +3 -3
  126. package/dist/{js-exec-N5KEZBH7-BmSE9ztR.cjs.map → js-exec-N5KEZBH7-Diy2DVOG.cjs.map} +1 -1
  127. package/dist/{lib-nVAFKdSp.cjs → lib-CNP8Shhx.cjs} +2 -2
  128. package/dist/{lib-nVAFKdSp.cjs.map → lib-CNP8Shhx.cjs.map} +1 -1
  129. package/dist/{lib-C22bEZM6.mjs → lib-YvC_vm6Y.mjs} +2 -2
  130. package/dist/{lib-C22bEZM6.mjs.map → lib-YvC_vm6Y.mjs.map} +1 -1
  131. package/dist/{ln-4LGSXXGD-C8Mdjveb.mjs → ln-4LGSXXGD-D5ncx1J7.mjs} +2 -2
  132. package/dist/{ln-4LGSXXGD-C8Mdjveb.mjs.map → ln-4LGSXXGD-D5ncx1J7.mjs.map} +1 -1
  133. package/dist/{ln-4LGSXXGD-BProL0TV.cjs → ln-4LGSXXGD-nCYXYWKJ.cjs} +2 -2
  134. package/dist/{ln-4LGSXXGD-BProL0TV.cjs.map → ln-4LGSXXGD-nCYXYWKJ.cjs.map} +1 -1
  135. package/dist/{ls-ZJGQER7M-fUkQkBGe.cjs → ls-ZJGQER7M-BeYqpGx-.cjs} +2 -2
  136. package/dist/{ls-ZJGQER7M-fUkQkBGe.cjs.map → ls-ZJGQER7M-BeYqpGx-.cjs.map} +1 -1
  137. package/dist/{ls-ZJGQER7M-DW1vvcUL.mjs → ls-ZJGQER7M-Cjjk8eV9.mjs} +2 -2
  138. package/dist/{ls-ZJGQER7M-DW1vvcUL.mjs.map → ls-ZJGQER7M-Cjjk8eV9.mjs.map} +1 -1
  139. package/dist/{lzma-CsI99b_k.cjs → lzma-CeknM05K.cjs} +2 -2
  140. package/dist/{lzma-CsI99b_k.cjs.map → lzma-CeknM05K.cjs.map} +1 -1
  141. package/dist/{md5sum-SPU24VSG-WfUjCv8L.mjs → md5sum-SPU24VSG-BiY0UdQk.mjs} +3 -3
  142. package/dist/{md5sum-SPU24VSG-WfUjCv8L.mjs.map → md5sum-SPU24VSG-BiY0UdQk.mjs.map} +1 -1
  143. package/dist/{md5sum-SPU24VSG-DWQPQw6i.cjs → md5sum-SPU24VSG-DPRIdfRl.cjs} +3 -3
  144. package/dist/{md5sum-SPU24VSG-DWQPQw6i.cjs.map → md5sum-SPU24VSG-DPRIdfRl.cjs.map} +1 -1
  145. package/dist/{mkdir-MEPGZOB6--wukzfqP.cjs → mkdir-MEPGZOB6-b8hnQ6GY.cjs} +2 -2
  146. package/dist/{mkdir-MEPGZOB6--wukzfqP.cjs.map → mkdir-MEPGZOB6-b8hnQ6GY.cjs.map} +1 -1
  147. package/dist/{mkdir-MEPGZOB6-CDNMO0k9.mjs → mkdir-MEPGZOB6-qUqflukS.mjs} +2 -2
  148. package/dist/{mkdir-MEPGZOB6-CDNMO0k9.mjs.map → mkdir-MEPGZOB6-qUqflukS.mjs.map} +1 -1
  149. package/dist/{mv-W5BIQ646-BdxR-5Ir.cjs → mv-W5BIQ646-vgCWJQCN.cjs} +2 -2
  150. package/dist/{mv-W5BIQ646-BdxR-5Ir.cjs.map → mv-W5BIQ646-vgCWJQCN.cjs.map} +1 -1
  151. package/dist/{mv-W5BIQ646-C5kcjiOK.mjs → mv-W5BIQ646-y-OJ56vr.mjs} +2 -2
  152. package/dist/{mv-W5BIQ646-C5kcjiOK.mjs.map → mv-W5BIQ646-y-OJ56vr.mjs.map} +1 -1
  153. package/dist/{nl-WSDW7I4O-stbVfW5z.mjs → nl-WSDW7I4O-CWv7O8ex.mjs} +2 -2
  154. package/dist/{nl-WSDW7I4O-stbVfW5z.mjs.map → nl-WSDW7I4O-CWv7O8ex.mjs.map} +1 -1
  155. package/dist/{nl-WSDW7I4O-CZOgiao8.cjs → nl-WSDW7I4O-n9gNLuPT.cjs} +2 -2
  156. package/dist/{nl-WSDW7I4O-CZOgiao8.cjs.map → nl-WSDW7I4O-n9gNLuPT.cjs.map} +1 -1
  157. package/dist/{od-WOKFDJTP-CrMHaLvq.cjs → od-WOKFDJTP-DmLVwADO.cjs} +2 -2
  158. package/dist/{od-WOKFDJTP-CrMHaLvq.cjs.map → od-WOKFDJTP-DmLVwADO.cjs.map} +1 -1
  159. package/dist/{od-WOKFDJTP-ReRujAD2.mjs → od-WOKFDJTP-xSJ5wyQT.mjs} +2 -2
  160. package/dist/{od-WOKFDJTP-ReRujAD2.mjs.map → od-WOKFDJTP-xSJ5wyQT.mjs.map} +1 -1
  161. package/dist/{paste-7JC6S4DX-BAY7CM8X.mjs → paste-7JC6S4DX-CmMFcRKR.mjs} +2 -2
  162. package/dist/{paste-7JC6S4DX-BAY7CM8X.mjs.map → paste-7JC6S4DX-CmMFcRKR.mjs.map} +1 -1
  163. package/dist/{paste-7JC6S4DX-ByRq_qnf.cjs → paste-7JC6S4DX-t6yRwHmL.cjs} +2 -2
  164. package/dist/{paste-7JC6S4DX-ByRq_qnf.cjs.map → paste-7JC6S4DX-t6yRwHmL.cjs.map} +1 -1
  165. package/dist/{printf-TWGXF445-yWUCyquU.cjs → printf-TWGXF445-DViUiMFB.cjs} +3 -3
  166. package/dist/{printf-TWGXF445-yWUCyquU.cjs.map → printf-TWGXF445-DViUiMFB.cjs.map} +1 -1
  167. package/dist/{printf-TWGXF445-konGkbgo.mjs → printf-TWGXF445-DrewvoEC.mjs} +3 -3
  168. package/dist/{printf-TWGXF445-konGkbgo.mjs.map → printf-TWGXF445-DrewvoEC.mjs.map} +1 -1
  169. package/dist/{python3-POMOR4OA-Pposzt-w.mjs → python3-POMOR4OA-CjpuRJh9.mjs} +3 -3
  170. package/dist/{python3-POMOR4OA-Pposzt-w.mjs.map → python3-POMOR4OA-CjpuRJh9.mjs.map} +1 -1
  171. package/dist/{python3-POMOR4OA-I-r1WUHk.cjs → python3-POMOR4OA-O22coFv5.cjs} +3 -3
  172. package/dist/{python3-POMOR4OA-I-r1WUHk.cjs.map → python3-POMOR4OA-O22coFv5.cjs.map} +1 -1
  173. package/dist/{rev-5EHFX4EJ-ClNs6JXt.mjs → rev-5EHFX4EJ-B46_y4NL.mjs} +2 -2
  174. package/dist/{rev-5EHFX4EJ-ClNs6JXt.mjs.map → rev-5EHFX4EJ-B46_y4NL.mjs.map} +1 -1
  175. package/dist/{rev-5EHFX4EJ-CjjgNNfe.cjs → rev-5EHFX4EJ-C8CDHpQU.cjs} +2 -2
  176. package/dist/{rev-5EHFX4EJ-CjjgNNfe.cjs.map → rev-5EHFX4EJ-C8CDHpQU.cjs.map} +1 -1
  177. package/dist/{rg-S4FXYXWB-CSzcnYXI.cjs → rg-S4FXYXWB-BkjYXUQF.cjs} +3 -3
  178. package/dist/{rg-S4FXYXWB-CSzcnYXI.cjs.map → rg-S4FXYXWB-BkjYXUQF.cjs.map} +1 -1
  179. package/dist/{rg-S4FXYXWB-DfFZrnCJ.mjs → rg-S4FXYXWB-BtL4wF_M.mjs} +3 -3
  180. package/dist/{rg-S4FXYXWB-DfFZrnCJ.mjs.map → rg-S4FXYXWB-BtL4wF_M.mjs.map} +1 -1
  181. package/dist/{rm-SSGETQVQ-DAoF95Jg.cjs → rm-SSGETQVQ-CyiuIXfk.cjs} +2 -2
  182. package/dist/{rm-SSGETQVQ-DAoF95Jg.cjs.map → rm-SSGETQVQ-CyiuIXfk.cjs.map} +1 -1
  183. package/dist/{rm-SSGETQVQ-CLQsJpG7.mjs → rm-SSGETQVQ-D591-qJq.mjs} +2 -2
  184. package/dist/{rm-SSGETQVQ-CLQsJpG7.mjs.map → rm-SSGETQVQ-D591-qJq.mjs.map} +1 -1
  185. package/dist/{rmdir-OC4ZLPYA-BbaAsO8x.cjs → rmdir-OC4ZLPYA-C8voFEF8.cjs} +2 -2
  186. package/dist/{rmdir-OC4ZLPYA-BbaAsO8x.cjs.map → rmdir-OC4ZLPYA-C8voFEF8.cjs.map} +1 -1
  187. package/dist/{rmdir-OC4ZLPYA-BDTJ-e67.mjs → rmdir-OC4ZLPYA-Ci0lYco9.mjs} +2 -2
  188. package/dist/{rmdir-OC4ZLPYA-BDTJ-e67.mjs.map → rmdir-OC4ZLPYA-Ci0lYco9.mjs.map} +1 -1
  189. package/dist/run.cjs +1 -1
  190. package/dist/run.mjs +1 -1
  191. package/dist/{sed-S5UIK574-BOqJhJva.mjs → sed-S5UIK574-CzUclA0a.mjs} +2 -2
  192. package/dist/{sed-S5UIK574-BOqJhJva.mjs.map → sed-S5UIK574-CzUclA0a.mjs.map} +1 -1
  193. package/dist/{sed-S5UIK574-DQM3UgvN.cjs → sed-S5UIK574-HxKXsumV.cjs} +2 -2
  194. package/dist/{sed-S5UIK574-DQM3UgvN.cjs.map → sed-S5UIK574-HxKXsumV.cjs.map} +1 -1
  195. package/dist/{sha1sum-2PTOAFR6-oDTBocu9.mjs → sha1sum-2PTOAFR6-E_E2fAsi.mjs} +3 -3
  196. package/dist/{sha1sum-2PTOAFR6-oDTBocu9.mjs.map → sha1sum-2PTOAFR6-E_E2fAsi.mjs.map} +1 -1
  197. package/dist/{sha1sum-2PTOAFR6-B9_nOI-J.cjs → sha1sum-2PTOAFR6-NA8Tghvn.cjs} +3 -3
  198. package/dist/{sha1sum-2PTOAFR6-B9_nOI-J.cjs.map → sha1sum-2PTOAFR6-NA8Tghvn.cjs.map} +1 -1
  199. package/dist/{sha256sum-NS7D3IXX-D_iZCH03.mjs → sha256sum-NS7D3IXX-0USDmW6Z.mjs} +3 -3
  200. package/dist/{sha256sum-NS7D3IXX-D_iZCH03.mjs.map → sha256sum-NS7D3IXX-0USDmW6Z.mjs.map} +1 -1
  201. package/dist/{sha256sum-NS7D3IXX-DyQpigFK.cjs → sha256sum-NS7D3IXX-CWySwd0O.cjs} +3 -3
  202. package/dist/{sha256sum-NS7D3IXX-DyQpigFK.cjs.map → sha256sum-NS7D3IXX-CWySwd0O.cjs.map} +1 -1
  203. package/dist/{sleep-X22JJINO-B_NrK3C2.cjs → sleep-X22JJINO-B344eZbp.cjs} +2 -2
  204. package/dist/{sleep-X22JJINO-B_NrK3C2.cjs.map → sleep-X22JJINO-B344eZbp.cjs.map} +1 -1
  205. package/dist/{sleep-X22JJINO-TVFqgX4w.mjs → sleep-X22JJINO-JRGhJB2e.mjs} +2 -2
  206. package/dist/{sleep-X22JJINO-TVFqgX4w.mjs.map → sleep-X22JJINO-JRGhJB2e.mjs.map} +1 -1
  207. package/dist/{sort-SW2YEO5B-CrFr0sQF.cjs → sort-SW2YEO5B-CJOZ83lo.cjs} +3 -3
  208. package/dist/{sort-SW2YEO5B-CrFr0sQF.cjs.map → sort-SW2YEO5B-CJOZ83lo.cjs.map} +1 -1
  209. package/dist/{sort-SW2YEO5B-DAyu5AbN.mjs → sort-SW2YEO5B-dj3ytb_m.mjs} +3 -3
  210. package/dist/{sort-SW2YEO5B-DAyu5AbN.mjs.map → sort-SW2YEO5B-dj3ytb_m.mjs.map} +1 -1
  211. package/dist/{split-4KKZZXXE-CzrBb6WT.mjs → split-4KKZZXXE-CUoGVKr9.mjs} +2 -2
  212. package/dist/{split-4KKZZXXE-CzrBb6WT.mjs.map → split-4KKZZXXE-CUoGVKr9.mjs.map} +1 -1
  213. package/dist/{split-4KKZZXXE-DarCb2o0.cjs → split-4KKZZXXE-yQVX-TPC.cjs} +2 -2
  214. package/dist/{split-4KKZZXXE-DarCb2o0.cjs.map → split-4KKZZXXE-yQVX-TPC.cjs.map} +1 -1
  215. package/dist/{sqlite3-CGOEFJAO-YO9fYYe4.cjs → sqlite3-CGOEFJAO-DfjUYhqZ.cjs} +3 -3
  216. package/dist/{sqlite3-CGOEFJAO-YO9fYYe4.cjs.map → sqlite3-CGOEFJAO-DfjUYhqZ.cjs.map} +1 -1
  217. package/dist/{sqlite3-CGOEFJAO-CaVmTdKP.mjs → sqlite3-CGOEFJAO-DptIE0fJ.mjs} +3 -3
  218. package/dist/{sqlite3-CGOEFJAO-CaVmTdKP.mjs.map → sqlite3-CGOEFJAO-DptIE0fJ.mjs.map} +1 -1
  219. package/dist/{start-BKdrlg8i.cjs → start-BAZvxoNu.cjs} +82 -77
  220. package/dist/{start-BKdrlg8i.cjs.map → start-BAZvxoNu.cjs.map} +1 -1
  221. package/dist/{start-Brpm-khC.mjs → start-DWUoHFKG.mjs} +82 -77
  222. package/dist/{start-Brpm-khC.mjs.map → start-DWUoHFKG.mjs.map} +1 -1
  223. package/dist/start.cjs +1 -1
  224. package/dist/start.mjs +1 -1
  225. package/dist/{strings-6WDHLGMX-COnNhiTX.mjs → strings-6WDHLGMX-Cwo-mr2M.mjs} +2 -2
  226. package/dist/{strings-6WDHLGMX-COnNhiTX.mjs.map → strings-6WDHLGMX-Cwo-mr2M.mjs.map} +1 -1
  227. package/dist/{strings-6WDHLGMX-C-7LwaSX.cjs → strings-6WDHLGMX-DyWKwCzL.cjs} +2 -2
  228. package/dist/{strings-6WDHLGMX-C-7LwaSX.cjs.map → strings-6WDHLGMX-DyWKwCzL.cjs.map} +1 -1
  229. package/dist/{tac-2STMMJYW-DEfjonKk.mjs → tac-2STMMJYW-B9zjoEj2.mjs} +2 -2
  230. package/dist/{tac-2STMMJYW-DEfjonKk.mjs.map → tac-2STMMJYW-B9zjoEj2.mjs.map} +1 -1
  231. package/dist/{tac-2STMMJYW-CoEuFnI6.cjs → tac-2STMMJYW-D6qgPy0P.cjs} +2 -2
  232. package/dist/{tac-2STMMJYW-CoEuFnI6.cjs.map → tac-2STMMJYW-D6qgPy0P.cjs.map} +1 -1
  233. package/dist/{tail-R4PCA2C4-bs4qER3V.mjs → tail-R4PCA2C4-BrmpCJWE.mjs} +2 -2
  234. package/dist/{tail-R4PCA2C4-bs4qER3V.mjs.map → tail-R4PCA2C4-BrmpCJWE.mjs.map} +1 -1
  235. package/dist/{tail-R4PCA2C4-DDj68hq0.cjs → tail-R4PCA2C4-CGIMdVwe.cjs} +2 -2
  236. package/dist/{tail-R4PCA2C4-DDj68hq0.cjs.map → tail-R4PCA2C4-CGIMdVwe.cjs.map} +1 -1
  237. package/dist/{tar-STHHZTZ6-CgpUhhjF.cjs → tar-STHHZTZ6-ChPbIONr.cjs} +5 -5
  238. package/dist/{tar-STHHZTZ6-CgpUhhjF.cjs.map → tar-STHHZTZ6-ChPbIONr.cjs.map} +1 -1
  239. package/dist/{tar-STHHZTZ6-D03o_Cz0.mjs → tar-STHHZTZ6-UjGvZ8gT.mjs} +4 -4
  240. package/dist/{tar-STHHZTZ6-D03o_Cz0.mjs.map → tar-STHHZTZ6-UjGvZ8gT.mjs.map} +1 -1
  241. package/dist/{tee-YUZ2FKCJ-BLvbouaR.mjs → tee-YUZ2FKCJ-LBfxnVu6.mjs} +2 -2
  242. package/dist/{tee-YUZ2FKCJ-BLvbouaR.mjs.map → tee-YUZ2FKCJ-LBfxnVu6.mjs.map} +1 -1
  243. package/dist/{tee-YUZ2FKCJ-Dl4KemtS.cjs → tee-YUZ2FKCJ-wMpUdnxh.cjs} +2 -2
  244. package/dist/{tee-YUZ2FKCJ-Dl4KemtS.cjs.map → tee-YUZ2FKCJ-wMpUdnxh.cjs.map} +1 -1
  245. package/dist/{time-D4LNBSWX-BNuPla3y.cjs → time-D4LNBSWX-ByR0GiDT.cjs} +2 -2
  246. package/dist/{time-D4LNBSWX-BNuPla3y.cjs.map → time-D4LNBSWX-ByR0GiDT.cjs.map} +1 -1
  247. package/dist/{time-D4LNBSWX-BBWvBAJq.mjs → time-D4LNBSWX-DOGrtT3_.mjs} +2 -2
  248. package/dist/{time-D4LNBSWX-BBWvBAJq.mjs.map → time-D4LNBSWX-DOGrtT3_.mjs.map} +1 -1
  249. package/dist/{timeout-YDCRSLPQ-Bh29kGCm.cjs → timeout-YDCRSLPQ-4elCe48H.cjs} +2 -2
  250. package/dist/{timeout-YDCRSLPQ-Bh29kGCm.cjs.map → timeout-YDCRSLPQ-4elCe48H.cjs.map} +1 -1
  251. package/dist/{timeout-YDCRSLPQ-C8zBoKt9.mjs → timeout-YDCRSLPQ-UNY1LV7U.mjs} +2 -2
  252. package/dist/{timeout-YDCRSLPQ-C8zBoKt9.mjs.map → timeout-YDCRSLPQ-UNY1LV7U.mjs.map} +1 -1
  253. package/dist/{touch-UA33VN3N-BalO641S.mjs → touch-UA33VN3N-B2XacKru.mjs} +2 -2
  254. package/dist/{touch-UA33VN3N-BalO641S.mjs.map → touch-UA33VN3N-B2XacKru.mjs.map} +1 -1
  255. package/dist/{touch-UA33VN3N-BZXGiQNW.cjs → touch-UA33VN3N-qhZTjG52.cjs} +2 -2
  256. package/dist/{touch-UA33VN3N-BZXGiQNW.cjs.map → touch-UA33VN3N-qhZTjG52.cjs.map} +1 -1
  257. package/dist/{tr-36LHWFRQ-b8w4qgGk.mjs → tr-36LHWFRQ-BpSW8Asp.mjs} +2 -2
  258. package/dist/{tr-36LHWFRQ-b8w4qgGk.mjs.map → tr-36LHWFRQ-BpSW8Asp.mjs.map} +1 -1
  259. package/dist/{tr-36LHWFRQ-NODCa5wF.cjs → tr-36LHWFRQ-DzUXpz7U.cjs} +2 -2
  260. package/dist/{tr-36LHWFRQ-NODCa5wF.cjs.map → tr-36LHWFRQ-DzUXpz7U.cjs.map} +1 -1
  261. package/dist/{tree-YLD52CNT-DQl2yXOR.mjs → tree-YLD52CNT-CW6ySPWf.mjs} +2 -2
  262. package/dist/{tree-YLD52CNT-DQl2yXOR.mjs.map → tree-YLD52CNT-CW6ySPWf.mjs.map} +1 -1
  263. package/dist/{tree-YLD52CNT-DOKdZmrV.cjs → tree-YLD52CNT-MA_WGRF9.cjs} +2 -2
  264. package/dist/{tree-YLD52CNT-DOKdZmrV.cjs.map → tree-YLD52CNT-MA_WGRF9.cjs.map} +1 -1
  265. package/dist/{unexpand-CADSA4VO-IQPW5nJ2.cjs → unexpand-CADSA4VO-DPwPUB0m.cjs} +2 -2
  266. package/dist/{unexpand-CADSA4VO-IQPW5nJ2.cjs.map → unexpand-CADSA4VO-DPwPUB0m.cjs.map} +1 -1
  267. package/dist/{unexpand-CADSA4VO-DRlWAmXg.mjs → unexpand-CADSA4VO-EeoCA-RC.mjs} +2 -2
  268. package/dist/{unexpand-CADSA4VO-DRlWAmXg.mjs.map → unexpand-CADSA4VO-EeoCA-RC.mjs.map} +1 -1
  269. package/dist/{uniq-XSIZR6PB-CIm8eDKg.cjs → uniq-XSIZR6PB-BdZQYK6h.cjs} +3 -3
  270. package/dist/{uniq-XSIZR6PB-CIm8eDKg.cjs.map → uniq-XSIZR6PB-BdZQYK6h.cjs.map} +1 -1
  271. package/dist/{uniq-XSIZR6PB-Bpw_uLXK.mjs → uniq-XSIZR6PB-CcPIsxtH.mjs} +3 -3
  272. package/dist/{uniq-XSIZR6PB-Bpw_uLXK.mjs.map → uniq-XSIZR6PB-CcPIsxtH.mjs.map} +1 -1
  273. package/dist/{wc-LF7NU4LA-pG8H4vrA.cjs → wc-LF7NU4LA-CqVWKv9x.cjs} +3 -3
  274. package/dist/{wc-LF7NU4LA-pG8H4vrA.cjs.map → wc-LF7NU4LA-CqVWKv9x.cjs.map} +1 -1
  275. package/dist/{wc-LF7NU4LA-WuhEiSyC.mjs → wc-LF7NU4LA-D8_VdpDD.mjs} +3 -3
  276. package/dist/{wc-LF7NU4LA-WuhEiSyC.mjs.map → wc-LF7NU4LA-D8_VdpDD.mjs.map} +1 -1
  277. package/dist/{xan-Y6WF3IRG-9UxjjWjK.mjs → xan-Y6WF3IRG-CeTswR69.mjs} +6 -6
  278. package/dist/{xan-Y6WF3IRG-9UxjjWjK.mjs.map → xan-Y6WF3IRG-CeTswR69.mjs.map} +1 -1
  279. package/dist/{xan-Y6WF3IRG-Bm2vRXL-.cjs → xan-Y6WF3IRG-hnp0RTzL.cjs} +6 -6
  280. package/dist/{xan-Y6WF3IRG-Bm2vRXL-.cjs.map → xan-Y6WF3IRG-hnp0RTzL.cjs.map} +1 -1
  281. package/dist/{xan-view-HDVKHFC2-WsGWEzGl.cjs → xan-view-HDVKHFC2-BjOt7aSJ.cjs} +3 -3
  282. package/dist/{xan-view-HDVKHFC2-WsGWEzGl.cjs.map → xan-view-HDVKHFC2-BjOt7aSJ.cjs.map} +1 -1
  283. package/dist/{xan-view-HDVKHFC2-0EroMP3R.mjs → xan-view-HDVKHFC2-D-Iksf00.mjs} +3 -3
  284. package/dist/{xan-view-HDVKHFC2-0EroMP3R.mjs.map → xan-view-HDVKHFC2-D-Iksf00.mjs.map} +1 -1
  285. package/dist/{xargs-MGZPH7AX-RH3flpM5.mjs → xargs-MGZPH7AX-BaMiHF0S.mjs} +2 -2
  286. package/dist/{xargs-MGZPH7AX-RH3flpM5.mjs.map → xargs-MGZPH7AX-BaMiHF0S.mjs.map} +1 -1
  287. package/dist/{xargs-MGZPH7AX-BiBOuF8c.cjs → xargs-MGZPH7AX-JPimXtKk.cjs} +2 -2
  288. package/dist/{xargs-MGZPH7AX-BiBOuF8c.cjs.map → xargs-MGZPH7AX-JPimXtKk.cjs.map} +1 -1
  289. package/dist/{yq-4QJW3EQG-DAbWqo_k.cjs → yq-4QJW3EQG-BJ-_cevO.cjs} +3 -3
  290. package/dist/{yq-4QJW3EQG-DAbWqo_k.cjs.map → yq-4QJW3EQG-BJ-_cevO.cjs.map} +1 -1
  291. package/dist/{yq-4QJW3EQG-Dnz7v5qt.mjs → yq-4QJW3EQG-BVwhhJTp.mjs} +3 -3
  292. package/dist/{yq-4QJW3EQG-Dnz7v5qt.mjs.map → yq-4QJW3EQG-BVwhhJTp.mjs.map} +1 -1
  293. package/package.json +1 -1
  294. package/dist/dist-Ccqkv6G-.mjs.map +0 -1
  295. package/dist/dist-ChqR_h8h.cjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"dist-Ccqkv6G-.mjs","names":["sleep","zodSchema","z","crypto","z","fs","fs","path","path","process","zodSchema","plans.assertMigration","plans.setVersion","plans.locked","plans.DEFAULT_SCHEMA","plans.create","migrationStore.migrate","migrationStore.rollback","migrationStore.getAll","plans.getVersion","plans.versionTableExists","plans.CREATE_RACE_MESSAGE","plans.MIGRATE_RACE_MESSAGE","migrationStore.next","#handleCallback","#values","#wildcard","#isWildcardValue","#hasLastChar","#hasQuestionMarkChar","#date","#dstStart","#dstEnd","#isLeapYear","#verbMap","#getUTC","exports","#second","#minute","#hour","#month","#dayOfWeek","#dayOfMonth","#handleSingleRange","#handleMultipleRanges","#options","#tz","#startDate","#endDate","#currentDate","#fields","#matchSchedule","#dstTransitionDayKey","#isDstTransitionDay","#getMinOrMax","#isLastWeekdayOfMonthMatch","#findSchedule","#matchDayOfMonth","#checkDstTransition","#validateTimeSpan","#matchHour","#moveToNextMinute","#moveToNextSecond","#getRawFields","#parseField","#parseNthDay","#parseWildcard","#parseHashed","#parseSequence","#isValidConstraintChar","#parseRepeat","#parseRange","#validateRange","#validateRepeatInterval","#createRange","#parseContent","#parseEntry","exports","plans.insertWarning","WARNINGS","WARNING_TYPES","EventEmitter","plans.getTime","plans.trySetCronTime","CronExpressionParser","plans.getSchedules","plans.getSchedulesByQueue","plans.schedule","plans.unschedule","#jobResults","#pendingPromises","#cloneJob","#registerPromise","#getJobResultKey","timekeeper.QUEUES","events","EventEmitter","#spies","#localGroupActive","#localGroupConfig","#localGroupMaxLimit","#getLocalGroupLimit","#incrementLocalGroupCount","#decrementLocalGroupCount","#processJobs","#trackJobsCompleted","#trackJobsFailed","Attorney.checkWorkArgs","#storeLocalGroupConfig","#getGroupsAtLocalCapacity","#trackJobsActive","#trackLocalGroupStart","#trackLocalGroupEnd","#cleanupLocalGroupTracking","plans.subscribe","plans.unsubscribe","plans.getQueuesForEvent","Attorney.checkSendArgs","plans.insertJobs","plans.fetchNextJob","stringify","plans.completeJobs","plans.failJobsById","plans.deleteJobsById","plans.cancelJobs","plans.resumeJobs","plans.restoreJobs","plans.retryJobs","plans.touchJobs","plans.QUEUE_POLICIES","plans.createQueue","plans.getBlockedKeys","plans.getQueues","plans.updateQueue","plans.deleteQueue","plans.deleteQueuedJobs","plans.deleteStoredJobs","plans.truncateTable","plans.deleteAllJobs","plans.getQueueStats","plans.getJobById","plans.findJobs","events","EventEmitter","#db","#config","#manager","#stopped","#stopping","#maintaining","#superviseInterval","#onSupervise","#warningContext","#executeQuery","#maintainWarnings","plans.deleteOldWarnings","#monitor","#maintain","plans.trySetQueueMonitorTime","plans.cacheQueueStats","plans.failJobsByTimeout","plans.failJobsByHeartbeat","plans.trySetQueueDeletionTime","plans.deletion","events","EventEmitter","#db","#config","#stopped","#working","#onPoll","#pollInterval","plans.trySetBamTime","#processCommands","#getNextCommand","#markCompleted","#markFailed","plans.getNextBamCommand","plans.setBamCompleted","plans.setBamFailed","EventEmitter","EventEmitter","#stoppingOn","#stopped","Attorney.getConfig","#config","#db","#promoteEvents","#boss","#contractor","#manager","#timekeeper","#bam","#starting","#started","plans.getBamStatus","plans.getBamEntries","DbDefault","createPgCancelChannel"],"sources":["../../../packages/hosting/dist/index.mjs","../../../packages/scheduler/dist/contract-E1QJBH6_.mjs","../../../node_modules/.pnpm/cron-schedule@6.0.0/node_modules/cron-schedule/dist/utils.js","../../../node_modules/.pnpm/cron-schedule@6.0.0/node_modules/cron-schedule/dist/cron.js","../../../node_modules/.pnpm/cron-schedule@6.0.0/node_modules/cron-schedule/dist/cron-parser.js","../../../packages/shared/dist/index.mjs","../../../packages/action/dist/index.mjs","../../../packages/tracing/dist/index.mjs","../../../packages/secrets/dist/index.mjs","../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js","../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js","../../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json","../../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js","../../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js","../../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json","../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js","../../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/formats.js","../../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/limit.js","../../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/index.js","../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js","../../../node_modules/.pnpm/pkce-challenge@5.0.1/node_modules/pkce-challenge/dist/index.node.js","../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js","../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js","../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js","../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js","../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js","../../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js","../../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js","../../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js","../../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js","../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js","../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js","../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js","../../../packages/workflow/dist/index.mjs","../../../packages/trigger/dist/index.mjs","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/plans.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/attorney.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/migrationStore.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/package.json","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/contractor.js","../../../node_modules/.pnpm/non-error@0.1.0/node_modules/non-error/index.js","../../../node_modules/.pnpm/serialize-error@13.0.1/node_modules/serialize-error/error-constructors.js","../../../node_modules/.pnpm/serialize-error@13.0.1/node_modules/serialize-error/index.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/fields/types.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/fields/CronField.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/fields/CronDayOfMonth.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/fields/CronDayOfWeek.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/fields/CronHour.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/fields/CronMinute.js","../../../node_modules/.pnpm/luxon@3.7.2/node_modules/luxon/build/node/luxon.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/CronDate.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/fields/CronMonth.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/fields/CronSecond.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/fields/index.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/CronFieldCollection.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/CronExpression.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/utils/random.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/CronExpressionParser.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/CronFileParser.js","../../../node_modules/.pnpm/cron-parser@5.5.0/node_modules/cron-parser/dist/index.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/tools.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/warning.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/timekeeper.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/worker.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/spy.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/manager.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/boss.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/bam.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/db.js","../../../node_modules/.pnpm/pg-boss@12.18.2/node_modules/pg-boss/dist/index.js","../../../packages/scheduler/dist/index.mjs","../../../packages/storage/dist/index.mjs"],"sourcesContent":["import Docker from \"dockerode\";\nimport { mkdir } from \"node:fs/promises\";\n//#region src/constants.ts\nconst PROJECT_SERVER_IMAGE = \"keystroke/project-server:local\";\nconst PROJECT_SERVER_PORT = 3e3;\nconst PROJECT_SERVER_ROOT = \"/app\";\nconst PROJECT_SERVER_FRAMEWORK_ROOT = \"/opt/keystroke\";\nconst PROJECT_SERVER_FRAMEWORK_NODE_MODULES = `${PROJECT_SERVER_FRAMEWORK_ROOT}/node_modules`;\nconst PROJECT_SERVER_HEALTH = {\n\tpath: \"/health\",\n\tport: PROJECT_SERVER_PORT\n};\n//#endregion\n//#region src/runtime.ts\n/** Builds base64 `KEYSTROKE_ORG_ARTIFACTS` payload for org worker containers. */\nfunction encodeOrgArtifacts(artifacts) {\n\treturn Buffer.from(JSON.stringify(artifacts)).toString(\"base64\");\n}\nfunction parseOrgArtifactsFromEnv(env = process.env) {\n\tconst raw = env.KEYSTROKE_ORG_ARTIFACTS?.trim();\n\tif (!raw) return;\n\tconst parsed = JSON.parse(Buffer.from(raw, \"base64\").toString(\"utf8\"));\n\tif (!Array.isArray(parsed)) throw new Error(\"KEYSTROKE_ORG_ARTIFACTS must decode to a JSON array\");\n\treturn parsed.map((entry) => {\n\t\tif (!entry || typeof entry !== \"object\" || typeof entry.projectId !== \"string\" || typeof entry.artifactStorageKey !== \"string\") throw new Error(\"KEYSTROKE_ORG_ARTIFACTS entries require projectId and artifactStorageKey\");\n\t\treturn entry;\n\t});\n}\n//#endregion\n//#region src/runtime-env.ts\nconst RUNTIME_ENV_KEYS = [\n\t\"BETTER_AUTH_SECRET\",\n\t\"PUBLIC_SERVER_URL\",\n\t\"PUBLIC_WEB_URL\",\n\t\"POSTGRES_SSL\",\n\t\"UPSTASH_REDIS_URL\",\n\t\"REDIS_URL\",\n\t\"KEYSTROKE_QUEUE_PREFIX\"\n];\n/** Provider and gateway env forwarded from the platform into project servers. */\nconst PROVIDER_ENV_KEYS = [\n\t\"ANTHROPIC_API_KEY\",\n\t\"OPENAI_API_KEY\",\n\t\"AI_GATEWAY_API_KEY\",\n\t\"AI_GATEWAY_BASE_URL\"\n];\n/** Shared dev token when `PLATFORM_WORKER_TOKEN` is unset (non-production only). */\nconst DEV_PLATFORM_WORKER_TOKEN = \"dev-platform-worker-token\";\nconst PROJECT_DATABASE_ENV_KEYS = [\n\t\"POSTGRES_HOST\",\n\t\"POSTGRES_PORT\",\n\t\"POSTGRES_DB\",\n\t\"POSTGRES_USER\",\n\t\"POSTGRES_PASSWORD\",\n\t\"DATABASE_SEARCH_PATH\"\n];\n/** Per-project postgres env injected into every project server container/machine. */\nfunction projectDatabaseRuntimeEnv(database) {\n\treturn {\n\t\tPOSTGRES_HOST: rewriteLoopbackHost(database.host),\n\t\tPOSTGRES_PORT: String(database.port),\n\t\tPOSTGRES_DB: database.database,\n\t\tPOSTGRES_USER: database.user,\n\t\tPOSTGRES_PASSWORD: database.password,\n\t\tDATABASE_SEARCH_PATH: database.searchPath\n\t};\n}\n/**\n* Builds the launch spec for an org worker. Each deploy artifact is encoded in\n* `KEYSTROKE_ORG_ARTIFACTS` — there is no base image, so at least one artifact is required.\n*/\nfunction resolveRuntimeLaunch(options, artifacts, database, extraEnv) {\n\tif (artifacts.length === 0) throw new Error(\"Cannot start an org worker without at least one artifact\");\n\tconst env = options.env ?? process.env;\n\treturn {\n\t\timage: resolveProjectServerImage(env, options.image),\n\t\tenv: buildRuntimeEnv(env, artifacts, database, extraEnv),\n\t\tport: PROJECT_SERVER_PORT,\n\t\thealth: PROJECT_SERVER_HEALTH\n\t};\n}\n/** Env vars passed into the org worker container/machine. */\nfunction buildRuntimeEnv(source, artifacts, database, extraEnv) {\n\tconst entries = new Map([\n\t\t[\"PORT\", String(PROJECT_SERVER_PORT)],\n\t\t[\"KEYSTROKE_ROOT\", PROJECT_SERVER_ROOT],\n\t\t[\"KEYSTROKE_RUNTIME_NODE_MODULES\", PROJECT_SERVER_FRAMEWORK_NODE_MODULES],\n\t\t[\"KEYSTROKE_ORG_ARTIFACTS\", encodeOrgArtifacts(artifacts)],\n\t\t[\"ORGANIZATION_ID\", database.organizationId],\n\t\t[\"TENANT_ID\", database.organizationId]\n\t]);\n\tfor (const key of RUNTIME_ENV_KEYS) {\n\t\tconst value = source[key]?.trim();\n\t\tif (!value) {\n\t\t\tif (key === \"POSTGRES_SSL\") throw new Error(\"POSTGRES_SSL is required\");\n\t\t\tcontinue;\n\t\t}\n\t\tentries.set(key, value);\n\t}\n\tif (!extraEnv) for (const key of PROVIDER_ENV_KEYS) {\n\t\tconst value = source[key]?.trim();\n\t\tif (value) entries.set(key, value);\n\t}\n\tconst worker = resolveWorkerRuntimeConfig(source);\n\tentries.set(\"PLATFORM_URL\", worker.platformUrl);\n\tentries.set(\"WORKER_INTERNAL_TOKEN\", worker.workerToken);\n\tfor (const [key, value] of Object.entries(projectDatabaseRuntimeEnv(database))) entries.set(key, value);\n\tif (extraEnv) for (const [key, value] of Object.entries(extraEnv)) entries.set(key, value);\n\treturn Object.fromEntries(entries);\n}\nfunction resolvePlatformWorkerToken(source = process.env) {\n\tconst explicit = source.PLATFORM_WORKER_TOKEN?.trim() ?? source.WORKER_INTERNAL_TOKEN?.trim();\n\tif (explicit) return explicit;\n\tif (source.NODE_ENV === \"production\") return;\n\treturn DEV_PLATFORM_WORKER_TOKEN;\n}\n/** Platform API URL reachable from a project-server container. */\nconst DEV_PLATFORM_URL = \"http://localhost:3002\";\nfunction resolveWorkerPlatformUrl(source = process.env) {\n\tconst raw = source.PLATFORM_URL?.trim() ?? source.PUBLIC_PLATFORM_URL?.trim() ?? (source.NODE_ENV === \"production\" ? void 0 : DEV_PLATFORM_URL);\n\tif (!raw) return;\n\treturn rewriteLoopbackUrl(raw);\n}\n/** Rewrite loopback hosts so containers can reach Postgres and other host services. */\nfunction rewriteLoopbackHost(host) {\n\tif (host === \"localhost\" || host === \"127.0.0.1\") return \"host.docker.internal\";\n\treturn host;\n}\nfunction rewriteLoopbackUrl(url) {\n\ttry {\n\t\tconst parsed = new URL(url);\n\t\tparsed.hostname = rewriteLoopbackHost(parsed.hostname);\n\t\treturn parsed.toString().replace(/\\/$/, \"\");\n\t} catch {\n\t\treturn url;\n\t}\n}\n/** dockerode expects `KEY=value` strings. */\nfunction formatDockerEnv(env) {\n\treturn Object.entries(env).map(([key, value]) => `${key}=${value}`);\n}\nfunction resolveProjectServerImage(env = process.env, override) {\n\treturn override ?? env.PROJECT_DOCKER_IMAGE ?? env.TENANT_DOCKER_IMAGE ?? \"keystroke/project-server:local\";\n}\n//#endregion\n//#region src/worker-runtime-config.ts\nvar WorkerRuntimeConfigError = class extends Error {\n\tmissing;\n\tconstructor(missing) {\n\t\tsuper(`Worker runtime config incomplete (missing: ${missing.join(\", \")}). In production set PLATFORM_WORKER_TOKEN and PUBLIC_PLATFORM_URL (or PLATFORM_URL).`);\n\t\tthis.name = \"WorkerRuntimeConfigError\";\n\t\tthis.missing = missing;\n\t}\n};\n/** Fail fast when the platform cannot start worker-mode project servers. */\nfunction resolveWorkerRuntimeConfig(source = process.env) {\n\tconst platformUrl = resolveWorkerPlatformUrl(source);\n\tconst workerToken = resolvePlatformWorkerToken(source);\n\tconst missing = [];\n\tif (!platformUrl) missing.push(\"PUBLIC_PLATFORM_URL or PLATFORM_URL\");\n\tif (!workerToken) missing.push(\"PLATFORM_WORKER_TOKEN\");\n\tif (missing.length > 0) throw new WorkerRuntimeConfigError(missing);\n\treturn {\n\t\tplatformUrl,\n\t\tworkerToken\n\t};\n}\n//#endregion\n//#region src/wait-for-health.ts\nconst DEFAULT_TIMEOUT_MS = 12e4;\nconst DEFAULT_INTERVAL_MS = 500;\nasync function waitForHealth(baseUrl, options = {}) {\n\tconst fetchImpl = options.fetchImpl ?? fetch;\n\tconst timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;\n\tconst intervalMs = options.intervalMs ?? DEFAULT_INTERVAL_MS;\n\tconst deadline = Date.now() + timeoutMs;\n\tconst url = new URL(PROJECT_SERVER_HEALTH.path, baseUrl);\n\twhile (Date.now() < deadline) {\n\t\ttry {\n\t\t\tif ((await fetchImpl(url, { signal: AbortSignal.timeout(2e3) })).ok) return;\n\t\t} catch {}\n\t\tawait sleep(intervalMs);\n\t}\n\tthrow new Error(`Project server health check timed out after ${timeoutMs}ms (${url})`);\n}\nfunction sleep(ms) {\n\treturn new Promise((resolve) => {\n\t\tsetTimeout(resolve, ms);\n\t});\n}\n//#endregion\n//#region src/docker/create-docker-runtime.ts\nconst MINIO_DOCKER_NETWORK = process.env.MINIO_DOCKER_NETWORK ?? \"keystroke\";\nfunction createDockerRuntime(options = {}) {\n\tconst docker = options.docker ?? new Docker();\n\treturn { async start(input) {\n\t\tif (input.projects.length === 0) throw new Error(\"Docker org runtime requires at least one project deploy\");\n\t\tlet launch = resolveRuntimeLaunch(options, input.projects.map((project) => ({\n\t\t\tprojectId: project.projectId,\n\t\t\tartifactStorageKey: project.artifactStorageKey\n\t\t})), input.database, input.env);\n\t\tif (options.workspacesMount) {\n\t\t\tconst { hostPath, containerPath } = options.workspacesMount;\n\t\t\tawait mkdir(hostPath, { recursive: true });\n\t\t\tlaunch = {\n\t\t\t\t...launch,\n\t\t\t\tenv: {\n\t\t\t\t\t...launch.env,\n\t\t\t\t\tKEYSTROKE_WORKSPACES_ROOT: containerPath\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tawait ensureImage(docker, launch.image);\n\t\tawait removeExistingContainer(docker, input.organizationId);\n\t\tconst container = await docker.createContainer({\n\t\t\tImage: launch.image,\n\t\t\tname: containerName(input.organizationId),\n\t\t\tLabels: {\n\t\t\t\t\"keystroke.organization.id\": input.organizationId,\n\t\t\t\t\"keystroke.project.ids\": input.projects.map((project) => project.projectId).join(\",\")\n\t\t\t},\n\t\t\tExposedPorts: { [`${launch.port}/tcp`]: {} },\n\t\t\tHostConfig: {\n\t\t\t\tExtraHosts: [\"host.docker.internal:host-gateway\"],\n\t\t\t\tPortBindings: { [`${launch.port}/tcp`]: [{ HostPort: \"0\" }] },\n\t\t\t\t...options.workspacesMount ? { Binds: [`${options.workspacesMount.hostPath}:${options.workspacesMount.containerPath}`] } : {}\n\t\t\t},\n\t\t\tNetworkingConfig: { EndpointsConfig: { [MINIO_DOCKER_NETWORK]: {} } },\n\t\t\tEnv: formatDockerEnv(launch.env)\n\t\t});\n\t\tawait container.start();\n\t\tconst inspect = await container.inspect();\n\t\tconst binding = inspect.NetworkSettings.Ports?.[`${launch.port}/tcp`]?.[0];\n\t\tif (!binding?.HostPort) throw new Error(\"Failed to resolve org container host port\");\n\t\tconst baseUrl = `http://127.0.0.1:${binding.HostPort}`;\n\t\tawait waitForHealth(baseUrl, {\n\t\t\tfetchImpl: options.fetchImpl,\n\t\t\ttimeoutMs: options.healthTimeoutMs\n\t\t});\n\t\treturn {\n\t\t\truntimeId: inspect.Id,\n\t\t\tbaseUrl\n\t\t};\n\t} };\n}\nfunction containerName(organizationId) {\n\treturn `keystroke-org-${organizationId}`;\n}\nasync function removeExistingContainer(docker, organizationId) {\n\ttry {\n\t\tconst existing = docker.getContainer(containerName(organizationId));\n\t\tawait existing.stop({ t: 5 }).catch(() => void 0);\n\t\tawait existing.remove({ force: true });\n\t} catch {}\n}\nasync function ensureImage(docker, image) {\n\ttry {\n\t\tawait docker.getImage(image).inspect();\n\t\treturn;\n\t} catch {}\n\tawait new Promise((resolvePromise, reject) => {\n\t\tdocker.pull(image, (error, stream) => {\n\t\t\tif (error) {\n\t\t\t\treject(error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!stream) {\n\t\t\t\treject(/* @__PURE__ */ new Error(`Failed to pull image ${image}`));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdocker.modem.followProgress(stream, (progressError) => {\n\t\t\t\tif (progressError) {\n\t\t\t\t\treject(progressError);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tresolvePromise();\n\t\t\t});\n\t\t});\n\t});\n}\n//#endregion\n//#region src/docker/plugin.ts\nfunction dockerPlugin(options = {}) {\n\tconst env = options.env ?? process.env;\n\treturn {\n\t\tname: \"docker\",\n\t\tworkerRuntime: resolveWorkerRuntimeConfig(env),\n\t\tcreateRuntime: () => createDockerRuntime({\n\t\t\t...options,\n\t\t\tenv\n\t\t})\n\t};\n}\n//#endregion\n//#region src/default-plugin.ts\n/** Local Docker hosting — default for platform and dev. */\nfunction defaultHostingPlugin(options = {}) {\n\treturn dockerPlugin(options);\n}\n//#endregion\n//#region src/runtime-constants.ts\n/** Timeout for a single project runtime `/health` probe. */\nconst RUNTIME_PING_TIMEOUT_MS = 15e3;\n//#endregion\n//#region src/ping-project.ts\nasync function pingProject(baseUrl, options = {}) {\n\tconst timeoutMs = options.timeoutMs ?? 15e3;\n\tconst headers = options.plugin?.pingRequestHeaders?.(options.runtimeId ?? null) ?? {};\n\ttry {\n\t\treturn (await (options.fetchImpl ?? fetch)(new URL(PROJECT_SERVER_HEALTH.path, baseUrl), {\n\t\t\tsignal: AbortSignal.timeout(timeoutMs),\n\t\t\theaders\n\t\t})).ok;\n\t} catch {\n\t\treturn false;\n\t}\n}\n//#endregion\n//#region src/ping-project-target.ts\nfunction canPingProjectTarget(target, plugin) {\n\tif (plugin?.canPingTarget) return plugin.canPingTarget(target);\n\treturn !!target.baseUrl;\n}\nasync function pingProjectTarget(target, options = {}) {\n\tif (!canPingProjectTarget(target, options.plugin)) return false;\n\treturn pingProject(target.baseUrl, {\n\t\t...options,\n\t\truntimeId: target.runtimeId\n\t});\n}\n//#endregion\nexport { DEV_PLATFORM_WORKER_TOKEN, PROJECT_DATABASE_ENV_KEYS, PROJECT_SERVER_FRAMEWORK_NODE_MODULES, PROJECT_SERVER_FRAMEWORK_ROOT, PROJECT_SERVER_HEALTH, PROJECT_SERVER_IMAGE, PROJECT_SERVER_PORT, PROJECT_SERVER_ROOT, RUNTIME_PING_TIMEOUT_MS, WorkerRuntimeConfigError, buildRuntimeEnv, canPingProjectTarget, defaultHostingPlugin, dockerPlugin, encodeOrgArtifacts, formatDockerEnv, parseOrgArtifactsFromEnv, pingProject, pingProjectTarget, projectDatabaseRuntimeEnv, resolvePlatformWorkerToken, resolveProjectServerImage, resolveRuntimeLaunch, resolveWorkerPlatformUrl, resolveWorkerRuntimeConfig, rewriteLoopbackHost, rewriteLoopbackUrl, waitForHealth };\n\n//# sourceMappingURL=index.mjs.map","//#region src/types.ts\nconst DEFAULT_RETRY_DELAY_MS = 5e3;\nfunction retryDelayMs(attempt) {\n\treturn DEFAULT_RETRY_DELAY_MS * 2 ** Math.max(0, attempt - 1);\n}\n//#endregion\n//#region src/contract.ts\nfunction defineSchedulerPlugin(plugin) {\n\treturn plugin;\n}\n//#endregion\nexport { DEFAULT_RETRY_DELAY_MS as n, retryDelayMs as r, defineSchedulerPlugin as t };\n\n//# sourceMappingURL=contract-E1QJBH6_.mjs.map","export const TIMEOUT_MAX = 2147483647; // 2^31-1\n/**\n * Creates a new timeout, which can exceed the max timeout limit of 2^31-1.\n * Since multiple timeouts are used internally, the timeoutId used to clear the timeout\n * is returned as a handle (object) and changes whenever the max timeout limit is exceeded.\n * The handle parameter can be ignored, it is used internally for updating the timeoutId\n * in the handle after creating the next timeout.\n */\nexport function longTimeout(fn, timeout, previousHandle) {\n let nextTimeout = timeout;\n let remainingTimeout = 0;\n if (nextTimeout > TIMEOUT_MAX) {\n remainingTimeout = nextTimeout - TIMEOUT_MAX;\n nextTimeout = TIMEOUT_MAX;\n }\n const handle = previousHandle !== null && previousHandle !== void 0 ? previousHandle : {\n timeoutId: undefined,\n };\n handle.timeoutId = setTimeout(() => {\n if (remainingTimeout > 0) {\n longTimeout(fn, remainingTimeout, previousHandle);\n }\n else {\n fn();\n }\n }, nextTimeout);\n return handle;\n}\n/* Extracts second, minute, hour, date, month and the weekday from a date. */\nexport function extractDateElements(date) {\n return {\n second: date.getSeconds(),\n minute: date.getMinutes(),\n hour: date.getHours(),\n day: date.getDate(),\n month: date.getMonth(),\n weekday: date.getDay(),\n year: date.getFullYear(),\n };\n}\n/* Gets the amount of days in the given month (indexed by 0) of the given year. */\nexport function getDaysInMonth(year, month) {\n return new Date(year, month + 1, 0).getDate();\n}\n/* Gets the amount of days from weekday1 to weekday2. */\nexport function getDaysBetweenWeekdays(weekday1, weekday2) {\n if (weekday1 <= weekday2) {\n return weekday2 - weekday1;\n }\n return 6 - weekday1 + weekday2 + 1;\n}\nexport function wrapFunction(fn, errorHandler) {\n return () => {\n try {\n const res = fn();\n if (res instanceof Promise) {\n res.catch((err) => {\n if (errorHandler) {\n errorHandler(err);\n }\n });\n }\n }\n catch (err) {\n if (errorHandler) {\n errorHandler(err);\n }\n }\n };\n}\n//# sourceMappingURL=utils.js.map","import { extractDateElements, getDaysBetweenWeekdays, getDaysInMonth, } from './utils.js';\nexport class Cron {\n constructor({ seconds, minutes, hours, days, months, weekdays, }) {\n // Validate that there are values provided.\n if (!seconds || seconds.size === 0)\n throw new Error('There must be at least one allowed second.');\n if (!minutes || minutes.size === 0)\n throw new Error('There must be at least one allowed minute.');\n if (!hours || hours.size === 0)\n throw new Error('There must be at least one allowed hour.');\n if (!months || months.size === 0)\n throw new Error('There must be at least one allowed month.');\n if ((!weekdays || weekdays.size === 0) && (!days || days.size === 0))\n throw new Error('There must be at least one allowed day or weekday.');\n // Convert set to array and sort in ascending order.\n this.seconds = Array.from(seconds).sort((a, b) => a - b);\n this.minutes = Array.from(minutes).sort((a, b) => a - b);\n this.hours = Array.from(hours).sort((a, b) => a - b);\n this.days = Array.from(days).sort((a, b) => a - b);\n this.months = Array.from(months).sort((a, b) => a - b);\n this.weekdays = Array.from(weekdays).sort((a, b) => a - b);\n // Validate that all values are integers within the constraint.\n const validateData = (name, data, constraint) => {\n if (data.some((x) => typeof x !== 'number' ||\n x % 1 !== 0 ||\n x < constraint.min ||\n x > constraint.max)) {\n throw new Error(`${name} must only consist of integers which are within the range of ${constraint.min} and ${constraint.max}`);\n }\n };\n validateData('seconds', this.seconds, { min: 0, max: 59 });\n validateData('minutes', this.minutes, { min: 0, max: 59 });\n validateData('hours', this.hours, { min: 0, max: 23 });\n validateData('days', this.days, { min: 1, max: 31 });\n validateData('months', this.months, { min: 0, max: 11 });\n validateData('weekdays', this.weekdays, { min: 0, max: 6 });\n // For each element, store a reversed copy in the reversed attribute for finding prev dates.\n this.reversed = {\n seconds: this.seconds.map((x) => x).reverse(),\n minutes: this.minutes.map((x) => x).reverse(),\n hours: this.hours.map((x) => x).reverse(),\n days: this.days.map((x) => x).reverse(),\n months: this.months.map((x) => x).reverse(),\n weekdays: this.weekdays.map((x) => x).reverse(),\n };\n }\n /**\n * Find the next or previous hour, starting from the given start hour that matches the hour constraint.\n * startHour itself might also be allowed.\n */\n findAllowedHour(dir, startHour) {\n return dir === 'next'\n ? this.hours.find((x) => x >= startHour)\n : this.reversed.hours.find((x) => x <= startHour);\n }\n /**\n * Find the next or previous minute, starting from the given start minute that matches the minute constraint.\n * startMinute itself might also be allowed.\n */\n findAllowedMinute(dir, startMinute) {\n return dir === 'next'\n ? this.minutes.find((x) => x >= startMinute)\n : this.reversed.minutes.find((x) => x <= startMinute);\n }\n /**\n * Find the next or previous second, starting from the given start second that matches the second constraint.\n * startSecond itself IS NOT allowed.\n */\n findAllowedSecond(dir, startSecond) {\n return dir === 'next'\n ? this.seconds.find((x) => x > startSecond)\n : this.reversed.seconds.find((x) => x < startSecond);\n }\n /**\n * Find the next or previous time, starting from the given start time that matches the hour, minute\n * and second constraints. startTime itself might also be allowed.\n */\n findAllowedTime(dir, startTime) {\n // Try to find an allowed hour.\n let hour = this.findAllowedHour(dir, startTime.hour);\n if (hour !== undefined) {\n if (hour === startTime.hour) {\n // We found an hour that is the start hour. Try to find an allowed minute.\n let minute = this.findAllowedMinute(dir, startTime.minute);\n if (minute !== undefined) {\n if (minute === startTime.minute) {\n // We found a minute that is the start minute. Try to find an allowed second.\n const second = this.findAllowedSecond(dir, startTime.second);\n if (second !== undefined) {\n // We found a second within the start hour and minute.\n return { hour, minute, second };\n }\n // We did not find a valid second within the start minute. Try to find another minute.\n minute = this.findAllowedMinute(dir, dir === 'next' ? startTime.minute + 1 : startTime.minute - 1);\n if (minute !== undefined) {\n // We found a minute which is not the start minute. Return that minute together with the hour and the first / last allowed second.\n return {\n hour,\n minute,\n second: dir === 'next' ? this.seconds[0] : this.reversed.seconds[0],\n };\n }\n }\n else {\n // We found a minute which is not the start minute. Return that minute together with the hour and the first / last allowed second.\n return {\n hour,\n minute,\n second: dir === 'next' ? this.seconds[0] : this.reversed.seconds[0],\n };\n }\n }\n // We did not find an allowed minute / second combination inside the start hour. Try to find the next / previous allowed hour.\n hour = this.findAllowedHour(dir, dir === 'next' ? startTime.hour + 1 : startTime.hour - 1);\n if (hour !== undefined) {\n // We found an allowed hour which is not the start hour. Return that hour together with the first / last allowed minutes / seconds.\n return {\n hour,\n minute: dir === 'next' ? this.minutes[0] : this.reversed.minutes[0],\n second: dir === 'next' ? this.seconds[0] : this.reversed.seconds[0],\n };\n }\n }\n else {\n // We found an allowed hour which is not the start hour. Return that hour together with the first / last allowed minutes / seconds.\n return {\n hour,\n minute: dir === 'next' ? this.minutes[0] : this.reversed.minutes[0],\n second: dir === 'next' ? this.seconds[0] : this.reversed.seconds[0],\n };\n }\n }\n // No allowed time found.\n return undefined;\n }\n /**\n * Find the next or previous day in the given month, starting from the given startDay\n * that matches either the day or the weekday constraint. startDay itself might also be allowed.\n */\n findAllowedDayInMonth(dir, year, month, startDay) {\n var _a, _b;\n if (startDay < 1)\n throw new Error('startDay must not be smaller than 1.');\n // If only days are restricted: allow day based on day constraint only.\n // If only weekdays are restricted: allow day based on weekday constraint only.\n // If both are restricted: allow day based on both day and weekday constraint. pick day that is closer to startDay.\n // If none are restricted: return the day closest to startDay (respecting dir) that is allowed (or startDay itself).\n const daysInMonth = getDaysInMonth(year, month);\n const daysRestricted = this.days.length !== 31;\n const weekdaysRestricted = this.weekdays.length !== 7;\n if (!daysRestricted && !weekdaysRestricted) {\n if (startDay > daysInMonth) {\n return dir === 'next' ? undefined : daysInMonth;\n }\n return startDay;\n }\n // Try to find a day based on the days constraint.\n let allowedDayByDays;\n if (daysRestricted) {\n allowedDayByDays =\n dir === 'next'\n ? this.days.find((x) => x >= startDay)\n : this.reversed.days.find((x) => x <= startDay);\n // Make sure the day does not exceed the amount of days in month.\n if (allowedDayByDays !== undefined && allowedDayByDays > daysInMonth) {\n allowedDayByDays = undefined;\n }\n }\n // Try to find a day based on the weekday constraint.\n let allowedDayByWeekdays;\n if (weekdaysRestricted) {\n const startWeekday = new Date(year, month, startDay).getDay();\n const nearestAllowedWeekday = dir === 'next'\n ? ((_a = this.weekdays.find((x) => x >= startWeekday)) !== null && _a !== void 0 ? _a : this.weekdays[0])\n : ((_b = this.reversed.weekdays.find((x) => x <= startWeekday)) !== null && _b !== void 0 ? _b : this.reversed.weekdays[0]);\n if (nearestAllowedWeekday !== undefined) {\n const daysBetweenWeekdays = dir === 'next'\n ? getDaysBetweenWeekdays(startWeekday, nearestAllowedWeekday)\n : getDaysBetweenWeekdays(nearestAllowedWeekday, startWeekday);\n allowedDayByWeekdays =\n dir === 'next'\n ? startDay + daysBetweenWeekdays\n : startDay - daysBetweenWeekdays;\n // Make sure the day does not exceed the month boundaries.\n if (allowedDayByWeekdays > daysInMonth || allowedDayByWeekdays < 1) {\n allowedDayByWeekdays = undefined;\n }\n }\n }\n if (allowedDayByDays !== undefined && allowedDayByWeekdays !== undefined) {\n // If a day is found both via the days and the weekdays constraint, pick the day\n // that is closer to start date.\n return dir === 'next'\n ? Math.min(allowedDayByDays, allowedDayByWeekdays)\n : Math.max(allowedDayByDays, allowedDayByWeekdays);\n }\n if (allowedDayByDays !== undefined) {\n return allowedDayByDays;\n }\n if (allowedDayByWeekdays !== undefined) {\n return allowedDayByWeekdays;\n }\n return undefined;\n }\n /** Gets the next date starting from the given start date or now. */\n getNextDate(startDate = new Date()) {\n const startDateElements = extractDateElements(startDate);\n let minYear = startDateElements.year;\n let startIndexMonth = this.months.findIndex((x) => x >= startDateElements.month);\n if (startIndexMonth === -1) {\n startIndexMonth = 0;\n minYear++;\n }\n // We try every month within the next 5 years to make sure that we tried to\n // find a matching date insidde a whole leap year.\n const maxIterations = this.months.length * 5;\n for (let i = 0; i < maxIterations; i++) {\n // Get the next year and month.\n const year = minYear + Math.floor((startIndexMonth + i) / this.months.length);\n const month = this.months[(startIndexMonth + i) % this.months.length];\n const isStartMonth = year === startDateElements.year && month === startDateElements.month;\n // Find the next day.\n let day = this.findAllowedDayInMonth('next', year, month, isStartMonth ? startDateElements.day : 1);\n let isStartDay = isStartMonth && day === startDateElements.day;\n // If we found a day and it is the start day, try to find a valid time beginning from the start date time.\n if (day !== undefined && isStartDay) {\n const nextTime = this.findAllowedTime('next', startDateElements);\n if (nextTime !== undefined) {\n return new Date(year, month, day, nextTime.hour, nextTime.minute, nextTime.second);\n }\n // If no valid time has been found for the start date, try the next day.\n day = this.findAllowedDayInMonth('next', year, month, day + 1);\n isStartDay = false;\n }\n // If we found a next day and it is not the start day, just use the next day with the first allowed values\n // for hours, minutes and seconds.\n if (day !== undefined && !isStartDay) {\n return new Date(year, month, day, this.hours[0], this.minutes[0], this.seconds[0]);\n }\n // No allowed day has been found for this month. Continue to search in next month.\n }\n throw new Error('No valid next date was found.');\n }\n /** Gets the specified amount of future dates starting from the given start date or now. */\n getNextDates(amount, startDate) {\n const dates = [];\n let nextDate;\n for (let i = 0; i < amount; i++) {\n nextDate = this.getNextDate(nextDate !== null && nextDate !== void 0 ? nextDate : startDate);\n dates.push(nextDate);\n }\n return dates;\n }\n /**\n * Get an ES6 compatible iterator which iterates over the next dates starting from startDate or now.\n * The iterator runs until the optional endDate is reached or forever.\n */\n *getNextDatesIterator(startDate, endDate) {\n let nextDate;\n while (true) {\n nextDate = this.getNextDate(nextDate !== null && nextDate !== void 0 ? nextDate : startDate);\n if (endDate && endDate.getTime() < nextDate.getTime()) {\n return;\n }\n yield nextDate;\n }\n }\n /** Gets the previous date starting from the given start date or now. */\n getPrevDate(startDate = new Date()) {\n const startDateElements = extractDateElements(startDate);\n let maxYear = startDateElements.year;\n let startIndexMonth = this.reversed.months.findIndex((x) => x <= startDateElements.month);\n if (startIndexMonth === -1) {\n startIndexMonth = 0;\n maxYear--;\n }\n // We try every month within the past 5 years to make sure that we tried to\n // find a matching date inside a whole leap year.\n const maxIterations = this.reversed.months.length * 5;\n for (let i = 0; i < maxIterations; i++) {\n // Get the next year and month.\n const year = maxYear -\n Math.floor((startIndexMonth + i) / this.reversed.months.length);\n const month = this.reversed.months[(startIndexMonth + i) % this.reversed.months.length];\n const isStartMonth = year === startDateElements.year && month === startDateElements.month;\n // Find the previous day.\n let day = this.findAllowedDayInMonth('prev', year, month, isStartMonth\n ? startDateElements.day\n : // Start searching from the last day of the month.\n getDaysInMonth(year, month));\n let isStartDay = isStartMonth && day === startDateElements.day;\n // If we found a day and it is the start day, try to find a valid time beginning from the start date time.\n if (day !== undefined && isStartDay) {\n const prevTime = this.findAllowedTime('prev', startDateElements);\n if (prevTime !== undefined) {\n return new Date(year, month, day, prevTime.hour, prevTime.minute, prevTime.second);\n }\n // If no valid time has been found for the start date, try the previous day.\n if (day > 1) {\n day = this.findAllowedDayInMonth('prev', year, month, day - 1);\n isStartDay = false;\n }\n }\n // If we found a previous day and it is not the start day, just use the previous day with the first allowed values\n // for hours, minutes and seconds (which will be the latest time due to using the reversed array).\n if (day !== undefined && !isStartDay) {\n return new Date(year, month, day, this.reversed.hours[0], this.reversed.minutes[0], this.reversed.seconds[0]);\n }\n // No allowed day has been found for this month. Continue to search in previous month.\n }\n throw new Error('No valid previous date was found.');\n }\n /** Gets the specified amount of previous dates starting from the given start date or now. */\n getPrevDates(amount, startDate) {\n const dates = [];\n let prevDate;\n for (let i = 0; i < amount; i++) {\n prevDate = this.getPrevDate(prevDate !== null && prevDate !== void 0 ? prevDate : startDate);\n dates.push(prevDate);\n }\n return dates;\n }\n /**\n * Get an ES6 compatible iterator which iterates over the previous dates starting from startDate or now.\n * The iterator runs until the optional endDate is reached or forever.\n */\n *getPrevDatesIterator(startDate, endDate) {\n let prevDate;\n while (true) {\n prevDate = this.getPrevDate(prevDate !== null && prevDate !== void 0 ? prevDate : startDate);\n if (endDate && endDate.getTime() > prevDate.getTime()) {\n return;\n }\n yield prevDate;\n }\n }\n /** Returns true when there is a cron date at the given date. */\n matchDate(date) {\n const { second, minute, hour, day, month, weekday } = extractDateElements(date);\n if (this.seconds.indexOf(second) === -1 ||\n this.minutes.indexOf(minute) === -1 ||\n this.hours.indexOf(hour) === -1 ||\n this.months.indexOf(month) === -1) {\n return false;\n }\n if (this.days.length !== 31 && this.weekdays.length !== 7) {\n return (this.days.indexOf(day) !== -1 || this.weekdays.indexOf(weekday) !== -1);\n }\n return (this.days.indexOf(day) !== -1 && this.weekdays.indexOf(weekday) !== -1);\n }\n}\n//# sourceMappingURL=cron.js.map","import { Cron } from './cron.js';\nconst secondConstraint = {\n min: 0,\n max: 59,\n};\nconst minuteConstraint = {\n min: 0,\n max: 59,\n};\nconst hourConstraint = {\n min: 0,\n max: 23,\n};\nconst dayConstraint = {\n min: 1,\n max: 31,\n};\nconst monthConstraint = {\n min: 1,\n max: 12,\n aliases: {\n jan: '1',\n feb: '2',\n mar: '3',\n apr: '4',\n may: '5',\n jun: '6',\n jul: '7',\n aug: '8',\n sep: '9',\n oct: '10',\n nov: '11',\n dec: '12',\n },\n};\nconst weekdayConstraint = {\n min: 0,\n max: 7,\n aliases: {\n mon: '1',\n tue: '2',\n wed: '3',\n thu: '4',\n fri: '5',\n sat: '6',\n sun: '7',\n },\n};\nconst timeNicknames = {\n '@yearly': '0 0 1 1 *',\n '@annually': '0 0 1 1 *',\n '@monthly': '0 0 1 * *',\n '@weekly': '0 0 * * 0',\n '@daily': '0 0 * * *',\n '@hourly': '0 * * * *',\n '@minutely': '* * * * *',\n};\nfunction parseElement(element, constraint) {\n const result = new Set();\n // If returned set of numbers is empty, the scheduler class interpretes the emtpy set of numbers as all valid values of the constraint\n if (element === '*') {\n for (let i = constraint.min; i <= constraint.max; i = i + 1) {\n result.add(i);\n }\n return result;\n }\n // If the element is a list, parse each element in the list.\n const listElements = element.split(',');\n if (listElements.length > 1) {\n for (const listElement of listElements) {\n const parsedListElement = parseElement(listElement, constraint);\n for (const x of parsedListElement) {\n result.add(x);\n }\n }\n return result;\n }\n // Helper function to parse a single element, which includes checking for alias, valid number and constraint min and max.\n const parseSingleElement = (singleElement) => {\n var _a, _b;\n singleElement =\n (_b = (_a = constraint.aliases) === null || _a === void 0 ? void 0 : _a[singleElement.toLowerCase()]) !== null && _b !== void 0 ? _b : singleElement;\n const parsedElement = Number.parseInt(singleElement, 10);\n if (Number.isNaN(parsedElement)) {\n throw new Error(`Failed to parse ${element}: ${singleElement} is NaN.`);\n }\n if (parsedElement < constraint.min || parsedElement > constraint.max) {\n throw new Error(`Failed to parse ${element}: ${singleElement} is outside of constraint range of ${constraint.min} - ${constraint.max}.`);\n }\n return parsedElement;\n };\n // Detect if the element is a range.\n // Possible range formats: 'start-end', 'start-end/step', '*', '*/step'.\n // Where start and end can be numbers or aliases.\n // Capture groups: 1: start-end, 2: start, 3: end, 4: /step, 5: step.\n const rangeSegments = /^(([0-9a-zA-Z]+)-([0-9a-zA-Z]+)|\\*)(\\/([0-9]+))?$/.exec(element);\n // If not, it must be a single element.\n if (rangeSegments === null) {\n result.add(parseSingleElement(element));\n return result;\n }\n // If it is a range, get start and end of the range.\n let parsedStart = rangeSegments[1] === '*'\n ? constraint.min\n : parseSingleElement(rangeSegments[2]);\n const parsedEnd = rangeSegments[1] === '*'\n ? constraint.max\n : parseSingleElement(rangeSegments[3]);\n // need to catch Sunday, which gets parsed here as 7, but is also legitimate at the start of a range as 0, to avoid the out of order error\n if (constraint === weekdayConstraint &&\n parsedStart === 7 &&\n // this check ensures that sun-sun is not incorrectly parsed as [0,1,2,3,4,5,6]\n parsedEnd !== 7) {\n parsedStart = 0;\n }\n if (parsedStart > parsedEnd) {\n throw new Error(`Failed to parse ${element}: Invalid range (start: ${parsedStart}, end: ${parsedEnd}).`);\n }\n // Check whether there is a custom step defined for the range, defaulting to 1.\n const step = rangeSegments[5];\n let parsedStep = 1;\n if (step !== undefined) {\n parsedStep = Number.parseInt(step, 10);\n if (Number.isNaN(parsedStep)) {\n throw new Error(`Failed to parse step: ${step} is NaN.`);\n }\n if (parsedStep < 1) {\n throw new Error(`Failed to parse step: Expected ${step} to be greater than 0.`);\n }\n }\n // Go from start to end of the range by the given steps.\n for (let i = parsedStart; i <= parsedEnd; i = i + parsedStep) {\n result.add(i);\n }\n return result;\n}\n/** Parses a cron expression into a Cron instance. */\nexport function parseCronExpression(cronExpression) {\n var _a;\n if (typeof cronExpression !== 'string') {\n throw new TypeError('Invalid cron expression: must be of type string.');\n }\n // Convert time nicknames.\n cronExpression = (_a = timeNicknames[cronExpression.toLowerCase()]) !== null && _a !== void 0 ? _a : cronExpression;\n // Split the cron expression into its elements, removing empty elements (extra whitespaces).\n const elements = cronExpression.split(' ').filter((elem) => elem.length > 0);\n if (elements.length < 5 || elements.length > 6) {\n throw new Error('Invalid cron expression: expected 5 or 6 elements.');\n }\n const rawSeconds = elements.length === 6 ? elements[0] : '0';\n const rawMinutes = elements.length === 6 ? elements[1] : elements[0];\n const rawHours = elements.length === 6 ? elements[2] : elements[1];\n const rawDays = elements.length === 6 ? elements[3] : elements[2];\n const rawMonths = elements.length === 6 ? elements[4] : elements[3];\n const rawWeekdays = elements.length === 6 ? elements[5] : elements[4];\n return new Cron({\n seconds: parseElement(rawSeconds, secondConstraint),\n minutes: parseElement(rawMinutes, minuteConstraint),\n hours: parseElement(rawHours, hourConstraint),\n days: parseElement(rawDays, dayConstraint),\n // months in cron are indexed by 1, but Cron expects indexes by 0, so we need to reduce all set values by one.\n months: new Set(Array.from(parseElement(rawMonths, monthConstraint)).map((x) => x - 1)),\n weekdays: new Set(Array.from(parseElement(rawWeekdays, weekdayConstraint)).map((x) => x % 7)),\n });\n}\n//# sourceMappingURL=cron-parser.js.map","import { z } from \"zod\";\n//#region src/constants/conventions.ts\n/** File-layout rules shared by agents, workflows, triggers, and OpenAPI `x-keystroke`. */\nconst DISCOVERY_CONVENTIONS = {\n\tagents: {\n\t\tflat: \"{name}.ts → POST /agents/{name}\",\n\t\tnested: \"{path}/agent.ts or {path}/index.ts → POST /agents/{path}\",\n\t\thelpers: \"Other .ts files under nested folders are not mounted.\"\n\t},\n\tworkflows: {\n\t\tflat: \"{name}.ts → POST /workflows/{name}\",\n\t\tnested: \"{path}/workflow.ts or {path}/index.ts → POST /workflows/{path}\",\n\t\thelpers: \"Other .ts files under nested folders are not mounted.\"\n\t},\n\ttriggers: {\n\t\tflat: \"{name}.ts → trigger key {name}, attachment id {triggerKey}:{workflowKey}\",\n\t\tnested: \"{path}/trigger.ts or {path}/index.ts → trigger key {path}\",\n\t\thelpers: \"Reusable sources live under triggers/sources/ and are not discovered.\"\n\t},\n\topenapi: \"GET /openapi.json lists invoke-route paths derived from the stored registry manifest; x-keystroke.manifest carries the full v2 manifest.\"\n};\n//#endregion\n//#region src/constants/http.ts\nconst ACTIVE_ORG_COOKIE = \"keystroke-active-org-id\";\nconst ACTIVE_ORG_HEADER = \"x-keystroke-org-id\";\n//#endregion\n//#region src/organization-slug.ts\n/** Auth, session, and account-entry URL segments. */\nconst AUTH_ACCOUNT_SLUGS = [\n\t\"2fa\",\n\t\"accept-invite\",\n\t\"auth\",\n\t\"authorize\",\n\t\"callback\",\n\t\"callbacks\",\n\t\"confirm-email\",\n\t\"confirmation\",\n\t\"connect\",\n\t\"device\",\n\t\"email-verification\",\n\t\"forgot-password\",\n\t\"invite\",\n\t\"invites\",\n\t\"login\",\n\t\"logout\",\n\t\"magic-link\",\n\t\"mfa\",\n\t\"oauth\",\n\t\"onboarding\",\n\t\"password\",\n\t\"recovery\",\n\t\"register\",\n\t\"reset-password\",\n\t\"saml\",\n\t\"session\",\n\t\"sessions\",\n\t\"sign-in\",\n\t\"sign-up\",\n\t\"signin\",\n\t\"signout\",\n\t\"signup\",\n\t\"sso\",\n\t\"token\",\n\t\"tokens\",\n\t\"unlink\",\n\t\"verify\",\n\t\"verify-email\"\n];\n/** Org, workspace, billing, and account-management URL segments. */\nconst ORG_ACCOUNT_SLUGS = [\n\t\"account\",\n\t\"accounts\",\n\t\"billing\",\n\t\"console\",\n\t\"invoice\",\n\t\"invoices\",\n\t\"member\",\n\t\"members\",\n\t\"me\",\n\t\"org\",\n\t\"organization\",\n\t\"organizations\",\n\t\"orgs\",\n\t\"payment\",\n\t\"payments\",\n\t\"plan\",\n\t\"plans\",\n\t\"portal\",\n\t\"preferences\",\n\t\"profile\",\n\t\"settings\",\n\t\"subscription\",\n\t\"subscriptions\",\n\t\"team\",\n\t\"teams\",\n\t\"upgrade\",\n\t\"usage\",\n\t\"user\",\n\t\"users\",\n\t\"workspace\",\n\t\"workspaces\"\n];\n/** Product surfaces, resource types, and in-app navigation segments. */\nconst PRODUCT_SLUGS = [\n\t\"action\",\n\t\"actions\",\n\t\"activity\",\n\t\"agent\",\n\t\"agents\",\n\t\"analytics\",\n\t\"app\",\n\t\"apps\",\n\t\"artifact\",\n\t\"artifacts\",\n\t\"assistant\",\n\t\"assistants\",\n\t\"audit\",\n\t\"audit-log\",\n\t\"automation\",\n\t\"automations\",\n\t\"branch\",\n\t\"branches\",\n\t\"canvas\",\n\t\"chat\",\n\t\"chats\",\n\t\"connection\",\n\t\"connections\",\n\t\"create\",\n\t\"credential\",\n\t\"credentials\",\n\t\"dashboard\",\n\t\"deployment\",\n\t\"deployments\",\n\t\"examples\",\n\t\"execute\",\n\t\"execution\",\n\t\"executions\",\n\t\"explore\",\n\t\"get-started\",\n\t\"history\",\n\t\"inbox\",\n\t\"inspector\",\n\t\"integration\",\n\t\"integrations\",\n\t\"library\",\n\t\"logs\",\n\t\"marketplace\",\n\t\"mcp\",\n\t\"mcps\",\n\t\"new\",\n\t\"notifications\",\n\t\"observe\",\n\t\"plugin\",\n\t\"plugins\",\n\t\"primitive\",\n\t\"primitives\",\n\t\"project\",\n\t\"projects\",\n\t\"recents\",\n\t\"registry\",\n\t\"reports\",\n\t\"run\",\n\t\"runs\",\n\t\"runtime\",\n\t\"runtimes\",\n\t\"sandbox\",\n\t\"sandboxes\",\n\t\"search\",\n\t\"skill\",\n\t\"skills\",\n\t\"templates\",\n\t\"thread\",\n\t\"threads\",\n\t\"trigger\",\n\t\"triggers\",\n\t\"version\",\n\t\"versions\",\n\t\"workflow\",\n\t\"workflows\"\n];\n/** Marketing, docs, company, and go-to-market URL segments. */\nconst MARKETING_SITE_SLUGS = [\n\t\"about\",\n\t\"affiliates\",\n\t\"ai\",\n\t\"announcements\",\n\t\"anthropic\",\n\t\"blog\",\n\t\"book-demo\",\n\t\"brand\",\n\t\"campaigns\",\n\t\"career\",\n\t\"careers\",\n\t\"case-studies\",\n\t\"casestudies\",\n\t\"changelog\",\n\t\"chatgpt\",\n\t\"chrome-extension\",\n\t\"claude\",\n\t\"codex\",\n\t\"community\",\n\t\"company\",\n\t\"compare\",\n\t\"contact\",\n\t\"contribute\",\n\t\"creators\",\n\t\"customers\",\n\t\"demo\",\n\t\"demos\",\n\t\"discord\",\n\t\"docs\",\n\t\"documentation\",\n\t\"download\",\n\t\"downloads\",\n\t\"dust\",\n\t\"emerging-talent\",\n\t\"engineering-blog\",\n\t\"enterprise\",\n\t\"events\",\n\t\"experts\",\n\t\"extension\",\n\t\"faq\",\n\t\"faqs\",\n\t\"features\",\n\t\"forum\",\n\t\"glean\",\n\t\"grok\",\n\t\"guide\",\n\t\"guides\",\n\t\"gumloop\",\n\t\"handbook\",\n\t\"help\",\n\t\"help-center\",\n\t\"home\",\n\t\"how-it-works\",\n\t\"howitworks\",\n\t\"inspo\",\n\t\"intern\",\n\t\"investors\",\n\t\"jobs\",\n\t\"legal\",\n\t\"lindy\",\n\t\"llm\",\n\t\"llms\",\n\t\"love\",\n\t\"make\",\n\t\"manifesto\",\n\t\"media\",\n\t\"merch\",\n\t\"mission\",\n\t\"mobile\",\n\t\"models\",\n\t\"n8n\",\n\t\"news\",\n\t\"newsroom\",\n\t\"open\",\n\t\"open-claw\",\n\t\"open-source\",\n\t\"openai\",\n\t\"our-story\",\n\t\"overview\",\n\t\"partners\",\n\t\"pi\",\n\t\"pipedream\",\n\t\"platform\",\n\t\"press\",\n\t\"press-kit\",\n\t\"pricing\",\n\t\"privacy\",\n\t\"product\",\n\t\"products\",\n\t\"provider\",\n\t\"providers\",\n\t\"quick-start\",\n\t\"quickstart\",\n\t\"refer\",\n\t\"relay\",\n\t\"relay-app\",\n\t\"reporting\",\n\t\"request-demo\",\n\t\"resources\",\n\t\"roadmap\",\n\t\"schedule-demo\",\n\t\"security\",\n\t\"solutions\",\n\t\"stack-ai\",\n\t\"stackai\",\n\t\"startup\",\n\t\"startups\",\n\t\"status\",\n\t\"stories\",\n\t\"story\",\n\t\"students\",\n\t\"support\",\n\t\"swag\",\n\t\"switch\",\n\t\"talent\",\n\t\"terms\",\n\t\"testimonials\",\n\t\"thesis\",\n\t\"tines\",\n\t\"trust\",\n\t\"tutorials\",\n\t\"university\",\n\t\"use-case\",\n\t\"use-cases\",\n\t\"usecases\",\n\t\"versus\",\n\t\"vellum\",\n\t\"vs\",\n\t\"webinars\",\n\t\"workato\",\n\t\"xai\",\n\t\"yc\",\n\t\"zapier\"\n];\n/** Integrations, competitors, and partner brand slugs (marketing / integration pages). */\nconst INTEGRATION_BRAND_SLUGS = [\n\t\"airtable\",\n\t\"asana\",\n\t\"aws\",\n\t\"azure\",\n\t\"bun\",\n\t\"confluence\",\n\t\"copilot\",\n\t\"cursor\",\n\t\"databricks\",\n\t\"figma\",\n\t\"firebase\",\n\t\"fly\",\n\t\"gcp\",\n\t\"gemini\",\n\t\"github\",\n\t\"gitlab\",\n\t\"gmail\",\n\t\"heroku\",\n\t\"hubspot\",\n\t\"huggingface\",\n\t\"jira\",\n\t\"linear\",\n\t\"mailchimp\",\n\t\"meta\",\n\t\"mistral\",\n\t\"mixmax\",\n\t\"monday\",\n\t\"netlify\",\n\t\"neon\",\n\t\"notion\",\n\t\"npm\",\n\t\"outlook\",\n\t\"outreach\",\n\t\"perplexity\",\n\t\"planetscale\",\n\t\"pnpm\",\n\t\"postmark\",\n\t\"ramp\",\n\t\"railway\",\n\t\"render\",\n\t\"resend\",\n\t\"salesforce\",\n\t\"segment\",\n\t\"sendgrid\",\n\t\"shopify\",\n\t\"slack\",\n\t\"snowflake\",\n\t\"stripe\",\n\t\"supabase\",\n\t\"terraform\",\n\t\"trello\",\n\t\"turso\",\n\t\"twilio\",\n\t\"typeform\",\n\t\"vercel\",\n\t\"vscode\",\n\t\"windsurf\",\n\t\"yarn\"\n];\n/** Company, team, and department landing-page segments. */\nconst COMPANY_TEAM_SLUGS = [\n\t\"engineers\",\n\t\"engineering\",\n\t\"executives\",\n\t\"hc\",\n\t\"intern\",\n\t\"it\",\n\t\"leadership\",\n\t\"marketing\",\n\t\"ops\",\n\t\"revops\",\n\t\"sales\",\n\t\"services\",\n\t\"tech\"\n];\n/** Legal, trust, compliance, and policy URL segments. */\nconst LEGAL_TRUST_SLUGS = [\n\t\"accessibility\",\n\t\"agreement\",\n\t\"a11y\",\n\t\"bug-bounty\",\n\t\"compliance\",\n\t\"cookie-policy\",\n\t\"cookies\",\n\t\"data-use\",\n\t\"disclose\",\n\t\"dpa\",\n\t\"eula\",\n\t\"gdpr\",\n\t\"hipaa\",\n\t\"iso\",\n\t\"msa\",\n\t\"pci\",\n\t\"responsible-disclosure\",\n\t\"sla\",\n\t\"soc2\",\n\t\"tos\",\n\t\"trust-center\",\n\t\"trustcenter\",\n\t\"vulnerability\"\n];\n/** Developer, API, CLI, and technical URL segments. */\nconst DEVELOPER_TECH_SLUGS = [\n\t\"api\",\n\t\"api-docs\",\n\t\"cli\",\n\t\"code\",\n\t\"config\",\n\t\"developer\",\n\t\"developer-tools\",\n\t\"developers\",\n\t\"dev-tools\",\n\t\"devtools\",\n\t\"dev\",\n\t\"dev-states\",\n\t\"graphql\",\n\t\"graphql-playground\",\n\t\"mcp-server\",\n\t\"mcp-servers\",\n\t\"openapi\",\n\t\"sdk\",\n\t\"swagger\"\n];\n/** Infra, ops, static assets, and system URL segments. */\nconst INFRA_SYSTEM_SLUGS = [\n\t\"acme-challenge\",\n\t\"admin\",\n\t\"apple-app-site-association\",\n\t\"assets\",\n\t\"batch\",\n\t\"cache\",\n\t\"cdn\",\n\t\"cron\",\n\t\"debug\",\n\t\"error\",\n\t\"errors\",\n\t\"favicon\",\n\t\"feed\",\n\t\"files\",\n\t\"health\",\n\t\"healthcheck\",\n\t\"healthz\",\n\t\"hooks\",\n\t\"internal\",\n\t\"item\",\n\t\"manifest\",\n\t\"metrics\",\n\t\"null\",\n\t\"ping\",\n\t\"prod\",\n\t\"public\",\n\t\"redirect\",\n\t\"robots\",\n\t\"rpc\",\n\t\"rss\",\n\t\"sharer\",\n\t\"sitemap\",\n\t\"staging\",\n\t\"static\",\n\t\"storage\",\n\t\"test\",\n\t\"undefined\",\n\t\"universal\",\n\t\"webhooks\",\n\t\"well-known\",\n\t\"www\"\n];\n/** Reserved slugs that are valid org names in theory but blocked for routing safety. */\nconst ROUTING_SAFETY_SLUGS = [\n\t\"alpha\",\n\t\"anonymous\",\n\t\"archive\",\n\t\"archived\",\n\t\"beta\",\n\t\"clone\",\n\t\"copy\",\n\t\"default\",\n\t\"deleted\",\n\t\"demo-org\",\n\t\"draft\",\n\t\"drafts\",\n\t\"duplicate\",\n\t\"early-access\",\n\t\"embed\",\n\t\"embedded\",\n\t\"export\",\n\t\"fork\",\n\t\"free\",\n\t\"guest\",\n\t\"import\",\n\t\"index\",\n\t\"list\",\n\t\"manage\",\n\t\"moderator\",\n\t\"newsletter\",\n\t\"owner\",\n\t\"preview\",\n\t\"previews\",\n\t\"private\",\n\t\"pro\",\n\t\"public-api\",\n\t\"publish\",\n\t\"published\",\n\t\"queue\",\n\t\"remove\",\n\t\"root\",\n\t\"sample\",\n\t\"samples\",\n\t\"selection\",\n\t\"share\",\n\t\"shared\",\n\t\"sponsor\",\n\t\"sponsors\",\n\t\"sponsorship\",\n\t\"subscribe\",\n\t\"super\",\n\t\"superuser\",\n\t\"system\",\n\t\"sys\",\n\t\"test-org\",\n\t\"trash\",\n\t\"unpublish\",\n\t\"unsubscribe\",\n\t\"upload\",\n\t\"uploads\",\n\t\"waitlist\",\n\t\"widget\",\n\t\"widgets\",\n\t\"worker\",\n\t\"workers\"\n];\n/**\n* URL segments reserved for global (non-org) routes — cannot be used as an org slug.\n* Prefer adding new entries to the category arrays above; the Set is the enforcement surface.\n*/\nconst RESERVED_ORGANIZATION_SLUGS = new Set([\n\t...AUTH_ACCOUNT_SLUGS,\n\t...ORG_ACCOUNT_SLUGS,\n\t...PRODUCT_SLUGS,\n\t...MARKETING_SITE_SLUGS,\n\t...INTEGRATION_BRAND_SLUGS,\n\t...COMPANY_TEAM_SLUGS,\n\t...LEGAL_TRUST_SLUGS,\n\t...DEVELOPER_TECH_SLUGS,\n\t...INFRA_SYSTEM_SLUGS,\n\t...ROUTING_SAFETY_SLUGS\n]);\n/**\n* Base slug format: lowercase, 2-64 chars, alphanumeric + dashes.\n*\n* IMPORTANT: this is the schema for *reading* slugs (persisted rows, API\n* responses). It intentionally does NOT enforce the reserved-name list — an org\n* created before a name became reserved must still parse on read. Use\n* `ClaimableOrganizationSlugSchema` to validate slugs a user is trying to claim.\n*/\nconst OrganizationSlugSchema = z.string().trim().toLowerCase().min(2, \"Slug must be at least 2 characters\").max(64, \"Slug must be at most 64 characters\").regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, \"Use lowercase letters, numbers, and dashes only\");\n/**\n* Slug validation for *claiming* a slug (organization create/rename). Adds the\n* reserved-name check on top of the base format. Never use this to parse\n* existing org data, or pre-existing orgs whose slug later became reserved would\n* fail to load.\n*/\nconst ClaimableOrganizationSlugSchema = OrganizationSlugSchema.refine((slug) => !RESERVED_ORGANIZATION_SLUGS.has(slug), \"This slug is reserved\");\nconst ORGANIZATION_NAME_APOSTROPHE_PATTERN = /[''\\u2018\\u2019]/g;\n/** Normalize a display name into slug-shaped text (may be empty or too short to claim). */\nfunction normalizeOrganizationNameToSlugBase(name) {\n\treturn name.trim().toLowerCase().replace(ORGANIZATION_NAME_APOSTROPHE_PATTERN, \"\").replace(/[^a-z0-9]+/g, \"-\").replace(/-+/g, \"-\").replace(/^-|-$/g, \"\");\n}\n/**\n* Live slug preview while typing an org name. Returns normalized text only —\n* no server-side `\"org\"` fallback when the preview is empty or under min length.\n*/\nfunction previewOrganizationSlugFromName(name) {\n\treturn normalizeOrganizationNameToSlugBase(name);\n}\n/** Derive a URL slug from a display name (not guaranteed unique). */\nfunction slugifyOrganizationName(name) {\n\tconst base = normalizeOrganizationNameToSlugBase(name);\n\tif (!base) return \"org\";\n\tconst parsed = OrganizationSlugSchema.safeParse(base);\n\treturn parsed.success ? parsed.data : \"org\";\n}\nfunction parseOrganizationSlug(input) {\n\treturn OrganizationSlugSchema.parse(input);\n}\n//#endregion\n//#region src/project-slug.ts\n/** Same format as organization slugs — org-scoped, no global reserved list. */\nconst ProjectSlugSchema = OrganizationSlugSchema;\n/** Derive a URL slug from a project display name (not guaranteed unique within the org). */\nfunction slugifyProjectName(name) {\n\tconst base = normalizeOrganizationNameToSlugBase(name);\n\tif (!base) return \"project\";\n\tconst parsed = ProjectSlugSchema.safeParse(base);\n\treturn parsed.success ? parsed.data : \"project\";\n}\nfunction parseProjectSlug(input) {\n\treturn ProjectSlugSchema.parse(input);\n}\n//#endregion\n//#region src/schemas/organizations.ts\n/** Canonical copy for slug collision errors (API + UI). */\nconst ORGANIZATION_SLUG_TAKEN_MESSAGE = \"That slug is already taken.\";\nconst PROJECT_SLUG_TAKEN_MESSAGE = \"That slug is already taken.\";\nconst OrganizationSlugErrorCodeSchema = z.enum([\n\t\"slug_taken\",\n\t\"slug_reserved\",\n\t\"slug_invalid\"\n]);\nconst SlugAvailabilityReasonSchema = z.enum([\n\t\"taken\",\n\t\"reserved\",\n\t\"invalid\"\n]);\nconst SlugAvailabilityResponseSchema = z.object({\n\tslug: z.string(),\n\tavailable: z.boolean(),\n\treason: SlugAvailabilityReasonSchema.optional(),\n\tsuggestion: OrganizationSlugSchema.optional()\n});\nconst SlugAvailabilityQuerySchema = z.object({\n\tslug: z.string().trim().min(1),\n\texcludeOrganizationId: z.string().min(1).optional()\n});\nconst ProjectSlugAvailabilityReasonSchema = z.enum([\"taken\", \"invalid\"]);\nconst ProjectSlugAvailabilityResponseSchema = z.object({\n\tslug: z.string(),\n\tavailable: z.boolean(),\n\treason: ProjectSlugAvailabilityReasonSchema.optional(),\n\tsuggestion: ProjectSlugSchema.optional()\n});\nconst ProjectSlugAvailabilityQuerySchema = z.object({\n\tslug: z.string().trim().min(1),\n\texcludeProjectId: z.string().min(1).optional()\n});\n/** Client-side instant validation before hitting the project slug availability endpoint. */\nfunction validateProjectSlug(slug) {\n\tconst normalized = slug.trim().toLowerCase();\n\tif (!normalized) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: \"Slug is required\"\n\t};\n\tconst parsed = ProjectSlugSchema.safeParse(normalized);\n\tif (!parsed.success) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: parsed.error.issues[0]?.message ?? \"Invalid slug\"\n\t};\n\treturn { valid: true };\n}\n/** Client-side instant validation before hitting the availability endpoint. */\nfunction validateClaimableOrganizationSlug(slug) {\n\tconst normalized = slug.trim().toLowerCase();\n\tif (!normalized) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: \"Slug is required\"\n\t};\n\tconst format = OrganizationSlugSchema.safeParse(normalized);\n\tif (!format.success) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: format.error.issues[0]?.message ?? \"Invalid slug\"\n\t};\n\tif (RESERVED_ORGANIZATION_SLUGS.has(format.data)) return {\n\t\tvalid: false,\n\t\treason: \"reserved\",\n\t\tmessage: \"This slug is reserved\"\n\t};\n\treturn { valid: true };\n}\nfunction organizationSlugErrorCodeFromMessage(message) {\n\tif (message === \"That slug is already taken.\" || /already taken/i.test(message)) return \"slug_taken\";\n\tif (/reserved/i.test(message)) return \"slug_reserved\";\n\treturn \"slug_invalid\";\n}\nconst ProjectStatusSchema = z.enum([\n\t\"inactive\",\n\t\"starting\",\n\t\"active\",\n\t\"failed\"\n]);\nconst OrganizationUserRoleSchema = z.enum([\n\t\"owner\",\n\t\"admin\",\n\t\"builder\"\n]);\nconst isoDateTime$5 = z.string().datetime();\nconst OrganizationSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tslug: OrganizationSlugSchema,\n\tverified: z.boolean(),\n\tcreatedAt: isoDateTime$5,\n\tupdatedAt: isoDateTime$5\n});\nconst ProjectSchema = z.object({\n\tid: z.string(),\n\torganizationId: z.string(),\n\tname: z.string(),\n\tslug: ProjectSlugSchema,\n\tdescription: z.string().nullable(),\n\tstatus: ProjectStatusSchema,\n\tbaseUrl: z.string().nullable(),\n\truntimeId: z.string().nullable(),\n\tlastError: z.string().nullable(),\n\tcreatedAt: isoDateTime$5,\n\tupdatedAt: isoDateTime$5\n});\nconst UserOrganizationSchema = z.object({\n\torganization: OrganizationSchema,\n\trole: OrganizationUserRoleSchema\n});\nconst CurrentOrganizationResponseSchema = UserOrganizationSchema.nullable();\nconst ActiveOrganizationResponseSchema = CurrentOrganizationResponseSchema;\nconst ListOrganizationsResponseSchema = z.array(UserOrganizationSchema);\nconst CreateOrganizationRequestSchema = z.object({\n\tname: z.string().trim().min(1),\n\t/** Format-only at the wire boundary; reserved-name checks run in platform-database. */\n\tslug: OrganizationSlugSchema.optional()\n});\nconst UpdateOrganizationRequestSchema = z.object({\n\tname: z.string().trim().min(1).optional(),\n\tslug: ClaimableOrganizationSlugSchema.optional()\n}).refine((data) => data.name !== void 0 || data.slug !== void 0, { message: \"At least one field is required\" });\nconst CreateOrganizationResponseSchema = UserOrganizationSchema;\nconst ListProjectsResponseSchema = z.array(ProjectSchema);\nconst ProjectListMetricsSchema = z.object({\n\tagentCount: z.number(),\n\tworkflowCount: z.number(),\n\tskillCount: z.number(),\n\tcredentialCount: z.number(),\n\tlastDeploymentAt: isoDateTime$5.nullable()\n});\nconst ListProjectMetricsResponseSchema = z.record(z.string(), ProjectListMetricsSchema);\nconst CreateProjectRequestSchema = z.object({\n\tname: z.string().trim().min(1),\n\tdescription: z.string().trim().min(1).optional()\n});\nconst UpdateProjectRequestSchema = z.object({\n\tname: z.string().trim().min(1).optional(),\n\tdescription: z.string().trim().optional(),\n\tslug: ProjectSlugSchema.optional()\n}).refine((data) => data.name !== void 0 || data.description !== void 0 || data.slug !== void 0, { message: \"At least one field is required\" });\nconst CreateProjectResponseSchema = ProjectSchema;\nconst ProjectResponseSchema = ProjectSchema;\nconst ProjectReachabilityResponseSchema = z.object({ reachable: z.boolean() });\nfunction parseCreateOrganizationRequest(input) {\n\treturn CreateOrganizationRequestSchema.parse(input);\n}\n//#endregion\n//#region src/app-slug.ts\n/** Org-custom app slug segment (the part after `{orgSlug}/`). Same format as project slugs. */\nconst AppSlugSchema = ProjectSlugSchema;\nconst APP_SLUG_TAKEN_MESSAGE = PROJECT_SLUG_TAKEN_MESSAGE;\n/** Derive a slug segment from a display name (not guaranteed unique). */\nfunction slugifyAppName(name) {\n\treturn slugifyProjectName(name);\n}\nconst validateAppSlug = validateProjectSlug;\n//#endregion\n//#region src/constants/projects.ts\n/** Platform wait for project /health before declaring unreachable. */\nconst PROJECT_PING_TIMEOUT_MS = 15e3;\n/** Browser→platform request budget (ping + small platform overhead). */\nconst PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS = 17e3;\n/** Pause between reachability checks after the previous check finishes. */\nconst PROJECT_REACHABILITY_RETRY_MS = 5e3;\n//#endregion\n//#region src/public-url.ts\n/** Normalize a public origin URL (no trailing slash). */\nfunction originFromPublicUrl(value, fallback) {\n\tconst trimmed = value?.trim();\n\tif (!trimmed) return fallback.replace(/\\/+$/, \"\");\n\treturn trimmed.replace(/\\/+$/, \"\");\n}\n/** TCP port to bind for a local server, derived from a public URL. */\nfunction listenPortFromUrl(url, fallback) {\n\tconst parsed = new URL(url);\n\tif (parsed.port) {\n\t\tconst port = Number(parsed.port);\n\t\tif (Number.isFinite(port) && port > 0) return port;\n\t}\n\tif (parsed.protocol === \"https:\") return 443;\n\tif (parsed.protocol === \"http:\") return 80;\n\treturn fallback;\n}\n/** Shorthand: listen port from `PUBLIC_*_URL` or fallback. */\nfunction listenPortFromPublicUrl(value, fallback) {\n\tconst trimmed = value?.trim();\n\tif (!trimmed) return fallback;\n\ttry {\n\t\treturn listenPortFromUrl(trimmed, fallback);\n\t} catch {\n\t\treturn fallback;\n\t}\n}\n//#endregion\n//#region src/tool-parameters.ts\n/** JSON Schema draft 2020-12 for LLM tool inputs (not OpenAPI 3.0). */\nfunction toolParameters(schema) {\n\treturn z.toJSONSchema(schema, { target: \"draft-2020-12\" });\n}\n//#endregion\n//#region src/constants/route-manifest.ts\n/** On-disk path under the project root (packed in deploy artifacts when present). */\nconst ROUTE_MANIFEST_REL_PATH = \"dist/.keystroke/route-manifest.json\";\n//#endregion\n//#region src/schemas/route-manifest.ts\nconst StoredRouteManifestSkillSchema = z.object({\n\tslug: z.string(),\n\tname: z.string().optional(),\n\tdescription: z.string().optional(),\n\tmoduleFile: z.string()\n});\nconst attachmentSchemasSchema = z.record(z.string(), z.object({\n\trequestSchema: z.record(z.string(), z.unknown()),\n\tfilterSchema: z.record(z.string(), z.unknown()).optional()\n}));\nconst storedRouteManifestEntryV2Schema = z.discriminatedUnion(\"kind\", [\n\tz.object({ kind: z.literal(\"health\") }),\n\tz.object({\n\t\tkind: z.literal(\"agent\"),\n\t\tslug: z.string(),\n\t\tmoduleFile: z.string(),\n\t\tname: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tmodel: z.string(),\n\t\tsystemPrompt: z.string(),\n\t\ttoolCount: z.number().int().nonnegative(),\n\t\tcredentialCount: z.number().int().nonnegative(),\n\t\tcredentialKeys: z.array(z.string()).default([])\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"workflow\"),\n\t\tslug: z.string(),\n\t\tname: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tsubscribable: z.boolean(),\n\t\tmoduleFile: z.string(),\n\t\trequestSchema: z.record(z.string(), z.unknown())\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-webhook\"),\n\t\tendpoint: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tattachmentSchemas: attachmentSchemasSchema\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-poll\"),\n\t\tattachmentId: z.string(),\n\t\tmoduleFile: z.string(),\n\t\tschedule: z.string()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-poll-group\"),\n\t\tpollId: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tschedule: z.string()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"cron-schedule\"),\n\t\tattachmentId: z.string(),\n\t\tmoduleFile: z.string(),\n\t\tschedule: z.string()\n\t})\n]);\nconst storedRouteManifestV2Schema = z.object({\n\tversion: z.literal(2),\n\tentries: z.array(storedRouteManifestEntryV2Schema),\n\tskills: z.array(StoredRouteManifestSkillSchema).default([]),\n\tintegrations: z.array(z.string()).optional()\n});\nconst StoredRouteManifestSchema = storedRouteManifestV2Schema;\nconst DERIVED_ENTRY_KINDS = new Set([\n\t\"agent-sessions-list\",\n\t\"agent-session-detail\",\n\t\"workflow-runs-list\",\n\t\"workflow-run-detail\",\n\t\"trigger-runs-list\",\n\t\"trigger-run-detail\"\n]);\nfunction webhookEndpointFromPath(path) {\n\treturn path.replace(/^\\/triggers\\//, \"\").replace(/^\\/+|\\/+$/g, \"\");\n}\n/** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */\nfunction normalizeEntryToV2(entry) {\n\tconst kind = entry.kind;\n\tif (typeof kind !== \"string\") return null;\n\tif (DERIVED_ENTRY_KINDS.has(kind) || kind === \"plugin\") return null;\n\tif (kind === \"health\") return { kind: \"health\" };\n\tif (kind === \"agent\") {\n\t\tconst slug = typeof entry.slug === \"string\" ? entry.slug : typeof entry.agentSlug === \"string\" ? entry.agentSlug : void 0;\n\t\tif (!slug || typeof entry.moduleFile !== \"string\") return null;\n\t\treturn {\n\t\t\tkind: \"agent\",\n\t\t\tslug,\n\t\t\tmoduleFile: entry.moduleFile,\n\t\t\t...typeof entry.name === \"string\" ? { name: entry.name } : {},\n\t\t\t...typeof entry.description === \"string\" ? { description: entry.description } : {},\n\t\t\tmodel: typeof entry.model === \"string\" ? entry.model : \"\",\n\t\t\tsystemPrompt: typeof entry.systemPrompt === \"string\" ? entry.systemPrompt : \"\",\n\t\t\ttoolCount: typeof entry.toolCount === \"number\" ? entry.toolCount : 0,\n\t\t\tcredentialCount: typeof entry.credentialCount === \"number\" ? entry.credentialCount : 0,\n\t\t\tcredentialKeys: Array.isArray(entry.credentialKeys) ? entry.credentialKeys : []\n\t\t};\n\t}\n\tif (kind === \"workflow\") {\n\t\tconst slug = typeof entry.slug === \"string\" ? entry.slug : typeof entry.workflowSlug === \"string\" ? entry.workflowSlug : void 0;\n\t\tif (!slug || typeof entry.moduleFile !== \"string\") return null;\n\t\tconst name = typeof entry.name === \"string\" ? entry.name : typeof entry.workflowName === \"string\" ? entry.workflowName : void 0;\n\t\treturn {\n\t\t\tkind: \"workflow\",\n\t\t\tslug,\n\t\t\tmoduleFile: entry.moduleFile,\n\t\t\t...name ? { name } : {},\n\t\t\t...typeof entry.description === \"string\" ? { description: entry.description } : {},\n\t\t\tsubscribable: entry.subscribable === true,\n\t\t\trequestSchema: entry.requestSchema && typeof entry.requestSchema === \"object\" ? entry.requestSchema : {}\n\t\t};\n\t}\n\tif (kind === \"trigger-webhook\") {\n\t\tif (typeof entry.moduleFile !== \"string\" || !Array.isArray(entry.attachmentIds)) return null;\n\t\tconst endpoint = typeof entry.endpoint === \"string\" ? entry.endpoint : typeof entry.path === \"string\" ? webhookEndpointFromPath(entry.path) : void 0;\n\t\tif (!endpoint) return null;\n\t\treturn {\n\t\t\tkind: \"trigger-webhook\",\n\t\t\tendpoint,\n\t\t\tattachmentIds: entry.attachmentIds,\n\t\t\tmoduleFile: entry.moduleFile,\n\t\t\tattachmentSchemas: entry.attachmentSchemas && typeof entry.attachmentSchemas === \"object\" ? entry.attachmentSchemas : {}\n\t\t};\n\t}\n\tif (kind === \"trigger-poll\") {\n\t\tif (typeof entry.attachmentId !== \"string\" || typeof entry.moduleFile !== \"string\" || typeof entry.schedule !== \"string\") return null;\n\t\treturn {\n\t\t\tkind: \"trigger-poll\",\n\t\t\tattachmentId: entry.attachmentId,\n\t\t\tmoduleFile: entry.moduleFile,\n\t\t\tschedule: entry.schedule\n\t\t};\n\t}\n\tif (kind === \"trigger-poll-group\") {\n\t\tif (typeof entry.pollId !== \"string\" || typeof entry.moduleFile !== \"string\" || typeof entry.schedule !== \"string\" || !Array.isArray(entry.attachmentIds)) return null;\n\t\treturn {\n\t\t\tkind: \"trigger-poll-group\",\n\t\t\tpollId: entry.pollId,\n\t\t\tattachmentIds: entry.attachmentIds,\n\t\t\tmoduleFile: entry.moduleFile,\n\t\t\tschedule: entry.schedule\n\t\t};\n\t}\n\tif (kind === \"cron-schedule\") {\n\t\tif (typeof entry.attachmentId !== \"string\" || typeof entry.moduleFile !== \"string\" || typeof entry.schedule !== \"string\") return null;\n\t\treturn {\n\t\t\tkind: \"cron-schedule\",\n\t\t\tattachmentId: entry.attachmentId,\n\t\t\tmoduleFile: entry.moduleFile,\n\t\t\tschedule: entry.schedule\n\t\t};\n\t}\n\treturn null;\n}\n/** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */\nfunction normalizeStoredRouteManifestToV2(value) {\n\tif (!value || typeof value !== \"object\") throw new Error(\"Invalid route manifest\");\n\tconst raw = value;\n\tif (raw.version === 2) return storedRouteManifestV2Schema.parse(value);\n\tconst entriesRaw = Array.isArray(raw.entries) ? raw.entries : [];\n\tconst entries = [];\n\tfor (const entry of entriesRaw) {\n\t\tif (!entry || typeof entry !== \"object\") continue;\n\t\tconst normalized = normalizeEntryToV2(entry);\n\t\tif (normalized) entries.push(normalized);\n\t}\n\treturn storedRouteManifestV2Schema.parse({\n\t\tversion: 2,\n\t\tentries,\n\t\tskills: raw.skills ?? [],\n\t\tintegrations: raw.integrations\n\t});\n}\nfunction parseStoredRouteManifest(value) {\n\treturn normalizeStoredRouteManifestToV2(value);\n}\n//#endregion\n//#region src/schemas/channels.ts\n/** Messaging platforms that support agent gateway bindings. */\nconst ChannelPlatformKeySchema = z.enum([\"slack\"]);\nconst ChannelReactionSupportSchema = z.enum([\n\t\"full\",\n\t\"read-only\",\n\t\"none\"\n]);\nconst ChannelCardSupportSchema = z.enum([\n\t\"full\",\n\t\"partial\",\n\t\"none\"\n]);\nconst ChannelStreamingSupportSchema = z.enum([\n\t\"native\",\n\t\"post-edit\",\n\t\"buffered\",\n\t\"drafts\",\n\t\"none\"\n]);\nconst ChannelCapabilitiesSchema = z.object({\n\tmentions: z.boolean(),\n\treactions: ChannelReactionSupportSchema,\n\tcards: ChannelCardSupportSchema,\n\tmodals: z.boolean(),\n\tstreaming: ChannelStreamingSupportSchema,\n\tdms: z.boolean()\n});\nconst ChannelListenModeSchema = z.enum([\n\t\"mention\",\n\t\"all\",\n\t\"dm\"\n]);\nconst ChannelBindingKindSchema = z.enum([\n\t\"public\",\n\t\"private\",\n\t\"dm\",\n\t\"group\",\n\t\"space\"\n]);\nconst AppGatewaySchema = z.object({\n\tcapabilities: ChannelCapabilitiesSchema,\n\tsupportedModes: z.array(ChannelListenModeSchema).min(1),\n\tresourceNoun: z.object({\n\t\tsingular: z.string().min(1),\n\t\tplural: z.string().min(1)\n\t}),\n\tsupportsChannelDirectory: z.boolean(),\n\twebhookPathHint: z.string().min(1),\n\t/** Composio/keystroke app slug for Connect when it differs from the gateway platform key (e.g. slack → slackbot). */\n\tconnectAppId: z.string().min(1).optional(),\n\tdocsUrl: z.string().url().optional(),\n\ttagline: z.string().min(1).optional()\n});\n/** Projected catalog row for the agent channels panel (derived from apps with `gateway`). */\nconst ChannelPlatformSchema = z.object({\n\tkey: ChannelPlatformKeySchema,\n\tname: z.string().min(1),\n\tappLogoId: z.string().min(1),\n\tfallbackDomain: z.string().min(1),\n\tdescription: z.string().min(1),\n\ttagline: z.string().min(1),\n\tauthKind: z.enum([\n\t\t\"oauth\",\n\t\t\"api_key\",\n\t\t\"keystroke\"\n\t]),\n\tcredentialFields: z.array(z.object({\n\t\tkey: z.string().min(1),\n\t\tlabel: z.string().min(1),\n\t\tplaceholder: z.string().optional(),\n\t\thelpText: z.string().optional(),\n\t\ttype: z.enum([\n\t\t\t\"text\",\n\t\t\t\"password\",\n\t\t\t\"textarea\"\n\t\t]),\n\t\trequired: z.boolean(),\n\t\tprefix: z.string().optional()\n\t})),\n\tcapabilities: ChannelCapabilitiesSchema,\n\tsupportedModes: z.array(ChannelListenModeSchema).min(1),\n\tresourceNoun: z.object({\n\t\tsingular: z.string().min(1),\n\t\tplural: z.string().min(1)\n\t}),\n\twebhookPathHint: z.string().min(1),\n\tsupportsChannelDirectory: z.boolean(),\n\tconnectAppId: z.string().min(1).optional(),\n\tdocsUrl: z.string().url().optional()\n});\nconst ChannelBindingSchema = z.object({\n\tid: z.string().min(1),\n\tchannelId: z.string().min(1),\n\tchannelName: z.string().min(1),\n\tchannelKind: ChannelBindingKindSchema,\n\tmode: ChannelListenModeSchema,\n\tsubscribeOnMention: z.boolean(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst ChannelConnectionSchema = z.object({\n\tid: z.string().min(1),\n\tplatform: ChannelPlatformKeySchema,\n\tagentId: z.string().min(1),\n\taccountLabel: z.string().min(1),\n\taccountId: z.string().min(1),\n\tconnectedAt: z.string(),\n\tbindings: z.array(ChannelBindingSchema)\n});\nconst ChannelDirectoryEntrySchema = z.object({\n\tid: z.string().min(1),\n\tname: z.string().min(1),\n\tkind: ChannelBindingKindSchema,\n\tmemberCount: z.number().int().nonnegative().optional(),\n\tisArchived: z.boolean().optional()\n});\nconst ChannelConnectionListResponseSchema = z.array(ChannelConnectionSchema);\nconst ChannelDirectoryListResponseSchema = z.array(ChannelDirectoryEntrySchema);\n/** Channel-relevant fields parsed from an OAuth connection's metadata blob. */\nconst ChannelAccountMetadataSchema = z.object({ teamName: z.string().min(1).optional() });\n/** OAuth workspace available for channel bindings (e.g. Slack team). */\nconst ChannelAccountSchema = z.object({\n\tid: z.string().min(1),\n\tplatform: ChannelPlatformKeySchema,\n\tlabel: z.string().min(1),\n\tconnectedAt: z.string()\n});\nconst ChannelAccountListResponseSchema = z.array(ChannelAccountSchema);\nconst NewChannelBindingInputSchema = z.object({\n\tchannelId: z.string().min(1),\n\tchannelName: z.string().min(1),\n\tchannelKind: ChannelBindingKindSchema.optional(),\n\tmode: ChannelListenModeSchema.optional(),\n\tsubscribeOnMention: z.boolean().optional()\n});\nconst BindChannelBodySchema = z.object({\n\tplatform: ChannelPlatformKeySchema,\n\taccountId: z.string().min(1),\n\tbinding: NewChannelBindingInputSchema\n});\nconst UpdateChannelBindingBodySchema = z.object({ patch: z.object({\n\tmode: ChannelListenModeSchema.optional(),\n\tsubscribeOnMention: z.boolean().optional()\n}) });\n//#endregion\n//#region src/schemas/app-credential-fields.ts\n/** Metadata for one vault field on a custom api_key app. */\nconst AppCredentialFieldSchema = z.object({\n\tlabel: z.string().trim().min(1).optional(),\n\tsecret: z.boolean().optional(),\n\toptional: z.boolean().optional()\n});\n/** Credential template keyed by vault field name. */\nconst AppCredentialFieldsSchema = z.record(z.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/), AppCredentialFieldSchema).refine((fields) => Object.keys(fields).length > 0, { message: \"At least one credential field is required\" }).refine((fields) => Object.values(fields).some((field) => field.optional !== true), { message: \"At least one credential field must be required\" });\nfunction validateCredentialValueAgainstFields(fields, value) {\n\tfor (const [key, field] of Object.entries(fields)) {\n\t\tif (field.optional === true) continue;\n\t\tconst raw = value[key];\n\t\tif (typeof raw !== \"string\" || raw.trim().length === 0) return {\n\t\t\tok: false,\n\t\t\tmessage: `Missing required credential field \"${key}\"`\n\t\t};\n\t}\n\tfor (const key of Object.keys(value)) if (!(key in fields)) return {\n\t\tok: false,\n\t\tmessage: `Unknown credential field \"${key}\"`\n\t};\n\treturn { ok: true };\n}\n//#endregion\n//#region src/schemas/apps.ts\n/** A single OAuth scope an app can request, with human copy for connect UI. */\nconst OAuthScopeOptionSchema = z.object({\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tdefaultSelected: z.boolean().optional(),\n\trequired: z.boolean().optional()\n});\n/** How an app authenticates when connecting credentials. */\nconst AppAuthKindSchema = z.enum([\n\t\"oauth\",\n\t\"api_key\",\n\t\"keystroke\"\n]);\n/**\n* Where app metadata and execution are sourced (e.g. native, composio, pipedream, custom).\n* Opaque string — cloud/hosted entrypoints choose values; keystroke stays provider-agnostic.\n*/\nconst AppSourceSchema = z.string().trim().min(1);\n/** Integration metadata generated alongside an app package (source assigned at seed time). */\nconst AppCatalogMetadataSchema = z.object({\n\tslug: z.string().trim().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tlogo: z.string().url().optional(),\n\tauthKind: AppAuthKindSchema,\n\toauthScopes: z.array(OAuthScopeOptionSchema)\n});\n/** Row used to seed official apps into the platform registry. */\nconst AppSeedEntrySchema = AppCatalogMetadataSchema.extend({ source: AppSourceSchema });\nconst customAppNameSchema = z.string().trim().min(1, \"Name is required\");\nconst AppSlugAvailabilityReasonSchema = ProjectSlugAvailabilityReasonSchema;\nconst AppSlugAvailabilityResponseSchema = z.object({\n\tslug: z.string(),\n\tavailable: z.boolean(),\n\treason: AppSlugAvailabilityReasonSchema.optional(),\n\tsuggestion: AppSlugSchema.optional()\n});\nconst AppSlugAvailabilityQuerySchema = z.object({ slug: z.string().trim().min(1) });\n/** Request body for creating an org custom api_key app. */\nconst CreateCustomAppRequestSchema = z.object({\n\tname: customAppNameSchema,\n\tslug: AppSlugSchema,\n\tdescription: z.string().trim().min(1),\n\tfields: AppCredentialFieldsSchema\n});\n/** Full custom app detail returned by GET (includes credential template for sync). */\nconst CustomAppDetailSchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tauthKind: z.literal(\"api_key\"),\n\tsource: z.literal(\"custom\"),\n\tcredentialFields: AppCredentialFieldsSchema,\n\tcreatedAt: z.string().min(1),\n\tupdatedAt: z.string().min(1)\n});\nconst CreateCustomAppResponseSchema = CustomAppDetailSchema;\nconst GetCustomAppResponseSchema = CustomAppDetailSchema;\n/** Platform `apps` table row. */\nconst AppRecordSchema = z.object({\n\tid: z.string().min(1),\n\torganizationId: z.string().min(1).nullable(),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tlogo: z.string().url().nullable(),\n\tauthKind: AppAuthKindSchema,\n\toauthScopes: z.array(OAuthScopeOptionSchema),\n\tsource: AppSourceSchema,\n\tcredentialFields: AppCredentialFieldsSchema.optional(),\n\tcreatedAt: z.string().min(1),\n\tupdatedAt: z.string().min(1)\n});\n/**\n* A connectable integration shown in the \"Connect an app\" picker. An \"app\" is\n* an integration / credential set — connected state is whether a credential exists.\n*/\nconst AppCatalogEntrySchema = z.object({\n\tid: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tintegrationDescription: z.string().min(1),\n\tlogo: z.string().url().nullable().optional(),\n\tauthKind: AppAuthKindSchema,\n\toauthScopes: z.array(OAuthScopeOptionSchema),\n\t/** Where app metadata and execution are sourced (e.g. composio, custom). */\n\tsource: AppSourceSchema,\n\t/** Custom api_key apps — vault field template for connect UI and sync. */\n\tcredentialFields: AppCredentialFieldsSchema.optional(),\n\t/** When present, the app supports agent gateway bindings (external channels). */\n\tgateway: AppGatewaySchema.optional()\n});\nconst ListAppsResponseSchema = z.array(AppCatalogEntrySchema);\n//#endregion\n//#region src/schemas/catalog.ts\nconst CatalogAppSummarySchema = z.object({\n\tname: z.string(),\n\tdescription: z.string(),\n\tpackage: z.string()\n});\nconst CatalogAppsPageSchema = z.object({\n\titems: z.array(CatalogAppSummarySchema),\n\tnextCursor: z.string().optional()\n});\nconst CatalogAppDetailSchema = z.object({\n\tname: z.string(),\n\tdescription: z.string(),\n\tpackage: z.string(),\n\tversion: z.string().optional()\n});\nconst CatalogActionSummarySchema = z.object({\n\tslug: z.string(),\n\tname: z.string(),\n\tdescription: z.string().optional()\n});\nconst CatalogActionsPageSchema = z.object({\n\ttoolkit: z.string().optional(),\n\titems: z.array(CatalogActionSummarySchema),\n\tnextCursor: z.string().optional()\n});\nconst CatalogActionDetailSchema = z.object({\n\tslug: z.string(),\n\tname: z.string(),\n\tdescription: z.string().optional(),\n\tinputParameters: z.record(z.string(), z.unknown()).optional(),\n\toutputParameters: z.record(z.string(), z.unknown()).optional(),\n\tversion: z.string().optional()\n});\nconst CatalogAppsPageResponseSchema = CatalogAppsPageSchema;\nconst CatalogAppDetailResponseSchema = CatalogAppDetailSchema;\nconst CatalogActionsPageResponseSchema = CatalogActionsPageSchema;\nconst CatalogActionDetailResponseSchema = CatalogActionDetailSchema;\n//#endregion\n//#region src/apps/slug.ts\nconst ORG_SLUG_SEPARATOR = \"/\";\n/** Official apps use a bare slug with no namespace separator. */\nfunction isOfficialSlug(slug) {\n\treturn slug.trim().length > 0 && !slug.includes(ORG_SLUG_SEPARATOR);\n}\n/** Qualify an org-custom app slug as `{orgSlug}/{name}`. */\nfunction qualifyOrgSlug(orgSlug, name) {\n\tconst trimmedOrgSlug = orgSlug.trim();\n\tconst trimmedName = name.trim();\n\tif (!trimmedOrgSlug || !trimmedName) throw new Error(\"qualifyOrgSlug requires non-empty orgSlug and name\");\n\tif (trimmedOrgSlug.includes(ORG_SLUG_SEPARATOR) || trimmedName.includes(ORG_SLUG_SEPARATOR)) throw new Error(\"orgSlug and name must not contain '/'\");\n\treturn `${trimmedOrgSlug}${ORG_SLUG_SEPARATOR}${trimmedName}`;\n}\n/** Parse a stored app slug into official vs org-custom parts. */\nfunction parseAppSlug(slug) {\n\tconst trimmed = slug.trim();\n\tif (!trimmed) throw new Error(\"parseAppSlug requires a non-empty slug\");\n\tconst separatorIndex = trimmed.indexOf(ORG_SLUG_SEPARATOR);\n\tif (separatorIndex === -1) return {\n\t\tkind: \"official\",\n\t\tslug: trimmed\n\t};\n\tconst orgSlug = trimmed.slice(0, separatorIndex);\n\tconst name = trimmed.slice(separatorIndex + 1);\n\tif (!orgSlug || !name || trimmed.indexOf(ORG_SLUG_SEPARATOR, separatorIndex + 1) !== -1) throw new Error(`Invalid org app slug: ${slug}`);\n\treturn {\n\t\tkind: \"org\",\n\t\torgSlug,\n\t\tname,\n\t\tslug: trimmed\n\t};\n}\n//#endregion\n//#region src/schemas/credentials.ts\n/** How a credential instance is stored (`credential_instances.auth_kind`). */\nconst CredentialAuthKindSchema = z.enum([\n\t\"api_key\",\n\t\"oauth_managed\",\n\t\"keystroke\"\n]);\n/**\n* Where a credential instance is stored (`credential_instances.scope_type`), and the only thing an\n* action/tool can pin via `.scope(...)`. There is no resolution chain: when no scope is pinned, the\n* resolver tries the project default, then the org default, then throws.\n*/\nconst CredentialScopeTypeSchema = z.enum([\n\t\"organization\",\n\t\"project\",\n\t\"user\"\n]);\nconst CREDENTIAL_AUTH_KINDS = CredentialAuthKindSchema.options;\nconst CREDENTIAL_SCOPE_TYPES = CredentialScopeTypeSchema.options;\n//#endregion\n//#region src/credential-instance-label.ts\n/** Human-readable app name from a credential slug (e.g. `google-drive` → `Google Drive`). */\nfunction displayCredentialAppName(appId) {\n\treturn appId.split(/[-_]+/).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(\" \");\n}\nfunction buildCredentialInstanceLabel(options) {\n\tconst appName = options.appName.trim();\n\tswitch (options.scopeType) {\n\t\tcase \"organization\": return `Organization ${appName}`;\n\t\tcase \"user\": return `Personal ${appName}`;\n\t\tcase \"project\": return `${appName} (${options.projectName?.trim() || \"Project\"})`;\n\t\tdefault: return options.scopeType;\n\t}\n}\n/** Pick a label that is unused within a credential scope, suffixing when needed. */\nfunction resolveUniqueCredentialInstanceLabel(options) {\n\tconst taken = new Set([...options.takenLabels].map((label) => label ?? null));\n\tif (!taken.has(options.baseLabel)) return options.baseLabel;\n\tconst disambiguator = options.disambiguator?.trim();\n\tif (disambiguator) {\n\t\tconst withDisambiguator = `${options.baseLabel} (${disambiguator})`;\n\t\tif (!taken.has(withDisambiguator)) return withDisambiguator;\n\t}\n\tlet suffix = 2;\n\twhile (taken.has(`${options.baseLabel} (${suffix})`)) suffix += 1;\n\treturn `${options.baseLabel} (${suffix})`;\n}\n//#endregion\n//#region src/schemas/app-credentials.ts\n/** Scope of a platform app credential (maps to `credential_instances.scope_type`). */\nconst AppCredentialScopeSchema = z.enum([\n\t\"user\",\n\t\"project\",\n\t\"organization\"\n]);\n/** How the credential was connected (OAuth vs manual api-key entry). */\nconst AppCredentialConnectionKindSchema = z.enum([\"oauth\", \"manual\"]);\n/** Connect-dialog permission preset for OAuth scope selection. */\nconst OAuthPermissionModeSchema = z.enum([\"default\", \"restricted\"]);\nconst optionalTimestamp$1 = z.string().optional();\nconst nullableOptionalTimestamp = z.string().nullable().optional();\n/**\n* Summary row for the apps/credentials table and credential detail page.\n* Plaintext secrets are never returned — only masked `keyPreviews`.\n*/\nconst AppCredentialSummarySchema = z.object({\n\tid: z.string().min(1),\n\tappId: z.string().min(1),\n\tlabel: z.string().min(1),\n\tscope: AppCredentialScopeSchema,\n\tlastRefreshedAt: z.string().nullable(),\n\tappName: z.string().min(1).optional(),\n\tprojectId: z.string().min(1).optional(),\n\tprojectName: z.string().min(1).optional(),\n\tstatus: z.string().optional(),\n\tcreatedAt: optionalTimestamp$1,\n\tlastUsedAt: nullableOptionalTimestamp,\n\tisDefault: z.boolean().optional(),\n\tconnectionKind: AppCredentialConnectionKindSchema.optional(),\n\townerUserId: z.string().min(1).optional(),\n\townerName: z.string().min(1).optional(),\n\townerAvatarUrl: z.string().url().optional(),\n\tgrantedScopes: z.array(z.string().min(1)).optional(),\n\tcredentialKeys: z.array(z.string().min(1)).optional(),\n\tkeyPreviews: z.record(z.string(), z.string()).optional(),\n\texpiresAt: optionalTimestamp$1\n});\nconst credentialSecretValueSchema = z.record(z.string(), z.unknown()).refine((value) => Object.keys(value).length > 0, { message: \"value must be a non-empty object\" });\nfunction hasCredentialTarget(input) {\n\treturn input.projects.length > 0 || input.createOrganizationCredential || input.createUserProvidedCredential;\n}\nfunction addMissingCredentialTargetIssue(ctx, path = [\"projects\"]) {\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"At least one credential target is required\",\n\t\tpath\n\t});\n}\n/** Target fields shared by create and OAuth start flows. */\nconst CredentialTargetsFieldsSchema = z.object({\n\tprojects: z.array(z.string().min(1)).default([]),\n\tcreateOrganizationCredential: z.boolean().default(false),\n\tcreateUserProvidedCredential: z.boolean().default(false),\n\t/** Display label for created credential instances (apps table / detail page). */\n\tlabel: z.string().trim().min(1).optional()\n});\n/** Input for starting an OAuth connection (connect dialog / CLI connect). */\nconst StartOAuthConnectionInputSchema = CredentialTargetsFieldsSchema.extend({\n\tappId: z.string().min(1),\n\tscopes: z.array(z.string().min(1)),\n\tpermissionMode: OAuthPermissionModeSchema\n});\n/** Result of starting an OAuth connection. */\nconst StartOAuthConnectionResultSchema = z.object({\n\tstatus: z.enum([\"connected\", \"redirecting\"]),\n\tauthorizeUrl: z.string().url().nullable()\n});\n/** Input for starting a keystroke connection (connect dialog). */\nconst StartKeystrokeConnectionInputSchema = CredentialTargetsFieldsSchema.extend({ app: z.string().trim().min(1) }).superRefine((input, ctx) => {\n\tif (!hasCredentialTarget(input)) addMissingCredentialTargetIssue(ctx);\n});\n/** Result of starting a keystroke connection. */\nconst StartKeystrokeConnectionResultSchema = z.object({\n\tstatus: z.enum([\"redirecting\"]),\n\tauthorizeUrl: z.string().url(),\n\tconnectionId: z.string()\n});\n/** Request body for `POST /api/credentials` (manual api-key fan-out). */\nconst CreateCredentialsRequestSchema = CredentialTargetsFieldsSchema.extend({\n\tappId: z.string().min(1),\n\tconnectionKind: AppCredentialConnectionKindSchema,\n\tvalue: credentialSecretValueSchema.optional(),\n\tscopes: z.array(z.string().min(1)).optional()\n}).superRefine((input, ctx) => {\n\tif (!hasCredentialTarget(input)) addMissingCredentialTargetIssue(ctx);\n\tif (input.connectionKind === \"manual\" && !input.value) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"value is required for manual connections\",\n\t\tpath: [\"value\"]\n\t});\n\tif (input.connectionKind === \"oauth\") ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"OAuth credentials are created via the OAuth callback\",\n\t\tpath: [\"connectionKind\"]\n\t});\n});\n/** Request body for `PATCH /api/credentials/:id`. */\nconst UpdateCredentialRequestSchema = z.object({\n\tlabel: z.string().trim().min(1).optional(),\n\tisDefault: z.boolean().optional(),\n\tvalue: credentialSecretValueSchema.optional()\n}).refine((input) => input.label !== void 0 || input.isDefault !== void 0 || input.value !== void 0, { message: \"At least one field is required\" });\nconst ListCredentialsResponseSchema = z.array(AppCredentialSummarySchema);\nconst GetCredentialResponseSchema = AppCredentialSummarySchema;\nconst CreateCredentialsResponseSchema = z.array(AppCredentialSummarySchema);\n//#endregion\n//#region src/schemas/mcp.ts\nconst McpConnectionStatusSchema = z.enum([\n\t\"INITIATED\",\n\t\"ACTIVE\",\n\t\"EXPIRED\",\n\t\"FAILED\",\n\t\"INACTIVE\",\n\t\"REVOKED\"\n]);\nconst McpAppSchema = z.object({\n\tslug: z.string(),\n\tname: z.string(),\n\tconnected: z.boolean(),\n\tconnectionId: z.string().optional(),\n\tstatus: McpConnectionStatusSchema.optional()\n});\nconst ListMcpAppsResponseSchema = z.array(McpAppSchema);\nconst MCP_ENTITY_PREFIX = {\n\tuser: \"user\",\n\torganization: \"org\",\n\tproject: \"proj\"\n};\n/** MCP provider entity id for a credential scope subject (`user_<id>` / `org_<id>` / `proj_<id>`). */\nfunction mcpEntityId(scopeType, scopeId) {\n\treturn `${MCP_ENTITY_PREFIX[scopeType]}_${scopeId}`;\n}\nconst MCP_ENTITY_SCOPE_BY_PREFIX = {\n\tuser: \"user\",\n\torg: \"organization\",\n\tproj: \"project\"\n};\n/** Parse an MCP entity id back into Keystroke scope type + id. */\nfunction parseMcpEntityId(entityId) {\n\tconst trimmed = entityId.trim();\n\tconst separator = trimmed.indexOf(\"_\");\n\tif (separator <= 0) return;\n\tconst prefix = trimmed.slice(0, separator);\n\tconst scopeId = trimmed.slice(separator + 1);\n\tconst scopeType = MCP_ENTITY_SCOPE_BY_PREFIX[prefix];\n\tif (!scopeType || !scopeId) return;\n\treturn {\n\t\tscopeType,\n\t\tscopeId\n\t};\n}\nconst KeystrokeCredentialSchema = z.object({\n\tconnectionId: z.string(),\n\tentityId: z.string(),\n\tinstanceId: z.string()\n});\nconst ExecuteKeystrokeToolRequestSchema = z.object({\n\tapp: z.string().trim().min(1),\n\ttool: z.string().trim().min(1),\n\targuments: z.record(z.string(), z.unknown()).default({}),\n\t/** Pinned provider toolkit version, sourced from the app definition; forwarded to the provider. */\n\tversion: z.string().trim().min(1)\n});\n//#endregion\n//#region src/schemas/team-requests.ts\nconst TeamRequestTypeSchema = z.enum([\n\t\"org-deletion\",\n\t\"contact\",\n\t\"enterprise-upgrade\",\n\t\"verification\"\n]);\nconst SubmitTeamRequestRequestSchema = z.object({\n\ttype: TeamRequestTypeSchema,\n\tmessage: z.string().trim().max(5e3).optional()\n});\nconst SubmitTeamRequestResponseSchema = z.object({ ok: z.literal(true) });\n//#endregion\n//#region src/schemas/marketing-contact.ts\nconst MarketingContactCompanySizeSchema = z.enum([\n\t\"1-10\",\n\t\"11-50\",\n\t\"51-200\",\n\t\"201-500\",\n\t\"500+\"\n]);\nconst SubmitMarketingContactRequestSchema = z.object({\n\tfullName: z.string().trim().min(1, \"Full name is required\").max(200),\n\tworkEmail: z.string().trim().email(\"Enter a valid email address\").max(320),\n\tcompanySize: MarketingContactCompanySizeSchema,\n\tmessage: z.string().trim().min(1, \"Message is required\").max(5e3),\n\t/** Honeypot — must stay empty; bots that fill it are ignored silently. */\n\tcompanyWebsite: z.string().optional()\n});\nconst SubmitMarketingContactResponseSchema = SubmitTeamRequestResponseSchema;\n//#endregion\n//#region src/schemas/credential-spec.ts\nfunction isCredentialInput(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\treturn typeof candidate.key === \"string\" && CredentialAuthKindSchema.safeParse(candidate.kind).success && candidate.schema instanceof z.ZodType;\n}\nconst credentialInputSchema = z.custom((value) => isCredentialInput(value), \"must be a credential requirement\");\nfunction createRef(kind, key, schema, options) {\n\tconst tokenField = options?.tokenField;\n\treturn {\n\t\tkind,\n\t\tkey,\n\t\tschema,\n\t\t...tokenField !== void 0 ? { tokenField } : {},\n\t\tscope(scope) {\n\t\t\treturn {\n\t\t\t\tkey,\n\t\t\t\tkind,\n\t\t\t\tschema,\n\t\t\t\tscope,\n\t\t\t\t...tokenField !== void 0 ? { tokenField } : {}\n\t\t\t};\n\t\t}\n\t};\n}\nfunction staticCredential(key, schema) {\n\treturn createRef(\"api_key\", key, schema instanceof z.ZodType ? schema : z.object(schema));\n}\nfunction oauthCredential(key, options) {\n\tconst tokenField = options?.tokenField ?? \"accessToken\";\n\treturn createRef(\"oauth_managed\", key, tokenField === \"accessToken\" ? z.object({ accessToken: z.string() }) : z.object({ [tokenField]: z.string() }), { tokenField });\n}\nfunction keystrokeCredential(key) {\n\treturn createRef(\"keystroke\", key, KeystrokeCredentialSchema);\n}\nconst credential = {\n\tstatic: staticCredential,\n\toauth: oauthCredential,\n\tkeystroke: keystrokeCredential\n};\nfunction defineCredential(input) {\n\tif (input.kind === \"oauth\") return input.tokenField !== void 0 ? credential.oauth(input.key, { tokenField: input.tokenField }) : credential.oauth(input.key);\n\tif (input.kind === \"keystroke\") return credential.keystroke(input.key);\n\tif (\"schema\" in input) return credential.static(input.key, input.schema);\n\treturn credential.static(input.key, input.fields);\n}\nfunction normalizeCredentialList(list) {\n\treturn list.map((item) => toCredentialRequirement(item));\n}\nfunction isCredentialRequirement(item) {\n\treturn typeof item.scope !== \"function\";\n}\nfunction toCredentialRequirement(item) {\n\tif (isCredentialRequirement(item)) return item;\n\treturn {\n\t\tkey: item.key,\n\t\tkind: item.kind,\n\t\tschema: item.schema,\n\t\t...item.tokenField !== void 0 ? { tokenField: item.tokenField } : {}\n\t};\n}\n//#endregion\n//#region src/schemas/errors/schema.ts\nconst ValidationErrorDetailSchema = z.object({\n\tpath: z.string(),\n\tmessage: z.string()\n});\n/** Machine-readable codes returned in standard API error bodies. */\nconst ErrorResponseCodeSchema = OrganizationSlugErrorCodeSchema.or(z.enum([\"needs_org_selection\", \"org_unverified\"]));\n/** Standard JSON error body returned by the HTTP API. */\nconst ErrorResponseSchema = z.object({\n\terror: z.string(),\n\tcode: ErrorResponseCodeSchema.optional(),\n\tmessage: z.string().optional(),\n\tdetails: z.array(ValidationErrorDetailSchema).optional()\n});\n//#endregion\n//#region src/schemas/errors/from-zod.ts\n/** Build the JSON body for HTTP 400 validation failures. */\nfunction validationErrorResponse(error, summary) {\n\treturn {\n\t\terror: summary,\n\t\tdetails: error.issues.map((issue) => ({\n\t\t\tpath: issue.path.join(\".\"),\n\t\t\tmessage: issue.message\n\t\t}))\n\t};\n}\n//#endregion\n//#region src/schemas/errors/parse.ts\nconst MessageOnlyErrorBodySchema = z.object({ message: z.string() });\n/** Parse a JSON error body from the API. */\nfunction parseErrorResponse(body) {\n\tconst parsed = ErrorResponseSchema.safeParse(body);\n\tif (parsed.success) return parsed.data;\n\tconst messageOnly = MessageOnlyErrorBodySchema.safeParse(body);\n\tif (messageOnly.success) return {\n\t\terror: messageOnly.data.message,\n\t\tmessage: messageOnly.data.message\n\t};\n}\n//#endregion\n//#region src/schemas/http.ts\nconst CredentialRunContextSchema = z.object({\n\torgId: z.string().min(1).optional(),\n\tprojectId: z.string().min(1).optional(),\n\tuserId: z.string().min(1).optional(),\n\tuserIds: z.record(z.string(), z.string()).optional(),\n\tselection: z.record(z.string(), z.string()).optional()\n});\nconst ThinkingLevelSchema = z.enum([\n\t\"off\",\n\t\"minimal\",\n\t\"low\",\n\t\"medium\",\n\t\"high\",\n\t\"xhigh\"\n]);\nconst PromptInputSchema = z.object({\n\tmessage: z.string().min(1),\n\tsessionId: z.string().min(1).optional(),\n\tsubscriptionId: z.string().min(1).optional(),\n\tcontext: CredentialRunContextSchema.optional(),\n\tthinkingLevel: ThinkingLevelSchema.optional()\n});\nconst PromptResponseSchema = z.object({\n\tsessionId: z.string(),\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\terror: z.string().nullable()\n});\nconst SkipResponseSchema = z.object({\n\tok: z.literal(true),\n\tskipped: z.literal(true)\n});\nconst HealthResponseSchema = z.object({ ok: z.literal(true) });\nconst PlatformInfoResponseSchema = z.object({ service: z.string() });\nconst ConnectProviderSchema = z.object({\n\tkey: z.string(),\n\tmode: z.enum([\"authorize-url\", \"browser-redirect\"]),\n\tpath: z.string(),\n\trequiresAuth: z.boolean()\n});\nconst ConnectProvidersResponseSchema = z.object({ providers: z.array(ConnectProviderSchema) });\nconst ConnectAuthorizeUrlResponseSchema = z.object({ url: z.string() });\nconst QueuedRunResponseSchema = z.object({ runId: z.string() });\nconst QueuedAgentPromptResponseSchema = z.object({\n\tsessionId: z.string(),\n\trunId: z.string()\n});\nfunction parsePromptInput(input) {\n\treturn PromptInputSchema.parse(input);\n}\nconst PollRunRequestSchema = z.object({\n\tworkflows: z.array(z.string().min(1)).optional(),\n\tattachments: z.array(z.string().min(1)).optional()\n});\nconst PollAttachmentResultSchema = z.object({\n\tattachmentKey: z.string(),\n\tworkflowKey: z.string(),\n\trunId: z.string().optional(),\n\tbody: z.unknown().optional(),\n\tqueued: z.boolean(),\n\tskipped: z.boolean().optional()\n});\nconst PollRunMultiResponseSchema = z.object({ results: z.array(PollAttachmentResultSchema) });\nconst PollRunResponseSchema = z.union([\n\tz.record(z.string(), z.unknown()),\n\tPollRunMultiResponseSchema,\n\tSkipResponseSchema,\n\tz.object({ runId: z.string() })\n]);\nfunction parsePollRunRequest(body) {\n\tif (body === void 0 || body === null) return {};\n\treturn PollRunRequestSchema.parse(body);\n}\n//#endregion\n//#region src/schemas/runs.ts\nconst RunSourceKindSchema = z.enum([\n\t\"api\",\n\t\"trigger\",\n\t\"gateway\",\n\t\"workflow\",\n\t\"agent\"\n]);\nconst RunSourceSchema = z.object({\n\tkind: RunSourceKindSchema,\n\tid: z.string().nullable()\n});\n//#endregion\n//#region src/schemas/agent-triggers.ts\nconst AgentTriggerOriginSchema = z.enum([\"project\", \"ephemeral\"]);\nconst AgentTriggerStatusSchema = z.enum([\n\t\"active\",\n\t\"disabled\",\n\t\"completed\"\n]);\nconst AgentTriggerTypeSchema = z.enum([\n\t\"webhook\",\n\t\"cron\",\n\t\"poll\"\n]);\nconst AgentTriggerSummarySchema = z.object({\n\tid: z.string(),\n\tlabel: z.string(),\n\ttype: AgentTriggerTypeSchema,\n\tschedule: z.string().nullable(),\n\tendpoint: z.string().nullable(),\n\torigin: AgentTriggerOriginSchema,\n\tprompt: z.string().nullable(),\n\tstatus: AgentTriggerStatusSchema,\n\texecutionCount: z.number().int().nonnegative(),\n\tuntil: z.string().nullable()\n});\nconst AgentTriggerSummaryListResponseSchema = z.array(AgentTriggerSummarySchema);\n//#endregion\n//#region src/schemas/workflow-runs.ts\nconst WorkflowRunStatusSchema = z.enum([\n\t\"pending\",\n\t\"running\",\n\t\"sleeping\",\n\t\"waiting_hook\",\n\t\"completed\",\n\t\"failed\",\n\t\"canceled\"\n]);\nconst WorkflowRunTriggerSchema = z.enum([\n\t\"api\",\n\t\"cron\",\n\t\"webhook\",\n\t\"poll\",\n\t\"retry\"\n]);\n/**\n* Durable workflow event-log entry types. Shared so the persistence layer\n* (`@keystrokehq/database` schema) and the runtime-agnostic replay engine\n* (`@keystrokehq/workflow`) reference one definition instead of duplicating it.\n*/\nconst WorkflowEventTypeSchema = z.enum([\n\t\"run_started\",\n\t\"step_completed\",\n\t\"step_failed\",\n\t\"step_retrying\",\n\t\"sleep_scheduled\",\n\t\"sleep_completed\",\n\t\"hook_created\",\n\t\"hook_resumed\",\n\t\"run_completed\",\n\t\"run_failed\",\n\t\"run_canceled\"\n]);\nconst WorkflowRunSummarySchema = z.object({\n\tid: z.string(),\n\tstatus: WorkflowRunStatusSchema,\n\ttrigger: WorkflowRunTriggerSchema,\n\ttriggeredAt: z.string(),\n\tstartedAt: z.string().nullable(),\n\tfinishedAt: z.string().nullable(),\n\tsourceKind: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\ttriggerRunId: z.string().nullable(),\n\tattachmentId: z.string().nullable()\n});\nconst WorkflowRunRecordSchema = z.object({\n\tid: z.string(),\n\tworkflowSlug: z.string(),\n\tstatus: WorkflowRunStatusSchema,\n\ttrigger: WorkflowRunTriggerSchema,\n\ttriggeredAt: z.string(),\n\tstartedAt: z.string().nullable(),\n\tfinishedAt: z.string().nullable(),\n\tsourceKind: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\ttriggerRunId: z.string().nullable(),\n\tattachmentId: z.string().nullable(),\n\tparentWorkflowRunId: z.string().nullable(),\n\tparentSpanId: z.string().nullable(),\n\tinput: z.unknown().nullable(),\n\toutput: z.unknown().nullable(),\n\terror: z.unknown().nullable()\n});\nconst WorkflowRunListQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(100).optional().default(20),\n\tcursor: z.string().min(1).optional(),\n\tstatus: WorkflowRunStatusSchema.optional(),\n\ttrigger: WorkflowRunTriggerSchema.optional()\n});\nconst WorkflowRunListResponseSchema = z.object({\n\titems: z.array(WorkflowRunSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst WorkflowRunDetailIncludeSchema = z.enum([\n\t\"trigger\",\n\t\"steps\",\n\t\"trace\"\n]);\nconst WorkflowRunDetailQuerySchema = z.object({ include: z.string().optional() });\nconst DEFAULT_DETAIL_INCLUDE$2 = [\n\t\"trigger\",\n\t\"steps\",\n\t\"trace\"\n];\nfunction parseWorkflowRunDetailInclude(include) {\n\tif (!include?.trim()) return [...DEFAULT_DETAIL_INCLUDE$2];\n\tconst parsed = include.split(\",\").map((part) => part.trim()).filter((part) => WorkflowRunDetailIncludeSchema.options.includes(part));\n\treturn parsed.length > 0 ? parsed : [...DEFAULT_DETAIL_INCLUDE$2];\n}\nconst TriggerRunDetailSchema = z.object({\n\tid: z.string(),\n\tattachmentId: z.string(),\n\tattachmentSlug: z.string().nullable(),\n\ttriggerType: z.enum([\n\t\t\"cron\",\n\t\t\"webhook\",\n\t\t\"poll\"\n\t]),\n\tsourcePath: z.string().nullable(),\n\tpayload: z.unknown().nullable(),\n\ttriggeredAt: z.string()\n});\nconst WorkflowStepRunSchema = z.object({\n\tid: z.string(),\n\tactionKey: z.string(),\n\toutput: z.unknown(),\n\tcompletedAt: z.string()\n});\nconst TraceTriggerSummarySchema = z.object({\n\ttriggerType: z.string(),\n\ttriggerRunId: z.string(),\n\tworkflowSlug: z.string().optional(),\n\tagentSlug: z.string().optional(),\n\tattachmentId: z.string().nullable().optional(),\n\tattachmentSlug: z.string().nullable().optional(),\n\troute: z.string().optional(),\n\tsourcePath: z.string().nullable().optional()\n}).nullable();\nconst TraceGatewaySummarySchema = z.object({\n\tgatewayAttachmentId: z.string(),\n\tgatewayAttachmentKey: z.string(),\n\tthreadId: z.string().optional(),\n\tchannelId: z.string().optional(),\n\tmode: z.string().optional()\n}).nullable();\nconst TraceSpanSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tparentSpanId: z.string().nullable(),\n\tkind: z.string(),\n\trefId: z.string(),\n\tname: z.string(),\n\tstatus: z.string(),\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tmetadata: z.unknown().nullable(),\n\terror: z.unknown().nullable()\n});\nconst TraceLogSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tspanId: z.string(),\n\tseq: z.number(),\n\tlevel: z.string(),\n\tmessage: z.string(),\n\tdata: z.unknown().nullable(),\n\tsource: z.string(),\n\tcreatedAt: z.string()\n});\nconst TraceResponseSchema = z.object({\n\ttraceId: z.string(),\n\ttrigger: TraceTriggerSummarySchema,\n\tgateway: TraceGatewaySummarySchema,\n\tspans: z.array(TraceSpanSchema),\n\tlogs: z.array(TraceLogSchema)\n});\nconst WorkflowRunDetailResponseSchema = z.object({\n\trun: WorkflowRunRecordSchema,\n\ttrigger: TriggerRunDetailSchema.nullable(),\n\tsteps: z.array(WorkflowStepRunSchema),\n\ttrace: TraceResponseSchema.nullable()\n});\n//#endregion\n//#region src/schemas/agent-sessions.ts\nconst AgentSessionStatusSchema = z.enum([\n\t\"running\",\n\t\"completed\",\n\t\"failed\",\n\t\"canceled\"\n]);\nconst AgentSessionSummarySchema = z.object({\n\tid: z.string(),\n\tstatus: AgentSessionStatusSchema,\n\tsource: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\ttitle: z.string().nullable(),\n\tranByUserName: z.string().nullable(),\n\tgatewayPlatform: z.string().nullable(),\n\ttriggerType: AgentTriggerTypeSchema.nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tmessageCount: z.number()\n});\nconst AgentSessionRecordSchema = z.object({\n\tid: z.string(),\n\tagentSlug: z.string(),\n\tstatus: AgentSessionStatusSchema,\n\tsource: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tparentSpanId: z.string().nullable(),\n\tmessageCount: z.number(),\n\terror: z.unknown().nullable()\n});\nconst AgentSessionListQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(100).optional().default(20),\n\tcursor: z.string().min(1).optional(),\n\tstatus: AgentSessionStatusSchema.optional(),\n\tsource: RunSourceKindSchema.optional()\n});\nconst AgentSessionListResponseSchema = z.object({\n\titems: z.array(AgentSessionSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst AgentSessionDetailIncludeSchema = z.enum([\n\t\"gateway\",\n\t\"messages\",\n\t\"events\",\n\t\"trace\"\n]);\nconst AgentSessionDetailQuerySchema = z.object({ include: z.string().optional() });\nconst DEFAULT_DETAIL_INCLUDE$1 = [\n\t\"gateway\",\n\t\"messages\",\n\t\"trace\"\n];\nfunction parseAgentSessionDetailInclude(include) {\n\tif (!include?.trim()) return [...DEFAULT_DETAIL_INCLUDE$1];\n\tconst parsed = include.split(\",\").map((part) => part.trim()).filter((part) => AgentSessionDetailIncludeSchema.options.includes(part));\n\treturn parsed.length > 0 ? parsed : [...DEFAULT_DETAIL_INCLUDE$1];\n}\nconst GatewaySessionDetailSchema = z.object({\n\tthreadId: z.string(),\n\tattachmentId: z.string(),\n\tattachmentSlug: z.string().nullable()\n});\nconst AgentEventSchema = z.object({\n\tid: z.string(),\n\tsessionId: z.string(),\n\tseq: z.number(),\n\teventType: z.string(),\n\tpayload: z.unknown(),\n\tcreatedAt: z.string()\n});\nconst AgentSessionDetailResponseSchema = z.object({\n\tsession: AgentSessionRecordSchema,\n\tgateway: GatewaySessionDetailSchema.nullable(),\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\tevents: z.array(AgentEventSchema),\n\ttrace: TraceResponseSchema.nullable()\n});\nconst AgentSessionChatStateQuerySchema = z.object({ sinceSeq: z.coerce.number().int().min(0).optional() });\nconst AgentSessionChatStateResponseSchema = z.object({\n\tstatus: AgentSessionStatusSchema,\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\tlive: z.record(z.string(), z.unknown()).nullable()\n});\n//#endregion\n//#region src/schemas/gateway-attachments.ts\nconst SlackGatewayModeSchema = z.enum([\n\t\"mention\",\n\t\"channel\",\n\t\"dm\"\n]);\nconst GatewayAttachmentSourceSchema = z.object({\n\tkind: z.literal(\"slack\"),\n\tmode: SlackGatewayModeSchema,\n\tcredentialKey: z.string(),\n\tchannelIds: z.array(z.string()).optional(),\n\tsubscribeOnMention: z.boolean()\n});\nconst GatewayAttachmentRecordSchema = z.object({\n\tid: z.string(),\n\tkey: z.string(),\n\tagentKey: z.string(),\n\tchannelId: z.string(),\n\tteamId: z.string().nullable().optional(),\n\tplatform: z.string(),\n\tsource: GatewayAttachmentSourceSchema,\n\tregisteredAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst GatewayAttachmentListResponseSchema = z.object({ attachments: z.array(GatewayAttachmentRecordSchema) });\nconst UpsertGatewayAttachmentBodySchema = z.object({\n\tagentKey: z.string().min(1),\n\tteamId: z.string().min(1).optional(),\n\tmode: SlackGatewayModeSchema.optional(),\n\tsubscribeOnMention: z.boolean().optional()\n});\nconst AgentListItemSchema = z.object({\n\tkey: z.string(),\n\tname: z.string().optional(),\n\troute: z.string()\n});\nconst AgentListResponseSchema = z.object({ agents: z.array(AgentListItemSchema) });\n//#endregion\n//#region src/schemas/history.ts\nconst HistoryRunKindSchema = z.enum([\"workflow\", \"agent\"]);\nconst HistoryRunStatusSchema = z.enum([\n\t\"pending\",\n\t\"running\",\n\t\"sleeping\",\n\t\"waiting_hook\",\n\t\"completed\",\n\t\"failed\",\n\t\"canceled\"\n]);\nconst HistoryRunActorSchema = z.object({\n\tuserId: z.string(),\n\tname: z.string(),\n\tavatarUrl: z.string().nullable().optional()\n});\nconst HistoryRunUsageLineItemSchema = z.object({\n\tid: z.string(),\n\tlabel: z.string(),\n\tamountUsd: z.number()\n});\nconst HistoryRunUsageSchema = z.object({\n\trunDurationMs: z.number().nullable(),\n\tlineItems: z.array(HistoryRunUsageLineItemSchema),\n\ttotalExcludingDurationUsd: z.number().nullable()\n});\nconst HistoryRunSchema = z.object({\n\tid: z.string(),\n\tkind: HistoryRunKindSchema,\n\ttraceId: z.string().nullable(),\n\tprojectId: z.string(),\n\tprojectName: z.string(),\n\tresourceKey: z.string(),\n\tresourceId: z.string(),\n\tresourceName: z.string(),\n\tstatus: HistoryRunStatusSchema,\n\ttriggeredAt: z.string(),\n\ttimeInQueueMs: z.number().nullable(),\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tdurationMs: z.number().nullable(),\n\ttriggerLabel: z.string(),\n\ttriggerRaw: z.string(),\n\tranAs: HistoryRunActorSchema.nullable(),\n\tmodelsUsed: z.array(z.string()),\n\totherServicesUsed: z.array(z.string()),\n\ttotalCostUsd: z.number().nullable(),\n\tmessageCount: z.number().optional(),\n\tstepCount: z.number().optional()\n});\nconst HistoryTraceSpanSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tparentSpanId: z.string().nullable(),\n\tkind: z.string(),\n\trefId: z.string(),\n\tname: z.string(),\n\tstatus: z.string(),\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tmetadata: z.unknown().nullable(),\n\terror: z.unknown().nullable()\n});\nconst HistoryTraceLogSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tspanId: z.string(),\n\tseq: z.number(),\n\tlevel: z.string(),\n\tmessage: z.string(),\n\tdata: z.unknown().nullable(),\n\tsource: z.string(),\n\tcreatedAt: z.string()\n});\nconst HistoryTraceTriggerSchema = z.object({\n\ttriggerType: z.string(),\n\ttriggerRunId: z.string(),\n\tworkflowKey: z.string().optional(),\n\tagentKey: z.string().optional(),\n\tattachmentId: z.string().nullable().optional(),\n\tattachmentKey: z.string().nullable().optional(),\n\troute: z.string().optional(),\n\tsourcePath: z.string().nullable().optional()\n}).nullable();\nconst HistoryTraceGatewaySchema = z.object({\n\tgatewayAttachmentId: z.string(),\n\tgatewayAttachmentKey: z.string(),\n\tthreadId: z.string().optional(),\n\tchannelId: z.string().optional(),\n\tmode: z.string().optional()\n}).nullable();\nconst HistoryTraceSchema = z.object({\n\ttraceId: z.string(),\n\ttrigger: HistoryTraceTriggerSchema,\n\tgateway: HistoryTraceGatewaySchema,\n\tspans: z.array(HistoryTraceSpanSchema),\n\tlogs: z.array(HistoryTraceLogSchema)\n});\nconst HistoryWorkflowStepSchema = z.object({\n\tid: z.string(),\n\tactionKey: z.string(),\n\toutput: z.unknown(),\n\tcompletedAt: z.string()\n});\nconst HistoryWorkflowRunDetailSchema = z.object({\n\tkind: z.literal(\"workflow\"),\n\trun: z.object({\n\t\tid: z.string(),\n\t\tworkflowKey: z.string(),\n\t\tstatus: HistoryRunStatusSchema,\n\t\ttrigger: z.string(),\n\t\ttriggeredAt: z.string(),\n\t\tstartedAt: z.string().nullable(),\n\t\tfinishedAt: z.string().nullable(),\n\t\tinput: z.unknown().nullable(),\n\t\toutput: z.unknown().nullable(),\n\t\terror: z.unknown().nullable()\n\t}),\n\ttrigger: z.object({\n\t\tid: z.string(),\n\t\tattachmentKey: z.string().nullable(),\n\t\ttriggerType: z.string(),\n\t\tsourcePath: z.string().nullable(),\n\t\tpayload: z.unknown().nullable(),\n\t\ttriggeredAt: z.string()\n\t}).nullable(),\n\tsteps: z.array(HistoryWorkflowStepSchema),\n\ttrace: HistoryTraceSchema.nullable(),\n\tranAs: HistoryRunActorSchema.nullable().optional(),\n\tusage: HistoryRunUsageSchema.nullable().optional()\n});\nconst HistoryAgentSessionDetailSchema = z.object({\n\tkind: z.literal(\"agent\"),\n\trunId: z.string(),\n\tsession: z.object({\n\t\tid: z.string(),\n\t\tagentKey: z.string(),\n\t\tstatus: HistoryRunStatusSchema,\n\t\tsource: z.enum([\n\t\t\t\"api\",\n\t\t\t\"gateway\",\n\t\t\t\"trigger\",\n\t\t\t\"workflow\",\n\t\t\t\"agent\"\n\t\t]),\n\t\tsourceId: z.string().nullable(),\n\t\tcreatedAt: z.string(),\n\t\tupdatedAt: z.string(),\n\t\tmessageCount: z.number(),\n\t\terror: z.unknown().nullable()\n\t}),\n\tgateway: z.object({\n\t\tthreadId: z.string(),\n\t\tattachmentKey: z.string().nullable()\n\t}).nullable(),\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\ttrace: HistoryTraceSchema.nullable(),\n\tranAs: HistoryRunActorSchema.nullable().optional(),\n\tusage: HistoryRunUsageSchema.nullable().optional()\n});\nconst HistoryRunDetailSchema = z.discriminatedUnion(\"kind\", [HistoryWorkflowRunDetailSchema, HistoryAgentSessionDetailSchema]);\nconst HistoryRunListQuerySchema = z.object({\n\tproject: z.string().min(1).optional(),\n\tstatus: HistoryRunStatusSchema.optional(),\n\tkind: HistoryRunKindSchema.optional()\n});\nconst HistoryRunListResponseSchema = z.array(HistoryRunSchema);\nconst HistoryRunDetailResponseSchema = HistoryRunDetailSchema.nullable();\nconst HistoryRunCancelResponseSchema = HistoryRunSchema.nullable();\n//#endregion\n//#region src/schemas/workflow-deployments.ts\nconst WorkflowSubscriptionRecordSchema = z.object({\n\tid: z.string(),\n\tworkflowKey: z.string(),\n\tuserId: z.string(),\n\tenabled: z.boolean(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst WorkflowSubscriptionListResponseSchema = z.object({ subscriptions: z.array(WorkflowSubscriptionRecordSchema) });\nconst UpsertWorkflowSubscriptionBodySchema = z.object({\n\tuserId: z.string().min(1).optional(),\n\tenabled: z.boolean().optional()\n});\nconst CredentialInstanceRecordSchema = z.object({\n\tid: z.string(),\n\tkey: z.string(),\n\tscopeType: CredentialScopeTypeSchema,\n\tscopeId: z.string().nullable(),\n\tlabel: z.string().nullable(),\n\tisDefault: z.boolean(),\n\tauthKind: CredentialAuthKindSchema\n});\nconst CredentialInstanceListResponseSchema = z.object({ instances: z.array(CredentialInstanceRecordSchema) });\nconst CreateCredentialInstanceBodySchema = z.object({\n\tkey: z.string().min(1),\n\tscopeType: CredentialScopeTypeSchema,\n\tscopeId: z.string().nullable().optional(),\n\tlabel: z.string().nullable().optional(),\n\tisDefault: z.boolean().optional(),\n\tvalue: z.record(z.string(), z.unknown()).refine((value) => Object.keys(value).length > 0, { message: \"value must be a non-empty object\" })\n});\nconst UpdateCredentialInstanceBodySchema = z.object({\n\tlabel: z.string().nullable().optional(),\n\tisDefault: z.boolean().optional(),\n\tvalue: z.record(z.string(), z.unknown()).refine((value) => Object.keys(value).length > 0, { message: \"value must be a non-empty object\" }).optional()\n});\n//#endregion\n//#region src/schemas/trigger-runs.ts\nconst TriggerRunTypeSchema = z.enum([\n\t\"cron\",\n\t\"webhook\",\n\t\"poll\"\n]);\nconst TriggerRunWorkflowSummarySchema = z.object({\n\tid: z.string(),\n\tstatus: WorkflowRunStatusSchema,\n\tworkflowSlug: z.string()\n});\nconst TriggerRunAgentSessionSummarySchema = z.object({\n\tid: z.string(),\n\tagentSlug: z.string()\n});\nconst TriggerRunSummarySchema = z.object({\n\tid: z.string(),\n\ttriggerType: TriggerRunTypeSchema,\n\ttriggeredAt: z.string(),\n\tsourcePath: z.string().nullable(),\n\tworkflowRun: TriggerRunWorkflowSummarySchema.nullable(),\n\tagentSession: TriggerRunAgentSessionSummarySchema.nullable()\n});\nconst TriggerRunRecordSchema = z.object({\n\tid: z.string(),\n\tattachmentId: z.string(),\n\tattachmentSlug: z.string(),\n\ttriggerType: TriggerRunTypeSchema,\n\tsourcePath: z.string().nullable(),\n\tpayload: z.unknown().nullable(),\n\ttriggeredAt: z.string()\n});\nconst TriggerRunListQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(100).optional().default(20),\n\tcursor: z.string().min(1).optional(),\n\ttriggerType: TriggerRunTypeSchema.optional()\n});\nconst TriggerRunListResponseSchema = z.object({\n\titems: z.array(TriggerRunSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst TriggerRunDetailIncludeSchema = z.enum([\n\t\"workflows\",\n\t\"agents\",\n\t\"trace\"\n]);\nconst TriggerRunDetailQuerySchema = z.object({ include: z.string().optional() });\nconst DEFAULT_DETAIL_INCLUDE = [\n\t\"workflows\",\n\t\"agents\",\n\t\"trace\"\n];\nfunction parseTriggerRunDetailInclude(include) {\n\tif (!include?.trim()) return [...DEFAULT_DETAIL_INCLUDE];\n\tconst parsed = include.split(\",\").map((part) => part.trim()).filter((part) => TriggerRunDetailIncludeSchema.options.includes(part));\n\treturn parsed.length > 0 ? parsed : [...DEFAULT_DETAIL_INCLUDE];\n}\nconst TriggerRunAgentSessionDetailSchema = z.object({\n\tid: z.string(),\n\tagentSlug: z.string()\n});\nconst TriggerRunDetailResponseSchema = z.object({\n\trun: TriggerRunRecordSchema,\n\tworkflowRuns: z.array(WorkflowRunSummarySchema),\n\tagentSessions: z.array(TriggerRunAgentSessionDetailSchema),\n\ttrace: TraceResponseSchema.nullable()\n});\n//#endregion\n//#region src/schemas/triggers.ts\nconst TriggerTypeSchema = z.enum([\n\t\"webhook\",\n\t\"poll\",\n\t\"cron\"\n]);\nconst TriggerTargetKindSchema = z.enum([\"workflow\", \"agent\"]);\nconst TriggerListItemSchema = z.object({\n\tkey: z.string(),\n\ttype: TriggerTypeSchema,\n\troute: z.string().optional(),\n\twebhookUrl: z.string().url().optional(),\n\ttargetKind: TriggerTargetKindSchema,\n\tworkflowKey: z.string().optional(),\n\tagentKey: z.string().optional()\n});\nconst TriggerListResponseSchema = z.object({ triggers: z.array(TriggerListItemSchema) });\nconst TriggerListQuerySchema = z.object({ endpoint: z.string().min(1).optional() });\nconst TriggerDetailResponseSchema = TriggerListItemSchema;\n//#endregion\n//#region src/schemas/members.ts\nconst OrganizationMemberRoleSchema = z.enum([\n\t\"owner\",\n\t\"admin\",\n\t\"builder\"\n]);\nconst OrganizationMemberStatusSchema = z.enum([\n\t\"invited\",\n\t\"active\",\n\t\"rejected\",\n\t\"suspended\"\n]);\nconst InvitableOrganizationMemberRoleSchema = z.enum([\"admin\", \"builder\"]);\nconst isoDateTime$4 = z.string().datetime();\nconst OrganizationMemberSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\temail: z.string().email(),\n\trole: OrganizationMemberRoleSchema,\n\tstatus: OrganizationMemberStatusSchema,\n\tavatarUrl: z.string().optional(),\n\tjoinedAt: isoDateTime$4.optional(),\n\tlastActiveAt: isoDateTime$4.nullable().optional()\n});\nconst ListOrganizationMembersResponseSchema = z.array(OrganizationMemberSchema);\nconst InviteOrganizationMembersRequestSchema = z.object({\n\temails: z.array(z.string().trim().email()).min(1),\n\trole: InvitableOrganizationMemberRoleSchema\n});\nconst InviteOrganizationMemberResultStatusSchema = z.enum([\n\t\"sent\",\n\t\"already_member\",\n\t\"pending\",\n\t\"invalid\"\n]);\nconst InviteOrganizationMemberResultSchema = z.object({\n\temail: z.string(),\n\tstatus: InviteOrganizationMemberResultStatusSchema,\n\tinvitationId: z.string().optional()\n});\nconst InviteOrganizationMembersResponseSchema = z.array(InviteOrganizationMemberResultSchema);\nconst UpdateOrganizationMemberRequestSchema = z.object({ role: InvitableOrganizationMemberRoleSchema });\nconst UpdateOrganizationMemberResponseSchema = OrganizationMemberSchema;\nconst OrganizationInvitationSchema = z.object({\n\tid: z.string(),\n\torganizationName: z.string(),\n\torganizationSlug: OrganizationSlugSchema,\n\tinvitedByName: z.string().optional(),\n\tinvitedByEmail: z.string().email().optional(),\n\trole: OrganizationMemberRoleSchema\n});\nconst ListOrganizationInvitationsResponseSchema = z.array(OrganizationInvitationSchema);\nconst AcceptOrganizationInvitationResponseSchema = UserOrganizationSchema;\nconst DeclineOrganizationInvitationResponseSchema = z.object({ success: z.literal(true) });\n/** Web path to auto-accept an invitation after sign-in (used in invite emails). */\nfunction organizationInvitationAcceptPath(invitationId) {\n\treturn `/organization/invitations?${new URLSearchParams({ accept: invitationId }).toString()}`;\n}\n//#endregion\n//#region src/schemas/api-keys.ts\nconst isoDateTime$3 = z.string().datetime();\nconst ApiKeyCreatorSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\temail: z.string().email().optional(),\n\tavatarUrl: z.string().optional(),\n\t/** True when the creator user row no longer exists. */\n\tdeleted: z.boolean().optional()\n});\nconst ApiKeySummarySchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tkeyPreview: z.string(),\n\tcreatedAt: isoDateTime$3,\n\tcreatedBy: ApiKeyCreatorSchema,\n\tisCreatedByCurrentUser: z.boolean()\n});\nconst ListApiKeysResponseSchema = z.array(ApiKeySummarySchema);\nconst CreateApiKeyRequestSchema = z.object({ name: z.string().trim().min(1).max(128) });\nconst CreateApiKeyResponseSchema = ApiKeySummarySchema.extend({ secret: z.string() });\n//#endregion\n//#region src/schemas/project-members.ts\nconst ProjectUserRoleSchema = z.enum([\"admin\", \"builder\"]);\nconst ProjectInvitePermissionSchema = z.enum([\"admin\", \"all\"]);\nconst ProjectMemberStatusSchema = z.enum([\"active\", \"invited\"]);\nconst isoDateTime$2 = z.string().datetime();\nconst ProjectMemberSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.string(),\n\tname: z.string(),\n\temail: z.string().email(),\n\trole: ProjectUserRoleSchema,\n\tstatus: ProjectMemberStatusSchema,\n\timage: z.string().nullable(),\n\tcreatedAt: isoDateTime$2,\n\tisCurrentUser: z.boolean().optional()\n});\nconst ListProjectMembersResponseSchema = z.array(ProjectMemberSchema);\nconst InviteProjectMembersRequestSchema = z.object({\n\temails: z.array(z.string().trim().email()).min(1),\n\trole: ProjectUserRoleSchema\n});\nconst InviteProjectMemberResultStatusSchema = z.enum([\n\t\"added\",\n\t\"already_member\",\n\t\"not_org_member\",\n\t\"invalid\"\n]);\nconst InviteProjectMemberResultSchema = z.object({\n\temail: z.string(),\n\tstatus: InviteProjectMemberResultStatusSchema\n});\nconst InviteProjectMembersResponseSchema = z.array(InviteProjectMemberResultSchema);\nconst UpdateProjectMemberRequestSchema = z.object({ role: ProjectUserRoleSchema });\nconst UpdateProjectMemberResponseSchema = ProjectMemberSchema;\nconst ProjectSettingsSchema = z.object({\n\tdescription: z.string(),\n\tdefaultRole: ProjectUserRoleSchema,\n\tinvitePermission: ProjectInvitePermissionSchema\n});\nconst UpdateProjectSettingsRequestSchema = z.object({\n\tdescription: z.string().optional(),\n\tdefaultRole: ProjectUserRoleSchema.optional(),\n\tinvitePermission: ProjectInvitePermissionSchema.optional()\n}).refine((data) => data.description !== void 0 || data.defaultRole !== void 0 || data.invitePermission !== void 0, { message: \"At least one field is required\" });\nconst ProjectSettingsResponseSchema = ProjectSettingsSchema;\n//#endregion\n//#region src/schemas/user-avatar.ts\n/** Custom avatar override; null means fall back to OAuth `users.image`. */\nconst UserAvatarSchema = z.object({ url: z.url().nullable() });\nconst UserAvatarPatchSchema = z.object({ \n/** Storage key returned from presign; null removes the custom override. */\nstorageKey: z.string().min(1).nullable() });\nconst PresignUserAvatarRequestSchema = z.object({ contentType: z.string().trim().min(1) });\nconst PresignUserAvatarResponseSchema = z.object({\n\tuploadUrl: z.url(),\n\tstorageKey: z.string().min(1)\n});\n//#endregion\n//#region src/schemas/user-preferences.ts\nconst UserInterfaceThemeSchema = z.enum([\n\t\"system\",\n\t\"light\",\n\t\"dark\"\n]);\nconst UserSurfaceContrastSchema = z.enum([\"off\", \"on\"]);\nconst UserWorkspaceLayoutModeSchema = z.enum([\"default\", \"linear\"]);\nconst UserWorkspaceFontSizeSchema = z.enum([\"default\", \"large\"]);\nconst UserSidebarNavIconVisibilitySchema = z.enum([\"hidden\", \"visible\"]);\nconst UserSidebarFooterChatRowVisibilitySchema = z.enum([\"hidden\", \"visible\"]);\nconst UserWorkspaceFavoriteKindSchema = z.enum([\n\t\"agent\",\n\t\"workflow\",\n\t\"skill\",\n\t\"run\"\n]);\nconst UserWorkspaceFavoriteSchema = z.object({\n\tkind: UserWorkspaceFavoriteKindSchema,\n\tresourceId: z.string().min(1)\n});\nconst UserSidebarPreferencesSchema = z.object({\n\tnavIconVisibility: UserSidebarNavIconVisibilitySchema,\n\tfooterChatRowVisibility: UserSidebarFooterChatRowVisibilitySchema,\n\thiddenNavItemIds: z.array(z.string()),\n\ttopNavItemOrderIds: z.array(z.string()),\n\tworkspaceNavItemOrderIds: z.array(z.string())\n});\nconst UserPreferencesSchema = z.object({\n\tinterfaceTheme: UserInterfaceThemeSchema,\n\tsurfaceContrast: UserSurfaceContrastSchema,\n\tlayoutMode: UserWorkspaceLayoutModeSchema,\n\tfontSize: UserWorkspaceFontSizeSchema,\n\tsidebar: UserSidebarPreferencesSchema,\n\tfavorites: z.array(UserWorkspaceFavoriteSchema),\n\tprojectOrderIds: z.array(z.string()),\n\tprojectDotColors: z.record(z.string(), z.string()),\n\tonboardingTabVisible: z.boolean()\n});\nconst UserSidebarPreferencesPatchSchema = z.object({\n\tnavIconVisibility: UserSidebarNavIconVisibilitySchema.optional(),\n\tfooterChatRowVisibility: UserSidebarFooterChatRowVisibilitySchema.optional(),\n\thiddenNavItemIds: z.array(z.string()).optional(),\n\ttopNavItemOrderIds: z.array(z.string()).optional(),\n\tworkspaceNavItemOrderIds: z.array(z.string()).optional()\n});\nconst UserPreferencesPatchSchema = z.object({\n\tinterfaceTheme: UserInterfaceThemeSchema.optional(),\n\tsurfaceContrast: UserSurfaceContrastSchema.optional(),\n\tlayoutMode: UserWorkspaceLayoutModeSchema.optional(),\n\tfontSize: UserWorkspaceFontSizeSchema.optional(),\n\tsidebar: UserSidebarPreferencesPatchSchema.optional(),\n\tfavorites: z.array(UserWorkspaceFavoriteSchema).optional(),\n\tprojectOrderIds: z.array(z.string()).optional(),\n\tprojectDotColors: z.record(z.string(), z.string()).optional(),\n\tonboardingTabVisible: z.boolean().optional()\n}).refine((value) => value.interfaceTheme !== void 0 || value.surfaceContrast !== void 0 || value.layoutMode !== void 0 || value.fontSize !== void 0 || value.sidebar !== void 0 || value.favorites !== void 0 || value.projectOrderIds !== void 0 || value.projectDotColors !== void 0 || value.onboardingTabVisible !== void 0, { message: \"At least one preference field is required\" });\nconst DEFAULT_USER_SIDEBAR_PREFERENCES = {\n\tnavIconVisibility: \"visible\",\n\tfooterChatRowVisibility: \"visible\",\n\thiddenNavItemIds: [\"registry\"],\n\ttopNavItemOrderIds: [],\n\tworkspaceNavItemOrderIds: []\n};\nconst DEFAULT_USER_PREFERENCES = {\n\tinterfaceTheme: \"system\",\n\tsurfaceContrast: \"on\",\n\tlayoutMode: \"linear\",\n\tfontSize: \"default\",\n\tsidebar: DEFAULT_USER_SIDEBAR_PREFERENCES,\n\tfavorites: [],\n\tprojectOrderIds: [],\n\tprojectDotColors: {},\n\tonboardingTabVisible: true\n};\nfunction normalizeInterfaceTheme(value) {\n\tif (value === \"light\" || value === \"dark\") return value;\n\treturn \"system\";\n}\nfunction normalizeSurfaceContrast(value) {\n\treturn value === \"off\" ? \"off\" : \"on\";\n}\nfunction normalizeLayoutMode(value) {\n\treturn value === \"default\" ? \"default\" : \"linear\";\n}\nfunction normalizeFontSize(value) {\n\treturn value === \"large\" ? \"large\" : \"default\";\n}\nfunction normalizeStringList(value) {\n\tif (!Array.isArray(value)) return [];\n\treturn Array.from(new Set(value.filter((item) => typeof item === \"string\")));\n}\nfunction normalizeHiddenNavItemIds(value) {\n\tif (!Array.isArray(value)) return DEFAULT_USER_SIDEBAR_PREFERENCES.hiddenNavItemIds;\n\treturn normalizeStringList(value);\n}\nfunction normalizeSidebarPreferences(value) {\n\tif (!value || typeof value !== \"object\") return DEFAULT_USER_SIDEBAR_PREFERENCES;\n\tconst sidebar = value;\n\treturn {\n\t\tnavIconVisibility: sidebar.navIconVisibility === \"visible\" ? \"visible\" : \"hidden\",\n\t\tfooterChatRowVisibility: sidebar.footerChatRowVisibility === \"hidden\" ? \"hidden\" : \"visible\",\n\t\thiddenNavItemIds: normalizeHiddenNavItemIds(sidebar.hiddenNavItemIds),\n\t\ttopNavItemOrderIds: normalizeStringList(sidebar.topNavItemOrderIds),\n\t\tworkspaceNavItemOrderIds: normalizeStringList(sidebar.workspaceNavItemOrderIds)\n\t};\n}\nfunction isWorkspaceFavoriteKind(value) {\n\treturn value === \"agent\" || value === \"workflow\" || value === \"skill\" || value === \"run\";\n}\nfunction normalizeFavorites(value) {\n\tif (!Array.isArray(value)) return [];\n\tconst seenKeys = /* @__PURE__ */ new Set();\n\tconst favorites = [];\n\tfor (const item of value) {\n\t\tif (!item || typeof item !== \"object\") continue;\n\t\tconst favorite = item;\n\t\tif (typeof favorite.kind !== \"string\" || !isWorkspaceFavoriteKind(favorite.kind) || typeof favorite.resourceId !== \"string\" || favorite.resourceId.length === 0) continue;\n\t\tconst key = `${favorite.kind}:${favorite.resourceId}`;\n\t\tif (seenKeys.has(key)) continue;\n\t\tseenKeys.add(key);\n\t\tfavorites.push({\n\t\t\tkind: favorite.kind,\n\t\t\tresourceId: favorite.resourceId\n\t\t});\n\t}\n\treturn favorites;\n}\nfunction normalizeProjectDotColors(value) {\n\tif (!value || typeof value !== \"object\" || Array.isArray(value)) return {};\n\treturn Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[0] === \"string\" && typeof entry[1] === \"string\"));\n}\nfunction normalizeOnboardingTabVisible(value) {\n\treturn typeof value === \"boolean\" ? value : DEFAULT_USER_PREFERENCES.onboardingTabVisible;\n}\nfunction normalizeUserPreferences(value) {\n\tif (!value || typeof value !== \"object\") return DEFAULT_USER_PREFERENCES;\n\tconst preferences = value;\n\treturn UserPreferencesSchema.parse({\n\t\tinterfaceTheme: normalizeInterfaceTheme(preferences.interfaceTheme),\n\t\tsurfaceContrast: normalizeSurfaceContrast(preferences.surfaceContrast),\n\t\tlayoutMode: normalizeLayoutMode(preferences.layoutMode),\n\t\tfontSize: normalizeFontSize(preferences.fontSize),\n\t\tsidebar: normalizeSidebarPreferences(preferences.sidebar),\n\t\tfavorites: normalizeFavorites(preferences.favorites),\n\t\tprojectOrderIds: normalizeStringList(preferences.projectOrderIds),\n\t\tprojectDotColors: normalizeProjectDotColors(preferences.projectDotColors),\n\t\tonboardingTabVisible: normalizeOnboardingTabVisible(preferences.onboardingTabVisible)\n\t});\n}\nfunction mergeUserPreferences(current, patch) {\n\treturn normalizeUserPreferences({\n\t\t...current,\n\t\t...patch,\n\t\tsidebar: patch.sidebar ? {\n\t\t\t...current.sidebar,\n\t\t\t...patch.sidebar\n\t\t} : current.sidebar\n\t});\n}\n//#endregion\n//#region src/schemas/organization-branding.ts\nconst OrganizationLogoVariantSchema = z.enum([\"light\", \"dark\"]);\nconst DEFAULT_LOGO_HEIGHT_PX = 20;\nconst MIN_LOGO_HEIGHT_PX = 14;\nconst MAX_LOGO_HEIGHT_PX = 32;\nconst OrganizationSidebarBrandingSchema = z.object({\n\tcustomLogoEnabled: z.boolean(),\n\tcustomLogoExplicitlyDisabled: z.boolean(),\n\tlogoLightUrl: z.url().nullable(),\n\tlogoDarkUrl: z.url().nullable(),\n\tlogoHeightPx: z.number().int().min(14).max(32)\n});\nconst OrganizationSidebarBrandingPatchSchema = z.object({\n\tcustomLogoEnabled: z.boolean().optional(),\n\tcustomLogoExplicitlyDisabled: z.boolean().optional(),\n\tlogoLightStorageKey: z.string().min(1).nullable().optional(),\n\tlogoDarkStorageKey: z.string().min(1).nullable().optional(),\n\tlogoHeightPx: z.number().int().min(14).max(32).optional()\n}).refine((value) => value.customLogoEnabled !== void 0 || value.customLogoExplicitlyDisabled !== void 0 || value.logoLightStorageKey !== void 0 || value.logoDarkStorageKey !== void 0 || value.logoHeightPx !== void 0, { message: \"At least one branding field is required\" });\nconst PresignOrgLogoRequestSchema = z.object({\n\tvariant: OrganizationLogoVariantSchema,\n\tcontentType: z.string().trim().min(1)\n});\nconst PresignOrgLogoResponseSchema = z.object({\n\tuploadUrl: z.url(),\n\tstorageKey: z.string().min(1)\n});\nconst DEFAULT_ORGANIZATION_SIDEBAR_BRANDING = {\n\tcustomLogoEnabled: false,\n\tcustomLogoExplicitlyDisabled: false,\n\tlogoLightUrl: null,\n\tlogoDarkUrl: null,\n\tlogoHeightPx: 20\n};\nfunction normalizeLogoUrl(value) {\n\tif (typeof value !== \"string\") return null;\n\ttry {\n\t\tconst url = new URL(value);\n\t\tif (url.protocol !== \"http:\" && url.protocol !== \"https:\") return null;\n\t\treturn url.toString();\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction normalizeCustomLogoEnabled(value, branding) {\n\tconst hasCustomLogo = Boolean(normalizeLogoUrl(branding.logoLightUrl) || normalizeLogoUrl(branding.logoDarkUrl));\n\tif (branding.customLogoExplicitlyDisabled === true) return false;\n\tif (typeof value === \"boolean\") return value || hasCustomLogo;\n\treturn hasCustomLogo;\n}\nfunction normalizeLogoHeightPx(value) {\n\tif (typeof value !== \"number\" || !Number.isFinite(value)) return DEFAULT_ORGANIZATION_SIDEBAR_BRANDING.logoHeightPx;\n\treturn Math.min(32, Math.max(14, Math.round(value)));\n}\nfunction normalizeOrganizationSidebarBranding(value) {\n\tif (!value || typeof value !== \"object\") return DEFAULT_ORGANIZATION_SIDEBAR_BRANDING;\n\tconst branding = value;\n\treturn OrganizationSidebarBrandingSchema.parse({\n\t\tcustomLogoEnabled: normalizeCustomLogoEnabled(branding.customLogoEnabled, branding),\n\t\tcustomLogoExplicitlyDisabled: branding.customLogoExplicitlyDisabled === true,\n\t\tlogoLightUrl: normalizeLogoUrl(branding.logoLightUrl),\n\t\tlogoDarkUrl: normalizeLogoUrl(branding.logoDarkUrl),\n\t\tlogoHeightPx: normalizeLogoHeightPx(branding.logoHeightPx)\n\t});\n}\nfunction mergeOrganizationSidebarBranding(current, patch) {\n\treturn normalizeOrganizationSidebarBranding({\n\t\t...current,\n\t\t...patch\n\t});\n}\n//#endregion\n//#region src/schemas/project-artifacts.ts\nconst ProjectArtifactStatusSchema = z.enum([\"pending\", \"ready\"]);\nconst isoDateTime$1 = z.string().datetime();\nconst ProjectArtifactSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.string(),\n\tstorageKey: z.string(),\n\tstatus: ProjectArtifactStatusSchema,\n\tcreatedAt: isoDateTime$1,\n\tupdatedAt: isoDateTime$1\n});\nconst CreateProjectArtifactResponseSchema = z.object({\n\tartifact: ProjectArtifactSchema,\n\tuploadUrl: z.string().url(),\n\texpiresInSeconds: z.number().int().positive()\n});\nconst CompleteProjectArtifactResponseSchema = z.object({\n\tartifact: ProjectArtifactSchema,\n\tproject: ProjectSchema\n});\nconst DownloadActiveProjectArtifactResponseSchema = z.object({\n\tartifactId: z.string(),\n\tdownloadUrl: z.string().url(),\n\texpiresInSeconds: z.number().int().positive()\n});\nconst ProjectDeploymentSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.string(),\n\tversion: z.number().int().positive(),\n\tdeployedBy: z.string().nullable(),\n\tdeployedByEmail: z.string().optional(),\n\tdeployedByAvatarUrl: z.string().optional(),\n\tcreatedAt: isoDateTime$1,\n\tactive: z.boolean()\n});\nconst ListProjectDeploymentsResponseSchema = z.array(ProjectDeploymentSchema);\n//#endregion\n//#region src/schemas/platform-resources.ts\nconst PLATFORM_RESOURCE_UNSUPPORTED_TEXT = \"Not Supported\";\nconst PLATFORM_RESOURCE_UNSUPPORTED_TIMESTAMP = \"0000\";\nconst PLATFORM_RESOURCE_UNSUPPORTED_COUNT = 0;\nconst optionalCount = z.number().int().nonnegative().nullable().optional();\nconst optionalTimestamp = z.string().nullable().optional();\nconst AgentSummarySchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tprojectId: z.string().min(1),\n\tupdatedAt: z.string().min(1),\n\tdescription: z.string().optional(),\n\tsourcePath: z.string().min(1).optional(),\n\tmodel: z.string().optional(),\n\tsystemPrompt: z.string().optional(),\n\ttoolCount: optionalCount,\n\tcredentialCount: optionalCount,\n\tapps: z.array(z.object({\n\t\tid: z.string(),\n\t\tlabel: z.string()\n\t})).optional(),\n\tlastRunAt: optionalTimestamp\n});\nconst WorkflowSummarySchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tprojectId: z.string().min(1),\n\tupdatedAt: z.string().min(1),\n\tdescription: z.string().optional(),\n\tsourcePath: z.string().min(1).optional(),\n\tlastRunAt: optionalTimestamp\n});\nconst SkillSummarySchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tprojectId: z.string().min(1),\n\tupdatedAt: z.string().min(1),\n\tdescription: z.string().optional(),\n\tsourcePath: z.string().min(1).optional()\n});\nconst AgentSummaryListResponseSchema = z.array(AgentSummarySchema);\nconst AgentSummaryDetailResponseSchema = AgentSummarySchema.nullable();\nconst WorkflowSummaryListResponseSchema = z.array(WorkflowSummarySchema);\nconst WorkflowSummaryDetailResponseSchema = WorkflowSummarySchema.nullable();\nconst SkillSummaryListResponseSchema = z.array(SkillSummarySchema);\nconst SkillSummaryDetailResponseSchema = SkillSummarySchema.nullable();\nconst RecentResourceKindSchema = z.enum([\n\t\"agent\",\n\t\"workflow\",\n\t\"skill\"\n]);\nconst RecentResourceSourceSchema = z.enum([\"owned\", \"shared\"]);\nconst RecentResourceSchema = z.object({\n\tid: z.string().min(1),\n\tresourceKind: RecentResourceKindSchema,\n\tresourceId: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().optional(),\n\tprojectId: z.string().min(1),\n\tprojectName: z.string().min(1),\n\tsourcePath: z.string().min(1).optional(),\n\tsource: RecentResourceSourceSchema,\n\tlastOpenedAt: z.string().min(1),\n\tlastModifiedAt: z.string().min(1)\n});\nconst RecentResourceListResponseSchema = z.array(RecentResourceSchema);\n//#endregion\n//#region src/schemas/project-files.ts\nconst isoDateTime = z.string().datetime();\nconst sha256Hex = z.string().regex(/^[a-f0-9]{64}$/, \"Expected a lowercase hex sha256 digest\");\n/**\n* A single entry in a deploy's file tree, as served to the dashboard. Carries\n* no contents: `id` is a stable, path-derived handle used for selection and\n* `?file=` deep links; `hash` is the content address used to fetch the bytes\n* lazily and to cache them immutably in the browser.\n*/\nconst ProjectFileSummarySchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1),\n\thash: sha256Hex\n});\n/** Maps a runtime resource slug (agent/workflow/skill) to its source file path. */\nconst ProjectSourceResourceRefSchema = z.object({\n\tslug: z.string().min(1),\n\tpath: z.string().min(1)\n});\nconst ProjectSourceResourcesSchema = z.object({\n\tagents: z.array(ProjectSourceResourceRefSchema).default([]),\n\tworkflows: z.array(ProjectSourceResourceRefSchema).default([]),\n\tskills: z.array(ProjectSourceResourceRefSchema).default([])\n});\nconst emptyResources = () => ({\n\tagents: [],\n\tworkflows: [],\n\tskills: []\n});\n/** Response for the file-tree listing of a project's active deploy. */\nconst ListProjectFilesResponseSchema = z.object({\n\tartifactId: z.string().nullable(),\n\tfiles: z.array(ProjectFileSummarySchema),\n\tresources: ProjectSourceResourcesSchema.default(emptyResources())\n});\n/**\n* Raw source file as collected by the CLI at deploy time. `hash` is the content\n* address (sha256 of `contents`) used for dedup and immutable storage.\n*/\nconst ProjectSourceFileSchema = z.object({\n\tpath: z.string().min(1),\n\tcontents: z.string(),\n\thash: sha256Hex\n});\n/** A blob the CLI may need to upload, keyed by content hash. */\nconst SourceBlobRefSchema = z.object({\n\thash: sha256Hex,\n\tsize: z.number().int().nonnegative()\n});\n/** Request: ask the platform which blobs are missing and get presigned PUTs. */\nconst PresignProjectSourceRequestSchema = z.object({ blobs: z.array(SourceBlobRefSchema) });\nconst PresignedBlobUploadSchema = z.object({\n\thash: sha256Hex,\n\turl: z.string().url()\n});\n/** Response: presigned PUTs for the subset of blobs not already stored. */\nconst PresignProjectSourceResponseSchema = z.object({ uploads: z.array(PresignedBlobUploadSchema) });\n/** A file reference in a manifest upload: where the path's content lives. */\nconst ManifestFileRefSchema = z.object({\n\tpath: z.string().min(1),\n\thash: sha256Hex\n});\n/** Request body the CLI sends to finalize a deploy's source manifest. */\nconst UploadProjectSourceManifestRequestSchema = z.object({ files: z.array(ManifestFileRefSchema) });\nconst UploadProjectSourceResponseSchema = z.object({\n\tok: z.literal(true),\n\tfileCount: z.number().int().nonnegative()\n});\n/** A file entry as persisted in the stored manifest (path-derived id added). */\nconst StoredManifestFileSchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1),\n\thash: sha256Hex\n});\n/** The immutable per-deploy manifest persisted to object storage. */\nconst StoredProjectSourceManifestSchema = z.object({\n\tfiles: z.array(StoredManifestFileSchema),\n\tgeneratedAt: isoDateTime\n});\nconst LANGUAGE_BY_EXTENSION = {\n\tts: \"typescript\",\n\tmts: \"typescript\",\n\tcts: \"typescript\",\n\ttsx: \"tsx\",\n\tjs: \"javascript\",\n\tmjs: \"javascript\",\n\tcjs: \"javascript\",\n\tjsx: \"jsx\",\n\tjson: \"json\",\n\tmd: \"markdown\",\n\tmdx: \"markdown\",\n\tcss: \"css\",\n\thtml: \"html\",\n\tyml: \"yaml\",\n\tyaml: \"yaml\",\n\ttoml: \"toml\",\n\ttxt: \"text\",\n\tsh: \"shell\",\n\tenv: \"shell\"\n};\n/** Best-effort syntax-highlight hint derived from a file path's extension. */\nfunction projectFileLanguage(path) {\n\tconst base = path.split(\"/\").at(-1) ?? path;\n\treturn LANGUAGE_BY_EXTENSION[base.includes(\".\") ? (base.split(\".\").at(-1) ?? \"\").toLowerCase() : \"\"];\n}\n/** Stable, path-derived file id (used by the web for selection + deep links). */\nfunction projectFileId(path) {\n\treturn `file-${path.trim().replace(/^\\.?\\/+/, \"\").replace(/[^a-zA-Z0-9]+/g, \"-\").replace(/^-+|-+$/g, \"\").toLowerCase()}`;\n}\n//#endregion\n//#region src/schemas/agent-memory-files.ts\n/** A single memory file exposed to the dashboard (no contents in list responses). */\nconst AgentMemoryFileSummarySchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1)\n});\nconst ListAgentMemoryFilesResponseSchema = z.object({ files: z.array(AgentMemoryFileSummarySchema) });\n/** Stable, path-derived file id (used by the web for selection + deep links). */\nfunction agentMemoryFileId(path) {\n\treturn projectFileId(path);\n}\n//#endregion\n//#region src/mappers/organizations.ts\nfunction mapOrganization(row) {\n\treturn OrganizationSchema.parse({\n\t\tid: row.id,\n\t\tname: row.name,\n\t\tslug: row.slug,\n\t\tverified: row.verifiedAt != null,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tupdatedAt: row.updatedAt.toISOString()\n\t});\n}\nfunction mapProject(row) {\n\treturn ProjectSchema.parse({\n\t\tid: row.id,\n\t\torganizationId: row.organizationId,\n\t\tname: row.name,\n\t\tslug: row.slug,\n\t\tdescription: row.description,\n\t\tstatus: row.status,\n\t\tbaseUrl: row.baseUrl,\n\t\truntimeId: row.runtimeId,\n\t\tlastError: row.lastError,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tupdatedAt: row.updatedAt.toISOString()\n\t});\n}\nfunction mapUserOrganization(row) {\n\treturn UserOrganizationSchema.parse({\n\t\torganization: mapOrganization(row.organization),\n\t\trole: row.role\n\t});\n}\n//#endregion\n//#region src/mappers/members.ts\nfunction mapOrganizationMember(row) {\n\treturn OrganizationMemberSchema.parse({\n\t\tid: row.id,\n\t\tname: row.name,\n\t\temail: row.email,\n\t\trole: row.role,\n\t\tstatus: row.status,\n\t\t...row.image ? { avatarUrl: row.image } : {},\n\t\tjoinedAt: row.createdAt.toISOString(),\n\t\tlastActiveAt: null\n\t});\n}\nfunction mapOrganizationInvitation(row) {\n\treturn OrganizationInvitationSchema.parse({\n\t\tid: row.id,\n\t\torganizationName: row.organizationName,\n\t\torganizationSlug: row.organizationSlug,\n\t\trole: row.role,\n\t\t...row.invitedByName ? { invitedByName: row.invitedByName } : {},\n\t\t...row.invitedByEmail ? { invitedByEmail: row.invitedByEmail } : {}\n\t});\n}\n//#endregion\n//#region src/mappers/project-members.ts\nfunction mapProjectMember(row, options) {\n\treturn ProjectMemberSchema.parse({\n\t\tid: row.id,\n\t\tprojectId: row.projectId,\n\t\tname: row.name,\n\t\temail: row.email,\n\t\trole: row.role,\n\t\tstatus: row.status,\n\t\timage: row.image,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tisCurrentUser: options?.isCurrentUser\n\t});\n}\nfunction mapProjectSettings(row) {\n\treturn {\n\t\tdescription: row.description ?? \"\",\n\t\tdefaultRole: row.defaultMemberRole,\n\t\tinvitePermission: row.invitePermission\n\t};\n}\n//#endregion\n//#region src/mappers/project-artifacts.ts\nfunction mapProjectArtifact(row) {\n\treturn ProjectArtifactSchema.parse({\n\t\tid: row.id,\n\t\tprojectId: row.projectId,\n\t\tstorageKey: row.storageKey,\n\t\tstatus: row.status,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tupdatedAt: row.updatedAt.toISOString()\n\t});\n}\n//#endregion\n//#region src/mappers/project-deployments.ts\nfunction mapProjectDeployment(row) {\n\treturn ProjectDeploymentSchema.parse({\n\t\tid: row.id,\n\t\tprojectId: row.projectId,\n\t\tversion: row.version,\n\t\tdeployedBy: row.deployedByName,\n\t\t...row.deployedByEmail ? { deployedByEmail: row.deployedByEmail } : {},\n\t\t...row.deployedByAvatarUrl ? { deployedByAvatarUrl: row.deployedByAvatarUrl } : {},\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tactive: row.active\n\t});\n}\n//#endregion\nexport { ACTIVE_ORG_COOKIE, ACTIVE_ORG_HEADER, APP_SLUG_TAKEN_MESSAGE, AcceptOrganizationInvitationResponseSchema, ActiveOrganizationResponseSchema, AgentListResponseSchema, AgentMemoryFileSummarySchema, AgentSessionChatStateQuerySchema, AgentSessionChatStateResponseSchema, AgentSessionDetailQuerySchema, AgentSessionDetailResponseSchema, AgentSessionListQuerySchema, AgentSessionListResponseSchema, AgentSummaryDetailResponseSchema, AgentSummaryListResponseSchema, AgentSummarySchema, AgentTriggerOriginSchema, AgentTriggerStatusSchema, AgentTriggerSummaryListResponseSchema, AgentTriggerSummarySchema, AgentTriggerTypeSchema, ApiKeyCreatorSchema, ApiKeySummarySchema, AppAuthKindSchema, AppCatalogEntrySchema, AppCatalogMetadataSchema, AppCredentialConnectionKindSchema, AppCredentialFieldSchema, AppCredentialFieldsSchema, AppCredentialScopeSchema, AppCredentialSummarySchema, AppGatewaySchema, AppRecordSchema, AppSeedEntrySchema, AppSlugAvailabilityQuerySchema, AppSlugAvailabilityResponseSchema, AppSlugSchema, AppSourceSchema, BindChannelBodySchema, CREDENTIAL_AUTH_KINDS, CREDENTIAL_SCOPE_TYPES, CatalogActionDetailResponseSchema, CatalogActionDetailSchema, CatalogActionSummarySchema, CatalogActionsPageResponseSchema, CatalogActionsPageSchema, CatalogAppDetailResponseSchema, CatalogAppDetailSchema, CatalogAppSummarySchema, CatalogAppsPageResponseSchema, CatalogAppsPageSchema, ChannelAccountListResponseSchema, ChannelAccountMetadataSchema, ChannelAccountSchema, ChannelBindingKindSchema, ChannelBindingSchema, ChannelCapabilitiesSchema, ChannelCardSupportSchema, ChannelConnectionListResponseSchema, ChannelConnectionSchema, ChannelDirectoryEntrySchema, ChannelDirectoryListResponseSchema, ChannelListenModeSchema, ChannelPlatformKeySchema, ChannelPlatformSchema, ChannelReactionSupportSchema, ChannelStreamingSupportSchema, ClaimableOrganizationSlugSchema, CompleteProjectArtifactResponseSchema, ConnectAuthorizeUrlResponseSchema, ConnectProvidersResponseSchema, CreateApiKeyRequestSchema, CreateApiKeyResponseSchema, CreateCredentialInstanceBodySchema, CreateCredentialsRequestSchema, CreateCredentialsResponseSchema, CreateCustomAppRequestSchema, CreateCustomAppResponseSchema, CreateOrganizationRequestSchema, CreateOrganizationResponseSchema, CreateProjectArtifactResponseSchema, CreateProjectRequestSchema, CreateProjectResponseSchema, CredentialAuthKindSchema, CredentialInstanceListResponseSchema, CredentialInstanceRecordSchema, CredentialScopeTypeSchema, CredentialTargetsFieldsSchema, CurrentOrganizationResponseSchema, CustomAppDetailSchema, DEFAULT_LOGO_HEIGHT_PX, DEFAULT_ORGANIZATION_SIDEBAR_BRANDING, DEFAULT_USER_PREFERENCES, DISCOVERY_CONVENTIONS, DeclineOrganizationInvitationResponseSchema, DownloadActiveProjectArtifactResponseSchema, ErrorResponseCodeSchema, ErrorResponseSchema, ExecuteKeystrokeToolRequestSchema, GatewayAttachmentListResponseSchema, GatewayAttachmentRecordSchema, GetCredentialResponseSchema, GetCustomAppResponseSchema, HealthResponseSchema, HistoryAgentSessionDetailSchema, HistoryRunCancelResponseSchema, HistoryRunDetailResponseSchema, HistoryRunDetailSchema, HistoryRunKindSchema, HistoryRunListQuerySchema, HistoryRunListResponseSchema, HistoryRunSchema, HistoryRunStatusSchema, HistoryTraceSchema, HistoryWorkflowRunDetailSchema, InvitableOrganizationMemberRoleSchema, InviteOrganizationMembersRequestSchema, InviteOrganizationMembersResponseSchema, InviteProjectMembersRequestSchema, InviteProjectMembersResponseSchema, KeystrokeCredentialSchema, ListAgentMemoryFilesResponseSchema, ListApiKeysResponseSchema, ListAppsResponseSchema, ListCredentialsResponseSchema, ListMcpAppsResponseSchema, ListOrganizationInvitationsResponseSchema, ListOrganizationMembersResponseSchema, ListOrganizationsResponseSchema, ListProjectDeploymentsResponseSchema, ListProjectFilesResponseSchema, ListProjectMembersResponseSchema, ListProjectMetricsResponseSchema, ListProjectsResponseSchema, MAX_LOGO_HEIGHT_PX, MIN_LOGO_HEIGHT_PX, ManifestFileRefSchema, MarketingContactCompanySizeSchema, McpAppSchema, McpConnectionStatusSchema, NewChannelBindingInputSchema, OAuthPermissionModeSchema, OAuthScopeOptionSchema, ORGANIZATION_SLUG_TAKEN_MESSAGE, OrganizationInvitationSchema, OrganizationLogoVariantSchema, OrganizationMemberRoleSchema, OrganizationMemberSchema, OrganizationMemberStatusSchema, OrganizationSchema, OrganizationSidebarBrandingPatchSchema, OrganizationSidebarBrandingSchema, OrganizationSlugErrorCodeSchema, OrganizationSlugSchema, OrganizationUserRoleSchema, PLATFORM_RESOURCE_UNSUPPORTED_COUNT, PLATFORM_RESOURCE_UNSUPPORTED_TEXT, PLATFORM_RESOURCE_UNSUPPORTED_TIMESTAMP, PROJECT_PING_TIMEOUT_MS, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS, PROJECT_REACHABILITY_RETRY_MS, PROJECT_SLUG_TAKEN_MESSAGE, PlatformInfoResponseSchema, PollRunRequestSchema, PollRunResponseSchema, PresignOrgLogoRequestSchema, PresignOrgLogoResponseSchema, PresignProjectSourceRequestSchema, PresignProjectSourceResponseSchema, PresignUserAvatarRequestSchema, PresignUserAvatarResponseSchema, PresignedBlobUploadSchema, ProjectArtifactSchema, ProjectArtifactStatusSchema, ProjectDeploymentSchema, ProjectFileSummarySchema, ProjectInvitePermissionSchema, ProjectListMetricsSchema, ProjectMemberSchema, ProjectMemberStatusSchema, ProjectReachabilityResponseSchema, ProjectResponseSchema, ProjectSchema, ProjectSettingsResponseSchema, ProjectSettingsSchema, ProjectSlugAvailabilityQuerySchema, ProjectSlugAvailabilityReasonSchema, ProjectSlugAvailabilityResponseSchema, ProjectSlugSchema, ProjectSourceFileSchema, ProjectSourceResourceRefSchema, ProjectSourceResourcesSchema, ProjectStatusSchema, ProjectUserRoleSchema, PromptInputSchema, PromptResponseSchema, QueuedAgentPromptResponseSchema, QueuedRunResponseSchema, RESERVED_ORGANIZATION_SLUGS, ROUTE_MANIFEST_REL_PATH, RecentResourceKindSchema, RecentResourceListResponseSchema, RecentResourceSchema, RecentResourceSourceSchema, RunSourceKindSchema, RunSourceSchema, SkillSummaryDetailResponseSchema, SkillSummaryListResponseSchema, SkillSummarySchema, SkipResponseSchema, SlugAvailabilityQuerySchema, SlugAvailabilityReasonSchema, SlugAvailabilityResponseSchema, SourceBlobRefSchema, StartKeystrokeConnectionInputSchema, StartKeystrokeConnectionResultSchema, StartOAuthConnectionInputSchema, StartOAuthConnectionResultSchema, StoredManifestFileSchema, StoredProjectSourceManifestSchema, StoredRouteManifestSchema, StoredRouteManifestSkillSchema, SubmitMarketingContactRequestSchema, SubmitMarketingContactResponseSchema, SubmitTeamRequestRequestSchema, SubmitTeamRequestResponseSchema, TeamRequestTypeSchema, TriggerDetailResponseSchema, TriggerListItemSchema, TriggerListQuerySchema, TriggerListResponseSchema, TriggerRunDetailQuerySchema, TriggerRunDetailResponseSchema, TriggerRunListQuerySchema, TriggerRunListResponseSchema, TriggerTypeSchema, UpdateChannelBindingBodySchema, UpdateCredentialInstanceBodySchema, UpdateCredentialRequestSchema, UpdateOrganizationMemberRequestSchema, UpdateOrganizationMemberResponseSchema, UpdateOrganizationRequestSchema, UpdateProjectMemberRequestSchema, UpdateProjectMemberResponseSchema, UpdateProjectRequestSchema, UpdateProjectSettingsRequestSchema, UploadProjectSourceManifestRequestSchema, UploadProjectSourceResponseSchema, UpsertGatewayAttachmentBodySchema, UpsertWorkflowSubscriptionBodySchema, UserAvatarPatchSchema, UserAvatarSchema, UserInterfaceThemeSchema, UserOrganizationSchema, UserPreferencesPatchSchema, UserPreferencesSchema, UserSidebarFooterChatRowVisibilitySchema, UserSidebarNavIconVisibilitySchema, UserSidebarPreferencesPatchSchema, UserSidebarPreferencesSchema, UserSurfaceContrastSchema, UserWorkspaceFavoriteKindSchema, UserWorkspaceFavoriteSchema, UserWorkspaceFontSizeSchema, UserWorkspaceLayoutModeSchema, ValidationErrorDetailSchema, WorkflowEventTypeSchema, WorkflowRunDetailQuerySchema, WorkflowRunDetailResponseSchema, WorkflowRunListQuerySchema, WorkflowRunListResponseSchema, WorkflowSubscriptionListResponseSchema, WorkflowSubscriptionRecordSchema, WorkflowSummaryDetailResponseSchema, WorkflowSummaryListResponseSchema, WorkflowSummarySchema, agentMemoryFileId, buildCredentialInstanceLabel, credential, credentialInputSchema, defineCredential, displayCredentialAppName, isCredentialInput, isOfficialSlug, listenPortFromPublicUrl, listenPortFromUrl, mapOrganization, mapOrganizationInvitation, mapOrganizationMember, mapProject, mapProjectArtifact, mapProjectDeployment, mapProjectMember, mapProjectSettings, mapUserOrganization, mcpEntityId, mergeOrganizationSidebarBranding, mergeUserPreferences, normalizeCredentialList, normalizeLogoUrl, normalizeOrganizationSidebarBranding, normalizeUserPreferences, organizationInvitationAcceptPath, organizationSlugErrorCodeFromMessage, originFromPublicUrl, parseAgentSessionDetailInclude, parseAppSlug, parseCreateOrganizationRequest, parseErrorResponse, parseMcpEntityId, parseOrganizationSlug, parsePollRunRequest, parseProjectSlug, parsePromptInput, parseStoredRouteManifest, parseTriggerRunDetailInclude, parseWorkflowRunDetailInclude, previewOrganizationSlugFromName, projectFileId, projectFileLanguage, qualifyOrgSlug, resolveUniqueCredentialInstanceLabel, slugifyAppName, slugifyOrganizationName, slugifyProjectName, toCredentialRequirement, toolParameters, validateAppSlug, validateClaimableOrganizationSlug, validateCredentialValueAgainstFields, validateProjectSlug, validationErrorResponse };\n\n//# sourceMappingURL=index.mjs.map","import { z } from \"zod\";\nimport { CREDENTIAL_SCOPE_TYPES, credential, credentialInputSchema, defineCredential, isCredentialInput, normalizeCredentialList, toCredentialRequirement, toolParameters } from \"@keystrokehq/shared\";\nimport { AsyncLocalStorage } from \"node:async_hooks\";\n//#region src/action-definition.ts\nconst zodSchema = z.custom((v) => v instanceof z.ZodType, \"must be a Zod schema\");\n/** Runtime validation for an unbranded action definition. */\nconst actionCoreSchema = z.object({\n\tslug: z.string().trim().min(1),\n\tname: z.string().optional(),\n\tdescription: z.string().optional(),\n\tinput: zodSchema,\n\toutput: zodSchema,\n\tcredentials: z.array(credentialInputSchema).optional(),\n\trun: z.function()\n});\nconst ACTION = Symbol.for(\"keystroke.action\");\n/**\n* Validates brand + shape via `actionCoreSchema` so discovery and guards reject\n* malformed definitions.\n*/\nfunction isAction(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tif (!(ACTION in value) || value[ACTION] !== true) return false;\n\treturn actionCoreSchema.safeParse(value).success;\n}\nfunction getActionCredentialRequirements(action) {\n\treturn action.credentials;\n}\n//#endregion\n//#region src/action-execution-context.ts\n/**\n* Tracks the action whose `run` is currently executing. Actions are leaf units:\n* orchestration belongs in workflows, not inside another action. We use this to\n* reject an action that tries to invoke another action's `run` (directly or as a\n* step) while one is already on the stack.\n*/\nconst executingAction = new AsyncLocalStorage();\n/**\n* Runs an action's `run` body. Throws if another action is already executing in\n* the current async context — that means an action called another action.\n*/\nfunction runWithinActionExecution(actionKey, run) {\n\tconst parentKey = executingAction.getStore();\n\tif (parentKey !== void 0) throw new Error(`Action \"${actionKey}\" was invoked from inside action \"${parentKey}\". Actions are leaf units — an action must not call another action. Orchestrate actions in a workflow (src/workflows/), or attach the action directly as an agent tool (src/agents/).`);\n\treturn executingAction.run(actionKey, run);\n}\n/**\n* Resets the action-execution context for the duration of `fn`. Agent tool calls\n* are fresh top-level executions even when the agent was prompted from inside an\n* action, so calling actions as agent tools must not trip the guard.\n*/\nfunction runOutsideActionExecution(fn) {\n\treturn executingAction.exit(fn);\n}\n/** True while an action's `run` body is executing (agent steps are suppressed). */\nfunction isWithinActionExecution() {\n\treturn executingAction.getStore() !== void 0;\n}\n//#endregion\n//#region src/run-signal-context.ts\nconst runSignalStorage = new AsyncLocalStorage();\n/** Never-aborting signal used outside a cancellable run (direct calls, tests). */\nconst NEVER_ABORT = new AbortController().signal;\n/**\n* Runs `fn` with `signal` as the ambient run-cancellation signal. The worker\n* wires this once per queued run so every nested action/agent/workflow can read\n* it via {@link getRunSignal} without threading a parameter — cancellation stays\n* invisible to authoring SDKs.\n*/\nfunction runWithRunSignal(signal, fn) {\n\treturn runSignalStorage.run(signal, fn);\n}\n/** The current run's cancellation signal; never aborts outside a run. */\nfunction getRunSignal() {\n\treturn runSignalStorage.getStore() ?? NEVER_ABORT;\n}\n//#endregion\n//#region src/workflow-run-registry.ts\nconst REGISTRY_KEY$1 = Symbol.for(\"keystroke.workflowRunGetter\");\nfunction registry$1() {\n\tconst globalScope = globalThis;\n\tif (!globalScope[REGISTRY_KEY$1]) globalScope[REGISTRY_KEY$1] = {};\n\treturn globalScope[REGISTRY_KEY$1];\n}\nfunction registerWorkflowRunGetter(fn) {\n\tregistry$1().getter = fn;\n}\nfunction getWorkflowRunHandle() {\n\treturn registry$1().getter?.();\n}\n//#endregion\n//#region src/step-invocation.ts\nfunction executeStep(state) {\n\tif (state.input === void 0) throw new Error(`Step \"${state.action.slug}\" has no input. Call .run(input) before awaiting or chaining .scope().`);\n\tconst handle = getWorkflowRunHandle();\n\tif (!handle) throw new Error(`Step \"${state.action.slug}\" must run inside a workflow or be called as .run(input, credentials) in tests.`);\n\treturn handle.actionRunner(state.action, state.input, {\n\t\tid: state.id,\n\t\tcredentialScope: state.scope\n\t});\n}\nfunction isStepInvocation(value) {\n\treturn typeof value === \"object\" && value !== null && \"then\" in value && typeof value.then === \"function\" && \"scope\" in value && typeof value.scope === \"function\";\n}\nfunction createStepInvocation(state) {\n\treturn {\n\t\tscope(scope) {\n\t\t\treturn createStepInvocation({\n\t\t\t\t...state,\n\t\t\t\tscope\n\t\t\t});\n\t\t},\n\t\trun(input) {\n\t\t\treturn createStepInvocation({\n\t\t\t\t...state,\n\t\t\t\tinput\n\t\t\t});\n\t\t},\n\t\tstepId(id) {\n\t\t\treturn createStepInvocation({\n\t\t\t\t...state,\n\t\t\t\tid\n\t\t\t});\n\t\t},\n\t\tthen(onfulfilled, onrejected) {\n\t\t\treturn executeStep(state).then(onfulfilled, onrejected);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/define-action.ts\nfunction attachStepApi(action) {\n\tconst execute = action.run.bind(action);\n\tconst stepAction = action;\n\treturn {\n\t\t...action,\n\t\trun(input, credentials) {\n\t\t\tif (credentials !== void 0) return execute(input, credentials);\n\t\t\treturn createStepInvocation({\n\t\t\t\taction: stepAction,\n\t\t\t\tinput\n\t\t\t});\n\t\t},\n\t\tscope(scope) {\n\t\t\tif (!action.credentials) return attachStepApi(action);\n\t\t\tconst credentials = normalizeCredentialList(action.credentials).map((requirement) => ({\n\t\t\t\t...requirement,\n\t\t\t\tscope\n\t\t\t}));\n\t\t\treturn attachStepApi({\n\t\t\t\t...action,\n\t\t\t\tcredentials\n\t\t\t});\n\t\t}\n\t};\n}\nfunction defineAction(def) {\n\tconst result = actionCoreSchema.safeParse(def);\n\tif (!result.success) throw new Error(`Invalid action definition: ${formatIssues(result.error.issues)}`);\n\tconst guardedRun = (input, credentials) => runWithinActionExecution(result.data.slug, () => def.run(input, credentials, { signal: getRunSignal() }));\n\treturn attachStepApi({\n\t\t...result.data,\n\t\trun: guardedRun,\n\t\tcredentials: def.credentials,\n\t\t[ACTION]: true\n\t});\n}\nfunction formatIssues(issues) {\n\treturn issues.map((issue) => {\n\t\treturn `${issue.path.length > 0 ? `${issue.path.join(\".\")}: ` : \"\"}${issue.message}`;\n\t}).join(\"; \");\n}\n//#endregion\n//#region src/execute-action.ts\nasync function executeAction(action, input, credentials = {}) {\n\tconst validatedInput = action.input.parse(input);\n\tconst result = await action.run(validatedInput, credentials);\n\treturn action.output.parse(result);\n}\n//#endregion\n//#region src/resolve-action-tool.ts\nfunction resolveActionTool(action, options) {\n\tconst consumer = options?.consumer ?? {\n\t\tkind: \"tool\",\n\t\tname: action.slug\n\t};\n\treturn {\n\t\tname: action.slug,\n\t\tlabel: action.name ?? action.slug,\n\t\tdescription: action.description ?? action.name ?? action.slug,\n\t\tparameters: toolParameters(action.input),\n\t\tasync execute(_toolCallId, params) {\n\t\t\tconst requirements = getActionCredentialRequirements(action);\n\t\t\tlet credentials = {};\n\t\t\tif (requirements?.length) {\n\t\t\t\tif (!options?.resolveCredentials) throw new Error(`Missing credential resolver for action \"${action.slug}\"`);\n\t\t\t\tcredentials = await options.resolveCredentials(requirements, consumer, options.contextOverride);\n\t\t\t}\n\t\t\tconst output = await runOutsideActionExecution(() => executeAction(action, params, credentials));\n\t\t\treturn {\n\t\t\t\tcontent: [{\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: JSON.stringify(output)\n\t\t\t\t}],\n\t\t\t\tdetails: output\n\t\t\t};\n\t\t}\n\t};\n}\n//#endregion\n//#region src/project-scope-registry.ts\n/**\n* Cross-module bridge for the bound project scope. The runtime registers the database-backed\n* getter (reading the per-job `runWithProjectScope` async context); the bundled keystroke facade\n* reads it without importing `@keystrokehq/database`. Keyed by a global `Symbol.for` so a single\n* slot is shared even when the facade ships its own bundled copy of this module.\n*/\nconst REGISTRY_KEY = Symbol.for(\"keystroke.projectScopeGetter\");\nfunction registry() {\n\tconst globalScope = globalThis;\n\tif (!globalScope[REGISTRY_KEY]) globalScope[REGISTRY_KEY] = {};\n\treturn globalScope[REGISTRY_KEY];\n}\nfunction registerProjectScopeGetter(fn) {\n\tregistry().getter = fn;\n}\nfunction getRegisteredProjectScopeId() {\n\treturn registry().getter?.();\n}\n//#endregion\nexport { CREDENTIAL_SCOPE_TYPES, actionCoreSchema, createStepInvocation, credential, credentialInputSchema, defineAction, defineCredential, executeAction, getActionCredentialRequirements, getRegisteredProjectScopeId, getRunSignal, getWorkflowRunHandle, isAction, isCredentialInput, isStepInvocation, isWithinActionExecution, normalizeCredentialList, registerProjectScopeGetter, registerWorkflowRunGetter, resolveActionTool, runOutsideActionExecution, runWithRunSignal, runWithinActionExecution, toCredentialRequirement };\n\n//# sourceMappingURL=index.mjs.map","import { AsyncLocalStorage } from \"node:async_hooks\";\n//#region src/config.ts\nlet sink;\nfunction configureTracing(options) {\n\tsink = options.sink;\n}\nfunction getTracingSink() {\n\treturn sink;\n}\nfunction resetTracingForTests() {\n\tsink = void 0;\n}\n//#endregion\n//#region src/context.ts\nconst traceContextStorage = new AsyncLocalStorage();\nfunction getTraceContext() {\n\treturn traceContextStorage.getStore();\n}\nfunction runWithTraceContext(context, fn) {\n\treturn traceContextStorage.run(context, fn);\n}\n//#endregion\n//#region src/serialize.ts\nfunction formatConsoleArg(value) {\n\tif (typeof value === \"string\") return value;\n\tif (value instanceof Error) return value.stack ?? value.message;\n\ttry {\n\t\treturn JSON.stringify(value);\n\t} catch {\n\t\treturn String(value);\n\t}\n}\nfunction serializeConsoleArgs(args) {\n\tif (args.length === 0) return { message: \"\" };\n\tconst [first, ...rest] = args;\n\tconst message = formatConsoleArg(first);\n\tif (rest.length === 0) return { message };\n\tif (rest.length === 1) return {\n\t\tmessage,\n\t\tdata: rest[0]\n\t};\n\treturn {\n\t\tmessage,\n\t\tdata: rest\n\t};\n}\nfunction summarizePayload(payload) {\n\tif (payload === void 0) return;\n\ttry {\n\t\tconst serialized = JSON.stringify(payload);\n\t\tif (serialized.length <= 500) return payload;\n\t\treturn {\n\t\t\ttruncated: true,\n\t\t\tlength: serialized.length,\n\t\t\tpreview: serialized.slice(0, 500)\n\t\t};\n\t} catch {\n\t\treturn {\n\t\t\ttruncated: true,\n\t\t\tpreview: String(payload).slice(0, 500)\n\t\t};\n\t}\n}\n//#endregion\n//#region src/console.ts\nconst CONSOLE_LEVELS = [\n\t\"log\",\n\t\"debug\",\n\t\"info\",\n\t\"warn\",\n\t\"error\"\n];\nfunction mapConsoleLevel(level) {\n\tif (level === \"log\") return \"info\";\n\treturn level;\n}\nasync function captureConsole(fn) {\n\tconst originals = /* @__PURE__ */ new Map();\n\tfor (const level of CONSOLE_LEVELS) {\n\t\toriginals.set(level, console[level].bind(console));\n\t\tconsole[level] = (...args) => {\n\t\t\toriginals.get(level)?.(...args);\n\t\t\tconst sink = getTracingSink();\n\t\t\tconst context = getTraceContext();\n\t\t\tif (!sink || !context) return;\n\t\t\tconst { message, data } = serializeConsoleArgs(args);\n\t\t\tsink.appendLog({\n\t\t\t\ttraceId: context.traceId,\n\t\t\t\tspanId: context.spanId,\n\t\t\t\tlevel: mapConsoleLevel(level),\n\t\t\t\tmessage,\n\t\t\t\tdata,\n\t\t\t\tsource: \"console\",\n\t\t\t\tcreatedAt: /* @__PURE__ */ new Date()\n\t\t\t});\n\t\t};\n\t}\n\ttry {\n\t\treturn await fn();\n\t} finally {\n\t\tfor (const level of CONSOLE_LEVELS) {\n\t\t\tconst original = originals.get(level);\n\t\t\tif (original) console[level] = original;\n\t\t}\n\t}\n}\n//#endregion\n//#region src/log.ts\nasync function logSystem(level, message, data) {\n\tconst sink = getTracingSink();\n\tconst context = getTraceContext();\n\tif (!sink || !context) return;\n\tawait sink.appendLog({\n\t\ttraceId: context.traceId,\n\t\tspanId: context.spanId,\n\t\tlevel,\n\t\tmessage,\n\t\tdata,\n\t\tsource: \"system\",\n\t\tcreatedAt: /* @__PURE__ */ new Date()\n\t});\n}\n//#endregion\n//#region src/span.ts\nfunction serializeSpanError(error) {\n\tif (error instanceof Error) return {\n\t\tname: error.name,\n\t\tmessage: error.message\n\t};\n\treturn { message: String(error) };\n}\nasync function withSpan(input, fn) {\n\tconst sink = getTracingSink();\n\tif (!sink) return await fn();\n\tconst parent = getTraceContext();\n\tconst spanId = input.spanId ?? crypto.randomUUID();\n\tconst traceId = input.traceId ?? parent?.traceId ?? spanId;\n\tconst parentSpanId = input.parentSpanId ?? parent?.spanId;\n\tconst startedAt = /* @__PURE__ */ new Date();\n\tawait sink.openSpan({\n\t\tid: spanId,\n\t\ttraceId,\n\t\tparentSpanId,\n\t\tkind: input.kind,\n\t\trefId: input.refId,\n\t\tname: input.name,\n\t\tmetadata: input.metadata,\n\t\tstartedAt\n\t});\n\tconst context = {\n\t\ttraceId,\n\t\tspanId,\n\t\tparentSpanId\n\t};\n\ttry {\n\t\tconst result = await runWithTraceContext(context, () => fn());\n\t\tawait sink.closeSpan(spanId, \"ok\", /* @__PURE__ */ new Date());\n\t\treturn result;\n\t} catch (error) {\n\t\tawait sink.closeSpan(spanId, \"error\", /* @__PURE__ */ new Date(), serializeSpanError(error));\n\t\tthrow error;\n\t}\n}\nfunction isSpanActive() {\n\treturn getTraceContext() !== void 0;\n}\n//#endregion\nexport { captureConsole, configureTracing, getTraceContext, isSpanActive, logSystem, resetTracingForTests, runWithTraceContext, summarizePayload, withSpan };\n\n//# sourceMappingURL=index.mjs.map","import { clearCredentialInstanceDefaults, encryptCredentialPayload, upsertCredentialInstance } from \"@keystrokehq/database\";\nimport { deleteSecretValuesForRef, getOrganizationScopeId, selectSecretValue, upsertSecretValue } from \"@keystrokehq/platform-database\";\nimport { createCipheriv, createDecipheriv, createHash, randomBytes } from \"node:crypto\";\n//#region src/crypto.ts\nconst ALGORITHM = \"aes-256-gcm\";\nconst IV_LENGTH = 12;\nfunction resolveEncryptionKey() {\n\tconst secret = process.env.PLATFORM_SECRETS_ENCRYPTION_KEY?.trim() ?? process.env.CREDENTIALS_ENCRYPTION_KEY?.trim();\n\tif (!secret) throw new Error(\"CREDENTIALS_ENCRYPTION_KEY is required\");\n\treturn createHash(\"sha256\").update(secret).digest();\n}\nfunction encryptSecretPayload(plaintext) {\n\tconst iv = randomBytes(IV_LENGTH);\n\tconst cipher = createCipheriv(ALGORITHM, resolveEncryptionKey(), iv);\n\tconst encrypted = Buffer.concat([cipher.update(plaintext, \"utf8\"), cipher.final()]);\n\tconst tag = cipher.getAuthTag();\n\treturn Buffer.concat([\n\t\tiv,\n\t\ttag,\n\t\tencrypted\n\t]).toString(\"base64\");\n}\nfunction decryptSecretPayload(ciphertext) {\n\tconst buffer = Buffer.from(ciphertext, \"base64\");\n\tconst iv = buffer.subarray(0, IV_LENGTH);\n\tconst tag = buffer.subarray(IV_LENGTH, 28);\n\tconst encrypted = buffer.subarray(28);\n\tconst decipher = createDecipheriv(ALGORITHM, resolveEncryptionKey(), iv);\n\tdecipher.setAuthTag(tag);\n\treturn Buffer.concat([decipher.update(encrypted), decipher.final()]).toString(\"utf8\");\n}\n//#endregion\n//#region src/store.ts\nfunction usePlatformStore() {\n\treturn getOrganizationScopeId() !== void 0;\n}\nfunction assertOrganizationScope() {\n\tif (!usePlatformStore()) throw new Error(\"Secret store requires organization scope\");\n}\nfunction createSecretStore() {\n\treturn {\n\t\tasync get(ref) {\n\t\t\tassertOrganizationScope();\n\t\t\tconst row = await selectSecretValue(ref.kind, ref.id, ref.field);\n\t\t\tif (!row) return null;\n\t\t\treturn decryptSecretPayload(row.ciphertext);\n\t\t},\n\t\tasync set(ref, plaintext) {\n\t\t\tassertOrganizationScope();\n\t\t\tconst now = /* @__PURE__ */ new Date();\n\t\t\tconst ciphertext = encryptSecretPayload(plaintext);\n\t\t\tawait upsertSecretValue({\n\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\trefKind: ref.kind,\n\t\t\t\trefId: ref.id,\n\t\t\t\tfield: ref.field,\n\t\t\t\tciphertext,\n\t\t\t\tcreatedAt: now,\n\t\t\t\tupdatedAt: now\n\t\t\t});\n\t\t},\n\t\tasync deleteRef(kind, id) {\n\t\t\tassertOrganizationScope();\n\t\t\tawait deleteSecretValuesForRef(kind, id);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/credential-instance.ts\nasync function setCredentialInstanceSecret(options) {\n\tconst now = /* @__PURE__ */ new Date();\n\tconst isDefault = options.isDefault ?? true;\n\tif (isDefault) await clearCredentialInstanceDefaults({\n\t\tslug: options.key,\n\t\tscopeType: options.scopeType,\n\t\tscopeId: options.scopeId,\n\t\texceptId: options.id\n\t});\n\tif (getOrganizationScopeId() !== void 0) {\n\t\tawait upsertCredentialInstance({\n\t\t\tid: options.id,\n\t\t\tslug: options.key,\n\t\t\tscopeType: options.scopeType,\n\t\t\tscopeId: options.scopeId,\n\t\t\tlabel: options.label ?? null,\n\t\t\tisDefault,\n\t\t\tauthKind: \"api_key\",\n\t\t\tciphertext: null,\n\t\t\tconnectionId: null,\n\t\t\tcreatedAt: now,\n\t\t\tupdatedAt: now\n\t\t});\n\t\tawait createSecretStore().set({\n\t\t\tkind: \"credential_instance\",\n\t\t\tid: options.id,\n\t\t\tfield: \"payload\"\n\t\t}, JSON.stringify(options.value));\n\t\treturn;\n\t}\n\tawait upsertCredentialInstance({\n\t\tid: options.id,\n\t\tslug: options.key,\n\t\tscopeType: options.scopeType,\n\t\tscopeId: options.scopeId,\n\t\tlabel: options.label ?? null,\n\t\tisDefault,\n\t\tauthKind: \"api_key\",\n\t\tciphertext: encryptCredentialPayload(JSON.stringify(options.value)),\n\t\tconnectionId: null,\n\t\tcreatedAt: now,\n\t\tupdatedAt: now\n\t});\n}\nasync function readCredentialInstanceSecret(instanceId) {\n\tif (getOrganizationScopeId() === void 0) return null;\n\treturn createSecretStore().get({\n\t\tkind: \"credential_instance\",\n\t\tid: instanceId,\n\t\tfield: \"payload\"\n\t});\n}\nasync function deleteCredentialInstanceSecret(instanceId) {\n\tif (getOrganizationScopeId() === void 0) return;\n\tawait createSecretStore().deleteRef(\"credential_instance\", instanceId);\n}\n//#endregion\nexport { createSecretStore, decryptSecretPayload, deleteCredentialInstanceSecret, encryptSecretPayload, readCredentialInstanceSecret, setCredentialInstanceSecret };\n\n//# sourceMappingURL=index.mjs.map","import * as z from 'zod/v4';\nexport const LATEST_PROTOCOL_VERSION = '2025-11-25';\nexport const DEFAULT_NEGOTIATED_PROTOCOL_VERSION = '2025-03-26';\nexport const SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, '2025-06-18', '2025-03-26', '2024-11-05', '2024-10-07'];\nexport const RELATED_TASK_META_KEY = 'io.modelcontextprotocol/related-task';\n/* JSON-RPC types */\nexport const JSONRPC_VERSION = '2.0';\n/**\n * Assert 'object' type schema.\n *\n * @internal\n */\nconst AssertObjectSchema = z.custom((v) => v !== null && (typeof v === 'object' || typeof v === 'function'));\n/**\n * A progress token, used to associate progress notifications with the original request.\n */\nexport const ProgressTokenSchema = z.union([z.string(), z.number().int()]);\n/**\n * An opaque token used to represent a cursor for pagination.\n */\nexport const CursorSchema = z.string();\n/**\n * Task creation parameters, used to ask that the server create a task to represent a request.\n */\nexport const TaskCreationParamsSchema = z.looseObject({\n /**\n * Requested duration in milliseconds to retain task from creation.\n */\n ttl: z.number().optional(),\n /**\n * Time in milliseconds to wait between task status requests.\n */\n pollInterval: z.number().optional()\n});\nexport const TaskMetadataSchema = z.object({\n ttl: z.number().optional()\n});\n/**\n * Metadata for associating messages with a task.\n * Include this in the `_meta` field under the key `io.modelcontextprotocol/related-task`.\n */\nexport const RelatedTaskMetadataSchema = z.object({\n taskId: z.string()\n});\nconst RequestMetaSchema = z.looseObject({\n /**\n * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.\n */\n progressToken: ProgressTokenSchema.optional(),\n /**\n * If specified, this request is related to the provided task.\n */\n [RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()\n});\n/**\n * Common params for any request.\n */\nconst BaseRequestParamsSchema = z.object({\n /**\n * See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.\n */\n _meta: RequestMetaSchema.optional()\n});\n/**\n * Common params for any task-augmented request.\n */\nexport const TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({\n /**\n * If specified, the caller is requesting task-augmented execution for this request.\n * The request will return a CreateTaskResult immediately, and the actual result can be\n * retrieved later via tasks/result.\n *\n * Task augmentation is subject to capability negotiation - receivers MUST declare support\n * for task augmentation of specific request types in their capabilities.\n */\n task: TaskMetadataSchema.optional()\n});\n/**\n * Checks if a value is a valid TaskAugmentedRequestParams.\n * @param value - The value to check.\n *\n * @returns True if the value is a valid TaskAugmentedRequestParams, false otherwise.\n */\nexport const isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;\nexport const RequestSchema = z.object({\n method: z.string(),\n params: BaseRequestParamsSchema.loose().optional()\n});\nconst NotificationsParamsSchema = z.object({\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: RequestMetaSchema.optional()\n});\nexport const NotificationSchema = z.object({\n method: z.string(),\n params: NotificationsParamsSchema.loose().optional()\n});\nexport const ResultSchema = z.looseObject({\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: RequestMetaSchema.optional()\n});\n/**\n * A uniquely identifying ID for a request in JSON-RPC.\n */\nexport const RequestIdSchema = z.union([z.string(), z.number().int()]);\n/**\n * A request that expects a response.\n */\nexport const JSONRPCRequestSchema = z\n .object({\n jsonrpc: z.literal(JSONRPC_VERSION),\n id: RequestIdSchema,\n ...RequestSchema.shape\n})\n .strict();\nexport const isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;\n/**\n * A notification which does not expect a response.\n */\nexport const JSONRPCNotificationSchema = z\n .object({\n jsonrpc: z.literal(JSONRPC_VERSION),\n ...NotificationSchema.shape\n})\n .strict();\nexport const isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;\n/**\n * A successful (non-error) response to a request.\n */\nexport const JSONRPCResultResponseSchema = z\n .object({\n jsonrpc: z.literal(JSONRPC_VERSION),\n id: RequestIdSchema,\n result: ResultSchema\n})\n .strict();\n/**\n * Checks if a value is a valid JSONRPCResultResponse.\n * @param value - The value to check.\n *\n * @returns True if the value is a valid JSONRPCResultResponse, false otherwise.\n */\nexport const isJSONRPCResultResponse = (value) => JSONRPCResultResponseSchema.safeParse(value).success;\n/**\n * @deprecated Use {@link isJSONRPCResultResponse} instead.\n *\n * Please note that {@link JSONRPCResponse} is a union of {@link JSONRPCResultResponse} and {@link JSONRPCErrorResponse} as per the updated JSON-RPC specification. (was previously just {@link JSONRPCResultResponse})\n */\nexport const isJSONRPCResponse = isJSONRPCResultResponse;\n/**\n * Error codes defined by the JSON-RPC specification.\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n // SDK error codes\n ErrorCode[ErrorCode[\"ConnectionClosed\"] = -32000] = \"ConnectionClosed\";\n ErrorCode[ErrorCode[\"RequestTimeout\"] = -32001] = \"RequestTimeout\";\n // Standard JSON-RPC error codes\n ErrorCode[ErrorCode[\"ParseError\"] = -32700] = \"ParseError\";\n ErrorCode[ErrorCode[\"InvalidRequest\"] = -32600] = \"InvalidRequest\";\n ErrorCode[ErrorCode[\"MethodNotFound\"] = -32601] = \"MethodNotFound\";\n ErrorCode[ErrorCode[\"InvalidParams\"] = -32602] = \"InvalidParams\";\n ErrorCode[ErrorCode[\"InternalError\"] = -32603] = \"InternalError\";\n // MCP-specific error codes\n ErrorCode[ErrorCode[\"UrlElicitationRequired\"] = -32042] = \"UrlElicitationRequired\";\n})(ErrorCode || (ErrorCode = {}));\n/**\n * A response to a request that indicates an error occurred.\n */\nexport const JSONRPCErrorResponseSchema = z\n .object({\n jsonrpc: z.literal(JSONRPC_VERSION),\n id: RequestIdSchema.optional(),\n error: z.object({\n /**\n * The error type that occurred.\n */\n code: z.number().int(),\n /**\n * A short description of the error. The message SHOULD be limited to a concise single sentence.\n */\n message: z.string(),\n /**\n * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).\n */\n data: z.unknown().optional()\n })\n})\n .strict();\n/**\n * @deprecated Use {@link JSONRPCErrorResponseSchema} instead.\n */\nexport const JSONRPCErrorSchema = JSONRPCErrorResponseSchema;\n/**\n * Checks if a value is a valid JSONRPCErrorResponse.\n * @param value - The value to check.\n *\n * @returns True if the value is a valid JSONRPCErrorResponse, false otherwise.\n */\nexport const isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;\n/**\n * @deprecated Use {@link isJSONRPCErrorResponse} instead.\n */\nexport const isJSONRPCError = isJSONRPCErrorResponse;\nexport const JSONRPCMessageSchema = z.union([\n JSONRPCRequestSchema,\n JSONRPCNotificationSchema,\n JSONRPCResultResponseSchema,\n JSONRPCErrorResponseSchema\n]);\nexport const JSONRPCResponseSchema = z.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);\n/* Empty result */\n/**\n * A response that indicates success but carries no data.\n */\nexport const EmptyResultSchema = ResultSchema.strict();\nexport const CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({\n /**\n * The ID of the request to cancel.\n *\n * This MUST correspond to the ID of a request previously issued in the same direction.\n */\n requestId: RequestIdSchema.optional(),\n /**\n * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.\n */\n reason: z.string().optional()\n});\n/* Cancellation */\n/**\n * This notification can be sent by either side to indicate that it is cancelling a previously-issued request.\n *\n * The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.\n *\n * This notification indicates that the result will be unused, so any associated processing SHOULD cease.\n *\n * A client MUST NOT attempt to cancel its `initialize` request.\n */\nexport const CancelledNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/cancelled'),\n params: CancelledNotificationParamsSchema\n});\n/* Base Metadata */\n/**\n * Icon schema for use in tools, prompts, resources, and implementations.\n */\nexport const IconSchema = z.object({\n /**\n * URL or data URI for the icon.\n */\n src: z.string(),\n /**\n * Optional MIME type for the icon.\n */\n mimeType: z.string().optional(),\n /**\n * Optional array of strings that specify sizes at which the icon can be used.\n * Each string should be in WxH format (e.g., `\"48x48\"`, `\"96x96\"`) or `\"any\"` for scalable formats like SVG.\n *\n * If not provided, the client should assume that the icon can be used at any size.\n */\n sizes: z.array(z.string()).optional(),\n /**\n * Optional specifier for the theme this icon is designed for. `light` indicates\n * the icon is designed to be used with a light background, and `dark` indicates\n * the icon is designed to be used with a dark background.\n *\n * If not provided, the client should assume the icon can be used with any theme.\n */\n theme: z.enum(['light', 'dark']).optional()\n});\n/**\n * Base schema to add `icons` property.\n *\n */\nexport const IconsSchema = z.object({\n /**\n * Optional set of sized icons that the client can display in a user interface.\n *\n * Clients that support rendering icons MUST support at least the following MIME types:\n * - `image/png` - PNG images (safe, universal compatibility)\n * - `image/jpeg` (and `image/jpg`) - JPEG images (safe, universal compatibility)\n *\n * Clients that support rendering icons SHOULD also support:\n * - `image/svg+xml` - SVG images (scalable but requires security precautions)\n * - `image/webp` - WebP images (modern, efficient format)\n */\n icons: z.array(IconSchema).optional()\n});\n/**\n * Base metadata interface for common properties across resources, tools, prompts, and implementations.\n */\nexport const BaseMetadataSchema = z.object({\n /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */\n name: z.string(),\n /**\n * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\n * even by those unfamiliar with domain-specific terminology.\n *\n * If not provided, the name should be used for display (except for Tool,\n * where `annotations.title` should be given precedence over using `name`,\n * if present).\n */\n title: z.string().optional()\n});\n/* Initialization */\n/**\n * Describes the name and version of an MCP implementation.\n */\nexport const ImplementationSchema = BaseMetadataSchema.extend({\n ...BaseMetadataSchema.shape,\n ...IconsSchema.shape,\n version: z.string(),\n /**\n * An optional URL of the website for this implementation.\n */\n websiteUrl: z.string().optional(),\n /**\n * An optional human-readable description of what this implementation does.\n *\n * This can be used by clients or servers to provide context about their purpose\n * and capabilities. For example, a server might describe the types of resources\n * or tools it provides, while a client might describe its intended use case.\n */\n description: z.string().optional()\n});\nconst FormElicitationCapabilitySchema = z.intersection(z.object({\n applyDefaults: z.boolean().optional()\n}), z.record(z.string(), z.unknown()));\nconst ElicitationCapabilitySchema = z.preprocess(value => {\n if (value && typeof value === 'object' && !Array.isArray(value)) {\n if (Object.keys(value).length === 0) {\n return { form: {} };\n }\n }\n return value;\n}, z.intersection(z.object({\n form: FormElicitationCapabilitySchema.optional(),\n url: AssertObjectSchema.optional()\n}), z.record(z.string(), z.unknown()).optional()));\n/**\n * Task capabilities for clients, indicating which request types support task creation.\n */\nexport const ClientTasksCapabilitySchema = z.looseObject({\n /**\n * Present if the client supports listing tasks.\n */\n list: AssertObjectSchema.optional(),\n /**\n * Present if the client supports cancelling tasks.\n */\n cancel: AssertObjectSchema.optional(),\n /**\n * Capabilities for task creation on specific request types.\n */\n requests: z\n .looseObject({\n /**\n * Task support for sampling requests.\n */\n sampling: z\n .looseObject({\n createMessage: AssertObjectSchema.optional()\n })\n .optional(),\n /**\n * Task support for elicitation requests.\n */\n elicitation: z\n .looseObject({\n create: AssertObjectSchema.optional()\n })\n .optional()\n })\n .optional()\n});\n/**\n * Task capabilities for servers, indicating which request types support task creation.\n */\nexport const ServerTasksCapabilitySchema = z.looseObject({\n /**\n * Present if the server supports listing tasks.\n */\n list: AssertObjectSchema.optional(),\n /**\n * Present if the server supports cancelling tasks.\n */\n cancel: AssertObjectSchema.optional(),\n /**\n * Capabilities for task creation on specific request types.\n */\n requests: z\n .looseObject({\n /**\n * Task support for tool requests.\n */\n tools: z\n .looseObject({\n call: AssertObjectSchema.optional()\n })\n .optional()\n })\n .optional()\n});\n/**\n * Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.\n */\nexport const ClientCapabilitiesSchema = z.object({\n /**\n * Experimental, non-standard capabilities that the client supports.\n */\n experimental: z.record(z.string(), AssertObjectSchema).optional(),\n /**\n * Present if the client supports sampling from an LLM.\n */\n sampling: z\n .object({\n /**\n * Present if the client supports context inclusion via includeContext parameter.\n * If not declared, servers SHOULD only use `includeContext: \"none\"` (or omit it).\n */\n context: AssertObjectSchema.optional(),\n /**\n * Present if the client supports tool use via tools and toolChoice parameters.\n */\n tools: AssertObjectSchema.optional()\n })\n .optional(),\n /**\n * Present if the client supports eliciting user input.\n */\n elicitation: ElicitationCapabilitySchema.optional(),\n /**\n * Present if the client supports listing roots.\n */\n roots: z\n .object({\n /**\n * Whether the client supports issuing notifications for changes to the roots list.\n */\n listChanged: z.boolean().optional()\n })\n .optional(),\n /**\n * Present if the client supports task creation.\n */\n tasks: ClientTasksCapabilitySchema.optional(),\n /**\n * Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).\n */\n extensions: z.record(z.string(), AssertObjectSchema).optional()\n});\nexport const InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({\n /**\n * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.\n */\n protocolVersion: z.string(),\n capabilities: ClientCapabilitiesSchema,\n clientInfo: ImplementationSchema\n});\n/**\n * This request is sent from the client to the server when it first connects, asking it to begin initialization.\n */\nexport const InitializeRequestSchema = RequestSchema.extend({\n method: z.literal('initialize'),\n params: InitializeRequestParamsSchema\n});\nexport const isInitializeRequest = (value) => InitializeRequestSchema.safeParse(value).success;\n/**\n * Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.\n */\nexport const ServerCapabilitiesSchema = z.object({\n /**\n * Experimental, non-standard capabilities that the server supports.\n */\n experimental: z.record(z.string(), AssertObjectSchema).optional(),\n /**\n * Present if the server supports sending log messages to the client.\n */\n logging: AssertObjectSchema.optional(),\n /**\n * Present if the server supports sending completions to the client.\n */\n completions: AssertObjectSchema.optional(),\n /**\n * Present if the server offers any prompt templates.\n */\n prompts: z\n .object({\n /**\n * Whether this server supports issuing notifications for changes to the prompt list.\n */\n listChanged: z.boolean().optional()\n })\n .optional(),\n /**\n * Present if the server offers any resources to read.\n */\n resources: z\n .object({\n /**\n * Whether this server supports clients subscribing to resource updates.\n */\n subscribe: z.boolean().optional(),\n /**\n * Whether this server supports issuing notifications for changes to the resource list.\n */\n listChanged: z.boolean().optional()\n })\n .optional(),\n /**\n * Present if the server offers any tools to call.\n */\n tools: z\n .object({\n /**\n * Whether this server supports issuing notifications for changes to the tool list.\n */\n listChanged: z.boolean().optional()\n })\n .optional(),\n /**\n * Present if the server supports task creation.\n */\n tasks: ServerTasksCapabilitySchema.optional(),\n /**\n * Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).\n */\n extensions: z.record(z.string(), AssertObjectSchema).optional()\n});\n/**\n * After receiving an initialize request from the client, the server sends this response.\n */\nexport const InitializeResultSchema = ResultSchema.extend({\n /**\n * The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.\n */\n protocolVersion: z.string(),\n capabilities: ServerCapabilitiesSchema,\n serverInfo: ImplementationSchema,\n /**\n * Instructions describing how to use the server and its features.\n *\n * This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a \"hint\" to the model. For example, this information MAY be added to the system prompt.\n */\n instructions: z.string().optional()\n});\n/**\n * This notification is sent from the client to the server after initialization has finished.\n */\nexport const InitializedNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/initialized'),\n params: NotificationsParamsSchema.optional()\n});\nexport const isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;\n/* Ping */\n/**\n * A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.\n */\nexport const PingRequestSchema = RequestSchema.extend({\n method: z.literal('ping'),\n params: BaseRequestParamsSchema.optional()\n});\n/* Progress notifications */\nexport const ProgressSchema = z.object({\n /**\n * The progress thus far. This should increase every time progress is made, even if the total is unknown.\n */\n progress: z.number(),\n /**\n * Total number of items to process (or total progress required), if known.\n */\n total: z.optional(z.number()),\n /**\n * An optional message describing the current progress.\n */\n message: z.optional(z.string())\n});\nexport const ProgressNotificationParamsSchema = z.object({\n ...NotificationsParamsSchema.shape,\n ...ProgressSchema.shape,\n /**\n * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.\n */\n progressToken: ProgressTokenSchema\n});\n/**\n * An out-of-band notification used to inform the receiver of a progress update for a long-running request.\n *\n * @category notifications/progress\n */\nexport const ProgressNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/progress'),\n params: ProgressNotificationParamsSchema\n});\nexport const PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({\n /**\n * An opaque token representing the current pagination position.\n * If provided, the server should return results starting after this cursor.\n */\n cursor: CursorSchema.optional()\n});\n/* Pagination */\nexport const PaginatedRequestSchema = RequestSchema.extend({\n params: PaginatedRequestParamsSchema.optional()\n});\nexport const PaginatedResultSchema = ResultSchema.extend({\n /**\n * An opaque token representing the pagination position after the last returned result.\n * If present, there may be more results available.\n */\n nextCursor: CursorSchema.optional()\n});\n/**\n * The status of a task.\n * */\nexport const TaskStatusSchema = z.enum(['working', 'input_required', 'completed', 'failed', 'cancelled']);\n/* Tasks */\n/**\n * A pollable state object associated with a request.\n */\nexport const TaskSchema = z.object({\n taskId: z.string(),\n status: TaskStatusSchema,\n /**\n * Time in milliseconds to keep task results available after completion.\n * If null, the task has unlimited lifetime until manually cleaned up.\n */\n ttl: z.union([z.number(), z.null()]),\n /**\n * ISO 8601 timestamp when the task was created.\n */\n createdAt: z.string(),\n /**\n * ISO 8601 timestamp when the task was last updated.\n */\n lastUpdatedAt: z.string(),\n pollInterval: z.optional(z.number()),\n /**\n * Optional diagnostic message for failed tasks or other status information.\n */\n statusMessage: z.optional(z.string())\n});\n/**\n * Result returned when a task is created, containing the task data wrapped in a task field.\n */\nexport const CreateTaskResultSchema = ResultSchema.extend({\n task: TaskSchema\n});\n/**\n * Parameters for task status notification.\n */\nexport const TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema);\n/**\n * A notification sent when a task's status changes.\n */\nexport const TaskStatusNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/tasks/status'),\n params: TaskStatusNotificationParamsSchema\n});\n/**\n * A request to get the state of a specific task.\n */\nexport const GetTaskRequestSchema = RequestSchema.extend({\n method: z.literal('tasks/get'),\n params: BaseRequestParamsSchema.extend({\n taskId: z.string()\n })\n});\n/**\n * The response to a tasks/get request.\n */\nexport const GetTaskResultSchema = ResultSchema.merge(TaskSchema);\n/**\n * A request to get the result of a specific task.\n */\nexport const GetTaskPayloadRequestSchema = RequestSchema.extend({\n method: z.literal('tasks/result'),\n params: BaseRequestParamsSchema.extend({\n taskId: z.string()\n })\n});\n/**\n * The response to a tasks/result request.\n * The structure matches the result type of the original request.\n * For example, a tools/call task would return the CallToolResult structure.\n *\n */\nexport const GetTaskPayloadResultSchema = ResultSchema.loose();\n/**\n * A request to list tasks.\n */\nexport const ListTasksRequestSchema = PaginatedRequestSchema.extend({\n method: z.literal('tasks/list')\n});\n/**\n * The response to a tasks/list request.\n */\nexport const ListTasksResultSchema = PaginatedResultSchema.extend({\n tasks: z.array(TaskSchema)\n});\n/**\n * A request to cancel a specific task.\n */\nexport const CancelTaskRequestSchema = RequestSchema.extend({\n method: z.literal('tasks/cancel'),\n params: BaseRequestParamsSchema.extend({\n taskId: z.string()\n })\n});\n/**\n * The response to a tasks/cancel request.\n */\nexport const CancelTaskResultSchema = ResultSchema.merge(TaskSchema);\n/* Resources */\n/**\n * The contents of a specific resource or sub-resource.\n */\nexport const ResourceContentsSchema = z.object({\n /**\n * The URI of this resource.\n */\n uri: z.string(),\n /**\n * The MIME type of this resource, if known.\n */\n mimeType: z.optional(z.string()),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.record(z.string(), z.unknown()).optional()\n});\nexport const TextResourceContentsSchema = ResourceContentsSchema.extend({\n /**\n * The text of the item. This must only be set if the item can actually be represented as text (not binary data).\n */\n text: z.string()\n});\n/**\n * A Zod schema for validating Base64 strings that is more performant and\n * robust for very large inputs than the default regex-based check. It avoids\n * stack overflows by using the native `atob` function for validation.\n */\nconst Base64Schema = z.string().refine(val => {\n try {\n // atob throws a DOMException if the string contains characters\n // that are not part of the Base64 character set.\n atob(val);\n return true;\n }\n catch {\n return false;\n }\n}, { message: 'Invalid Base64 string' });\nexport const BlobResourceContentsSchema = ResourceContentsSchema.extend({\n /**\n * A base64-encoded string representing the binary data of the item.\n */\n blob: Base64Schema\n});\n/**\n * The sender or recipient of messages and data in a conversation.\n */\nexport const RoleSchema = z.enum(['user', 'assistant']);\n/**\n * Optional annotations providing clients additional context about a resource.\n */\nexport const AnnotationsSchema = z.object({\n /**\n * Intended audience(s) for the resource.\n */\n audience: z.array(RoleSchema).optional(),\n /**\n * Importance hint for the resource, from 0 (least) to 1 (most).\n */\n priority: z.number().min(0).max(1).optional(),\n /**\n * ISO 8601 timestamp for the most recent modification.\n */\n lastModified: z.iso.datetime({ offset: true }).optional()\n});\n/**\n * A known resource that the server is capable of reading.\n */\nexport const ResourceSchema = z.object({\n ...BaseMetadataSchema.shape,\n ...IconsSchema.shape,\n /**\n * The URI of this resource.\n */\n uri: z.string(),\n /**\n * A description of what this resource represents.\n *\n * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a \"hint\" to the model.\n */\n description: z.optional(z.string()),\n /**\n * The MIME type of this resource, if known.\n */\n mimeType: z.optional(z.string()),\n /**\n * The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.\n *\n * This can be used by Hosts to display file sizes and estimate context window usage.\n */\n size: z.optional(z.number()),\n /**\n * Optional annotations for the client.\n */\n annotations: AnnotationsSchema.optional(),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.optional(z.looseObject({}))\n});\n/**\n * A template description for resources available on the server.\n */\nexport const ResourceTemplateSchema = z.object({\n ...BaseMetadataSchema.shape,\n ...IconsSchema.shape,\n /**\n * A URI template (according to RFC 6570) that can be used to construct resource URIs.\n */\n uriTemplate: z.string(),\n /**\n * A description of what this template is for.\n *\n * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a \"hint\" to the model.\n */\n description: z.optional(z.string()),\n /**\n * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.\n */\n mimeType: z.optional(z.string()),\n /**\n * Optional annotations for the client.\n */\n annotations: AnnotationsSchema.optional(),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.optional(z.looseObject({}))\n});\n/**\n * Sent from the client to request a list of resources the server has.\n */\nexport const ListResourcesRequestSchema = PaginatedRequestSchema.extend({\n method: z.literal('resources/list')\n});\n/**\n * The server's response to a resources/list request from the client.\n */\nexport const ListResourcesResultSchema = PaginatedResultSchema.extend({\n resources: z.array(ResourceSchema)\n});\n/**\n * Sent from the client to request a list of resource templates the server has.\n */\nexport const ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({\n method: z.literal('resources/templates/list')\n});\n/**\n * The server's response to a resources/templates/list request from the client.\n */\nexport const ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({\n resourceTemplates: z.array(ResourceTemplateSchema)\n});\nexport const ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({\n /**\n * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.\n *\n * @format uri\n */\n uri: z.string()\n});\n/**\n * Parameters for a `resources/read` request.\n */\nexport const ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;\n/**\n * Sent from the client to the server, to read a specific resource URI.\n */\nexport const ReadResourceRequestSchema = RequestSchema.extend({\n method: z.literal('resources/read'),\n params: ReadResourceRequestParamsSchema\n});\n/**\n * The server's response to a resources/read request from the client.\n */\nexport const ReadResourceResultSchema = ResultSchema.extend({\n contents: z.array(z.union([TextResourceContentsSchema, BlobResourceContentsSchema]))\n});\n/**\n * An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.\n */\nexport const ResourceListChangedNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/resources/list_changed'),\n params: NotificationsParamsSchema.optional()\n});\nexport const SubscribeRequestParamsSchema = ResourceRequestParamsSchema;\n/**\n * Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.\n */\nexport const SubscribeRequestSchema = RequestSchema.extend({\n method: z.literal('resources/subscribe'),\n params: SubscribeRequestParamsSchema\n});\nexport const UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;\n/**\n * Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.\n */\nexport const UnsubscribeRequestSchema = RequestSchema.extend({\n method: z.literal('resources/unsubscribe'),\n params: UnsubscribeRequestParamsSchema\n});\n/**\n * Parameters for a `notifications/resources/updated` notification.\n */\nexport const ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({\n /**\n * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.\n */\n uri: z.string()\n});\n/**\n * A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request.\n */\nexport const ResourceUpdatedNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/resources/updated'),\n params: ResourceUpdatedNotificationParamsSchema\n});\n/* Prompts */\n/**\n * Describes an argument that a prompt can accept.\n */\nexport const PromptArgumentSchema = z.object({\n /**\n * The name of the argument.\n */\n name: z.string(),\n /**\n * A human-readable description of the argument.\n */\n description: z.optional(z.string()),\n /**\n * Whether this argument must be provided.\n */\n required: z.optional(z.boolean())\n});\n/**\n * A prompt or prompt template that the server offers.\n */\nexport const PromptSchema = z.object({\n ...BaseMetadataSchema.shape,\n ...IconsSchema.shape,\n /**\n * An optional description of what this prompt provides\n */\n description: z.optional(z.string()),\n /**\n * A list of arguments to use for templating the prompt.\n */\n arguments: z.optional(z.array(PromptArgumentSchema)),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.optional(z.looseObject({}))\n});\n/**\n * Sent from the client to request a list of prompts and prompt templates the server has.\n */\nexport const ListPromptsRequestSchema = PaginatedRequestSchema.extend({\n method: z.literal('prompts/list')\n});\n/**\n * The server's response to a prompts/list request from the client.\n */\nexport const ListPromptsResultSchema = PaginatedResultSchema.extend({\n prompts: z.array(PromptSchema)\n});\n/**\n * Parameters for a `prompts/get` request.\n */\nexport const GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({\n /**\n * The name of the prompt or prompt template.\n */\n name: z.string(),\n /**\n * Arguments to use for templating the prompt.\n */\n arguments: z.record(z.string(), z.string()).optional()\n});\n/**\n * Used by the client to get a prompt provided by the server.\n */\nexport const GetPromptRequestSchema = RequestSchema.extend({\n method: z.literal('prompts/get'),\n params: GetPromptRequestParamsSchema\n});\n/**\n * Text provided to or from an LLM.\n */\nexport const TextContentSchema = z.object({\n type: z.literal('text'),\n /**\n * The text content of the message.\n */\n text: z.string(),\n /**\n * Optional annotations for the client.\n */\n annotations: AnnotationsSchema.optional(),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n * An image provided to or from an LLM.\n */\nexport const ImageContentSchema = z.object({\n type: z.literal('image'),\n /**\n * The base64-encoded image data.\n */\n data: Base64Schema,\n /**\n * The MIME type of the image. Different providers may support different image types.\n */\n mimeType: z.string(),\n /**\n * Optional annotations for the client.\n */\n annotations: AnnotationsSchema.optional(),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n * An Audio provided to or from an LLM.\n */\nexport const AudioContentSchema = z.object({\n type: z.literal('audio'),\n /**\n * The base64-encoded audio data.\n */\n data: Base64Schema,\n /**\n * The MIME type of the audio. Different providers may support different audio types.\n */\n mimeType: z.string(),\n /**\n * Optional annotations for the client.\n */\n annotations: AnnotationsSchema.optional(),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n * A tool call request from an assistant (LLM).\n * Represents the assistant's request to use a tool.\n */\nexport const ToolUseContentSchema = z.object({\n type: z.literal('tool_use'),\n /**\n * The name of the tool to invoke.\n * Must match a tool name from the request's tools array.\n */\n name: z.string(),\n /**\n * Unique identifier for this tool call.\n * Used to correlate with ToolResultContent in subsequent messages.\n */\n id: z.string(),\n /**\n * Arguments to pass to the tool.\n * Must conform to the tool's inputSchema.\n */\n input: z.record(z.string(), z.unknown()),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n * The contents of a resource, embedded into a prompt or tool call result.\n */\nexport const EmbeddedResourceSchema = z.object({\n type: z.literal('resource'),\n resource: z.union([TextResourceContentsSchema, BlobResourceContentsSchema]),\n /**\n * Optional annotations for the client.\n */\n annotations: AnnotationsSchema.optional(),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n * A resource that the server is capable of reading, included in a prompt or tool call result.\n *\n * Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.\n */\nexport const ResourceLinkSchema = ResourceSchema.extend({\n type: z.literal('resource_link')\n});\n/**\n * A content block that can be used in prompts and tool results.\n */\nexport const ContentBlockSchema = z.union([\n TextContentSchema,\n ImageContentSchema,\n AudioContentSchema,\n ResourceLinkSchema,\n EmbeddedResourceSchema\n]);\n/**\n * Describes a message returned as part of a prompt.\n */\nexport const PromptMessageSchema = z.object({\n role: RoleSchema,\n content: ContentBlockSchema\n});\n/**\n * The server's response to a prompts/get request from the client.\n */\nexport const GetPromptResultSchema = ResultSchema.extend({\n /**\n * An optional description for the prompt.\n */\n description: z.string().optional(),\n messages: z.array(PromptMessageSchema)\n});\n/**\n * An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.\n */\nexport const PromptListChangedNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/prompts/list_changed'),\n params: NotificationsParamsSchema.optional()\n});\n/* Tools */\n/**\n * Additional properties describing a Tool to clients.\n *\n * NOTE: all properties in ToolAnnotations are **hints**.\n * They are not guaranteed to provide a faithful description of\n * tool behavior (including descriptive properties like `title`).\n *\n * Clients should never make tool use decisions based on ToolAnnotations\n * received from untrusted servers.\n */\nexport const ToolAnnotationsSchema = z.object({\n /**\n * A human-readable title for the tool.\n */\n title: z.string().optional(),\n /**\n * If true, the tool does not modify its environment.\n *\n * Default: false\n */\n readOnlyHint: z.boolean().optional(),\n /**\n * If true, the tool may perform destructive updates to its environment.\n * If false, the tool performs only additive updates.\n *\n * (This property is meaningful only when `readOnlyHint == false`)\n *\n * Default: true\n */\n destructiveHint: z.boolean().optional(),\n /**\n * If true, calling the tool repeatedly with the same arguments\n * will have no additional effect on the its environment.\n *\n * (This property is meaningful only when `readOnlyHint == false`)\n *\n * Default: false\n */\n idempotentHint: z.boolean().optional(),\n /**\n * If true, this tool may interact with an \"open world\" of external\n * entities. If false, the tool's domain of interaction is closed.\n * For example, the world of a web search tool is open, whereas that\n * of a memory tool is not.\n *\n * Default: true\n */\n openWorldHint: z.boolean().optional()\n});\n/**\n * Execution-related properties for a tool.\n */\nexport const ToolExecutionSchema = z.object({\n /**\n * Indicates the tool's preference for task-augmented execution.\n * - \"required\": Clients MUST invoke the tool as a task\n * - \"optional\": Clients MAY invoke the tool as a task or normal request\n * - \"forbidden\": Clients MUST NOT attempt to invoke the tool as a task\n *\n * If not present, defaults to \"forbidden\".\n */\n taskSupport: z.enum(['required', 'optional', 'forbidden']).optional()\n});\n/**\n * Definition for a tool the client can call.\n */\nexport const ToolSchema = z.object({\n ...BaseMetadataSchema.shape,\n ...IconsSchema.shape,\n /**\n * A human-readable description of the tool.\n */\n description: z.string().optional(),\n /**\n * A JSON Schema 2020-12 object defining the expected parameters for the tool.\n * Must have type: 'object' at the root level per MCP spec.\n */\n inputSchema: z\n .object({\n type: z.literal('object'),\n properties: z.record(z.string(), AssertObjectSchema).optional(),\n required: z.array(z.string()).optional()\n })\n .catchall(z.unknown()),\n /**\n * An optional JSON Schema 2020-12 object defining the structure of the tool's output\n * returned in the structuredContent field of a CallToolResult.\n * Must have type: 'object' at the root level per MCP spec.\n */\n outputSchema: z\n .object({\n type: z.literal('object'),\n properties: z.record(z.string(), AssertObjectSchema).optional(),\n required: z.array(z.string()).optional()\n })\n .catchall(z.unknown())\n .optional(),\n /**\n * Optional additional tool information.\n */\n annotations: ToolAnnotationsSchema.optional(),\n /**\n * Execution-related properties for this tool.\n */\n execution: ToolExecutionSchema.optional(),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n * Sent from the client to request a list of tools the server has.\n */\nexport const ListToolsRequestSchema = PaginatedRequestSchema.extend({\n method: z.literal('tools/list')\n});\n/**\n * The server's response to a tools/list request from the client.\n */\nexport const ListToolsResultSchema = PaginatedResultSchema.extend({\n tools: z.array(ToolSchema)\n});\n/**\n * The server's response to a tool call.\n */\nexport const CallToolResultSchema = ResultSchema.extend({\n /**\n * A list of content objects that represent the result of the tool call.\n *\n * If the Tool does not define an outputSchema, this field MUST be present in the result.\n * For backwards compatibility, this field is always present, but it may be empty.\n */\n content: z.array(ContentBlockSchema).default([]),\n /**\n * An object containing structured tool output.\n *\n * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.\n */\n structuredContent: z.record(z.string(), z.unknown()).optional(),\n /**\n * Whether the tool call ended in an error.\n *\n * If not set, this is assumed to be false (the call was successful).\n *\n * Any errors that originate from the tool SHOULD be reported inside the result\n * object, with `isError` set to true, _not_ as an MCP protocol-level error\n * response. Otherwise, the LLM would not be able to see that an error occurred\n * and self-correct.\n *\n * However, any errors in _finding_ the tool, an error indicating that the\n * server does not support tool calls, or any other exceptional conditions,\n * should be reported as an MCP error response.\n */\n isError: z.boolean().optional()\n});\n/**\n * CallToolResultSchema extended with backwards compatibility to protocol version 2024-10-07.\n */\nexport const CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({\n toolResult: z.unknown()\n}));\n/**\n * Parameters for a `tools/call` request.\n */\nexport const CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n /**\n * The name of the tool to call.\n */\n name: z.string(),\n /**\n * Arguments to pass to the tool.\n */\n arguments: z.record(z.string(), z.unknown()).optional()\n});\n/**\n * Used by the client to invoke a tool provided by the server.\n */\nexport const CallToolRequestSchema = RequestSchema.extend({\n method: z.literal('tools/call'),\n params: CallToolRequestParamsSchema\n});\n/**\n * An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.\n */\nexport const ToolListChangedNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/tools/list_changed'),\n params: NotificationsParamsSchema.optional()\n});\n/**\n * Base schema for list changed subscription options (without callback).\n * Used internally for Zod validation of autoRefresh and debounceMs.\n */\nexport const ListChangedOptionsBaseSchema = z.object({\n /**\n * If true, the list will be refreshed automatically when a list changed notification is received.\n * The callback will be called with the updated list.\n *\n * If false, the callback will be called with null items, allowing manual refresh.\n *\n * @default true\n */\n autoRefresh: z.boolean().default(true),\n /**\n * Debounce time in milliseconds for list changed notification processing.\n *\n * Multiple notifications received within this timeframe will only trigger one refresh.\n * Set to 0 to disable debouncing.\n *\n * @default 300\n */\n debounceMs: z.number().int().nonnegative().default(300)\n});\n/* Logging */\n/**\n * The severity of a log message.\n */\nexport const LoggingLevelSchema = z.enum(['debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency']);\n/**\n * Parameters for a `logging/setLevel` request.\n */\nexport const SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({\n /**\n * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message.\n */\n level: LoggingLevelSchema\n});\n/**\n * A request from the client to the server, to enable or adjust logging.\n */\nexport const SetLevelRequestSchema = RequestSchema.extend({\n method: z.literal('logging/setLevel'),\n params: SetLevelRequestParamsSchema\n});\n/**\n * Parameters for a `notifications/message` notification.\n */\nexport const LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({\n /**\n * The severity of this log message.\n */\n level: LoggingLevelSchema,\n /**\n * An optional name of the logger issuing this message.\n */\n logger: z.string().optional(),\n /**\n * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.\n */\n data: z.unknown()\n});\n/**\n * Notification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically.\n */\nexport const LoggingMessageNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/message'),\n params: LoggingMessageNotificationParamsSchema\n});\n/* Sampling */\n/**\n * Hints to use for model selection.\n */\nexport const ModelHintSchema = z.object({\n /**\n * A hint for a model name.\n */\n name: z.string().optional()\n});\n/**\n * The server's preferences for model selection, requested of the client during sampling.\n */\nexport const ModelPreferencesSchema = z.object({\n /**\n * Optional hints to use for model selection.\n */\n hints: z.array(ModelHintSchema).optional(),\n /**\n * How much to prioritize cost when selecting a model.\n */\n costPriority: z.number().min(0).max(1).optional(),\n /**\n * How much to prioritize sampling speed (latency) when selecting a model.\n */\n speedPriority: z.number().min(0).max(1).optional(),\n /**\n * How much to prioritize intelligence and capabilities when selecting a model.\n */\n intelligencePriority: z.number().min(0).max(1).optional()\n});\n/**\n * Controls tool usage behavior in sampling requests.\n */\nexport const ToolChoiceSchema = z.object({\n /**\n * Controls when tools are used:\n * - \"auto\": Model decides whether to use tools (default)\n * - \"required\": Model MUST use at least one tool before completing\n * - \"none\": Model MUST NOT use any tools\n */\n mode: z.enum(['auto', 'required', 'none']).optional()\n});\n/**\n * The result of a tool execution, provided by the user (server).\n * Represents the outcome of invoking a tool requested via ToolUseContent.\n */\nexport const ToolResultContentSchema = z.object({\n type: z.literal('tool_result'),\n toolUseId: z.string().describe('The unique identifier for the corresponding tool call.'),\n content: z.array(ContentBlockSchema).default([]),\n structuredContent: z.object({}).loose().optional(),\n isError: z.boolean().optional(),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n * Basic content types for sampling responses (without tool use).\n * Used for backwards-compatible CreateMessageResult when tools are not used.\n */\nexport const SamplingContentSchema = z.discriminatedUnion('type', [TextContentSchema, ImageContentSchema, AudioContentSchema]);\n/**\n * Content block types allowed in sampling messages.\n * This includes text, image, audio, tool use requests, and tool results.\n */\nexport const SamplingMessageContentBlockSchema = z.discriminatedUnion('type', [\n TextContentSchema,\n ImageContentSchema,\n AudioContentSchema,\n ToolUseContentSchema,\n ToolResultContentSchema\n]);\n/**\n * Describes a message issued to or received from an LLM API.\n */\nexport const SamplingMessageSchema = z.object({\n role: RoleSchema,\n content: z.union([SamplingMessageContentBlockSchema, z.array(SamplingMessageContentBlockSchema)]),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n * Parameters for a `sampling/createMessage` request.\n */\nexport const CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n messages: z.array(SamplingMessageSchema),\n /**\n * The server's preferences for which model to select. The client MAY modify or omit this request.\n */\n modelPreferences: ModelPreferencesSchema.optional(),\n /**\n * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.\n */\n systemPrompt: z.string().optional(),\n /**\n * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt.\n * The client MAY ignore this request.\n *\n * Default is \"none\". Values \"thisServer\" and \"allServers\" are soft-deprecated. Servers SHOULD only use these values if the client\n * declares ClientCapabilities.sampling.context. These values may be removed in future spec releases.\n */\n includeContext: z.enum(['none', 'thisServer', 'allServers']).optional(),\n temperature: z.number().optional(),\n /**\n * The requested maximum number of tokens to sample (to prevent runaway completions).\n *\n * The client MAY choose to sample fewer tokens than the requested maximum.\n */\n maxTokens: z.number().int(),\n stopSequences: z.array(z.string()).optional(),\n /**\n * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.\n */\n metadata: AssertObjectSchema.optional(),\n /**\n * Tools that the model may use during generation.\n * The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.\n */\n tools: z.array(ToolSchema).optional(),\n /**\n * Controls how the model uses tools.\n * The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.\n * Default is `{ mode: \"auto\" }`.\n */\n toolChoice: ToolChoiceSchema.optional()\n});\n/**\n * A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.\n */\nexport const CreateMessageRequestSchema = RequestSchema.extend({\n method: z.literal('sampling/createMessage'),\n params: CreateMessageRequestParamsSchema\n});\n/**\n * The client's response to a sampling/create_message request from the server.\n * This is the backwards-compatible version that returns single content (no arrays).\n * Used when the request does not include tools.\n */\nexport const CreateMessageResultSchema = ResultSchema.extend({\n /**\n * The name of the model that generated the message.\n */\n model: z.string(),\n /**\n * The reason why sampling stopped, if known.\n *\n * Standard values:\n * - \"endTurn\": Natural end of the assistant's turn\n * - \"stopSequence\": A stop sequence was encountered\n * - \"maxTokens\": Maximum token limit was reached\n *\n * This field is an open string to allow for provider-specific stop reasons.\n */\n stopReason: z.optional(z.enum(['endTurn', 'stopSequence', 'maxTokens']).or(z.string())),\n role: RoleSchema,\n /**\n * Response content. Single content block (text, image, or audio).\n */\n content: SamplingContentSchema\n});\n/**\n * The client's response to a sampling/create_message request when tools were provided.\n * This version supports array content for tool use flows.\n */\nexport const CreateMessageResultWithToolsSchema = ResultSchema.extend({\n /**\n * The name of the model that generated the message.\n */\n model: z.string(),\n /**\n * The reason why sampling stopped, if known.\n *\n * Standard values:\n * - \"endTurn\": Natural end of the assistant's turn\n * - \"stopSequence\": A stop sequence was encountered\n * - \"maxTokens\": Maximum token limit was reached\n * - \"toolUse\": The model wants to use one or more tools\n *\n * This field is an open string to allow for provider-specific stop reasons.\n */\n stopReason: z.optional(z.enum(['endTurn', 'stopSequence', 'maxTokens', 'toolUse']).or(z.string())),\n role: RoleSchema,\n /**\n * Response content. May be a single block or array. May include ToolUseContent if stopReason is \"toolUse\".\n */\n content: z.union([SamplingMessageContentBlockSchema, z.array(SamplingMessageContentBlockSchema)])\n});\n/* Elicitation */\n/**\n * Primitive schema definition for boolean fields.\n */\nexport const BooleanSchemaSchema = z.object({\n type: z.literal('boolean'),\n title: z.string().optional(),\n description: z.string().optional(),\n default: z.boolean().optional()\n});\n/**\n * Primitive schema definition for string fields.\n */\nexport const StringSchemaSchema = z.object({\n type: z.literal('string'),\n title: z.string().optional(),\n description: z.string().optional(),\n minLength: z.number().optional(),\n maxLength: z.number().optional(),\n format: z.enum(['email', 'uri', 'date', 'date-time']).optional(),\n default: z.string().optional()\n});\n/**\n * Primitive schema definition for number fields.\n */\nexport const NumberSchemaSchema = z.object({\n type: z.enum(['number', 'integer']),\n title: z.string().optional(),\n description: z.string().optional(),\n minimum: z.number().optional(),\n maximum: z.number().optional(),\n default: z.number().optional()\n});\n/**\n * Schema for single-selection enumeration without display titles for options.\n */\nexport const UntitledSingleSelectEnumSchemaSchema = z.object({\n type: z.literal('string'),\n title: z.string().optional(),\n description: z.string().optional(),\n enum: z.array(z.string()),\n default: z.string().optional()\n});\n/**\n * Schema for single-selection enumeration with display titles for each option.\n */\nexport const TitledSingleSelectEnumSchemaSchema = z.object({\n type: z.literal('string'),\n title: z.string().optional(),\n description: z.string().optional(),\n oneOf: z.array(z.object({\n const: z.string(),\n title: z.string()\n })),\n default: z.string().optional()\n});\n/**\n * Use TitledSingleSelectEnumSchema instead.\n * This interface will be removed in a future version.\n */\nexport const LegacyTitledEnumSchemaSchema = z.object({\n type: z.literal('string'),\n title: z.string().optional(),\n description: z.string().optional(),\n enum: z.array(z.string()),\n enumNames: z.array(z.string()).optional(),\n default: z.string().optional()\n});\n// Combined single selection enumeration\nexport const SingleSelectEnumSchemaSchema = z.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);\n/**\n * Schema for multiple-selection enumeration without display titles for options.\n */\nexport const UntitledMultiSelectEnumSchemaSchema = z.object({\n type: z.literal('array'),\n title: z.string().optional(),\n description: z.string().optional(),\n minItems: z.number().optional(),\n maxItems: z.number().optional(),\n items: z.object({\n type: z.literal('string'),\n enum: z.array(z.string())\n }),\n default: z.array(z.string()).optional()\n});\n/**\n * Schema for multiple-selection enumeration with display titles for each option.\n */\nexport const TitledMultiSelectEnumSchemaSchema = z.object({\n type: z.literal('array'),\n title: z.string().optional(),\n description: z.string().optional(),\n minItems: z.number().optional(),\n maxItems: z.number().optional(),\n items: z.object({\n anyOf: z.array(z.object({\n const: z.string(),\n title: z.string()\n }))\n }),\n default: z.array(z.string()).optional()\n});\n/**\n * Combined schema for multiple-selection enumeration\n */\nexport const MultiSelectEnumSchemaSchema = z.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);\n/**\n * Primitive schema definition for enum fields.\n */\nexport const EnumSchemaSchema = z.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);\n/**\n * Union of all primitive schema definitions.\n */\nexport const PrimitiveSchemaDefinitionSchema = z.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);\n/**\n * Parameters for an `elicitation/create` request for form-based elicitation.\n */\nexport const ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n /**\n * The elicitation mode.\n *\n * Optional for backward compatibility. Clients MUST treat missing mode as \"form\".\n */\n mode: z.literal('form').optional(),\n /**\n * The message to present to the user describing what information is being requested.\n */\n message: z.string(),\n /**\n * A restricted subset of JSON Schema.\n * Only top-level properties are allowed, without nesting.\n */\n requestedSchema: z.object({\n type: z.literal('object'),\n properties: z.record(z.string(), PrimitiveSchemaDefinitionSchema),\n required: z.array(z.string()).optional()\n })\n});\n/**\n * Parameters for an `elicitation/create` request for URL-based elicitation.\n */\nexport const ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n /**\n * The elicitation mode.\n */\n mode: z.literal('url'),\n /**\n * The message to present to the user explaining why the interaction is needed.\n */\n message: z.string(),\n /**\n * The ID of the elicitation, which must be unique within the context of the server.\n * The client MUST treat this ID as an opaque value.\n */\n elicitationId: z.string(),\n /**\n * The URL that the user should navigate to.\n */\n url: z.string().url()\n});\n/**\n * The parameters for a request to elicit additional information from the user via the client.\n */\nexport const ElicitRequestParamsSchema = z.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);\n/**\n * A request from the server to elicit user input via the client.\n * The client should present the message and form fields to the user (form mode)\n * or navigate to a URL (URL mode).\n */\nexport const ElicitRequestSchema = RequestSchema.extend({\n method: z.literal('elicitation/create'),\n params: ElicitRequestParamsSchema\n});\n/**\n * Parameters for a `notifications/elicitation/complete` notification.\n *\n * @category notifications/elicitation/complete\n */\nexport const ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({\n /**\n * The ID of the elicitation that completed.\n */\n elicitationId: z.string()\n});\n/**\n * A notification from the server to the client, informing it of a completion of an out-of-band elicitation request.\n *\n * @category notifications/elicitation/complete\n */\nexport const ElicitationCompleteNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/elicitation/complete'),\n params: ElicitationCompleteNotificationParamsSchema\n});\n/**\n * The client's response to an elicitation/create request from the server.\n */\nexport const ElicitResultSchema = ResultSchema.extend({\n /**\n * The user action in response to the elicitation.\n * - \"accept\": User submitted the form/confirmed the action\n * - \"decline\": User explicitly decline the action\n * - \"cancel\": User dismissed without making an explicit choice\n */\n action: z.enum(['accept', 'decline', 'cancel']),\n /**\n * The submitted form data, only present when action is \"accept\".\n * Contains values matching the requested schema.\n * Per MCP spec, content is \"typically omitted\" for decline/cancel actions.\n * We normalize null to undefined for leniency while maintaining type compatibility.\n */\n content: z.preprocess(val => (val === null ? undefined : val), z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])).optional())\n});\n/* Autocomplete */\n/**\n * A reference to a resource or resource template definition.\n */\nexport const ResourceTemplateReferenceSchema = z.object({\n type: z.literal('ref/resource'),\n /**\n * The URI or URI template of the resource.\n */\n uri: z.string()\n});\n/**\n * @deprecated Use ResourceTemplateReferenceSchema instead\n */\nexport const ResourceReferenceSchema = ResourceTemplateReferenceSchema;\n/**\n * Identifies a prompt.\n */\nexport const PromptReferenceSchema = z.object({\n type: z.literal('ref/prompt'),\n /**\n * The name of the prompt or prompt template\n */\n name: z.string()\n});\n/**\n * Parameters for a `completion/complete` request.\n */\nexport const CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({\n ref: z.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),\n /**\n * The argument's information\n */\n argument: z.object({\n /**\n * The name of the argument\n */\n name: z.string(),\n /**\n * The value of the argument to use for completion matching.\n */\n value: z.string()\n }),\n context: z\n .object({\n /**\n * Previously-resolved variables in a URI template or prompt.\n */\n arguments: z.record(z.string(), z.string()).optional()\n })\n .optional()\n});\n/**\n * A request from the client to the server, to ask for completion options.\n */\nexport const CompleteRequestSchema = RequestSchema.extend({\n method: z.literal('completion/complete'),\n params: CompleteRequestParamsSchema\n});\nexport function assertCompleteRequestPrompt(request) {\n if (request.params.ref.type !== 'ref/prompt') {\n throw new TypeError(`Expected CompleteRequestPrompt, but got ${request.params.ref.type}`);\n }\n void request;\n}\nexport function assertCompleteRequestResourceTemplate(request) {\n if (request.params.ref.type !== 'ref/resource') {\n throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${request.params.ref.type}`);\n }\n void request;\n}\n/**\n * The server's response to a completion/complete request\n */\nexport const CompleteResultSchema = ResultSchema.extend({\n completion: z.looseObject({\n /**\n * An array of completion values. Must not exceed 100 items.\n */\n values: z.array(z.string()).max(100),\n /**\n * The total number of completion options available. This can exceed the number of values actually sent in the response.\n */\n total: z.optional(z.number().int()),\n /**\n * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.\n */\n hasMore: z.optional(z.boolean())\n })\n});\n/* Roots */\n/**\n * Represents a root directory or file that the server can operate on.\n */\nexport const RootSchema = z.object({\n /**\n * The URI identifying the root. This *must* start with file:// for now.\n */\n uri: z.string().startsWith('file://'),\n /**\n * An optional name for the root.\n */\n name: z.string().optional(),\n /**\n * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)\n * for notes on _meta usage.\n */\n _meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n * Sent from the server to request a list of root URIs from the client.\n */\nexport const ListRootsRequestSchema = RequestSchema.extend({\n method: z.literal('roots/list'),\n params: BaseRequestParamsSchema.optional()\n});\n/**\n * The client's response to a roots/list request from the server.\n */\nexport const ListRootsResultSchema = ResultSchema.extend({\n roots: z.array(RootSchema)\n});\n/**\n * A notification from the client to the server, informing it that the list of roots has changed.\n */\nexport const RootsListChangedNotificationSchema = NotificationSchema.extend({\n method: z.literal('notifications/roots/list_changed'),\n params: NotificationsParamsSchema.optional()\n});\n/* Client messages */\nexport const ClientRequestSchema = z.union([\n PingRequestSchema,\n InitializeRequestSchema,\n CompleteRequestSchema,\n SetLevelRequestSchema,\n GetPromptRequestSchema,\n ListPromptsRequestSchema,\n ListResourcesRequestSchema,\n ListResourceTemplatesRequestSchema,\n ReadResourceRequestSchema,\n SubscribeRequestSchema,\n UnsubscribeRequestSchema,\n CallToolRequestSchema,\n ListToolsRequestSchema,\n GetTaskRequestSchema,\n GetTaskPayloadRequestSchema,\n ListTasksRequestSchema,\n CancelTaskRequestSchema\n]);\nexport const ClientNotificationSchema = z.union([\n CancelledNotificationSchema,\n ProgressNotificationSchema,\n InitializedNotificationSchema,\n RootsListChangedNotificationSchema,\n TaskStatusNotificationSchema\n]);\nexport const ClientResultSchema = z.union([\n EmptyResultSchema,\n CreateMessageResultSchema,\n CreateMessageResultWithToolsSchema,\n ElicitResultSchema,\n ListRootsResultSchema,\n GetTaskResultSchema,\n ListTasksResultSchema,\n CreateTaskResultSchema\n]);\n/* Server messages */\nexport const ServerRequestSchema = z.union([\n PingRequestSchema,\n CreateMessageRequestSchema,\n ElicitRequestSchema,\n ListRootsRequestSchema,\n GetTaskRequestSchema,\n GetTaskPayloadRequestSchema,\n ListTasksRequestSchema,\n CancelTaskRequestSchema\n]);\nexport const ServerNotificationSchema = z.union([\n CancelledNotificationSchema,\n ProgressNotificationSchema,\n LoggingMessageNotificationSchema,\n ResourceUpdatedNotificationSchema,\n ResourceListChangedNotificationSchema,\n ToolListChangedNotificationSchema,\n PromptListChangedNotificationSchema,\n TaskStatusNotificationSchema,\n ElicitationCompleteNotificationSchema\n]);\nexport const ServerResultSchema = z.union([\n EmptyResultSchema,\n InitializeResultSchema,\n CompleteResultSchema,\n GetPromptResultSchema,\n ListPromptsResultSchema,\n ListResourcesResultSchema,\n ListResourceTemplatesResultSchema,\n ReadResourceResultSchema,\n CallToolResultSchema,\n ListToolsResultSchema,\n GetTaskResultSchema,\n ListTasksResultSchema,\n CreateTaskResultSchema\n]);\nexport class McpError extends Error {\n constructor(code, message, data) {\n super(`MCP error ${code}: ${message}`);\n this.code = code;\n this.data = data;\n this.name = 'McpError';\n }\n /**\n * Factory method to create the appropriate error type based on the error code and data\n */\n static fromError(code, message, data) {\n // Check for specific error types\n if (code === ErrorCode.UrlElicitationRequired && data) {\n const errorData = data;\n if (errorData.elicitations) {\n return new UrlElicitationRequiredError(errorData.elicitations, message);\n }\n }\n // Default to generic McpError\n return new McpError(code, message, data);\n }\n}\n/**\n * Specialized error type when a tool requires a URL mode elicitation.\n * This makes it nicer for the client to handle since there is specific data to work with instead of just a code to check against.\n */\nexport class UrlElicitationRequiredError extends McpError {\n constructor(elicitations, message = `URL elicitation${elicitations.length > 1 ? 's' : ''} required`) {\n super(ErrorCode.UrlElicitationRequired, message, {\n elicitations: elicitations\n });\n }\n get elicitations() {\n return this.data?.elicitations ?? [];\n }\n}\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nclass _CodeOrName {\n}\nexports._CodeOrName = _CodeOrName;\nexports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;\nclass Name extends _CodeOrName {\n constructor(s) {\n super();\n if (!exports.IDENTIFIER.test(s))\n throw new Error(\"CodeGen: name must be a valid identifier\");\n this.str = s;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n return false;\n }\n get names() {\n return { [this.str]: 1 };\n }\n}\nexports.Name = Name;\nclass _Code extends _CodeOrName {\n constructor(code) {\n super();\n this._items = typeof code === \"string\" ? [code] : code;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n if (this._items.length > 1)\n return false;\n const item = this._items[0];\n return item === \"\" || item === '\"\"';\n }\n get str() {\n var _a;\n return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, \"\")));\n }\n get names() {\n var _a;\n return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => {\n if (c instanceof Name)\n names[c.str] = (names[c.str] || 0) + 1;\n return names;\n }, {})));\n }\n}\nexports._Code = _Code;\nexports.nil = new _Code(\"\");\nfunction _(strs, ...args) {\n const code = [strs[0]];\n let i = 0;\n while (i < args.length) {\n addCodeArg(code, args[i]);\n code.push(strs[++i]);\n }\n return new _Code(code);\n}\nexports._ = _;\nconst plus = new _Code(\"+\");\nfunction str(strs, ...args) {\n const expr = [safeStringify(strs[0])];\n let i = 0;\n while (i < args.length) {\n expr.push(plus);\n addCodeArg(expr, args[i]);\n expr.push(plus, safeStringify(strs[++i]));\n }\n optimize(expr);\n return new _Code(expr);\n}\nexports.str = str;\nfunction addCodeArg(code, arg) {\n if (arg instanceof _Code)\n code.push(...arg._items);\n else if (arg instanceof Name)\n code.push(arg);\n else\n code.push(interpolate(arg));\n}\nexports.addCodeArg = addCodeArg;\nfunction optimize(expr) {\n let i = 1;\n while (i < expr.length - 1) {\n if (expr[i] === plus) {\n const res = mergeExprItems(expr[i - 1], expr[i + 1]);\n if (res !== undefined) {\n expr.splice(i - 1, 3, res);\n continue;\n }\n expr[i++] = \"+\";\n }\n i++;\n }\n}\nfunction mergeExprItems(a, b) {\n if (b === '\"\"')\n return a;\n if (a === '\"\"')\n return b;\n if (typeof a == \"string\") {\n if (b instanceof Name || a[a.length - 1] !== '\"')\n return;\n if (typeof b != \"string\")\n return `${a.slice(0, -1)}${b}\"`;\n if (b[0] === '\"')\n return a.slice(0, -1) + b.slice(1);\n return;\n }\n if (typeof b == \"string\" && b[0] === '\"' && !(a instanceof Name))\n return `\"${a}${b.slice(1)}`;\n return;\n}\nfunction strConcat(c1, c2) {\n return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;\n}\nexports.strConcat = strConcat;\n// TODO do not allow arrays here\nfunction interpolate(x) {\n return typeof x == \"number\" || typeof x == \"boolean\" || x === null\n ? x\n : safeStringify(Array.isArray(x) ? x.join(\",\") : x);\n}\nfunction stringify(x) {\n return new _Code(safeStringify(x));\n}\nexports.stringify = stringify;\nfunction safeStringify(x) {\n return JSON.stringify(x)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\");\n}\nexports.safeStringify = safeStringify;\nfunction getProperty(key) {\n return typeof key == \"string\" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;\n}\nexports.getProperty = getProperty;\n//Does best effort to format the name properly\nfunction getEsmExportName(key) {\n if (typeof key == \"string\" && exports.IDENTIFIER.test(key)) {\n return new _Code(`${key}`);\n }\n throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);\n}\nexports.getEsmExportName = getEsmExportName;\nfunction regexpCode(rx) {\n return new _Code(rx.toString());\n}\nexports.regexpCode = regexpCode;\n//# sourceMappingURL=code.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;\nconst code_1 = require(\"./code\");\nclass ValueError extends Error {\n constructor(name) {\n super(`CodeGen: \"code\" for ${name} not defined`);\n this.value = name.value;\n }\n}\nvar UsedValueState;\n(function (UsedValueState) {\n UsedValueState[UsedValueState[\"Started\"] = 0] = \"Started\";\n UsedValueState[UsedValueState[\"Completed\"] = 1] = \"Completed\";\n})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));\nexports.varKinds = {\n const: new code_1.Name(\"const\"),\n let: new code_1.Name(\"let\"),\n var: new code_1.Name(\"var\"),\n};\nclass Scope {\n constructor({ prefixes, parent } = {}) {\n this._names = {};\n this._prefixes = prefixes;\n this._parent = parent;\n }\n toName(nameOrPrefix) {\n return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);\n }\n name(prefix) {\n return new code_1.Name(this._newName(prefix));\n }\n _newName(prefix) {\n const ng = this._names[prefix] || this._nameGroup(prefix);\n return `${prefix}${ng.index++}`;\n }\n _nameGroup(prefix) {\n var _a, _b;\n if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || (this._prefixes && !this._prefixes.has(prefix))) {\n throw new Error(`CodeGen: prefix \"${prefix}\" is not allowed in this scope`);\n }\n return (this._names[prefix] = { prefix, index: 0 });\n }\n}\nexports.Scope = Scope;\nclass ValueScopeName extends code_1.Name {\n constructor(prefix, nameStr) {\n super(nameStr);\n this.prefix = prefix;\n }\n setValue(value, { property, itemIndex }) {\n this.value = value;\n this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`;\n }\n}\nexports.ValueScopeName = ValueScopeName;\nconst line = (0, code_1._) `\\n`;\nclass ValueScope extends Scope {\n constructor(opts) {\n super(opts);\n this._values = {};\n this._scope = opts.scope;\n this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };\n }\n get() {\n return this._scope;\n }\n name(prefix) {\n return new ValueScopeName(prefix, this._newName(prefix));\n }\n value(nameOrPrefix, value) {\n var _a;\n if (value.ref === undefined)\n throw new Error(\"CodeGen: ref must be passed in value\");\n const name = this.toName(nameOrPrefix);\n const { prefix } = name;\n const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;\n let vs = this._values[prefix];\n if (vs) {\n const _name = vs.get(valueKey);\n if (_name)\n return _name;\n }\n else {\n vs = this._values[prefix] = new Map();\n }\n vs.set(valueKey, name);\n const s = this._scope[prefix] || (this._scope[prefix] = []);\n const itemIndex = s.length;\n s[itemIndex] = value.ref;\n name.setValue(value, { property: prefix, itemIndex });\n return name;\n }\n getValue(prefix, keyOrRef) {\n const vs = this._values[prefix];\n if (!vs)\n return;\n return vs.get(keyOrRef);\n }\n scopeRefs(scopeName, values = this._values) {\n return this._reduceValues(values, (name) => {\n if (name.scopePath === undefined)\n throw new Error(`CodeGen: name \"${name}\" has no value`);\n return (0, code_1._) `${scopeName}${name.scopePath}`;\n });\n }\n scopeCode(values = this._values, usedValues, getCode) {\n return this._reduceValues(values, (name) => {\n if (name.value === undefined)\n throw new Error(`CodeGen: name \"${name}\" has no value`);\n return name.value.code;\n }, usedValues, getCode);\n }\n _reduceValues(values, valueCode, usedValues = {}, getCode) {\n let code = code_1.nil;\n for (const prefix in values) {\n const vs = values[prefix];\n if (!vs)\n continue;\n const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map());\n vs.forEach((name) => {\n if (nameSet.has(name))\n return;\n nameSet.set(name, UsedValueState.Started);\n let c = valueCode(name);\n if (c) {\n const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;\n code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`;\n }\n else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) {\n code = (0, code_1._) `${code}${c}${this.opts._n}`;\n }\n else {\n throw new ValueError(name);\n }\n nameSet.set(name, UsedValueState.Completed);\n });\n }\n return code;\n }\n}\nexports.ValueScope = ValueScope;\n//# sourceMappingURL=scope.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;\nconst code_1 = require(\"./code\");\nconst scope_1 = require(\"./scope\");\nvar code_2 = require(\"./code\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return code_2._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return code_2.str; } });\nObject.defineProperty(exports, \"strConcat\", { enumerable: true, get: function () { return code_2.strConcat; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return code_2.nil; } });\nObject.defineProperty(exports, \"getProperty\", { enumerable: true, get: function () { return code_2.getProperty; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return code_2.stringify; } });\nObject.defineProperty(exports, \"regexpCode\", { enumerable: true, get: function () { return code_2.regexpCode; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return code_2.Name; } });\nvar scope_2 = require(\"./scope\");\nObject.defineProperty(exports, \"Scope\", { enumerable: true, get: function () { return scope_2.Scope; } });\nObject.defineProperty(exports, \"ValueScope\", { enumerable: true, get: function () { return scope_2.ValueScope; } });\nObject.defineProperty(exports, \"ValueScopeName\", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });\nObject.defineProperty(exports, \"varKinds\", { enumerable: true, get: function () { return scope_2.varKinds; } });\nexports.operators = {\n GT: new code_1._Code(\">\"),\n GTE: new code_1._Code(\">=\"),\n LT: new code_1._Code(\"<\"),\n LTE: new code_1._Code(\"<=\"),\n EQ: new code_1._Code(\"===\"),\n NEQ: new code_1._Code(\"!==\"),\n NOT: new code_1._Code(\"!\"),\n OR: new code_1._Code(\"||\"),\n AND: new code_1._Code(\"&&\"),\n ADD: new code_1._Code(\"+\"),\n};\nclass Node {\n optimizeNodes() {\n return this;\n }\n optimizeNames(_names, _constants) {\n return this;\n }\n}\nclass Def extends Node {\n constructor(varKind, name, rhs) {\n super();\n this.varKind = varKind;\n this.name = name;\n this.rhs = rhs;\n }\n render({ es5, _n }) {\n const varKind = es5 ? scope_1.varKinds.var : this.varKind;\n const rhs = this.rhs === undefined ? \"\" : ` = ${this.rhs}`;\n return `${varKind} ${this.name}${rhs};` + _n;\n }\n optimizeNames(names, constants) {\n if (!names[this.name.str])\n return;\n if (this.rhs)\n this.rhs = optimizeExpr(this.rhs, names, constants);\n return this;\n }\n get names() {\n return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};\n }\n}\nclass Assign extends Node {\n constructor(lhs, rhs, sideEffects) {\n super();\n this.lhs = lhs;\n this.rhs = rhs;\n this.sideEffects = sideEffects;\n }\n render({ _n }) {\n return `${this.lhs} = ${this.rhs};` + _n;\n }\n optimizeNames(names, constants) {\n if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)\n return;\n this.rhs = optimizeExpr(this.rhs, names, constants);\n return this;\n }\n get names() {\n const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };\n return addExprNames(names, this.rhs);\n }\n}\nclass AssignOp extends Assign {\n constructor(lhs, op, rhs, sideEffects) {\n super(lhs, rhs, sideEffects);\n this.op = op;\n }\n render({ _n }) {\n return `${this.lhs} ${this.op}= ${this.rhs};` + _n;\n }\n}\nclass Label extends Node {\n constructor(label) {\n super();\n this.label = label;\n this.names = {};\n }\n render({ _n }) {\n return `${this.label}:` + _n;\n }\n}\nclass Break extends Node {\n constructor(label) {\n super();\n this.label = label;\n this.names = {};\n }\n render({ _n }) {\n const label = this.label ? ` ${this.label}` : \"\";\n return `break${label};` + _n;\n }\n}\nclass Throw extends Node {\n constructor(error) {\n super();\n this.error = error;\n }\n render({ _n }) {\n return `throw ${this.error};` + _n;\n }\n get names() {\n return this.error.names;\n }\n}\nclass AnyCode extends Node {\n constructor(code) {\n super();\n this.code = code;\n }\n render({ _n }) {\n return `${this.code};` + _n;\n }\n optimizeNodes() {\n return `${this.code}` ? this : undefined;\n }\n optimizeNames(names, constants) {\n this.code = optimizeExpr(this.code, names, constants);\n return this;\n }\n get names() {\n return this.code instanceof code_1._CodeOrName ? this.code.names : {};\n }\n}\nclass ParentNode extends Node {\n constructor(nodes = []) {\n super();\n this.nodes = nodes;\n }\n render(opts) {\n return this.nodes.reduce((code, n) => code + n.render(opts), \"\");\n }\n optimizeNodes() {\n const { nodes } = this;\n let i = nodes.length;\n while (i--) {\n const n = nodes[i].optimizeNodes();\n if (Array.isArray(n))\n nodes.splice(i, 1, ...n);\n else if (n)\n nodes[i] = n;\n else\n nodes.splice(i, 1);\n }\n return nodes.length > 0 ? this : undefined;\n }\n optimizeNames(names, constants) {\n const { nodes } = this;\n let i = nodes.length;\n while (i--) {\n // iterating backwards improves 1-pass optimization\n const n = nodes[i];\n if (n.optimizeNames(names, constants))\n continue;\n subtractNames(names, n.names);\n nodes.splice(i, 1);\n }\n return nodes.length > 0 ? this : undefined;\n }\n get names() {\n return this.nodes.reduce((names, n) => addNames(names, n.names), {});\n }\n}\nclass BlockNode extends ParentNode {\n render(opts) {\n return \"{\" + opts._n + super.render(opts) + \"}\" + opts._n;\n }\n}\nclass Root extends ParentNode {\n}\nclass Else extends BlockNode {\n}\nElse.kind = \"else\";\nclass If extends BlockNode {\n constructor(condition, nodes) {\n super(nodes);\n this.condition = condition;\n }\n render(opts) {\n let code = `if(${this.condition})` + super.render(opts);\n if (this.else)\n code += \"else \" + this.else.render(opts);\n return code;\n }\n optimizeNodes() {\n super.optimizeNodes();\n const cond = this.condition;\n if (cond === true)\n return this.nodes; // else is ignored here\n let e = this.else;\n if (e) {\n const ns = e.optimizeNodes();\n e = this.else = Array.isArray(ns) ? new Else(ns) : ns;\n }\n if (e) {\n if (cond === false)\n return e instanceof If ? e : e.nodes;\n if (this.nodes.length)\n return this;\n return new If(not(cond), e instanceof If ? [e] : e.nodes);\n }\n if (cond === false || !this.nodes.length)\n return undefined;\n return this;\n }\n optimizeNames(names, constants) {\n var _a;\n this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n if (!(super.optimizeNames(names, constants) || this.else))\n return;\n this.condition = optimizeExpr(this.condition, names, constants);\n return this;\n }\n get names() {\n const names = super.names;\n addExprNames(names, this.condition);\n if (this.else)\n addNames(names, this.else.names);\n return names;\n }\n}\nIf.kind = \"if\";\nclass For extends BlockNode {\n}\nFor.kind = \"for\";\nclass ForLoop extends For {\n constructor(iteration) {\n super();\n this.iteration = iteration;\n }\n render(opts) {\n return `for(${this.iteration})` + super.render(opts);\n }\n optimizeNames(names, constants) {\n if (!super.optimizeNames(names, constants))\n return;\n this.iteration = optimizeExpr(this.iteration, names, constants);\n return this;\n }\n get names() {\n return addNames(super.names, this.iteration.names);\n }\n}\nclass ForRange extends For {\n constructor(varKind, name, from, to) {\n super();\n this.varKind = varKind;\n this.name = name;\n this.from = from;\n this.to = to;\n }\n render(opts) {\n const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;\n const { name, from, to } = this;\n return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);\n }\n get names() {\n const names = addExprNames(super.names, this.from);\n return addExprNames(names, this.to);\n }\n}\nclass ForIter extends For {\n constructor(loop, varKind, name, iterable) {\n super();\n this.loop = loop;\n this.varKind = varKind;\n this.name = name;\n this.iterable = iterable;\n }\n render(opts) {\n return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);\n }\n optimizeNames(names, constants) {\n if (!super.optimizeNames(names, constants))\n return;\n this.iterable = optimizeExpr(this.iterable, names, constants);\n return this;\n }\n get names() {\n return addNames(super.names, this.iterable.names);\n }\n}\nclass Func extends BlockNode {\n constructor(name, args, async) {\n super();\n this.name = name;\n this.args = args;\n this.async = async;\n }\n render(opts) {\n const _async = this.async ? \"async \" : \"\";\n return `${_async}function ${this.name}(${this.args})` + super.render(opts);\n }\n}\nFunc.kind = \"func\";\nclass Return extends ParentNode {\n render(opts) {\n return \"return \" + super.render(opts);\n }\n}\nReturn.kind = \"return\";\nclass Try extends BlockNode {\n render(opts) {\n let code = \"try\" + super.render(opts);\n if (this.catch)\n code += this.catch.render(opts);\n if (this.finally)\n code += this.finally.render(opts);\n return code;\n }\n optimizeNodes() {\n var _a, _b;\n super.optimizeNodes();\n (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();\n (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();\n return this;\n }\n optimizeNames(names, constants) {\n var _a, _b;\n super.optimizeNames(names, constants);\n (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);\n return this;\n }\n get names() {\n const names = super.names;\n if (this.catch)\n addNames(names, this.catch.names);\n if (this.finally)\n addNames(names, this.finally.names);\n return names;\n }\n}\nclass Catch extends BlockNode {\n constructor(error) {\n super();\n this.error = error;\n }\n render(opts) {\n return `catch(${this.error})` + super.render(opts);\n }\n}\nCatch.kind = \"catch\";\nclass Finally extends BlockNode {\n render(opts) {\n return \"finally\" + super.render(opts);\n }\n}\nFinally.kind = \"finally\";\nclass CodeGen {\n constructor(extScope, opts = {}) {\n this._values = {};\n this._blockStarts = [];\n this._constants = {};\n this.opts = { ...opts, _n: opts.lines ? \"\\n\" : \"\" };\n this._extScope = extScope;\n this._scope = new scope_1.Scope({ parent: extScope });\n this._nodes = [new Root()];\n }\n toString() {\n return this._root.render(this.opts);\n }\n // returns unique name in the internal scope\n name(prefix) {\n return this._scope.name(prefix);\n }\n // reserves unique name in the external scope\n scopeName(prefix) {\n return this._extScope.name(prefix);\n }\n // reserves unique name in the external scope and assigns value to it\n scopeValue(prefixOrName, value) {\n const name = this._extScope.value(prefixOrName, value);\n const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set());\n vs.add(name);\n return name;\n }\n getScopeValue(prefix, keyOrRef) {\n return this._extScope.getValue(prefix, keyOrRef);\n }\n // return code that assigns values in the external scope to the names that are used internally\n // (same names that were returned by gen.scopeName or gen.scopeValue)\n scopeRefs(scopeName) {\n return this._extScope.scopeRefs(scopeName, this._values);\n }\n scopeCode() {\n return this._extScope.scopeCode(this._values);\n }\n _def(varKind, nameOrPrefix, rhs, constant) {\n const name = this._scope.toName(nameOrPrefix);\n if (rhs !== undefined && constant)\n this._constants[name.str] = rhs;\n this._leafNode(new Def(varKind, name, rhs));\n return name;\n }\n // `const` declaration (`var` in es5 mode)\n const(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);\n }\n // `let` declaration with optional assignment (`var` in es5 mode)\n let(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);\n }\n // `var` declaration with optional assignment\n var(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);\n }\n // assignment code\n assign(lhs, rhs, sideEffects) {\n return this._leafNode(new Assign(lhs, rhs, sideEffects));\n }\n // `+=` code\n add(lhs, rhs) {\n return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));\n }\n // appends passed SafeExpr to code or executes Block\n code(c) {\n if (typeof c == \"function\")\n c();\n else if (c !== code_1.nil)\n this._leafNode(new AnyCode(c));\n return this;\n }\n // returns code for object literal for the passed argument list of key-value pairs\n object(...keyValues) {\n const code = [\"{\"];\n for (const [key, value] of keyValues) {\n if (code.length > 1)\n code.push(\",\");\n code.push(key);\n if (key !== value || this.opts.es5) {\n code.push(\":\");\n (0, code_1.addCodeArg)(code, value);\n }\n }\n code.push(\"}\");\n return new code_1._Code(code);\n }\n // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)\n if(condition, thenBody, elseBody) {\n this._blockNode(new If(condition));\n if (thenBody && elseBody) {\n this.code(thenBody).else().code(elseBody).endIf();\n }\n else if (thenBody) {\n this.code(thenBody).endIf();\n }\n else if (elseBody) {\n throw new Error('CodeGen: \"else\" body without \"then\" body');\n }\n return this;\n }\n // `else if` clause - invalid without `if` or after `else` clauses\n elseIf(condition) {\n return this._elseNode(new If(condition));\n }\n // `else` clause - only valid after `if` or `else if` clauses\n else() {\n return this._elseNode(new Else());\n }\n // end `if` statement (needed if gen.if was used only with condition)\n endIf() {\n return this._endBlockNode(If, Else);\n }\n _for(node, forBody) {\n this._blockNode(node);\n if (forBody)\n this.code(forBody).endFor();\n return this;\n }\n // a generic `for` clause (or statement if `forBody` is passed)\n for(iteration, forBody) {\n return this._for(new ForLoop(iteration), forBody);\n }\n // `for` statement for a range of values\n forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForRange(varKind, name, from, to), () => forBody(name));\n }\n // `for-of` statement (in es5 mode replace with a normal for loop)\n forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {\n const name = this._scope.toName(nameOrPrefix);\n if (this.opts.es5) {\n const arr = iterable instanceof code_1.Name ? iterable : this.var(\"_arr\", iterable);\n return this.forRange(\"_i\", 0, (0, code_1._) `${arr}.length`, (i) => {\n this.var(name, (0, code_1._) `${arr}[${i}]`);\n forBody(name);\n });\n }\n return this._for(new ForIter(\"of\", varKind, name, iterable), () => forBody(name));\n }\n // `for-in` statement.\n // With option `ownProperties` replaced with a `for-of` loop for object keys\n forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {\n if (this.opts.ownProperties) {\n return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody);\n }\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name));\n }\n // end `for` loop\n endFor() {\n return this._endBlockNode(For);\n }\n // `label` statement\n label(label) {\n return this._leafNode(new Label(label));\n }\n // `break` statement\n break(label) {\n return this._leafNode(new Break(label));\n }\n // `return` statement\n return(value) {\n const node = new Return();\n this._blockNode(node);\n this.code(value);\n if (node.nodes.length !== 1)\n throw new Error('CodeGen: \"return\" should have one node');\n return this._endBlockNode(Return);\n }\n // `try` statement\n try(tryBody, catchCode, finallyCode) {\n if (!catchCode && !finallyCode)\n throw new Error('CodeGen: \"try\" without \"catch\" and \"finally\"');\n const node = new Try();\n this._blockNode(node);\n this.code(tryBody);\n if (catchCode) {\n const error = this.name(\"e\");\n this._currNode = node.catch = new Catch(error);\n catchCode(error);\n }\n if (finallyCode) {\n this._currNode = node.finally = new Finally();\n this.code(finallyCode);\n }\n return this._endBlockNode(Catch, Finally);\n }\n // `throw` statement\n throw(error) {\n return this._leafNode(new Throw(error));\n }\n // start self-balancing block\n block(body, nodeCount) {\n this._blockStarts.push(this._nodes.length);\n if (body)\n this.code(body).endBlock(nodeCount);\n return this;\n }\n // end the current self-balancing block\n endBlock(nodeCount) {\n const len = this._blockStarts.pop();\n if (len === undefined)\n throw new Error(\"CodeGen: not in self-balancing block\");\n const toClose = this._nodes.length - len;\n if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) {\n throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);\n }\n this._nodes.length = len;\n return this;\n }\n // `function` heading (or definition if funcBody is passed)\n func(name, args = code_1.nil, async, funcBody) {\n this._blockNode(new Func(name, args, async));\n if (funcBody)\n this.code(funcBody).endFunc();\n return this;\n }\n // end function definition\n endFunc() {\n return this._endBlockNode(Func);\n }\n optimize(n = 1) {\n while (n-- > 0) {\n this._root.optimizeNodes();\n this._root.optimizeNames(this._root.names, this._constants);\n }\n }\n _leafNode(node) {\n this._currNode.nodes.push(node);\n return this;\n }\n _blockNode(node) {\n this._currNode.nodes.push(node);\n this._nodes.push(node);\n }\n _endBlockNode(N1, N2) {\n const n = this._currNode;\n if (n instanceof N1 || (N2 && n instanceof N2)) {\n this._nodes.pop();\n return this;\n }\n throw new Error(`CodeGen: not in block \"${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}\"`);\n }\n _elseNode(node) {\n const n = this._currNode;\n if (!(n instanceof If)) {\n throw new Error('CodeGen: \"else\" without \"if\"');\n }\n this._currNode = n.else = node;\n return this;\n }\n get _root() {\n return this._nodes[0];\n }\n get _currNode() {\n const ns = this._nodes;\n return ns[ns.length - 1];\n }\n set _currNode(node) {\n const ns = this._nodes;\n ns[ns.length - 1] = node;\n }\n}\nexports.CodeGen = CodeGen;\nfunction addNames(names, from) {\n for (const n in from)\n names[n] = (names[n] || 0) + (from[n] || 0);\n return names;\n}\nfunction addExprNames(names, from) {\n return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;\n}\nfunction optimizeExpr(expr, names, constants) {\n if (expr instanceof code_1.Name)\n return replaceName(expr);\n if (!canOptimize(expr))\n return expr;\n return new code_1._Code(expr._items.reduce((items, c) => {\n if (c instanceof code_1.Name)\n c = replaceName(c);\n if (c instanceof code_1._Code)\n items.push(...c._items);\n else\n items.push(c);\n return items;\n }, []));\n function replaceName(n) {\n const c = constants[n.str];\n if (c === undefined || names[n.str] !== 1)\n return n;\n delete names[n.str];\n return c;\n }\n function canOptimize(e) {\n return (e instanceof code_1._Code &&\n e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined));\n }\n}\nfunction subtractNames(names, from) {\n for (const n in from)\n names[n] = (names[n] || 0) - (from[n] || 0);\n}\nfunction not(x) {\n return typeof x == \"boolean\" || typeof x == \"number\" || x === null ? !x : (0, code_1._) `!${par(x)}`;\n}\nexports.not = not;\nconst andCode = mappend(exports.operators.AND);\n// boolean AND (&&) expression with the passed arguments\nfunction and(...args) {\n return args.reduce(andCode);\n}\nexports.and = and;\nconst orCode = mappend(exports.operators.OR);\n// boolean OR (||) expression with the passed arguments\nfunction or(...args) {\n return args.reduce(orCode);\n}\nexports.or = or;\nfunction mappend(op) {\n return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`);\n}\nfunction par(x) {\n return x instanceof code_1.Name ? x : (0, code_1._) `(${x})`;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst code_1 = require(\"./codegen/code\");\n// TODO refactor to use Set\nfunction toHash(arr) {\n const hash = {};\n for (const item of arr)\n hash[item] = true;\n return hash;\n}\nexports.toHash = toHash;\nfunction alwaysValidSchema(it, schema) {\n if (typeof schema == \"boolean\")\n return schema;\n if (Object.keys(schema).length === 0)\n return true;\n checkUnknownRules(it, schema);\n return !schemaHasRules(schema, it.self.RULES.all);\n}\nexports.alwaysValidSchema = alwaysValidSchema;\nfunction checkUnknownRules(it, schema = it.schema) {\n const { opts, self } = it;\n if (!opts.strictSchema)\n return;\n if (typeof schema === \"boolean\")\n return;\n const rules = self.RULES.keywords;\n for (const key in schema) {\n if (!rules[key])\n checkStrictMode(it, `unknown keyword: \"${key}\"`);\n }\n}\nexports.checkUnknownRules = checkUnknownRules;\nfunction schemaHasRules(schema, rules) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (rules[key])\n return true;\n return false;\n}\nexports.schemaHasRules = schemaHasRules;\nfunction schemaHasRulesButRef(schema, RULES) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (key !== \"$ref\" && RULES.all[key])\n return true;\n return false;\n}\nexports.schemaHasRulesButRef = schemaHasRulesButRef;\nfunction schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {\n if (!$data) {\n if (typeof schema == \"number\" || typeof schema == \"boolean\")\n return schema;\n if (typeof schema == \"string\")\n return (0, codegen_1._) `${schema}`;\n }\n return (0, codegen_1._) `${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;\n}\nexports.schemaRefOrVal = schemaRefOrVal;\nfunction unescapeFragment(str) {\n return unescapeJsonPointer(decodeURIComponent(str));\n}\nexports.unescapeFragment = unescapeFragment;\nfunction escapeFragment(str) {\n return encodeURIComponent(escapeJsonPointer(str));\n}\nexports.escapeFragment = escapeFragment;\nfunction escapeJsonPointer(str) {\n if (typeof str == \"number\")\n return `${str}`;\n return str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nexports.escapeJsonPointer = escapeJsonPointer;\nfunction unescapeJsonPointer(str) {\n return str.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n}\nexports.unescapeJsonPointer = unescapeJsonPointer;\nfunction eachItem(xs, f) {\n if (Array.isArray(xs)) {\n for (const x of xs)\n f(x);\n }\n else {\n f(xs);\n }\n}\nexports.eachItem = eachItem;\nfunction makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) {\n return (gen, from, to, toName) => {\n const res = to === undefined\n ? from\n : to instanceof codegen_1.Name\n ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)\n : from instanceof codegen_1.Name\n ? (mergeToName(gen, to, from), from)\n : mergeValues(from, to);\n return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;\n };\n}\nexports.mergeEvaluated = {\n props: makeMergeEvaluated({\n mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => {\n gen.if((0, codegen_1._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._) `${to} || {}`).code((0, codegen_1._) `Object.assign(${to}, ${from})`));\n }),\n mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => {\n if (from === true) {\n gen.assign(to, true);\n }\n else {\n gen.assign(to, (0, codegen_1._) `${to} || {}`);\n setEvaluated(gen, to, from);\n }\n }),\n mergeValues: (from, to) => (from === true ? true : { ...from, ...to }),\n resultToName: evaluatedPropsToName,\n }),\n items: makeMergeEvaluated({\n mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),\n mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._) `${to} > ${from} ? ${to} : ${from}`)),\n mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),\n resultToName: (gen, items) => gen.var(\"items\", items),\n }),\n};\nfunction evaluatedPropsToName(gen, ps) {\n if (ps === true)\n return gen.var(\"props\", true);\n const props = gen.var(\"props\", (0, codegen_1._) `{}`);\n if (ps !== undefined)\n setEvaluated(gen, props, ps);\n return props;\n}\nexports.evaluatedPropsToName = evaluatedPropsToName;\nfunction setEvaluated(gen, props, ps) {\n Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true));\n}\nexports.setEvaluated = setEvaluated;\nconst snippets = {};\nfunction useFunc(gen, f) {\n return gen.scopeValue(\"func\", {\n ref: f,\n code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)),\n });\n}\nexports.useFunc = useFunc;\nvar Type;\n(function (Type) {\n Type[Type[\"Num\"] = 0] = \"Num\";\n Type[Type[\"Str\"] = 1] = \"Str\";\n})(Type || (exports.Type = Type = {}));\nfunction getErrorPath(dataProp, dataPropType, jsPropertySyntax) {\n // let path\n if (dataProp instanceof codegen_1.Name) {\n const isNumber = dataPropType === Type.Num;\n return jsPropertySyntax\n ? isNumber\n ? (0, codegen_1._) `\"[\" + ${dataProp} + \"]\"`\n : (0, codegen_1._) `\"['\" + ${dataProp} + \"']\"`\n : isNumber\n ? (0, codegen_1._) `\"/\" + ${dataProp}`\n : (0, codegen_1._) `\"/\" + ${dataProp}.replace(/~/g, \"~0\").replace(/\\\\//g, \"~1\")`; // TODO maybe use global escapePointer\n }\n return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : \"/\" + escapeJsonPointer(dataProp);\n}\nexports.getErrorPath = getErrorPath;\nfunction checkStrictMode(it, msg, mode = it.opts.strictSchema) {\n if (!mode)\n return;\n msg = `strict mode: ${msg}`;\n if (mode === true)\n throw new Error(msg);\n it.self.logger.warn(msg);\n}\nexports.checkStrictMode = checkStrictMode;\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"./codegen\");\nconst names = {\n // validation function arguments\n data: new codegen_1.Name(\"data\"), // data passed to validation function\n // args passed from referencing schema\n valCxt: new codegen_1.Name(\"valCxt\"), // validation/data context - should not be used directly, it is destructured to the names below\n instancePath: new codegen_1.Name(\"instancePath\"),\n parentData: new codegen_1.Name(\"parentData\"),\n parentDataProperty: new codegen_1.Name(\"parentDataProperty\"),\n rootData: new codegen_1.Name(\"rootData\"), // root data - same as the data passed to the first/top validation function\n dynamicAnchors: new codegen_1.Name(\"dynamicAnchors\"), // used to support recursiveRef and dynamicRef\n // function scoped variables\n vErrors: new codegen_1.Name(\"vErrors\"), // null or array of validation errors\n errors: new codegen_1.Name(\"errors\"), // counter of validation errors\n this: new codegen_1.Name(\"this\"),\n // \"globals\"\n self: new codegen_1.Name(\"self\"),\n scope: new codegen_1.Name(\"scope\"),\n // JTD serialize/parse name for JSON string and position\n json: new codegen_1.Name(\"json\"),\n jsonPos: new codegen_1.Name(\"jsonPos\"),\n jsonLen: new codegen_1.Name(\"jsonLen\"),\n jsonPart: new codegen_1.Name(\"jsonPart\"),\n};\nexports.default = names;\n//# sourceMappingURL=names.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst util_1 = require(\"./util\");\nconst names_1 = require(\"./names\");\nexports.keywordError = {\n message: ({ keyword }) => (0, codegen_1.str) `must pass \"${keyword}\" keyword validation`,\n};\nexports.keyword$DataError = {\n message: ({ keyword, schemaType }) => schemaType\n ? (0, codegen_1.str) `\"${keyword}\" keyword must be ${schemaType} ($data)`\n : (0, codegen_1.str) `\"${keyword}\" keyword is invalid ($data)`,\n};\nfunction reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {\n const { it } = cxt;\n const { gen, compositeRule, allErrors } = it;\n const errObj = errorObjectCode(cxt, error, errorPaths);\n if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) {\n addError(gen, errObj);\n }\n else {\n returnErrors(it, (0, codegen_1._) `[${errObj}]`);\n }\n}\nexports.reportError = reportError;\nfunction reportExtraError(cxt, error = exports.keywordError, errorPaths) {\n const { it } = cxt;\n const { gen, compositeRule, allErrors } = it;\n const errObj = errorObjectCode(cxt, error, errorPaths);\n addError(gen, errObj);\n if (!(compositeRule || allErrors)) {\n returnErrors(it, names_1.default.vErrors);\n }\n}\nexports.reportExtraError = reportExtraError;\nfunction resetErrorsCount(gen, errsCount) {\n gen.assign(names_1.default.errors, errsCount);\n gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));\n}\nexports.resetErrorsCount = resetErrorsCount;\nfunction extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) {\n /* istanbul ignore if */\n if (errsCount === undefined)\n throw new Error(\"ajv implementation error\");\n const err = gen.name(\"err\");\n gen.forRange(\"i\", errsCount, names_1.default.errors, (i) => {\n gen.const(err, (0, codegen_1._) `${names_1.default.vErrors}[${i}]`);\n gen.if((0, codegen_1._) `${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._) `${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));\n gen.assign((0, codegen_1._) `${err}.schemaPath`, (0, codegen_1.str) `${it.errSchemaPath}/${keyword}`);\n if (it.opts.verbose) {\n gen.assign((0, codegen_1._) `${err}.schema`, schemaValue);\n gen.assign((0, codegen_1._) `${err}.data`, data);\n }\n });\n}\nexports.extendErrors = extendErrors;\nfunction addError(gen, errObj) {\n const err = gen.const(\"err\", errObj);\n gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`);\n gen.code((0, codegen_1._) `${names_1.default.errors}++`);\n}\nfunction returnErrors(it, errs) {\n const { gen, validateName, schemaEnv } = it;\n if (schemaEnv.$async) {\n gen.throw((0, codegen_1._) `new ${it.ValidationError}(${errs})`);\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, errs);\n gen.return(false);\n }\n}\nconst E = {\n keyword: new codegen_1.Name(\"keyword\"),\n schemaPath: new codegen_1.Name(\"schemaPath\"), // also used in JTD errors\n params: new codegen_1.Name(\"params\"),\n propertyName: new codegen_1.Name(\"propertyName\"),\n message: new codegen_1.Name(\"message\"),\n schema: new codegen_1.Name(\"schema\"),\n parentSchema: new codegen_1.Name(\"parentSchema\"),\n};\nfunction errorObjectCode(cxt, error, errorPaths) {\n const { createErrors } = cxt.it;\n if (createErrors === false)\n return (0, codegen_1._) `{}`;\n return errorObject(cxt, error, errorPaths);\n}\nfunction errorObject(cxt, error, errorPaths = {}) {\n const { gen, it } = cxt;\n const keyValues = [\n errorInstancePath(it, errorPaths),\n errorSchemaPath(cxt, errorPaths),\n ];\n extraErrorProps(cxt, error, keyValues);\n return gen.object(...keyValues);\n}\nfunction errorInstancePath({ errorPath }, { instancePath }) {\n const instPath = instancePath\n ? (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}`\n : errorPath;\n return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];\n}\nfunction errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {\n let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str) `${errSchemaPath}/${keyword}`;\n if (schemaPath) {\n schPath = (0, codegen_1.str) `${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;\n }\n return [E.schemaPath, schPath];\n}\nfunction extraErrorProps(cxt, { params, message }, keyValues) {\n const { keyword, data, schemaValue, it } = cxt;\n const { opts, propertyName, topSchemaRef, schemaPath } = it;\n keyValues.push([E.keyword, keyword], [E.params, typeof params == \"function\" ? params(cxt) : params || (0, codegen_1._) `{}`]);\n if (opts.messages) {\n keyValues.push([E.message, typeof message == \"function\" ? message(cxt) : message]);\n }\n if (opts.verbose) {\n keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._) `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);\n }\n if (propertyName)\n keyValues.push([E.propertyName, propertyName]);\n}\n//# sourceMappingURL=errors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;\nconst errors_1 = require(\"../errors\");\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst boolError = {\n message: \"boolean schema is false\",\n};\nfunction topBoolOrEmptySchema(it) {\n const { gen, schema, validateName } = it;\n if (schema === false) {\n falseSchemaError(it, false);\n }\n else if (typeof schema == \"object\" && schema.$async === true) {\n gen.return(names_1.default.data);\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, null);\n gen.return(true);\n }\n}\nexports.topBoolOrEmptySchema = topBoolOrEmptySchema;\nfunction boolOrEmptySchema(it, valid) {\n const { gen, schema } = it;\n if (schema === false) {\n gen.var(valid, false); // TODO var\n falseSchemaError(it);\n }\n else {\n gen.var(valid, true); // TODO var\n }\n}\nexports.boolOrEmptySchema = boolOrEmptySchema;\nfunction falseSchemaError(it, overrideAllErrors) {\n const { gen, data } = it;\n // TODO maybe some other interface should be used for non-keyword validation errors...\n const cxt = {\n gen,\n keyword: \"false schema\",\n data,\n schema: false,\n schemaCode: false,\n schemaValue: false,\n params: {},\n it,\n };\n (0, errors_1.reportError)(cxt, boolError, undefined, overrideAllErrors);\n}\n//# sourceMappingURL=boolSchema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRules = exports.isJSONType = void 0;\nconst _jsonTypes = [\"string\", \"number\", \"integer\", \"boolean\", \"null\", \"object\", \"array\"];\nconst jsonTypes = new Set(_jsonTypes);\nfunction isJSONType(x) {\n return typeof x == \"string\" && jsonTypes.has(x);\n}\nexports.isJSONType = isJSONType;\nfunction getRules() {\n const groups = {\n number: { type: \"number\", rules: [] },\n string: { type: \"string\", rules: [] },\n array: { type: \"array\", rules: [] },\n object: { type: \"object\", rules: [] },\n };\n return {\n types: { ...groups, integer: true, boolean: true, null: true },\n rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],\n post: { rules: [] },\n all: {},\n keywords: {},\n };\n}\nexports.getRules = getRules;\n//# sourceMappingURL=rules.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;\nfunction schemaHasRulesForType({ schema, self }, type) {\n const group = self.RULES.types[type];\n return group && group !== true && shouldUseGroup(schema, group);\n}\nexports.schemaHasRulesForType = schemaHasRulesForType;\nfunction shouldUseGroup(schema, group) {\n return group.rules.some((rule) => shouldUseRule(schema, rule));\n}\nexports.shouldUseGroup = shouldUseGroup;\nfunction shouldUseRule(schema, rule) {\n var _a;\n return (schema[rule.keyword] !== undefined ||\n ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined)));\n}\nexports.shouldUseRule = shouldUseRule;\n//# sourceMappingURL=applicability.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;\nconst rules_1 = require(\"../rules\");\nconst applicability_1 = require(\"./applicability\");\nconst errors_1 = require(\"../errors\");\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nvar DataType;\n(function (DataType) {\n DataType[DataType[\"Correct\"] = 0] = \"Correct\";\n DataType[DataType[\"Wrong\"] = 1] = \"Wrong\";\n})(DataType || (exports.DataType = DataType = {}));\nfunction getSchemaTypes(schema) {\n const types = getJSONTypes(schema.type);\n const hasNull = types.includes(\"null\");\n if (hasNull) {\n if (schema.nullable === false)\n throw new Error(\"type: null contradicts nullable: false\");\n }\n else {\n if (!types.length && schema.nullable !== undefined) {\n throw new Error('\"nullable\" cannot be used without \"type\"');\n }\n if (schema.nullable === true)\n types.push(\"null\");\n }\n return types;\n}\nexports.getSchemaTypes = getSchemaTypes;\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nfunction getJSONTypes(ts) {\n const types = Array.isArray(ts) ? ts : ts ? [ts] : [];\n if (types.every(rules_1.isJSONType))\n return types;\n throw new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"));\n}\nexports.getJSONTypes = getJSONTypes;\nfunction coerceAndCheckDataType(it, types) {\n const { gen, data, opts } = it;\n const coerceTo = coerceToTypes(types, opts.coerceTypes);\n const checkTypes = types.length > 0 &&\n !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));\n if (checkTypes) {\n const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);\n gen.if(wrongType, () => {\n if (coerceTo.length)\n coerceData(it, types, coerceTo);\n else\n reportTypeError(it);\n });\n }\n return checkTypes;\n}\nexports.coerceAndCheckDataType = coerceAndCheckDataType;\nconst COERCIBLE = new Set([\"string\", \"number\", \"integer\", \"boolean\", \"null\"]);\nfunction coerceToTypes(types, coerceTypes) {\n return coerceTypes\n ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === \"array\" && t === \"array\"))\n : [];\n}\nfunction coerceData(it, types, coerceTo) {\n const { gen, data, opts } = it;\n const dataType = gen.let(\"dataType\", (0, codegen_1._) `typeof ${data}`);\n const coerced = gen.let(\"coerced\", (0, codegen_1._) `undefined`);\n if (opts.coerceTypes === \"array\") {\n gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen\n .assign(data, (0, codegen_1._) `${data}[0]`)\n .assign(dataType, (0, codegen_1._) `typeof ${data}`)\n .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));\n }\n gen.if((0, codegen_1._) `${coerced} !== undefined`);\n for (const t of coerceTo) {\n if (COERCIBLE.has(t) || (t === \"array\" && opts.coerceTypes === \"array\")) {\n coerceSpecificType(t);\n }\n }\n gen.else();\n reportTypeError(it);\n gen.endIf();\n gen.if((0, codegen_1._) `${coerced} !== undefined`, () => {\n gen.assign(data, coerced);\n assignParentData(it, coerced);\n });\n function coerceSpecificType(t) {\n switch (t) {\n case \"string\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"number\" || ${dataType} == \"boolean\"`)\n .assign(coerced, (0, codegen_1._) `\"\" + ${data}`)\n .elseIf((0, codegen_1._) `${data} === null`)\n .assign(coerced, (0, codegen_1._) `\"\"`);\n return;\n case \"number\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"boolean\" || ${data} === null\n || (${dataType} == \"string\" && ${data} && ${data} == +${data})`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"integer\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"boolean\" || ${data} === null\n || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"boolean\":\n gen\n .elseIf((0, codegen_1._) `${data} === \"false\" || ${data} === 0 || ${data} === null`)\n .assign(coerced, false)\n .elseIf((0, codegen_1._) `${data} === \"true\" || ${data} === 1`)\n .assign(coerced, true);\n return;\n case \"null\":\n gen.elseIf((0, codegen_1._) `${data} === \"\" || ${data} === 0 || ${data} === false`);\n gen.assign(coerced, null);\n return;\n case \"array\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"string\" || ${dataType} === \"number\"\n || ${dataType} === \"boolean\" || ${data} === null`)\n .assign(coerced, (0, codegen_1._) `[${data}]`);\n }\n }\n}\nfunction assignParentData({ gen, parentData, parentDataProperty }, expr) {\n // TODO use gen.property\n gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr));\n}\nfunction checkDataType(dataType, data, strictNums, correct = DataType.Correct) {\n const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;\n let cond;\n switch (dataType) {\n case \"null\":\n return (0, codegen_1._) `${data} ${EQ} null`;\n case \"array\":\n cond = (0, codegen_1._) `Array.isArray(${data})`;\n break;\n case \"object\":\n cond = (0, codegen_1._) `${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`;\n break;\n case \"integer\":\n cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`);\n break;\n case \"number\":\n cond = numCond();\n break;\n default:\n return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`;\n }\n return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);\n function numCond(_cond = codegen_1.nil) {\n return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == \"number\"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil);\n }\n}\nexports.checkDataType = checkDataType;\nfunction checkDataTypes(dataTypes, data, strictNums, correct) {\n if (dataTypes.length === 1) {\n return checkDataType(dataTypes[0], data, strictNums, correct);\n }\n let cond;\n const types = (0, util_1.toHash)(dataTypes);\n if (types.array && types.object) {\n const notObj = (0, codegen_1._) `typeof ${data} != \"object\"`;\n cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`;\n delete types.null;\n delete types.array;\n delete types.object;\n }\n else {\n cond = codegen_1.nil;\n }\n if (types.number)\n delete types.integer;\n for (const t in types)\n cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));\n return cond;\n}\nexports.checkDataTypes = checkDataTypes;\nconst typeError = {\n message: ({ schema }) => `must be ${schema}`,\n params: ({ schema, schemaValue }) => typeof schema == \"string\" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`,\n};\nfunction reportTypeError(it) {\n const cxt = getTypeErrorContext(it);\n (0, errors_1.reportError)(cxt, typeError);\n}\nexports.reportTypeError = reportTypeError;\nfunction getTypeErrorContext(it) {\n const { gen, data, schema } = it;\n const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, \"type\");\n return {\n gen,\n keyword: \"type\",\n data,\n schema: schema.type,\n schemaCode,\n schemaValue: schemaCode,\n parentSchema: schema,\n params: {},\n it,\n };\n}\n//# sourceMappingURL=dataType.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assignDefaults = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nfunction assignDefaults(it, ty) {\n const { properties, items } = it.schema;\n if (ty === \"object\" && properties) {\n for (const key in properties) {\n assignDefault(it, key, properties[key].default);\n }\n }\n else if (ty === \"array\" && Array.isArray(items)) {\n items.forEach((sch, i) => assignDefault(it, i, sch.default));\n }\n}\nexports.assignDefaults = assignDefaults;\nfunction assignDefault(it, prop, defaultValue) {\n const { gen, compositeRule, data, opts } = it;\n if (defaultValue === undefined)\n return;\n const childData = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(prop)}`;\n if (compositeRule) {\n (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);\n return;\n }\n let condition = (0, codegen_1._) `${childData} === undefined`;\n if (opts.useDefaults === \"empty\") {\n condition = (0, codegen_1._) `${condition} || ${childData} === null || ${childData} === \"\"`;\n }\n // `${childData} === undefined` +\n // (opts.useDefaults === \"empty\" ? ` || ${childData} === null || ${childData} === \"\"` : \"\")\n gen.if(condition, (0, codegen_1._) `${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);\n}\n//# sourceMappingURL=defaults.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;\nconst codegen_1 = require(\"../compile/codegen\");\nconst util_1 = require(\"../compile/util\");\nconst names_1 = require(\"../compile/names\");\nconst util_2 = require(\"../compile/util\");\nfunction checkReportMissingProp(cxt, prop) {\n const { gen, data, it } = cxt;\n gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {\n cxt.setParams({ missingProperty: (0, codegen_1._) `${prop}` }, true);\n cxt.error();\n });\n}\nexports.checkReportMissingProp = checkReportMissingProp;\nfunction checkMissingProp({ gen, data, it: { opts } }, properties, missing) {\n return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._) `${missing} = ${prop}`)));\n}\nexports.checkMissingProp = checkMissingProp;\nfunction reportMissingProp(cxt, missing) {\n cxt.setParams({ missingProperty: missing }, true);\n cxt.error();\n}\nexports.reportMissingProp = reportMissingProp;\nfunction hasPropFunc(gen) {\n return gen.scopeValue(\"func\", {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ref: Object.prototype.hasOwnProperty,\n code: (0, codegen_1._) `Object.prototype.hasOwnProperty`,\n });\n}\nexports.hasPropFunc = hasPropFunc;\nfunction isOwnProperty(gen, data, property) {\n return (0, codegen_1._) `${hasPropFunc(gen)}.call(${data}, ${property})`;\n}\nexports.isOwnProperty = isOwnProperty;\nfunction propertyInData(gen, data, property, ownProperties) {\n const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} !== undefined`;\n return ownProperties ? (0, codegen_1._) `${cond} && ${isOwnProperty(gen, data, property)}` : cond;\n}\nexports.propertyInData = propertyInData;\nfunction noPropertyInData(gen, data, property, ownProperties) {\n const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} === undefined`;\n return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;\n}\nexports.noPropertyInData = noPropertyInData;\nfunction allSchemaProperties(schemaMap) {\n return schemaMap ? Object.keys(schemaMap).filter((p) => p !== \"__proto__\") : [];\n}\nexports.allSchemaProperties = allSchemaProperties;\nfunction schemaProperties(it, schemaMap) {\n return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));\n}\nexports.schemaProperties = schemaProperties;\nfunction callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {\n const dataAndSchema = passSchema ? (0, codegen_1._) `${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;\n const valCxt = [\n [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],\n [names_1.default.parentData, it.parentData],\n [names_1.default.parentDataProperty, it.parentDataProperty],\n [names_1.default.rootData, names_1.default.rootData],\n ];\n if (it.opts.dynamicRef)\n valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);\n const args = (0, codegen_1._) `${dataAndSchema}, ${gen.object(...valCxt)}`;\n return context !== codegen_1.nil ? (0, codegen_1._) `${func}.call(${context}, ${args})` : (0, codegen_1._) `${func}(${args})`;\n}\nexports.callValidateCode = callValidateCode;\nconst newRegExp = (0, codegen_1._) `new RegExp`;\nfunction usePattern({ gen, it: { opts } }, pattern) {\n const u = opts.unicodeRegExp ? \"u\" : \"\";\n const { regExp } = opts.code;\n const rx = regExp(pattern, u);\n return gen.scopeValue(\"pattern\", {\n key: rx.toString(),\n ref: rx,\n code: (0, codegen_1._) `${regExp.code === \"new RegExp\" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`,\n });\n}\nexports.usePattern = usePattern;\nfunction validateArray(cxt) {\n const { gen, data, keyword, it } = cxt;\n const valid = gen.name(\"valid\");\n if (it.allErrors) {\n const validArr = gen.let(\"valid\", true);\n validateItems(() => gen.assign(validArr, false));\n return validArr;\n }\n gen.var(valid, true);\n validateItems(() => gen.break());\n return valid;\n function validateItems(notValid) {\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema({\n keyword,\n dataProp: i,\n dataPropType: util_1.Type.Num,\n }, valid);\n gen.if((0, codegen_1.not)(valid), notValid);\n });\n }\n}\nexports.validateArray = validateArray;\nfunction validateUnion(cxt) {\n const { gen, schema, keyword, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));\n if (alwaysValid && !it.opts.unevaluated)\n return;\n const valid = gen.let(\"valid\", false);\n const schValid = gen.name(\"_valid\");\n gen.block(() => schema.forEach((_sch, i) => {\n const schCxt = cxt.subschema({\n keyword,\n schemaProp: i,\n compositeRule: true,\n }, schValid);\n gen.assign(valid, (0, codegen_1._) `${valid} || ${schValid}`);\n const merged = cxt.mergeValidEvaluated(schCxt, schValid);\n // can short-circuit if `unevaluatedProperties/Items` not supported (opts.unevaluated !== true)\n // or if all properties and items were evaluated (it.props === true && it.items === true)\n if (!merged)\n gen.if((0, codegen_1.not)(valid));\n }));\n cxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n}\nexports.validateUnion = validateUnion;\n//# sourceMappingURL=code.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst code_1 = require(\"../../vocabularies/code\");\nconst errors_1 = require(\"../errors\");\nfunction macroKeywordCode(cxt, def) {\n const { gen, keyword, schema, parentSchema, it } = cxt;\n const macroSchema = def.macro.call(it.self, schema, parentSchema, it);\n const schemaRef = useKeyword(gen, keyword, macroSchema);\n if (it.opts.validateSchema !== false)\n it.self.validateSchema(macroSchema, true);\n const valid = gen.name(\"valid\");\n cxt.subschema({\n schema: macroSchema,\n schemaPath: codegen_1.nil,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n topSchemaRef: schemaRef,\n compositeRule: true,\n }, valid);\n cxt.pass(valid, () => cxt.error(true));\n}\nexports.macroKeywordCode = macroKeywordCode;\nfunction funcKeywordCode(cxt, def) {\n var _a;\n const { gen, keyword, schema, parentSchema, $data, it } = cxt;\n checkAsyncKeyword(it, def);\n const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;\n const validateRef = useKeyword(gen, keyword, validate);\n const valid = gen.let(\"valid\");\n cxt.block$data(valid, validateKeyword);\n cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);\n function validateKeyword() {\n if (def.errors === false) {\n assignValid();\n if (def.modifying)\n modifyData(cxt);\n reportErrs(() => cxt.error());\n }\n else {\n const ruleErrs = def.async ? validateAsync() : validateSync();\n if (def.modifying)\n modifyData(cxt);\n reportErrs(() => addErrs(cxt, ruleErrs));\n }\n }\n function validateAsync() {\n const ruleErrs = gen.let(\"ruleErrs\", null);\n gen.try(() => assignValid((0, codegen_1._) `await `), (e) => gen.assign(valid, false).if((0, codegen_1._) `${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._) `${e}.errors`), () => gen.throw(e)));\n return ruleErrs;\n }\n function validateSync() {\n const validateErrs = (0, codegen_1._) `${validateRef}.errors`;\n gen.assign(validateErrs, null);\n assignValid(codegen_1.nil);\n return validateErrs;\n }\n function assignValid(_await = def.async ? (0, codegen_1._) `await ` : codegen_1.nil) {\n const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;\n const passSchema = !((\"compile\" in def && !$data) || def.schema === false);\n gen.assign(valid, (0, codegen_1._) `${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);\n }\n function reportErrs(errors) {\n var _a;\n gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== void 0 ? _a : valid), errors);\n }\n}\nexports.funcKeywordCode = funcKeywordCode;\nfunction modifyData(cxt) {\n const { gen, data, it } = cxt;\n gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._) `${it.parentData}[${it.parentDataProperty}]`));\n}\nfunction addErrs(cxt, errs) {\n const { gen } = cxt;\n gen.if((0, codegen_1._) `Array.isArray(${errs})`, () => {\n gen\n .assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`)\n .assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);\n (0, errors_1.extendErrors)(cxt);\n }, () => cxt.error());\n}\nfunction checkAsyncKeyword({ schemaEnv }, def) {\n if (def.async && !schemaEnv.$async)\n throw new Error(\"async keyword in sync schema\");\n}\nfunction useKeyword(gen, keyword, result) {\n if (result === undefined)\n throw new Error(`keyword \"${keyword}\" failed to compile`);\n return gen.scopeValue(\"keyword\", typeof result == \"function\" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });\n}\nfunction validSchemaType(schema, schemaType, allowUndefined = false) {\n // TODO add tests\n return (!schemaType.length ||\n schemaType.some((st) => st === \"array\"\n ? Array.isArray(schema)\n : st === \"object\"\n ? schema && typeof schema == \"object\" && !Array.isArray(schema)\n : typeof schema == st || (allowUndefined && typeof schema == \"undefined\")));\n}\nexports.validSchemaType = validSchemaType;\nfunction validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {\n /* istanbul ignore if */\n if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {\n throw new Error(\"ajv implementation error\");\n }\n const deps = def.dependencies;\n if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {\n throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(\",\")}`);\n }\n if (def.validateSchema) {\n const valid = def.validateSchema(schema[keyword]);\n if (!valid) {\n const msg = `keyword \"${keyword}\" value is invalid at path \"${errSchemaPath}\": ` +\n self.errorsText(def.validateSchema.errors);\n if (opts.validateSchema === \"log\")\n self.logger.error(msg);\n else\n throw new Error(msg);\n }\n }\n}\nexports.validateKeywordUsage = validateKeywordUsage;\n//# sourceMappingURL=keyword.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nfunction getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {\n if (keyword !== undefined && schema !== undefined) {\n throw new Error('both \"keyword\" and \"schema\" passed, only one allowed');\n }\n if (keyword !== undefined) {\n const sch = it.schema[keyword];\n return schemaProp === undefined\n ? {\n schema: sch,\n schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n }\n : {\n schema: sch[schemaProp],\n schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`,\n };\n }\n if (schema !== undefined) {\n if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {\n throw new Error('\"schemaPath\", \"errSchemaPath\" and \"topSchemaRef\" are required with \"schema\"');\n }\n return {\n schema,\n schemaPath,\n topSchemaRef,\n errSchemaPath,\n };\n }\n throw new Error('either \"keyword\" or \"schema\" must be passed');\n}\nexports.getSubschema = getSubschema;\nfunction extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {\n if (data !== undefined && dataProp !== undefined) {\n throw new Error('both \"data\" and \"dataProp\" passed, only one allowed');\n }\n const { gen } = it;\n if (dataProp !== undefined) {\n const { errorPath, dataPathArr, opts } = it;\n const nextData = gen.let(\"data\", (0, codegen_1._) `${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);\n dataContextProps(nextData);\n subschema.errorPath = (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;\n subschema.parentDataProperty = (0, codegen_1._) `${dataProp}`;\n subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];\n }\n if (data !== undefined) {\n const nextData = data instanceof codegen_1.Name ? data : gen.let(\"data\", data, true); // replaceable if used once?\n dataContextProps(nextData);\n if (propertyName !== undefined)\n subschema.propertyName = propertyName;\n // TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr\n }\n if (dataTypes)\n subschema.dataTypes = dataTypes;\n function dataContextProps(_nextData) {\n subschema.data = _nextData;\n subschema.dataLevel = it.dataLevel + 1;\n subschema.dataTypes = [];\n it.definedProperties = new Set();\n subschema.parentData = it.data;\n subschema.dataNames = [...it.dataNames, _nextData];\n }\n}\nexports.extendSubschemaData = extendSubschemaData;\nfunction extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {\n if (compositeRule !== undefined)\n subschema.compositeRule = compositeRule;\n if (createErrors !== undefined)\n subschema.createErrors = createErrors;\n if (allErrors !== undefined)\n subschema.allErrors = allErrors;\n subschema.jtdDiscriminator = jtdDiscriminator; // not inherited\n subschema.jtdMetadata = jtdMetadata; // not inherited\n}\nexports.extendSubschemaMode = extendSubschemaMode;\n//# sourceMappingURL=subschema.js.map","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","'use strict';\n\nvar traverse = module.exports = function (schema, opts, cb) {\n // Legacy support for v0.3.1 and earlier.\n if (typeof opts == 'function') {\n cb = opts;\n opts = {};\n }\n\n cb = opts.cb || cb;\n var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};\n var post = cb.post || function() {};\n\n _traverse(opts, pre, post, schema, '', schema);\n};\n\n\ntraverse.keywords = {\n additionalItems: true,\n items: true,\n contains: true,\n additionalProperties: true,\n propertyNames: true,\n not: true,\n if: true,\n then: true,\n else: true\n};\n\ntraverse.arrayKeywords = {\n items: true,\n allOf: true,\n anyOf: true,\n oneOf: true\n};\n\ntraverse.propsKeywords = {\n $defs: true,\n definitions: true,\n properties: true,\n patternProperties: true,\n dependencies: true\n};\n\ntraverse.skipKeywords = {\n default: true,\n enum: true,\n const: true,\n required: true,\n maximum: true,\n minimum: true,\n exclusiveMaximum: true,\n exclusiveMinimum: true,\n multipleOf: true,\n maxLength: true,\n minLength: true,\n pattern: true,\n format: true,\n maxItems: true,\n minItems: true,\n uniqueItems: true,\n maxProperties: true,\n minProperties: true\n};\n\n\nfunction _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n if (schema && typeof schema == 'object' && !Array.isArray(schema)) {\n pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n for (var key in schema) {\n var sch = schema[key];\n if (Array.isArray(sch)) {\n if (key in traverse.arrayKeywords) {\n for (var i=0; i<sch.length; i++)\n _traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);\n }\n } else if (key in traverse.propsKeywords) {\n if (sch && typeof sch == 'object') {\n for (var prop in sch)\n _traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);\n }\n } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {\n _traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);\n }\n }\n post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n }\n}\n\n\nfunction escapeJsonPtr(str) {\n return str.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;\nconst util_1 = require(\"./util\");\nconst equal = require(\"fast-deep-equal\");\nconst traverse = require(\"json-schema-traverse\");\n// TODO refactor to use keyword definitions\nconst SIMPLE_INLINED = new Set([\n \"type\",\n \"format\",\n \"pattern\",\n \"maxLength\",\n \"minLength\",\n \"maxProperties\",\n \"minProperties\",\n \"maxItems\",\n \"minItems\",\n \"maximum\",\n \"minimum\",\n \"uniqueItems\",\n \"multipleOf\",\n \"required\",\n \"enum\",\n \"const\",\n]);\nfunction inlineRef(schema, limit = true) {\n if (typeof schema == \"boolean\")\n return true;\n if (limit === true)\n return !hasRef(schema);\n if (!limit)\n return false;\n return countKeys(schema) <= limit;\n}\nexports.inlineRef = inlineRef;\nconst REF_KEYWORDS = new Set([\n \"$ref\",\n \"$recursiveRef\",\n \"$recursiveAnchor\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n]);\nfunction hasRef(schema) {\n for (const key in schema) {\n if (REF_KEYWORDS.has(key))\n return true;\n const sch = schema[key];\n if (Array.isArray(sch) && sch.some(hasRef))\n return true;\n if (typeof sch == \"object\" && hasRef(sch))\n return true;\n }\n return false;\n}\nfunction countKeys(schema) {\n let count = 0;\n for (const key in schema) {\n if (key === \"$ref\")\n return Infinity;\n count++;\n if (SIMPLE_INLINED.has(key))\n continue;\n if (typeof schema[key] == \"object\") {\n (0, util_1.eachItem)(schema[key], (sch) => (count += countKeys(sch)));\n }\n if (count === Infinity)\n return Infinity;\n }\n return count;\n}\nfunction getFullPath(resolver, id = \"\", normalize) {\n if (normalize !== false)\n id = normalizeId(id);\n const p = resolver.parse(id);\n return _getFullPath(resolver, p);\n}\nexports.getFullPath = getFullPath;\nfunction _getFullPath(resolver, p) {\n const serialized = resolver.serialize(p);\n return serialized.split(\"#\")[0] + \"#\";\n}\nexports._getFullPath = _getFullPath;\nconst TRAILING_SLASH_HASH = /#\\/?$/;\nfunction normalizeId(id) {\n return id ? id.replace(TRAILING_SLASH_HASH, \"\") : \"\";\n}\nexports.normalizeId = normalizeId;\nfunction resolveUrl(resolver, baseId, id) {\n id = normalizeId(id);\n return resolver.resolve(baseId, id);\n}\nexports.resolveUrl = resolveUrl;\nconst ANCHOR = /^[a-z_][-a-z0-9._]*$/i;\nfunction getSchemaRefs(schema, baseId) {\n if (typeof schema == \"boolean\")\n return {};\n const { schemaId, uriResolver } = this.opts;\n const schId = normalizeId(schema[schemaId] || baseId);\n const baseIds = { \"\": schId };\n const pathPrefix = getFullPath(uriResolver, schId, false);\n const localRefs = {};\n const schemaRefs = new Set();\n traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {\n if (parentJsonPtr === undefined)\n return;\n const fullPath = pathPrefix + jsonPtr;\n let innerBaseId = baseIds[parentJsonPtr];\n if (typeof sch[schemaId] == \"string\")\n innerBaseId = addRef.call(this, sch[schemaId]);\n addAnchor.call(this, sch.$anchor);\n addAnchor.call(this, sch.$dynamicAnchor);\n baseIds[jsonPtr] = innerBaseId;\n function addRef(ref) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _resolve = this.opts.uriResolver.resolve;\n ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref);\n if (schemaRefs.has(ref))\n throw ambiguos(ref);\n schemaRefs.add(ref);\n let schOrRef = this.refs[ref];\n if (typeof schOrRef == \"string\")\n schOrRef = this.refs[schOrRef];\n if (typeof schOrRef == \"object\") {\n checkAmbiguosRef(sch, schOrRef.schema, ref);\n }\n else if (ref !== normalizeId(fullPath)) {\n if (ref[0] === \"#\") {\n checkAmbiguosRef(sch, localRefs[ref], ref);\n localRefs[ref] = sch;\n }\n else {\n this.refs[ref] = fullPath;\n }\n }\n return ref;\n }\n function addAnchor(anchor) {\n if (typeof anchor == \"string\") {\n if (!ANCHOR.test(anchor))\n throw new Error(`invalid anchor \"${anchor}\"`);\n addRef.call(this, `#${anchor}`);\n }\n }\n });\n return localRefs;\n function checkAmbiguosRef(sch1, sch2, ref) {\n if (sch2 !== undefined && !equal(sch1, sch2))\n throw ambiguos(ref);\n }\n function ambiguos(ref) {\n return new Error(`reference \"${ref}\" resolves to more than one schema`);\n }\n}\nexports.getSchemaRefs = getSchemaRefs;\n//# sourceMappingURL=resolve.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;\nconst boolSchema_1 = require(\"./boolSchema\");\nconst dataType_1 = require(\"./dataType\");\nconst applicability_1 = require(\"./applicability\");\nconst dataType_2 = require(\"./dataType\");\nconst defaults_1 = require(\"./defaults\");\nconst keyword_1 = require(\"./keyword\");\nconst subschema_1 = require(\"./subschema\");\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst resolve_1 = require(\"../resolve\");\nconst util_1 = require(\"../util\");\nconst errors_1 = require(\"../errors\");\n// schema compilation - generates validation function, subschemaCode (below) is used for subschemas\nfunction validateFunctionCode(it) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n topSchemaObjCode(it);\n return;\n }\n }\n validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));\n}\nexports.validateFunctionCode = validateFunctionCode;\nfunction validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {\n if (opts.code.es5) {\n gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {\n gen.code((0, codegen_1._) `\"use strict\"; ${funcSourceUrl(schema, opts)}`);\n destructureValCxtES5(gen, opts);\n gen.code(body);\n });\n }\n else {\n gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));\n }\n}\nfunction destructureValCxt(opts) {\n return (0, codegen_1._) `{${names_1.default.instancePath}=\"\", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._) `, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;\n}\nfunction destructureValCxtES5(gen, opts) {\n gen.if(names_1.default.valCxt, () => {\n gen.var(names_1.default.instancePath, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.instancePath}`);\n gen.var(names_1.default.parentData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentData}`);\n gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);\n gen.var(names_1.default.rootData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.rootData}`);\n if (opts.dynamicRef)\n gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);\n }, () => {\n gen.var(names_1.default.instancePath, (0, codegen_1._) `\"\"`);\n gen.var(names_1.default.parentData, (0, codegen_1._) `undefined`);\n gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `undefined`);\n gen.var(names_1.default.rootData, names_1.default.data);\n if (opts.dynamicRef)\n gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `{}`);\n });\n}\nfunction topSchemaObjCode(it) {\n const { schema, opts, gen } = it;\n validateFunction(it, () => {\n if (opts.$comment && schema.$comment)\n commentKeyword(it);\n checkNoDefault(it);\n gen.let(names_1.default.vErrors, null);\n gen.let(names_1.default.errors, 0);\n if (opts.unevaluated)\n resetEvaluated(it);\n typeAndKeywords(it);\n returnResults(it);\n });\n return;\n}\nfunction resetEvaluated(it) {\n // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated\n const { gen, validateName } = it;\n it.evaluated = gen.const(\"evaluated\", (0, codegen_1._) `${validateName}.evaluated`);\n gen.if((0, codegen_1._) `${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._) `${it.evaluated}.props`, (0, codegen_1._) `undefined`));\n gen.if((0, codegen_1._) `${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._) `${it.evaluated}.items`, (0, codegen_1._) `undefined`));\n}\nfunction funcSourceUrl(schema, opts) {\n const schId = typeof schema == \"object\" && schema[opts.schemaId];\n return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._) `/*# sourceURL=${schId} */` : codegen_1.nil;\n}\n// schema compilation - this function is used recursively to generate code for sub-schemas\nfunction subschemaCode(it, valid) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n subSchemaObjCode(it, valid);\n return;\n }\n }\n (0, boolSchema_1.boolOrEmptySchema)(it, valid);\n}\nfunction schemaCxtHasRules({ schema, self }) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (self.RULES.all[key])\n return true;\n return false;\n}\nfunction isSchemaObj(it) {\n return typeof it.schema != \"boolean\";\n}\nfunction subSchemaObjCode(it, valid) {\n const { schema, gen, opts } = it;\n if (opts.$comment && schema.$comment)\n commentKeyword(it);\n updateContext(it);\n checkAsyncSchema(it);\n const errsCount = gen.const(\"_errs\", names_1.default.errors);\n typeAndKeywords(it, errsCount);\n // TODO var\n gen.var(valid, (0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);\n}\nfunction checkKeywords(it) {\n (0, util_1.checkUnknownRules)(it);\n checkRefsAndKeywords(it);\n}\nfunction typeAndKeywords(it, errsCount) {\n if (it.opts.jtd)\n return schemaKeywords(it, [], false, errsCount);\n const types = (0, dataType_1.getSchemaTypes)(it.schema);\n const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types);\n schemaKeywords(it, types, !checkedTypes, errsCount);\n}\nfunction checkRefsAndKeywords(it) {\n const { schema, errSchemaPath, opts, self } = it;\n if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) {\n self.logger.warn(`$ref: keywords ignored in schema at path \"${errSchemaPath}\"`);\n }\n}\nfunction checkNoDefault(it) {\n const { schema, opts } = it;\n if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) {\n (0, util_1.checkStrictMode)(it, \"default is ignored in the schema root\");\n }\n}\nfunction updateContext(it) {\n const schId = it.schema[it.opts.schemaId];\n if (schId)\n it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);\n}\nfunction checkAsyncSchema(it) {\n if (it.schema.$async && !it.schemaEnv.$async)\n throw new Error(\"async schema in sync schema\");\n}\nfunction commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {\n const msg = schema.$comment;\n if (opts.$comment === true) {\n gen.code((0, codegen_1._) `${names_1.default.self}.logger.log(${msg})`);\n }\n else if (typeof opts.$comment == \"function\") {\n const schemaPath = (0, codegen_1.str) `${errSchemaPath}/$comment`;\n const rootName = gen.scopeValue(\"root\", { ref: schemaEnv.root });\n gen.code((0, codegen_1._) `${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);\n }\n}\nfunction returnResults(it) {\n const { gen, schemaEnv, validateName, ValidationError, opts } = it;\n if (schemaEnv.$async) {\n // TODO assign unevaluated\n gen.if((0, codegen_1._) `${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._) `new ${ValidationError}(${names_1.default.vErrors})`));\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, names_1.default.vErrors);\n if (opts.unevaluated)\n assignEvaluated(it);\n gen.return((0, codegen_1._) `${names_1.default.errors} === 0`);\n }\n}\nfunction assignEvaluated({ gen, evaluated, props, items }) {\n if (props instanceof codegen_1.Name)\n gen.assign((0, codegen_1._) `${evaluated}.props`, props);\n if (items instanceof codegen_1.Name)\n gen.assign((0, codegen_1._) `${evaluated}.items`, items);\n}\nfunction schemaKeywords(it, types, typeErrors, errsCount) {\n const { gen, schema, data, allErrors, opts, self } = it;\n const { RULES } = self;\n if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {\n gen.block(() => keywordCode(it, \"$ref\", RULES.all.$ref.definition)); // TODO typecast\n return;\n }\n if (!opts.jtd)\n checkStrictTypes(it, types);\n gen.block(() => {\n for (const group of RULES.rules)\n groupKeywords(group);\n groupKeywords(RULES.post);\n });\n function groupKeywords(group) {\n if (!(0, applicability_1.shouldUseGroup)(schema, group))\n return;\n if (group.type) {\n gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));\n iterateKeywords(it, group);\n if (types.length === 1 && types[0] === group.type && typeErrors) {\n gen.else();\n (0, dataType_2.reportTypeError)(it);\n }\n gen.endIf();\n }\n else {\n iterateKeywords(it, group);\n }\n // TODO make it \"ok\" call?\n if (!allErrors)\n gen.if((0, codegen_1._) `${names_1.default.errors} === ${errsCount || 0}`);\n }\n}\nfunction iterateKeywords(it, group) {\n const { gen, schema, opts: { useDefaults }, } = it;\n if (useDefaults)\n (0, defaults_1.assignDefaults)(it, group.type);\n gen.block(() => {\n for (const rule of group.rules) {\n if ((0, applicability_1.shouldUseRule)(schema, rule)) {\n keywordCode(it, rule.keyword, rule.definition, group.type);\n }\n }\n });\n}\nfunction checkStrictTypes(it, types) {\n if (it.schemaEnv.meta || !it.opts.strictTypes)\n return;\n checkContextTypes(it, types);\n if (!it.opts.allowUnionTypes)\n checkMultipleTypes(it, types);\n checkKeywordTypes(it, it.dataTypes);\n}\nfunction checkContextTypes(it, types) {\n if (!types.length)\n return;\n if (!it.dataTypes.length) {\n it.dataTypes = types;\n return;\n }\n types.forEach((t) => {\n if (!includesType(it.dataTypes, t)) {\n strictTypesError(it, `type \"${t}\" not allowed by context \"${it.dataTypes.join(\",\")}\"`);\n }\n });\n narrowSchemaTypes(it, types);\n}\nfunction checkMultipleTypes(it, ts) {\n if (ts.length > 1 && !(ts.length === 2 && ts.includes(\"null\"))) {\n strictTypesError(it, \"use allowUnionTypes to allow union type keyword\");\n }\n}\nfunction checkKeywordTypes(it, ts) {\n const rules = it.self.RULES.all;\n for (const keyword in rules) {\n const rule = rules[keyword];\n if (typeof rule == \"object\" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {\n const { type } = rule.definition;\n if (type.length && !type.some((t) => hasApplicableType(ts, t))) {\n strictTypesError(it, `missing type \"${type.join(\",\")}\" for keyword \"${keyword}\"`);\n }\n }\n }\n}\nfunction hasApplicableType(schTs, kwdT) {\n return schTs.includes(kwdT) || (kwdT === \"number\" && schTs.includes(\"integer\"));\n}\nfunction includesType(ts, t) {\n return ts.includes(t) || (t === \"integer\" && ts.includes(\"number\"));\n}\nfunction narrowSchemaTypes(it, withTypes) {\n const ts = [];\n for (const t of it.dataTypes) {\n if (includesType(withTypes, t))\n ts.push(t);\n else if (withTypes.includes(\"integer\") && t === \"number\")\n ts.push(\"integer\");\n }\n it.dataTypes = ts;\n}\nfunction strictTypesError(it, msg) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n msg += ` at \"${schemaPath}\" (strictTypes)`;\n (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);\n}\nclass KeywordCxt {\n constructor(it, def, keyword) {\n (0, keyword_1.validateKeywordUsage)(it, def, keyword);\n this.gen = it.gen;\n this.allErrors = it.allErrors;\n this.keyword = keyword;\n this.data = it.data;\n this.schema = it.schema[keyword];\n this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;\n this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);\n this.schemaType = def.schemaType;\n this.parentSchema = it.schema;\n this.params = {};\n this.it = it;\n this.def = def;\n if (this.$data) {\n this.schemaCode = it.gen.const(\"vSchema\", getData(this.$data, it));\n }\n else {\n this.schemaCode = this.schemaValue;\n if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) {\n throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);\n }\n }\n if (\"code\" in def ? def.trackErrors : def.errors !== false) {\n this.errsCount = it.gen.const(\"_errs\", names_1.default.errors);\n }\n }\n result(condition, successAction, failAction) {\n this.failResult((0, codegen_1.not)(condition), successAction, failAction);\n }\n failResult(condition, successAction, failAction) {\n this.gen.if(condition);\n if (failAction)\n failAction();\n else\n this.error();\n if (successAction) {\n this.gen.else();\n successAction();\n if (this.allErrors)\n this.gen.endIf();\n }\n else {\n if (this.allErrors)\n this.gen.endIf();\n else\n this.gen.else();\n }\n }\n pass(condition, failAction) {\n this.failResult((0, codegen_1.not)(condition), undefined, failAction);\n }\n fail(condition) {\n if (condition === undefined) {\n this.error();\n if (!this.allErrors)\n this.gen.if(false); // this branch will be removed by gen.optimize\n return;\n }\n this.gen.if(condition);\n this.error();\n if (this.allErrors)\n this.gen.endIf();\n else\n this.gen.else();\n }\n fail$data(condition) {\n if (!this.$data)\n return this.fail(condition);\n const { schemaCode } = this;\n this.fail((0, codegen_1._) `${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);\n }\n error(append, errorParams, errorPaths) {\n if (errorParams) {\n this.setParams(errorParams);\n this._error(append, errorPaths);\n this.setParams({});\n return;\n }\n this._error(append, errorPaths);\n }\n _error(append, errorPaths) {\n ;\n (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);\n }\n $dataError() {\n (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);\n }\n reset() {\n if (this.errsCount === undefined)\n throw new Error('add \"trackErrors\" to keyword definition');\n (0, errors_1.resetErrorsCount)(this.gen, this.errsCount);\n }\n ok(cond) {\n if (!this.allErrors)\n this.gen.if(cond);\n }\n setParams(obj, assign) {\n if (assign)\n Object.assign(this.params, obj);\n else\n this.params = obj;\n }\n block$data(valid, codeBlock, $dataValid = codegen_1.nil) {\n this.gen.block(() => {\n this.check$data(valid, $dataValid);\n codeBlock();\n });\n }\n check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {\n if (!this.$data)\n return;\n const { gen, schemaCode, schemaType, def } = this;\n gen.if((0, codegen_1.or)((0, codegen_1._) `${schemaCode} === undefined`, $dataValid));\n if (valid !== codegen_1.nil)\n gen.assign(valid, true);\n if (schemaType.length || def.validateSchema) {\n gen.elseIf(this.invalid$data());\n this.$dataError();\n if (valid !== codegen_1.nil)\n gen.assign(valid, false);\n }\n gen.else();\n }\n invalid$data() {\n const { gen, schemaCode, schemaType, def, it } = this;\n return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());\n function wrong$DataType() {\n if (schemaType.length) {\n /* istanbul ignore if */\n if (!(schemaCode instanceof codegen_1.Name))\n throw new Error(\"ajv implementation error\");\n const st = Array.isArray(schemaType) ? schemaType : [schemaType];\n return (0, codegen_1._) `${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;\n }\n return codegen_1.nil;\n }\n function invalid$DataSchema() {\n if (def.validateSchema) {\n const validateSchemaRef = gen.scopeValue(\"validate$data\", { ref: def.validateSchema }); // TODO value.code for standalone\n return (0, codegen_1._) `!${validateSchemaRef}(${schemaCode})`;\n }\n return codegen_1.nil;\n }\n }\n subschema(appl, valid) {\n const subschema = (0, subschema_1.getSubschema)(this.it, appl);\n (0, subschema_1.extendSubschemaData)(subschema, this.it, appl);\n (0, subschema_1.extendSubschemaMode)(subschema, appl);\n const nextContext = { ...this.it, ...subschema, items: undefined, props: undefined };\n subschemaCode(nextContext, valid);\n return nextContext;\n }\n mergeEvaluated(schemaCxt, toName) {\n const { it, gen } = this;\n if (!it.opts.unevaluated)\n return;\n if (it.props !== true && schemaCxt.props !== undefined) {\n it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);\n }\n if (it.items !== true && schemaCxt.items !== undefined) {\n it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);\n }\n }\n mergeValidEvaluated(schemaCxt, valid) {\n const { it, gen } = this;\n if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {\n gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));\n return true;\n }\n }\n}\nexports.KeywordCxt = KeywordCxt;\nfunction keywordCode(it, keyword, def, ruleType) {\n const cxt = new KeywordCxt(it, def, keyword);\n if (\"code\" in def) {\n def.code(cxt, ruleType);\n }\n else if (cxt.$data && def.validate) {\n (0, keyword_1.funcKeywordCode)(cxt, def);\n }\n else if (\"macro\" in def) {\n (0, keyword_1.macroKeywordCode)(cxt, def);\n }\n else if (def.compile || def.validate) {\n (0, keyword_1.funcKeywordCode)(cxt, def);\n }\n}\nconst JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/;\nconst RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\nfunction getData($data, { dataLevel, dataNames, dataPathArr }) {\n let jsonPointer;\n let data;\n if ($data === \"\")\n return names_1.default.rootData;\n if ($data[0] === \"/\") {\n if (!JSON_POINTER.test($data))\n throw new Error(`Invalid JSON-pointer: ${$data}`);\n jsonPointer = $data;\n data = names_1.default.rootData;\n }\n else {\n const matches = RELATIVE_JSON_POINTER.exec($data);\n if (!matches)\n throw new Error(`Invalid JSON-pointer: ${$data}`);\n const up = +matches[1];\n jsonPointer = matches[2];\n if (jsonPointer === \"#\") {\n if (up >= dataLevel)\n throw new Error(errorMsg(\"property/index\", up));\n return dataPathArr[dataLevel - up];\n }\n if (up > dataLevel)\n throw new Error(errorMsg(\"data\", up));\n data = dataNames[dataLevel - up];\n if (!jsonPointer)\n return data;\n }\n let expr = data;\n const segments = jsonPointer.split(\"/\");\n for (const segment of segments) {\n if (segment) {\n data = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;\n expr = (0, codegen_1._) `${expr} && ${data}`;\n }\n }\n return expr;\n function errorMsg(pointerType, up) {\n return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;\n }\n}\nexports.getData = getData;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass ValidationError extends Error {\n constructor(errors) {\n super(\"validation failed\");\n this.errors = errors;\n this.ajv = this.validation = true;\n }\n}\nexports.default = ValidationError;\n//# sourceMappingURL=validation_error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst resolve_1 = require(\"./resolve\");\nclass MissingRefError extends Error {\n constructor(resolver, baseId, ref, msg) {\n super(msg || `can't resolve reference ${ref} from id ${baseId}`);\n this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);\n this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));\n }\n}\nexports.default = MissingRefError;\n//# sourceMappingURL=ref_error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst validation_error_1 = require(\"../runtime/validation_error\");\nconst names_1 = require(\"./names\");\nconst resolve_1 = require(\"./resolve\");\nconst util_1 = require(\"./util\");\nconst validate_1 = require(\"./validate\");\nclass SchemaEnv {\n constructor(env) {\n var _a;\n this.refs = {};\n this.dynamicAnchors = {};\n let schema;\n if (typeof env.schema == \"object\")\n schema = env.schema;\n this.schema = env.schema;\n this.schemaId = env.schemaId;\n this.root = env.root || this;\n this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || \"$id\"]);\n this.schemaPath = env.schemaPath;\n this.localRefs = env.localRefs;\n this.meta = env.meta;\n this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;\n this.refs = {};\n }\n}\nexports.SchemaEnv = SchemaEnv;\n// let codeSize = 0\n// let nodeCount = 0\n// Compiles schema in SchemaEnv\nfunction compileSchema(sch) {\n // TODO refactor - remove compilations\n const _sch = getCompilingSchema.call(this, sch);\n if (_sch)\n return _sch;\n const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); // TODO if getFullPath removed 1 tests fails\n const { es5, lines } = this.opts.code;\n const { ownProperties } = this.opts;\n const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });\n let _ValidationError;\n if (sch.$async) {\n _ValidationError = gen.scopeValue(\"Error\", {\n ref: validation_error_1.default,\n code: (0, codegen_1._) `require(\"ajv/dist/runtime/validation_error\").default`,\n });\n }\n const validateName = gen.scopeName(\"validate\");\n sch.validateName = validateName;\n const schemaCxt = {\n gen,\n allErrors: this.opts.allErrors,\n data: names_1.default.data,\n parentData: names_1.default.parentData,\n parentDataProperty: names_1.default.parentDataProperty,\n dataNames: [names_1.default.data],\n dataPathArr: [codegen_1.nil], // TODO can its length be used as dataLevel if nil is removed?\n dataLevel: 0,\n dataTypes: [],\n definedProperties: new Set(),\n topSchemaRef: gen.scopeValue(\"schema\", this.opts.code.source === true\n ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) }\n : { ref: sch.schema }),\n validateName,\n ValidationError: _ValidationError,\n schema: sch.schema,\n schemaEnv: sch,\n rootId,\n baseId: sch.baseId || rootId,\n schemaPath: codegen_1.nil,\n errSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n errorPath: (0, codegen_1._) `\"\"`,\n opts: this.opts,\n self: this,\n };\n let sourceCode;\n try {\n this._compilations.add(sch);\n (0, validate_1.validateFunctionCode)(schemaCxt);\n gen.optimize(this.opts.code.optimize);\n // gen.optimize(1)\n const validateCode = gen.toString();\n sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;\n // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))\n if (this.opts.code.process)\n sourceCode = this.opts.code.process(sourceCode, sch);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode)\n const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);\n const validate = makeValidate(this, this.scope.get());\n this.scope.value(validateName, { ref: validate });\n validate.errors = null;\n validate.schema = sch.schema;\n validate.schemaEnv = sch;\n if (sch.$async)\n validate.$async = true;\n if (this.opts.code.source === true) {\n validate.source = { validateName, validateCode, scopeValues: gen._values };\n }\n if (this.opts.unevaluated) {\n const { props, items } = schemaCxt;\n validate.evaluated = {\n props: props instanceof codegen_1.Name ? undefined : props,\n items: items instanceof codegen_1.Name ? undefined : items,\n dynamicProps: props instanceof codegen_1.Name,\n dynamicItems: items instanceof codegen_1.Name,\n };\n if (validate.source)\n validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);\n }\n sch.validate = validate;\n return sch;\n }\n catch (e) {\n delete sch.validate;\n delete sch.validateName;\n if (sourceCode)\n this.logger.error(\"Error compiling schema, function code:\", sourceCode);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode, this.opts)\n throw e;\n }\n finally {\n this._compilations.delete(sch);\n }\n}\nexports.compileSchema = compileSchema;\nfunction resolveRef(root, baseId, ref) {\n var _a;\n ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);\n const schOrFunc = root.refs[ref];\n if (schOrFunc)\n return schOrFunc;\n let _sch = resolve.call(this, root, ref);\n if (_sch === undefined) {\n const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv\n const { schemaId } = this.opts;\n if (schema)\n _sch = new SchemaEnv({ schema, schemaId, root, baseId });\n }\n if (_sch === undefined)\n return;\n return (root.refs[ref] = inlineOrCompile.call(this, _sch));\n}\nexports.resolveRef = resolveRef;\nfunction inlineOrCompile(sch) {\n if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))\n return sch.schema;\n return sch.validate ? sch : compileSchema.call(this, sch);\n}\n// Index of schema compilation in the currently compiled list\nfunction getCompilingSchema(schEnv) {\n for (const sch of this._compilations) {\n if (sameSchemaEnv(sch, schEnv))\n return sch;\n }\n}\nexports.getCompilingSchema = getCompilingSchema;\nfunction sameSchemaEnv(s1, s2) {\n return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;\n}\n// resolve and compile the references ($ref)\n// TODO returns AnySchemaObject (if the schema can be inlined) or validation function\nfunction resolve(root, // information about the root schema for the current schema\nref // reference to resolve\n) {\n let sch;\n while (typeof (sch = this.refs[ref]) == \"string\")\n ref = sch;\n return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);\n}\n// Resolve schema, its root and baseId\nfunction resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it\nref // reference to resolve\n) {\n const p = this.opts.uriResolver.parse(ref);\n const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);\n let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);\n // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests\n if (Object.keys(root.schema).length > 0 && refPath === baseId) {\n return getJsonPointer.call(this, p, root);\n }\n const id = (0, resolve_1.normalizeId)(refPath);\n const schOrRef = this.refs[id] || this.schemas[id];\n if (typeof schOrRef == \"string\") {\n const sch = resolveSchema.call(this, root, schOrRef);\n if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== \"object\")\n return;\n return getJsonPointer.call(this, p, sch);\n }\n if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== \"object\")\n return;\n if (!schOrRef.validate)\n compileSchema.call(this, schOrRef);\n if (id === (0, resolve_1.normalizeId)(ref)) {\n const { schema } = schOrRef;\n const { schemaId } = this.opts;\n const schId = schema[schemaId];\n if (schId)\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n return new SchemaEnv({ schema, schemaId, root, baseId });\n }\n return getJsonPointer.call(this, p, schOrRef);\n}\nexports.resolveSchema = resolveSchema;\nconst PREVENT_SCOPE_CHANGE = new Set([\n \"properties\",\n \"patternProperties\",\n \"enum\",\n \"dependencies\",\n \"definitions\",\n]);\nfunction getJsonPointer(parsedRef, { baseId, schema, root }) {\n var _a;\n if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== \"/\")\n return;\n for (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n if (typeof schema === \"boolean\")\n return;\n const partSchema = schema[(0, util_1.unescapeFragment)(part)];\n if (partSchema === undefined)\n return;\n schema = partSchema;\n // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?\n const schId = typeof schema === \"object\" && schema[this.opts.schemaId];\n if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n }\n }\n let env;\n if (typeof schema != \"boolean\" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {\n const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);\n env = resolveSchema.call(this, root, $ref);\n }\n // even though resolution failed we need to return SchemaEnv to throw exception\n // so that compileAsync loads missing schema.\n const { schemaId } = this.opts;\n env = env || new SchemaEnv({ schema, schemaId, root, baseId });\n if (env.schema !== env.root.schema)\n return env;\n return undefined;\n}\n//# sourceMappingURL=index.js.map","","'use strict'\n\n/** @type {(value: string) => boolean} */\nconst isUUID = RegExp.prototype.test.bind(/^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$/iu)\n\n/** @type {(value: string) => boolean} */\nconst isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)$/u)\n\n/** @type {(value: string) => boolean} */\nconst isHexPair = RegExp.prototype.test.bind(/^[\\da-f]{2}$/iu)\n\n/** @type {(value: string) => boolean} */\nconst isUnreserved = RegExp.prototype.test.bind(/^[\\da-z\\-._~]$/iu)\n\n/** @type {(value: string) => boolean} */\nconst isPathCharacter = RegExp.prototype.test.bind(/^[\\da-z\\-._~!$&'()*+,;=:@/]$/iu)\n\n/**\n * @param {Array<string>} input\n * @returns {string}\n */\nfunction stringArrayToHexStripped (input) {\n let acc = ''\n let code = 0\n let i = 0\n\n for (i = 0; i < input.length; i++) {\n code = input[i].charCodeAt(0)\n if (code === 48) {\n continue\n }\n if (!((code >= 48 && code <= 57) || (code >= 65 && code <= 70) || (code >= 97 && code <= 102))) {\n return ''\n }\n acc += input[i]\n break\n }\n\n for (i += 1; i < input.length; i++) {\n code = input[i].charCodeAt(0)\n if (!((code >= 48 && code <= 57) || (code >= 65 && code <= 70) || (code >= 97 && code <= 102))) {\n return ''\n }\n acc += input[i]\n }\n return acc\n}\n\n/**\n * @typedef {Object} GetIPV6Result\n * @property {boolean} error - Indicates if there was an error parsing the IPv6 address.\n * @property {string} address - The parsed IPv6 address.\n * @property {string} [zone] - The zone identifier, if present.\n */\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nconst nonSimpleDomain = RegExp.prototype.test.bind(/[^!\"$&'()*+,\\-.;=_`a-z{}~]/u)\n\n/**\n * @param {Array<string>} buffer\n * @returns {boolean}\n */\nfunction consumeIsZone (buffer) {\n buffer.length = 0\n return true\n}\n\n/**\n * @param {Array<string>} buffer\n * @param {Array<string>} address\n * @param {GetIPV6Result} output\n * @returns {boolean}\n */\nfunction consumeHextets (buffer, address, output) {\n if (buffer.length) {\n const hex = stringArrayToHexStripped(buffer)\n if (hex !== '') {\n address.push(hex)\n } else {\n output.error = true\n return false\n }\n buffer.length = 0\n }\n return true\n}\n\n/**\n * @param {string} input\n * @returns {GetIPV6Result}\n */\nfunction getIPV6 (input) {\n let tokenCount = 0\n const output = { error: false, address: '', zone: '' }\n /** @type {Array<string>} */\n const address = []\n /** @type {Array<string>} */\n const buffer = []\n let endipv6Encountered = false\n let endIpv6 = false\n\n let consume = consumeHextets\n\n for (let i = 0; i < input.length; i++) {\n const cursor = input[i]\n if (cursor === '[' || cursor === ']') { continue }\n if (cursor === ':') {\n if (endipv6Encountered === true) {\n endIpv6 = true\n }\n if (!consume(buffer, address, output)) { break }\n if (++tokenCount > 7) {\n // not valid\n output.error = true\n break\n }\n if (i > 0 && input[i - 1] === ':') {\n endipv6Encountered = true\n }\n address.push(':')\n continue\n } else if (cursor === '%') {\n if (!consume(buffer, address, output)) { break }\n // switch to zone detection\n consume = consumeIsZone\n } else {\n buffer.push(cursor)\n continue\n }\n }\n if (buffer.length) {\n if (consume === consumeIsZone) {\n output.zone = buffer.join('')\n } else if (endIpv6) {\n address.push(buffer.join(''))\n } else {\n address.push(stringArrayToHexStripped(buffer))\n }\n }\n output.address = address.join('')\n return output\n}\n\n/**\n * @typedef {Object} NormalizeIPv6Result\n * @property {string} host - The normalized host.\n * @property {string} [escapedHost] - The escaped host.\n * @property {boolean} isIPV6 - Indicates if the host is an IPv6 address.\n */\n\n/**\n * @param {string} host\n * @returns {NormalizeIPv6Result}\n */\nfunction normalizeIPv6 (host) {\n if (findToken(host, ':') < 2) { return { host, isIPV6: false } }\n const ipv6 = getIPV6(host)\n\n if (!ipv6.error) {\n let newHost = ipv6.address\n let escapedHost = ipv6.address\n if (ipv6.zone) {\n newHost += '%' + ipv6.zone\n escapedHost += '%25' + ipv6.zone\n }\n return { host: newHost, isIPV6: true, escapedHost }\n } else {\n return { host, isIPV6: false }\n }\n}\n\n/**\n * @param {string} str\n * @param {string} token\n * @returns {number}\n */\nfunction findToken (str, token) {\n let ind = 0\n for (let i = 0; i < str.length; i++) {\n if (str[i] === token) ind++\n }\n return ind\n}\n\n/**\n * @param {string} path\n * @returns {string}\n *\n * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n */\nfunction removeDotSegments (path) {\n let input = path\n const output = []\n let nextSlash = -1\n let len = 0\n\n // eslint-disable-next-line no-cond-assign\n while (len = input.length) {\n if (len === 1) {\n if (input === '.') {\n break\n } else if (input === '/') {\n output.push('/')\n break\n } else {\n output.push(input)\n break\n }\n } else if (len === 2) {\n if (input[0] === '.') {\n if (input[1] === '.') {\n break\n } else if (input[1] === '/') {\n input = input.slice(2)\n continue\n }\n } else if (input[0] === '/') {\n if (input[1] === '.' || input[1] === '/') {\n output.push('/')\n break\n }\n }\n } else if (len === 3) {\n if (input === '/..') {\n if (output.length !== 0) {\n output.pop()\n }\n output.push('/')\n break\n }\n }\n if (input[0] === '.') {\n if (input[1] === '.') {\n if (input[2] === '/') {\n input = input.slice(3)\n continue\n }\n } else if (input[1] === '/') {\n input = input.slice(2)\n continue\n }\n } else if (input[0] === '/') {\n if (input[1] === '.') {\n if (input[2] === '/') {\n input = input.slice(2)\n continue\n } else if (input[2] === '.') {\n if (input[3] === '/') {\n input = input.slice(3)\n if (output.length !== 0) {\n output.pop()\n }\n continue\n }\n }\n }\n }\n\n // Rule 2E: Move normal path segment to output\n if ((nextSlash = input.indexOf('/', 1)) === -1) {\n output.push(input)\n break\n } else {\n output.push(input.slice(0, nextSlash))\n input = input.slice(nextSlash)\n }\n }\n\n return output.join('')\n}\n\n/**\n * Re-escape RFC 3986 gen-delims that must not appear literally in the host.\n * After the URI regex parses, these characters cannot be literal in the host\n * field, so any that appear after decoding came from percent-encoding and\n * must be restored to prevent authority structure changes.\n *\n * @param {string} host\n * @param {boolean} isIP - true for IPv4/IPv6 hosts (skip colon re-escaping)\n * @returns {string}\n */\nconst HOST_DELIMS = { '@': '%40', '/': '%2F', '?': '%3F', '#': '%23', ':': '%3A' }\nconst HOST_DELIM_RE = /[@/?#:]/g\nconst HOST_DELIM_NO_COLON_RE = /[@/?#]/g\n\nfunction reescapeHostDelimiters (host, isIP) {\n const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE\n re.lastIndex = 0\n return host.replace(re, (ch) => HOST_DELIMS[ch])\n}\n\n/**\n * Normalizes percent escapes and optionally decodes only unreserved ASCII bytes.\n * Reserved delimiters such as `%2F` and `%2E` stay escaped.\n *\n * @param {string} input\n * @param {boolean} [decodeUnreserved=false]\n * @returns {string}\n */\nfunction normalizePercentEncoding (input, decodeUnreserved = false) {\n if (input.indexOf('%') === -1) {\n return input\n }\n\n let output = ''\n\n for (let i = 0; i < input.length; i++) {\n if (input[i] === '%' && i + 2 < input.length) {\n const hex = input.slice(i + 1, i + 3)\n if (isHexPair(hex)) {\n const normalizedHex = hex.toUpperCase()\n const decoded = String.fromCharCode(parseInt(normalizedHex, 16))\n\n if (decodeUnreserved && isUnreserved(decoded)) {\n output += decoded\n } else {\n output += '%' + normalizedHex\n }\n\n i += 2\n continue\n }\n }\n\n output += input[i]\n }\n\n return output\n}\n\n/**\n * Normalizes path data without turning reserved escapes into live path syntax.\n * Valid escapes are uppercased, raw unsafe characters are escaped, and only\n * unreserved bytes that are not `.` are decoded.\n *\n * @param {string} input\n * @returns {string}\n */\nfunction normalizePathEncoding (input) {\n let output = ''\n\n for (let i = 0; i < input.length; i++) {\n if (input[i] === '%' && i + 2 < input.length) {\n const hex = input.slice(i + 1, i + 3)\n if (isHexPair(hex)) {\n const normalizedHex = hex.toUpperCase()\n const decoded = String.fromCharCode(parseInt(normalizedHex, 16))\n\n if (decoded !== '.' && isUnreserved(decoded)) {\n output += decoded\n } else {\n output += '%' + normalizedHex\n }\n\n i += 2\n continue\n }\n }\n\n if (isPathCharacter(input[i])) {\n output += input[i]\n } else {\n output += escape(input[i])\n }\n }\n\n return output\n}\n\n/**\n * Escapes a component while preserving existing valid percent escapes.\n *\n * @param {string} input\n * @returns {string}\n */\nfunction escapePreservingEscapes (input) {\n let output = ''\n\n for (let i = 0; i < input.length; i++) {\n if (input[i] === '%' && i + 2 < input.length) {\n const hex = input.slice(i + 1, i + 3)\n if (isHexPair(hex)) {\n output += '%' + hex.toUpperCase()\n i += 2\n continue\n }\n }\n\n output += escape(input[i])\n }\n\n return output\n}\n\n/**\n * @param {import('../types/index').URIComponent} component\n * @returns {string|undefined}\n */\nfunction recomposeAuthority (component) {\n const uriTokens = []\n\n if (component.userinfo !== undefined) {\n uriTokens.push(component.userinfo)\n uriTokens.push('@')\n }\n\n if (component.host !== undefined) {\n let host = unescape(component.host)\n if (!isIPv4(host)) {\n const ipV6res = normalizeIPv6(host)\n if (ipV6res.isIPV6 === true) {\n host = `[${ipV6res.escapedHost}]`\n } else {\n host = reescapeHostDelimiters(host, false)\n }\n }\n uriTokens.push(host)\n }\n\n if (typeof component.port === 'number' || typeof component.port === 'string') {\n uriTokens.push(':')\n uriTokens.push(String(component.port))\n }\n\n return uriTokens.length ? uriTokens.join('') : undefined\n};\n\nmodule.exports = {\n nonSimpleDomain,\n recomposeAuthority,\n reescapeHostDelimiters,\n normalizePercentEncoding,\n normalizePathEncoding,\n escapePreservingEscapes,\n removeDotSegments,\n isIPv4,\n isUUID,\n normalizeIPv6,\n stringArrayToHexStripped\n}\n","'use strict'\n\nconst { isUUID } = require('./utils')\nconst URN_REG = /([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)/iu\n\nconst supportedSchemeNames = /** @type {const} */ (['http', 'https', 'ws',\n 'wss', 'urn', 'urn:uuid'])\n\n/** @typedef {supportedSchemeNames[number]} SchemeName */\n\n/**\n * @param {string} name\n * @returns {name is SchemeName}\n */\nfunction isValidSchemeName (name) {\n return supportedSchemeNames.indexOf(/** @type {*} */ (name)) !== -1\n}\n\n/**\n * @callback SchemeFn\n * @param {import('../types/index').URIComponent} component\n * @param {import('../types/index').Options} options\n * @returns {import('../types/index').URIComponent}\n */\n\n/**\n * @typedef {Object} SchemeHandler\n * @property {SchemeName} scheme - The scheme name.\n * @property {boolean} [domainHost] - Indicates if the scheme supports domain hosts.\n * @property {SchemeFn} parse - Function to parse the URI component for this scheme.\n * @property {SchemeFn} serialize - Function to serialize the URI component for this scheme.\n * @property {boolean} [skipNormalize] - Indicates if normalization should be skipped for this scheme.\n * @property {boolean} [absolutePath] - Indicates if the scheme uses absolute paths.\n * @property {boolean} [unicodeSupport] - Indicates if the scheme supports Unicode.\n */\n\n/**\n * @param {import('../types/index').URIComponent} wsComponent\n * @returns {boolean}\n */\nfunction wsIsSecure (wsComponent) {\n if (wsComponent.secure === true) {\n return true\n } else if (wsComponent.secure === false) {\n return false\n } else if (wsComponent.scheme) {\n return (\n wsComponent.scheme.length === 3 &&\n (wsComponent.scheme[0] === 'w' || wsComponent.scheme[0] === 'W') &&\n (wsComponent.scheme[1] === 's' || wsComponent.scheme[1] === 'S') &&\n (wsComponent.scheme[2] === 's' || wsComponent.scheme[2] === 'S')\n )\n } else {\n return false\n }\n}\n\n/** @type {SchemeFn} */\nfunction httpParse (component) {\n if (!component.host) {\n component.error = component.error || 'HTTP URIs must have a host.'\n }\n\n return component\n}\n\n/** @type {SchemeFn} */\nfunction httpSerialize (component) {\n const secure = String(component.scheme).toLowerCase() === 'https'\n\n // normalize the default port\n if (component.port === (secure ? 443 : 80) || component.port === '') {\n component.port = undefined\n }\n\n // normalize the empty path\n if (!component.path) {\n component.path = '/'\n }\n\n // NOTE: We do not parse query strings for HTTP URIs\n // as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n // and not the HTTP spec.\n\n return component\n}\n\n/** @type {SchemeFn} */\nfunction wsParse (wsComponent) {\n// indicate if the secure flag is set\n wsComponent.secure = wsIsSecure(wsComponent)\n\n // construct resouce name\n wsComponent.resourceName = (wsComponent.path || '/') + (wsComponent.query ? '?' + wsComponent.query : '')\n wsComponent.path = undefined\n wsComponent.query = undefined\n\n return wsComponent\n}\n\n/** @type {SchemeFn} */\nfunction wsSerialize (wsComponent) {\n// normalize the default port\n if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === '') {\n wsComponent.port = undefined\n }\n\n // ensure scheme matches secure flag\n if (typeof wsComponent.secure === 'boolean') {\n wsComponent.scheme = (wsComponent.secure ? 'wss' : 'ws')\n wsComponent.secure = undefined\n }\n\n // reconstruct path from resource name\n if (wsComponent.resourceName) {\n const [path, query] = wsComponent.resourceName.split('?')\n wsComponent.path = (path && path !== '/' ? path : undefined)\n wsComponent.query = query\n wsComponent.resourceName = undefined\n }\n\n // forbid fragment component\n wsComponent.fragment = undefined\n\n return wsComponent\n}\n\n/** @type {SchemeFn} */\nfunction urnParse (urnComponent, options) {\n if (!urnComponent.path) {\n urnComponent.error = 'URN can not be parsed'\n return urnComponent\n }\n const matches = urnComponent.path.match(URN_REG)\n if (matches) {\n const scheme = options.scheme || urnComponent.scheme || 'urn'\n urnComponent.nid = matches[1].toLowerCase()\n urnComponent.nss = matches[2]\n const urnScheme = `${scheme}:${options.nid || urnComponent.nid}`\n const schemeHandler = getSchemeHandler(urnScheme)\n urnComponent.path = undefined\n\n if (schemeHandler) {\n urnComponent = schemeHandler.parse(urnComponent, options)\n }\n } else {\n urnComponent.error = urnComponent.error || 'URN can not be parsed.'\n }\n\n return urnComponent\n}\n\n/** @type {SchemeFn} */\nfunction urnSerialize (urnComponent, options) {\n if (urnComponent.nid === undefined) {\n throw new Error('URN without nid cannot be serialized')\n }\n const scheme = options.scheme || urnComponent.scheme || 'urn'\n const nid = urnComponent.nid.toLowerCase()\n const urnScheme = `${scheme}:${options.nid || nid}`\n const schemeHandler = getSchemeHandler(urnScheme)\n\n if (schemeHandler) {\n urnComponent = schemeHandler.serialize(urnComponent, options)\n }\n\n const uriComponent = urnComponent\n const nss = urnComponent.nss\n uriComponent.path = `${nid || options.nid}:${nss}`\n\n options.skipEscape = true\n return uriComponent\n}\n\n/** @type {SchemeFn} */\nfunction urnuuidParse (urnComponent, options) {\n const uuidComponent = urnComponent\n uuidComponent.uuid = uuidComponent.nss\n uuidComponent.nss = undefined\n\n if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) {\n uuidComponent.error = uuidComponent.error || 'UUID is not valid.'\n }\n\n return uuidComponent\n}\n\n/** @type {SchemeFn} */\nfunction urnuuidSerialize (uuidComponent) {\n const urnComponent = uuidComponent\n // normalize UUID\n urnComponent.nss = (uuidComponent.uuid || '').toLowerCase()\n return urnComponent\n}\n\nconst http = /** @type {SchemeHandler} */ ({\n scheme: 'http',\n domainHost: true,\n parse: httpParse,\n serialize: httpSerialize\n})\n\nconst https = /** @type {SchemeHandler} */ ({\n scheme: 'https',\n domainHost: http.domainHost,\n parse: httpParse,\n serialize: httpSerialize\n})\n\nconst ws = /** @type {SchemeHandler} */ ({\n scheme: 'ws',\n domainHost: true,\n parse: wsParse,\n serialize: wsSerialize\n})\n\nconst wss = /** @type {SchemeHandler} */ ({\n scheme: 'wss',\n domainHost: ws.domainHost,\n parse: ws.parse,\n serialize: ws.serialize\n})\n\nconst urn = /** @type {SchemeHandler} */ ({\n scheme: 'urn',\n parse: urnParse,\n serialize: urnSerialize,\n skipNormalize: true\n})\n\nconst urnuuid = /** @type {SchemeHandler} */ ({\n scheme: 'urn:uuid',\n parse: urnuuidParse,\n serialize: urnuuidSerialize,\n skipNormalize: true\n})\n\nconst SCHEMES = /** @type {Record<SchemeName, SchemeHandler>} */ ({\n http,\n https,\n ws,\n wss,\n urn,\n 'urn:uuid': urnuuid\n})\n\nObject.setPrototypeOf(SCHEMES, null)\n\n/**\n * @param {string|undefined} scheme\n * @returns {SchemeHandler|undefined}\n */\nfunction getSchemeHandler (scheme) {\n return (\n scheme && (\n SCHEMES[/** @type {SchemeName} */ (scheme)] ||\n SCHEMES[/** @type {SchemeName} */(scheme.toLowerCase())])\n ) ||\n undefined\n}\n\nmodule.exports = {\n wsIsSecure,\n SCHEMES,\n isValidSchemeName,\n getSchemeHandler,\n}\n","'use strict'\n\nconst { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require('./lib/utils')\nconst { SCHEMES, getSchemeHandler } = require('./lib/schemes')\n\n/**\n * @template {import('./types/index').URIComponent|string} T\n * @param {T} uri\n * @param {import('./types/index').Options} [options]\n * @returns {T}\n */\nfunction normalize (uri, options) {\n if (typeof uri === 'string') {\n uri = /** @type {T} */ (normalizeString(uri, options))\n } else if (typeof uri === 'object') {\n uri = /** @type {T} */ (parse(serialize(uri, options), options))\n }\n return uri\n}\n\n/**\n * @param {string} baseURI\n * @param {string} relativeURI\n * @param {import('./types/index').Options} [options]\n * @returns {string}\n */\nfunction resolve (baseURI, relativeURI, options) {\n const schemelessOptions = options ? Object.assign({ scheme: 'null' }, options) : { scheme: 'null' }\n const resolved = resolveComponent(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true)\n schemelessOptions.skipEscape = true\n return serialize(resolved, schemelessOptions)\n}\n\n/**\n * @param {import ('./types/index').URIComponent} base\n * @param {import ('./types/index').URIComponent} relative\n * @param {import('./types/index').Options} [options]\n * @param {boolean} [skipNormalization=false]\n * @returns {import ('./types/index').URIComponent}\n */\nfunction resolveComponent (base, relative, options, skipNormalization) {\n /** @type {import('./types/index').URIComponent} */\n const target = {}\n if (!skipNormalization) {\n base = parse(serialize(base, options), options) // normalize base component\n relative = parse(serialize(relative, options), options) // normalize relative component\n }\n options = options || {}\n\n if (!options.tolerant && relative.scheme) {\n target.scheme = relative.scheme\n // target.authority = relative.authority;\n target.userinfo = relative.userinfo\n target.host = relative.host\n target.port = relative.port\n target.path = removeDotSegments(relative.path || '')\n target.query = relative.query\n } else {\n if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n // target.authority = relative.authority;\n target.userinfo = relative.userinfo\n target.host = relative.host\n target.port = relative.port\n target.path = removeDotSegments(relative.path || '')\n target.query = relative.query\n } else {\n if (!relative.path) {\n target.path = base.path\n if (relative.query !== undefined) {\n target.query = relative.query\n } else {\n target.query = base.query\n }\n } else {\n if (relative.path[0] === '/') {\n target.path = removeDotSegments(relative.path)\n } else {\n if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n target.path = '/' + relative.path\n } else if (!base.path) {\n target.path = relative.path\n } else {\n target.path = base.path.slice(0, base.path.lastIndexOf('/') + 1) + relative.path\n }\n target.path = removeDotSegments(target.path)\n }\n target.query = relative.query\n }\n // target.authority = base.authority;\n target.userinfo = base.userinfo\n target.host = base.host\n target.port = base.port\n }\n target.scheme = base.scheme\n }\n\n target.fragment = relative.fragment\n\n return target\n}\n\n/**\n * @param {import ('./types/index').URIComponent|string} uriA\n * @param {import ('./types/index').URIComponent|string} uriB\n * @param {import ('./types/index').Options} options\n * @returns {boolean}\n */\nfunction equal (uriA, uriB, options) {\n const normalizedA = normalizeComparableURI(uriA, options)\n const normalizedB = normalizeComparableURI(uriB, options)\n\n return normalizedA !== undefined && normalizedB !== undefined && normalizedA.toLowerCase() === normalizedB.toLowerCase()\n}\n\n/**\n * @param {Readonly<import('./types/index').URIComponent>} cmpts\n * @param {import('./types/index').Options} [opts]\n * @returns {string}\n */\nfunction serialize (cmpts, opts) {\n const component = {\n host: cmpts.host,\n scheme: cmpts.scheme,\n userinfo: cmpts.userinfo,\n port: cmpts.port,\n path: cmpts.path,\n query: cmpts.query,\n nid: cmpts.nid,\n nss: cmpts.nss,\n uuid: cmpts.uuid,\n fragment: cmpts.fragment,\n reference: cmpts.reference,\n resourceName: cmpts.resourceName,\n secure: cmpts.secure,\n error: ''\n }\n const options = Object.assign({}, opts)\n const uriTokens = []\n\n // find scheme handler\n const schemeHandler = getSchemeHandler(options.scheme || component.scheme)\n\n // perform scheme specific serialization\n if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options)\n\n if (component.path !== undefined) {\n if (!options.skipEscape) {\n component.path = escapePreservingEscapes(component.path)\n\n if (component.scheme !== undefined) {\n component.path = component.path.split('%3A').join(':')\n }\n } else {\n component.path = normalizePercentEncoding(component.path)\n }\n }\n\n if (options.reference !== 'suffix' && component.scheme) {\n uriTokens.push(component.scheme, ':')\n }\n\n const authority = recomposeAuthority(component)\n if (authority !== undefined) {\n if (options.reference !== 'suffix') {\n uriTokens.push('//')\n }\n\n uriTokens.push(authority)\n\n if (component.path && component.path[0] !== '/') {\n uriTokens.push('/')\n }\n }\n if (component.path !== undefined) {\n let s = component.path\n\n if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n s = removeDotSegments(s)\n }\n\n if (\n authority === undefined &&\n s[0] === '/' &&\n s[1] === '/'\n ) {\n // don't allow the path to start with \"//\"\n s = '/%2F' + s.slice(2)\n }\n\n uriTokens.push(s)\n }\n\n if (component.query !== undefined) {\n uriTokens.push('?', component.query)\n }\n\n if (component.fragment !== undefined) {\n uriTokens.push('#', component.fragment)\n }\n return uriTokens.join('')\n}\n\nconst URI_PARSE = /^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?/u\n\n/**\n * @param {import('./types/index').URIComponent} parsed\n * @param {RegExpMatchArray} matches\n * @returns {string|undefined}\n */\nfunction getParseError (parsed, matches) {\n if (matches[2] !== undefined && parsed.path && parsed.path[0] !== '/') {\n return 'URI path must start with \"/\" when authority is present.'\n }\n\n if (typeof parsed.port === 'number' && (parsed.port < 0 || parsed.port > 65535)) {\n return 'URI port is malformed.'\n }\n\n return undefined\n}\n\n/**\n * @param {string} uri\n * @param {import('./types/index').Options} [opts]\n * @returns {{ parsed: import('./types/index').URIComponent, malformedAuthorityOrPort: boolean }}\n */\nfunction parseWithStatus (uri, opts) {\n const options = Object.assign({}, opts)\n /** @type {import('./types/index').URIComponent} */\n const parsed = {\n scheme: undefined,\n userinfo: undefined,\n host: '',\n port: undefined,\n path: '',\n query: undefined,\n fragment: undefined\n }\n\n let malformedAuthorityOrPort = false\n\n let isIP = false\n if (options.reference === 'suffix') {\n if (options.scheme) {\n uri = options.scheme + ':' + uri\n } else {\n uri = '//' + uri\n }\n }\n\n const matches = uri.match(URI_PARSE)\n\n if (matches) {\n // store each component\n parsed.scheme = matches[1]\n parsed.userinfo = matches[3]\n parsed.host = matches[4]\n parsed.port = parseInt(matches[5], 10)\n parsed.path = matches[6] || ''\n parsed.query = matches[7]\n parsed.fragment = matches[8]\n\n // fix port number\n if (isNaN(parsed.port)) {\n parsed.port = matches[5]\n }\n\n const parseError = getParseError(parsed, matches)\n if (parseError !== undefined) {\n parsed.error = parsed.error || parseError\n malformedAuthorityOrPort = true\n }\n\n if (parsed.host) {\n const ipv4result = isIPv4(parsed.host)\n if (ipv4result === false) {\n const ipv6result = normalizeIPv6(parsed.host)\n parsed.host = ipv6result.host.toLowerCase()\n isIP = ipv6result.isIPV6\n } else {\n isIP = true\n }\n }\n if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && parsed.query === undefined && !parsed.path) {\n parsed.reference = 'same-document'\n } else if (parsed.scheme === undefined) {\n parsed.reference = 'relative'\n } else if (parsed.fragment === undefined) {\n parsed.reference = 'absolute'\n } else {\n parsed.reference = 'uri'\n }\n\n // check for reference errors\n if (options.reference && options.reference !== 'suffix' && options.reference !== parsed.reference) {\n parsed.error = parsed.error || 'URI is not a ' + options.reference + ' reference.'\n }\n\n // find scheme handler\n const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme)\n\n // check if scheme can't handle IRIs\n if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n // if host component is a domain name\n if (parsed.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost)) && isIP === false && nonSimpleDomain(parsed.host)) {\n // convert Unicode IDN -> ASCII IDN\n try {\n parsed.host = URL.domainToASCII(parsed.host.toLowerCase())\n } catch (e) {\n parsed.error = parsed.error || \"Host's domain name can not be converted to ASCII: \" + e\n }\n }\n // convert IRI -> URI\n }\n\n if (!schemeHandler || (schemeHandler && !schemeHandler.skipNormalize)) {\n if (uri.indexOf('%') !== -1) {\n if (parsed.scheme !== undefined) {\n parsed.scheme = unescape(parsed.scheme)\n }\n if (parsed.host !== undefined) {\n parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP)\n }\n }\n if (parsed.path) {\n parsed.path = normalizePathEncoding(parsed.path)\n }\n if (parsed.fragment) {\n try {\n parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment))\n } catch {\n parsed.error = parsed.error || 'URI malformed'\n }\n }\n }\n\n // perform scheme specific parsing\n if (schemeHandler && schemeHandler.parse) {\n schemeHandler.parse(parsed, options)\n }\n } else {\n parsed.error = parsed.error || 'URI can not be parsed.'\n }\n return { parsed, malformedAuthorityOrPort }\n}\n\n/**\n * @param {string} uri\n * @param {import('./types/index').Options} [opts]\n * @returns\n */\nfunction parse (uri, opts) {\n return parseWithStatus(uri, opts).parsed\n}\n\n/**\n * @param {string} uri\n * @param {import('./types/index').Options} [opts]\n * @returns {string}\n */\nfunction normalizeString (uri, opts) {\n return normalizeStringWithStatus(uri, opts).normalized\n}\n\n/**\n * @param {string} uri\n * @param {import('./types/index').Options} [opts]\n * @returns {{ normalized: string, malformedAuthorityOrPort: boolean }}\n */\nfunction normalizeStringWithStatus (uri, opts) {\n const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts)\n return {\n normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),\n malformedAuthorityOrPort\n }\n}\n\n/**\n * @param {import ('./types/index').URIComponent|string} uri\n * @param {import('./types/index').Options} [opts]\n * @returns {string|undefined}\n */\nfunction normalizeComparableURI (uri, opts) {\n if (typeof uri === 'string') {\n const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts)\n return malformedAuthorityOrPort ? undefined : normalized\n }\n\n if (typeof uri === 'object') {\n return serialize(uri, opts)\n }\n}\n\nconst fastUri = {\n SCHEMES,\n normalize,\n resolve,\n resolveComponent,\n equal,\n serialize,\n parse\n}\n\nmodule.exports = fastUri\nmodule.exports.default = fastUri\nmodule.exports.fastUri = fastUri\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst uri = require(\"fast-uri\");\nuri.code = 'require(\"ajv/dist/runtime/uri\").default';\nexports.default = uri;\n//# sourceMappingURL=uri.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;\nvar validate_1 = require(\"./compile/validate\");\nObject.defineProperty(exports, \"KeywordCxt\", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });\nvar codegen_1 = require(\"./compile/codegen\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return codegen_1._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return codegen_1.str; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return codegen_1.stringify; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return codegen_1.nil; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return codegen_1.Name; } });\nObject.defineProperty(exports, \"CodeGen\", { enumerable: true, get: function () { return codegen_1.CodeGen; } });\nconst validation_error_1 = require(\"./runtime/validation_error\");\nconst ref_error_1 = require(\"./compile/ref_error\");\nconst rules_1 = require(\"./compile/rules\");\nconst compile_1 = require(\"./compile\");\nconst codegen_2 = require(\"./compile/codegen\");\nconst resolve_1 = require(\"./compile/resolve\");\nconst dataType_1 = require(\"./compile/validate/dataType\");\nconst util_1 = require(\"./compile/util\");\nconst $dataRefSchema = require(\"./refs/data.json\");\nconst uri_1 = require(\"./runtime/uri\");\nconst defaultRegExp = (str, flags) => new RegExp(str, flags);\ndefaultRegExp.code = \"new RegExp\";\nconst META_IGNORE_OPTIONS = [\"removeAdditional\", \"useDefaults\", \"coerceTypes\"];\nconst EXT_SCOPE_NAMES = new Set([\n \"validate\",\n \"serialize\",\n \"parse\",\n \"wrapper\",\n \"root\",\n \"schema\",\n \"keyword\",\n \"pattern\",\n \"formats\",\n \"validate$data\",\n \"func\",\n \"obj\",\n \"Error\",\n]);\nconst removedOptions = {\n errorDataPath: \"\",\n format: \"`validateFormats: false` can be used instead.\",\n nullable: '\"nullable\" keyword is supported by default.',\n jsonPointers: \"Deprecated jsPropertySyntax can be used instead.\",\n extendRefs: \"Deprecated ignoreKeywordsWithRef can be used instead.\",\n missingRefs: \"Pass empty schema with $id that should be ignored to ajv.addSchema.\",\n processCode: \"Use option `code: {process: (code, schemaEnv: object) => string}`\",\n sourceCode: \"Use option `code: {source: true}`\",\n strictDefaults: \"It is default now, see option `strict`.\",\n strictKeywords: \"It is default now, see option `strict`.\",\n uniqueItems: '\"uniqueItems\" keyword is always validated.',\n unknownFormats: \"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).\",\n cache: \"Map is used as cache, schema object as key.\",\n serialize: \"Map is used as cache, schema object as key.\",\n ajvErrors: \"It is default now.\",\n};\nconst deprecatedOptions = {\n ignoreKeywordsWithRef: \"\",\n jsPropertySyntax: \"\",\n unicode: '\"minLength\"/\"maxLength\" account for unicode characters by default.',\n};\nconst MAX_EXPRESSION = 200;\n// eslint-disable-next-line complexity\nfunction requiredOptions(o) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;\n const s = o.strict;\n const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;\n const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0;\n const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;\n const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;\n return {\n strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,\n strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,\n strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : \"log\",\n strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : \"log\",\n strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,\n code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp },\n loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,\n loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,\n meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,\n messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,\n inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,\n schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : \"$id\",\n addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,\n validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,\n validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,\n unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,\n int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,\n uriResolver: uriResolver,\n };\n}\nclass Ajv {\n constructor(opts = {}) {\n this.schemas = {};\n this.refs = {};\n this.formats = Object.create(null);\n this._compilations = new Set();\n this._loading = {};\n this._cache = new Map();\n opts = this.opts = { ...opts, ...requiredOptions(opts) };\n const { es5, lines } = this.opts.code;\n this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines });\n this.logger = getLogger(opts.logger);\n const formatOpt = opts.validateFormats;\n opts.validateFormats = false;\n this.RULES = (0, rules_1.getRules)();\n checkOptions.call(this, removedOptions, opts, \"NOT SUPPORTED\");\n checkOptions.call(this, deprecatedOptions, opts, \"DEPRECATED\", \"warn\");\n this._metaOpts = getMetaSchemaOptions.call(this);\n if (opts.formats)\n addInitialFormats.call(this);\n this._addVocabularies();\n this._addDefaultMetaSchema();\n if (opts.keywords)\n addInitialKeywords.call(this, opts.keywords);\n if (typeof opts.meta == \"object\")\n this.addMetaSchema(opts.meta);\n addInitialSchemas.call(this);\n opts.validateFormats = formatOpt;\n }\n _addVocabularies() {\n this.addKeyword(\"$async\");\n }\n _addDefaultMetaSchema() {\n const { $data, meta, schemaId } = this.opts;\n let _dataRefSchema = $dataRefSchema;\n if (schemaId === \"id\") {\n _dataRefSchema = { ...$dataRefSchema };\n _dataRefSchema.id = _dataRefSchema.$id;\n delete _dataRefSchema.$id;\n }\n if (meta && $data)\n this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);\n }\n defaultMeta() {\n const { meta, schemaId } = this.opts;\n return (this.opts.defaultMeta = typeof meta == \"object\" ? meta[schemaId] || meta : undefined);\n }\n validate(schemaKeyRef, // key, ref or schema object\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n data // to be validated\n ) {\n let v;\n if (typeof schemaKeyRef == \"string\") {\n v = this.getSchema(schemaKeyRef);\n if (!v)\n throw new Error(`no schema with key or ref \"${schemaKeyRef}\"`);\n }\n else {\n v = this.compile(schemaKeyRef);\n }\n const valid = v(data);\n if (!(\"$async\" in v))\n this.errors = v.errors;\n return valid;\n }\n compile(schema, _meta) {\n const sch = this._addSchema(schema, _meta);\n return (sch.validate || this._compileSchemaEnv(sch));\n }\n compileAsync(schema, meta) {\n if (typeof this.opts.loadSchema != \"function\") {\n throw new Error(\"options.loadSchema should be a function\");\n }\n const { loadSchema } = this.opts;\n return runCompileAsync.call(this, schema, meta);\n async function runCompileAsync(_schema, _meta) {\n await loadMetaSchema.call(this, _schema.$schema);\n const sch = this._addSchema(_schema, _meta);\n return sch.validate || _compileAsync.call(this, sch);\n }\n async function loadMetaSchema($ref) {\n if ($ref && !this.getSchema($ref)) {\n await runCompileAsync.call(this, { $ref }, true);\n }\n }\n async function _compileAsync(sch) {\n try {\n return this._compileSchemaEnv(sch);\n }\n catch (e) {\n if (!(e instanceof ref_error_1.default))\n throw e;\n checkLoaded.call(this, e);\n await loadMissingSchema.call(this, e.missingSchema);\n return _compileAsync.call(this, sch);\n }\n }\n function checkLoaded({ missingSchema: ref, missingRef }) {\n if (this.refs[ref]) {\n throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);\n }\n }\n async function loadMissingSchema(ref) {\n const _schema = await _loadSchema.call(this, ref);\n if (!this.refs[ref])\n await loadMetaSchema.call(this, _schema.$schema);\n if (!this.refs[ref])\n this.addSchema(_schema, ref, meta);\n }\n async function _loadSchema(ref) {\n const p = this._loading[ref];\n if (p)\n return p;\n try {\n return await (this._loading[ref] = loadSchema(ref));\n }\n finally {\n delete this._loading[ref];\n }\n }\n }\n // Adds schema to the instance\n addSchema(schema, // If array is passed, `key` will be ignored\n key, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n _meta, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n _validateSchema = this.opts.validateSchema // false to skip schema validation. Used internally, option validateSchema should be used instead.\n ) {\n if (Array.isArray(schema)) {\n for (const sch of schema)\n this.addSchema(sch, undefined, _meta, _validateSchema);\n return this;\n }\n let id;\n if (typeof schema === \"object\") {\n const { schemaId } = this.opts;\n id = schema[schemaId];\n if (id !== undefined && typeof id != \"string\") {\n throw new Error(`schema ${schemaId} must be string`);\n }\n }\n key = (0, resolve_1.normalizeId)(key || id);\n this._checkUnique(key);\n this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);\n return this;\n }\n // Add schema that will be used to validate other schemas\n // options in META_IGNORE_OPTIONS are alway set to false\n addMetaSchema(schema, key, // schema key\n _validateSchema = this.opts.validateSchema // false to skip schema validation, can be used to override validateSchema option for meta-schema\n ) {\n this.addSchema(schema, key, true, _validateSchema);\n return this;\n }\n // Validate schema against its meta-schema\n validateSchema(schema, throwOrLogError) {\n if (typeof schema == \"boolean\")\n return true;\n let $schema;\n $schema = schema.$schema;\n if ($schema !== undefined && typeof $schema != \"string\") {\n throw new Error(\"$schema must be a string\");\n }\n $schema = $schema || this.opts.defaultMeta || this.defaultMeta();\n if (!$schema) {\n this.logger.warn(\"meta-schema not available\");\n this.errors = null;\n return true;\n }\n const valid = this.validate($schema, schema);\n if (!valid && throwOrLogError) {\n const message = \"schema is invalid: \" + this.errorsText();\n if (this.opts.validateSchema === \"log\")\n this.logger.error(message);\n else\n throw new Error(message);\n }\n return valid;\n }\n // Get compiled schema by `key` or `ref`.\n // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)\n getSchema(keyRef) {\n let sch;\n while (typeof (sch = getSchEnv.call(this, keyRef)) == \"string\")\n keyRef = sch;\n if (sch === undefined) {\n const { schemaId } = this.opts;\n const root = new compile_1.SchemaEnv({ schema: {}, schemaId });\n sch = compile_1.resolveSchema.call(this, root, keyRef);\n if (!sch)\n return;\n this.refs[keyRef] = sch;\n }\n return (sch.validate || this._compileSchemaEnv(sch));\n }\n // Remove cached schema(s).\n // If no parameter is passed all schemas but meta-schemas are removed.\n // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.\n // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.\n removeSchema(schemaKeyRef) {\n if (schemaKeyRef instanceof RegExp) {\n this._removeAllSchemas(this.schemas, schemaKeyRef);\n this._removeAllSchemas(this.refs, schemaKeyRef);\n return this;\n }\n switch (typeof schemaKeyRef) {\n case \"undefined\":\n this._removeAllSchemas(this.schemas);\n this._removeAllSchemas(this.refs);\n this._cache.clear();\n return this;\n case \"string\": {\n const sch = getSchEnv.call(this, schemaKeyRef);\n if (typeof sch == \"object\")\n this._cache.delete(sch.schema);\n delete this.schemas[schemaKeyRef];\n delete this.refs[schemaKeyRef];\n return this;\n }\n case \"object\": {\n const cacheKey = schemaKeyRef;\n this._cache.delete(cacheKey);\n let id = schemaKeyRef[this.opts.schemaId];\n if (id) {\n id = (0, resolve_1.normalizeId)(id);\n delete this.schemas[id];\n delete this.refs[id];\n }\n return this;\n }\n default:\n throw new Error(\"ajv.removeSchema: invalid parameter\");\n }\n }\n // add \"vocabulary\" - a collection of keywords\n addVocabulary(definitions) {\n for (const def of definitions)\n this.addKeyword(def);\n return this;\n }\n addKeyword(kwdOrDef, def // deprecated\n ) {\n let keyword;\n if (typeof kwdOrDef == \"string\") {\n keyword = kwdOrDef;\n if (typeof def == \"object\") {\n this.logger.warn(\"these parameters are deprecated, see docs for addKeyword\");\n def.keyword = keyword;\n }\n }\n else if (typeof kwdOrDef == \"object\" && def === undefined) {\n def = kwdOrDef;\n keyword = def.keyword;\n if (Array.isArray(keyword) && !keyword.length) {\n throw new Error(\"addKeywords: keyword must be string or non-empty array\");\n }\n }\n else {\n throw new Error(\"invalid addKeywords parameters\");\n }\n checkKeyword.call(this, keyword, def);\n if (!def) {\n (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));\n return this;\n }\n keywordMetaschema.call(this, def);\n const definition = {\n ...def,\n type: (0, dataType_1.getJSONTypes)(def.type),\n schemaType: (0, dataType_1.getJSONTypes)(def.schemaType),\n };\n (0, util_1.eachItem)(keyword, definition.type.length === 0\n ? (k) => addRule.call(this, k, definition)\n : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));\n return this;\n }\n getKeyword(keyword) {\n const rule = this.RULES.all[keyword];\n return typeof rule == \"object\" ? rule.definition : !!rule;\n }\n // Remove keyword\n removeKeyword(keyword) {\n // TODO return type should be Ajv\n const { RULES } = this;\n delete RULES.keywords[keyword];\n delete RULES.all[keyword];\n for (const group of RULES.rules) {\n const i = group.rules.findIndex((rule) => rule.keyword === keyword);\n if (i >= 0)\n group.rules.splice(i, 1);\n }\n return this;\n }\n // Add format\n addFormat(name, format) {\n if (typeof format == \"string\")\n format = new RegExp(format);\n this.formats[name] = format;\n return this;\n }\n errorsText(errors = this.errors, // optional array of validation errors\n { separator = \", \", dataVar = \"data\" } = {} // optional options with properties `separator` and `dataVar`\n ) {\n if (!errors || errors.length === 0)\n return \"No errors\";\n return errors\n .map((e) => `${dataVar}${e.instancePath} ${e.message}`)\n .reduce((text, msg) => text + separator + msg);\n }\n $dataMetaSchema(metaSchema, keywordsJsonPointers) {\n const rules = this.RULES.all;\n metaSchema = JSON.parse(JSON.stringify(metaSchema));\n for (const jsonPointer of keywordsJsonPointers) {\n const segments = jsonPointer.split(\"/\").slice(1); // first segment is an empty string\n let keywords = metaSchema;\n for (const seg of segments)\n keywords = keywords[seg];\n for (const key in rules) {\n const rule = rules[key];\n if (typeof rule != \"object\")\n continue;\n const { $data } = rule.definition;\n const schema = keywords[key];\n if ($data && schema)\n keywords[key] = schemaOrData(schema);\n }\n }\n return metaSchema;\n }\n _removeAllSchemas(schemas, regex) {\n for (const keyRef in schemas) {\n const sch = schemas[keyRef];\n if (!regex || regex.test(keyRef)) {\n if (typeof sch == \"string\") {\n delete schemas[keyRef];\n }\n else if (sch && !sch.meta) {\n this._cache.delete(sch.schema);\n delete schemas[keyRef];\n }\n }\n }\n }\n _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {\n let id;\n const { schemaId } = this.opts;\n if (typeof schema == \"object\") {\n id = schema[schemaId];\n }\n else {\n if (this.opts.jtd)\n throw new Error(\"schema must be object\");\n else if (typeof schema != \"boolean\")\n throw new Error(\"schema must be object or boolean\");\n }\n let sch = this._cache.get(schema);\n if (sch !== undefined)\n return sch;\n baseId = (0, resolve_1.normalizeId)(id || baseId);\n const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);\n sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });\n this._cache.set(sch.schema, sch);\n if (addSchema && !baseId.startsWith(\"#\")) {\n // TODO atm it is allowed to overwrite schemas without id (instead of not adding them)\n if (baseId)\n this._checkUnique(baseId);\n this.refs[baseId] = sch;\n }\n if (validateSchema)\n this.validateSchema(schema, true);\n return sch;\n }\n _checkUnique(id) {\n if (this.schemas[id] || this.refs[id]) {\n throw new Error(`schema with key or id \"${id}\" already exists`);\n }\n }\n _compileSchemaEnv(sch) {\n if (sch.meta)\n this._compileMetaSchema(sch);\n else\n compile_1.compileSchema.call(this, sch);\n /* istanbul ignore if */\n if (!sch.validate)\n throw new Error(\"ajv implementation error\");\n return sch.validate;\n }\n _compileMetaSchema(sch) {\n const currentOpts = this.opts;\n this.opts = this._metaOpts;\n try {\n compile_1.compileSchema.call(this, sch);\n }\n finally {\n this.opts = currentOpts;\n }\n }\n}\nAjv.ValidationError = validation_error_1.default;\nAjv.MissingRefError = ref_error_1.default;\nexports.default = Ajv;\nfunction checkOptions(checkOpts, options, msg, log = \"error\") {\n for (const key in checkOpts) {\n const opt = key;\n if (opt in options)\n this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);\n }\n}\nfunction getSchEnv(keyRef) {\n keyRef = (0, resolve_1.normalizeId)(keyRef); // TODO tests fail without this line\n return this.schemas[keyRef] || this.refs[keyRef];\n}\nfunction addInitialSchemas() {\n const optsSchemas = this.opts.schemas;\n if (!optsSchemas)\n return;\n if (Array.isArray(optsSchemas))\n this.addSchema(optsSchemas);\n else\n for (const key in optsSchemas)\n this.addSchema(optsSchemas[key], key);\n}\nfunction addInitialFormats() {\n for (const name in this.opts.formats) {\n const format = this.opts.formats[name];\n if (format)\n this.addFormat(name, format);\n }\n}\nfunction addInitialKeywords(defs) {\n if (Array.isArray(defs)) {\n this.addVocabulary(defs);\n return;\n }\n this.logger.warn(\"keywords option as map is deprecated, pass array\");\n for (const keyword in defs) {\n const def = defs[keyword];\n if (!def.keyword)\n def.keyword = keyword;\n this.addKeyword(def);\n }\n}\nfunction getMetaSchemaOptions() {\n const metaOpts = { ...this.opts };\n for (const opt of META_IGNORE_OPTIONS)\n delete metaOpts[opt];\n return metaOpts;\n}\nconst noLogs = { log() { }, warn() { }, error() { } };\nfunction getLogger(logger) {\n if (logger === false)\n return noLogs;\n if (logger === undefined)\n return console;\n if (logger.log && logger.warn && logger.error)\n return logger;\n throw new Error(\"logger must implement log, warn and error methods\");\n}\nconst KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;\nfunction checkKeyword(keyword, def) {\n const { RULES } = this;\n (0, util_1.eachItem)(keyword, (kwd) => {\n if (RULES.keywords[kwd])\n throw new Error(`Keyword ${kwd} is already defined`);\n if (!KEYWORD_NAME.test(kwd))\n throw new Error(`Keyword ${kwd} has invalid name`);\n });\n if (!def)\n return;\n if (def.$data && !(\"code\" in def || \"validate\" in def)) {\n throw new Error('$data keyword must have \"code\" or \"validate\" function');\n }\n}\nfunction addRule(keyword, definition, dataType) {\n var _a;\n const post = definition === null || definition === void 0 ? void 0 : definition.post;\n if (dataType && post)\n throw new Error('keyword with \"post\" flag cannot have \"type\"');\n const { RULES } = this;\n let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);\n if (!ruleGroup) {\n ruleGroup = { type: dataType, rules: [] };\n RULES.rules.push(ruleGroup);\n }\n RULES.keywords[keyword] = true;\n if (!definition)\n return;\n const rule = {\n keyword,\n definition: {\n ...definition,\n type: (0, dataType_1.getJSONTypes)(definition.type),\n schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType),\n },\n };\n if (definition.before)\n addBeforeRule.call(this, ruleGroup, rule, definition.before);\n else\n ruleGroup.rules.push(rule);\n RULES.all[keyword] = rule;\n (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));\n}\nfunction addBeforeRule(ruleGroup, rule, before) {\n const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);\n if (i >= 0) {\n ruleGroup.rules.splice(i, 0, rule);\n }\n else {\n ruleGroup.rules.push(rule);\n this.logger.warn(`rule ${before} is not defined`);\n }\n}\nfunction keywordMetaschema(def) {\n let { metaSchema } = def;\n if (metaSchema === undefined)\n return;\n if (def.$data && this.opts.$data)\n metaSchema = schemaOrData(metaSchema);\n def.validateSchema = this.compile(metaSchema, true);\n}\nconst $dataRef = {\n $ref: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n};\nfunction schemaOrData(schema) {\n return { anyOf: [schema, $dataRef] };\n}\n//# sourceMappingURL=core.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst def = {\n keyword: \"id\",\n code() {\n throw new Error('NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID');\n },\n};\nexports.default = def;\n//# sourceMappingURL=id.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callRef = exports.getValidate = void 0;\nconst ref_error_1 = require(\"../../compile/ref_error\");\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst compile_1 = require(\"../../compile\");\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"$ref\",\n schemaType: \"string\",\n code(cxt) {\n const { gen, schema: $ref, it } = cxt;\n const { baseId, schemaEnv: env, validateName, opts, self } = it;\n const { root } = env;\n if (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId)\n return callRootRef();\n const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);\n if (schOrEnv === undefined)\n throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);\n if (schOrEnv instanceof compile_1.SchemaEnv)\n return callValidate(schOrEnv);\n return inlineRefSchema(schOrEnv);\n function callRootRef() {\n if (env === root)\n return callRef(cxt, validateName, env, env.$async);\n const rootName = gen.scopeValue(\"root\", { ref: root });\n return callRef(cxt, (0, codegen_1._) `${rootName}.validate`, root, root.$async);\n }\n function callValidate(sch) {\n const v = getValidate(cxt, sch);\n callRef(cxt, v, sch, sch.$async);\n }\n function inlineRefSchema(sch) {\n const schName = gen.scopeValue(\"schema\", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });\n const valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({\n schema: sch,\n dataTypes: [],\n schemaPath: codegen_1.nil,\n topSchemaRef: schName,\n errSchemaPath: $ref,\n }, valid);\n cxt.mergeEvaluated(schCxt);\n cxt.ok(valid);\n }\n },\n};\nfunction getValidate(cxt, sch) {\n const { gen } = cxt;\n return sch.validate\n ? gen.scopeValue(\"validate\", { ref: sch.validate })\n : (0, codegen_1._) `${gen.scopeValue(\"wrapper\", { ref: sch })}.validate`;\n}\nexports.getValidate = getValidate;\nfunction callRef(cxt, v, sch, $async) {\n const { gen, it } = cxt;\n const { allErrors, schemaEnv: env, opts } = it;\n const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;\n if ($async)\n callAsyncRef();\n else\n callSyncRef();\n function callAsyncRef() {\n if (!env.$async)\n throw new Error(\"async schema referenced by sync schema\");\n const valid = gen.let(\"valid\");\n gen.try(() => {\n gen.code((0, codegen_1._) `await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);\n addEvaluatedFrom(v); // TODO will not work with async, it has to be returned with the result\n if (!allErrors)\n gen.assign(valid, true);\n }, (e) => {\n gen.if((0, codegen_1._) `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));\n addErrorsFrom(e);\n if (!allErrors)\n gen.assign(valid, false);\n });\n cxt.ok(valid);\n }\n function callSyncRef() {\n cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));\n }\n function addErrorsFrom(source) {\n const errs = (0, codegen_1._) `${source}.errors`;\n gen.assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); // TODO tagged\n gen.assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);\n }\n function addEvaluatedFrom(source) {\n var _a;\n if (!it.opts.unevaluated)\n return;\n const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;\n // TODO refactor\n if (it.props !== true) {\n if (schEvaluated && !schEvaluated.dynamicProps) {\n if (schEvaluated.props !== undefined) {\n it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);\n }\n }\n else {\n const props = gen.var(\"props\", (0, codegen_1._) `${source}.evaluated.props`);\n it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);\n }\n }\n if (it.items !== true) {\n if (schEvaluated && !schEvaluated.dynamicItems) {\n if (schEvaluated.items !== undefined) {\n it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);\n }\n }\n else {\n const items = gen.var(\"items\", (0, codegen_1._) `${source}.evaluated.items`);\n it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);\n }\n }\n }\n}\nexports.callRef = callRef;\nexports.default = def;\n//# sourceMappingURL=ref.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst id_1 = require(\"./id\");\nconst ref_1 = require(\"./ref\");\nconst core = [\n \"$schema\",\n \"$id\",\n \"$defs\",\n \"$vocabulary\",\n { keyword: \"$comment\" },\n \"definitions\",\n id_1.default,\n ref_1.default,\n];\nexports.default = core;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst ops = codegen_1.operators;\nconst KWDs = {\n maximum: { okStr: \"<=\", ok: ops.LTE, fail: ops.GT },\n minimum: { okStr: \">=\", ok: ops.GTE, fail: ops.LT },\n exclusiveMaximum: { okStr: \"<\", ok: ops.LT, fail: ops.GTE },\n exclusiveMinimum: { okStr: \">\", ok: ops.GT, fail: ops.LTE },\n};\nconst error = {\n message: ({ keyword, schemaCode }) => (0, codegen_1.str) `must be ${KWDs[keyword].okStr} ${schemaCode}`,\n params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n cxt.fail$data((0, codegen_1._) `${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitNumber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must be multiple of ${schemaCode}`,\n params: ({ schemaCode }) => (0, codegen_1._) `{multipleOf: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"multipleOf\",\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, schemaCode, it } = cxt;\n // const bdt = bad$DataType(schemaCode, <string>def.schemaType, $data)\n const prec = it.opts.multipleOfPrecision;\n const res = gen.let(\"res\");\n const invalid = prec\n ? (0, codegen_1._) `Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`\n : (0, codegen_1._) `${res} !== parseInt(${res})`;\n cxt.fail$data((0, codegen_1._) `(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=multipleOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// https://mathiasbynens.be/notes/javascript-encoding\n// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode\nfunction ucs2length(str) {\n const len = str.length;\n let length = 0;\n let pos = 0;\n let value;\n while (pos < len) {\n length++;\n value = str.charCodeAt(pos++);\n if (value >= 0xd800 && value <= 0xdbff && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos);\n if ((value & 0xfc00) === 0xdc00)\n pos++; // low surrogate\n }\n }\n return length;\n}\nexports.default = ucs2length;\nucs2length.code = 'require(\"ajv/dist/runtime/ucs2length\").default';\n//# sourceMappingURL=ucs2length.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst ucs2length_1 = require(\"../../runtime/ucs2length\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxLength\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} characters`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxLength\", \"minLength\"],\n type: \"string\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode, it } = cxt;\n const op = keyword === \"maxLength\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n const len = it.opts.unicode === false ? (0, codegen_1._) `${data}.length` : (0, codegen_1._) `${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;\n cxt.fail$data((0, codegen_1._) `${len} ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitLength.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst util_1 = require(\"../../compile/util\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must match pattern \"${schemaCode}\"`,\n params: ({ schemaCode }) => (0, codegen_1._) `{pattern: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"pattern\",\n type: \"string\",\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schema, schemaCode, it } = cxt;\n const u = it.opts.unicodeRegExp ? \"u\" : \"\";\n if ($data) {\n const { regExp } = it.opts.code;\n const regExpCode = regExp.code === \"new RegExp\" ? (0, codegen_1._) `new RegExp` : (0, util_1.useFunc)(gen, regExp);\n const valid = gen.let(\"valid\");\n gen.try(() => gen.assign(valid, (0, codegen_1._) `${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));\n cxt.fail$data((0, codegen_1._) `!${valid}`);\n }\n else {\n const regExp = (0, code_1.usePattern)(cxt, schema);\n cxt.fail$data((0, codegen_1._) `!${regExp}.test(${data})`);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=pattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxProperties\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} properties`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxProperties\", \"minProperties\"],\n type: \"object\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n const op = keyword === \"maxProperties\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n cxt.fail$data((0, codegen_1._) `Object.keys(${data}).length ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { missingProperty } }) => (0, codegen_1.str) `must have required property '${missingProperty}'`,\n params: ({ params: { missingProperty } }) => (0, codegen_1._) `{missingProperty: ${missingProperty}}`,\n};\nconst def = {\n keyword: \"required\",\n type: \"object\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt) {\n const { gen, schema, schemaCode, data, $data, it } = cxt;\n const { opts } = it;\n if (!$data && schema.length === 0)\n return;\n const useLoop = schema.length >= opts.loopRequired;\n if (it.allErrors)\n allErrorsMode();\n else\n exitOnErrorMode();\n if (opts.strictRequired) {\n const props = cxt.parentSchema.properties;\n const { definedProperties } = cxt.it;\n for (const requiredKey of schema) {\n if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n const msg = `required property \"${requiredKey}\" is not defined at \"${schemaPath}\" (strictRequired)`;\n (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);\n }\n }\n }\n function allErrorsMode() {\n if (useLoop || $data) {\n cxt.block$data(codegen_1.nil, loopAllRequired);\n }\n else {\n for (const prop of schema) {\n (0, code_1.checkReportMissingProp)(cxt, prop);\n }\n }\n }\n function exitOnErrorMode() {\n const missing = gen.let(\"missing\");\n if (useLoop || $data) {\n const valid = gen.let(\"valid\", true);\n cxt.block$data(valid, () => loopUntilMissing(missing, valid));\n cxt.ok(valid);\n }\n else {\n gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));\n (0, code_1.reportMissingProp)(cxt, missing);\n gen.else();\n }\n }\n function loopAllRequired() {\n gen.forOf(\"prop\", schemaCode, (prop) => {\n cxt.setParams({ missingProperty: prop });\n gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());\n });\n }\n function loopUntilMissing(missing, valid) {\n cxt.setParams({ missingProperty: missing });\n gen.forOf(missing, schemaCode, () => {\n gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.error();\n gen.break();\n });\n }, codegen_1.nil);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=required.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxItems\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} items`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxItems\", \"minItems\"],\n type: \"array\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n const op = keyword === \"maxItems\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n cxt.fail$data((0, codegen_1._) `${data}.length ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// https://github.com/ajv-validator/ajv/issues/889\nconst equal = require(\"fast-deep-equal\");\nequal.code = 'require(\"ajv/dist/runtime/equal\").default';\nexports.default = equal;\n//# sourceMappingURL=equal.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dataType_1 = require(\"../../compile/validate/dataType\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: ({ params: { i, j } }) => (0, codegen_1.str) `must NOT have duplicate items (items ## ${j} and ${i} are identical)`,\n params: ({ params: { i, j } }) => (0, codegen_1._) `{i: ${i}, j: ${j}}`,\n};\nconst def = {\n keyword: \"uniqueItems\",\n type: \"array\",\n schemaType: \"boolean\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;\n if (!$data && !schema)\n return;\n const valid = gen.let(\"valid\");\n const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];\n cxt.block$data(valid, validateUniqueItems, (0, codegen_1._) `${schemaCode} === false`);\n cxt.ok(valid);\n function validateUniqueItems() {\n const i = gen.let(\"i\", (0, codegen_1._) `${data}.length`);\n const j = gen.let(\"j\");\n cxt.setParams({ i, j });\n gen.assign(valid, true);\n gen.if((0, codegen_1._) `${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));\n }\n function canOptimize() {\n return itemTypes.length > 0 && !itemTypes.some((t) => t === \"object\" || t === \"array\");\n }\n function loopN(i, j) {\n const item = gen.name(\"item\");\n const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);\n const indices = gen.const(\"indices\", (0, codegen_1._) `{}`);\n gen.for((0, codegen_1._) `;${i}--;`, () => {\n gen.let(item, (0, codegen_1._) `${data}[${i}]`);\n gen.if(wrongType, (0, codegen_1._) `continue`);\n if (itemTypes.length > 1)\n gen.if((0, codegen_1._) `typeof ${item} == \"string\"`, (0, codegen_1._) `${item} += \"_\"`);\n gen\n .if((0, codegen_1._) `typeof ${indices}[${item}] == \"number\"`, () => {\n gen.assign(j, (0, codegen_1._) `${indices}[${item}]`);\n cxt.error();\n gen.assign(valid, false).break();\n })\n .code((0, codegen_1._) `${indices}[${item}] = ${i}`);\n });\n }\n function loopN2(i, j) {\n const eql = (0, util_1.useFunc)(gen, equal_1.default);\n const outer = gen.name(\"outer\");\n gen.label(outer).for((0, codegen_1._) `;${i}--;`, () => gen.for((0, codegen_1._) `${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._) `${eql}(${data}[${i}], ${data}[${j}])`, () => {\n cxt.error();\n gen.assign(valid, false).break(outer);\n })));\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=uniqueItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: \"must be equal to constant\",\n params: ({ schemaCode }) => (0, codegen_1._) `{allowedValue: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"const\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schemaCode, schema } = cxt;\n if ($data || (schema && typeof schema == \"object\")) {\n cxt.fail$data((0, codegen_1._) `!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);\n }\n else {\n cxt.fail((0, codegen_1._) `${schema} !== ${data}`);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=const.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: \"must be equal to one of the allowed values\",\n params: ({ schemaCode }) => (0, codegen_1._) `{allowedValues: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"enum\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schema, schemaCode, it } = cxt;\n if (!$data && schema.length === 0)\n throw new Error(\"enum must have non-empty array\");\n const useLoop = schema.length >= it.opts.loopEnum;\n let eql;\n const getEql = () => (eql !== null && eql !== void 0 ? eql : (eql = (0, util_1.useFunc)(gen, equal_1.default)));\n let valid;\n if (useLoop || $data) {\n valid = gen.let(\"valid\");\n cxt.block$data(valid, loopEnum);\n }\n else {\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const vSchema = gen.const(\"vSchema\", schemaCode);\n valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));\n }\n cxt.pass(valid);\n function loopEnum() {\n gen.assign(valid, false);\n gen.forOf(\"v\", schemaCode, (v) => gen.if((0, codegen_1._) `${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));\n }\n function equalCode(vSchema, i) {\n const sch = schema[i];\n return typeof sch === \"object\" && sch !== null\n ? (0, codegen_1._) `${getEql()}(${data}, ${vSchema}[${i}])`\n : (0, codegen_1._) `${data} === ${sch}`;\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=enum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst limitNumber_1 = require(\"./limitNumber\");\nconst multipleOf_1 = require(\"./multipleOf\");\nconst limitLength_1 = require(\"./limitLength\");\nconst pattern_1 = require(\"./pattern\");\nconst limitProperties_1 = require(\"./limitProperties\");\nconst required_1 = require(\"./required\");\nconst limitItems_1 = require(\"./limitItems\");\nconst uniqueItems_1 = require(\"./uniqueItems\");\nconst const_1 = require(\"./const\");\nconst enum_1 = require(\"./enum\");\nconst validation = [\n // number\n limitNumber_1.default,\n multipleOf_1.default,\n // string\n limitLength_1.default,\n pattern_1.default,\n // object\n limitProperties_1.default,\n required_1.default,\n // array\n limitItems_1.default,\n uniqueItems_1.default,\n // any\n { keyword: \"type\", schemaType: [\"string\", \"array\"] },\n { keyword: \"nullable\", schemaType: \"boolean\" },\n const_1.default,\n enum_1.default,\n];\nexports.default = validation;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateAdditionalItems = void 0;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`,\n};\nconst def = {\n keyword: \"additionalItems\",\n type: \"array\",\n schemaType: [\"boolean\", \"object\"],\n before: \"uniqueItems\",\n error,\n code(cxt) {\n const { parentSchema, it } = cxt;\n const { items } = parentSchema;\n if (!Array.isArray(items)) {\n (0, util_1.checkStrictMode)(it, '\"additionalItems\" is ignored when \"items\" is not an array of schemas');\n return;\n }\n validateAdditionalItems(cxt, items);\n },\n};\nfunction validateAdditionalItems(cxt, items) {\n const { gen, schema, data, keyword, it } = cxt;\n it.items = true;\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n if (schema === false) {\n cxt.setParams({ len: items.length });\n cxt.pass((0, codegen_1._) `${len} <= ${items.length}`);\n }\n else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen.var(\"valid\", (0, codegen_1._) `${len} <= ${items.length}`); // TODO var\n gen.if((0, codegen_1.not)(valid), () => validateItems(valid));\n cxt.ok(valid);\n }\n function validateItems(valid) {\n gen.forRange(\"i\", items.length, len, (i) => {\n cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid);\n if (!it.allErrors)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n });\n }\n}\nexports.validateAdditionalItems = validateAdditionalItems;\nexports.default = def;\n//# sourceMappingURL=additionalItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateTuple = void 0;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nconst def = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"array\", \"boolean\"],\n before: \"uniqueItems\",\n code(cxt) {\n const { schema, it } = cxt;\n if (Array.isArray(schema))\n return validateTuple(cxt, \"additionalItems\", schema);\n it.items = true;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n cxt.ok((0, code_1.validateArray)(cxt));\n },\n};\nfunction validateTuple(cxt, extraItems, schArr = cxt.schema) {\n const { gen, parentSchema, data, keyword, it } = cxt;\n checkStrictTuple(parentSchema);\n if (it.opts.unevaluated && schArr.length && it.items !== true) {\n it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);\n }\n const valid = gen.name(\"valid\");\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n schArr.forEach((sch, i) => {\n if ((0, util_1.alwaysValidSchema)(it, sch))\n return;\n gen.if((0, codegen_1._) `${len} > ${i}`, () => cxt.subschema({\n keyword,\n schemaProp: i,\n dataProp: i,\n }, valid));\n cxt.ok(valid);\n });\n function checkStrictTuple(sch) {\n const { opts, errSchemaPath } = it;\n const l = schArr.length;\n const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);\n if (opts.strictTuples && !fullTuple) {\n const msg = `\"${keyword}\" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path \"${errSchemaPath}\"`;\n (0, util_1.checkStrictMode)(it, msg, opts.strictTuples);\n }\n }\n}\nexports.validateTuple = validateTuple;\nexports.default = def;\n//# sourceMappingURL=items.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst items_1 = require(\"./items\");\nconst def = {\n keyword: \"prefixItems\",\n type: \"array\",\n schemaType: [\"array\"],\n before: \"uniqueItems\",\n code: (cxt) => (0, items_1.validateTuple)(cxt, \"items\"),\n};\nexports.default = def;\n//# sourceMappingURL=prefixItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nconst additionalItems_1 = require(\"./additionalItems\");\nconst error = {\n message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`,\n};\nconst def = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n error,\n code(cxt) {\n const { schema, parentSchema, it } = cxt;\n const { prefixItems } = parentSchema;\n it.items = true;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n if (prefixItems)\n (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);\n else\n cxt.ok((0, code_1.validateArray)(cxt));\n },\n};\nexports.default = def;\n//# sourceMappingURL=items2020.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { min, max } }) => max === undefined\n ? (0, codegen_1.str) `must contain at least ${min} valid item(s)`\n : (0, codegen_1.str) `must contain at least ${min} and no more than ${max} valid item(s)`,\n params: ({ params: { min, max } }) => max === undefined ? (0, codegen_1._) `{minContains: ${min}}` : (0, codegen_1._) `{minContains: ${min}, maxContains: ${max}}`,\n};\nconst def = {\n keyword: \"contains\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, data, it } = cxt;\n let min;\n let max;\n const { minContains, maxContains } = parentSchema;\n if (it.opts.next) {\n min = minContains === undefined ? 1 : minContains;\n max = maxContains;\n }\n else {\n min = 1;\n }\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n cxt.setParams({ min, max });\n if (max === undefined && min === 0) {\n (0, util_1.checkStrictMode)(it, `\"minContains\" == 0 without \"maxContains\": \"contains\" keyword ignored`);\n return;\n }\n if (max !== undefined && min > max) {\n (0, util_1.checkStrictMode)(it, `\"minContains\" > \"maxContains\" is always invalid`);\n cxt.fail();\n return;\n }\n if ((0, util_1.alwaysValidSchema)(it, schema)) {\n let cond = (0, codegen_1._) `${len} >= ${min}`;\n if (max !== undefined)\n cond = (0, codegen_1._) `${cond} && ${len} <= ${max}`;\n cxt.pass(cond);\n return;\n }\n it.items = true;\n const valid = gen.name(\"valid\");\n if (max === undefined && min === 1) {\n validateItems(valid, () => gen.if(valid, () => gen.break()));\n }\n else if (min === 0) {\n gen.let(valid, true);\n if (max !== undefined)\n gen.if((0, codegen_1._) `${data}.length > 0`, validateItemsWithCount);\n }\n else {\n gen.let(valid, false);\n validateItemsWithCount();\n }\n cxt.result(valid, () => cxt.reset());\n function validateItemsWithCount() {\n const schValid = gen.name(\"_valid\");\n const count = gen.let(\"count\", 0);\n validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));\n }\n function validateItems(_valid, block) {\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema({\n keyword: \"contains\",\n dataProp: i,\n dataPropType: util_1.Type.Num,\n compositeRule: true,\n }, _valid);\n block();\n });\n }\n function checkLimits(count) {\n gen.code((0, codegen_1._) `${count}++`);\n if (max === undefined) {\n gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true).break());\n }\n else {\n gen.if((0, codegen_1._) `${count} > ${max}`, () => gen.assign(valid, false).break());\n if (min === 1)\n gen.assign(valid, true);\n else\n gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true));\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=contains.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nexports.error = {\n message: ({ params: { property, depsCount, deps } }) => {\n const property_ies = depsCount === 1 ? \"property\" : \"properties\";\n return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`;\n },\n params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._) `{property: ${property},\n missingProperty: ${missingProperty},\n depsCount: ${depsCount},\n deps: ${deps}}`, // TODO change to reference\n};\nconst def = {\n keyword: \"dependencies\",\n type: \"object\",\n schemaType: \"object\",\n error: exports.error,\n code(cxt) {\n const [propDeps, schDeps] = splitDependencies(cxt);\n validatePropertyDeps(cxt, propDeps);\n validateSchemaDeps(cxt, schDeps);\n },\n};\nfunction splitDependencies({ schema }) {\n const propertyDeps = {};\n const schemaDeps = {};\n for (const key in schema) {\n if (key === \"__proto__\")\n continue;\n const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;\n deps[key] = schema[key];\n }\n return [propertyDeps, schemaDeps];\n}\nfunction validatePropertyDeps(cxt, propertyDeps = cxt.schema) {\n const { gen, data, it } = cxt;\n if (Object.keys(propertyDeps).length === 0)\n return;\n const missing = gen.let(\"missing\");\n for (const prop in propertyDeps) {\n const deps = propertyDeps[prop];\n if (deps.length === 0)\n continue;\n const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties);\n cxt.setParams({\n property: prop,\n depsCount: deps.length,\n deps: deps.join(\", \"),\n });\n if (it.allErrors) {\n gen.if(hasProperty, () => {\n for (const depProp of deps) {\n (0, code_1.checkReportMissingProp)(cxt, depProp);\n }\n });\n }\n else {\n gen.if((0, codegen_1._) `${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);\n (0, code_1.reportMissingProp)(cxt, missing);\n gen.else();\n }\n }\n}\nexports.validatePropertyDeps = validatePropertyDeps;\nfunction validateSchemaDeps(cxt, schemaDeps = cxt.schema) {\n const { gen, data, keyword, it } = cxt;\n const valid = gen.name(\"valid\");\n for (const prop in schemaDeps) {\n if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))\n continue;\n gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => {\n const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid);\n cxt.mergeValidEvaluated(schCxt, valid);\n }, () => gen.var(valid, true) // TODO var\n );\n cxt.ok(valid);\n }\n}\nexports.validateSchemaDeps = validateSchemaDeps;\nexports.default = def;\n//# sourceMappingURL=dependencies.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"property name must be valid\",\n params: ({ params }) => (0, codegen_1._) `{propertyName: ${params.propertyName}}`,\n};\nconst def = {\n keyword: \"propertyNames\",\n type: \"object\",\n schemaType: [\"object\", \"boolean\"],\n error,\n code(cxt) {\n const { gen, schema, data, it } = cxt;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n const valid = gen.name(\"valid\");\n gen.forIn(\"key\", data, (key) => {\n cxt.setParams({ propertyName: key });\n cxt.subschema({\n keyword: \"propertyNames\",\n data: key,\n dataTypes: [\"string\"],\n propertyName: key,\n compositeRule: true,\n }, valid);\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.error(true);\n if (!it.allErrors)\n gen.break();\n });\n });\n cxt.ok(valid);\n },\n};\nexports.default = def;\n//# sourceMappingURL=propertyNames.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"must NOT have additional properties\",\n params: ({ params }) => (0, codegen_1._) `{additionalProperty: ${params.additionalProperty}}`,\n};\nconst def = {\n keyword: \"additionalProperties\",\n type: [\"object\"],\n schemaType: [\"boolean\", \"object\"],\n allowUndefined: true,\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, data, errsCount, it } = cxt;\n /* istanbul ignore if */\n if (!errsCount)\n throw new Error(\"ajv implementation error\");\n const { allErrors, opts } = it;\n it.props = true;\n if (opts.removeAdditional !== \"all\" && (0, util_1.alwaysValidSchema)(it, schema))\n return;\n const props = (0, code_1.allSchemaProperties)(parentSchema.properties);\n const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);\n checkAdditionalProperties();\n cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);\n function checkAdditionalProperties() {\n gen.forIn(\"key\", data, (key) => {\n if (!props.length && !patProps.length)\n additionalPropertyCode(key);\n else\n gen.if(isAdditional(key), () => additionalPropertyCode(key));\n });\n }\n function isAdditional(key) {\n let definedProp;\n if (props.length > 8) {\n // TODO maybe an option instead of hard-coded 8?\n const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, \"properties\");\n definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);\n }\n else if (props.length) {\n definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._) `${key} === ${p}`));\n }\n else {\n definedProp = codegen_1.nil;\n }\n if (patProps.length) {\n definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._) `${(0, code_1.usePattern)(cxt, p)}.test(${key})`));\n }\n return (0, codegen_1.not)(definedProp);\n }\n function deleteAdditional(key) {\n gen.code((0, codegen_1._) `delete ${data}[${key}]`);\n }\n function additionalPropertyCode(key) {\n if (opts.removeAdditional === \"all\" || (opts.removeAdditional && schema === false)) {\n deleteAdditional(key);\n return;\n }\n if (schema === false) {\n cxt.setParams({ additionalProperty: key });\n cxt.error();\n if (!allErrors)\n gen.break();\n return;\n }\n if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen.name(\"valid\");\n if (opts.removeAdditional === \"failing\") {\n applyAdditionalSchema(key, valid, false);\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.reset();\n deleteAdditional(key);\n });\n }\n else {\n applyAdditionalSchema(key, valid);\n if (!allErrors)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n }\n }\n }\n function applyAdditionalSchema(key, valid, errors) {\n const subschema = {\n keyword: \"additionalProperties\",\n dataProp: key,\n dataPropType: util_1.Type.Str,\n };\n if (errors === false) {\n Object.assign(subschema, {\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n });\n }\n cxt.subschema(subschema, valid);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=additionalProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst validate_1 = require(\"../../compile/validate\");\nconst code_1 = require(\"../code\");\nconst util_1 = require(\"../../compile/util\");\nconst additionalProperties_1 = require(\"./additionalProperties\");\nconst def = {\n keyword: \"properties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt) {\n const { gen, schema, parentSchema, data, it } = cxt;\n if (it.opts.removeAdditional === \"all\" && parentSchema.additionalProperties === undefined) {\n additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, \"additionalProperties\"));\n }\n const allProps = (0, code_1.allSchemaProperties)(schema);\n for (const prop of allProps) {\n it.definedProperties.add(prop);\n }\n if (it.opts.unevaluated && allProps.length && it.props !== true) {\n it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);\n }\n const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));\n if (properties.length === 0)\n return;\n const valid = gen.name(\"valid\");\n for (const prop of properties) {\n if (hasDefault(prop)) {\n applyPropertySchema(prop);\n }\n else {\n gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));\n applyPropertySchema(prop);\n if (!it.allErrors)\n gen.else().var(valid, true);\n gen.endIf();\n }\n cxt.it.definedProperties.add(prop);\n cxt.ok(valid);\n }\n function hasDefault(prop) {\n return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined;\n }\n function applyPropertySchema(prop) {\n cxt.subschema({\n keyword: \"properties\",\n schemaProp: prop,\n dataProp: prop,\n }, valid);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=properties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst util_2 = require(\"../../compile/util\");\nconst def = {\n keyword: \"patternProperties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt) {\n const { gen, schema, data, parentSchema, it } = cxt;\n const { opts } = it;\n const patterns = (0, code_1.allSchemaProperties)(schema);\n const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));\n if (patterns.length === 0 ||\n (alwaysValidPatterns.length === patterns.length &&\n (!it.opts.unevaluated || it.props === true))) {\n return;\n }\n const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;\n const valid = gen.name(\"valid\");\n if (it.props !== true && !(it.props instanceof codegen_1.Name)) {\n it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);\n }\n const { props } = it;\n validatePatternProperties();\n function validatePatternProperties() {\n for (const pat of patterns) {\n if (checkProperties)\n checkMatchingProperties(pat);\n if (it.allErrors) {\n validateProperties(pat);\n }\n else {\n gen.var(valid, true); // TODO var\n validateProperties(pat);\n gen.if(valid);\n }\n }\n }\n function checkMatchingProperties(pat) {\n for (const prop in checkProperties) {\n if (new RegExp(pat).test(prop)) {\n (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);\n }\n }\n }\n function validateProperties(pat) {\n gen.forIn(\"key\", data, (key) => {\n gen.if((0, codegen_1._) `${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {\n const alwaysValid = alwaysValidPatterns.includes(pat);\n if (!alwaysValid) {\n cxt.subschema({\n keyword: \"patternProperties\",\n schemaProp: pat,\n dataProp: key,\n dataPropType: util_2.Type.Str,\n }, valid);\n }\n if (it.opts.unevaluated && props !== true) {\n gen.assign((0, codegen_1._) `${props}[${key}]`, true);\n }\n else if (!alwaysValid && !it.allErrors) {\n // can short-circuit if `unevaluatedProperties` is not supported (opts.next === false)\n // or if all properties were evaluated (props === true)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n }\n });\n });\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=patternProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"not\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n code(cxt) {\n const { gen, schema, it } = cxt;\n if ((0, util_1.alwaysValidSchema)(it, schema)) {\n cxt.fail();\n return;\n }\n const valid = gen.name(\"valid\");\n cxt.subschema({\n keyword: \"not\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n }, valid);\n cxt.failResult(valid, () => cxt.reset(), () => cxt.error());\n },\n error: { message: \"must NOT be valid\" },\n};\nexports.default = def;\n//# sourceMappingURL=not.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst def = {\n keyword: \"anyOf\",\n schemaType: \"array\",\n trackErrors: true,\n code: code_1.validateUnion,\n error: { message: \"must match a schema in anyOf\" },\n};\nexports.default = def;\n//# sourceMappingURL=anyOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"must match exactly one schema in oneOf\",\n params: ({ params }) => (0, codegen_1._) `{passingSchemas: ${params.passing}}`,\n};\nconst def = {\n keyword: \"oneOf\",\n schemaType: \"array\",\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n if (it.opts.discriminator && parentSchema.discriminator)\n return;\n const schArr = schema;\n const valid = gen.let(\"valid\", false);\n const passing = gen.let(\"passing\", null);\n const schValid = gen.name(\"_valid\");\n cxt.setParams({ passing });\n // TODO possibly fail straight away (with warning or exception) if there are two empty always valid schemas\n gen.block(validateOneOf);\n cxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n function validateOneOf() {\n schArr.forEach((sch, i) => {\n let schCxt;\n if ((0, util_1.alwaysValidSchema)(it, sch)) {\n gen.var(schValid, true);\n }\n else {\n schCxt = cxt.subschema({\n keyword: \"oneOf\",\n schemaProp: i,\n compositeRule: true,\n }, schValid);\n }\n if (i > 0) {\n gen\n .if((0, codegen_1._) `${schValid} && ${valid}`)\n .assign(valid, false)\n .assign(passing, (0, codegen_1._) `[${passing}, ${i}]`)\n .else();\n }\n gen.if(schValid, () => {\n gen.assign(valid, true);\n gen.assign(passing, i);\n if (schCxt)\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n });\n });\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=oneOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"allOf\",\n schemaType: \"array\",\n code(cxt) {\n const { gen, schema, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const valid = gen.name(\"valid\");\n schema.forEach((sch, i) => {\n if ((0, util_1.alwaysValidSchema)(it, sch))\n return;\n const schCxt = cxt.subschema({ keyword: \"allOf\", schemaProp: i }, valid);\n cxt.ok(valid);\n cxt.mergeEvaluated(schCxt);\n });\n },\n};\nexports.default = def;\n//# sourceMappingURL=allOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params }) => (0, codegen_1.str) `must match \"${params.ifClause}\" schema`,\n params: ({ params }) => (0, codegen_1._) `{failingKeyword: ${params.ifClause}}`,\n};\nconst def = {\n keyword: \"if\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, parentSchema, it } = cxt;\n if (parentSchema.then === undefined && parentSchema.else === undefined) {\n (0, util_1.checkStrictMode)(it, '\"if\" without \"then\" and \"else\" is ignored');\n }\n const hasThen = hasSchema(it, \"then\");\n const hasElse = hasSchema(it, \"else\");\n if (!hasThen && !hasElse)\n return;\n const valid = gen.let(\"valid\", true);\n const schValid = gen.name(\"_valid\");\n validateIf();\n cxt.reset();\n if (hasThen && hasElse) {\n const ifClause = gen.let(\"ifClause\");\n cxt.setParams({ ifClause });\n gen.if(schValid, validateClause(\"then\", ifClause), validateClause(\"else\", ifClause));\n }\n else if (hasThen) {\n gen.if(schValid, validateClause(\"then\"));\n }\n else {\n gen.if((0, codegen_1.not)(schValid), validateClause(\"else\"));\n }\n cxt.pass(valid, () => cxt.error(true));\n function validateIf() {\n const schCxt = cxt.subschema({\n keyword: \"if\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n }, schValid);\n cxt.mergeEvaluated(schCxt);\n }\n function validateClause(keyword, ifClause) {\n return () => {\n const schCxt = cxt.subschema({ keyword }, schValid);\n gen.assign(valid, schValid);\n cxt.mergeValidEvaluated(schCxt, valid);\n if (ifClause)\n gen.assign(ifClause, (0, codegen_1._) `${keyword}`);\n else\n cxt.setParams({ ifClause: keyword });\n };\n }\n },\n};\nfunction hasSchema(it, keyword) {\n const schema = it.schema[keyword];\n return schema !== undefined && !(0, util_1.alwaysValidSchema)(it, schema);\n}\nexports.default = def;\n//# sourceMappingURL=if.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: [\"then\", \"else\"],\n schemaType: [\"object\", \"boolean\"],\n code({ keyword, parentSchema, it }) {\n if (parentSchema.if === undefined)\n (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"if\" is ignored`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=thenElse.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst additionalItems_1 = require(\"./additionalItems\");\nconst prefixItems_1 = require(\"./prefixItems\");\nconst items_1 = require(\"./items\");\nconst items2020_1 = require(\"./items2020\");\nconst contains_1 = require(\"./contains\");\nconst dependencies_1 = require(\"./dependencies\");\nconst propertyNames_1 = require(\"./propertyNames\");\nconst additionalProperties_1 = require(\"./additionalProperties\");\nconst properties_1 = require(\"./properties\");\nconst patternProperties_1 = require(\"./patternProperties\");\nconst not_1 = require(\"./not\");\nconst anyOf_1 = require(\"./anyOf\");\nconst oneOf_1 = require(\"./oneOf\");\nconst allOf_1 = require(\"./allOf\");\nconst if_1 = require(\"./if\");\nconst thenElse_1 = require(\"./thenElse\");\nfunction getApplicator(draft2020 = false) {\n const applicator = [\n // any\n not_1.default,\n anyOf_1.default,\n oneOf_1.default,\n allOf_1.default,\n if_1.default,\n thenElse_1.default,\n // object\n propertyNames_1.default,\n additionalProperties_1.default,\n dependencies_1.default,\n properties_1.default,\n patternProperties_1.default,\n ];\n // array\n if (draft2020)\n applicator.push(prefixItems_1.default, items2020_1.default);\n else\n applicator.push(additionalItems_1.default, items_1.default);\n applicator.push(contains_1.default);\n return applicator;\n}\nexports.default = getApplicator;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must match format \"${schemaCode}\"`,\n params: ({ schemaCode }) => (0, codegen_1._) `{format: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"format\",\n type: [\"number\", \"string\"],\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt, ruleType) {\n const { gen, data, $data, schema, schemaCode, it } = cxt;\n const { opts, errSchemaPath, schemaEnv, self } = it;\n if (!opts.validateFormats)\n return;\n if ($data)\n validate$DataFormat();\n else\n validateFormat();\n function validate$DataFormat() {\n const fmts = gen.scopeValue(\"formats\", {\n ref: self.formats,\n code: opts.code.formats,\n });\n const fDef = gen.const(\"fDef\", (0, codegen_1._) `${fmts}[${schemaCode}]`);\n const fType = gen.let(\"fType\");\n const format = gen.let(\"format\");\n // TODO simplify\n gen.if((0, codegen_1._) `typeof ${fDef} == \"object\" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._) `${fDef}.type || \"string\"`).assign(format, (0, codegen_1._) `${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._) `\"string\"`).assign(format, fDef));\n cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));\n function unknownFmt() {\n if (opts.strictSchema === false)\n return codegen_1.nil;\n return (0, codegen_1._) `${schemaCode} && !${format}`;\n }\n function invalidFmt() {\n const callFormat = schemaEnv.$async\n ? (0, codegen_1._) `(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))`\n : (0, codegen_1._) `${format}(${data})`;\n const validData = (0, codegen_1._) `(typeof ${format} == \"function\" ? ${callFormat} : ${format}.test(${data}))`;\n return (0, codegen_1._) `${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;\n }\n }\n function validateFormat() {\n const formatDef = self.formats[schema];\n if (!formatDef) {\n unknownFormat();\n return;\n }\n if (formatDef === true)\n return;\n const [fmtType, format, fmtRef] = getFormat(formatDef);\n if (fmtType === ruleType)\n cxt.pass(validCondition());\n function unknownFormat() {\n if (opts.strictSchema === false) {\n self.logger.warn(unknownMsg());\n return;\n }\n throw new Error(unknownMsg());\n function unknownMsg() {\n return `unknown format \"${schema}\" ignored in schema at path \"${errSchemaPath}\"`;\n }\n }\n function getFormat(fmtDef) {\n const code = fmtDef instanceof RegExp\n ? (0, codegen_1.regexpCode)(fmtDef)\n : opts.code.formats\n ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(schema)}`\n : undefined;\n const fmt = gen.scopeValue(\"formats\", { key: schema, ref: fmtDef, code });\n if (typeof fmtDef == \"object\" && !(fmtDef instanceof RegExp)) {\n return [fmtDef.type || \"string\", fmtDef.validate, (0, codegen_1._) `${fmt}.validate`];\n }\n return [\"string\", fmtDef, fmt];\n }\n function validCondition() {\n if (typeof formatDef == \"object\" && !(formatDef instanceof RegExp) && formatDef.async) {\n if (!schemaEnv.$async)\n throw new Error(\"async format in sync schema\");\n return (0, codegen_1._) `await ${fmtRef}(${data})`;\n }\n return typeof format == \"function\" ? (0, codegen_1._) `${fmtRef}(${data})` : (0, codegen_1._) `${fmtRef}.test(${data})`;\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=format.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst format_1 = require(\"./format\");\nconst format = [format_1.default];\nexports.default = format;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.contentVocabulary = exports.metadataVocabulary = void 0;\nexports.metadataVocabulary = [\n \"title\",\n \"description\",\n \"default\",\n \"deprecated\",\n \"readOnly\",\n \"writeOnly\",\n \"examples\",\n];\nexports.contentVocabulary = [\n \"contentMediaType\",\n \"contentEncoding\",\n \"contentSchema\",\n];\n//# sourceMappingURL=metadata.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core_1 = require(\"./core\");\nconst validation_1 = require(\"./validation\");\nconst applicator_1 = require(\"./applicator\");\nconst format_1 = require(\"./format\");\nconst metadata_1 = require(\"./metadata\");\nconst draft7Vocabularies = [\n core_1.default,\n validation_1.default,\n (0, applicator_1.default)(),\n format_1.default,\n metadata_1.metadataVocabulary,\n metadata_1.contentVocabulary,\n];\nexports.default = draft7Vocabularies;\n//# sourceMappingURL=draft7.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiscrError = void 0;\nvar DiscrError;\n(function (DiscrError) {\n DiscrError[\"Tag\"] = \"tag\";\n DiscrError[\"Mapping\"] = \"mapping\";\n})(DiscrError || (exports.DiscrError = DiscrError = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst types_1 = require(\"../discriminator/types\");\nconst compile_1 = require(\"../../compile\");\nconst ref_error_1 = require(\"../../compile/ref_error\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag\n ? `tag \"${tagName}\" must be string`\n : `value of tag \"${tagName}\" must be in oneOf`,\n params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._) `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,\n};\nconst def = {\n keyword: \"discriminator\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt) {\n const { gen, data, schema, parentSchema, it } = cxt;\n const { oneOf } = parentSchema;\n if (!it.opts.discriminator) {\n throw new Error(\"discriminator: requires discriminator option\");\n }\n const tagName = schema.propertyName;\n if (typeof tagName != \"string\")\n throw new Error(\"discriminator: requires propertyName\");\n if (schema.mapping)\n throw new Error(\"discriminator: mapping is not supported\");\n if (!oneOf)\n throw new Error(\"discriminator: requires oneOf keyword\");\n const valid = gen.let(\"valid\", false);\n const tag = gen.const(\"tag\", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(tagName)}`);\n gen.if((0, codegen_1._) `typeof ${tag} == \"string\"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));\n cxt.ok(valid);\n function validateMapping() {\n const mapping = getMapping();\n gen.if(false);\n for (const tagValue in mapping) {\n gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);\n gen.assign(valid, applyTagSchema(mapping[tagValue]));\n }\n gen.else();\n cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });\n gen.endIf();\n }\n function applyTagSchema(schemaProp) {\n const _valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({ keyword: \"oneOf\", schemaProp }, _valid);\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n return _valid;\n }\n function getMapping() {\n var _a;\n const oneOfMapping = {};\n const topRequired = hasRequired(parentSchema);\n let tagRequired = true;\n for (let i = 0; i < oneOf.length; i++) {\n let sch = oneOf[i];\n if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {\n const ref = sch.$ref;\n sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);\n if (sch instanceof compile_1.SchemaEnv)\n sch = sch.schema;\n if (sch === undefined)\n throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);\n }\n const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];\n if (typeof propSch != \"object\") {\n throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have \"properties/${tagName}\"`);\n }\n tagRequired = tagRequired && (topRequired || hasRequired(sch));\n addMappings(propSch, i);\n }\n if (!tagRequired)\n throw new Error(`discriminator: \"${tagName}\" must be required`);\n return oneOfMapping;\n function hasRequired({ required }) {\n return Array.isArray(required) && required.includes(tagName);\n }\n function addMappings(sch, i) {\n if (sch.const) {\n addMapping(sch.const, i);\n }\n else if (sch.enum) {\n for (const tagValue of sch.enum) {\n addMapping(tagValue, i);\n }\n }\n else {\n throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`);\n }\n }\n function addMapping(tagValue, i) {\n if (typeof tagValue != \"string\" || tagValue in oneOfMapping) {\n throw new Error(`discriminator: \"${tagName}\" values must be unique strings`);\n }\n oneOfMapping[tagValue] = i;\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=index.js.map","","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;\nconst core_1 = require(\"./core\");\nconst draft7_1 = require(\"./vocabularies/draft7\");\nconst discriminator_1 = require(\"./vocabularies/discriminator\");\nconst draft7MetaSchema = require(\"./refs/json-schema-draft-07.json\");\nconst META_SUPPORT_DATA = [\"/properties\"];\nconst META_SCHEMA_ID = \"http://json-schema.org/draft-07/schema\";\nclass Ajv extends core_1.default {\n _addVocabularies() {\n super._addVocabularies();\n draft7_1.default.forEach((v) => this.addVocabulary(v));\n if (this.opts.discriminator)\n this.addKeyword(discriminator_1.default);\n }\n _addDefaultMetaSchema() {\n super._addDefaultMetaSchema();\n if (!this.opts.meta)\n return;\n const metaSchema = this.opts.$data\n ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA)\n : draft7MetaSchema;\n this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);\n this.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n }\n defaultMeta() {\n return (this.opts.defaultMeta =\n super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));\n }\n}\nexports.Ajv = Ajv;\nmodule.exports = exports = Ajv;\nmodule.exports.Ajv = Ajv;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = Ajv;\nvar validate_1 = require(\"./compile/validate\");\nObject.defineProperty(exports, \"KeywordCxt\", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });\nvar codegen_1 = require(\"./compile/codegen\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return codegen_1._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return codegen_1.str; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return codegen_1.stringify; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return codegen_1.nil; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return codegen_1.Name; } });\nObject.defineProperty(exports, \"CodeGen\", { enumerable: true, get: function () { return codegen_1.CodeGen; } });\nvar validation_error_1 = require(\"./runtime/validation_error\");\nObject.defineProperty(exports, \"ValidationError\", { enumerable: true, get: function () { return validation_error_1.default; } });\nvar ref_error_1 = require(\"./compile/ref_error\");\nObject.defineProperty(exports, \"MissingRefError\", { enumerable: true, get: function () { return ref_error_1.default; } });\n//# sourceMappingURL=ajv.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatNames = exports.fastFormats = exports.fullFormats = void 0;\nfunction fmtDef(validate, compare) {\n return { validate, compare };\n}\nexports.fullFormats = {\n // date: http://tools.ietf.org/html/rfc3339#section-5.6\n date: fmtDef(date, compareDate),\n // date-time: http://tools.ietf.org/html/rfc3339#section-5.6\n time: fmtDef(getTime(true), compareTime),\n \"date-time\": fmtDef(getDateTime(true), compareDateTime),\n \"iso-time\": fmtDef(getTime(), compareIsoTime),\n \"iso-date-time\": fmtDef(getDateTime(), compareIsoDateTime),\n // duration: https://tools.ietf.org/html/rfc3339#appendix-A\n duration: /^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$/,\n uri,\n \"uri-reference\": /^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'\"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,\n // uri-template: https://tools.ietf.org/html/rfc6570\n \"uri-template\": /^(?:(?:[^\\x00-\\x20\"'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,\n // For the source: https://gist.github.com/dperini/729294\n // For test cases: https://mathiasbynens.be/demo/url-regex\n url: /^(?:https?|ftp):\\/\\/(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,\n email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,\n hostname: /^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,\n // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html\n ipv4: /^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/,\n ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,\n regex,\n // uuid: http://tools.ietf.org/html/rfc4122\n uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,\n // JSON-pointer: https://tools.ietf.org/html/rfc6901\n // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A\n \"json-pointer\": /^(?:\\/(?:[^~/]|~0|~1)*)*$/,\n \"json-pointer-uri-fragment\": /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,\n // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00\n \"relative-json-pointer\": /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,\n // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types\n // byte: https://github.com/miguelmota/is-base64\n byte,\n // signed 32 bit integer\n int32: { type: \"number\", validate: validateInt32 },\n // signed 64 bit integer\n int64: { type: \"number\", validate: validateInt64 },\n // C-type float\n float: { type: \"number\", validate: validateNumber },\n // C-type double\n double: { type: \"number\", validate: validateNumber },\n // hint to the UI to hide input strings\n password: true,\n // unchecked string payload\n binary: true,\n};\nexports.fastFormats = {\n ...exports.fullFormats,\n date: fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/, compareDate),\n time: fmtDef(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i, compareTime),\n \"date-time\": fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\dt(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i, compareDateTime),\n \"iso-time\": fmtDef(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i, compareIsoTime),\n \"iso-date-time\": fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d[t\\s](?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i, compareIsoDateTime),\n // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js\n uri: /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/)?[^\\s]*$/i,\n \"uri-reference\": /^(?:(?:[a-z][a-z0-9+\\-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,\n // email (sources from jsen validator):\n // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363\n // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')\n email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,\n};\nexports.formatNames = Object.keys(exports.fullFormats);\nfunction isLeapYear(year) {\n // https://tools.ietf.org/html/rfc3339#appendix-C\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\nconst DATE = /^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/;\nconst DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nfunction date(str) {\n // full-date from http://tools.ietf.org/html/rfc3339#section-5.6\n const matches = DATE.exec(str);\n if (!matches)\n return false;\n const year = +matches[1];\n const month = +matches[2];\n const day = +matches[3];\n return (month >= 1 &&\n month <= 12 &&\n day >= 1 &&\n day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]));\n}\nfunction compareDate(d1, d2) {\n if (!(d1 && d2))\n return undefined;\n if (d1 > d2)\n return 1;\n if (d1 < d2)\n return -1;\n return 0;\n}\nconst TIME = /^(\\d\\d):(\\d\\d):(\\d\\d(?:\\.\\d+)?)(z|([+-])(\\d\\d)(?::?(\\d\\d))?)?$/i;\nfunction getTime(strictTimeZone) {\n return function time(str) {\n const matches = TIME.exec(str);\n if (!matches)\n return false;\n const hr = +matches[1];\n const min = +matches[2];\n const sec = +matches[3];\n const tz = matches[4];\n const tzSign = matches[5] === \"-\" ? -1 : 1;\n const tzH = +(matches[6] || 0);\n const tzM = +(matches[7] || 0);\n if (tzH > 23 || tzM > 59 || (strictTimeZone && !tz))\n return false;\n if (hr <= 23 && min <= 59 && sec < 60)\n return true;\n // leap second\n const utcMin = min - tzM * tzSign;\n const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);\n return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;\n };\n}\nfunction compareTime(s1, s2) {\n if (!(s1 && s2))\n return undefined;\n const t1 = new Date(\"2020-01-01T\" + s1).valueOf();\n const t2 = new Date(\"2020-01-01T\" + s2).valueOf();\n if (!(t1 && t2))\n return undefined;\n return t1 - t2;\n}\nfunction compareIsoTime(t1, t2) {\n if (!(t1 && t2))\n return undefined;\n const a1 = TIME.exec(t1);\n const a2 = TIME.exec(t2);\n if (!(a1 && a2))\n return undefined;\n t1 = a1[1] + a1[2] + a1[3];\n t2 = a2[1] + a2[2] + a2[3];\n if (t1 > t2)\n return 1;\n if (t1 < t2)\n return -1;\n return 0;\n}\nconst DATE_TIME_SEPARATOR = /t|\\s/i;\nfunction getDateTime(strictTimeZone) {\n const time = getTime(strictTimeZone);\n return function date_time(str) {\n // http://tools.ietf.org/html/rfc3339#section-5.6\n const dateTime = str.split(DATE_TIME_SEPARATOR);\n return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);\n };\n}\nfunction compareDateTime(dt1, dt2) {\n if (!(dt1 && dt2))\n return undefined;\n const d1 = new Date(dt1).valueOf();\n const d2 = new Date(dt2).valueOf();\n if (!(d1 && d2))\n return undefined;\n return d1 - d2;\n}\nfunction compareIsoDateTime(dt1, dt2) {\n if (!(dt1 && dt2))\n return undefined;\n const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);\n const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);\n const res = compareDate(d1, d2);\n if (res === undefined)\n return undefined;\n return res || compareTime(t1, t2);\n}\nconst NOT_URI_FRAGMENT = /\\/|:/;\nconst URI = /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\nfunction uri(str) {\n // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n return NOT_URI_FRAGMENT.test(str) && URI.test(str);\n}\nconst BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;\nfunction byte(str) {\n BYTE.lastIndex = 0;\n return BYTE.test(str);\n}\nconst MIN_INT32 = -(2 ** 31);\nconst MAX_INT32 = 2 ** 31 - 1;\nfunction validateInt32(value) {\n return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;\n}\nfunction validateInt64(value) {\n // JSON and javascript max Int is 2**53, so any int that passes isInteger is valid for Int64\n return Number.isInteger(value);\n}\nfunction validateNumber() {\n return true;\n}\nconst Z_ANCHOR = /[^\\\\]\\\\Z/;\nfunction regex(str) {\n if (Z_ANCHOR.test(str))\n return false;\n try {\n new RegExp(str);\n return true;\n }\n catch (e) {\n return false;\n }\n}\n//# sourceMappingURL=formats.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatLimitDefinition = void 0;\nconst ajv_1 = require(\"ajv\");\nconst codegen_1 = require(\"ajv/dist/compile/codegen\");\nconst ops = codegen_1.operators;\nconst KWDs = {\n formatMaximum: { okStr: \"<=\", ok: ops.LTE, fail: ops.GT },\n formatMinimum: { okStr: \">=\", ok: ops.GTE, fail: ops.LT },\n formatExclusiveMaximum: { okStr: \"<\", ok: ops.LT, fail: ops.GTE },\n formatExclusiveMinimum: { okStr: \">\", ok: ops.GT, fail: ops.LTE },\n};\nconst error = {\n message: ({ keyword, schemaCode }) => (0, codegen_1.str) `should be ${KWDs[keyword].okStr} ${schemaCode}`,\n params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,\n};\nexports.formatLimitDefinition = {\n keyword: Object.keys(KWDs),\n type: \"string\",\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, schemaCode, keyword, it } = cxt;\n const { opts, self } = it;\n if (!opts.validateFormats)\n return;\n const fCxt = new ajv_1.KeywordCxt(it, self.RULES.all.format.definition, \"format\");\n if (fCxt.$data)\n validate$DataFormat();\n else\n validateFormat();\n function validate$DataFormat() {\n const fmts = gen.scopeValue(\"formats\", {\n ref: self.formats,\n code: opts.code.formats,\n });\n const fmt = gen.const(\"fmt\", (0, codegen_1._) `${fmts}[${fCxt.schemaCode}]`);\n cxt.fail$data((0, codegen_1.or)((0, codegen_1._) `typeof ${fmt} != \"object\"`, (0, codegen_1._) `${fmt} instanceof RegExp`, (0, codegen_1._) `typeof ${fmt}.compare != \"function\"`, compareCode(fmt)));\n }\n function validateFormat() {\n const format = fCxt.schema;\n const fmtDef = self.formats[format];\n if (!fmtDef || fmtDef === true)\n return;\n if (typeof fmtDef != \"object\" ||\n fmtDef instanceof RegExp ||\n typeof fmtDef.compare != \"function\") {\n throw new Error(`\"${keyword}\": format \"${format}\" does not define \"compare\" function`);\n }\n const fmt = gen.scopeValue(\"formats\", {\n key: format,\n ref: fmtDef,\n code: opts.code.formats ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : undefined,\n });\n cxt.fail$data(compareCode(fmt));\n }\n function compareCode(fmt) {\n return (0, codegen_1._) `${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;\n }\n },\n dependencies: [\"format\"],\n};\nconst formatLimitPlugin = (ajv) => {\n ajv.addKeyword(exports.formatLimitDefinition);\n return ajv;\n};\nexports.default = formatLimitPlugin;\n//# sourceMappingURL=limit.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst formats_1 = require(\"./formats\");\nconst limit_1 = require(\"./limit\");\nconst codegen_1 = require(\"ajv/dist/compile/codegen\");\nconst fullName = new codegen_1.Name(\"fullFormats\");\nconst fastName = new codegen_1.Name(\"fastFormats\");\nconst formatsPlugin = (ajv, opts = { keywords: true }) => {\n if (Array.isArray(opts)) {\n addFormats(ajv, opts, formats_1.fullFormats, fullName);\n return ajv;\n }\n const [formats, exportName] = opts.mode === \"fast\" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];\n const list = opts.formats || formats_1.formatNames;\n addFormats(ajv, list, formats, exportName);\n if (opts.keywords)\n (0, limit_1.default)(ajv);\n return ajv;\n};\nformatsPlugin.get = (name, mode = \"full\") => {\n const formats = mode === \"fast\" ? formats_1.fastFormats : formats_1.fullFormats;\n const f = formats[name];\n if (!f)\n throw new Error(`Unknown format \"${name}\"`);\n return f;\n};\nfunction addFormats(ajv, list, fs, exportName) {\n var _a;\n var _b;\n (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : (_b.formats = (0, codegen_1._) `require(\"ajv-formats/dist/formats\").${exportName}`);\n for (const f of list)\n ajv.addFormat(f, fs[f]);\n}\nmodule.exports = exports = formatsPlugin;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = formatsPlugin;\n//# sourceMappingURL=index.js.map","/**\n * AJV-based JSON Schema validator provider\n */\nimport Ajv from 'ajv';\nimport _addFormats from 'ajv-formats';\nfunction createDefaultAjvInstance() {\n const ajv = new Ajv({\n strict: false,\n validateFormats: true,\n validateSchema: false,\n allErrors: true\n });\n const addFormats = _addFormats;\n addFormats(ajv);\n return ajv;\n}\n/**\n * @example\n * ```typescript\n * // Use with default AJV instance (recommended)\n * import { AjvJsonSchemaValidator } from '@modelcontextprotocol/sdk/validation/ajv';\n * const validator = new AjvJsonSchemaValidator();\n *\n * // Use with custom AJV instance\n * import { Ajv } from 'ajv';\n * const ajv = new Ajv({ strict: true, allErrors: true });\n * const validator = new AjvJsonSchemaValidator(ajv);\n * ```\n */\nexport class AjvJsonSchemaValidator {\n /**\n * Create an AJV validator\n *\n * @param ajv - Optional pre-configured AJV instance. If not provided, a default instance will be created.\n *\n * @example\n * ```typescript\n * // Use default configuration (recommended for most cases)\n * import { AjvJsonSchemaValidator } from '@modelcontextprotocol/sdk/validation/ajv';\n * const validator = new AjvJsonSchemaValidator();\n *\n * // Or provide custom AJV instance for advanced configuration\n * import { Ajv } from 'ajv';\n * import addFormats from 'ajv-formats';\n *\n * const ajv = new Ajv({ validateFormats: true });\n * addFormats(ajv);\n * const validator = new AjvJsonSchemaValidator(ajv);\n * ```\n */\n constructor(ajv) {\n this._ajv = ajv ?? createDefaultAjvInstance();\n }\n /**\n * Create a validator for the given JSON Schema\n *\n * The validator is compiled once and can be reused multiple times.\n * If the schema has an $id, it will be cached by AJV automatically.\n *\n * @param schema - Standard JSON Schema object\n * @returns A validator function that validates input data\n */\n getValidator(schema) {\n // Check if schema has $id and is already compiled/cached\n const ajvValidator = '$id' in schema && typeof schema.$id === 'string'\n ? (this._ajv.getSchema(schema.$id) ?? this._ajv.compile(schema))\n : this._ajv.compile(schema);\n return (input) => {\n const valid = ajvValidator(input);\n if (valid) {\n return {\n valid: true,\n data: input,\n errorMessage: undefined\n };\n }\n else {\n return {\n valid: false,\n data: undefined,\n errorMessage: this._ajv.errorsText(ajvValidator.errors)\n };\n }\n };\n }\n}\n//# sourceMappingURL=ajv-provider.js.map","let crypto;\ncrypto =\n globalThis.crypto?.webcrypto ?? // Node.js [18-16] REPL\n globalThis.crypto ?? // Node.js >18\n import(\"node:crypto\").then(m => m.webcrypto); // Node.js <18 Non-REPL\n/**\n * Creates an array of length `size` of random bytes\n * @param size\n * @returns Array of random ints (0 to 255)\n */\nasync function getRandomValues(size) {\n return (await crypto).getRandomValues(new Uint8Array(size));\n}\n/** Generate cryptographically strong random string\n * @param size The desired length of the string\n * @returns The random string\n */\nasync function random(size) {\n const mask = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~\";\n const evenDistCutoff = Math.pow(2, 8) - Math.pow(2, 8) % mask.length;\n let result = \"\";\n while (result.length < size) {\n const randomBytes = await getRandomValues(size - result.length);\n for (const randomByte of randomBytes) {\n if (randomByte < evenDistCutoff) {\n result += mask[randomByte % mask.length];\n }\n }\n }\n return result;\n}\n/** Generate a PKCE challenge verifier\n * @param length Length of the verifier\n * @returns A random verifier `length` characters long\n */\nasync function generateVerifier(length) {\n return await random(length);\n}\n/** Generate a PKCE code challenge from a code verifier\n * @param code_verifier\n * @returns The base64 url encoded code challenge\n */\nexport async function generateChallenge(code_verifier) {\n const buffer = await (await crypto).subtle.digest(\"SHA-256\", new TextEncoder().encode(code_verifier));\n // Generate base64url string\n // btoa is deprecated in Node.js but is used here for web browser compatibility\n // (which has no good replacement yet, see also https://github.com/whatwg/html/issues/6811)\n return btoa(String.fromCharCode(...new Uint8Array(buffer)))\n .replace(/\\//g, '_')\n .replace(/\\+/g, '-')\n .replace(/=/g, '');\n}\n/** Generate a PKCE challenge pair\n * @param length Length of the verifer (between 43-128). Defaults to 43.\n * @returns PKCE challenge pair\n */\nexport default async function pkceChallenge(length) {\n if (!length)\n length = 43;\n if (length < 43 || length > 128) {\n throw `Expected a length between 43 and 128. Received ${length}.`;\n }\n const verifier = await generateVerifier(length);\n const challenge = await generateChallenge(verifier);\n return {\n code_verifier: verifier,\n code_challenge: challenge,\n };\n}\n/** Verify that a code_verifier produces the expected code challenge\n * @param code_verifier\n * @param expectedChallenge The code challenge to verify\n * @returns True if challenges are equal. False otherwise.\n */\nexport async function verifyChallenge(code_verifier, expectedChallenge) {\n const actualChallenge = await generateChallenge(code_verifier);\n return actualChallenge === expectedChallenge;\n}\n","import * as z from 'zod/v4';\n/**\n * Reusable URL validation that disallows javascript: scheme\n */\nexport const SafeUrlSchema = z\n .url()\n .superRefine((val, ctx) => {\n if (!URL.canParse(val)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'URL must be parseable',\n fatal: true\n });\n return z.NEVER;\n }\n})\n .refine(url => {\n const u = new URL(url);\n return u.protocol !== 'javascript:' && u.protocol !== 'data:' && u.protocol !== 'vbscript:';\n}, { message: 'URL cannot use javascript:, data:, or vbscript: scheme' });\n/**\n * RFC 9728 OAuth Protected Resource Metadata\n */\nexport const OAuthProtectedResourceMetadataSchema = z.looseObject({\n resource: z.string().url(),\n authorization_servers: z.array(SafeUrlSchema).optional(),\n jwks_uri: z.string().url().optional(),\n scopes_supported: z.array(z.string()).optional(),\n bearer_methods_supported: z.array(z.string()).optional(),\n resource_signing_alg_values_supported: z.array(z.string()).optional(),\n resource_name: z.string().optional(),\n resource_documentation: z.string().optional(),\n resource_policy_uri: z.string().url().optional(),\n resource_tos_uri: z.string().url().optional(),\n tls_client_certificate_bound_access_tokens: z.boolean().optional(),\n authorization_details_types_supported: z.array(z.string()).optional(),\n dpop_signing_alg_values_supported: z.array(z.string()).optional(),\n dpop_bound_access_tokens_required: z.boolean().optional()\n});\n/**\n * RFC 8414 OAuth 2.0 Authorization Server Metadata\n */\nexport const OAuthMetadataSchema = z.looseObject({\n issuer: z.string(),\n authorization_endpoint: SafeUrlSchema,\n token_endpoint: SafeUrlSchema,\n registration_endpoint: SafeUrlSchema.optional(),\n scopes_supported: z.array(z.string()).optional(),\n response_types_supported: z.array(z.string()),\n response_modes_supported: z.array(z.string()).optional(),\n grant_types_supported: z.array(z.string()).optional(),\n token_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n token_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n service_documentation: SafeUrlSchema.optional(),\n revocation_endpoint: SafeUrlSchema.optional(),\n revocation_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n revocation_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n introspection_endpoint: z.string().optional(),\n introspection_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n introspection_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n code_challenge_methods_supported: z.array(z.string()).optional(),\n client_id_metadata_document_supported: z.boolean().optional()\n});\n/**\n * OpenID Connect Discovery 1.0 Provider Metadata\n * see: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata\n */\nexport const OpenIdProviderMetadataSchema = z.looseObject({\n issuer: z.string(),\n authorization_endpoint: SafeUrlSchema,\n token_endpoint: SafeUrlSchema,\n userinfo_endpoint: SafeUrlSchema.optional(),\n jwks_uri: SafeUrlSchema,\n registration_endpoint: SafeUrlSchema.optional(),\n scopes_supported: z.array(z.string()).optional(),\n response_types_supported: z.array(z.string()),\n response_modes_supported: z.array(z.string()).optional(),\n grant_types_supported: z.array(z.string()).optional(),\n acr_values_supported: z.array(z.string()).optional(),\n subject_types_supported: z.array(z.string()),\n id_token_signing_alg_values_supported: z.array(z.string()),\n id_token_encryption_alg_values_supported: z.array(z.string()).optional(),\n id_token_encryption_enc_values_supported: z.array(z.string()).optional(),\n userinfo_signing_alg_values_supported: z.array(z.string()).optional(),\n userinfo_encryption_alg_values_supported: z.array(z.string()).optional(),\n userinfo_encryption_enc_values_supported: z.array(z.string()).optional(),\n request_object_signing_alg_values_supported: z.array(z.string()).optional(),\n request_object_encryption_alg_values_supported: z.array(z.string()).optional(),\n request_object_encryption_enc_values_supported: z.array(z.string()).optional(),\n token_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n token_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n display_values_supported: z.array(z.string()).optional(),\n claim_types_supported: z.array(z.string()).optional(),\n claims_supported: z.array(z.string()).optional(),\n service_documentation: z.string().optional(),\n claims_locales_supported: z.array(z.string()).optional(),\n ui_locales_supported: z.array(z.string()).optional(),\n claims_parameter_supported: z.boolean().optional(),\n request_parameter_supported: z.boolean().optional(),\n request_uri_parameter_supported: z.boolean().optional(),\n require_request_uri_registration: z.boolean().optional(),\n op_policy_uri: SafeUrlSchema.optional(),\n op_tos_uri: SafeUrlSchema.optional(),\n client_id_metadata_document_supported: z.boolean().optional()\n});\n/**\n * OpenID Connect Discovery metadata that may include OAuth 2.0 fields\n * This schema represents the real-world scenario where OIDC providers\n * return a mix of OpenID Connect and OAuth 2.0 metadata fields\n */\nexport const OpenIdProviderDiscoveryMetadataSchema = z.object({\n ...OpenIdProviderMetadataSchema.shape,\n ...OAuthMetadataSchema.pick({\n code_challenge_methods_supported: true\n }).shape\n});\n/**\n * OAuth 2.1 token response\n */\nexport const OAuthTokensSchema = z\n .object({\n access_token: z.string(),\n id_token: z.string().optional(), // Optional for OAuth 2.1, but necessary in OpenID Connect\n token_type: z.string(),\n expires_in: z.coerce.number().optional(),\n scope: z.string().optional(),\n refresh_token: z.string().optional()\n})\n .strip();\n/**\n * OAuth 2.1 error response\n */\nexport const OAuthErrorResponseSchema = z.object({\n error: z.string(),\n error_description: z.string().optional(),\n error_uri: z.string().optional()\n});\n/**\n * Optional version of SafeUrlSchema that allows empty string for retrocompatibility on tos_uri and logo_uri\n */\nexport const OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z.literal('').transform(() => undefined));\n/**\n * RFC 7591 OAuth 2.0 Dynamic Client Registration metadata\n */\nexport const OAuthClientMetadataSchema = z\n .object({\n redirect_uris: z.array(SafeUrlSchema),\n token_endpoint_auth_method: z.string().optional(),\n grant_types: z.array(z.string()).optional(),\n response_types: z.array(z.string()).optional(),\n client_name: z.string().optional(),\n client_uri: SafeUrlSchema.optional(),\n logo_uri: OptionalSafeUrlSchema,\n scope: z.string().optional(),\n contacts: z.array(z.string()).optional(),\n tos_uri: OptionalSafeUrlSchema,\n policy_uri: z.string().optional(),\n jwks_uri: SafeUrlSchema.optional(),\n jwks: z.any().optional(),\n software_id: z.string().optional(),\n software_version: z.string().optional(),\n software_statement: z.string().optional()\n})\n .strip();\n/**\n * RFC 7591 OAuth 2.0 Dynamic Client Registration client information\n */\nexport const OAuthClientInformationSchema = z\n .object({\n client_id: z.string(),\n client_secret: z.string().optional(),\n client_id_issued_at: z.number().optional(),\n client_secret_expires_at: z.number().optional()\n})\n .strip();\n/**\n * RFC 7591 OAuth 2.0 Dynamic Client Registration full response (client information plus metadata)\n */\nexport const OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);\n/**\n * RFC 7591 OAuth 2.0 Dynamic Client Registration error response\n */\nexport const OAuthClientRegistrationErrorSchema = z\n .object({\n error: z.string(),\n error_description: z.string().optional()\n})\n .strip();\n/**\n * RFC 7009 OAuth 2.0 Token Revocation request\n */\nexport const OAuthTokenRevocationRequestSchema = z\n .object({\n token: z.string(),\n token_type_hint: z.string().optional()\n})\n .strip();\n//# sourceMappingURL=auth.js.map","/**\n * Base class for all OAuth errors\n */\nexport class OAuthError extends Error {\n constructor(message, errorUri) {\n super(message);\n this.errorUri = errorUri;\n this.name = this.constructor.name;\n }\n /**\n * Converts the error to a standard OAuth error response object\n */\n toResponseObject() {\n const response = {\n error: this.errorCode,\n error_description: this.message\n };\n if (this.errorUri) {\n response.error_uri = this.errorUri;\n }\n return response;\n }\n get errorCode() {\n return this.constructor.errorCode;\n }\n}\n/**\n * Invalid request error - The request is missing a required parameter,\n * includes an invalid parameter value, includes a parameter more than once,\n * or is otherwise malformed.\n */\nexport class InvalidRequestError extends OAuthError {\n}\nInvalidRequestError.errorCode = 'invalid_request';\n/**\n * Invalid client error - Client authentication failed (e.g., unknown client, no client\n * authentication included, or unsupported authentication method).\n */\nexport class InvalidClientError extends OAuthError {\n}\nInvalidClientError.errorCode = 'invalid_client';\n/**\n * Invalid grant error - The provided authorization grant or refresh token is\n * invalid, expired, revoked, does not match the redirection URI used in the\n * authorization request, or was issued to another client.\n */\nexport class InvalidGrantError extends OAuthError {\n}\nInvalidGrantError.errorCode = 'invalid_grant';\n/**\n * Unauthorized client error - The authenticated client is not authorized to use\n * this authorization grant type.\n */\nexport class UnauthorizedClientError extends OAuthError {\n}\nUnauthorizedClientError.errorCode = 'unauthorized_client';\n/**\n * Unsupported grant type error - The authorization grant type is not supported\n * by the authorization server.\n */\nexport class UnsupportedGrantTypeError extends OAuthError {\n}\nUnsupportedGrantTypeError.errorCode = 'unsupported_grant_type';\n/**\n * Invalid scope error - The requested scope is invalid, unknown, malformed, or\n * exceeds the scope granted by the resource owner.\n */\nexport class InvalidScopeError extends OAuthError {\n}\nInvalidScopeError.errorCode = 'invalid_scope';\n/**\n * Access denied error - The resource owner or authorization server denied the request.\n */\nexport class AccessDeniedError extends OAuthError {\n}\nAccessDeniedError.errorCode = 'access_denied';\n/**\n * Server error - The authorization server encountered an unexpected condition\n * that prevented it from fulfilling the request.\n */\nexport class ServerError extends OAuthError {\n}\nServerError.errorCode = 'server_error';\n/**\n * Temporarily unavailable error - The authorization server is currently unable to\n * handle the request due to a temporary overloading or maintenance of the server.\n */\nexport class TemporarilyUnavailableError extends OAuthError {\n}\nTemporarilyUnavailableError.errorCode = 'temporarily_unavailable';\n/**\n * Unsupported response type error - The authorization server does not support\n * obtaining an authorization code using this method.\n */\nexport class UnsupportedResponseTypeError extends OAuthError {\n}\nUnsupportedResponseTypeError.errorCode = 'unsupported_response_type';\n/**\n * Unsupported token type error - The authorization server does not support\n * the requested token type.\n */\nexport class UnsupportedTokenTypeError extends OAuthError {\n}\nUnsupportedTokenTypeError.errorCode = 'unsupported_token_type';\n/**\n * Invalid token error - The access token provided is expired, revoked, malformed,\n * or invalid for other reasons.\n */\nexport class InvalidTokenError extends OAuthError {\n}\nInvalidTokenError.errorCode = 'invalid_token';\n/**\n * Method not allowed error - The HTTP method used is not allowed for this endpoint.\n * (Custom, non-standard error)\n */\nexport class MethodNotAllowedError extends OAuthError {\n}\nMethodNotAllowedError.errorCode = 'method_not_allowed';\n/**\n * Too many requests error - Rate limit exceeded.\n * (Custom, non-standard error based on RFC 6585)\n */\nexport class TooManyRequestsError extends OAuthError {\n}\nTooManyRequestsError.errorCode = 'too_many_requests';\n/**\n * Invalid client metadata error - The client metadata is invalid.\n * (Custom error for dynamic client registration - RFC 7591)\n */\nexport class InvalidClientMetadataError extends OAuthError {\n}\nInvalidClientMetadataError.errorCode = 'invalid_client_metadata';\n/**\n * Insufficient scope error - The request requires higher privileges than provided by the access token.\n */\nexport class InsufficientScopeError extends OAuthError {\n}\nInsufficientScopeError.errorCode = 'insufficient_scope';\n/**\n * Invalid target error - The requested resource is invalid, missing, unknown, or malformed.\n * (Custom error for resource indicators - RFC 8707)\n */\nexport class InvalidTargetError extends OAuthError {\n}\nInvalidTargetError.errorCode = 'invalid_target';\n/**\n * A utility class for defining one-off error codes\n */\nexport class CustomOAuthError extends OAuthError {\n constructor(customErrorCode, message, errorUri) {\n super(message, errorUri);\n this.customErrorCode = customErrorCode;\n }\n get errorCode() {\n return this.customErrorCode;\n }\n}\n/**\n * A full list of all OAuthErrors, enabling parsing from error responses\n */\nexport const OAUTH_ERRORS = {\n [InvalidRequestError.errorCode]: InvalidRequestError,\n [InvalidClientError.errorCode]: InvalidClientError,\n [InvalidGrantError.errorCode]: InvalidGrantError,\n [UnauthorizedClientError.errorCode]: UnauthorizedClientError,\n [UnsupportedGrantTypeError.errorCode]: UnsupportedGrantTypeError,\n [InvalidScopeError.errorCode]: InvalidScopeError,\n [AccessDeniedError.errorCode]: AccessDeniedError,\n [ServerError.errorCode]: ServerError,\n [TemporarilyUnavailableError.errorCode]: TemporarilyUnavailableError,\n [UnsupportedResponseTypeError.errorCode]: UnsupportedResponseTypeError,\n [UnsupportedTokenTypeError.errorCode]: UnsupportedTokenTypeError,\n [InvalidTokenError.errorCode]: InvalidTokenError,\n [MethodNotAllowedError.errorCode]: MethodNotAllowedError,\n [TooManyRequestsError.errorCode]: TooManyRequestsError,\n [InvalidClientMetadataError.errorCode]: InvalidClientMetadataError,\n [InsufficientScopeError.errorCode]: InsufficientScopeError,\n [InvalidTargetError.errorCode]: InvalidTargetError\n};\n//# sourceMappingURL=errors.js.map","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n // It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input\n // Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(?=(\\\\+?)?)\\1\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(?=(\\\\+?)?)\\1$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed);\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","import { JSONRPCMessageSchema } from '../types.js';\n/**\n * Buffers a continuous stdio stream into discrete JSON-RPC messages.\n */\nexport class ReadBuffer {\n append(chunk) {\n this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;\n }\n readMessage() {\n if (!this._buffer) {\n return null;\n }\n const index = this._buffer.indexOf('\\n');\n if (index === -1) {\n return null;\n }\n const line = this._buffer.toString('utf8', 0, index).replace(/\\r$/, '');\n this._buffer = this._buffer.subarray(index + 1);\n return deserializeMessage(line);\n }\n clear() {\n this._buffer = undefined;\n }\n}\nexport function deserializeMessage(line) {\n return JSONRPCMessageSchema.parse(JSON.parse(line));\n}\nexport function serializeMessage(message) {\n return JSON.stringify(message) + '\\n';\n}\n//# sourceMappingURL=stdio.js.map","import spawn from 'cross-spawn';\nimport process from 'node:process';\nimport { PassThrough } from 'node:stream';\nimport { ReadBuffer, serializeMessage } from '../shared/stdio.js';\n/**\n * Environment variables to inherit by default, if an environment is not explicitly given.\n */\nexport const DEFAULT_INHERITED_ENV_VARS = process.platform === 'win32'\n ? [\n 'APPDATA',\n 'HOMEDRIVE',\n 'HOMEPATH',\n 'LOCALAPPDATA',\n 'PATH',\n 'PROCESSOR_ARCHITECTURE',\n 'SYSTEMDRIVE',\n 'SYSTEMROOT',\n 'TEMP',\n 'USERNAME',\n 'USERPROFILE',\n 'PROGRAMFILES'\n ]\n : /* list inspired by the default env inheritance of sudo */\n ['HOME', 'LOGNAME', 'PATH', 'SHELL', 'TERM', 'USER'];\n/**\n * Returns a default environment object including only environment variables deemed safe to inherit.\n */\nexport function getDefaultEnvironment() {\n const env = {};\n for (const key of DEFAULT_INHERITED_ENV_VARS) {\n const value = process.env[key];\n if (value === undefined) {\n continue;\n }\n if (value.startsWith('()')) {\n // Skip functions, which are a security risk.\n continue;\n }\n env[key] = value;\n }\n return env;\n}\n/**\n * Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.\n *\n * This transport is only available in Node.js environments.\n */\nexport class StdioClientTransport {\n constructor(server) {\n this._readBuffer = new ReadBuffer();\n this._stderrStream = null;\n this._serverParams = server;\n if (server.stderr === 'pipe' || server.stderr === 'overlapped') {\n this._stderrStream = new PassThrough();\n }\n }\n /**\n * Starts the server process and prepares to communicate with it.\n */\n async start() {\n if (this._process) {\n throw new Error('StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.');\n }\n return new Promise((resolve, reject) => {\n this._process = spawn(this._serverParams.command, this._serverParams.args ?? [], {\n // merge default env with server env because mcp server needs some env vars\n env: {\n ...getDefaultEnvironment(),\n ...this._serverParams.env\n },\n stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'],\n shell: false,\n windowsHide: process.platform === 'win32',\n cwd: this._serverParams.cwd\n });\n this._process.on('error', error => {\n reject(error);\n this.onerror?.(error);\n });\n this._process.on('spawn', () => {\n resolve();\n });\n this._process.on('close', _code => {\n this._process = undefined;\n this.onclose?.();\n });\n this._process.stdin?.on('error', error => {\n this.onerror?.(error);\n });\n this._process.stdout?.on('data', chunk => {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n });\n this._process.stdout?.on('error', error => {\n this.onerror?.(error);\n });\n if (this._stderrStream && this._process.stderr) {\n this._process.stderr.pipe(this._stderrStream);\n }\n });\n }\n /**\n * The stderr stream of the child process, if `StdioServerParameters.stderr` was set to \"pipe\" or \"overlapped\".\n *\n * If stderr piping was requested, a PassThrough stream is returned _immediately_, allowing callers to\n * attach listeners before the start method is invoked. This prevents loss of any early\n * error output emitted by the child process.\n */\n get stderr() {\n if (this._stderrStream) {\n return this._stderrStream;\n }\n return this._process?.stderr ?? null;\n }\n /**\n * The child process pid spawned by this transport.\n *\n * This is only available after the transport has been started.\n */\n get pid() {\n return this._process?.pid ?? null;\n }\n processReadBuffer() {\n while (true) {\n try {\n const message = this._readBuffer.readMessage();\n if (message === null) {\n break;\n }\n this.onmessage?.(message);\n }\n catch (error) {\n this.onerror?.(error);\n }\n }\n }\n async close() {\n if (this._process) {\n const processToClose = this._process;\n this._process = undefined;\n const closePromise = new Promise(resolve => {\n processToClose.once('close', () => {\n resolve();\n });\n });\n try {\n processToClose.stdin?.end();\n }\n catch {\n // ignore\n }\n await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);\n if (processToClose.exitCode === null) {\n try {\n processToClose.kill('SIGTERM');\n }\n catch {\n // ignore\n }\n await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);\n }\n if (processToClose.exitCode === null) {\n try {\n processToClose.kill('SIGKILL');\n }\n catch {\n // ignore\n }\n }\n }\n this._readBuffer.clear();\n }\n send(message) {\n return new Promise(resolve => {\n if (!this._process?.stdin) {\n throw new Error('Not connected');\n }\n const json = serializeMessage(message);\n if (this._process.stdin.write(json)) {\n resolve();\n }\n else {\n this._process.stdin.once('drain', resolve);\n }\n });\n }\n}\n//# sourceMappingURL=stdio.js.map","import { z } from \"zod\";\nimport { executeAction, getActionCredentialRequirements, getRunSignal, getWorkflowRunHandle, normalizeCredentialList, registerWorkflowRunGetter } from \"@keystrokehq/action\";\nimport { captureConsole, logSystem, withSpan } from \"@keystrokehq/tracing\";\nimport { resolveActionCredentials } from \"@keystrokehq/credentials\";\nimport { AsyncLocalStorage } from \"node:async_hooks\";\n//#region src/run-canceled-error.ts\nvar RunCanceledError = class extends Error {\n\tconstructor(runId) {\n\t\tsuper(runId ? `Workflow run ${runId} was canceled` : \"Workflow run was canceled\");\n\t\tthis.name = \"RunCanceledError\";\n\t}\n};\nfunction isRunCanceledError(error) {\n\treturn error instanceof RunCanceledError;\n}\n//#endregion\n//#region src/workflow-definition.ts\nconst zodSchema = z.custom((v) => v instanceof z.ZodType, \"must be a Zod schema\");\n/** Runtime validation for an unbranded workflow definition. */\nconst workflowCoreSchema = z.object({\n\tslug: z.string().trim().min(1),\n\tname: z.string().optional(),\n\tdescription: z.string().optional(),\n\tsubscription: z.object({ mode: z.enum([\"system\", \"subscribable\"]).optional() }).optional(),\n\tinput: zodSchema,\n\toutput: zodSchema,\n\trun: z.function()\n});\nconst WORKFLOW = Symbol.for(\"keystroke.workflow\");\n/**\n* Validates brand + shape via `workflowCoreSchema` so discovery and guards\n* reject malformed definitions.\n*/\nfunction isWorkflow(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tif (!(WORKFLOW in value) || value[WORKFLOW] !== true) return false;\n\treturn workflowCoreSchema.safeParse(value).success;\n}\n//#endregion\n//#region src/define-workflow.ts\nfunction defineWorkflow(def) {\n\tconst result = workflowCoreSchema.safeParse(def);\n\tif (!result.success) throw new Error(`Invalid workflow definition: ${formatIssues(result.error.issues)}`);\n\treturn {\n\t\t...result.data,\n\t\t[WORKFLOW]: true\n\t};\n}\nfunction formatIssues(issues) {\n\treturn issues.map((issue) => {\n\t\treturn `${issue.path.length > 0 ? `${issue.path.join(\".\")}: ` : \"\"}${issue.message}`;\n\t}).join(\"; \");\n}\n//#endregion\n//#region src/replay/error.ts\nfunction serializeWorkflowError(error) {\n\tif (error instanceof Error) return {\n\t\tname: error.name,\n\t\tmessage: error.message\n\t};\n\treturn { message: String(error) };\n}\n/** Rebuild an Error from a recorded error so replay re-raises the same failure. */\nfunction deserializeWorkflowError(data) {\n\tconst serialized = data;\n\tconst error = new Error(serialized?.message ?? \"Workflow step failed\");\n\tif (serialized?.name) error.name = serialized.name;\n\treturn error;\n}\n//#endregion\n//#region src/replay/duration.ts\nconst UNIT_MS = {\n\tms: 1,\n\ts: 1e3,\n\tm: 6e4,\n\th: 36e5,\n\td: 864e5\n};\n/** Resolve a sleep duration to an absolute resume time. */\nfunction resolveResumeAt(duration, now = /* @__PURE__ */ new Date()) {\n\tif (duration instanceof Date) return duration;\n\tif (typeof duration === \"number\") return new Date(now.getTime() + Math.max(0, duration));\n\treturn new Date(now.getTime() + parseDurationToMs(duration));\n}\nfunction parseDurationToMs(value) {\n\tconst match = /^(\\d+(?:\\.\\d+)?)\\s*(ms|s|m|h|d)$/.exec(value.trim());\n\tif (!match) throw new Error(`Invalid sleep duration \"${value}\". Use a number of ms, a Date, or a string like \"5s\", \"10m\", \"1h\".`);\n\tconst amount = Number(match[1]);\n\tconst unit = match[2];\n\treturn Math.round(amount * UNIT_MS[unit]);\n}\n//#endregion\n//#region src/replay/events-consumer.ts\n/** Indexes replay events by correlationId for O(1) cache-hit checks during replay. */\nvar EventsConsumer = class {\n\tbyCorrelationId = /* @__PURE__ */ new Map();\n\tconstructor(events) {\n\t\tfor (const event of events) {\n\t\t\tif (!event.correlationId) continue;\n\t\t\tconst list = this.byCorrelationId.get(event.correlationId);\n\t\t\tif (list) list.push(event);\n\t\t\telse this.byCorrelationId.set(event.correlationId, [event]);\n\t\t}\n\t}\n\tevents(correlationId) {\n\t\treturn this.byCorrelationId.get(correlationId) ?? [];\n\t}\n\thasEventType(correlationId, type) {\n\t\treturn this.events(correlationId).some((event) => event.type === type);\n\t}\n\t/**\n\t* Cache lookup for a step. Returns the recorded output on a `step_completed`,\n\t* re-raises the recorded error on a terminal `step_failed` (so a permanently\n\t* failed step is not re-executed), and otherwise reports a miss — including\n\t* when only `step_retrying` events exist (the step re-runs on the next pass).\n\t*/\n\tgetStepResult(correlationId) {\n\t\tconst events = this.events(correlationId);\n\t\tconst failed = events.find((event) => event.type === \"step_failed\");\n\t\tif (failed) throw deserializeWorkflowError(failed.data);\n\t\tconst completed = events.find((event) => event.type === \"step_completed\");\n\t\tif (completed) return {\n\t\t\tcompleted: true,\n\t\t\tresult: completed.data\n\t\t};\n\t\treturn { completed: false };\n\t}\n\t/** Number of prior `step_retrying` events recorded for a step (= failed attempts so far). */\n\tcountRetrying(correlationId) {\n\t\treturn this.events(correlationId).filter((event) => event.type === \"step_retrying\").length;\n\t}\n\tisSleepCompleted(correlationId) {\n\t\treturn this.hasEventType(correlationId, \"sleep_completed\");\n\t}\n\t/** Returns the persisted resumeAt for a scheduled-but-not-completed sleep, if any. */\n\tgetSleepResumeAt(correlationId) {\n\t\tconst scheduled = this.events(correlationId).find((event) => event.type === \"sleep_scheduled\");\n\t\tif (!scheduled) return;\n\t\tconst data = scheduled.data;\n\t\treturn data?.resumeAt ? new Date(data.resumeAt) : void 0;\n\t}\n\tgetHookToken(correlationId) {\n\t\treturn (this.events(correlationId).find((event) => event.type === \"hook_created\")?.data)?.token;\n\t}\n\tgetHookResult(correlationId) {\n\t\tconst resumed = this.events(correlationId).find((event) => event.type === \"hook_resumed\");\n\t\tif (!resumed) return { resolved: false };\n\t\treturn {\n\t\t\tresolved: true,\n\t\t\tpayload: resumed.data?.payload\n\t\t};\n\t}\n};\n//#endregion\n//#region src/replay/suspension.ts\n/** A promise that never settles — returned by a suspending primitive so the body parks. */\nfunction createPendingPromise() {\n\treturn new Promise(() => {});\n}\n/**\n* Collects pending items requested within a single tick and resolves once, so\n* parallel suspensions (e.g. Promise.all of two sleeps) batch into one suspension.\n*/\nvar SuspensionCoordinator = class {\n\titems = /* @__PURE__ */ new Map();\n\tscheduled = false;\n\tresolve;\n\tpromise;\n\tconstructor() {\n\t\tthis.promise = new Promise((resolve) => {\n\t\t\tthis.resolve = resolve;\n\t\t});\n\t}\n\trequest(item) {\n\t\tthis.items.set(item.correlationId, item);\n\t\tif (!this.scheduled) {\n\t\t\tthis.scheduled = true;\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tthis.resolve([...this.items.values()]);\n\t\t\t});\n\t\t}\n\t}\n\twaitForSuspension() {\n\t\treturn this.promise;\n\t}\n};\n//#endregion\n//#region src/replay/replay-context.ts\nfunction createReplayState(params) {\n\treturn {\n\t\trunId: params.runId,\n\t\tconsumer: params.consumer,\n\t\tcoordinator: params.coordinator,\n\t\teventLog: params.eventLog,\n\t\tnewEvents: [],\n\t\tnow: params.now ?? /* @__PURE__ */ new Date(),\n\t\thookBaseUrl: params.hookBaseUrl,\n\t\tsleepCounter: 0,\n\t\thookCounter: 0,\n\t\tstepOccurrences: /* @__PURE__ */ new Map(),\n\t\tstepCorrelationIds: /* @__PURE__ */ new Set()\n\t};\n}\n/**\n* Allocate the correlation id for a step. An explicit `.stepId(x)` maps to\n* `step:x` (and must be unique within a run); otherwise the key is\n* `step:<actionKey>#<occurrence>` so that two calls to the same action get\n* distinct, replay-stable ids and inserting an unrelated call never shifts the\n* ids of later calls (unlike a single global ordinal).\n*/\nfunction nextStepCorrelationId(state, actionKey, explicitId) {\n\tif (explicitId !== void 0) {\n\t\tconst correlationId = `step:${explicitId}`;\n\t\tif (state.stepCorrelationIds.has(correlationId)) throw new Error(`Duplicate step id \"${explicitId}\" in workflow run ${state.runId}`);\n\t\tstate.stepCorrelationIds.add(correlationId);\n\t\treturn correlationId;\n\t}\n\tconst occurrence = state.stepOccurrences.get(actionKey) ?? 0;\n\tstate.stepOccurrences.set(actionKey, occurrence + 1);\n\tconst correlationId = `step:${actionKey}#${occurrence}`;\n\tstate.stepCorrelationIds.add(correlationId);\n\treturn correlationId;\n}\nfunction createSleep(state) {\n\treturn function sleep(duration) {\n\t\tconst correlationId = `sleep#${state.sleepCounter++}`;\n\t\tif (state.consumer.isSleepCompleted(correlationId)) return Promise.resolve();\n\t\tconst scheduledResumeAt = state.consumer.getSleepResumeAt(correlationId);\n\t\tconst resumeAt = scheduledResumeAt ?? resolveResumeAt(duration, state.now);\n\t\tif (scheduledResumeAt && resumeAt.getTime() <= state.now.getTime()) {\n\t\t\tstate.newEvents.push({\n\t\t\t\tid: `sleep_completed:${state.runId}:${correlationId}`,\n\t\t\t\trunId: state.runId,\n\t\t\t\ttype: \"sleep_completed\",\n\t\t\t\tcorrelationId\n\t\t\t});\n\t\t\treturn Promise.resolve();\n\t\t}\n\t\tif (!scheduledResumeAt) state.newEvents.push({\n\t\t\tid: `sleep_scheduled:${state.runId}:${correlationId}`,\n\t\t\trunId: state.runId,\n\t\t\ttype: \"sleep_scheduled\",\n\t\t\tcorrelationId,\n\t\t\tdata: { resumeAt: resumeAt.toISOString() }\n\t\t});\n\t\tstate.coordinator.request({\n\t\t\tkind: \"sleep\",\n\t\t\tcorrelationId,\n\t\t\tresumeAt\n\t\t});\n\t\treturn createPendingPromise();\n\t};\n}\nfunction createHook(state) {\n\treturn function hook(options) {\n\t\tconst correlationId = `hook#${state.hookCounter++}`;\n\t\tconst token = options?.token ?? state.consumer.getHookToken(correlationId) ?? `hook_${crypto.randomUUID()}`;\n\t\treturn {\n\t\t\ttoken,\n\t\t\tresumeUrl: state.hookBaseUrl ? `${state.hookBaseUrl}/hooks/${token}/resume` : `/hooks/${token}/resume`,\n\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\tconst result = state.consumer.getHookResult(correlationId);\n\t\t\t\tif (result.resolved) {\n\t\t\t\t\tconst payload = options?.schema ? options.schema.parse(result.payload) : result.payload;\n\t\t\t\t\treturn Promise.resolve(payload).then(onFulfilled, onRejected);\n\t\t\t\t}\n\t\t\t\tif (!state.consumer.hasEventType(correlationId, \"hook_created\")) state.newEvents.push({\n\t\t\t\t\tid: `hook_created:${state.runId}:${correlationId}`,\n\t\t\t\t\trunId: state.runId,\n\t\t\t\t\ttype: \"hook_created\",\n\t\t\t\t\tcorrelationId,\n\t\t\t\t\tdata: { token }\n\t\t\t\t});\n\t\t\t\tstate.coordinator.request({\n\t\t\t\t\tkind: \"hook\",\n\t\t\t\t\tcorrelationId,\n\t\t\t\t\ttoken\n\t\t\t\t});\n\t\t\t\treturn createPendingPromise().then(onFulfilled, onRejected);\n\t\t\t}\n\t\t};\n\t};\n}\n//#endregion\n//#region src/run-durable-step.ts\n/**\n* Shared durable-step shell: resolve a stable `correlation_id`, short-circuit\n* from the event log on a cache hit, otherwise execute and append\n* `step_completed` immediately (per-step crash durability). A thrown step\n* appends `step_retrying` (non-fatal, re-run on the next attempt) and\n* rethrows; the terminal `step_failed` is written by the job handler once the\n* queue exhausts retries.\n*/\nasync function runDurableStep(state, options) {\n\tconst { runId, consumer, eventLog } = state;\n\tgetRunSignal().throwIfAborted();\n\tconst correlationId = nextStepCorrelationId(state, options.key, options.id);\n\tconst cached = consumer.getStepResult(correlationId);\n\tconst metadata = {\n\t\trunId,\n\t\t[options.metadataKey]: options.key,\n\t\tcorrelationId\n\t};\n\tif (cached.completed) {\n\t\tawait withSpan({\n\t\t\tkind: options.kind,\n\t\t\tname: options.key,\n\t\t\trefId: `${runId}:${correlationId}`,\n\t\t\tmetadata: {\n\t\t\t\t...metadata,\n\t\t\t\treplayed: true\n\t\t\t}\n\t\t}, async () => {\n\t\t\tawait logSystem(\"info\", options.replayMessage, metadata);\n\t\t});\n\t\treturn options.parseCached ? options.parseCached(cached.result) : cached.result;\n\t}\n\treturn withSpan({\n\t\tkind: options.kind,\n\t\tname: options.key,\n\t\trefId: `${runId}:${correlationId}`,\n\t\tmetadata\n\t}, async () => captureConsole(async () => {\n\t\ttry {\n\t\t\tconst result = await options.execute();\n\t\t\tawait eventLog.append({\n\t\t\t\tid: `step_completed:${runId}:${correlationId}`,\n\t\t\t\trunId,\n\t\t\t\ttype: \"step_completed\",\n\t\t\t\tcorrelationId,\n\t\t\t\tdata: result\n\t\t\t});\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tconst attempt = consumer.countRetrying(correlationId);\n\t\t\tawait eventLog.append({\n\t\t\t\tid: `step_retrying:${runId}:${correlationId}:${attempt}`,\n\t\t\t\trunId,\n\t\t\t\ttype: \"step_retrying\",\n\t\t\t\tcorrelationId,\n\t\t\t\tdata: serializeWorkflowError(error)\n\t\t\t});\n\t\t\tstate.failedCorrelationId = correlationId;\n\t\t\tthrow error;\n\t\t}\n\t}));\n}\n//#endregion\n//#region src/create-action-runner.ts\nfunction withCredentialScopeOverride(requirements, scope) {\n\tif (!requirements || !scope) return requirements;\n\treturn normalizeCredentialList(requirements).map((requirement) => ({\n\t\t...requirement,\n\t\tscope\n\t}));\n}\n/** Builds the per-run action runner; durability lives in {@link runDurableStep}. */\nfunction createActionRunner(state, options = {}) {\n\treturn (action, input, runOptions) => runDurableStep(state, {\n\t\tkind: \"action\",\n\t\tkey: action.slug,\n\t\tid: runOptions?.id,\n\t\tmetadataKey: \"actionKey\",\n\t\treplayMessage: \"action replayed from checkpoint\",\n\t\tparseCached: (cached) => action.output.parse(cached),\n\t\texecute: async () => {\n\t\t\tconst requirements = withCredentialScopeOverride(getActionCredentialRequirements(action), runOptions?.credentialScope);\n\t\t\treturn executeAction(action, input, requirements?.length ? await resolveActionCredentials(requirements, {\n\t\t\t\tresolveCredentials: options.resolveCredentials,\n\t\t\t\tcontext: options.credentialContext,\n\t\t\t\toauthAdapter: options.oauthAdapter,\n\t\t\t\tconsumer: {\n\t\t\t\t\tkind: \"action\",\n\t\t\t\t\tname: action.slug\n\t\t\t\t}\n\t\t\t}) : {});\n\t\t}\n\t});\n}\n//#endregion\n//#region src/create-agent-step-runner.ts\n/**\n* Builds the per-run agent runner: each `agent.prompt()` in a workflow body\n* becomes a durable step keyed `step:<agentKey>#<occurrence>` (same scheme as\n* actions). The actual prompt execution is delegated to `runAgent`, supplied\n* by the host (server) via `executeWorkflow({ runAgent })`.\n*/\nfunction createAgentStepRunner(state, runAgent) {\n\treturn (agent, input, options) => {\n\t\tconst slug = agent.slug;\n\t\treturn runDurableStep(state, {\n\t\t\tkind: \"agent_session\",\n\t\t\tkey: slug,\n\t\t\tid: options?.id,\n\t\t\tmetadataKey: \"agentKey\",\n\t\t\treplayMessage: \"agent step replayed from checkpoint\",\n\t\t\texecute: () => runAgent(agent, input, options?.runPrompt)\n\t\t});\n\t};\n}\n//#endregion\n//#region src/create-llm-step-runner.ts\n/**\n* Builds the per-run LLM runner: each `promptLlm()` in a workflow body becomes a\n* durable step keyed `step:promptLlm#<occurrence>`. The actual LLM call is\n* delegated to `runLlm`, supplied by the host (server) via `executeWorkflow({ runLlm })`.\n*/\nfunction createLlmStepRunner(state, runLlm) {\n\treturn (opts) => runDurableStep(state, {\n\t\tkind: \"llm\",\n\t\tkey: \"promptLlm\",\n\t\tid: opts.stepId,\n\t\tmetadataKey: \"llmKey\",\n\t\treplayMessage: \"llm step replayed from checkpoint\",\n\t\tparseCached: (cached) => opts.outputSchema ? opts.outputSchema.parse(cached) : cached,\n\t\texecute: () => runLlm(opts)\n\t});\n}\n//#endregion\n//#region src/run-context.ts\nconst storage = new AsyncLocalStorage();\nregisterWorkflowRunGetter(() => {\n\tconst store = storage.getStore();\n\tif (!store) return;\n\treturn {\n\t\tactionRunner: store.actionRunner,\n\t\tagentRunner: store.agentRunner,\n\t\tllmRunner: store.llmRunner\n\t};\n});\nfunction runWithWorkflowContext(store, fn) {\n\treturn storage.run(store, fn);\n}\n//#endregion\n//#region src/replay/memory-event-log.ts\n/** In-memory durable log for inline execution and tests. */\nvar MemoryEventLog = class {\n\tevents = [];\n\tids = /* @__PURE__ */ new Set();\n\tasync append(event) {\n\t\tconst id = event.id ?? crypto.randomUUID();\n\t\tif (this.ids.has(id)) return false;\n\t\tthis.ids.add(id);\n\t\tthis.events.push({\n\t\t\tid,\n\t\t\trunId: event.runId,\n\t\t\tseq: this.events.length,\n\t\t\ttype: event.type,\n\t\t\tcorrelationId: event.correlationId ?? null,\n\t\t\tdata: event.data ?? null\n\t\t});\n\t\treturn true;\n\t}\n\tasync listReplay(runId) {\n\t\treturn this.events.filter((event) => event.runId === runId).map((event) => ({ ...event }));\n\t}\n};\n//#endregion\n//#region src/execute-workflow.ts\n/**\n* The single way to run a workflow: replay its event log from the top, execute\n* un-cached primitives, and either complete/fail or suspend at the first\n* un-satisfied sleep/hook. New events (sleep_scheduled/sleep_completed/\n* hook_created/run_completed/run_failed) are flushed before returning.\n*\n* Durability comes entirely from the log — a suspended run resumes by calling\n* this again with the same `runId` and event log once the sleep is due or the\n* hook is resumed.\n*/\nasync function executeWorkflow(workflow, input, options = {}) {\n\tconst runId = options.runId ?? crypto.randomUUID();\n\tconst eventLog = options.eventLog ?? new MemoryEventLog();\n\tconst signal = getRunSignal();\n\tconst consumer = new EventsConsumer(await eventLog.listReplay(runId));\n\tconst coordinator = new SuspensionCoordinator();\n\tconst state = createReplayState({\n\t\trunId,\n\t\tconsumer,\n\t\tcoordinator,\n\t\teventLog,\n\t\thookBaseUrl: options.hookBaseUrl,\n\t\tnow: options.now\n\t});\n\tconst actionRunner = createActionRunner(state, {\n\t\tresolveCredentials: options.resolveCredentials,\n\t\tcredentialContext: options.credentialContext,\n\t\toauthAdapter: options.oauthAdapter\n\t});\n\tconst ctx = {\n\t\trunId,\n\t\tsleep: createSleep(state),\n\t\thook: createHook(state),\n\t\t...options.context\n\t};\n\tconst agentRunner = options.runAgent ? createAgentStepRunner(state, options.runAgent) : void 0;\n\tconst llmRunner = options.runLlm ? createLlmStepRunner(state, options.runLlm) : void 0;\n\tconst validatedInput = workflow.input.parse(input);\n\tconst bodyPromise = runWithWorkflowContext({\n\t\tactionRunner,\n\t\tagentRunner,\n\t\tllmRunner,\n\t\trunId\n\t}, () => captureConsole(async () => workflow.run(validatedInput, ctx)));\n\tlet onAbort;\n\tconst waitForAbort = signal.aborted ? Promise.resolve({ type: \"canceled\" }) : new Promise((resolve) => {\n\t\tonAbort = () => resolve({ type: \"canceled\" });\n\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t});\n\tconst outcome = await Promise.race([\n\t\tbodyPromise.then((output) => ({\n\t\t\ttype: \"done\",\n\t\t\toutput\n\t\t}), (error) => ({\n\t\t\ttype: \"error\",\n\t\t\terror\n\t\t})),\n\t\tcoordinator.waitForSuspension().then((items) => ({\n\t\t\ttype: \"suspended\",\n\t\t\titems\n\t\t})),\n\t\twaitForAbort\n\t]);\n\tif (onAbort) signal.removeEventListener(\"abort\", onAbort);\n\tlet result;\n\tif (outcome.type === \"suspended\") {\n\t\tbodyPromise.catch(() => {});\n\t\tresult = {\n\t\t\tstatus: \"suspended\",\n\t\t\titems: outcome.items\n\t\t};\n\t} else if (outcome.type === \"done\") {\n\t\tconst output = workflow.output.parse(outcome.output);\n\t\tstate.newEvents.push({\n\t\t\tid: `run_completed:${runId}`,\n\t\t\trunId,\n\t\t\ttype: \"run_completed\",\n\t\t\tdata: { output }\n\t\t});\n\t\tresult = {\n\t\t\tstatus: \"completed\",\n\t\t\toutput\n\t\t};\n\t} else if (outcome.type === \"canceled\" || isRunCanceledError(outcome.error)) {\n\t\tbodyPromise.catch(() => {});\n\t\tstate.newEvents.push({\n\t\t\tid: `run_canceled:${runId}`,\n\t\t\trunId,\n\t\t\ttype: \"run_canceled\"\n\t\t});\n\t\tresult = { status: \"canceled\" };\n\t} else result = {\n\t\tstatus: \"failed\",\n\t\terror: outcome.error,\n\t\tfailedCorrelationId: state.failedCorrelationId\n\t};\n\tfor (const event of state.newEvents) await eventLog.append(event);\n\treturn result;\n}\n//#endregion\n//#region src/prompt-llm.ts\nfunction promptLlm(prompt, opts) {\n\tconst handle = getWorkflowRunHandle();\n\tif (!handle?.llmRunner) throw new Error(\"promptLlm must run inside a workflow with an injected llm executor (executeWorkflow({ runLlm })).\");\n\treturn handle.llmRunner({\n\t\tprompt,\n\t\t...opts\n\t});\n}\n//#endregion\nexport { MemoryEventLog, RunCanceledError, defineWorkflow, deserializeWorkflowError, executeWorkflow, isRunCanceledError, isWorkflow, promptLlm, serializeWorkflowError };\n\n//# sourceMappingURL=index.mjs.map","import { parseCronExpression } from \"cron-schedule\";\nimport { z } from \"zod\";\nimport { isWorkflow } from \"@keystrokehq/workflow\";\n//#region src/cron/cron-schedule.ts\n/**\n* Validates and brands a cron expression. Accepts anything the `cron-schedule`\n* engine accepts (5/6 fields, named months/weekdays, `@daily`-style nicknames)\n* so authoring validation never rejects a schedule the scheduler can run. The\n* `.brand()` makes `CronSchedule` nominally distinct from a plain `string`, so\n* a raw string can't be passed where a validated schedule is expected.\n*/\nconst cronScheduleSchema = z.string().trim().min(1, \"cron schedule must be a non-empty string\").refine(isParseableCron, \"must be a valid cron expression\").brand();\n/** Parse/validate an arbitrary value into a branded `CronSchedule` (throws on failure). */\nfunction parseCronSchedule(value) {\n\treturn cronScheduleSchema.parse(value);\n}\n/**\n* Resolves the effective schedule for an attachment, applying overrides by\n* precedence: per-attachment override → global override → the authored\n* schedule. Pure string precedence — no cron parsing.\n*/\nfunction resolveCronSchedule(attachmentId, schedule, options) {\n\treturn options.attachmentScheduleOverrides?.[attachmentId] ?? options.cronScheduleOverride ?? schedule;\n}\n/** Parse a schedule into a `cron-schedule` `Cron` instance (throws on invalid input). */\nfunction parseTriggerSchedule(schedule) {\n\treturn toCron(schedule);\n}\n/** The next time the schedule fires at or after `from`. */\nfunction nextTriggerRunAt(schedule, from = /* @__PURE__ */ new Date()) {\n\treturn toCron(schedule).getNextDate(from);\n}\n/**\n* Single touchpoint for the `cron-schedule` library — every parse, validation,\n* and next-run calculation in this package goes through here.\n*/\nfunction toCron(schedule) {\n\treturn parseCronExpression(schedule);\n}\nfunction isParseableCron(value) {\n\ttry {\n\t\ttoCron(value);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n//#endregion\n//#region src/attachment-definition.ts\nconst zodSchema = z.custom((v) => v instanceof z.ZodType, \"must be a Zod schema\");\nconst workflowSchema = z.custom((v) => isWorkflow(v), \"must be defineWorkflow(...)\");\nconst agentSchema = z.custom((v) => typeof v === \"object\" && v !== null && typeof v.slug === \"string\" && v.slug.trim().length > 0 && typeof v.prompt === \"function\", \"must be defineAgent(...)\");\nconst promptSchema = z.union([z.string(), z.function()]);\nconst baseSourceShape = {\n\tkey: z.string().trim().min(1),\n\tattach: z.function()\n};\nconst webhookSourceSchema = z.object({\n\tkind: z.literal(\"webhook\"),\n\t...baseSourceShape,\n\tendpoint: z.string().min(1),\n\trequest: zodSchema,\n\tfilter: zodSchema.optional(),\n\tpasses: z.function()\n});\nconst cronSourceSchema = z.object({\n\tkind: z.literal(\"cron\"),\n\t...baseSourceShape,\n\tschedule: cronScheduleSchema\n});\nconst pollSourceSchema = z.object({\n\tkind: z.literal(\"poll\"),\n\t...baseSourceShape,\n\tid: z.string().optional(),\n\tschedule: cronScheduleSchema,\n\trun: z.function(),\n\tfilters: z.array(z.function()),\n\tpasses: z.function()\n});\n/** Runtime validation for a trigger source (webhook | cron | poll). */\nconst triggerSourceSchema = z.discriminatedUnion(\"kind\", [\n\twebhookSourceSchema,\n\tcronSourceSchema,\n\tpollSourceSchema\n]);\nconst workflowAttachmentSchema = z.object({\n\tkey: z.string().trim().min(1),\n\tsource: triggerSourceSchema,\n\ttarget: z.literal(\"workflow\"),\n\tworkflow: workflowSchema,\n\ttransform: z.function().optional()\n});\nconst agentAttachmentSchema = z.object({\n\tkey: z.string().trim().min(1),\n\tsource: triggerSourceSchema,\n\ttarget: z.literal(\"agent\"),\n\tagent: agentSchema,\n\tprompt: promptSchema\n});\n/** Runtime validation for an unbranded trigger attachment. */\nconst triggerAttachmentCoreSchema = z.discriminatedUnion(\"target\", [workflowAttachmentSchema, agentAttachmentSchema]);\nconst TRIGGER_ATTACHMENT = Symbol.for(\"keystroke.triggerAttachment\");\n/**\n* Validates brand + shape via `triggerAttachmentCoreSchema` so server discovery\n* rejects unbranded or malformed attachments.\n*/\nfunction isTriggerAttachment(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tif (!(TRIGGER_ATTACHMENT in value) || value[TRIGGER_ATTACHMENT] !== true) return false;\n\treturn triggerAttachmentCoreSchema.safeParse(value).success;\n}\nfunction isWorkflowTriggerAttachment(attachment) {\n\treturn attachment.target === \"workflow\";\n}\nfunction isAgentTriggerAttachment(attachment) {\n\treturn attachment.target === \"agent\";\n}\n//#endregion\n//#region src/attachment-key.ts\nfunction workflowKeyFromDefinition(workflow) {\n\tconst slug = workflow.slug?.trim();\n\tif (!slug) throw new Error(\"Workflow definition requires a non-empty slug\");\n\treturn slug;\n}\nfunction agentKeyFromAgent(agent) {\n\tconst slug = agent.slug?.trim();\n\tif (!slug) throw new Error(\"Agent definition requires a non-empty slug\");\n\treturn slug;\n}\nfunction attachmentKeyFrom(triggerKey, targetKey) {\n\treturn `${triggerKey}:${targetKey}`;\n}\n//#endregion\n//#region src/attach-options.ts\nfunction isAgentAttachOptions(options) {\n\treturn \"agent\" in options;\n}\n//#endregion\n//#region src/define-trigger-attachment.ts\n/**\n* Internal helper used by source `.attach()` factories. Validates the\n* attachment shape against `triggerAttachmentCoreSchema` and applies the\n* `TRIGGER_ATTACHMENT` brand.\n*/\nfunction defineTriggerAttachment(input) {\n\tconst result = triggerAttachmentCoreSchema.safeParse(input);\n\tif (!result.success) throw new Error(`Invalid trigger attachment: ${formatIssues(result.error.issues)}`);\n\treturn {\n\t\t...input,\n\t\t[TRIGGER_ATTACHMENT]: true\n\t};\n}\nfunction formatIssues(issues) {\n\treturn issues.map((issue) => {\n\t\treturn `${issue.path.length > 0 ? `${issue.path.join(\".\")}: ` : \"\"}${issue.message}`;\n\t}).join(\"; \");\n}\n//#endregion\n//#region src/attach-from-source.ts\nfunction attachFromSource(source, triggerKey, options) {\n\tif (isAgentAttachOptions(options)) return defineTriggerAttachment({\n\t\tkey: attachmentKeyFrom(triggerKey, agentKeyFromAgent(options.agent)),\n\t\tsource,\n\t\ttarget: \"agent\",\n\t\tagent: options.agent,\n\t\tprompt: options.prompt\n\t});\n\treturn defineTriggerAttachment({\n\t\tkey: attachmentKeyFrom(triggerKey, workflowKeyFromDefinition(options.workflow)),\n\t\tsource,\n\t\ttarget: \"workflow\",\n\t\tworkflow: options.workflow,\n\t\ttransform: options.transform\n\t});\n}\n//#endregion\n//#region src/trigger-match-schema.ts\nfunction matchShapeAndFilter(shape, filter, payload) {\n\tconst shaped = shape.safeParse(payload);\n\tif (!shaped.success) return;\n\tif (filter && !filter.safeParse(shaped.data).success) return;\n\treturn shaped.data;\n}\nfunction passesShapeAndFilter(shape, filter, payload) {\n\treturn matchShapeAndFilter(shape, filter, payload) !== void 0;\n}\nfunction matchWebhookPayload(raw, schemas) {\n\tconst matches = [];\n\tif (typeof z.fromJSONSchema !== \"function\") throw new Error(\"z.fromJSONSchema is required for JSON schema matching\");\n\tfor (const schema of schemas) {\n\t\tconst data = matchShapeAndFilter(z.fromJSONSchema(schema.requestSchema), schema.filterSchema ? z.fromJSONSchema(schema.filterSchema) : void 0, raw);\n\t\tif (data === void 0) continue;\n\t\tmatches.push({\n\t\t\tattachmentKey: schema.attachmentKey,\n\t\t\tdata\n\t\t});\n\t}\n\treturn matches;\n}\n/** Live Zod validation for webhook `request` + optional Zod `filter` (in-process paths). */\nfunction passesTriggerMatch(shape, filter, payload) {\n\treturn passesShapeAndFilter(shape, filter, payload);\n}\n//#endregion\n//#region src/sources/webhook-source.ts\nfunction normalizeWebhookEndpoint(endpoint) {\n\treturn endpoint.replace(/^\\/+|\\/+$/g, \"\").replace(/^triggers\\/?/, \"\");\n}\nfunction webhookObjectSchema(schema) {\n\tif (schema instanceof z.ZodObject) return schema.loose();\n\treturn schema;\n}\n/**\n* Defines a webhook trigger source — fires its attached workflow when a request\n* hits `/triggers/{endpoint}` and satisfies `request` plus any optional `filter`.\n*\n* @param options.key - Stable trigger key; attachment id is `{key}:{workflowKey}`.\n* @param options.endpoint - Shared route suffix under `/triggers/` (e.g. `\"stripe\"`).\n*/\nfunction defineWebhookSource(options) {\n\tconst triggerKey = options.key.trim();\n\tif (!triggerKey) throw new Error(\"defineWebhookSource requires a non-empty key\");\n\tconst endpoint = normalizeWebhookEndpoint(options.endpoint);\n\tif (!endpoint) throw new Error(\"defineWebhookSource requires a non-empty endpoint\");\n\tconst request = webhookObjectSchema(options.request);\n\tconst filter = options.filter ? webhookObjectSchema(options.filter) : void 0;\n\tconst source = {\n\t\tkind: \"webhook\",\n\t\tkey: triggerKey,\n\t\tendpoint,\n\t\trequest,\n\t\tfilter,\n\t\tpasses(payload) {\n\t\t\treturn passesTriggerMatch(request, filter, payload);\n\t\t},\n\t\tattach(attachOptions) {\n\t\t\treturn attachFromSource(source, triggerKey, attachOptions);\n\t\t}\n\t};\n\treturn source;\n}\n//#endregion\n//#region src/sources/cron-source.ts\n/**\n* Defines a cron trigger source — fires its attached workflow on a schedule.\n*\n* @param options.key - Stable trigger key; the attachment id is `{key}:{workflowKey}`.\n* @param options.schedule - A cron expression. Pass a 5-field literal (e.g.\n* `\"0 9 * * *\"`) for compile-time shape checking, or wrap with\n* `parseCronSchedule(...)` for 6-field, named (`MON`), or `@daily`-style\n* schedules. Validated at runtime; throws if the expression is invalid.\n* @example\n* defineCronSource({ key: \"morning\", schedule: \"0 9 * * *\" }).attach({ workflow });\n*/\nfunction defineCronSource(options) {\n\tconst triggerKey = options.key.trim();\n\tif (!triggerKey) throw new Error(\"defineCronSource requires a non-empty key\");\n\tconst source = {\n\t\tkind: \"cron\",\n\t\tkey: triggerKey,\n\t\tschedule: parseCronSchedule(options.schedule),\n\t\tattach(attachOptions) {\n\t\t\treturn attachFromSource(source, triggerKey, attachOptions);\n\t\t}\n\t};\n\treturn source;\n}\n//#endregion\n//#region src/sources/poll-source.ts\n/**\n* Defines a poll trigger source — runs `run` on a schedule and, when the result\n* passes any `.filter(...)`, fires the attached workflow with it.\n*\n* @param options.key - Stable trigger key; the attachment id is `{key}:{workflowKey}`.\n* @param options.id - Optional group id; poll sources sharing an id poll together.\n* @param options.schedule - Cron expression for the poll cadence (see `defineCronSource`).\n* @param options.run - Produces the payload checked by `filter` and passed to the workflow.\n* @param options.filter - Source-level predicate; the workflow only fires when it returns true.\n* @example\n* definePollSource({ key: \"inbox\", schedule: \"0 * * * *\", run: fetchInbox })\n* .filter((r) => r.length > 0)\n* .attach({ workflow });\n*/\nfunction definePollSource(options) {\n\tconst triggerKey = options.key.trim();\n\tif (!triggerKey) throw new Error(\"definePollSource requires a non-empty key\");\n\tconst schedule = parseCronSchedule(options.schedule);\n\tconst filters = [];\n\tif (options.filter) filters.push(options.filter);\n\tconst source = {\n\t\tkind: \"poll\",\n\t\tkey: triggerKey,\n\t\tid: options.id,\n\t\tschedule,\n\t\trun: options.run,\n\t\tfilters,\n\t\tpasses(payload) {\n\t\t\treturn source.filters.every((candidate) => candidate(payload));\n\t\t},\n\t\tattach(attachOptions) {\n\t\t\treturn attachFromSource(source, triggerKey, attachOptions);\n\t\t}\n\t};\n\tconst chain = source;\n\tchain.filter = (fn) => {\n\t\tsource.filters.push(fn);\n\t\treturn chain;\n\t};\n\treturn chain;\n}\n//#endregion\n//#region src/ephemeral-match.ts\nfunction emptyObjectSchema() {\n\treturn {\n\t\ttype: \"object\",\n\t\tproperties: {},\n\t\trequired: []\n\t};\n}\nfunction setConstAtPath(schema, path, value) {\n\tconst [head, ...rest] = path;\n\tif (!head) return;\n\tif (!schema.required.includes(head)) schema.required.push(head);\n\tif (rest.length === 0) {\n\t\tschema.properties[head] = { const: value };\n\t\treturn;\n\t}\n\tconst existing = schema.properties[head];\n\tconst child = existing && typeof existing === \"object\" && existing.type === \"object\" ? existing : emptyObjectSchema();\n\tschema.properties[head] = child;\n\tsetConstAtPath(child, rest, value);\n}\n/**\n* Compiles a shallow `match` object into a JSON Schema usable as a stored webhook\n* `requestSchema`. Dots in keys are treated as path separators; an empty match\n* produces a schema that accepts any JSON object payload.\n*/\nfunction matchToJsonSchema(match) {\n\tconst schema = emptyObjectSchema();\n\tfor (const [path, value] of Object.entries(match)) setConstAtPath(schema, path.split(\".\").filter((segment) => segment.length > 0), value);\n\tif (schema.required.length === 0) return { type: \"object\" };\n\treturn schema;\n}\n//#endregion\n//#region src/interpolate-prompt.ts\nfunction resolvePath(payload, path) {\n\tlet current = payload;\n\tfor (const segment of path) {\n\t\tif (current === null || typeof current !== \"object\") return;\n\t\tcurrent = current[segment];\n\t}\n\treturn current;\n}\n/**\n* Resolves `{{path}}` / `{{payload.path}}` dot-path tokens in an ephemeral trigger\n* prompt against the webhook payload. Unresolved tokens are left untouched so the\n* agent can see what failed to bind.\n*/\nfunction interpolatePrompt(template, payload) {\n\treturn template.replace(/\\{\\{\\s*([\\w.$-]+)\\s*\\}\\}/g, (token, rawPath) => {\n\t\tconst segments = rawPath.split(\".\");\n\t\tif (segments[0] === \"payload\") segments.shift();\n\t\tconst value = segments.length === 0 ? payload : resolvePath(payload, segments);\n\t\tif (value === void 0) return token;\n\t\treturn typeof value === \"string\" ? value : JSON.stringify(value);\n\t});\n}\n//#endregion\n//#region src/resolve-agent-prompt.ts\n/** Resolves the agent prompt for a validated trigger payload. */\nfunction resolveAgentPrompt(attachment, payload) {\n\tconst prompt = attachment.prompt;\n\tif (typeof prompt === \"function\") return prompt(payload ?? {});\n\treturn prompt;\n}\n//#endregion\n//#region src/resolve-attachment-input.ts\nfunction applyAttachmentTransform(attachment, payload) {\n\treturn attachment.transform ? attachment.transform(payload) : payload;\n}\n/**\n* Applies attachment `transform` to a payload that already passed source validation.\n* Webhook payloads are matched at ingress via persisted Zod JSON schemas.\n*/\nfunction resolveAttachmentTransform(attachment, payload) {\n\tif (isAgentTriggerAttachment(attachment)) return payload;\n\treturn applyAttachmentTransform(attachment, payload);\n}\n/** Applies poll source filters and attachment `transform`. Webhook ingress already matched Zod schemas. */\nfunction resolveAttachmentInput(attachment, payload) {\n\tconst source = attachment.source;\n\tif (source.kind === \"poll\" && !source.passes(payload)) return;\n\tif (isAgentTriggerAttachment(attachment)) return payload;\n\treturn applyAttachmentTransform(attachment, payload);\n}\n//#endregion\nexport { TRIGGER_ATTACHMENT, cronScheduleSchema, defineCronSource, definePollSource, defineWebhookSource, interpolatePrompt, isAgentTriggerAttachment, isTriggerAttachment, isWorkflowTriggerAttachment, matchToJsonSchema, matchWebhookPayload, nextTriggerRunAt, normalizeWebhookEndpoint, parseCronSchedule, parseTriggerSchedule, resolveAgentPrompt, resolveAttachmentInput, resolveAttachmentTransform, resolveCronSchedule };\n\n//# sourceMappingURL=index.mjs.map","const DEFAULT_SCHEMA = 'pgboss';\nconst MIGRATE_RACE_MESSAGE = 'division by zero';\nconst CREATE_RACE_MESSAGE = 'already exists';\nconst SINGLE_QUOTE_REGEX = /'/g;\nconst FIFTEEN_MINUTES = 60 * 15;\nconst FORTEEN_DAYS = 60 * 60 * 24 * 14;\nconst SEVEN_DAYS = 60 * 60 * 24 * 7;\nconst JOB_STATES = Object.freeze({\n created: 'created',\n retry: 'retry',\n active: 'active',\n completed: 'completed',\n cancelled: 'cancelled',\n failed: 'failed'\n});\nconst QUEUE_POLICIES = Object.freeze({\n standard: 'standard',\n short: 'short',\n singleton: 'singleton',\n stately: 'stately',\n exclusive: 'exclusive',\n key_strict_fifo: 'key_strict_fifo'\n});\nconst QUEUE_DEFAULTS = {\n expire_seconds: FIFTEEN_MINUTES,\n retention_seconds: FORTEEN_DAYS,\n deletion_seconds: SEVEN_DAYS,\n retry_limit: 2,\n retry_delay: 0,\n warning_queued: 0,\n retry_backoff: false,\n partition: false\n};\nconst COMMON_JOB_TABLE = 'job_common';\nfunction create(schema, version, options) {\n const commands = [\n options?.createSchema ? createSchema(schema) : '',\n createEnumJobState(schema),\n createTableVersion(schema),\n createTableQueue(schema),\n createTableSchedule(schema),\n createTableSubscription(schema),\n createTableBam(schema),\n jobTableFormatFunction(schema),\n jobTableRunFunction(schema),\n jobTableRunAsyncFunction(schema),\n createTableJob(schema),\n createPrimaryKeyJob(schema),\n createTableJobCommon(schema),\n createTableWarning(schema),\n createIndexWarning(schema),\n createQueueFunction(schema),\n deleteQueueFunction(schema),\n insertVersion(schema, version)\n ];\n return locked(schema, commands);\n}\nfunction createSchema(schema) {\n return `CREATE SCHEMA IF NOT EXISTS ${schema}`;\n}\nfunction createEnumJobState(schema) {\n // ENUM definition order is important\n // base type is numeric and first values are less than last values\n return `\n CREATE TYPE ${schema}.job_state AS ENUM (\n '${JOB_STATES.created}',\n '${JOB_STATES.retry}',\n '${JOB_STATES.active}',\n '${JOB_STATES.completed}',\n '${JOB_STATES.cancelled}',\n '${JOB_STATES.failed}'\n )\n `;\n}\nfunction createTableVersion(schema) {\n return `\n CREATE TABLE ${schema}.version (\n version int primary key,\n cron_on timestamp with time zone,\n bam_on timestamp with time zone\n )\n `;\n}\nfunction createTableQueue(schema) {\n return `\n CREATE TABLE ${schema}.queue (\n name text NOT NULL,\n policy text NOT NULL,\n retry_limit int NOT NULL,\n retry_delay int NOT NULL,\n retry_backoff bool NOT NULL,\n retry_delay_max int,\n expire_seconds int NOT NULL,\n retention_seconds int NOT NULL,\n deletion_seconds int NOT NULL,\n dead_letter text REFERENCES ${schema}.queue (name) CHECK (dead_letter IS DISTINCT FROM name),\n partition bool NOT NULL,\n table_name text NOT NULL,\n deferred_count int NOT NULL default 0,\n queued_count int NOT NULL default 0,\n warning_queued int NOT NULL default 0,\n active_count int NOT NULL default 0,\n total_count int NOT NULL default 0,\n heartbeat_seconds int,\n singletons_active text[],\n monitor_on timestamp with time zone,\n maintain_on timestamp with time zone,\n created_on timestamp with time zone not null default now(),\n updated_on timestamp with time zone not null default now(),\n PRIMARY KEY (name)\n )\n `;\n}\nfunction createTableSchedule(schema) {\n return `\n CREATE TABLE ${schema}.schedule (\n name text REFERENCES ${schema}.queue ON DELETE CASCADE,\n key text not null DEFAULT '',\n cron text not null,\n timezone text,\n data jsonb,\n options jsonb,\n created_on timestamp with time zone not null default now(),\n updated_on timestamp with time zone not null default now(),\n PRIMARY KEY (name, key)\n )\n `;\n}\nfunction createTableSubscription(schema) {\n return `\n CREATE TABLE ${schema}.subscription (\n event text not null,\n name text not null REFERENCES ${schema}.queue ON DELETE CASCADE,\n created_on timestamp with time zone not null default now(),\n updated_on timestamp with time zone not null default now(),\n PRIMARY KEY(event, name)\n )\n `;\n}\nfunction createTableBam(schema) {\n return `\n CREATE TABLE ${schema}.bam (\n id uuid PRIMARY KEY default gen_random_uuid(),\n name text NOT NULL,\n version int NOT NULL,\n status text NOT NULL DEFAULT 'pending',\n queue text,\n table_name text NOT NULL,\n command text NOT NULL,\n error text,\n created_on timestamp with time zone NOT NULL DEFAULT now(),\n started_on timestamp with time zone,\n completed_on timestamp with time zone\n )\n `;\n}\nfunction createTableWarning(schema) {\n return `\n CREATE TABLE ${schema}.warning (\n id uuid PRIMARY KEY default gen_random_uuid(),\n type text NOT NULL,\n message text NOT NULL,\n data jsonb,\n created_on timestamp with time zone NOT NULL DEFAULT now()\n )\n `;\n}\nfunction createIndexWarning(schema) {\n return `CREATE INDEX warning_i1 ON ${schema}.warning (created_on DESC)`;\n}\nfunction jobTableFormatFunction(schema) {\n return `\n CREATE FUNCTION ${schema}.job_table_format(command text, table_name text)\n RETURNS text AS\n $$\n SELECT format(\n replace(\n replace(command, '.job', '.%1$I'),\n 'job_i', '%1$s_i'\n ),\n table_name\n );\n $$\n LANGUAGE sql IMMUTABLE;\n `;\n}\nfunction jobTableRunFunction(schema) {\n return `\n CREATE FUNCTION ${schema}.job_table_run(command text, tbl_name text DEFAULT NULL, queue_name text DEFAULT NULL)\n RETURNS VOID AS\n $$\n DECLARE\n tbl RECORD;\n BEGIN\n IF queue_name IS NOT NULL THEN\n SELECT table_name INTO tbl_name FROM ${schema}.queue WHERE name = queue_name;\n END IF;\n\n IF tbl_name IS NOT NULL THEN\n EXECUTE ${schema}.job_table_format(command, tbl_name);\n RETURN;\n END IF;\n\n EXECUTE ${schema}.job_table_format(command, '${COMMON_JOB_TABLE}');\n\n FOR tbl IN SELECT table_name FROM ${schema}.queue WHERE partition = true\n LOOP\n EXECUTE ${schema}.job_table_format(command, tbl.table_name);\n END LOOP;\n END;\n $$\n LANGUAGE plpgsql;\n `;\n}\nfunction jobTableRunAsyncFunction(schema) {\n return `\n CREATE FUNCTION ${schema}.job_table_run_async(command_name text, version int, command text, tbl_name text DEFAULT NULL, queue_name text DEFAULT NULL)\n RETURNS VOID AS\n $$\n BEGIN\n IF queue_name IS NOT NULL THEN\n SELECT table_name INTO tbl_name FROM ${schema}.queue WHERE name = queue_name;\n END IF;\n\n IF tbl_name IS NOT NULL THEN\n INSERT INTO ${schema}.bam (name, version, status, queue, table_name, command)\n VALUES (\n command_name,\n version,\n 'pending',\n queue_name,\n tbl_name,\n ${schema}.job_table_format(command, tbl_name)\n );\n RETURN;\n END IF;\n\n INSERT INTO ${schema}.bam (name, version, status, queue, table_name, command)\n SELECT\n command_name,\n version,\n 'pending',\n NULL,\n '${COMMON_JOB_TABLE}',\n ${schema}.job_table_format(command, '${COMMON_JOB_TABLE}')\n UNION ALL\n SELECT\n command_name,\n version,\n 'pending',\n queue.name,\n queue.table_name,\n ${schema}.job_table_format(command, queue.table_name)\n FROM ${schema}.queue\n WHERE partition = true;\n END;\n $$\n LANGUAGE plpgsql;\n `;\n}\nfunction createTableJob(schema) {\n return `\n CREATE TABLE ${schema}.job (\n id uuid not null default gen_random_uuid(),\n name text not null,\n priority integer not null default(0),\n data jsonb,\n state ${schema}.job_state not null default '${JOB_STATES.created}',\n retry_limit integer not null default ${QUEUE_DEFAULTS.retry_limit},\n retry_count integer not null default 0,\n retry_delay integer not null default ${QUEUE_DEFAULTS.retry_delay},\n retry_backoff boolean not null default ${QUEUE_DEFAULTS.retry_backoff},\n retry_delay_max integer,\n expire_seconds int not null default ${QUEUE_DEFAULTS.expire_seconds},\n deletion_seconds int not null default ${QUEUE_DEFAULTS.deletion_seconds},\n singleton_key text,\n singleton_on timestamp without time zone,\n group_id text,\n group_tier text,\n start_after timestamp with time zone not null default now(),\n created_on timestamp with time zone not null default now(),\n started_on timestamp with time zone,\n completed_on timestamp with time zone,\n keep_until timestamp with time zone NOT NULL default now() + interval '${QUEUE_DEFAULTS.retention_seconds}',\n output jsonb,\n dead_letter text,\n policy text,\n heartbeat_on timestamp with time zone,\n heartbeat_seconds int\n ) PARTITION BY LIST (name)\n `;\n}\nconst JOB_COLUMNS_MIN = 'id, name, data, expire_seconds as \"expireInSeconds\", heartbeat_seconds as \"heartbeatSeconds\", group_id as \"groupId\", group_tier as \"groupTier\"';\nconst JOB_COLUMNS_ALL = `${JOB_COLUMNS_MIN},\n policy,\n state,\n priority,\n retry_limit as \"retryLimit\",\n retry_count as \"retryCount\",\n retry_delay as \"retryDelay\",\n retry_backoff as \"retryBackoff\",\n retry_delay_max as \"retryDelayMax\",\n start_after as \"startAfter\",\n started_on as \"startedOn\",\n singleton_key as \"singletonKey\",\n singleton_on as \"singletonOn\",\n deletion_seconds as \"deleteAfterSeconds\",\n heartbeat_on as \"heartbeatOn\",\n created_on as \"createdOn\",\n completed_on as \"completedOn\",\n keep_until as \"keepUntil\",\n dead_letter as \"deadLetter\",\n output\n`;\nfunction createTableJobCommon(schema) {\n return `\n CREATE TABLE ${schema}.${COMMON_JOB_TABLE} (LIKE ${schema}.job INCLUDING GENERATED INCLUDING DEFAULTS);\n\n SELECT ${schema}.job_table_run($cmd$${createPrimaryKeyJob(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createQueueForeignKeyJob(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createQueueForeignKeyJobDeadLetter(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createIndexJobPolicyShort(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createIndexJobPolicySingleton(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createIndexJobPolicyStately(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createIndexJobPolicyExclusive(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createIndexJobPolicyKeyStrictFifo(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createCheckConstraintKeyStrictFifo(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createIndexJobThrottle(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createIndexJobFetch(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n SELECT ${schema}.job_table_run($cmd$${createIndexJobGroupConcurrency(schema)}$cmd$, '${COMMON_JOB_TABLE}');\n\n ALTER TABLE ${schema}.job ATTACH PARTITION ${schema}.${COMMON_JOB_TABLE} DEFAULT;\n `;\n}\nfunction createQueueFunction(schema) {\n return `\n CREATE FUNCTION ${schema}.create_queue(queue_name text, options jsonb)\n RETURNS VOID AS\n $$\n DECLARE\n tablename varchar := CASE WHEN options->>'partition' = 'true'\n THEN 'j' || encode(sha224(queue_name::bytea), 'hex')\n ELSE '${COMMON_JOB_TABLE}'\n END;\n queue_created_on timestamptz;\n BEGIN\n\n WITH q as (\n INSERT INTO ${schema}.queue (\n name,\n policy,\n retry_limit,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n expire_seconds,\n retention_seconds,\n deletion_seconds,\n warning_queued,\n dead_letter,\n partition,\n table_name,\n heartbeat_seconds\n )\n VALUES (\n queue_name,\n options->>'policy',\n COALESCE((options->>'retryLimit')::int, ${QUEUE_DEFAULTS.retry_limit}),\n COALESCE((options->>'retryDelay')::int, ${QUEUE_DEFAULTS.retry_delay}),\n COALESCE((options->>'retryBackoff')::bool, ${QUEUE_DEFAULTS.retry_backoff}),\n (options->>'retryDelayMax')::int,\n COALESCE((options->>'expireInSeconds')::int, ${QUEUE_DEFAULTS.expire_seconds}),\n COALESCE((options->>'retentionSeconds')::int, ${QUEUE_DEFAULTS.retention_seconds}),\n COALESCE((options->>'deleteAfterSeconds')::int, ${QUEUE_DEFAULTS.deletion_seconds}),\n COALESCE((options->>'warningQueueSize')::int, ${QUEUE_DEFAULTS.warning_queued}),\n options->>'deadLetter',\n COALESCE((options->>'partition')::bool, ${QUEUE_DEFAULTS.partition}),\n tablename,\n (options->>'heartbeatSeconds')::int\n )\n ON CONFLICT DO NOTHING\n RETURNING created_on\n )\n SELECT created_on into queue_created_on from q;\n\n IF queue_created_on IS NULL OR options->>'partition' IS DISTINCT FROM 'true' THEN\n RETURN;\n END IF;\n\n EXECUTE format('CREATE TABLE ${schema}.%I (LIKE ${schema}.job INCLUDING DEFAULTS)', tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$${createPrimaryKeyJob(schema)}$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$${createQueueForeignKeyJob(schema)}$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$${createQueueForeignKeyJobDeadLetter(schema)}$cmd$, tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$${createIndexJobFetch(schema)}$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$${createIndexJobThrottle(schema)}$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$${createIndexJobGroupConcurrency(schema)}$cmd$, tablename);\n\n IF options->>'policy' = 'short' THEN\n EXECUTE ${schema}.job_table_format($cmd$${createIndexJobPolicyShort(schema)}$cmd$, tablename);\n ELSIF options->>'policy' = 'singleton' THEN\n EXECUTE ${schema}.job_table_format($cmd$${createIndexJobPolicySingleton(schema)}$cmd$, tablename);\n ELSIF options->>'policy' = 'stately' THEN\n EXECUTE ${schema}.job_table_format($cmd$${createIndexJobPolicyStately(schema)}$cmd$, tablename);\n ELSIF options->>'policy' = 'exclusive' THEN\n EXECUTE ${schema}.job_table_format($cmd$${createIndexJobPolicyExclusive(schema)}$cmd$, tablename);\n ELSIF options->>'policy' = '${QUEUE_POLICIES.key_strict_fifo}' THEN\n EXECUTE ${schema}.job_table_format($cmd$${createIndexJobPolicyKeyStrictFifo(schema)}$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$${createCheckConstraintKeyStrictFifo(schema)}$cmd$, tablename);\n END IF;\n\n EXECUTE format('ALTER TABLE ${schema}.%I ADD CONSTRAINT cjc CHECK (name=%L)', tablename, queue_name);\n EXECUTE format('ALTER TABLE ${schema}.job ATTACH PARTITION ${schema}.%I FOR VALUES IN (%L)', tablename, queue_name);\n END;\n $$\n LANGUAGE plpgsql;\n `;\n}\nfunction deleteQueueFunction(schema) {\n return `\n CREATE FUNCTION ${schema}.delete_queue(queue_name text)\n RETURNS VOID AS\n $$\n DECLARE\n v_table varchar;\n v_partition bool;\n BEGIN\n SELECT table_name, partition\n FROM ${schema}.queue\n WHERE name = queue_name\n INTO v_table, v_partition;\n\n IF v_partition THEN\n EXECUTE format('DROP TABLE IF EXISTS ${schema}.%I', v_table);\n ELSE\n EXECUTE format('DELETE FROM ${schema}.%I WHERE name = %L', v_table, queue_name);\n END IF;\n\n DELETE FROM ${schema}.queue WHERE name = queue_name;\n END;\n $$\n LANGUAGE plpgsql;\n `;\n}\nfunction createQueue(schema, name, options) {\n const sql = `SELECT ${schema}.create_queue('${name}', '${JSON.stringify(options)}'::jsonb)`;\n return locked(schema, sql, 'create-queue');\n}\nfunction deleteQueue(schema, name) {\n const sql = `SELECT ${schema}.delete_queue('${name}')`;\n return locked(schema, sql, 'delete-queue');\n}\nfunction createPrimaryKeyJob(schema) {\n return `ALTER TABLE ${schema}.job ADD PRIMARY KEY (name, id)`;\n}\nfunction createQueueForeignKeyJob(schema) {\n return `ALTER TABLE ${schema}.job ADD CONSTRAINT q_fkey FOREIGN KEY (name) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED`;\n}\nfunction createQueueForeignKeyJobDeadLetter(schema) {\n return `ALTER TABLE ${schema}.job ADD CONSTRAINT dlq_fkey FOREIGN KEY (dead_letter) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED`;\n}\nfunction createIndexJobPolicyShort(schema) {\n return `CREATE UNIQUE INDEX job_i1 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = '${JOB_STATES.created}' AND policy = '${QUEUE_POLICIES.short}'`;\n}\nfunction createIndexJobPolicySingleton(schema) {\n return `CREATE UNIQUE INDEX job_i2 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = '${JOB_STATES.active}' AND policy = '${QUEUE_POLICIES.singleton}'`;\n}\nfunction createIndexJobPolicyStately(schema) {\n return `CREATE UNIQUE INDEX job_i3 ON ${schema}.job (name, state, COALESCE(singleton_key, '')) WHERE state <= '${JOB_STATES.active}' AND policy = '${QUEUE_POLICIES.stately}'`;\n}\nfunction createIndexJobThrottle(schema) {\n return `CREATE UNIQUE INDEX job_i4 ON ${schema}.job (name, singleton_on, COALESCE(singleton_key, '')) WHERE state <> '${JOB_STATES.cancelled}' AND singleton_on IS NOT NULL`;\n}\nfunction createIndexJobFetch(schema) {\n return `CREATE INDEX job_i5 ON ${schema}.job (name, start_after) INCLUDE (priority, created_on, id) WHERE state < '${JOB_STATES.active}'`;\n}\nfunction createIndexJobPolicyExclusive(schema) {\n return `CREATE UNIQUE INDEX job_i6 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state <= '${JOB_STATES.active}' AND policy = '${QUEUE_POLICIES.exclusive}'`;\n}\nfunction createIndexJobPolicyKeyStrictFifo(schema) {\n return `CREATE UNIQUE INDEX job_i8 ON ${schema}.job (name, singleton_key) WHERE state IN ('${JOB_STATES.active}', '${JOB_STATES.retry}', '${JOB_STATES.failed}') AND policy = '${QUEUE_POLICIES.key_strict_fifo}'`;\n}\nfunction createCheckConstraintKeyStrictFifo(schema) {\n return `ALTER TABLE ${schema}.job ADD CONSTRAINT job_key_strict_fifo_singleton_key_check CHECK (NOT (policy = '${QUEUE_POLICIES.key_strict_fifo}' AND singleton_key IS NULL))`;\n}\nfunction createIndexJobGroupConcurrency(schema) {\n return `CREATE INDEX job_i7 ON ${schema}.job (name, group_id) WHERE state = '${JOB_STATES.active}' AND group_id IS NOT NULL`;\n}\nfunction trySetQueueMonitorTime(schema, queues, seconds) {\n return trySetQueueTimestamp(schema, queues, 'monitor_on', seconds);\n}\nfunction trySetQueueDeletionTime(schema, queues, seconds) {\n return trySetQueueTimestamp(schema, queues, 'maintain_on', seconds);\n}\nfunction trySetCronTime(schema, seconds) {\n return trySetTimestamp(schema, 'cron_on', seconds);\n}\nfunction trySetBamTime(schema, seconds) {\n return trySetTimestamp(schema, 'bam_on', seconds);\n}\nfunction trySetTimestamp(schema, column, seconds) {\n return `\n UPDATE ${schema}.version\n SET ${column} = now()\n WHERE EXTRACT( EPOCH FROM (now() - COALESCE(${column}, now() - interval '1 week') ) ) > ${seconds}\n RETURNING true\n `;\n}\nfunction trySetQueueTimestamp(schema, queues, column, seconds) {\n return {\n text: `\n UPDATE ${schema}.queue\n SET ${column} = now()\n WHERE name = ANY($1::text[])\n AND EXTRACT( EPOCH FROM (now() - COALESCE(${column}, now() - interval '1 week') ) ) > ${seconds}\n RETURNING name\n `,\n values: [queues]\n };\n}\nfunction updateQueue(schema, { deadLetter } = {}) {\n return `\n WITH options as (SELECT $2::jsonb as data)\n UPDATE ${schema}.queue SET\n retry_limit = COALESCE((o.data->>'retryLimit')::int, retry_limit),\n retry_delay = COALESCE((o.data->>'retryDelay')::int, retry_delay),\n retry_backoff = COALESCE((o.data->>'retryBackoff')::bool, retry_backoff),\n retry_delay_max = CASE WHEN o.data ? 'retryDelayMax'\n THEN (o.data->>'retryDelayMax')::int\n ELSE retry_delay_max END,\n expire_seconds = COALESCE((o.data->>'expireInSeconds')::int, expire_seconds),\n retention_seconds = COALESCE((o.data->>'retentionSeconds')::int, retention_seconds),\n deletion_seconds = COALESCE((o.data->>'deleteAfterSeconds')::int, deletion_seconds),\n warning_queued = COALESCE((o.data->>'warningQueueSize')::int, warning_queued),\n heartbeat_seconds = CASE WHEN o.data ? 'heartbeatSeconds'\n THEN (o.data->>'heartbeatSeconds')::int\n ELSE heartbeat_seconds END,\n ${deadLetter === undefined\n ? ''\n : `dead_letter = CASE WHEN '${deadLetter}' IS DISTINCT FROM dead_letter THEN '${deadLetter}' ELSE dead_letter END,`}\n updated_on = now()\n FROM options o\n WHERE name = $1\n `;\n}\nfunction getQueues(schema, names) {\n const hasNames = names && names.length > 0;\n return {\n text: `\n SELECT\n q.name,\n q.policy,\n q.retry_limit as \"retryLimit\",\n q.retry_delay as \"retryDelay\",\n q.retry_backoff as \"retryBackoff\",\n q.retry_delay_max as \"retryDelayMax\",\n q.expire_seconds as \"expireInSeconds\",\n q.retention_seconds as \"retentionSeconds\",\n q.deletion_seconds as \"deleteAfterSeconds\",\n q.partition,\n q.heartbeat_seconds as \"heartbeatSeconds\",\n q.dead_letter as \"deadLetter\",\n q.deferred_count as \"deferredCount\",\n q.warning_queued as \"warningQueueSize\",\n q.queued_count as \"queuedCount\",\n q.active_count as \"activeCount\",\n q.total_count as \"totalCount\",\n q.singletons_active as \"singletonsActive\",\n q.table_name as \"table\",\n q.created_on as \"createdOn\",\n q.updated_on as \"updatedOn\"\n FROM ${schema}.queue q\n ${hasNames ? 'WHERE q.name = ANY($1::text[])' : ''}\n `,\n values: hasNames ? [names] : []\n };\n}\nfunction deleteJobsById(schema, table) {\n return `\n WITH results as (\n DELETE FROM ${schema}.${table}\n WHERE name = $1\n AND id IN (SELECT UNNEST($2::uuid[]))\n RETURNING 1\n )\n SELECT COUNT(*) from results\n `;\n}\nfunction deleteQueuedJobs(schema, table) {\n return `DELETE from ${schema}.${table} WHERE name = $1 and state < '${JOB_STATES.active}'`;\n}\nfunction deleteStoredJobs(schema, table) {\n return `DELETE from ${schema}.${table} WHERE name = $1 and state > '${JOB_STATES.active}'`;\n}\nfunction truncateTable(schema, table) {\n return `TRUNCATE ${schema}.${table}`;\n}\nfunction deleteAllJobs(schema, table) {\n return `DELETE from ${schema}.${table} WHERE name = $1`;\n}\nfunction getSchedules(schema) {\n return `SELECT * FROM ${schema}.schedule ORDER BY name, key`;\n}\nfunction getSchedulesByQueue(schema) {\n return `SELECT * FROM ${schema}.schedule WHERE name = $1 AND COALESCE(key, '') = $2`;\n}\nfunction schedule(schema) {\n return `\n INSERT INTO ${schema}.schedule (name, key, cron, timezone, data, options)\n VALUES ($1, $2, $3, $4, $5, $6)\n ON CONFLICT (name, key) DO UPDATE SET\n cron = EXCLUDED.cron,\n timezone = EXCLUDED.timezone,\n data = EXCLUDED.data,\n options = EXCLUDED.options,\n updated_on = now()\n `;\n}\nfunction unschedule(schema) {\n return `\n DELETE FROM ${schema}.schedule\n WHERE name = $1\n AND COALESCE(key, '') = $2\n `;\n}\nfunction subscribe(schema) {\n return `\n INSERT INTO ${schema}.subscription (event, name)\n VALUES ($1, $2)\n ON CONFLICT (event, name) DO UPDATE SET\n event = EXCLUDED.event,\n name = EXCLUDED.name,\n updated_on = now()\n `;\n}\nfunction unsubscribe(schema) {\n return `\n DELETE FROM ${schema}.subscription\n WHERE event = $1 and name = $2\n `;\n}\nfunction getQueuesForEvent(schema) {\n return `\n SELECT name FROM ${schema}.subscription\n WHERE event = $1\n `;\n}\nfunction getTime() {\n return \"SELECT round(date_part('epoch', now()) * 1000) as time\";\n}\nfunction insertWarning(schema) {\n return `\n INSERT INTO ${schema}.warning (type, message, data)\n VALUES ($1, $2, $3)\n `;\n}\nfunction getWarnings(schema) {\n return `\n SELECT\n id,\n type,\n message,\n data,\n created_on as \"createdOn\"\n FROM ${schema}.warning\n WHERE ($1::text IS NULL OR type = $1)\n ORDER BY created_on DESC\n LIMIT $2 OFFSET $3\n `;\n}\nfunction getWarningsCount(schema) {\n return `\n SELECT COUNT(*)::int as count\n FROM ${schema}.warning\n WHERE ($1::text IS NULL OR type = $1)\n `;\n}\nfunction deleteOldWarnings(schema, days) {\n return `\n DELETE FROM ${schema}.warning\n WHERE created_on < now() - interval '${days} days'\n `;\n}\nfunction getVersion(schema) {\n return `SELECT version from ${schema}.version`;\n}\nfunction setVersion(schema, version) {\n return `UPDATE ${schema}.version SET version = '${version}'`;\n}\nfunction versionTableExists(schema) {\n return `SELECT to_regclass('${schema}.version') as name`;\n}\nfunction insertVersion(schema, version) {\n return `INSERT INTO ${schema}.version(version) VALUES ('${version}')`;\n}\nfunction buildFetchParams(options) {\n const { ignoreSingletons, ignoreGroups, groupConcurrency, minPriority, maxPriority } = options;\n const hasIgnoreSingletons = ignoreSingletons != null && ignoreSingletons.length > 0;\n const hasIgnoreGroups = ignoreGroups != null && ignoreGroups.length > 0;\n const hasGroupConcurrency = groupConcurrency != null;\n const hasMinPriority = minPriority != null;\n const hasMaxPriority = maxPriority != null;\n const groupConcurrencyConfig = hasGroupConcurrency\n ? (typeof groupConcurrency === 'number' ? { default: groupConcurrency } : groupConcurrency)\n : null;\n const hasTiers = groupConcurrencyConfig?.tiers && Object.keys(groupConcurrencyConfig.tiers).length > 0;\n const values = [];\n let paramIndex = 0;\n let ignoreSingletonsParam = '';\n let ignoreGroupsParam = '';\n let defaultGroupLimitParam = '';\n let tiersParam = '';\n let minPriorityParam = '';\n let maxPriorityParam = '';\n if (hasIgnoreSingletons) {\n paramIndex++;\n ignoreSingletonsParam = `$${paramIndex}::text[]`;\n values.push(ignoreSingletons);\n }\n if (hasIgnoreGroups) {\n paramIndex++;\n ignoreGroupsParam = `$${paramIndex}::text[]`;\n values.push(ignoreGroups);\n }\n if (hasGroupConcurrency && groupConcurrencyConfig) {\n paramIndex++;\n defaultGroupLimitParam = `$${paramIndex}::int`;\n values.push(groupConcurrencyConfig.default);\n if (hasTiers) {\n paramIndex++;\n tiersParam = `$${paramIndex}::jsonb`;\n values.push(JSON.stringify(groupConcurrencyConfig.tiers));\n }\n }\n if (hasMinPriority) {\n paramIndex++;\n minPriorityParam = `$${paramIndex}::int`;\n values.push(minPriority);\n }\n if (hasMaxPriority) {\n paramIndex++;\n maxPriorityParam = `$${paramIndex}::int`;\n values.push(maxPriority);\n }\n return { values, ignoreSingletonsParam, ignoreGroupsParam, defaultGroupLimitParam, tiersParam, minPriorityParam, maxPriorityParam };\n}\nfunction fetchNextJob(options) {\n const { schema, table, name, policy, limit, includeMetadata, priority = true, orderByCreatedOn = true, ignoreStartAfter = false, groupConcurrency, minPriority, maxPriority } = options;\n const singletonFetch = limit > 1 && (policy === QUEUE_POLICIES.singleton || policy === QUEUE_POLICIES.stately);\n const hasIgnoreSingletons = options.ignoreSingletons != null && options.ignoreSingletons.length > 0;\n const hasIgnoreGroups = options.ignoreGroups != null && options.ignoreGroups.length > 0;\n const hasGroupConcurrency = groupConcurrency != null;\n const hasMinPriority = minPriority != null;\n const hasMaxPriority = maxPriority != null;\n const hasTiers = hasGroupConcurrency &&\n typeof groupConcurrency === 'object' &&\n groupConcurrency.tiers &&\n Object.keys(groupConcurrency.tiers).length > 0;\n const params = buildFetchParams(options);\n const selectCols = [\n 'j.id',\n singletonFetch ? 'j.singleton_key' : '',\n hasGroupConcurrency ? 'j.group_id, j.group_tier' : ''\n ].filter(Boolean).join(', ');\n // MATERIALIZED forces Postgres to compute this aggregation once and cache the\n // result. Without it, Postgres 12+ may inline the CTE and re-evaluate the\n // COUNT query at each reference site. active_group_counts is referenced twice:\n // once in the next CTE join (to pre-filter saturated groups before LIMIT) and\n // once in group_ranking (to enforce the per-batch concurrency limit).\n const activeGroupCountsCte = hasGroupConcurrency\n ? `active_group_counts AS MATERIALIZED (\n SELECT group_id, COUNT(*)::int as active_cnt\n FROM ${schema}.${table}\n WHERE name = '${name}' AND state = '${JOB_STATES.active}' AND group_id IS NOT NULL\n GROUP BY group_id\n ), `\n : '';\n // Column references are qualified with j. throughout so both the base case and\n // the groupConcurrency branch (which joins active_group_counts) share one set of\n // expressions. The join introduces agc.group_id which would otherwise be ambiguous.\n const whereConditions = [\n `j.name = '${name}'`,\n `j.state < '${JOB_STATES.active}'`,\n !ignoreStartAfter ? 'j.start_after < now()' : '',\n hasIgnoreSingletons ? `j.singleton_key <> ALL(${params.ignoreSingletonsParam})` : '',\n hasIgnoreGroups ? `(j.group_id IS NULL OR j.group_id <> ALL(${params.ignoreGroupsParam}))` : '',\n hasMinPriority ? `j.priority >= ${params.minPriorityParam}` : '',\n hasMaxPriority ? `j.priority <= ${params.maxPriorityParam}` : '',\n hasGroupConcurrency\n ? `(j.group_id IS NULL\n OR agc.active_cnt IS NULL\n OR agc.active_cnt < ${hasTiers\n ? `COALESCE((${params.tiersParam} ->> j.group_tier)::int, ${params.defaultGroupLimitParam})`\n : params.defaultGroupLimitParam})`\n : ''\n ].filter(Boolean).join('\\n AND ');\n const nextCte = `\n next AS (\n SELECT ${selectCols}\n FROM ${schema}.${table} j\n ${hasGroupConcurrency ? 'LEFT JOIN active_group_counts agc ON j.group_id = agc.group_id' : ''}\n WHERE ${whereConditions}\n ORDER BY ${priority ? 'j.priority desc, ' : ''}${orderByCreatedOn ? 'j.created_on, ' : ''}j.id\n LIMIT ${limit}\n FOR UPDATE OF j SKIP LOCKED\n )`;\n const singletonCte = singletonFetch\n ? `, singleton_ranking AS (\n SELECT id, ${hasGroupConcurrency ? 'group_id, group_tier, ' : ''}\n row_number() OVER (PARTITION BY singleton_key) as singleton_rn\n FROM next\n )`\n : '';\n const groupConcurrencyCtes = hasGroupConcurrency\n ? `,\n group_ranking AS (\n SELECT t.id\n , t.group_id\n , t.group_tier\n ${singletonFetch ? ', singleton_rn' : ''}\n , ROW_NUMBER() OVER (PARTITION BY t.group_id ORDER BY t.id) as group_rn\n , COALESCE(agc.active_cnt, 0) as active_cnt\n FROM ${singletonFetch ? 'singleton_ranking' : 'next'} t\n LEFT JOIN active_group_counts agc ON t.group_id = agc.group_id\n ${singletonFetch ? 'WHERE singleton_rn = 1' : ''}\n ),\n group_filtered AS (\n SELECT id FROM group_ranking\n WHERE group_id IS NULL\n OR (active_cnt + group_rn) <= ${hasTiers\n ? `COALESCE((${params.tiersParam} ->> group_tier)::int, ${params.defaultGroupLimitParam})`\n : params.defaultGroupLimitParam}\n )`\n : '';\n const finalCte = (hasGroupConcurrency)\n ? 'group_filtered'\n : (singletonFetch)\n ? 'singleton_ranking'\n : 'next';\n return {\n text: `\n WITH\n ${activeGroupCountsCte}\n ${nextCte}\n ${singletonCte}\n ${groupConcurrencyCtes}\n UPDATE ${schema}.${table} j SET\n state = '${JOB_STATES.active}',\n started_on = now(),\n heartbeat_on = now(),\n retry_count = CASE WHEN started_on IS NOT NULL THEN retry_count + 1 ELSE retry_count END\n FROM ${finalCte}\n WHERE name = '${name}' AND j.id = ${finalCte}.id\n ${singletonFetch && !hasGroupConcurrency ? 'AND singleton_rn = 1' : ''}\n RETURNING j.${includeMetadata ? JOB_COLUMNS_ALL : JOB_COLUMNS_MIN}\n `,\n values: params.values\n };\n}\nfunction completeJobs(schema, table, includeQueued) {\n const stateFilter = includeQueued\n ? `state < '${JOB_STATES.completed}'`\n : `state = '${JOB_STATES.active}'`;\n return `\n WITH results AS (\n UPDATE ${schema}.${table}\n SET completed_on = now(),\n state = '${JOB_STATES.completed}',\n output = $3::jsonb\n WHERE name = $1\n AND id IN (SELECT UNNEST($2::uuid[]))\n AND ${stateFilter}\n RETURNING *\n )\n SELECT COUNT(*) FROM results\n `;\n}\nfunction cancelJobs(schema, table) {\n return `\n WITH results as (\n UPDATE ${schema}.${table}\n SET completed_on = now(),\n state = '${JOB_STATES.cancelled}'\n WHERE name = $1\n AND id IN (SELECT UNNEST($2::uuid[]))\n AND state < '${JOB_STATES.completed}'\n RETURNING 1\n )\n SELECT COUNT(*) from results\n `;\n}\nfunction resumeJobs(schema, table) {\n return `\n WITH results as (\n UPDATE ${schema}.${table}\n SET completed_on = NULL,\n state = '${JOB_STATES.created}'\n WHERE name = $1\n AND id IN (SELECT UNNEST($2::uuid[]))\n AND state = '${JOB_STATES.cancelled}'\n RETURNING 1\n )\n SELECT COUNT(*) from results\n `;\n}\nfunction restoreJobs(schema, table) {\n return `\n UPDATE ${schema}.${table}\n SET state = '${JOB_STATES.created}',\n started_on = NULL,\n heartbeat_on = NULL\n WHERE name = $1\n AND id IN (SELECT UNNEST($2::uuid[]))\n `;\n}\nfunction insertJobs(schema, { table, name, returnId = true }) {\n const sql = `\n INSERT INTO ${schema}.${table} (\n id,\n name,\n data,\n priority,\n start_after,\n singleton_key,\n singleton_on,\n group_id,\n group_tier,\n expire_seconds,\n deletion_seconds,\n keep_until,\n retry_limit,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n policy,\n dead_letter,\n heartbeat_seconds\n )\n SELECT\n COALESCE(id, gen_random_uuid()) as id,\n '${name}' as name,\n data,\n COALESCE(priority, 0) as priority,\n j.start_after,\n \"singletonKey\",\n CASE\n WHEN \"singletonSeconds\" IS NOT NULL THEN 'epoch'::timestamp + '1s'::interval * (\"singletonSeconds\" * floor(( date_part('epoch', now()) + COALESCE(\"singletonOffset\",0)) / \"singletonSeconds\" ))\n ELSE NULL\n END as singleton_on,\n \"groupId\" as group_id,\n \"groupTier\" as group_tier,\n COALESCE(\"expireInSeconds\", q.expire_seconds) as expire_seconds,\n COALESCE(\"deleteAfterSeconds\", q.deletion_seconds) as deletion_seconds,\n j.start_after + (COALESCE(\"retentionSeconds\", q.retention_seconds) * interval '1s') as keep_until,\n COALESCE(\"retryLimit\", q.retry_limit) as retry_limit,\n COALESCE(\"retryDelay\", q.retry_delay) as retry_delay,\n COALESCE(\"retryBackoff\", q.retry_backoff, false) as retry_backoff,\n COALESCE(\"retryDelayMax\", q.retry_delay_max) as retry_delay_max,\n q.policy,\n COALESCE(\"deadLetter\", q.dead_letter) as dead_letter,\n COALESCE(\"heartbeatSeconds\", q.heartbeat_seconds) as heartbeat_seconds\n FROM (\n SELECT *,\n CASE\n WHEN right(\"startAfter\", 1) = 'Z' THEN CAST(\"startAfter\" as timestamp with time zone)\n ELSE now() + CAST(COALESCE(\"startAfter\",'0') as interval)\n END as start_after\n FROM json_to_recordset($1::json) as x (\n id uuid,\n priority integer,\n data jsonb,\n \"startAfter\" text,\n \"retryLimit\" integer,\n \"retryDelay\" integer,\n \"retryDelayMax\" integer,\n \"retryBackoff\" boolean,\n \"singletonKey\" text,\n \"singletonSeconds\" integer,\n \"singletonOffset\" integer,\n \"groupId\" text,\n \"groupTier\" text,\n \"expireInSeconds\" integer,\n \"deleteAfterSeconds\" integer,\n \"retentionSeconds\" integer,\n \"deadLetter\" text,\n \"heartbeatSeconds\" integer\n )\n ) j\n JOIN ${schema}.queue q ON q.name = '${name}'\n ON CONFLICT DO NOTHING\n ${returnId ? 'RETURNING id' : ''}\n `;\n return sql;\n}\nfunction failJobsById(schema, table) {\n const where = `name = $1 AND id IN (SELECT UNNEST($2::uuid[])) AND state < '${JOB_STATES.completed}'`;\n const output = '$3::jsonb';\n return failJobs(schema, table, where, output);\n}\nfunction failJobsByTimeout(schema, table, queues) {\n const where = `state = '${JOB_STATES.active}'\n AND (started_on + expire_seconds * interval '1s') < now()\n AND name = ANY(${serializeArrayParam(queues)})`;\n const output = '\\'{ \"value\": { \"message\": \"job timed out\" } }\\'::jsonb';\n return locked(schema, failJobs(schema, table, where, output), table + 'failJobsByTimeout');\n}\nfunction failJobsByHeartbeat(schema, table, queues) {\n const where = `state = '${JOB_STATES.active}'\n AND heartbeat_seconds IS NOT NULL\n AND (heartbeat_on + heartbeat_seconds * interval '1s') < now()\n AND name = ANY(${serializeArrayParam(queues)})`;\n const output = '\\'{ \"value\": { \"message\": \"job heartbeat timeout\" } }\\'::jsonb';\n return locked(schema, failJobs(schema, table, where, output), table + 'failJobsByHeartbeat');\n}\nfunction touchJobs(schema, table) {\n return `\n WITH results AS (\n UPDATE ${schema}.${table}\n SET heartbeat_on = now()\n WHERE name = $1\n AND id IN (SELECT UNNEST($2::uuid[]))\n AND state = '${JOB_STATES.active}'\n RETURNING 1\n )\n SELECT COUNT(*) FROM results\n `;\n}\nfunction failJobs(schema, table, where, output) {\n return `\n WITH deleted_jobs AS (\n DELETE FROM ${schema}.${table}\n WHERE ${where}\n RETURNING *\n ),\n retried_jobs AS (\n INSERT INTO ${schema}.${table} (\n id,\n name,\n priority,\n data,\n state,\n retry_limit,\n retry_count,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n start_after,\n started_on,\n singleton_key,\n singleton_on,\n group_id,\n group_tier,\n expire_seconds,\n deletion_seconds,\n created_on,\n completed_on,\n keep_until,\n policy,\n output,\n dead_letter,\n heartbeat_on,\n heartbeat_seconds\n )\n SELECT\n id,\n name,\n priority,\n data,\n CASE\n WHEN retry_count < retry_limit THEN '${JOB_STATES.retry}'::${schema}.job_state\n ELSE '${JOB_STATES.failed}'::${schema}.job_state\n END as state,\n retry_limit,\n retry_count,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n CASE WHEN retry_count = retry_limit THEN start_after\n WHEN NOT retry_backoff THEN now() + retry_delay * interval '1'\n ELSE now() + LEAST(\n retry_delay_max,\n retry_delay * (\n 2 ^ LEAST(16, retry_count + 1) / 2 +\n 2 ^ LEAST(16, retry_count + 1) / 2 * random()\n )\n ) * interval '1s'\n END as start_after,\n started_on,\n singleton_key,\n singleton_on,\n group_id,\n group_tier,\n expire_seconds,\n deletion_seconds,\n created_on,\n CASE WHEN retry_count < retry_limit THEN NULL ELSE now() END as completed_on,\n keep_until,\n policy,\n ${output},\n dead_letter,\n NULL as heartbeat_on,\n heartbeat_seconds\n FROM deleted_jobs\n ON CONFLICT DO NOTHING\n RETURNING *\n ),\n failed_jobs as (\n INSERT INTO ${schema}.${table} (\n id,\n name,\n priority,\n data,\n state,\n retry_limit,\n retry_count,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n start_after,\n started_on,\n singleton_key,\n singleton_on,\n group_id,\n group_tier,\n expire_seconds,\n deletion_seconds,\n created_on,\n completed_on,\n keep_until,\n policy,\n output,\n dead_letter,\n heartbeat_on,\n heartbeat_seconds\n )\n SELECT\n id,\n name,\n priority,\n data,\n '${JOB_STATES.failed}'::${schema}.job_state as state,\n retry_limit,\n retry_count,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n start_after,\n started_on,\n singleton_key,\n singleton_on,\n group_id,\n group_tier,\n expire_seconds,\n deletion_seconds,\n created_on,\n now() as completed_on,\n keep_until,\n policy,\n ${output},\n dead_letter,\n NULL as heartbeat_on,\n heartbeat_seconds\n FROM deleted_jobs\n WHERE id NOT IN (SELECT id from retried_jobs)\n RETURNING *\n ),\n results as (\n SELECT * FROM retried_jobs\n UNION ALL\n SELECT * FROM failed_jobs\n ),\n dlq_jobs as (\n INSERT INTO ${schema}.job (name, data, output, retry_limit, retry_backoff, retry_delay, keep_until, deletion_seconds)\n SELECT\n r.dead_letter,\n data,\n output,\n q.retry_limit,\n q.retry_backoff,\n q.retry_delay,\n now() + q.retention_seconds * interval '1s',\n q.deletion_seconds\n FROM results r\n JOIN ${schema}.queue q ON q.name = r.dead_letter\n WHERE state = '${JOB_STATES.failed}'\n )\n SELECT COUNT(*) FROM results\n `;\n}\nfunction deletion(schema, table, queues) {\n const sql = `\n DELETE FROM ${schema}.${table}\n WHERE name = ANY(${serializeArrayParam(queues)})\n AND\n (\n (deletion_seconds > 0 AND completed_on + deletion_seconds * interval '1s' < now())\n OR\n (state < '${JOB_STATES.active}' AND keep_until < now())\n )\n `;\n return locked(schema, sql, table + 'deletion');\n}\nfunction retryJobs(schema, table) {\n return `\n WITH results as (\n UPDATE ${schema}.job\n SET state = '${JOB_STATES.retry}',\n retry_limit = retry_limit + 1\n WHERE name = $1\n AND id IN (SELECT UNNEST($2::uuid[]))\n AND state = '${JOB_STATES.failed}'\n RETURNING 1\n )\n SELECT COUNT(*) from results\n `;\n}\nfunction getQueueStats(schema, table, queues) {\n return {\n text: `\n SELECT\n name,\n (count(*) FILTER (WHERE start_after > now()))::int as \"deferredCount\",\n (count(*) FILTER (WHERE state < '${JOB_STATES.active}'))::int as \"queuedCount\",\n (count(*) FILTER (WHERE state = '${JOB_STATES.active}'))::int as \"activeCount\",\n count(*)::int as \"totalCount\",\n array_agg(singleton_key) FILTER (WHERE policy IN ('${QUEUE_POLICIES.singleton}','${QUEUE_POLICIES.stately}') AND state = '${JOB_STATES.active}') as \"singletonsActive\"\n FROM ${schema}.${table}\n WHERE name = ANY($1::text[])\n GROUP BY 1\n `,\n values: [queues]\n };\n}\nfunction cacheQueueStats(schema, table, queues) {\n const statsQuery = getQueueStats(schema, table, queues);\n // Serialize the $1 parameter for use in locked() multi-statement query\n const statsText = statsQuery.text.replace('$1::text[]', serializeArrayParam(queues));\n const sql = `\n WITH stats AS (${statsText})\n UPDATE ${schema}.queue SET\n deferred_count = COALESCE(stats.\"deferredCount\", 0),\n queued_count = COALESCE(stats.\"queuedCount\", 0),\n active_count = COALESCE(stats.\"activeCount\", 0),\n total_count = COALESCE(stats.\"totalCount\", 0),\n singletons_active = stats.\"singletonsActive\"\n FROM (\n SELECT q.name\n FROM unnest(${serializeArrayParam(queues)}) AS q(name)\n ) q\n LEFT JOIN stats ON stats.name = q.name\n WHERE queue.name = q.name\n RETURNING\n queue.name,\n queue.queued_count as \"queuedCount\",\n queue.warning_queued as \"warningQueueSize\"\n `;\n return locked(schema, sql, 'queue-stats');\n}\n// Serialize a string array for embedding directly in SQL as PostgreSQL array literal\nfunction serializeArrayParam(values) {\n const escaped = values.map(v => `'${v.replace(SINGLE_QUOTE_REGEX, \"''\")}'`);\n return `ARRAY[${escaped.join(',')}]::text[]`;\n}\nfunction locked(schema, query, key) {\n const sql = Array.isArray(query) ? query.join(';\\n') : query;\n return `\n BEGIN;\n SET LOCAL lock_timeout = 30000;\n SET LOCAL idle_in_transaction_session_timeout = 30000;\n ${advisoryLock(schema, key)};\n ${sql};\n COMMIT;\n `;\n}\nfunction advisoryLock(schema, key) {\n return `SELECT pg_advisory_xact_lock(\n ('x' || encode(sha224((current_database() || '.pgboss.${schema}${key || ''}')::bytea), 'hex'))::bit(64)::bigint\n )`;\n}\nfunction assertMigration(schema, version) {\n // raises 'division by zero' if already on desired schema version\n return `SELECT version::int/(version::int-${version}) from ${schema}.version`;\n}\nfunction findJobs(schema, table, options) {\n const { queued, byKey, byData, byId } = options;\n let paramIndex = 1;\n const whereConditions = [];\n if (byId) {\n ++paramIndex;\n whereConditions.push(`AND id = $${paramIndex}`);\n }\n if (byKey) {\n ++paramIndex;\n whereConditions.push(`AND singleton_key = $${paramIndex}`);\n }\n if (byData) {\n ++paramIndex;\n whereConditions.push(`AND data @> $${paramIndex}`);\n }\n if (queued) {\n whereConditions.push(`AND state < '${JOB_STATES.active}'`);\n }\n return `\n SELECT ${JOB_COLUMNS_ALL}\n FROM ${schema}.${table}\n WHERE name = $1\n ${whereConditions.join('\\n ')}\n `;\n}\nfunction getJobById(schema, table) {\n return `\n SELECT ${JOB_COLUMNS_ALL}\n FROM ${schema}.${table}\n WHERE name = $1\n AND id = $2\n `;\n}\nfunction getBlockedKeys(schema, table) {\n return `\n SELECT DISTINCT singleton_key as \"singletonKey\"\n FROM ${schema}.${table}\n WHERE name = $1\n AND state = '${JOB_STATES.failed}'\n AND policy = '${QUEUE_POLICIES.key_strict_fifo}'\n `;\n}\nfunction getNextBamCommand(schema) {\n return `\n UPDATE ${schema}.bam\n SET status = 'in_progress', started_on = now()\n WHERE id = (\n SELECT id FROM ${schema}.bam\n WHERE status IN ('pending', 'failed')\n AND NOT EXISTS (SELECT 1 FROM ${schema}.bam WHERE status = 'in_progress')\n ORDER BY created_on\n LIMIT 1\n )\n RETURNING id, name, version, status, queue, table_name as \"table\", command, error,\n created_on as \"createdOn\", started_on as \"startedOn\", completed_on as \"completedOn\"\n `;\n}\nfunction setBamCompleted(schema, id) {\n return `\n UPDATE ${schema}.bam\n SET status = 'completed', completed_on = now()\n WHERE id = '${id}'\n `;\n}\nfunction setBamFailed(schema, id, error) {\n const escapedError = error.replace(/'/g, \"''\");\n return `\n UPDATE ${schema}.bam\n SET status = 'failed', error = '${escapedError}', completed_on = now()\n WHERE id = '${id}'\n `;\n}\nfunction getBamStatus(schema) {\n return `\n SELECT status, count(*)::int as count, max(created_on) as \"lastCreatedOn\"\n FROM ${schema}.bam\n GROUP BY status\n `;\n}\nfunction getBamEntries(schema) {\n return `\n SELECT id, name, version, status, queue, table_name as \"table\", command, error,\n created_on as \"createdOn\", started_on as \"startedOn\", completed_on as \"completedOn\"\n FROM ${schema}.bam\n ORDER BY version, created_on\n `;\n}\nexport { create, insertVersion, getVersion, setVersion, versionTableExists, fetchNextJob, completeJobs, cancelJobs, resumeJobs, restoreJobs, retryJobs, findJobs, deleteJobsById, deleteAllJobs, deleteQueuedJobs, deleteStoredJobs, truncateTable, failJobsById, failJobsByTimeout, failJobsByHeartbeat, touchJobs, insertJobs, getTime, getSchedules, getSchedulesByQueue, schedule, unschedule, subscribe, unsubscribe, getQueuesForEvent, deletion, cacheQueueStats, updateQueue, createQueue, deleteQueue, getQueues, getQueueStats, trySetQueueMonitorTime, trySetQueueDeletionTime, trySetCronTime, trySetBamTime, locked, assertMigration, getJobById, insertWarning, getWarnings, getWarningsCount, deleteOldWarnings, createTableWarning, createIndexWarning, getBlockedKeys, getNextBamCommand, setBamCompleted, setBamFailed, getBamStatus, getBamEntries, serializeArrayParam, QUEUE_POLICIES, JOB_STATES, MIGRATE_RACE_MESSAGE, CREATE_RACE_MESSAGE, DEFAULT_SCHEMA, };\n","import assert from 'node:assert';\nimport { DEFAULT_SCHEMA } from \"./plans.js\";\nconst POLICY = {\n MAX_EXPIRATION_HOURS: 24,\n MIN_POLLING_INTERVAL_MS: 500,\n MAX_RETENTION_DAYS: 365\n};\nfunction assertObjectName(value, name = 'Name') {\n assert(/^[\\w.\\-/]+$/.test(value), `${name} can only contain alphanumeric characters, underscores, hyphens, periods, or forward slashes`);\n}\nfunction validateQueueArgs(config = {}) {\n assert(!('deadLetter' in config) || config.deadLetter === null || (typeof config.deadLetter === 'string'), 'deadLetter must be a string');\n if (config.deadLetter) {\n assertObjectName(config.deadLetter, 'deadLetter');\n }\n validateRetryConfig(config);\n validateExpirationConfig(config);\n validateRetentionConfig(config);\n validateDeletionConfig(config);\n validateHeartbeatConfig(config);\n}\nfunction checkSendArgs(args) {\n let name, data, options;\n if (typeof args[0] === 'string') {\n name = args[0];\n data = args[1];\n assert(typeof data !== 'function', 'send() cannot accept a function as the payload. Did you intend to use work()?');\n options = args[2];\n }\n else if (typeof args[0] === 'object') {\n assert(args.length === 1, 'send object API only accepts 1 argument');\n const job = args[0];\n assert(job, 'boss requires all jobs to have a name');\n name = job.name;\n data = job.data;\n options = job.options;\n }\n options = options || {};\n assert(name, 'boss requires all jobs to have a queue name');\n assert(typeof options === 'object', 'options should be an object');\n options = { ...options };\n assert(!('priority' in options) || (Number.isInteger(options.priority)), 'priority must be an integer');\n options.priority = options.priority || 0;\n options.startAfter = (options.startAfter instanceof Date && typeof options.startAfter.toISOString === 'function')\n ? options.startAfter.toISOString()\n : (+options.startAfter > 0)\n ? '' + options.startAfter\n : (typeof options.startAfter === 'string')\n ? options.startAfter\n : undefined;\n validateRetryConfig(options);\n validateExpirationConfig(options);\n validateRetentionConfig(options);\n validateDeletionConfig(options);\n validateGroupConfig(options);\n validateHeartbeatConfig(options);\n return { name, data, options };\n}\nfunction validateGroupConfig(config) {\n if (!('group' in config) || config.group === undefined || config.group === null) {\n return;\n }\n assert(typeof config.group === 'object', 'group must be an object');\n assert(typeof config.group.id === 'string' && config.group.id.length > 0, 'group.id must be a non-empty string');\n assert(!('tier' in config.group) || (typeof config.group.tier === 'string' && config.group.tier.length > 0), 'group.tier must be a non-empty string if provided');\n}\nfunction validateGroupConcurrencyValue(value, optionName) {\n if (typeof value === 'number') {\n assert(Number.isInteger(value) && value >= 1, `${optionName} must be an integer >= 1`);\n return;\n }\n assert(typeof value === 'object', `${optionName} must be a number or an object with { default, tiers? }`);\n assert(Number.isInteger(value.default) && value.default >= 1, `${optionName}.default must be an integer >= 1`);\n if ('tiers' in value && value.tiers) {\n assert(typeof value.tiers === 'object', `${optionName}.tiers must be an object`);\n for (const [tier, limit] of Object.entries(value.tiers)) {\n assert(typeof tier === 'string' && tier.length > 0, `${optionName} tier keys must be non-empty strings`);\n assert(Number.isInteger(limit) && limit >= 1, `${optionName}.tiers[\"${tier}\"] must be an integer >= 1`);\n }\n }\n}\nfunction validatePriorityRangeConfig(config) {\n if (config.minPriority !== undefined) {\n assert(Number.isInteger(config.minPriority), 'minPriority must be an integer');\n }\n if (config.maxPriority !== undefined) {\n assert(Number.isInteger(config.maxPriority), 'maxPriority must be an integer');\n }\n if (config.minPriority !== undefined && config.maxPriority !== undefined) {\n assert(config.minPriority <= config.maxPriority, 'minPriority must be <= maxPriority');\n }\n}\nfunction validateGroupConcurrencyConfig(config) {\n const hasGlobal = config.groupConcurrency != null;\n const hasLocal = config.localGroupConcurrency != null;\n assert(!(hasGlobal && hasLocal), 'cannot specify both groupConcurrency and localGroupConcurrency - choose one');\n if (hasGlobal)\n validateGroupConcurrencyValue(config.groupConcurrency, 'groupConcurrency');\n if (hasLocal) {\n validateGroupConcurrencyValue(config.localGroupConcurrency, 'localGroupConcurrency');\n validateLocalGroupConcurrencyLimit(config.localGroupConcurrency, config.localConcurrency);\n }\n}\nfunction validateLocalGroupConcurrencyLimit(localGroupConcurrency, localConcurrency) {\n const effectiveLocalConcurrency = localConcurrency ?? 1;\n if (typeof localGroupConcurrency === 'number') {\n assert(localGroupConcurrency <= effectiveLocalConcurrency, `localGroupConcurrency (${localGroupConcurrency}) cannot exceed localConcurrency (${effectiveLocalConcurrency})`);\n }\n else if (typeof localGroupConcurrency === 'object') {\n assert(localGroupConcurrency.default <= effectiveLocalConcurrency, `localGroupConcurrency.default (${localGroupConcurrency.default}) cannot exceed localConcurrency (${effectiveLocalConcurrency})`);\n if (localGroupConcurrency.tiers) {\n for (const [tier, limit] of Object.entries(localGroupConcurrency.tiers)) {\n assert(limit <= effectiveLocalConcurrency, `localGroupConcurrency.tiers[\"${tier}\"] (${limit}) cannot exceed localConcurrency (${effectiveLocalConcurrency})`);\n }\n }\n }\n}\nfunction checkWorkArgs(name, args) {\n let options, callback;\n assert(name, 'queue name is required');\n if (args.length === 1) {\n callback = args[0];\n options = {};\n }\n else if (args.length > 1) {\n options = args[0] || {};\n callback = args[1];\n }\n assert(typeof callback === 'function', 'expected callback to be a function');\n assert(typeof options === 'object', 'expected config to be an object');\n options = { ...options };\n applyPollingInterval(options);\n assert(!('batchSize' in options) || (Number.isInteger(options.batchSize) && options.batchSize >= 1), 'batchSize must be an integer > 0');\n assert(!('includeMetadata' in options) || typeof options.includeMetadata === 'boolean', 'includeMetadata must be a boolean');\n assert(!('priority' in options) || typeof options.priority === 'boolean', 'priority must be a boolean');\n assert(!('localConcurrency' in options) || (Number.isInteger(options.localConcurrency) && options.localConcurrency >= 1), 'localConcurrency must be an integer >= 1');\n validatePriorityRangeConfig(options);\n validateGroupConcurrencyConfig(options);\n validateHeartbeatRefreshConfig(options);\n return { options, callback };\n}\nfunction checkFetchArgs(name, options) {\n assert(name, 'missing queue name');\n assert(!('batchSize' in options) || (Number.isInteger(options.batchSize) && options.batchSize >= 1), 'batchSize must be an integer > 0');\n assert(!('includeMetadata' in options) || typeof options.includeMetadata === 'boolean', 'includeMetadata must be a boolean');\n assert(!('priority' in options) || typeof options.priority === 'boolean', 'priority must be a boolean');\n assert(!('ignoreStartAfter' in options) || typeof options.ignoreStartAfter === 'boolean', 'ignoreStartAfter must be a boolean');\n validatePriorityRangeConfig(options);\n}\nfunction getConfig(value) {\n assert(value && (typeof value === 'object' || typeof value === 'string'), 'configuration assert: string or config object is required to connect to postgres');\n const config = (typeof value === 'string')\n ? { connectionString: value }\n : { ...value };\n config.schedule = ('schedule' in config) ? config.schedule : true;\n config.supervise = ('supervise' in config) ? config.supervise : true;\n config.migrate = ('migrate' in config) ? config.migrate : true;\n config.createSchema = ('createSchema' in config) ? config.createSchema : true;\n applySchemaConfig(config);\n applyOpsConfig(config);\n applyScheduleConfig(config);\n applyBamConfig(config);\n validateWarningConfig(config);\n return config;\n}\nfunction applySchemaConfig(config) {\n if (config.schema) {\n assertPostgresObjectName(config.schema);\n }\n config.schema = config.schema || DEFAULT_SCHEMA;\n}\nfunction validateWarningConfig(config) {\n assert(!('warningQueueSize' in config) || config.warningQueueSize >= 1, 'configuration assert: warningQueueSize must be at least 1');\n assert(!('warningSlowQuerySeconds' in config) || config.warningSlowQuerySeconds >= 1, 'configuration assert: warningSlowQuerySeconds must be at least 1');\n assert(!('warningRetentionDays' in config) || (Number.isInteger(config.warningRetentionDays) && config.warningRetentionDays >= 1), 'configuration assert: warningRetentionDays must be an integer >= 1');\n assert(!('warningRetentionDays' in config) || config.warningRetentionDays <= POLICY.MAX_RETENTION_DAYS, `configuration assert: warningRetentionDays cannot exceed ${POLICY.MAX_RETENTION_DAYS} days`);\n}\nfunction assertPostgresObjectName(name) {\n assert(typeof name === 'string', 'Name must be a string');\n assert(name.length <= 50, 'Name cannot exceed 50 characters');\n assert(!/\\W/.test(name), 'Name can only contain alphanumeric characters or underscores');\n assert(!/^\\d/.test(name), 'Name cannot start with a number');\n}\nfunction assertQueueName(name) {\n assert(name, 'Name is required');\n assert(typeof name === 'string', 'Name must be a string');\n assertObjectName(name);\n}\nfunction assertKey(key) {\n if (!key)\n return;\n assert(typeof key === 'string', 'Key must be a string');\n assertObjectName(key, 'Key');\n}\nfunction validateRetentionConfig(config) {\n assert(!('retentionSeconds' in config) || config.retentionSeconds >= 1, 'configuration assert: retentionSeconds must be at least every second');\n}\nfunction validateExpirationConfig(config) {\n assert(!('expireInSeconds' in config) || config.expireInSeconds >= 1, 'configuration assert: expireInSeconds must be at least every second');\n assert(!config.expireInSeconds || config.expireInSeconds / 60 / 60 < POLICY.MAX_EXPIRATION_HOURS, `configuration assert: expiration cannot exceed ${POLICY.MAX_EXPIRATION_HOURS} hours`);\n}\nfunction validateRetryConfig(config) {\n assert(!('retryDelay' in config) || (Number.isInteger(config.retryDelay) && config.retryDelay >= 0), 'retryDelay must be an integer >= 0');\n assert(!('retryLimit' in config) || (Number.isInteger(config.retryLimit) && config.retryLimit >= 0), 'retryLimit must be an integer >= 0');\n assert(!('retryBackoff' in config) || (config.retryBackoff === true || config.retryBackoff === false), 'retryBackoff must be either true or false');\n assert(!('retryDelayMax' in config) || config.retryDelayMax === null || config.retryBackoff === true, 'retryDelayMax can only be set if retryBackoff is true');\n assert(!('retryDelayMax' in config) || config.retryDelayMax === null || (Number.isInteger(config.retryDelayMax) && config.retryDelayMax >= 0), 'retryDelayMax must be an integer >= 0');\n}\nfunction validateHeartbeatConfig(config) {\n assert(!('heartbeatSeconds' in config) || config.heartbeatSeconds === null || (Number.isInteger(config.heartbeatSeconds) && config.heartbeatSeconds >= 10), 'heartbeatSeconds must be an integer >= 10');\n}\nfunction validateHeartbeatRefreshConfig(config) {\n if (!('heartbeatRefreshSeconds' in config) || config.heartbeatRefreshSeconds == null)\n return;\n assert(typeof config.heartbeatRefreshSeconds === 'number' && config.heartbeatRefreshSeconds > 0, 'heartbeatRefreshSeconds must be a number > 0');\n}\nfunction applyPollingInterval(config) {\n assert(!('pollingIntervalSeconds' in config) || config.pollingIntervalSeconds >= POLICY.MIN_POLLING_INTERVAL_MS / 1000, `configuration assert: pollingIntervalSeconds must be at least every ${POLICY.MIN_POLLING_INTERVAL_MS}ms`);\n config.pollingInterval = ('pollingIntervalSeconds' in config)\n ? config.pollingIntervalSeconds * 1000\n : 2000;\n}\nfunction applyOpsConfig(config) {\n assert(!('superviseIntervalSeconds' in config) || config.superviseIntervalSeconds >= 1, 'configuration assert: superviseIntervalSeconds must be at least every second');\n config.superviseIntervalSeconds = config.superviseIntervalSeconds || 60;\n assert(config.superviseIntervalSeconds / 60 / 60 <= POLICY.MAX_EXPIRATION_HOURS, `configuration assert: superviseIntervalSeconds cannot exceed ${POLICY.MAX_EXPIRATION_HOURS} hours`);\n assert(!('maintenanceIntervalSeconds' in config) || config.maintenanceIntervalSeconds >= 1, 'configuration assert: maintenanceIntervalSeconds must be at least every second');\n config.maintenanceIntervalSeconds = config.maintenanceIntervalSeconds || POLICY.MAX_EXPIRATION_HOURS * 60 * 60;\n assert(config.maintenanceIntervalSeconds / 60 / 60 <= POLICY.MAX_EXPIRATION_HOURS, `configuration assert: maintenanceIntervalSeconds cannot exceed ${POLICY.MAX_EXPIRATION_HOURS} hours`);\n assert(!('monitorIntervalSeconds' in config) || config.monitorIntervalSeconds >= 1, 'configuration assert: monitorIntervalSeconds must be at least every second');\n config.monitorIntervalSeconds = config.monitorIntervalSeconds || 60;\n assert(config.monitorIntervalSeconds / 60 / 60 <= POLICY.MAX_EXPIRATION_HOURS, `configuration assert: monitorIntervalSeconds cannot exceed ${POLICY.MAX_EXPIRATION_HOURS} hours`);\n assert(!('queueCacheIntervalSeconds' in config) || config.queueCacheIntervalSeconds >= 1, 'configuration assert: queueCacheIntervalSeconds must be at least every second');\n config.queueCacheIntervalSeconds = config.queueCacheIntervalSeconds || 60;\n assert(config.queueCacheIntervalSeconds / 60 / 60 <= POLICY.MAX_EXPIRATION_HOURS, `configuration assert: queueCacheIntervalSeconds cannot exceed ${POLICY.MAX_EXPIRATION_HOURS} hours`);\n}\nfunction validateDeletionConfig(config) {\n assert(!('deleteAfterSeconds' in config) || config.deleteAfterSeconds >= 0, 'configuration assert: deleteAfterSeconds must be at least 0 (0 disables deletion)');\n}\nfunction applyScheduleConfig(config) {\n assert(!('clockMonitorIntervalSeconds' in config) || (config.clockMonitorIntervalSeconds >= 1 && config.clockMonitorIntervalSeconds <= 600), 'configuration assert: clockMonitorIntervalSeconds must be between 1 second and 10 minutes');\n config.clockMonitorIntervalSeconds = config.clockMonitorIntervalSeconds || 600;\n assert(!('cronMonitorIntervalSeconds' in config) || (config.cronMonitorIntervalSeconds >= 1 && config.cronMonitorIntervalSeconds <= 45), 'configuration assert: cronMonitorIntervalSeconds must be between 1 and 45 seconds');\n config.cronMonitorIntervalSeconds = config.cronMonitorIntervalSeconds || 30;\n assert(!('cronWorkerIntervalSeconds' in config) || (config.cronWorkerIntervalSeconds >= 1 && config.cronWorkerIntervalSeconds <= 45), 'configuration assert: cronWorkerIntervalSeconds must be between 1 and 45 seconds');\n config.cronWorkerIntervalSeconds = config.cronWorkerIntervalSeconds || 5;\n}\nfunction applyBamConfig(config) {\n const minInterval = config.__test__bypass_bam_interval_check ? 1 : 10;\n assert(!('bamIntervalSeconds' in config) || config.bamIntervalSeconds >= minInterval, `configuration assert: bamIntervalSeconds must be at least ${minInterval} seconds`);\n config.bamIntervalSeconds = config.bamIntervalSeconds || 60;\n}\nexport { assertKey, assertPostgresObjectName, assertQueueName, checkFetchArgs, checkSendArgs, checkWorkArgs, getConfig, POLICY, validateQueueArgs };\n","import assert from 'node:assert';\nimport * as plans from \"./plans.js\";\nimport * as types from \"./types.js\";\nfunction flatten(schema, commands, version) {\n commands.unshift(plans.assertMigration(schema, version));\n commands.push(plans.setVersion(schema, version));\n return plans.locked(schema, commands);\n}\nfunction rollback(schema, version, migrations) {\n migrations = migrations || getAll(schema);\n const result = migrations.find(i => i.version === version);\n assert(result, `Version ${version} not found.`);\n return flatten(schema, result.uninstall || [], result.previous);\n}\nfunction next(schema, version, migrations) {\n migrations = migrations || getAll(schema);\n const result = migrations.find(i => i.previous === version);\n assert(result, `Version ${version} not found.`);\n return flatten(schema, result.install, result.version);\n}\nfunction migrate(schema, version, migrations) {\n migrations = migrations || getAll(schema);\n const result = migrations\n .filter(i => i.previous >= version)\n .sort((a, b) => a.version - b.version)\n .reduce((acc, migration) => {\n acc.install = acc.install.concat(migration.install);\n if (migration.async) {\n const bamCommands = migration.async.map(cmd => cmd.replace(/\\$VERSION\\$/g, String(migration.version)));\n acc.install = acc.install.concat(bamCommands);\n }\n acc.version = migration.version;\n return acc;\n }, { install: [], version });\n assert(result.install.length > 0, `Version ${version} not found.`);\n return flatten(schema, result.install, result.version);\n}\nfunction getAll(schema) {\n return [\n {\n release: '11.1.0',\n version: 26,\n previous: 25,\n install: [\n `\n CREATE OR REPLACE FUNCTION ${schema}.create_queue(queue_name text, options jsonb)\n RETURNS VOID AS\n $$\n DECLARE\n tablename varchar := CASE WHEN options->>'partition' = 'true'\n THEN 'j' || encode(sha224(queue_name::bytea), 'hex')\n ELSE 'job_common'\n END;\n queue_created_on timestamptz;\n BEGIN\n\n WITH q as (\n INSERT INTO ${schema}.queue (\n name,\n policy,\n retry_limit,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n expire_seconds,\n retention_seconds,\n deletion_seconds,\n warning_queued,\n dead_letter,\n partition,\n table_name\n )\n VALUES (\n queue_name,\n options->>'policy',\n COALESCE((options->>'retryLimit')::int, 2),\n COALESCE((options->>'retryDelay')::int, 0),\n COALESCE((options->>'retryBackoff')::bool, false),\n (options->>'retryDelayMax')::int,\n COALESCE((options->>'expireInSeconds')::int, 900),\n COALESCE((options->>'retentionSeconds')::int, 1209600),\n COALESCE((options->>'deleteAfterSeconds')::int, 604800),\n COALESCE((options->>'warningQueueSize')::int, 0),\n options->>'deadLetter',\n COALESCE((options->>'partition')::bool, false),\n tablename\n )\n ON CONFLICT DO NOTHING\n RETURNING created_on\n )\n SELECT created_on into queue_created_on from q;\n\n IF queue_created_on IS NULL OR options->>'partition' IS DISTINCT FROM 'true' THEN\n RETURN;\n END IF;\n\n EXECUTE format('CREATE TABLE ${schema}.%I (LIKE ${schema}.job INCLUDING DEFAULTS)', tablename);\n\n EXECUTE format('ALTER TABLE ${schema}.%1$I ADD PRIMARY KEY (name, id)', tablename);\n EXECUTE format('ALTER TABLE ${schema}.%1$I ADD CONSTRAINT q_fkey FOREIGN KEY (name) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED', tablename);\n EXECUTE format('ALTER TABLE ${schema}.%1$I ADD CONSTRAINT dlq_fkey FOREIGN KEY (dead_letter) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED', tablename);\n\n EXECUTE format('CREATE INDEX %1$s_i5 ON ${schema}.%1$I (name, start_after) INCLUDE (priority, created_on, id) WHERE state < ''active''', tablename);\n EXECUTE format('CREATE UNIQUE INDEX %1$s_i4 ON ${schema}.%1$I (name, singleton_on, COALESCE(singleton_key, '''')) WHERE state <> ''cancelled'' AND singleton_on IS NOT NULL', tablename);\n\n IF options->>'policy' = 'short' THEN\n EXECUTE format('CREATE UNIQUE INDEX %1$s_i1 ON ${schema}.%1$I (name, COALESCE(singleton_key, '''')) WHERE state = ''created'' AND policy = ''short''', tablename);\n ELSIF options->>'policy' = 'singleton' THEN\n EXECUTE format('CREATE UNIQUE INDEX %1$s_i2 ON ${schema}.%1$I (name, COALESCE(singleton_key, '''')) WHERE state = ''active'' AND policy = ''singleton''', tablename);\n ELSIF options->>'policy' = 'stately' THEN\n EXECUTE format('CREATE UNIQUE INDEX %1$s_i3 ON ${schema}.%1$I (name, state, COALESCE(singleton_key, '''')) WHERE state <= ''active'' AND policy = ''stately''', tablename);\n ELSIF options->>'policy' = 'exclusive' THEN\n EXECUTE format('CREATE UNIQUE INDEX %1$s_i6 ON ${schema}.%1$I (name, COALESCE(singleton_key, '''')) WHERE state <= ''active'' AND policy = ''exclusive''', tablename);\n END IF;\n\n EXECUTE format('ALTER TABLE ${schema}.%I ADD CONSTRAINT cjc CHECK (name=%L)', tablename, queue_name);\n EXECUTE format('ALTER TABLE ${schema}.job ATTACH PARTITION ${schema}.%I FOR VALUES IN (%L)', tablename, queue_name);\n END;\n $$\n LANGUAGE plpgsql;\n `,\n `CREATE UNIQUE INDEX job_i6 ON ${schema}.job_common (name, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'exclusive'`\n ],\n uninstall: [\n `DROP INDEX ${schema}.job_i6`\n ]\n },\n {\n release: '12.6.0',\n version: 27,\n previous: 26,\n install: [\n `ALTER TABLE ${schema}.version ADD COLUMN IF NOT EXISTS bam_on timestamp with time zone`,\n `\n CREATE TABLE IF NOT EXISTS ${schema}.bam (\n id uuid PRIMARY KEY default gen_random_uuid(),\n name text NOT NULL,\n version int NOT NULL,\n status text NOT NULL DEFAULT 'pending',\n queue text,\n table_name text NOT NULL,\n command text NOT NULL,\n error text,\n created_on timestamp with time zone NOT NULL DEFAULT now(),\n started_on timestamp with time zone,\n completed_on timestamp with time zone\n )\n `,\n `CREATE FUNCTION ${schema}.job_table_format(command text, table_name text)\n RETURNS text AS\n $$\n SELECT format(\n replace(\n replace(command, '.job', '.%1$I'),\n 'job_i', '%1$s_i'\n ),\n table_name\n );\n $$\n LANGUAGE sql IMMUTABLE;\n `,\n `\n CREATE OR REPLACE FUNCTION ${schema}.job_table_run_async(command_name text, version int, command text, tbl_name text DEFAULT NULL, queue_name text DEFAULT NULL)\n RETURNS VOID AS\n $$\n BEGIN\n IF queue_name IS NOT NULL THEN\n SELECT table_name INTO tbl_name FROM ${schema}.queue WHERE name = queue_name;\n END IF;\n\n IF tbl_name IS NOT NULL THEN\n INSERT INTO ${schema}.bam (name, version, status, queue, table_name, command)\n VALUES (\n command_name,\n version,\n 'pending',\n queue_name,\n tbl_name,\n ${schema}.job_table_format(command, tbl_name)\n );\n RETURN;\n END IF;\n\n INSERT INTO ${schema}.bam (name, version, status, queue, table_name, command)\n SELECT\n command_name,\n version,\n 'pending',\n NULL,\n 'job_common',\n ${schema}.job_table_format(command, 'job_common')\n UNION ALL\n SELECT\n command_name,\n version,\n 'pending',\n queue.name,\n queue.table_name,\n ${schema}.job_table_format(command, queue.table_name)\n FROM ${schema}.queue\n WHERE partition = true;\n END;\n $$\n LANGUAGE plpgsql;\n `,\n `\n CREATE OR REPLACE FUNCTION ${schema}.job_table_run(command text, tbl_name text DEFAULT NULL, queue_name text DEFAULT NULL)\n RETURNS VOID AS\n $$\n DECLARE\n tbl RECORD;\n BEGIN\n IF queue_name IS NOT NULL THEN\n SELECT table_name INTO tbl_name FROM ${schema}.queue WHERE name = queue_name;\n END IF;\n\n IF tbl_name IS NOT NULL THEN\n EXECUTE ${schema}.job_table_format(command, tbl_name);\n RETURN;\n END IF;\n\n EXECUTE ${schema}.job_table_format(command, 'job_common');\n\n FOR tbl IN SELECT table_name FROM ${schema}.queue WHERE partition = true\n LOOP\n EXECUTE ${schema}.job_table_format(command, tbl.table_name);\n END LOOP;\n END;\n $$\n LANGUAGE plpgsql;\n `,\n `ALTER TABLE ${schema}.job ADD COLUMN IF NOT EXISTS group_id text`,\n `ALTER TABLE ${schema}.job ADD COLUMN IF NOT EXISTS group_tier text`,\n `\n CREATE OR REPLACE FUNCTION ${schema}.create_queue(queue_name text, options jsonb)\n RETURNS VOID AS\n $$\n DECLARE\n tablename varchar := CASE WHEN options->>'partition' = 'true'\n THEN 'j' || encode(sha224(queue_name::bytea), 'hex')\n ELSE 'job_common'\n END;\n queue_created_on timestamptz;\n BEGIN\n\n WITH q as (\n INSERT INTO ${schema}.queue (\n name,\n policy,\n retry_limit,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n expire_seconds,\n retention_seconds,\n deletion_seconds,\n warning_queued,\n dead_letter,\n partition,\n table_name\n )\n VALUES (\n queue_name,\n options->>'policy',\n COALESCE((options->>'retryLimit')::int, 2),\n COALESCE((options->>'retryDelay')::int, 0),\n COALESCE((options->>'retryBackoff')::bool, false),\n (options->>'retryDelayMax')::int,\n COALESCE((options->>'expireInSeconds')::int, 900),\n COALESCE((options->>'retentionSeconds')::int, 1209600),\n COALESCE((options->>'deleteAfterSeconds')::int, 604800),\n COALESCE((options->>'warningQueueSize')::int, 0),\n options->>'deadLetter',\n COALESCE((options->>'partition')::bool, false),\n tablename\n )\n ON CONFLICT DO NOTHING\n RETURNING created_on\n )\n SELECT created_on into queue_created_on from q;\n\n IF queue_created_on IS NULL OR options->>'partition' IS DISTINCT FROM 'true' THEN\n RETURN;\n END IF;\n\n EXECUTE format('CREATE TABLE ${schema}.%I (LIKE ${schema}.job INCLUDING DEFAULTS)', tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD PRIMARY KEY (name, id)$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT q_fkey FOREIGN KEY (name) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT dlq_fkey FOREIGN KEY (dead_letter) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED$cmd$, tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$CREATE INDEX job_i5 ON ${schema}.job (name, start_after) INCLUDE (priority, created_on, id) WHERE state < 'active'$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i4 ON ${schema}.job (name, singleton_on, COALESCE(singleton_key, '')) WHERE state <> 'cancelled' AND singleton_on IS NOT NULL$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$CREATE INDEX job_i7 ON ${schema}.job (name, group_id) WHERE state = 'active' AND group_id IS NOT NULL$cmd$, tablename);\n\n IF options->>'policy' = 'short' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i1 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = 'created' AND policy = 'short'$cmd$, tablename);\n ELSIF options->>'policy' = 'singleton' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i2 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = 'active' AND policy = 'singleton'$cmd$, tablename);\n ELSIF options->>'policy' = 'stately' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i3 ON ${schema}.job (name, state, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'stately'$cmd$, tablename);\n ELSIF options->>'policy' = 'exclusive' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i6 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'exclusive'$cmd$, tablename);\n END IF;\n\n EXECUTE format('ALTER TABLE ${schema}.%I ADD CONSTRAINT cjc CHECK (name=%L)', tablename, queue_name);\n EXECUTE format('ALTER TABLE ${schema}.job ATTACH PARTITION ${schema}.%I FOR VALUES IN (%L)', tablename, queue_name);\n END;\n $$\n LANGUAGE plpgsql;\n `,\n `ALTER INDEX IF EXISTS ${schema}.job_i1 RENAME TO job_common_i1`,\n `ALTER INDEX IF EXISTS ${schema}.job_i2 RENAME TO job_common_i2`,\n `ALTER INDEX IF EXISTS ${schema}.job_i3 RENAME TO job_common_i3`,\n `ALTER INDEX IF EXISTS ${schema}.job_i4 RENAME TO job_common_i4`,\n `ALTER INDEX IF EXISTS ${schema}.job_i5 RENAME TO job_common_i5`,\n `ALTER INDEX IF EXISTS ${schema}.job_i6 RENAME TO job_common_i6`,\n `ALTER INDEX IF EXISTS ${schema}.job_i7 RENAME TO job_common_i7`\n ],\n async: [\n `SELECT ${schema}.job_table_run_async(\n 'group_concurency_index',\n $VERSION$,\n $$\n CREATE INDEX CONCURRENTLY job_i7 ON ${schema}.job (name, group_id) WHERE state = 'active' AND group_id IS NOT NULL\n $$\n )`\n ],\n uninstall: [\n `ALTER INDEX ${schema}.job_common_i6 RENAME TO job_i6`,\n `ALTER INDEX ${schema}.job_common_i5 RENAME TO job_i5`,\n `ALTER INDEX ${schema}.job_common_i4 RENAME TO job_i4`,\n `ALTER INDEX ${schema}.job_common_i3 RENAME TO job_i3`,\n `ALTER INDEX ${schema}.job_common_i2 RENAME TO job_i2`,\n `ALTER INDEX ${schema}.job_common_i1 RENAME TO job_i1`,\n `SELECT ${schema}.job_table_run('DROP INDEX ${schema}.job_i7')`,\n `\n CREATE OR REPLACE FUNCTION ${schema}.create_queue(queue_name text, options jsonb)\n RETURNS VOID AS\n $$\n DECLARE\n tablename varchar := CASE WHEN options->>'partition' = 'true'\n THEN 'j' || encode(sha224(queue_name::bytea), 'hex')\n ELSE 'job_common'\n END;\n queue_created_on timestamptz;\n BEGIN\n\n WITH q as (\n INSERT INTO ${schema}.queue (\n name,\n policy,\n retry_limit,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n expire_seconds,\n retention_seconds,\n deletion_seconds,\n warning_queued,\n dead_letter,\n partition,\n table_name\n )\n VALUES (\n queue_name,\n options->>'policy',\n COALESCE((options->>'retryLimit')::int, 2),\n COALESCE((options->>'retryDelay')::int, 0),\n COALESCE((options->>'retryBackoff')::bool, false),\n (options->>'retryDelayMax')::int,\n COALESCE((options->>'expireInSeconds')::int, 900),\n COALESCE((options->>'retentionSeconds')::int, 1209600),\n COALESCE((options->>'deleteAfterSeconds')::int, 604800),\n COALESCE((options->>'warningQueueSize')::int, 0),\n options->>'deadLetter',\n COALESCE((options->>'partition')::bool, false),\n tablename\n )\n ON CONFLICT DO NOTHING\n RETURNING created_on\n )\n SELECT created_on into queue_created_on from q;\n\n IF queue_created_on IS NULL OR options->>'partition' IS DISTINCT FROM 'true' THEN\n RETURN;\n END IF;\n\n EXECUTE format('CREATE TABLE ${schema}.%I (LIKE ${schema}.job INCLUDING DEFAULTS)', tablename);\n\n EXECUTE format('ALTER TABLE ${schema}.%1$I ADD PRIMARY KEY (name, id)', tablename);\n EXECUTE format('ALTER TABLE ${schema}.%1$I ADD CONSTRAINT q_fkey FOREIGN KEY (name) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED', tablename);\n EXECUTE format('ALTER TABLE ${schema}.%1$I ADD CONSTRAINT dlq_fkey FOREIGN KEY (dead_letter) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED', tablename);\n\n EXECUTE format('CREATE INDEX %1$s_i5 ON ${schema}.%1$I (name, start_after) INCLUDE (priority, created_on, id) WHERE state < ''active''', tablename);\n EXECUTE format('CREATE UNIQUE INDEX %1$s_i4 ON ${schema}.%1$I (name, singleton_on, COALESCE(singleton_key, '''')) WHERE state <> ''cancelled'' AND singleton_on IS NOT NULL', tablename);\n\n IF options->>'policy' = 'short' THEN\n EXECUTE format('CREATE UNIQUE INDEX %1$s_i1 ON ${schema}.%1$I (name, COALESCE(singleton_key, '''')) WHERE state = ''created'' AND policy = ''short''', tablename);\n ELSIF options->>'policy' = 'singleton' THEN\n EXECUTE format('CREATE UNIQUE INDEX %1$s_i2 ON ${schema}.%1$I (name, COALESCE(singleton_key, '''')) WHERE state = ''active'' AND policy = ''singleton''', tablename);\n ELSIF options->>'policy' = 'stately' THEN\n EXECUTE format('CREATE UNIQUE INDEX %1$s_i3 ON ${schema}.%1$I (name, state, COALESCE(singleton_key, '''')) WHERE state <= ''active'' AND policy = ''stately''', tablename);\n ELSIF options->>'policy' = 'exclusive' THEN\n EXECUTE format('CREATE UNIQUE INDEX %1$s_i6 ON ${schema}.%1$I (name, COALESCE(singleton_key, '''')) WHERE state <= ''active'' AND policy = ''exclusive''', tablename);\n END IF;\n\n EXECUTE format('ALTER TABLE ${schema}.%I ADD CONSTRAINT cjc CHECK (name=%L)', tablename, queue_name);\n EXECUTE format('ALTER TABLE ${schema}.job ATTACH PARTITION ${schema}.%I FOR VALUES IN (%L)', tablename, queue_name);\n END;\n $$\n LANGUAGE plpgsql;\n `,\n `DROP FUNCTION ${schema}.job_table_run(text, text, text)`,\n `DROP FUNCTION ${schema}.job_table_run_async(text, int, text, text, text)`,\n `DROP FUNCTION ${schema}.job_table_format(text, text)`,\n `DROP TABLE ${schema}.bam`,\n `ALTER TABLE ${schema}.version DROP COLUMN bam_on`,\n `ALTER TABLE ${schema}.job DROP COLUMN group_tier`,\n `ALTER TABLE ${schema}.job DROP COLUMN group_id`\n ]\n },\n {\n release: '12.10.0',\n version: 28,\n previous: 27,\n install: [\n // Create key_strict_fifo CHECK constraint on job_common (the default partition)\n `SELECT ${schema}.job_table_run($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT job_key_strict_fifo_singleton_key_check CHECK (NOT (policy = 'key_strict_fifo' AND singleton_key IS NULL))$cmd$, 'job_common')`,\n // Update create_queue function to include the FIFO index for partitioned tables\n `\n CREATE OR REPLACE FUNCTION ${schema}.create_queue(queue_name text, options jsonb)\n RETURNS VOID AS\n $$\n DECLARE\n tablename varchar := CASE WHEN options->>'partition' = 'true'\n THEN 'j' || encode(sha224(queue_name::bytea), 'hex')\n ELSE 'job_common'\n END;\n queue_created_on timestamptz;\n BEGIN\n\n WITH q as (\n INSERT INTO ${schema}.queue (\n name,\n policy,\n retry_limit,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n expire_seconds,\n retention_seconds,\n deletion_seconds,\n warning_queued,\n dead_letter,\n partition,\n table_name\n )\n VALUES (\n queue_name,\n options->>'policy',\n COALESCE((options->>'retryLimit')::int, 2),\n COALESCE((options->>'retryDelay')::int, 0),\n COALESCE((options->>'retryBackoff')::bool, false),\n (options->>'retryDelayMax')::int,\n COALESCE((options->>'expireInSeconds')::int, 900),\n COALESCE((options->>'retentionSeconds')::int, 1209600),\n COALESCE((options->>'deleteAfterSeconds')::int, 604800),\n COALESCE((options->>'warningQueueSize')::int, 0),\n options->>'deadLetter',\n COALESCE((options->>'partition')::bool, false),\n tablename\n )\n ON CONFLICT DO NOTHING\n RETURNING created_on\n )\n SELECT created_on into queue_created_on from q;\n\n IF queue_created_on IS NULL OR options->>'partition' IS DISTINCT FROM 'true' THEN\n RETURN;\n END IF;\n\n EXECUTE format('CREATE TABLE ${schema}.%I (LIKE ${schema}.job INCLUDING DEFAULTS)', tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD PRIMARY KEY (name, id)$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT q_fkey FOREIGN KEY (name) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT dlq_fkey FOREIGN KEY (dead_letter) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED$cmd$, tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$CREATE INDEX job_i5 ON ${schema}.job (name, start_after) INCLUDE (priority, created_on, id) WHERE state < 'active'$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i4 ON ${schema}.job (name, singleton_on, COALESCE(singleton_key, '')) WHERE state <> 'cancelled' AND singleton_on IS NOT NULL$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$CREATE INDEX job_i7 ON ${schema}.job (name, group_id) WHERE state = 'active' AND group_id IS NOT NULL$cmd$, tablename);\n\n IF options->>'policy' = 'short' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i1 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = 'created' AND policy = 'short'$cmd$, tablename);\n ELSIF options->>'policy' = 'singleton' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i2 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = 'active' AND policy = 'singleton'$cmd$, tablename);\n ELSIF options->>'policy' = 'stately' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i3 ON ${schema}.job (name, state, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'stately'$cmd$, tablename);\n ELSIF options->>'policy' = 'exclusive' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i6 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'exclusive'$cmd$, tablename);\n ELSIF options->>'policy' = 'key_strict_fifo' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i8 ON ${schema}.job (name, singleton_key) WHERE state IN ('active', 'retry', 'failed') AND policy = 'key_strict_fifo'$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT job_key_strict_fifo_singleton_key_check CHECK (NOT (policy = 'key_strict_fifo' AND singleton_key IS NULL))$cmd$, tablename);\n END IF;\n\n EXECUTE format('ALTER TABLE ${schema}.%I ADD CONSTRAINT cjc CHECK (name=%L)', tablename, queue_name);\n EXECUTE format('ALTER TABLE ${schema}.job ATTACH PARTITION ${schema}.%I FOR VALUES IN (%L)', tablename, queue_name);\n END;\n $$\n LANGUAGE plpgsql;\n `\n ],\n async: [\n `SELECT ${schema}.job_table_run_async(\n 'key_strict_fifo_index',\n $VERSION$,\n $$\n CREATE UNIQUE INDEX CONCURRENTLY job_i8 ON ${schema}.job (name, singleton_key) WHERE state IN ('active', 'retry', 'failed') AND policy = 'key_strict_fifo'\n $$\n , 'job_common')`\n ],\n uninstall: [\n `SELECT ${schema}.job_table_run('DROP INDEX IF EXISTS ${schema}.job_i8')`,\n `SELECT ${schema}.job_table_run('ALTER TABLE ${schema}.job DROP CONSTRAINT IF EXISTS job_key_strict_fifo_singleton_key_check')`,\n // Restore previous version of create_queue function (without key_strict_fifo support)\n `\n CREATE OR REPLACE FUNCTION ${schema}.create_queue(queue_name text, options jsonb)\n RETURNS VOID AS\n $$\n DECLARE\n tablename varchar := CASE WHEN options->>'partition' = 'true'\n THEN 'j' || encode(sha224(queue_name::bytea), 'hex')\n ELSE 'job_common'\n END;\n queue_created_on timestamptz;\n BEGIN\n\n WITH q as (\n INSERT INTO ${schema}.queue (\n name,\n policy,\n retry_limit,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n expire_seconds,\n retention_seconds,\n deletion_seconds,\n warning_queued,\n dead_letter,\n partition,\n table_name\n )\n VALUES (\n queue_name,\n options->>'policy',\n COALESCE((options->>'retryLimit')::int, 2),\n COALESCE((options->>'retryDelay')::int, 0),\n COALESCE((options->>'retryBackoff')::bool, false),\n (options->>'retryDelayMax')::int,\n COALESCE((options->>'expireInSeconds')::int, 900),\n COALESCE((options->>'retentionSeconds')::int, 1209600),\n COALESCE((options->>'deleteAfterSeconds')::int, 604800),\n COALESCE((options->>'warningQueueSize')::int, 0),\n options->>'deadLetter',\n COALESCE((options->>'partition')::bool, false),\n tablename\n )\n ON CONFLICT DO NOTHING\n RETURNING created_on\n )\n SELECT created_on into queue_created_on from q;\n\n IF queue_created_on IS NULL OR options->>'partition' IS DISTINCT FROM 'true' THEN\n RETURN;\n END IF;\n\n EXECUTE format('CREATE TABLE ${schema}.%I (LIKE ${schema}.job INCLUDING DEFAULTS)', tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD PRIMARY KEY (name, id)$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT q_fkey FOREIGN KEY (name) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT dlq_fkey FOREIGN KEY (dead_letter) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED$cmd$, tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$CREATE INDEX job_i5 ON ${schema}.job (name, start_after) INCLUDE (priority, created_on, id) WHERE state < 'active'$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i4 ON ${schema}.job (name, singleton_on, COALESCE(singleton_key, '')) WHERE state <> 'cancelled' AND singleton_on IS NOT NULL$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$CREATE INDEX job_i7 ON ${schema}.job (name, group_id) WHERE state = 'active' AND group_id IS NOT NULL$cmd$, tablename);\n\n IF options->>'policy' = 'short' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i1 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = 'created' AND policy = 'short'$cmd$, tablename);\n ELSIF options->>'policy' = 'singleton' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i2 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = 'active' AND policy = 'singleton'$cmd$, tablename);\n ELSIF options->>'policy' = 'stately' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i3 ON ${schema}.job (name, state, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'stately'$cmd$, tablename);\n ELSIF options->>'policy' = 'exclusive' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i6 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'exclusive'$cmd$, tablename);\n END IF;\n\n EXECUTE format('ALTER TABLE ${schema}.%I ADD CONSTRAINT cjc CHECK (name=%L)', tablename, queue_name);\n EXECUTE format('ALTER TABLE ${schema}.job ATTACH PARTITION ${schema}.%I FOR VALUES IN (%L)', tablename, queue_name);\n END;\n $$\n LANGUAGE plpgsql;\n `\n ]\n },\n {\n release: '12.11.0',\n version: 29,\n previous: 28,\n install: [\n `CREATE TABLE ${schema}.warning (\n id uuid PRIMARY KEY default gen_random_uuid(),\n type text NOT NULL,\n message text NOT NULL,\n data jsonb,\n created_on timestamp with time zone NOT NULL DEFAULT now()\n )`,\n `CREATE INDEX warning_i1 ON ${schema}.warning (created_on DESC)`\n ],\n uninstall: [\n `DROP INDEX ${schema}.warning_i1`,\n `DROP TABLE ${schema}.warning`\n ]\n },\n {\n release: '12.12.0',\n version: 30,\n previous: 29,\n install: [\n `ALTER TABLE ${schema}.job ADD COLUMN heartbeat_on timestamp with time zone`,\n `ALTER TABLE ${schema}.job ADD COLUMN heartbeat_seconds int`,\n `ALTER TABLE ${schema}.queue ADD COLUMN heartbeat_seconds int`,\n `\n CREATE OR REPLACE FUNCTION ${schema}.create_queue(queue_name text, options jsonb)\n RETURNS VOID AS\n $$\n DECLARE\n tablename varchar := CASE WHEN options->>'partition' = 'true'\n THEN 'j' || encode(sha224(queue_name::bytea), 'hex')\n ELSE 'job_common'\n END;\n queue_created_on timestamptz;\n BEGIN\n\n WITH q as (\n INSERT INTO ${schema}.queue (\n name,\n policy,\n retry_limit,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n expire_seconds,\n retention_seconds,\n deletion_seconds,\n warning_queued,\n dead_letter,\n partition,\n table_name,\n heartbeat_seconds\n )\n VALUES (\n queue_name,\n options->>'policy',\n COALESCE((options->>'retryLimit')::int, 2),\n COALESCE((options->>'retryDelay')::int, 0),\n COALESCE((options->>'retryBackoff')::bool, false),\n (options->>'retryDelayMax')::int,\n COALESCE((options->>'expireInSeconds')::int, 900),\n COALESCE((options->>'retentionSeconds')::int, 1209600),\n COALESCE((options->>'deleteAfterSeconds')::int, 604800),\n COALESCE((options->>'warningQueueSize')::int, 0),\n options->>'deadLetter',\n COALESCE((options->>'partition')::bool, false),\n tablename,\n (options->>'heartbeatSeconds')::int\n )\n ON CONFLICT DO NOTHING\n RETURNING created_on\n )\n SELECT created_on into queue_created_on from q;\n\n IF queue_created_on IS NULL OR options->>'partition' IS DISTINCT FROM 'true' THEN\n RETURN;\n END IF;\n\n EXECUTE format('CREATE TABLE ${schema}.%I (LIKE ${schema}.job INCLUDING DEFAULTS)', tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD PRIMARY KEY (name, id)$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT q_fkey FOREIGN KEY (name) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT dlq_fkey FOREIGN KEY (dead_letter) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED$cmd$, tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$CREATE INDEX job_i5 ON ${schema}.job (name, start_after) INCLUDE (priority, created_on, id) WHERE state < 'active'$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i4 ON ${schema}.job (name, singleton_on, COALESCE(singleton_key, '')) WHERE state <> 'cancelled' AND singleton_on IS NOT NULL$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$CREATE INDEX job_i7 ON ${schema}.job (name, group_id) WHERE state = 'active' AND group_id IS NOT NULL$cmd$, tablename);\n\n IF options->>'policy' = 'short' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i1 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = 'created' AND policy = 'short'$cmd$, tablename);\n ELSIF options->>'policy' = 'singleton' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i2 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = 'active' AND policy = 'singleton'$cmd$, tablename);\n ELSIF options->>'policy' = 'stately' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i3 ON ${schema}.job (name, state, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'stately'$cmd$, tablename);\n ELSIF options->>'policy' = 'exclusive' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i6 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'exclusive'$cmd$, tablename);\n ELSIF options->>'policy' = 'key_strict_fifo' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i8 ON ${schema}.job (name, singleton_key) WHERE state IN ('active', 'retry', 'failed') AND policy = 'key_strict_fifo'$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT job_key_strict_fifo_singleton_key_check CHECK (NOT (policy = 'key_strict_fifo' AND singleton_key IS NULL))$cmd$, tablename);\n END IF;\n\n EXECUTE format('ALTER TABLE ${schema}.%I ADD CONSTRAINT cjc CHECK (name=%L)', tablename, queue_name);\n EXECUTE format('ALTER TABLE ${schema}.job ATTACH PARTITION ${schema}.%I FOR VALUES IN (%L)', tablename, queue_name);\n END;\n $$\n LANGUAGE plpgsql;\n `\n ],\n uninstall: [\n // Restore previous version of create_queue function (without heartbeat_seconds)\n `\n CREATE OR REPLACE FUNCTION ${schema}.create_queue(queue_name text, options jsonb)\n RETURNS VOID AS\n $$\n DECLARE\n tablename varchar := CASE WHEN options->>'partition' = 'true'\n THEN 'j' || encode(sha224(queue_name::bytea), 'hex')\n ELSE 'job_common'\n END;\n queue_created_on timestamptz;\n BEGIN\n\n WITH q as (\n INSERT INTO ${schema}.queue (\n name,\n policy,\n retry_limit,\n retry_delay,\n retry_backoff,\n retry_delay_max,\n expire_seconds,\n retention_seconds,\n deletion_seconds,\n warning_queued,\n dead_letter,\n partition,\n table_name\n )\n VALUES (\n queue_name,\n options->>'policy',\n COALESCE((options->>'retryLimit')::int, 2),\n COALESCE((options->>'retryDelay')::int, 0),\n COALESCE((options->>'retryBackoff')::bool, false),\n (options->>'retryDelayMax')::int,\n COALESCE((options->>'expireInSeconds')::int, 900),\n COALESCE((options->>'retentionSeconds')::int, 1209600),\n COALESCE((options->>'deleteAfterSeconds')::int, 604800),\n COALESCE((options->>'warningQueueSize')::int, 0),\n options->>'deadLetter',\n COALESCE((options->>'partition')::bool, false),\n tablename\n )\n ON CONFLICT DO NOTHING\n RETURNING created_on\n )\n SELECT created_on into queue_created_on from q;\n\n IF queue_created_on IS NULL OR options->>'partition' IS DISTINCT FROM 'true' THEN\n RETURN;\n END IF;\n\n EXECUTE format('CREATE TABLE ${schema}.%I (LIKE ${schema}.job INCLUDING DEFAULTS)', tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD PRIMARY KEY (name, id)$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT q_fkey FOREIGN KEY (name) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT dlq_fkey FOREIGN KEY (dead_letter) REFERENCES ${schema}.queue (name) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED$cmd$, tablename);\n\n EXECUTE ${schema}.job_table_format($cmd$CREATE INDEX job_i5 ON ${schema}.job (name, start_after) INCLUDE (priority, created_on, id) WHERE state < 'active'$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i4 ON ${schema}.job (name, singleton_on, COALESCE(singleton_key, '')) WHERE state <> 'cancelled' AND singleton_on IS NOT NULL$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$CREATE INDEX job_i7 ON ${schema}.job (name, group_id) WHERE state = 'active' AND group_id IS NOT NULL$cmd$, tablename);\n\n IF options->>'policy' = 'short' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i1 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = 'created' AND policy = 'short'$cmd$, tablename);\n ELSIF options->>'policy' = 'singleton' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i2 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state = 'active' AND policy = 'singleton'$cmd$, tablename);\n ELSIF options->>'policy' = 'stately' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i3 ON ${schema}.job (name, state, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'stately'$cmd$, tablename);\n ELSIF options->>'policy' = 'exclusive' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i6 ON ${schema}.job (name, COALESCE(singleton_key, '')) WHERE state <= 'active' AND policy = 'exclusive'$cmd$, tablename);\n ELSIF options->>'policy' = 'key_strict_fifo' THEN\n EXECUTE ${schema}.job_table_format($cmd$CREATE UNIQUE INDEX job_i8 ON ${schema}.job (name, singleton_key) WHERE state IN ('active', 'retry', 'failed') AND policy = 'key_strict_fifo'$cmd$, tablename);\n EXECUTE ${schema}.job_table_format($cmd$ALTER TABLE ${schema}.job ADD CONSTRAINT job_key_strict_fifo_singleton_key_check CHECK (NOT (policy = 'key_strict_fifo' AND singleton_key IS NULL))$cmd$, tablename);\n END IF;\n\n EXECUTE format('ALTER TABLE ${schema}.%I ADD CONSTRAINT cjc CHECK (name=%L)', tablename, queue_name);\n EXECUTE format('ALTER TABLE ${schema}.job ATTACH PARTITION ${schema}.%I FOR VALUES IN (%L)', tablename, queue_name);\n END;\n $$\n LANGUAGE plpgsql;\n `,\n `ALTER TABLE ${schema}.queue DROP COLUMN heartbeat_seconds`,\n `ALTER TABLE ${schema}.job DROP COLUMN heartbeat_seconds`,\n `ALTER TABLE ${schema}.job DROP COLUMN heartbeat_on`\n ]\n }\n ];\n}\nexport { rollback, next, migrate, getAll, };\n","","import assert from 'node:assert';\nimport * as plans from \"./plans.js\";\nimport * as migrationStore from \"./migrationStore.js\";\nimport packageJson from '../package.json' with { type: 'json' };\nconst schemaVersion = packageJson.pgboss.schema;\nclass Contractor {\n static constructionPlans(schema = plans.DEFAULT_SCHEMA, options = { createSchema: true }) {\n return plans.create(schema, schemaVersion, options);\n }\n static migrationPlans(schema = plans.DEFAULT_SCHEMA, version = schemaVersion - 1) {\n return migrationStore.migrate(schema, version);\n }\n static rollbackPlans(schema = plans.DEFAULT_SCHEMA, version = schemaVersion) {\n return migrationStore.rollback(schema, version);\n }\n config;\n db;\n migrations;\n constructor(db, config) {\n this.config = config;\n this.db = db;\n this.migrations = this.config.migrations || migrationStore.getAll(this.config.schema);\n }\n async schemaVersion() {\n const result = await this.db.executeSql(plans.getVersion(this.config.schema));\n return result.rows.length ? parseInt(result.rows[0].version) : null;\n }\n async isInstalled() {\n const result = await this.db.executeSql(plans.versionTableExists(this.config.schema));\n return !!result.rows[0].name;\n }\n async start() {\n const installed = await this.isInstalled();\n if (installed) {\n const version = await this.schemaVersion();\n if (version !== null && schemaVersion > version) {\n await this.migrate(version);\n }\n }\n else {\n await this.create();\n }\n }\n async check() {\n const installed = await this.isInstalled();\n if (!installed) {\n throw new Error('pg-boss is not installed');\n }\n const version = await this.schemaVersion();\n if (schemaVersion !== version) {\n throw new Error('pg-boss database requires migrations');\n }\n }\n async create() {\n try {\n const commands = plans.create(this.config.schema, schemaVersion, this.config);\n await this.db.executeSql(commands);\n }\n catch (err) {\n assert(err.message.includes(plans.CREATE_RACE_MESSAGE), err);\n }\n }\n async migrate(version) {\n try {\n const commands = migrationStore.migrate(this.config.schema, version, this.migrations);\n await this.db.executeSql(commands);\n }\n catch (err) {\n assert(err.message.includes(plans.MIGRATE_RACE_MESSAGE), err);\n }\n }\n async next(version) {\n const commands = migrationStore.next(this.config.schema, version, this.migrations);\n await this.db.executeSql(commands);\n }\n async rollback(version) {\n const commands = migrationStore.rollback(this.config.schema, version, this.migrations);\n await this.db.executeSql(commands);\n }\n}\nexport default Contractor;\n","const isNonErrorSymbol = Symbol('isNonError');\n\nfunction defineProperty(object, key, value) {\n\tObject.defineProperty(object, key, {\n\t\tvalue,\n\t\twritable: false,\n\t\tenumerable: false,\n\t\tconfigurable: false,\n\t});\n}\n\nfunction stringify(value) {\n\tif (value === undefined) {\n\t\treturn 'undefined';\n\t}\n\n\tif (value === null) {\n\t\treturn 'null';\n\t}\n\n\tif (typeof value === 'string') {\n\t\treturn value;\n\t}\n\n\tif (typeof value === 'number' || typeof value === 'boolean') {\n\t\treturn String(value);\n\t}\n\n\tif (typeof value === 'bigint') {\n\t\treturn `${value}n`;\n\t}\n\n\tif (typeof value === 'symbol') {\n\t\treturn value.toString();\n\t}\n\n\tif (typeof value === 'function') {\n\t\treturn `[Function${value.name ? ` ${value.name}` : ' (anonymous)'}]`;\n\t}\n\n\t// TODO: Use `Error.isError` when targeting Node.js 24\n\tif (value instanceof Error) {\n\t\ttry {\n\t\t\treturn String(value);\n\t\t} catch {\n\t\t\treturn '<Unserializable error>';\n\t\t}\n\t}\n\n\ttry {\n\t\treturn JSON.stringify(value);\n\t} catch {\n\t\ttry {\n\t\t\treturn String(value);\n\t\t} catch {\n\t\t\treturn '<Unserializable value>';\n\t\t}\n\t}\n}\n\nexport default class NonError extends Error {\n\tconstructor(value, {superclass: Superclass = Error} = {}) {\n\t\t// If already a NonError, return it as-is\n\t\tif (NonError.isNonError(value)) {\n\t\t\treturn value; // eslint-disable-line no-constructor-return\n\t\t}\n\n\t\tif (value instanceof Error) {\n\t\t\tthrow new TypeError('Do not pass Error instances to NonError. Throw the error directly instead.');\n\t\t}\n\n\t\tsuper(`Non-error value: ${stringify(value)}`);\n\n\t\tif (Superclass !== Error) {\n\t\t\t// Change this instance's prototype to Superclass.prototype\n\t\t\t// This makes instanceof Superclass work\n\t\t\tObject.setPrototypeOf(this, Superclass.prototype);\n\t\t}\n\n\t\tdefineProperty(this, 'name', 'NonError');\n\t\tdefineProperty(this, isNonErrorSymbol, true);\n\t\tdefineProperty(this, 'isNonError', true);\n\t\tdefineProperty(this, 'value', value);\n\t}\n\n\tstatic isNonError(value) {\n\t\treturn value?.[isNonErrorSymbol] === true;\n\t}\n\n\tstatic #handleCallback(callback, arguments_) {\n\t\ttry {\n\t\t\tconst result = callback(...arguments_);\n\n\t\t\t// If the result is thenable (Promise-like), handle async rejections\n\t\t\tif (result && typeof result.then === 'function') {\n\t\t\t\treturn (async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn await result;\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// TODO: Use `Error.isError` when targeting Node.js 24\n\t\t\t\t\t\tif (error instanceof Error) {\n\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthrow new NonError(error);\n\t\t\t\t\t}\n\t\t\t\t})();\n\t\t\t}\n\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\t// TODO: Use `Error.isError` when targeting Node.js 24\n\t\t\t// If it's already an Error, re-throw as-is\n\t\t\tif (error instanceof Error) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\t// Otherwise, wrap it in NonError\n\t\t\tthrow new NonError(error);\n\t\t}\n\t}\n\n\tstatic try(callback) {\n\t\treturn NonError.#handleCallback(callback, []);\n\t}\n\n\tstatic wrap(callback) {\n\t\treturn (...arguments_) => NonError.#handleCallback(callback, arguments_);\n\t}\n\n\t// This makes instanceof work even when using the `superclass` option\n\tstatic [Symbol.hasInstance](instance) {\n\t\treturn NonError.isNonError(instance);\n\t}\n}\n","const list = [\n\t// Native ES errors https://262.ecma-international.org/12.0/#sec-well-known-intrinsic-objects\n\tError,\n\tEvalError,\n\tRangeError,\n\tReferenceError,\n\tSyntaxError,\n\tTypeError,\n\tURIError,\n\tAggregateError,\n\n\t// Built-in errors\n\tglobalThis.DOMException,\n\n\t// Node-specific errors\n\t// https://nodejs.org/api/errors.html\n\tglobalThis.AssertionError,\n\tglobalThis.SystemError,\n]\n\t// Non-native Errors are used with `globalThis` because they might be missing. This filter drops them when undefined.\n\t.filter(Boolean)\n\t.map(constructor => [constructor.name, constructor]);\n\nexport const errorConstructors = new Map(list);\nexport const errorFactories = new Map();\n\nexport function addKnownErrorConstructor(constructor, factory) {\n\tlet instance;\n\tlet resolvedName;\n\n\tif (factory) {\n\t\tif (typeof factory !== 'function') {\n\t\t\tthrow new TypeError('Factory must be a function');\n\t\t}\n\n\t\t// Verify factory can execute without throwing\n\t\ttry {\n\t\t\tinstance = factory();\n\t\t} catch (error) {\n\t\t\tthrow new Error('Factory is not compatible', {cause: error});\n\t\t}\n\n\t\tif (!(instance instanceof constructor)) {\n\t\t\tthrow new TypeError('Factory must return an instance of the constructor');\n\t\t}\n\n\t\tresolvedName = instance.name;\n\t} else {\n\t\ttry {\n\t\t\tinstance = new constructor();\n\t\t} catch (error) {\n\t\t\tthrow new Error(`Constructor \"${constructor.name}\" is not compatible`, {cause: error});\n\t\t}\n\n\t\tresolvedName = instance.name;\n\t}\n\n\tif (!resolvedName || typeof resolvedName !== 'string') {\n\t\tthrow new TypeError('Error instances must have a non-empty string \"name\" property');\n\t}\n\n\tif (errorConstructors.has(resolvedName)) {\n\t\tthrow new Error(`Error constructor \"${resolvedName}\" is already known`);\n\t}\n\n\terrorConstructors.set(resolvedName, constructor);\n\tif (factory) {\n\t\terrorFactories.set(resolvedName, factory);\n\t}\n}\n","import NonError from 'non-error';\nimport {errorConstructors, errorFactories} from './error-constructors.js';\n\nconst errorProperties = [\n\t{\n\t\tproperty: 'name',\n\t\tenumerable: false,\n\t},\n\t{\n\t\tproperty: 'message',\n\t\tenumerable: false,\n\t},\n\t{\n\t\tproperty: 'stack',\n\t\tenumerable: false,\n\t},\n\t{\n\t\tproperty: 'code',\n\t\tenumerable: true,\n\t},\n\t{\n\t\tproperty: 'cause',\n\t\tenumerable: false,\n\t},\n\t{\n\t\tproperty: 'errors',\n\t\tenumerable: false,\n\t},\n];\n\nconst toJsonWasCalled = new WeakSet();\n\nconst toJSON = from => {\n\ttoJsonWasCalled.add(from);\n\tconst json = from.toJSON();\n\ttoJsonWasCalled.delete(from);\n\treturn json;\n};\n\nconst newError = name => {\n\tif (name === 'NonError') {\n\t\treturn new NonError();\n\t}\n\n\tconst factory = errorFactories.get(name);\n\tif (factory) {\n\t\treturn factory();\n\t}\n\n\tconst ErrorConstructor = errorConstructors.get(name) ?? Error;\n\treturn ErrorConstructor === AggregateError\n\t\t? new ErrorConstructor([])\n\t\t: new ErrorConstructor();\n};\n\nconst destroyCircular = ({\n\tfrom,\n\tseen,\n\tto,\n\tforceEnumerable,\n\tmaxDepth,\n\tdepth,\n\tuseToJSON,\n\tserialize,\n}) => {\n\tif (!to) {\n\t\tif (Array.isArray(from)) {\n\t\t\tto = [];\n\t\t} else if (!serialize && isErrorLike(from)) {\n\t\t\tto = newError(from.name);\n\t\t} else {\n\t\t\tto = {};\n\t\t}\n\t}\n\n\tseen.add(from);\n\n\tif (depth >= maxDepth) {\n\t\tseen.delete(from);\n\t\treturn to;\n\t}\n\n\tif (useToJSON && typeof from.toJSON === 'function' && !toJsonWasCalled.has(from)) {\n\t\tseen.delete(from);\n\t\treturn toJSON(from);\n\t}\n\n\tconst continueDestroyCircular = value => destroyCircular({\n\t\tfrom: value,\n\t\tseen,\n\t\tforceEnumerable,\n\t\tmaxDepth,\n\t\tdepth: depth + 1,\n\t\tuseToJSON,\n\t\tserialize,\n\t});\n\n\tfor (const key of Object.keys(from)) {\n\t\tconst value = from[key];\n\n\t\tif (value && value instanceof Uint8Array && value.constructor.name === 'Buffer') {\n\t\t\tto[key] = serialize ? '[object Buffer]' : value;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (value !== null && typeof value === 'object' && typeof value.pipe === 'function') {\n\t\t\tto[key] = serialize ? '[object Stream]' : value;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (typeof value === 'function') {\n\t\t\tif (!serialize) {\n\t\t\t\tto[key] = value;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (serialize && typeof value === 'bigint') {\n\t\t\tto[key] = `${value}n`;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!value || typeof value !== 'object') {\n\t\t\t// Gracefully handle non-configurable errors like `DOMException`.\n\t\t\ttry {\n\t\t\t\tto[key] = value;\n\t\t\t} catch {}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!seen.has(value)) {\n\t\t\tto[key] = continueDestroyCircular(value);\n\t\t\tcontinue;\n\t\t}\n\n\t\tto[key] = '[Circular]';\n\t}\n\n\tif (serialize || to instanceof Error) {\n\t\tfor (const {property, enumerable} of errorProperties) {\n\t\t\tconst value = from[property];\n\t\t\tif (value === undefined || value === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(to, property);\n\t\t\tif (descriptor?.configurable === false) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet processedValue = value;\n\t\t\tif (typeof value === 'object') {\n\t\t\t\tprocessedValue = seen.has(value)\n\t\t\t\t\t? '[Circular]'\n\t\t\t\t\t: continueDestroyCircular(value);\n\t\t\t}\n\n\t\t\tObject.defineProperty(to, property, {\n\t\t\t\tvalue: processedValue,\n\t\t\t\tenumerable: forceEnumerable || enumerable,\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t});\n\t\t}\n\t}\n\n\tseen.delete(from);\n\treturn to;\n};\n\nexport function serializeError(value, options = {}) {\n\tconst {\n\t\tmaxDepth = Number.POSITIVE_INFINITY,\n\t\tuseToJSON = true,\n\t} = options;\n\n\tif (typeof value === 'object' && value !== null) {\n\t\treturn destroyCircular({\n\t\t\tfrom: value,\n\t\t\tseen: new Set(),\n\t\t\tforceEnumerable: true,\n\t\t\tmaxDepth,\n\t\t\tdepth: 0,\n\t\t\tuseToJSON,\n\t\t\tserialize: true,\n\t\t});\n\t}\n\n\t// People sometimes throw things besides Error objects…\n\tif (typeof value === 'function') {\n\t\tvalue = '<Function>';\n\t}\n\n\treturn destroyCircular({\n\t\tfrom: new NonError(value),\n\t\tseen: new Set(),\n\t\tforceEnumerable: true,\n\t\tmaxDepth,\n\t\tdepth: 0,\n\t\tuseToJSON,\n\t\tserialize: true,\n\t});\n}\n\nexport function deserializeError(value, options = {}) {\n\tconst {maxDepth = Number.POSITIVE_INFINITY} = options;\n\n\tif (value instanceof Error) {\n\t\treturn value;\n\t}\n\n\tif (isMinimumViableSerializedError(value)) {\n\t\treturn destroyCircular({\n\t\t\tfrom: value,\n\t\t\tseen: new Set(),\n\t\t\tto: newError(value.name),\n\t\t\tmaxDepth,\n\t\t\tdepth: 0,\n\t\t\tserialize: false,\n\t\t});\n\t}\n\n\treturn new NonError(value);\n}\n\nexport function isErrorLike(value) {\n\treturn Boolean(value)\n\t\t&& typeof value === 'object'\n\t\t&& typeof value.name === 'string'\n\t\t&& typeof value.message === 'string'\n\t\t&& typeof value.stack === 'string';\n}\n\n// Used as a weak check for immediately-passed objects, whereas `isErrorLike` is used for nested values to avoid bad detection\nfunction isMinimumViableSerializedError(value) {\n\treturn Boolean(value)\n\t\t&& typeof value === 'object'\n\t\t&& typeof value.message === 'string'\n\t\t&& !Array.isArray(value);\n}\n\nexport {addKnownErrorConstructor} from './error-constructors.js';\nexport {default as NonError} from 'non-error';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronField = void 0;\n/**\n * Represents a field within a cron expression.\n * This is a base class and should not be instantiated directly.\n * @class CronField\n */\nclass CronField {\n #hasLastChar = false;\n #hasQuestionMarkChar = false;\n #wildcard = false;\n #values = [];\n options = { rawValue: '' };\n /**\n * Returns the minimum value allowed for this field.\n */\n /* istanbul ignore next */ static get min() {\n /* istanbul ignore next */\n throw new Error('min must be overridden');\n }\n /**\n * Returns the maximum value allowed for this field.\n */\n /* istanbul ignore next */ static get max() {\n /* istanbul ignore next */\n throw new Error('max must be overridden');\n }\n /**\n * Returns the allowed characters for this field.\n */\n /* istanbul ignore next */ static get chars() {\n /* istanbul ignore next - this is overridden */\n return Object.freeze([]);\n }\n /**\n * Returns the regular expression used to validate this field.\n */\n static get validChars() {\n return /^[?,*\\dH/-]+$|^.*H\\(\\d+-\\d+\\)\\/\\d+.*$|^.*H\\(\\d+-\\d+\\).*$|^.*H\\/\\d+.*$/;\n }\n /**\n * Returns the constraints for this field.\n */\n static get constraints() {\n return { min: this.min, max: this.max, chars: this.chars, validChars: this.validChars };\n }\n /**\n * CronField constructor. Initializes the field with the provided values.\n * @param {number[] | string[]} values - Values for this field\n * @param {CronFieldOptions} [options] - Options provided by the parser\n * @throws {TypeError} if the constructor is called directly\n * @throws {Error} if validation fails\n */\n constructor(values, options = { rawValue: '' }) {\n if (!Array.isArray(values)) {\n throw new Error(`${this.constructor.name} Validation error, values is not an array`);\n }\n if (!(values.length > 0)) {\n throw new Error(`${this.constructor.name} Validation error, values contains no values`);\n }\n /* istanbul ignore next */\n this.options = {\n ...options,\n rawValue: options.rawValue ?? '',\n };\n this.#values = values.sort(CronField.sorter);\n this.#wildcard = this.options.wildcard !== undefined ? this.options.wildcard : this.#isWildcardValue();\n this.#hasLastChar = this.options.rawValue.includes('L') || values.includes('L');\n this.#hasQuestionMarkChar = this.options.rawValue.includes('?') || values.includes('?');\n }\n /**\n * Returns the minimum value allowed for this field.\n * @returns {number}\n */\n get min() {\n // return the static value from the child class\n return this.constructor.min;\n }\n /**\n * Returns the maximum value allowed for this field.\n * @returns {number}\n */\n get max() {\n // return the static value from the child class\n return this.constructor.max;\n }\n /**\n * Returns an array of allowed special characters for this field.\n * @returns {string[]}\n */\n get chars() {\n // return the frozen static value from the child class\n return this.constructor.chars;\n }\n /**\n * Indicates whether this field has a \"last\" character.\n * @returns {boolean}\n */\n get hasLastChar() {\n return this.#hasLastChar;\n }\n /**\n * Indicates whether this field has a \"question mark\" character.\n * @returns {boolean}\n */\n get hasQuestionMarkChar() {\n return this.#hasQuestionMarkChar;\n }\n /**\n * Indicates whether this field is a wildcard.\n * @returns {boolean}\n */\n get isWildcard() {\n return this.#wildcard;\n }\n /**\n * Returns an array of allowed values for this field.\n * @returns {CronFieldType}\n */\n get values() {\n return this.#values;\n }\n /**\n * Helper function to sort values in ascending order.\n * @param {number | string} a - First value to compare\n * @param {number | string} b - Second value to compare\n * @returns {number} - A negative, zero, or positive value, depending on the sort order\n */\n static sorter(a, b) {\n const aIsNumber = typeof a === 'number';\n const bIsNumber = typeof b === 'number';\n if (aIsNumber && bIsNumber)\n return a - b;\n if (!aIsNumber && !bIsNumber)\n return a.localeCompare(b);\n return aIsNumber ? /* istanbul ignore next - A will always be a number until L-2 is supported */ -1 : 1;\n }\n /**\n * Find the next (or previous when `reverse` is true) numeric value in a sorted list.\n * Returns null if there's no value strictly after/before the current one.\n *\n * @param values - Sorted numeric values\n * @param currentValue - Current value to compare against\n * @param reverse - When true, search in reverse for previous smaller value\n */\n static findNearestValueInList(values, currentValue, reverse = false) {\n if (reverse) {\n for (let i = values.length - 1; i >= 0; i--) {\n if (values[i] < currentValue)\n return values[i];\n }\n return null;\n }\n for (let i = 0; i < values.length; i++) {\n if (values[i] > currentValue)\n return values[i];\n }\n return null;\n }\n /**\n * Instance helper that operates on this field's numeric `values`.\n *\n * @param currentValue - Current value to compare against\n * @param reverse - When true, search in reverse for previous smaller value\n */\n findNearestValue(currentValue, reverse = false) {\n return this.constructor.findNearestValueInList(this.values, currentValue, reverse);\n }\n /**\n * Serializes the field to an object.\n * @returns {SerializedCronField}\n */\n serialize() {\n return {\n wildcard: this.#wildcard,\n values: this.#values,\n };\n }\n /**\n * Validates the field values against the allowed range and special characters.\n * @throws {Error} if validation fails\n */\n validate() {\n let badValue;\n const charsString = this.chars.length > 0 ? ` or chars ${this.chars.join('')}` : '';\n const charTest = (value) => (char) => new RegExp(`^\\\\d{0,2}${char}$`).test(value);\n const rangeTest = (value) => {\n badValue = value;\n return typeof value === 'number' ? value >= this.min && value <= this.max : this.chars.some(charTest(value));\n };\n const isValidRange = this.#values.every(rangeTest);\n if (!isValidRange) {\n throw new Error(`${this.constructor.name} Validation error, got value ${badValue} expected range ${this.min}-${this.max}${charsString}`);\n }\n // check for duplicate value in this.#values array\n const duplicate = this.#values.find((value, index) => this.#values.indexOf(value) !== index);\n if (duplicate) {\n throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${duplicate}`);\n }\n }\n /**\n * Determines if the field is a wildcard based on the values.\n * When options.rawValue is not empty, it checks if the raw value is a wildcard, otherwise it checks if all values in the range are included.\n * @returns {boolean}\n */\n #isWildcardValue() {\n if (this.options.rawValue.length > 0) {\n return ['*', '?'].includes(this.options.rawValue);\n }\n return Array.from({ length: this.max - this.min + 1 }, (_, i) => i + this.min).every((value) => this.#values.includes(value));\n }\n}\nexports.CronField = CronField;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronDayOfMonth = void 0;\nconst CronField_1 = require(\"./CronField\");\nconst MIN_DAY = 1;\nconst MAX_DAY = 31;\nconst DAY_CHARS = Object.freeze(['L']);\n/**\n * Represents the \"day of the month\" field within a cron expression.\n * @class CronDayOfMonth\n * @extends CronField\n */\nclass CronDayOfMonth extends CronField_1.CronField {\n static get min() {\n return MIN_DAY;\n }\n static get max() {\n return MAX_DAY;\n }\n static get chars() {\n return DAY_CHARS;\n }\n static get validChars() {\n return /^[?,*\\dLH/-]+$|^.*H\\(\\d+-\\d+\\)\\/\\d+.*$|^.*H\\(\\d+-\\d+\\).*$|^.*H\\/\\d+.*$/;\n }\n /**\n * CronDayOfMonth constructor. Initializes the \"day of the month\" field with the provided values.\n * @param {DayOfMonthRange[]} values - Values for the \"day of the month\" field\n * @param {CronFieldOptions} [options] - Options provided by the parser\n * @throws {Error} if validation fails\n */\n constructor(values, options) {\n super(values, options);\n this.validate();\n }\n /**\n * Returns an array of allowed values for the \"day of the month\" field.\n * @returns {DayOfMonthRange[]}\n */\n get values() {\n return super.values;\n }\n}\nexports.CronDayOfMonth = CronDayOfMonth;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronDayOfWeek = void 0;\nconst CronField_1 = require(\"./CronField\");\nconst MIN_DAY = 0;\nconst MAX_DAY = 7;\nconst DAY_CHARS = Object.freeze(['L']);\n/**\n * Represents the \"day of the week\" field within a cron expression.\n * @class CronDayOfTheWeek\n * @extends CronField\n */\nclass CronDayOfWeek extends CronField_1.CronField {\n static get min() {\n return MIN_DAY;\n }\n static get max() {\n return MAX_DAY;\n }\n static get chars() {\n return DAY_CHARS;\n }\n static get validChars() {\n return /^[?,*\\dLH#/-]+$|^.*H\\(\\d+-\\d+\\)\\/\\d+.*$|^.*H\\(\\d+-\\d+\\).*$|^.*H\\/\\d+.*$/;\n }\n /**\n * CronDayOfTheWeek constructor. Initializes the \"day of the week\" field with the provided values.\n * @param {DayOfWeekRange[]} values - Values for the \"day of the week\" field\n * @param {CronFieldOptions} [options] - Options provided by the parser\n */\n constructor(values, options) {\n super(values, options);\n this.validate();\n }\n /**\n * Returns an array of allowed values for the \"day of the week\" field.\n * @returns {DayOfWeekRange[]}\n */\n get values() {\n return super.values;\n }\n /**\n * Returns the nth day of the week if specified in the cron expression.\n * This is used for the '#' character in the cron expression.\n * @returns {number} The nth day of the week (1-5) or 0 if not specified.\n */\n get nthDay() {\n return this.options.nthDayOfWeek ?? 0;\n }\n}\nexports.CronDayOfWeek = CronDayOfWeek;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronHour = void 0;\nconst CronField_1 = require(\"./CronField\");\nconst MIN_HOUR = 0;\nconst MAX_HOUR = 23;\nconst HOUR_CHARS = Object.freeze([]);\n/**\n * Represents the \"hour\" field within a cron expression.\n * @class CronHour\n * @extends CronField\n */\nclass CronHour extends CronField_1.CronField {\n static get min() {\n return MIN_HOUR;\n }\n static get max() {\n return MAX_HOUR;\n }\n static get chars() {\n return HOUR_CHARS;\n }\n /**\n * CronHour constructor. Initializes the \"hour\" field with the provided values.\n * @param {HourRange[]} values - Values for the \"hour\" field\n * @param {CronFieldOptions} [options] - Options provided by the parser\n */\n constructor(values, options) {\n super(values, options);\n this.validate();\n }\n /**\n * Returns an array of allowed values for the \"hour\" field.\n * @returns {HourRange[]}\n */\n get values() {\n return super.values;\n }\n}\nexports.CronHour = CronHour;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronMinute = void 0;\nconst CronField_1 = require(\"./CronField\");\nconst MIN_MINUTE = 0;\nconst MAX_MINUTE = 59;\nconst MINUTE_CHARS = Object.freeze([]);\n/**\n * Represents the \"second\" field within a cron expression.\n * @class CronSecond\n * @extends CronField\n */\nclass CronMinute extends CronField_1.CronField {\n static get min() {\n return MIN_MINUTE;\n }\n static get max() {\n return MAX_MINUTE;\n }\n static get chars() {\n return MINUTE_CHARS;\n }\n /**\n * CronSecond constructor. Initializes the \"second\" field with the provided values.\n * @param {SixtyRange[]} values - Values for the \"second\" field\n * @param {CronFieldOptions} [options] - Options provided by the parser\n */\n constructor(values, options) {\n super(values, options);\n this.validate();\n }\n /**\n * Returns an array of allowed values for the \"second\" field.\n * @returns {SixtyRange[]}\n */\n get values() {\n return super.values;\n }\n}\nexports.CronMinute = CronMinute;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nclass InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nclass InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nclass InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nclass ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nclass InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nclass InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nclass ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n\n/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\nconst DATE_SHORT = {\n year: n,\n month: n,\n day: n\n};\nconst DATE_MED = {\n year: n,\n month: s,\n day: n\n};\nconst DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s\n};\nconst DATE_FULL = {\n year: n,\n month: l,\n day: n\n};\nconst DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l\n};\nconst TIME_SIMPLE = {\n hour: n,\n minute: n\n};\nconst TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n\n};\nconst TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\nconst TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\nconst TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hourCycle: \"h23\"\n};\nconst TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\"\n};\nconst TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: s\n};\nconst TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: l\n};\nconst DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n\n};\nconst DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\nconst DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n\n};\nconst DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\nconst DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n\n};\nconst DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s\n};\nconst DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\nconst DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l\n};\nconst DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\n\n/**\n * @interface\n */\nclass Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The IANA name of this zone.\n * Defaults to `name` if not overwritten by a subclass.\n * @abstract\n * @type {string}\n */\n get ianaName() {\n return this.name;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get isUniversal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n\nlet singleton$1 = null;\n\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */\nclass SystemZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {SystemZone}\n */\n static get instance() {\n if (singleton$1 === null) {\n singleton$1 = new SystemZone();\n }\n return singleton$1;\n }\n\n /** @override **/\n get type() {\n return \"system\";\n }\n\n /** @override **/\n get name() {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, {\n format,\n locale\n }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"system\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n\nconst dtfCache = new Map();\nfunction makeDTF(zoneName) {\n let dtf = dtfCache.get(zoneName);\n if (dtf === undefined) {\n dtf = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zoneName,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n era: \"short\"\n });\n dtfCache.set(zoneName, dtf);\n }\n return dtf;\n}\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n era: 3,\n hour: 4,\n minute: 5,\n second: 6\n};\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];\n}\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date);\n const filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const {\n type,\n value\n } = formatted[i];\n const pos = typeToPos[type];\n if (type === \"era\") {\n filled[pos] = value;\n } else if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\nconst ianaZoneCache = new Map();\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nclass IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n let zone = ianaZoneCache.get(name);\n if (zone === undefined) {\n ianaZoneCache.set(name, zone = new IANAZone(name));\n }\n return zone;\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache.clear();\n dtfCache.clear();\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return this.isValidZone(s);\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n if (!zone) {\n return false;\n }\n try {\n new Intl.DateTimeFormat(\"en-US\", {\n timeZone: zone\n }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /**\n * The type of zone. `iana` for all instances of `IANAZone`.\n * @override\n * @type {string}\n */\n get type() {\n return \"iana\";\n }\n\n /**\n * The name of this zone (i.e. the IANA zone name).\n * @override\n * @type {string}\n */\n get name() {\n return this.zoneName;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year:\n * Always returns false for all IANA zones.\n * @override\n * @type {boolean}\n */\n get isUniversal() {\n return false;\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, {\n format,\n locale\n }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /**\n * Returns the offset's value as a string\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @override\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n if (!this.valid) return NaN;\n const date = new Date(ts);\n if (isNaN(date)) return NaN;\n const dtf = makeDTF(this.name);\n let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date);\n if (adOrBc === \"BC\") {\n year = -Math.abs(year) + 1;\n }\n\n // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n const adjustedHour = hour === 24 ? 0 : hour;\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0\n });\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @override\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /**\n * Return whether this Zone is valid.\n * @override\n * @type {boolean}\n */\n get isValid() {\n return this.valid;\n }\n}\n\n// todo - remap caching\n\nlet intlLFCache = {};\nfunction getCachedLF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlLFCache[key];\n if (!dtf) {\n dtf = new Intl.ListFormat(locString, opts);\n intlLFCache[key] = dtf;\n }\n return dtf;\n}\nconst intlDTCache = new Map();\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache.get(key);\n if (dtf === undefined) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache.set(key, dtf);\n }\n return dtf;\n}\nconst intlNumCache = new Map();\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache.get(key);\n if (inf === undefined) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache.set(key, inf);\n }\n return inf;\n}\nconst intlRelCache = new Map();\nfunction getCachedRTF(locString, opts = {}) {\n const {\n base,\n ...cacheKeyOpts\n } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache.get(key);\n if (inf === undefined) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache.set(key, inf);\n }\n return inf;\n}\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else {\n sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n return sysLocaleCache;\n }\n}\nconst intlResolvedOptionsCache = new Map();\nfunction getCachedIntResolvedOptions(locString) {\n let opts = intlResolvedOptionsCache.get(locString);\n if (opts === undefined) {\n opts = new Intl.DateTimeFormat(locString).resolvedOptions();\n intlResolvedOptionsCache.set(locString, opts);\n }\n return opts;\n}\nconst weekInfoCache = new Map();\nfunction getCachedWeekInfo(locString) {\n let data = weekInfoCache.get(locString);\n if (!data) {\n const locale = new Intl.Locale(locString);\n // browsers currently implement this as a property, but spec says it should be a getter function\n data = \"getWeekInfo\" in locale ? locale.getWeekInfo() : locale.weekInfo;\n // minimalDays was removed from WeekInfo: https://github.com/tc39/proposal-intl-locale-info/issues/86\n if (!(\"minimalDays\" in data)) {\n data = {\n ...fallbackWeekSettings,\n ...data\n };\n }\n weekInfoCache.set(locString, data);\n }\n return data;\n}\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n // private subtags and unicode subtags have ordering requirements,\n // and we're not properly parsing this, so just strip out the\n // private ones if they exist.\n const xIndex = localeStr.indexOf(\"-x-\");\n if (xIndex !== -1) {\n localeStr = localeStr.substring(0, xIndex);\n }\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n let selectedStr;\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n selectedStr = localeStr;\n } catch (e) {\n const smaller = localeStr.substring(0, uIndex);\n options = getCachedDTF(smaller).resolvedOptions();\n selectedStr = smaller;\n }\n const {\n numberingSystem,\n calendar\n } = options;\n return [selectedStr, numberingSystem, calendar];\n }\n}\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (outputCalendar || numberingSystem) {\n if (!localeStr.includes(\"-u-\")) {\n localeStr += \"-u\";\n }\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n}\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2009, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\nfunction listStuff(loc, length, englishFn, intlFn) {\n const mode = loc.listingMode();\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return loc.numberingSystem === \"latn\" || !loc.locale || loc.locale.startsWith(\"en\") || getCachedIntResolvedOptions(loc.locale).numberingSystem === \"latn\";\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n const {\n padTo,\n floor,\n ...otherOpts\n } = opts;\n if (!forceSimple || Object.keys(otherOpts).length > 0) {\n const intlOpts = {\n useGrouping: false,\n ...opts\n };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n this.originalZone = undefined;\n let z = undefined;\n if (this.opts.timeZone) {\n // Don't apply any workarounds if a timeZone is explicitly provided in opts\n this.dt = dt;\n } else if (dt.zone.type === \"fixed\") {\n // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n // That is why fixed-offset TZ is set to that unless it is:\n // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n // 2. Unsupported by the browser:\n // - some do not support Etc/\n // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n const gmtOffset = -1 * (dt.offset / 60);\n const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;\n if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {\n z = offsetZ;\n this.dt = dt;\n } else {\n // Not all fixed-offset zones like Etc/+4:30 are present in tzdata so\n // we manually apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.offset === 0 ? dt : dt.setZone(\"UTC\").plus({\n minutes: dt.offset\n });\n this.originalZone = dt.zone;\n }\n } else if (dt.zone.type === \"system\") {\n this.dt = dt;\n } else if (dt.zone.type === \"iana\") {\n this.dt = dt;\n z = dt.zone.name;\n } else {\n // Custom zones can have any offset / offsetName so we just manually\n // apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.setZone(\"UTC\").plus({\n minutes: dt.offset\n });\n this.originalZone = dt.zone;\n }\n const intlOpts = {\n ...this.opts\n };\n intlOpts.timeZone = intlOpts.timeZone || z;\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n format() {\n if (this.originalZone) {\n // If we have to substitute in the actual zone name, we have to use\n // formatToParts so that the timezone can be replaced.\n return this.formatToParts().map(({\n value\n }) => value).join(\"\");\n }\n return this.dtf.format(this.dt.toJSDate());\n }\n formatToParts() {\n const parts = this.dtf.formatToParts(this.dt.toJSDate());\n if (this.originalZone) {\n return parts.map(part => {\n if (part.type === \"timeZoneName\") {\n const offsetName = this.originalZone.offsetName(this.dt.ts, {\n locale: this.dt.locale,\n format: this.opts.timeZoneName\n });\n return {\n ...part,\n value: offsetName\n };\n } else {\n return part;\n }\n });\n }\n return parts;\n }\n resolvedOptions() {\n return this.dtf.resolvedOptions();\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = {\n style: \"long\",\n ...opts\n };\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\nconst fallbackWeekSettings = {\n firstDay: 1,\n minimalDays: 4,\n weekend: [6, 7]\n};\n\n/**\n * @private\n */\nclass Locale {\n static fromOpts(opts) {\n return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.weekSettings, opts.defaultToEN);\n }\n static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale;\n // the system locale is useful for human-readable strings but annoying for parsing/formatting known formats\n const localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale());\n const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;\n const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;\n return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);\n }\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache.clear();\n intlNumCache.clear();\n intlRelCache.clear();\n intlResolvedOptionsCache.clear();\n weekInfoCache.clear();\n }\n static fromObject({\n locale,\n numberingSystem,\n outputCalendar,\n weekSettings\n } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar, weekSettings);\n }\n constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.weekSettings = weekSettings;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n this.weekdaysCache = {\n format: {},\n standalone: {}\n };\n this.monthsCache = {\n format: {},\n standalone: {}\n };\n this.meridiemCache = null;\n this.eraCache = {};\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n return this.fastNumbersCached;\n }\n listingMode() {\n const isActuallyEn = this.isEnglish();\n const hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === \"latn\") && (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n }\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, validateWeekSettings(alts.weekSettings) || this.weekSettings, alts.defaultToEN || false);\n }\n }\n redefaultToEN(alts = {}) {\n return this.clone({\n ...alts,\n defaultToEN: true\n });\n }\n redefaultToSystem(alts = {}) {\n return this.clone({\n ...alts,\n defaultToEN: false\n });\n }\n months(length, format = false) {\n return listStuff(this, length, months, () => {\n // Workaround for \"ja\" locale: formatToParts does not label all parts of the month\n // as \"month\" and for this locale there is no difference between \"format\" and \"non-format\".\n // As such, just use format() instead of formatToParts() and take the whole string\n const monthSpecialCase = this.intl === \"ja\" || this.intl.startsWith(\"ja-\");\n format &= !monthSpecialCase;\n const intl = format ? {\n month: length,\n day: \"numeric\"\n } : {\n month: length\n },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n const mapper = !monthSpecialCase ? dt => this.extract(dt, intl, \"month\") : dt => this.dtFormatter(dt, intl).format();\n this.monthsCache[formatStr][length] = mapMonths(mapper);\n }\n return this.monthsCache[formatStr][length];\n });\n }\n weekdays(length, format = false) {\n return listStuff(this, length, weekdays, () => {\n const intl = format ? {\n weekday: length,\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\"\n } : {\n weekday: length\n },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays(dt => this.extract(dt, intl, \"weekday\"));\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n meridiems() {\n return listStuff(this, undefined, () => meridiems, () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = {\n hour: \"numeric\",\n hourCycle: \"h12\"\n };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(dt => this.extract(dt, intl, \"dayperiod\"));\n }\n return this.meridiemCache;\n });\n }\n eras(length) {\n return listStuff(this, length, eras, () => {\n const intl = {\n era: length\n };\n\n // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(dt => this.extract(dt, intl, \"era\"));\n }\n return this.eraCache[length];\n });\n }\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find(m => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n listFormatter(opts = {}) {\n return getCachedLF(this.intl, opts);\n }\n isEnglish() {\n return this.locale === \"en\" || this.locale.toLowerCase() === \"en-us\" || getCachedIntResolvedOptions(this.intl).locale.startsWith(\"en-us\");\n }\n getWeekSettings() {\n if (this.weekSettings) {\n return this.weekSettings;\n } else if (!hasLocaleWeekInfo()) {\n return fallbackWeekSettings;\n } else {\n return getCachedWeekInfo(this.locale);\n }\n }\n getStartOfWeek() {\n return this.getWeekSettings().firstDay;\n }\n getMinDaysInFirstWeek() {\n return this.getWeekSettings().minimalDays;\n }\n getWeekendDays() {\n return this.getWeekSettings().weekend;\n }\n equals(other) {\n return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar;\n }\n toString() {\n return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;\n }\n}\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nclass FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /**\n * The type of zone. `fixed` for all instances of `FixedOffsetZone`.\n * @override\n * @type {string}\n */\n get type() {\n return \"fixed\";\n }\n\n /**\n * The name of this zone.\n * All fixed zones' names always start with \"UTC\" (plus optional offset)\n * @override\n * @type {string}\n */\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n /**\n * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`\n *\n * @override\n * @type {string}\n */\n get ianaName() {\n if (this.fixed === 0) {\n return \"Etc/UTC\";\n } else {\n return `Etc/GMT${formatOffset(-this.fixed, \"narrow\")}`;\n }\n }\n\n /**\n * Returns the offset's common name at the specified timestamp.\n *\n * For fixed offset zones this equals to the zone name.\n * @override\n */\n offsetName() {\n return this.name;\n }\n\n /**\n * Returns the offset's value as a string\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year:\n * Always returns true for all fixed offset zones.\n * @override\n * @type {boolean}\n */\n get isUniversal() {\n return true;\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n *\n * For fixed offset zones, this is constant and does not depend on a timestamp.\n * @override\n * @return {number}\n */\n offset() {\n return this.fixed;\n }\n\n /**\n * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)\n * @override\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /**\n * Return whether this Zone is valid:\n * All fixed offset zones are valid.\n * @override\n * @type {boolean}\n */\n get isValid() {\n return true;\n }\n}\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nclass InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n\n/**\n * @private\n */\nfunction normalizeZone(input, defaultZone) {\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"default\") return defaultZone;else if (lowered === \"local\" || lowered === \"system\") return SystemZone.instance;else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && \"offset\" in input && typeof input.offset === \"function\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n\nconst numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\"\n};\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881]\n};\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\nfunction parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\n// cache of {numberingSystem: {append: regex}}\nconst digitRegexCache = new Map();\nfunction resetDigitRegexCache() {\n digitRegexCache.clear();\n}\nfunction digitRegex({\n numberingSystem\n}, append = \"\") {\n const ns = numberingSystem || \"latn\";\n let appendCache = digitRegexCache.get(ns);\n if (appendCache === undefined) {\n appendCache = new Map();\n digitRegexCache.set(ns, appendCache);\n }\n let regex = appendCache.get(append);\n if (regex === undefined) {\n regex = new RegExp(`${numberingSystems[ns]}${append}`);\n appendCache.set(append, regex);\n }\n return regex;\n}\n\nlet now = () => Date.now(),\n defaultZone = \"system\",\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n twoDigitCutoffYear = 60,\n throwOnInvalid,\n defaultWeekSettings = null;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nclass Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * Use the value \"system\" to reset this value to the system's time zone.\n * @type {string}\n */\n static set defaultZone(zone) {\n defaultZone = zone;\n }\n\n /**\n * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n * The default value is the system's time zone (the one set on the machine that runs this code).\n * @type {Zone}\n */\n static get defaultZone() {\n return normalizeZone(defaultZone, SystemZone.instance);\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * @typedef {Object} WeekSettings\n * @property {number} firstDay\n * @property {number} minimalDays\n * @property {number[]} weekend\n */\n\n /**\n * @return {WeekSettings|null}\n */\n static get defaultWeekSettings() {\n return defaultWeekSettings;\n }\n\n /**\n * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and\n * how many days are required in the first week of a year.\n * Does not affect existing instances.\n *\n * @param {WeekSettings|null} weekSettings\n */\n static set defaultWeekSettings(weekSettings) {\n defaultWeekSettings = validateWeekSettings(weekSettings);\n }\n\n /**\n * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n * @type {number}\n */\n static get twoDigitCutoffYear() {\n return twoDigitCutoffYear;\n }\n\n /**\n * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n * @type {number}\n * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century\n * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century\n * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950\n * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50\n * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50\n */\n static set twoDigitCutoffYear(cutoffYear) {\n twoDigitCutoffYear = cutoffYear % 100;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n DateTime.resetCache();\n resetDigitRegexCache();\n }\n}\n\nclass Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\"unit out of range\", `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`);\n}\nfunction dayOfWeek(year, month, day) {\n const d = new Date(Date.UTC(year, month - 1, day));\n if (year < 100 && year >= 0) {\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n const js = d.getUTCDay();\n return js === 0 ? 7 : js;\n}\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex(i => i < ordinal),\n day = ordinal - table[month0];\n return {\n month: month0 + 1,\n day\n };\n}\nfunction isoWeekdayToLocal(isoWeekday, startOfWeek) {\n return (isoWeekday - startOfWeek + 7) % 7 + 1;\n}\n\n/**\n * @private\n */\n\nfunction gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const {\n year,\n month,\n day\n } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek);\n let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7),\n weekYear;\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);\n } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n return {\n weekYear,\n weekNumber,\n weekday,\n ...timeObject(gregObj)\n };\n}\nfunction weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const {\n weekYear,\n weekNumber,\n weekday\n } = weekData,\n weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek),\n yearInDays = daysInYear(weekYear);\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek,\n year;\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n const {\n month,\n day\n } = uncomputeOrdinal(year, ordinal);\n return {\n year,\n month,\n day,\n ...timeObject(weekData)\n };\n}\nfunction gregorianToOrdinal(gregData) {\n const {\n year,\n month,\n day\n } = gregData;\n const ordinal = computeOrdinal(year, month, day);\n return {\n year,\n ordinal,\n ...timeObject(gregData)\n };\n}\nfunction ordinalToGregorian(ordinalData) {\n const {\n year,\n ordinal\n } = ordinalData;\n const {\n month,\n day\n } = uncomputeOrdinal(year, ordinal);\n return {\n year,\n month,\n day,\n ...timeObject(ordinalData)\n };\n}\n\n/**\n * Check if local week units like localWeekday are used in obj.\n * If so, validates that they are not mixed with ISO week units and then copies them to the normal week unit properties.\n * Modifies obj in-place!\n * @param obj the object values\n */\nfunction usesLocalWeekValues(obj, loc) {\n const hasLocaleWeekData = !isUndefined(obj.localWeekday) || !isUndefined(obj.localWeekNumber) || !isUndefined(obj.localWeekYear);\n if (hasLocaleWeekData) {\n const hasIsoWeekData = !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);\n if (hasIsoWeekData) {\n throw new ConflictingSpecificationError(\"Cannot mix locale-based week fields with ISO-based week fields\");\n }\n if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;\n if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;\n if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;\n delete obj.localWeekday;\n delete obj.localWeekNumber;\n delete obj.localWeekYear;\n return {\n minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),\n startOfWeek: loc.getStartOfWeek()\n };\n } else {\n return {\n minDaysInFirstWeek: 4,\n startOfWeek: 1\n };\n }\n}\nfunction hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.weekNumber);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\nfunction hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\nfunction hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\nfunction hasInvalidTimeData(obj) {\n const {\n hour,\n minute,\n second,\n millisecond\n } = obj;\n const validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0,\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n\n/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\n/**\n * @private\n */\n\n// TYPES\n\nfunction isUndefined(o) {\n return typeof o === \"undefined\";\n}\nfunction isNumber(o) {\n return typeof o === \"number\";\n}\nfunction isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\nfunction isString(o) {\n return typeof o === \"string\";\n}\nfunction isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nfunction hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\nfunction hasLocaleWeekInfo() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.Locale && (\"weekInfo\" in Intl.Locale.prototype || \"getWeekInfo\" in Intl.Locale.prototype);\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nfunction maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\nfunction bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\nfunction pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction validateWeekSettings(settings) {\n if (settings == null) {\n return null;\n } else if (typeof settings !== \"object\") {\n throw new InvalidArgumentError(\"Week settings must be an object\");\n } else {\n if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some(v => !integerBetween(v, 1, 7))) {\n throw new InvalidArgumentError(\"Invalid week settings\");\n }\n return {\n firstDay: settings.firstDay,\n minimalDays: settings.minimalDays,\n weekend: Array.from(settings.weekend)\n };\n }\n}\n\n// NUMBERS AND STRINGS\n\nfunction integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nfunction floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\nfunction padStart(input, n = 2) {\n const isNeg = input < 0;\n let padded;\n if (isNeg) {\n padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n } else {\n padded = (\"\" + input).padStart(n, \"0\");\n }\n return padded;\n}\nfunction parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\nfunction parseFloating(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseFloat(string);\n }\n}\nfunction parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\nfunction roundTo(number, digits, rounding = \"round\") {\n const factor = 10 ** digits;\n switch (rounding) {\n case \"expand\":\n return number > 0 ? Math.ceil(number * factor) / factor : Math.floor(number * factor) / factor;\n case \"trunc\":\n return Math.trunc(number * factor) / factor;\n case \"round\":\n return Math.round(number * factor) / factor;\n case \"floor\":\n return Math.floor(number * factor) / factor;\n case \"ceil\":\n return Math.ceil(number * factor) / factor;\n default:\n throw new RangeError(`Value rounding ${rounding} is out of range`);\n }\n}\n\n// DATE BASICS\n\nfunction isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\nfunction daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// convert a calendar object to a local timestamp (epoch, but with the offset baked in)\nfunction objToLocalTS(obj) {\n let d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond);\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n // set the month and day again, this is necessary because year 2000 is a leap year, but year 100 is not\n // so if obj.year is in 99, but obj.day makes it roll over into year 100,\n // the calculations done by Date.UTC are using year 2000 - which is incorrect\n d.setUTCFullYear(obj.year, obj.month - 1, obj.day);\n }\n return +d;\n}\n\n// adapted from moment.js: https://github.com/moment/moment/blob/000ac1800e620f770f4eb31b5ae908f6167b0ab2/src/lib/units/week-calendar-utils.js\nfunction firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {\n const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);\n return -fwdlw + minDaysInFirstWeek - 1;\n}\nfunction weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);\n const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);\n return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;\n}\nfunction untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nfunction parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hourCycle: \"h23\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\"\n };\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n const modified = {\n timeZoneName: offsetFormat,\n ...intlOpts\n };\n const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(m => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n}\n\n// signedOffset('-5', '30') -> -330\nfunction signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nfunction asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || !Number.isFinite(numericValue)) throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\nfunction normalizeObject(obj, normalizer) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\n/**\n * Returns the offset's value as a string\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\nfunction formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\nfunction timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n\n/**\n * @private\n */\n\nconst monthsLong = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\nconst monthsShort = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nconst monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\nfunction months(length) {\n switch (length) {\n case \"narrow\":\n return [...monthsNarrow];\n case \"short\":\n return [...monthsShort];\n case \"long\":\n return [...monthsLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\nconst weekdaysLong = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"];\nconst weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\nconst weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\nfunction weekdays(length) {\n switch (length) {\n case \"narrow\":\n return [...weekdaysNarrow];\n case \"short\":\n return [...weekdaysShort];\n case \"long\":\n return [...weekdaysLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\nconst meridiems = [\"AM\", \"PM\"];\nconst erasLong = [\"Before Christ\", \"Anno Domini\"];\nconst erasShort = [\"BC\", \"AD\"];\nconst erasNarrow = [\"B\", \"A\"];\nfunction eras(length) {\n switch (length) {\n case \"narrow\":\n return [...erasNarrow];\n case \"short\":\n return [...erasShort];\n case \"long\":\n return [...erasLong];\n default:\n return null;\n }\n}\nfunction meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\nfunction weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\nfunction monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\nfunction eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\nfunction formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"]\n };\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\nconst macroTokenToFormatOpts = {\n D: DATE_SHORT,\n DD: DATE_MED,\n DDD: DATE_FULL,\n DDDD: DATE_HUGE,\n t: TIME_SIMPLE,\n tt: TIME_WITH_SECONDS,\n ttt: TIME_WITH_SHORT_OFFSET,\n tttt: TIME_WITH_LONG_OFFSET,\n T: TIME_24_SIMPLE,\n TT: TIME_24_WITH_SECONDS,\n TTT: TIME_24_WITH_SHORT_OFFSET,\n TTTT: TIME_24_WITH_LONG_OFFSET,\n f: DATETIME_SHORT,\n ff: DATETIME_MED,\n fff: DATETIME_FULL,\n ffff: DATETIME_HUGE,\n F: DATETIME_SHORT_WITH_SECONDS,\n FF: DATETIME_MED_WITH_SECONDS,\n FFF: DATETIME_FULL_WITH_SECONDS,\n FFFF: DATETIME_HUGE_WITH_SECONDS\n};\n\n/**\n * @private\n */\n\nclass Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n static parseFormat(fmt) {\n // white-space is always considered a literal in user-provided formats\n // the \" \" token has a special meaning (see unitForToken)\n\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n // turn '' into a literal signal quote instead of just skipping the empty literal\n if (currentFull.length > 0 || bracketed) {\n splits.push({\n literal: bracketed || /^\\s+$/.test(currentFull),\n val: currentFull === \"\" ? \"'\" : currentFull\n });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({\n literal: /^\\s+$/.test(currentFull),\n val: currentFull\n });\n }\n currentFull = c;\n current = c;\n }\n }\n if (currentFull.length > 0) {\n splits.push({\n literal: bracketed || /^\\s+$/.test(currentFull),\n val: currentFull\n });\n }\n return splits;\n }\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, {\n ...this.opts,\n ...opts\n });\n return df.format();\n }\n dtFormatter(dt, opts = {}) {\n return this.loc.dtFormatter(dt, {\n ...this.opts,\n ...opts\n });\n }\n formatDateTime(dt, opts) {\n return this.dtFormatter(dt, opts).format();\n }\n formatDateTimeParts(dt, opts) {\n return this.dtFormatter(dt, opts).formatToParts();\n }\n formatInterval(interval, opts) {\n const df = this.dtFormatter(interval.start, opts);\n return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());\n }\n resolvedOptions(dt, opts) {\n return this.dtFormatter(dt, opts).resolvedOptions();\n }\n num(n, p = 0, signDisplay = undefined) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n const opts = {\n ...this.opts\n };\n if (p > 0) {\n opts.padTo = p;\n }\n if (signDisplay) {\n opts.signDisplay = signDisplay;\n }\n return this.loc.numberFormatter(opts).format(n);\n }\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\",\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = opts => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () => knownEnglish ? meridiemForDateTime(dt) : string({\n hour: \"numeric\",\n hourCycle: \"h12\"\n }, \"dayperiod\"),\n month = (length, standalone) => knownEnglish ? monthForDateTime(dt, length) : string(standalone ? {\n month: length\n } : {\n month: length,\n day: \"numeric\"\n }, \"month\"),\n weekday = (length, standalone) => knownEnglish ? weekdayForDateTime(dt, length) : string(standalone ? {\n weekday: length\n } : {\n weekday: length,\n month: \"long\",\n day: \"numeric\"\n }, \"weekday\"),\n maybeMacro = token => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = length => knownEnglish ? eraForDateTime(dt, length) : string({\n era: length\n }, \"era\"),\n tokenToString = token => {\n // Where possible: https://cldr.unicode.org/translation/date-time/date-time-symbols\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // fractional seconds\n case \"uu\":\n return this.num(Math.floor(dt.millisecond / 10), 2);\n case \"uuu\":\n return this.num(Math.floor(dt.millisecond / 100));\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({\n format: \"narrow\",\n allowZ: this.opts.allowZ\n });\n case \"ZZ\":\n // like +06:00\n return formatOffset({\n format: \"short\",\n allowZ: this.opts.allowZ\n });\n case \"ZZZ\":\n // like +0600\n return formatOffset({\n format: \"techie\",\n allowZ: this.opts.allowZ\n });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, {\n format: \"short\",\n locale: this.loc.locale\n });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, {\n format: \"long\",\n locale: this.loc.locale\n });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({\n day: \"numeric\"\n }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({\n day: \"2-digit\"\n }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter ? string({\n month: \"numeric\",\n day: \"numeric\"\n }, \"month\") : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter ? string({\n month: \"2-digit\",\n day: \"numeric\"\n }, \"month\") : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter ? string({\n month: \"numeric\"\n }, \"month\") : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter ? string({\n month: \"2-digit\"\n }, \"month\") : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({\n year: \"numeric\"\n }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter ? string({\n year: \"2-digit\"\n }, \"year\") : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter ? string({\n year: \"numeric\"\n }, \"year\") : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter ? string({\n year: \"numeric\"\n }, \"year\") : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"n\":\n return this.num(dt.localWeekNumber);\n case \"nn\":\n return this.num(dt.localWeekNumber, 2);\n case \"ii\":\n return this.num(dt.localWeekYear.toString().slice(-2), 2);\n case \"iiii\":\n return this.num(dt.localWeekYear, 4);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n formatDurationFromString(dur, fmt) {\n const invertLargest = this.opts.signMode === \"negativeLargestOnly\" ? -1 : 1;\n const tokenToField = token => {\n switch (token[0]) {\n case \"S\":\n return \"milliseconds\";\n case \"s\":\n return \"seconds\";\n case \"m\":\n return \"minutes\";\n case \"h\":\n return \"hours\";\n case \"d\":\n return \"days\";\n case \"w\":\n return \"weeks\";\n case \"M\":\n return \"months\";\n case \"y\":\n return \"years\";\n default:\n return null;\n }\n },\n tokenToString = (lildur, info) => token => {\n const mapped = tokenToField(token);\n if (mapped) {\n const inversionFactor = info.isNegativeDuration && mapped !== info.largestUnit ? invertLargest : 1;\n let signDisplay;\n if (this.opts.signMode === \"negativeLargestOnly\" && mapped !== info.largestUnit) {\n signDisplay = \"never\";\n } else if (this.opts.signMode === \"all\") {\n signDisplay = \"always\";\n } else {\n // \"auto\" and \"negative\" are the same, but \"auto\" has better support\n signDisplay = \"auto\";\n }\n return this.num(lildur.get(mapped) * inversionFactor, token.length, signDisplay);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce((found, {\n literal,\n val\n }) => literal ? found : found.concat(val), []),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter(t => t)),\n durationInfo = {\n isNegativeDuration: collapsed < 0,\n // this relies on \"collapsed\" being based on \"shiftTo\", which builds up the object\n // in order\n largestUnit: Object.keys(collapsed.values)[0]\n };\n return stringifyTokens(tokens, tokenToString(collapsed, durationInfo));\n }\n}\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nconst ianaRegex = /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\nfunction combineExtractors(...extractors) {\n return m => extractors.reduce(([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [{\n ...mergedVals,\n ...val\n }, zone || mergedZone, next];\n }, [{}, null, 1]).slice(0, 2);\n}\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:([Zz])|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nconst isoExtendedZone = `(?:${offsetRegex.source}?(?:\\\\[(${ianaRegex.source})\\\\])?)?`;\nconst isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nconst isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);\nconst isoTimeExtensionRegex = RegExp(`(?:[Tt]${isoTimeRegex.source})?`);\nconst isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nconst isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nconst isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nconst extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nconst extractISOOrdinalData = simpleParse(\"year\", \"ordinal\");\nconst sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nconst sqlTimeRegex = RegExp(`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`);\nconst sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1)\n };\n return [item, null, cursor + 3];\n}\nfunction extractISOTime(match, cursor) {\n const item = {\n hours: int(match, cursor, 0),\n minutes: int(match, cursor + 1, 0),\n seconds: int(match, cursor + 2, 0),\n milliseconds: parseMillis(match[cursor + 3])\n };\n return [item, null, cursor + 4];\n}\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO time parsing\n\nconst isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);\n\n// ISO duration parsing\n\nconst isoDuration = /^-?P(?:(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)Y)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)W)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)D)?(?:T(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)H)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,20}))?S)?)?)$/;\nfunction extractISODuration(match) {\n const [s, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match;\n const hasNegativePrefix = s[0] === \"-\";\n const negativeSeconds = secondStr && secondStr[0] === \"-\";\n const maybeNegate = (num, force = false) => num !== undefined && (force || num && hasNegativePrefix) ? -num : num;\n return [{\n years: maybeNegate(parseFloating(yearStr)),\n months: maybeNegate(parseFloating(monthStr)),\n weeks: maybeNegate(parseFloating(weekStr)),\n days: maybeNegate(parseFloating(dayStr)),\n hours: maybeNegate(parseFloating(hourStr)),\n minutes: maybeNegate(parseFloating(minuteStr)),\n seconds: maybeNegate(parseFloating(secondStr), secondStr === \"-0\"),\n milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds)\n }];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n};\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr)\n };\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1;\n }\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\nfunction extractRFC2822(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr, obsOffset, milOffset, offHourStr, offMinuteStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n return [result, new FixedOffsetZone(offset)];\n}\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^()]*\\)|[\\n\\t]/g, \" \").replace(/(\\s\\s+)/g, \" \").trim();\n}\n\n// http date\n\nconst rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\nconst extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone);\nconst extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset, extractIANAZone);\nconst extractISOOrdinalDateAndTime = combineExtractors(extractISOOrdinalData, extractISOTime, extractISOOffset, extractIANAZone);\nconst extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone);\n\n/*\n * @private\n */\n\nfunction parseISODate(s) {\n return parse(s, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]);\n}\nfunction parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\nfunction parseHTTPDate(s) {\n return parse(s, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]);\n}\nfunction parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\nconst extractISOTimeOnly = combineExtractors(extractISOTime);\nfunction parseISOTimeOnly(s) {\n return parse(s, [isoTimeOnly, extractISOTimeOnly]);\n}\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone);\nfunction parseSQL(s) {\n return parse(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]);\n}\n\nconst INVALID$2 = \"Invalid Duration\";\n\n// unit conversion constants\nconst lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000\n },\n hours: {\n minutes: 60,\n seconds: 60 * 60,\n milliseconds: 60 * 60 * 1000\n },\n minutes: {\n seconds: 60,\n milliseconds: 60 * 1000\n },\n seconds: {\n milliseconds: 1000\n }\n },\n casualMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000\n },\n ...lowOrderMatrix\n },\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: daysInYearAccurate * 24 / 4,\n minutes: daysInYearAccurate * 24 * 60 / 4,\n seconds: daysInYearAccurate * 24 * 60 * 60 / 4,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 / 4\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000\n },\n ...lowOrderMatrix\n };\n\n// units ordered by size\nconst orderedUnits$1 = [\"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\"];\nconst reverseUnits = orderedUnits$1.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone$1(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : {\n ...dur.values,\n ...(alts.values || {})\n },\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n matrix: alts.matrix || dur.matrix\n };\n return new Duration(conf);\n}\nfunction durationToMillis(matrix, vals) {\n var _vals$milliseconds;\n let sum = (_vals$milliseconds = vals.milliseconds) != null ? _vals$milliseconds : 0;\n for (const unit of reverseUnits.slice(1)) {\n if (vals[unit]) {\n sum += vals[unit] * matrix[unit][\"milliseconds\"];\n }\n }\n return sum;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n // the logic below assumes the overall value of the duration is positive\n // if this is not the case, factor is used to make it so\n const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;\n orderedUnits$1.reduceRight((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const previousVal = vals[previous] * factor;\n const conv = matrix[current][previous];\n\n // if (previousVal < 0):\n // lower order unit is negative (e.g. { years: 2, days: -2 })\n // normalize this by reducing the higher order unit by the appropriate amount\n // and increasing the lower order unit\n // this can never make the higher order unit negative, because this function only operates\n // on positive durations, so the amount of time represented by the lower order unit cannot\n // be larger than the higher order unit\n // else:\n // lower order unit is positive (e.g. { years: 2, days: 450 } or { years: -2, days: 450 })\n // in this case we attempt to convert as much as possible from the lower order unit into\n // the higher order one\n //\n // Math.floor takes care of both of these cases, rounding away from 0\n // if previousVal < 0 it makes the absolute value larger\n // if previousVal >= it makes the absolute value smaller\n const rollUp = Math.floor(previousVal / conv);\n vals[current] += rollUp * factor;\n vals[previous] -= rollUp * conv * factor;\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n\n // try to convert any decimals into smaller units if possible\n // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }\n orderedUnits$1.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const fraction = vals[previous] % 1;\n vals[previous] -= fraction;\n vals[current] += fraction * matrix[previous][current];\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n// Remove all properties with a value of 0 from an object\nfunction removeZeroes(vals) {\n const newVals = {};\n for (const [key, value] of Object.entries(vals)) {\n if (value !== 0) {\n newVals[key] = value;\n }\n }\n return newVals;\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nclass Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n let matrix = accurate ? accurateMatrix : casualMatrix;\n if (config.matrix) {\n matrix = config.matrix;\n }\n\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = matrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject({\n milliseconds: count\n }, opts);\n }\n\n /**\n * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {Object} [opts=[]] - options for creating this Duration\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the custom conversion system to use\n * @return {Duration}\n */\n static fromObject(obj, opts = {}) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(`Duration.fromObject: argument expected to be an object, got ${obj === null ? \"null\" : typeof obj}`);\n }\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit),\n loc: Locale.fromObject(opts),\n conversionAccuracy: opts.conversionAccuracy,\n matrix: opts.matrix\n });\n }\n\n /**\n * Create a Duration from DurationLike.\n *\n * @param {Object | number | Duration} durationLike\n * One of:\n * - object with keys like 'years' and 'hours'.\n * - number representing milliseconds\n * - Duration instance\n * @return {Duration}\n */\n static fromDurationLike(durationLike) {\n if (isNumber(durationLike)) {\n return Duration.fromMillis(durationLike);\n } else if (Duration.isDuration(durationLike)) {\n return durationLike;\n } else if (typeof durationLike === \"object\") {\n return Duration.fromObject(durationLike);\n } else {\n throw new InvalidArgumentError(`Unknown duration argument ${durationLike} of type ${typeof durationLike}`);\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the preset conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 time string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @return {Duration}\n */\n static fromISOTime(text, opts) {\n const [parsed] = parseISOTimeOnly(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({\n invalid\n });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\"\n }[unit ? unit.toLowerCase() : unit];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return o && o.isLuxonDuration || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `w` for weeks\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * Tokens can be escaped by wrapping with single quotes.\n * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @param {'negative'|'all'|'negativeLargestOnly'} [opts.signMode=negative] - How to handle signs\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @example Duration.fromObject({ days: 6, seconds: 2 }).toFormat(\"d s\", { signMode: \"all\" }) //=> \"+6 +2\"\n * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat(\"d s\", { signMode: \"all\" }) //=> \"-6 -2\"\n * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat(\"d s\", { signMode: \"negativeLargestOnly\" }) //=> \"-6 2\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = {\n ...opts,\n floor: opts.round !== false && opts.floor !== false\n };\n return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;\n }\n\n /**\n * Returns a string representation of a Duration with all units included.\n * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options\n * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.\n * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.\n * @param {boolean} [opts.showZeros=true] - Show all units previously used by the duration even if they are zero\n * @example\n * ```js\n * var dur = Duration.fromObject({ months: 1, weeks: 0, hours: 5, minutes: 6 })\n * dur.toHuman() //=> '1 month, 0 weeks, 5 hours, 6 minutes'\n * dur.toHuman({ listStyle: \"long\" }) //=> '1 month, 0 weeks, 5 hours, and 6 minutes'\n * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 mth, 0 wks, 5 hr, 6 min'\n * dur.toHuman({ showZeros: false }) //=> '1 month, 5 hours, 6 minutes'\n * ```\n */\n toHuman(opts = {}) {\n if (!this.isValid) return INVALID$2;\n const showZeros = opts.showZeros !== false;\n const l = orderedUnits$1.map(unit => {\n const val = this.values[unit];\n if (isUndefined(val) || val === 0 && !showZeros) {\n return null;\n }\n return this.loc.numberFormatter({\n style: \"unit\",\n unitDisplay: \"long\",\n ...opts,\n unit: unit.slice(0, -1)\n }).format(val);\n }).filter(n => n);\n return this.loc.listFormatter({\n type: \"conjunction\",\n style: opts.listStyle || \"narrow\",\n ...opts\n }).format(l);\n }\n\n /**\n * Returns a JavaScript object with this Duration's values.\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject() {\n if (!this.isValid) return {};\n return {\n ...this.values\n };\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n * @return {string}\n */\n toISOTime(opts = {}) {\n if (!this.isValid) return null;\n const millis = this.toMillis();\n if (millis < 0 || millis >= 86400000) return null;\n opts = {\n suppressMilliseconds: false,\n suppressSeconds: false,\n includePrefix: false,\n format: \"extended\",\n ...opts,\n includeOffset: false\n };\n const dateTime = DateTime.fromMillis(millis, {\n zone: \"UTC\"\n });\n return dateTime.toISOTime(opts);\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns a string representation of this Duration appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Duration { values: ${JSON.stringify(this.values)} }`;\n } else {\n return `Duration { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n toMillis() {\n if (!this.isValid) return NaN;\n return durationToMillis(this.matrix, this.values);\n }\n\n /**\n * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration),\n result = {};\n for (const k of orderedUnits$1) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n return clone$1(this, {\n values: result\n }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hours\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone$1(this, {\n values: result\n }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n const mixed = {\n ...this.values,\n ...normalizeObject(values, Duration.normalizeUnit)\n };\n return clone$1(this, {\n values: mixed\n });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({\n locale,\n numberingSystem,\n conversionAccuracy,\n matrix\n } = {}) {\n const loc = this.loc.clone({\n locale,\n numberingSystem\n });\n const opts = {\n loc,\n matrix,\n conversionAccuracy\n };\n return clone$1(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * Assuming the overall value of the Duration is positive, this means:\n * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)\n * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise\n * the overall value would be negative, see third example)\n * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)\n *\n * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone$1(this, {\n values: vals\n }, true);\n }\n\n /**\n * Rescale units to its largest representation\n * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }\n * @return {Duration}\n */\n rescale() {\n if (!this.isValid) return this;\n const vals = removeZeroes(this.normalize().shiftToAll().toObject());\n return clone$1(this, {\n values: vals\n }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n if (units.length === 0) {\n return this;\n }\n units = units.map(u => Duration.normalizeUnit(u));\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n for (const k of orderedUnits$1) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n // only keep the integer part for now in the hopes of putting any decimal part\n // into a smaller unit later\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = (own * 1000 - i * 1000) / 1000;\n\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n normalizeValues(this.matrix, built);\n return clone$1(this, {\n values: built\n }, true);\n }\n\n /**\n * Shift this Duration to all available units.\n * Same as shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\")\n * @return {Duration}\n */\n shiftToAll() {\n if (!this.isValid) return this;\n return this.shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\");\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n }\n return clone$1(this, {\n values: negated\n }, true);\n }\n\n /**\n * Removes all units with values equal to 0 from this Duration.\n * @example Duration.fromObject({ years: 2, days: 0, hours: 0, minutes: 0 }).removeZeros().toObject() //=> { years: 2 }\n * @return {Duration}\n */\n removeZeros() {\n if (!this.isValid) return this;\n const vals = removeZeroes(this.values);\n return clone$1(this, {\n values: vals\n }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n function eq(v1, v2) {\n // Consider 0 and undefined as equal\n if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n return v1 === v2;\n }\n for (const u of orderedUnits$1) {\n if (!eq(this.values[u], other.values[u])) {\n return false;\n }\n }\n return true;\n }\n}\n\nconst INVALID$1 = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`);\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval.merge}, {@link Interval.xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toLocaleString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */\nclass Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({\n invalid\n });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n const validateError = validateStartEnd(builtStart, builtEnd);\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return o && o.isLuxonInterval || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval. This is the first instant which is not part of the interval\n * (Interval is half-open).\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns the last DateTime included in the interval (since end is not part of the interval)\n * @type {DateTime}\n */\n get lastDateTime() {\n return this.isValid ? this.e ? this.e.minus(1) : null : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime\n * @return {number}\n */\n count(unit = \"milliseconds\", opts) {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit, opts);\n let end;\n if (opts != null && opts.useLocaleWeeks) {\n end = this.end.reconfigure({\n locale: start.locale\n });\n } else {\n end = this.end;\n }\n end = end.startOf(unit, opts);\n return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({\n start,\n end\n } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...DateTime} dateTimes - the unit of time to count.\n * @return {Array}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes.map(friendlyDateTime).filter(d => this.contains(d)).sort((a, b) => a.toMillis() - b.toMillis()),\n results = [];\n let {\n s\n } = this,\n i = 0;\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {Array}\n */\n splitBy(duration) {\n const dur = Duration.fromDurationLike(duration);\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n let {\n s\n } = this,\n idx = 1,\n next;\n const results = [];\n while (s < this.e) {\n const added = this.start.plus(dur.mapUnits(x => x * idx));\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n idx += 1;\n }\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {Array}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n if (s >= e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into an equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * The resulting array will contain the Intervals in ascending order, that is, starting with the earliest Interval\n * and ending with the latest.\n *\n * @param {Array} intervals\n * @return {Array}\n */\n static merge(intervals) {\n const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n }, [[], null]);\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map(i => [{\n time: i.s,\n type: \"s\"\n }, {\n time: i.e,\n type: \"e\"\n }]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n start = null;\n }\n }\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {Array}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals)).map(i => this.intersection(i)).filter(i => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID$1;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns a string representation of this Interval appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;\n } else {\n return `Interval { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns a localized string representing this Interval. Accepts the same options as the\n * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as\n * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method\n * is browser-specific, but in general it will return an appropriate representation of the\n * Interval in the assigned locale. Defaults to the system's locale if no locale has been\n * specified.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or\n * Intl.DateTimeFormat constructor options.\n * @param {Object} opts - Options to override the configuration of the start DateTime.\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p\n * @return {string}\n */\n toLocaleString(formatOpts = DATE_SHORT, opts = {}) {\n return this.isValid ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID$1;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID$1;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID$1;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID$1;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format\n * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible\n * formatting tool.\n * @param {string} dateFormat - The format string. This string formats the start and end time.\n * See {@link DateTime#toFormat} for details.\n * @param {Object} opts - Options.\n * @param {string} [opts.separator = ' – '] - A separator to place between the start and end\n * representations.\n * @return {string}\n */\n toFormat(dateFormat, {\n separator = \" – \"\n } = {}) {\n if (!this.isValid) return INVALID$1;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nclass Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.now().setZone(zone).set({\n month: 12\n });\n return !zone.isUniversal && proto.offset !== proto.set({\n month: 6\n }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone#isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Get the weekday on which the week starts according to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number} the start of the week, 1 for Monday through 7 for Sunday\n */\n static getStartOfWeek({\n locale = null,\n locObj = null\n } = {}) {\n return (locObj || Locale.create(locale)).getStartOfWeek();\n }\n\n /**\n * Get the minimum number of days necessary in a week before it is considered part of the next year according\n * to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number}\n */\n static getMinimumDaysInFirstWeek({\n locale = null,\n locObj = null\n } = {}) {\n return (locObj || Locale.create(locale)).getMinDaysInFirstWeek();\n }\n\n /**\n * Get the weekdays, which are considered the weekend according to the given locale\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday\n */\n static getWeekendWeekdays({\n locale = null,\n locObj = null\n } = {}) {\n // copy the array, because we cache it internally\n return (locObj || Locale.create(locale)).getWeekendDays().slice();\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {Array}\n */\n static months(length = \"long\", {\n locale = null,\n numberingSystem = null,\n locObj = null,\n outputCalendar = \"gregory\"\n } = {}) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link Info#months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {Array}\n */\n static monthsFormat(length = \"long\", {\n locale = null,\n numberingSystem = null,\n locObj = null,\n outputCalendar = \"gregory\"\n } = {}) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {Array}\n */\n static weekdays(length = \"long\", {\n locale = null,\n numberingSystem = null,\n locObj = null\n } = {}) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link Info#weekdays}\n * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @return {Array}\n */\n static weekdaysFormat(length = \"long\", {\n locale = null,\n numberingSystem = null,\n locObj = null\n } = {}) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {Array}\n */\n static meridiems({\n locale = null\n } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {Array}\n */\n static eras(length = \"short\", {\n locale = null\n } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `relative`: whether this environment supports relative time formatting\n * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale\n * @example Info.features() //=> { relative: false, localeWeek: true }\n * @return {Object}\n */\n static features() {\n return {\n relative: hasRelative(),\n localeWeek: hasLocaleWeekInfo()\n };\n }\n}\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = dt => dt.toUTC(0, {\n keepLocalTime: true\n }).startOf(\"day\").valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [[\"years\", (a, b) => b.year - a.year], [\"quarters\", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4], [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12], [\"weeks\", (a, b) => {\n const days = dayDiff(a, b);\n return (days - days % 7) / 7;\n }], [\"days\", dayDiff]];\n const results = {};\n const earlier = cursor;\n let lowestOrder, highWater;\n\n /* This loop tries to diff using larger units first.\n If we overshoot, we backtrack and try the next smaller unit.\n \"cursor\" starts out at the earlier timestamp and moves closer and closer to \"later\"\n as we use smaller and smaller units.\n highWater keeps track of where we would be if we added one more of the smallest unit,\n this is used later to potentially convert any difference smaller than the smallest higher order unit\n into a fraction of that smallest higher order unit\n */\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n results[unit] = differ(cursor, later);\n highWater = earlier.plus(results);\n if (highWater > later) {\n // we overshot the end point, backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n\n // if we are still overshooting now, we need to backtrack again\n // this happens in certain situations when diffing times in different zones,\n // because this calculation ignores time zones\n if (cursor > later) {\n // keep the \"overshot by 1\" around as highWater\n highWater = cursor;\n // backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n }\n } else {\n cursor = highWater;\n }\n }\n }\n return [cursor, results, highWater, lowestOrder];\n}\nfunction diff (earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n const remainingMillis = later - cursor;\n const lowerOrderUnits = units.filter(u => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0);\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({\n [lowestOrder]: 1\n });\n }\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n const duration = Duration.fromObject(results, opts);\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts).shiftTo(...lowerOrderUnits).plus(duration);\n } else {\n return duration;\n }\n}\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\nfunction intUnit(regex, post = i => i) {\n return {\n regex,\n deser: ([s]) => post(parseDigits(s))\n };\n}\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `[ ${NBSP}]`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\nfunction stripInsensitivities(s) {\n return s.replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) => strings.findIndex(i => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex\n };\n }\n}\nfunction offset(regex, groups) {\n return {\n regex,\n deser: ([, h, m]) => signedOffset(h, m),\n groups\n };\n}\nfunction simple(regex) {\n return {\n regex,\n deser: ([s]) => s\n };\n}\nfunction escapeToken(value) {\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\n/**\n * @param token\n * @param {Locale} loc\n */\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = t => ({\n regex: RegExp(escapeToken(t.val)),\n deser: ([s]) => s,\n literal: true\n }),\n unitate = t => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\"), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\"), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n case \"uu\":\n return simple(oneOrTwo);\n case \"uuu\":\n return intUnit(one);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n // this special-case \"token\" represents a place where a macro-token expanded into a white-space literal\n // in this case we accept any non-newline white-space\n case \" \":\n return simple(/[^\\S\\n\\r]/);\n default:\n return literal(t);\n }\n };\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP\n };\n unit.token = token;\n return unit;\n}\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\"\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\"\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\"\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\"\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour12: {\n numeric: \"h\",\n \"2-digit\": \"hh\"\n },\n hour24: {\n numeric: \"H\",\n \"2-digit\": \"HH\"\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\"\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\"\n },\n timeZoneName: {\n long: \"ZZZZZ\",\n short: \"ZZZ\"\n }\n};\nfunction tokenForPart(part, formatOpts, resolvedOpts) {\n const {\n type,\n value\n } = part;\n if (type === \"literal\") {\n const isSpace = /^\\s+$/.test(value);\n return {\n literal: !isSpace,\n val: isSpace ? \" \" : value\n };\n }\n const style = formatOpts[type];\n\n // The user might have explicitly specified hour12 or hourCycle\n // if so, respect their decision\n // if not, refer back to the resolvedOpts, which are based on the locale\n let actualType = type;\n if (type === \"hour\") {\n if (formatOpts.hour12 != null) {\n actualType = formatOpts.hour12 ? \"hour12\" : \"hour24\";\n } else if (formatOpts.hourCycle != null) {\n if (formatOpts.hourCycle === \"h11\" || formatOpts.hourCycle === \"h12\") {\n actualType = \"hour12\";\n } else {\n actualType = \"hour24\";\n }\n } else {\n // tokens only differentiate between 24 hours or not,\n // so we do not need to check hourCycle here, which is less supported anyways\n actualType = resolvedOpts.hour12 ? \"hour12\" : \"hour24\";\n }\n }\n let val = partTypeStyleToTokenVal[actualType];\n if (typeof val === \"object\") {\n val = val[style];\n }\n if (val) {\n return {\n literal: false,\n val\n };\n }\n return undefined;\n}\nfunction buildRegex(units) {\n const re = units.map(u => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\nfunction dateTimeFromMatches(matches) {\n const toField = token => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n let zone = null;\n let specificOffset;\n if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n }\n if (!isUndefined(matches.Z)) {\n if (!zone) {\n zone = new FixedOffsetZone(matches.Z);\n }\n specificOffset = matches.Z;\n }\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n return r;\n }, {});\n return [vals, zone, specificOffset];\n}\nlet dummyDateTimeCache = null;\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n return dummyDateTimeCache;\n}\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n const tokens = formatOptsToTokens(formatOpts, locale);\n if (tokens == null || tokens.includes(undefined)) {\n return token;\n }\n return tokens;\n}\nfunction expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map(t => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nclass TokenParser {\n constructor(locale, format) {\n this.locale = locale;\n this.format = format;\n this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale);\n this.units = this.tokens.map(t => unitForToken(t, locale));\n this.disqualifyingUnit = this.units.find(t => t.invalidReason);\n if (!this.disqualifyingUnit) {\n const [regexString, handlers] = buildRegex(this.units);\n this.regex = RegExp(regexString, \"i\");\n this.handlers = handlers;\n }\n }\n explainFromTokens(input) {\n if (!this.isValid) {\n return {\n input,\n tokens: this.tokens,\n invalidReason: this.invalidReason\n };\n } else {\n const [rawMatches, matches] = match(input, this.regex, this.handlers),\n [result, zone, specificOffset] = matches ? dateTimeFromMatches(matches) : [null, null, undefined];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\"Can't include meridiem when specifying 24-hour format\");\n }\n return {\n input,\n tokens: this.tokens,\n regex: this.regex,\n rawMatches,\n matches,\n result,\n zone,\n specificOffset\n };\n }\n }\n get isValid() {\n return !this.disqualifyingUnit;\n }\n get invalidReason() {\n return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;\n }\n}\nfunction explainFromTokens(locale, input, format) {\n const parser = new TokenParser(locale, format);\n return parser.explainFromTokens(input);\n}\nfunction parseFromTokens(locale, input, format) {\n const {\n result,\n zone,\n specificOffset,\n invalidReason\n } = explainFromTokens(locale, input, format);\n return [result, zone, specificOffset, invalidReason];\n}\nfunction formatOptsToTokens(formatOpts, locale) {\n if (!formatOpts) {\n return null;\n }\n const formatter = Formatter.create(locale, formatOpts);\n const df = formatter.dtFormatter(getDummyDateTime());\n const parts = df.formatToParts();\n const resolvedOpts = df.resolvedOptions();\n return parts.map(p => tokenForPart(p, formatOpts, resolvedOpts));\n}\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedLocalWeekData(dt) {\n if (dt.localWeekData === null) {\n dt.localWeekData = gregorianToWeek(dt.c, dt.loc.getMinDaysInFirstWeek(), dt.loc.getStartOfWeek());\n }\n return dt.localWeekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid\n };\n return new DateTime({\n ...current,\n ...alts,\n old: current\n });\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n const d = new Date(ts);\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds()\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = {\n ...inst.c,\n year,\n month,\n day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7\n },\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n return {\n ts,\n o\n };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n const {\n setZone,\n zone\n } = opts;\n if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(parsed, {\n ...opts,\n zone: interpretationZone,\n specificOffset\n });\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`));\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true\n }).formatDateTimeFromString(dt, format) : null;\n}\nfunction toISODate(o, extended, precision) {\n const longFormat = o.c.year > 9999 || o.c.year < 0;\n let c = \"\";\n if (longFormat && o.c.year >= 0) c += \"+\";\n c += padStart(o.c.year, longFormat ? 6 : 4);\n if (precision === \"year\") return c;\n if (extended) {\n c += \"-\";\n c += padStart(o.c.month);\n if (precision === \"month\") return c;\n c += \"-\";\n } else {\n c += padStart(o.c.month);\n if (precision === \"month\") return c;\n }\n c += padStart(o.c.day);\n return c;\n}\nfunction toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision) {\n let showSeconds = !suppressSeconds || o.c.millisecond !== 0 || o.c.second !== 0,\n c = \"\";\n switch (precision) {\n case \"day\":\n case \"month\":\n case \"year\":\n break;\n default:\n c += padStart(o.c.hour);\n if (precision === \"hour\") break;\n if (extended) {\n c += \":\";\n c += padStart(o.c.minute);\n if (precision === \"minute\") break;\n if (showSeconds) {\n c += \":\";\n c += padStart(o.c.second);\n }\n } else {\n c += padStart(o.c.minute);\n if (precision === \"minute\") break;\n if (showSeconds) {\n c += padStart(o.c.second);\n }\n }\n if (precision === \"second\") break;\n if (showSeconds && (!suppressMilliseconds || o.c.millisecond !== 0)) {\n c += \".\";\n c += padStart(o.c.millisecond, 3);\n }\n }\n if (includeOffset) {\n if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {\n c += \"Z\";\n } else if (o.o < 0) {\n c += \"-\";\n c += padStart(Math.trunc(-o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(-o.o % 60));\n } else {\n c += \"+\";\n c += padStart(Math.trunc(o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(o.o % 60));\n }\n }\n if (extendedZone) {\n c += \"[\" + o.zone.ianaName + \"]\";\n }\n return c;\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\"weekYear\", \"weekNumber\", \"weekday\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n}\nfunction normalizeUnitWithLocalWeeks(unit) {\n switch (unit.toLowerCase()) {\n case \"localweekday\":\n case \"localweekdays\":\n return \"localWeekday\";\n case \"localweeknumber\":\n case \"localweeknumbers\":\n return \"localWeekNumber\";\n case \"localweekyear\":\n case \"localweekyears\":\n return \"localWeekYear\";\n default:\n return normalizeUnit(unit);\n }\n}\n\n// cache offsets for zones based on the current timestamp when this function is\n// first called. When we are handling a datetime from components like (year,\n// month, day, hour) in a time zone, we need a guess about what the timezone\n// offset is so that we can convert into a UTC timestamp. One way is to find the\n// offset of now in the zone. The actual date may have a different offset (for\n// example, if we handle a date in June while we're in December in a zone that\n// observes DST), but we can check and adjust that.\n//\n// When handling many dates, calculating the offset for now every time is\n// expensive. It's just a guess, so we can cache the offset to use even if we\n// are right on a time change boundary (we'll just correct in the other\n// direction). Using a timestamp from first read is a slight optimization for\n// handling dates close to the current date, since those dates will usually be\n// in the same offset (we could set the timestamp statically, instead). We use a\n// single timestamp for all zones to make things a bit more predictable.\n//\n// This is safe for quickDT (used by local() and utc()) because we don't fill in\n// higher-order units from tsNow (as we do in fromObject, this requires that\n// offset is calculated from tsNow).\n/**\n * @param {Zone} zone\n * @return {number}\n */\nfunction guessOffsetForZone(zone) {\n if (zoneOffsetTs === undefined) {\n zoneOffsetTs = Settings.now();\n }\n\n // Do not cache anything but IANA zones, because it is not safe to do so.\n // Guessing an offset which is not present in the zone can cause wrong results from fixOffset\n if (zone.type !== \"iana\") {\n return zone.offset(zoneOffsetTs);\n }\n const zoneName = zone.name;\n let offsetGuess = zoneOffsetGuessCache.get(zoneName);\n if (offsetGuess === undefined) {\n offsetGuess = zone.offset(zoneOffsetTs);\n zoneOffsetGuessCache.set(zoneName, offsetGuess);\n }\n return offsetGuess;\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, opts) {\n const zone = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n }\n const loc = Locale.fromObject(opts);\n let ts, o;\n\n // assume we have the higher-order units\n if (!isUndefined(obj.year)) {\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n const offsetProvis = guessOffsetForZone(zone);\n [ts, o] = objToTS(obj, offsetProvis, zone);\n } else {\n ts = Settings.now();\n }\n return new DateTime({\n ts,\n zone,\n loc,\n o\n });\n}\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n rounding = isUndefined(opts.rounding) ? \"trunc\" : opts.rounding,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, opts.calendary ? \"round\" : rounding);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = unit => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\nfunction lastOpts(argList) {\n let opts = {},\n args;\n if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n opts = argList[argList.length - 1];\n args = Array.from(argList).slice(0, argList.length - 1);\n } else {\n args = Array.from(argList);\n }\n return [opts, args];\n}\n\n/**\n * Timestamp to use for cached zone offset guesses (exposed for test)\n */\nlet zoneOffsetTs;\n/**\n * Cache for zone offset guesses (exposed for test).\n *\n * This optimizes quickDT via guessOffsetForZone to avoid repeated calls of\n * zone.offset().\n */\nconst zoneOffsetGuessCache = new Map();\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nclass DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n let invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) || (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n // If an offset has been passed and we have not been called from\n // clone(), we can trust it and avoid the offset calculation.\n const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.localWeekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a DateTime for the current instant, in the system's time zone.\n *\n * Use Settings to override these default values if needed.\n * @example DateTime.now().toISO() //~> now in the ISO format\n * @return {DateTime}\n */\n static now() {\n return new DateTime({});\n }\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month, 1-indexed\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local({ zone: \"America/New_York\" }) //~> now, in US east coast time\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12, { locale: \"fr\" }) //~> 2017-03-12T00:00:00, with a French locale\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" }) //~> 2017-03-12T05:00:00, in UTC\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n return quickDT({\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond\n }, opts);\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @param {Object} options - configuration options for the DateTime\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" }) //~> 2017-03-12T05:45:00Z with a French locale\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n * @return {DateTime}\n */\n static utc() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n opts.zone = FixedOffsetZone.utcInstance;\n return quickDT({\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond\n }, opts);\n }\n\n /**\n * Create a DateTime from a JavaScript Date object. Uses the default zone.\n * @param {Date} date - a JavaScript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options)\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`);\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.localWeekYear - a week year, according to the locale\n * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale\n * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {Object} opts - options for creating this DateTime\n * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [opts.locale='system\\'s locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: \"en-US\" }).toISODate() //=> '2021-12-26'\n * @return {DateTime}\n */\n static fromObject(obj, opts = {}) {\n obj = obj || {};\n const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n const loc = Locale.fromObject(opts);\n const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);\n const {\n minDaysInFirstWeek,\n startOfWeek\n } = usesLocalWeekValues(normalized, loc);\n const tsNow = Settings.now(),\n offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");\n }\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n const useWeekData = definiteWeekDef || normalized.weekday && !containsGregor;\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? ordinalToGregorian(normalized) : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\"mismatched weekday\", `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`);\n }\n if (!inst.isValid) {\n return DateTime.invalid(inst.invalid);\n }\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n const {\n locale = null,\n numberingSystem = null\n } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n }),\n [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({\n invalid\n });\n }\n }\n\n /**\n * Check if an object is an instance of DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return o && o.isLuxonDateTime || false;\n }\n\n /**\n * Produce the format string for a set of options\n * @param formatOpts\n * @param localeOpts\n * @returns {string}\n */\n static parseFormatForOpts(formatOpts, localeOpts = {}) {\n const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts));\n return !tokenList ? null : tokenList.map(t => t ? t.val : null).join(\"\");\n }\n\n /**\n * Produce the the fully expanded format token for the locale\n * Does NOT quote characters, so quoted tokens will not round trip correctly\n * @param fmt\n * @param localeOpts\n * @returns {string}\n */\n static expandFormat(fmt, localeOpts = {}) {\n const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts));\n return expanded.map(t => t.val).join(\"\");\n }\n static resetCache() {\n zoneOffsetTs = undefined;\n zoneOffsetGuessCache.clear();\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 12, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Returns true if this date is on a weekend according to the locale, false otherwise\n * @returns {boolean}\n */\n get isWeekend() {\n return this.isValid && this.loc.getWeekendDays().includes(this.weekday);\n }\n\n /**\n * Get the day of the week according to the locale.\n * 1 is the first day of the week and 7 is the last day of the week.\n * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,\n * @returns {number}\n */\n get localWeekday() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the week number of the week year according to the locale. Different locales assign week numbers differently,\n * because the week can start on different days of the week (see localWeekday) and because a different number of days\n * is required for a week to count as the first week of a year.\n * @returns {number}\n */\n get localWeekNumber() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)\n * differently, see localWeekNumber.\n * @returns {number}\n */\n get localWeekYear() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", {\n locObj: this.loc\n })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", {\n locObj: this.loc\n })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", {\n locObj: this.loc\n })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", {\n locObj: this.loc\n })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.now().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.isUniversal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return this.offset > this.set({\n month: 1,\n day: 1\n }).offset || this.offset > this.set({\n month: 5\n }).offset;\n }\n }\n\n /**\n * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC\n * in this DateTime's zone. During DST changes local time can be ambiguous, for example\n * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.\n * This method will return both possible DateTimes if this DateTime's local time is ambiguous.\n * @returns {DateTime[]}\n */\n getPossibleOffsets() {\n if (!this.isValid || this.isOffsetFixed) {\n return [this];\n }\n const dayMs = 86400000;\n const minuteMs = 60000;\n const localTS = objToLocalTS(this.c);\n const oEarlier = this.zone.offset(localTS - dayMs);\n const oLater = this.zone.offset(localTS + dayMs);\n const o1 = this.zone.offset(localTS - oEarlier * minuteMs);\n const o2 = this.zone.offset(localTS - oLater * minuteMs);\n if (o1 === o2) {\n return [this];\n }\n const ts1 = localTS - o1 * minuteMs;\n const ts2 = localTS - o2 * minuteMs;\n const c1 = tsToObj(ts1, o1);\n const c2 = tsToObj(ts2, o2);\n if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) {\n return [clone(this, {\n ts: ts1\n }), clone(this, {\n ts: ts2\n })];\n }\n return [this];\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's local week year\n * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52\n * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53\n * @type {number}\n */\n get weeksInLocalWeekYear() {\n return this.isValid ? weeksInWeekYear(this.localWeekYear, this.loc.getMinDaysInFirstWeek(), this.loc.getStartOfWeek()) : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOptions(opts = {}) {\n const {\n locale,\n numberingSystem,\n calendar\n } = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this);\n return {\n locale,\n numberingSystem,\n outputCalendar: calendar\n };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link DateTime#setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, {\n keepLocalTime = false,\n keepCalendarTime = false\n } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, {\n ts: newTS,\n zone\n });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({\n locale,\n numberingSystem,\n outputCalendar\n } = {}) {\n const loc = this.loc.clone({\n locale,\n numberingSystem,\n outputCalendar\n });\n return clone(this, {\n loc\n });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({\n locale\n });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n *\n * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.\n * They cannot be mixed with ISO-week units like `weekday`.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);\n const {\n minDaysInFirstWeek,\n startOfWeek\n } = usesLocalWeekValues(normalized, this.loc);\n const settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");\n }\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian({\n ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek),\n ...normalized\n }, minDaysInFirstWeek, startOfWeek);\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian({\n ...gregorianToOrdinal(this.c),\n ...normalized\n });\n } else {\n mixed = {\n ...this.toObject(),\n ...normalized\n };\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, {\n ts,\n o\n });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.now().plus(123) //~> in 123 milliseconds\n * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link DateTime#plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit, {\n useLocaleWeeks = false\n } = {}) {\n if (!this.isValid) return this;\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n if (useLocaleWeeks) {\n const startOfWeek = this.loc.getStartOfWeek();\n const {\n weekday\n } = this;\n if (weekday < startOfWeek) {\n o.weekNumber = this.weekNumber - 1;\n }\n o.weekday = startOfWeek;\n } else {\n o.weekday = 1;\n }\n }\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit, opts) {\n return this.isValid ? this.plus({\n [unit]: 1\n }).startOf(unit, opts).minus(1) : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'\n * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(formatOpts = DATE_SHORT, opts = {}) {\n return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.now().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=false] - add the time zone format extension\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'years', 'months', 'days', 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.\n * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @example DateTime.now().toISO({ precision: 'day' }) //=> '2017-04-22Z'\n * @example DateTime.now().toISO({ precision: 'minute' }) //=> '2017-04-22T20:47Z'\n * @return {string|null}\n */\n toISO({\n format = \"extended\",\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset = true,\n extendedZone = false,\n precision = \"milliseconds\"\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n precision = normalizeUnit(precision);\n const ext = format === \"extended\";\n let c = toISODate(this, ext, precision);\n if (orderedUnits.indexOf(precision) >= 3) c += \"T\";\n c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision);\n return c;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @param {string} [opts.precision='day'] - truncate output to desired precision: 'years', 'months', or 'days'.\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @example DateTime.utc(1982, 5, 25).toISODate({ precision: 'month' }) //=> '1982-05'\n * @return {string|null}\n */\n toISODate({\n format = \"extended\",\n precision = \"day\"\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n return toISODate(this, format === \"extended\", normalizeUnit(precision));\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, second: 56 }).toISOTime({ precision: 'minute' }) //=> '07:34Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n includePrefix = false,\n extendedZone = false,\n format = \"extended\",\n precision = \"milliseconds\"\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n precision = normalizeUnit(precision);\n let c = includePrefix && orderedUnits.indexOf(precision) >= 3 ? \"T\" : \"\";\n return c + toISOTime(this, format === \"extended\", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision);\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string|null}\n */\n toSQLDate() {\n if (!this.isValid) {\n return null;\n }\n return toISODate(this, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({\n includeOffset = true,\n includeZone = false,\n includeOffsetSpace = true\n } = {}) {\n let fmt = \"HH:mm:ss.SSS\";\n if (includeZone || includeOffset) {\n if (includeOffsetSpace) {\n fmt += \" \";\n }\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += \"ZZ\";\n }\n }\n return toTechFormat(this, fmt, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;\n } else {\n return `DateTime { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds (including milliseconds in the fractional part) of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns the epoch seconds (as a whole number) of this DateTime.\n * @return {number}\n */\n toUnixInteger() {\n return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n const base = {\n ...this.c\n };\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a JavaScript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\"created by diffing an invalid DateTime\");\n }\n const durOpts = {\n locale: this.locale,\n numberingSystem: this.numberingSystem,\n ...opts\n };\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link DateTime#diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.now(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval|DateTime}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime.\n * Higher-order units must also be identical for this function to return `true`.\n * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used\n * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit, opts) {\n if (!this.isValid) return false;\n const inputMs = otherDateTime.valueOf();\n const adjustedToZone = this.setZone(otherDateTime.zone, {\n keepLocalTime: true\n });\n return adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts);\n }\n\n /**\n * Equality check\n * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc);\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds towards zero by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {string} [options.rounding=\"trunc\"] - rounding method to use when rounding the numbers in the output. Can be \"trunc\" (toward zero), \"expand\" (away from zero), \"round\", \"floor\", or \"ceil\".\n * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({}, {\n zone: this.zone\n }),\n padding = options.padding ? this < base ? -options.padding : options.padding : 0;\n let units = [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"];\n let unit = options.unit;\n if (Array.isArray(options.unit)) {\n units = options.unit;\n unit = undefined;\n }\n return diffRelative(base, this.plus(padding), {\n ...options,\n numeric: \"always\",\n units,\n unit\n });\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n return diffRelative(options.base || DateTime.fromObject({}, {\n zone: this.zone\n }), this, {\n ...options,\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true\n });\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, i => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, i => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const {\n locale = null,\n numberingSystem = null\n } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n /**\n * Build a parser for `fmt` using the given locale. This parser can be passed\n * to {@link DateTime.fromFormatParser} to a parse a date in this format. This\n * can be used to optimize cases where many dates need to be parsed in a\n * specific format.\n *\n * @param {String} fmt - the format the string is expected to be in (see\n * description)\n * @param {Object} options - options used to set locale and numberingSystem\n * for parser\n * @returns {TokenParser} - opaque object to be used\n */\n static buildFormatParser(fmt, options = {}) {\n const {\n locale = null,\n numberingSystem = null\n } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n });\n return new TokenParser(localeToUse, fmt);\n }\n\n /**\n * Create a DateTime from an input string and format parser.\n *\n * The format parser must have been created with the same locale as this call.\n *\n * @param {String} text - the string to parse\n * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}\n * @param {Object} opts - options taken by fromFormat()\n * @returns {DateTime}\n */\n static fromFormatParser(text, formatParser, opts = {}) {\n if (isUndefined(text) || isUndefined(formatParser)) {\n throw new InvalidArgumentError(\"fromFormatParser requires an input string and a format parser\");\n }\n const {\n locale = null,\n numberingSystem = null\n } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n });\n if (!localeToUse.equals(formatParser.locale)) {\n throw new InvalidArgumentError(`fromFormatParser called with a locale of ${localeToUse}, ` + `but the format parser was created for ${formatParser.locale}`);\n }\n const {\n result,\n zone,\n specificOffset,\n invalidReason\n } = formatParser.explainFromTokens(text);\n if (invalidReason) {\n return DateTime.invalid(invalidReason);\n } else {\n return parseDataToDateTime(result, zone, opts, `format ${formatParser.format}`, text, specificOffset);\n }\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link DateTime#toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return DATE_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return DATE_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return DATE_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return DATE_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return TIME_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return TIME_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return TIME_24_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return DATETIME_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return DATETIME_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return DATETIME_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return DATETIME_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nfunction friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`);\n }\n}\n\nconst VERSION = \"3.7.2\";\n\nexports.DateTime = DateTime;\nexports.Duration = Duration;\nexports.FixedOffsetZone = FixedOffsetZone;\nexports.IANAZone = IANAZone;\nexports.Info = Info;\nexports.Interval = Interval;\nexports.InvalidZone = InvalidZone;\nexports.Settings = Settings;\nexports.SystemZone = SystemZone;\nexports.VERSION = VERSION;\nexports.Zone = Zone;\n//# sourceMappingURL=luxon.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronDate = exports.DAYS_IN_MONTH = exports.DateMathOp = exports.TimeUnit = void 0;\nconst luxon_1 = require(\"luxon\");\nvar TimeUnit;\n(function (TimeUnit) {\n TimeUnit[\"Second\"] = \"Second\";\n TimeUnit[\"Minute\"] = \"Minute\";\n TimeUnit[\"Hour\"] = \"Hour\";\n TimeUnit[\"Day\"] = \"Day\";\n TimeUnit[\"Month\"] = \"Month\";\n TimeUnit[\"Year\"] = \"Year\";\n})(TimeUnit || (exports.TimeUnit = TimeUnit = {}));\nvar DateMathOp;\n(function (DateMathOp) {\n DateMathOp[\"Add\"] = \"Add\";\n DateMathOp[\"Subtract\"] = \"Subtract\";\n})(DateMathOp || (exports.DateMathOp = DateMathOp = {}));\nexports.DAYS_IN_MONTH = Object.freeze([31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]);\n/**\n * CronDate class that wraps the Luxon DateTime object to provide\n * a consistent API for working with dates and times in the context of cron.\n */\nclass CronDate {\n #date;\n #dstStart = null;\n #dstEnd = null;\n /**\n * Maps the verb to the appropriate method\n */\n #verbMap = {\n add: {\n [TimeUnit.Year]: this.addYear.bind(this),\n [TimeUnit.Month]: this.addMonth.bind(this),\n [TimeUnit.Day]: this.addDay.bind(this),\n [TimeUnit.Hour]: this.addHour.bind(this),\n [TimeUnit.Minute]: this.addMinute.bind(this),\n [TimeUnit.Second]: this.addSecond.bind(this),\n },\n subtract: {\n [TimeUnit.Year]: this.subtractYear.bind(this),\n [TimeUnit.Month]: this.subtractMonth.bind(this),\n [TimeUnit.Day]: this.subtractDay.bind(this),\n [TimeUnit.Hour]: this.subtractHour.bind(this),\n [TimeUnit.Minute]: this.subtractMinute.bind(this),\n [TimeUnit.Second]: this.subtractSecond.bind(this),\n },\n };\n /**\n * Constructs a new CronDate instance.\n * @param {CronDate | Date | number | string} [timestamp] - The timestamp to initialize the CronDate with.\n * @param {string} [tz] - The timezone to use for the CronDate.\n */\n constructor(timestamp, tz) {\n const dateOpts = { zone: tz };\n // Initialize the internal DateTime object based on the type of timestamp provided.\n if (!timestamp) {\n this.#date = luxon_1.DateTime.local();\n }\n else if (timestamp instanceof CronDate) {\n this.#date = timestamp.#date;\n this.#dstStart = timestamp.#dstStart;\n this.#dstEnd = timestamp.#dstEnd;\n }\n else if (timestamp instanceof Date) {\n this.#date = luxon_1.DateTime.fromJSDate(timestamp, dateOpts);\n }\n else if (typeof timestamp === 'number') {\n this.#date = luxon_1.DateTime.fromMillis(timestamp, dateOpts);\n }\n else {\n this.#date = luxon_1.DateTime.fromISO(timestamp, dateOpts);\n this.#date.isValid || (this.#date = luxon_1.DateTime.fromRFC2822(timestamp, dateOpts));\n this.#date.isValid || (this.#date = luxon_1.DateTime.fromSQL(timestamp, dateOpts));\n this.#date.isValid || (this.#date = luxon_1.DateTime.fromFormat(timestamp, 'EEE, d MMM yyyy HH:mm:ss', dateOpts));\n }\n // Check for valid DateTime and throw an error if not valid.\n if (!this.#date.isValid) {\n throw new Error(`CronDate: unhandled timestamp: ${timestamp}`);\n }\n // Set the timezone if it is provided and different from the current zone.\n if (tz && tz !== this.#date.zoneName) {\n this.#date = this.#date.setZone(tz);\n }\n }\n /**\n * Determines if the given year is a leap year.\n * @param {number} year - The year to check\n * @returns {boolean} - True if the year is a leap year, false otherwise\n * @private\n */\n static #isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n /**\n * Returns daylight savings start time.\n * @returns {number | null}\n */\n get dstStart() {\n return this.#dstStart;\n }\n /**\n * Sets daylight savings start time.\n * @param {number | null} value\n */\n set dstStart(value) {\n this.#dstStart = value;\n }\n /**\n * Returns daylight savings end time.\n * @returns {number | null}\n */\n get dstEnd() {\n return this.#dstEnd;\n }\n /**\n * Sets daylight savings end time.\n * @param {number | null} value\n */\n set dstEnd(value) {\n this.#dstEnd = value;\n }\n /**\n * Adds one year to the current CronDate.\n */\n addYear() {\n this.#date = this.#date.plus({ years: 1 });\n }\n /**\n * Adds one month to the current CronDate.\n */\n addMonth() {\n this.#date = this.#date.plus({ months: 1 }).startOf('month');\n }\n /**\n * Adds one day to the current CronDate.\n */\n addDay() {\n this.#date = this.#date.plus({ days: 1 }).startOf('day');\n }\n /**\n * Adds one hour to the current CronDate.\n */\n addHour() {\n this.#date = this.#date.plus({ hours: 1 }).startOf('hour');\n }\n /**\n * Adds one minute to the current CronDate.\n */\n addMinute() {\n this.#date = this.#date.plus({ minutes: 1 }).startOf('minute');\n }\n /**\n * Adds one second to the current CronDate.\n */\n addSecond() {\n this.#date = this.#date.plus({ seconds: 1 });\n }\n /**\n * Subtracts one year from the current CronDate.\n */\n subtractYear() {\n this.#date = this.#date.minus({ years: 1 });\n }\n /**\n * Subtracts one month from the current CronDate.\n * If the month is 1, it will subtract one year instead.\n */\n subtractMonth() {\n this.#date = this.#date.minus({ months: 1 }).endOf('month').startOf('second');\n }\n /**\n * Subtracts one day from the current CronDate.\n * If the day is 1, it will subtract one month instead.\n */\n subtractDay() {\n this.#date = this.#date.minus({ days: 1 }).endOf('day').startOf('second');\n }\n /**\n * Subtracts one hour from the current CronDate.\n * If the hour is 0, it will subtract one day instead.\n */\n subtractHour() {\n this.#date = this.#date.minus({ hours: 1 }).endOf('hour').startOf('second');\n }\n /**\n * Subtracts one minute from the current CronDate.\n * If the minute is 0, it will subtract one hour instead.\n */\n subtractMinute() {\n this.#date = this.#date.minus({ minutes: 1 }).endOf('minute').startOf('second');\n }\n /**\n * Subtracts one second from the current CronDate.\n * If the second is 0, it will subtract one minute instead.\n */\n subtractSecond() {\n this.#date = this.#date.minus({ seconds: 1 });\n }\n /**\n * Adds a unit of time to the current CronDate.\n * @param {TimeUnit} unit\n */\n addUnit(unit) {\n this.#verbMap.add[unit]();\n }\n /**\n * Subtracts a unit of time from the current CronDate.\n * @param {TimeUnit} unit\n */\n subtractUnit(unit) {\n this.#verbMap.subtract[unit]();\n }\n /**\n * Handles a math operation.\n * @param {DateMathOp} verb - {'add' | 'subtract'}\n * @param {TimeUnit} unit - {'year' | 'month' | 'day' | 'hour' | 'minute' | 'second'}\n */\n invokeDateOperation(verb, unit) {\n if (verb === DateMathOp.Add) {\n this.addUnit(unit);\n return;\n }\n if (verb === DateMathOp.Subtract) {\n this.subtractUnit(unit);\n return;\n }\n /* istanbul ignore next - this would only happen if an end user call the handleMathOp with an invalid verb */\n throw new Error(`Invalid verb: ${verb}`);\n }\n /**\n * Returns the day.\n * @returns {number}\n */\n getDate() {\n return this.#date.day;\n }\n /**\n * Returns the year.\n * @returns {number}\n */\n getFullYear() {\n return this.#date.year;\n }\n /**\n * Returns the day of the week.\n * @returns {number}\n */\n getDay() {\n const weekday = this.#date.weekday;\n return weekday === 7 ? 0 : weekday;\n }\n /**\n * Returns the month.\n * @returns {number}\n */\n getMonth() {\n return this.#date.month - 1;\n }\n /**\n * Returns the hour.\n * @returns {number}\n */\n getHours() {\n return this.#date.hour;\n }\n /**\n * Returns the minutes.\n * @returns {number}\n */\n getMinutes() {\n return this.#date.minute;\n }\n /**\n * Returns the seconds.\n * @returns {number}\n */\n getSeconds() {\n return this.#date.second;\n }\n /**\n * Returns the milliseconds.\n * @returns {number}\n */\n getMilliseconds() {\n return this.#date.millisecond;\n }\n /**\n * Returns the timezone offset from UTC in minutes (e.g. UTC+2 => 120).\n * Useful for detecting DST transition days.\n *\n * @returns {number} UTC offset in minutes\n */\n getUTCOffset() {\n return this.#date.offset;\n }\n /**\n * Sets the time to the start of the day (00:00:00.000) in the current timezone.\n */\n setStartOfDay() {\n this.#date = this.#date.startOf('day');\n }\n /**\n * Sets the time to the end of the day (23:59:59.999) in the current timezone.\n */\n setEndOfDay() {\n this.#date = this.#date.endOf('day');\n }\n /**\n * Returns the time.\n * @returns {number}\n */\n getTime() {\n return this.#date.valueOf();\n }\n /**\n * Returns the UTC day.\n * @returns {number}\n */\n getUTCDate() {\n return this.#getUTC().day;\n }\n /**\n * Returns the UTC year.\n * @returns {number}\n */\n getUTCFullYear() {\n return this.#getUTC().year;\n }\n /**\n * Returns the UTC day of the week.\n * @returns {number}\n */\n getUTCDay() {\n const weekday = this.#getUTC().weekday;\n return weekday === 7 ? 0 : weekday;\n }\n /**\n * Returns the UTC month.\n * @returns {number}\n */\n getUTCMonth() {\n return this.#getUTC().month - 1;\n }\n /**\n * Returns the UTC hour.\n * @returns {number}\n */\n getUTCHours() {\n return this.#getUTC().hour;\n }\n /**\n * Returns the UTC minutes.\n * @returns {number}\n */\n getUTCMinutes() {\n return this.#getUTC().minute;\n }\n /**\n * Returns the UTC seconds.\n * @returns {number}\n */\n getUTCSeconds() {\n return this.#getUTC().second;\n }\n /**\n * Returns the UTC milliseconds.\n * @returns {string | null}\n */\n toISOString() {\n return this.#date.toUTC().toISO();\n }\n /**\n * Returns the date as a JSON string.\n * @returns {string | null}\n */\n toJSON() {\n return this.#date.toJSON();\n }\n /**\n * Sets the day.\n * @param d\n */\n setDate(d) {\n this.#date = this.#date.set({ day: d });\n }\n /**\n * Sets the year.\n * @param y\n */\n setFullYear(y) {\n this.#date = this.#date.set({ year: y });\n }\n /**\n * Sets the day of the week.\n * @param d\n */\n setDay(d) {\n this.#date = this.#date.set({ weekday: d });\n }\n /**\n * Sets the month.\n * @param m\n */\n setMonth(m) {\n this.#date = this.#date.set({ month: m + 1 });\n }\n /**\n * Sets the hour.\n * @param h\n */\n setHours(h) {\n this.#date = this.#date.set({ hour: h });\n }\n /**\n * Sets the minutes.\n * @param m\n */\n setMinutes(m) {\n this.#date = this.#date.set({ minute: m });\n }\n /**\n * Sets the seconds.\n * @param s\n */\n setSeconds(s) {\n this.#date = this.#date.set({ second: s });\n }\n /**\n * Sets the milliseconds.\n * @param s\n */\n setMilliseconds(s) {\n this.#date = this.#date.set({ millisecond: s });\n }\n /**\n * Returns the date as a string.\n * @returns {string}\n */\n toString() {\n return this.toDate().toString();\n }\n /**\n * Returns the date as a Date object.\n * @returns {Date}\n */\n toDate() {\n return this.#date.toJSDate();\n }\n /**\n * Returns true if the day is the last day of the month.\n * @returns {boolean}\n */\n isLastDayOfMonth() {\n const { day, month } = this.#date;\n // Special handling for February in leap years\n if (month === 2) {\n const isLeap = CronDate.#isLeapYear(this.#date.year);\n return day === exports.DAYS_IN_MONTH[month - 1] - (isLeap ? 0 : 1);\n }\n // For other months, check against the static map\n return day === exports.DAYS_IN_MONTH[month - 1];\n }\n /**\n * Returns true if the day is the last weekday of the month.\n * @returns {boolean}\n */\n isLastWeekdayOfMonth() {\n const { day, month } = this.#date;\n // Get the last day of the current month\n let lastDay;\n if (month === 2) {\n // Special handling for February\n lastDay = exports.DAYS_IN_MONTH[month - 1] - (CronDate.#isLeapYear(this.#date.year) ? 0 : 1);\n }\n else {\n lastDay = exports.DAYS_IN_MONTH[month - 1];\n }\n // Check if the current day is within 7 days of the end of the month\n return day > lastDay - 7;\n }\n /**\n * Primarily for internal use.\n * @param {DateMathOp} op - The operation to perform.\n * @param {TimeUnit} unit - The unit of time to use.\n * @param {number} [hoursLength] - The length of the hours. Required when unit is not month or day.\n */\n applyDateOperation(op, unit, hoursLength) {\n if (unit === TimeUnit.Month || unit === TimeUnit.Day) {\n this.invokeDateOperation(op, unit);\n return;\n }\n const previousHour = this.getHours();\n this.invokeDateOperation(op, unit);\n const currentHour = this.getHours();\n const diff = currentHour - previousHour;\n if (diff === 2) {\n if (hoursLength !== 24) {\n this.dstStart = currentHour;\n }\n }\n else if (diff === 0 && this.getMinutes() === 0 && this.getSeconds() === 0) {\n if (hoursLength !== 24) {\n this.dstEnd = currentHour;\n }\n }\n }\n /**\n * Returns the UTC date.\n * @private\n * @returns {DateTime}\n */\n #getUTC() {\n return this.#date.toUTC();\n }\n}\nexports.CronDate = CronDate;\nexports.default = CronDate;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronMonth = void 0;\nconst CronDate_1 = require(\"../CronDate\");\nconst CronField_1 = require(\"./CronField\");\nconst MIN_MONTH = 1;\nconst MAX_MONTH = 12;\nconst MONTH_CHARS = Object.freeze([]);\n/**\n * Represents the \"day of the month\" field within a cron expression.\n * @class CronDayOfMonth\n * @extends CronField\n */\nclass CronMonth extends CronField_1.CronField {\n static get min() {\n return MIN_MONTH;\n }\n static get max() {\n return MAX_MONTH;\n }\n static get chars() {\n return MONTH_CHARS;\n }\n static get daysInMonth() {\n return CronDate_1.DAYS_IN_MONTH;\n }\n /**\n * CronDayOfMonth constructor. Initializes the \"day of the month\" field with the provided values.\n * @param {MonthRange[]} values - Values for the \"day of the month\" field\n * @param {CronFieldOptions} [options] - Options provided by the parser\n */\n constructor(values, options) {\n super(values, options);\n this.validate();\n }\n /**\n * Returns an array of allowed values for the \"day of the month\" field.\n * @returns {MonthRange[]}\n */\n get values() {\n return super.values;\n }\n}\nexports.CronMonth = CronMonth;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronSecond = void 0;\nconst CronField_1 = require(\"./CronField\");\nconst MIN_SECOND = 0;\nconst MAX_SECOND = 59;\nconst SECOND_CHARS = Object.freeze([]);\n/**\n * Represents the \"second\" field within a cron expression.\n * @class CronSecond\n * @extends CronField\n */\nclass CronSecond extends CronField_1.CronField {\n static get min() {\n return MIN_SECOND;\n }\n static get max() {\n return MAX_SECOND;\n }\n static get chars() {\n return SECOND_CHARS;\n }\n /**\n * CronSecond constructor. Initializes the \"second\" field with the provided values.\n * @param {SixtyRange[]} values - Values for the \"second\" field\n * @param {CronFieldOptions} [options] - Options provided by the parser\n */\n constructor(values, options) {\n super(values, options);\n this.validate();\n }\n /**\n * Returns an array of allowed values for the \"second\" field.\n * @returns {SixtyRange[]}\n */\n get values() {\n return super.values;\n }\n}\nexports.CronSecond = CronSecond;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./CronDayOfMonth\"), exports);\n__exportStar(require(\"./CronDayOfWeek\"), exports);\n__exportStar(require(\"./CronField\"), exports);\n__exportStar(require(\"./CronHour\"), exports);\n__exportStar(require(\"./CronMinute\"), exports);\n__exportStar(require(\"./CronMonth\"), exports);\n__exportStar(require(\"./CronSecond\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronFieldCollection = void 0;\nconst fields_1 = require(\"./fields\");\n/**\n * Represents a complete set of cron fields.\n * @class CronFieldCollection\n */\nclass CronFieldCollection {\n #second;\n #minute;\n #hour;\n #dayOfMonth;\n #month;\n #dayOfWeek;\n /**\n * Creates a new CronFieldCollection instance by partially overriding fields from an existing one.\n * @param {CronFieldCollection} base - The base CronFieldCollection to copy fields from\n * @param {CronFieldOverride} fields - The fields to override, can be CronField instances or raw values\n * @returns {CronFieldCollection} A new CronFieldCollection instance\n * @example\n * const base = new CronFieldCollection({\n * second: new CronSecond([0]),\n * minute: new CronMinute([0]),\n * hour: new CronHour([12]),\n * dayOfMonth: new CronDayOfMonth([1]),\n * month: new CronMonth([1]),\n * dayOfWeek: new CronDayOfWeek([1])\n * });\n *\n * // Using CronField instances\n * const modified1 = CronFieldCollection.from(base, {\n * hour: new CronHour([15]),\n * minute: new CronMinute([30])\n * });\n *\n * // Using raw values\n * const modified2 = CronFieldCollection.from(base, {\n * hour: [15], // Will create new CronHour\n * minute: [30] // Will create new CronMinute\n * });\n */\n static from(base, fields) {\n return new CronFieldCollection({\n second: this.resolveField(fields_1.CronSecond, base.second, fields.second),\n minute: this.resolveField(fields_1.CronMinute, base.minute, fields.minute),\n hour: this.resolveField(fields_1.CronHour, base.hour, fields.hour),\n dayOfMonth: this.resolveField(fields_1.CronDayOfMonth, base.dayOfMonth, fields.dayOfMonth),\n month: this.resolveField(fields_1.CronMonth, base.month, fields.month),\n dayOfWeek: this.resolveField(fields_1.CronDayOfWeek, base.dayOfWeek, fields.dayOfWeek),\n });\n }\n /**\n * Resolves a field value, either using the provided CronField instance or creating a new one from raw values.\n * @param constructor - The constructor for creating new field instances\n * @param baseField - The base field to use if no override is provided\n * @param fieldValue - The override value, either a CronField instance or raw values\n * @returns The resolved CronField instance\n * @private\n */\n static resolveField(constructor, baseField, fieldValue) {\n if (!fieldValue) {\n return baseField;\n }\n if (fieldValue instanceof fields_1.CronField) {\n return fieldValue;\n }\n return new constructor(fieldValue);\n }\n /**\n * CronFieldCollection constructor. Initializes the cron fields with the provided values.\n * @param {CronFields} param0 - The cron fields values\n * @throws {Error} if validation fails\n * @example\n * const cronFields = new CronFieldCollection({\n * second: new CronSecond([0]),\n * minute: new CronMinute([0, 30]),\n * hour: new CronHour([9]),\n * dayOfMonth: new CronDayOfMonth([15]),\n * month: new CronMonth([1]),\n * dayOfWeek: new CronDayOfTheWeek([1, 2, 3, 4, 5]),\n * })\n *\n * console.log(cronFields.second.values); // [0]\n * console.log(cronFields.minute.values); // [0, 30]\n * console.log(cronFields.hour.values); // [9]\n * console.log(cronFields.dayOfMonth.values); // [15]\n * console.log(cronFields.month.values); // [1]\n * console.log(cronFields.dayOfWeek.values); // [1, 2, 3, 4, 5]\n */\n constructor({ second, minute, hour, dayOfMonth, month, dayOfWeek }) {\n if (!second) {\n throw new Error('Validation error, Field second is missing');\n }\n if (!minute) {\n throw new Error('Validation error, Field minute is missing');\n }\n if (!hour) {\n throw new Error('Validation error, Field hour is missing');\n }\n if (!dayOfMonth) {\n throw new Error('Validation error, Field dayOfMonth is missing');\n }\n if (!month) {\n throw new Error('Validation error, Field month is missing');\n }\n if (!dayOfWeek) {\n throw new Error('Validation error, Field dayOfWeek is missing');\n }\n if (month.values.length === 1 && !dayOfMonth.hasLastChar) {\n if (!(parseInt(dayOfMonth.values[0], 10) <= fields_1.CronMonth.daysInMonth[month.values[0] - 1])) {\n throw new Error('Invalid explicit day of month definition');\n }\n }\n this.#second = second;\n this.#minute = minute;\n this.#hour = hour;\n this.#month = month;\n this.#dayOfWeek = dayOfWeek;\n this.#dayOfMonth = dayOfMonth;\n }\n /**\n * Returns the second field.\n * @returns {CronSecond}\n */\n get second() {\n return this.#second;\n }\n /**\n * Returns the minute field.\n * @returns {CronMinute}\n */\n get minute() {\n return this.#minute;\n }\n /**\n * Returns the hour field.\n * @returns {CronHour}\n */\n get hour() {\n return this.#hour;\n }\n /**\n * Returns the day of the month field.\n * @returns {CronDayOfMonth}\n */\n get dayOfMonth() {\n return this.#dayOfMonth;\n }\n /**\n * Returns the month field.\n * @returns {CronMonth}\n */\n get month() {\n return this.#month;\n }\n /**\n * Returns the day of the week field.\n * @returns {CronDayOfWeek}\n */\n get dayOfWeek() {\n return this.#dayOfWeek;\n }\n /**\n * Returns a string representation of the cron fields.\n * @param {(number | CronChars)[]} input - The cron fields values\n * @static\n * @returns {FieldRange[]} - The compacted cron fields\n */\n static compactField(input) {\n if (input.length === 0) {\n return [];\n }\n // Initialize the output array and current IFieldRange\n const output = [];\n let current = undefined;\n input.forEach((item, i, arr) => {\n // If the current FieldRange is undefined, create a new one with the current item as the start.\n if (current === undefined) {\n current = { start: item, count: 1 };\n return;\n }\n // Cache the previous and next items in the array.\n const prevItem = arr[i - 1] || current.start;\n const nextItem = arr[i + 1];\n // If the current item is 'L' or 'W', push the current FieldRange to the output and\n // create a new FieldRange with the current item as the start.\n // 'L' and 'W' characters are special cases that need to be handled separately.\n if (item === 'L' || item === 'W') {\n output.push(current);\n output.push({ start: item, count: 1 });\n current = undefined;\n return;\n }\n // If the current step is undefined and there is a next item, update the current IFieldRange.\n // This block checks if the current step needs to be updated and does so if needed.\n if (current.step === undefined && nextItem !== undefined) {\n const step = item - prevItem;\n const nextStep = nextItem - item;\n // If the current step is less or equal to the next step, update the current FieldRange to include the current item.\n if (step <= nextStep) {\n current = { ...current, count: 2, end: item, step };\n return;\n }\n current.step = 1;\n }\n // If the difference between the current item and the current end is equal to the current step,\n // update the current IFieldRange's count and end.\n // This block checks if the current item is part of the current range and updates the range accordingly.\n if (item - (current.end ?? 0) === current.step) {\n current.count++;\n current.end = item;\n }\n else {\n // If the count is 1, push a new FieldRange with the current start.\n // This handles the case where the current range has only one element.\n if (current.count === 1) {\n // If the count is 2, push two separate IFieldRanges, one for each element.\n output.push({ start: current.start, count: 1 });\n }\n else if (current.count === 2) {\n output.push({ start: current.start, count: 1 });\n // current.end can never be undefined here but typescript doesn't know that\n // this is why we ?? it and then ignore the prevItem in the coverage\n output.push({\n start: current.end ?? /* istanbul ignore next - see above */ prevItem,\n count: 1,\n });\n }\n else {\n // Otherwise, push the current FieldRange to the output.\n output.push(current);\n }\n // Reset the current FieldRange with the current item as the start.\n current = { start: item, count: 1 };\n }\n });\n // Push the final IFieldRange, if any, to the output array.\n if (current) {\n output.push(current);\n }\n return output;\n }\n /**\n * Handles a single range.\n * @param {CronField} field - The cron field to stringify\n * @param {FieldRange} range {start: number, end: number, step: number, count: number} The range to handle.\n * @param {number} max The maximum value for the field.\n * @returns {string | null} The stringified range or null if it cannot be stringified.\n * @private\n */\n static #handleSingleRange(field, range, max) {\n const step = range.step;\n if (!step) {\n return null;\n }\n if (step === 1 && range.start === field.min && range.end && range.end >= max) {\n return field.hasQuestionMarkChar ? '?' : '*';\n }\n if (step !== 1 && range.start === field.min && range.end && range.end >= max - step + 1) {\n return `*/${step}`;\n }\n return null;\n }\n /**\n * Handles multiple ranges.\n * @param {FieldRange} range {start: number, end: number, step: number, count: number} The range to handle.\n * @param {number} max The maximum value for the field.\n * @returns {string} The stringified range.\n * @private\n */\n static #handleMultipleRanges(range, max) {\n const step = range.step;\n if (step === 1) {\n return `${range.start}-${range.end}`;\n }\n const multiplier = range.start === 0 ? range.count - 1 : range.count;\n /* istanbul ignore if */\n if (!step) {\n throw new Error('Unexpected range step');\n }\n /* istanbul ignore if */\n if (!range.end) {\n throw new Error('Unexpected range end');\n }\n if (step * multiplier > range.end) {\n const mapFn = (_, index) => {\n /* istanbul ignore if */\n if (typeof range.start !== 'number') {\n throw new Error('Unexpected range start');\n }\n return index % step === 0 ? range.start + index : null;\n };\n /* istanbul ignore if */\n if (typeof range.start !== 'number') {\n throw new Error('Unexpected range start');\n }\n const seed = { length: range.end - range.start + 1 };\n return Array.from(seed, mapFn)\n .filter((value) => value !== null)\n .join(',');\n }\n return range.end === max - step + 1 ? `${range.start}/${step}` : `${range.start}-${range.end}/${step}`;\n }\n /**\n * Returns a string representation of the cron fields.\n * @param {CronField} field - The cron field to stringify\n * @static\n * @returns {string} - The stringified cron field\n */\n stringifyField(field) {\n let max = field.max;\n let values = field.values;\n if (field instanceof fields_1.CronDayOfWeek) {\n max = 6;\n const dayOfWeek = this.#dayOfWeek.values;\n values = dayOfWeek[dayOfWeek.length - 1] === 7 ? dayOfWeek.slice(0, -1) : dayOfWeek;\n }\n if (field instanceof fields_1.CronDayOfMonth) {\n max = this.#month.values.length === 1 ? fields_1.CronMonth.daysInMonth[this.#month.values[0] - 1] : field.max;\n }\n const ranges = CronFieldCollection.compactField(values);\n if (ranges.length === 1) {\n const singleRangeResult = CronFieldCollection.#handleSingleRange(field, ranges[0], max);\n if (singleRangeResult) {\n return singleRangeResult;\n }\n }\n return ranges\n .map((range) => {\n const value = range.count === 1 ? range.start.toString() : CronFieldCollection.#handleMultipleRanges(range, max);\n if (field instanceof fields_1.CronDayOfWeek && field.nthDay > 0) {\n return `${value}#${field.nthDay}`;\n }\n return value;\n })\n .join(',');\n }\n /**\n * Returns a string representation of the cron field values.\n * @param {boolean} includeSeconds - Whether to include seconds in the output\n * @returns {string} The formatted cron string\n */\n stringify(includeSeconds = false) {\n const arr = [];\n if (includeSeconds) {\n arr.push(this.stringifyField(this.#second)); // second\n }\n arr.push(this.stringifyField(this.#minute), // minute\n this.stringifyField(this.#hour), // hour\n this.stringifyField(this.#dayOfMonth), // dayOfMonth\n this.stringifyField(this.#month), // month\n this.stringifyField(this.#dayOfWeek));\n return arr.join(' ');\n }\n /**\n * Returns a serialized representation of the cron fields values.\n * @returns {SerializedCronFields} An object containing the cron field values\n */\n serialize() {\n return {\n second: this.#second.serialize(),\n minute: this.#minute.serialize(),\n hour: this.#hour.serialize(),\n dayOfMonth: this.#dayOfMonth.serialize(),\n month: this.#month.serialize(),\n dayOfWeek: this.#dayOfWeek.serialize(),\n };\n }\n}\nexports.CronFieldCollection = CronFieldCollection;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronExpression = exports.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE = exports.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE = void 0;\nconst CronDate_1 = require(\"./CronDate\");\n/**\n * Error message for when the current date is outside the specified time span.\n */\nexports.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE = 'Out of the time span range';\n/**\n * Error message for when the loop limit is exceeded during iteration.\n */\nexports.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE = 'Invalid expression, loop limit exceeded';\n/**\n * Cron iteration loop safety limit\n */\nconst LOOP_LIMIT = 10000;\n/**\n * Class representing a Cron expression.\n */\nclass CronExpression {\n #options;\n #tz;\n #currentDate;\n #startDate;\n #endDate;\n #fields;\n #dstTransitionDayKey = null;\n #isDstTransitionDay = false;\n /**\n * Creates a new CronExpression instance.\n *\n * @param {CronFieldCollection} fields - Cron fields.\n * @param {CronExpressionOptions} options - Parser options.\n */\n constructor(fields, options) {\n this.#options = options;\n this.#tz = options.tz;\n this.#startDate = options.startDate ? new CronDate_1.CronDate(options.startDate, this.#tz) : null;\n this.#endDate = options.endDate ? new CronDate_1.CronDate(options.endDate, this.#tz) : null;\n let currentDateValue = options.currentDate ?? options.startDate;\n if (currentDateValue) {\n const tempCurrentDate = new CronDate_1.CronDate(currentDateValue, this.#tz);\n if (this.#startDate && tempCurrentDate.getTime() < this.#startDate.getTime()) {\n currentDateValue = this.#startDate;\n }\n else if (this.#endDate && tempCurrentDate.getTime() > this.#endDate.getTime()) {\n currentDateValue = this.#endDate;\n }\n }\n this.#currentDate = new CronDate_1.CronDate(currentDateValue, this.#tz);\n this.#fields = fields;\n }\n /**\n * Getter for the cron fields.\n *\n * @returns {CronFieldCollection} Cron fields.\n */\n get fields() {\n return this.#fields;\n }\n /**\n * Converts cron fields back to a CronExpression instance.\n *\n * @public\n * @param {Record<string, number[]>} fields - The input cron fields object.\n * @param {CronExpressionOptions} [options] - Optional parsing options.\n * @returns {CronExpression} - A new CronExpression instance.\n */\n static fieldsToExpression(fields, options) {\n return new CronExpression(fields, options || {});\n }\n /**\n * Checks if the given value matches any element in the sequence.\n *\n * @param {number} value - The value to be matched.\n * @param {number[]} sequence - The sequence to be checked against.\n * @returns {boolean} - True if the value matches an element in the sequence; otherwise, false.\n * @memberof CronExpression\n * @private\n */\n static #matchSchedule(value, sequence) {\n return sequence.some((element) => element === value);\n }\n /**\n * Returns the minimum or maximum value from the given array of numbers.\n *\n * @param {number[]} values - An array of numbers.\n * @param {boolean} reverse - If true, returns the maximum value; otherwise, returns the minimum value.\n * @returns {number} - The minimum or maximum value.\n */\n #getMinOrMax(values, reverse) {\n return values[reverse ? values.length - 1 : 0];\n }\n /**\n * Checks whether the given date falls on a DST transition day in its timezone.\n *\n * This is used to disable certain “direct set” fast paths on DST days, because setting the hour\n * directly may land on a non-existent or repeated local time. We cache the result per calendar day\n * to keep iteration overhead low.\n *\n * @param {CronDate} currentDate - Date to check (in the cron timezone)\n * @returns {boolean} True when the day has a DST transition\n * @private\n */\n #checkDstTransition(currentDate) {\n // Cache per calendar day (in the cron date's timezone) to avoid repeated work inside the iteration loop.\n const key = `${currentDate.getFullYear()}-${currentDate.getMonth() + 1}-${currentDate.getDate()}`;\n if (this.#dstTransitionDayKey === key) {\n return this.#isDstTransitionDay;\n }\n const startOfDay = new CronDate_1.CronDate(currentDate);\n startOfDay.setStartOfDay();\n const endOfDay = new CronDate_1.CronDate(currentDate);\n endOfDay.setEndOfDay();\n this.#dstTransitionDayKey = key;\n this.#isDstTransitionDay = startOfDay.getUTCOffset() !== endOfDay.getUTCOffset();\n return this.#isDstTransitionDay;\n }\n /**\n * Moves the date to the next/previous allowed second value. If there is no remaining allowed second\n * within the current minute, rolls to the next/previous minute and resets seconds to the min/max allowed.\n *\n * @param {CronDate} currentDate - Mutable date being iterated\n * @param {DateMathOp} dateMathVerb - Add/Subtract depending on direction\n * @param {boolean} reverse - When true, iterating backwards\n * @private\n */\n #moveToNextSecond(currentDate, dateMathVerb, reverse) {\n const seconds = this.#fields.second.values;\n const currentSecond = currentDate.getSeconds();\n const nextSecond = this.#fields.second.findNearestValue(currentSecond, reverse);\n if (nextSecond !== null) {\n currentDate.setSeconds(nextSecond);\n return;\n }\n // Roll over to the next/previous minute and start from the min/max allowed second.\n currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Minute, this.#fields.hour.values.length);\n currentDate.setSeconds(this.#getMinOrMax(seconds, reverse));\n }\n /**\n * Moves the date to the next/previous allowed minute value and resets seconds to the min/max allowed.\n * If there is no remaining allowed minute within the current hour, rolls to the next/previous hour and\n * resets minutes/seconds to their extrema.\n *\n * @param {CronDate} currentDate - Mutable date being iterated\n * @param {DateMathOp} dateMathVerb - Add/Subtract depending on direction\n * @param {boolean} reverse - When true, iterating backwards\n * @private\n */\n #moveToNextMinute(currentDate, dateMathVerb, reverse) {\n const minutes = this.#fields.minute.values;\n const seconds = this.#fields.second.values;\n const currentMinute = currentDate.getMinutes();\n const nextMinute = this.#fields.minute.findNearestValue(currentMinute, reverse);\n if (nextMinute !== null) {\n currentDate.setMinutes(nextMinute);\n currentDate.setSeconds(this.#getMinOrMax(seconds, reverse));\n return;\n }\n // Roll over to the next/previous hour and start from the min/max allowed minute/second.\n currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Hour, this.#fields.hour.values.length);\n currentDate.setMinutes(this.#getMinOrMax(minutes, reverse));\n currentDate.setSeconds(this.#getMinOrMax(seconds, reverse));\n }\n /**\n * Determines if the current date matches the last specified weekday of the month.\n *\n * @param {Array<(number|string)>} expressions - An array of expressions containing weekdays and \"L\" for the last weekday.\n * @param {CronDate} currentDate - The current date object.\n * @returns {boolean} - True if the current date matches the last specified weekday of the month; otherwise, false.\n * @memberof CronExpression\n * @private\n */\n static #isLastWeekdayOfMonthMatch(expressions, currentDate) {\n const isLastWeekdayOfMonth = currentDate.isLastWeekdayOfMonth();\n return expressions.some((expression) => {\n // The first character represents the weekday\n const weekday = parseInt(expression.toString().charAt(0), 10) % 7;\n if (Number.isNaN(weekday)) {\n throw new Error(`Invalid last weekday of the month expression: ${expression}`);\n }\n // Check if the current date matches the last specified weekday of the month\n return currentDate.getDay() === weekday && isLastWeekdayOfMonth;\n });\n }\n /**\n * Find the next scheduled date based on the cron expression.\n * @returns {CronDate} - The next scheduled date or an ES6 compatible iterator object.\n * @memberof CronExpression\n * @public\n */\n next() {\n return this.#findSchedule();\n }\n /**\n * Find the previous scheduled date based on the cron expression.\n * @returns {CronDate} - The previous scheduled date or an ES6 compatible iterator object.\n * @memberof CronExpression\n * @public\n */\n prev() {\n return this.#findSchedule(true);\n }\n /**\n * Check if there is a next scheduled date based on the current date and cron expression.\n * @returns {boolean} - Returns true if there is a next scheduled date, false otherwise.\n * @memberof CronExpression\n * @public\n */\n hasNext() {\n const current = this.#currentDate;\n try {\n this.#findSchedule();\n return true;\n }\n catch {\n return false;\n }\n finally {\n this.#currentDate = current;\n }\n }\n /**\n * Check if there is a previous scheduled date based on the current date and cron expression.\n * @returns {boolean} - Returns true if there is a previous scheduled date, false otherwise.\n * @memberof CronExpression\n * @public\n */\n hasPrev() {\n const current = this.#currentDate;\n try {\n this.#findSchedule(true);\n return true;\n }\n catch {\n return false;\n }\n finally {\n this.#currentDate = current;\n }\n }\n /**\n * Iterate over a specified number of steps and optionally execute a callback function for each step.\n * @param {number} steps - The number of steps to iterate. Positive value iterates forward, negative value iterates backward.\n * @returns {CronDate[]} - An array of iterator fields or CronDate objects.\n * @memberof CronExpression\n * @public\n */\n take(limit) {\n const items = [];\n if (limit >= 0) {\n for (let i = 0; i < limit; i++) {\n try {\n items.push(this.next());\n }\n catch {\n return items;\n }\n }\n }\n else {\n for (let i = 0; i > limit; i--) {\n try {\n items.push(this.prev());\n }\n catch {\n return items;\n }\n }\n }\n return items;\n }\n /**\n * Reset the iterators current date to a new date or the initial date.\n * @param {Date | CronDate} [newDate] - Optional new date to reset to. If not provided, it will reset to the initial date.\n * @memberof CronExpression\n * @public\n */\n reset(newDate) {\n this.#currentDate = new CronDate_1.CronDate(newDate || this.#options.currentDate);\n }\n /**\n * Generate a string representation of the cron expression.\n * @param {boolean} [includeSeconds=false] - Whether to include the seconds field in the string representation.\n * @returns {string} - The string representation of the cron expression.\n * @memberof CronExpression\n * @public\n */\n stringify(includeSeconds = false) {\n return this.#fields.stringify(includeSeconds);\n }\n /**\n * Check if the cron expression includes the given date\n * @param {Date|CronDate} date\n * @returns {boolean}\n */\n includesDate(date) {\n const { second, minute, hour, month } = this.#fields;\n const dt = new CronDate_1.CronDate(date, this.#tz);\n // Check basic time fields first\n if (!second.values.includes(dt.getSeconds()) ||\n !minute.values.includes(dt.getMinutes()) ||\n !hour.values.includes(dt.getHours()) ||\n !month.values.includes((dt.getMonth() + 1))) {\n return false;\n }\n // Check day of month and day of week using the same logic as #findSchedule\n if (!this.#matchDayOfMonth(dt)) {\n return false;\n }\n // Check nth day of week if specified\n if (this.#fields.dayOfWeek.nthDay > 0) {\n const weekInMonth = Math.ceil(dt.getDate() / 7);\n if (weekInMonth !== this.#fields.dayOfWeek.nthDay) {\n return false;\n }\n }\n return true;\n }\n /**\n * Returns the string representation of the cron expression.\n * @returns {CronDate} - The next schedule date.\n */\n toString() {\n /* istanbul ignore next - should be impossible under normal use to trigger the or branch */\n return this.#options.expression || this.stringify(true);\n }\n /**\n * Determines if the given date matches the cron expression's day of month and day of week fields.\n *\n * The function checks the following rules:\n * Rule 1: If both \"day of month\" and \"day of week\" are restricted (not wildcard), then one or both must match the current day.\n * Rule 2: If \"day of month\" is restricted and \"day of week\" is not restricted, then \"day of month\" must match the current day.\n * Rule 3: If \"day of month\" is a wildcard, \"day of week\" is not a wildcard, and \"day of week\" matches the current day, then the match is accepted.\n * If none of the rules match, the match is rejected.\n *\n * @param {CronDate} currentDate - The current date to be evaluated against the cron expression.\n * @returns {boolean} Returns true if the current date matches the cron expression's day of month and day of week fields, otherwise false.\n * @memberof CronExpression\n * @private\n */\n #matchDayOfMonth(currentDate) {\n // Check if day of month and day of week fields are wildcards or restricted (not wildcard).\n const isDayOfMonthWildcardMatch = this.#fields.dayOfMonth.isWildcard;\n const isRestrictedDayOfMonth = !isDayOfMonthWildcardMatch;\n const isDayOfWeekWildcardMatch = this.#fields.dayOfWeek.isWildcard;\n const isRestrictedDayOfWeek = !isDayOfWeekWildcardMatch;\n // Calculate if the current date matches the day of month and day of week fields.\n const matchedDOM = CronExpression.#matchSchedule(currentDate.getDate(), this.#fields.dayOfMonth.values) ||\n (this.#fields.dayOfMonth.hasLastChar && currentDate.isLastDayOfMonth());\n const matchedDOW = CronExpression.#matchSchedule(currentDate.getDay(), this.#fields.dayOfWeek.values) ||\n (this.#fields.dayOfWeek.hasLastChar &&\n CronExpression.#isLastWeekdayOfMonthMatch(this.#fields.dayOfWeek.values, currentDate));\n // Rule 1: Both \"day of month\" and \"day of week\" are restricted; one or both must match the current day.\n if (isRestrictedDayOfMonth && isRestrictedDayOfWeek && (matchedDOM || matchedDOW)) {\n return true;\n }\n // Rule 2: \"day of month\" restricted and \"day of week\" not restricted; \"day of month\" must match the current day.\n if (matchedDOM && !isRestrictedDayOfWeek) {\n return true;\n }\n // Rule 3: \"day of month\" is a wildcard, \"day of week\" is not a wildcard, and \"day of week\" matches the current day.\n if (isDayOfMonthWildcardMatch && !isDayOfWeekWildcardMatch && matchedDOW) {\n return true;\n }\n // If none of the rules match, the match is rejected.\n return false;\n }\n /**\n * Determines if the current hour matches the cron expression.\n *\n * @param {CronDate} currentDate - The current date object.\n * @param {DateMathOp} dateMathVerb - The date math operation enumeration value.\n * @param {boolean} reverse - A flag indicating whether the matching should be done in reverse order.\n * @returns {boolean} - True if the current hour matches the cron expression; otherwise, false.\n */\n #matchHour(currentDate, dateMathVerb, reverse) {\n const hourValues = this.#fields.hour.values;\n const hours = hourValues;\n const currentHour = currentDate.getHours();\n const isMatch = CronExpression.#matchSchedule(currentHour, hourValues);\n const isDstStart = currentDate.dstStart === currentHour;\n const isDstEnd = currentDate.dstEnd === currentHour;\n // DST start: if the scheduled hour is skipped (e.g. 03:00 doesn't exist),\n // accept the next existing hour when it corresponds to the skipped one.\n if (isDstStart) {\n if (CronExpression.#matchSchedule(currentHour - 1, hourValues)) {\n return true;\n }\n currentDate.invokeDateOperation(dateMathVerb, CronDate_1.TimeUnit.Hour);\n return false;\n }\n // DST end: avoid returning the repeated hour twice when searching forward.\n if (isDstEnd && !reverse) {\n currentDate.dstEnd = null;\n currentDate.applyDateOperation(CronDate_1.DateMathOp.Add, CronDate_1.TimeUnit.Hour, hours.length);\n return false;\n }\n if (isMatch) {\n return true;\n }\n // Normal mismatch: if there's no remaining matching hour in this day, jump a whole day first\n // to avoid scanning hour-by-hour across the day boundary.\n currentDate.dstStart = null;\n const nextHour = this.#fields.hour.findNearestValue(currentHour, reverse);\n if (nextHour === null) {\n currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Day, hours.length);\n return false;\n }\n // Fast path: jump directly to the next/previous matching hour and reset lower units.\n //\n // On DST transition days, setting the hour directly can land on a non-existent/repeated local time,\n // which breaks the existing DST handling that relies on `applyDateOperation()` to set `dstStart/dstEnd`.\n // For those days, fall back to stepping hour-by-hour to preserve correctness.\n if (this.#checkDstTransition(currentDate)) {\n const steps = reverse ? currentHour - nextHour : nextHour - currentHour;\n for (let i = 0; i < steps; i++) {\n currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Hour, hours.length);\n }\n }\n else {\n currentDate.setHours(nextHour);\n }\n currentDate.setMinutes(this.#getMinOrMax(this.#fields.minute.values, reverse));\n currentDate.setSeconds(this.#getMinOrMax(this.#fields.second.values, reverse));\n return false;\n }\n /**\n * Validates the current date against the start and end dates of the cron expression.\n * If the current date is outside the specified time span, an error is thrown.\n *\n * @param currentDate {CronDate} - The current date to validate.\n * @throws {Error} If the current date is outside the specified time span.\n * @private\n */\n #validateTimeSpan(currentDate) {\n if (!this.#startDate && !this.#endDate) {\n return;\n }\n const currentTime = currentDate.getTime();\n if (this.#startDate && currentTime < this.#startDate.getTime()) {\n throw new Error(exports.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);\n }\n if (this.#endDate && currentTime > this.#endDate.getTime()) {\n throw new Error(exports.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);\n }\n }\n /**\n * Finds the next or previous schedule based on the cron expression.\n *\n * @param {boolean} [reverse=false] - If true, finds the previous schedule; otherwise, finds the next schedule.\n * @returns {CronDate} - The next or previous schedule date.\n * @private\n */\n #findSchedule(reverse = false) {\n const dateMathVerb = reverse ? CronDate_1.DateMathOp.Subtract : CronDate_1.DateMathOp.Add;\n const currentDate = new CronDate_1.CronDate(this.#currentDate);\n const startTimestamp = currentDate.getTime();\n let stepCount = 0;\n while (++stepCount < LOOP_LIMIT) {\n this.#validateTimeSpan(currentDate);\n if (!this.#matchDayOfMonth(currentDate)) {\n currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Day, this.#fields.hour.values.length);\n continue;\n }\n if (!(this.#fields.dayOfWeek.nthDay <= 0 || Math.ceil(currentDate.getDate() / 7) === this.#fields.dayOfWeek.nthDay)) {\n currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Day, this.#fields.hour.values.length);\n continue;\n }\n if (!CronExpression.#matchSchedule(currentDate.getMonth() + 1, this.#fields.month.values)) {\n currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Month, this.#fields.hour.values.length);\n continue;\n }\n if (!this.#matchHour(currentDate, dateMathVerb, reverse)) {\n continue;\n }\n if (!CronExpression.#matchSchedule(currentDate.getMinutes(), this.#fields.minute.values)) {\n this.#moveToNextMinute(currentDate, dateMathVerb, reverse);\n continue;\n }\n if (!CronExpression.#matchSchedule(currentDate.getSeconds(), this.#fields.second.values)) {\n this.#moveToNextSecond(currentDate, dateMathVerb, reverse);\n continue;\n }\n if (startTimestamp === currentDate.getTime()) {\n if (dateMathVerb === 'Add' || currentDate.getMilliseconds() === 0) {\n currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Second, this.#fields.hour.values.length);\n }\n continue;\n }\n break;\n }\n /* istanbul ignore next - should be impossible under normal use to trigger the branch */\n if (stepCount > LOOP_LIMIT) {\n throw new Error(exports.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);\n }\n if (currentDate.getMilliseconds() !== 0) {\n currentDate.setMilliseconds(0);\n }\n this.#currentDate = currentDate;\n return currentDate;\n }\n /**\n * Returns an iterator for iterating through future CronDate instances\n *\n * @name Symbol.iterator\n * @memberof CronExpression\n * @returns {Iterator<CronDate>} An iterator object for CronExpression that returns CronDate values.\n */\n [Symbol.iterator]() {\n return {\n next: () => {\n const schedule = this.#findSchedule();\n return { value: schedule, done: !this.hasNext() };\n },\n };\n }\n}\nexports.CronExpression = CronExpression;\nexports.default = CronExpression;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.seededRandom = seededRandom;\n/**\n * Computes a numeric hash from a given string\n * @param {string} str A value to hash\n * @returns {number} A numeric hash computed from the given value\n */\nfunction xfnv1a(str) {\n let h = 2166136261 >>> 0;\n for (let i = 0; i < str.length; i++) {\n h ^= str.charCodeAt(i);\n h = Math.imul(h, 16777619);\n }\n return () => h >>> 0;\n}\n/**\n * Initialize a new PRNG using a given seed\n * @param {number} seed The seed used to initialize the PRNG\n * @returns {PRNG} A random number generator\n */\nfunction mulberry32(seed) {\n return () => {\n let t = (seed += 0x6d2b79f5);\n t = Math.imul(t ^ (t >>> 15), t | 1);\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n };\n}\n/**\n * Generates a PRNG using a given seed. When not provided, the seed is randomly generated\n * @param {string} str A string to derive the seed from\n * @returns {PRNG} A random number generator correctly seeded\n */\nfunction seededRandom(str) {\n const seed = str ? xfnv1a(str)() : Math.floor(Math.random() * 10_000_000_000);\n return mulberry32(seed);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronExpressionParser = exports.DayOfWeek = exports.Months = exports.CronUnit = exports.PredefinedExpressions = void 0;\nconst CronFieldCollection_1 = require(\"./CronFieldCollection\");\nconst CronExpression_1 = require(\"./CronExpression\");\nconst random_1 = require(\"./utils/random\");\nconst fields_1 = require(\"./fields\");\nvar PredefinedExpressions;\n(function (PredefinedExpressions) {\n PredefinedExpressions[\"@yearly\"] = \"0 0 0 1 1 *\";\n PredefinedExpressions[\"@annually\"] = \"0 0 0 1 1 *\";\n PredefinedExpressions[\"@monthly\"] = \"0 0 0 1 * *\";\n PredefinedExpressions[\"@weekly\"] = \"0 0 0 * * 0\";\n PredefinedExpressions[\"@daily\"] = \"0 0 0 * * *\";\n PredefinedExpressions[\"@hourly\"] = \"0 0 * * * *\";\n PredefinedExpressions[\"@minutely\"] = \"0 * * * * *\";\n PredefinedExpressions[\"@secondly\"] = \"* * * * * *\";\n PredefinedExpressions[\"@weekdays\"] = \"0 0 0 * * 1-5\";\n PredefinedExpressions[\"@weekends\"] = \"0 0 0 * * 0,6\";\n})(PredefinedExpressions || (exports.PredefinedExpressions = PredefinedExpressions = {}));\nvar CronUnit;\n(function (CronUnit) {\n CronUnit[\"Second\"] = \"Second\";\n CronUnit[\"Minute\"] = \"Minute\";\n CronUnit[\"Hour\"] = \"Hour\";\n CronUnit[\"DayOfMonth\"] = \"DayOfMonth\";\n CronUnit[\"Month\"] = \"Month\";\n CronUnit[\"DayOfWeek\"] = \"DayOfWeek\";\n})(CronUnit || (exports.CronUnit = CronUnit = {}));\n// these need to be lowercase for the parser to work\nvar Months;\n(function (Months) {\n Months[Months[\"jan\"] = 1] = \"jan\";\n Months[Months[\"feb\"] = 2] = \"feb\";\n Months[Months[\"mar\"] = 3] = \"mar\";\n Months[Months[\"apr\"] = 4] = \"apr\";\n Months[Months[\"may\"] = 5] = \"may\";\n Months[Months[\"jun\"] = 6] = \"jun\";\n Months[Months[\"jul\"] = 7] = \"jul\";\n Months[Months[\"aug\"] = 8] = \"aug\";\n Months[Months[\"sep\"] = 9] = \"sep\";\n Months[Months[\"oct\"] = 10] = \"oct\";\n Months[Months[\"nov\"] = 11] = \"nov\";\n Months[Months[\"dec\"] = 12] = \"dec\";\n})(Months || (exports.Months = Months = {}));\n// these need to be lowercase for the parser to work\nvar DayOfWeek;\n(function (DayOfWeek) {\n DayOfWeek[DayOfWeek[\"sun\"] = 0] = \"sun\";\n DayOfWeek[DayOfWeek[\"mon\"] = 1] = \"mon\";\n DayOfWeek[DayOfWeek[\"tue\"] = 2] = \"tue\";\n DayOfWeek[DayOfWeek[\"wed\"] = 3] = \"wed\";\n DayOfWeek[DayOfWeek[\"thu\"] = 4] = \"thu\";\n DayOfWeek[DayOfWeek[\"fri\"] = 5] = \"fri\";\n DayOfWeek[DayOfWeek[\"sat\"] = 6] = \"sat\";\n})(DayOfWeek || (exports.DayOfWeek = DayOfWeek = {}));\n/**\n * Static class that parses a cron expression and returns a CronExpression object.\n * @static\n * @class CronExpressionParser\n */\nclass CronExpressionParser {\n /**\n * Parses a cron expression and returns a CronExpression object.\n * @param {string} expression - The cron expression to parse.\n * @param {CronExpressionOptions} [options={}] - The options to use when parsing the expression.\n * @param {boolean} [options.strict=false] - If true, will throw an error if the expression contains both dayOfMonth and dayOfWeek.\n * @param {CronDate} [options.currentDate=new CronDate(undefined, 'UTC')] - The date to use when calculating the next/previous occurrence.\n *\n * @returns {CronExpression} A CronExpression object.\n */\n static parse(expression, options = {}) {\n const { strict = false, hashSeed } = options;\n const rand = (0, random_1.seededRandom)(hashSeed);\n expression = PredefinedExpressions[expression] || expression;\n const rawFields = CronExpressionParser.#getRawFields(expression, strict);\n if (!(rawFields.dayOfMonth === '*' || rawFields.dayOfWeek === '*' || !strict)) {\n throw new Error('Cannot use both dayOfMonth and dayOfWeek together in strict mode!');\n }\n const second = CronExpressionParser.#parseField(CronUnit.Second, rawFields.second, fields_1.CronSecond.constraints, rand);\n const minute = CronExpressionParser.#parseField(CronUnit.Minute, rawFields.minute, fields_1.CronMinute.constraints, rand);\n const hour = CronExpressionParser.#parseField(CronUnit.Hour, rawFields.hour, fields_1.CronHour.constraints, rand);\n const month = CronExpressionParser.#parseField(CronUnit.Month, rawFields.month, fields_1.CronMonth.constraints, rand);\n const dayOfMonth = CronExpressionParser.#parseField(CronUnit.DayOfMonth, rawFields.dayOfMonth, fields_1.CronDayOfMonth.constraints, rand);\n const { dayOfWeek: _dayOfWeek, nthDayOfWeek } = CronExpressionParser.#parseNthDay(rawFields.dayOfWeek);\n const dayOfWeek = CronExpressionParser.#parseField(CronUnit.DayOfWeek, _dayOfWeek, fields_1.CronDayOfWeek.constraints, rand);\n const fields = new CronFieldCollection_1.CronFieldCollection({\n second: new fields_1.CronSecond(second, { rawValue: rawFields.second }),\n minute: new fields_1.CronMinute(minute, { rawValue: rawFields.minute }),\n hour: new fields_1.CronHour(hour, { rawValue: rawFields.hour }),\n dayOfMonth: new fields_1.CronDayOfMonth(dayOfMonth, { rawValue: rawFields.dayOfMonth }),\n month: new fields_1.CronMonth(month, { rawValue: rawFields.month }),\n dayOfWeek: new fields_1.CronDayOfWeek(dayOfWeek, { rawValue: rawFields.dayOfWeek, nthDayOfWeek }),\n });\n return new CronExpression_1.CronExpression(fields, { ...options, expression });\n }\n /**\n * Get the raw fields from a cron expression.\n * @param {string} expression - The cron expression to parse.\n * @param {boolean} strict - If true, will throw an error if the expression contains both dayOfMonth and dayOfWeek.\n * @private\n * @returns {RawCronFields} The raw fields.\n */\n static #getRawFields(expression, strict) {\n if (strict && !expression.length) {\n throw new Error('Invalid cron expression');\n }\n expression = expression || '0 * * * * *';\n const atoms = expression.trim().split(/\\s+/);\n if (strict && atoms.length < 6) {\n throw new Error('Invalid cron expression, expected 6 fields');\n }\n if (atoms.length > 6) {\n throw new Error('Invalid cron expression, too many fields');\n }\n const defaults = ['*', '*', '*', '*', '*', '0'];\n if (atoms.length < defaults.length) {\n atoms.unshift(...defaults.slice(atoms.length));\n }\n const [second, minute, hour, dayOfMonth, month, dayOfWeek] = atoms;\n return { second, minute, hour, dayOfMonth, month, dayOfWeek };\n }\n /**\n * Parse a field from a cron expression.\n * @param {CronUnit} field - The field to parse.\n * @param {string} value - The value of the field.\n * @param {CronConstraints} constraints - The constraints for the field.\n * @private\n * @returns {(number | string)[]} The parsed field.\n */\n static #parseField(field, value, constraints, rand) {\n // Replace aliases for month and dayOfWeek\n if (field === CronUnit.Month || field === CronUnit.DayOfWeek) {\n value = value.replace(/[a-z]{3}/gi, (match) => {\n match = match.toLowerCase();\n const replacer = Months[match] || DayOfWeek[match];\n if (replacer === undefined) {\n throw new Error(`Validation error, cannot resolve alias \"${match}\"`);\n }\n return replacer.toString();\n });\n }\n // Check for valid characters\n if (!constraints.validChars.test(value)) {\n throw new Error(`Invalid characters, got value: ${value}`);\n }\n value = this.#parseWildcard(value, constraints);\n value = this.#parseHashed(value, constraints, rand);\n return this.#parseSequence(field, value, constraints);\n }\n /**\n * Parse a wildcard from a cron expression.\n * @param {string} value - The value to parse.\n * @param {CronConstraints} constraints - The constraints for the field.\n * @private\n */\n static #parseWildcard(value, constraints) {\n return value.replace(/[*?]/g, constraints.min + '-' + constraints.max);\n }\n /**\n * Parse a hashed value from a cron expression.\n * @param {string} value - The value to parse.\n * @param {CronConstraints} constraints - The constraints for the field.\n * @param {PRNG} rand - The random number generator to use.\n * @private\n */\n static #parseHashed(value, constraints, rand) {\n const randomValue = rand();\n return value.replace(/H(?:\\((\\d+)-(\\d+)\\))?(?:\\/(\\d+))?/g, (_, min, max, step) => {\n // H(range)/step\n if (min && max && step) {\n const minNum = parseInt(min, 10);\n const maxNum = parseInt(max, 10);\n const stepNum = parseInt(step, 10);\n if (minNum > maxNum) {\n throw new Error(`Invalid range: ${minNum}-${maxNum}, min > max`);\n }\n if (stepNum <= 0) {\n throw new Error(`Invalid step: ${stepNum}, must be positive`);\n }\n const minStart = Math.max(minNum, constraints.min);\n const offset = Math.floor(randomValue * stepNum);\n const values = [];\n for (let i = Math.floor(minStart / stepNum) * stepNum + offset; i <= maxNum; i += stepNum) {\n if (i >= minStart) {\n values.push(i);\n }\n }\n return values.join(',');\n }\n // H(range)\n else if (min && max) {\n const minNum = parseInt(min, 10);\n const maxNum = parseInt(max, 10);\n if (minNum > maxNum) {\n throw new Error(`Invalid range: ${minNum}-${maxNum}, min > max`);\n }\n return String(Math.floor(randomValue * (maxNum - minNum + 1)) + minNum);\n }\n // H/step\n else if (step) {\n const stepNum = parseInt(step, 10);\n // Validate step\n if (stepNum <= 0) {\n throw new Error(`Invalid step: ${stepNum}, must be positive`);\n }\n const offset = Math.floor(randomValue * stepNum);\n const values = [];\n for (let i = Math.floor(constraints.min / stepNum) * stepNum + offset; i <= constraints.max; i += stepNum) {\n if (i >= constraints.min) {\n values.push(i);\n }\n }\n return values.join(',');\n }\n // H\n else {\n return String(Math.floor(randomValue * (constraints.max - constraints.min + 1) + constraints.min));\n }\n });\n }\n /**\n * Parse a sequence from a cron expression.\n * @param {CronUnit} field - The field to parse.\n * @param {string} val - The sequence to parse.\n * @param {CronConstraints} constraints - The constraints for the field.\n * @private\n */\n static #parseSequence(field, val, constraints) {\n const stack = [];\n function handleResult(result, constraints) {\n if (Array.isArray(result)) {\n stack.push(...result);\n }\n else {\n if (CronExpressionParser.#isValidConstraintChar(constraints, result)) {\n stack.push(result);\n }\n else {\n const v = parseInt(result.toString(), 10);\n const isValid = v >= constraints.min && v <= constraints.max;\n if (!isValid) {\n throw new Error(`Constraint error, got value ${result} expected range ${constraints.min}-${constraints.max}`);\n }\n stack.push(field === CronUnit.DayOfWeek ? v % 7 : result);\n }\n }\n }\n const atoms = val.split(',');\n atoms.forEach((atom) => {\n if (!(atom.length > 0)) {\n throw new Error('Invalid list value format');\n }\n handleResult(CronExpressionParser.#parseRepeat(field, atom, constraints), constraints);\n });\n return stack;\n }\n /**\n * Parse repeat from a cron expression.\n * @param {CronUnit} field - The field to parse.\n * @param {string} val - The repeat to parse.\n * @param {CronConstraints} constraints - The constraints for the field.\n * @private\n * @returns {(number | string)[]} The parsed repeat.\n */\n static #parseRepeat(field, val, constraints) {\n const atoms = val.split('/');\n if (atoms.length > 2) {\n throw new Error(`Invalid repeat: ${val}`);\n }\n if (atoms.length === 2) {\n if (!isNaN(parseInt(atoms[0], 10))) {\n atoms[0] = `${atoms[0]}-${constraints.max}`;\n }\n return CronExpressionParser.#parseRange(field, atoms[0], parseInt(atoms[1], 10), constraints);\n }\n return CronExpressionParser.#parseRange(field, val, 1, constraints);\n }\n /**\n * Validate a cron range.\n * @param {number} min - The minimum value of the range.\n * @param {number} max - The maximum value of the range.\n * @param {CronConstraints} constraints - The constraints for the field.\n * @private\n * @returns {void}\n * @throws {Error} Throws an error if the range is invalid.\n */\n static #validateRange(min, max, constraints) {\n const isValid = !isNaN(min) && !isNaN(max) && min >= constraints.min && max <= constraints.max;\n if (!isValid) {\n throw new Error(`Constraint error, got range ${min}-${max} expected range ${constraints.min}-${constraints.max}`);\n }\n if (min > max) {\n throw new Error(`Invalid range: ${min}-${max}, min(${min}) > max(${max})`);\n }\n }\n /**\n * Validate a cron repeat interval.\n * @param {number} repeatInterval - The repeat interval to validate.\n * @private\n * @returns {void}\n * @throws {Error} Throws an error if the repeat interval is invalid.\n */\n static #validateRepeatInterval(repeatInterval) {\n if (!(!isNaN(repeatInterval) && repeatInterval > 0)) {\n throw new Error(`Constraint error, cannot repeat at every ${repeatInterval} time.`);\n }\n }\n /**\n * Create a range from a cron expression.\n * @param {CronUnit} field - The field to parse.\n * @param {number} min - The minimum value of the range.\n * @param {number} max - The maximum value of the range.\n * @param {number} repeatInterval - The repeat interval of the range.\n * @private\n * @returns {number[]} The created range.\n */\n static #createRange(field, min, max, repeatInterval) {\n const stack = [];\n if (field === CronUnit.DayOfWeek && max % 7 === 0) {\n stack.push(0);\n }\n for (let index = min; index <= max; index += repeatInterval) {\n if (stack.indexOf(index) === -1) {\n stack.push(index);\n }\n }\n return stack;\n }\n /**\n * Parse a range from a cron expression.\n * @param {CronUnit} field - The field to parse.\n * @param {string} val - The range to parse.\n * @param {number} repeatInterval - The repeat interval of the range.\n * @param {CronConstraints} constraints - The constraints for the field.\n * @private\n * @returns {number[] | string[] | number | string} The parsed range.\n */\n static #parseRange(field, val, repeatInterval, constraints) {\n const atoms = val.split('-');\n if (atoms.length <= 1) {\n return isNaN(+val) ? val : +val;\n }\n const [min, max] = atoms.map((num) => parseInt(num, 10));\n this.#validateRange(min, max, constraints);\n this.#validateRepeatInterval(repeatInterval);\n // Create range\n return this.#createRange(field, min, max, repeatInterval);\n }\n /**\n * Parse a cron expression.\n * @param {string} val - The cron expression to parse.\n * @private\n * @returns {string} The parsed cron expression.\n */\n static #parseNthDay(val) {\n const atoms = val.split('#');\n if (atoms.length <= 1) {\n return { dayOfWeek: atoms[0] };\n }\n const nthValue = +atoms[atoms.length - 1];\n const matches = val.match(/([,-/])/);\n if (matches !== null) {\n throw new Error(`Constraint error, invalid dayOfWeek \\`#\\` and \\`${matches?.[0]}\\` special characters are incompatible`);\n }\n if (!(atoms.length <= 2 && !isNaN(nthValue) && nthValue >= 1 && nthValue <= 5)) {\n throw new Error('Constraint error, invalid dayOfWeek occurrence number (#)');\n }\n return { dayOfWeek: atoms[0], nthDayOfWeek: nthValue };\n }\n /**\n * Checks if a character is valid for a field.\n * @param {CronConstraints} constraints - The constraints for the field.\n * @param {string | number} value - The value to check.\n * @private\n * @returns {boolean} Whether the character is valid for the field.\n */\n static #isValidConstraintChar(constraints, value) {\n return constraints.chars.some((char) => value.toString().includes(char));\n }\n}\nexports.CronExpressionParser = CronExpressionParser;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronFileParser = void 0;\nconst CronExpressionParser_1 = require(\"./CronExpressionParser\");\n/**\n * Parser for crontab files that handles both synchronous and asynchronous operations.\n */\nclass CronFileParser {\n /**\n * Parse a crontab file asynchronously\n * @param filePath Path to crontab file\n * @returns Promise resolving to parse results\n * @throws If file cannot be read\n */\n static async parseFile(filePath) {\n const { readFile } = await Promise.resolve().then(() => __importStar(require('fs/promises')));\n const data = await readFile(filePath, 'utf8');\n return CronFileParser.#parseContent(data);\n }\n /**\n * Parse a crontab file synchronously\n * @param filePath Path to crontab file\n * @returns Parse results\n * @throws If file cannot be read\n */\n static parseFileSync(filePath) {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const { readFileSync } = require('fs');\n const data = readFileSync(filePath, 'utf8');\n return CronFileParser.#parseContent(data);\n }\n /**\n * Internal method to parse crontab file content\n * @private\n */\n static #parseContent(data) {\n const blocks = data.split('\\n');\n const result = {\n variables: {},\n expressions: [],\n errors: {},\n };\n for (const block of blocks) {\n const entry = block.trim();\n if (entry.length === 0 || entry.startsWith('#')) {\n continue;\n }\n const variableMatch = entry.match(/^(.*)=(.*)$/);\n if (variableMatch) {\n const [, key, value] = variableMatch;\n result.variables[key] = value.replace(/[\"']/g, ''); // Remove quotes\n continue;\n }\n try {\n const parsedEntry = CronFileParser.#parseEntry(entry);\n result.expressions.push(parsedEntry.interval);\n }\n catch (err) {\n result.errors[entry] = err;\n }\n }\n return result;\n }\n /**\n * Parse a single crontab entry\n * @private\n */\n static #parseEntry(entry) {\n const atoms = entry.split(' ');\n return {\n interval: CronExpressionParser_1.CronExpressionParser.parse(atoms.slice(0, 5).join(' ')),\n command: atoms.slice(5, atoms.length),\n };\n }\n}\nexports.CronFileParser = CronFileParser;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CronFileParser = exports.CronExpressionParser = exports.CronExpression = exports.CronFieldCollection = exports.CronDate = void 0;\n/* istanbul ignore file */\nconst CronExpressionParser_1 = require(\"./CronExpressionParser\");\nvar CronDate_1 = require(\"./CronDate\");\nObject.defineProperty(exports, \"CronDate\", { enumerable: true, get: function () { return CronDate_1.CronDate; } });\nvar CronFieldCollection_1 = require(\"./CronFieldCollection\");\nObject.defineProperty(exports, \"CronFieldCollection\", { enumerable: true, get: function () { return CronFieldCollection_1.CronFieldCollection; } });\nvar CronExpression_1 = require(\"./CronExpression\");\nObject.defineProperty(exports, \"CronExpression\", { enumerable: true, get: function () { return CronExpression_1.CronExpression; } });\nvar CronExpressionParser_2 = require(\"./CronExpressionParser\");\nObject.defineProperty(exports, \"CronExpressionParser\", { enumerable: true, get: function () { return CronExpressionParser_2.CronExpressionParser; } });\nvar CronFileParser_1 = require(\"./CronFileParser\");\nObject.defineProperty(exports, \"CronFileParser\", { enumerable: true, get: function () { return CronFileParser_1.CronFileParser; } });\n__exportStar(require(\"./fields\"), exports);\nexports.default = CronExpressionParser_1.CronExpressionParser;\n","import { setTimeout } from 'node:timers/promises';\n/**\n * When sql contains multiple queries, result is an array of objects with rows property\n * This function unwraps the result into a single object with rows property\n*/\nfunction unwrapSQLResult(result) {\n if (Array.isArray(result)) {\n return { rows: result.flatMap(i => i.rows) };\n }\n return result;\n}\nfunction delay(ms, error, abortController) {\n const ac = abortController || new AbortController();\n const promise = new Promise((resolve, reject) => {\n setTimeout(ms, null, { signal: ac.signal })\n .then(() => {\n if (error) {\n reject(new Error(error));\n }\n else {\n resolve();\n }\n })\n .catch(resolve);\n });\n promise.abort = () => {\n if (!ac.signal.aborted) {\n ac.abort();\n }\n };\n return promise;\n}\nasync function resolveWithinSeconds(promise, seconds, message, abortController) {\n const timeout = Math.max(1, seconds) * 1000;\n const reject = delay(timeout, message, abortController);\n let result;\n try {\n result = await Promise.race([promise, reject]);\n }\n finally {\n reject.abort();\n }\n return result;\n}\nexport { delay, resolveWithinSeconds, unwrapSQLResult };\n","import * as plans from \"./plans.js\";\n/**\n * Emits a warning event and optionally persists it to the database.\n * This is a shared utility to avoid duplicating warning persistence logic\n * across boss.ts and timekeeper.ts.\n */\nexport async function emitAndPersistWarning(ctx, type, message, data) {\n ctx.emitter.emit(ctx.warningEvent, { message, data });\n if (ctx.persistWarnings) {\n try {\n const sql = plans.insertWarning(ctx.schema);\n await ctx.db.executeSql(sql, [type, message, JSON.stringify(data)]);\n }\n catch (err) {\n ctx.emitter.emit(ctx.errorEvent, err);\n }\n }\n}\n","import { CronExpressionParser } from 'cron-parser';\nimport EventEmitter from 'node:events';\nimport * as Attorney from \"./attorney.js\";\nimport * as plans from \"./plans.js\";\nimport { delay } from \"./tools.js\";\nimport * as types from \"./types.js\";\nimport { emitAndPersistWarning } from \"./warning.js\";\nexport const QUEUES = {\n SEND_IT: '__pgboss__send-it'\n};\nconst EVENTS = {\n error: 'error',\n schedule: 'schedule',\n warning: 'warning'\n};\nconst WARNINGS = {\n CLOCK_SKEW: {\n message: 'Warning: Clock skew between this instance and the database server. This will not break scheduling, but is emitted any time the skew exceeds 60 seconds.'\n }\n};\nconst WARNING_TYPES = {\n CLOCK_SKEW: 'clock_skew'\n};\nclass Timekeeper extends EventEmitter {\n db;\n config;\n manager;\n stopped = true;\n cronMonitorInterval;\n skewMonitorInterval;\n timekeeping;\n _checkingSkew = false;\n clockSkew = 0;\n events = EVENTS;\n constructor(db, manager, config) {\n super();\n this.db = db;\n this.config = config;\n this.manager = manager;\n }\n get checkingSkew() {\n return this._checkingSkew;\n }\n get warningContext() {\n return {\n emitter: this,\n db: this.db,\n schema: this.config.schema,\n persistWarnings: this.config.persistWarnings,\n warningEvent: this.events.warning,\n errorEvent: this.events.error\n };\n }\n async start() {\n this.stopped = false;\n await this.cacheClockSkew();\n await this.manager.createQueue(QUEUES.SEND_IT);\n const options = {\n pollingIntervalSeconds: this.config.cronWorkerIntervalSeconds,\n batchSize: 50\n };\n await this.manager.work(QUEUES.SEND_IT, options, (jobs) => this.onSendIt(jobs));\n setImmediate(() => this.onCron());\n this.cronMonitorInterval = setInterval(async () => await this.onCron(), this.config.cronMonitorIntervalSeconds * 1000);\n this.skewMonitorInterval = setInterval(async () => await this.cacheClockSkew(), this.config.clockMonitorIntervalSeconds * 1000);\n }\n async stop() {\n if (this.stopped) {\n return;\n }\n this.stopped = true;\n await this.manager.offWork(QUEUES.SEND_IT, { wait: true });\n if (this.skewMonitorInterval) {\n clearInterval(this.skewMonitorInterval);\n this.skewMonitorInterval = null;\n }\n if (this.cronMonitorInterval) {\n clearInterval(this.cronMonitorInterval);\n this.cronMonitorInterval = null;\n }\n while (this.timekeeping || this._checkingSkew) {\n await delay(10);\n }\n }\n async cacheClockSkew() {\n let skew = 0;\n this._checkingSkew = true;\n try {\n if (this.config.__test__force_clock_monitoring_error) {\n throw new Error(this.config.__test__force_clock_monitoring_error);\n }\n if (this.config.__test__delay_clock_skew_ms) {\n await delay(this.config.__test__delay_clock_skew_ms);\n }\n const { rows } = await this.db.executeSql(plans.getTime());\n const local = Date.now();\n const dbTime = parseFloat(rows[0].time);\n skew = dbTime - local;\n const skewSeconds = Math.abs(skew) / 1000;\n if (skewSeconds >= 60 || this.config.__test__force_clock_skew_warning) {\n await emitAndPersistWarning(this.warningContext, WARNING_TYPES.CLOCK_SKEW, WARNINGS.CLOCK_SKEW.message, { seconds: skewSeconds, direction: skew > 0 ? 'slower' : 'faster' });\n }\n }\n catch (err) {\n this.emit(this.events.error, err);\n }\n finally {\n this.clockSkew = skew;\n this._checkingSkew = false;\n }\n }\n async onCron() {\n try {\n if (this.stopped || this.timekeeping)\n return;\n if (this.config.__test__force_cron_monitoring_error) {\n throw new Error(this.config.__test__force_cron_monitoring_error);\n }\n this.timekeeping = true;\n const sql = plans.trySetCronTime(this.config.schema, this.config.cronMonitorIntervalSeconds);\n if (!this.stopped) {\n const { rows } = await this.db.executeSql(sql);\n if (!this.stopped && rows.length === 1) {\n await this.cron();\n }\n }\n }\n catch (err) {\n this.emit(this.events.error, err);\n }\n finally {\n this.timekeeping = false;\n }\n }\n async cron() {\n const schedules = await this.getSchedules();\n const scheduled = schedules\n .filter(i => this.shouldSendIt(i.cron, i.timezone))\n .map(({ name, key, data, options }) => ({ data: { name, data, options }, singletonKey: `${name}__${key}`, singletonSeconds: 60 }));\n if (scheduled.length > 0 && !this.stopped) {\n await this.manager.insert(QUEUES.SEND_IT, scheduled);\n }\n }\n shouldSendIt(cron, tz) {\n const interval = CronExpressionParser.parse(cron, { tz, strict: false });\n const prevTime = interval.prev();\n const databaseTime = Date.now() + this.clockSkew;\n const prevDiff = (databaseTime - prevTime.getTime()) / 1000;\n return prevDiff < 60;\n }\n async onSendIt(jobs) {\n await Promise.allSettled(jobs.map(({ data }) => this.manager.send(data)));\n }\n async getSchedules(name, key = '') {\n let sql = plans.getSchedules(this.config.schema);\n let params = [];\n if (name) {\n sql = plans.getSchedulesByQueue(this.config.schema);\n params = [name, key];\n }\n const { rows } = await this.db.executeSql(sql, params);\n return rows;\n }\n async schedule(name, cron, data, options = {}) {\n const { tz = 'UTC', key = '', ...rest } = options;\n CronExpressionParser.parse(cron, { tz, strict: false });\n Attorney.checkSendArgs([name, data, { ...rest }]);\n Attorney.assertKey(key);\n try {\n const sql = plans.schedule(this.config.schema);\n await this.db.executeSql(sql, [name, key, cron, tz, data, options]);\n }\n catch (err) {\n if (err.message.includes('foreign key')) {\n err.message = `Queue ${name} not found`;\n }\n throw err;\n }\n }\n async unschedule(name, key = '') {\n const sql = plans.unschedule(this.config.schema);\n await this.db.executeSql(sql, [name, key]);\n }\n}\nexport default Timekeeper;\n","import { delay } from \"./tools.js\";\nconst WORKER_STATES = {\n created: 'created',\n active: 'active',\n stopping: 'stopping',\n stopped: 'stopped'\n};\nclass Worker {\n id;\n workId;\n name;\n options;\n fetch;\n onFetch;\n onError;\n interval;\n jobs = [];\n createdOn = Date.now();\n state = WORKER_STATES.created;\n lastFetchedOn = null;\n lastJobStartedOn = null;\n lastJobEndedOn = null;\n lastJobDuration = null;\n lastError = null;\n lastErrorOn = null;\n stopping = false;\n stopped = false;\n abortController = null;\n loopDelayPromise = null;\n beenNotified = false;\n runPromise = null;\n constructor({ id, workId, name, options, interval, fetch, onFetch, onError }) {\n this.id = id;\n this.workId = workId;\n this.name = name;\n this.options = options;\n this.fetch = fetch;\n this.onFetch = onFetch;\n this.onError = onError;\n this.interval = interval;\n }\n start() {\n this.runPromise = this.run();\n }\n async run() {\n this.state = WORKER_STATES.active;\n while (!this.stopping) {\n const started = Date.now();\n try {\n this.beenNotified = false;\n const jobs = await this.fetch();\n this.lastFetchedOn = Date.now();\n if (jobs) {\n this.jobs = jobs;\n this.lastJobStartedOn = this.lastFetchedOn;\n await this.onFetch(jobs);\n this.lastJobEndedOn = Date.now();\n this.jobs = [];\n }\n }\n catch (err) {\n this.lastErrorOn = Date.now();\n this.lastError = err;\n err.message = `${err.message} (Queue: ${this.name}, Worker: ${this.id})`;\n this.onError(err);\n }\n const duration = Date.now() - started;\n this.lastJobDuration = duration;\n if (!this.stopping && !this.beenNotified && (this.interval - duration) > 100) {\n this.loopDelayPromise = delay(this.interval - duration);\n await this.loopDelayPromise;\n this.loopDelayPromise = null;\n }\n }\n this.stopping = false;\n this.stopped = true;\n this.state = WORKER_STATES.stopped;\n }\n notify() {\n this.beenNotified = true;\n if (this.loopDelayPromise) {\n this.loopDelayPromise.abort();\n }\n }\n async stop() {\n this.stopping = true;\n this.state = WORKER_STATES.stopping;\n if (this.loopDelayPromise) {\n this.loopDelayPromise.abort();\n }\n await this.runPromise;\n }\n abort() {\n if (this.abortController && !this.abortController.signal.aborted) {\n this.abortController.abort();\n }\n }\n toWipData() {\n return {\n id: this.id,\n workId: this.workId,\n name: this.name,\n options: this.options,\n state: this.state,\n count: this.jobs.length,\n createdOn: this.createdOn,\n lastFetchedOn: this.lastFetchedOn,\n lastJobStartedOn: this.lastJobStartedOn,\n lastJobEndedOn: this.lastJobEndedOn,\n lastError: this.lastError,\n lastErrorOn: this.lastErrorOn,\n lastJobDuration: this.lastJobDuration\n };\n }\n}\nexport default Worker;\n","export class JobSpy {\n #jobResults = new Map();\n #pendingPromises = [];\n clear() {\n this.#jobResults.clear();\n this.#pendingPromises = [];\n }\n waitForJobWithId(id, awaitedState) {\n return this.waitForJob(() => true, awaitedState, id);\n }\n waitForJob(dataSelector, awaitedState, specificId) {\n const selector = (job) => {\n if (specificId && job.id !== specificId) {\n return false;\n }\n return dataSelector(job.data);\n };\n // Check if we already have a matching job\n for (const job of this.#jobResults.values()) {\n if (job.state === awaitedState && selector(job)) {\n return Promise.resolve(this.#cloneJob(job));\n }\n }\n // Register promise to be resolved when job arrives\n return this.#registerPromise(selector, awaitedState);\n }\n #registerPromise(selector, awaitedState) {\n let resolve;\n const promise = new Promise((_resolve) => {\n resolve = _resolve;\n });\n this.#pendingPromises.push({ selector, awaitedState, resolve });\n return promise;\n }\n #getJobResultKey(id, state) {\n return `${id}:${state}`;\n }\n #cloneJob(job) {\n return {\n id: job.id,\n name: job.name,\n data: structuredClone(job.data),\n state: job.state,\n output: job.output ? structuredClone(job.output) : undefined\n };\n }\n addJob(id, name, data, state, output) {\n const job = {\n id,\n name,\n data: structuredClone(data),\n state,\n output: output ? structuredClone(output) : undefined\n };\n const key = this.#getJobResultKey(id, state);\n this.#jobResults.set(key, job);\n // Resolve any pending promises that match this job\n const matchingPromises = [];\n const remainingPromises = [];\n for (const pending of this.#pendingPromises) {\n if (pending.awaitedState === state && pending.selector(job)) {\n matchingPromises.push(pending);\n }\n else {\n remainingPromises.push(pending);\n }\n }\n this.#pendingPromises = remainingPromises;\n for (const pending of matchingPromises) {\n pending.resolve(this.#cloneJob(job));\n }\n }\n}\n","import assert, { notStrictEqual } from 'node:assert';\nimport { randomUUID } from 'node:crypto';\nimport EventEmitter from 'node:events';\nimport { serializeError as stringify } from 'serialize-error';\nimport * as Attorney from \"./attorney.js\";\nimport * as plans from \"./plans.js\";\nimport * as timekeeper from \"./timekeeper.js\";\nimport { resolveWithinSeconds } from \"./tools.js\";\nimport * as types from \"./types.js\";\nimport Worker from \"./worker.js\";\nimport { JobSpy } from \"./spy.js\";\nconst INTERNAL_QUEUES = Object.values(timekeeper.QUEUES).reduce((acc, i) => ({ ...acc, [i]: i }), {});\nconst events = {\n error: 'error',\n wip: 'wip'\n};\nclass Manager extends EventEmitter {\n events = events;\n db;\n config;\n wipTs;\n workers;\n stopped;\n queueCacheInterval;\n timekeeper;\n queues;\n pendingOffWorkCleanups;\n #spies;\n #localGroupActive;\n #localGroupConfig;\n #localGroupMaxLimit;\n constructor(db, config) {\n super();\n this.config = config;\n this.db = db;\n this.wipTs = Date.now();\n this.workers = new Map();\n this.queues = {};\n this.pendingOffWorkCleanups = new Set();\n this.#spies = new Map();\n this.#localGroupActive = new Map();\n this.#localGroupConfig = new Map();\n this.#localGroupMaxLimit = new Map();\n }\n getSpy(name) {\n if (!this.config.__test__enableSpies) {\n throw new Error('Spy is not enabled. Set __test__enableSpies: true in constructor options to use spies.');\n }\n let spy = this.#spies.get(name);\n if (!spy) {\n spy = new JobSpy();\n this.#spies.set(name, spy);\n }\n return spy;\n }\n clearSpies() {\n for (const spy of this.#spies.values()) {\n spy.clear();\n }\n this.#spies.clear();\n }\n #getLocalGroupLimit(queueName, groupTier) {\n const config = this.#localGroupConfig.get(queueName);\n if (!config)\n return Infinity;\n if (groupTier && config.tiers && groupTier in config.tiers) {\n return config.tiers[groupTier];\n }\n return config.default;\n }\n #getGroupsAtLocalCapacity(queueName) {\n const config = this.#localGroupConfig.get(queueName);\n if (!config)\n return [];\n const queueGroups = this.#localGroupActive.get(queueName);\n if (!queueGroups)\n return [];\n // Only exclude a group from fetching when it has no remaining capacity for\n // any tier. Using config.default alone would exclude groups that still have\n // room for higher tier jobs. Those jobs never reach the per tier check in\n // #trackLocalGroupStart because ignoreGroups filters them out of the fetch\n // query before that point. maxLimit is precomputed once at setup time so\n // Object.values is not called on every fetch cycle.\n const maxLimit = this.#localGroupMaxLimit.get(queueName) ?? config.default;\n const atCapacity = [];\n for (const [groupId, activeCount] of queueGroups.entries()) {\n if (activeCount >= maxLimit) {\n atCapacity.push(groupId);\n }\n }\n return atCapacity;\n }\n #incrementLocalGroupCount(queueName, groupId) {\n let queueGroups = this.#localGroupActive.get(queueName);\n if (!queueGroups) {\n queueGroups = new Map();\n this.#localGroupActive.set(queueName, queueGroups);\n }\n const current = queueGroups.get(groupId) || 0;\n queueGroups.set(groupId, current + 1);\n }\n #decrementLocalGroupCount(queueName, groupId) {\n const queueGroups = this.#localGroupActive.get(queueName);\n if (!queueGroups)\n return;\n const current = queueGroups.get(groupId) || 0;\n if (current <= 1) {\n queueGroups.delete(groupId);\n }\n else {\n queueGroups.set(groupId, current - 1);\n }\n }\n #trackJobsActive(name, jobs) {\n const spy = this.config.__test__enableSpies ? this.#spies.get(name) : undefined;\n if (spy) {\n for (const job of jobs) {\n spy.addJob(job.id, name, job.data, 'active');\n }\n }\n }\n #trackJobsCompleted(name, jobs, result) {\n const spy = this.config.__test__enableSpies ? this.#spies.get(name) : undefined;\n if (spy) {\n const output = jobs.length === 1 ? result : undefined;\n for (const job of jobs) {\n spy.addJob(job.id, name, job.data, 'completed', output);\n }\n }\n }\n #trackJobsFailed(name, jobs, err) {\n const spy = this.config.__test__enableSpies ? this.#spies.get(name) : undefined;\n if (spy) {\n for (const job of jobs) {\n spy.addJob(job.id, name, job.data, 'failed', { message: err?.message, stack: err?.stack });\n }\n }\n }\n #storeLocalGroupConfig(name, localGroupConcurrency) {\n const config = typeof localGroupConcurrency === 'number'\n ? { default: localGroupConcurrency }\n : localGroupConcurrency;\n this.#localGroupConfig.set(name, config);\n this.#localGroupMaxLimit.set(name, config.tiers\n ? Math.max(config.default, ...Object.values(config.tiers))\n : config.default);\n }\n #cleanupLocalGroupTracking(name) {\n // Only cleanup if no more workers exist for this queue\n const hasWorkersForQueue = this.getWorkers().some(w => w.name === name && !w.stopping && !w.stopped);\n if (!hasWorkersForQueue) {\n this.#localGroupConfig.delete(name);\n this.#localGroupActive.delete(name);\n this.#localGroupMaxLimit.delete(name);\n }\n }\n #trackLocalGroupStart(name, jobs) {\n const allowed = [];\n const excess = [];\n const groupedJobs = [];\n for (const job of jobs) {\n if (!job.groupId) {\n // Jobs without group bypass local group limits\n allowed.push(job);\n continue;\n }\n const currentCount = this.#localGroupActive.get(name)?.get(job.groupId) || 0;\n const limit = this.#getLocalGroupLimit(name, job.groupTier);\n if (currentCount < limit) {\n this.#incrementLocalGroupCount(name, job.groupId);\n allowed.push(job);\n groupedJobs.push(job);\n }\n else {\n excess.push(job);\n }\n }\n return { allowed, excess, groupedJobs };\n }\n #trackLocalGroupEnd(name, groupedJobs) {\n for (const job of groupedJobs) {\n if (job.groupId) {\n this.#decrementLocalGroupCount(name, job.groupId);\n }\n }\n }\n async #processJobs(name, jobs, callback, worker, heartbeatRefreshSeconds) {\n const jobIds = jobs.map(job => job.id);\n const maxExpiration = jobs.reduce((acc, i) => Math.max(acc, i.expireInSeconds), 0);\n const heartbeatSeconds = jobs.reduce((acc, j) => Math.max(acc, j.heartbeatSeconds || 0), 0);\n const ac = new AbortController();\n jobs.forEach(job => { job.signal = ac.signal; });\n // Store AbortController on worker so it can be aborted after graceful shutdown\n if (worker) {\n worker.abortController = ac;\n }\n let heartbeatTimer = null;\n if (heartbeatSeconds > 0) {\n const refreshSeconds = heartbeatRefreshSeconds ?? (heartbeatSeconds / 2);\n const intervalMs = refreshSeconds * 1000;\n heartbeatTimer = setInterval(async () => {\n try {\n await this.touch(name, jobIds);\n }\n catch (err) {\n this.emit(events.error, err);\n }\n }, intervalMs);\n }\n try {\n const result = await resolveWithinSeconds(callback(jobs), maxExpiration, `handler execution exceeded ${maxExpiration}s`, ac);\n await this.complete(name, jobIds, jobIds.length === 1 ? result : undefined);\n this.#trackJobsCompleted(name, jobs, result);\n }\n catch (err) {\n await this.fail(name, jobIds, err);\n this.#trackJobsFailed(name, jobs, err);\n }\n finally {\n if (heartbeatTimer)\n clearInterval(heartbeatTimer);\n if (worker) {\n // Clear between jobs\n worker.abortController = null;\n }\n }\n }\n async start() {\n this.stopped = false;\n this.queueCacheInterval = setInterval(() => this.onCacheQueues({ emit: true }), this.config.queueCacheIntervalSeconds * 1000);\n await this.onCacheQueues();\n }\n async onCacheQueues({ emit = false } = {}) {\n try {\n assert(!this.config.__test__throw_queueCache, 'test error');\n const queues = await this.getQueues();\n this.queues = queues.reduce((acc, i) => { acc[i.name] = i; return acc; }, {});\n }\n catch (error) {\n emit && this.emit(events.error, { ...error, message: error.message, stack: error.stack });\n }\n }\n async getQueueCache(name) {\n assert(this.queues, 'Queue cache is not initialized');\n let queue = this.queues[name];\n if (queue) {\n return queue;\n }\n queue = await this.getQueue(name);\n if (!queue) {\n throw new Error(`Queue ${name} does not exist`);\n }\n this.queues[name] = queue;\n return queue;\n }\n async stop() {\n this.stopped = true;\n clearInterval(this.queueCacheInterval);\n await Promise.allSettled([...this.workers.values()]\n .filter(worker => !INTERNAL_QUEUES[worker.name])\n .map(async (worker) => await this.offWork(worker.name, { wait: false })));\n // Clean up all local group tracking on full stop\n this.#localGroupConfig.clear();\n this.#localGroupActive.clear();\n this.#localGroupMaxLimit.clear();\n }\n async failWip() {\n for (const worker of this.workers.values()) {\n const jobIds = worker.jobs.map(j => j.id);\n if (jobIds.length) {\n await this.fail(worker.name, jobIds, 'pg-boss shut down while active');\n }\n worker.abort();\n }\n }\n async work(name, ...args) {\n const { options, callback } = Attorney.checkWorkArgs(name, args);\n if (this.stopped) {\n throw new Error('Workers are disabled. pg-boss is stopped');\n }\n const { pollingInterval: interval, batchSize = 1, includeMetadata = false, priority = true, localConcurrency = 1, localGroupConcurrency, groupConcurrency, orderByCreatedOn = true, heartbeatRefreshSeconds, minPriority, maxPriority, } = options;\n if (localGroupConcurrency != null) {\n this.#storeLocalGroupConfig(name, localGroupConcurrency);\n }\n const firstWorkerId = randomUUID({ disableEntropyCache: true });\n const createWorker = (workerId, workId) => {\n const fetch = () => {\n const ignoreGroups = localGroupConcurrency != null\n ? this.#getGroupsAtLocalCapacity(name)\n : undefined;\n return this.fetch(name, { batchSize, includeMetadata, priority, orderByCreatedOn, groupConcurrency, ignoreGroups, minPriority, maxPriority });\n };\n const onFetch = async (jobs) => {\n if (!jobs.length)\n return;\n if (this.config.__test__throw_worker)\n throw new Error('__test__throw_worker');\n this.emitWip(name);\n this.#trackJobsActive(name, jobs);\n // Get the worker instance for abort controller tracking\n const worker = this.workers.get(workerId);\n // Skip all in-memory group tracking when localGroupConcurrency is not enabled\n if (localGroupConcurrency == null) {\n await this.#processJobs(name, jobs, callback, worker, heartbeatRefreshSeconds);\n }\n else {\n const { allowed, excess, groupedJobs } = this.#trackLocalGroupStart(name, jobs);\n if (excess.length > 0) {\n const excessIds = excess.map(job => job.id);\n await this.restore(name, excessIds);\n }\n if (allowed.length > 0) {\n try {\n await this.#processJobs(name, allowed, callback, worker, heartbeatRefreshSeconds);\n }\n finally {\n this.#trackLocalGroupEnd(name, groupedJobs);\n }\n }\n }\n this.emitWip(name);\n };\n const onError = (error) => {\n this.emit(events.error, { ...error, message: error.message, stack: error.stack, queue: name, worker: workerId });\n };\n return new Worker({ id: workerId, workId, name, options, interval, fetch, onFetch, onError });\n };\n // Spawn workers based on localConcurrency setting\n for (let i = 0; i < localConcurrency; i++) {\n const workerId = i === 0 ? firstWorkerId : randomUUID({ disableEntropyCache: true });\n const worker = createWorker(workerId, firstWorkerId);\n this.addWorker(worker);\n worker.start();\n }\n return firstWorkerId;\n }\n addWorker(worker) {\n this.workers.set(worker.id, worker);\n }\n removeWorker(worker) {\n this.workers.delete(worker.id);\n }\n getWorkers() {\n return Array.from(this.workers.values());\n }\n emitWip(name) {\n if (!INTERNAL_QUEUES[name]) {\n const now = Date.now();\n if (now - this.wipTs > 2000) {\n this.emit(events.wip, this.getWipData());\n this.wipTs = now;\n }\n }\n }\n getWipData(options = {}) {\n const { includeInternal = false } = options;\n const data = this.getWorkers()\n .map(i => i.toWipData())\n .filter(i => i.state !== 'stopped' && (!INTERNAL_QUEUES[i.name] || includeInternal));\n return data;\n }\n hasPendingCleanups() {\n return this.pendingOffWorkCleanups.size > 0;\n }\n async offWork(name, options = { wait: true }) {\n assert(name, 'queue name is required');\n assert(typeof name === 'string', 'queue name must be a string');\n const query = (i) => options?.id ? i.id === options.id : i.name === name;\n const workers = this.getWorkers().filter(i => query(i) && !i.stopping && !i.stopped);\n if (workers.length === 0) {\n return;\n }\n const cleanupPromise = Promise.allSettled(workers.map(async (worker) => {\n await worker.stop();\n this.removeWorker(worker);\n }));\n if (options.wait) {\n await cleanupPromise;\n this.#cleanupLocalGroupTracking(name);\n }\n else {\n this.pendingOffWorkCleanups.add(cleanupPromise);\n cleanupPromise.finally(() => {\n this.pendingOffWorkCleanups.delete(cleanupPromise);\n this.#cleanupLocalGroupTracking(name);\n });\n }\n }\n notifyWorker(workerId) {\n this.workers.get(workerId)?.notify();\n }\n async subscribe(event, name) {\n assert(event, 'Missing required argument');\n assert(name, 'Missing required argument');\n const sql = plans.subscribe(this.config.schema);\n await this.db.executeSql(sql, [event, name]);\n }\n async unsubscribe(event, name) {\n assert(event, 'Missing required argument');\n assert(name, 'Missing required argument');\n const sql = plans.unsubscribe(this.config.schema);\n await this.db.executeSql(sql, [event, name]);\n }\n async publish(event, data, options) {\n assert(event, 'Missing required argument');\n const sql = plans.getQueuesForEvent(this.config.schema);\n const { rows } = await this.db.executeSql(sql, [event]);\n await Promise.allSettled(rows.map(({ name }) => this.send(name, data, options)));\n }\n async send(...args) {\n const result = Attorney.checkSendArgs(args);\n return await this.createJob(result);\n }\n async sendAfter(name, data, options, after) {\n options = options ? { ...options } : {};\n options.startAfter = after;\n const result = Attorney.checkSendArgs([name, data, options]);\n return await this.createJob(result);\n }\n async sendThrottled(name, data, options, seconds, key) {\n options = options ? { ...options } : {};\n options.singletonSeconds = seconds;\n options.singletonNextSlot = false;\n options.singletonKey = key;\n const result = Attorney.checkSendArgs([name, data, options]);\n return await this.createJob(result);\n }\n async sendDebounced(name, data, options, seconds, key) {\n options = options ? { ...options } : {};\n options.singletonSeconds = seconds;\n options.singletonNextSlot = true;\n options.singletonKey = key;\n const result = Attorney.checkSendArgs([name, data, options]);\n return await this.createJob(result);\n }\n async createJob(request) {\n const { name, data = null, options = {} } = request;\n const { id = null, db: wrapper, priority, startAfter, singletonKey = null, singletonSeconds, singletonNextSlot, expireInSeconds, deleteAfterSeconds, retentionSeconds, keepUntil, retryLimit, retryDelay, retryBackoff, retryDelayMax, heartbeatSeconds, group, deadLetter = null } = options;\n const job = {\n id,\n name,\n data,\n priority,\n startAfter,\n singletonKey,\n singletonSeconds,\n singletonOffset: 0,\n groupId: group?.id ?? null,\n groupTier: group?.tier ?? null,\n expireInSeconds,\n deleteAfterSeconds,\n retentionSeconds,\n keepUntil,\n retryLimit,\n retryDelay,\n retryBackoff,\n retryDelayMax,\n heartbeatSeconds,\n deadLetter\n };\n const db = wrapper || this.db;\n const { table, policy } = await this.getQueueCache(name);\n if (policy === plans.QUEUE_POLICIES.key_strict_fifo && !singletonKey) {\n throw new Error(`${plans.QUEUE_POLICIES.key_strict_fifo} queues require a singletonKey`);\n }\n const sql = plans.insertJobs(this.config.schema, { table, name, returnId: true });\n const { rows: try1 } = await db.executeSql(sql, [JSON.stringify([job])]);\n if (try1.length === 1) {\n const jobId = try1[0].id;\n if (this.config.__test__enableSpies) {\n const spy = this.#spies.get(name);\n if (spy) {\n spy.addJob(jobId, name, data || {}, 'created');\n }\n }\n return jobId;\n }\n if (singletonNextSlot) {\n // delay starting by the offset to honor throttling config\n job.startAfter = this.getDebounceStartAfter(singletonSeconds, this.timekeeper.clockSkew);\n job.singletonOffset = singletonSeconds;\n const { rows: try2 } = await db.executeSql(sql, [JSON.stringify([job])]);\n if (try2.length === 1) {\n const jobId = try2[0].id;\n if (this.config.__test__enableSpies) {\n const spy = this.#spies.get(name);\n if (spy) {\n spy.addJob(jobId, name, data || {}, 'created');\n }\n }\n return jobId;\n }\n }\n return null;\n }\n async insert(name, jobs, options = {}) {\n assert(Array.isArray(jobs), 'jobs argument should be an array');\n const { table, policy } = await this.getQueueCache(name);\n if (policy === plans.QUEUE_POLICIES.key_strict_fifo) {\n for (const job of jobs) {\n if (!job.singletonKey) {\n throw new Error(`${plans.QUEUE_POLICIES.key_strict_fifo} queues require a singletonKey`);\n }\n }\n }\n const db = this.assertDb(options);\n const spy = this.config.__test__enableSpies ? this.#spies.get(name) : undefined;\n // Return IDs if spy is active for this queue (needed for job tracking)\n const returnId = !!spy || !!options.returnId;\n const sql = plans.insertJobs(this.config.schema, { table, name, returnId });\n const { rows } = await db.executeSql(sql, [JSON.stringify(jobs)]);\n if (rows.length) {\n if (spy) {\n for (let i = 0; i < rows.length; i++) {\n spy.addJob(rows[i].id, name, jobs[i].data || {}, 'created');\n }\n }\n return rows.map((i) => i.id);\n }\n return null;\n }\n getDebounceStartAfter(singletonSeconds, clockOffset) {\n const debounceInterval = singletonSeconds * 1000;\n const now = Date.now() + clockOffset;\n const slot = Math.floor(now / debounceInterval) * debounceInterval;\n // prevent startAfter=0 during debouncing\n let startAfter = (singletonSeconds - Math.floor((now - slot) / 1000)) || 1;\n if (singletonSeconds > 1) {\n startAfter++;\n }\n return startAfter;\n }\n async fetch(name, options = {}) {\n Attorney.checkFetchArgs(name, options);\n const db = this.assertDb(options);\n const { table, policy, singletonsActive } = await this.getQueueCache(name);\n const fetchOptions = {\n ...options,\n schema: this.config.schema,\n table,\n name,\n policy,\n limit: options.batchSize || 1,\n ignoreSingletons: singletonsActive\n };\n const query = plans.fetchNextJob(fetchOptions);\n let result;\n try {\n result = await db.executeSql(query.text, query.values);\n }\n catch (err) {\n // errors from fetchquery should only be unique constraint violations\n }\n return result?.rows || [];\n }\n mapCompletionIdArg(id, funcName) {\n const errorMessage = `${funcName}() requires an id`;\n assert(id, errorMessage);\n const ids = Array.isArray(id) ? id : [id];\n assert(ids.length, errorMessage);\n return ids;\n }\n mapCompletionDataArg(data) {\n if (data === null || typeof data === 'undefined' || typeof data === 'function') {\n return null;\n }\n const result = (typeof data === 'object' && !Array.isArray(data))\n ? data\n : { value: data };\n return stringify(result);\n }\n mapCommandResponse(ids, result) {\n return {\n jobs: ids,\n requested: ids.length,\n affected: result && result.rows ? parseInt(result.rows[0].count) : 0\n };\n }\n async complete(name, id, data, options = {}) {\n Attorney.assertQueueName(name);\n const db = this.assertDb(options);\n const ids = this.mapCompletionIdArg(id, 'complete');\n const { table } = await this.getQueueCache(name);\n const sql = plans.completeJobs(this.config.schema, table, options.includeQueued);\n const result = await db.executeSql(sql, [name, ids, this.mapCompletionDataArg(data)]);\n return this.mapCommandResponse(ids, result);\n }\n async fail(name, id, data, options = {}) {\n Attorney.assertQueueName(name);\n const db = this.assertDb(options);\n const ids = this.mapCompletionIdArg(id, 'fail');\n const { table } = await this.getQueueCache(name);\n const sql = plans.failJobsById(this.config.schema, table);\n const result = await db.executeSql(sql, [name, ids, this.mapCompletionDataArg(data)]);\n return this.mapCommandResponse(ids, result);\n }\n async deleteJob(name, id, options = {}) {\n Attorney.assertQueueName(name);\n const db = this.assertDb(options);\n const ids = this.mapCompletionIdArg(id, 'deleteJob');\n const { table } = await this.getQueueCache(name);\n const sql = plans.deleteJobsById(this.config.schema, table);\n const result = await db.executeSql(sql, [name, ids]);\n return this.mapCommandResponse(ids, result);\n }\n async cancel(name, id, options = {}) {\n Attorney.assertQueueName(name);\n const db = this.assertDb(options);\n const ids = this.mapCompletionIdArg(id, 'cancel');\n const { table } = await this.getQueueCache(name);\n const sql = plans.cancelJobs(this.config.schema, table);\n const result = await db.executeSql(sql, [name, ids]);\n return this.mapCommandResponse(ids, result);\n }\n async resume(name, id, options = {}) {\n Attorney.assertQueueName(name);\n const db = this.assertDb(options);\n const ids = this.mapCompletionIdArg(id, 'resume');\n const { table } = await this.getQueueCache(name);\n const sql = plans.resumeJobs(this.config.schema, table);\n const result = await db.executeSql(sql, [name, ids]);\n return this.mapCommandResponse(ids, result);\n }\n async restore(name, id, options = {}) {\n Attorney.assertQueueName(name);\n const db = this.assertDb(options);\n const ids = this.mapCompletionIdArg(id, 'restore');\n const { table } = await this.getQueueCache(name);\n const sql = plans.restoreJobs(this.config.schema, table);\n await db.executeSql(sql, [name, ids]);\n }\n async retry(name, id, options = {}) {\n Attorney.assertQueueName(name);\n const db = options.db || this.db;\n const ids = this.mapCompletionIdArg(id, 'retry');\n const { table } = await this.getQueueCache(name);\n const sql = plans.retryJobs(this.config.schema, table);\n const result = await db.executeSql(sql, [name, ids]);\n return this.mapCommandResponse(ids, result);\n }\n async touch(name, id, options = {}) {\n Attorney.assertQueueName(name);\n const db = this.assertDb(options);\n const ids = this.mapCompletionIdArg(id, 'touch');\n const { table } = await this.getQueueCache(name);\n const sql = plans.touchJobs(this.config.schema, table);\n const result = await db.executeSql(sql, [name, ids]);\n return this.mapCommandResponse(ids, result);\n }\n async createQueue(name, options = {}) {\n name = name || options.name;\n Attorney.assertQueueName(name);\n const policy = options.policy || plans.QUEUE_POLICIES.standard;\n assert(policy in plans.QUEUE_POLICIES, `${policy} is not a valid queue policy`);\n Attorney.validateQueueArgs(options);\n if (options.deadLetter) {\n Attorney.assertQueueName(options.deadLetter);\n notStrictEqual(name, options.deadLetter, 'deadLetter cannot be itself');\n await this.getQueueCache(options.deadLetter);\n }\n const sql = plans.createQueue(this.config.schema, name, { ...options, policy });\n await this.db.executeSql(sql);\n }\n async getBlockedKeys(name) {\n Attorney.assertQueueName(name);\n const { table, policy } = await this.getQueueCache(name);\n if (policy !== plans.QUEUE_POLICIES.key_strict_fifo) {\n throw new Error(`getBlockedKeys is only available for ${plans.QUEUE_POLICIES.key_strict_fifo} queues`);\n }\n const sql = plans.getBlockedKeys(this.config.schema, table);\n const { rows } = await this.db.executeSql(sql, [name]);\n return rows.map(row => row.singletonKey);\n }\n async getQueues(names) {\n names = Array.isArray(names) ? names : typeof names === 'string' ? [names] : undefined;\n if (names) {\n for (const name of names) {\n Attorney.assertQueueName(name);\n }\n }\n const query = plans.getQueues(this.config.schema, names);\n const { rows } = await this.db.executeSql(query.text, query.values);\n return rows;\n }\n async updateQueue(name, options = {}) {\n Attorney.assertQueueName(name);\n assert(Object.keys(options).length > 0, 'no properties found to update');\n if ('policy' in options) {\n throw new Error('queue policy cannot be changed after creation');\n }\n if ('partition' in options) {\n throw new Error('queue partitioning cannot be changed after creation');\n }\n Attorney.validateQueueArgs(options);\n const { deadLetter } = options;\n if (deadLetter) {\n Attorney.assertQueueName(deadLetter);\n notStrictEqual(name, deadLetter, 'deadLetter cannot be itself');\n }\n const sql = plans.updateQueue(this.config.schema, { deadLetter });\n await this.db.executeSql(sql, [name, options]);\n }\n async getQueue(name) {\n Attorney.assertQueueName(name);\n const query = plans.getQueues(this.config.schema, [name]);\n const { rows } = await this.db.executeSql(query.text, query.values);\n return rows[0] || null;\n }\n async deleteQueue(name) {\n Attorney.assertQueueName(name);\n try {\n await this.getQueueCache(name);\n const sql = plans.deleteQueue(this.config.schema, name);\n await this.db.executeSql(sql);\n }\n catch { }\n }\n async deleteQueuedJobs(name) {\n Attorney.assertQueueName(name);\n const { table } = await this.getQueueCache(name);\n const sql = plans.deleteQueuedJobs(this.config.schema, table);\n await this.db.executeSql(sql, [name]);\n }\n async deleteStoredJobs(name) {\n Attorney.assertQueueName(name);\n const { table } = await this.getQueueCache(name);\n const sql = plans.deleteStoredJobs(this.config.schema, table);\n await this.db.executeSql(sql, [name]);\n }\n async deleteAllJobs(name) {\n if (!name) {\n const sql = plans.truncateTable(this.config.schema, 'job');\n await this.db.executeSql(sql);\n return;\n }\n Attorney.assertQueueName(name);\n const { table, partition } = await this.getQueueCache(name);\n if (partition) {\n const sql = plans.truncateTable(this.config.schema, table);\n await this.db.executeSql(sql);\n }\n else {\n const sql = plans.deleteAllJobs(this.config.schema, table);\n await this.db.executeSql(sql, [name]);\n }\n }\n async getQueueStats(name) {\n Attorney.assertQueueName(name);\n const queue = await this.getQueueCache(name);\n const query = plans.getQueueStats(this.config.schema, queue.table, [name]);\n const { rows } = await this.db.executeSql(query.text, query.values);\n return Object.assign(queue, rows.at(0) ||\n {\n deferredCount: 0,\n queuedCount: 0,\n activeCount: 0,\n totalCount: 0\n });\n }\n async getJobById(name, id, options = {}) {\n Attorney.assertQueueName(name);\n const db = this.assertDb(options);\n const { table } = await this.getQueueCache(name);\n const sql = plans.getJobById(this.config.schema, table);\n const result1 = await db.executeSql(sql, [name, id]);\n if (result1?.rows?.length === 1) {\n return result1.rows[0];\n }\n else {\n return null;\n }\n }\n async findJobs(name, options = {}) {\n Attorney.assertQueueName(name);\n const db = this.assertDb(options);\n const { table } = await this.getQueueCache(name);\n const { id, key, data, queued = false } = options;\n const sql = plans.findJobs(this.config.schema, table, {\n byId: id !== undefined,\n byKey: key !== undefined,\n byData: data !== undefined,\n queued\n });\n const values = [name];\n if (id !== undefined)\n values.push(id);\n if (key !== undefined)\n values.push(key);\n if (data !== undefined)\n values.push(JSON.stringify(data));\n const result = await db.executeSql(sql, values);\n return result?.rows || [];\n }\n assertDb(options) {\n if (options.db) {\n return options.db;\n }\n if (this.db._pgbdb) {\n assert(this.db.opened, 'Database connection is not opened');\n }\n return this.db;\n }\n}\nexport default Manager;\n","import EventEmitter from 'node:events';\nimport * as plans from \"./plans.js\";\nimport { delay, unwrapSQLResult } from \"./tools.js\";\nimport * as types from \"./types.js\";\nimport { emitAndPersistWarning } from \"./warning.js\";\nconst events = {\n error: 'error',\n warning: 'warning'\n};\nconst WARNINGS = {\n SLOW_QUERY: { seconds: 30, message: 'Warning: slow query. Your queues and/or database server should be reviewed' },\n LARGE_QUEUE: { size: 10_000, message: 'Warning: large queue backlog. Your queue should be reviewed' }\n};\nconst WARNING_TYPES = {\n SLOW_QUERY: 'slow_query',\n QUEUE_BACKLOG: 'queue_backlog'\n};\nclass Boss extends EventEmitter {\n #stopped;\n #stopping;\n #maintaining;\n #superviseInterval;\n #db;\n #config;\n #manager;\n events = events;\n constructor(db, manager, config) {\n super();\n this.#db = db;\n this.#config = config;\n this.#manager = manager;\n this.#stopped = true;\n this.#stopping = false;\n if (config.warningSlowQuerySeconds) {\n WARNINGS.SLOW_QUERY.seconds = config.warningSlowQuerySeconds;\n }\n if (config.warningQueueSize) {\n WARNINGS.LARGE_QUEUE.size = config.warningQueueSize;\n }\n }\n get maintaining() {\n return !!this.#maintaining;\n }\n async start() {\n if (this.#stopped) {\n this.#stopping = false;\n this.#superviseInterval = setInterval(() => this.#onSupervise(), this.#config.superviseIntervalSeconds * 1000);\n this.#stopped = false;\n }\n }\n async stop() {\n if (!this.#stopped) {\n this.#stopping = true;\n if (this.#superviseInterval)\n clearInterval(this.#superviseInterval);\n this.#stopped = true;\n while (this.#maintaining) {\n await delay(10);\n }\n }\n }\n get #warningContext() {\n return {\n emitter: this,\n db: this.#db,\n schema: this.#config.schema,\n persistWarnings: this.#config.persistWarnings,\n warningEvent: events.warning,\n errorEvent: events.error\n };\n }\n async #executeQuery(query) {\n if (typeof (query) === 'string') {\n query = { text: query, values: [] };\n }\n const started = Date.now();\n const result = unwrapSQLResult(await this.#db.executeSql(query.text, query.values));\n const elapsed = (Date.now() - started) / 1000;\n if (elapsed > WARNINGS.SLOW_QUERY.seconds ||\n this.#config.__test__warn_slow_query) {\n await emitAndPersistWarning(this.#warningContext, WARNING_TYPES.SLOW_QUERY, WARNINGS.SLOW_QUERY.message, { elapsed, sql: query.text, values: query.values });\n }\n return result;\n }\n async #onSupervise() {\n try {\n if (this.#stopped)\n return;\n if (this.#maintaining)\n return;\n if (this.#config.__test__throw_maint) {\n throw new Error(this.#config.__test__throw_maint);\n }\n this.#maintaining = true;\n if (this.#config.__test__delay_maint_ms) {\n await delay(this.#config.__test__delay_maint_ms);\n }\n const queues = await this.#manager.getQueues();\n !this.#stopped && (await this.supervise(queues));\n !this.#stopped && (await this.#maintainWarnings());\n }\n catch (err) {\n this.emit(events.error, err);\n }\n finally {\n this.#maintaining = false;\n }\n }\n async #maintainWarnings() {\n if (!this.#config.persistWarnings || !this.#config.warningRetentionDays) {\n return;\n }\n const sql = plans.deleteOldWarnings(this.#config.schema, this.#config.warningRetentionDays);\n await this.#executeQuery(sql);\n }\n async supervise(value) {\n let queues;\n if (Array.isArray(value)) {\n queues = value;\n }\n else {\n queues = await this.#manager.getQueues(value);\n }\n const queueGroups = queues.reduce((acc, q) => {\n const { table } = q;\n acc[table] = acc[table] || { table, queues: [] };\n acc[table].queues.push(q);\n return acc;\n }, {});\n const heartbeatQueueNames = new Set(queues.filter(q => q.heartbeatSeconds != null).map(q => q.name));\n for (const queueGroup of Object.values(queueGroups)) {\n if (this.#stopping)\n return;\n const { table, queues } = queueGroup;\n const names = queues.map((i) => i.name);\n while (names.length) {\n if (this.#stopping)\n return;\n const chunk = names.splice(0, 100);\n await this.#monitor(table, chunk, heartbeatQueueNames);\n await this.#maintain(table, chunk);\n }\n }\n }\n async #monitor(table, names, heartbeatQueueNames) {\n if (this.#stopping)\n return;\n const command = plans.trySetQueueMonitorTime(this.#config.schema, names, this.#config.monitorIntervalSeconds);\n const { rows } = await this.#executeQuery(command);\n if (this.#stopping)\n return;\n if (rows.length) {\n const queues = rows.map((q) => q.name);\n const cacheStatsSql = plans.cacheQueueStats(this.#config.schema, table, queues);\n const { rows: rowsCacheStats } = await this.#executeQuery(cacheStatsSql);\n if (this.#stopping)\n return;\n const warnings = rowsCacheStats.filter(i => i.queuedCount > (i.warningQueueSize || WARNINGS.LARGE_QUEUE.size));\n for (const warning of warnings) {\n await emitAndPersistWarning(this.#warningContext, WARNING_TYPES.QUEUE_BACKLOG, WARNINGS.LARGE_QUEUE.message, warning);\n }\n const sql = plans.failJobsByTimeout(this.#config.schema, table, queues);\n await this.#executeQuery(sql);\n if (this.#stopping)\n return;\n const heartbeatQueues = queues.filter(q => heartbeatQueueNames.has(q));\n if (heartbeatQueues.length) {\n const heartbeatSql = plans.failJobsByHeartbeat(this.#config.schema, table, heartbeatQueues);\n await this.#executeQuery(heartbeatSql);\n }\n }\n }\n async #maintain(table, names) {\n if (this.#stopping)\n return;\n const command = plans.trySetQueueDeletionTime(this.#config.schema, names, this.#config.maintenanceIntervalSeconds);\n const { rows } = await this.#executeQuery(command);\n if (this.#stopping)\n return;\n if (rows.length) {\n const queues = rows.map((q) => q.name);\n const sql = plans.deletion(this.#config.schema, table, queues);\n await this.#executeQuery(sql);\n }\n }\n}\nexport default Boss;\n","import EventEmitter from 'node:events';\nimport * as plans from \"./plans.js\";\nimport { delay } from \"./tools.js\";\nimport * as types from \"./types.js\";\nconst events = {\n error: 'error',\n bam: 'bam'\n};\nclass Bam extends EventEmitter {\n #stopped;\n #working;\n #pollInterval;\n #db;\n #config;\n events = events;\n constructor(db, config) {\n super();\n this.#db = db;\n this.#config = config;\n this.#stopped = true;\n this.#working = false;\n }\n get working() {\n return this.#working;\n }\n async start() {\n if (!this.#stopped)\n return;\n this.#stopped = false;\n setImmediate(() => this.#onPoll());\n this.#pollInterval = setInterval(() => this.#onPoll(), this.#config.bamIntervalSeconds * 1000);\n }\n async stop() {\n if (this.#stopped)\n return;\n this.#stopped = true;\n if (this.#pollInterval) {\n clearInterval(this.#pollInterval);\n this.#pollInterval = undefined;\n }\n while (this.#working) {\n await delay(10);\n }\n }\n async #onPoll() {\n if (this.#stopped || this.#working || !this.#config.migrate)\n return;\n this.#working = true;\n try {\n if (this.#config.__test__throw_bam) {\n throw new Error(this.#config.__test__throw_bam);\n }\n if (this.#config.__test__delay_bam_ms) {\n await delay(this.#config.__test__delay_bam_ms);\n }\n const sql = plans.trySetBamTime(this.#config.schema, this.#config.bamIntervalSeconds);\n const { rows } = await this.#db.executeSql(sql);\n if (rows.length === 1) {\n await this.#processCommands();\n }\n }\n catch (err) {\n this.emit(events.error, err);\n }\n finally {\n this.#working = false;\n }\n }\n async #processCommands() {\n if (this.#stopped)\n return;\n const entry = await this.#getNextCommand();\n if (!entry || this.#stopped)\n return;\n this.emit(events.bam, {\n id: entry.id,\n name: entry.name,\n status: 'in_progress',\n queue: entry.queue,\n table: entry.table\n });\n try {\n await this.#db.executeSql(entry.command);\n if (this.#stopped)\n return;\n await this.#markCompleted(entry.id);\n this.emit(events.bam, {\n id: entry.id,\n name: entry.name,\n status: 'completed',\n queue: entry.queue,\n table: entry.table\n });\n }\n catch (err) {\n if (this.#stopped)\n return;\n await this.#markFailed(entry.id, err);\n this.emit(events.error, err);\n this.emit(events.bam, {\n id: entry.id,\n name: entry.name,\n status: 'failed',\n queue: entry.queue,\n table: entry.table,\n error: String(err)\n });\n }\n }\n async #getNextCommand() {\n const sql = plans.getNextBamCommand(this.#config.schema);\n const { rows } = await this.#db.executeSql(sql);\n return rows[0] || null;\n }\n async #markCompleted(id) {\n const sql = plans.setBamCompleted(this.#config.schema, id);\n await this.#db.executeSql(sql);\n }\n async #markFailed(id, error) {\n const sql = plans.setBamFailed(this.#config.schema, id, String(error));\n await this.#db.executeSql(sql);\n }\n}\nexport default Bam;\n","import EventEmitter from 'node:events';\nimport pg from 'pg';\nimport assert from 'node:assert';\nclass Db extends EventEmitter {\n pool;\n config;\n /** @internal */\n _pgbdb;\n opened;\n constructor(config) {\n super();\n config.application_name = config.application_name || 'pgboss';\n config.connectionTimeoutMillis = config.connectionTimeoutMillis || 10000;\n // config.maxUses = config.maxUses || 1000\n this.config = config;\n this._pgbdb = true;\n this.opened = false;\n }\n events = {\n error: 'error'\n };\n async open() {\n this.pool = new pg.Pool(this.config);\n this.pool.on('error', error => this.emit('error', error));\n this.opened = true;\n }\n async close() {\n if (!this.pool.ending) {\n this.opened = false;\n await this.pool.end();\n }\n }\n async executeSql(text, values) {\n assert(this.opened, 'Database not opened. Call open() before executing SQL.');\n // if (this.config.debug === true) {\n // console.log(`${new Date().toISOString()}: DEBUG SQL`)\n // console.log(text)\n // if (values) {\n // console.log(`${new Date().toISOString()}: DEBUG VALUES`)\n // console.log(values)\n // }\n // }\n return await this.pool.query(text, values);\n }\n}\nexport default Db;\n","import EventEmitter from 'node:events';\nimport * as Attorney from \"./attorney.js\";\nimport Contractor from \"./contractor.js\";\nimport Manager from \"./manager.js\";\nimport Timekeeper from \"./timekeeper.js\";\nimport Boss from \"./boss.js\";\nimport Bam from \"./bam.js\";\nimport { delay } from \"./tools.js\";\nimport * as plans from \"./plans.js\";\nimport DbDefault from \"./db.js\";\nexport { JOB_STATES as states } from \"./plans.js\";\nexport { QUEUE_POLICIES as policies } from \"./plans.js\";\nexport const events = Object.freeze({\n error: 'error',\n warning: 'warning',\n wip: 'wip',\n stopped: 'stopped',\n bam: 'bam'\n});\nexport function getConstructionPlans(schema) {\n return Contractor.constructionPlans(schema);\n}\nexport function getMigrationPlans(schema, version) {\n return Contractor.migrationPlans(schema, version);\n}\nexport function getRollbackPlans(schema, version) {\n return Contractor.rollbackPlans(schema, version);\n}\nexport class PgBoss extends EventEmitter {\n #stoppingOn;\n #stopped;\n #starting;\n #started;\n #config;\n #db;\n #boss;\n #contractor;\n #manager;\n #timekeeper;\n #bam;\n constructor(value) {\n super();\n this.#stoppingOn = null;\n this.#stopped = true;\n const config = Attorney.getConfig(value);\n this.#config = config;\n const db = this.getDb();\n this.#db = db;\n if ('_pgbdb' in this.#db && this.#db._pgbdb) {\n this.#promoteEvents(this.#db);\n }\n const contractor = new Contractor(db, config);\n const manager = new Manager(db, config);\n const boss = new Boss(db, manager, config);\n const timekeeper = new Timekeeper(db, manager, config);\n manager.timekeeper = timekeeper;\n const bam = new Bam(db, config);\n this.#promoteEvents(manager);\n this.#promoteEvents(boss);\n this.#promoteEvents(timekeeper);\n this.#promoteEvents(bam);\n this.#boss = boss;\n this.#contractor = contractor;\n this.#manager = manager;\n this.#timekeeper = timekeeper;\n this.#bam = bam;\n }\n #promoteEvents(emitter) {\n for (const event of Object.values(emitter?.events)) {\n emitter.on(event, arg => this.emit(event, arg));\n }\n }\n async start() {\n if (this.#starting || this.#started) {\n return this;\n }\n this.#starting = true;\n if (this.#db._pgbdb && !this.#db.opened) {\n await this.#db.open();\n }\n if (this.#config.migrate) {\n await this.#contractor.start();\n }\n else {\n await this.#contractor.check();\n }\n await this.#manager.start();\n if (this.#config.supervise) {\n await this.#boss.start();\n }\n if (this.#config.schedule) {\n await this.#timekeeper.start();\n }\n if (this.#config.migrate) {\n await this.#bam.start();\n }\n this.#starting = false;\n this.#started = true;\n this.#stopped = false;\n return this;\n }\n async stop(options = {}) {\n if (this.#stoppingOn || this.#stopped) {\n return;\n }\n let { close = true, graceful = true, timeout = 30000 } = options;\n timeout = Math.max(timeout, 1000);\n this.#stoppingOn = Date.now();\n await this.#manager.stop();\n await this.#timekeeper.stop();\n await this.#boss.stop();\n await this.#bam.stop();\n const shutdown = async () => {\n await this.#manager.failWip();\n if (this.#db._pgbdb && this.#db.opened && close) {\n await this.#db.close();\n // Give event loop time to process socket closes\n await delay(10);\n }\n this.#stopped = true;\n this.#stoppingOn = null;\n this.#started = false;\n this.emit(events.stopped);\n };\n if (!graceful) {\n return await shutdown();\n }\n while ((Date.now() - this.#stoppingOn) < timeout && this.#manager.hasPendingCleanups()) {\n await delay(500);\n }\n await shutdown();\n }\n async send(...args) {\n return await this.#manager.send(...args);\n }\n async sendAfter(name, data, options, after) {\n return this.#manager.sendAfter(name, data, options, after);\n }\n sendThrottled(name, data, options, seconds, key) {\n return this.#manager.sendThrottled(name, data, options, seconds, key);\n }\n sendDebounced(name, data, options, seconds, key) {\n return this.#manager.sendDebounced(name, data, options, seconds, key);\n }\n insert(name, jobs, options) {\n return this.#manager.insert(name, jobs, options);\n }\n fetch(name, options = {}) {\n return this.#manager.fetch(name, options);\n }\n work(...args) {\n return this.#manager.work(...args);\n }\n offWork(name, options) {\n return this.#manager.offWork(name, options);\n }\n notifyWorker(workerId) {\n return this.#manager.notifyWorker(workerId);\n }\n subscribe(event, name) {\n return this.#manager.subscribe(event, name);\n }\n unsubscribe(event, name) {\n return this.#manager.unsubscribe(event, name);\n }\n publish(event, data, options) {\n return this.#manager.publish(event, data, options);\n }\n cancel(name, id, options) {\n return this.#manager.cancel(name, id, options);\n }\n resume(name, id, options) {\n return this.#manager.resume(name, id, options);\n }\n retry(name, id, options) {\n return this.#manager.retry(name, id, options);\n }\n deleteJob(name, id, options) {\n return this.#manager.deleteJob(name, id, options);\n }\n deleteQueuedJobs(name) {\n return this.#manager.deleteQueuedJobs(name);\n }\n deleteStoredJobs(name) {\n return this.#manager.deleteStoredJobs(name);\n }\n deleteAllJobs(name) {\n return this.#manager.deleteAllJobs(name);\n }\n complete(name, id, data, options) {\n return this.#manager.complete(name, id, data, options);\n }\n fail(name, id, data, options) {\n return this.#manager.fail(name, id, data, options);\n }\n touch(name, id, options) {\n return this.#manager.touch(name, id, options);\n }\n /**\n * @deprecated Use findJobs() instead\n */\n getJobById(name, id, options) {\n return this.#manager.getJobById(name, id, options);\n }\n findJobs(name, options) {\n return this.#manager.findJobs(name, options);\n }\n createQueue(name, options) {\n return this.#manager.createQueue(name, options);\n }\n getBlockedKeys(name) {\n return this.#manager.getBlockedKeys(name);\n }\n updateQueue(name, options) {\n return this.#manager.updateQueue(name, options);\n }\n deleteQueue(name) {\n return this.#manager.deleteQueue(name);\n }\n getQueues(names) {\n return this.#manager.getQueues();\n }\n getQueue(name) {\n return this.#manager.getQueue(name);\n }\n getQueueStats(name) {\n return this.#manager.getQueueStats(name);\n }\n isMaintaining() {\n return this.#boss.maintaining;\n }\n isBamWorking() {\n return this.#bam.working;\n }\n isCheckingSkew() {\n return this.#timekeeper.checkingSkew;\n }\n supervise(name) {\n return this.#boss.supervise(name);\n }\n getWipData(options) {\n return this.#manager.getWipData(options);\n }\n getSpy(name) {\n return this.#manager.getSpy(name);\n }\n clearSpies() {\n this.#manager.clearSpies();\n }\n isInstalled() {\n return this.#contractor.isInstalled();\n }\n schemaVersion() {\n return this.#contractor.schemaVersion();\n }\n schedule(name, cron, data, options) {\n return this.#timekeeper.schedule(name, cron, data, options);\n }\n unschedule(name, key) {\n return this.#timekeeper.unschedule(name, key);\n }\n getSchedules(name, key) {\n return this.#timekeeper.getSchedules(name, key);\n }\n async getBamStatus() {\n const sql = plans.getBamStatus(this.#config.schema);\n const { rows } = await this.#db.executeSql(sql);\n return rows;\n }\n async getBamEntries() {\n const sql = plans.getBamEntries(this.#config.schema);\n const { rows } = await this.#db.executeSql(sql);\n return rows;\n }\n getDb() {\n if (this.#db) {\n return this.#db;\n }\n if (this.#config.db) {\n return this.#config.db;\n }\n return new DbDefault(this.#config);\n }\n}\nexport { fromKnex, fromKysely, fromDrizzle, fromPrisma, } from \"./adapters/index.js\";\n","import { n as DEFAULT_RETRY_DELAY_MS, r as retryDelayMs, t as defineSchedulerPlugin } from \"./contract-E1QJBH6_.mjs\";\nimport { DEFAULT_DATABASE_URL, claimDueTriggerSchedules, claimDueTriggerSchedulesForOrg, claimNextJob, createPostgresCancelChannel as createPgCancelChannel, disableAllTriggerSchedules, disableTriggerSchedulesNotInSlugs, enqueueJob, failWorkflowRun, getProjectScopeId, inferDialect, markJobComplete, markJobFailed, requeueExpiredLeases, resolvePostgresUrlFromEnv, resolveProjectDatabaseUrlFromEnv, scheduleJobRetry, selectActiveEphemeralScheduledAttachmentSlugs, selectTriggerScheduleBySlug, upsertTriggerSchedule } from \"@keystrokehq/database\";\nimport { nextTriggerRunAt, resolveCronSchedule } from \"@keystrokehq/trigger\";\nimport { EventEmitter } from \"node:events\";\nimport { PgBoss } from \"pg-boss\";\nimport { createHash } from \"node:crypto\";\n//#region src/schedule-ticker.ts\nfunction enqueueTriggerJob(jobQueue, row, scheduledAt) {\n\tconst input = {\n\t\tkind: \"trigger\",\n\t\ttargetId: row.attachmentSlug,\n\t\trunId: crypto.randomUUID(),\n\t\ttrigger: row.kind,\n\t\tpayload: {},\n\t\tprojectId: row.projectId\n\t};\n\tif (scheduledAt) input.scheduledAt = scheduledAt;\n\treturn jobQueue.enqueue(input);\n}\nasync function claimDue(scope, asOf, resolveNextRunAt, limit) {\n\tif (scope === \"organization\") return claimDueTriggerSchedulesForOrg(asOf, resolveNextRunAt, limit);\n\treturn claimDueTriggerSchedules(asOf, resolveNextRunAt, limit).then((rows) => rows.map((row) => ({\n\t\t...row,\n\t\tprojectId: getProjectScopeId()\n\t})));\n}\nfunction createScheduleTicker(ctx) {\n\tconst pollIntervalMs = ctx.pollIntervalMs ?? 1e3;\n\tconst batchSize = ctx.batchSize ?? 10;\n\tasync function fireDueSchedules(asOf = /* @__PURE__ */ new Date()) {\n\t\tconst claimed = await claimDue(ctx.scope ?? \"project\", asOf, (schedule) => nextTriggerRunAt(schedule, asOf), batchSize);\n\t\tfor (const row of claimed) await enqueueTriggerJob(ctx.jobQueue, row, asOf);\n\t\treturn claimed.length;\n\t}\n\tasync function startScheduleTicker(options = {}) {\n\t\tconst intervalMs = options.pollIntervalMs ?? pollIntervalMs;\n\t\tconst limit = options.batchSize ?? batchSize;\n\t\tconst scope = options.scope ?? ctx.scope ?? \"project\";\n\t\tlet running = true;\n\t\tconst loop = async () => {\n\t\t\twhile (running) {\n\t\t\t\ttry {\n\t\t\t\t\tconst claimed = await claimDue(scope, /* @__PURE__ */ new Date(), (schedule) => nextTriggerRunAt(schedule, /* @__PURE__ */ new Date()), limit);\n\t\t\t\t\tfor (const row of claimed) await enqueueTriggerJob(ctx.jobQueue, row);\n\t\t\t\t} catch {}\n\t\t\t\tawait sleep$1(intervalMs);\n\t\t\t}\n\t\t};\n\t\tloop();\n\t\treturn async () => {\n\t\t\trunning = false;\n\t\t};\n\t}\n\treturn {\n\t\tfireDueSchedules,\n\t\tstartScheduleTicker\n\t};\n}\nfunction sleep$1(ms) {\n\treturn new Promise((resolve) => setTimeout(resolve, ms));\n}\n//#endregion\n//#region src/cancel-channel.ts\n/** In-process cancel pub/sub for single-process queues (memory, db polling). */\nfunction createInProcessCancelChannel() {\n\tconst emitter = new EventEmitter();\n\treturn {\n\t\tasync publishCancel(runId) {\n\t\t\temitter.emit(\"cancel\", runId);\n\t\t},\n\t\tasync subscribeCancel(handler) {\n\t\t\tconst listener = (runId) => {\n\t\t\t\thandler(runId);\n\t\t\t};\n\t\t\temitter.on(\"cancel\", listener);\n\t\t\treturn async () => {\n\t\t\t\temitter.off(\"cancel\", listener);\n\t\t\t};\n\t\t}\n\t};\n}\n//#endregion\n//#region src/database-queue.ts\nfunction toJobPayload(job) {\n\treturn {\n\t\tjobId: job.id,\n\t\tkind: job.kind,\n\t\ttargetId: job.targetId,\n\t\trunId: job.runId,\n\t\ttrigger: job.trigger,\n\t\tpayload: job.payload,\n\t\tattempt: job.attempt,\n\t\tmaxAttempts: job.maxAttempts,\n\t\tscheduledAt: job.scheduledAt\n\t};\n}\nfunction createDatabaseJobQueue() {\n\tconst cancelChannel = createInProcessCancelChannel();\n\treturn {\n\t\tasync enqueue(input) {\n\t\t\treturn enqueueJob(input);\n\t\t},\n\t\tasync startWorker(handler, options = {}) {\n\t\t\tconst workerId = options.workerId ?? crypto.randomUUID();\n\t\t\tconst pollIntervalMs = options.pollIntervalMs ?? 250;\n\t\t\tconst leaseSweepIntervalMs = options.leaseSweepIntervalMs ?? 3e4;\n\t\t\tlet running = true;\n\t\t\tconst leaseTimer = setInterval(() => {\n\t\t\t\trequeueExpiredLeases();\n\t\t\t}, leaseSweepIntervalMs);\n\t\t\tconst loop = async () => {\n\t\t\t\twhile (running) try {\n\t\t\t\t\tconst job = await claimNextJob(workerId);\n\t\t\t\t\tif (!job) {\n\t\t\t\t\t\tawait sleep(pollIntervalMs);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait handler(toJobPayload(job));\n\t\t\t\t\t\tawait markJobComplete(job.id);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (job.attempt < job.maxAttempts) await scheduleJobRetry(job.id, job.attempt + 1, retryDelayMs(job.attempt));\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tawait markJobFailed(job.id, error);\n\t\t\t\t\t\t\tif (job.kind === \"workflow\") await failWorkflowRun(job.runId, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\tawait sleep(pollIntervalMs);\n\t\t\t\t}\n\t\t\t};\n\t\t\tloop();\n\t\t\treturn async () => {\n\t\t\t\trunning = false;\n\t\t\t\tclearInterval(leaseTimer);\n\t\t\t};\n\t\t},\n\t\tpublishCancel: (runId) => cancelChannel.publishCancel(runId),\n\t\tsubscribeCancel: (handler) => cancelChannel.subscribeCancel(handler)\n\t};\n}\nfunction sleep(ms) {\n\treturn new Promise((resolve) => setTimeout(resolve, ms));\n}\n//#endregion\n//#region src/pg-boss-client.ts\nlet boss;\nfunction resolveDatabaseUrl(url) {\n\tconst resolved = url ?? resolvePostgresUrlFromEnv(process.env);\n\tif (!resolved) throw new Error(\"DATABASE_URL or POSTGRES_HOST/POSTGRES_USER/POSTGRES_PASSWORD/POSTGRES_DB is required\");\n\treturn resolved;\n}\nasync function startPgBoss(url) {\n\tif (boss) return boss;\n\tconst next = new PgBoss({\n\t\tconnectionString: resolveDatabaseUrl(url),\n\t\tschema: \"pgboss\"\n\t});\n\tnext.on(\"error\", (error) => {\n\t\tconsole.error(\"[pg-boss]\", error);\n\t});\n\tawait next.start();\n\tboss = next;\n\treturn next;\n}\nfunction getPgBoss() {\n\tif (!boss) throw new Error(\"PgBoss not started. Call startPgBoss() first.\");\n\treturn boss;\n}\nasync function stopPgBoss() {\n\tif (!boss) return;\n\tawait boss.stop();\n\tboss = void 0;\n}\n//#endregion\n//#region src/pg-cancel-channel.ts\n/** Postgres NOTIFY channel — lowercase identifier (project ids are UUIDs, well under 63 chars). */\nfunction pgCancelChannelName(scope, id) {\n\tif (scope === \"platform\") return \"keystroke_cancel_platform\";\n\tif (scope === \"organization\") return `keystroke_cancel_org_${(id ?? \"default\").replace(/[^a-z0-9_]/gi, \"_\").toLowerCase()}`;\n\treturn `keystroke_cancel_${(id ?? \"default\").replace(/[^a-z0-9_]/gi, \"_\").toLowerCase()}`;\n}\n//#endregion\n//#region src/pg-boss-queue.ts\n/** Shared queue name for the platform control-plane scope. */\nconst DEFAULT_QUEUE_NAME = \"keystroke\";\nconst PGBOSS_SCHEMA = \"pgboss\";\n/**\n* Derive a per-project pg-boss queue name. pg-boss queue names must be <= 50\n* chars, contain only [A-Za-z0-9_], and not start with a digit. Project ids are\n* usually UUIDs (hyphens, may start with a digit), so we sanitize, and fall back\n* to a hash when the sanitized name would exceed the length limit.\n*/\nfunction pgBossProjectQueueName(projectId) {\n\tconst name = `${DEFAULT_QUEUE_NAME}_${projectId.replace(/[^a-zA-Z0-9_]/g, \"_\")}`;\n\tif (name.length <= 50) return name;\n\treturn `${DEFAULT_QUEUE_NAME}_${createHash(\"sha1\").update(projectId).digest(\"hex\").slice(0, 40)}`;\n}\nfunction pgBossOrgQueueName(organizationId) {\n\tconst name = `${DEFAULT_QUEUE_NAME}_org_${organizationId.replace(/[^a-zA-Z0-9_]/g, \"_\")}`;\n\tif (name.length <= 50) return name;\n\treturn `${DEFAULT_QUEUE_NAME}_org_${createHash(\"sha1\").update(organizationId).digest(\"hex\").slice(0, 36)}`;\n}\nfunction buildPgBossJobQueue(boss, options) {\n\tconst queueName = options.queueName ?? \"keystroke\";\n\tconst cancelChannel = createPgCancelChannel(options.connectionString, pgCancelChannelName(options.cancelScope ?? \"platform\", options.cancelScope === \"organization\" ? options.organizationId : options.projectId));\n\treturn {\n\t\tasync enqueue(input) {\n\t\t\tconst jobId = await boss.send(queueName, {\n\t\t\t\t...input,\n\t\t\t\tpayload: input.payload\n\t\t\t}, {\n\t\t\t\tretryLimit: (input.maxAttempts ?? 3) - 1,\n\t\t\t\tretryDelay: Math.ceil(retryDelayMs(1) / 1e3),\n\t\t\t\tstartAfter: input.scheduledAt,\n\t\t\t\tsingletonKey: input.dedupeKey\n\t\t\t});\n\t\t\tif (!jobId) {\n\t\t\t\tif (input.dedupeKey) return input.dedupeKey;\n\t\t\t\tthrow new Error(\"Failed to enqueue job\");\n\t\t\t}\n\t\t\treturn jobId;\n\t\t},\n\t\tasync startWorker(handler) {\n\t\t\tlet stopped = false;\n\t\t\tconst workerId = await boss.work(queueName, {\n\t\t\t\tbatchSize: 1,\n\t\t\t\tincludeMetadata: true\n\t\t\t}, async (jobs) => {\n\t\t\t\tif (stopped) return;\n\t\t\t\tconst job = jobs[0];\n\t\t\t\tif (!job) return;\n\t\t\t\tconst data = job.data;\n\t\t\t\tconst maxAttempts = data.maxAttempts ?? (job.retryLimit ?? 0) + 1;\n\t\t\t\tconst attempt = (job.retryCount ?? 0) + 1;\n\t\t\t\tawait handler({\n\t\t\t\t\tjobId: job.id,\n\t\t\t\t\tkind: data.kind,\n\t\t\t\t\ttargetId: data.targetId,\n\t\t\t\t\trunId: data.runId,\n\t\t\t\t\ttrigger: data.trigger,\n\t\t\t\t\tpayload: data.payload ?? {},\n\t\t\t\t\tattempt,\n\t\t\t\t\tmaxAttempts,\n\t\t\t\t\texhaustedRetries: attempt >= maxAttempts,\n\t\t\t\t\tscheduledAt: data.scheduledAt ? new Date(data.scheduledAt) : /* @__PURE__ */ new Date(),\n\t\t\t\t\tprojectId: data.projectId\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn async () => {\n\t\t\t\tstopped = true;\n\t\t\t\tawait boss.offWork(queueName, { id: workerId });\n\t\t\t\tif (options.stopBossOnWorkerStop) await boss.stop({\n\t\t\t\t\tgraceful: true,\n\t\t\t\t\ttimeout: 5e3\n\t\t\t\t});\n\t\t\t};\n\t\t},\n\t\tpublishCancel: (runId) => cancelChannel.publishCancel(runId),\n\t\tsubscribeCancel: (handler) => cancelChannel.subscribeCancel(handler)\n\t};\n}\nasync function createPgBossQueue(options) {\n\tconst queueName = options.queueName ?? \"keystroke\";\n\tconst boss = new PgBoss({\n\t\tconnectionString: options.connectionString,\n\t\tschema: PGBOSS_SCHEMA\n\t});\n\tawait boss.start();\n\tawait boss.createQueue(queueName);\n\treturn buildPgBossJobQueue(boss, {\n\t\tstopBossOnWorkerStop: true,\n\t\tqueueName,\n\t\tconnectionString: options.connectionString,\n\t\tcancelScope: options.cancelScope ?? \"project\",\n\t\tprojectId: options.projectId,\n\t\torganizationId: options.organizationId\n\t});\n}\nasync function createSharedPgBossJobQueue(boss, options) {\n\tconst queueName = options.queueName ?? \"keystroke\";\n\tawait boss.createQueue(queueName);\n\treturn buildPgBossJobQueue(boss, {\n\t\tqueueName,\n\t\tconnectionString: options.connectionString,\n\t\tcancelScope: \"platform\"\n\t});\n}\n//#endregion\n//#region src/plugin.ts\nfunction resolveUrl(ctx) {\n\treturn ctx.url ?? resolveProjectDatabaseUrlFromEnv(process.env) ?? DEFAULT_DATABASE_URL;\n}\n/** Postgres pg-boss backend. Platform scope shares one queue; org scope gets one queue per org. */\nfunction pgBossSchedulerPlugin() {\n\treturn defineSchedulerPlugin({\n\t\tname: \"pg-boss\",\n\t\tasync createJobQueue(ctx) {\n\t\t\tconst url = resolveUrl(ctx);\n\t\t\tif (ctx.scope === \"platform\") {\n\t\t\t\tawait startPgBoss(url);\n\t\t\t\treturn createSharedPgBossJobQueue(getPgBoss(), { connectionString: url });\n\t\t\t}\n\t\t\tif (ctx.scope === \"organization\") {\n\t\t\t\tconst organizationId = ctx.organizationId;\n\t\t\t\tif (!organizationId) throw new Error(\"organizationId is required for organization-scoped pg-boss queue\");\n\t\t\t\treturn createPgBossQueue({\n\t\t\t\t\tconnectionString: url,\n\t\t\t\t\tqueueName: pgBossOrgQueueName(organizationId),\n\t\t\t\t\tcancelScope: \"organization\",\n\t\t\t\t\torganizationId\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst projectId = ctx.projectId ?? getProjectScopeId();\n\t\t\treturn createPgBossQueue({\n\t\t\t\tconnectionString: url,\n\t\t\t\tqueueName: pgBossProjectQueueName(projectId),\n\t\t\t\tprojectId\n\t\t\t});\n\t\t}\n\t});\n}\n/** DB-table queue (Drizzle `jobs`), for SQLite / self-host. */\nfunction pollingSchedulerPlugin() {\n\treturn defineSchedulerPlugin({\n\t\tname: \"polling\",\n\t\tasync createJobQueue() {\n\t\t\treturn createDatabaseJobQueue();\n\t\t}\n\t});\n}\n/** Auto-selects pg-boss (postgres) or polling (sqlite) by dialect. */\nfunction defaultSchedulerPlugin() {\n\treturn defineSchedulerPlugin({\n\t\tname: \"default\",\n\t\tasync createJobQueue(ctx) {\n\t\t\tif (inferDialect(resolveUrl(ctx), ctx.dialect) === \"postgres\") return pgBossSchedulerPlugin().createJobQueue(ctx);\n\t\t\treturn pollingSchedulerPlugin().createJobQueue(ctx);\n\t\t}\n\t});\n}\n//#endregion\n//#region src/resolve-schedule.ts\nfunction resolveTriggerSchedule(attachmentKey, schedule, overrides) {\n\treturn resolveCronSchedule(attachmentKey, schedule, {\n\t\tcronScheduleOverride: overrides?.global,\n\t\tattachmentScheduleOverrides: overrides?.byAttachment\n\t});\n}\n//#endregion\n//#region src/sync-trigger-schedules.ts\nasync function syncTriggerSchedules(options) {\n\tconst now = /* @__PURE__ */ new Date();\n\tconst projectSlugs = options.schedules.map((schedule) => schedule.attachmentKey);\n\tconst ephemeralSlugs = await selectActiveEphemeralScheduledAttachmentSlugs();\n\tconst slugs = [...projectSlugs, ...ephemeralSlugs];\n\tif (slugs.length === 0) {\n\t\tawait disableAllTriggerSchedules(now);\n\t\treturn;\n\t}\n\tawait disableTriggerSchedulesNotInSlugs(slugs, now);\n\tfor (const spec of options.schedules) {\n\t\tconst schedule = resolveTriggerSchedule(spec.attachmentKey, spec.schedule, options.scheduleOverrides);\n\t\tconst existing = await selectTriggerScheduleBySlug(spec.attachmentKey);\n\t\tconst scheduleChanged = existing?.schedule !== schedule;\n\t\tconst nextRunAt = existing && !scheduleChanged && existing.enabled === 1 ? existing.nextRunAt : nextTriggerRunAt(schedule, now);\n\t\tawait upsertTriggerSchedule({\n\t\t\tattachmentSlug: spec.attachmentKey,\n\t\t\tkind: spec.kind,\n\t\t\tschedule,\n\t\t\tnextRunAt,\n\t\t\tenabled: true,\n\t\t\tupdatedAt: now\n\t\t});\n\t}\n}\n//#endregion\n//#region src/create-scheduler.ts\nasync function createUnderlyingJobQueue(options = {}) {\n\tif (options.adapter) return options.adapter;\n\treturn (options.plugin ?? defaultSchedulerPlugin()).createJobQueue({\n\t\tscope: options.scope ?? \"project\",\n\t\turl: options.url,\n\t\tdialect: options.dialect,\n\t\tprojectId: options.projectId,\n\t\torganizationId: options.organizationId\n\t});\n}\nfunction wrapScheduler(jobQueue, scope) {\n\tconst ticker = createScheduleTicker({\n\t\tjobQueue,\n\t\tscope\n\t});\n\treturn {\n\t\tenqueue: (input) => jobQueue.enqueue(input),\n\t\tstartWorker: (handler, options) => jobQueue.startWorker(handler, options),\n\t\tpublishCancel: (runId) => jobQueue.publishCancel(runId),\n\t\tsubscribeCancel: (handler) => jobQueue.subscribeCancel(handler),\n\t\tsyncTriggerSchedules: (options) => syncTriggerSchedules(options),\n\t\tstartScheduleTicker: (options) => ticker.startScheduleTicker(options),\n\t\tfireDueSchedules: (asOf) => ticker.fireDueSchedules(asOf)\n\t};\n}\nasync function createScheduler(options = {}) {\n\treturn wrapScheduler(await createUnderlyingJobQueue(options), options.scope === \"organization\" ? \"organization\" : \"project\");\n}\nasync function createJobQueue(options = {}) {\n\treturn createUnderlyingJobQueue(options);\n}\nfunction wrapJobQueueAsScheduler(jobQueue, scope) {\n\treturn wrapScheduler(jobQueue, scope);\n}\n//#endregion\n//#region src/memory.ts\nfunction createMemoryJobQueue(options = {}) {\n\tconst cancelChannel = createInProcessCancelChannel();\n\tconst pending = [];\n\tlet handler;\n\tlet draining = false;\n\tasync function drain() {\n\t\tif (!handler || draining) return;\n\t\tdraining = true;\n\t\ttry {\n\t\t\twhile (pending.length > 0) {\n\t\t\t\tconst next = pending.shift();\n\t\t\t\tif (!next) break;\n\t\t\t\tconst input = next.input;\n\t\t\t\tawait handler({\n\t\t\t\t\tjobId: next.id,\n\t\t\t\t\tkind: input.kind,\n\t\t\t\t\ttargetId: input.targetId,\n\t\t\t\t\trunId: input.runId,\n\t\t\t\t\ttrigger: input.trigger,\n\t\t\t\t\tpayload: input.payload ?? {},\n\t\t\t\t\tattempt: input.attempt ?? 1,\n\t\t\t\t\tmaxAttempts: input.maxAttempts ?? 3,\n\t\t\t\t\tscheduledAt: input.scheduledAt ?? next.enqueuedAt\n\t\t\t\t});\n\t\t\t}\n\t\t} finally {\n\t\t\tdraining = false;\n\t\t}\n\t}\n\treturn {\n\t\tasync enqueue(input) {\n\t\t\tconst id = crypto.randomUUID();\n\t\t\tpending.push({\n\t\t\t\tid,\n\t\t\t\tinput,\n\t\t\t\tenqueuedAt: /* @__PURE__ */ new Date()\n\t\t\t});\n\t\t\tif (options.sync) await drain();\n\t\t\treturn id;\n\t\t},\n\t\tasync startWorker(nextHandler, _opts = {}) {\n\t\t\thandler = nextHandler;\n\t\t\tif (!options.sync) drain();\n\t\t\treturn async () => {\n\t\t\t\thandler = void 0;\n\t\t\t};\n\t\t},\n\t\tpublishCancel: (runId) => cancelChannel.publishCancel(runId),\n\t\tsubscribeCancel: (handler) => cancelChannel.subscribeCancel(handler)\n\t};\n}\n//#endregion\n//#region src/shared-pgboss-queue.ts\nlet sharedJobQueue$1;\nasync function createSharedPgBossScheduler() {\n\treturn wrapJobQueueAsScheduler(await getSharedPgBossJobQueue());\n}\nasync function getSharedPgBossJobQueue() {\n\tif (sharedJobQueue$1) return sharedJobQueue$1;\n\tconst connectionString = resolvePostgresUrlFromEnv(process.env);\n\tif (!connectionString) throw new Error(\"Postgres connection string is required for shared pg-boss queue\");\n\tsharedJobQueue$1 = await createSharedPgBossJobQueue(getPgBoss(), { connectionString });\n\treturn sharedJobQueue$1;\n}\nfunction resetSharedPgBossJobQueueForTests() {\n\tsharedJobQueue$1 = void 0;\n}\n//#endregion\n//#region src/shared-scheduler.ts\nlet configuredPlugin;\nlet sharedJobQueue;\nfunction configureSharedScheduler(plugin) {\n\tconfiguredPlugin = plugin;\n\tsharedJobQueue = void 0;\n}\nasync function createSharedScheduler() {\n\tconst plugin = configuredPlugin ?? defaultSchedulerPlugin();\n\tif (plugin.name === \"default\") return createSharedPgBossScheduler();\n\tif (!sharedJobQueue) sharedJobQueue = await plugin.createJobQueue({ scope: \"platform\" });\n\treturn wrapJobQueueAsScheduler(sharedJobQueue);\n}\nfunction resetSharedSchedulerForTests() {\n\tconfiguredPlugin = void 0;\n\tsharedJobQueue = void 0;\n\tresetSharedPgBossJobQueueForTests();\n}\n//#endregion\nexport { DEFAULT_QUEUE_NAME, DEFAULT_RETRY_DELAY_MS, buildPgBossJobQueue, configureSharedScheduler, createJobQueue, createMemoryJobQueue, createScheduler, createSharedPgBossJobQueue, createSharedPgBossScheduler, createSharedScheduler, defaultSchedulerPlugin, defineSchedulerPlugin, getPgBoss, getSharedPgBossJobQueue, pgBossProjectQueueName, pgBossSchedulerPlugin, pollingSchedulerPlugin, resetSharedPgBossJobQueueForTests, resetSharedSchedulerForTests, retryDelayMs, startPgBoss, stopPgBoss, wrapJobQueueAsScheduler };\n\n//# sourceMappingURL=index.mjs.map","import { a as packDistTree, i as extractProjectArtifact, n as mergeFilteredArtifact, r as mergeStoredRouteManifest, t as packProjectArtifact } from \"./pack-artifact-NGxvGcXq.mjs\";\nimport { CreateBucketCommand, DeleteBucketCommand, DeleteObjectCommand, GetObjectCommand, HeadObjectCommand, ListObjectsV2Command, PutBucketAclCommand, PutBucketPolicyCommand, PutObjectCommand, S3Client } from \"@aws-sdk/client-s3\";\nimport { getSignedUrl } from \"@aws-sdk/s3-request-presigner\";\nimport { mkdtempSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { spawnSync } from \"node:child_process\";\nimport { tmpdir } from \"node:os\";\nimport { ROUTE_MANIFEST_REL_PATH } from \"@keystrokehq/shared\";\n//#region src/config.ts\nfunction readEnv$1(env, ...keys) {\n\tfor (const key of keys) {\n\t\tconst value = env[key]?.trim();\n\t\tif (value) return value;\n\t}\n}\nfunction requireEnv(env, keys) {\n\tconst candidates = Array.isArray(keys) ? keys : [keys];\n\tconst value = readEnv$1(env, ...candidates);\n\tif (!value) throw new Error(`${candidates[0]} is required`);\n\treturn value;\n}\n/** Admin S3 credentials for storage plugins (bucket is per-org, not from env). */\nfunction storageAdminConfigFromEnv(env = process.env) {\n\tconst accessKeyId = requireEnv(env, [\"STORAGE_ACCESS_KEY_ID\", \"AWS_ACCESS_KEY_ID\"]);\n\tconst secretAccessKey = requireEnv(env, [\"STORAGE_SECRET_ACCESS_KEY\", \"AWS_SECRET_ACCESS_KEY\"]);\n\tconst endpoint = requireEnv(env, [\n\t\t\"STORAGE_ENDPOINT\",\n\t\t\"AWS_ENDPOINT_URL_S3\",\n\t\t\"AWS_S3_ENDPOINT\"\n\t]);\n\treturn {\n\t\tregion: readEnv$1(env, \"STORAGE_REGION\", \"AWS_REGION\") ?? \"us-east-1\",\n\t\taccessKeyId,\n\t\tsecretAccessKey,\n\t\tendpoint,\n\t\tforcePathStyle: env.STORAGE_FORCE_PATH_STYLE === void 0 ? true : env.STORAGE_FORCE_PATH_STYLE === \"true\"\n\t};\n}\n/** Full client config including bucket — for integration tests and explicit bucket callers. */\nfunction storageConfigFromEnv(env = process.env) {\n\tconst bucket = requireEnv(env, [\"STORAGE_BUCKET\", \"BUCKET_NAME\"]);\n\treturn {\n\t\t...storageAdminConfigFromEnv(env),\n\t\tbucket\n\t};\n}\n/** Endpoint for presigned URLs fetched inside project-server containers (e.g. `http://minio:9000`). */\nfunction containerPresignEndpointFromEnv(hostEndpoint, env = process.env) {\n\tconst override = readEnv$1(env, \"STORAGE_CONTAINER_ENDPOINT\");\n\tif (override) return override;\n\ttry {\n\t\tconst url = new URL(hostEndpoint);\n\t\tif (url.hostname === \"localhost\" || url.hostname === \"127.0.0.1\") {\n\t\t\tconst port = url.port || (url.protocol === \"https:\" ? \"443\" : \"9000\");\n\t\t\treturn `${url.protocol}//minio:${port}`;\n\t\t}\n\t} catch {}\n\treturn hostEndpoint;\n}\n//#endregion\n//#region src/create-storage.ts\nconst DEFAULT_PRESIGN_TTL_SECONDS = 900;\nfunction createStorage(config) {\n\tconst client = new S3Client(toClientConfig(config));\n\treturn {\n\t\tasync putObject(input) {\n\t\t\tawait client.send(new PutObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: input.key,\n\t\t\t\tBody: input.body,\n\t\t\t\tContentType: input.contentType\n\t\t\t}));\n\t\t},\n\t\tasync getObject(key) {\n\t\t\tconst response = await client.send(new GetObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: key\n\t\t\t}));\n\t\t\tif (!response.Body) throw new Error(`Object body missing for key ${key}`);\n\t\t\treturn response.Body.transformToByteArray();\n\t\t},\n\t\tasync headObject(key) {\n\t\t\ttry {\n\t\t\t\treturn { contentLength: (await client.send(new HeadObjectCommand({\n\t\t\t\t\tBucket: config.bucket,\n\t\t\t\t\tKey: key\n\t\t\t\t}))).ContentLength ?? 0 };\n\t\t\t} catch (error) {\n\t\t\t\tif (isNotFoundError(error)) return;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tasync presignGet(input) {\n\t\t\treturn getSignedUrl(client, new GetObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: input.key\n\t\t\t}), { expiresIn: input.expiresInSeconds ?? DEFAULT_PRESIGN_TTL_SECONDS });\n\t\t},\n\t\tasync presignPut(input) {\n\t\t\treturn getSignedUrl(client, new PutObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: input.key,\n\t\t\t\tContentType: input.contentType ?? \"application/gzip\"\n\t\t\t}), { expiresIn: input.expiresInSeconds ?? DEFAULT_PRESIGN_TTL_SECONDS });\n\t\t},\n\t\tasync deleteObject(key) {\n\t\t\tawait client.send(new DeleteObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: key\n\t\t\t}));\n\t\t},\n\t\tasync listObjects(prefix) {\n\t\t\tconst keys = [];\n\t\t\tlet continuationToken;\n\t\t\tdo {\n\t\t\t\tconst response = await client.send(new ListObjectsV2Command({\n\t\t\t\t\tBucket: config.bucket,\n\t\t\t\t\tPrefix: prefix,\n\t\t\t\t\tContinuationToken: continuationToken\n\t\t\t\t}));\n\t\t\t\tfor (const object of response.Contents ?? []) if (object.Key) keys.push(object.Key);\n\t\t\t\tcontinuationToken = response.IsTruncated ? response.NextContinuationToken : void 0;\n\t\t\t} while (continuationToken);\n\t\t\treturn keys;\n\t\t}\n\t};\n}\n/** Presign URLs for project-server containers using `STORAGE_CONTAINER_ENDPOINT` when set. */\nfunction createContainerPresignStorage(config, env = process.env) {\n\treturn createStorage({\n\t\t...config,\n\t\tendpoint: containerPresignEndpointFromEnv(config.endpoint, env)\n\t});\n}\nfunction toClientConfig(config) {\n\treturn {\n\t\tregion: config.region,\n\t\tcredentials: {\n\t\t\taccessKeyId: config.accessKeyId,\n\t\t\tsecretAccessKey: config.secretAccessKey\n\t\t},\n\t\tendpoint: config.endpoint,\n\t\tforcePathStyle: config.forcePathStyle\n\t};\n}\nfunction isNotFoundError(error) {\n\tif (!error || typeof error !== \"object\") return false;\n\tconst name = \"name\" in error ? String(error.name) : \"\";\n\tconst status = \"$metadata\" in error ? error.$metadata : void 0;\n\treturn name === \"NotFound\" || name === \"NoSuchKey\" || status?.httpStatusCode === 404;\n}\n//#endregion\n//#region src/extract-route-manifest.ts\nvar RouteManifestNotFoundError = class extends Error {\n\tconstructor(message = `Route manifest missing in artifact (${ROUTE_MANIFEST_REL_PATH})`) {\n\t\tsuper(message);\n\t\tthis.name = \"RouteManifestNotFoundError\";\n\t}\n};\n/** Read `.keystroke/route-manifest.json` from a packed project artifact tarball. */\nfunction extractRouteManifestFromArtifact(archive) {\n\tconst tempDir = mkdtempSync(join(tmpdir(), \"keystroke-artifact-\"));\n\tconst archivePath = join(tempDir, \"artifact.tgz\");\n\ttry {\n\t\twriteFileSync(archivePath, archive);\n\t\tif (spawnSync(\"tar\", [\n\t\t\t\"-xzf\",\n\t\t\tarchivePath,\n\t\t\t\"-C\",\n\t\t\ttempDir,\n\t\t\tROUTE_MANIFEST_REL_PATH\n\t\t], { encoding: \"utf8\" }).status !== 0) throw new RouteManifestNotFoundError();\n\t\tconst raw = readFileSync(join(tempDir, ROUTE_MANIFEST_REL_PATH), \"utf8\");\n\t\treturn JSON.parse(raw);\n\t} catch (error) {\n\t\tif (error instanceof RouteManifestNotFoundError) throw error;\n\t\tthrow new RouteManifestNotFoundError(error instanceof Error ? error.message : \"Failed to extract route manifest\");\n\t} finally {\n\t\trmSync(tempDir, {\n\t\t\trecursive: true,\n\t\t\tforce: true\n\t\t});\n\t}\n}\n//#endregion\n//#region src/keys.ts\n/** Object key for a built project artifact tarball. */\nfunction projectArtifactKey(projectId, version) {\n\treturn `projects/${projectId}/artifacts/${version}.tgz`;\n}\n/**\n* Per-artifact source manifest (the deploy's file tree: path -> id + content\n* hash, plus resource refs). One per deploy.\n*/\nfunction projectSourceManifestKey(projectId, artifactId) {\n\treturn `projects/${projectId}/sources/${artifactId}/index.json`;\n}\nconst SHA256_HEX = /^[a-f0-9]{64}$/;\n/** True when `hash` is a lowercase hex sha256 digest (64 chars). */\nfunction isSourceBlobHash(hash) {\n\treturn SHA256_HEX.test(hash);\n}\n/**\n* Content-addressed key for a single source file's contents, deduped across all\n* of a project's deploys. `hash` is a lowercase hex sha256 of the file bytes.\n*/\nfunction projectSourceBlobKey(projectId, hash) {\n\tif (!isSourceBlobHash(hash)) throw new Error(\"Invalid source blob hash\");\n\treturn `projects/${projectId}/sources/blobs/${hash}`;\n}\nconst AVATAR_EXTENSION = /^[a-z0-9]+$/;\n/** Object key for a user's custom profile avatar in the shared keystroke-users bucket. */\nfunction userAvatarStorageKey(userId, extension) {\n\tconst ext = extension.replace(/^\\./, \"\").toLowerCase();\n\tif (!AVATAR_EXTENSION.test(ext)) throw new Error(\"Invalid avatar extension\");\n\treturn `avatars/${userId}/avatar.${ext}`;\n}\n/** True when `key` is the canonical avatar object for `userId`. */\nfunction isUserAvatarStorageKey(key, userId) {\n\tconst prefix = `avatars/${userId}/avatar.`;\n\tif (!key.startsWith(prefix)) return false;\n\tconst ext = key.slice(prefix.length);\n\treturn AVATAR_EXTENSION.test(ext);\n}\n/** Object key for an org logo in the shared keystroke-assets bucket. */\nfunction orgLogoStorageKey(organizationId, variant, extension) {\n\tconst ext = extension.replace(/^\\./, \"\").toLowerCase();\n\tif (!AVATAR_EXTENSION.test(ext)) throw new Error(\"Invalid org logo extension\");\n\treturn `org-logos/${organizationId}/logo-${variant}.${ext}`;\n}\n/** True when `key` is the canonical logo object for `organizationId` and `variant`. */\nfunction isOrgLogoStorageKey(key, organizationId, variant) {\n\tconst prefix = `org-logos/${organizationId}/logo-${variant}.`;\n\tif (!key.startsWith(prefix)) return false;\n\tconst ext = key.slice(prefix.length);\n\treturn AVATAR_EXTENSION.test(ext);\n}\n//#endregion\n//#region src/s3-errors.ts\nfunction isBucketAlreadyExistsError(error) {\n\tif (!error || typeof error !== \"object\") return false;\n\tconst name = \"name\" in error ? String(error.name) : \"\";\n\tconst code = \"Code\" in error ? String(error.Code) : \"\";\n\treturn name === \"BucketAlreadyOwnedByYou\" || code === \"BucketAlreadyOwnedByYou\" || name === \"BucketAlreadyExists\" || code === \"BucketAlreadyExists\";\n}\n//#endregion\n//#region src/asset-storage.ts\n/** Shared bucket for cross-org public assets (avatars, org sidebar logos). */\nconst KEYSTROKE_ASSETS_BUCKET = \"keystroke-assets\";\n/** Env var for the browser-facing origin of public asset objects (no trailing slash). */\nconst KEYSTROKE_ASSETS_PUBLIC_URL_BASE_ENV = \"KEYSTROKE_ASSETS_PUBLIC_URL_BASE\";\nconst KEYSTROKE_ASSETS_AVATAR_PREFIX = \"avatars/\";\nconst KEYSTROKE_ASSETS_ORG_LOGO_PREFIX = \"org-logos/\";\nfunction readEnv(env, key) {\n\treturn env[key]?.trim() || void 0;\n}\n/** Default path-style base when `KEYSTROKE_ASSETS_PUBLIC_URL_BASE` is unset (local MinIO). */\nfunction defaultKeystrokeAssetsPublicUrlBase(env = process.env) {\n\treturn `${storageAdminConfigFromEnv(env).endpoint.replace(/\\/+$/, \"\")}/${KEYSTROKE_ASSETS_BUCKET}`;\n}\n/** Public URL prefix for asset objects — configured base or local path-style default. */\nfunction keystrokeAssetsPublicUrlBase(env = process.env) {\n\tconst configured = readEnv(env, KEYSTROKE_ASSETS_PUBLIC_URL_BASE_ENV);\n\tif (configured) return configured.replace(/\\/+$/, \"\");\n\treturn defaultKeystrokeAssetsPublicUrlBase(env);\n}\nfunction keystrokeAssetsPublicUrlPrefixes(env = process.env) {\n\tconst prefixes = [keystrokeAssetsPublicUrlBase(env)];\n\tif (readEnv(env, \"KEYSTROKE_ASSETS_PUBLIC_URL_BASE\")) prefixes.push(defaultKeystrokeAssetsPublicUrlBase(env));\n\treturn [...new Set(prefixes)];\n}\nfunction createAssetsStorageClient(env = process.env) {\n\treturn createStorage({\n\t\t...storageAdminConfigFromEnv(env),\n\t\tbucket: KEYSTROKE_ASSETS_BUCKET\n\t});\n}\n/** Stable public URL for an object in the keystroke-assets bucket. */\nfunction publicKeystrokeAssetsObjectUrl(key, env = process.env) {\n\treturn `${keystrokeAssetsPublicUrlBase(env)}/${key}`;\n}\n/** Extract the object key from a public keystroke-assets URL when it matches `requiredPrefix`. */\nfunction keystrokeAssetsKeyFromPublicUrl(url, requiredPrefix, env = process.env) {\n\tfor (const prefix of keystrokeAssetsPublicUrlPrefixes(env)) {\n\t\tconst normalizedPrefix = `${prefix.replace(/\\/+$/, \"\")}/`;\n\t\tif (!url.startsWith(normalizedPrefix)) continue;\n\t\tconst key = decodeURIComponent(url.slice(normalizedPrefix.length).split(\"?\")[0] ?? \"\");\n\t\tif (key.startsWith(requiredPrefix)) return key;\n\t}\n\treturn null;\n}\nfunction isKeystrokeAssetsAvatarPublicUrl(url, env = process.env) {\n\treturn keystrokeAssetsKeyFromPublicUrl(url, KEYSTROKE_ASSETS_AVATAR_PREFIX, env) !== null;\n}\nfunction keystrokeAssetsAvatarKeyFromPublicUrl(url, env = process.env) {\n\treturn keystrokeAssetsKeyFromPublicUrl(url, KEYSTROKE_ASSETS_AVATAR_PREFIX, env);\n}\nfunction isKeystrokeAssetsOrgLogoPublicUrl(url, env = process.env) {\n\treturn keystrokeAssetsKeyFromPublicUrl(url, KEYSTROKE_ASSETS_ORG_LOGO_PREFIX, env) !== null;\n}\nfunction keystrokeAssetsOrgLogoKeyFromPublicUrl(url, env = process.env) {\n\treturn keystrokeAssetsKeyFromPublicUrl(url, KEYSTROKE_ASSETS_ORG_LOGO_PREFIX, env);\n}\nasync function ensureKeystrokeAssetsBucket(env = process.env) {\n\tconst adminConfig = storageAdminConfigFromEnv(env);\n\tconst adminClient = new S3Client({\n\t\tregion: adminConfig.region,\n\t\tcredentials: {\n\t\t\taccessKeyId: adminConfig.accessKeyId,\n\t\t\tsecretAccessKey: adminConfig.secretAccessKey\n\t\t},\n\t\tendpoint: adminConfig.endpoint,\n\t\tforcePathStyle: adminConfig.forcePathStyle\n\t});\n\tawait createAssetsBucketIfNeeded(adminClient, KEYSTROKE_ASSETS_BUCKET);\n\tawait applyPublicAssetsBucketAcl(adminClient, KEYSTROKE_ASSETS_BUCKET);\n\tawait applyPublicAssetsBucketPolicy(adminClient, KEYSTROKE_ASSETS_BUCKET);\n}\nasync function createAssetsBucketIfNeeded(adminClient, bucket) {\n\ttry {\n\t\tawait adminClient.send(new CreateBucketCommand({\n\t\t\tBucket: bucket,\n\t\t\tACL: \"public-read\"\n\t\t}));\n\t\treturn;\n\t} catch (error) {\n\t\tif (isBucketAlreadyExistsError(error)) return;\n\t}\n\ttry {\n\t\tawait adminClient.send(new CreateBucketCommand({ Bucket: bucket }));\n\t} catch (error) {\n\t\tif (!isBucketAlreadyExistsError(error)) throw error;\n\t}\n}\nasync function applyPublicAssetsBucketAcl(adminClient, bucket) {\n\ttry {\n\t\tawait adminClient.send(new PutBucketAclCommand({\n\t\t\tBucket: bucket,\n\t\t\tACL: \"public-read\"\n\t\t}));\n\t} catch (error) {\n\t\tif (!isUnsupportedStorageFeatureError(error)) console.warn(\"[storage] PutBucketAcl failed (continuing):\", error);\n\t}\n}\nasync function applyPublicAssetsBucketPolicy(adminClient, bucket) {\n\ttry {\n\t\tawait adminClient.send(new PutBucketPolicyCommand({\n\t\t\tBucket: bucket,\n\t\t\tPolicy: JSON.stringify({\n\t\t\t\tVersion: \"2012-10-17\",\n\t\t\t\tStatement: [{\n\t\t\t\t\tEffect: \"Allow\",\n\t\t\t\t\tPrincipal: \"*\",\n\t\t\t\t\tAction: [\"s3:GetObject\"],\n\t\t\t\t\tResource: [`arn:aws:s3:::${bucket}/${KEYSTROKE_ASSETS_AVATAR_PREFIX}*`, `arn:aws:s3:::${bucket}/${KEYSTROKE_ASSETS_ORG_LOGO_PREFIX}*`]\n\t\t\t\t}]\n\t\t\t})\n\t\t}));\n\t} catch (error) {\n\t\tif (!isUnsupportedStorageFeatureError(error)) console.warn(\"[storage] PutBucketPolicy failed (continuing):\", error);\n\t}\n}\nfunction isUnsupportedStorageFeatureError(error) {\n\tif (!error || typeof error !== \"object\") return false;\n\tconst name = \"name\" in error ? String(error.name) : \"\";\n\tconst code = \"Code\" in error ? String(error.Code) : \"\";\n\treturn name === \"NotImplemented\" || code === \"NotImplemented\" || code === \"NotSupported\";\n}\n//#endregion\n//#region src/provision/names.ts\nconst DEFAULT_BUCKET_NAME_PREFIX = \"ks\";\nfunction orgStorageBucketName(input, prefix = DEFAULT_BUCKET_NAME_PREFIX) {\n\treturn `${prefix.trim().replace(/-+$/g, \"\")}-${input.organizationId.toLowerCase()}`;\n}\n//#endregion\n//#region src/provision/minio.ts\nfunction minioStoragePlugin(options = {}) {\n\tconst adminConfig = storageAdminConfigFromEnv(options.env ?? process.env);\n\tconst adminClient = new S3Client({\n\t\tregion: adminConfig.region,\n\t\tcredentials: {\n\t\t\taccessKeyId: adminConfig.accessKeyId,\n\t\t\tsecretAccessKey: adminConfig.secretAccessKey\n\t\t},\n\t\tendpoint: adminConfig.endpoint,\n\t\tforcePathStyle: adminConfig.forcePathStyle\n\t});\n\treturn {\n\t\tasync provisionOrganization(input) {\n\t\t\tconst bucket = orgStorageBucketName(input, options.bucketNamePrefix);\n\t\t\ttry {\n\t\t\t\tawait adminClient.send(new CreateBucketCommand({ Bucket: bucket }));\n\t\t\t} catch (error) {\n\t\t\t\tif (!isBucketAlreadyExistsError(error)) throw error;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tbucket,\n\t\t\t\tendpoint: adminConfig.endpoint,\n\t\t\t\taccessKeyId: adminConfig.accessKeyId,\n\t\t\t\tsecretAccessKey: adminConfig.secretAccessKey,\n\t\t\t\tregion: adminConfig.region,\n\t\t\t\tforcePathStyle: adminConfig.forcePathStyle\n\t\t\t};\n\t\t},\n\t\tasync deprovisionOrganization(result) {\n\t\t\tconst client = new S3Client({\n\t\t\t\tregion: result.region ?? adminConfig.region,\n\t\t\t\tcredentials: {\n\t\t\t\t\taccessKeyId: result.accessKeyId,\n\t\t\t\t\tsecretAccessKey: result.secretAccessKey\n\t\t\t\t},\n\t\t\t\tendpoint: result.endpoint,\n\t\t\t\tforcePathStyle: result.forcePathStyle ?? true\n\t\t\t});\n\t\t\tif (((await client.send(new ListObjectsV2Command({\n\t\t\t\tBucket: result.bucket,\n\t\t\t\tMaxKeys: 1\n\t\t\t}))).KeyCount ?? 0) > 0) throw new Error(`Refusing to delete non-empty storage bucket ${result.bucket}`);\n\t\t\tawait client.send(new DeleteBucketCommand({ Bucket: result.bucket }));\n\t\t}\n\t};\n}\n//#endregion\nexport { KEYSTROKE_ASSETS_AVATAR_PREFIX, KEYSTROKE_ASSETS_BUCKET, KEYSTROKE_ASSETS_ORG_LOGO_PREFIX, KEYSTROKE_ASSETS_PUBLIC_URL_BASE_ENV, RouteManifestNotFoundError, containerPresignEndpointFromEnv, createAssetsStorageClient, createContainerPresignStorage, createStorage, defaultKeystrokeAssetsPublicUrlBase, ensureKeystrokeAssetsBucket, extractProjectArtifact, extractRouteManifestFromArtifact, isKeystrokeAssetsAvatarPublicUrl, isKeystrokeAssetsOrgLogoPublicUrl, isOrgLogoStorageKey, isSourceBlobHash, isUserAvatarStorageKey, keystrokeAssetsAvatarKeyFromPublicUrl, keystrokeAssetsKeyFromPublicUrl, keystrokeAssetsOrgLogoKeyFromPublicUrl, keystrokeAssetsPublicUrlBase, mergeFilteredArtifact, mergeStoredRouteManifest, minioStoragePlugin, orgLogoStorageKey, orgStorageBucketName, packDistTree, packProjectArtifact, projectArtifactKey, projectSourceBlobKey, projectSourceManifestKey, publicKeystrokeAssetsObjectUrl, storageAdminConfigFromEnv, storageConfigFromEnv, userAvatarStorageKey };\n\n//# sourceMappingURL=index.mjs.map"],"x_google_ignoreList":[2,3,4,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAE5B,MAAM,wCAAwC;AAC9C,MAAM,wBAAwB;CAC7B,MAAM;CACN,MAAM;AACP;;AAIA,SAAS,mBAAmB,WAAW;CACtC,OAAO,OAAO,KAAK,KAAK,UAAU,SAAS,CAAC,EAAE,SAAS,QAAQ;AAChE;AAaA,MAAM,mBAAmB;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,oBAAoB;CACzB;CACA;CACA;CACA;AACD;;AAEA,MAAM,4BAA4B;;AAUlC,SAAS,0BAA0B,UAAU;CAC5C,OAAO;EACN,eAAe,oBAAoB,SAAS,IAAI;EAChD,eAAe,OAAO,SAAS,IAAI;EACnC,aAAa,SAAS;EACtB,eAAe,SAAS;EACxB,mBAAmB,SAAS;EAC5B,sBAAsB,SAAS;CAChC;AACD;;;;;AAKA,SAAS,qBAAqB,SAAS,WAAW,UAAU,UAAU;CACrE,IAAI,UAAU,WAAW,GAAG,MAAM,IAAI,MAAM,0DAA0D;CACtG,MAAM,MAAM,QAAQ,OAAO,QAAQ;CACnC,OAAO;EACN,OAAO,0BAA0B,KAAK,QAAQ,KAAK;EACnD,KAAK,gBAAgB,KAAK,WAAW,UAAU,QAAQ;EACvD,MAAM;EACN,QAAQ;CACT;AACD;;AAEA,SAAS,gBAAgB,QAAQ,WAAW,UAAU,UAAU;CAC/D,MAAM,UAAU,IAAI,IAAI;EACvB,CAAC,QAAQ,OAAO,mBAAmB,CAAC;EACpC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;CACA;CACA;AACD;;AAEA,MAAM,oBAAoB;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,gBAAgB;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,0BAA0B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,oBAAoB;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;AA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