@mndrk/agx 2.0.41 → 2.0.44

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 (1173) hide show
  1. package/cloud-runtime/standalone/.linear-token.json +4 -0
  2. package/cloud-runtime/standalone/.next/BUILD_ID +1 -1
  3. package/cloud-runtime/standalone/.next/app-path-routes-manifest.json +10 -2
  4. package/cloud-runtime/standalone/.next/build-manifest.json +8 -8
  5. package/cloud-runtime/standalone/.next/prerender-manifest.json +3 -3
  6. package/cloud-runtime/standalone/.next/routes-manifest.json +64 -16
  7. package/cloud-runtime/standalone/.next/server/app/_global-error/page/build-manifest.json +6 -6
  8. package/cloud-runtime/standalone/.next/server/app/_global-error/page.js +2 -2
  9. package/cloud-runtime/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/cloud-runtime/standalone/.next/server/app/_global-error.html +2 -2
  11. package/cloud-runtime/standalone/.next/server/app/_global-error.rsc +7 -7
  12. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  13. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  14. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  15. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  16. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/cloud-runtime/standalone/.next/server/app/_not-found/page/build-manifest.json +6 -6
  18. package/cloud-runtime/standalone/.next/server/app/_not-found/page.js +3 -3
  19. package/cloud-runtime/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/cloud-runtime/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/cloud-runtime/standalone/.next/server/app/_not-found.html +2 -2
  22. package/cloud-runtime/standalone/.next/server/app/_not-found.rsc +16 -15
  23. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +16 -15
  24. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
  25. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +8 -7
  26. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  27. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  28. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/cloud-runtime/standalone/.next/server/app/agents/[id]/page/build-manifest.json +6 -6
  30. package/cloud-runtime/standalone/.next/server/app/agents/[id]/page.js +3 -3
  31. package/cloud-runtime/standalone/.next/server/app/agents/[id]/page.js.nft.json +1 -1
  32. package/cloud-runtime/standalone/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
  33. package/cloud-runtime/standalone/.next/server/app/agents/page/build-manifest.json +6 -6
  34. package/cloud-runtime/standalone/.next/server/app/agents/page.js +3 -3
  35. package/cloud-runtime/standalone/.next/server/app/agents/page.js.nft.json +1 -1
  36. package/cloud-runtime/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  37. package/cloud-runtime/standalone/.next/server/app/agents.html +2 -2
  38. package/cloud-runtime/standalone/.next/server/app/agents.rsc +20 -19
  39. package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +20 -19
  40. package/cloud-runtime/standalone/.next/server/app/agents.segments/_head.segment.rsc +3 -3
  41. package/cloud-runtime/standalone/.next/server/app/agents.segments/_index.segment.rsc +8 -7
  42. package/cloud-runtime/standalone/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
  43. package/cloud-runtime/standalone/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +4 -4
  44. package/cloud-runtime/standalone/.next/server/app/agents.segments/agents.segment.rsc +3 -3
  45. package/cloud-runtime/standalone/.next/server/app/api/agent-specs/pull/route.js +2 -2
  46. package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js +6 -4
  47. package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
  48. package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/messages/route.js +2 -2
  49. package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js +7 -5
  50. package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
  51. package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js +6 -4
  52. package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js.nft.json +1 -1
  53. package/cloud-runtime/standalone/.next/server/app/api/attachments/[id]/route.js +2 -2
  54. package/cloud-runtime/standalone/.next/server/app/api/audit/route.js +2 -2
  55. package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js +9 -6
  56. package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js.nft.json +1 -1
  57. package/cloud-runtime/standalone/.next/server/app/api/automations/route.js +5 -3
  58. package/cloud-runtime/standalone/.next/server/app/api/automations/route.js.nft.json +1 -1
  59. package/cloud-runtime/standalone/.next/server/app/api/chat/route.js +10 -7
  60. package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
  61. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js +2 -2
  62. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js +3 -3
  63. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js.nft.json +1 -1
  64. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js +2 -2
  65. package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js +2 -2
  66. package/cloud-runtime/standalone/.next/server/app/api/domains/[id]/route.js +2 -2
  67. package/cloud-runtime/standalone/.next/server/app/api/file-read/route.js +2 -2
  68. package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js +2 -2
  69. package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
  70. package/cloud-runtime/standalone/.next/server/app/api/filesystem/browse/route.js +2 -2
  71. package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route.js +3 -3
  72. package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route.js.nft.json +1 -1
  73. package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js +5 -2
  74. package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js.nft.json +1 -1
  75. package/cloud-runtime/standalone/.next/server/app/api/health/route.js +7 -5
  76. package/cloud-runtime/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
  77. package/cloud-runtime/standalone/.next/server/app/api/history/route.js +2 -2
  78. package/cloud-runtime/standalone/.next/server/app/api/history/status/route.js +2 -2
  79. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js +6 -4
  80. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -1
  81. package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js +7 -5
  82. package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js.nft.json +1 -1
  83. package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route/app-paths-manifest.json +3 -0
  84. package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route.js +7 -0
  85. package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route.js.nft.json +1 -0
  86. package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route_client-reference-manifest.js +2 -0
  87. package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route/app-paths-manifest.json +3 -0
  88. package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js +7 -0
  89. package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js.nft.json +1 -0
  90. package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route_client-reference-manifest.js +2 -0
  91. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route/app-paths-manifest.json +3 -0
  92. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route/build-manifest.json +11 -0
  93. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route/server-reference-manifest.json +4 -0
  94. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js +7 -0
  95. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js.map +5 -0
  96. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js.nft.json +1 -0
  97. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route_client-reference-manifest.js +2 -0
  98. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route/app-paths-manifest.json +3 -0
  99. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route/build-manifest.json +11 -0
  100. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route/server-reference-manifest.json +4 -0
  101. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js +7 -0
  102. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js.map +5 -0
  103. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js.nft.json +1 -0
  104. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route_client-reference-manifest.js +2 -0
  105. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route/app-paths-manifest.json +3 -0
  106. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route/build-manifest.json +11 -0
  107. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route/server-reference-manifest.json +4 -0
  108. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route.js +8 -0
  109. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route.js.map +5 -0
  110. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route.js.nft.json +1 -0
  111. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route_client-reference-manifest.js +2 -0
  112. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route/app-paths-manifest.json +3 -0
  113. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route/build-manifest.json +11 -0
  114. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route/server-reference-manifest.json +4 -0
  115. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route.js +7 -0
  116. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route.js.map +5 -0
  117. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route.js.nft.json +1 -0
  118. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route_client-reference-manifest.js +2 -0
  119. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route/app-paths-manifest.json +3 -0
  120. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route/build-manifest.json +11 -0
  121. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route/server-reference-manifest.json +4 -0
  122. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route.js +7 -0
  123. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route.js.map +5 -0
  124. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route.js.nft.json +1 -0
  125. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route_client-reference-manifest.js +2 -0
  126. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route/app-paths-manifest.json +3 -0
  127. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route/build-manifest.json +11 -0
  128. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route/server-reference-manifest.json +4 -0
  129. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js +7 -0
  130. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js.map +5 -0
  131. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js.nft.json +1 -0
  132. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route_client-reference-manifest.js +2 -0
  133. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route/app-paths-manifest.json +3 -0
  134. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route/build-manifest.json +11 -0
  135. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route/server-reference-manifest.json +4 -0
  136. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js +7 -0
  137. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js.map +5 -0
  138. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js.nft.json +1 -0
  139. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route_client-reference-manifest.js +2 -0
  140. package/cloud-runtime/standalone/.next/server/app/api/logs/route.js +2 -2
  141. package/cloud-runtime/standalone/.next/server/app/api/logs/stream/route.js +2 -2
  142. package/cloud-runtime/standalone/.next/server/app/api/memories/route.js +2 -2
  143. package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js +2 -2
  144. package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js +2 -2
  145. package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js +2 -2
  146. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js +3 -3
  147. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js.nft.json +1 -1
  148. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js +3 -3
  149. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js.nft.json +1 -1
  150. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +7 -5
  151. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js.nft.json +1 -1
  152. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js +7 -5
  153. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
  154. package/cloud-runtime/standalone/.next/server/app/api/participants/route.js +7 -5
  155. package/cloud-runtime/standalone/.next/server/app/api/participants/route.js.nft.json +1 -1
  156. package/cloud-runtime/standalone/.next/server/app/api/processes/route.js +2 -2
  157. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +7 -5
  158. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
  159. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +7 -5
  160. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js.nft.json +1 -1
  161. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js +7 -5
  162. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js.nft.json +1 -1
  163. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js +5 -3
  164. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  165. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js +7 -5
  166. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js.nft.json +1 -1
  167. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js +7 -5
  168. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js.nft.json +1 -1
  169. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js +7 -5
  170. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js.nft.json +1 -1
  171. package/cloud-runtime/standalone/.next/server/app/api/projects/route.js +7 -5
  172. package/cloud-runtime/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  173. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js +7 -5
  174. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.nft.json +1 -1
  175. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js +8 -6
  176. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js.nft.json +1 -1
  177. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js +7 -5
  178. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js.nft.json +1 -1
  179. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js +7 -5
  180. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js.nft.json +1 -1
  181. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js +9 -6
  182. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
  183. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js +8 -6
  184. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js.nft.json +1 -1
  185. package/cloud-runtime/standalone/.next/server/app/api/providers/route.js +3 -3
  186. package/cloud-runtime/standalone/.next/server/app/api/providers/route.js.nft.json +1 -1
  187. package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js +7 -5
  188. package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
  189. package/cloud-runtime/standalone/.next/server/app/api/queue/route.js +9 -7
  190. package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  191. package/cloud-runtime/standalone/.next/server/app/api/reactions/route.js +2 -2
  192. package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +7 -5
  193. package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js.nft.json +1 -1
  194. package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js +7 -5
  195. package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
  196. package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js +9 -6
  197. package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
  198. package/cloud-runtime/standalone/.next/server/app/api/search/route.js +2 -2
  199. package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js +1 -1
  200. package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js.nft.json +1 -1
  201. package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js +3 -3
  202. package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js.nft.json +1 -1
  203. package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js +3 -3
  204. package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
  205. package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js +3 -3
  206. package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js.nft.json +1 -1
  207. package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js +3 -3
  208. package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js.nft.json +1 -1
  209. package/cloud-runtime/standalone/.next/server/app/api/skills/route.js +3 -3
  210. package/cloud-runtime/standalone/.next/server/app/api/skills/route.js.nft.json +1 -1
  211. package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js +1 -1
  212. package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js.nft.json +1 -1
  213. package/cloud-runtime/standalone/.next/server/app/api/status/route.js +3 -3
  214. package/cloud-runtime/standalone/.next/server/app/api/status/route.js.nft.json +1 -1
  215. package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +7 -5
  216. package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
  217. package/cloud-runtime/standalone/.next/server/app/api/system/db-status/route.js +2 -2
  218. package/cloud-runtime/standalone/.next/server/app/api/task-drafts/route.js +2 -2
  219. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +6 -4
  220. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
  221. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js +8 -6
  222. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
  223. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js +7 -5
  224. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js.nft.json +1 -1
  225. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js +8 -6
  226. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js.nft.json +1 -1
  227. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js +8 -5
  228. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js.nft.json +1 -1
  229. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js +9 -6
  230. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js.nft.json +1 -1
  231. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js +9 -6
  232. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js.nft.json +1 -1
  233. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/pause/route.js +2 -2
  234. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +12 -8
  235. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js.nft.json +1 -1
  236. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js +7 -5
  237. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js.nft.json +1 -1
  238. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js +7 -5
  239. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js.nft.json +1 -1
  240. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js +11 -7
  241. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js.nft.json +1 -1
  242. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js +13 -9
  243. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js.nft.json +1 -1
  244. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js +11 -8
  245. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js.nft.json +1 -1
  246. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js +7 -5
  247. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js.nft.json +1 -1
  248. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js +3 -1
  249. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js.nft.json +1 -1
  250. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/heartbeat/route.js +2 -2
  251. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js +7 -5
  252. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js.nft.json +1 -1
  253. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js +9 -6
  254. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js.nft.json +1 -1
  255. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/stream/route.js +2 -2
  256. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js +5 -3
  257. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js.nft.json +1 -1
  258. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js +11 -8
  259. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js.nft.json +1 -1
  260. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js +11 -8
  261. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js.nft.json +1 -1
  262. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js +11 -8
  263. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js.nft.json +1 -1
  264. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js +11 -8
  265. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js.nft.json +1 -1
  266. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js +11 -8
  267. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js.nft.json +1 -1
  268. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js +12 -9
  269. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
  270. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js +9 -6
  271. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
  272. package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js +7 -5
  273. package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js.nft.json +1 -1
  274. package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js +7 -5
  275. package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
  276. package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js +11 -8
  277. package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
  278. package/cloud-runtime/standalone/.next/server/app/api/tasks/stream/route.js +2 -2
  279. package/cloud-runtime/standalone/.next/server/app/api/thread-export/route.js +2 -2
  280. package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js +6 -5
  281. package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
  282. package/cloud-runtime/standalone/.next/server/app/api/threads/route.js +6 -5
  283. package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
  284. package/cloud-runtime/standalone/.next/server/app/api/upload/[id]/route.js +2 -2
  285. package/cloud-runtime/standalone/.next/server/app/api/upload/route.js +2 -2
  286. package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js +7 -5
  287. package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js.nft.json +1 -1
  288. package/cloud-runtime/standalone/.next/server/app/api/userPreferences/route.js +2 -2
  289. package/cloud-runtime/standalone/.next/server/app/automations/page/build-manifest.json +6 -6
  290. package/cloud-runtime/standalone/.next/server/app/automations/page/react-loadable-manifest.json +11 -3
  291. package/cloud-runtime/standalone/.next/server/app/automations/page.js +3 -3
  292. package/cloud-runtime/standalone/.next/server/app/automations/page.js.nft.json +1 -1
  293. package/cloud-runtime/standalone/.next/server/app/automations/page_client-reference-manifest.js +1 -1
  294. package/cloud-runtime/standalone/.next/server/app/automations.html +2 -2
  295. package/cloud-runtime/standalone/.next/server/app/automations.rsc +21 -20
  296. package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +21 -20
  297. package/cloud-runtime/standalone/.next/server/app/automations.segments/_head.segment.rsc +3 -3
  298. package/cloud-runtime/standalone/.next/server/app/automations.segments/_index.segment.rsc +8 -7
  299. package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +3 -3
  300. package/cloud-runtime/standalone/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +5 -5
  301. package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +3 -3
  302. package/cloud-runtime/standalone/.next/server/app/board/page/build-manifest.json +6 -6
  303. package/cloud-runtime/standalone/.next/server/app/board/page.js +3 -3
  304. package/cloud-runtime/standalone/.next/server/app/board/page.js.nft.json +1 -1
  305. package/cloud-runtime/standalone/.next/server/app/board/page_client-reference-manifest.js +1 -1
  306. package/cloud-runtime/standalone/.next/server/app/board.html +2 -2
  307. package/cloud-runtime/standalone/.next/server/app/board.rsc +17 -16
  308. package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +17 -16
  309. package/cloud-runtime/standalone/.next/server/app/board.segments/_head.segment.rsc +3 -3
  310. package/cloud-runtime/standalone/.next/server/app/board.segments/_index.segment.rsc +8 -7
  311. package/cloud-runtime/standalone/.next/server/app/board.segments/_tree.segment.rsc +2 -2
  312. package/cloud-runtime/standalone/.next/server/app/board.segments/board/__PAGE__.segment.rsc +2 -2
  313. package/cloud-runtime/standalone/.next/server/app/board.segments/board.segment.rsc +3 -3
  314. package/cloud-runtime/standalone/.next/server/app/execution-graph/page/build-manifest.json +6 -6
  315. package/cloud-runtime/standalone/.next/server/app/execution-graph/page.js +3 -3
  316. package/cloud-runtime/standalone/.next/server/app/execution-graph/page.js.nft.json +1 -1
  317. package/cloud-runtime/standalone/.next/server/app/execution-graph/page_client-reference-manifest.js +1 -1
  318. package/cloud-runtime/standalone/.next/server/app/execution-graph.html +2 -2
  319. package/cloud-runtime/standalone/.next/server/app/execution-graph.rsc +20 -19
  320. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +20 -19
  321. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_head.segment.rsc +3 -3
  322. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_index.segment.rsc +8 -7
  323. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_tree.segment.rsc +2 -2
  324. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +4 -4
  325. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +3 -3
  326. package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
  327. package/cloud-runtime/standalone/.next/server/app/index.rsc +19 -18
  328. package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  329. package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +19 -18
  330. package/cloud-runtime/standalone/.next/server/app/index.segments/_head.segment.rsc +3 -3
  331. package/cloud-runtime/standalone/.next/server/app/index.segments/_index.segment.rsc +8 -7
  332. package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +4 -4
  333. package/cloud-runtime/standalone/.next/server/app/page/build-manifest.json +6 -6
  334. package/cloud-runtime/standalone/.next/server/app/page.js +3 -3
  335. package/cloud-runtime/standalone/.next/server/app/page.js.nft.json +1 -1
  336. package/cloud-runtime/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  337. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/build-manifest.json +6 -6
  338. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/react-loadable-manifest.json +11 -3
  339. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js +3 -3
  340. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js.nft.json +1 -1
  341. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
  342. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page/build-manifest.json +6 -6
  343. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page.js +3 -3
  344. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page.js.nft.json +1 -1
  345. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
  346. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page/build-manifest.json +6 -6
  347. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js +3 -3
  348. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js.nft.json +1 -1
  349. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +1 -1
  350. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/app-paths-manifest.json +3 -0
  351. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/build-manifest.json +18 -0
  352. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/next-font-manifest.json +11 -0
  353. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/react-loadable-manifest.json +10 -0
  354. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/server-reference-manifest.json +4 -0
  355. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js +16 -0
  356. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js.map +5 -0
  357. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js.nft.json +1 -0
  358. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page_client-reference-manifest.js +2 -0
  359. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page/build-manifest.json +6 -6
  360. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page.js +3 -3
  361. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  362. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  363. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page/build-manifest.json +6 -6
  364. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js +3 -3
  365. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js.nft.json +1 -1
  366. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
  367. package/cloud-runtime/standalone/.next/server/app/projects/orphans/page/build-manifest.json +6 -6
  368. package/cloud-runtime/standalone/.next/server/app/projects/orphans/page.js +3 -3
  369. package/cloud-runtime/standalone/.next/server/app/projects/orphans/page.js.nft.json +1 -1
  370. package/cloud-runtime/standalone/.next/server/app/projects/orphans/page_client-reference-manifest.js +1 -1
  371. package/cloud-runtime/standalone/.next/server/app/projects/orphans.html +2 -2
  372. package/cloud-runtime/standalone/.next/server/app/projects/orphans.rsc +20 -19
  373. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +20 -19
  374. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_head.segment.rsc +3 -3
  375. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_index.segment.rsc +8 -7
  376. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_tree.segment.rsc +2 -2
  377. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +4 -4
  378. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +3 -3
  379. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +3 -3
  380. package/cloud-runtime/standalone/.next/server/app/projects/page/build-manifest.json +6 -6
  381. package/cloud-runtime/standalone/.next/server/app/projects/page.js +3 -3
  382. package/cloud-runtime/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  383. package/cloud-runtime/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  384. package/cloud-runtime/standalone/.next/server/app/projects.html +2 -2
  385. package/cloud-runtime/standalone/.next/server/app/projects.rsc +20 -19
  386. package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +20 -19
  387. package/cloud-runtime/standalone/.next/server/app/projects.segments/_head.segment.rsc +3 -3
  388. package/cloud-runtime/standalone/.next/server/app/projects.segments/_index.segment.rsc +8 -7
  389. package/cloud-runtime/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
  390. package/cloud-runtime/standalone/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +4 -4
  391. package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +3 -3
  392. package/cloud-runtime/standalone/.next/server/app/settings/page/build-manifest.json +6 -6
  393. package/cloud-runtime/standalone/.next/server/app/settings/page.js +3 -3
  394. package/cloud-runtime/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  395. package/cloud-runtime/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  396. package/cloud-runtime/standalone/.next/server/app/settings.html +2 -2
  397. package/cloud-runtime/standalone/.next/server/app/settings.rsc +20 -19
  398. package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +20 -19
  399. package/cloud-runtime/standalone/.next/server/app/settings.segments/_head.segment.rsc +3 -3
  400. package/cloud-runtime/standalone/.next/server/app/settings.segments/_index.segment.rsc +8 -7
  401. package/cloud-runtime/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  402. package/cloud-runtime/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  403. package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  404. package/cloud-runtime/standalone/.next/server/app/skills/page/build-manifest.json +6 -6
  405. package/cloud-runtime/standalone/.next/server/app/skills/page.js +3 -3
  406. package/cloud-runtime/standalone/.next/server/app/skills/page.js.nft.json +1 -1
  407. package/cloud-runtime/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  408. package/cloud-runtime/standalone/.next/server/app/skills.html +2 -2
  409. package/cloud-runtime/standalone/.next/server/app/skills.rsc +20 -19
  410. package/cloud-runtime/standalone/.next/server/app/skills.segments/_full.segment.rsc +20 -19
  411. package/cloud-runtime/standalone/.next/server/app/skills.segments/_head.segment.rsc +3 -3
  412. package/cloud-runtime/standalone/.next/server/app/skills.segments/_index.segment.rsc +8 -7
  413. package/cloud-runtime/standalone/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
  414. package/cloud-runtime/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +4 -4
  415. package/cloud-runtime/standalone/.next/server/app/skills.segments/skills.segment.rsc +3 -3
  416. package/cloud-runtime/standalone/.next/server/app/status/page/build-manifest.json +6 -6
  417. package/cloud-runtime/standalone/.next/server/app/status/page.js +3 -3
  418. package/cloud-runtime/standalone/.next/server/app/status/page.js.nft.json +1 -1
  419. package/cloud-runtime/standalone/.next/server/app/status/page_client-reference-manifest.js +1 -1
  420. package/cloud-runtime/standalone/.next/server/app/status.html +2 -2
  421. package/cloud-runtime/standalone/.next/server/app/status.rsc +20 -19
  422. package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +20 -19
  423. package/cloud-runtime/standalone/.next/server/app/status.segments/_head.segment.rsc +3 -3
  424. package/cloud-runtime/standalone/.next/server/app/status.segments/_index.segment.rsc +8 -7
  425. package/cloud-runtime/standalone/.next/server/app/status.segments/_tree.segment.rsc +2 -2
  426. package/cloud-runtime/standalone/.next/server/app/status.segments/status/__PAGE__.segment.rsc +4 -4
  427. package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +3 -3
  428. package/cloud-runtime/standalone/.next/server/app/thread/[id]/page/build-manifest.json +6 -6
  429. package/cloud-runtime/standalone/.next/server/app/thread/[id]/page.js +3 -3
  430. package/cloud-runtime/standalone/.next/server/app/thread/[id]/page.js.nft.json +1 -1
  431. package/cloud-runtime/standalone/.next/server/app/thread/[id]/page_client-reference-manifest.js +1 -1
  432. package/cloud-runtime/standalone/.next/server/app/welcome/page/build-manifest.json +6 -6
  433. package/cloud-runtime/standalone/.next/server/app/welcome/page.js +3 -3
  434. package/cloud-runtime/standalone/.next/server/app/welcome/page.js.nft.json +1 -1
  435. package/cloud-runtime/standalone/.next/server/app/welcome/page_client-reference-manifest.js +1 -1
  436. package/cloud-runtime/standalone/.next/server/app/welcome.html +2 -2
  437. package/cloud-runtime/standalone/.next/server/app/welcome.rsc +20 -19
  438. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +20 -19
  439. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_head.segment.rsc +3 -3
  440. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_index.segment.rsc +8 -7
  441. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_tree.segment.rsc +2 -2
  442. package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome/__PAGE__.segment.rsc +4 -4
  443. package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +3 -3
  444. package/cloud-runtime/standalone/.next/server/app-paths-manifest.json +10 -2
  445. package/cloud-runtime/standalone/.next/server/chunks/[externals]__29a2424c._.js +3 -0
  446. package/cloud-runtime/standalone/.next/server/chunks/[externals]__64355ed1._.js +1 -1
  447. package/cloud-runtime/standalone/.next/server/chunks/[externals]__d6ed3021._.js +3 -0
  448. package/cloud-runtime/standalone/.next/server/chunks/[externals]_node:child_process_261e8bca._.js +1 -1
  449. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0281ad06._.js +49 -0
  450. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0284ea89._.js +13 -0
  451. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__04c806f4._.js +3 -0
  452. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__05243927._.js +29 -0
  453. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0c3dd73b._.js +2 -2
  454. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0c4807d1._.js +49 -0
  455. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0cc3f3b7._.js +2 -2
  456. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0f6532d7._.js +93 -0
  457. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1017e012._.js +1 -1
  458. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__13fe776f._.js +3 -0
  459. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1b96352c._.js +1 -1
  460. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1be9b30e._.js +3 -0
  461. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1dce6c15._.js +1 -1
  462. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__22b7bf38._.js +3 -0
  463. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__255b11f2._.js +1 -1
  464. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__26817611._.js +1 -1
  465. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__28524c6a._.js +3 -0
  466. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__294fceef._.js +1 -1
  467. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2d15af44._.js +3 -0
  468. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2d776aa6._.js +3 -0
  469. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__314d5c41._.js +1 -1
  470. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__349d67e7._.js +61 -0
  471. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__34efe92e._.js +15 -0
  472. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__352dad6d._.js +1 -1
  473. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42804c1d._.js +110 -0
  474. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__44ef900b._.js +49 -0
  475. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4559476d._.js +49 -0
  476. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__45a50de9._.js +3 -0
  477. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__46947325._.js +1 -1
  478. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__46ad8e50._.js +49 -0
  479. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4700e1b3._.js +80 -0
  480. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__49c04b15._.js +49 -0
  481. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a4265e0._.js +2 -2
  482. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c2d07e0._.js +3 -0
  483. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c5c536d._.js +2 -2
  484. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c89c60a._.js +93 -0
  485. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__509b1dd2._.js +13 -0
  486. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50ddd3ce._.js +1 -1
  487. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__529a6e1c._.js +2 -2
  488. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5650bac3._.js +1 -1
  489. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__56dbe1a4._.js +39 -0
  490. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5a042505._.js +15 -0
  491. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5a1fd688._.js +1 -1
  492. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5d359afa._.js +21 -18
  493. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5e5eb809._.js +61 -0
  494. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5fbc700c._.js +25 -0
  495. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__621dcb4a._.js +1 -1
  496. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__628d686b._.js +1 -1
  497. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6db132e9._.js +1 -1
  498. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6dbe939c._.js +49 -0
  499. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6fe5a96f._.js +80 -0
  500. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__73b17f49._.js +3 -0
  501. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__74a37ca4._.js +13 -0
  502. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__76290829._.js +29 -0
  503. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__76658fd6._.js +15 -0
  504. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7c94b104._.js +2 -2
  505. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7cade6c6._.js +6 -0
  506. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7d4fa0fd._.js +3 -0
  507. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__889996dd._.js +49 -0
  508. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8a35d73b._.js +80 -0
  509. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8b5fd676._.js +3 -0
  510. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8c7d1318._.js +13 -0
  511. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__91b51f33._.js +8 -0
  512. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__92924218._.js +2 -2
  513. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__94bd7f65._.js +1 -1
  514. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9746d1f5._.js +2 -2
  515. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98d58423._.js +3 -0
  516. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9b69f93e._.js +2 -2
  517. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9d3a2caa._.js +134 -0
  518. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a1e62918._.js +1 -1
  519. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a2e17f69._.js +3 -0
  520. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ac9b93fd._.js +48 -0
  521. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ad4cb055._.js +3 -0
  522. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ad6d6402._.js +29 -0
  523. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__af7a73fd._.js +1 -1
  524. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b8f4e4a3._.js +1 -1
  525. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bacb0193._.js +7 -0
  526. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bd11b2ad._.js +1 -1
  527. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c0919d7d._.js +101 -0
  528. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c1b28690._.js +49 -0
  529. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c4ea4921._.js +1 -1
  530. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c4ed5d83._.js +2 -2
  531. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c5025f86._.js +66 -0
  532. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c695a5f2._.js +2 -2
  533. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c77efd85._.js +8 -0
  534. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c9550a93._.js +39 -0
  535. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__cb5c7680._.js +1 -1
  536. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__cf6082be._.js +49 -0
  537. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d2ac93f2._.js +13 -0
  538. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d3945cae._.js +15 -0
  539. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d57e800e._.js +2 -2
  540. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d8b615bf._.js +2 -2
  541. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9bd6334._.js +1 -1
  542. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9f2041b._.js +34 -0
  543. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__db469f1b._.js +1 -1
  544. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dc542063._.js +2 -2
  545. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dd1cb250._.js +49 -0
  546. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__de2a1e43._.js +1 -1
  547. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dffa5183._.js +29 -0
  548. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e0994be2._.js +3 -0
  549. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e20922e8._.js +13 -0
  550. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e3ecfd17._.js +2 -2
  551. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e4f01b5c._.js +97 -0
  552. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e5bad635._.js +44 -0
  553. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f168c6dc._.js +14 -14
  554. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f21849ad._.js +39 -0
  555. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f536cd2f._.js +1 -1
  556. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f9f7f2df._.js +2 -2
  557. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fb1f7e58._.js +39 -0
  558. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fdb21d1b._.js +1 -1
  559. package/cloud-runtime/standalone/.next/server/chunks/_0a767dfe._.js +1 -1
  560. package/cloud-runtime/standalone/.next/server/chunks/_110bf46e._.js +6 -0
  561. package/cloud-runtime/standalone/.next/server/chunks/_22fe5fd2._.js +1 -1
  562. package/cloud-runtime/standalone/.next/server/chunks/_2a5aeb76._.js +3 -0
  563. package/cloud-runtime/standalone/.next/server/chunks/_2f3e5ac1._.js +1 -1
  564. package/cloud-runtime/standalone/.next/server/chunks/_4689976f._.js +6 -0
  565. package/cloud-runtime/standalone/.next/server/chunks/_5462a047._.js +1 -1
  566. package/cloud-runtime/standalone/.next/server/chunks/_65fd2525._.js +10 -0
  567. package/cloud-runtime/standalone/.next/server/chunks/_682c9d81._.js +6 -0
  568. package/cloud-runtime/standalone/.next/server/chunks/_7011db4f._.js +1 -1
  569. package/cloud-runtime/standalone/.next/server/chunks/_9b10087f._.js +8 -0
  570. package/cloud-runtime/standalone/.next/server/chunks/_9dea7192._.js +10 -0
  571. package/cloud-runtime/standalone/.next/server/chunks/_a32a5cdd._.js +6 -0
  572. package/cloud-runtime/standalone/.next/server/chunks/_a877d34f._.js +1 -1
  573. package/cloud-runtime/standalone/.next/server/chunks/_af7bd752._.js +3 -0
  574. package/cloud-runtime/standalone/.next/server/chunks/_b0524599._.js +3 -0
  575. package/cloud-runtime/standalone/.next/server/chunks/_c31ca6ab._.js +1 -1
  576. package/cloud-runtime/standalone/.next/server/chunks/_c3c28282._.js +3 -0
  577. package/cloud-runtime/standalone/.next/server/chunks/_c965f7b3._.js +1 -1
  578. package/cloud-runtime/standalone/.next/server/chunks/_d2ea7d84._.js +3 -0
  579. package/cloud-runtime/standalone/.next/server/chunks/_e469c080._.js +10 -0
  580. package/cloud-runtime/standalone/.next/server/chunks/_ee99a36b._.js +1 -1
  581. package/cloud-runtime/standalone/.next/server/chunks/_fe32a267._.js +3 -0
  582. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agent-specs_pull_route_actions_33fd1f01.js +1 -1
  583. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agent-specs_route_actions_3c4fd7d4.js +1 -1
  584. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agents_[id]_profile_route_actions_e8d70dac.js +1 -1
  585. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agents_export_route_actions_cc761823.js +1 -1
  586. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_attachments_[id]_route_actions_28040395.js +1 -1
  587. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_audit_route_actions_9d92fa80.js +1 -1
  588. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_automations_create_route_actions_ffb767ae.js +1 -1
  589. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_automations_route_actions_0112e2f7.js +1 -1
  590. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat-runs_[id]_route_actions_033ac330.js +1 -1
  591. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat-runs_route_actions_0c8cd01c.js +1 -1
  592. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat_route_actions_ac0c75e3.js +1 -1
  593. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_daemon_route_actions_89f9619f.js +1 -1
  594. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_domains_[id]_route_actions_36310215.js +1 -1
  595. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_domains_route_actions_8d8cc0aa.js +1 -1
  596. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_file-read_route_actions_a562d24d.js +1 -1
  597. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_file-search_route_actions_8af77a20.js +1 -1
  598. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_filesystem_browse_route_actions_8e268170.js +1 -1
  599. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_filesystem_pick-folder_route_actions_162664ff.js +1 -1
  600. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_health_route_actions_da3433c4.js +1 -1
  601. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_history_route_actions_f1813cd2.js +1 -1
  602. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_knowledge-notes_route_actions_0ddf6109.js +1 -1
  603. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_learnings_route_actions_c32db009.js +1 -1
  604. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_auth_route_actions_6bba0ae0.js +3 -0
  605. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_callback_route_actions_0fc8695c.js +3 -0
  606. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_cycles_route_actions_9cbb85fe.js +3 -0
  607. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_issues_route_actions_8f12f3b7.js +3 -0
  608. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_mcp-setup_route_actions_a11b04f4.js +3 -0
  609. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_runs_[id]_route_actions_5c46cc4e.js +3 -0
  610. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_runs_route_actions_a99753a8.js +3 -0
  611. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_status_route_actions_e43f376f.js +3 -0
  612. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_token_route_actions_510583b8.js +3 -0
  613. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_logs_route_actions_30a87f47.js +1 -1
  614. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_logs_stream_route_actions_92bf6397.js +1 -1
  615. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_memories_route_actions_f0712914.js +1 -1
  616. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_messages_[id]_route_actions_3ca634d2.js +1 -1
  617. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_participants_route_actions_2bae2919.js +1 -1
  618. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_processes_route_actions_93e6bd01.js +1 -1
  619. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_agents_route_actions_62a7e8e5.js +1 -1
  620. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_migrate-v1_route_actions_e28a058d.js +1 -1
  621. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_migrate-v2_route_actions_0cfff9eb.js +1 -1
  622. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_route_actions_6fd2e5a5.js +1 -1
  623. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_skills_route_actions_90fdd1e6.js +1 -1
  624. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_threads_route_actions_88ac9ddb.js +1 -1
  625. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_variables_route_actions_e646c8d9.js +1 -1
  626. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_cancel_route_actions_fbd5be89.js +1 -1
  627. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_route_actions_774a2e21.js +1 -1
  628. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_runs_route_actions_6e59ee83.js +1 -1
  629. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_agents_route_actions_399e1f19.js +1 -1
  630. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_poll_route_actions_23fbbfa1.js +1 -1
  631. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_route_actions_acf03860.js +1 -1
  632. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_providers_route_actions_5388b373.js +1 -1
  633. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_queue_complete_route_actions_1350a2ac.js +1 -1
  634. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_queue_route_actions_1e9c9b6f.js +1 -1
  635. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_reactions_route_actions_e075d50e.js +1 -1
  636. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_schedules_debug_route_actions_61c03e5e.js +1 -1
  637. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_schedules_poll_route_actions_dfc6ace4.js +1 -1
  638. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_schedules_route_actions_f5db3d09.js +1 -1
  639. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_search_route_actions_4244da48.js +1 -1
  640. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_assign_route_actions_15267be8.js +1 -1
  641. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_available_route_actions_24023111.js +1 -1
  642. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_detail_route_actions_1148baef.js +1 -1
  643. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_history_route_actions_5e5c4757.js +1 -1
  644. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_learn_route_actions_d3a37d25.js +1 -1
  645. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_route_actions_780e175f.js +1 -1
  646. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_unlearn_route_actions_3dfee433.js +1 -1
  647. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_status_route_actions_d551bce0.js +1 -1
  648. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_summarize_route_actions_3e77989a.js +1 -1
  649. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_system_db-status_route_actions_0f864710.js +1 -1
  650. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_task-drafts_route_actions_3b90bec5.js +1 -1
  651. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_comments_route_actions_71745d03.js +1 -1
  652. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_costs_route_actions_e20adc3f.js +1 -1
  653. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_dependencies_route_actions_b85eaa7f.js +1 -1
  654. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_events_route_actions_3e2c7edc.js +1 -1
  655. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_history_route_actions_debb26dc.js +1 -1
  656. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_metrics_route_actions_a82052ba.js +1 -1
  657. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_pause_route_actions_1341b4e1.js +1 -1
  658. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_replan_route_actions_0d67ebea.js +1 -1
  659. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_restart_route_actions_bbd1883b.js +1 -1
  660. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_resume_route_actions_745fbaa8.js +1 -1
  661. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_rollback_route_actions_77968f37.js +1 -1
  662. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_route_actions_766df5f7.js +1 -1
  663. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_schedule_route_actions_943bcc22.js +1 -1
  664. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_start_route_actions_1d7e784a.js +1 -1
  665. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_stop_route_actions_5f5d6ff0.js +1 -1
  666. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_heartbeat_route_actions_28915a39.js +1 -1
  667. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_history_route_actions_7ecd517e.js +1 -1
  668. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_logs_route_actions_e1a486bd.js +1 -1
  669. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_logs_stream_route_actions_ed381b79.js +1 -1
  670. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_route_actions_8de83605.js +1 -1
  671. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_extract_route_actions_2651c393.js +1 -1
  672. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_route_actions_84c37746.js +1 -1
  673. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_stream_route_actions_37a289da.js +1 -1
  674. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_thread-export_route_actions_26354edd.js +1 -1
  675. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_thread-repos_route_actions_e95d24ee.js +1 -1
  676. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_threads_knowledge_route_actions_c139bcf7.js +1 -1
  677. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_threads_route_actions_f9ea97f2.js +1 -1
  678. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_upload_[id]_route_actions_d9c30458.js +1 -1
  679. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_upload_route_actions_f15ed185.js +1 -1
  680. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_user-settings_route_actions_553a1208.js +1 -1
  681. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_userPreferences_route_actions_178deeb3.js +1 -1
  682. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_migrate_workspaces-to-projects_route_actions_cb1e42e0.js +1 -1
  683. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_cancel_route_actions_8b9cd080.js +1 -1
  684. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_signal_route_actions_5a3d8250.js +1 -1
  685. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_start_route_actions_08f1c94e.js +1 -1
  686. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_status_route_actions_4062630f.js +1 -1
  687. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_complete_route_actions_c44e3cb4.js +1 -1
  688. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_fail_route_actions_7ff931bc.js +1 -1
  689. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_resume_route_actions_a9f01d21.js +1 -1
  690. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_stop_route_actions_dbea30a3.js +1 -1
  691. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_verify_route_actions_ff371970.js +1 -1
  692. package/cloud-runtime/standalone/.next/server/chunks/lib_2492d514._.js +11 -37
  693. package/cloud-runtime/standalone/.next/server/chunks/lib_3c080873._.js +34 -0
  694. package/cloud-runtime/standalone/.next/server/chunks/lib_70cd6b4a._.js +80 -0
  695. package/cloud-runtime/standalone/.next/server/chunks/lib_7f7835f1._.js +68 -0
  696. package/cloud-runtime/standalone/.next/server/chunks/lib_88726721._.js +79 -0
  697. package/cloud-runtime/standalone/.next/server/chunks/lib_98ae187c._.js +34 -0
  698. package/cloud-runtime/standalone/.next/server/chunks/lib_9f439b27._.js +25 -0
  699. package/cloud-runtime/standalone/.next/server/chunks/lib_check-node-version_ts_ef89bf83._.js +1 -1
  700. package/cloud-runtime/standalone/.next/server/chunks/lib_db_ts_e06c6085._.js +1 -1
  701. package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_2e721df2._.js +3 -3
  702. package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_74d1c060._.js +3 -3
  703. package/cloud-runtime/standalone/.next/server/chunks/lib_orchestrator_chat-processor_ts_4c335719._.js +4 -4
  704. package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_3ea4d849._.js +5 -5
  705. package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_b0b1a9b2._.js +5 -5
  706. package/cloud-runtime/standalone/.next/server/chunks/lib_vault-store_ts_3718ff79._.js +34 -0
  707. package/cloud-runtime/standalone/.next/server/chunks/node_modules_18a495c8._.js +3 -0
  708. package/cloud-runtime/standalone/.next/server/chunks/node_modules_4223ed10._.js +3 -0
  709. package/cloud-runtime/standalone/.next/server/chunks/node_modules_ccc242ec._.js +4 -0
  710. package/cloud-runtime/standalone/.next/server/chunks/node_modules_d2858615._.js +3 -0
  711. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_1402a1da._.js +3 -3
  712. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0f808fa3.js +1 -1
  713. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_19315704.js +2 -2
  714. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_2aaf71c8.js +1 -1
  715. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_2bdede98.js +1 -1
  716. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_371d0bff.js +15 -15
  717. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3d31fed0.js +1 -1
  718. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_57a073eb.js +1 -1
  719. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_63e89275.js +1 -1
  720. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_84e28f38.js +1 -1
  721. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_9aff0990.js +3 -0
  722. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cc6c687d.js +1 -1
  723. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_dcaa7800.js +3 -0
  724. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_def8bfbe.js +2 -2
  725. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_e0cc2bbf.js +1 -1
  726. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fce9bc95.js +3 -0
  727. package/cloud-runtime/standalone/.next/server/chunks/node_modules_zod_v4_classic_external_fa90cebf.js +3 -3
  728. package/cloud-runtime/standalone/.next/server/chunks/src_graph_12d46a92._.js +3 -0
  729. package/cloud-runtime/standalone/.next/server/chunks/src_graph_138dc200._.js +59 -0
  730. package/cloud-runtime/standalone/.next/server/chunks/src_graph_914bb19c._.js +59 -0
  731. package/cloud-runtime/standalone/.next/server/chunks/src_graph_api-route-utils_ts_b7225a0e._.js +1 -1
  732. package/cloud-runtime/standalone/.next/server/chunks/src_graph_executor_ts_55c06268._.js +3 -3
  733. package/cloud-runtime/standalone/.next/server/chunks/src_graph_executor_ts_a8bc8d58._.js +3 -3
  734. package/cloud-runtime/standalone/.next/server/chunks/src_graph_scheduler_ts_d7b7497d._.js +57 -0
  735. package/cloud-runtime/standalone/.next/server/chunks/src_graph_state-machine_ts_ae1de66e._.js +1 -1
  736. package/cloud-runtime/standalone/.next/server/chunks/src_graph_store_ts_d6588a77._.js +56 -0
  737. package/cloud-runtime/standalone/.next/server/chunks/src_graph_validate_ts_a06b9fab._.js +1 -1
  738. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__0497a547._.js +15 -0
  739. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__056cdf7d._.js +1 -1
  740. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__11e33b9b._.js +1 -1
  741. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__139838ab._.js +3 -0
  742. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__19cd257e._.js +1 -1
  743. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__26d669c2._.js +1 -1
  744. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__351b2cc6._.js +1 -1
  745. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__35f9b4a6._.js +3 -0
  746. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__38071250._.js +1 -1
  747. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__43a0398d._.js +3 -0
  748. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__4ebf5947._.js +1 -1
  749. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__5ffa2883._.js +1 -1
  750. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__67d5f883._.js +1 -1
  751. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__6e83bf83._.js +1 -1
  752. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__71b6d8a9._.js +3 -0
  753. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__7d279e62._.js +3 -0
  754. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__7e7d6790._.js +3 -0
  755. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8fe8b9dd._.js +1 -1
  756. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a0a1cb74._.js +1 -1
  757. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a42e4555._.js +3 -0
  758. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a667191a._.js +1 -1
  759. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__aa28d46f._.js +1 -1
  760. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__b6598a70._.js +3 -0
  761. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ba4308c3._.js +3 -0
  762. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bb149a22._.js +3 -0
  763. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bd4d5430._.js +1 -1
  764. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bde5bc78._.js +1 -1
  765. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__cde88183._.js +1 -1
  766. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__d36dd8bc._.js +1 -1
  767. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__dac5ab29._.js +1 -1
  768. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__e0c64529._.js +1 -1
  769. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__e87ba2b0._.js +1 -1
  770. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f2c3b7ab._.js +3 -0
  771. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f62d412e._.js +1 -1
  772. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f63d6594._.js +1 -1
  773. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__fbd1aaff._.js +1 -1
  774. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__febbd0b8._.js +1 -1
  775. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ff22a10e._.js +1 -1
  776. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ffbc2e98._.js +2 -2
  777. package/cloud-runtime/standalone/.next/server/chunks/ssr/_02c78cac._.js +2 -2
  778. package/cloud-runtime/standalone/.next/server/chunks/ssr/_05c8a494._.js +1 -1
  779. package/cloud-runtime/standalone/.next/server/chunks/ssr/_087a5b2b._.js +3 -0
  780. package/cloud-runtime/standalone/.next/server/chunks/ssr/_0b36c9d6._.js +2 -2
  781. package/cloud-runtime/standalone/.next/server/chunks/ssr/_0ff7c687._.js +3 -3
  782. package/cloud-runtime/standalone/.next/server/chunks/ssr/_0ffd2660._.js +2 -2
  783. package/cloud-runtime/standalone/.next/server/chunks/ssr/_11ce4c04._.js +95 -0
  784. package/cloud-runtime/standalone/.next/server/chunks/ssr/_173da79d._.js +2 -2
  785. package/cloud-runtime/standalone/.next/server/chunks/ssr/_1c58ab2d._.js +2 -2
  786. package/cloud-runtime/standalone/.next/server/chunks/ssr/_1e5aee62._.js +3 -0
  787. package/cloud-runtime/standalone/.next/server/chunks/ssr/_222af282._.js +2 -2
  788. package/cloud-runtime/standalone/.next/server/chunks/ssr/_22e99a52._.js +3 -0
  789. package/cloud-runtime/standalone/.next/server/chunks/ssr/_23f5fddc._.js +1 -1
  790. package/cloud-runtime/standalone/.next/server/chunks/ssr/_24feb541._.js +2 -2
  791. package/cloud-runtime/standalone/.next/server/chunks/ssr/_260b10ce._.js +3 -0
  792. package/cloud-runtime/standalone/.next/server/chunks/ssr/_3aa32c11._.js +2 -2
  793. package/cloud-runtime/standalone/.next/server/chunks/ssr/_43472af3._.js +1 -1
  794. package/cloud-runtime/standalone/.next/server/chunks/ssr/_45f91a8f._.js +3 -0
  795. package/cloud-runtime/standalone/.next/server/chunks/ssr/_47e9a061._.js +14 -0
  796. package/cloud-runtime/standalone/.next/server/chunks/ssr/_4bfdfb14._.js +1 -1
  797. package/cloud-runtime/standalone/.next/server/chunks/ssr/_4d4ba84b._.js +2 -2
  798. package/cloud-runtime/standalone/.next/server/chunks/ssr/_50d04b8f._.js +2 -2
  799. package/cloud-runtime/standalone/.next/server/chunks/ssr/_52fe115d._.js +1 -1
  800. package/cloud-runtime/standalone/.next/server/chunks/ssr/_547b6462._.js +2 -2
  801. package/cloud-runtime/standalone/.next/server/chunks/ssr/_629dc55c._.js +2 -2
  802. package/cloud-runtime/standalone/.next/server/chunks/ssr/_69164b06._.js +95 -0
  803. package/cloud-runtime/standalone/.next/server/chunks/ssr/_84a166cb._.js +3 -0
  804. package/cloud-runtime/standalone/.next/server/chunks/ssr/_93914ecd._.js +2 -2
  805. package/cloud-runtime/standalone/.next/server/chunks/ssr/_95434d70._.js +3 -0
  806. package/cloud-runtime/standalone/.next/server/chunks/ssr/_a10eb951._.js +2 -2
  807. package/cloud-runtime/standalone/.next/server/chunks/ssr/_a1b966f7._.js +1 -1
  808. package/cloud-runtime/standalone/.next/server/chunks/ssr/_aa5b4886._.js +8 -0
  809. package/cloud-runtime/standalone/.next/server/chunks/ssr/_ae20456d._.js +2 -2
  810. package/cloud-runtime/standalone/.next/server/chunks/ssr/_cb4d8a23._.js +2 -2
  811. package/cloud-runtime/standalone/.next/server/chunks/ssr/_cee3cf86._.js +95 -0
  812. package/cloud-runtime/standalone/.next/server/chunks/ssr/_dc2072e7._.js +4 -0
  813. package/cloud-runtime/standalone/.next/server/chunks/ssr/_e04b4053._.js +2 -2
  814. package/cloud-runtime/standalone/.next/server/chunks/ssr/_e1769638._.js +3 -3
  815. package/cloud-runtime/standalone/.next/server/chunks/ssr/_f1465cc8._.js +2 -2
  816. package/cloud-runtime/standalone/.next/server/chunks/ssr/_f2a7beb1._.js +2 -2
  817. package/cloud-runtime/standalone/.next/server/chunks/ssr/_fb404ac0._.js +3 -0
  818. package/cloud-runtime/standalone/.next/server/chunks/ssr/_fc1aaf9e._.js +2 -2
  819. package/cloud-runtime/standalone/.next/server/chunks/ssr/_fd0dda03._.js +2 -2
  820. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_75761787.js +1 -1
  821. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_554ec2bf.js +1 -1
  822. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_agents_[id]_page_actions_45703105.js +1 -1
  823. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_agents_page_actions_2bceb931.js +1 -1
  824. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_automations_page_actions_415dbaa9.js +1 -1
  825. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_board_page_actions_469e0e61.js +1 -1
  826. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_execution-graph_page_actions_3eceb5c1.js +1 -1
  827. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_page_actions_39d4fc33.js +1 -1
  828. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_automations_page_actions_9371bc66.js +1 -1
  829. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_graph_[taskId]_page_actions_c1473d77.js +1 -1
  830. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_knowledge_page_actions_1037c40a.js +1 -1
  831. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_linear_page_actions_0a8dc487.js +3 -0
  832. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_orphans_page_actions_6f398ff8.js +1 -1
  833. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_page_actions_42ca3f3e.js +1 -1
  834. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_settings_page_actions_840229cd.js +1 -1
  835. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_status_page_actions_39bbdbbf.js +1 -1
  836. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_thread_[id]_page_actions_94774546.js +1 -1
  837. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_welcome_page_actions_e32fb27e.js +1 -1
  838. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_[id]_page_tsx_9c49d8c8._.js +1 -1
  839. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_layout_tsx_b9360330._.js +1 -1
  840. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_page_tsx_f5f08ed8._.js +1 -1
  841. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_execution-graph_page_tsx_f854185a._.js +2 -2
  842. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_global-error_tsx_9170b7a0._.js +1 -1
  843. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_graph_[taskId]_page_tsx_d8b1d582._.js +2 -2
  844. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_knowledge_page_tsx_e2a55cbd._.js +1 -1
  845. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_layout_tsx_67c9550a._.js +1 -1
  846. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_linear_page_tsx_971a6ba7._.js +39 -0
  847. package/cloud-runtime/standalone/.next/server/chunks/ssr/ce889_server_app_projects_[slug]_thread_[threadId]_page_actions_660a8857.js +1 -1
  848. package/cloud-runtime/standalone/.next/server/chunks/ssr/components_PromptJobBoard_tsx_f83f722f._.js +8 -0
  849. package/cloud-runtime/standalone/.next/server/chunks/ssr/components_chat-ui_bfeda794._.js +6 -6
  850. package/cloud-runtime/standalone/.next/server/chunks/ssr/components_graph_graph-derived_ts_2b94148f._.js +1 -1
  851. package/cloud-runtime/standalone/.next/server/chunks/ssr/components_thread_WorkspaceSidebar_tsx_e660301b._.js +1 -1
  852. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_@dnd-kit_core_dist_core_esm_57071f37.js +1 -1
  853. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_f76a24fb._.js +1 -1
  854. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_e8bdedc5._.js +3 -0
  855. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_03ec2107._.js +2 -2
  856. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_174ae28d._.js +3 -3
  857. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_4b63a0e1._.js +1 -1
  858. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_61a87db9._.js +1 -1
  859. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_9774470f._.js +1 -1
  860. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js +1 -1
  861. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_15817684.js +1 -1
  862. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_61c49327.js +2 -2
  863. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js +2 -2
  864. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_f2865b38._.js +2 -2
  865. package/cloud-runtime/standalone/.next/server/edge/chunks/[root-of-the-server]__9491d0b8._.js +2 -2
  866. package/cloud-runtime/standalone/.next/server/edge/chunks/_52aa5b93._.js +1 -1
  867. package/cloud-runtime/standalone/.next/server/edge/chunks/node_modules_next_dist_esm_build_templates_edge-wrapper_3b93bb62.js +1 -1
  868. package/cloud-runtime/standalone/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_405b82a5.js +1 -1
  869. package/cloud-runtime/standalone/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_cd32efca.js +1 -1
  870. package/cloud-runtime/standalone/.next/server/functions-config-manifest.json +9 -2
  871. package/cloud-runtime/standalone/.next/server/instrumentation.js +2 -2
  872. package/cloud-runtime/standalone/.next/server/middleware-build-manifest.js +6 -6
  873. package/cloud-runtime/standalone/.next/server/middleware-manifest.json +5 -5
  874. package/cloud-runtime/standalone/.next/server/next-font-manifest.js +1 -1
  875. package/cloud-runtime/standalone/.next/server/next-font-manifest.json +4 -0
  876. package/cloud-runtime/standalone/.next/server/pages/404.html +2 -2
  877. package/cloud-runtime/standalone/.next/server/pages/500.html +2 -2
  878. package/cloud-runtime/standalone/.next/server/server-reference-manifest.js +1 -1
  879. package/cloud-runtime/standalone/.next/server/server-reference-manifest.json +1 -1
  880. package/cloud-runtime/standalone/.next/static/chunks/0010f3df27ae53b8.js +1 -0
  881. package/cloud-runtime/standalone/.next/static/chunks/012b9216c9932478.js +1 -0
  882. package/cloud-runtime/standalone/.next/static/chunks/{8304e8487aa74059.css → 06003b84da346995.css} +0 -1
  883. package/cloud-runtime/standalone/.next/static/chunks/081fcf3ea160ca2d.js +1 -0
  884. package/cloud-runtime/standalone/.next/static/chunks/09c637be82a06122.js +1 -0
  885. package/cloud-runtime/standalone/.next/static/chunks/0c5b9fe15dda4972.js +1 -0
  886. package/cloud-runtime/standalone/.next/static/chunks/0fe219bd73492107.js +5 -0
  887. package/cloud-runtime/standalone/.next/static/chunks/14922fd23cdc223b.js +1 -0
  888. package/cloud-runtime/standalone/.next/static/chunks/1d8496cecfe9a523.js +1 -0
  889. package/cloud-runtime/standalone/.next/static/chunks/1fa91c34c99502bf.js +1 -0
  890. package/cloud-runtime/standalone/.next/static/chunks/2375e3fd2a9b8844.js +2 -0
  891. package/cloud-runtime/standalone/.next/static/chunks/2618f9566e3788e4.js +1 -0
  892. package/cloud-runtime/standalone/.next/static/chunks/2a9c83f8211196e0.js +1 -0
  893. package/cloud-runtime/standalone/.next/static/chunks/2ac8e643e539b81e.js +1 -0
  894. package/cloud-runtime/standalone/.next/static/chunks/2dbfd095c1e1d01f.js +1 -0
  895. package/cloud-runtime/standalone/.next/static/chunks/2e471cd7ac5cd8fb.js +6 -0
  896. package/cloud-runtime/standalone/.next/static/chunks/335f551791affdd1.js +1 -0
  897. package/cloud-runtime/standalone/.next/static/chunks/34dd491bc4ce9561.js +1 -0
  898. package/cloud-runtime/standalone/.next/static/chunks/360fde144fd22461.js +1 -0
  899. package/cloud-runtime/standalone/.next/static/chunks/416cf5039e669b5d.js +1 -0
  900. package/cloud-runtime/standalone/.next/static/chunks/657c261f623752de.js +1 -0
  901. package/cloud-runtime/standalone/.next/static/chunks/66769c2bf128027d.js +1 -0
  902. package/cloud-runtime/standalone/.next/static/chunks/68586017f55137e8.js +1 -0
  903. package/cloud-runtime/standalone/.next/static/chunks/73e3194f06db260e.js +1 -0
  904. package/cloud-runtime/standalone/.next/static/chunks/76229fb555232113.js +3 -0
  905. package/cloud-runtime/standalone/.next/static/chunks/797fcb0710da3be2.js +4 -0
  906. package/cloud-runtime/standalone/.next/static/chunks/818fb0f154cee2c5.js +1 -0
  907. package/cloud-runtime/standalone/.next/static/chunks/8b40d0636a2ba3b0.js +28 -0
  908. package/cloud-runtime/standalone/.next/static/chunks/8fc3ed1915e0659b.js +88 -0
  909. package/cloud-runtime/standalone/.next/static/chunks/95b85b1cb6868d27.js +1 -0
  910. package/cloud-runtime/standalone/.next/static/chunks/961311cbebbffb6d.js +1 -0
  911. package/cloud-runtime/standalone/.next/static/chunks/963060cf6e72339b.js +6 -0
  912. package/cloud-runtime/standalone/.next/static/chunks/966278eaefc0aa32.js +1 -0
  913. package/cloud-runtime/standalone/.next/static/chunks/a2a98ae5d4a3e5e3.js +2 -0
  914. package/cloud-runtime/standalone/.next/static/chunks/a72fbac84e32f665.js +1 -0
  915. package/cloud-runtime/standalone/.next/static/chunks/aa4d86855d0a3a55.js +1 -0
  916. package/cloud-runtime/standalone/.next/static/chunks/ab74849aeb87503e.js +5 -0
  917. package/cloud-runtime/standalone/.next/static/chunks/b553dba1f51e709b.js +16 -0
  918. package/cloud-runtime/standalone/.next/static/chunks/b93f49b29a473a1d.js +6 -0
  919. package/cloud-runtime/standalone/.next/static/chunks/c3784233f00e1ff5.js +12 -0
  920. package/cloud-runtime/standalone/.next/static/chunks/c48afb0a7fd0423c.js +28 -0
  921. package/cloud-runtime/standalone/.next/static/chunks/{2d1d138d8ea3234c.css → c5661b1d4c5abd6a.css} +1 -0
  922. package/cloud-runtime/standalone/.next/static/chunks/cb6301624094c91e.js +1 -0
  923. package/cloud-runtime/standalone/.next/static/chunks/{787436fad75f5bc6.js → ccaf68956da192f8.js} +2 -2
  924. package/cloud-runtime/standalone/.next/static/chunks/d522224ad5c8d724.css +1 -0
  925. package/cloud-runtime/standalone/.next/static/chunks/d96012bcfc98706a.js +1 -0
  926. package/cloud-runtime/standalone/.next/static/chunks/da12f313213a5615.js +1 -0
  927. package/cloud-runtime/standalone/.next/static/chunks/de271f8f22d293b4.js +1 -0
  928. package/cloud-runtime/standalone/.next/static/chunks/e2fa3c18dd56dc25.js +1 -0
  929. package/cloud-runtime/standalone/.next/static/chunks/e910386016ceacad.js +37 -0
  930. package/cloud-runtime/standalone/.next/static/chunks/f2fe77583374541b.js +1 -0
  931. package/cloud-runtime/standalone/.next/static/chunks/f8cfa030ea3cb3c3.js +1 -0
  932. package/cloud-runtime/standalone/.next/static/chunks/turbopack-0ace1f53f3e3cf46.js +4 -0
  933. package/cloud-runtime/standalone/README.md +37 -5
  934. package/cloud-runtime/standalone/app/api/automations/create/route.ts +2 -2
  935. package/cloud-runtime/standalone/app/api/automations/route.ts +64 -17
  936. package/cloud-runtime/standalone/app/api/chat/route.ts +29 -3
  937. package/cloud-runtime/standalone/app/api/linear/auth/route.ts +14 -0
  938. package/cloud-runtime/standalone/app/api/linear/callback/route.ts +43 -0
  939. package/cloud-runtime/standalone/app/api/linear/cycles/route.ts +22 -0
  940. package/cloud-runtime/standalone/app/api/linear/issues/route.ts +66 -0
  941. package/cloud-runtime/standalone/app/api/linear/mcp-setup/route.ts +181 -0
  942. package/cloud-runtime/standalone/app/api/linear/runs/[id]/route.ts +81 -0
  943. package/cloud-runtime/standalone/app/api/linear/runs/route.ts +91 -0
  944. package/cloud-runtime/standalone/app/api/linear/status/route.ts +38 -0
  945. package/cloud-runtime/standalone/app/api/linear/token/route.ts +59 -0
  946. package/cloud-runtime/standalone/app/api/prompt-jobs/route.ts +1 -1
  947. package/cloud-runtime/standalone/app/api/providers/route.ts +1 -14
  948. package/cloud-runtime/standalone/app/api/status/route.ts +13 -13
  949. package/cloud-runtime/standalone/app/layout.tsx +2 -0
  950. package/cloud-runtime/standalone/app/projects/[slug]/knowledge/page.tsx +3 -181
  951. package/cloud-runtime/standalone/app/projects/[slug]/layout.tsx +2 -1
  952. package/cloud-runtime/standalone/app/projects/[slug]/linear/page.tsx +26 -0
  953. package/cloud-runtime/standalone/components/LinearBoard.tsx +1321 -0
  954. package/cloud-runtime/standalone/components/LinearSetup.tsx +239 -0
  955. package/cloud-runtime/standalone/components/ProjectModal.tsx +15 -3
  956. package/cloud-runtime/standalone/components/PromptJobBoard.tsx +367 -87
  957. package/cloud-runtime/standalone/components/VersionBadge.tsx +24 -0
  958. package/cloud-runtime/standalone/components/chat-ui/ChatContainer.tsx +27 -14
  959. package/cloud-runtime/standalone/components/chat-ui/Composer.tsx +23 -5
  960. package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +53 -48
  961. package/cloud-runtime/standalone/docs/superpowers/plans/2026-04-07-linear-integration.md +1352 -0
  962. package/cloud-runtime/standalone/hooks/useGroupChat.ts +4 -1
  963. package/cloud-runtime/standalone/hooks/useLinearConnection.ts +128 -0
  964. package/cloud-runtime/standalone/hooks/useLinearIssues.ts +78 -0
  965. package/cloud-runtime/standalone/hooks/useLinearRuns.ts +137 -0
  966. package/cloud-runtime/standalone/hooks/useProjectResources.ts +0 -50
  967. package/cloud-runtime/standalone/lib/chat/composer-routing.ts +128 -0
  968. package/cloud-runtime/standalone/lib/cli-runner.ts +16 -16
  969. package/cloud-runtime/standalone/lib/db.ts +32 -46
  970. package/cloud-runtime/standalone/lib/knowledge-notes.ts +6 -242
  971. package/cloud-runtime/standalone/lib/knowledge-store.ts +8 -211
  972. package/cloud-runtime/standalone/lib/linear-client.ts +276 -0
  973. package/cloud-runtime/standalone/lib/linear-execution-prompt.ts +153 -0
  974. package/cloud-runtime/standalone/lib/linear-run-store.ts +374 -0
  975. package/cloud-runtime/standalone/lib/repo-knowledge.ts +46 -125
  976. package/cloud-runtime/standalone/lib/shell-env.ts +71 -0
  977. package/cloud-runtime/standalone/lib/task-context.ts +3 -13
  978. package/cloud-runtime/standalone/lib/thread-knowledge.ts +2 -11
  979. package/cloud-runtime/standalone/lib/vault-store.ts +2067 -0
  980. package/cloud-runtime/standalone/mcp/README.md +22 -11
  981. package/cloud-runtime/standalone/package-lock.json +7 -0
  982. package/cloud-runtime/standalone/package.json +3 -0
  983. package/cloud-runtime/standalone/planning/automation-frontmatter-migration-spec.md +710 -0
  984. package/cloud-runtime/standalone/scripts/backfill-automations-frontmatter.ts +145 -0
  985. package/cloud-runtime/standalone/scripts/migrate-vault.ts +13 -0
  986. package/cloud-runtime/standalone/src/automations/adapters.ts +219 -0
  987. package/cloud-runtime/standalone/src/automations/index.ts +7 -0
  988. package/cloud-runtime/standalone/src/automations/parser.ts +33 -0
  989. package/cloud-runtime/standalone/src/automations/repository.ts +440 -0
  990. package/cloud-runtime/standalone/src/automations/serializer.ts +94 -0
  991. package/cloud-runtime/standalone/src/automations/state.ts +166 -0
  992. package/cloud-runtime/standalone/src/automations/types.ts +134 -0
  993. package/cloud-runtime/standalone/src/automations/validation.ts +337 -0
  994. package/cloud-runtime/standalone/src/graph/schedule-runner.ts +45 -7
  995. package/cloud-runtime/standalone/src/graph/store.ts +174 -5
  996. package/cloud-runtime/standalone/src/prompt-scheduler/store.ts +522 -162
  997. package/cloud-runtime/standalone/src/prompt-scheduler/types.ts +1 -0
  998. package/cloud-runtime/standalone/state/automations/.state/24a6a5db-3b14-49c4-841f-29f10f015fbb.json +8 -0
  999. package/cloud-runtime/standalone/state/automations/active/24a6a5db-3b14-49c4-841f-29f10f015fbb.md +17 -0
  1000. package/cloud-runtime/standalone/tsconfig.tsbuildinfo +1 -1
  1001. package/cloud-runtime/standalone/worker/index.js +4548 -367
  1002. package/package.json +1 -1
  1003. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route/app-paths-manifest.json +0 -3
  1004. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js +0 -9
  1005. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js.nft.json +0 -1
  1006. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route_client-reference-manifest.js +0 -2
  1007. package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route/app-paths-manifest.json +0 -3
  1008. package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js +0 -8
  1009. package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js.nft.json +0 -1
  1010. package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route_client-reference-manifest.js +0 -2
  1011. package/cloud-runtime/standalone/.next/server/chunks/[externals]__bc6c7111._.js +0 -3
  1012. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__01cd082e._.js +0 -13
  1013. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0936925d._.js +0 -3
  1014. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__09ca81e1._.js +0 -101
  1015. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1ac3236d._.js +0 -25
  1016. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1b0bb735._.js +0 -15
  1017. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1c86bf6e._.js +0 -48
  1018. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__20c58b41._.js +0 -46
  1019. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2126c763._.js +0 -42
  1020. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__236c35bb._.js +0 -51
  1021. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__277ed37d._.js +0 -3
  1022. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2f06f568._.js +0 -46
  1023. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__30bd0c87._.js +0 -13
  1024. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__374cd94c._.js +0 -42
  1025. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3785024c._.js +0 -80
  1026. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__379604d4._.js +0 -13
  1027. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c8f1de6._.js +0 -15
  1028. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3d0df5a8._.js +0 -8
  1029. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4014ed70._.js +0 -51
  1030. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42fcb81c._.js +0 -52
  1031. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a3cd6ac._.js +0 -13
  1032. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4e522535._.js +0 -6
  1033. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50c24784._.js +0 -3
  1034. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__59d1cdd8._.js +0 -3
  1035. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__644e6285._.js +0 -112
  1036. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__65755104._.js +0 -7
  1037. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__73c20995._.js +0 -15
  1038. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8125bbc3._.js +0 -63
  1039. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__85275b88._.js +0 -3
  1040. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__89666394._.js +0 -8
  1041. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8c0fb154._.js +0 -13
  1042. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8f5cac13._.js +0 -46
  1043. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__91b22098._.js +0 -8
  1044. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__96ae701e._.js +0 -3
  1045. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98ce983b._.js +0 -3
  1046. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9a9fd39f._.js +0 -44
  1047. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9ad4e385._.js +0 -3
  1048. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a01ddd0b._.js +0 -46
  1049. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a099c992._.js +0 -58
  1050. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a9b949c3._.js +0 -7
  1051. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bd43017b._.js +0 -3
  1052. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bf6fb108._.js +0 -80
  1053. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c0a18648._.js +0 -80
  1054. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c122c54a._.js +0 -75
  1055. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c5b8ceb7._.js +0 -3
  1056. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c8b49077._.js +0 -79
  1057. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dec3e1b7._.js +0 -30
  1058. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f1147a4a._.js +0 -15
  1059. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f5597fea._.js +0 -13
  1060. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f8c94cb3._.js +0 -8
  1061. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fa79d53f._.js +0 -46
  1062. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fb14cd4a._.js +0 -3
  1063. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fc27a898._.js +0 -158
  1064. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fce2cdce._.js +0 -3
  1065. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcf0b40a._.js +0 -3
  1066. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ffb21023._.js +0 -80
  1067. package/cloud-runtime/standalone/.next/server/chunks/_05fa3b89._.js +0 -46
  1068. package/cloud-runtime/standalone/.next/server/chunks/_4190f170._.js +0 -46
  1069. package/cloud-runtime/standalone/.next/server/chunks/_42e9c8d5._.js +0 -46
  1070. package/cloud-runtime/standalone/.next/server/chunks/_5ca51127._.js +0 -54
  1071. package/cloud-runtime/standalone/.next/server/chunks/_5fd6af5d._.js +0 -57
  1072. package/cloud-runtime/standalone/.next/server/chunks/_6519418b._.js +0 -59
  1073. package/cloud-runtime/standalone/.next/server/chunks/_6bb93816._.js +0 -6
  1074. package/cloud-runtime/standalone/.next/server/chunks/_6bc1b3e1._.js +0 -59
  1075. package/cloud-runtime/standalone/.next/server/chunks/_862895c0._.js +0 -57
  1076. package/cloud-runtime/standalone/.next/server/chunks/_8b9fde82._.js +0 -97
  1077. package/cloud-runtime/standalone/.next/server/chunks/_95ac98db._.js +0 -49
  1078. package/cloud-runtime/standalone/.next/server/chunks/_994414cd._.js +0 -54
  1079. package/cloud-runtime/standalone/.next/server/chunks/_99b78daf._.js +0 -46
  1080. package/cloud-runtime/standalone/.next/server/chunks/_affbdbb0._.js +0 -46
  1081. package/cloud-runtime/standalone/.next/server/chunks/_d22934ab._.js +0 -97
  1082. package/cloud-runtime/standalone/.next/server/chunks/_efc73784._.js +0 -46
  1083. package/cloud-runtime/standalone/.next/server/chunks/_fba13a4a._.js +0 -6
  1084. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_memory_route_actions_f0c255ef.js +0 -3
  1085. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_repos_[id]_knowledge_route_actions_993fe4e5.js +0 -3
  1086. package/cloud-runtime/standalone/.next/server/chunks/lib_281e5787._.js +0 -16
  1087. package/cloud-runtime/standalone/.next/server/chunks/lib_63067e21._.js +0 -16
  1088. package/cloud-runtime/standalone/.next/server/chunks/lib_87c06aeb._.js +0 -25
  1089. package/cloud-runtime/standalone/.next/server/chunks/lib_a5adca60._.js +0 -64
  1090. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7f8022ab.js +0 -3
  1091. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_8ec90680.js +0 -3
  1092. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_a590fcd6.js +0 -3
  1093. package/cloud-runtime/standalone/.next/server/chunks/src_graph_14067235._.js +0 -46
  1094. package/cloud-runtime/standalone/.next/server/chunks/src_graph_b63e2d39._.js +0 -46
  1095. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__096c39a3._.js +0 -3
  1096. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__226f8a19._.js +0 -15
  1097. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__47caef59._.js +0 -3
  1098. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8b4e7816._.js +0 -3
  1099. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a37fb1c3._.js +0 -3
  1100. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a456581d._.js +0 -3
  1101. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__d74022f1._.js +0 -3
  1102. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ea035cd9._.js +0 -3
  1103. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__fca7df40._.js +0 -3
  1104. package/cloud-runtime/standalone/.next/server/chunks/ssr/_0c5c111f._.js +0 -3
  1105. package/cloud-runtime/standalone/.next/server/chunks/ssr/_23656a95._.js +0 -3
  1106. package/cloud-runtime/standalone/.next/server/chunks/ssr/_27a789b3._.js +0 -3
  1107. package/cloud-runtime/standalone/.next/server/chunks/ssr/_314f4c49._.js +0 -14
  1108. package/cloud-runtime/standalone/.next/server/chunks/ssr/_36b413cc._.js +0 -3
  1109. package/cloud-runtime/standalone/.next/server/chunks/ssr/_46e00a9b._.js +0 -95
  1110. package/cloud-runtime/standalone/.next/server/chunks/ssr/_478f4991._.js +0 -3
  1111. package/cloud-runtime/standalone/.next/server/chunks/ssr/_547f19ec._.js +0 -3
  1112. package/cloud-runtime/standalone/.next/server/chunks/ssr/_85ca101b._.js +0 -8
  1113. package/cloud-runtime/standalone/.next/server/chunks/ssr/_9e07dcac._.js +0 -95
  1114. package/cloud-runtime/standalone/.next/server/chunks/ssr/_a68d8f62._.js +0 -3
  1115. package/cloud-runtime/standalone/.next/server/chunks/ssr/_a80e12c8._.js +0 -3
  1116. package/cloud-runtime/standalone/.next/server/chunks/ssr/_b1e1ef71._.js +0 -95
  1117. package/cloud-runtime/standalone/.next/server/chunks/ssr/_e1349560._.js +0 -3
  1118. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_welcome_page_tsx_6c79bc59._.js +0 -3
  1119. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_b82e03da._.js +0 -3
  1120. package/cloud-runtime/standalone/.next/static/chunks/01428247f94115a6.js +0 -1
  1121. package/cloud-runtime/standalone/.next/static/chunks/06cf0ed16bf8aa70.js +0 -28
  1122. package/cloud-runtime/standalone/.next/static/chunks/0bd6498bda341889.js +0 -1
  1123. package/cloud-runtime/standalone/.next/static/chunks/19dd745b663fdffa.js +0 -1
  1124. package/cloud-runtime/standalone/.next/static/chunks/1a3298f21d1040e9.js +0 -4
  1125. package/cloud-runtime/standalone/.next/static/chunks/1c8583feefee0765.js +0 -1
  1126. package/cloud-runtime/standalone/.next/static/chunks/1e3dede69b464364.js +0 -1
  1127. package/cloud-runtime/standalone/.next/static/chunks/238a28856e739dc9.js +0 -2
  1128. package/cloud-runtime/standalone/.next/static/chunks/24772e179852c73e.js +0 -1
  1129. package/cloud-runtime/standalone/.next/static/chunks/2deeba875ec50761.js +0 -1
  1130. package/cloud-runtime/standalone/.next/static/chunks/2e011469003993e9.js +0 -28
  1131. package/cloud-runtime/standalone/.next/static/chunks/31a4164e40ca71e5.js +0 -6
  1132. package/cloud-runtime/standalone/.next/static/chunks/3a55441b018d52e4.js +0 -1
  1133. package/cloud-runtime/standalone/.next/static/chunks/3c202e89da05d9b9.js +0 -1
  1134. package/cloud-runtime/standalone/.next/static/chunks/3c72becf6dff5597.js +0 -1
  1135. package/cloud-runtime/standalone/.next/static/chunks/44dafb5e85578e12.js +0 -16
  1136. package/cloud-runtime/standalone/.next/static/chunks/48e332ac3e9ed56c.js +0 -1
  1137. package/cloud-runtime/standalone/.next/static/chunks/5b567b289ca2273e.css +0 -1
  1138. package/cloud-runtime/standalone/.next/static/chunks/5c0819dcc4bfec85.js +0 -1
  1139. package/cloud-runtime/standalone/.next/static/chunks/5d52c79d9812d06e.js +0 -1
  1140. package/cloud-runtime/standalone/.next/static/chunks/617db51b7444f818.js +0 -1
  1141. package/cloud-runtime/standalone/.next/static/chunks/673bb6094cea9ded.js +0 -1
  1142. package/cloud-runtime/standalone/.next/static/chunks/687d09973325dcf8.js +0 -1
  1143. package/cloud-runtime/standalone/.next/static/chunks/8a4684388ca0f6de.js +0 -7
  1144. package/cloud-runtime/standalone/.next/static/chunks/9bde80696400d2ff.js +0 -12
  1145. package/cloud-runtime/standalone/.next/static/chunks/9f236cc9572783b9.js +0 -93
  1146. package/cloud-runtime/standalone/.next/static/chunks/a9aaec85125f69b1.js +0 -1
  1147. package/cloud-runtime/standalone/.next/static/chunks/ac9a7d8cf17b5d75.js +0 -1
  1148. package/cloud-runtime/standalone/.next/static/chunks/b4c29a62f9255268.js +0 -1
  1149. package/cloud-runtime/standalone/.next/static/chunks/b6bbe747d2b0dddb.js +0 -1
  1150. package/cloud-runtime/standalone/.next/static/chunks/badc6258750e247d.js +0 -1
  1151. package/cloud-runtime/standalone/.next/static/chunks/bc3cad3c821b169b.js +0 -2
  1152. package/cloud-runtime/standalone/.next/static/chunks/bf2bb1662353aff5.js +0 -1
  1153. package/cloud-runtime/standalone/.next/static/chunks/c1fb885eed94aa8c.js +0 -1
  1154. package/cloud-runtime/standalone/.next/static/chunks/c653186036e56204.js +0 -1
  1155. package/cloud-runtime/standalone/.next/static/chunks/cb5581d868e78205.js +0 -1
  1156. package/cloud-runtime/standalone/.next/static/chunks/cbdeb17a36b99000.js +0 -1
  1157. package/cloud-runtime/standalone/.next/static/chunks/d5cc62984dc4205c.js +0 -1
  1158. package/cloud-runtime/standalone/.next/static/chunks/d78cc7d749043fef.js +0 -1
  1159. package/cloud-runtime/standalone/.next/static/chunks/da2b00558cf32f37.js +0 -1
  1160. package/cloud-runtime/standalone/.next/static/chunks/ee5f1457fbc593e1.js +0 -1
  1161. package/cloud-runtime/standalone/.next/static/chunks/ff1a16fafef87110.js +0 -1
  1162. package/cloud-runtime/standalone/.next/static/chunks/turbopack-e1d640f2fbe4fa5e.js +0 -4
  1163. package/cloud-runtime/standalone/app/api/projects/[id]/memory/route.ts +0 -81
  1164. package/cloud-runtime/standalone/app/api/repos/[id]/knowledge/route.ts +0 -98
  1165. /package/cloud-runtime/standalone/.next/server/app/api/{projects/[id]/memory → linear/auth}/route/build-manifest.json +0 -0
  1166. /package/cloud-runtime/standalone/.next/server/app/api/{projects/[id]/memory → linear/auth}/route/server-reference-manifest.json +0 -0
  1167. /package/cloud-runtime/standalone/.next/server/app/api/{projects/[id]/memory → linear/auth}/route.js.map +0 -0
  1168. /package/cloud-runtime/standalone/.next/server/app/api/{repos/[id]/knowledge → linear/callback}/route/build-manifest.json +0 -0
  1169. /package/cloud-runtime/standalone/.next/server/app/api/{repos/[id]/knowledge → linear/callback}/route/server-reference-manifest.json +0 -0
  1170. /package/cloud-runtime/standalone/.next/server/app/api/{repos/[id]/knowledge → linear/callback}/route.js.map +0 -0
  1171. /package/cloud-runtime/standalone/.next/static/{uSe1ovd3mKmeJLdjjWIQA → 1ixi4WIJBgIPp7LJeYeKs}/_buildManifest.js +0 -0
  1172. /package/cloud-runtime/standalone/.next/static/{uSe1ovd3mKmeJLdjjWIQA → 1ixi4WIJBgIPp7LJeYeKs}/_clientMiddlewareManifest.json +0 -0
  1173. /package/cloud-runtime/standalone/.next/static/{uSe1ovd3mKmeJLdjjWIQA → 1ixi4WIJBgIPp7LJeYeKs}/_ssgManifest.js +0 -0
@@ -1,59 +0,0 @@
1
- module.exports=[48414,e=>{"use strict";e.s(["FAILURE_NODE_STATUSES",0,["failed"],"INCOMPLETE_FOR_DONE_STATUSES",0,["pending","running","awaiting_human","blocked"],"SOFT_DEP_SATISFIED_STATUSES",0,["done","passed","failed","skipped","blocked"],"SUCCESS_NODE_STATUSES",0,["done","passed"],"TERMINAL_NODE_STATUSES",0,["done","passed","failed","skipped"]])},4468,87098,39570,e=>{"use strict";class t extends Error{constructor(e){super(e),this.name="CelParseError"}}class n extends Error{constructor(e){super(e),this.name="CelEvaluationError"}}let r=function(e,t){return e===t||e!=e&&t!=t},i=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1};var s,a,o,l,u,c,h,d,f,p,m,g,y,v,E,T,O,S,k,I,_,N,A,x,w,b,R,C=Array.prototype.splice;function L(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}L.prototype.clear=function(){this.__data__=[],this.size=0},L.prototype.delete=function(e){var t=this.__data__,n=i(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),--this.size,!0)},L.prototype.get=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]},L.prototype.has=function(e){return i(this.__data__,e)>-1},L.prototype.set=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var M=e.g&&e.g.Object===Object&&e.g,D="object"==typeof self&&self&&self.Object===Object&&self,P=M||D||Function("return this")(),U=P.Symbol,F=Object.prototype,$=F.hasOwnProperty,j=F.toString,V=U?U.toStringTag:void 0;let W=function(e){var t=$.call(e,V),n=e[V];try{e[V]=void 0;var r=!0}catch(e){}var i=j.call(e);return r&&(t?e[V]=n:delete e[V]),i};var B=Object.prototype.toString,z=U?U.toStringTag:void 0;let H=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":z&&z in Object(e)?W(e):B.call(e)},G=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},K=function(e){if(!G(e))return!1;var t=H(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var Y=P["__core-js_shared__"],q=(d=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",Z=Function.prototype.toString;let J=function(e){if(null!=e){try{return Z.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var X=/^\[object .+?Constructor\]$/,Q=Object.prototype,ee=Function.prototype.toString,et=Q.hasOwnProperty,en=RegExp("^"+ee.call(et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let er=function(e){return!!G(e)&&(!q||!(q in e))&&(K(e)?en:X).test(J(e))},ei=function(e,t){var n=null==e?void 0:e[t];return er(n)?n:void 0};var es=ei(P,"Map"),ea=ei(Object,"create"),eo=Object.prototype.hasOwnProperty,el=Object.prototype.hasOwnProperty;function eu(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}eu.prototype.clear=function(){this.__data__=ea?ea(null):{},this.size=0},eu.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},eu.prototype.get=function(e){var t=this.__data__;if(ea){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return eo.call(t,e)?t[e]:void 0},eu.prototype.has=function(e){var t=this.__data__;return ea?void 0!==t[e]:el.call(t,e)},eu.prototype.set=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=ea&&void 0===t?"__lodash_hash_undefined__":t,this};let ec=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},eh=function(e,t){var n=e.__data__;return ec(t)?n["string"==typeof t?"string":"hash"]:n.map};function ed(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ef(e){var t=this.__data__=new L(e);this.size=t.size}ed.prototype.clear=function(){this.size=0,this.__data__={hash:new eu,map:new(es||L),string:new eu}},ed.prototype.delete=function(e){var t=eh(this,e).delete(e);return this.size-=!!t,t},ed.prototype.get=function(e){return eh(this,e).get(e)},ed.prototype.has=function(e){return eh(this,e).has(e)},ed.prototype.set=function(e,t){var n=eh(this,e),r=n.size;return n.set(e,t),this.size+=+(n.size!=r),this},ef.prototype.clear=function(){this.__data__=new L,this.size=0},ef.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ef.prototype.get=function(e){return this.__data__.get(e)},ef.prototype.has=function(e){return this.__data__.has(e)},ef.prototype.set=function(e,t){var n=this.__data__;if(n instanceof L){var r=n.__data__;if(!es||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ed(r)}return n.set(e,t),this.size=n.size,this};let ep=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e};var em=function(){try{var e=ei(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let eg=function(e,t,n){"__proto__"==t&&em?em(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var ey=Object.prototype.hasOwnProperty;let ev=function(e,t,n){var i=e[t];ey.call(e,t)&&r(i,n)&&(void 0!==n||t in e)||eg(e,t,n)},eE=function(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=r?r(n[o],e[o],o,n,e):void 0;void 0===l&&(l=e[o]),i?eg(n,o,l):ev(n,o,l)}return n},eT=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},eO=function(e){return null!=e&&"object"==typeof e},eS=function(e){return eO(e)&&"[object Arguments]"==H(e)};var ek=Object.prototype,eI=ek.hasOwnProperty,e_=ek.propertyIsEnumerable,eN=eS(function(){return arguments}())?eS:function(e){return eO(e)&&eI.call(e,"callee")&&!e_.call(e,"callee")},eA=Array.isArray;let ex=function(){return!1};var ew=/^(?:0|[1-9]\d*)$/;let eb=function(e,t){var n=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&ew.test(e))&&e>-1&&e%1==0&&e<t},eR=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff};var eC={};eC["[object Float32Array]"]=eC["[object Float64Array]"]=eC["[object Int8Array]"]=eC["[object Int16Array]"]=eC["[object Int32Array]"]=eC["[object Uint8Array]"]=eC["[object Uint8ClampedArray]"]=eC["[object Uint16Array]"]=eC["[object Uint32Array]"]=!0,eC["[object Arguments]"]=eC["[object Array]"]=eC["[object ArrayBuffer]"]=eC["[object Boolean]"]=eC["[object DataView]"]=eC["[object Date]"]=eC["[object Error]"]=eC["[object Function]"]=eC["[object Map]"]=eC["[object Number]"]=eC["[object Object]"]=eC["[object RegExp]"]=eC["[object Set]"]=eC["[object String]"]=eC["[object WeakMap]"]=!1;let eL=function(e){return function(t){return e(t)}};var eM=function(){try{return!1}catch(e){}}(),eD=eM&&eM.isTypedArray,eP=eD?eL(eD):function(e){return eO(e)&&eR(e.length)&&!!eC[H(e)]},eU=Object.prototype.hasOwnProperty;let eF=function(e,t){var n=eA(e),r=!n&&eN(e),i=!n&&!r&&ex(e),s=!n&&!r&&!i&&eP(e),a=n||r||i||s,o=a?eT(e.length,String):[],l=o.length;for(var u in e)(t||eU.call(e,u))&&!(a&&("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||eb(u,l)))&&o.push(u);return o};var e$=Object.prototype;let ej=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||e$)},eV=function(e,t){return function(n){return e(t(n))}};var eW=eV(Object.keys,Object),eB=Object.prototype.hasOwnProperty;let ez=function(e){if(!ej(e))return eW(e);var t=[];for(var n in Object(e))eB.call(e,n)&&"constructor"!=n&&t.push(n);return t},eH=function(e){return null!=e&&eR(e.length)&&!K(e)},eG=function(e){return eH(e)?eF(e):ez(e)},eK=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var eY=Object.prototype.hasOwnProperty;let eq=function(e){if(!G(e))return eK(e);var t=ej(e),n=[];for(var r in e)"constructor"==r&&(t||!eY.call(e,r))||n.push(r);return n},eZ=function(e){return eH(e)?eF(e,!0):eq(e)},eJ=function(e,t){if(t)return e.slice();var n=e.length,r=new e.constructor(n);return e.copy(r),r},eX=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},eQ=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s},e0=function(){return[]};var e1=Object.prototype.propertyIsEnumerable,e2=Object.getOwnPropertySymbols,e3=e2?function(e){return null==e?[]:eQ(e2(e=Object(e)),function(t){return e1.call(e,t)})}:e0;let e6=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e};var e4=eV(Object.getPrototypeOf,Object),e5=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)e6(t,e3(e)),e=e4(e);return t}:e0;let e8=function(e,t,n){var r=t(e);return eA(e)?r:e6(r,n(e))},e9=function(e){return e8(e,eG,e3)},e7=function(e){return e8(e,eZ,e5)};var te=ei(P,"DataView"),tt=ei(P,"Promise"),tn=ei(P,"Set"),tr=ei(P,"WeakMap"),ti="[object Map]",ts="[object Promise]",ta="[object Set]",to="[object WeakMap]",tl="[object DataView]",tu=J(te),tc=J(es),th=J(tt),td=J(tn),tf=J(tr),tp=H;(te&&tp(new te(new ArrayBuffer(1)))!=tl||es&&tp(new es)!=ti||tt&&tp(tt.resolve())!=ts||tn&&tp(new tn)!=ta||tr&&tp(new tr)!=to)&&(tp=function(e){var t=H(e),n="[object Object]"==t?e.constructor:void 0,r=n?J(n):"";if(r)switch(r){case tu:return tl;case tc:return ti;case th:return ts;case td:return ta;case tf:return to}return t});let tm=tp;var tg=Object.prototype.hasOwnProperty;let ty=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&tg.call(e,"index")&&(n.index=e.index,n.input=e.input),n};var tv=P.Uint8Array;let tE=function(e){var t=new e.constructor(e.byteLength);return new tv(t).set(new tv(e)),t},tT=function(e,t){var n=t?tE(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var tO=/\w*$/;let tS=function(e){var t=new e.constructor(e.source,tO.exec(e));return t.lastIndex=e.lastIndex,t};var tk=U?U.prototype:void 0,tI=tk?tk.valueOf:void 0;let t_=function(e,t){var n=t?tE(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},tN=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return tE(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return tT(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return t_(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return tS(e);case"[object Symbol]":return tI?Object(tI.call(e)):{}}};var tA=Object.create,tx=function(){function e(){}return function(t){if(!G(t))return{};if(tA)return tA(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),tw=eM&&eM.isMap,tb=tw?eL(tw):function(e){return eO(e)&&"[object Map]"==tm(e)},tR=eM&&eM.isSet,tC=tR?eL(tR):function(e){return eO(e)&&"[object Set]"==tm(e)},tL="[object Arguments]",tM="[object Function]",tD="[object Object]",tP={};tP[tL]=tP["[object Array]"]=tP["[object ArrayBuffer]"]=tP["[object DataView]"]=tP["[object Boolean]"]=tP["[object Date]"]=tP["[object Float32Array]"]=tP["[object Float64Array]"]=tP["[object Int8Array]"]=tP["[object Int16Array]"]=tP["[object Int32Array]"]=tP["[object Map]"]=tP["[object Number]"]=tP[tD]=tP["[object RegExp]"]=tP["[object Set]"]=tP["[object String]"]=tP["[object Symbol]"]=tP["[object Uint8Array]"]=tP["[object Uint8ClampedArray]"]=tP["[object Uint16Array]"]=tP["[object Uint32Array]"]=!0,tP["[object Error]"]=tP[tM]=tP["[object WeakMap]"]=!1;let tU=function e(t,n,r,i,s,a){var o,l=1&n,u=2&n,c=4&n;if(r&&(o=s?r(t,i,s,a):r(t)),void 0!==o)return o;if(!G(t))return t;var h=eA(t);if(h){if(o=ty(t),!l)return eX(t,o)}else{var d,f,p,m,g,y=tm(t),v=y==tM||"[object GeneratorFunction]"==y;if(ex(t))return eJ(t,l);if(y==tD||y==tL||v&&!s){if(o=u||v||"function"!=typeof(d=t).constructor||ej(d)?{}:tx(e4(d)),!l)return u?(p=(f=o)&&eE(t,eZ(t),f),eE(t,e5(t),p)):(g=(m=o)&&eE(t,eG(t),m),eE(t,e3(t),g))}else{if(!tP[y])return s?t:{};o=tN(t,y,l)}}a||(a=new ef);var E=a.get(t);if(E)return E;a.set(t,o),tC(t)?t.forEach(function(i){o.add(e(i,n,r,i,t,a))}):tb(t)&&t.forEach(function(i,s){o.set(s,e(i,n,r,s,t,a))});var T=c?u?e7:e9:u?eZ:eG,O=h?void 0:T(t);return ep(O||t,function(i,s){O&&(i=t[s=i]),ev(o,s,e(i,n,r,s,t,a))}),o},tF=function(e){return tU(e,4)},t$=function(e,t,n){for(var r=-1,i=Object(e),s=n(e),a=s.length;a--;){var o=s[++r];if(!1===t(i[o],o,i))break}return e};var tj=(f=function(e,t){return e&&t$(e,t,eG)},function(e,t){if(null==e)return e;if(!eH(e))return f(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););return e});let tV=function(e){return e},tW=function(e,t){return(eA(e)?ep:tj)(e,"function"==typeof t?t:tV)};var tB=Object.prototype.hasOwnProperty;let tz=function(e,t){return null!=e&&tB.call(e,t)},tH=function(e){return"symbol"==typeof e||eO(e)&&"[object Symbol]"==H(e)};var tG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tK=/^\w*$/;let tY=function(e,t){if(eA(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||tH(e))||tK.test(e)||!tG.test(e)||null!=t&&e in Object(t)};function tq(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(tq.Cache||ed),n}tq.Cache=ed;var tZ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tJ=/\\(\\)?/g,tX=(m=(p=tq(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(tZ,function(e,n,r,i){t.push(r?i.replace(tJ,"$1"):n||e)}),t},function(e){return 500===m.size&&m.clear(),e})).cache,p);let tQ=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var t0=1/0,t1=U?U.prototype:void 0,t2=t1?t1.toString:void 0;let t3=function e(t){if("string"==typeof t)return t;if(eA(t))return tQ(t,e)+"";if(tH(t))return t2?t2.call(t):"";var n=t+"";return"0"==n&&1/t==-t0?"-0":n},t6=function(e,t){return eA(e)?e:tY(e,t)?[e]:tX(null==e?"":t3(e))};var t4=1/0;let t5=function(e){if("string"==typeof e||tH(e))return e;var t=e+"";return"0"==t&&1/e==-t4?"-0":t},t8=function(e,t,n){t=t6(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=t5(t[r]);if(!(s=null!=e&&n(e,a)))break;e=e[a]}return s||++r!=i?s:!!(i=null==e?0:e.length)&&eR(i)&&eb(a,i)&&(eA(e)||eN(e))},t9=function(e,t){return null!=e&&t8(e,t,tz)};var t7=Object.prototype.hasOwnProperty;let ne=function(e){if(null==e)return!0;if(eH(e)&&(eA(e)||"string"==typeof e||"function"==typeof e.splice||ex(e)||eP(e)||eN(e)))return!e.length;var t=tm(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(ej(e))return!ez(e).length;for(var n in e)if(t7.call(e,n))return!1;return!0};function nt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ed;++t<n;)this.add(e[t])}nt.prototype.add=nt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},nt.prototype.has=function(e){return this.__data__.has(e)};let nn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},nr=function(e,t){return e.has(t)},ni=function(e,t,n,r,i,s){var a=1&n,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var u=s.get(e),c=s.get(t);if(u&&c)return u==t&&c==e;var h=-1,d=!0,f=2&n?new nt:void 0;for(s.set(e,t),s.set(t,e);++h<o;){var p=e[h],m=t[h];if(r)var g=a?r(m,p,h,t,e,s):r(p,m,h,e,t,s);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!nn(t,function(e,t){if(!nr(f,t)&&(p===e||i(p,e,n,r,s)))return f.push(t)})){d=!1;break}}else if(!(p===m||i(p,m,n,r,s))){d=!1;break}}return s.delete(e),s.delete(t),d},ns=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},na=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n};var no=U?U.prototype:void 0,nl=no?no.valueOf:void 0;let nu=function(e,t,n,i,s,a,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!a(new tv(e),new tv(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=ns;case"[object Set]":var u=1&i;if(l||(l=na),e.size!=t.size&&!u)break;var c=o.get(e);if(c)return c==t;i|=2,o.set(e,t);var h=ni(l(e),l(t),i,s,a,o);return o.delete(e),h;case"[object Symbol]":if(nl)return nl.call(e)==nl.call(t)}return!1};var nc=Object.prototype.hasOwnProperty;let nh=function(e,t,n,r,i,s){var a=1&n,o=e9(e),l=o.length;if(l!=e9(t).length&&!a)return!1;for(var u=l;u--;){var c=o[u];if(!(a?c in t:nc.call(t,c)))return!1}var h=s.get(e),d=s.get(t);if(h&&d)return h==t&&d==e;var f=!0;s.set(e,t),s.set(t,e);for(var p=a;++u<l;){var m=e[c=o[u]],g=t[c];if(r)var y=a?r(g,m,c,t,e,s):r(m,g,c,e,t,s);if(!(void 0===y?m===g||i(m,g,n,r,s):y)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var v=e.constructor,E=t.constructor;v!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof E&&E instanceof E)&&(f=!1)}return s.delete(e),s.delete(t),f};var nd="[object Arguments]",nf="[object Array]",np="[object Object]",nm=Object.prototype.hasOwnProperty;let ng=function(e,t,n,r,i,s){var a=eA(e),o=eA(t),l=a?nf:tm(e),u=o?nf:tm(t);l=l==nd?np:l,u=u==nd?np:u;var c=l==np,h=u==np,d=l==u;if(d&&ex(e)){if(!ex(t))return!1;a=!0,c=!1}if(d&&!c)return s||(s=new ef),a||eP(e)?ni(e,t,n,r,i,s):nu(e,t,l,n,r,i,s);if(!(1&n)){var f=c&&nm.call(e,"__wrapped__"),p=h&&nm.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return s||(s=new ef),i(m,g,n,r,s)}}return!!d&&(s||(s=new ef),nh(e,t,n,r,i,s))},ny=function e(t,n,r,i,s){return t===n||(null!=t&&null!=n&&(eO(t)||eO(n))?ng(t,n,r,i,e,s):t!=t&&n!=n)},nv=function(e,t,n,r){var i=n.length,s=i,a=!r;if(null==e)return!s;for(e=Object(e);i--;){var o=n[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){var l=(o=n[i])[0],u=e[l],c=o[1];if(a&&o[2]){if(void 0===u&&!(l in e))return!1}else{var h=new ef;if(r)var d=r(u,c,l,e,t,h);if(!(void 0===d?ny(c,u,3,r,h):d))return!1}}return!0},nE=function(e){return e==e&&!G(e)},nT=function(e){for(var t=eG(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,nE(i)]}return t},nO=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},nS=function(e){var t=nT(e);return 1==t.length&&t[0][2]?nO(t[0][0],t[0][1]):function(n){return n===e||nv(n,e,t)}},nk=function(e,t){t=t6(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[t5(t[n++])];return n&&n==r?e:void 0},nI=function(e,t,n){var r=null==e?void 0:nk(e,t);return void 0===r?n:r},n_=function(e,t){return null!=e&&t in Object(e)},nN=function(e){var t;return tY(e)?(t=t5(e),function(e){return null==e?void 0:e[t]}):function(t){return nk(t,e)}},nA=function(e){if("function"==typeof e)return e;if(null==e)return tV;if("object"==typeof e){var t,n;return eA(e)?(t=e[0],n=e[1],tY(t)&&nE(n)?nO(t5(t),n):function(e){var r=nI(e,t);return void 0===r&&r===n?null!=e&&t8(e,t,n_):ny(n,r,3)}):nS(e)}return nN(e)},nx=function(e,t){var n=-1,r=eH(e)?Array(e.length):[];return tj(e,function(e,i,s){r[++n]=t(e,i,s)}),r},nw=function(e,t){return(eA(e)?tQ:nx)(e,nA(t,3))},nb=function(e){return null==e?[]:tQ(eG(e),function(t){return e[t]})};function nR(e){console&&console.error&&console.error(`Error: ${e}`)}function nC(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function nL(e){let t=new Date().getTime(),n=e();return{time:new Date().getTime()-t,value:n}}function nM(e){function t(){}t.prototype=e;let n=new t;function r(){return typeof n.bar}return r(),r(),e}let nD=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s};var nP=/\s/;let nU=function(e){for(var t=e.length;t--&&nP.test(e.charAt(t)););return t};var nF=/^\s+/,n$=0/0,nj=/^[-+]0x[0-9a-f]+$/i,nV=/^0b[01]+$/i,nW=/^0o[0-7]+$/i,nB=parseInt;let nz=function(e){if("number"==typeof e)return e;if(tH(e))return n$;if(G(e)){var t,n="function"==typeof e.valueOf?e.valueOf():e;e=G(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=(t=e)?t.slice(0,nU(t)+1).replace(nF,""):t;var r=nV.test(e);return r||nW.test(e)?nB(e.slice(2),r?2:8):nj.test(e)?n$:+e};var nH=1/0;let nG=function(e){var t,n=(t=e)?(t=nz(t))===nH||t===-nH?(t<0?-1:1)*17976931348623157e292:t==t?t:0:0===t?t:0,r=n%1;return n==n?r?n-r:n:0},nK=function(e,t,n){var r=null==e?0:e.length;return r?nD(e,(t=n||void 0===t?1:nG(t))<0?0:t,r):[]},nY=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var nq=Math.max,nZ=Date.now,nJ=(g=em?function(e,t){return em(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tV,y=0,v=0,function(){var e=nZ(),t=16-(e-v);if(v=e,t>0){if(++y>=800)return arguments[0]}else y=0;return g.apply(void 0,arguments)});let nX=function(e,t){var n;return nJ((n=nq(void 0===(n=t)?e.length-1:n,0),function(){for(var t=arguments,r=-1,i=nq(t.length-n,0),s=Array(i);++r<i;)s[r]=t[n+r];r=-1;for(var a=Array(n+1);++r<n;)a[r]=t[r];return a[n]=tV(s),nY(e,this,a)}),e+"")},nQ=function(e,t,n){if(!G(n))return!1;var i=typeof t;return("number"==i?!!(eH(n)&&eb(t,n.length)):"string"==i&&t in n)&&r(n[t],e)};var n0=Object.prototype.hasOwnProperty,n1=(E=function(e,t){if(ej(t)||eH(t))return void eE(t,eG(t),e);for(var n in t)n0.call(t,n)&&ev(e,n,t[n])},nX(function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,s=r>2?t[2]:void 0;for(i=E.length>3&&"function"==typeof i?(r--,i):void 0,s&&nQ(t[0],t[1],s)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var a=t[n];a&&E(e,a,n,i)}return e})),n2=eM&&eM.isRegExp,n3=n2?eL(n2):function(e){return eO(e)&&"[object RegExp]"==H(e)};let n6=function(e){return"string"==typeof e||!eA(e)&&eO(e)&&"[object String]"==H(e)},n4=function(e,t,n,r){if(!G(e))return e;t=t6(t,e);for(var i=-1,s=t.length,a=s-1,o=e;null!=o&&++i<s;){var l=t5(t[i]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)break;if(i!=a){var c=o[l];void 0===(u=r?r(c,l,o):void 0)&&(u=G(c)?c:eb(t[i+1])?[]:{})}ev(o,l,u),o=o[l]}return e},n5=function(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var a=t[r],o=nk(e,a);n(o,a)&&n4(s,t6(a,e),o)}return s},n8=function(e,t){if(null==e)return{};var n=tQ(e7(e),function(e){return[e]});return t=nA(t),n5(e,n,function(e,n){return t(e,n[0])})};class n9{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),tW(this.definition,t=>{t.accept(e)})}}class n7 extends n9{constructor(e){super([]),this.idx=1,n1(this,n8(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class re extends n9{constructor(e){super(e.definition),this.orgText="",n1(this,n8(e,e=>void 0!==e))}}class rt extends n9{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,n1(this,n8(e,e=>void 0!==e))}}class rn extends n9{constructor(e){super(e.definition),this.idx=1,n1(this,n8(e,e=>void 0!==e))}}class rr extends n9{constructor(e){super(e.definition),this.idx=1,n1(this,n8(e,e=>void 0!==e))}}class ri extends n9{constructor(e){super(e.definition),this.idx=1,n1(this,n8(e,e=>void 0!==e))}}class rs extends n9{constructor(e){super(e.definition),this.idx=1,n1(this,n8(e,e=>void 0!==e))}}class ra extends n9{constructor(e){super(e.definition),this.idx=1,n1(this,n8(e,e=>void 0!==e))}}class ro extends n9{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,n1(this,n8(e,e=>void 0!==e))}}class rl{constructor(e){this.idx=1,n1(this,n8(e,e=>void 0!==e))}accept(e){e.visit(this)}}class ru{visit(e){switch(e.constructor){case n7:return this.visitNonTerminal(e);case rt:return this.visitAlternative(e);case rn:return this.visitOption(e);case rr:return this.visitRepetitionMandatory(e);case ri:return this.visitRepetitionMandatoryWithSeparator(e);case ra:return this.visitRepetitionWithSeparator(e);case rs:return this.visitRepetition(e);case ro:return this.visitAlternation(e);case rl:return this.visitTerminal(e);case re:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}let rc=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},rh=function(e,t){var n=!0;return tj(e,function(e,r,i){return n=!!t(e,r,i)}),n},rd=function(e,t,n){var r=eA(e)?rc:rh;return n&&nQ(e,t,n)&&(t=void 0),r(e,nA(t,3))},rf=function(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return -1},rp=function(e){return e!=e},rm=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return -1},rg=function(e,t,n){return t==t?rm(e,t,n):rf(e,rp,n)};var ry=Math.max;let rv=function(e,t,n,r){e=eH(e)?e:nb(e),n=n&&!r?nG(n):0;var i=e.length;return n<0&&(n=ry(i+n,0)),n6(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&rg(e,t,n)>-1},rE=function(e,t){var n;return tj(e,function(e,r,i){return!(n=t(e,r,i))}),!!n},rT=function(e,t,n){var r=eA(e)?nn:rE;return n&&nQ(e,t,n)&&(t=void 0),r(e,nA(t,3))};function rO(e,t=[]){return e instanceof rn||e instanceof rs||e instanceof ra||(e instanceof ro?rT(e.definition,e=>rO(e,t)):!(e instanceof n7&&rv(t,e))&&e instanceof n9&&(e instanceof n7&&t.push(e),rd(e.definition,e=>rO(e,t))))}function rS(e){if(e instanceof n7)return"SUBRULE";if(e instanceof rn)return"OPTION";if(e instanceof ro)return"OR";if(e instanceof rr)return"AT_LEAST_ONE";if(e instanceof ri)return"AT_LEAST_ONE_SEP";else if(e instanceof ra)return"MANY_SEP";else if(e instanceof rs)return"MANY";else if(e instanceof rl)return"CONSUME";else throw Error("non exhaustive match")}class rk{walk(e,t=[]){tW(e.definition,(n,r)=>{let i=nK(e.definition,r+1);if(n instanceof n7)this.walkProdRef(n,i,t);else if(n instanceof rl)this.walkTerminal(n,i,t);else if(n instanceof rt)this.walkFlat(n,i,t);else if(n instanceof rn)this.walkOption(n,i,t);else if(n instanceof rr)this.walkAtLeastOne(n,i,t);else if(n instanceof ri)this.walkAtLeastOneSep(n,i,t);else if(n instanceof ra)this.walkManySep(n,i,t);else if(n instanceof rs)this.walkMany(n,i,t);else if(n instanceof ro)this.walkOr(n,i,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){let r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){let r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){let r=[new rn({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=rI(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new rn({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=rI(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);tW(e.definition,e=>{let t=new rt({definition:[e]});this.walk(t,r)})}}function rI(e,t,n){return[new rn({definition:[new rl({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}var r_=U?U.isConcatSpreadable:void 0;let rN=function(e){return eA(e)||eN(e)||!!(r_&&e&&e[r_])},rA=function e(t,n,r,i,s){var a=-1,o=t.length;for(r||(r=rN),s||(s=[]);++a<o;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,i,s):e6(s,l):i||(s[s.length]=l)}return s},rx=function(e){return(null==e?0:e.length)?rA(e,1):[]},rw=function(e,t){return!!(null==e?0:e.length)&&rg(e,t,0)>-1},rb=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1},rR=function(){};var rC=tn&&1/na(new tn([,-0]))[1]==1/0?function(e){return new tn(e)}:rR;let rL=function(e,t,n){var r=-1,i=rw,s=e.length,a=!0,o=[],l=o;if(n)a=!1,i=rb;else if(s>=200){var u=t?null:rC(e);if(u)return na(u);a=!1,i=nr,l=new nt}else l=t?[]:o;e:for(;++r<s;){var c=e[r],h=t?t(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),o.push(c)}else i(l,h,n)||(l!==o&&l.push(h),o.push(c))}return o},rM=function(e){return e&&e.length?rL(e):[]};function rD(e){if(e instanceof n7)return rD(e.referencedRule);if(e instanceof rl)return[e.terminalType];if(e instanceof rt||e instanceof rn||e instanceof rs||e instanceof rr||e instanceof ri||e instanceof ra||e instanceof rl||e instanceof re)return function(e){let t,n=[],r=e.definition,i=0,s=r.length>i,a=!0;for(;s&&a;)a=rO(t=r[i]),n=n.concat(rD(t)),i+=1,s=r.length>i;return rM(n)}(e);if(e instanceof ro)return rM(rx(nw(e.definition,e=>rD(e))));throw Error("non exhaustive match")}let rP="_~IN~_";class rU extends rk{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){var r,i;let s=(r=e.referencedRule,i=e.idx,r.name+i+rP+this.topProd.name),a=rD(new rt({definition:t.concat(n)}));this.follows[s]=a}}let rF=function(e){return void 0===e};function r$(e){return e.charCodeAt(0)}function rj(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function rV(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t],e[t]=!0}function rW(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function rB(){throw Error("Internal Error - Should never get here!")}function rz(e){return"Character"===e.type}let rH=[];for(let e=r$("0");e<=r$("9");e++)rH.push(e);let rG=[r$("_")].concat(rH);for(let e=r$("a");e<=r$("z");e++)rG.push(e);for(let e=r$("A");e<=r$("Z");e++)rG.push(e);let rK=[r$(" "),r$("\f"),r$("\n"),r$("\r"),r$(" "),r$("\v"),r$(" "),r$(" "),r$(" "),r$(" "),r$(" "),r$(" "),r$(" "),r$(" "),r$(" "),r$(" "),r$(" "),r$(" "),r$(" "),r$(" "),r$("\u2028"),r$("\u2029"),r$(" "),r$(" "),r$(" "),r$("\uFEFF")],rY=/[0-9a-fA-F]/,rq=/[0-9]/,rZ=/[1-9]/;class rJ{visitChildren(e){for(let t in e){let n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}let rX=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var s=e[t];s&&(i[r++]=s)}return i};var rQ=Object.prototype,r0=rQ.hasOwnProperty,r1=nX(function(e,t){e=Object(e);var n=-1,i=t.length,s=i>2?t[2]:void 0;for(s&&nQ(t[0],t[1],s)&&(i=1);++n<i;)for(var a=t[n],o=eZ(a),l=-1,u=o.length;++l<u;){var c=o[l],h=e[c];(void 0===h||r(h,rQ[c])&&!r0.call(e,c))&&(e[c]=a[c])}return e});let r2=function(e,t,n,r){var i=-1,s=rw,a=!0,o=e.length,l=[],u=t.length;if(!o)return l;n&&(t=tQ(t,eL(n))),r?(s=rb,a=!1):t.length>=200&&(s=nr,a=!1,t=new nt(t));e:for(;++i<o;){var c=e[i],h=null==n?c:n(c);if(c=r||0!==c?c:0,a&&h==h){for(var d=u;d--;)if(t[d]===h)continue e;l.push(c)}else s(t,h,r)||l.push(c)}return l},r3=function(e){return eO(e)&&eH(e)};var r6=nX(function(e,t){return r3(e)?r2(e,rA(t,1,r3,!0)):[]});let r4=function(e,t){var n=[];return tj(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n},r5=function(e,t){return(eA(e)?eQ:r4)(e,nA(t,3))};var r8=Math.max,r9=(T=function(e,t,n){var r=null==e?0:e.length;if(!r)return -1;var i=null==n?0:nG(n);return i<0&&(i=r8(r+i,0)),rf(e,nA(t,3),i)},function(e,t,n){var r=Object(e);if(!eH(e)){var i=nA(t,3);e=eG(e),t=function(e){return i(r[e],e,r)}}var s=T(e,t,n);return s>-1?r[i?e[s]:s]:void 0});let r7=function(e){return e&&e.length?e[0]:void 0};var ie=Math.max;let it=function(e,t,n){var r=null==e?0:e.length;if(!r)return -1;var i=null==n?0:nG(n);return i<0&&(i=ie(r+i,0)),rg(e,t,i)},ir=function(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n},ii=function(e,t,n,r,i){return i(e,function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)}),n},is=function(e,t,n){var r=eA(e)?ir:ii,i=arguments.length<3;return r(e,nA(t,4),n,i,tj)},ia=function(e){if("function"!=typeof e)throw TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}},io=function(e,t){return(eA(e)?eQ:r4)(e,ia(nA(t,3)))},il={},iu=new class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let t=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":rV(n,"global");break;case"i":rV(n,"ignoreCase");break;case"m":rV(n,"multiLine");break;case"u":rV(n,"unicode");break;case"y":rV(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":let t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}rW(t);let n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return rB()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":let r=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:r,atMost:r};break;case",":t=this.isDigit()?{atLeast:r,atMost:this.integerIncludingZero()}:{atLeast:r,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;rW(t)}if((!0!==e||void 0!==t)&&rW(t))return"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return(void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),rW(e))?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):rB()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[r$("\n"),r$("\r"),r$("\u2028"),r$("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=rH;break;case"D":e=rH,t=!0;break;case"s":e=rK;break;case"S":e=rK,t=!0;break;case"w":e=rG;break;case"W":e=rG,t=!0}return rW(e)?{type:"Set",value:e,complement:t}:rB()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=r$("\f");break;case"n":e=r$("\n");break;case"r":e=r$("\r");break;case"t":e=r$(" ");break;case"v":e=r$("\v")}return rW(e)?{type:"Character",value:e}:rB()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:r$("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:r$(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:r$(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){let t=this.classAtom();if(t.type,rz(t)&&this.isRangeDash()){this.consumeChar("-");let n=this.classAtom();if(n.type,rz(n)){if(n.value<t.value)throw Error("Range out of order in character class");e.push({from:t.value,to:n.value})}else rj(t.value,e),e.push(r$("-")),rj(n.value,e)}else rj(t.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:r$("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;this.consumeChar("("),"?"===this.peekChar(0)?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;let t=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:e,value:t};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(!1===rZ.test(e))throw Error("Expecting a positive integer");for(;rq.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===rq.test(e))throw Error("Expecting an integer");for(;rq.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:r$(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return rq.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}}isQuantifier(){let e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let n=0;n<e;n++){let e=this.popChar();if(!1===rY.test(e))throw Error("Expecting a HexDecimal digits");t+=e}return{type:"Character",value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}};function ic(e){let t=e.toString();if(il.hasOwnProperty(t))return il[t];{let e=iu.pattern(t);return il[t]=e,e}}let ih="Complement Sets are not supported for first char optimization",id='Unable to use "first char" lexer optimizations:\n';function ip(e,t,n){let r=iL(e);t[r]=r,!0===n&&function(e,t){let n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){let e=iL(r.charCodeAt(0));t[e]=e}else{let e=n.toLowerCase();if(e!==n){let n=iL(e.charCodeAt(0));t[n]=n}}}(e,t)}function im(e,t){return r9(e.value,e=>"number"==typeof e?rv(t,e):void 0!==r9(t,t=>e.from<=t&&t<=e.to))}class ig extends rJ{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){rv(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===im(e,this.targetCharCodes)&&(this.found=!0):void 0!==im(e,this.targetCharCodes)&&(this.found=!0)}}function iy(e,t){if(!(t instanceof RegExp))return void 0!==r9(t,t=>rv(e,t.charCodeAt(0)));{let n=ic(t),r=new ig(e);return r.visit(n),r.found}}let iv="PATTERN",iE="defaultMode",iT="modes",iO="boolean"==typeof RegExp("(?:)").sticky,iS=/[^\\][$]/,ik=/[^\\[][\^]|^\^/;function iI(e){let t=e.ignoreCase?"i":"";return RegExp(`^(?:${e.source})`,t)}function i_(e){let t=e.ignoreCase?"iy":"y";return RegExp(`${e.source}`,t)}function iN(e){let t=e.PATTERN;if(n3(t))return!1;if(K(t))return!0;if(t9(t,"exec"))return!0;if(n6(t))return!1;throw Error("non exhaustive match")}function iA(e){return!!n6(e)&&1===e.length&&e.charCodeAt(0)}let ix={test:function(e){let t=e.length;for(let n=this.lastIndex;n<t;n++){let t=e.charCodeAt(n);if(10===t)return this.lastIndex=n+1,!0;if(13===t)return 10===e.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function iw(e,t){if(t9(e,"LINE_BREAKS"))return!1;if(n3(e.PATTERN)){try{iy(t,e.PATTERN)}catch(e){return{issue:s.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(n6(e.PATTERN))return!1;if(iN(e))return{issue:s.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function ib(e){return nw(e,e=>n6(e)?e.charCodeAt(0):e)}function iR(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}let iC=[];function iL(e){return e<256?e:iC[e]}let iM=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};function iD(e,t){let n=e.tokenTypeIdx;return n===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[n]}function iP(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}let iU=1,iF={};function i$(e){let t=function(e){let t=tF(e),n=e,r=!0;for(;r;){let e=r6(n=rX(rx(nw(n,e=>e.CATEGORIES))),t);t=t.concat(e),ne(e)?r=!1:n=e}return t}(e);tW(t,e=>{ij(e)||(iF[iU]=e,e.tokenTypeIdx=iU++),iV(e)&&!eA(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),iV(e)||(e.CATEGORIES=[]),t9(e,"categoryMatches")||(e.categoryMatches=[]),t9(e,"categoryMatchesMap")||(e.categoryMatchesMap={})}),tW(t,e=>{!function e(t,n){tW(t,e=>{n.categoryMatchesMap[e.tokenTypeIdx]=!0}),tW(n.CATEGORIES,r=>{let i=t.concat(n);rv(i,r)||e(i,r)})}([],e)}),tW(t,e=>{e.categoryMatches=[],tW(e.categoryMatchesMap,(t,n)=>{e.categoryMatches.push(iF[n].tokenTypeIdx)})}),tW(t,e=>{e.isParent=e.categoryMatches.length>0})}function ij(e){return t9(e,"tokenTypeIdx")}function iV(e){return t9(e,"CATEGORIES")}function iW(e){return t9(e,"tokenTypeIdx")}(O=s||(s={}))[O.MISSING_PATTERN=0]="MISSING_PATTERN",O[O.INVALID_PATTERN=1]="INVALID_PATTERN",O[O.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",O[O.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",O[O.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",O[O.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",O[O.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",O[O.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",O[O.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",O[O.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",O[O.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",O[O.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",O[O.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",O[O.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",O[O.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",O[O.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",O[O.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",O[O.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";let iB={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:{buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`},traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(iB);class iz{constructor(e,t=iB){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0!==this.traceInitPerf)return t();{this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:i}=nL(t),s=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=n1({},iB,t);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,r=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===iB.lineTerminatorsPattern)this.config.lineTerminatorsPattern=ix;else if(this.config.lineTerminatorCharacters===iB.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),eA(e)?n={modes:{defaultMode:tF(e)},defaultMode:iE}:(r=!1,n=tF(e))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{var e;let t;this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat((e=n,this.trackStartLines,this.config.lineTerminatorCharacters,t=[],t9(e,iE)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+iE+"> property in its definition\n",type:s.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),t9(e,iT)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+iT+"> property in its definition\n",type:s.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),t9(e,iT)&&t9(e,iE)&&!t9(e.modes,e.defaultMode)&&t.push({message:`A MultiMode Lexer cannot be initialized with a ${iE}: <${e.defaultMode}>which does not exist
2
- `,type:s.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),t9(e,iT)&&tW(e.modes,(e,n)=>{tW(e,(r,i)=>{rF(r)?t.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${i}>
3
- `,type:s.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):t9(r,"LONGER_ALT")&&tW(eA(r.LONGER_ALT)?r.LONGER_ALT:[r.LONGER_ALT],i=>{rF(i)||rv(e,i)||t.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${r.name}> outside of mode <${n}>
4
- `,type:s.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),t))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{var e,t,r;let i,a,o,l;this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat((e=n,t=this.trackStartLines,r=this.config.lineTerminatorCharacters,i=[],a=!1,o=io(rX(rx(nb(e.modes))),e=>e[iv]===iz.NA),l=ib(r),t&&tW(o,e=>{let t=iw(e,l);if(!1!==t){let n={message:function(e,t){if(t.issue===s.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
5
- The problem is in the <${e.name}> Token Type
6
- Root cause: ${t.errMsg}.
7
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===s.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
8
- The problem is in the <${e.name}> Token Type
9
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(e,t),type:t.issue,tokenType:e};i.push(n)}else t9(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(a=!0):iy(l,e.PATTERN)&&(a=!0)}),t&&!a&&i.push({message:"Warning: No LINE_BREAKS Found.\n This Lexer has been defined to track line and column information,\n But none of the Token Types can be identified as matching a line terminator.\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n for details.",type:s.NO_LINE_BREAKS_FLAGS}),i))})),n.modes=n.modes?n.modes:{},tW(n.modes,(e,t)=>{n.modes[t]=io(e,e=>rF(e))});let i=eG(n.modes);if(tW(n.modes,(e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{var t,n,r,a,o,l;let u,c,h,d,f,p,m,g,y,v,E,T;this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat((u=[],c={errors:nw(f=r5(t=e,e=>!t9(e,iv)),e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:s.MISSING_PATTERN,tokenTypes:[e]})),valid:r6(t,f)},u=u.concat(c.errors),d=(h={errors:nw(p=r5(n=c.valid,e=>{let t=e[iv];return!n3(t)&&!K(t)&&!t9(t,"exec")&&!n6(t)}),e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:s.INVALID_PATTERN,tokenTypes:[e]})),valid:r6(n,p)}).valid,u=(u=(u=(u=(u=u.concat(h.errors)).concat((m=[],g=r5(d,e=>n3(e[iv])),(m=(m=(m=(m=m.concat(function(e){class t extends rJ{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return nw(r5(e,e=>{let n=e.PATTERN;try{let e=ic(n),r=new t;return r.visit(e),r.found}catch(e){return iS.test(n.source)}}),e=>({message:"Unexpected RegExp Anchor Error:\n Token Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",type:s.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}(g))).concat(function(e){class t extends rJ{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return nw(r5(e,e=>{let n=e.PATTERN;try{let e=ic(n),r=new t;return r.visit(e),r.found}catch(e){return ik.test(n.source)}}),e=>({message:"Unexpected RegExp Anchor Error:\n Token Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",type:s.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}(g))).concat(nw(r5(g,e=>{let t=e[iv];return t instanceof RegExp&&(t.multiline||t.global)}),e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:s.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]})))).concat((y=[],v=nw(r=g,e=>is(r,(t,n)=>(e.PATTERN.source!==n.PATTERN.source||rv(y,n)||n.PATTERN===iz.NA||(y.push(n),t.push(n)),t),[])),nw(r5(v=rX(v),e=>e.length>1),e=>{let t=nw(e,e=>e.name),n=r7(e).PATTERN;return{message:`The same RegExp pattern ->${n}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:s.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})))).concat(nw(r5(g,e=>e.PATTERN.test("")),e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:s.EMPTY_MATCH_PATTERN,tokenTypes:[e]})))))).concat(nw(r5(d,e=>{if(!t9(e,"GROUP"))return!1;let t=e.GROUP;return t!==iz.SKIPPED&&t!==iz.NA&&!n6(t)}),e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:s.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]})))).concat((a=d,o=i,nw(r5(a,e=>void 0!==e.PUSH_MODE&&!rv(o,e.PUSH_MODE)),e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:s.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))))).concat((E=[],T=is(l=d,(e,t,n)=>{var r;let i=t.PATTERN;return i===iz.NA||(n6(i)?e.push({str:i,idx:n,tokenType:t}):n3(i)&&(r=i,void 0===r9([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==r.source.indexOf(e)))&&e.push({str:i.source,idx:n,tokenType:t})),e},[]),tW(l,(e,t)=>{tW(T,({str:n,idx:r,tokenType:i})=>{if(t<r&&function(e,t){if(n3(t)){let n=t.exec(e);return null!==n&&0===n.index}if(K(t))return t(e,0,[],{});if(t9(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(n,e.PATTERN)){let t=`Token: ->${i.name}<- can never be matched.
10
- Because it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.
11
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;E.push({message:t,type:s.UNREACHABLE_PATTERN,tokenTypes:[e,i]})}})}),E))))}),ne(this.lexerDefinitionErrors)){let r;i$(e),this.TRACE_INIT("analyzeTokenTypes",()=>{var n;let i,s,a,o,l,u,c,h,d,f,p,m,g,y,v,E;(g=(n=r1(n={lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT},{useSticky:iO,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()})).tracer)("initCharCodeToOptimizedIndexMap",()=>{if(ne(iC)){iC=Array(65536);for(let e=0;e<65536;e++)iC[e]=e>255?255+~~(e/255):e}}),g("Reject Lexer.NA",()=>{i=io(e,e=>e[iv]===iz.NA)}),y=!1,g("Transform Patterns",()=>{y=!1,s=nw(i,e=>{let t=e[iv];if(n3(t)){let e=t.source;return 1!==e.length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||rv(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?n.useSticky?i_(t):iI(t):e[1]:e}if(K(t))return y=!0,{exec:t};if("object"==typeof t)return y=!0,t;if("string"==typeof t)if(1===t.length)return t;else{let e=new RegExp(t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"));return n.useSticky?i_(e):iI(e)}throw Error("non exhaustive match")})}),g("misc mapping",()=>{a=nw(i,e=>e.tokenTypeIdx),o=nw(i,e=>{let t=e.GROUP;if(t!==iz.SKIPPED){if(n6(t))return t;if(rF(t))return!1;throw Error("non exhaustive match")}}),l=nw(i,e=>{let t=e.LONGER_ALT;if(t)return eA(t)?nw(t,e=>it(i,e)):[it(i,t)]}),u=nw(i,e=>e.PUSH_MODE),c=nw(i,e=>t9(e,"POP_MODE"))}),g("Line Terminator Handling",()=>{let e=ib(n.lineTerminatorCharacters);h=nw(i,e=>!1),"onlyOffset"!==n.positionTracking&&(h=nw(i,t=>t9(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===iw(t,e)&&iy(e,t.PATTERN)))}),g("Misc Mapping #2",()=>{d=nw(i,iN),f=nw(s,iA),p=is(i,(e,t)=>{let n=t.GROUP;return n6(n)&&n!==iz.SKIPPED&&(e[n]=[]),e},{}),m=nw(s,(e,t)=>({pattern:s[t],longerAlt:l[t],canLineTerminator:h[t],isCustom:d[t],short:f[t],group:o[t],push:u[t],pop:c[t],tokenTypeIdx:a[t],tokenType:i[t]}))}),v=!0,E=[],n.safeMode||g("First Char Optimization",()=>{E=is(i,(e,t,r)=>{if("string"==typeof t.PATTERN)iR(e,iL(t.PATTERN.charCodeAt(0)),m[r]);else if(eA(t.START_CHARS_HINT)){let n;tW(t.START_CHARS_HINT,t=>{let i=iL("string"==typeof t?t.charCodeAt(0):t);n!==i&&(n=i,iR(e,i,m[r]))})}else if(n3(t.PATTERN))if(t.PATTERN.unicode)v=!1,n.ensureOptimizations&&nR(`${id} Unable to analyze < ${t.PATTERN.toString()} > pattern.
12
- The regexp unicode flag is not currently supported by the regexp-to-ast library.
13
- This will disable the lexer's first char optimizations.
14
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let i=function(e,t=!1){try{let t=ic(e);return function e(t,n,r){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)e(t.value[i],n,r);break;case"Alternative":let i=t.value;for(let t=0;t<i.length;t++){let s=i[t];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}switch(s.type){case"Character":ip(s.value,n,r);break;case"Set":if(!0===s.complement)throw Error(ih);tW(s.value,e=>{if("number"==typeof e)ip(e,n,r);else if(!0===r)for(let t=e.from;t<=e.to;t++)ip(t,n,r);else{for(let t=e.from;t<=e.to&&t<256;t++)ip(t,n,r);if(e.to>=256){let t=e.from>=256?e.from:256,r=e.to,i=iL(t),s=iL(r);for(let e=i;e<=s;e++)n[e]=e}}});break;case"Group":e(s.value,n,r);break;default:throw Error("Non Exhaustive Match")}let a=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===function e(t){let n=t.quantifier;return!!n&&0===n.atLeast||!!t.value&&(eA(t.value)?rd(t.value,e):e(t.value))}(s)||"Group"!==s.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return nb(n)}(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===ih)t&&nC(`${id} Unable to optimize: < ${e.toString()} >
15
- Complement Sets cannot be automatically optimized.
16
- This will disable the lexer's first char optimizations.
17
- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n="\n This will disable the lexer's first char optimizations.\n See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),nR(`${id}
18
- Failed parsing: < ${e.toString()} >
19
- Using the @chevrotain/regexp-to-ast library
20
- Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}(t.PATTERN,n.ensureOptimizations);ne(i)&&(v=!1),tW(i,t=>{iR(e,t,m[r])})}else n.ensureOptimizations&&nR(`${id} TokenType: <${t.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
21
- This will disable the lexer's first char optimizations.
22
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),v=!1;return e},[])}),r={emptyGroups:p,patternIdxToConfig:m,charCodeToPatternIdxToConfig:E,hasCustom:y,canBeOptimized:v}}),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=n1({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,!ne(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw Error("Errors detected in definition of Lexer:\n"+nw(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n"));tW(this.lexerDefinitionWarning,e=>{nC(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(iO?(this.chopInput=tV,this.match=this.matchWithTest):(this.updateLastIndex=rR,this.match=this.matchWithExec),r&&(this.handleModes=rR),!1===this.trackStartLines&&(this.computeNewColumn=tV),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=rR),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let e=is(this.canModeBeOptimized,(e,t,n)=>(!1===t&&e.push(n),e),[]);if(t.ensureOptimizations&&!ne(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.
23
- Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
24
- Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{il={}}),this.TRACE_INIT("toFastProperties",()=>{nM(this)})})}tokenize(e,t=this.defaultMode){if(!ne(this.lexerDefinitionErrors))throw Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+nw(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n"));return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){var n;let r,i,s,a,o,l,u,c,h,d,f,p,m,g,y,v,E,T,O=e,S=O.length,k=0,I=0,_=Array(this.hasCustom?0:Math.floor(e.length/10)),N=[],A=this.trackStartLines?1:void 0,x=this.trackStartLines?1:void 0,w=(n=this.emptyGroups,T={},tW(eG(n),e=>{if(eA(n[e]))T[e]=[];else throw Error("non exhaustive match")}),T),b=this.trackStartLines,R=this.config.lineTerminatorsPattern,C=0,L=[],M=[],D=[],P=[];function U(){return L}function F(e){let t=M[iL(e)];return void 0===t?P:t}Object.freeze(P);let $=e=>{if(1===D.length&&void 0===e.tokenType.PUSH_MODE){let t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);N.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{D.pop();let e=iM(D);L=this.patternIdxToConfig[e],M=this.charCodeToPatternIdxToConfig[e],C=L.length;let t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;v=M&&t?F:U}};function j(e){D.push(e),M=this.charCodeToPatternIdxToConfig[e],C=(L=this.patternIdxToConfig[e]).length,C=L.length;let t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;v=M&&t?F:U}j.call(this,t);let V=this.config.recoveryEnabled;for(;k<S;){l=null;let t=O.charCodeAt(k),n=v(t),T=n.length;for(r=0;r<T;r++){let i=(E=n[r]).pattern;u=null;let h=E.short;if(!1!==h?t===h&&(l=i):!0===E.isCustom?null!==(y=i.exec(O,k,_,w))?(l=y[0],void 0!==y.payload&&(u=y.payload)):l=null:(this.updateLastIndex(i,k),l=this.match(i,e,k)),null!==l){if(void 0!==(o=E.longerAlt)){let t=o.length;for(s=0;s<t;s++){let t=L[o[s]],n=t.pattern;if(c=null,!0===t.isCustom?null!==(y=n.exec(O,k,_,w))?(a=y[0],void 0!==y.payload&&(c=y.payload)):a=null:(this.updateLastIndex(n,k),a=this.match(n,e,k)),a&&a.length>l.length){l=a,u=c,E=t;break}}}break}}if(null!==l){if(h=l.length,void 0!==(d=E.group)&&(f=E.tokenTypeIdx,p=this.createTokenInstance(l,k,f,E.tokenType,A,x,h),this.handlePayload(p,u),!1===d?I=this.addToken(_,I,p):w[d].push(p)),e=this.chopInput(e,h),k+=h,x=this.computeNewColumn(x,h),!0===b&&!0===E.canLineTerminator){let e,t,n=0;R.lastIndex=0;do!0===(e=R.test(l))&&(t=R.lastIndex-1,n++);while(!0===e)0!==n&&(A+=n,x=h-t,this.updateTokenEndLineColumnLocation(p,d,t,n,A,x,h))}this.handleModes(E,$,j,p)}else{let t=k,n=A,r=x,s=!1===V;for(;!1===s&&k<S;)for(e=this.chopInput(e,1),k++,i=0;i<C;i++){let t=L[i],n=t.pattern,r=t.short;if(!1!==r?O.charCodeAt(k)===r&&(s=!0):!0===t.isCustom?s=null!==n.exec(O,k,_,w):(this.updateLastIndex(n,k),s=null!==n.exec(e)),!0===s)break}if(m=k-t,x=this.computeNewColumn(x,m),g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(O,t,m,n,r),N.push({offset:t,line:n,column:r,length:m,message:g}),!1===V)break}}return this.hasCustom||(_.length=I),{tokens:_,groups:w,errors:N}}handleModes(e,t,n,r){if(!0===e.pop){let i=e.push;t(r),void 0!==i&&n.call(this,i)}else void 0!==e.push&&n.call(this,e.push)}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,n,r,i,s,a){let o,l;void 0!==t&&(l=(o=n===a-1)?-1:0,(1!==r||!0!==o)&&(e.endLine=i+l,e.endColumn=s-1+-l))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,s){return{image:e,startOffset:t,startLine:i,startColumn:s,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,s,a){return{image:e,startOffset:t,endOffset:t+a-1,startLine:i,endLine:i,startColumn:s,endColumn:s+a-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){return e.push(n),t}addTokenUsingMemberAccess(e,t,n){return e[t]=n,++t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){null!==t&&(e.payload=t)}matchWithTest(e,t,n){return!0===e.test(t)?t.substring(n,e.lastIndex):null}matchWithExec(e,t){let n=e.exec(t);return null!==n?n[0]:null}}function iH(e){return iG(e)?e.LABEL:e.name}function iG(e){return n6(e.LABEL)&&""!==e.LABEL}iz.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",iz.NA=/NOT_APPLICABLE/;let iK="categories",iY="label",iq="group",iZ="push_mode",iJ="pop_mode",iX="longer_alt",iQ="line_breaks",i0="start_chars_hint";function i1(e){let t=e.pattern,n={};if(n.name=e.name,rF(t)||(n.PATTERN=t),t9(e,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";return t9(e,iK)&&(n.CATEGORIES=e[iK]),i$([n]),t9(e,iY)&&(n.LABEL=e[iY]),t9(e,iq)&&(n.GROUP=e[iq]),t9(e,iJ)&&(n.POP_MODE=e[iJ]),t9(e,iZ)&&(n.PUSH_MODE=e[iZ]),t9(e,iX)&&(n.LONGER_ALT=e[iX]),t9(e,iQ)&&(n.LINE_BREAKS=e[iQ]),t9(e,i0)&&(n.START_CHARS_HINT=e[i0]),n}let i2=i1({name:"EOF",pattern:iz.NA});function i3(e,t,n,r,i,s,a,o){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:a,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}i$([i2]);let i6={buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:r}){let i=iG(e)?`--> ${iH(e)} <--`:`token of type --> ${e.name} <--`;return`Expecting ${i} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){let s="Expecting: ",a="\nbut found: '"+r7(t).image+"'";if(r)return s+r+a;{let t=nw(is(e,(e,t)=>e.concat(t),[]),e=>`[${nw(e,e=>iH(e)).join(", ")}]`),n=nw(t,(e,t)=>` ${t+1}. ${e}`);return s+`one of these possible Token sequences:
25
- ${n.join("\n")}`+a}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){let i="Expecting: ",s="\nbut found: '"+r7(t).image+"'";if(n)return i+n+s;{let t=nw(e,e=>`[${nw(e,e=>iH(e)).join(",")}]`);return i+`expecting at least one iteration which starts with one of these possible Token sequences::
26
- <${t.join(" ,")}>`+s}}};Object.freeze(i6);let i4={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},i5={buildDuplicateFoundError(e,t){let n=e.name,r=r7(t),i=r.idx,s=rS(r),a=r instanceof rl?r.terminalType.name:r instanceof n7?r.nonTerminalName:"",o=`->${s}${i>0?i:""}<- ${a?`with argument: ->${a}<-`:""}
27
- appears more than once (${t.length} times) in the top level rule: ->${n}<-.
28
- For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
29
- `;return(o=o.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.
30
- The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.
31
- To resolve this make sure each Terminal and Non-Terminal names are unique
32
- This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
33
- and Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){let t=nw(e.prefixPath,e=>iH(e)).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix
34
- in <OR${n}> inside <${e.topLevelRule.name}> Rule,
35
- <${t}> may appears as a prefix path in all these alternatives.
36
- See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
37
- For Further details.`},buildAlternationAmbiguityError(e){let t=nw(e.prefixPath,e=>iH(e)).join(", "),n=0===e.alternation.idx?"":e.alternation.idx,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${n}> inside <${e.topLevelRule.name}> Rule,
38
- <${t}> may appears as a prefix path in all these alternatives.
39
- `;return r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
40
- `+"For Further details."},buildEmptyRepetitionError(e){let t=rS(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.
41
- This could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
42
- Only the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:
43
- <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
44
- has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){let t=e.topLevelRule.name,n=nw(e.leftRecursionPath,e=>e.name),r=`${t} --> ${n.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar.
45
- rule: <${t}> can be invoked from itself (directly or indirectly)
46
- without consuming any Tokens. The grammar path that causes this is:
47
- ${r}
48
- To fix this refactor your grammar to remove the left recursion.
49
- see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof re?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};class i8 extends ru{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){tW(nb(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:l.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}let i9=function(e,t,n){var r=null==e?0:e.length;return r?nD(e,0,(t=r-(t=n||void 0===t?1:nG(t)))<0?0:t):[]},i7=function(e,t){return rA(nw(e,t),1)},se=function(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r},st=function(e,t,n,r){return tj(e,function(e,i,s){t(r,e,n(e),s)}),r};var sn=Object.prototype.hasOwnProperty,sr=(S=function(e,t,n){sn.call(e,n)?e[n].push(t):eg(e,n,[t])},function(e,t){return(eA(e)?se:st)(e,S,nA(t,2),{})});class si extends rk{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=tF(this.path.ruleStack).reverse(),this.occurrenceStack=tF(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){ne(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class ss extends si{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let e=new rt({definition:t.concat(n)});this.possibleTokTypes=rD(e),this.found=!0}}}class sa extends rk{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class so extends sa{walkMany(e,t,n){if(e.idx===this.occurrence){let e=r7(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof rl&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}}class sl extends sa{walkManySep(e,t,n){if(e.idx===this.occurrence){let e=r7(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof rl&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}}class su extends sa{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){let e=r7(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof rl&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}}class sc extends sa{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){let e=r7(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof rl&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}}function sh(e,t,n=[]){n=tF(n);let r=[],i=0;function s(s){let a=sh(s.concat(nK(e,i+1)),t,n);return r.concat(a)}for(;n.length<t&&i<e.length;){let t=e[i];if(t instanceof rt)return s(t.definition);if(t instanceof n7)return s(t.definition);if(t instanceof rn)r=s(t.definition);else if(t instanceof rr)return s(t.definition.concat([new rs({definition:t.definition})]));else if(t instanceof ri)return s([new rt({definition:t.definition}),new rs({definition:[new rl({terminalType:t.separator})].concat(t.definition)})]);else if(t instanceof ra)r=s(t.definition.concat([new rs({definition:[new rl({terminalType:t.separator})].concat(t.definition)})]));else if(t instanceof rs)r=s(t.definition.concat([new rs({definition:t.definition})]));else if(t instanceof ro)return tW(t.definition,e=>{!1===ne(e.definition)&&(r=s(e.definition))}),r;else if(t instanceof rl)n.push(t.terminalType);else throw Error("non exhaustive match");i++}return r.push({partialPath:n,suffixDef:nK(e,i)}),r}function sd(e,t,n,r){let i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE",o=!1,l=t.length,u=l-r-1,c=[],h=[];for(h.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!ne(h);){let e=h.pop();if(e===a){o&&iM(h).idx<=u&&h.pop();continue}let r=e.def,d=e.idx,f=e.ruleStack,p=e.occurrenceStack;if(ne(r))continue;let m=r[0];if(m===i){let e={idx:d,def:nK(r),ruleStack:i9(f),occurrenceStack:i9(p)};h.push(e)}else if(m instanceof rl)if(d<l-1){let e=d+1;if(n(t[e],m.terminalType)){let t={idx:e,def:nK(r),ruleStack:f,occurrenceStack:p};h.push(t)}}else if(d===l-1)c.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:f,occurrenceStack:p}),o=!0;else throw Error("non exhaustive match");else if(m instanceof n7){let e=tF(f);e.push(m.nonTerminalName);let t=tF(p);t.push(m.idx);let n={idx:d,def:m.definition.concat(s,nK(r)),ruleStack:e,occurrenceStack:t};h.push(n)}else if(m instanceof rn){let e={idx:d,def:nK(r),ruleStack:f,occurrenceStack:p};h.push(e),h.push(a);let t={idx:d,def:m.definition.concat(nK(r)),ruleStack:f,occurrenceStack:p};h.push(t)}else if(m instanceof rr){let e=new rs({definition:m.definition,idx:m.idx}),t={idx:d,def:m.definition.concat([e],nK(r)),ruleStack:f,occurrenceStack:p};h.push(t)}else if(m instanceof ri){let e=new rs({definition:[new rl({terminalType:m.separator})].concat(m.definition),idx:m.idx}),t={idx:d,def:m.definition.concat([e],nK(r)),ruleStack:f,occurrenceStack:p};h.push(t)}else if(m instanceof ra){let e={idx:d,def:nK(r),ruleStack:f,occurrenceStack:p};h.push(e),h.push(a);let t=new rs({definition:[new rl({terminalType:m.separator})].concat(m.definition),idx:m.idx}),n={idx:d,def:m.definition.concat([t],nK(r)),ruleStack:f,occurrenceStack:p};h.push(n)}else if(m instanceof rs){let e={idx:d,def:nK(r),ruleStack:f,occurrenceStack:p};h.push(e),h.push(a);let t=new rs({definition:m.definition,idx:m.idx}),n={idx:d,def:m.definition.concat([t],nK(r)),ruleStack:f,occurrenceStack:p};h.push(n)}else if(m instanceof ro)for(let e=m.definition.length-1;e>=0;e--){let t={idx:d,def:m.definition[e].definition.concat(nK(r)),ruleStack:f,occurrenceStack:p};h.push(t),h.push(a)}else if(m instanceof rt)h.push({idx:d,def:m.definition.concat(nK(r)),ruleStack:f,occurrenceStack:p});else if(m instanceof re)h.push(function(e,t,n,r){let i=tF(n);i.push(e.name);let s=tF(r);return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}(m,d,f,p));else throw Error("non exhaustive match")}return c}function sf(e){if(e instanceof rn||"Option"===e)return a.OPTION;if(e instanceof rs||"Repetition"===e)return a.REPETITION;if(e instanceof rr||"RepetitionMandatory"===e)return a.REPETITION_MANDATORY;if(e instanceof ri||"RepetitionMandatoryWithSeparator"===e)return a.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof ra||"RepetitionWithSeparator"===e)return a.REPETITION_WITH_SEPARATOR;else if(e instanceof ro||"Alternation"===e)return a.ALTERNATION;else throw Error("non exhaustive match")}function sp(e,t,n,r){let i=e.length,s=rd(e,e=>rd(e,e=>1===e.length));if(t)return function(t){let r=nw(t,e=>e.GATE);for(let t=0;t<i;t++){let i=e[t],s=i.length,a=r[t];if(void 0===a||!1!==a.call(this))t:for(let e=0;e<s;e++){let r=i[e],s=r.length;for(let e=0;e<s;e++)if(!1===n(this.LA(e+1),r[e]))continue t;return t}}};if(!s||r)return function(){for(let t=0;t<i;t++){let r=e[t],i=r.length;t:for(let e=0;e<i;e++){let i=r[e],s=i.length;for(let e=0;e<s;e++)if(!1===n(this.LA(e+1),i[e]))continue t;return t}}};{let t=is(nw(e,e=>rx(e)),(e,t,n)=>(tW(t,t=>{t9(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),tW(t.categoryMatches,t=>{t9(e,t)||(e[t]=n)})}),e),{});return function(){return t[this.LA(1).tokenTypeIdx]}}}function sm(e,t,n){let r=rd(e,e=>1===e.length),i=e.length;if(!r||n)return function(){t:for(let n=0;n<i;n++){let r=e[n],i=r.length;for(let e=0;e<i;e++)if(!1===t(this.LA(e+1),r[e]))continue t;return!0}return!1};{let t=rx(e);if(1===t.length&&ne(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let e=is(t,(e,t,n)=>(e[t.tokenTypeIdx]=!0,tW(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){return!0===e[this.LA(1).tokenTypeIdx]}}}}(k=a||(a={}))[k.OPTION=0]="OPTION",k[k.REPETITION=1]="REPETITION",k[k.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",k[k.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",k[k.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",k[k.ALTERNATION=5]="ALTERNATION";class sg extends rk{constructor(e,t,n){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)}walkOption(e,t,n){this.checkIsTarget(e,a.OPTION,t,n)||super.walkOption(e,t,n)}walkAtLeastOne(e,t,n){this.checkIsTarget(e,a.REPETITION_MANDATORY,t,n)||super.walkOption(e,t,n)}walkAtLeastOneSep(e,t,n){this.checkIsTarget(e,a.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}walkMany(e,t,n){this.checkIsTarget(e,a.REPETITION,t,n)||super.walkOption(e,t,n)}walkManySep(e,t,n){this.checkIsTarget(e,a.REPETITION_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}}class sy extends ru{constructor(e,t,n){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=n,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(void 0===this.targetRef||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,a.OPTION)}visitRepetition(e){this.checkIsTarget(e,a.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,a.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,a.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,a.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,a.ALTERNATION)}}function sv(e){let t=Array(e);for(let n=0;n<e;n++)t[n]=[];return t}function sE(e){let t=[""];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e=0;e<t.length;e++){let n=t[e];i.push(n+"_"+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){let t="_"+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function sT(e,t){let n=nw(e,e=>sh([e],1)),r=sv(n.length),i=nw(n,e=>{let t={};return tW(e,e=>{tW(sE(e.partialPath),e=>{t[e]=!0})}),t}),s=n;for(let e=1;e<=t;e++){let n=s;s=sv(n.length);for(let a=0;a<n.length;a++){let o=n[a];for(let n=0;n<o.length;n++){let l=o[n].partialPath,u=o[n].suffixDef,c=sE(l);if(function(e,t,n){for(let r=0;r<e.length;r++){if(r===n)continue;let i=e[r];for(let e=0;e<t.length;e++)if(!0===i[t[e]])return!1}return!0}(i,c,a)||ne(u)||l.length===t){let e=r[a];if(!1===sk(e,l)){e.push(l);for(let e=0;e<c.length;e++){let t=c[e];i[a][t]=!0}}}else{let t=sh(u,e+1,l);s[a]=s[a].concat(t),tW(t,e=>{tW(sE(e.partialPath),e=>{i[a][e]=!0})})}}}}return r}function sO(e,t,n,r){let i=new sy(e,a.ALTERNATION,r);return t.accept(i),sT(i.result,n)}function sS(e,t,n,r){let i=new sy(e,n);t.accept(i);let s=i.result,a=new sg(t,e,n).startWalking();return sT([new rt({definition:s}),new rt({definition:a})],r)}function sk(e,t){n:for(let n=0;n<e.length;n++){let r=e[n];if(r.length===t.length){for(let e=0;e<r.length;e++){let n=t[e],i=r[e];if(!1==(n===i||void 0!==i.categoryMatchesMap[n.tokenTypeIdx]))continue n}return!0}}return!1}function sI(e){return rd(e,e=>rd(e,e=>rd(e,e=>ne(e.categoryMatches))))}function s_(e){return`${rS(e)}_#_${e.idx}_#_${sN(e)}`}function sN(e){return e instanceof rl?e.terminalType.name:e instanceof n7?e.nonTerminalName:""}class sA extends ru{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}class sx extends ru{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}class sw extends ru{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}let sb="MismatchedTokenException",sR="NoViableAltException",sC="EarlyExitException",sL="NotAllInputParsedException",sM=[sb,sR,sC,sL];function sD(e){return rv(sM,e.name)}Object.freeze(sM);class sP extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class sU extends sP{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=sb}}class sF extends sP{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=sR}}class s$ extends sP{constructor(e,t){super(e,t),this.name=sL}}class sj extends sP{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=sC}}let sV={},sW="InRuleRecoveryException";class sB extends Error{constructor(e){super(e),this.name=sW}}function sz(e,t,n,r,i,s,a){let o=this.getKeyForAutomaticLookahead(r,i),l=this.firstAfterRepMap[o];if(void 0===l){let e=this.getCurrRuleFullName();l=new s(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,c=l.occurrence,h=l.isEndOfRule;1===this.RULE_STACK.length&&h&&void 0===u&&(u=i2,c=1),void 0!==u&&void 0!==c&&this.shouldInRepetitionRecoveryBeTried(u,c,a)&&this.tryInRepetitionRecovery(e,t,n,u)}class sH{constructor(e){var t;this.maxLookahead=null!=(t=null==e?void 0:e.maxLookahead)?t:s5.maxLookahead}validate(e){let t=this.validateNoLeftRecursion(e.rules);return ne(t)?[...t,...this.validateEmptyOrAlternatives(e.rules),...this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),...this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead)]:t}validateNoLeftRecursion(e){return i7(e,e=>(function e(t,n,r,i=[]){let s=[],a=function e(t){let n=[];if(ne(t))return n;let r=r7(t);if(r instanceof n7)n.push(r.referencedRule);else if(r instanceof rt||r instanceof rn||r instanceof rr||r instanceof ri||r instanceof ra||r instanceof rs)n=n.concat(e(r.definition));else if(r instanceof ro)n=rx(nw(r.definition,t=>e(t.definition)));else if(r instanceof rl);else throw Error("non exhaustive match");let i=rO(r),s=t.length>1;if(!i||!s)return n;{let r=nK(t);return n.concat(e(r))}}(n.definition);if(ne(a))return[];{let n=t.name;rv(a,t)&&s.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:i}),type:l.LEFT_RECURSION,ruleName:n});let o=i7(r6(a,i.concat([t])),n=>{let s=tF(i);return s.push(n),e(t,n,r,s)});return s.concat(o)}})(e,e,i5))}validateEmptyOrAlternatives(e){return i7(e,e=>{let t;return t=new sx,e.accept(t),i7(t.alternations,t=>i7(i9(t.definition),(n,r)=>ne(sd([n],[],iD,1))?[{message:i5.buildEmptyAlternationError({topLevelRule:e,alternation:t,emptyChoiceIdx:r}),type:l.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:t.idx,alternative:r+1}]:[]))})}validateAmbiguousAlternationAlternatives(e,t){return i7(e,e=>{let n;return n=new sx,e.accept(n),i7(io(n.alternations,e=>!0===e.ignoreAmbiguities),n=>{var r,i,s,a,o,u,c,h;let d,f,p=sO(n.idx,e,n.maxLookahead||t,n),m=(r=p,i=n,s=e,a=i5,d=[],nw(is(r,(e,t,n)=>(!0===i.definition[n].ignoreAmbiguities||tW(t,t=>{let s=[n];tW(r,(e,r)=>{n!==r&&sk(e,t)&&!0!==i.definition[r].ignoreAmbiguities&&s.push(r)}),s.length>1&&!sk(d,t)&&(d.push(t),e.push({alts:s,path:t}))}),e),[]),e=>{let t=nw(e.alts,e=>e+1);return{message:a.buildAlternationAmbiguityError({topLevelRule:s,alternation:i,ambiguityIndices:t,prefixPath:e.path}),type:l.AMBIGUOUS_ALTS,ruleName:s.name,occurrence:i.idx,alternatives:e.alts}})),g=(o=p,u=n,c=e,h=i5,rX(i7(f=is(o,(e,t,n)=>{let r=nw(t,e=>({idx:n,path:e}));return e.concat(r)},[]),e=>{if(!0===u.definition[e.idx].ignoreAmbiguities)return[];let t=e.idx,n=e.path;return nw(r5(f,e=>{var r;return!0!==u.definition[e.idx].ignoreAmbiguities&&e.idx<t&&(r=e.path,r.length<n.length&&rd(r,(e,t)=>{let r=n[t];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]}))}),e=>{let n=[e.idx+1,t+1],r=0===u.idx?"":u.idx;return{message:h.buildAlternationPrefixAmbiguityError({topLevelRule:c,alternation:u,ambiguityIndices:n,prefixPath:e.path}),type:l.AMBIGUOUS_PREFIX_ALTS,ruleName:c.name,occurrence:r,alternatives:n}})})));return m.concat(g)})})}validateSomeNonEmptyLookaheadPath(e,t){let n;return n=[],tW(e,e=>{let r=new sw;e.accept(r),tW(r.allProductions,r=>{let i=sf(r),s=r.maxLookahead||t;if(ne(rx(sS(r.idx,e,i,s)[0]))){let t=i5.buildEmptyRepetitionError({topLevelRule:e,repetition:r});n.push({message:t,type:l.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),n}buildLookaheadForAlternation(e){var t,n,r,i,s;let a,o;return t=e.prodOccurrence,n=e.rule,r=e.maxLookahead,i=e.hasPredicates,s=e.dynamicTokensEnabled,o=sI(a=sO(t,n,r))?iP:iD,sp(a,i,o,s)}buildLookaheadForOptional(e){var t,n,r,i,s;let a,o;return t=e.prodOccurrence,n=e.rule,r=e.maxLookahead,i=e.dynamicTokensEnabled,s=sf(e.prodType),o=sI(a=sS(t,n,s,r))?iP:iD,sm(a[0],o,i)}}let sG=new class extends ru{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function sK(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function sY(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function sq(e,t){Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t})}function sZ(e,t){let n=eG(e),r=n.length;for(let i=0;i<r;i++){let r=e[n[i]],s=r.length;for(let e=0;e<s;e++){let n=r[e];void 0===n.tokenTypeIdx&&this[n.name](n.children,t)}}}(I=o||(o={}))[I.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",I[I.MISSING_METHOD=1]="MISSING_METHOD";let sJ={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(sJ);let sX=i1({name:"RECORDING_PHASE_TOKEN",pattern:iz.NA});i$([sX]);let sQ=i3(sX,"This IToken indicates the Parser is in Recording Phase\n See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(sQ);let s0={name:"This CSTNode indicates the Parser is in Recording Phase\n See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};function s1(e,t,n,r=!1){s6(n);let i=iM(this.recordingProdStack),s=K(t)?t:t.DEF,a=new e({definition:[],idx:n});return r&&(a.separator=t.SEP),t9(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),sJ}function s2(e,t){s6(t);let n=iM(this.recordingProdStack),r=!1===eA(e),i=!1===r?e:e.DEF,s=new ro({definition:[],idx:t,ignoreAmbiguities:r&&!0===e.IGNORE_AMBIGUITIES});return t9(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),s.hasPredicates=rT(i,e=>K(e.GATE)),n.definition.push(s),tW(i,e=>{let t=new rt({definition:[]});s.definition.push(t),t9(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:t9(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),sJ}function s3(e){return 0===e?"":`${e}`}function s6(e){if(e<0||e>255){let t=Error(`Invalid DSL Method idx value: <${e}>
50
- Idx value must be a none negative value smaller than ${256}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}let s4=i3(i2,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(s4);let s5=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:i6,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),s8=Object.freeze({recoveryValueFunc:()=>void 0,resyncEnabled:!0});(_=l||(l={}))[_.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",_[_.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",_[_.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",_[_.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",_[_.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",_[_.LEFT_RECURSION=5]="LEFT_RECURSION",_[_.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",_[_.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",_[_.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",_[_.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",_[_.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",_[_.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",_[_.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",_[_.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION";class s9{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let t=this.className;this.TRACE_INIT("toFastProps",()=>{nM(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),tW(this.definedRulesNames,e=>{let t,n=this[e].originalGrammarAction;this.TRACE_INIT(`${e} Rule`,()=>{t=this.topLevelRuleRecord(e,n)}),this.gastProductionsCache[e]=t})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{var e;let t,r,i;r=r1(e={rules:nb(this.gastProductionsCache)},{errMsgProvider:i4}),i={},tW(e.rules,e=>{i[e.name]=e}),(t=new i8(i,r.errMsgProvider)).resolveRefs(),n=t.errors,this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(ne(n)&&!1===this.skipValidations){var e,r,i,s,a,o,u,c,h;let n,d,f,p,m,g,y=(r=(e=r1(e={rules:nb(this.gastProductionsCache),tokenTypes:nb(this.tokensMap),errMsgProvider:i5,grammarName:t},{errMsgProvider:i5})).rules,i=e.tokenTypes,s=e.errMsgProvider,a=e.grammarName,f=i7(r,e=>{var t,n;let r;return t=e,n=s,r=new sA,t.accept(r),nw(nb(n8(sr(r.allProductions,s_),e=>e.length>1)),e=>{let r=r7(e),i=n.buildDuplicateFoundError(t,e),s=rS(r),a={message:i,type:l.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:s,occurrence:r.idx},o=sN(r);return o&&(a.parameter=o),a})}),u=r,c=i,h=s,n=[],d=nw(c,e=>e.name),tW(u,e=>{let t=e.name;if(rv(d,t)){let r=h.buildNamespaceConflictError(e);n.push({message:r,type:l.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),p=n,m=i7(r,e=>{var t,n;let r;return t=e,n=s,r=new sx,t.accept(r),i7(r.alternations,e=>e.definition.length>255?[{message:n.buildTooManyAlternativesError({topLevelRule:t,alternation:e}),type:l.TOO_MANY_ALTS,ruleName:t.name,occurrence:e.idx}]:[])}),g=i7(r,e=>(function(e,t,n,r){let i=[];if(is(t,(t,n)=>n.name===e.name?t+1:t,0)>1){let t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:l.DUPLICATE_RULE_NAME,ruleName:e.name})}return i})(e,r,a,s)),f.concat(p,m,g)),v=nw((o={lookaheadStrategy:this.lookaheadStrategy,rules:nb(this.gastProductionsCache),tokenTypes:nb(this.tokensMap),grammarName:t}).lookaheadStrategy.validate({rules:o.rules,tokenTypes:o.tokenTypes,grammarName:o.grammarName}),e=>Object.assign({type:l.CUSTOM_LOOKAHEAD_VALIDATION},e));this.definitionErrors=this.definitionErrors.concat(y,v)}}),ne(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var e;let t,n=(e=nb(this.gastProductionsCache),t={},tW(e,e=>{n1(t,new rU(e).startWalking())}),t);this.resyncFollows=n}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null==(t=(e=this.lookaheadStrategy).initialize)||t.call(e,{rules:nb(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(nb(this.gastProductionsCache))})),!s9.DEFER_DEFINITION_ERRORS_HANDLING&&!ne(this.definitionErrors))throw e=nw(this.definitionErrors,e=>e.message),Error(`Parser Definition Errors detected:
51
- ${e.join("\n-------------------------------\n")}`)})}constructor(e,t){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(t),this.initLexerAdapter(),this.initLooksAhead(t),this.initRecognizerEngine(e,t),this.initRecoverable(t),this.initTreeBuilder(t),this.initContentAssist(),this.initGastRecorder(t),this.initPerformanceTracer(t),t9(t,"ignoredIssues"))throw Error("The <ignoredIssues> IParserConfig property has been deprecated.\n Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n For further details.");this.skipValidations=t9(t,"skipValidations")?t.skipValidations:s5.skipValidations}}s9.DEFER_DEFINITION_ERRORS_HANDLING=!1,[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=t9(e,"recoveryEnabled")?e.recoveryEnabled:s5.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=sz)}getTokenToInsert(e){let t=i3(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){let i=this.findReSyncTokenType(),s=this.exportLexerState(),a=[],o=!1,l=this.LA(1),u=this.LA(1),c=()=>{let e=this.LA(0),t=new sU(this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),l,this.LA(0));t.resyncedTokens=i9(a),this.SAVE_ERROR(t)};for(;!o;)if(this.tokenMatcher(u,r))return void c();else if(n.call(this)){c(),e.apply(this,t);return}else this.tokenMatcher(u,i)?o=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,a));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){return!(!1===n||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new sB("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||ne(t))return!1;let n=this.LA(1);return void 0!==r9(t,e=>this.tokenMatcher(n,e))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return rv(this.getFollowSetFromFollowKey(t),e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),n=2;for(;;){let r=r9(e,e=>iD(t,e));if(void 0!==r)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return sV;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return nw(e,(n,r)=>0===r?sV:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])})}flattenFollowSet(){return rx(nw(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e)))}getFollowSetFromFollowKey(e){if(e===sV)return[i2];let t=e.ruleName+e.idxInCallingRule+rP+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,i2)||t.push(e),t}reSyncTo(e){let t=[],n=this.LA(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return i9(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,a){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:tF(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return nw(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},class{initLooksAhead(e){this.dynamicTokensEnabled=t9(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:s5.dynamicTokensEnabled,this.maxLookahead=t9(e,"maxLookahead")?e.maxLookahead:s5.maxLookahead,this.lookaheadStrategy=t9(e,"lookaheadStrategy")?e.lookaheadStrategy:new sH({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){tW(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{var t;let n,{alternation:r,repetition:i,option:s,repetitionMandatory:a,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=(t=e,sG.reset(),t.accept(sG),n=sG.dslMethods,sG.reset(),n);tW(r,t=>{let n=0===t.idx?"":t.idx;this.TRACE_INIT(`${rS(t)}${n}`,()=>{var n;let r=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),i=(n=this.fullRuleNameToShort[e.name],256|t.idx|n);this.setLaFuncCache(i,r)})}),tW(i,t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,rS(t))}),tW(s,t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,rS(t))}),tW(a,t=>{this.computeLookaheadFunc(e,t.idx,1024,"RepetitionMandatory",t.maxLookahead,rS(t))}),tW(o,t=>{this.computeLookaheadFunc(e,t.idx,1536,"RepetitionMandatoryWithSeparator",t.maxLookahead,rS(t))}),tW(l,t=>{this.computeLookaheadFunc(e,t.idx,1280,"RepetitionWithSeparator",t.maxLookahead,rS(t))})})})}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${0===t?"":t}`,()=>{let s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),a=t|n|this.fullRuleNameToShort[e.name];this.setLaFuncCache(a,s)})}getKeyForAutomaticLookahead(e,t){return t|e|this.getLastExplicitRuleShortName()}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=t9(e,"nodeLocationTracking")?e.nodeLocationTracking:s5.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=sY,this.setNodeLocationFromNode=sY,this.cstPostRule=rR,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=rR,this.setNodeLocationFromNode=rR,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=sK,this.setNodeLocationFromNode=sK,this.cstPostRule=rR,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=rR,this.setNodeLocationFromNode=rR,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=rR,this.setNodeLocationFromNode=rR,this.cstPostRule=rR,this.setInitialNodeLocation=rR;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);else this.cstInvocationStateUpdate=rR,this.cstFinallyStateUpdate=rR,this.cstPostTerminal=rR,this.cstPostNonTerminal=rR,this.cstPostRule=rR}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==!0?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==!0?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];void 0===n.children[e]?n.children[e]=[t]:n.children[e].push(t),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];void 0===n.children[t]?n.children[t]=[e]:n.children[t].push(e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(rF(this.baseCstVisitorConstructor)){var e,t;let n,r=(e=this.className,t=eG(this.gastProductionsCache),sq(n=function(){},e+"BaseSemantics"),n.prototype={visit:function(e,t){if(eA(e)&&(e=e[0]),!rF(e))return this[e.name](e.children,t)},validateVisitor:function(){var e,n,r;let i=(e=this,n=t,r=e,rX(nw(r5(n,e=>!1===K(r[e])),e=>({msg:`Missing visitor method: <${e}> on ${r.constructor.name} CST Visitor.`,type:o.MISSING_METHOD,methodName:e}))));if(!ne(i)){let e=nw(i,e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
52
- ${e.join("\n\n").replace(/\n/g,"\n ")}`)}}},n.prototype.constructor=n,n._RULE_NAMES=t,n);return this.baseCstVisitorConstructor=r,r}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(rF(this.baseCstVisitorWithDefaultsConstructor)){var e,t,n;let r,i,s=(e=this.className,t=eG(this.gastProductionsCache),n=this.getBaseCstVisitorConstructor(),sq(r=function(){},e+"BaseSemanticsWithDefaults"),i=Object.create(n.prototype),tW(t,e=>{i[e]=sZ}),r.prototype=i,r.prototype.constructor=r,r);return this.baseCstVisitorWithDefaultsConstructor=s,s}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):s4}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?s4:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=iP,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},t9(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n For Further details.");if(eA(e)){if(ne(e))throw Error("A Token Vocabulary cannot be empty.\n Note that the first argument for the parser constructor\n is no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n For Further details.")}if(eA(e))this.tokensMap=is(e,(e,t)=>(e[t.name]=t,e),{});else if(t9(e,"modes")&&rd(rx(nb(e.modes)),iW)){let t=rM(rx(nb(e.modes)));this.tokensMap=is(t,(e,t)=>(e[t.name]=t,e),{})}else if(G(e))this.tokensMap=tF(e);else throw Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=i2;let n=rd(t9(e,"modes")?rx(nb(e.modes)):nb(e),e=>ne(e.categoryMatches));this.tokenMatcher=n?iP:iD,i$(nb(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
53
- Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let r=t9(n,"resyncEnabled")?n.resyncEnabled:s8.resyncEnabled,i=t9(n,"recoveryValueFunc")?n.recoveryValueFunc:s8.recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,Object.assign(!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n);let r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}},{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){let r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(sD(e)){if(i){let t=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(t)){if(e.resyncedTokens=this.reSyncTo(t),!this.outputCst)return n(e);{let e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}}if(this.outputCst){let t=this.CST_STACK[this.CST_STACK.length-1];t.recoveredNode=!0,e.partialCstResult=t}throw e}if(r)return this.moveToTerminatedState(),n(e)}throw e}optionInternal(e,t){let n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;let t=e.GATE;if(void 0!==t){let e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;let e=t.GATE;if(void 0!==e){let t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0===i.call(this)){let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}else throw this.raiseEarlyExitException(e,a.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,1024,e,su)}atLeastOneSepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);let t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,sc],t,1536,e,sc)}else throw this.raiseEarlyExitException(e,a.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;let e=t.GATE;if(void 0!==e){let t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let s=!0;for(;!0===i.call(this)&&!0===s;)s=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,so,s)}manySepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);let t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,sl],t,1280,e,sl)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,1536,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let n=this.getKeyForAutomaticLookahead(256,t),r=eA(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new s$(t,e))}}subruleInternal(e,t,n){let r;try{let i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw sD(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{let t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r,i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new sU(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&"MismatchedTokenException"===n.name&&!this.isBackTracking()){let r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){if(e.name===sW)throw n;throw e}}throw n}saveRecogState(){let e=this.errors,t=tF(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),i2)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=s8){if(rv(this.definedRulesNames,e)){let t={message:i5.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:l.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);let r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=s8){var r,i;let s,a,o=(r=this.definedRulesNames,i=this.className,a=[],rv(r,e)||(s=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${i}<-as it is not defined in any of the super grammars `,a.push({message:s,type:l.INVALID_RULE_OVERRIDE,ruleName:e})),a);this.definitionErrors=this.definitionErrors.concat(o);let u=this.defineRule(e,t,n);return this[e]=u,u}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(sD(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return nw(nb(this.gastProductionsCache),function e(t){function n(t){return nw(t,e)}if(t instanceof n7){let e={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return n6(t.label)&&(e.label=t.label),e}if(t instanceof rt)return{type:"Alternative",definition:n(t.definition)};if(t instanceof rn)return{type:"Option",idx:t.idx,definition:n(t.definition)};if(t instanceof rr)return{type:"RepetitionMandatory",idx:t.idx,definition:n(t.definition)};if(t instanceof ri)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:e(new rl({terminalType:t.separator})),definition:n(t.definition)};else if(t instanceof ra)return{type:"RepetitionWithSeparator",idx:t.idx,separator:e(new rl({terminalType:t.separator})),definition:n(t.definition)};else if(t instanceof rs)return{type:"Repetition",idx:t.idx,definition:n(t.definition)};else if(t instanceof ro)return{type:"Alternation",idx:t.idx,definition:n(t.definition)};else if(t instanceof rl){var r,i;let e={type:"Terminal",name:t.terminalType.name,label:n6((i=r=t.terminalType).LABEL)&&""!==i.LABEL?r.LABEL:r.name,idx:t.idx};n6(t.label)&&(e.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(e.pattern=n3(n)?n.source:n),e}else if(t instanceof re)return{type:"Rule",name:t.name,orgText:t.orgText,definition:n(t.definition)};else throw Error("non exhaustive match")})}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=t9(e,"errorMessageProvider")?e.errorMessageProvider:s5.errorMessageProvider}SAVE_ERROR(e){if(sD(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:tF(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return tF(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){let r=this.getCurrRuleFullName(),i=sS(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],s=[];for(let e=1;e<=this.maxLookahead;e++)s.push(this.LA(e));let a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new sj(a,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let n=this.getCurrRuleFullName(),r=sO(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));let s=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new sF(a,this.LA(1),s))}},class{initContentAssist(){}computeContentAssist(e,t){let n=this.gastProductionsCache[e];if(rF(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return sd([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=r7(e.ruleStack);return new ss(this.getGAstProductions()[t],e).startWalking()}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{for(let e=0;e<10;e++){let t=e>0?e:"";delete this[`CONSUME${t}`],delete this[`SUBRULE${t}`],delete this[`OPTION${t}`],delete this[`OR${t}`],delete this[`MANY${t}`],delete this[`MANY_SEP${t}`],delete this[`AT_LEAST_ONE${t}`],delete this[`AT_LEAST_ONE_SEP${t}`]}delete this.consume,delete this.subrule,delete this.option,delete this.or,delete this.many,delete this.atLeastOne,delete this.ACTION,delete this.BACKTRACK,delete this.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return s4}topLevelRuleRecord(e,t){try{let n=new re({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.message+'\n This error was thrown during the "grammar recording phase" For more info see:\n https://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(e){}throw e}}optionInternalRecord(e,t){return s1.call(this,rn,e,t)}atLeastOneInternalRecord(e,t){s1.call(this,rr,t,e)}atLeastOneSepFirstInternalRecord(e,t){s1.call(this,ri,t,e,!0)}manyInternalRecord(e,t){s1.call(this,rs,t,e)}manySepFirstInternalRecord(e,t){s1.call(this,ra,t,e,!0)}orInternalRecord(e,t){return s2.call(this,e,t)}subruleInternalRecord(e,t,n){if(s6(t),!e||!1===t9(e,"ruleName")){let n=Error(`<SUBRULE${s3(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
54
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=iM(this.recordingProdStack),i=new n7({idx:t,nonTerminalName:e.ruleName,label:null==n?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(i),this.outputCst?s0:sJ}consumeInternalRecord(e,t,n){if(s6(t),!ij(e)){let n=Error(`<CONSUME${s3(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
55
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=iM(this.recordingProdStack),i=new rl({idx:t,terminalType:e,label:null==n?void 0:n.LABEL});return r.definition.push(i),sQ}},class{initPerformanceTracer(e){if(t9(e,"traceInitPerf")){let t=e.traceInitPerf,n="number"==typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=s5.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0!==this.traceInitPerf)return t();{this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:i}=nL(t),s=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}}}].forEach(e=>{let t=e.prototype;Object.getOwnPropertyNames(t).forEach(n=>{if("constructor"===n)return;let r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(s9.prototype,n,r):s9.prototype[n]=e.prototype[n]})});class s7 extends s9{constructor(e,t=s5){const n=tF(t);n.outputCst=!0,super(e,n)}}let ae=i1({name:"Comment",pattern:/\/\/[^\n]*/,group:iz.SKIPPED}),at=i1({name:"WhiteSpace",pattern:/\s+/,group:iz.SKIPPED}),an=i1({name:"CloseParenthesis",pattern:/\)/}),ar=i1({name:"OpenParenthesis",pattern:/\(/}),ai=i1({name:"OpenBracket",pattern:/\[/}),as=i1({name:"CloseBracket",pattern:/\]/}),aa=i1({name:"OpenCurlyBracket",pattern:/{/}),ao=i1({name:"CloseCurlyBracket",pattern:/}/}),al=i1({name:"Dot",pattern:/\./}),au=i1({name:"Comma",pattern:/,/}),ac=i1({name:"Colon",pattern:/:/}),ah=i1({name:"QuestionMark",pattern:/\?/}),ad=i1({name:"Float",pattern:/-?\d+\.\d+/}),af=i1({name:"HexInteger",pattern:/0x[0-9a-fA-F]+/}),ap=i1({name:"Integer",pattern:/0|[1-9]\d*/}),am=i1({name:"HexUnsignedInteger",pattern:/0x[0-9a-fA-F]+[uU]/}),ag=i1({name:"UnsignedInteger",pattern:/(0|[1-9]\d*)[uU]/}),ay=i1({name:"BooleanLiteral",pattern:/true|false/}),av=i1({name:"True",pattern:/true/,categories:ay}),aE=i1({name:"False",pattern:/false/,categories:ay}),aT=i1({name:"Null",pattern:/null/}),aO=i1({name:"StringLiteral",pattern:/(?:"(?:[^"\n\\]|\\.)*")|(?:'(?:[^'\n\\]|\\.)*')/}),aS=["as","break","const","continue","else","for","function","if","import","let","loop","package","namespace","return","var","void","while"],ak=i1({name:"LogicalOrOperator",pattern:/\|\|/}),aI=i1({name:"LogicalAndOperator",pattern:/&&/}),a_=i1({name:"UnaryOperator",pattern:iz.NA}),aN=i1({name:"LogicalNotOperator",pattern:/!/,categories:a_}),aA=i1({name:"ComparisonOperator",pattern:iz.NA}),ax=i1({name:"Equals",pattern:/==/,categories:aA}),aw=i1({name:"NotEquals",pattern:/!=/,categories:aA}),ab=i1({name:"GreaterOrEqualThan",pattern:/>=/,categories:aA}),aR=i1({name:"LessOrEqualThan",pattern:/<=/,categories:aA}),aC=i1({name:"GreaterThan",pattern:/>/,categories:aA}),aL=i1({name:"LessThan",pattern:/</,categories:aA}),aM=i1({name:"In",pattern:/\bin\b/,categories:aA}),aD=i1({name:"MultiplicationOperator",pattern:iz.NA}),aP=i1({name:"MultiplicationToken",pattern:/\*/,categories:aD}),aU=i1({name:"Division",pattern:/\/(?!\/)/,categories:aD}),aF=i1({name:"Modulo",pattern:/%/,categories:aD}),a$=i1({name:"AdditionOperator",pattern:iz.NA}),aj=i1({name:"Plus",pattern:/\+/,categories:a$}),aV=i1({name:"Minus",pattern:/-/,categories:[a$,a_]}),aW=i1({name:"Identifier",pattern:/[a-zA-Z_][a-zA-Z0-9_]*/}),aB=[ae,at,an,ar,ai,as,aa,ao,al,au,ac,ah,ad,am,af,ag,ap,av,aE,aT,aO,ak,aI,aA,ax,aw,ab,aR,aC,aL,aM,a_,aN,aD,aP,aU,aF,a$,aj,aV,aW],az=new iz(aB);function aH(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function aG(e){return function t(n){return 0==arguments.length||aH(n)?t:e.apply(this,arguments)}}function aK(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function aY(e,t,n){for(var r=0,i=n.length;r<i;){if(e(t,n[r]))return!0;r+=1}return!1}function aq(e,t){return Object.prototype.hasOwnProperty.call(t,e)}let aZ="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var aJ=Object.prototype.toString,aX=function(){return"[object Arguments]"===aJ.call(arguments)?function(e){return"[object Arguments]"===aJ.call(e)}:function(e){return aq("callee",e)}}(),aQ=!({toString:null}).propertyIsEnumerable("toString"),a0=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],a1=function(){return arguments.propertyIsEnumerable("length")}(),a2=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},a3="function"!=typeof Object.keys||a1?aG(function(e){if(Object(e)!==e)return[];var t,n,r=[],i=a1&&aX(e);for(t in e)aq(t,e)&&(!i||"length"!==t)&&(r[r.length]=t);if(aQ)for(n=a0.length-1;n>=0;)aq(t=a0[n],e)&&!a2(r,t)&&(r[r.length]=t),n-=1;return r}):aG(function(e){return Object(e)!==e?[]:Object.keys(e)}),a6=aG(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function a4(e,t,n,r){var i=aK(e);function s(e,t){return a5(e,t,n.slice(),r.slice())}return!aY(function(e,t){return!aY(s,t,e)},aK(t),i)}function a5(e,t,n,r){if(aZ(e,t))return!0;var i,s=a6(e);if(s!==a6(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(s){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(null==(i=String(e.constructor).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&aZ(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!aZ(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var a=n.length-1;a>=0;){if(n[a]===e)return r[a]===t;a-=1}switch(s){case"Map":if(e.size!==t.size)return!1;return a4(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":if(e.size!==t.size)return!1;return a4(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=a3(e);if(o.length!==a3(t).length)return!1;var l=n.concat([e]),u=r.concat([t]);for(a=o.length-1;a>=0;){var c=o[a];if(!(aq(c,t)&&a5(t[c],e[c],l,u)))return!1;a-=1}return!0}var a8=(N=function(e,t){return a5(e,t,[],[])},function e(t,n){switch(arguments.length){case 0:return e;case 1:return aH(t)?e:aG(function(e){return N(t,e)});default:return aH(t)&&aH(n)?e:aH(t)?aG(function(e){return N(e,n)}):aH(n)?aG(function(e){return N(t,e)}):N(t,n)}});(A=u||(u={})).int="int",A.uint="uint",A.float="float",A.string="string",A.bool="bool",A.null="null",A.list="list",A.map="map";let a9=[u.int,u.uint,u.float],a7=e=>{let t=oa(e);return a9.includes(t)},oe=e=>oa(e)===u.int,ot=e=>oa(e)===u.uint,on=e=>oa(e)===u.string,or=e=>oa(e)===u.list,oi=e=>oa(e)===u.bool,os=e=>oa(e)===u.map,oa=e=>{if(null===e)return u.null;if("number"==typeof e){if(Number.isInteger(e)&&e>=0)return u.uint;if(Number.isInteger(e)&&e<=0)return u.int;if(e%1)return u.float;throw Error(`Unknown number type: ${e}`)}if("string"==typeof e)return u.string;if("boolean"==typeof e)return u.bool;if(Array.isArray(e))return u.list;if("object"==typeof e)return u.map;throw Error(`Unknown type: ${typeof e}`)};(x=c||(c={})).addition="addition",x.subtraction="subtraction",x.multiplication="multiplication",x.division="division",x.modulo="modulo",x.logicalAnd="logicalAnd",x.logicalOr="logicalOr",x.lessThan="lessThan",x.lessOrEqualThan="lessOrEqualThan",x.greaterThan="greaterThan",x.greaterOrEqualThan="greaterOrEqualThan",x.equals="equals",x.notEquals="notEquals",x.in="in";let oo=(e,t,n)=>{if(a7(t)&&a7(n)||on(t)&&on(n))switch(e){case c.lessThan:return t<n;case c.lessOrEqualThan:return t<=n;case c.greaterThan:return t>n;case c.greaterOrEqualThan:return t>=n}if(e===c.equals)return a8(t,n);if(e===c.notEquals)return!a8(t,n);if(e===c.in){if(or(n))return n.includes(t);if(os(n))return Object.keys(n).includes(t);throw new oc(c.in,t,n)}throw new oc(e,t,n)},ol=(e,t,r)=>{switch(!0){case iD(e,aj):if(a7(t)&&a7(r)||on(t)&&on(r))return t+r;if(or(t)&&or(r)){if(0!==t.length&&0!==r.length&&typeof t[0]!=typeof r[0])throw new oc(c.addition,t[0],r[0]);return[...t,...r]}throw new oc(c.addition,t,r);case iD(e,aV):if(a7(t)&&a7(r))return t-r;throw new oc(c.subtraction,t,r);case iD(e,aP):if(a7(t)&&a7(r))return t*r;throw new oc(c.multiplication,t,r);case iD(e,aU):if(0===r)throw new n("Division by zero");if((oe(t)||ot(t))&&(oe(r)||ot(r)))return t/r;throw new oc(c.division,t,r);case iD(e,aF):if(0===r)throw new n("Modulus by zero");if((oe(t)||ot(t))&&(oe(r)||ot(r)))return t%r;throw new oc(c.modulo,t,r);case iD(e,aI):if(oi(t)&&oi(r))return t&&r;throw new oc(c.logicalAnd,t,r);case iD(e,ak):if(oi(t)&&oi(r))return t||r;throw new oc(c.logicalOr,t,r);case iD(e,aL):return oo(c.lessThan,t,r);case iD(e,aR):return oo(c.lessOrEqualThan,t,r);case iD(e,aC):return oo(c.greaterThan,t,r);case iD(e,ab):return oo(c.greaterOrEqualThan,t,r);case iD(e,ax):return oo(c.equals,t,r);case iD(e,aw):return oo(c.notEquals,t,r);case iD(e,aM):return oo(c.in,t,r);default:throw Error("Operator not recognized")}},ou=e=>"identifierDotExpression"===e.name?e.children.Dot[0].startOffset:e.children.OpenBracket[0].startOffset;class oc extends Error{constructor(e,t,n){let r;const i=oa(t),s=oa(n);switch(e){case"unaric operation":r=`CelTypeError: Invalid or mixed unary operators applied to ${i}`;break;case"arithmetic negation":case"logical negation":r=`CelTypeError: ${e} operation cannot be applied to value of type ${i}`;break;default:r=`CelTypeError: ${e} operation cannot be applied to (${i}, ${s})`}super(r),this.name="CelTypeError"}}class oh extends s7{constructor(){super(aB),this.performSelfAnalysis()}expr=this.RULE("expr",()=>{this.SUBRULE(this.conditionalOr,{LABEL:"conditionalOr"}),this.OPTION(()=>{this.CONSUME(ah),this.SUBRULE(this.expr,{LABEL:"lhs"}),this.CONSUME(ac),this.SUBRULE2(this.expr,{LABEL:"rhs"})})});conditionalAnd=this.RULE("conditionalAnd",()=>{this.SUBRULE(this.relation,{LABEL:"lhs"}),this.MANY(()=>{this.CONSUME(aI),this.SUBRULE2(this.relation,{LABEL:"rhs"})})});conditionalOr=this.RULE("conditionalOr",()=>{this.SUBRULE(this.conditionalAnd,{LABEL:"lhs"}),this.MANY(()=>{this.CONSUME(ak),this.SUBRULE2(this.conditionalAnd,{LABEL:"rhs"})})});relation=this.RULE("relation",()=>{this.SUBRULE(this.addition,{LABEL:"lhs"}),this.OPTION(()=>{this.CONSUME(aA),this.SUBRULE2(this.addition,{LABEL:"rhs"})})});addition=this.RULE("addition",()=>{this.SUBRULE(this.multiplication,{LABEL:"lhs"}),this.MANY(()=>{this.CONSUME(a$),this.SUBRULE2(this.multiplication,{LABEL:"rhs"})})});multiplication=this.RULE("multiplication",()=>{this.SUBRULE(this.unaryExpression,{LABEL:"lhs"}),this.MANY(()=>{this.CONSUME(aD),this.SUBRULE2(this.unaryExpression,{LABEL:"rhs"})})});unaryExpression=this.RULE("unaryExpression",()=>{this.MANY(()=>{this.CONSUME(a_)}),this.SUBRULE(this.atomicExpression)});parenthesisExpression=this.RULE("parenthesisExpression",()=>{this.CONSUME(ar,{LABEL:"open"}),this.SUBRULE(this.expr),this.CONSUME(an,{LABEL:"close"})});listExpression=this.RULE("listExpression",()=>{this.CONSUME(ai),this.OPTION(()=>{this.SUBRULE(this.expr,{LABEL:"lhs"}),this.MANY(()=>{this.CONSUME(au),this.SUBRULE2(this.expr,{LABEL:"rhs"})})}),this.CONSUME(as),this.OPTION2(()=>{this.SUBRULE(this.indexExpression,{LABEL:"Index"})})});mapExpression=this.RULE("mapExpression",()=>{this.CONSUME(aa),this.MANY(()=>{this.SUBRULE(this.mapKeyValues,{LABEL:"keyValues"})}),this.CONSUME(ao),this.MANY2(()=>{this.OR([{ALT:()=>this.SUBRULE(this.identifierDotExpression)},{ALT:()=>this.SUBRULE(this.indexExpression,{LABEL:"identifierIndexExpression"})}])})});mapKeyValues=this.RULE("mapKeyValues",()=>{this.SUBRULE(this.expr,{LABEL:"key"}),this.CONSUME(ac),this.SUBRULE2(this.expr,{LABEL:"value"}),this.OPTION(()=>{this.CONSUME(au)})});macrosExpression=this.RULE("macrosExpression",()=>{this.CONSUME(aW),this.CONSUME(ar),this.OPTION(()=>{this.SUBRULE(this.expr,{LABEL:"arg"}),this.MANY(()=>{this.CONSUME(au),this.SUBRULE2(this.expr,{LABEL:"args"})})}),this.CONSUME(an)});identifierExpression=this.RULE("identifierExpression",()=>{this.CONSUME(aW),this.MANY(()=>{this.OR([{ALT:()=>this.SUBRULE(this.identifierDotExpression)},{ALT:()=>this.SUBRULE(this.indexExpression,{LABEL:"identifierIndexExpression"})}])})});identifierDotExpression=this.RULE("identifierDotExpression",()=>{this.CONSUME(al),this.CONSUME(aW),this.OPTION(()=>{this.CONSUME(ar),this.OPTION2(()=>{this.SUBRULE(this.expr,{LABEL:"arg"}),this.MANY(()=>{this.CONSUME(au),this.SUBRULE2(this.expr,{LABEL:"args"})})}),this.CONSUME(an)})});indexExpression=this.RULE("indexExpression",()=>{this.CONSUME(ai),this.SUBRULE(this.expr),this.CONSUME(as)});atomicExpression=this.RULE("atomicExpression",()=>{this.OR([{ALT:()=>this.SUBRULE(this.parenthesisExpression)},{ALT:()=>this.CONSUME(ay)},{ALT:()=>this.CONSUME(aT)},{ALT:()=>this.CONSUME(aO)},{ALT:()=>this.CONSUME(ad)},{ALT:()=>this.CONSUME(am)},{ALT:()=>this.CONSUME(af)},{ALT:()=>this.CONSUME(ag)},{ALT:()=>this.CONSUME(ap)},{ALT:()=>this.SUBRULE(this.listExpression)},{ALT:()=>this.SUBRULE(this.mapExpression)},{ALT:()=>this.SUBRULE(this.macrosExpression)},{ALT:()=>this.SUBRULE(this.identifierExpression)}])})}(w=h||(h={}))[w.normal=0]="normal",w[w.has=1]="has",w[w.extract_variable=2]="extract_variable";let od=["all","exists","exists_one","filter","map"],of=new oh().getBaseCstVisitorConstructor(),op={has:e=>void 0!==e,size:e=>{if(on(e)||or(e))return e.length;if(os(e))return Object.keys(e).length;throw new n(`invalid_argument: ${e}`)}};class om extends of{constructor(e,t){super(),this.context=e||{},this.functions={...op,...t||{}},this.validateVisitor()}context;mode=h.normal;functions;isCollectionMacro(e){return od.includes(e)}isMap(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}handleCollectionMacroCall(e,t,r){if(!Array.isArray(t)&&!this.isMap(t))throw new n(`${e}() can only be called on lists or maps`);let i=[...r.arg?[r.arg]:[],...r.args||[]];if(i.length<2)throw new n(`${e}() requires at least 2 arguments`);let s=Array.isArray(i[0])?i[0][0]:i[0],a=Array.isArray(i[1])?i[1][0]:i[1];if("expr"!==s.name||!s.children.conditionalOr[0])throw new n(`${e}() first argument must be a variable name`);let o=this.extractVariableName(s),l=this.isMap(t)?Object.keys(t):t;switch(e){case"filter":return this.handleFilter(l,o,a);case"map":return this.handleMap(l,o,i);case"all":return this.handleAll(l,o,a);case"exists":return this.handleExists(l,o,a);case"exists_one":return this.handleExistsOne(l,o,a);default:throw new n(`Unknown collection macro: ${e}`)}}extractVariableName(e){let t=this.mode;this.mode=h.extract_variable;try{let t=this.visit(e);if("string"!=typeof t)throw new n("Variable name must be a simple identifier");return t}catch(e){if(e instanceof n)throw e;throw new n("Variable name must be a simple identifier")}finally{this.mode=t}}evaluateWithBinding(e,t,n){let r=this.context[t],i=t in this.context;try{return this.context[t]=n,this.visit(e)}finally{i?this.context[t]=r:delete this.context[t]}}handleFilter(e,t,n){let r=[];for(let i of e)this.evaluateWithBinding(n,t,i)&&r.push(i);return r}handleMap(e,t,r){if(2===r.length){let n=Array.isArray(r[1])?r[1][0]:r[1];return e.map(e=>this.evaluateWithBinding(n,t,e))}if(3===r.length){let n=Array.isArray(r[1])?r[1][0]:r[1],i=Array.isArray(r[2])?r[2][0]:r[2],s=[];for(let r of e)if(this.evaluateWithBinding(n,t,r)){let e=this.evaluateWithBinding(i,t,r);s.push(e)}return s}throw new n("map() requires 2 or 3 arguments")}handleAll(e,t,n){return e.every(e=>this.evaluateWithBinding(n,t,e))}handleExists(e,t,n){return e.some(e=>this.evaluateWithBinding(n,t,e))}handleExistsOne(e,t,n){return 1===e.filter(e=>this.evaluateWithBinding(n,t,e)).length}expr(e){if(this.mode===h.extract_variable&&e.QuestionMark)throw new n("Variable name must be a simple identifier");let t=this.visit(e.conditionalOr[0]);return e.QuestionMark?t?this.visit(e.lhs[0]):this.visit(e.rhs[0]):t}handleHasMacro(e){if(!e.arg)throw new n("has() requires exactly one argument");this.mode=h.has;try{let t=this.visit(e.arg);return this.functions.has(t)}catch(e){if(e instanceof n)throw e;return!1}finally{this.mode=h.normal}}handleGenericMacro(e,t){return e(...t.arg?[this.visit(t.arg)]:[],...t.args?t.args.map(e=>this.visit(e)):[])}conditionalOr(e){if(this.mode===h.extract_variable&&e.rhs)throw new n("Variable name must be a simple identifier");let t=this.visit(e.lhs);return e.rhs&&e.rhs.forEach(n=>{let r=this.visit(n);t=ol(e.LogicalOrOperator[0],t,r)}),t}conditionalAnd(e){if(this.mode===h.extract_variable&&e.rhs)throw new n("Variable name must be a simple identifier");let t=this.visit(e.lhs);return!1!==t&&(e.rhs&&e.rhs.forEach(n=>{let r=this.visit(n);t=ol(e.LogicalAndOperator[0],t,r)}),t)}relation(e){if(this.mode===h.extract_variable&&e.rhs)throw new n("Variable name must be a simple identifier");let t=this.visit(e.lhs);if(e.rhs){let n=this.visit(e.rhs);return ol(e.ComparisonOperator[0],t,n)}return t}addition(e){if(this.mode===h.extract_variable&&e.rhs)throw new n("Variable name must be a simple identifier");let t=this.visit(e.lhs);return e.rhs&&e.rhs.forEach((n,r)=>{let i=this.visit(n);t=ol(e.AdditionOperator[r],t,i)}),t}multiplication(e){if(this.mode===h.extract_variable&&e.rhs)throw new n("Variable name must be a simple identifier");let t=this.visit(e.lhs);return e.rhs&&e.rhs.forEach((n,r)=>{let i=this.visit(n);t=ol(e.MultiplicationOperator[r],t,i)}),t}unaryExpression(e){if(this.mode===h.extract_variable&&e.UnaryOperator)throw new n("Variable name must be a simple identifier");if(e.UnaryOperator){var t=e.UnaryOperator,r=this.visit(e.atomicExpression);if(0===t.length)return r;let n=t.length%2==0;if(t.every(e=>iD(e,aN))){if(null===r)return!n;if(!oi(r))throw new oc("logical negation",r,null);return n?r:!r}if(t.every(e=>iD(e,aV))){if(!a7(r))throw new oc("arithmetic negation",r,null);return n||0!==r?n?r:-r:0}throw new oc("unary operation",r,null)}return this.visit(e.atomicExpression)}parenthesisExpression(e){return this.visit(e.expr)}listExpression(e){let t=[];if(!e.lhs)return[];let r=this.visit(e.lhs);if(t.push(r),e.rhs)for(let n of e.rhs){let e=this.visit(n);t.push(e)}if(!e.Index)return t;let i=this.visit(e.Index),s=oa(i);if(s!=u.int&&s!=u.uint)throw new n(`invalid_argument: ${i}`);if(i<0||i>=t.length)throw new n(`Index out of bounds: ${i}`);return t[i]}mapExpression(e){let t={};if(!e.keyValues)return{};let r="";for(let i of e.keyValues){let[e,s]=this.visit(i);if(""===r&&(r=oa(s)),oa(e)!=u.string)throw new n(`invalid_argument: ${e}`);if(r!==oa(s))throw new n(`invalid_argument: ${s}`);t[e]=s}return e.identifierDotExpression||e.identifierIndexExpression?this.getIndexSection(e,t):t}getIndexSection(e,t){return[...e.identifierDotExpression||[],...e.identifierIndexExpression||[]].sort((e,t)=>ou(e)>ou(t)?1:-1).reduce((e,t)=>{if("identifierDotExpression"===t.name)return this.identifierDotExpression(t.children,e);let n=this.visit(t.children.expr[0]);return this.getIdentifier(e,n)},t)}mapKeyValues(e){return[this.visit(e.key),this.visit(e.value)]}macrosExpression(e){let[t]=e.Identifier,n=this.functions[t.image];if(!n)throw Error(`Macros ${t.image} not recognized`);return"has"===t.image?this.handleHasMacro(e):this.handleGenericMacro(n,e)}atomicExpression(e){if(this.mode===h.extract_variable&&!e.identifierExpression)throw new n("Variable name must be a simple identifier");if(e.Null)return null;if(this.mode===h.has&&!e.identifierExpression)throw new n("has() does not support atomic expressions");if(e.parenthesisExpression)return this.visit(e.parenthesisExpression);if(e.StringLiteral)return e.StringLiteral[0].image.slice(1,-1);if(e.BooleanLiteral)return"true"===e.BooleanLiteral[0].image;if(e.Float)return parseFloat(e.Float[0].image);if(e.Integer)return parseInt(e.Integer[0].image,10);if(e.UnsignedInteger)return parseInt(e.UnsignedInteger[0].image.slice(0,-1),10);if(e.HexInteger)return parseInt(e.HexInteger[0].image.slice(2),16);if(e.HexUnsignedInteger)return parseInt(e.HexUnsignedInteger[0].image.slice(2,-1),16);if(e.identifierExpression)return this.visit(e.identifierExpression);if(e.listExpression)return this.visit(e.listExpression);if(e.mapExpression)return this.visit(e.mapExpression);if(e.macrosExpression)return this.visit(e.macrosExpression);throw Error("Atomic expression not recognized")}identifierExpression(e){if(this.mode===h.extract_variable){if(e.identifierDotExpression||e.identifierIndexExpression)throw new n("Variable name must be a simple identifier");return e.Identifier[0].image}if(this.mode===h.has&&!e.identifierDotExpression?.length)throw new n("has() requires a field selection");let t=e.Identifier[0].image;if(!e.identifierDotExpression&&!e.identifierIndexExpression&&aS.includes(t))throw Error("Detected reserved identifier. This is not allowed");let r=this.context,i=this.getIdentifier(r,t);return e.identifierDotExpression||e.identifierIndexExpression?this.getIndexSection(e,i):i}identifierDotExpression(e,t){let r=e.Identifier[0].image;if(e.OpenParenthesis){if(this.isCollectionMacro(r))return this.handleCollectionMacroCall(r,t,e);throw new n(`Unknown method: ${r}`)}return this.getIdentifier(t,r)}indexExpression(e){return this.visit(e.expr)}getIdentifier(e,t){if("object"!=typeof e||null===e)throw Error(`Cannot obtain "${t}" from non-object context: ${e}`);let n=e[t];if(void 0===n){let e=JSON.stringify(this?.context);if("{}"===e)throw Error(`Identifier "${t}" not found, no context passed`);throw Error(`Identifier "${t}" not found in context: ${e}`)}return n}}let og=new oh;class oy extends Error{expression;constructor(e,t,n){super(t),this.name="ConditionEvaluationError",this.expression=e,void 0!==n&&(this.cause=n)}}function ov(e,n){try{let r=function(e,n,r){let i,s="string"==typeof e?(og.input=az.tokenize(e).tokens,i=og.expr(),og.errors.length>0?{isSuccess:!1,errors:og.errors.map(e=>e.message)}:{isSuccess:!0,cst:i}):{isSuccess:!0,cst:e},a=new om(n,void 0);if(!s.isSuccess)throw new t("Given string is not a valid CEL expression: "+s.errors.join(", "));return a.visit(s.cst)}(e,n);if("boolean"!=typeof r)throw new oy(e,"Condition expression must evaluate to a boolean value.");return r}catch(n){if(n instanceof oy)throw n;let t=n instanceof Error?n.message:String(n);throw new oy(e,`Failed to evaluate condition expression: ${t}`,n)}}e.s(["evaluateCondition",()=>ov],4468);class oE{constructor(e){this._process=e,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(e){let t={value:e,next:null};if(this._current){this._last.next=t,this._last=t;return}this._current=t,this._last=t,this._active&&this.flush()}flush(){for(;this._current;){let e=this._current;this._process(e.value),this._current=e.next}this._last=null}}let oT="xstate.init",oO="xstate.stop";function oS(e,t){return{type:`xstate.done.state.${e}`,output:t}}function ok(e,t){return{type:`xstate.error.actor.${e}`,error:t,actorId:e}}function oI(e){return{type:oT,input:e}}function o_(e){setTimeout(()=>{throw e})}let oN="function"==typeof Symbol&&Symbol.observable||"@@observable";function oA(e){if(oC(e))return e;let t=[],n="";for(let r=0;r<e.length;r++){switch(e.charCodeAt(r)){case 92:n+=e[r+1],r++;continue;case 46:t.push(n),n="";continue}n+=e[r]}return t.push(n),t}function ox(e){var t;return(t=e)&&"object"==typeof t&&"machine"in t&&"value"in t?e.value:"string"!=typeof e?e:function(e){if(1===e.length)return e[0];let t={},n=t;for(let t=0;t<e.length-1;t++)if(t===e.length-2)n[e[t]]=e[t+1];else{let r=n;n={},r[e[t]]=n}return t}(oA(e))}function ow(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let s=r[i];n[s]=t(e[s],s,e,i)}return n}function ob(e){var t;return void 0===e?[]:oC(t=e)?t:[t]}function oR(e,t,n,r){return"function"==typeof e?e({context:t,event:n,self:r}):e}function oC(e){return Array.isArray(e)}function oL(e){var t;return(oC(t=e)?t:[t]).map(e=>void 0===e||"string"==typeof e?{target:e}:e)}function oM(e){if(void 0!==e&&""!==e)return ob(e)}function oD(e,t,n){let r="object"==typeof e,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}function oP(e,t){let n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];let[,r,i]=n,s=e.getStateNodeById(i).config.invoke;return(Array.isArray(s)?s[r]:s).src}function oU(e,t){return`${e.sessionId}.${t}`}let oF=0,o$=!1,oj=((b={})[b.NotStarted=0]="NotStarted",b[b.Running=1]="Running",b[b.Stopped=2]="Stopped",b),oV={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:!1};class oW{constructor(e,t){this.logic=e,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new oE(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=oj.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this.systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const n={...oV,...t},{clock:r,logger:i,parent:s,syncSnapshot:a,id:o,systemId:l,inspect:u}=n;this.system=s?s.system:function(e,t){let n=new Map,r=new Map,i=new WeakMap,s=new Set,a={},{clock:o,logger:l}=t,u={schedule:(e,t,n,r,i=Math.random().toString(36).slice(2))=>{let s={source:e,target:t,event:n,delay:r,id:i,startedAt:Date.now()},l=oU(e,i);c._snapshot._scheduledEvents[l]=s;let u=o.setTimeout(()=>{delete a[l],delete c._snapshot._scheduledEvents[l],c._relay(e,t,n)},r);a[l]=u},cancel:(e,t)=>{let n=oU(e,t),r=a[n];delete a[n],delete c._snapshot._scheduledEvents[n],void 0!==r&&o.clearTimeout(r)},cancelAll:e=>{for(let t in c._snapshot._scheduledEvents){let n=c._snapshot._scheduledEvents[t];n.source===e&&u.cancel(e,n.id)}}},c={_snapshot:{_scheduledEvents:(t?.snapshot&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${oF++}`,_register:(e,t)=>(n.set(e,t),e),_unregister:e=>{n.delete(e.sessionId);let t=i.get(e);void 0!==t&&(r.delete(t),i.delete(e))},get:e=>r.get(e),getAll:()=>Object.fromEntries(r.entries()),_set:(e,t)=>{let n=r.get(e);if(n&&n!==t)throw Error(`Actor with system ID '${e}' already exists.`);r.set(e,t),i.set(t,e)},inspect:e=>{let t=oD(e);return s.add(t),{unsubscribe(){s.delete(t)}}},_sendInspectionEvent:t=>{if(!s.size)return;let n={...t,rootId:e.sessionId};s.forEach(e=>e.next?.(n))},_relay:(e,t,n)=>{c._sendInspectionEvent({type:"@xstate.event",sourceRef:e,actorRef:t,event:n}),t._send(n)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...c._snapshot._scheduledEvents}}),start:()=>{let e=c._snapshot._scheduledEvents;for(let t in c._snapshot._scheduledEvents={},e){let{source:n,target:r,event:i,delay:s,id:a}=e[t];u.schedule(n,r,i,s,a)}},_clock:o,_logger:l};return c}(this,{clock:r,logger:i}),u&&!s&&this.system.inspect(oD(u)),this.sessionId=this.system._bookId(),this.id=o??this.sessionId,this.logger=t?.logger??this.system._logger,this.clock=t?.clock??this.system._clock,this._parent=s,this._syncSnapshot=a,this.options=n,this.src=n.src??e,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:e=>{this._deferred.push(e)},system:this.system,stopChild:e=>{if(e._parent!==this)throw Error(`Cannot stop child actor ${e.id} of ${this.id} because it is not a child`);e._stop()},emit:e=>{let t=this.eventListeners.get(e.type),n=this.eventListeners.get("*");if(t||n)for(let r of[...t?t.values():[],...n?n.values():[]])try{r(e)}catch(e){o_(e)}},actionExecutor:e=>{let t=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:e.type,params:e.params}}),!e.exec)return;let t=o$;try{o$=!0,e.exec(e.info,e.params)}finally{o$=t}};this._processingStatus===oj.Running?t():this._deferred.push(t)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),l&&(this.systemId=l,this.system._set(l,this)),this._initState(t?.snapshot??t?.state),l&&"active"!==this._snapshot.status&&this.system._unregister(this)}_initState(e){try{this._snapshot=e?this.logic.restoreSnapshot?this.logic.restoreSnapshot(e,this._actorScope):e:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(e){this._snapshot={status:"error",output:void 0,error:e}}}update(e,t){let n;for(this._snapshot=e;n=this._deferred.shift();)try{n()}catch(t){this._deferred.length=0,this._snapshot={...e,status:"error",error:t}}switch(this._snapshot.status){case"active":for(let t of this.observers)try{t.next?.(e)}catch(e){o_(e)}break;case"done":var r;for(let t of this.observers)try{t.next?.(e)}catch(e){o_(e)}this._stopProcedure(),this._complete(),this._doneEvent=(r=this.id,{type:`xstate.done.actor.${r}`,output:this._snapshot.output,actorId:r}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:t,snapshot:e})}subscribe(e,t,n){let r=oD(e,t,n);if(this._processingStatus!==oj.Stopped)this.observers.add(r);else switch(this._snapshot.status){case"done":try{r.complete?.()}catch(e){o_(e)}break;case"error":{let e=this._snapshot.error;if(r.error)try{r.error(e)}catch(e){o_(e)}else o_(e)}}return{unsubscribe:()=>{this.observers.delete(r)}}}on(e,t){let n=this.eventListeners.get(e);n||(n=new Set,this.eventListeners.set(e,n));let r=t.bind(void 0);return n.add(r),{unsubscribe:()=>{n.delete(r)}}}start(){if(this._processingStatus===oj.Running)return this;this._syncSnapshot&&this.subscribe({next:e=>{"active"===e.status&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:e})},error:()=>{}}),this.system._register(this.sessionId,this),this.systemId&&this.system._set(this.systemId,this),this._processingStatus=oj.Running;let e=oI(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:e}),this._snapshot.status){case"done":return this.update(this._snapshot,e),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(e){return this._snapshot={...this._snapshot,status:"error",error:e},this._error(e),this}return this.update(this._snapshot,e),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(e){let t,n;try{t=this.logic.transition(this._snapshot,e,this._actorScope)}catch(e){n={err:e}}if(n){let{err:e}=n;this._snapshot={...this._snapshot,status:"error",error:e},this._error(e);return}this.update(t,e),e.type===oO&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===oj.Stopped||((this.mailbox.clear(),this._processingStatus===oj.NotStarted)?this._processingStatus=oj.Stopped:this.mailbox.enqueue({type:oO})),this}stop(){if(this._parent)throw Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let e of this.observers)try{e.complete?.()}catch(e){o_(e)}this.observers.clear(),this.eventListeners.clear()}_reportError(e){if(!this.observers.size){this._parent||o_(e),this.eventListeners.clear();return}let t=!1;for(let n of this.observers){let r=n.error;t||=!r;try{r?.(e)}catch(e){o_(e)}}this.observers.clear(),this.eventListeners.clear(),t&&o_(e)}_error(e){this._stopProcedure(),this._reportError(e),this._parent&&this.system._relay(this,this._parent,ok(this.id,e))}_stopProcedure(){return this._processingStatus!==oj.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new oE(this._process.bind(this)),this._processingStatus=oj.Stopped,this.system._unregister(this)),this}_send(e){this._processingStatus!==oj.Stopped&&this.mailbox.enqueue(e)}send(e){this.system._relay(void 0,this,e)}attachDevTools(){let{devTools:e}=this.options;e&&("function"==typeof e?e:e=>{})(this)}toJSON(){return{xstate$$type:1,id:this.id}}getPersistedSnapshot(e){return this.logic.getPersistedSnapshot(this._snapshot,e)}[oN](){return this}getSnapshot(){return this._snapshot}}function oB(e,...[t]){return new oW(e,t)}function oz(e,t,n,r,{sendId:i}){return[t,{sendId:"function"==typeof i?i(n,r):i},void 0]}function oH(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t.sendId)})}function oG(e){function t(e,t){}return t.type="xstate.cancel",t.sendId=e,t.resolve=oz,t.execute=oH,t}function oK(e,t,n,r,{id:i,systemId:s,src:a,input:o,syncSnapshot:l}){let u,c,h="string"==typeof a?oP(t.machine,a):a,d="function"==typeof i?i(n):i;return h&&(c="function"==typeof o?o({context:t.context,event:n.event,self:e.self}):o,u=oB(h,{id:d,src:a,parent:e.self,syncSnapshot:l,systemId:s,input:c})),[lI(t,{children:{...t.children,[d]:u}}),{id:i,systemId:s,actorRef:u,src:a,input:c},void 0]}function oY(e,{actorRef:t}){t&&e.defer(()=>{t._processingStatus!==oj.Stopped&&t.start()})}function oq(...[e,{id:t,systemId:n,input:r,syncSnapshot:i=!1}={}]){function s(e,t){}return s.type="xstate.spawnChild",s.id=t,s.systemId=n,s.src=e,s.input=r,s.syncSnapshot=i,s.resolve=oK,s.execute=oY,s}function oZ(e,t,n,r,{actorRef:i}){let s="function"==typeof i?i(n,r):i,a="string"==typeof s?t.children[s]:s,o=t.children;return a&&(o={...o},delete o[a.id]),[lI(t,{children:o}),a,void 0]}function oJ(e,t){if(t){if(!function e(t,n){let r=n.getSnapshot();if(r&&"children"in r)for(let n of Object.values(r.children))e(t,n);t.system._unregister(n)}(e,t),t._processingStatus!==oj.Running)return void e.stopChild(t);e.defer(()=>{e.stopChild(t)})}}function oX(e){function t(e,t){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=oZ,t.execute=oJ,t}function oQ(e,t,n,r){let{machine:i}=r,s="function"==typeof e,a=s?e:i.implementations.guards["string"==typeof e?e:e.type];if(!s&&!a)throw Error(`Guard '${"string"==typeof e?e:e.type}' is not implemented.'.`);if("function"!=typeof a)return oQ(a,t,n,r);let o={context:t,event:n},l=s||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:t,event:n}):e.params:void 0;return"check"in a?a.check(r,o,a):a(o,l)}function o0(e){return"atomic"===e.type||"final"===e.type}function o1(e){return Object.values(e.states).filter(e=>"history"!==e.type)}function o2(e,t){let n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function o3(e){let t=new Set(e),n=o6(t);for(let e of t)if("compound"!==e.type||n.get(e)&&n.get(e).length){if("parallel"===e.type){for(let n of o1(e))if("history"!==n.type&&!t.has(n))for(let e of lt(n))t.add(e)}}else lt(e).forEach(e=>t.add(e));for(let e of t){let n=e.parent;for(;n;)t.add(n),n=n.parent}return t}function o6(e){let t=new Map;for(let n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function o4(e,t){return function e(t,n){let r=n.get(t);if(!r)return{};if("compound"===t.type){let e=r[0];if(!e)return{};if(o0(e))return e.key}let i={};for(let t of r)i[t.key]=e(t,n);return i}(e,o6(o3(t)))}function o5(e,t){return"compound"===t.type?o1(t).some(t=>"final"===t.type&&e.has(t)):"parallel"===t.type?o1(t).every(t=>o5(e,t)):"final"===t.type}let o8=e=>"#"===e[0];function o9(e,t,n){let r=oM(n.target),i=n.reenter??!1,s=function(e,t){if(void 0!==t)return t.map(t=>{if("string"!=typeof t)return t;if(o8(t))return e.machine.getStateNodeById(t);let n="."===t[0];if(n&&!e.parent)return li(e,t.slice(1));let r=n?e.key+t:t;if(e.parent)try{return li(e.parent,r)}catch(t){throw Error(`Invalid transition definition for state node '${e.id}':
56
- ${t.message}`)}throw Error(`Invalid target: "${t}" is not a valid target from the root node. Did you mean ".${t}"?`)})}(e,r),a={...n,actions:ob(n.actions),guard:n.guard,target:s,source:e,reenter:i,eventType:t,toJSON:()=>({...a,source:`#${e.id}`,target:s?s.map(e=>`#${e.id}`):void 0})};return a}function o7(e){let t=oM(e.config.target);return t?{target:t.map(t=>"string"==typeof t?li(e.parent,t):t)}:e.parent.initial}function le(e){return"history"===e.type}function lt(e){let t=ln(e);for(let n of t)for(let r of o2(n,e))t.add(r);return t}function ln(e){let t=new Set;return!function e(n){if(!t.has(n)){if(t.add(n),"compound"===n.type)e(n.initial.target[0]);else if("parallel"===n.type)for(let t of o1(n))e(t)}}(e),t}function lr(e,t){if(o8(t))return e.machine.getStateNodeById(t);if(!e.states)throw Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);let n=e.states[t];if(!n)throw Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function li(e,t){if("string"==typeof t&&o8(t))try{return e.machine.getStateNodeById(t)}catch{}let n=oA(t).slice(),r=e;for(;n.length;){let e=n.shift();if(!e.length)break;r=lr(r,e)}return r}function ls(e,t){if("string"==typeof t){let n=e.states[t];if(!n)throw Error(`State '${t}' does not exist on '${e.id}'`);return[e,n]}let n=Object.keys(t),r=n.map(t=>lr(e,t)).filter(Boolean);return[e.machine.root,e].concat(r,n.reduce((n,r)=>{let i=lr(e,r);if(!i)return n;let s=ls(i,t[r]);return n.concat(s)},[]))}function la(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function lo(e,t,n){let r=new Set;for(let i of e){let e=!1,s=new Set;for(let a of r)if(function(e,t){let n=new Set(e),r=new Set(t);for(let e of n)if(r.has(e))return!0;for(let e of r)if(n.has(e))return!0;return!1}(lc([i],t,n),lc([a],t,n)))if(la(i.source,a.source))s.add(a);else{e=!0;break}if(!e){for(let e of s)r.delete(e);r.add(i)}}return Array.from(r)}function ll(e,t){if(!e.target)return[];let n=new Set;for(let r of e.target)if(le(r))if(t[r.id])for(let e of t[r.id])n.add(e);else for(let e of ll(o7(r),t))n.add(e);else n.add(r);return[...n]}function lu(e,t){let n=ll(e,t);if(!n)return;if(!e.reenter&&n.every(t=>t===e.source||la(t,e.source)))return e.source;let r=function(e){let[t,...n]=e;for(let e of o2(t,void 0))if(n.every(t=>la(t,e)))return e}(n.concat(e.source));return r||(e.reenter?void 0:e.source.machine.root)}function lc(e,t,n){let r=new Set;for(let i of e)if(i.target?.length){let e=lu(i,n);for(let n of(i.reenter&&i.source===e&&r.add(e),t))la(n,e)&&r.add(n)}return[...r]}function lh(e,t,n,r,i,s){let a=[];if(!e.length)return[t,a];let o=n.actionExecutor;n.actionExecutor=e=>{a.push(e),o(e)};try{let o=new Set(t._nodes),l=t.historyValue,u=lo(e,o,l),c=t;i||([c,l]=function(e,t,n,r,i,s,a,o){let l,u=e,c=lc(r,i,s);for(let e of(c.sort((e,t)=>t.order-e.order),c))for(let t of function(e){return Object.keys(e.states).map(t=>e.states[t]).filter(e=>"history"===e.type)}(e)){let n;n="deep"===t.history?t=>o0(t)&&la(t,e):t=>t.parent===e,(l??={...s})[t.id]=Array.from(i).filter(n)}for(let e of c)u=lp(u,t,n,[...e.exit,...e.invoke.map(e=>oX(e.id))],a,void 0),i.delete(e);return[u,l||s]}(c,r,n,u,o,l,s,n.actionExecutor)),c=lp(c,r,n,u.flatMap(e=>e.actions),s,void 0),c=function(e,t,n,r,i,s,a,o){let l=e,u=new Set,c=new Set;(function(e,t,n,r){for(let i of e){let e=lu(i,t);for(let s of i.target||[])!le(s)&&(i.source!==s||i.source!==e||i.reenter)&&(r.add(s),n.add(s)),ld(s,t,n,r);for(let s of ll(i,t)){let a=o2(s,e);e?.type==="parallel"&&a.push(e),lf(r,t,n,a,!i.source.parent&&i.reenter?void 0:e)}}})(r,a,c,u),o&&c.add(e.machine.root);let h=new Set;for(let e of[...u].sort((e,t)=>e.order-t.order)){i.add(e);let r=[];for(let t of(r.push(...e.entry),e.invoke))r.push(oq(t.src,{...t,syncSnapshot:!!t.onSnapshot}));if(c.has(e)){let t=e.initial.actions;r.push(...t)}if(l=lp(l,t,n,r,s,e.invoke.map(e=>e.id)),"final"===e.type){let r=e.parent,a=r?.type==="parallel"?r:r?.parent,o=a||e;for(r?.type==="compound"&&s.push(oS(r.id,void 0!==e.output?oR(e.output,l.context,t,n.self):void 0));a?.type==="parallel"&&!h.has(a)&&o5(i,a);)h.add(a),s.push(oS(a.id)),o=a,a=a.parent;if(a)continue;l=lI(l,{status:"done",output:function(e,t,n,r,i){if(void 0===r.output)return;let s=oS(i.id,void 0!==i.output&&i.parent?oR(i.output,e.context,t,n.self):void 0);return oR(r.output,e.context,s,n.self)}(l,t,n,l.machine.root,o)})}}return l}(c,r,n,u,o,s,l,i);let h=[...o];"done"===c.status&&(c=lp(c,r,n,h.sort((e,t)=>t.order-e.order).flatMap(e=>e.exit),s,void 0));try{if(l===t.historyValue&&function(e,t){if(e.length!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}(t._nodes,o))return[c,a];return[lI(c,{_nodes:h,historyValue:l}),a]}catch(e){throw e}}finally{n.actionExecutor=o}}function ld(e,t,n,r){var i,s,a,o;if(le(e))if(t[e.id]){let a=t[e.id];for(let e of a)r.add(e),ld(e,t,n,r);for(let o of a){i=o,s=e.parent,lf(r,t,n,o2(i,s))}}else{let i=o7(e);for(let s of i.target)r.add(s),i===e.parent?.initial&&n.add(e.parent),ld(s,t,n,r);for(let s of i.target){a=s,o=e.parent,lf(r,t,n,o2(a,o))}}else if("compound"===e.type){let[i]=e.initial.target;le(i)||(r.add(i),n.add(i)),ld(i,t,n,r),lf(r,t,n,o2(i,e))}else if("parallel"===e.type)for(let i of o1(e).filter(e=>!le(e)))[...r].some(e=>la(e,i))||(le(i)||(r.add(i),n.add(i)),ld(i,t,n,r))}function lf(e,t,n,r,i){for(let s of r)if((!i||la(s,i))&&e.add(s),"parallel"===s.type)for(let r of o1(s).filter(e=>!le(e)))[...e].some(e=>la(e,r))||(e.add(r),ld(r,t,n,e))}function lp(e,t,n,r,i,s){let a=s?[]:void 0,o=function e(t,n,r,i,s,a){let{machine:o}=t,l=t;for(let t of i){var u;let i="function"==typeof t,c=i?t:(u="string"==typeof t?t:t.type,o.implementations.actions[u]),h={context:l.context,event:n,self:r.self,system:r.system},d=i||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:l.context,event:n}):t.params:void 0;if(!c||!("resolve"in c)){r.actionExecutor({type:"string"==typeof t?t:"object"==typeof t?t.type:t.name||"(anonymous)",info:h,params:d,exec:c});continue}let[f,p,m]=c.resolve(r,l,h,d,c,s);l=f,"retryResolve"in c&&a?.push([c,p]),"execute"in c&&r.actionExecutor({type:c.type,info:h,params:p,exec:c.execute.bind(null,r,p)}),m&&(l=e(l,n,r,m,s,a))}return l}(e,t,n,r,{internalQueue:i,deferredActorIds:s},a);return a?.forEach(([e,t])=>{e.retryResolve(n,o,t)}),o}function lm(e,t,n,r){let i=e,s=[];function a(e,t,r){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:t,snapshot:e[0],_transitions:r}),s.push(e)}if(t.type===oO)return a([i=lI(lg(i,t,n),{status:"stopped"}),[]],t,[]),{snapshot:i,microsteps:s};let o=t;if(o.type!==oT){let t=o,l=t.type.startsWith("xstate.error.actor"),u=ly(t,i);if(l&&!u.length)return a([i=lI(e,{status:"error",error:t.error}),[]],t,[]),{snapshot:i,microsteps:s};let c=lh(u,e,n,o,!1,r);i=c[0],a(c,t,u)}let l=!0;for(;"active"===i.status;){let e=l?function(e,t){let n=new Set;for(let r of e._nodes.filter(o0))r:for(let i of[r].concat(o2(r,void 0)))if(i.always){for(let r of i.always)if(void 0===r.guard||oQ(r.guard,e.context,t,e)){n.add(r);break r}}return lo(Array.from(n),new Set(e._nodes),e.historyValue)}(i,o):[],t=e.length?i:void 0;if(!e.length){if(!r.length)break;e=ly(o=r.shift(),i)}let s=lh(e,i,n,o,!1,r);l=(i=s[0])!==t,a(s,o,e)}return"active"!==i.status&&lg(i,o,n),{snapshot:i,microsteps:s}}function lg(e,t,n){return lp(e,t,n,Object.values(e.children).map(e=>oX(e)),[],void 0)}function ly(e,t){return t.machine.getTransitionData(t,e)}let lv=function(e){return function e(t,n){let r=ox(t),i=ox(n);return"string"==typeof i?"string"==typeof r&&i===r:"string"==typeof r?r in i:Object.keys(r).every(t=>t in i&&e(r[t],i[t]))}(e,this.value)},lE=function(e){return this.tags.has(e)},lT=function(e){let t=this.machine.getTransitionData(this,e);return!!t?.length&&t.some(e=>void 0!==e.target||e.actions.length)},lO=function(){let{_nodes:e,tags:t,machine:n,getMeta:r,toJSON:i,can:s,hasTag:a,matches:o,...l}=this;return{...l,tags:Array.from(t)}},lS=function(){return this._nodes.reduce((e,t)=>(void 0!==t.meta&&(e[t.id]=t.meta),e),{})};function lk(e,t){return{status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:o4(t.root,e._nodes),tags:new Set(e._nodes.flatMap(e=>e.tags)),children:e.children,historyValue:e.historyValue||{},matches:lv,hasTag:lE,can:lT,getMeta:lS,toJSON:lO}}function lI(e,t={}){return lk({...e,...t},e.machine)}function l_(e,t,n,r,{event:i,id:s,delay:a},{internalQueue:o}){let l,u=t.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);let c="function"==typeof i?i(n,r):i;if("string"==typeof a){let e=u&&u[a];l="function"==typeof e?e(n,r):e}else l="function"==typeof a?a(n,r):a;return"number"!=typeof l&&o.push(c),[t,{event:c,id:s,delay:l},void 0]}function lN(e,t){let{event:n,delay:r,id:i}=t;if("number"==typeof r)return void e.defer(()=>{let t=e.self;e.system.scheduler.schedule(t,t,n,r,i)})}function lA(e,t){function n(e,t){}return n.type="xstate.raise",n.event=e,n.id=t?.id,n.delay=t?.delay,n.resolve=l_,n.execute=lN,n}function lx(e,t,n,r,{assignment:i}){if(!t.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let s={},a={context:t.context,event:n.event,spawn:function(e,{machine:t,context:n},r,i){return(s,a)=>{let o=((s,a)=>{if("string"!=typeof s)return oB(s,{id:a?.id,parent:e.self,syncSnapshot:a?.syncSnapshot,input:a?.input,src:s,systemId:a?.systemId});{let o=oP(t,s);if(!o)throw Error(`Actor logic '${s}' not implemented in machine '${t.id}'`);let l=oB(o,{id:a?.id,parent:e.self,syncSnapshot:a?.syncSnapshot,input:"function"==typeof a?.input?a.input({context:n,event:r,self:e.self}):a?.input,src:s,systemId:a?.systemId});return i[l.id]=l,l}})(s,a);return i[o.id]=o,e.defer(()=>{o._processingStatus!==oj.Stopped&&o.start()}),o}}(e,t,n.event,s),self:e.self,system:e.system},o={};if("function"==typeof i)o=i(a,r);else for(let e of Object.keys(i)){let t=i[e];o[e]="function"==typeof t?t(a,r):t}let l=Object.assign({},t.context,o);return[lI(t,{context:l,children:Object.keys(s).length?{...t.children,...s}:t.children}),void 0,void 0]}function lw(e){function t(e,t){}return t.type="xstate.assign",t.assignment=e,t.resolve=lx,t}e.s(["assign",()=>lw],87098),new WeakMap;let lb=new WeakMap;function lR(e,t,n){let r=lb.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},lb.set(e,r)),r[t]}let lC={},lL=e=>"string"==typeof e?{type:e}:"function"==typeof e?"resolve"in e?{type:e.type}:{type:e.name}:e;class lM{constructor(e,t){if(this.config=e,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=t._parent,this.key=t._key,this.machine=t._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join("."),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?ow(this.config.states,(e,t)=>new lM(e,{_parent:this,_key:t,_machine:this.machine})):lC,"compound"===this.type&&!this.config.initial)throw Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=!0===this.config.history?"shallow":this.config.history||!1,this.entry=ob(this.config.entry).slice(),this.exit=ob(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=ob(e.tags).slice()}_initialize(){this.transitions=function(e){let t=new Map;if(e.config.on)for(let n of Object.keys(e.config.on)){if(""===n)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let r=e.config.on[n];t.set(n,oL(r).map(t=>o9(e,n,t)))}if(e.config.onDone){let n=`xstate.done.state.${e.id}`;t.set(n,oL(e.config.onDone).map(t=>o9(e,n,t)))}for(let n of e.invoke){if(n.onDone){let r=`xstate.done.actor.${n.id}`;t.set(r,oL(n.onDone).map(t=>o9(e,r,t)))}if(n.onError){let r=`xstate.error.actor.${n.id}`;t.set(r,oL(n.onError).map(t=>o9(e,r,t)))}if(n.onSnapshot){let r=`xstate.snapshot.${n.id}`;t.set(r,oL(n.onSnapshot).map(t=>o9(e,r,t)))}}for(let n of e.after){let e=t.get(n.eventType);e||(e=[],t.set(n.eventType,e)),e.push(n)}return t}(this),this.config.always&&(this.always=oL(this.config.always).map(e=>o9(this,"",e))),Object.keys(this.states).forEach(e=>{this.states[e]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(lL),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(e=>`#${e.id}`),source:`#${this.id}`,actions:this.initial.actions.map(lL),eventType:null})}:void 0,history:this.history,states:ow(this.states,e=>e.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(e=>({...e,actions:e.actions.map(lL)})),entry:this.entry.map(lL),exit:this.exit.map(lL),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return lR(this,"invoke",()=>ob(this.config.invoke).map((e,t)=>{var n,r;let{src:i,systemId:s}=e,a=e.id??(n=this.id,`${t}.${n}`),o="string"==typeof i?i:`xstate.invoke.${r=this.id,`${t}.${r}`}`;return{...e,src:o,id:a,systemId:s,toJSON(){let{onDone:t,onError:n,...r}=e;return{...r,type:"xstate.invoke",src:o,id:a}}}}))}get on(){return lR(this,"on",()=>[...this.transitions].flatMap(([e,t])=>t.map(t=>[e,t])).reduce((e,[t,n])=>(e[t]=e[t]||[],e[t].push(n),e),{}))}get after(){return lR(this,"delayedTransitions",()=>{var e;let t;return e=this,(t=e.config.after)?Object.keys(t).flatMap(n=>{var r;let i,s,a=t[n],o=Number.isNaN(+n)?n:+n,l=(r=e.id,s=(i={type:`xstate.after.${o}.${r}`}).type,e.entry.push(lA(i,{id:s,delay:o})),e.exit.push(oG(s)),s);return ob("string"==typeof a?{target:a}:a).map(e=>({...e,event:l,delay:o}))}).map(t=>{let{delay:n}=t;return{...o9(e,t.event,t),delay:n}}):[]})}get initial(){return lR(this,"initial",()=>(function(e,t){let n="string"==typeof t?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw Error(`Initial state node "${t}" not found on parent state node #${e.id}`);let r={source:e,actions:t&&"string"!=typeof t?ob(t.actions):[],eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r})(this,this.config.initial))}next(e,t){let n,r=t.type,i=[];for(let s of lR(this,`candidates-${r}`,()=>{var e;return e=this,e.transitions.get(r)||[...e.transitions.keys()].filter(e=>(function(e,t){if(t===e||"*"===t)return!0;if(!t.endsWith(".*"))return!1;let n=t.split("."),r=e.split(".");for(let e=0;e<n.length;e++){let t=n[e],i=r[e];if("*"===t)return e===n.length-1;if(t!==i)return!1}return!0})(r,e)).sort((e,t)=>t.length-e.length).flatMap(t=>e.transitions.get(t))})){let{guard:a}=s,o=e.context,l=!1;try{l=!a||oQ(a,o,t,e)}catch(t){let e="string"==typeof a?a:"object"==typeof a?a.type:void 0;throw Error(`Unable to evaluate guard ${e?`'${e}' `:""}in transition for event '${r}' in state node '${this.id}':
57
- ${t.message}`)}if(l){i.push(...s.actions),n=s;break}}return n?[n]:void 0}get events(){return lR(this,"events",()=>{let{states:e}=this,t=new Set(this.ownEvents);if(e)for(let n of Object.keys(e)){let r=e[n];if(r.states)for(let e of r.events)t.add(`${e}`)}return Array.from(t)})}get ownEvents(){return Array.from(new Set(Object.keys(Object.fromEntries(this.transitions)).filter(e=>this.transitions.get(e).some(e=>!(!e.target&&!e.actions.length&&!e.reenter)))))}}class lD{constructor(e,t){this.config=e,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=e.id||"(machine)",this.implementations={actors:t?.actors??{},actions:t?.actions??{},delays:t?.delays??{},guards:t?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new lM(e,{_key:this.id,_machine:this}),this.root._initialize(),function(e){let t=[],n=r=>{Object.values(r).forEach(r=>{if(r.config.route&&r.config.id){let n=r.config.id,i=r.config.route.guard,s={...r.config.route,guard:(e,t)=>e.event.to===`#${n}`&&(!i||"function"!=typeof i||i(e,t)),target:`#${n}`};t.push(o9(e,"xstate.route",s))}r.states&&n(r.states)})};n(e.states),t.length>0&&e.transitions.set("xstate.route",t)}(this.root),this.states=this.root.states,this.events=this.root.events}provide(e){let{actions:t,guards:n,actors:r,delays:i}=this.implementations;return new lD(this.config,{actions:{...t,...e.actions},guards:{...n,...e.guards},actors:{...r,...e.actors},delays:{...i,...e.delays}})}resolveState(e){var t;let n,r=(n=o3(ls(t=this.root,e.value)),o4(t,[...n])),i=o3(ls(this.root,r));return lk({_nodes:[...i],context:e.context||{},children:{},status:o5(i,this.root)?"done":e.status||"active",output:e.output,error:e.error,historyValue:e.historyValue},this)}transition(e,t,n){return lm(e,t,n,[]).snapshot}microstep(e,t,n){return lm(e,t,n,[]).microsteps.map(([e])=>e)}getTransitionData(e,t){return function e(t,n,r,i){if("string"==typeof n){let e;return(e=lr(t,n).next(r,i))&&e.length?e:t.next(r,i)}if(1===Object.keys(n).length){let s,a;return(a=e(lr(t,(s=Object.keys(n))[0]),n[s[0]],r,i))&&a.length?a:t.next(r,i)}let s=[];for(let a of Object.keys(n)){let o=n[a];if(!o)continue;let l=e(lr(t,a),o,r,i);l&&s.push(...l)}return s.length?s:t.next(r,i)}(this.root,e.value,e,t)||[]}_getPreInitialState(e,t,n){let{context:r}=this.config,i=lk({context:"function"!=typeof r&&r?r:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof r?lp(i,t,e,[lw(({spawn:e,event:t,self:n})=>r({spawn:e,input:t.input,self:n}))],n,void 0):i}getInitialSnapshot(e,t){var n;let r=oI(t),i=[],s=this._getPreInitialState(e,r,i),[a]=(n=this.root,lh([{target:[...ln(n)],source:n,reenter:!0,actions:[],eventType:null,toJSON:null}],s,e,r,!0,i)),{snapshot:o}=lm(a,r,e,i);return o}start(e){Object.values(e.children).forEach(e=>{"active"===e.getSnapshot().status&&e.start()})}getStateNodeById(e){let t=oA(e),n=t.slice(1),r=o8(t[0])?t[0].slice(1):t[0],i=this.idMap.get(r);if(!i)throw Error(`Child state node '#${r}' does not exist on machine '${this.id}'`);return li(i,n)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(e,t){return function(e,t){let{_nodes:n,tags:r,machine:i,children:s,context:a,can:o,hasTag:l,matches:u,getMeta:c,toJSON:h,...d}=e,f={};for(let e in s){let n=s[e];f[e]={snapshot:n.getPersistedSnapshot(t),src:n.src,systemId:n.systemId,syncSnapshot:n._syncSnapshot}}return{...d,context:function e(t){let n;for(let r in t){let i=t[r];if(i&&"object"==typeof i)if("sessionId"in i&&"send"in i&&"ref"in i)(n??=Array.isArray(t)?t.slice():{...t})[r]={xstate$$type:1,id:i.id};else{let s=e(i);s!==i&&((n??=Array.isArray(t)?t.slice():{...t})[r]=s)}}return n??t}(a),children:f,historyValue:function(e){if("object"!=typeof e||null===e)return{};let t={};for(let n in e){let r=e[n];Array.isArray(r)&&(t[n]=r.map(e=>({id:e.id})))}return t}(d.historyValue)}}(e,t)}restoreSnapshot(e,t){let n={},r=e.children;Object.keys(r).forEach(e=>{let i=r[e],s=i.snapshot,a=i.src,o="string"==typeof a?oP(this,a):a;if(!o)return;let l=oB(o,{id:e,parent:t.self,syncSnapshot:i.syncSnapshot,snapshot:s,src:a,systemId:i.systemId});n[e]=l});let i=function(e,t){if(!t||"object"!=typeof t)return{};let n={};for(let r in t)for(let i of t[r]){let t=function(e,t){if(t instanceof lM)return t;try{return e.machine.getStateNodeById(t.id)}catch{}}(e,i);t&&(n[r]??=[],n[r].push(t))}return n}(this.root,e.historyValue),s=lk({...e,children:n,_nodes:Array.from(o3(ls(this.root,e.value))),historyValue:i},this),a=new Set;return!function e(t,n){if(!a.has(t))for(let r in a.add(t),t){let i=t[r];if(i&&"object"==typeof i){if("xstate$$type"in i&&1===i.xstate$$type){t[r]=n[i.id];continue}e(i,n)}}}(s.context,n),s}}function lP(e,t,n,r,{event:i}){return[t,{event:"function"==typeof i?i(n,r):i},void 0]}function lU(e,{event:t}){e.defer(()=>e.emit(t))}function lF(e){function t(e,t){}return t.type="xstate.emit",t.event=e,t.resolve=lP,t.execute=lU,t}let l$=((R={}).Parent="#_parent",R.Internal="#_internal",R);function lj(e,t,n,r,{to:i,event:s,id:a,delay:o},l){let u,c,h=t.machine.implementations.delays;if("string"==typeof s)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${s}" }) instead`);let d="function"==typeof s?s(n,r):s;if("string"==typeof o){let e=h&&h[o];u="function"==typeof e?e(n,r):e}else u="function"==typeof o?o(n,r):o;let f="function"==typeof i?i(n,r):i;if("string"==typeof f){if(!(c=f===l$.Parent?e.self._parent:f===l$.Internal?e.self:f.startsWith("#_")?t.children[f.slice(2)]:l.deferredActorIds?.includes(f)?f:t.children[f]))throw Error(`Unable to send event to actor '${f}' from machine '${t.machine.id}'.`)}else c=f||e.self;return[t,{to:c,targetId:"string"==typeof f?f:void 0,event:d,id:a,delay:u},void 0]}function lV(e,t,n){"string"==typeof n.to&&(n.to=t.children[n.to])}function lW(e,t){e.defer(()=>{let{to:n,event:r,delay:i,id:s}=t;"number"==typeof i?e.system.scheduler.schedule(e.self,n,r,i,s):e.system._relay(e.self,n,"xstate.error"===r.type?ok(e.self.id,r.data):r)})}function lB(e,t,n){function r(e,t){}return r.type="xstate.sendTo",r.to=e,r.event=t,r.id=n?.id,r.delay=n?.delay,r.resolve=lj,r.retryResolve=lV,r.execute=lW,r}function lz(e,t,n,r,{collect:i}){let s=[],a=function(e){s.push(e)};return a.assign=(...e)=>{s.push(lw(...e))},a.cancel=(...e)=>{s.push(oG(...e))},a.raise=(...e)=>{s.push(lA(...e))},a.sendTo=(...e)=>{s.push(lB(...e))},a.sendParent=(...e)=>{s.push(function(e,t){return lB(l$.Parent,e,t)}(...e))},a.spawnChild=(...e)=>{s.push(oq(...e))},a.stopChild=(...e)=>{s.push(oX(...e))},a.emit=(...e)=>{s.push(lF(...e))},i({context:n.context,event:n.event,enqueue:a,check:e=>oQ(e,t.context,n.event,t),self:e.self,system:e.system},r),[t,void 0,s]}function lH(e){function t(e,t){}return t.type="xstate.enqueueActions",t.collect=e,t.resolve=lz,t}function lG(e,t,n,r,{value:i,label:s}){return[t,{value:"function"==typeof i?i(n,r):i,label:s},void 0]}function lK({logger:e},{value:t,label:n}){n?e(n,t):e(t)}function lY(e=({context:e,event:t})=>({context:e,event:t}),t){function n(e,t){}return n.type="xstate.log",n.value=e,n.label=t,n.resolve=lG,n.execute=lK,n}function lq(e,t,n){let r,i=[],s={self:r=oB(e),defer:()=>{},id:"",logger:()=>{},sessionId:"",stopChild:()=>{},system:r.system,emit:()=>{},actionExecutor:()=>{}};return s.actionExecutor=e=>{i.push(e)},[e.transition(t,n,s),i]}e.s(["setup",()=>function e({schemas:t,actors:n,actions:r,guards:i,delays:s}){return{assign:lw,sendTo:lB,raise:lA,log:lY,cancel:oG,stopChild:oX,enqueueActions:lH,emit:lF,spawnChild:oq,createStateConfig:e=>e,createAction:e=>e,createMachine:e=>new lD({...e,schemas:t},{actors:n,actions:r,guards:i,delays:s}),extend:a=>e({schemas:t,actors:n,actions:{...r,...a.actions},guards:{...i,...a.guards},delays:{...s,...a.delays}})}},"transition",()=>lq],39570)},32322,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0})},41387,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CronField=void 0;class r{#e=!1;#t=!1;#n=!1;#r=[];options={rawValue:""};static get min(){throw Error("min must be overridden")}static get max(){throw Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(e,t={rawValue:""}){if(!Array.isArray(e))throw Error(`${this.constructor.name} Validation error, values is not an array`);if(!(e.length>0))throw Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...t,rawValue:t.rawValue??""},this.#r=e.sort(r.sorter),this.#n=void 0!==this.options.wildcard?this.options.wildcard:this.#i(),this.#e=this.options.rawValue.includes("L")||e.includes("L"),this.#t=this.options.rawValue.includes("?")||e.includes("?")}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#e}get hasQuestionMarkChar(){return this.#t}get isWildcard(){return this.#n}get values(){return this.#r}static sorter(e,t){let n="number"==typeof e,r="number"==typeof t;return n&&r?e-t:n||r?n?-1:1:e.localeCompare(t)}static findNearestValueInList(e,t,n=!1){if(n){for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null}for(let n=0;n<e.length;n++)if(e[n]>t)return e[n];return null}findNearestValue(e,t=!1){return this.constructor.findNearestValueInList(this.values,e,t)}serialize(){return{wildcard:this.#n,values:this.#r}}validate(){let e,t=this.chars.length>0?` or chars ${this.chars.join("")}`:"",n=t=>(e=t,"number"==typeof t?t>=this.min&&t<=this.max:this.chars.some(e=>RegExp(`^\\d{0,2}${e}$`).test(t)));if(!this.#r.every(n))throw Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${t}`);let r=this.#r.find((e,t)=>this.#r.indexOf(e)!==t);if(r)throw Error(`${this.constructor.name} Validation error, duplicate values found: ${r}`)}#i(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).every(e=>this.#r.includes(e))}}n.CronField=r},47241,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CronDayOfMonth=void 0;let r=e.r(41387),i=Object.freeze(["L"]);class s extends r.CronField{static get min(){return 1}static get max(){return 31}static get chars(){return i}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}n.CronDayOfMonth=s},71189,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CronDayOfWeek=void 0;let r=e.r(41387),i=Object.freeze(["L"]);class s extends r.CronField{static get min(){return 0}static get max(){return 7}static get chars(){return i}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}}n.CronDayOfWeek=s},20957,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CronHour=void 0;let r=e.r(41387),i=Object.freeze([]);class s extends r.CronField{static get min(){return 0}static get max(){return 23}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}n.CronHour=s},92951,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CronMinute=void 0;let r=e.r(41387),i=Object.freeze([]);class s extends r.CronField{static get min(){return 0}static get max(){return 59}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}n.CronMinute=s},62470,(e,t,n)=>{"use strict";let r;Object.defineProperty(n,"__esModule",{value:!0});class i extends Error{}class s extends i{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class a extends i{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class o extends i{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class l extends i{}class u extends i{constructor(e){super(`Invalid unit ${e}`)}}class c extends i{}class h extends i{constructor(){super("Zone is an abstract class")}}let d="numeric",f="short",p="long",m={year:d,month:d,day:d},g={year:d,month:f,day:d},y={year:d,month:f,day:d,weekday:f},v={year:d,month:p,day:d},E={year:d,month:p,day:d,weekday:p},T={hour:d,minute:d},O={hour:d,minute:d,second:d},S={hour:d,minute:d,second:d,timeZoneName:f},k={hour:d,minute:d,second:d,timeZoneName:p},I={hour:d,minute:d,hourCycle:"h23"},_={hour:d,minute:d,second:d,hourCycle:"h23"},N={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:f},A={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:p},x={year:d,month:d,day:d,hour:d,minute:d},w={year:d,month:d,day:d,hour:d,minute:d,second:d},b={year:d,month:f,day:d,hour:d,minute:d},R={year:d,month:f,day:d,hour:d,minute:d,second:d},C={year:d,month:f,day:d,weekday:f,hour:d,minute:d},L={year:d,month:p,day:d,hour:d,minute:d,timeZoneName:f},M={year:d,month:p,day:d,hour:d,minute:d,second:d,timeZoneName:f},D={year:d,month:p,day:d,weekday:p,hour:d,minute:d,timeZoneName:p},P={year:d,month:p,day:d,weekday:p,hour:d,minute:d,second:d,timeZoneName:p};class U{get type(){throw new h}get name(){throw new h}get ianaName(){return this.name}get isUniversal(){throw new h}offsetName(e,t){throw new h}formatOffset(e,t){throw new h}offset(e){throw new h}equals(e){throw new h}get isValid(){throw new h}}let F=null;class $ extends U{static get instance(){return null===F&&(F=new $),F}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return e6(e,t,n)}formatOffset(e,t){return e9(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let j=new Map,V={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},W=new Map;class B extends U{static create(e){let t=W.get(e);return void 0===t&&W.set(e,t=new B(e)),t}static resetCache(){W.clear(),j.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=B.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return e6(e,t,n,this.name)}formatOffset(e,t){return e9(this.offset(e),t)}offset(e){var t;let n;if(!this.valid)return NaN;let r=new Date(e);if(isNaN(r))return NaN;let i=(t=this.name,void 0===(n=j.get(t))&&(n=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),j.set(t,n)),n),[s,a,o,l,u,c,h]=i.formatToParts?function(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],s=V[t];"era"===t?r[s]=i:eU(s)||(r[s]=parseInt(i,10))}return r}(i,r):function(e,t){let n=e.format(t).replace(/\u200E/g,""),[,r,i,s,a,o,l,u]=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);return[s,r,i,a,o,l,u]}(i,r);"BC"===l&&(s=-Math.abs(s)+1);let d=e0({year:s,month:a,day:o,hour:24===u?0:u,minute:c,second:h,millisecond:0}),f=+r,p=f%1e3;return(d-(f-=p>=0?p:1e3+p))/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let z={},H=new Map;function G(e,t={}){let n=JSON.stringify([e,t]),r=H.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),H.set(n,r)),r}let K=new Map,Y=new Map,q=null,Z=new Map;function J(e){let t=Z.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Z.set(e,t)),t}let X=new Map;function Q(e,t,n,r){let i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}class ee{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:i,...s}=n;if(!t||Object.keys(s).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){let n=JSON.stringify([e,t]),r=K.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),K.set(n,r)),r}(e,t)}}format(e){if(!this.inf)return eG(this.floor?Math.floor(e):eZ(e,3),this.padTo);{let t=this.floor?Math.floor(e):e;return this.inf.format(t)}}}class et{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=-1*(e.offset/60),n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&B.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=G(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"!==e.type)return e;{let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class en{constructor(e,t,n){this.opts={style:"long",...n},!t&&ej()&&(this.rtf=function(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),s=Y.get(i);return void 0===s&&(s=new Intl.RelativeTimeFormat(e,t),Y.set(i,s)),s}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&s){let n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${i[e][0]}`;case -1:return n?"yesterday":`last ${i[e][0]}`;case 0:return n?"today":`this ${i[e][0]}`}}let a=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,u=i[e],c=r?l?u[1]:u[2]||u[1]:l?i[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}let er={firstDay:1,minimalDays:4,weekend:[6,7]};class ei{static fromOpts(e){return ei.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=!1){let s=e||eS.defaultLocale;return new ei(s||(i?"en-US":q||(q=new Intl.DateTimeFormat().resolvedOptions().locale)),t||eS.defaultNumberingSystem,n||eS.defaultOutputCalendar,ez(r)||eS.defaultWeekSettings,s)}static resetCache(){q=null,H.clear(),K.clear(),Y.clear(),Z.clear(),X.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return ei.create(e,t,n,r)}constructor(e,t,n,r,i){const[s,a,o]=function(e){let t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));let n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=G(e).resolvedOptions(),r=e}catch(s){let i=e.substring(0,n);t=G(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:s}=t;return[r,i,s]}}(e);this.locale=s,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=r,this.intl=function(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return null==this.fastNumbersCached&&(this.fastNumbersCached=(!this.numberingSystem||"latn"===this.numberingSystem)&&("latn"===this.numberingSystem||!this.locale||this.locale.startsWith("en")||"latn"===J(this.locale).numberingSystem)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(null===this.numberingSystem||"latn"===this.numberingSystem)&&(null===this.outputCalendar||"gregory"===this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ei.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,ez(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Q(this,e,tr,()=>{let n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){let t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[i][e]=function(e){let t=[];for(let n=1;n<=12;n++){let r=nY.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Q(this,e,to,()=>{let n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){let t=[];for(let n=1;n<=7;n++){let r=nY.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return Q(this,void 0,()=>tl,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[nY.utc(2016,11,13,9),nY.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Q(this,e,td,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[nY.utc(-40,1,1),nY.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){let r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new ee(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new et(e,this.intl,t)}relFormatter(e={}){return new en(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){let n=JSON.stringify([e,t]),r=z[n];return r||(r=new Intl.ListFormat(e,t),z[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||J(this.intl).locale.startsWith("en-us")}getWeekSettings(){if(this.weekSettings)return this.weekSettings;if(!eV())return er;var e=this.locale;let t=X.get(e);if(!t){let n=new Intl.Locale(e);"minimalDays"in(t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo)||(t={...er,...t}),X.set(e,t)}return t}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let es=null;class ea extends U{static get utcInstance(){return null===es&&(es=new ea(0)),es}static instance(e){return 0===e?ea.utcInstance:new ea(e)}static parseSpecifier(e){if(e){let t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ea(e4(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${e9(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${e9(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return e9(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class eo extends U{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function el(e,t){if(eU(e)||null===e)return t;if(e instanceof U)return e;if("string"==typeof e){let n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?$.instance:"utc"===n||"gmt"===n?ea.utcInstance:ea.parseSpecifier(n)||B.create(e)}if(eF(e))return ea.instance(e);if("object"==typeof e&&"offset"in e&&"function"==typeof e.offset)return e;else return new eo(e)}let eu={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ec={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},eh=eu.hanidec.replace(/[\[|\]]/g,"").split(""),ed=new Map;function ef({numberingSystem:e},t=""){let n=e||"latn",r=ed.get(n);void 0===r&&(r=new Map,ed.set(n,r));let i=r.get(t);return void 0===i&&(i=RegExp(`${eu[n]}${t}`),r.set(t,i)),i}let ep=()=>Date.now(),em="system",eg=null,ey=null,ev=null,eE=60,eT,eO=null;class eS{static get now(){return ep}static set now(e){ep=e}static set defaultZone(e){em=e}static get defaultZone(){return el(em,$.instance)}static get defaultLocale(){return eg}static set defaultLocale(e){eg=e}static get defaultNumberingSystem(){return ey}static set defaultNumberingSystem(e){ey=e}static get defaultOutputCalendar(){return ev}static set defaultOutputCalendar(e){ev=e}static get defaultWeekSettings(){return eO}static set defaultWeekSettings(e){eO=ez(e)}static get twoDigitCutoffYear(){return eE}static set twoDigitCutoffYear(e){eE=e%100}static get throwOnInvalid(){return eT}static set throwOnInvalid(e){eT=e}static resetCaches(){ei.resetCache(),B.resetCache(),nY.resetCache(),ed.clear()}}class ek{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}let eI=[0,31,59,90,120,151,181,212,243,273,304,334],e_=[0,31,60,91,121,152,182,213,244,274,305,335];function eN(e,t){return new ek("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function eA(e,t,n){let r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return 0===i?7:i}function ex(e,t){let n=eJ(e)?e_:eI,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function ew(e,t){return(e-t+7)%7+1}function eb(e,t=4,n=1){let{year:r,month:i,day:s}=e,a=s+(eJ(r)?e_:eI)[i-1],o=ew(eA(r,i,s),n),l=Math.floor((a-o+14-t)/7),u;return l<1?l=e2(u=r-1,t,n):l>e2(r,t,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:o,...e7(e)}}function eR(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:s}=e,a=ew(eA(r,1,t),n),o=eX(r),l=7*i+s-a-7+t,u;l<1?l+=eX(u=r-1):l>o?(u=r+1,l-=eX(r)):u=r;let{month:c,day:h}=ex(u,l);return{year:u,month:c,day:h,...e7(e)}}function eC(e){let{year:t,month:n,day:r}=e,i=r+(eJ(t)?e_:eI)[n-1];return{year:t,ordinal:i,...e7(e)}}function eL(e){let{year:t,ordinal:n}=e,{month:r,day:i}=ex(t,n);return{year:t,month:r,day:i,...e7(e)}}function eM(e,t){if(!(!eU(e.localWeekday)||!eU(e.localWeekNumber)||!eU(e.localWeekYear)))return{minDaysInFirstWeek:4,startOfWeek:1};if(!eU(e.weekday)||!eU(e.weekNumber)||!eU(e.weekYear))throw new l("Cannot mix locale-based week fields with ISO-based week fields");return eU(e.localWeekday)||(e.weekday=e.localWeekday),eU(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),eU(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}function eD(e){let t=e$(e.year),n=eH(e.month,1,12),r=eH(e.day,1,eQ(e.year,e.month));return t?n?!r&&eN("day",e.day):eN("month",e.month):eN("year",e.year)}function eP(e){let{hour:t,minute:n,second:r,millisecond:i}=e,s=eH(t,0,23)||24===t&&0===n&&0===r&&0===i,a=eH(n,0,59),o=eH(r,0,59),l=eH(i,0,999);return s?a?o?!l&&eN("millisecond",i):eN("second",r):eN("minute",n):eN("hour",t)}function eU(e){return void 0===e}function eF(e){return"number"==typeof e}function e$(e){return"number"==typeof e&&e%1==0}function ej(){try{return"u">typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function eV(){try{return"u">typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function eW(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{let i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function eB(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ez(e){if(null==e)return null;if("object"!=typeof e)throw new c("Week settings must be an object");if(!eH(e.firstDay,1,7)||!eH(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!eH(e,1,7)))throw new c("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function eH(e,t,n){return e$(e)&&e>=t&&e<=n}function eG(e,t=2){return e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0")}function eK(e){if(!eU(e)&&null!==e&&""!==e)return parseInt(e,10)}function eY(e){if(!eU(e)&&null!==e&&""!==e)return parseFloat(e)}function eq(e){if(!eU(e)&&null!==e&&""!==e)return Math.floor(1e3*parseFloat("0."+e))}function eZ(e,t,n="round"){let r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw RangeError(`Value rounding ${n} is out of range`)}}function eJ(e){return e%4==0&&(e%100!=0||e%400==0)}function eX(e){return eJ(e)?366:365}function eQ(e,t){var n;let r=(n=t-1)-12*Math.floor(n/12)+1;return 2===r?eJ(e+(t-r)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function e0(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t)).setUTCFullYear(e.year,e.month-1,e.day),+t}function e1(e,t,n){return-ew(eA(e,1,t),n)+t-1}function e2(e,t=4,n=1){let r=e1(e,t,n),i=e1(e+1,t,n);return(eX(e)-r+i)/7}function e3(e){return e>99?e:e>eS.twoDigitCutoffYear?1900+e:2e3+e}function e6(e,t,n,r=null){let i=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);let a={timeZoneName:t,...s},o=new Intl.DateTimeFormat(n,a).formatToParts(i).find(e=>"timezonename"===e.type.toLowerCase());return o?o.value:null}function e4(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);let r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return 60*n+i}function e5(e){let t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new c(`Invalid unit value ${e}`);return t}function e8(e,t){let n={};for(let r in e)if(eB(e,r)){let i=e[r];if(null==i)continue;n[t(r)]=e5(i)}return n}function e9(e,t){let n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${eG(n,2)}:${eG(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${eG(n,2)}${eG(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function e7(e){return["hour","minute","second","millisecond"].reduce((t,n)=>(t[n]=e[n],t),{})}let te=["January","February","March","April","May","June","July","August","September","October","November","December"],tt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tn=["J","F","M","A","M","J","J","A","S","O","N","D"];function tr(e){switch(e){case"narrow":return[...tn];case"short":return[...tt];case"long":return[...te];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}let ti=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ts=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ta=["M","T","W","T","F","S","S"];function to(e){switch(e){case"narrow":return[...ta];case"short":return[...ts];case"long":return[...ti];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}let tl=["AM","PM"],tu=["Before Christ","Anno Domini"],tc=["BC","AD"],th=["B","A"];function td(e){switch(e){case"narrow":return[...th];case"short":return[...tc];case"long":return[...tu];default:return null}}function tf(e,t){let n="";for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}let tp={D:m,DD:g,DDD:v,DDDD:E,t:T,tt:O,ttt:S,tttt:k,T:I,TT:_,TTT:N,TTTT:A,f:x,ff:b,fff:L,ffff:D,F:w,FF:R,FFF:M,FFFF:P};class tm{static create(e,t={}){return new tm(e,t)}static parseFormat(e){let t=null,n="",r=!1,i=[];for(let s=0;s<e.length;s++){let a=e.charAt(s);"'"===a?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return tp[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n){if(this.opts.forceSimple)return eG(e,t);let r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){let n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,n)=>this.loc.extract(e,t,n),s=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=(t,r)=>n?tr(t)[e.month-1]:i(r?{month:t}:{month:t,day:"numeric"},"month"),o=(t,r)=>n?to(t)[e.weekday-1]:i(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{let n=tm.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},u=t=>n?td(t)[e.year<0?0:1]:i({era:t},"era"),c=t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?tl[e.hour<12?0:1]:i({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return o("short",!0);case"cccc":return o("long",!0);case"ccccc":return o("narrow",!0);case"EEE":return o("short",!1);case"EEEE":return o("long",!1);case"EEEEE":return o("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}};return tf(tm.parseFormat(t),c)}formatDurationFromString(e,t){let n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=(e,t)=>i=>{let s=r(i);if(!s)return i;{let r,a=t.isNegativeDuration&&s!==t.largestUnit?n:1;return r="negativeLargestOnly"===this.opts.signMode&&s!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(s)*a,i.length,r)}},s=tm.parseFormat(t),a=s.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),o=e.shiftTo(...a.map(r).filter(e=>e)),l={isNegativeDuration:o<0,largestUnit:Object.keys(o.values)[0]};return tf(s,i(o,l))}}let tg=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ty(...e){let t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function tv(...e){return t=>e.reduce(([e,n,r],i)=>{let[s,a,o]=i(t,r);return[{...e,...s},a||n,o]},[{},null,1]).slice(0,2)}function tE(e,...t){if(null==e)return[null,null];for(let[n,r]of t){let t=n.exec(e);if(t)return r(t)}return[null,null]}function tT(...e){return(t,n)=>{let r,i={};for(r=0;r<e.length;r++)i[e[r]]=eK(t[n+r]);return[i,null,n+r]}}let tO=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,tS=`(?:${tO.source}?(?:\\[(${tg.source})\\])?)?`,tk=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,tI=RegExp(`${tk.source}${tS}`),t_=RegExp(`(?:[Tt]${tI.source})?`),tN=tT("weekYear","weekNumber","weekDay"),tA=tT("year","ordinal"),tx=RegExp(`${tk.source} ?(?:${tO.source}|(${tg.source}))?`),tw=RegExp(`(?: ${tx.source})?`);function tb(e,t,n){let r=e[t];return eU(r)?n:eK(r)}function tR(e,t){return[{hours:tb(e,t,0),minutes:tb(e,t+1,0),seconds:tb(e,t+2,0),milliseconds:eq(e[t+3])},null,t+4]}function tC(e,t){let n=!e[t]&&!e[t+1],r=e4(e[t+1],e[t+2]);return[{},n?null:ea.instance(r),t+3]}function tL(e,t){return[{},e[t]?B.create(e[t]):null,t+1]}let tM=RegExp(`^T?${tk.source}$`),tD=/^-?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)?)?)$/;function tP(e){let[t,n,r,i,s,a,o,l,u]=e,c="-"===t[0],h=l&&"-"===l[0],d=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:d(eY(n)),months:d(eY(r)),weeks:d(eY(i)),days:d(eY(s)),hours:d(eY(a)),minutes:d(eY(o)),seconds:d(eY(l),"-0"===l),milliseconds:d(eq(u),h)}]}let tU={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function tF(e,t,n,r,i,s,a){let o={year:2===t.length?e3(eK(t)):eK(t),month:tt.indexOf(n)+1,day:eK(r),hour:eK(i),minute:eK(s)};return a&&(o.second=eK(a)),e&&(o.weekday=e.length>3?ti.indexOf(e)+1:ts.indexOf(e)+1),o}let t$=/^(?:(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)))$/;function tj(e){let[,t,n,r,i,s,a,o,l,u,c,h]=e;return[tF(t,i,r,n,s,a,o),new ea(l?tU[l]:u?0:e4(c,h))]}let tV=/^(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$/,tW=/^(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$/,tB=/^(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})$/;function tz(e){let[,t,n,r,i,s,a,o]=e;return[tF(t,i,r,n,s,a,o),ea.utcInstance]}function tH(e){let[,t,n,r,i,s,a,o]=e;return[tF(t,o,n,r,i,s,a),ea.utcInstance]}let tG=ty(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,t_),tK=ty(/(\d{4})-?W(\d\d)(?:-?(\d))?/,t_),tY=ty(/(\d{4})-?(\d{3})/,t_),tq=ty(tI),tZ=tv(function(e,t){return[{year:tb(e,t),month:tb(e,t+1,1),day:tb(e,t+2,1)},null,t+3]},tR,tC,tL),tJ=tv(tN,tR,tC,tL),tX=tv(tA,tR,tC,tL),tQ=tv(tR,tC,tL),t0=tv(tR),t1=ty(/(\d{4})-(\d\d)-(\d\d)/,tw),t2=ty(tx),t3=tv(tR,tC,tL),t6="Invalid Duration",t4={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},t5={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...t4},t8={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:0x1e18558,milliseconds:31556952e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:7889238,milliseconds:7889238e3},months:{weeks:30.436875/7,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...t4},t9=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],t7=t9.slice(0).reverse();function ne(e,t,n=!1){return new ni({values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix})}function nt(e,t){var n;let r=null!=(n=t.milliseconds)?n:0;for(let n of t7.slice(1))t[n]&&(r+=t[n]*e[n].milliseconds);return r}function nn(e,t){let n=0>nt(e,t)?-1:1;t9.reduceRight((r,i)=>{if(eU(t[i]))return r;if(r){let s=t[r]*n,a=e[i][r],o=Math.floor(s/a);t[i]+=o*n,t[r]-=o*a*n}return i},null),t9.reduce((n,r)=>{if(eU(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function nr(e){let t={};for(let[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class ni{constructor(e){const t="longterm"===e.conversionAccuracy;let n=t?t8:t5;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ei.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return ni.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new c(`Duration.fromObject: argument expected to be an object, got ${null===e?"null":typeof e}`);return new ni({values:e8(e,ni.normalizeUnit),loc:ei.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(eF(e))return ni.fromMillis(e);if(ni.isDuration(e))return e;if("object"==typeof e)return ni.fromObject(e);throw new c(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){let[n]=tE(e,[tD,tP]);return n?ni.fromObject(n,t):ni.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){let[n]=tE(e,[tM,t0]);return n?ni.fromObject(n,t):ni.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new c("need to specify a reason the Duration is invalid");let n=e instanceof ek?e:new ek(e,t);if(!eS.throwOnInvalid)return new ni({invalid:n});throw new o(n)}static normalizeUnit(e){let t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new u(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?tm.create(this.loc,n).formatDurationFromString(this,e):t6}toHuman(e={}){if(!this.isValid)return t6;let t=!1!==e.showZeros,n=t9.map(n=>{let r=this.values[n];return eU(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),(0!==this.months||0!==this.quarters)&&(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),(0!==this.hours||0!==this.minutes||0!==this.seconds||0!==this.milliseconds)&&(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),(0!==this.seconds||0!==this.milliseconds)&&(e+=eZ(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},nY.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?nt(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let t=ni.fromDurationLike(e),n={};for(let e of t9)(eB(t.values,e)||eB(this.values,e))&&(n[e]=t.get(e)+this.get(e));return ne(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let t=ni.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=e5(e(this.values[n],n));return ne(this,{values:t},!0)}get(e){return this[ni.normalizeUnit(e)]}set(e){return this.isValid?ne(this,{values:{...this.values,...e8(e,ni.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return ne(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return nn(this.matrix,e),ne(this,{values:e},!0)}rescale(){return this.isValid?ne(this,{values:nr(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){let t;if(!this.isValid||0===e.length)return this;e=e.map(e=>ni.normalizeUnit(e));let n={},r={},i=this.toObject();for(let s of t9)if(e.indexOf(s)>=0){t=s;let e=0;for(let t in r)e+=this.matrix[t][s]*r[t],r[t]=0;eF(i[s])&&(e+=i[s]);let a=Math.trunc(e);n[s]=a,r[s]=(1e3*e-1e3*a)/1e3}else eF(i[s])&&(r[s]=i[s]);for(let e in r)0!==r[e]&&(n[t]+=e===t?r[e]:r[e]/this.matrix[t][e]);return nn(this.matrix,n),ne(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return ne(this,{values:e},!0)}removeZeros(){return this.isValid?ne(this,{values:nr(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;for(let r of t9){var t,n;if(t=this.values[r],n=e.values[r],void 0===t||0===t?void 0!==n&&0!==n:t!==n)return!1}return!0}}let ns="Invalid Interval";class na{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new c("need to specify a reason the Interval is invalid");let n=e instanceof ek?e:new ek(e,t);if(!eS.throwOnInvalid)return new na({invalid:n});throw new a(n)}static fromDateTimes(e,t){var n,r;let i=nq(e),s=nq(t),a=(n=i,r=s,n&&n.isValid?r&&r.isValid?r<n?na.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${r.toISO()}`):null:na.invalid("missing or invalid end"):na.invalid("missing or invalid start"));return null==a?new na({start:i,end:s}):a}static after(e,t){let n=ni.fromDurationLike(t),r=nq(e);return na.fromDateTimes(r,r.plus(n))}static before(e,t){let n=ni.fromDurationLike(t),r=nq(e);return na.fromDateTimes(r.minus(n),r)}static fromISO(e,t){let[n,r]=(e||"").split("/",2);if(n&&r){let e,i,s,a;try{i=(e=nY.fromISO(n,t)).isValid}catch(e){i=!1}try{a=(s=nY.fromISO(r,t)).isValid}catch(e){a=!1}if(i&&a)return na.fromDateTimes(e,s);if(i){let n=ni.fromISO(r,t);if(n.isValid)return na.after(e,n)}else if(a){let e=ni.fromISO(n,t);if(e.isValid)return na.before(s,e)}}return na.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){let n;if(!this.isValid)return NaN;let r=this.start.startOf(e,t);return Math.floor((n=(n=null!=t&&t.useLocaleWeeks?this.end.reconfigure({locale:r.locale}):this.end).startOf(e,t)).diff(r,e).get(e))+(n.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?na.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];let t=e.map(nq).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[],{s:r}=this,i=0;for(;r<this.e;){let e=t[i]||this.e,s=+e>+this.e?this.e:e;n.push(na.fromDateTimes(r,s)),r=s,i+=1}return n}splitBy(e){let t=ni.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let{s:n}=this,r=1,i,s=[];for(;n<this.e;){let e=this.start.plus(t.mapUnits(e=>e*r));i=+e>+this.e?this.e:e,s.push(na.fromDateTimes(n,i)),n=i,r+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e==+e.s}abutsEnd(e){return!!this.isValid&&+e.e==+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!!this.isValid&&!!e.isValid&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:na.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;let t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return na.fromDateTimes(t,n)}static merge(e){let[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0,r=[],i=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]);for(let e of Array.prototype.concat(...i).sort((e,t)=>e.time-t.time))1===(n+="s"===e.type?1:-1)?t=e.time:(t&&+t!=+e.time&&r.push(na.fromDateTimes(t,e.time)),t=null);return na.merge(r)}difference(...e){return na.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:ns}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=m,t={}){return this.isValid?tm.create(this.s.loc.clone(t),e).formatInterval(this):ns}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:ns}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ns}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:ns}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:ns}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ni.invalid(this.invalidReason)}mapEndpoints(e){return na.fromDateTimes(e(this.s),e(this.e))}}class no{static hasDST(e=eS.defaultZone){let t=nY.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return B.isValidZone(e)}static normalizeZone(e){return el(e,eS.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ei.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ei.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ei.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ei.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ei.create(t,n,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ei.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ei.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ei.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ei.create(t,null,"gregory").eras(e)}static features(){return{relative:ej(),localeWeek:eV()}}}function nl(e,t){let n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(ni.fromMillis(r).as("days"))}function nu(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(!isNaN(t))return t;t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(-1!==e[n].search(eu.hanidec))t+=eh.indexOf(e[n]);else for(let e in ec){let[n,i]=ec[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}(e))}}let nc=String.fromCharCode(160),nh=`[ ${nc}]`,nd=RegExp(nh,"g");function nf(e){return e.replace(/\./g,"\\.?").replace(nd,nh)}function np(e){return e.replace(/\./g,"").replace(nd," ").toLowerCase()}function nm(e,t){return null===e?null:{regex:RegExp(e.map(nf).join("|")),deser:([n])=>e.findIndex(e=>np(n)===np(e))+t}}function ng(e,t){return{regex:e,deser:([,e,t])=>e4(e,t),groups:t}}function ny(e){return{regex:e,deser:([e])=>e}}let nv={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}},nE=null;function nT(e,t){return Array.prototype.concat(...e.map(e=>(function(e,t){if(e.literal)return e;let n=nk(tm.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n})(e,t)))}class nO{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=nT(tm.parseFormat(t),e),this.units=this.tokens.map(t=>{let n,r,i,s,a,o,l,u,c,h,d,f,p;return n=ef(e),r=ef(e,"{2}"),i=ef(e,"{3}"),s=ef(e,"{4}"),a=ef(e,"{6}"),o=ef(e,"{1,2}"),l=ef(e,"{1,3}"),u=ef(e,"{1,6}"),c=ef(e,"{1,9}"),h=ef(e,"{2,4}"),d=ef(e,"{4,6}"),f=e=>({regex:RegExp(e.val.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")),deser:([e])=>e,literal:!0}),(p=(p=>{if(t.literal)return f(p);switch(p.val){case"G":return nm(e.eras("short"),0);case"GG":return nm(e.eras("long"),0);case"y":return nu(u);case"yy":case"kk":return nu(h,e3);case"yyyy":case"kkkk":return nu(s);case"yyyyy":return nu(d);case"yyyyyy":return nu(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return nu(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return nu(r);case"MMM":return nm(e.months("short",!0),1);case"MMMM":return nm(e.months("long",!0),1);case"LLL":return nm(e.months("short",!1),1);case"LLLL":return nm(e.months("long",!1),1);case"o":case"S":return nu(l);case"ooo":case"SSS":return nu(i);case"u":return ny(c);case"uu":return ny(o);case"uuu":case"E":case"c":return nu(n);case"a":return nm(e.meridiems(),0);case"EEE":return nm(e.weekdays("short",!1),1);case"EEEE":return nm(e.weekdays("long",!1),1);case"ccc":return nm(e.weekdays("short",!0),1);case"cccc":return nm(e.weekdays("long",!0),1);case"Z":case"ZZ":return ng(RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return ng(RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return ny(/[a-z_+-/]{1,256}?/i);case" ":return ny(/[^\S\n\r]/);default:return f(p)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"}).token=t,p}),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=function(e){let t=e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"");return[`^${t}$`,e]}(this.units);this.regex=RegExp(e,"i"),this.handlers=t}}explainFromTokens(e){if(!this.isValid)return{input:e,tokens:this.tokens,invalidReason:this.invalidReason};{let t,n,[r,i]=function(e,t,n){let r=e.match(t);if(!r)return[r,{}];{let e={},t=1;for(let i in n)if(eB(n,i)){let s=n[i],a=s.groups?s.groups+1:1;!s.literal&&s.token&&(e[s.token.val[0]]=s.deser(r.slice(t,t+a))),t+=a}return[r,e]}}(e,this.regex,this.handlers),[s,a,o]=i?(n=null,eU(i.z)||(n=B.create(i.z)),eU(i.Z)||(n||(n=new ea(i.Z)),t=i.Z),eU(i.q)||(i.M=(i.q-1)*3+1),eU(i.h)||(i.h<12&&1===i.a?i.h+=12:12===i.h&&0===i.a&&(i.h=0)),0===i.G&&i.y&&(i.y=-i.y),eU(i.u)||(i.S=eq(i.u)),[Object.keys(i).reduce((e,t)=>{let n=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(t);return n&&(e[n]=i[t]),e},{}),n,t]):[null,null,void 0];if(eB(i,"a")&&eB(i,"H"))throw new l("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:i,result:s,zone:a,specificOffset:o}}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function nS(e,t,n){return new nO(e,n).explainFromTokens(t)}function nk(e,t){if(!e)return null;let n=tm.create(t,e).dtFormatter((nE||(nE=nY.fromMillis(0x16a2e5618e3)),nE)),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>(function(e,t,n){let{type:r,value:i}=e;if("literal"===r){let e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}let s=t[r],a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=nv[a];if("object"==typeof o&&(o=o[s]),o)return{literal:!1,val:o}})(t,e,i))}let nI="Invalid DateTime";function n_(e){return new ek("unsupported zone",`the zone "${e.name}" is not supported`)}function nN(e){return null===e.weekData&&(e.weekData=eb(e.c)),e.weekData}function nA(e){return null===e.localWeekData&&(e.localWeekData=eb(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function nx(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new nY({...n,...t,old:n})}function nw(e,t,n){let r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*6e4;let s=n.offset(r);return i===s?[r,i]:[e-60*Math.min(i,s)*1e3,Math.max(i,s)]}function nb(e,t){let n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function nR(e,t){let n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:r,month:i,day:Math.min(e.c.day,eQ(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=ni.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),[o,l]=nw(e0(s),n,e.zone);return 0!==a&&(o+=a,l=e.zone.offset(o)),{ts:o,o:l}}function nC(e,t,n,r,i,s){let{setZone:a,zone:o}=n;if((!e||0===Object.keys(e).length)&&!t)return nY.invalid(new ek("unparsable",`the input "${i}" can't be parsed as ${r}`));{let r=nY.fromObject(e,{...n,zone:t||o,specificOffset:s});return a?r:r.setZone(o)}}function nL(e,t,n=!0){return e.isValid?tm.create(ei.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function nM(e,t,n){let r=e.c.year>9999||e.c.year<0,i="";if(r&&e.c.year>=0&&(i+="+"),i+=eG(e.c.year,r?6:4),"year"===n)return i;if(t){if(i+="-",i+=eG(e.c.month),"month"===n)return i;i+="-"}else if(i+=eG(e.c.month),"month"===n)return i;return i+eG(e.c.day)}function nD(e,t,n,r,i,s,a){let o=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(a){case"day":case"month":case"year":break;default:if(l+=eG(e.c.hour),"hour"===a)break;if(t){if(l+=":",l+=eG(e.c.minute),"minute"===a)break;o&&(l+=":",l+=eG(e.c.second))}else{if(l+=eG(e.c.minute),"minute"===a)break;o&&(l+=eG(e.c.second))}if("second"===a)break;o&&(!r||0!==e.c.millisecond)&&(l+=".",l+=eG(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&0===e.offset&&!s?l+="Z":e.o<0?(l+="-",l+=eG(Math.trunc(-e.o/60)),l+=":",l+=eG(Math.trunc(-e.o%60))):(l+="+",l+=eG(Math.trunc(e.o/60)),l+=":",l+=eG(Math.trunc(e.o%60)))),s&&(l+="["+e.zone.ianaName+"]"),l}let nP={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},nU={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},nF={ordinal:1,hour:0,minute:0,second:0,millisecond:0},n$=["year","month","day","hour","minute","second","millisecond"],nj=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],nV=["year","ordinal","hour","minute","second","millisecond"];function nW(e){let t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new u(e);return t}function nB(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return nW(e)}}function nz(e,t){let n,i,s=el(t.zone,eS.defaultZone);if(!s.isValid)return nY.invalid(n_(s));let a=ei.fromObject(t);if(eU(e.year))n=eS.now();else{for(let t of n$)eU(e[t])&&(e[t]=nP[t]);let t=eD(e)||eP(e);if(t)return nY.invalid(t);let a=function(e){if(void 0===r&&(r=eS.now()),"iana"!==e.type)return e.offset(r);let t=e.name,n=nK.get(t);return void 0===n&&(n=e.offset(r),nK.set(t,n)),n}(s);[n,i]=nw(e0(e),a,s)}return new nY({ts:n,zone:s,loc:a,o:i})}function nH(e,t,n){let r=!!eU(n.round)||n.round,i=eU(n.rounding)?"trunc":n.rounding,s=(e,s)=>(e=eZ(e,r||n.calendary?0:2,n.calendary?"round":i),t.loc.clone(n).relFormatter(n).format(e,s)),a=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return s(a(n.unit),n.unit);for(let e of n.units){let t=a(e);if(Math.abs(t)>=1)return s(t,e)}return s(e>t?-0:0,n.units[n.units.length-1])}function nG(e){let t={},n;return e.length>0&&"object"==typeof e[e.length-1]?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let nK=new Map;class nY{constructor(e){const t=e.zone||eS.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new ek("invalid input"):null)||(t.isValid?null:n_(t));this.ts=eU(e.ts)?eS.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const s=eF(e.o)&&!e.old?e.o:t.offset(this.ts);r=(n=Number.isNaN((r=nb(this.ts,s)).year)?new ek("invalid input"):null)?null:r,i=n?null:s}this._zone=t,this.loc=e.loc||ei.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new nY({})}static local(){let[e,t]=nG(arguments),[n,r,i,s,a,o,l]=t;return nz({year:n,month:r,day:i,hour:s,minute:a,second:o,millisecond:l},e)}static utc(){let[e,t]=nG(arguments),[n,r,i,s,a,o,l]=t;return e.zone=ea.utcInstance,nz({year:n,month:r,day:i,hour:s,minute:a,second:o,millisecond:l},e)}static fromJSDate(e,t={}){let n="[object Date]"===Object.prototype.toString.call(e)?e.valueOf():NaN;if(Number.isNaN(n))return nY.invalid("invalid input");let r=el(t.zone,eS.defaultZone);return r.isValid?new nY({ts:n,zone:r,loc:ei.fromObject(t)}):nY.invalid(n_(r))}static fromMillis(e,t={}){if(eF(e))if(e<-864e13||e>864e13)return nY.invalid("Timestamp out of range");else return new nY({ts:e,zone:el(t.zone,eS.defaultZone),loc:ei.fromObject(t)});throw new c(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(eF(e))return new nY({ts:1e3*e,zone:el(t.zone,eS.defaultZone),loc:ei.fromObject(t)});throw new c("fromSeconds requires a numerical input")}static fromObject(e,t={}){var n;let r,i;e=e||{};let s=el(t.zone,eS.defaultZone);if(!s.isValid)return nY.invalid(n_(s));let a=ei.fromObject(t),o=e8(e,nB),{minDaysInFirstWeek:u,startOfWeek:c}=eM(o,a),h=eS.now(),d=eU(t.specificOffset)?s.offset(h):t.specificOffset,f=!eU(o.ordinal),p=!eU(o.year),m=!eU(o.month)||!eU(o.day),g=p||m,y=o.weekYear||o.weekNumber;if((g||f)&&y)throw new l("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(m&&f)throw new l("Can't mix ordinal dates with month/day");let v=y||o.weekday&&!g,E,T,O=nb(h,d);v?(E=nj,T=nU,O=eb(O,u,c)):f?(E=nV,T=nF,O=eC(O)):(E=n$,T=nP);let S=!1;for(let e of E)eU(o[e])?S?o[e]=T[e]:o[e]=O[e]:S=!0;let k=(v?function(e,t=4,n=1){let r=e$(e.weekYear),i=eH(e.weekNumber,1,e2(e.weekYear,t,n)),s=eH(e.weekday,1,7);return r?i?!s&&eN("weekday",e.weekday):eN("week",e.weekNumber):eN("weekYear",e.weekYear)}(o,u,c):f?(r=e$(o.year),i=eH(o.ordinal,1,eX(o.year)),r?!i&&eN("ordinal",o.ordinal):eN("year",o.year)):eD(o))||eP(o);if(k)return nY.invalid(k);let[I,_]=(n=v?eR(o,u,c):f?eL(o):o,nw(e0(n),d,s)),N=new nY({ts:I,zone:s,o:_,loc:a});return o.weekday&&g&&e.weekday!==N.weekday?nY.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${N.toISO()}`):N.isValid?N:nY.invalid(N.invalid)}static fromISO(e,t={}){let[n,r]=tE(e,[tG,tZ],[tK,tJ],[tY,tX],[tq,tQ]);return nC(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){let[n,r]=tE(e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim(),[t$,tj]);return nC(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){let[n,r]=tE(e,[tV,tz],[tW,tz],[tB,tH]);return nC(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(eU(e)||eU(t))throw new c("fromFormat requires an input string and a format");let{locale:r=null,numberingSystem:i=null}=n,[s,a,o,l]=function(e,t,n){let{result:r,zone:i,specificOffset:s,invalidReason:a}=nS(e,t,n);return[r,i,s,a]}(ei.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t);return l?nY.invalid(l):nC(s,a,n,`format ${t}`,e,o)}static fromString(e,t,n={}){return nY.fromFormat(e,t,n)}static fromSQL(e,t={}){let[n,r]=tE(e,[t1,tZ],[t2,t3]);return nC(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new c("need to specify a reason the DateTime is invalid");let n=e instanceof ek?e:new ek(e,t);if(!eS.throwOnInvalid)return new nY({invalid:n});throw new s(n)}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=nk(e,ei.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return nT(tm.parseFormat(e),ei.fromObject(t)).map(e=>e.val).join("")}static resetCache(){r=void 0,nK.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?nN(this).weekYear:NaN}get weekNumber(){return this.isValid?nN(this).weekNumber:NaN}get weekday(){return this.isValid?nN(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?nA(this).weekday:NaN}get localWeekNumber(){return this.isValid?nA(this).weekNumber:NaN}get localWeekYear(){return this.isValid?nA(this).weekYear:NaN}get ordinal(){return this.isValid?eC(this.c).ordinal:NaN}get monthShort(){return this.isValid?no.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?no.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?no.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?no.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=e0(this.c),t=this.zone.offset(e-864e5),n=this.zone.offset(e+864e5),r=this.zone.offset(e-6e4*t),i=this.zone.offset(e-6e4*n);if(r===i)return[this];let s=e-6e4*r,a=e-6e4*i,o=nb(s,r),l=nb(a,i);return o.hour===l.hour&&o.minute===l.minute&&o.second===l.second&&o.millisecond===l.millisecond?[nx(this,{ts:s}),nx(this,{ts:a})]:[this]}get isInLeapYear(){return eJ(this.year)}get daysInMonth(){return eQ(this.year,this.month)}get daysInYear(){return this.isValid?eX(this.year):NaN}get weeksInWeekYear(){return this.isValid?e2(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?e2(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=tm.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(ea.instance(e),t)}toLocal(){return this.setZone(eS.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=el(e,eS.defaultZone)).equals(this.zone))return this;{if(!e.isValid)return nY.invalid(n_(e));let i=this.ts;if(t||n){var r;let t=e.offset(this.ts),n=this.toObject();[i]=(r=e,nw(e0(n),t,r))}return nx(this,{ts:i,zone:e})}}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return nx(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){var t,n,r;let i;if(!this.isValid)return this;let s=e8(e,nB),{minDaysInFirstWeek:a,startOfWeek:o}=eM(s,this.loc),u=!eU(s.weekYear)||!eU(s.weekNumber)||!eU(s.weekday),c=!eU(s.ordinal),h=!eU(s.year),d=!eU(s.month)||!eU(s.day),f=s.weekYear||s.weekNumber;if((h||d||c)&&f)throw new l("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new l("Can't mix ordinal dates with month/day");u?i=eR({...eb(this.c,a,o),...s},a,o):eU(s.ordinal)?(i={...this.toObject(),...s},eU(s.day)&&(i.day=Math.min(eQ(i.year,i.month),i.day))):i=eL({...eC(this.c),...s});let[p,m]=(t=i,n=this.o,r=this.zone,nw(e0(t),n,r));return nx(this,{ts:p,o:m})}plus(e){return this.isValid?nx(this,nR(this,ni.fromDurationLike(e))):this}minus(e){return this.isValid?nx(this,nR(this,ni.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=ni.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){let e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;return"quarters"===r&&(n.month=(Math.ceil(this.month/3)-1)*3+1),this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?tm.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):nI}toLocaleString(e=m,t={}){return this.isValid?tm.create(this.loc.clone(t),e).formatDateTime(this):nI}toLocaleParts(e={}){return this.isValid?tm.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;s=nW(s);let a="extended"===e,o=nM(this,a,s);return n$.indexOf(s)>=3&&(o+="T"),o+=nD(this,a,t,n,r,i,s)}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?nM(this,"extended"===e,nW(t)):null}toISOWeekDate(){return nL(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:s="extended",precision:a="milliseconds"}={}){return this.isValid?(a=nW(a),(r&&n$.indexOf(a)>=3?"T":"")+nD(this,"extended"===s,t,e,n,i,a)):null}toRFC2822(){return nL(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return nL(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?nM(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),nL(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():nI}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return ni.invalid("created by diffing an invalid DateTime");let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=(Array.isArray(t)?t:[t]).map(ni.normalizeUnit),s=e.valueOf()>this.valueOf(),a=function(e,t,n,r){let[i,s,a,o]=function(e,t,n){let r,i,s={},a=e;for(let[o,l]of[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],["months",(e,t)=>t.month-e.month+(t.year-e.year)*12],["weeks",(e,t)=>{let n=nl(e,t);return(n-n%7)/7}],["days",nl]])n.indexOf(o)>=0&&(r=o,s[o]=l(e,t),(i=a.plus(s))>t?(s[o]--,(e=a.plus(s))>t&&(i=e,s[o]--,e=a.plus(s))):e=i);return[e,s,i,r]}(e,t,n),l=t-i,u=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===u.length&&(a<t&&(a=i.plus({[o]:1})),a!==i&&(s[o]=(s[o]||0)+l/(a-i)));let c=ni.fromObject(s,r);return u.length>0?ni.fromMillis(l,r).shiftTo(...u).plus(c):c}(s?this:e,s?e:this,i,r);return s?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(nY.now(),e,t)}until(e){return this.isValid?na.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let t=e.base||nY.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),nH(t,this.plus(n),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?nH(e.base||nY.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(nY.isDateTime))throw new c("min requires all arguments be DateTimes");return eW(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(nY.isDateTime))throw new c("max requires all arguments be DateTimes");return eW(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:r=null,numberingSystem:i=null}=n;return nS(ei.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return nY.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:r=null}=t;return new nO(ei.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(e,t,n={}){if(eU(e)||eU(t))throw new c("fromFormatParser requires an input string and a format parser");let{locale:r=null,numberingSystem:i=null}=n,s=ei.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!s.equals(t.locale))throw new c(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${t.locale}`);let{result:a,zone:o,specificOffset:l,invalidReason:u}=t.explainFromTokens(e);return u?nY.invalid(u):nC(a,o,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return m}static get DATE_MED(){return g}static get DATE_MED_WITH_WEEKDAY(){return y}static get DATE_FULL(){return v}static get DATE_HUGE(){return E}static get TIME_SIMPLE(){return T}static get TIME_WITH_SECONDS(){return O}static get TIME_WITH_SHORT_OFFSET(){return S}static get TIME_WITH_LONG_OFFSET(){return k}static get TIME_24_SIMPLE(){return I}static get TIME_24_WITH_SECONDS(){return _}static get TIME_24_WITH_SHORT_OFFSET(){return N}static get TIME_24_WITH_LONG_OFFSET(){return A}static get DATETIME_SHORT(){return x}static get DATETIME_SHORT_WITH_SECONDS(){return w}static get DATETIME_MED(){return b}static get DATETIME_MED_WITH_SECONDS(){return R}static get DATETIME_MED_WITH_WEEKDAY(){return C}static get DATETIME_FULL(){return L}static get DATETIME_FULL_WITH_SECONDS(){return M}static get DATETIME_HUGE(){return D}static get DATETIME_HUGE_WITH_SECONDS(){return P}}function nq(e){if(nY.isDateTime(e))return e;if(e&&e.valueOf&&eF(e.valueOf()))return nY.fromJSDate(e);if(e&&"object"==typeof e)return nY.fromObject(e);throw new c(`Unknown datetime argument: ${e}, of type ${typeof e}`)}n.DateTime=nY,n.Duration=ni,n.FixedOffsetZone=ea,n.IANAZone=B,n.Info=no,n.Interval=na,n.InvalidZone=eo,n.Settings=eS,n.SystemZone=$,n.VERSION="3.7.2",n.Zone=U},66661,(e,t,n)=>{"use strict";var r,i,s,a;Object.defineProperty(n,"__esModule",{value:!0}),n.CronDate=n.DAYS_IN_MONTH=n.DateMathOp=n.TimeUnit=void 0;let o=e.r(62470);(s=r||(n.TimeUnit=r={})).Second="Second",s.Minute="Minute",s.Hour="Hour",s.Day="Day",s.Month="Month",s.Year="Year",(a=i||(n.DateMathOp=i={})).Add="Add",a.Subtract="Subtract",n.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);class l{#s;#a=null;#o=null;#l={add:{[r.Year]:this.addYear.bind(this),[r.Month]:this.addMonth.bind(this),[r.Day]:this.addDay.bind(this),[r.Hour]:this.addHour.bind(this),[r.Minute]:this.addMinute.bind(this),[r.Second]:this.addSecond.bind(this)},subtract:{[r.Year]:this.subtractYear.bind(this),[r.Month]:this.subtractMonth.bind(this),[r.Day]:this.subtractDay.bind(this),[r.Hour]:this.subtractHour.bind(this),[r.Minute]:this.subtractMinute.bind(this),[r.Second]:this.subtractSecond.bind(this)}};constructor(e,t){const n={zone:t};if(e?e instanceof l?(this.#s=e.#s,this.#a=e.#a,this.#o=e.#o):e instanceof Date?this.#s=o.DateTime.fromJSDate(e,n):"number"==typeof e?this.#s=o.DateTime.fromMillis(e,n):(this.#s=o.DateTime.fromISO(e,n),this.#s.isValid||(this.#s=o.DateTime.fromRFC2822(e,n)),this.#s.isValid||(this.#s=o.DateTime.fromSQL(e,n)),this.#s.isValid||(this.#s=o.DateTime.fromFormat(e,"EEE, d MMM yyyy HH:mm:ss",n))):this.#s=o.DateTime.local(),!this.#s.isValid)throw Error(`CronDate: unhandled timestamp: ${e}`);t&&t!==this.#s.zoneName&&(this.#s=this.#s.setZone(t))}static #u(e){return e%4==0&&e%100!=0||e%400==0}get dstStart(){return this.#a}set dstStart(e){this.#a=e}get dstEnd(){return this.#o}set dstEnd(e){this.#o=e}addYear(){this.#s=this.#s.plus({years:1})}addMonth(){this.#s=this.#s.plus({months:1}).startOf("month")}addDay(){this.#s=this.#s.plus({days:1}).startOf("day")}addHour(){this.#s=this.#s.plus({hours:1}).startOf("hour")}addMinute(){this.#s=this.#s.plus({minutes:1}).startOf("minute")}addSecond(){this.#s=this.#s.plus({seconds:1})}subtractYear(){this.#s=this.#s.minus({years:1})}subtractMonth(){this.#s=this.#s.minus({months:1}).endOf("month").startOf("second")}subtractDay(){this.#s=this.#s.minus({days:1}).endOf("day").startOf("second")}subtractHour(){this.#s=this.#s.minus({hours:1}).endOf("hour").startOf("second")}subtractMinute(){this.#s=this.#s.minus({minutes:1}).endOf("minute").startOf("second")}subtractSecond(){this.#s=this.#s.minus({seconds:1})}addUnit(e){this.#l.add[e]()}subtractUnit(e){this.#l.subtract[e]()}invokeDateOperation(e,t){if(e===i.Add)return void this.addUnit(t);if(e===i.Subtract)return void this.subtractUnit(t);throw Error(`Invalid verb: ${e}`)}getDate(){return this.#s.day}getFullYear(){return this.#s.year}getDay(){let e=this.#s.weekday;return 7===e?0:e}getMonth(){return this.#s.month-1}getHours(){return this.#s.hour}getMinutes(){return this.#s.minute}getSeconds(){return this.#s.second}getMilliseconds(){return this.#s.millisecond}getUTCOffset(){return this.#s.offset}setStartOfDay(){this.#s=this.#s.startOf("day")}setEndOfDay(){this.#s=this.#s.endOf("day")}getTime(){return this.#s.valueOf()}getUTCDate(){return this.#c().day}getUTCFullYear(){return this.#c().year}getUTCDay(){let e=this.#c().weekday;return 7===e?0:e}getUTCMonth(){return this.#c().month-1}getUTCHours(){return this.#c().hour}getUTCMinutes(){return this.#c().minute}getUTCSeconds(){return this.#c().second}toISOString(){return this.#s.toUTC().toISO()}toJSON(){return this.#s.toJSON()}setDate(e){this.#s=this.#s.set({day:e})}setFullYear(e){this.#s=this.#s.set({year:e})}setDay(e){this.#s=this.#s.set({weekday:e})}setMonth(e){this.#s=this.#s.set({month:e+1})}setHours(e){this.#s=this.#s.set({hour:e})}setMinutes(e){this.#s=this.#s.set({minute:e})}setSeconds(e){this.#s=this.#s.set({second:e})}setMilliseconds(e){this.#s=this.#s.set({millisecond:e})}toString(){return this.toDate().toString()}toDate(){return this.#s.toJSDate()}isLastDayOfMonth(){let{day:e,month:t}=this.#s;if(2===t){let r=l.#u(this.#s.year);return e===n.DAYS_IN_MONTH[t-1]-!r}return e===n.DAYS_IN_MONTH[t-1]}isLastWeekdayOfMonth(){let{day:e,month:t}=this.#s;return e>(2===t?n.DAYS_IN_MONTH[t-1]-!l.#u(this.#s.year):n.DAYS_IN_MONTH[t-1])-7}applyDateOperation(e,t,n){if(t===r.Month||t===r.Day)return void this.invokeDateOperation(e,t);let i=this.getHours();this.invokeDateOperation(e,t);let s=this.getHours(),a=s-i;2===a?24!==n&&(this.dstStart=s):0===a&&0===this.getMinutes()&&0===this.getSeconds()&&24!==n&&(this.dstEnd=s)}#c(){return this.#s.toUTC()}}n.CronDate=l,n.default=l},51194,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CronMonth=void 0;let r=e.r(66661),i=e.r(41387),s=Object.freeze([]);class a extends i.CronField{static get min(){return 1}static get max(){return 12}static get chars(){return s}static get daysInMonth(){return r.DAYS_IN_MONTH}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}n.CronMonth=a},45574,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CronSecond=void 0;let r=e.r(41387),i=Object.freeze([]);class s extends r.CronField{static get min(){return 0}static get max(){return 59}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}n.CronSecond=s},10359,(e,t,n)=>{"use strict";var r=e.e&&e.e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=e.e&&e.e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e.r(32322),n),i(e.r(47241),n),i(e.r(71189),n),i(e.r(41387),n),i(e.r(20957),n),i(e.r(92951),n),i(e.r(51194),n),i(e.r(45574),n)},21929,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CronFieldCollection=void 0;let r=e.r(10359);class i{#h;#d;#f;#p;#m;#g;static from(e,t){return new i({second:this.resolveField(r.CronSecond,e.second,t.second),minute:this.resolveField(r.CronMinute,e.minute,t.minute),hour:this.resolveField(r.CronHour,e.hour,t.hour),dayOfMonth:this.resolveField(r.CronDayOfMonth,e.dayOfMonth,t.dayOfMonth),month:this.resolveField(r.CronMonth,e.month,t.month),dayOfWeek:this.resolveField(r.CronDayOfWeek,e.dayOfWeek,t.dayOfWeek)})}static resolveField(e,t,n){return n?n instanceof r.CronField?n:new e(n):t}constructor({second:e,minute:t,hour:n,dayOfMonth:i,month:s,dayOfWeek:a}){if(!e)throw Error("Validation error, Field second is missing");if(!t)throw Error("Validation error, Field minute is missing");if(!n)throw Error("Validation error, Field hour is missing");if(!i)throw Error("Validation error, Field dayOfMonth is missing");if(!s)throw Error("Validation error, Field month is missing");if(!a)throw Error("Validation error, Field dayOfWeek is missing");if(1===s.values.length&&!i.hasLastChar&&!(parseInt(i.values[0],10)<=r.CronMonth.daysInMonth[s.values[0]-1]))throw Error("Invalid explicit day of month definition");this.#h=e,this.#d=t,this.#f=n,this.#m=s,this.#g=a,this.#p=i}get second(){return this.#h}get minute(){return this.#d}get hour(){return this.#f}get dayOfMonth(){return this.#p}get month(){return this.#m}get dayOfWeek(){return this.#g}static compactField(e){let t;if(0===e.length)return[];let n=[];return e.forEach((e,r,i)=>{if(void 0===t){t={start:e,count:1};return}let s=i[r-1]||t.start,a=i[r+1];if("L"===e||"W"===e){n.push(t),n.push({start:e,count:1}),t=void 0;return}if(void 0===t.step&&void 0!==a){let n=e-s;if(n<=a-e){t={...t,count:2,end:e,step:n};return}t.step=1}e-(t.end??0)===t.step?(t.count++,t.end=e):(1===t.count?n.push({start:t.start,count:1}):2===t.count?(n.push({start:t.start,count:1}),n.push({start:t.end??s,count:1})):n.push(t),t={start:e,count:1})}),t&&n.push(t),n}static #y(e,t,n){let r=t.step;return r?1===r&&t.start===e.min&&t.end&&t.end>=n?e.hasQuestionMarkChar?"?":"*":1!==r&&t.start===e.min&&t.end&&t.end>=n-r+1?`*/${r}`:null:null}static #v(e,t){let n=e.step;if(1===n)return`${e.start}-${e.end}`;let r=0===e.start?e.count-1:e.count;if(!n)throw Error("Unexpected range step");if(!e.end)throw Error("Unexpected range end");if(n*r>e.end){if("number"!=typeof e.start)throw Error("Unexpected range start");return Array.from({length:e.end-e.start+1},(t,r)=>{if("number"!=typeof e.start)throw Error("Unexpected range start");return r%n==0?e.start+r:null}).filter(e=>null!==e).join(",")}return e.end===t-n+1?`${e.start}/${n}`:`${e.start}-${e.end}/${n}`}stringifyField(e){let t=e.max,n=e.values;if(e instanceof r.CronDayOfWeek){t=6;let e=this.#g.values;n=7===e[e.length-1]?e.slice(0,-1):e}e instanceof r.CronDayOfMonth&&(t=1===this.#m.values.length?r.CronMonth.daysInMonth[this.#m.values[0]-1]:e.max);let s=i.compactField(n);if(1===s.length){let n=i.#y(e,s[0],t);if(n)return n}return s.map(n=>{let s=1===n.count?n.start.toString():i.#v(n,t);return e instanceof r.CronDayOfWeek&&e.nthDay>0?`${s}#${e.nthDay}`:s}).join(",")}stringify(e=!1){let t=[];return e&&t.push(this.stringifyField(this.#h)),t.push(this.stringifyField(this.#d),this.stringifyField(this.#f),this.stringifyField(this.#p),this.stringifyField(this.#m),this.stringifyField(this.#g)),t.join(" ")}serialize(){return{second:this.#h.serialize(),minute:this.#d.serialize(),hour:this.#f.serialize(),dayOfMonth:this.#p.serialize(),month:this.#m.serialize(),dayOfWeek:this.#g.serialize()}}}n.CronFieldCollection=i},53214,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CronExpression=n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;let r=e.r(66661);n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";class i{#E;#T;#O;#S;#k;#I;#_=null;#N=!1;constructor(e,t){this.#E=t,this.#T=t.tz,this.#S=t.startDate?new r.CronDate(t.startDate,this.#T):null,this.#k=t.endDate?new r.CronDate(t.endDate,this.#T):null;let n=t.currentDate??t.startDate;if(n){const e=new r.CronDate(n,this.#T);this.#S&&e.getTime()<this.#S.getTime()?n=this.#S:this.#k&&e.getTime()>this.#k.getTime()&&(n=this.#k)}this.#O=new r.CronDate(n,this.#T),this.#I=e}get fields(){return this.#I}static fieldsToExpression(e,t){return new i(e,t||{})}static #A(e,t){return t.some(t=>t===e)}#x(e,t){return e[t?e.length-1:0]}#w(e){let t=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#_===t)return this.#N;let n=new r.CronDate(e);n.setStartOfDay();let i=new r.CronDate(e);return i.setEndOfDay(),this.#_=t,this.#N=n.getUTCOffset()!==i.getUTCOffset(),this.#N}#b(e,t,n){let i=this.#I.second.values,s=e.getSeconds(),a=this.#I.second.findNearestValue(s,n);null!==a?e.setSeconds(a):(e.applyDateOperation(t,r.TimeUnit.Minute,this.#I.hour.values.length),e.setSeconds(this.#x(i,n)))}#R(e,t,n){let i=this.#I.minute.values,s=this.#I.second.values,a=e.getMinutes(),o=this.#I.minute.findNearestValue(a,n);if(null!==o){e.setMinutes(o),e.setSeconds(this.#x(s,n));return}e.applyDateOperation(t,r.TimeUnit.Hour,this.#I.hour.values.length),e.setMinutes(this.#x(i,n)),e.setSeconds(this.#x(s,n))}static #C(e,t){let n=t.isLastWeekdayOfMonth();return e.some(e=>{let r=parseInt(e.toString().charAt(0),10)%7;if(Number.isNaN(r))throw Error(`Invalid last weekday of the month expression: ${e}`);return t.getDay()===r&&n})}next(){return this.#L()}prev(){return this.#L(!0)}hasNext(){let e=this.#O;try{return this.#L(),!0}catch{return!1}finally{this.#O=e}}hasPrev(){let e=this.#O;try{return this.#L(!0),!0}catch{return!1}finally{this.#O=e}}take(e){let t=[];if(e>=0)for(let n=0;n<e;n++)try{t.push(this.next())}catch{break}else for(let n=0;n>e;n--)try{t.push(this.prev())}catch{break}return t}reset(e){this.#O=new r.CronDate(e||this.#E.currentDate)}stringify(e=!1){return this.#I.stringify(e)}includesDate(e){let{second:t,minute:n,hour:i,month:s}=this.#I,a=new r.CronDate(e,this.#T);return!!t.values.includes(a.getSeconds())&&!!n.values.includes(a.getMinutes())&&!!i.values.includes(a.getHours())&&!!s.values.includes(a.getMonth()+1)&&!!this.#M(a)&&(!(this.#I.dayOfWeek.nthDay>0)||Math.ceil(a.getDate()/7)===this.#I.dayOfWeek.nthDay)&&!0}toString(){return this.#E.expression||this.stringify(!0)}#M(e){let t=this.#I.dayOfMonth.isWildcard,n=this.#I.dayOfWeek.isWildcard,r=!n,s=i.#A(e.getDate(),this.#I.dayOfMonth.values)||this.#I.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),a=i.#A(e.getDay(),this.#I.dayOfWeek.values)||this.#I.dayOfWeek.hasLastChar&&i.#C(this.#I.dayOfWeek.values,e);return!t&&!!r&&(!!s||!!a)||!!s&&!r||!!t&&!n&&!!a}#D(e,t,n){let s=this.#I.hour.values,a=e.getHours(),o=i.#A(a,s),l=e.dstStart===a,u=e.dstEnd===a;if(l)return!!i.#A(a-1,s)||(e.invokeDateOperation(t,r.TimeUnit.Hour),!1);if(u&&!n)return e.dstEnd=null,e.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,s.length),!1;if(o)return!0;e.dstStart=null;let c=this.#I.hour.findNearestValue(a,n);if(null===c)return e.applyDateOperation(t,r.TimeUnit.Day,s.length),!1;if(this.#w(e)){let i=n?a-c:c-a;for(let n=0;n<i;n++)e.applyDateOperation(t,r.TimeUnit.Hour,s.length)}else e.setHours(c);return e.setMinutes(this.#x(this.#I.minute.values,n)),e.setSeconds(this.#x(this.#I.second.values,n)),!1}#P(e){if(!this.#S&&!this.#k)return;let t=e.getTime();if(this.#S&&t<this.#S.getTime()||this.#k&&t>this.#k.getTime())throw Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#L(e=!1){let t=e?r.DateMathOp.Subtract:r.DateMathOp.Add,s=new r.CronDate(this.#O),a=s.getTime(),o=0;for(;++o<1e4;){if(this.#P(s),!this.#M(s)||!(this.#I.dayOfWeek.nthDay<=0||Math.ceil(s.getDate()/7)===this.#I.dayOfWeek.nthDay)){s.applyDateOperation(t,r.TimeUnit.Day,this.#I.hour.values.length);continue}if(!i.#A(s.getMonth()+1,this.#I.month.values)){s.applyDateOperation(t,r.TimeUnit.Month,this.#I.hour.values.length);continue}if(this.#D(s,t,e)){if(!i.#A(s.getMinutes(),this.#I.minute.values)){this.#R(s,t,e);continue}if(!i.#A(s.getSeconds(),this.#I.second.values)){this.#b(s,t,e);continue}if(a===s.getTime()){("Add"===t||0===s.getMilliseconds())&&s.applyDateOperation(t,r.TimeUnit.Second,this.#I.hour.values.length);continue}break}}if(o>1e4)throw Error(n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return 0!==s.getMilliseconds()&&s.setMilliseconds(0),this.#O=s,s}[Symbol.iterator](){return{next:()=>({value:this.#L(),done:!this.hasNext()})}}}n.CronExpression=i,n.default=i},92204,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.seededRandom=function(e){var t;return t=e?(function(e){let t=0x811c9dc5;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,0x1000193);return()=>t>>>0})(e)():Math.floor(1e10*Math.random()),()=>{let e=t+=0x6d2b79f5;return e=Math.imul(e^e>>>15,1|e),(((e^=e+Math.imul(e^e>>>7,61|e))^e>>>14)>>>0)/0x100000000}}},78342,(e,t,n)=>{"use strict";var r,i,s,a,o,l,u,c;Object.defineProperty(n,"__esModule",{value:!0}),n.CronExpressionParser=n.DayOfWeek=n.Months=n.CronUnit=n.PredefinedExpressions=void 0;let h=e.r(21929),d=e.r(53214),f=e.r(92204),p=e.r(10359);(o=r||(n.PredefinedExpressions=r={}))["@yearly"]="0 0 0 1 1 *",o["@annually"]="0 0 0 1 1 *",o["@monthly"]="0 0 0 1 * *",o["@weekly"]="0 0 0 * * 0",o["@daily"]="0 0 0 * * *",o["@hourly"]="0 0 * * * *",o["@minutely"]="0 * * * * *",o["@secondly"]="* * * * * *",o["@weekdays"]="0 0 0 * * 1-5",o["@weekends"]="0 0 0 * * 0,6",(l=i||(n.CronUnit=i={})).Second="Second",l.Minute="Minute",l.Hour="Hour",l.DayOfMonth="DayOfMonth",l.Month="Month",l.DayOfWeek="DayOfWeek",(u=s||(n.Months=s={}))[u.jan=1]="jan",u[u.feb=2]="feb",u[u.mar=3]="mar",u[u.apr=4]="apr",u[u.may=5]="may",u[u.jun=6]="jun",u[u.jul=7]="jul",u[u.aug=8]="aug",u[u.sep=9]="sep",u[u.oct=10]="oct",u[u.nov=11]="nov",u[u.dec=12]="dec",(c=a||(n.DayOfWeek=a={}))[c.sun=0]="sun",c[c.mon=1]="mon",c[c.tue=2]="tue",c[c.wed=3]="wed",c[c.thu=4]="thu",c[c.fri=5]="fri",c[c.sat=6]="sat";class m{static parse(e,t={}){let{strict:n=!1,hashSeed:s}=t,a=(0,f.seededRandom)(s);e=r[e]||e;let o=m.#U(e,n);if(!("*"===o.dayOfMonth||"*"===o.dayOfWeek||!n))throw Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");let l=m.#F(i.Second,o.second,p.CronSecond.constraints,a),u=m.#F(i.Minute,o.minute,p.CronMinute.constraints,a),c=m.#F(i.Hour,o.hour,p.CronHour.constraints,a),g=m.#F(i.Month,o.month,p.CronMonth.constraints,a),y=m.#F(i.DayOfMonth,o.dayOfMonth,p.CronDayOfMonth.constraints,a),{dayOfWeek:v,nthDayOfWeek:E}=m.#$(o.dayOfWeek),T=m.#F(i.DayOfWeek,v,p.CronDayOfWeek.constraints,a),O=new h.CronFieldCollection({second:new p.CronSecond(l,{rawValue:o.second}),minute:new p.CronMinute(u,{rawValue:o.minute}),hour:new p.CronHour(c,{rawValue:o.hour}),dayOfMonth:new p.CronDayOfMonth(y,{rawValue:o.dayOfMonth}),month:new p.CronMonth(g,{rawValue:o.month}),dayOfWeek:new p.CronDayOfWeek(T,{rawValue:o.dayOfWeek,nthDayOfWeek:E})});return new d.CronExpression(O,{...t,expression:e})}static #U(e,t){if(t&&!e.length)throw Error("Invalid cron expression");let n=(e=e||"0 * * * * *").trim().split(/\s+/);if(t&&n.length<6)throw Error("Invalid cron expression, expected 6 fields");if(n.length>6)throw Error("Invalid cron expression, too many fields");let r=["*","*","*","*","*","0"];n.length<r.length&&n.unshift(...r.slice(n.length));let[i,s,a,o,l,u]=n;return{second:i,minute:s,hour:a,dayOfMonth:o,month:l,dayOfWeek:u}}static #F(e,t,n,r){if((e===i.Month||e===i.DayOfWeek)&&(t=t.replace(/[a-z]{3}/gi,e=>{let t=s[e=e.toLowerCase()]||a[e];if(void 0===t)throw Error(`Validation error, cannot resolve alias "${e}"`);return t.toString()})),!n.validChars.test(t))throw Error(`Invalid characters, got value: ${t}`);return t=this.#j(t,n),t=this.#V(t,n,r),this.#W(e,t,n)}static #j(e,t){return e.replace(/[*?]/g,t.min+"-"+t.max)}static #V(e,t,n){let r=n();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(e,n,i,s)=>{if(n&&i&&s){let e=parseInt(n,10),a=parseInt(i,10),o=parseInt(s,10);if(e>a)throw Error(`Invalid range: ${e}-${a}, min > max`);if(o<=0)throw Error(`Invalid step: ${o}, must be positive`);let l=Math.max(e,t.min),u=Math.floor(r*o),c=[];for(let e=Math.floor(l/o)*o+u;e<=a;e+=o)e>=l&&c.push(e);return c.join(",")}if(n&&i){let e=parseInt(n,10),t=parseInt(i,10);if(e>t)throw Error(`Invalid range: ${e}-${t}, min > max`);return String(Math.floor(r*(t-e+1))+e)}if(!s)return String(Math.floor(r*(t.max-t.min+1)+t.min));{let e=parseInt(s,10);if(e<=0)throw Error(`Invalid step: ${e}, must be positive`);let n=Math.floor(r*e),i=[];for(let r=Math.floor(t.min/e)*e+n;r<=t.max;r+=e)r>=t.min&&i.push(r);return i.join(",")}})}static #W(e,t,n){let r=[];return t.split(",").forEach(t=>{if(!(t.length>0))throw Error("Invalid list value format");var s=m.#B(e,t,n);if(Array.isArray(s))r.push(...s);else if(m.#z(n,s))r.push(s);else{let t=parseInt(s.toString(),10);if(!(t>=n.min&&t<=n.max))throw Error(`Constraint error, got value ${s} expected range ${n.min}-${n.max}`);r.push(e===i.DayOfWeek?t%7:s)}}),r}static #B(e,t,n){let r=t.split("/");if(r.length>2)throw Error(`Invalid repeat: ${t}`);return 2===r.length?(isNaN(parseInt(r[0],10))||(r[0]=`${r[0]}-${n.max}`),m.#H(e,r[0],parseInt(r[1],10),n)):m.#H(e,t,1,n)}static #G(e,t,n){if(!(!isNaN(e)&&!isNaN(t)&&e>=n.min&&t<=n.max))throw Error(`Constraint error, got range ${e}-${t} expected range ${n.min}-${n.max}`);if(e>t)throw Error(`Invalid range: ${e}-${t}, min(${e}) > max(${t})`)}static #K(e){if(!(!isNaN(e)&&e>0))throw Error(`Constraint error, cannot repeat at every ${e} time.`)}static #Y(e,t,n,r){let s=[];e===i.DayOfWeek&&n%7==0&&s.push(0);for(let e=t;e<=n;e+=r)-1===s.indexOf(e)&&s.push(e);return s}static #H(e,t,n,r){let i=t.split("-");if(i.length<=1)return isNaN(+t)?t:+t;let[s,a]=i.map(e=>parseInt(e,10));return this.#G(s,a,r),this.#K(n),this.#Y(e,s,a,n)}static #$(e){let t=e.split("#");if(t.length<=1)return{dayOfWeek:t[0]};let n=+t[t.length-1],r=e.match(/([,-/])/);if(null!==r)throw Error(`Constraint error, invalid dayOfWeek \`#\` and \`${r?.[0]}\` special characters are incompatible`);if(!(t.length<=2&&!isNaN(n)&&n>=1&&n<=5))throw Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:t[0],nthDayOfWeek:n}}static #z(e,t){return e.chars.some(e=>t.toString().includes(e))}}n.CronExpressionParser=m},40466,(e,t,n)=>{"use strict";var r,i=e.e&&e.e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=e.e&&e.e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=e.e&&e.e.__importStar||(r=function(e){return(r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),a=0;a<n.length;a++)"default"!==n[a]&&i(t,e,n[a]);return s(t,e),t});Object.defineProperty(n,"__esModule",{value:!0}),n.CronFileParser=void 0;let o=e.r(78342);class l{static async parseFile(t){let{readFile:n}=await Promise.resolve().then(()=>a(e.r(24868))),r=await n(t,"utf8");return l.#q(r)}static parseFileSync(t){let{readFileSync:n}=e.r(22734),r=n(t,"utf8");return l.#q(r)}static #q(e){let t=e.split("\n"),n={variables:{},expressions:[],errors:{}};for(let e of t){let t=e.trim();if(0===t.length||t.startsWith("#"))continue;let r=t.match(/^(.*)=(.*)$/);if(r){let[,e,t]=r;n.variables[e]=t.replace(/["']/g,"");continue}try{let e=l.#Z(t);n.expressions.push(e.interval)}catch(e){n.errors[t]=e}}return n}static #Z(e){let t=e.split(" ");return{interval:o.CronExpressionParser.parse(t.slice(0,5).join(" ")),command:t.slice(5,t.length)}}}n.CronFileParser=l},71435,(e,t,n)=>{"use strict";var r=e.e&&e.e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=e.e&&e.e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.CronFileParser=n.CronExpressionParser=n.CronExpression=n.CronFieldCollection=n.CronDate=void 0;let s=e.r(78342);var a=e.r(66661);Object.defineProperty(n,"CronDate",{enumerable:!0,get:function(){return a.CronDate}});var o=e.r(21929);Object.defineProperty(n,"CronFieldCollection",{enumerable:!0,get:function(){return o.CronFieldCollection}});var l=e.r(53214);Object.defineProperty(n,"CronExpression",{enumerable:!0,get:function(){return l.CronExpression}});var u=e.r(78342);Object.defineProperty(n,"CronExpressionParser",{enumerable:!0,get:function(){return u.CronExpressionParser}});var c=e.r(40466);Object.defineProperty(n,"CronFileParser",{enumerable:!0,get:function(){return c.CronFileParser}}),i(e.r(10359),n),n.default=s.CronExpressionParser},42873,66890,e=>{"use strict";var t=e.i(48414),n=e.i(4468),r=e.i(87098),i=e.i(39570);let s=new Set(t.SUCCESS_NODE_STATUSES),a=new Set(t.TERMINAL_NODE_STATUSES),o=(e,t)=>`${e}->${t}`,l={work:new Set([o("pending","running"),o("pending","skipped"),o("running","done"),o("running","pending"),o("running","failed"),o("running","blocked"),o("running","skipped"),o("running","paused"),o("running","stopped"),o("paused","running"),o("paused","stopped"),o("stopped","running"),o("stopped","pending"),o("failed","running"),o("failed","pending"),o("done","pending"),o("blocked","pending")]),gate:new Set([o("pending","running"),o("pending","skipped"),o("running","passed"),o("running","failed"),o("running","awaiting_human"),o("awaiting_human","passed"),o("awaiting_human","failed"),o("running","paused"),o("running","stopped"),o("paused","running"),o("paused","stopped"),o("stopped","running")]),fork:new Set([o("pending","done"),o("pending","skipped")]),join:new Set([o("pending","running"),o("pending","skipped"),o("running","done"),o("running","failed"),o("running","paused"),o("running","stopped"),o("paused","running"),o("stopped","running")]),conditional:new Set([o("pending","running"),o("pending","skipped"),o("running","done"),o("running","failed"),o("running","paused"),o("running","stopped"),o("paused","running"),o("stopped","running")]),function:new Set([o("pending","running"),o("pending","skipped"),o("running","done"),o("running","failed")]),root:new Set([o("pending","running"),o("running","done"),o("running","failed"),o("running","paused"),o("running","stopped"),o("paused","running"),o("stopped","running"),o("failed","running"),o("done","pending")])};class u extends Error{constructor(e,t,n){super(`Invalid ${e} node transition: ${t} -> ${n}`),this.name="InvalidNodeTransitionError"}}class c extends Error{constructor(e,t,n){super(`Invalid ${e} node event '${n}' from status '${t}'`),this.name="InvalidNodeEventError"}}let h=e=>"soft"===e.edgeType,d=e=>"pending"===e.status||"running"===e.status||"awaiting_human"===e.status||"blocked"===e.status&&!h(e);function f(e,t){if("all"===e.joinStrategy){let e=t.filter(e=>!h(e)),n=t.filter(h);if(e.some(e=>"failed"===e.status))return{satisfied:!1,impossible:!0};let r=e.every(e=>{let t;return"failed"!==e.status&&(t=e.status,a.has(t))}),i=n.every(e=>{let t;return t=e.status,a.has(t)||"blocked"===e.status});return{satisfied:r&&i,impossible:!1}}if("any"===e.joinStrategy)return t.filter(e=>{let t;return t=e.status,s.has(t)}).length>=1?{satisfied:!0,impossible:!1}:{satisfied:!1,impossible:0===t.filter(d).length};let n=e.requiredCount??t.length,r=t.filter(e=>{let t;return t=e.status,s.has(t)}).length;return r>=n?{satisfied:!0,impossible:!1}:{satisfied:!1,impossible:r+t.filter(d).length<n}}let p=(0,i.setup)({types:{context:{},input:{},events:{}},guards:{depsSatisfied:({event:e})=>"START"===e.type&&e.depsSatisfied,canRetry:({context:e,event:t})=>"FAIL"===t.type&&t.transient&&e.node.attempts<e.node.maxAttempts,shouldSkipOnExhaust:({context:e,event:t})=>"FAIL"===t.type&&e.node.attempts>=e.node.maxAttempts&&"skip"===e.node.retryPolicy.onExhaust,shouldFailOnExhaust:({context:e,event:t})=>"FAIL"===t.type&&e.node.attempts>=e.node.maxAttempts&&"fail"===e.node.retryPolicy.onExhaust,shouldEscalateOnExhaust:({context:e,event:t})=>"FAIL"===t.type&&e.node.attempts>=e.node.maxAttempts&&"escalate"===e.node.retryPolicy.onExhaust,fatalFailure:({event:e})=>"FAIL"===e.type&&!e.transient},actions:{markRunning:(0,r.assign)(({context:e})=>({node:{...e.node,status:"running",attempts:e.node.attempts+1}})),markDone:(0,r.assign)(({context:e})=>({node:{...e.node,status:"done"}})),markPendingRetry:(0,r.assign)(({context:e})=>({node:{...e.node,status:"pending"}})),markFailed:(0,r.assign)(({context:e})=>({node:{...e.node,status:"failed"}})),markBlocked:(0,r.assign)(({context:e})=>({node:{...e.node,status:"blocked"}})),markSkipped:(0,r.assign)(({context:e})=>({node:{...e.node,status:"skipped"}}))}}).createMachine({id:"work-node",initial:"pending",context:({input:e})=>({node:{...e.node}}),states:{pending:{on:{START:{target:"running",guard:"depsSatisfied",actions:"markRunning"},SKIP:{target:"skipped",actions:"markSkipped"}}},running:{on:{COMPLETE:{target:"done",actions:"markDone"},FAIL:[{target:"pending",guard:"canRetry",actions:"markPendingRetry"},{target:"skipped",guard:"shouldSkipOnExhaust",actions:"markSkipped"},{target:"blocked",guard:"shouldEscalateOnExhaust",actions:"markBlocked"},{target:"failed",guard:"shouldFailOnExhaust",actions:"markFailed"},{target:"failed",guard:"fatalFailure",actions:"markFailed"}],BLOCK:{target:"blocked",actions:"markBlocked"}}},done:{},failed:{},blocked:{},skipped:{}}}),m=(0,i.setup)({types:{context:{},input:{},events:{}},guards:{depsSatisfied:({event:e})=>"START"===e.type&&e.depsSatisfied,needsHumanReview:({event:e})=>"AUTO_PASS"===e.type&&e.humanRequired,noHumanReview:({event:e})=>"AUTO_PASS"===e.type&&!e.humanRequired},actions:{markRunning:(0,r.assign)(({context:e})=>({node:{...e.node,status:"running"}})),markPassed:(0,r.assign)(({context:e})=>({node:{...e.node,status:"passed"}})),markFailed:(0,r.assign)(({context:e})=>({node:{...e.node,status:"failed"}})),markAwaitingHuman:(0,r.assign)(({context:e})=>({node:{...e.node,status:"awaiting_human"}})),markSkipped:(0,r.assign)(({context:e})=>({node:{...e.node,status:"skipped"}}))}}).createMachine({id:"gate-node",initial:"pending",context:({input:e})=>({node:{...e.node}}),states:{pending:{on:{START:{target:"running",guard:"depsSatisfied",actions:"markRunning"},SKIP:{target:"skipped",actions:"markSkipped"}}},running:{on:{AUTO_PASS:[{target:"awaiting_human",guard:"needsHumanReview",actions:"markAwaitingHuman"},{target:"passed",guard:"noHumanReview",actions:"markPassed"}],AUTO_FAIL:{target:"failed",actions:"markFailed"}}},awaiting_human:{on:{HUMAN_APPROVE:{target:"passed",actions:"markPassed"},HUMAN_REJECT:{target:"failed",actions:"markFailed"}}},passed:{},failed:{},skipped:{}}}),g=(0,i.setup)({types:{context:{},input:{},events:{}},guards:{depsSatisfied:({event:e})=>"ACTIVATE"===e.type&&e.depsSatisfied},actions:{markDone:(0,r.assign)(({context:e})=>({node:{...e.node,status:"done"}})),markSkipped:(0,r.assign)(({context:e})=>({node:{...e.node,status:"skipped"}}))}}).createMachine({id:"fork-node",initial:"pending",context:({input:e})=>({node:{...e.node}}),states:{pending:{on:{ACTIVATE:{target:"done",guard:"depsSatisfied",actions:"markDone"},SKIP:{target:"skipped",actions:"markSkipped"}}},done:{},skipped:{}}}),y=(0,i.setup)({types:{context:{},input:{},events:{}},guards:{hasAnyTerminalDependency:({event:e})=>"EVALUATE"===e.type&&e.dependencies.some(e=>{let t;return t=e.status,a.has(t)}),joinStrategySatisfied:({context:e,event:t})=>"EVALUATE"===t.type&&f(e.node,t.dependencies).satisfied,joinStrategyImpossible:({context:e,event:t})=>"EVALUATE"===t.type&&f(e.node,t.dependencies).impossible},actions:{setDependencies:(0,r.assign)(({context:e,event:t})=>({dependencies:"EVALUATE"===t.type?[...t.dependencies]:e.dependencies})),markRunning:(0,r.assign)(({context:e})=>({node:{...e.node,status:"running"}})),markDone:(0,r.assign)(({context:e})=>({node:{...e.node,status:"done"}})),markFailed:(0,r.assign)(({context:e})=>({node:{...e.node,status:"failed"}})),markSkipped:(0,r.assign)(({context:e})=>({node:{...e.node,status:"skipped"}}))}}).createMachine({id:"join-node",initial:"pending",context:({input:e})=>({node:{...e.node},dependencies:[...e.dependencies]}),states:{pending:{on:{EVALUATE:[{target:"running",guard:"hasAnyTerminalDependency",actions:["setDependencies","markRunning"]},{actions:"setDependencies"}],SKIP:{target:"skipped",actions:"markSkipped"}}},running:{on:{EVALUATE:[{target:"done",guard:"joinStrategySatisfied",actions:["setDependencies","markDone"]},{target:"failed",guard:"joinStrategyImpossible",actions:["setDependencies","markFailed"]},{actions:"setDependencies"}]}},done:{},failed:{},skipped:{}}}),v=(0,i.setup)({types:{context:{},input:{},events:{}},guards:{depsSatisfied:({event:e})=>"START"===e.type&&e.depsSatisfied},actions:{markRunning:(0,r.assign)(({context:e})=>({node:{...e.node,status:"running"}})),markThenDone:(0,r.assign)(({context:e})=>({node:{...e.node,status:"done",evaluatedTo:"then"}})),markElseDone:(0,r.assign)(({context:e})=>({node:{...e.node,status:"done",evaluatedTo:"else"}})),markFailed:(0,r.assign)(({context:e})=>({node:{...e.node,status:"failed"}})),markSkipped:(0,r.assign)(({context:e})=>({node:{...e.node,status:"skipped"}}))}}).createMachine({id:"conditional-node",initial:"pending",context:({input:e})=>({node:{...e.node}}),states:{pending:{on:{START:{target:"running",guard:"depsSatisfied",actions:"markRunning"},SKIP:{target:"skipped",actions:"markSkipped"}}},running:{on:{CONDITION_TRUE:{target:"done",actions:"markThenDone"},CONDITION_FALSE:{target:"done",actions:"markElseDone"},CONDITION_ERROR:{target:"failed",actions:"markFailed"}}},done:{},failed:{},skipped:{}}}),E=(0,i.setup)({types:{context:{},input:{},events:{}},guards:{depsSatisfied:({event:e})=>"START"===e.type&&e.depsSatisfied},actions:{markRunning:(0,r.assign)(({context:e})=>({node:{...e.node,status:"running"}})),markDone:(0,r.assign)(({context:e})=>({node:{...e.node,status:"done"}})),markFailed:(0,r.assign)(({context:e})=>({node:{...e.node,status:"failed"}})),markSkipped:(0,r.assign)(({context:e})=>({node:{...e.node,status:"skipped"}}))}}).createMachine({id:"function-node",initial:"pending",context:({input:e})=>({node:{...e.node}}),states:{pending:{on:{START:{target:"running",guard:"depsSatisfied",actions:"markRunning"},SKIP:{target:"skipped",actions:"markSkipped"}}},running:{on:{COMPLETE:{target:"done",actions:"markDone"},FAIL:{target:"failed",actions:"markFailed"}}},done:{},failed:{},skipped:{}}});function T(e,t,n,r,i){if(0===e.getTransitionData(t,n).length)throw new c(r,i,n.type)}function O(e,t,n){t!==n&&function(e,t,n){if(!(t===n||l[e].has(o(t,n))))throw new u(e,t,n)}(e,t,n)}function S(e){return e.status}function k(e,t){let n=p.resolveState({value:S(e),context:{node:{...e}}});T(p,n,t,e.type,e.status);let[r]=(0,i.transition)(p,n,t),s=r.context.node;return O(e.type,e.status,s.status),s}function I(e,t){let n=m.resolveState({value:S(e),context:{node:{...e}}});T(m,n,t,e.type,e.status);let[r]=(0,i.transition)(m,n,t),s=r.context.node;return O(e.type,e.status,s.status),s}function _(e,t){let n=g.resolveState({value:S(e),context:{node:{...e}}});T(g,n,t,e.type,e.status);let[r]=(0,i.transition)(g,n,t),s=r.context.node;return O(e.type,e.status,s.status),s}function N(e,t){let n="EVALUATE"===t.type?t.dependencies:[],r=y.resolveState({value:S(e),context:{node:{...e},dependencies:[...n]}});T(y,r,t,e.type,e.status);let[s]=(0,i.transition)(y,r,t),a=s.context.node;return O(e.type,e.status,a.status),a}function A(e,t){let n=v.resolveState({value:S(e),context:{node:{...e}}});T(v,n,t,e.type,e.status);let[r]=(0,i.transition)(v,n,t),s=r.context.node;return O(e.type,e.status,s.status),{node:s,..."done"!==s.status?{enabledBranchNodeIds:[],skippedBranchNodeIds:[]}:"then"===s.evaluatedTo?{enabledBranchNodeIds:[...s.thenBranch],skippedBranchNodeIds:[...s.elseBranch]}:"else"===s.evaluatedTo?{enabledBranchNodeIds:[...s.elseBranch],skippedBranchNodeIds:[...s.thenBranch]}:{enabledBranchNodeIds:[],skippedBranchNodeIds:[]}}}function x(e,t){let n=E.resolveState({value:S(e),context:{node:{...e}}});T(E,n,t,e.type,e.status);let[r]=(0,i.transition)(E,n,t),s=r.context.node;return O(e.type,e.status,s.status),s}e.s(["transitionConditionalNode",()=>A,"transitionForkNode",()=>_,"transitionFunctionNode",()=>x,"transitionGateNode",()=>I,"transitionJoinNode",()=>N,"transitionWorkNode",()=>k],66890);var w=e.i(71435);function b(e,t){try{return w.CronExpressionParser.parse(e,{currentDate:t}).next().toDate().getTime()}catch{return}}let R=new Set(t.SOFT_DEP_SATISFIED_STATUSES),C=new Set(t.SUCCESS_NODE_STATUSES),L=new Set(t.FAILURE_NODE_STATUSES),M=new Set(t.TERMINAL_NODE_STATUSES),D=new Set(t.INCOMPLETE_FOR_DONE_STATUSES),P=new Set(["done","passed","skipped"]);function U(e,t,n){return e.edges.find(e=>e.from===t&&e.to===n)}function F(e,t,n){let r=e.nodes[t];if(!r)return!1;let i=U(e,t,n)??{from:t,to:n,type:"hard",condition:"on_success"};return"soft"===i.type?R.has(r.status):(i.condition??"on_success")==="on_success"?C.has(r.status):"on_failure"===i.condition?L.has(r.status):M.has(r.status)}function $(e,t,n){return n.every(n=>F(e,n,t))}function j(e){let t=new Map;for(let n of e.edges){if("hard"!==n.type)continue;let e=t.get(n.from);e?e.push(n.to):t.set(n.from,[n.to])}return t}function V(e,t){let n=new Set,r=[...t];for(;r.length>0;){let t=r.shift();if(!(!t||n.has(t)))for(let i of(n.add(t),e.get(t)??[]))n.has(i)||r.push(i)}return n}function W(e,t={}){let r=structuredClone(e),i=function(e,t={}){let r=[],i=[],s=[],a=[],o=t.conditionContextByNodeId??{};for(let[t,n]of Object.entries(e.nodes)){if("fork"!==n.type||"pending"!==n.status||!$(e,t,n.deps))continue;let i=_(n,{type:"ACTIVATE",depsSatisfied:!0});i.status!==n.status&&(e.nodes[t]=i,r.push(t))}for(let[t,r]of Object.entries(e.nodes)){if("conditional"!==r.type||"pending"!==r.status||!$(e,t,r.deps))continue;let s=A(r,{type:"START",depsSatisfied:!0}).node;try{var l;let u=function(e,t,n,r){let i=e.nodes[n.condition.inputFrom],s=i&&"output"in i?i.output??null:null;return{graph:e,nodeId:t,inputFrom:n.condition.inputFrom,input:s,ctx:{graph:e,nodeId:t,inputFrom:n.condition.inputFrom,input:s},...r[t]??{}}}(e,t,r,o),c=!!((l=u.input)&&"object"==typeof l&&!Array.isArray(l))&&(0,n.evaluateCondition)(r.condition.expression,u),h=A(s,{type:c?"CONDITION_TRUE":"CONDITION_FALSE"});e.nodes[t]=h.node,i.push(t);let d=function(e,t,n){if(0===n.length)return[];let r=j(e),i=V(r,t),s=V(r,n),a=[];for(let t of Object.keys(e.nodes)){if(!s.has(t)||i.has(t))continue;let n=e.nodes[t],r="pending"!==n.status?n:"work"===n.type?k(n,{type:"SKIP"}):"function"===n.type?x(n,{type:"SKIP"}):"gate"===n.type?I(n,{type:"SKIP"}):"fork"===n.type?_(n,{type:"SKIP"}):"join"===n.type?N(n,{type:"SKIP"}):"conditional"===n.type?A(n,{type:"SKIP"}).node:n;r.status!==n.status&&(e.nodes[t]=r,a.push(t))}return a}(e,h.enabledBranchNodeIds,h.skippedBranchNodeIds);a.push(...d)}catch{let n=A(s,{type:"CONDITION_ERROR"}).node;e.nodes[t]=n,i.push(t)}}for(let[t,n]of Object.entries(e.nodes)){if("join"!==n.type||"pending"!==n.status&&"running"!==n.status)continue;let r=n.deps.map(n=>{let r=e.nodes[n],i=U(e,n,t);return{nodeId:n,status:r?.status??"failed",edgeType:i?.type??"hard"}}),i=N(n,{type:"EVALUATE",dependencies:r});i.status!==n.status&&(e.nodes[t]=i,s.push(t))}return{forkNodeIds:r,conditionalNodeIds:i,joinNodeIds:s,skippedByConditionalNodeIds:a}}(r,t),s=function(e){let t=[],n=[],r=[],i=[];for(let[s,a]of Object.entries(e.nodes))if(("work"===a.type||"gate"===a.type||"function"===a.type)&&"pending"===a.status&&$(e,s,a.deps)){if("function"===a.type){n.push(s);continue}if("work"===a.type){t.push(s);continue}"human"===a.verificationStrategy.type?r.push(s):i.push(s)}return{workRunnable:t,functionRunnable:n,lightweightGateRunnable:r,autoGateRunnable:i}}(r),a=Math.max(0,r.policy.maxConcurrent-Object.values(r.nodes).filter(e=>"work"===e.type&&"running"===e.status).length),o=Math.max(0,r.policy.maxConcurrentAutoChecks-Object.values(r.nodes).filter(e=>"gate"===e.type&&"running"===e.status&&"human"!==e.verificationStrategy.type).length),l=(function(e,t){let n=[...t];if("fifo"===e.policy.priorityMode)return n;let r=new Map;if(t.forEach((e,t)=>{r.set(e,t)}),"shortest_first"===e.policy.priorityMode)return n.sort((t,n)=>{let i=e.nodes[t]?.estimateMinutes??1/0,s=e.nodes[n]?.estimateMinutes??1/0;return i!==s?i-s:(r.get(t)??0)-(r.get(n)??0)}),n;let i=function(e){let t=new Map,n=new Set,r=j(e),i=s=>{let a=t.get(s);if(void 0!==a)return a;if(n.has(s))return 0;n.add(s);let o=e.nodes[s];if(!o)return n.delete(s),t.set(s,0),0;let l=Math.max(1,o.estimateMinutes??1),u=r.get(s)??[],c=l+(0===u.length?0:Math.max(...u.map(i)));return t.set(s,c),n.delete(s),c};for(let t of Object.keys(e.nodes))i(t);return t}(e);return n.sort((e,t)=>{let n=i.get(e)??0,s=i.get(t)??0;return n!==s?s-n:(r.get(e)??0)-(r.get(t)??0)}),n})(r,s.workRunnable).slice(0,a),u=[...s.functionRunnable],c=[...s.lightweightGateRunnable],h=s.autoGateRunnable.slice(0,o),d=[...u,...c,...h,...l];return{graph:r,control:i,...s,workToRun:l,functionToRun:u,lightweightGatesToRun:c,autoGatesToRun:h,dispatchOrder:d,complete:function(e){if(e.doneCriteria.allRequiredGatesPassed&&Object.values(e.nodes).filter(e=>"gate"===e.type&&e.required).some(e=>"passed"!==e.status&&"skipped"!==e.status)||e.doneCriteria.noRunnableOrPendingWork&&Object.values(e.nodes).some(e=>D.has(e.status)))return!1;if(e.doneCriteria.completionSinkNodeIds?.length)for(let t of e.doneCriteria.completionSinkNodeIds){let n=e.nodes[t];if(!n||!P.has(n.status))return!1}if(e.doneCriteria.customCriteria?.length)for(let t of e.doneCriteria.customCriteria)try{if(!(0,n.evaluateCondition)(t,{graph:e}))return!1}catch{return!1}return!0}(r)}}e.s(["computeNextTickFromCron",()=>b,"isDepSatisfied",()=>F,"schedulerTick",()=>W],42873)}];
58
-
59
- //# sourceMappingURL=_6519418b._.js.map