@hotmeshio/long-tail 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/dashboard/dist/assets/{AdminDashboard-DQS74RL0.js → AdminDashboard-D7Amh-EJ.js} +2 -2
  2. package/dashboard/dist/assets/{AdminDashboard-DQS74RL0.js.map → AdminDashboard-D7Amh-EJ.js.map} +1 -1
  3. package/dashboard/dist/assets/{AgentConfigPage-CSMCrFR4.js → AgentConfigPage-CW2udbSO.js} +2 -2
  4. package/dashboard/dist/assets/{AgentConfigPage-CSMCrFR4.js.map → AgentConfigPage-CW2udbSO.js.map} +1 -1
  5. package/dashboard/dist/assets/{AgentDetailPage-CDiopQ7D.js → AgentDetailPage-Dy3Qvlfk.js} +2 -2
  6. package/dashboard/dist/assets/{AgentDetailPage-CDiopQ7D.js.map → AgentDetailPage-Dy3Qvlfk.js.map} +1 -1
  7. package/dashboard/dist/assets/{AgentsPage-CyUXe9n4.js → AgentsPage-D7WePZ0o.js} +2 -2
  8. package/dashboard/dist/assets/{AgentsPage-CyUXe9n4.js.map → AgentsPage-D7WePZ0o.js.map} +1 -1
  9. package/dashboard/dist/assets/{AvailableEscalationsPage-AiuiLcz-.js → AvailableEscalationsPage-Dx51E6s_.js} +2 -2
  10. package/dashboard/dist/assets/{AvailableEscalationsPage-AiuiLcz-.js.map → AvailableEscalationsPage-Dx51E6s_.js.map} +1 -1
  11. package/dashboard/dist/assets/{BotPicker-BuCGvEed.js → BotPicker-KebTxTDi.js} +2 -2
  12. package/dashboard/dist/assets/{BotPicker-BuCGvEed.js.map → BotPicker-KebTxTDi.js.map} +1 -1
  13. package/dashboard/dist/assets/{CapabilitiesPage-nTv4STcG.js → CapabilitiesPage-3VTLEPGO.js} +2 -2
  14. package/dashboard/dist/assets/{CapabilitiesPage-nTv4STcG.js.map → CapabilitiesPage-3VTLEPGO.js.map} +1 -1
  15. package/dashboard/dist/assets/{CollapsibleSection-CkOks9Cf.js → CollapsibleSection-BYgeZz9M.js} +2 -2
  16. package/dashboard/dist/assets/{CollapsibleSection-CkOks9Cf.js.map → CollapsibleSection-BYgeZz9M.js.map} +1 -1
  17. package/dashboard/dist/assets/{CountdownTimer-DdKL8Ryt.js → CountdownTimer-DFqEYmiF.js} +2 -2
  18. package/dashboard/dist/assets/{CountdownTimer-DdKL8Ryt.js.map → CountdownTimer-DFqEYmiF.js.map} +1 -1
  19. package/dashboard/dist/assets/{CredentialsPage-BwA7k9Cb.js → CredentialsPage-CaH3J3SE.js} +2 -2
  20. package/dashboard/dist/assets/{CredentialsPage-BwA7k9Cb.js.map → CredentialsPage-CaH3J3SE.js.map} +1 -1
  21. package/dashboard/dist/assets/{CronLabel-jC_i-Lh9.js → CronLabel-Bma_4AC2.js} +2 -2
  22. package/dashboard/dist/assets/{CronLabel-jC_i-Lh9.js.map → CronLabel-Bma_4AC2.js.map} +1 -1
  23. package/dashboard/dist/assets/{CustomDurationPicker-F6bR2Q5A.js → CustomDurationPicker-BxyjEX27.js} +2 -2
  24. package/dashboard/dist/assets/{CustomDurationPicker-F6bR2Q5A.js.map → CustomDurationPicker-BxyjEX27.js.map} +1 -1
  25. package/dashboard/dist/assets/{ElapsedCell-DZ3RTZFc.js → ElapsedCell-Dr1cEwoi.js} +2 -2
  26. package/dashboard/dist/assets/{ElapsedCell-DZ3RTZFc.js.map → ElapsedCell-Dr1cEwoi.js.map} +1 -1
  27. package/dashboard/dist/assets/{EscalationListSchemaPage-CaMydHIO.js → EscalationListSchemaPage-CLdsR-hK.js} +2 -2
  28. package/dashboard/dist/assets/{EscalationListSchemaPage-CaMydHIO.js.map → EscalationListSchemaPage-CLdsR-hK.js.map} +1 -1
  29. package/dashboard/dist/assets/{EscalationSchemaPage-BlMx2WE6.js → EscalationSchemaPage-DnEnvolM.js} +2 -2
  30. package/dashboard/dist/assets/{EscalationSchemaPage-BlMx2WE6.js.map → EscalationSchemaPage-DnEnvolM.js.map} +1 -1
  31. package/dashboard/dist/assets/{EscalationsOverview-DcMkbiSo.js → EscalationsOverview-BH8cxgLI.js} +2 -2
  32. package/dashboard/dist/assets/{EscalationsOverview-DcMkbiSo.js.map → EscalationsOverview-BH8cxgLI.js.map} +1 -1
  33. package/dashboard/dist/assets/{EventTable-CuZ2Q_wH.js → EventTable-p-xsfYYg.js} +2 -2
  34. package/dashboard/dist/assets/{EventTable-CuZ2Q_wH.js.map → EventTable-p-xsfYYg.js.map} +1 -1
  35. package/dashboard/dist/assets/{GraphInvokePage-CXElQqcV.js → GraphInvokePage-Cf9c_LJ-.js} +2 -2
  36. package/dashboard/dist/assets/{GraphInvokePage-CXElQqcV.js.map → GraphInvokePage-Cf9c_LJ-.js.map} +1 -1
  37. package/dashboard/dist/assets/{HomePage-DcWfjZA-.js → HomePage-BdCtKXAV.js} +2 -2
  38. package/dashboard/dist/assets/{HomePage-DcWfjZA-.js.map → HomePage-BdCtKXAV.js.map} +1 -1
  39. package/dashboard/dist/assets/{ListToolbar-Dmd1UiM-.js → ListToolbar-CDlol8XJ.js} +2 -2
  40. package/dashboard/dist/assets/{ListToolbar-Dmd1UiM-.js.map → ListToolbar-CDlol8XJ.js.map} +1 -1
  41. package/dashboard/dist/assets/{McpOverview-Cul2LFEw.js → McpOverview-ChZ36p9t.js} +2 -2
  42. package/dashboard/dist/assets/{McpOverview-Cul2LFEw.js.map → McpOverview-ChZ36p9t.js.map} +1 -1
  43. package/dashboard/dist/assets/{McpQueryDetailPage-BVlQ0WBa.js → McpQueryDetailPage-X4j_jm3r.js} +2 -2
  44. package/dashboard/dist/assets/{McpQueryDetailPage-BVlQ0WBa.js.map → McpQueryDetailPage-X4j_jm3r.js.map} +1 -1
  45. package/dashboard/dist/assets/{McpQueryPage-B7PmO_V-.js → McpQueryPage-C30HsQfZ.js} +2 -2
  46. package/dashboard/dist/assets/{McpQueryPage-B7PmO_V-.js.map → McpQueryPage-C30HsQfZ.js.map} +1 -1
  47. package/dashboard/dist/assets/{McpRunDetailPage-B1RhxxlU.js → McpRunDetailPage-18d7Iqfy.js} +2 -2
  48. package/dashboard/dist/assets/{McpRunDetailPage-B1RhxxlU.js.map → McpRunDetailPage-18d7Iqfy.js.map} +1 -1
  49. package/dashboard/dist/assets/{McpRunsPage-DlSrpxiv.js → McpRunsPage-BHZHCwMM.js} +2 -2
  50. package/dashboard/dist/assets/{McpRunsPage-DlSrpxiv.js.map → McpRunsPage-BHZHCwMM.js.map} +1 -1
  51. package/dashboard/dist/assets/{OperationsPage-vm_ByX41.js → OperationsPage-GMojwL3q.js} +2 -2
  52. package/dashboard/dist/assets/{OperationsPage-vm_ByX41.js.map → OperationsPage-GMojwL3q.js.map} +1 -1
  53. package/dashboard/dist/assets/{OperatorDashboard-zviIxH-0.js → OperatorDashboard-BGJrxLMU.js} +2 -2
  54. package/dashboard/dist/assets/{OperatorDashboard-zviIxH-0.js.map → OperatorDashboard-BGJrxLMU.js.map} +1 -1
  55. package/dashboard/dist/assets/{ProcessDetailPage-txiMHbMI.js → ProcessDetailPage-Bcp3GKFo.js} +2 -2
  56. package/dashboard/dist/assets/{ProcessDetailPage-txiMHbMI.js.map → ProcessDetailPage-Bcp3GKFo.js.map} +1 -1
  57. package/dashboard/dist/assets/{ProcessesListPage-CRttlU3L.js → ProcessesListPage-DPrvuLoU.js} +2 -2
  58. package/dashboard/dist/assets/{ProcessesListPage-CRttlU3L.js.map → ProcessesListPage-DPrvuLoU.js.map} +1 -1
  59. package/dashboard/dist/assets/{RoleDetailPage-DBIl_mhK.js → RoleDetailPage-Ws3umQKQ.js} +2 -2
  60. package/dashboard/dist/assets/{RoleDetailPage-DBIl_mhK.js.map → RoleDetailPage-Ws3umQKQ.js.map} +1 -1
  61. package/dashboard/dist/assets/{RolesPage-DzrSv6m-.js → RolesPage-D3NNU92h.js} +2 -2
  62. package/dashboard/dist/assets/{RolesPage-DzrSv6m-.js.map → RolesPage-D3NNU92h.js.map} +1 -1
  63. package/dashboard/dist/assets/{RunAsSelector-CiLjlmIE.js → RunAsSelector-Z2Yunqdf.js} +2 -2
  64. package/dashboard/dist/assets/{RunAsSelector-CiLjlmIE.js.map → RunAsSelector-Z2Yunqdf.js.map} +1 -1
  65. package/dashboard/dist/assets/{StickyPagination-Di6b2GDE.js → StickyPagination-CeLsnCIS.js} +2 -2
  66. package/dashboard/dist/assets/{StickyPagination-Di6b2GDE.js.map → StickyPagination-CeLsnCIS.js.map} +1 -1
  67. package/dashboard/dist/assets/{StreamMessageDetail-BbkU45X_.js → StreamMessageDetail-DWs7XkmH.js} +2 -2
  68. package/dashboard/dist/assets/{StreamMessageDetail-BbkU45X_.js.map → StreamMessageDetail-DWs7XkmH.js.map} +1 -1
  69. package/dashboard/dist/assets/{SwimlaneTimeline-BzsvdstG.js → SwimlaneTimeline-Dxl9a51q.js} +2 -2
  70. package/dashboard/dist/assets/{SwimlaneTimeline-BzsvdstG.js.map → SwimlaneTimeline-Dxl9a51q.js.map} +1 -1
  71. package/dashboard/dist/assets/{TaskDetailPage-Biikk9o_.js → TaskDetailPage-DVr31zDE.js} +2 -2
  72. package/dashboard/dist/assets/{TaskDetailPage-Biikk9o_.js.map → TaskDetailPage-DVr31zDE.js.map} +1 -1
  73. package/dashboard/dist/assets/{TasksListPage-t9WAft9-.js → TasksListPage-DNGp5lfi.js} +2 -2
  74. package/dashboard/dist/assets/{TasksListPage-t9WAft9-.js.map → TasksListPage-DNGp5lfi.js.map} +1 -1
  75. package/dashboard/dist/assets/{TimeAgo-I7X6jdne.js → TimeAgo-j2Q4w4lY.js} +2 -2
  76. package/dashboard/dist/assets/{TimeAgo-I7X6jdne.js.map → TimeAgo-j2Q4w4lY.js.map} +1 -1
  77. package/dashboard/dist/assets/{TimestampCell-Cex9nr0t.js → TimestampCell-BLEfob2C.js} +2 -2
  78. package/dashboard/dist/assets/{TimestampCell-Cex9nr0t.js.map → TimestampCell-BLEfob2C.js.map} +1 -1
  79. package/dashboard/dist/assets/{ToolTestPanel--MGaDY-1.js → ToolTestPanel-ZJZT_mDP.js} +2 -2
  80. package/dashboard/dist/assets/{ToolTestPanel--MGaDY-1.js.map → ToolTestPanel-ZJZT_mDP.js.map} +1 -1
  81. package/dashboard/dist/assets/{TopicDetailPage-B8pHHweA.js → TopicDetailPage-ynUkO1A8.js} +2 -2
  82. package/dashboard/dist/assets/{TopicDetailPage-B8pHHweA.js.map → TopicDetailPage-ynUkO1A8.js.map} +1 -1
  83. package/dashboard/dist/assets/{TopicsPage-tiOEQz2m.js → TopicsPage-Ctb_85Tw.js} +2 -2
  84. package/dashboard/dist/assets/{TopicsPage-tiOEQz2m.js.map → TopicsPage-Ctb_85Tw.js.map} +1 -1
  85. package/dashboard/dist/assets/{UserName-Cdhyuv5K.js → UserName-CkFpUqVK.js} +2 -2
  86. package/dashboard/dist/assets/{UserName-Cdhyuv5K.js.map → UserName-CkFpUqVK.js.map} +1 -1
  87. package/dashboard/dist/assets/{WorkflowExecutionPage-DD1BKj5k.js → WorkflowExecutionPage-CSw2aQJC.js} +2 -2
  88. package/dashboard/dist/assets/{WorkflowExecutionPage-DD1BKj5k.js.map → WorkflowExecutionPage-CSw2aQJC.js.map} +1 -1
  89. package/dashboard/dist/assets/{WorkflowsDashboard-BeWjDHYW.js → WorkflowsDashboard-DOyZbqzf.js} +2 -2
  90. package/dashboard/dist/assets/{WorkflowsDashboard-BeWjDHYW.js.map → WorkflowsDashboard-DOyZbqzf.js.map} +1 -1
  91. package/dashboard/dist/assets/{WorkflowsOverview-CkI-Pmj7.js → WorkflowsOverview-CRyHvUBx.js} +2 -2
  92. package/dashboard/dist/assets/{WorkflowsOverview-CkI-Pmj7.js.map → WorkflowsOverview-CRyHvUBx.js.map} +1 -1
  93. package/dashboard/dist/assets/{YamlWorkflowDetailPage-BQnO8-PQ.js → YamlWorkflowDetailPage-DRBmQXY6.js} +2 -2
  94. package/dashboard/dist/assets/{YamlWorkflowDetailPage-BQnO8-PQ.js.map → YamlWorkflowDetailPage-DRBmQXY6.js.map} +1 -1
  95. package/dashboard/dist/assets/{YamlWorkflowsPage-DjmNTQ5r.js → YamlWorkflowsPage-HnI-9eBW.js} +2 -2
  96. package/dashboard/dist/assets/{YamlWorkflowsPage-DjmNTQ5r.js.map → YamlWorkflowsPage-HnI-9eBW.js.map} +1 -1
  97. package/dashboard/dist/assets/{agents-2DaoprdB.js → agents-BA2CvQO9.js} +2 -2
  98. package/dashboard/dist/assets/{agents-2DaoprdB.js.map → agents-BA2CvQO9.js.map} +1 -1
  99. package/dashboard/dist/assets/{bots-BdwLwMUg.js → bots-DHHnoo8x.js} +2 -2
  100. package/dashboard/dist/assets/{bots-BdwLwMUg.js.map → bots-DHHnoo8x.js.map} +1 -1
  101. package/dashboard/dist/assets/{capabilities-BsuFeK9J.js → capabilities-BYBKLRRI.js} +2 -2
  102. package/dashboard/dist/assets/{capabilities-BsuFeK9J.js.map → capabilities-BYBKLRRI.js.map} +1 -1
  103. package/dashboard/dist/assets/{controlplane-CxKOrcFO.js → controlplane-H0Ljhb-1.js} +2 -2
  104. package/dashboard/dist/assets/{controlplane-CxKOrcFO.js.map → controlplane-H0Ljhb-1.js.map} +1 -1
  105. package/dashboard/dist/assets/{escalation-columns-y5SQ2Ulh.js → escalation-columns-BV3Ztn7D.js} +2 -2
  106. package/dashboard/dist/assets/{escalation-columns-y5SQ2Ulh.js.map → escalation-columns-BV3Ztn7D.js.map} +1 -1
  107. package/dashboard/dist/assets/{index-H6Vp-gPG.js → index-B4FaugP1.js} +2 -2
  108. package/dashboard/dist/assets/{index-H6Vp-gPG.js.map → index-B4FaugP1.js.map} +1 -1
  109. package/dashboard/dist/assets/{index-DJ5nhcGB.js → index-BI-9M7z3.js} +2 -2
  110. package/dashboard/dist/assets/{index-DJ5nhcGB.js.map → index-BI-9M7z3.js.map} +1 -1
  111. package/dashboard/dist/assets/{index-BYEkfaUq.js → index-BXrm76Hm.js} +2 -2
  112. package/dashboard/dist/assets/{index-BYEkfaUq.js.map → index-BXrm76Hm.js.map} +1 -1
  113. package/dashboard/dist/assets/index-BeFjLCIQ.js +5 -0
  114. package/dashboard/dist/assets/index-BeFjLCIQ.js.map +1 -0
  115. package/dashboard/dist/assets/{index-BeivyVtT.css → index-BrEcQQ1p.css} +1 -1
  116. package/dashboard/dist/assets/{index-Cfq3UKd8.js → index-CP6D_Gtw.js} +2 -2
  117. package/dashboard/dist/assets/{index-Cfq3UKd8.js.map → index-CP6D_Gtw.js.map} +1 -1
  118. package/dashboard/dist/assets/{index-BC1NxetR.js → index-CVMA5PVQ.js} +2 -2
  119. package/dashboard/dist/assets/{index-BC1NxetR.js.map → index-CVMA5PVQ.js.map} +1 -1
  120. package/dashboard/dist/assets/{index-BXbt5NHG.js → index-CWkAN6wc.js} +2 -2
  121. package/dashboard/dist/assets/{index-BXbt5NHG.js.map → index-CWkAN6wc.js.map} +1 -1
  122. package/dashboard/dist/assets/{index-BVZINC_p.js → index-D1Q8WfGN.js} +2 -2
  123. package/dashboard/dist/assets/{index-BVZINC_p.js.map → index-D1Q8WfGN.js.map} +1 -1
  124. package/dashboard/dist/assets/{index-CRBXgMsh.js → index-DSjih1iX.js} +2 -2
  125. package/dashboard/dist/assets/{index-CRBXgMsh.js.map → index-DSjih1iX.js.map} +1 -1
  126. package/dashboard/dist/assets/{index-DyS2DHqy.js → index-Dx6-4esw.js} +2 -2
  127. package/dashboard/dist/assets/{index-DyS2DHqy.js.map → index-Dx6-4esw.js.map} +1 -1
  128. package/dashboard/dist/assets/{index-DjI2AUbn.js → index-O2wWcCLo.js} +2 -2
  129. package/dashboard/dist/assets/{index-DjI2AUbn.js.map → index-O2wWcCLo.js.map} +1 -1
  130. package/dashboard/dist/assets/{index-DVLBkcoD.js → index-YWvrMcqh.js} +2 -2
  131. package/dashboard/dist/assets/{index-DVLBkcoD.js.map → index-YWvrMcqh.js.map} +1 -1
  132. package/dashboard/dist/assets/{index-YPLTjeli.js → index-iX8HLLB9.js} +3 -3
  133. package/dashboard/dist/assets/{index-YPLTjeli.js.map → index-iX8HLLB9.js.map} +1 -1
  134. package/dashboard/dist/assets/{knowledge-CLnYcq0Y.js → knowledge-BVbElRHf.js} +2 -2
  135. package/dashboard/dist/assets/{knowledge-CLnYcq0Y.js.map → knowledge-BVbElRHf.js.map} +1 -1
  136. package/dashboard/dist/assets/{mcp-C1-iXkg7.js → mcp-CstDdowJ.js} +2 -2
  137. package/dashboard/dist/assets/{mcp-C1-iXkg7.js.map → mcp-CstDdowJ.js.map} +1 -1
  138. package/dashboard/dist/assets/{mcp-query-DcyDxuGY.js → mcp-query-DHUs0N8H.js} +2 -2
  139. package/dashboard/dist/assets/{mcp-query-DcyDxuGY.js.map → mcp-query-DHUs0N8H.js.map} +1 -1
  140. package/dashboard/dist/assets/{pipelines-BvG5D6bV.js → pipelines-BDmAzE3U.js} +2 -2
  141. package/dashboard/dist/assets/{pipelines-BvG5D6bV.js.map → pipelines-BDmAzE3U.js.map} +1 -1
  142. package/dashboard/dist/assets/{tasks-qwh8q5q7.js → tasks--qZocuG-.js} +2 -2
  143. package/dashboard/dist/assets/{tasks-qwh8q5q7.js.map → tasks--qZocuG-.js.map} +1 -1
  144. package/dashboard/dist/assets/{topics-MLKKA-Ql.js → topics-P3jkjMsx.js} +2 -2
  145. package/dashboard/dist/assets/{topics-MLKKA-Ql.js.map → topics-P3jkjMsx.js.map} +1 -1
  146. package/dashboard/dist/assets/{useEventHooks-B8uNFB-l.js → useEventHooks-CqH8Pasj.js} +2 -2
  147. package/dashboard/dist/assets/{useEventHooks-B8uNFB-l.js.map → useEventHooks-CqH8Pasj.js.map} +1 -1
  148. package/dashboard/dist/assets/{useNamespace-DjZmztJM.js → useNamespace-aI3tPfo3.js} +2 -2
  149. package/dashboard/dist/assets/{useNamespace-DjZmztJM.js.map → useNamespace-aI3tPfo3.js.map} +1 -1
  150. package/dashboard/dist/assets/{useYamlActivityEvents-DIvK20uI.js → useYamlActivityEvents-CPVyuW8i.js} +2 -2
  151. package/dashboard/dist/assets/{useYamlActivityEvents-DIvK20uI.js.map → useYamlActivityEvents-CPVyuW8i.js.map} +1 -1
  152. package/dashboard/dist/assets/{users-CVjajeDg.js → users-BrcmIH7O.js} +2 -2
  153. package/dashboard/dist/assets/{users-CVjajeDg.js.map → users-BrcmIH7O.js.map} +1 -1
  154. package/dashboard/dist/assets/{workflows-BziTcJNq.js → workflows-DPhX5L5C.js} +2 -2
  155. package/dashboard/dist/assets/{workflows-BziTcJNq.js.map → workflows-DPhX5L5C.js.map} +1 -1
  156. package/dashboard/dist/assets/{yaml-workflows-Dr-ZcE_0.js → yaml-workflows-KZI2cufF.js} +2 -2
  157. package/dashboard/dist/assets/{yaml-workflows-Dr-ZcE_0.js.map → yaml-workflows-KZI2cufF.js.map} +1 -1
  158. package/dashboard/dist/index.html +2 -2
  159. package/docs/hitl/x-lt-validation.md +27 -0
  160. package/docs/hitl/x-lt-widget.md +11 -1
  161. package/docs/hitl-guide.md +1 -0
  162. package/package.json +1 -1
  163. package/dashboard/dist/assets/index-B_68lp-B.js +0 -5
  164. package/dashboard/dist/assets/index-B_68lp-B.js.map +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProcessesListPage-CRttlU3L.js","./vendor-query-B2UbickB.js","./tasks-qwh8q5q7.js","./workflows-BziTcJNq.js","./useEventHooks-B8uNFB-l.js","./useFilterParams-x-Dg0Vgz.js","./vendor-react-CXumBFUA.js","./useDebouncedValue-BA5S7V54.js","./api-path-u2Jf9QXS.js","./DataTable-Byn3oyT9.js","./EmptyState-BcsfPq9T.js","./TimestampCell-Cex9nr0t.js","./StickyPagination-Di6b2GDE.js","./FilterBar-B5Vk5tBF.js","./PageHeader-BIY1YvKR.js","./vendor-icons-Qk9qLjF_.js","./ListToolbar-Dmd1UiM-.js","./WorkflowPill-DHxrAkp3.js","./ProcessDetailPage-txiMHbMI.js","./PageHeaderWithStats-TUyglVW0.js","./StatusBadge-CEQMRmSQ.js","./RolePill-4LO_CuO3.js","./UserName-Cdhyuv5K.js","./users-CVjajeDg.js","./McpOverview-Cul2LFEw.js","./mcp-C1-iXkg7.js","./pipelines-BvG5D6bV.js","./yaml-workflows-Dr-ZcE_0.js","./controlplane-CxKOrcFO.js","./StatCard-DrdlUeQz.js","./McpRunsPage-DlSrpxiv.js","./useNamespace-DjZmztJM.js","./ElapsedCell-DZ3RTZFc.js","./RowActions-BA9L9djf.js","./McpRunDetailPage-B1RhxxlU.js","./CopyableId-uot2mE_g.js","./CollapsibleSection-CkOks9Cf.js","./EventTable-CuZ2Q_wH.js","./SwimlaneTimeline-BzsvdstG.js","./StreamMessageDetail-BbkU45X_.js","./McpQueryPage-B7PmO_V-.js","./mcp-query-DcyDxuGY.js","./McpQueryDetailPage-BVlQ0WBa.js","./TagInput-CK-JhBG2.js","./useYamlActivityEvents-DIvK20uI.js","./helpers-DzO-OGPe.js","./RunAsSelector-CiLjlmIE.js","./BotPicker-BuCGvEed.js","./bots-BdwLwMUg.js","./ToolPill-BCi101Jh.js","./TimeAgo-I7X6jdne.js","./EscalationsOverview-DcMkbiSo.js","./AvailableEscalationsPage-AiuiLcz-.js","./CountdownTimer-DdKL8Ryt.js","./CustomDurationPicker-F6bR2Q5A.js","./Modal-D4afnAjc.js","./constants-BHkpVaqx.js","./escalation-columns-y5SQ2Ulh.js","./PriorityBadge-B4ykBH7f.js","./OperatorDashboard-zviIxH-0.js","./index-B_68lp-B.js","./SlidePanel-DK4sWXmp.js","./WorkflowsOverview-CkI-Pmj7.js","./index-DVLBkcoD.js","./NamespacePill-BQNMfY0m.js","./WorkflowsDashboard-BeWjDHYW.js","./YamlWorkflowsPage-DjmNTQ5r.js","./GraphInvokePage-CXElQqcV.js","./YamlWorkflowDetailPage-BQnO8-PQ.js","./TasksListPage-t9WAft9-.js","./TaskDetailPage-Biikk9o_.js","./WorkflowExecutionPage-DD1BKj5k.js","./AdminDashboard-DQS74RL0.js","./index-BVZINC_p.js","./TaskQueuePill-C_Vo2Clc.js","./index-DjI2AUbn.js","./ConfirmDeleteModal-C0x0HcHX.js","./index-BYEkfaUq.js","./ToolTestPanel--MGaDY-1.js","./index-CRBXgMsh.js","./index-BC1NxetR.js","./RolesPage-DzrSv6m-.js","./RoleDetailPage-DBIl_mhK.js","./EscalationSchemaPage-BlMx2WE6.js","./EscalationListSchemaPage-CaMydHIO.js","./index-DyS2DHqy.js","./OperationsPage-vm_ByX41.js","./index-DJ5nhcGB.js","./index-Cfq3UKd8.js","./CredentialsPage-BwA7k9Cb.js","./index-H6Vp-gPG.js","./DropZone-zxH-9B8c.js","./index-BXbt5NHG.js","./knowledge-CLnYcq0Y.js","./HomePage-DcWfjZA-.js","./AgentsPage-CyUXe9n4.js","./agents-2DaoprdB.js","./AgentDetailPage-CDiopQ7D.js","./CronLabel-jC_i-Lh9.js","./AgentConfigPage-CSMCrFR4.js","./capabilities-BsuFeK9J.js","./topics-MLKKA-Ql.js","./CapabilitiesPage-nTv4STcG.js","./TopicsPage-tiOEQz2m.js","./TopicDetailPage-B8pHHweA.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProcessesListPage-DPrvuLoU.js","./vendor-query-B2UbickB.js","./tasks--qZocuG-.js","./workflows-DPhX5L5C.js","./useEventHooks-CqH8Pasj.js","./useFilterParams-x-Dg0Vgz.js","./vendor-react-CXumBFUA.js","./useDebouncedValue-BA5S7V54.js","./api-path-u2Jf9QXS.js","./DataTable-Byn3oyT9.js","./EmptyState-BcsfPq9T.js","./TimestampCell-BLEfob2C.js","./StickyPagination-CeLsnCIS.js","./FilterBar-B5Vk5tBF.js","./PageHeader-BIY1YvKR.js","./vendor-icons-Qk9qLjF_.js","./ListToolbar-CDlol8XJ.js","./WorkflowPill-DHxrAkp3.js","./ProcessDetailPage-Bcp3GKFo.js","./PageHeaderWithStats-TUyglVW0.js","./StatusBadge-CEQMRmSQ.js","./RolePill-4LO_CuO3.js","./UserName-CkFpUqVK.js","./users-BrcmIH7O.js","./McpOverview-ChZ36p9t.js","./mcp-CstDdowJ.js","./pipelines-BDmAzE3U.js","./yaml-workflows-KZI2cufF.js","./controlplane-H0Ljhb-1.js","./StatCard-DrdlUeQz.js","./McpRunsPage-BHZHCwMM.js","./useNamespace-aI3tPfo3.js","./ElapsedCell-Dr1cEwoi.js","./RowActions-BA9L9djf.js","./McpRunDetailPage-18d7Iqfy.js","./CopyableId-uot2mE_g.js","./CollapsibleSection-BYgeZz9M.js","./EventTable-p-xsfYYg.js","./SwimlaneTimeline-Dxl9a51q.js","./StreamMessageDetail-DWs7XkmH.js","./McpQueryPage-C30HsQfZ.js","./mcp-query-DHUs0N8H.js","./McpQueryDetailPage-X4j_jm3r.js","./TagInput-CK-JhBG2.js","./useYamlActivityEvents-CPVyuW8i.js","./helpers-DzO-OGPe.js","./RunAsSelector-Z2Yunqdf.js","./BotPicker-KebTxTDi.js","./bots-DHHnoo8x.js","./ToolPill-BCi101Jh.js","./TimeAgo-j2Q4w4lY.js","./EscalationsOverview-BH8cxgLI.js","./AvailableEscalationsPage-Dx51E6s_.js","./CountdownTimer-DFqEYmiF.js","./CustomDurationPicker-BxyjEX27.js","./Modal-D4afnAjc.js","./constants-BHkpVaqx.js","./escalation-columns-BV3Ztn7D.js","./PriorityBadge-B4ykBH7f.js","./OperatorDashboard-BGJrxLMU.js","./index-BeFjLCIQ.js","./SlidePanel-DK4sWXmp.js","./WorkflowsOverview-CRyHvUBx.js","./index-YWvrMcqh.js","./NamespacePill-BQNMfY0m.js","./WorkflowsDashboard-DOyZbqzf.js","./YamlWorkflowsPage-HnI-9eBW.js","./GraphInvokePage-Cf9c_LJ-.js","./YamlWorkflowDetailPage-DRBmQXY6.js","./TasksListPage-DNGp5lfi.js","./TaskDetailPage-DVr31zDE.js","./WorkflowExecutionPage-CSw2aQJC.js","./AdminDashboard-D7Amh-EJ.js","./index-D1Q8WfGN.js","./TaskQueuePill-C_Vo2Clc.js","./index-O2wWcCLo.js","./ConfirmDeleteModal-C0x0HcHX.js","./index-BXrm76Hm.js","./ToolTestPanel-ZJZT_mDP.js","./index-DSjih1iX.js","./index-CVMA5PVQ.js","./RolesPage-D3NNU92h.js","./RoleDetailPage-Ws3umQKQ.js","./EscalationSchemaPage-DnEnvolM.js","./EscalationListSchemaPage-CLdsR-hK.js","./index-Dx6-4esw.js","./OperationsPage-GMojwL3q.js","./index-BI-9M7z3.js","./index-CP6D_Gtw.js","./CredentialsPage-CaH3J3SE.js","./index-B4FaugP1.js","./DropZone-zxH-9B8c.js","./index-CWkAN6wc.js","./knowledge-BVbElRHf.js","./HomePage-BdCtKXAV.js","./AgentsPage-D7WePZ0o.js","./agents-BA2CvQO9.js","./AgentDetailPage-Dy3Qvlfk.js","./CronLabel-Bma_4AC2.js","./AgentConfigPage-CW2udbSO.js","./capabilities-BYBKLRRI.js","./topics-P3jkjMsx.js","./CapabilitiesPage-3VTLEPGO.js","./TopicsPage-Ctb_85Tw.js","./TopicDetailPage-ynUkO1A8.js"])))=>i.map(i=>d[i]);
2
2
  var iv=Object.defineProperty;var rv=(i,n,s)=>n in i?iv(i,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[n]=s;var v=(i,n,s)=>rv(i,typeof n!="symbol"?n+"":n,s);import{r as av,a as j,j as h,u as xt,b as Tt,c as Rt,Q as lv,d as ov}from"./vendor-query-B2UbickB.js";import{r as cv,u as xs,L as Ni,N as Yo,a as Cy,b as $n,O as Or,c as My,d as uv,R as fv}from"./vendor-react-CXumBFUA.js";import{E as hv,S as dv,D as rh,X as Mi,I as y0,R as Ry,B as Dy,U as mv,a as pv,L as yv,b as gv,Z as bv,c as g0,P as b0,d as x0,C as xv,W as ah,e as vv,f as _v,F as wv,g as Sv,h as Ev,T as Av,N as jv,i as Ov,M as qy,j as zy,k as Tv,l as kv,m as Nv,n as Cv,o as Mv,p as Rv,q as Dv,r as v0,G as qv,s as zv,t as Uv,u as Bv,v as Lv}from"./vendor-icons-Qk9qLjF_.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const f of o)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function s(o){const f={};return o.integrity&&(f.integrity=o.integrity),o.referrerPolicy&&(f.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?f.credentials="include":o.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(o){if(o.ep)return;o.ep=!0;const f=s(o);fetch(o.href,f)}})();var bf={exports:{}},Ra={},xf={exports:{}},vf={};/**
3
3
  * @license React
4
4
  * scheduler.production.js
@@ -59,5 +59,5 @@ ${s.map(o=>`${o.role==="user"?"User":"Assistant"}: ${o.content}`).join(`
59
59
  [End prior conversation]
60
60
 
61
61
  `}function S2(i){const n=i.summary,s=i.title;if(n){const a=n.search(/\n\s*\{[\s\S]*"title"\s*:/);return a>0?n.slice(0,a).trim():n}return s||(typeof i=="string"?i:"Query completed.")}const Hg=j.createContext(null);function E2({children:i}){const n=xs(),[s,a]=j.useState(!1),[o,f]=j.useState([]),[d,m]=j.useState(null),[y,g]=j.useState({}),E=j.useRef(null),_={page:n.pathname.split("/").filter(Boolean).join("-")||"home",route:n.pathname,params:{},...y,suggestedTags:y.suggestedTags??_2(n.pathname)};j.useEffect(()=>()=>{E.current&&clearInterval(E.current)},[]);const T=j.useCallback(()=>a(ie=>!ie),[]),z=j.useCallback(ie=>{g(ie)},[]),M=j.useCallback(()=>{f([]),m(null)},[]),D=j.useCallback(async ie=>{var F;const G=new Date().toISOString(),ce={id:`user-${Date.now()}`,role:"user",content:ie,timestamp:G},ae={id:`pending-${Date.now()}`,role:"assistant",content:"",timestamp:G,pending:!0};f(V=>[...V,ce,ae]);const k={..._};(F=k.entities)!=null&&F.yamlContent&&k.entities.yamlContent.length>dy&&(k.entities={...k.entities,yamlContent:k.entities.yamlContent.slice(0,dy)+`
62
- ... (truncated)`});const oe=`${w2(o.concat(ce))}${ie}`;try{const K=(await Te("/insight/mcp-query",{method:"POST",body:JSON.stringify({prompt:oe,tags:k.suggestedTags,context:k,wait:!1,direct:!0})})).workflow_id;m(K),f(Q=>Q.map(se=>se.id===ae.id?{...se,workflowId:K}:se)),E.current&&clearInterval(E.current),E.current=setInterval(async()=>{var Q;try{const se=await Te(`/workflows/${K}/result`),he=(Q=se==null?void 0:se.result)==null?void 0:Q.data;if(he){E.current&&clearInterval(E.current),E.current=null,m(null);const Se=S2(he);let ke;try{ke=(await Te(`/workflow-states/${K}/execution`)).duration_ms}catch{}f($=>$.map(re=>re.id===ae.id?{...re,content:Se,timestamp:new Date().toISOString(),pending:!1,durationMs:ke}:re))}}catch{}},3e3)}catch{f(V=>V.map(K=>K.id===ae.id?{...K,content:"Failed to submit query. Please try again.",pending:!1}:K))}},[o,_]),J=j.useCallback(async ie=>{const G=o.find(k=>k.id===ie);if(!(G!=null&&G.workflowId)||G.compilationStatus==="compiling"||G.compilationStatus==="done")return;const ce=o.indexOf(G),ae=o.slice(0,ce).reverse().find(k=>k.role==="user");if(ae){f(k=>k.map(Z=>Z.id===ie?{...Z,compilationStatus:"compiling"}:Z));try{const k=await Te("/insight/mcp-query/describe",{method:"POST",body:JSON.stringify({prompt:ae.content,summary:G.content})}),Z=await Te("/yaml-workflows",{method:"POST",body:JSON.stringify({workflow_id:G.workflowId,task_queue:"long-tail-system",workflow_name:"mcpQuery",name:k.tool_name,description:k.description,tags:k.tags,app_id:""})});await Te(`/yaml-workflows/${Z.id}/deploy`,{method:"POST"}),f(oe=>oe.map(F=>F.id===ie?{...F,compilationStatus:"done"}:F))}catch(k){const Z=k instanceof Error?k.message:"Compilation failed";f(oe=>oe.map(F=>F.id===ie?{...F,compilationStatus:"error",compilationError:Z}:F))}}},[o]);return h.jsx(Hg.Provider,{value:{helpOpen:s,setHelpOpen:a,toggleHelp:T,messages:o,sendMessage:D,pageContext:_,setPageContext:z,activeWorkflowId:d,clearMessages:M,compileMessage:J},children:i})}function Pg(){const i=j.useContext(Hg);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function A2(){const{helpOpen:i,toggleHelp:n}=Pg();return h.jsx("button",{onClick:n,className:"fixed right-3 z-[45] flex items-center justify-center w-10 h-10 rounded-full bg-surface-raised shadow-lg hover:scale-110 transition-transform duration-150 border border-accent/30",style:{bottom:"44px"},"aria-label":i?"Close help":"Ask for help",children:i?h.jsx(Mi,{className:"w-5 h-5 text-text-tertiary",strokeWidth:1.5}):h.jsx("span",{role:"img","aria-label":"Help",className:"logo-mark w-8 h-8 -rotate-[120deg]",style:{"--logo-url":`url(${Ft}/logo512.png)`}})})}const $g=6048e5,j2=864e5,my=6e4,py=525600,yy=43200,gy=1440,by=Symbol.for("constructDateFrom");function bs(i,n){return typeof i=="function"?i(n):i&&typeof i=="object"&&by in i?i[by](n):i instanceof Date?new i.constructor(n):new Date(n)}function cn(i,n){return bs(n||i,i)}let O2={};function sl(){return O2}function Wa(i,n){var m,y,g,E;const s=sl(),a=(n==null?void 0:n.weekStartsOn)??((y=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:y.weekStartsOn)??s.weekStartsOn??((E=(g=s.locale)==null?void 0:g.options)==null?void 0:E.weekStartsOn)??0,o=cn(i,n==null?void 0:n.in),f=o.getDay(),d=(f<a?7:0)+f-a;return o.setDate(o.getDate()-d),o.setHours(0,0,0,0),o}function Wo(i,n){return Wa(i,{...n,weekStartsOn:1})}function Yg(i,n){const s=cn(i,n==null?void 0:n.in),a=s.getFullYear(),o=bs(s,0);o.setFullYear(a+1,0,4),o.setHours(0,0,0,0);const f=Wo(o),d=bs(s,0);d.setFullYear(a,0,4),d.setHours(0,0,0,0);const m=Wo(d);return s.getTime()>=f.getTime()?a+1:s.getTime()>=m.getTime()?a:a-1}function ec(i){const n=cn(i),s=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return s.setUTCFullYear(n.getFullYear()),+i-+s}function Vg(i,...n){const s=bs.bind(null,i||n.find(a=>typeof a=="object"));return n.map(s)}function xy(i,n){const s=cn(i,n==null?void 0:n.in);return s.setHours(0,0,0,0),s}function T2(i,n,s){const[a,o]=Vg(s==null?void 0:s.in,i,n),f=xy(a),d=xy(o),m=+f-ec(f),y=+d-ec(d);return Math.round((m-y)/j2)}function k2(i,n){const s=Yg(i,n),a=bs(i,0);return a.setFullYear(s,0,4),a.setHours(0,0,0,0),Wo(a)}function N2(i,n){const s=+cn(i)-+cn(n);return s<0?-1:s>0?1:s}function C2(i){return bs(i,Date.now())}function M2(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function R2(i){return!(!M2(i)&&typeof i!="number"||isNaN(+cn(i)))}function D2(i){return n=>{const a=(i?Math[i]:Math.trunc)(n);return a===0?0:a}}function q2(i,n){const s=cn(i,n==null?void 0:n.in);return s.setFullYear(s.getFullYear(),0,1),s.setHours(0,0,0,0),s}const z2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},U2=(i,n,s)=>{let a;const o=z2[i];return typeof o=="string"?a=o:n===1?a=o.one:a=o.other.replace("{{count}}",n.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+a:a+" ago":a};function Df(i){return(n={})=>{const s=n.width?String(n.width):i.defaultWidth;return i.formats[s]||i.formats[i.defaultWidth]}}const B2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},L2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},H2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},P2={date:Df({formats:B2,defaultWidth:"full"}),time:Df({formats:L2,defaultWidth:"full"}),dateTime:Df({formats:H2,defaultWidth:"full"})},$2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Y2=(i,n,s,a)=>$2[i];function Ua(i){return(n,s)=>{const a=s!=null&&s.context?String(s.context):"standalone";let o;if(a==="formatting"&&i.formattingValues){const d=i.defaultFormattingWidth||i.defaultWidth,m=s!=null&&s.width?String(s.width):d;o=i.formattingValues[m]||i.formattingValues[d]}else{const d=i.defaultWidth,m=s!=null&&s.width?String(s.width):i.defaultWidth;o=i.values[m]||i.values[d]}const f=i.argumentCallback?i.argumentCallback(n):n;return o[f]}}const V2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},G2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},F2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},I2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Q2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},J2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},K2=(i,n)=>{const s=Number(i),a=s%100;if(a>20||a<10)switch(a%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},X2={ordinalNumber:K2,era:Ua({values:V2,defaultWidth:"wide"}),quarter:Ua({values:G2,defaultWidth:"wide",argumentCallback:i=>i-1}),month:Ua({values:F2,defaultWidth:"wide"}),day:Ua({values:I2,defaultWidth:"wide"}),dayPeriod:Ua({values:Q2,defaultWidth:"wide",formattingValues:J2,defaultFormattingWidth:"wide"})};function Ba(i){return(n,s={})=>{const a=s.width,o=a&&i.matchPatterns[a]||i.matchPatterns[i.defaultMatchWidth],f=n.match(o);if(!f)return null;const d=f[0],m=a&&i.parsePatterns[a]||i.parsePatterns[i.defaultParseWidth],y=Array.isArray(m)?W2(m,_=>_.test(d)):Z2(m,_=>_.test(d));let g;g=i.valueCallback?i.valueCallback(y):y,g=s.valueCallback?s.valueCallback(g):g;const E=n.slice(d.length);return{value:g,rest:E}}}function Z2(i,n){for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&n(i[s]))return s}function W2(i,n){for(let s=0;s<i.length;s++)if(n(i[s]))return s}function eE(i){return(n,s={})=>{const a=n.match(i.matchPattern);if(!a)return null;const o=a[0],f=n.match(i.parsePattern);if(!f)return null;let d=i.valueCallback?i.valueCallback(f[0]):f[0];d=s.valueCallback?s.valueCallback(d):d;const m=n.slice(o.length);return{value:d,rest:m}}}const tE=/^(\d+)(th|st|nd|rd)?/i,nE=/\d+/i,sE={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},iE={any:[/^b/i,/^(a|c)/i]},rE={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},aE={any:[/1/i,/2/i,/3/i,/4/i]},lE={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},oE={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},cE={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},uE={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},fE={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hE={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},dE={ordinalNumber:eE({matchPattern:tE,parsePattern:nE,valueCallback:i=>parseInt(i,10)}),era:Ba({matchPatterns:sE,defaultMatchWidth:"wide",parsePatterns:iE,defaultParseWidth:"any"}),quarter:Ba({matchPatterns:rE,defaultMatchWidth:"wide",parsePatterns:aE,defaultParseWidth:"any",valueCallback:i=>i+1}),month:Ba({matchPatterns:lE,defaultMatchWidth:"wide",parsePatterns:oE,defaultParseWidth:"any"}),day:Ba({matchPatterns:cE,defaultMatchWidth:"wide",parsePatterns:uE,defaultParseWidth:"any"}),dayPeriod:Ba({matchPatterns:fE,defaultMatchWidth:"any",parsePatterns:hE,defaultParseWidth:"any"})},Gg={code:"en-US",formatDistance:U2,formatLong:P2,formatRelative:Y2,localize:X2,match:dE,options:{weekStartsOn:0,firstWeekContainsDate:1}};function mE(i,n){const s=cn(i,n==null?void 0:n.in);return T2(s,q2(s))+1}function pE(i,n){const s=cn(i,n==null?void 0:n.in),a=+Wo(s)-+k2(s);return Math.round(a/$g)+1}function Fg(i,n){var E,_,T,z;const s=cn(i,n==null?void 0:n.in),a=s.getFullYear(),o=sl(),f=(n==null?void 0:n.firstWeekContainsDate)??((_=(E=n==null?void 0:n.locale)==null?void 0:E.options)==null?void 0:_.firstWeekContainsDate)??o.firstWeekContainsDate??((z=(T=o.locale)==null?void 0:T.options)==null?void 0:z.firstWeekContainsDate)??1,d=bs((n==null?void 0:n.in)||i,0);d.setFullYear(a+1,0,f),d.setHours(0,0,0,0);const m=Wa(d,n),y=bs((n==null?void 0:n.in)||i,0);y.setFullYear(a,0,f),y.setHours(0,0,0,0);const g=Wa(y,n);return+s>=+m?a+1:+s>=+g?a:a-1}function yE(i,n){var m,y,g,E;const s=sl(),a=(n==null?void 0:n.firstWeekContainsDate)??((y=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??s.firstWeekContainsDate??((E=(g=s.locale)==null?void 0:g.options)==null?void 0:E.firstWeekContainsDate)??1,o=Fg(i,n),f=bs((n==null?void 0:n.in)||i,0);return f.setFullYear(o,0,a),f.setHours(0,0,0,0),Wa(f,n)}function gE(i,n){const s=cn(i,n==null?void 0:n.in),a=+Wa(s,n)-+yE(s,n);return Math.round(a/$g)+1}function Fe(i,n){const s=i<0?"-":"",a=Math.abs(i).toString().padStart(n,"0");return s+a}const Xs={y(i,n){const s=i.getFullYear(),a=s>0?s:1-s;return Fe(n==="yy"?a%100:a,n.length)},M(i,n){const s=i.getMonth();return n==="M"?String(s+1):Fe(s+1,2)},d(i,n){return Fe(i.getDate(),n.length)},a(i,n){const s=i.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];case"aaaa":default:return s==="am"?"a.m.":"p.m."}},h(i,n){return Fe(i.getHours()%12||12,n.length)},H(i,n){return Fe(i.getHours(),n.length)},m(i,n){return Fe(i.getMinutes(),n.length)},s(i,n){return Fe(i.getSeconds(),n.length)},S(i,n){const s=n.length,a=i.getMilliseconds(),o=Math.trunc(a*Math.pow(10,s-3));return Fe(o,n.length)}},wr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vy={G:function(i,n,s){const a=i.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return s.era(a,{width:"abbreviated"});case"GGGGG":return s.era(a,{width:"narrow"});case"GGGG":default:return s.era(a,{width:"wide"})}},y:function(i,n,s){if(n==="yo"){const a=i.getFullYear(),o=a>0?a:1-a;return s.ordinalNumber(o,{unit:"year"})}return Xs.y(i,n)},Y:function(i,n,s,a){const o=Fg(i,a),f=o>0?o:1-o;if(n==="YY"){const d=f%100;return Fe(d,2)}return n==="Yo"?s.ordinalNumber(f,{unit:"year"}):Fe(f,n.length)},R:function(i,n){const s=Yg(i);return Fe(s,n.length)},u:function(i,n){const s=i.getFullYear();return Fe(s,n.length)},Q:function(i,n,s){const a=Math.ceil((i.getMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return Fe(a,2);case"Qo":return s.ordinalNumber(a,{unit:"quarter"});case"QQQ":return s.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(a,{width:"wide",context:"formatting"})}},q:function(i,n,s){const a=Math.ceil((i.getMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return Fe(a,2);case"qo":return s.ordinalNumber(a,{unit:"quarter"});case"qqq":return s.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(a,{width:"wide",context:"standalone"})}},M:function(i,n,s){const a=i.getMonth();switch(n){case"M":case"MM":return Xs.M(i,n);case"Mo":return s.ordinalNumber(a+1,{unit:"month"});case"MMM":return s.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(a,{width:"wide",context:"formatting"})}},L:function(i,n,s){const a=i.getMonth();switch(n){case"L":return String(a+1);case"LL":return Fe(a+1,2);case"Lo":return s.ordinalNumber(a+1,{unit:"month"});case"LLL":return s.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(a,{width:"wide",context:"standalone"})}},w:function(i,n,s,a){const o=gE(i,a);return n==="wo"?s.ordinalNumber(o,{unit:"week"}):Fe(o,n.length)},I:function(i,n,s){const a=pE(i);return n==="Io"?s.ordinalNumber(a,{unit:"week"}):Fe(a,n.length)},d:function(i,n,s){return n==="do"?s.ordinalNumber(i.getDate(),{unit:"date"}):Xs.d(i,n)},D:function(i,n,s){const a=mE(i);return n==="Do"?s.ordinalNumber(a,{unit:"dayOfYear"}):Fe(a,n.length)},E:function(i,n,s){const a=i.getDay();switch(n){case"E":case"EE":case"EEE":return s.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(a,{width:"short",context:"formatting"});case"EEEE":default:return s.day(a,{width:"wide",context:"formatting"})}},e:function(i,n,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(f);case"ee":return Fe(f,2);case"eo":return s.ordinalNumber(f,{unit:"day"});case"eee":return s.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(o,{width:"short",context:"formatting"});case"eeee":default:return s.day(o,{width:"wide",context:"formatting"})}},c:function(i,n,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(f);case"cc":return Fe(f,n.length);case"co":return s.ordinalNumber(f,{unit:"day"});case"ccc":return s.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(o,{width:"narrow",context:"standalone"});case"cccccc":return s.day(o,{width:"short",context:"standalone"});case"cccc":default:return s.day(o,{width:"wide",context:"standalone"})}},i:function(i,n,s){const a=i.getDay(),o=a===0?7:a;switch(n){case"i":return String(o);case"ii":return Fe(o,n.length);case"io":return s.ordinalNumber(o,{unit:"day"});case"iii":return s.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(a,{width:"short",context:"formatting"});case"iiii":default:return s.day(a,{width:"wide",context:"formatting"})}},a:function(i,n,s){const o=i.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(i,n,s){const a=i.getHours();let o;switch(a===12?o=wr.noon:a===0?o=wr.midnight:o=a/12>=1?"pm":"am",n){case"b":case"bb":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(i,n,s){const a=i.getHours();let o;switch(a>=17?o=wr.evening:a>=12?o=wr.afternoon:a>=4?o=wr.morning:o=wr.night,n){case"B":case"BB":case"BBB":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(i,n,s){if(n==="ho"){let a=i.getHours()%12;return a===0&&(a=12),s.ordinalNumber(a,{unit:"hour"})}return Xs.h(i,n)},H:function(i,n,s){return n==="Ho"?s.ordinalNumber(i.getHours(),{unit:"hour"}):Xs.H(i,n)},K:function(i,n,s){const a=i.getHours()%12;return n==="Ko"?s.ordinalNumber(a,{unit:"hour"}):Fe(a,n.length)},k:function(i,n,s){let a=i.getHours();return a===0&&(a=24),n==="ko"?s.ordinalNumber(a,{unit:"hour"}):Fe(a,n.length)},m:function(i,n,s){return n==="mo"?s.ordinalNumber(i.getMinutes(),{unit:"minute"}):Xs.m(i,n)},s:function(i,n,s){return n==="so"?s.ordinalNumber(i.getSeconds(),{unit:"second"}):Xs.s(i,n)},S:function(i,n){return Xs.S(i,n)},X:function(i,n,s){const a=i.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return wy(a);case"XXXX":case"XX":return ki(a);case"XXXXX":case"XXX":default:return ki(a,":")}},x:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"x":return wy(a);case"xxxx":case"xx":return ki(a);case"xxxxx":case"xxx":default:return ki(a,":")}},O:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+_y(a,":");case"OOOO":default:return"GMT"+ki(a,":")}},z:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+_y(a,":");case"zzzz":default:return"GMT"+ki(a,":")}},t:function(i,n,s){const a=Math.trunc(+i/1e3);return Fe(a,n.length)},T:function(i,n,s){return Fe(+i,n.length)}};function _y(i,n=""){const s=i>0?"-":"+",a=Math.abs(i),o=Math.trunc(a/60),f=a%60;return f===0?s+String(o):s+String(o)+n+Fe(f,2)}function wy(i,n){return i%60===0?(i>0?"-":"+")+Fe(Math.abs(i)/60,2):ki(i,n)}function ki(i,n=""){const s=i>0?"-":"+",a=Math.abs(i),o=Fe(Math.trunc(a/60),2),f=Fe(a%60,2);return s+o+n+f}const Sy=(i,n)=>{switch(i){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Ig=(i,n)=>{switch(i){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},bE=(i,n)=>{const s=i.match(/(P+)(p+)?/)||[],a=s[1],o=s[2];if(!o)return Sy(i,n);let f;switch(a){case"P":f=n.dateTime({width:"short"});break;case"PP":f=n.dateTime({width:"medium"});break;case"PPP":f=n.dateTime({width:"long"});break;case"PPPP":default:f=n.dateTime({width:"full"});break}return f.replace("{{date}}",Sy(a,n)).replace("{{time}}",Ig(o,n))},xE={p:Ig,P:bE},vE=/^D+$/,_E=/^Y+$/,wE=["D","DD","YY","YYYY"];function SE(i){return vE.test(i)}function EE(i){return _E.test(i)}function AE(i,n,s){const a=jE(i,n,s);if(console.warn(a),wE.includes(i))throw new RangeError(a)}function jE(i,n,s){const a=i[0]==="Y"?"years":"days of the month";return`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${n}\`) for formatting ${a} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const OE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kE=/^'([^]*?)'?$/,NE=/''/g,CE=/[a-zA-Z]/;function kh(i,n,s){var E,_,T,z;const a=sl(),o=a.locale??Gg,f=a.firstWeekContainsDate??((_=(E=a.locale)==null?void 0:E.options)==null?void 0:_.firstWeekContainsDate)??1,d=a.weekStartsOn??((z=(T=a.locale)==null?void 0:T.options)==null?void 0:z.weekStartsOn)??0,m=cn(i,s==null?void 0:s.in);if(!R2(m))throw new RangeError("Invalid time value");let y=n.match(TE).map(M=>{const D=M[0];if(D==="p"||D==="P"){const J=xE[D];return J(M,o.formatLong)}return M}).join("").match(OE).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const D=M[0];if(D==="'")return{isToken:!1,value:ME(M)};if(vy[D])return{isToken:!0,value:M};if(D.match(CE))throw new RangeError("Format string contains an unescaped latin alphabet character `"+D+"`");return{isToken:!1,value:M}});o.localize.preprocessor&&(y=o.localize.preprocessor(m,y));const g={firstWeekContainsDate:f,weekStartsOn:d,locale:o};return y.map(M=>{if(!M.isToken)return M.value;const D=M.value;(EE(D)||SE(D))&&AE(D,n,String(i));const J=vy[D[0]];return J(m,D,o.localize,g)}).join("")}function ME(i){const n=i.match(kE);return n?n[1].replace(NE,"'"):i}function RE(i,n,s){const a=sl(),o=(s==null?void 0:s.locale)??a.locale??Gg,f=N2(i,n);if(isNaN(f))throw new RangeError("Invalid time value");const d=Object.assign({},s,{addSuffix:s==null?void 0:s.addSuffix,comparison:f}),[m,y]=Vg(s==null?void 0:s.in,...f>0?[n,i]:[i,n]),g=D2((s==null?void 0:s.roundingMethod)??"round"),E=y.getTime()-m.getTime(),_=E/my,T=ec(y)-ec(m),z=(E-T)/my,M=s==null?void 0:s.unit;let D;if(M?D=M:_<1?D="second":_<60?D="minute":_<gy?D="hour":z<yy?D="day":z<py?D="month":D="year",D==="second"){const J=g(E/1e3);return o.formatDistance("xSeconds",J,d)}else if(D==="minute"){const J=g(_);return o.formatDistance("xMinutes",J,d)}else if(D==="hour"){const J=g(_/60);return o.formatDistance("xHours",J,d)}else if(D==="day"){const J=g(z/gy);return o.formatDistance("xDays",J,d)}else if(D==="month"){const J=g(z/yy);return J===12&&M!=="month"?o.formatDistance("xYears",1,d):o.formatDistance("xMonths",J,d)}else{const J=g(z/py);return o.formatDistance("xYears",J,d)}}function DE(i,n){return RE(i,C2(i),n)}function Oj(i){return i.toLocaleString()}function Tj(i){return i>=1e9?`${(i/1e9).toFixed(1).replace(/\.0$/,"")}B`:i>=1e6?`${(i/1e6).toFixed(1).replace(/\.0$/,"")}M`:i>=1e4?`${(i/1e3).toFixed(1).replace(/\.0$/,"")}K`:i.toLocaleString()}function qE(i){const n=new Date(i);return n.getTime()>Date.now()?"just now":DE(n,{addSuffix:!0})}function kj(i){const n=Date.now()-new Date(i).getTime();if(n<0)return"now";const s=Math.floor(n/1e3);if(s<60)return`${s}s`;const a=Math.floor(s/60);if(a<60)return`${a}m`;const o=Math.floor(a/60);if(o<24)return`${o}h`;const f=Math.floor(o/24);return f<7?`${f}d`:f<30?`${Math.floor(f/7)}w`:f<365?`${Math.floor(f/30)}mo`:`${Math.floor(f/365)}y`}function Nj(i){return i<=0?"Expired":Nh(i)}function zE(i){return i==null?"--":Nh(i)}function Cj(i){return i?kh(new Date(i),"MMM d, yyyy h:mm a"):"--"}function Nh(i){if(i<1e3)return`${Math.round(i)}ms`;if(i<6e4){const d=i/1e3;return Number.isInteger(d)?`${d}s`:`${d.toFixed(1)}s`}const n=Math.floor(i/1e3),s=Math.floor(n/86400),a=Math.floor(n%86400/3600),o=Math.floor(n%3600/60),f=n%60;return s>0?a>0?`${s}d ${a}h`:`${s}d`:a>0?o>0?`${a}h ${o}m`:`${a}h`:f>0?`${o}m ${f}s`:`${o}m`}function Mj(i,n){const s=new Date(i).getTime(),a=n?new Date(n).getTime():Date.now();return Nh(a-s)}function Qg({options:i,children:n,className:s=""}){const[a,o]=j.useState(!1),[f,d]=j.useState(null),[m,y]=j.useState(null),g=j.useRef(null),E=j.useRef(void 0),_=j.useRef(void 0),T=220,z=j.useCallback(()=>{if(!g.current)return;const ie=g.current.getBoundingClientRect(),G=window.innerWidth-T-8,ce=Math.max(8,Math.min(ie.left,G));y({top:ie.bottom+4,left:ce})},[]),M=j.useCallback(async(ie,G)=>{try{await navigator.clipboard.writeText(ie),d(G),clearTimeout(E.current),E.current=setTimeout(()=>d(null),1200)}catch{}},[]),D=j.useCallback(()=>{clearTimeout(_.current),z(),o(!0)},[z]),J=j.useCallback(()=>{_.current=setTimeout(()=>o(!1),150)},[]);return j.useEffect(()=>()=>{clearTimeout(E.current),clearTimeout(_.current)},[]),h.jsxs("span",{ref:g,className:`inline-flex items-center cursor-default ${s}`,onMouseEnter:D,onMouseLeave:J,children:[n,a&&m&&Cy.createPortal(h.jsx("span",{className:"fixed z-[9999] bg-surface-raised border border-surface-border rounded shadow-lg py-1 min-w-[180px]",style:{top:m.top,left:m.left},onMouseEnter:D,onMouseLeave:J,children:i.map(ie=>h.jsxs("button",{onClick:G=>{G.stopPropagation(),M(ie.value,ie.label)},className:"flex items-center justify-between w-full px-2.5 py-1 text-left hover:bg-surface-hover transition-colors",children:[h.jsx("span",{className:"text-[9px] font-medium uppercase tracking-wider text-text-tertiary w-10 shrink-0",children:ie.label}),h.jsx("span",{className:"text-[10px] font-mono text-text-secondary truncate ml-2",children:f===ie.label?"✓":ie.value})]},ie.label))}),document.body)]})}function UE(i,n){const s=new Date(i);switch(n){case"relative":return qE(i);case"datetime":return kh(s,"MMM d, yyyy h:mm a");case"time":return s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function BE(i){const n=new Date(i);return[{label:"ms",value:String(n.getTime())},{label:"utc",value:n.toISOString()},{label:"local",value:kh(n,"MMM d, yyyy h:mm:ss a")}]}function LE({date:i,format:n="relative",className:s=""}){const[,a]=j.useState(0);j.useEffect(()=>{if(n!=="relative")return;const f=setInterval(()=>a(d=>d+1),3e4);return()=>clearInterval(f)},[n]);const o=j.useMemo(()=>BE(i),[i]);return h.jsx(Qg,{options:o,children:h.jsx("time",{dateTime:i,className:`text-xs text-text-tertiary ${s}`,children:UE(i,n)})})}function HE({ms:i,className:n=""}){const s=zE(i),a=j.useMemo(()=>i==null?[]:[{label:"ms",value:String(i)},{label:"sec",value:`${(i/1e3).toFixed(3)}s`},{label:"text",value:s}],[i,s]);return i==null?h.jsx("span",{className:`text-xs text-text-tertiary ${n}`,children:"--"}):h.jsx(Qg,{options:a,children:h.jsx("span",{className:`text-xs text-text-tertiary ${n}`,children:s})})}const PE=["sm","md","lg","full"],Ey={sm:"w-[28rem] max-h-[40vh]",md:"w-[36rem] max-h-[60vh]",lg:"w-[48rem] max-h-[80vh]",full:"inset-4 w-auto max-h-none"},Ay={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function $E({which:i}){const n="stroke-current";switch(i){case"sm":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"5",y:"5",width:"7",height:"7",rx:"1.5",className:n,strokeWidth:"1.5"})});case"md":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"3",y:"3",width:"9",height:"9",rx:"1.5",className:n,strokeWidth:"1.5"})});case"lg":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",className:n,strokeWidth:"1.5"})});case"full":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"0.75",y:"0.75",width:"12.5",height:"12.5",rx:"1.5",className:n,strokeWidth:"1.5"})})}}function YE({msg:i}){const[n,s]=j.useState(0);j.useEffect(()=>{const d=new Date(i.timestamp).getTime(),m=()=>s(Math.floor((Date.now()-d)/1e3));m();const y=setInterval(m,1e3);return()=>clearInterval(y)},[i.timestamp]);const a=Math.floor(n/60),o=n%60,f=a>0?`${a}m ${o}s`:`${o}s`;return h.jsxs("span",{className:"inline-flex flex-col gap-1.5",children:[h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx("span",{className:"text-text-tertiary",children:"Thinking"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:150ms]"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:300ms]"}),h.jsx("span",{className:"text-text-muted ml-1 tabular-nums",children:f})]}),i.workflowId&&h.jsxs(Ni,{to:`/workflows/executions/${i.workflowId}`,className:"inline-flex items-center gap-1 text-[10px] text-accent/70 hover:text-accent transition-colors",children:[h.jsx(ah,{className:"w-2.5 h-2.5",strokeWidth:1.5}),"watch execution"]})]})}function VE({msg:i,compileMessage:n}){const s=i.role==="assistant";return h.jsxs("div",{className:`flex items-center gap-1.5 ${s?"justify-start":"justify-end"}`,children:[h.jsx(LE,{date:i.timestamp,format:"time",className:"!text-[9px] text-text-muted/50"}),i.durationMs!=null&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-text-muted/30 text-[8px]",children:"·"}),h.jsx(HE,{ms:i.durationMs,className:"!text-[9px] text-text-muted/50"})]}),i.workflowId&&h.jsx(Ni,{to:`/workflows/executions/${i.workflowId}`,className:"text-text-muted/40 hover:text-accent transition-colors",title:"View workflow execution",children:h.jsx(ah,{className:"w-2.5 h-2.5",strokeWidth:1.5})}),s&&i.workflowId&&!i.pending&&h.jsx("button",{onClick:()=>n(i.id),disabled:i.compilationStatus==="compiling"||i.compilationStatus==="done",className:"transition-colors",title:i.compilationStatus==="done"?"Compiled — future queries will match this pipeline":i.compilationStatus==="error"?i.compilationError??"Compilation failed":i.compilationStatus==="compiling"?"Compiling...":"Compile to fast pipeline",children:h.jsx(qv,{className:`w-2.5 h-2.5 ${i.compilationStatus==="done"?"text-status-success":i.compilationStatus==="error"?"text-status-error":i.compilationStatus==="compiling"?"text-accent/40 animate-pulse":"text-text-muted/40 hover:text-accent"}`,strokeWidth:1.5})})]})}function GE(){const{helpOpen:i,setHelpOpen:n,messages:s,sendMessage:a,pageContext:o,activeWorkflowId:f,clearMessages:d,compileMessage:m}=Pg(),[y,g]=j.useState(""),[E,_]=j.useState("md"),[T,z]=j.useState(!0),M=j.useRef(null),D=j.useRef(null);if(j.useEffect(()=>{M.current&&(M.current.scrollTop=M.current.scrollHeight)},[s]),j.useEffect(()=>{i&&D.current&&D.current.focus()},[i]),j.useEffect(()=>{if(!i)return;const k=Z=>{Z.key==="Escape"&&(E==="full"?_("lg"):E==="lg"?_("md"):E==="md"?_("sm"):n(!1))};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[i,E,n]),!i)return null;const J=()=>{const k=y.trim();!k||f||(a(k),g(""),D.current&&(D.current.style.height="auto"))},ie=k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),J())},G=E==="full",ce=o.page.replace(/-/g," "),ae=G?{}:{bottom:"108px"};return h.jsxs("div",{className:`fixed z-[45] flex flex-col border border-surface-border rounded-lg overflow-hidden transition-all duration-300 ${G?Ey.full:`right-6 ${Ey[E]}`} ${T?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:ae,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[h.jsxs("div",{className:`flex items-center justify-between px-4 py-2.5 border-b border-surface-border shrink-0 transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"text-xs font-medium text-text-primary truncate",children:"Help Assistant"}),h.jsx("p",{className:"text-[10px] text-text-tertiary truncate",children:ce})]}),h.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h.jsx("div",{className:"flex items-center gap-0.5 border border-surface-border rounded p-0.5",role:"radiogroup","aria-label":"Panel size",children:PE.map(k=>h.jsx("button",{onClick:()=>_(k),className:`p-1 rounded transition-colors ${k===E?"bg-accent/15 text-accent":"text-text-muted hover:text-text-secondary hover:bg-surface-hover"}`,role:"radio","aria-checked":k===E,"aria-label":Ay[k],title:Ay[k],children:h.jsx($E,{which:k})},k))}),s.length>0&&h.jsx("button",{onClick:d,className:"p-1 text-text-tertiary hover:text-text-secondary transition-colors","aria-label":"Clear conversation",title:"Clear conversation",children:h.jsx(zv,{className:"w-3.5 h-3.5",strokeWidth:1.5})}),h.jsx("button",{onClick:()=>n(!1),className:"p-1 text-text-tertiary hover:text-text-primary transition-colors","aria-label":"Close",title:"Close",children:h.jsx(Mi,{className:"w-3.5 h-3.5",strokeWidth:1.5})})]})]}),h.jsxs("div",{ref:M,className:`flex-1 overflow-y-auto px-4 py-3 space-y-3 min-h-[120px] transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[s.length===0&&h.jsx("p",{className:"text-xs text-text-tertiary text-center py-6",children:"Ask anything about what you're viewing."}),s.map(k=>h.jsxs("div",{className:`text-xs leading-relaxed ${k.role==="user"?"text-right":"text-left"}`,children:[h.jsx("div",{className:`inline-block max-w-[85%] px-3 py-2 rounded-md whitespace-pre-wrap ${k.role==="user"?"bg-accent/10 text-text-primary":"bg-surface-sunken text-text-secondary"}`,children:k.pending?h.jsx(YE,{msg:k}):k.role==="assistant"?h.jsx(Th,{content:k.content}):k.content}),!k.pending&&h.jsx("div",{className:"mt-0.5",children:h.jsx(VE,{msg:k,compileMessage:m})})]},k.id))]}),h.jsxs("div",{className:`border-t border-surface-border px-3 py-2.5 flex gap-2 shrink-0 transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[h.jsx("textarea",{ref:D,value:y,onChange:k=>{g(k.target.value);const Z=k.target;Z.style.height="auto",Z.style.height=`${Math.min(Z.scrollHeight,120)}px`},onKeyDown:ie,placeholder:"Ask a question...",rows:2,className:"flex-1 resize-none bg-surface text-xs text-text-primary placeholder:text-text-tertiary rounded px-2.5 py-1.5 border border-surface-border focus:outline-none focus:border-accent",style:{minHeight:"2.5rem"},disabled:!!f}),h.jsx("button",{onClick:J,disabled:!y.trim()||!!f,className:"px-2.5 py-1.5 text-accent hover:text-accent-hover disabled:text-text-muted transition-colors self-end","aria-label":"Send",children:h.jsx(Uv,{className:"w-4 h-4",strokeWidth:1.5})})]})]})}function FE(){var ie;const{isBuilder:i,isOps:n,viewAs:s}=xg(),{canSeePaceBoard:a}=vg(),{data:o}=Br(),f=gg(),d=f!==null?f:!!((ie=o==null?void 0:o.ai)!=null&&ie.enabled),{collapsed:m,toggle:y}=wg(),[g,E]=j.useState(!1),[_,T]=j.useState(!1),[z,M]=j.useState(()=>window.location.hash.startsWith("#docs")),D=xs(),J=j.useRef(null);return j.useEffect(()=>{const G=J.current;G&&(G.classList.remove("animate-page-in"),G.offsetWidth,G.classList.add("animate-page-in"))},[D.pathname]),j.useEffect(()=>{const G=()=>{window.location.hash.startsWith("#docs")&&M(!0)};return window.addEventListener("hashchange",G),()=>window.removeEventListener("hashchange",G)},[]),h.jsxs("div",{className:"h-screen bg-surface flex flex-col",children:[h.jsx(MS,{onToggleEventFeed:()=>E(G=>!G),onToggleDocs:()=>M(G=>!G)}),h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsxs("aside",{className:`${m?"w-16":"w-60"} shrink-0 bg-surface-raised border-r border-surface-border flex flex-col transition-[width] duration-200 ease-out overflow-hidden relative z-20`,children:[h.jsxs("nav",{className:"flex-1 px-3 pt-[36px] pb-4 space-y-2 overflow-y-auto overflow-x-hidden",children:[h.jsx(US,{aiEnabled:d,isBuilder:i,isOps:n,viewAs:s,canSeePaceBoard:a}),h.jsx(LS,{}),i&&h.jsx(HS,{}),i&&d&&h.jsx($S,{}),i&&h.jsx(VS,{}),(i||n)&&h.jsx(GS,{isBuilder:i,isOps:n})]}),h.jsx("button",{onClick:y,className:`shrink-0 py-3 text-text-tertiary hover:text-text-secondary transition-colors duration-150 ${m?"flex justify-center":"flex items-center px-7"}`,"aria-label":m?"Expand sidebar":"Collapse sidebar",children:m?h.jsx(Bv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5}):h.jsx(Lv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5})}),!m&&(o==null?void 0:o.environment)&&h.jsxs("div",{className:"shrink-0 px-5 pb-3 text-[10px] leading-tight text-text-tertiary whitespace-nowrap overflow-hidden text-ellipsis",title:`long-tail v${o.environment.longTailVersion} · HotMesh v${o.environment.hotmeshVersion} · Node ${o.environment.nodeVersion} · ${o.environment.nodeEnv}`,children:["long-tail v",o.environment.longTailVersion,h.jsx("span",{className:"mx-1 text-surface-border",children:"·"}),"HotMesh v",o.environment.hotmeshVersion]})]}),h.jsx("main",{className:"flex-1 overflow-y-auto",children:h.jsx("div",{ref:J,className:"w-full px-10 py-10 pb-16 animate-page-in h-full flex flex-col",children:h.jsx(Or,{})})})]}),h.jsx(u2,{open:g,onToggle:()=>E(G=>!G),configOpen:_,onToggleConfig:()=>T(G=>!G)}),h.jsx(v2,{open:z,onClose:()=>{M(!1),history.replaceState(null,"",window.location.pathname+window.location.search)}}),d&&h.jsx(A2,{}),d&&h.jsx(GE,{})]})}function IE(){const{isAuthenticated:i}=In(),n=xs();return i?h.jsx(rS,{children:h.jsx(E2,{children:h.jsx(FE,{})})}):h.jsx($n,{to:"/login",state:{from:n.pathname},replace:!0})}function Jg({provider:i,className:n="w-5 h-5"}){switch(i){case"google":return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:[h.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),h.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),h.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),h.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]});case"github":return h.jsx("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})});case"microsoft":return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:[h.jsx("path",{d:"M3 3h8.5v8.5H3z",fill:"#F25022"}),h.jsx("path",{d:"M12.5 3H21v8.5h-8.5z",fill:"#7FBA00"}),h.jsx("path",{d:"M3 12.5h8.5V21H3z",fill:"#00A4EF"}),h.jsx("path",{d:"M12.5 12.5H21V21h-8.5z",fill:"#FFB900"})]});case"anthropic":return h.jsx("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M13.827 3.52h3.603L24 20.48h-3.603l-6.57-16.96zm-7.258 0h3.767L16.906 20.48h-3.674l-1.343-3.461H6.396l-1.34 3.461H1.5l5.07-16.96zm2.327 5.14l-2.065 5.326h4.108l-2.043-5.326z"})});default:return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10"}),h.jsx("path",{d:"M12 8v4l3 3"})]})}}async function QE(){return Te("/auth/oauth/providers")}async function JE(i,n){const s=n?`?label=${encodeURIComponent(n)}`:"";return Te(`/auth/oauth/connections/${i}${s}`,{method:"DELETE"})}function Rj(){return xt({queryKey:["oauth-connections"],queryFn:()=>Te("/auth/oauth/connections")})}function Dj(){const i=Tt();return Rt({mutationFn:({provider:n,label:s})=>JE(n,s),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function KE(){var oe;const{login:i,isAuthenticated:n}=In(),s=My(),a=xs(),o=new URLSearchParams(a.search),f=o.get("token"),d=o.get("error"),m=((oe=a.state)==null?void 0:oe.from)??o.get("returnTo")??"/",y=j.useRef(!1);f&&!y.current&&(y.current=!0,i(f,void 0,{displayName:o.get("displayName"),username:o.get("username")}));const[g,E]=j.useState(""),[_,T]=j.useState(""),[z,M]=j.useState(d||""),[D,J]=j.useState(!1),[ie,G]=j.useState(!!f),[ce,ae]=j.useState([]),k=j.useRef(!1);if(j.useEffect(()=>{f||k.current||(k.current=!0,(async()=>{var F,V,K,Q;try{const se=await fetch(`${Ft}/api/settings`);if(!se.ok)return;const he=await se.json();if(!((F=he.auth)!=null&&F.sso))return;const Se=await fetch(`${Ft}/api/auth/sso`,{method:"POST"});if(!Se.ok){M("Host authentication required — please log in to your organization first");return}const ke=await Se.json();ke.token&&((V=he.auth)!=null&&V.ssoLogoutUrl&&sessionStorage.setItem("lt_sso_logout_url",he.auth.ssoLogoutUrl),G(!0),i(ke.token,void 0,{displayName:(K=ke.user)==null?void 0:K.display_name,username:(Q=ke.user)==null?void 0:Q.external_id}))}catch{}})())},[]),j.useEffect(()=>{f||QE().then(ae).catch(()=>{})},[]),j.useEffect(()=>{if(!ie)return;const F=setTimeout(()=>s(m,{replace:!0}),1500);return()=>clearTimeout(F)},[ie]),n&&!ie)return h.jsx($n,{to:m,replace:!0});const Z=async F=>{var V,K;if(F.preventDefault(),M(""),!g.trim()||!_){M("Username and password are required");return}J(!0);try{const Q=await fetch(`${Ft}/api/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:g.trim(),password:_})}),se=await Q.json();if(!Q.ok){M(se.error||"Login failed");return}G(!0),i(se.token,{username:g.trim(),password:_},{displayName:(V=se.user)==null?void 0:V.display_name,username:(K=se.user)==null?void 0:K.external_id})}catch{M("Unable to connect to server")}finally{J(!1)}};return h.jsx("div",{className:"min-h-screen bg-surface flex items-center justify-center overflow-hidden",children:h.jsxs("div",{className:"w-full max-w-md p-10",children:[h.jsx("div",{className:`mb-10 transition-all duration-[1500ms] ease-in ${ie?"translate-x-[120vw] -translate-y-[60vh] scale-[3] opacity-0":""}`,children:h.jsx(Ah,{size:"lg",hideLabel:ie})}),h.jsxs("form",{onSubmit:Z,className:`space-y-5 transition-opacity duration-300 ${ie?"opacity-0":""}`,children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"username",className:"block text-sm font-medium text-text-secondary mb-2",children:"Username"}),h.jsx("input",{id:"username",type:"text",value:g,onChange:F=>E(F.target.value),className:"input",placeholder:"Enter your username",autoFocus:!ie,autoComplete:"username"})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-text-secondary mb-2",children:"Password"}),h.jsx("input",{id:"password",type:"password",value:_,onChange:F=>T(F.target.value),className:"input",placeholder:"Enter your password",autoComplete:"current-password"})]}),z&&h.jsx("p",{className:"text-sm text-status-error",children:z}),h.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:D||ie,children:D?"Signing in...":"Sign In"}),ce.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center gap-3 mt-6",children:[h.jsx("div",{className:"flex-1 h-px bg-border"}),h.jsx("span",{className:"text-xs text-text-tertiary",children:"or continue with"}),h.jsx("div",{className:"flex-1 h-px bg-border"})]}),h.jsx("div",{className:"space-y-2",children:ce.filter(F=>F.provider!=="anthropic").map(F=>h.jsxs("a",{href:`${Ft}/api/auth/oauth/${F.provider}?returnTo=${encodeURIComponent(m)}`,className:"btn-secondary w-full flex items-center justify-center gap-2",children:[h.jsx(Jg,{provider:F.provider}),"Sign in with ",F.name]},F.provider))})]})]})]})})}function jy(){const{isAuthenticated:i}=In(),n=My(),s=xs(),a=new URLSearchParams(s.search),o=a.get("state")||"";j.useEffect(()=>{i||n(`/login?returnTo=${encodeURIComponent(s.pathname+s.search)}`)},[i]);const[f,d]=j.useState(""),[m,y]=j.useState(a.get("label")||"default"),[g,E]=j.useState(""),[_,T]=j.useState(!1),z=f.trim().startsWith("sk-ant-oat"),M=f.trim().startsWith("sk-ant-api"),D=J=>{J.preventDefault();const ie=f.trim();if(!ie){E("A token or API key is required");return}if(!ie.startsWith("sk-ant-")){E('Invalid format. Must start with "sk-ant-oat" (OAuth token) or "sk-ant-api" (API key)');return}T(!0),E("");const G=`${Ft}/api/auth/oauth/anthropic/callback?code=${encodeURIComponent(ie)}&state=${encodeURIComponent(o)}`;window.location.href=G};return h.jsx("div",{className:"min-h-screen bg-surface flex items-center justify-center",children:h.jsxs("div",{className:"w-full max-w-md p-10",children:[h.jsx("div",{className:"mb-10",children:h.jsx(Ah,{size:"lg"})}),h.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[h.jsx(Jg,{provider:"anthropic",className:"w-6 h-6"}),h.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Connect Anthropic"})]}),h.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"Connect your Anthropic account so Claude Code tasks run under your credentials. Your token is encrypted at rest."}),h.jsxs("form",{onSubmit:D,className:"space-y-5",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"token",className:"block text-sm font-medium text-text-secondary mb-2",children:"OAuth Token or API Key"}),h.jsx("input",{id:"token",type:"password",value:f,onChange:J=>d(J.target.value),className:"input",placeholder:"sk-ant-oat01-... or sk-ant-api03-...",autoFocus:!0,autoComplete:"off"}),z&&h.jsx("p",{className:"text-xs text-status-success mt-1",children:"OAuth token detected — uses your Claude subscription (flat rate)"}),M&&h.jsx("p",{className:"text-xs text-status-warning mt-1",children:"API key detected — billed per-token from your Anthropic API account"})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"label",className:"block text-sm font-medium text-text-secondary mb-2",children:"Label"}),h.jsx("input",{id:"label",type:"text",value:m,onChange:J=>y(J.target.value.replace(/\s+/g,"-").toLowerCase()),className:"input",placeholder:"default",autoComplete:"off"}),h.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:'A name for this credential. Use different labels to store multiple credentials (e.g., "subscription", "api-batch").'})]}),g&&h.jsx("p",{className:"text-sm text-status-error",children:g}),h.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:_,children:_?"Validating...":"Connect"}),h.jsx("a",{href:"/",className:"block text-center text-sm text-text-tertiary hover:text-text-secondary",children:"Cancel"})]}),h.jsxs("div",{className:"mt-6 space-y-3 text-xs text-text-tertiary",children:[h.jsxs("div",{children:[h.jsx("span",{className:"font-medium text-text-secondary",children:"Recommended:"})," ","Run"," ",h.jsx("code",{className:"px-1 py-0.5 bg-surface-sunken rounded text-[11px]",children:"claude setup-token"})," ","in your terminal to generate an OAuth token that uses your subscription."]}),h.jsxs("div",{children:[h.jsx("span",{className:"font-medium text-text-secondary",children:"Alternative:"})," ","Use an API key from"," ",h.jsx("a",{href:"https://console.anthropic.com/settings/keys",target:"_blank",rel:"noopener noreferrer",className:"text-accent-secondary hover:underline",children:"console.anthropic.com"})," ","(billed per-token)."]})]})]})})}function La({roleTypes:i,roleNames:n,redirectTo:s="/"}){const{isSuperAdmin:a,hasRole:o,hasRoleType:f}=In();return a?h.jsx(Or,{}):i&&i.some(d=>f(d))?h.jsx(Or,{}):n&&n.some(d=>o(d))?h.jsx(Or,{}):h.jsx($n,{to:s,replace:!0})}function XE({redirectTo:i="/"}){var a;const{data:n,isLoading:s}=Br();return s||!n?null:(a=n.ai)!=null&&a.enabled?h.jsx(Or,{}):h.jsx($n,{to:i,replace:!0})}function ZE({flag:i,redirectTo:n="/"}){var o;const{data:s,isLoading:a}=Br();return a||!s?null:((o=s.features)==null?void 0:o[i])===!1?h.jsx($n,{to:n,replace:!0}):h.jsx(Or,{})}const WE=j.lazy(()=>Ee(()=>import("./ProcessesListPage-CRttlU3L.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url).then(i=>({default:i.ProcessesListPage}))),eA=j.lazy(()=>Ee(()=>import("./ProcessDetailPage-txiMHbMI.js"),__vite__mapDeps([18,1,2,4,19,15,20,17,11,6,21,22,23]),import.meta.url).then(i=>({default:i.ProcessDetailPage}))),tA=j.lazy(()=>Ee(()=>import("./McpOverview-Cul2LFEw.js"),__vite__mapDeps([24,1,25,26,27,28,14,15,29,6]),import.meta.url).then(i=>({default:i.McpOverview}))),nA=j.lazy(()=>Ee(()=>import("./McpRunsPage-DlSrpxiv.js"),__vite__mapDeps([30,1,26,27,5,6,31,28,8,9,10,17,15,32,14,13,12,16,33]),import.meta.url).then(i=>({default:i.McpRunsPage}))),sA=j.lazy(()=>Ee(()=>import("./McpRunDetailPage-B1RhxxlU.js"),__vite__mapDeps([34,1,26,20,14,15,35,6,36,37,13,38,39,16]),import.meta.url).then(i=>({default:i.McpRunDetailPage}))),iA=j.lazy(()=>Ee(()=>import("./McpQueryPage-B7PmO_V-.js"),__vite__mapDeps([40,1,14,15,9,10,13,12,16,8,11,32,17,33,5,6,4,41]),import.meta.url).then(i=>({default:i.McpQueryPage}))),rA=j.lazy(()=>Ee(()=>import("./McpQueryDetailPage-BVlQ0WBa.js"),__vite__mapDeps([42,1,14,15,20,41,6,27,4,43,36,26,3,2,44,45,46,47,48,49,35,50,38,39]),import.meta.url).then(i=>({default:i.McpQueryDetailPage}))),aA=j.lazy(()=>Ee(()=>import("./EscalationsOverview-DcMkbiSo.js"),__vite__mapDeps([51,1,4,14,15,29,6]),import.meta.url).then(i=>({default:i.EscalationsOverview}))),lA=j.lazy(()=>Ee(()=>import("./AvailableEscalationsPage-AiuiLcz-.js"),__vite__mapDeps([52,1,6,53,4,54,55,56,15,20,12,5,7,8,9,10,23,57,13,58,21,17,33,16]),import.meta.url).then(i=>({default:i.AvailableEscalationsPage}))),oA=j.lazy(()=>Ee(()=>import("./OperatorDashboard-zviIxH-0.js"),__vite__mapDeps([59,1,4,5,6,7,8,9,10,14,15,12,33,57,13,58,21,17,53,16]),import.meta.url).then(i=>({default:i.OperatorDashboard}))),cA=j.lazy(()=>Ee(()=>import("./index-B_68lp-B.js"),__vite__mapDeps([60,1,54,55,6,56,14,15,16,53,3,4,61,20,21,35,22,23]),import.meta.url).then(i=>({default:i.EscalationDetailPage}))),uA=j.lazy(()=>Ee(()=>import("./WorkflowsOverview-CkI-Pmj7.js"),__vite__mapDeps([62,1,3,4,14,15,29,6]),import.meta.url).then(i=>({default:i.WorkflowsOverview}))),fA=j.lazy(()=>Ee(()=>import("./index-DVLBkcoD.js"),__vite__mapDeps([63,1,3,14,15,13,17,64,47,48,6]),import.meta.url).then(i=>({default:i.StartWorkflowPage}))),hA=j.lazy(()=>Ee(()=>import("./index-DVLBkcoD.js"),__vite__mapDeps([63,1,3,14,15,13,17,64,47,48,6]),import.meta.url).then(i=>({default:i.DurableInvokePage}))),dA=j.lazy(()=>Ee(()=>import("./WorkflowsDashboard-BeWjDHYW.js"),__vite__mapDeps([65,1,32,3,31,28,6,4,5,8,9,10,17,15,14,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"durable"})}))),mA=j.lazy(()=>Ee(()=>import("./WorkflowsDashboard-BeWjDHYW.js"),__vite__mapDeps([65,1,32,3,31,28,6,4,5,8,9,10,17,15,14,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"all"})}))),pA=j.lazy(()=>Ee(()=>import("./YamlWorkflowsPage-DjmNTQ5r.js"),__vite__mapDeps([66,1,27,5,6,14,15,13,10,49,64,20]),import.meta.url).then(i=>({default:i.YamlWorkflowsPage}))),yA=j.lazy(()=>Ee(()=>import("./GraphInvokePage-CXElQqcV.js"),__vite__mapDeps([67,1,27,14,15,44,46,47,48,45,6,49,64]),import.meta.url).then(i=>({default:i.GraphInvokePage}))),gA=j.lazy(()=>Ee(()=>import("./YamlWorkflowDetailPage-BQnO8-PQ.js"),__vite__mapDeps([68,1,27,20,64,15,6]),import.meta.url).then(i=>({default:i.YamlWorkflowDetailPage}))),bA=j.lazy(()=>Ee(()=>import("./TasksListPage-t9WAft9-.js"),__vite__mapDeps([69,1,2,3,5,6,9,10,20,58,50,12,13,14,15,17]),import.meta.url).then(i=>({default:i.TasksListPage}))),xA=j.lazy(()=>Ee(()=>import("./TaskDetailPage-Biikk9o_.js"),__vite__mapDeps([70,1,2,20,58,14,15,6]),import.meta.url).then(i=>({default:i.TaskDetailPage}))),Oy=j.lazy(()=>Ee(()=>import("./WorkflowExecutionPage-DD1BKj5k.js"),__vite__mapDeps([71,1,3,4,37,13,38,20,6,39,15,2,14,36,16,61,35]),import.meta.url).then(i=>({default:i.WorkflowExecutionPage}))),vA=j.lazy(()=>Ee(()=>import("./AdminDashboard-DQS74RL0.js"),__vite__mapDeps([72,1,2,4,25,19,15,6]),import.meta.url).then(i=>({default:i.AdminDashboard}))),_A=j.lazy(()=>Ee(()=>import("./index-BVZINC_p.js"),__vite__mapDeps([73,1,3,9,10,13,33,5,6,14,15,74,17]),import.meta.url).then(i=>({default:i.WorkersPage}))),wA=j.lazy(()=>Ee(()=>import("./index-DjI2AUbn.js"),__vite__mapDeps([75,1,3,13,76,55,6,21,15,17,14,47,48,64]),import.meta.url).then(i=>({default:i.WorkflowConfigsPage}))),Ty=j.lazy(()=>Ee(()=>import("./index-DjI2AUbn.js"),__vite__mapDeps([75,1,3,13,76,55,6,21,15,17,14,47,48,64]),import.meta.url).then(i=>({default:i.WorkflowConfigDetailPage}))),SA=j.lazy(()=>Ee(()=>import("./index-BYEkfaUq.js"),__vite__mapDeps([77,1,25,10,76,55,6,14,15,13,12,5,78,46,47,48,49,45,33,20]),import.meta.url).then(i=>({default:i.McpServersPage}))),ky=j.lazy(()=>Ee(()=>import("./index-CRBXgMsh.js"),__vite__mapDeps([79,1,25,14,15,43,6]),import.meta.url).then(i=>({default:i.McpServerDetailPage}))),EA=j.lazy(()=>Ee(()=>import("./index-BC1NxetR.js"),__vite__mapDeps([80,1,23,5,6,9,10,12,13,76,55,33,14,15,21,48,11,50]),import.meta.url).then(i=>({default:i.UsersPage}))),AA=j.lazy(()=>Ee(()=>import("./RolesPage-DzrSv6m-.js"),__vite__mapDeps([81,1,14,15,55,6]),import.meta.url).then(i=>({default:i.RolesPage}))),jA=j.lazy(()=>Ee(()=>import("./RoleDetailPage-DBIl_mhK.js"),__vite__mapDeps([82,1,76,55,6,23,15]),import.meta.url).then(i=>({default:i.RoleDetailPage}))),OA=j.lazy(()=>Ee(()=>import("./EscalationSchemaPage-BlMx2WE6.js"),__vite__mapDeps([83,1,15,6]),import.meta.url).then(i=>({default:i.EscalationSchemaPage}))),TA=j.lazy(()=>Ee(()=>import("./EscalationListSchemaPage-CaMydHIO.js"),__vite__mapDeps([84,1,15,6]),import.meta.url).then(i=>({default:i.EscalationListSchemaPage}))),kA=j.lazy(()=>Ee(()=>import("./index-DyS2DHqy.js"),__vite__mapDeps([85,1,14,15,55,6,56]),import.meta.url).then(i=>({default:i.MaintenancePage}))),NA=j.lazy(()=>Ee(()=>import("./OperationsPage-vm_ByX41.js").then(i=>i.O),__vite__mapDeps([86,1,4,14,15,6]),import.meta.url).then(i=>({default:i.OperationsPage}))),CA=j.lazy(()=>Ee(()=>import("./index-DJ5nhcGB.js"),__vite__mapDeps([87,1,19,15,13,5,6,31,28,55,36,74,9,10,33]),import.meta.url).then(i=>({default:i.ControlPlanePage}))),MA=j.lazy(()=>Ee(()=>import("./index-Cfq3UKd8.js"),__vite__mapDeps([88,1,61,15,39,5,6,31,28,8,9,10,12,13,14,16]),import.meta.url).then(i=>({default:i.StreamMessagesPage}))),RA=j.lazy(()=>Ee(()=>import("./CredentialsPage-BwA7k9Cb.js"),__vite__mapDeps([89,1,14,15,50,76,55,6]),import.meta.url).then(i=>({default:i.CredentialsPage}))),DA=j.lazy(()=>Ee(()=>import("./index-H6Vp-gPG.js"),__vite__mapDeps([90,1,6,14,15,13,16,8,10,91,50]),import.meta.url).then(i=>({default:i.FilesPage}))),qA=j.lazy(()=>Ee(()=>import("./index-BXbt5NHG.js"),__vite__mapDeps([92,1,14,15,13,16,12,10,91,50,93,43,6]),import.meta.url).then(i=>({default:i.KnowledgePage}))),zA=j.lazy(()=>Ee(()=>import("./HomePage-DcWfjZA-.js"),__vite__mapDeps([94,1,3,26,28,4,21,15,17,16,86,14,6]),import.meta.url).then(i=>({default:i.HomePage}))),UA=j.lazy(()=>Ee(()=>import("./AgentsPage-CyUXe9n4.js"),__vite__mapDeps([95,1,96,4,5,6,8,9,10,12,13,14,15,16]),import.meta.url).then(i=>({default:i.AgentsPage}))),BA=j.lazy(()=>Ee(()=>import("./AgentDetailPage-CDiopQ7D.js"),__vite__mapDeps([97,1,96,98,15,4,17,6]),import.meta.url).then(i=>({default:i.AgentDetailPage}))),Ny=j.lazy(()=>Ee(()=>import("./AgentConfigPage-CSMCrFR4.js"),__vite__mapDeps([99,1,96,98,15,14,93,46,47,48,3,27,100,101,17,6]),import.meta.url).then(i=>({default:i.AgentConfigPage}))),LA=j.lazy(()=>Ee(()=>import("./CapabilitiesPage-nTv4STcG.js"),__vite__mapDeps([102,1,100,78,25,46,47,48,15,49,6,45,14,13]),import.meta.url).then(i=>({default:i.CapabilitiesPage}))),HA=j.lazy(()=>Ee(()=>import("./TopicsPage-tiOEQz2m.js"),__vite__mapDeps([103,1,101,14,15,13,6]),import.meta.url).then(i=>({default:i.TopicsPage}))),PA=j.lazy(()=>Ee(()=>import("./TopicDetailPage-B8pHHweA.js"),__vite__mapDeps([104,1,101,16,15,6]),import.meta.url).then(i=>({default:i.TopicDetailPage})));function $A(){return h.jsxs("div",{className:"animate-pulse space-y-4",children:[h.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),h.jsx("div",{className:"h-40 bg-surface-sunken rounded"})]})}function we({children:i}){return h.jsx(j.Suspense,{fallback:h.jsx($A,{}),children:h.jsx("div",{className:"animate-page-enter flex flex-col flex-1 min-h-0",children:i})})}const Kg=new lv({defaultOptions:{queries:{staleTime:1e4,retry:(i,n)=>n instanceof Error&&n.message==="Session expired"?!1:i<1}}});window.addEventListener("auth:unauthorized",()=>{Kg.clear(),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info");const i=window.__LT_BASE__||"",n=`${i}/login`;if(window.location.pathname!==n){const s=window.location.pathname+window.location.search,a=i&&s.startsWith(i)?s.slice(i.length)||"/":s;window.location.href=`${n}?returnTo=${encodeURIComponent(a)}`}});const YA=uv([{path:"/login",element:h.jsx(KE,{})},{path:"/connect/anthropic",element:h.jsx(jy,{})},{path:"/connect/:provider",element:h.jsx(jy,{})},{path:"/",element:h.jsx(IE,{}),children:[{index:!0,element:h.jsx(we,{children:h.jsx(zA,{})})},{path:"processes/all",element:h.jsx(we,{children:h.jsx(WE,{})})},{path:"processes/detail/:originId",element:h.jsx(we,{children:h.jsx(eA,{})})},{path:"credentials",element:h.jsx(we,{children:h.jsx(RA,{})})},{path:"connections",element:h.jsx($n,{to:"/credentials",replace:!0})},{path:"escalations",element:h.jsx(we,{children:h.jsx(aA,{})})},{path:"escalations/available",element:h.jsx(we,{children:h.jsx(lA,{})})},{path:"escalations/queue",element:h.jsx(we,{children:h.jsx(oA,{})})},{path:"escalations/detail/:id",element:h.jsx(we,{children:h.jsx(cA,{})})},{path:"capabilities",element:h.jsx(we,{children:h.jsx(LA,{})})},{path:"agents",element:h.jsx(we,{children:h.jsx(UA,{})})},{path:"agents/new",element:h.jsx(we,{children:h.jsx(Ny,{})})},{path:"agents/:id",element:h.jsx(we,{children:h.jsx(BA,{})})},{path:"agents/:id/edit",element:h.jsx(we,{children:h.jsx(Ny,{})})},{path:"topics",element:h.jsx(we,{children:h.jsx(HA,{})})},{path:"topics/:topic",element:h.jsx(we,{children:h.jsx(PA,{})})},{element:h.jsx(La,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"workflows",element:h.jsx(we,{children:h.jsx(uA,{})})},{path:"workflows/executions",element:h.jsx(we,{children:h.jsx(mA,{})})},{path:"workflows/durable/executions",element:h.jsx(we,{children:h.jsx(dA,{})})},{path:"workflows/durable/executions/:workflowId",element:h.jsx(we,{children:h.jsx(Oy,{})})},{path:"workflows/tasks",element:h.jsx(we,{children:h.jsx(bA,{})})},{path:"workflows/tasks/detail/:id",element:h.jsx(we,{children:h.jsx(xA,{})})},{path:"workflows/executions/:workflowId",element:h.jsx(we,{children:h.jsx(Oy,{})})},{path:"workflows/start",element:h.jsx(we,{children:h.jsx(fA,{})})},{path:"workflows/durable/invoke",element:h.jsx(we,{children:h.jsx(hA,{})})},{path:"workflows/cron",element:h.jsx($n,{to:"/workflows/start?mode=schedule",replace:!0})},{path:"workflows/workers",element:h.jsx(we,{children:h.jsx(_A,{})})},{path:"workflows/registry",element:h.jsx(we,{children:h.jsx(wA,{})})},{path:"workflows/registry/new",element:h.jsx(we,{children:h.jsx(Ty,{})})},{path:"workflows/registry/:workflowType",element:h.jsx(we,{children:h.jsx(Ty,{})})}]},{element:h.jsx(La,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"mcp/workflows",element:h.jsx(we,{children:h.jsx(pA,{})})},{path:"mcp/workflows/invoke",element:h.jsx(we,{children:h.jsx(yA,{})})},{path:"mcp/workflows/:id",element:h.jsx(we,{children:h.jsx(gA,{})})},{path:"mcp/executions",element:h.jsx(we,{children:h.jsx(nA,{})})},{path:"mcp/executions/:jobId",element:h.jsx(we,{children:h.jsx(sA,{})})},{path:"files",element:h.jsx(we,{children:h.jsx(DA,{})})},{path:"knowledge",element:h.jsx(we,{children:h.jsx(qA,{})})},{element:h.jsx(XE,{}),children:[{path:"mcp",element:h.jsx(we,{children:h.jsx(tA,{})})},{path:"mcp/queries",element:h.jsx(we,{children:h.jsx(iA,{})})},{path:"mcp/queries/:workflowId",element:h.jsx(we,{children:h.jsx(rA,{})})},{path:"mcp/tools",element:h.jsx($n,{to:"/mcp/servers",replace:!0})},{path:"mcp/servers",element:h.jsx(we,{children:h.jsx(SA,{})})},{path:"mcp/servers/new",element:h.jsx(we,{children:h.jsx(ky,{})})},{path:"mcp/servers/:serverId",element:h.jsx(we,{children:h.jsx(ky,{})})}]}]},{element:h.jsx(La,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"operations",element:h.jsx(we,{children:h.jsx(NA,{})})}]},{element:h.jsx(La,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"admin",element:h.jsx(we,{children:h.jsx(vA,{})})},{path:"admin/users",element:h.jsx(we,{children:h.jsx(EA,{})})},{path:"admin/escalation-chains",element:h.jsx($n,{to:"/admin/roles",replace:!0})},{path:"admin/roles",element:h.jsx(we,{children:h.jsx(AA,{})})},{path:"admin/roles/:role",element:h.jsx(we,{children:h.jsx(jA,{})})},{path:"admin/roles/:role/schema",element:h.jsx(we,{children:h.jsx(OA,{})})},{path:"admin/roles/:role/list-schema",element:h.jsx(we,{children:h.jsx(TA,{})})}]},{element:h.jsx(La,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"admin/bots",element:h.jsx($n,{to:"/admin/users?tab=service-accounts",replace:!0})},{element:h.jsx(ZE,{flag:"dbMaintenance"}),children:[{path:"admin/maintenance",element:h.jsx(we,{children:h.jsx(kA,{})})}]},{path:"admin/controlplane",element:h.jsx(we,{children:h.jsx(CA,{})})},{path:"admin/streams",element:h.jsx(we,{children:h.jsx(MA,{})})}]}]}],{basename:window.__LT_BASE__||"/"});function VA(){return h.jsx(ov,{client:Kg,children:h.jsx(Qv,{children:h.jsx(Zw,{children:h.jsx(fv,{router:YA})})})})}Cg(Ng());Vv.createRoot(document.getElementById("root")).render(h.jsx(j.StrictMode,{children:h.jsx(VA,{})}));export{xj as $,SS as A,lS as B,Oh as C,HE as D,vj as E,Ug as F,Nh as G,sj as H,Cj as I,l2 as J,kj as K,tj as L,Th as M,X_ as N,rj as O,fj as P,pj as Q,kh as R,JS as S,Qg as T,Nj as U,wj as V,mj as W,Sj as X,Ej as Y,yj as Z,gj as _,Mj as a,bj as a0,_j as a1,Oj as a2,Ft as a3,By as a4,KA as a5,Aj as a6,jj as a7,Ro as a8,Ya as a9,Sr as aa,_r as ab,Rj as ac,Dj as ad,Jg as ae,BS as af,vg as ag,Tj as ah,LE as b,W_ as c,Te as d,ej as e,zE as f,nj as g,ij as h,XA as i,wS as j,aS as k,gg as l,In as m,WA as n,xg as o,aj as p,lj as q,oj as r,cj as s,uj as t,Br as u,hj as v,dj as w,Eg as x,ZA as y,jg as z};
63
- //# sourceMappingURL=index-YPLTjeli.js.map
62
+ ... (truncated)`});const oe=`${w2(o.concat(ce))}${ie}`;try{const K=(await Te("/insight/mcp-query",{method:"POST",body:JSON.stringify({prompt:oe,tags:k.suggestedTags,context:k,wait:!1,direct:!0})})).workflow_id;m(K),f(Q=>Q.map(se=>se.id===ae.id?{...se,workflowId:K}:se)),E.current&&clearInterval(E.current),E.current=setInterval(async()=>{var Q;try{const se=await Te(`/workflows/${K}/result`),he=(Q=se==null?void 0:se.result)==null?void 0:Q.data;if(he){E.current&&clearInterval(E.current),E.current=null,m(null);const Se=S2(he);let ke;try{ke=(await Te(`/workflow-states/${K}/execution`)).duration_ms}catch{}f($=>$.map(re=>re.id===ae.id?{...re,content:Se,timestamp:new Date().toISOString(),pending:!1,durationMs:ke}:re))}}catch{}},3e3)}catch{f(V=>V.map(K=>K.id===ae.id?{...K,content:"Failed to submit query. Please try again.",pending:!1}:K))}},[o,_]),J=j.useCallback(async ie=>{const G=o.find(k=>k.id===ie);if(!(G!=null&&G.workflowId)||G.compilationStatus==="compiling"||G.compilationStatus==="done")return;const ce=o.indexOf(G),ae=o.slice(0,ce).reverse().find(k=>k.role==="user");if(ae){f(k=>k.map(Z=>Z.id===ie?{...Z,compilationStatus:"compiling"}:Z));try{const k=await Te("/insight/mcp-query/describe",{method:"POST",body:JSON.stringify({prompt:ae.content,summary:G.content})}),Z=await Te("/yaml-workflows",{method:"POST",body:JSON.stringify({workflow_id:G.workflowId,task_queue:"long-tail-system",workflow_name:"mcpQuery",name:k.tool_name,description:k.description,tags:k.tags,app_id:""})});await Te(`/yaml-workflows/${Z.id}/deploy`,{method:"POST"}),f(oe=>oe.map(F=>F.id===ie?{...F,compilationStatus:"done"}:F))}catch(k){const Z=k instanceof Error?k.message:"Compilation failed";f(oe=>oe.map(F=>F.id===ie?{...F,compilationStatus:"error",compilationError:Z}:F))}}},[o]);return h.jsx(Hg.Provider,{value:{helpOpen:s,setHelpOpen:a,toggleHelp:T,messages:o,sendMessage:D,pageContext:_,setPageContext:z,activeWorkflowId:d,clearMessages:M,compileMessage:J},children:i})}function Pg(){const i=j.useContext(Hg);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function A2(){const{helpOpen:i,toggleHelp:n}=Pg();return h.jsx("button",{onClick:n,className:"fixed right-3 z-[45] flex items-center justify-center w-10 h-10 rounded-full bg-surface-raised shadow-lg hover:scale-110 transition-transform duration-150 border border-accent/30",style:{bottom:"44px"},"aria-label":i?"Close help":"Ask for help",children:i?h.jsx(Mi,{className:"w-5 h-5 text-text-tertiary",strokeWidth:1.5}):h.jsx("span",{role:"img","aria-label":"Help",className:"logo-mark w-8 h-8 -rotate-[120deg]",style:{"--logo-url":`url(${Ft}/logo512.png)`}})})}const $g=6048e5,j2=864e5,my=6e4,py=525600,yy=43200,gy=1440,by=Symbol.for("constructDateFrom");function bs(i,n){return typeof i=="function"?i(n):i&&typeof i=="object"&&by in i?i[by](n):i instanceof Date?new i.constructor(n):new Date(n)}function cn(i,n){return bs(n||i,i)}let O2={};function sl(){return O2}function Wa(i,n){var m,y,g,E;const s=sl(),a=(n==null?void 0:n.weekStartsOn)??((y=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:y.weekStartsOn)??s.weekStartsOn??((E=(g=s.locale)==null?void 0:g.options)==null?void 0:E.weekStartsOn)??0,o=cn(i,n==null?void 0:n.in),f=o.getDay(),d=(f<a?7:0)+f-a;return o.setDate(o.getDate()-d),o.setHours(0,0,0,0),o}function Wo(i,n){return Wa(i,{...n,weekStartsOn:1})}function Yg(i,n){const s=cn(i,n==null?void 0:n.in),a=s.getFullYear(),o=bs(s,0);o.setFullYear(a+1,0,4),o.setHours(0,0,0,0);const f=Wo(o),d=bs(s,0);d.setFullYear(a,0,4),d.setHours(0,0,0,0);const m=Wo(d);return s.getTime()>=f.getTime()?a+1:s.getTime()>=m.getTime()?a:a-1}function ec(i){const n=cn(i),s=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return s.setUTCFullYear(n.getFullYear()),+i-+s}function Vg(i,...n){const s=bs.bind(null,i||n.find(a=>typeof a=="object"));return n.map(s)}function xy(i,n){const s=cn(i,n==null?void 0:n.in);return s.setHours(0,0,0,0),s}function T2(i,n,s){const[a,o]=Vg(s==null?void 0:s.in,i,n),f=xy(a),d=xy(o),m=+f-ec(f),y=+d-ec(d);return Math.round((m-y)/j2)}function k2(i,n){const s=Yg(i,n),a=bs(i,0);return a.setFullYear(s,0,4),a.setHours(0,0,0,0),Wo(a)}function N2(i,n){const s=+cn(i)-+cn(n);return s<0?-1:s>0?1:s}function C2(i){return bs(i,Date.now())}function M2(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function R2(i){return!(!M2(i)&&typeof i!="number"||isNaN(+cn(i)))}function D2(i){return n=>{const a=(i?Math[i]:Math.trunc)(n);return a===0?0:a}}function q2(i,n){const s=cn(i,n==null?void 0:n.in);return s.setFullYear(s.getFullYear(),0,1),s.setHours(0,0,0,0),s}const z2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},U2=(i,n,s)=>{let a;const o=z2[i];return typeof o=="string"?a=o:n===1?a=o.one:a=o.other.replace("{{count}}",n.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+a:a+" ago":a};function Df(i){return(n={})=>{const s=n.width?String(n.width):i.defaultWidth;return i.formats[s]||i.formats[i.defaultWidth]}}const B2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},L2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},H2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},P2={date:Df({formats:B2,defaultWidth:"full"}),time:Df({formats:L2,defaultWidth:"full"}),dateTime:Df({formats:H2,defaultWidth:"full"})},$2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Y2=(i,n,s,a)=>$2[i];function Ua(i){return(n,s)=>{const a=s!=null&&s.context?String(s.context):"standalone";let o;if(a==="formatting"&&i.formattingValues){const d=i.defaultFormattingWidth||i.defaultWidth,m=s!=null&&s.width?String(s.width):d;o=i.formattingValues[m]||i.formattingValues[d]}else{const d=i.defaultWidth,m=s!=null&&s.width?String(s.width):i.defaultWidth;o=i.values[m]||i.values[d]}const f=i.argumentCallback?i.argumentCallback(n):n;return o[f]}}const V2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},G2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},F2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},I2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Q2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},J2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},K2=(i,n)=>{const s=Number(i),a=s%100;if(a>20||a<10)switch(a%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},X2={ordinalNumber:K2,era:Ua({values:V2,defaultWidth:"wide"}),quarter:Ua({values:G2,defaultWidth:"wide",argumentCallback:i=>i-1}),month:Ua({values:F2,defaultWidth:"wide"}),day:Ua({values:I2,defaultWidth:"wide"}),dayPeriod:Ua({values:Q2,defaultWidth:"wide",formattingValues:J2,defaultFormattingWidth:"wide"})};function Ba(i){return(n,s={})=>{const a=s.width,o=a&&i.matchPatterns[a]||i.matchPatterns[i.defaultMatchWidth],f=n.match(o);if(!f)return null;const d=f[0],m=a&&i.parsePatterns[a]||i.parsePatterns[i.defaultParseWidth],y=Array.isArray(m)?W2(m,_=>_.test(d)):Z2(m,_=>_.test(d));let g;g=i.valueCallback?i.valueCallback(y):y,g=s.valueCallback?s.valueCallback(g):g;const E=n.slice(d.length);return{value:g,rest:E}}}function Z2(i,n){for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&n(i[s]))return s}function W2(i,n){for(let s=0;s<i.length;s++)if(n(i[s]))return s}function eE(i){return(n,s={})=>{const a=n.match(i.matchPattern);if(!a)return null;const o=a[0],f=n.match(i.parsePattern);if(!f)return null;let d=i.valueCallback?i.valueCallback(f[0]):f[0];d=s.valueCallback?s.valueCallback(d):d;const m=n.slice(o.length);return{value:d,rest:m}}}const tE=/^(\d+)(th|st|nd|rd)?/i,nE=/\d+/i,sE={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},iE={any:[/^b/i,/^(a|c)/i]},rE={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},aE={any:[/1/i,/2/i,/3/i,/4/i]},lE={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},oE={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},cE={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},uE={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},fE={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hE={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},dE={ordinalNumber:eE({matchPattern:tE,parsePattern:nE,valueCallback:i=>parseInt(i,10)}),era:Ba({matchPatterns:sE,defaultMatchWidth:"wide",parsePatterns:iE,defaultParseWidth:"any"}),quarter:Ba({matchPatterns:rE,defaultMatchWidth:"wide",parsePatterns:aE,defaultParseWidth:"any",valueCallback:i=>i+1}),month:Ba({matchPatterns:lE,defaultMatchWidth:"wide",parsePatterns:oE,defaultParseWidth:"any"}),day:Ba({matchPatterns:cE,defaultMatchWidth:"wide",parsePatterns:uE,defaultParseWidth:"any"}),dayPeriod:Ba({matchPatterns:fE,defaultMatchWidth:"any",parsePatterns:hE,defaultParseWidth:"any"})},Gg={code:"en-US",formatDistance:U2,formatLong:P2,formatRelative:Y2,localize:X2,match:dE,options:{weekStartsOn:0,firstWeekContainsDate:1}};function mE(i,n){const s=cn(i,n==null?void 0:n.in);return T2(s,q2(s))+1}function pE(i,n){const s=cn(i,n==null?void 0:n.in),a=+Wo(s)-+k2(s);return Math.round(a/$g)+1}function Fg(i,n){var E,_,T,z;const s=cn(i,n==null?void 0:n.in),a=s.getFullYear(),o=sl(),f=(n==null?void 0:n.firstWeekContainsDate)??((_=(E=n==null?void 0:n.locale)==null?void 0:E.options)==null?void 0:_.firstWeekContainsDate)??o.firstWeekContainsDate??((z=(T=o.locale)==null?void 0:T.options)==null?void 0:z.firstWeekContainsDate)??1,d=bs((n==null?void 0:n.in)||i,0);d.setFullYear(a+1,0,f),d.setHours(0,0,0,0);const m=Wa(d,n),y=bs((n==null?void 0:n.in)||i,0);y.setFullYear(a,0,f),y.setHours(0,0,0,0);const g=Wa(y,n);return+s>=+m?a+1:+s>=+g?a:a-1}function yE(i,n){var m,y,g,E;const s=sl(),a=(n==null?void 0:n.firstWeekContainsDate)??((y=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??s.firstWeekContainsDate??((E=(g=s.locale)==null?void 0:g.options)==null?void 0:E.firstWeekContainsDate)??1,o=Fg(i,n),f=bs((n==null?void 0:n.in)||i,0);return f.setFullYear(o,0,a),f.setHours(0,0,0,0),Wa(f,n)}function gE(i,n){const s=cn(i,n==null?void 0:n.in),a=+Wa(s,n)-+yE(s,n);return Math.round(a/$g)+1}function Fe(i,n){const s=i<0?"-":"",a=Math.abs(i).toString().padStart(n,"0");return s+a}const Xs={y(i,n){const s=i.getFullYear(),a=s>0?s:1-s;return Fe(n==="yy"?a%100:a,n.length)},M(i,n){const s=i.getMonth();return n==="M"?String(s+1):Fe(s+1,2)},d(i,n){return Fe(i.getDate(),n.length)},a(i,n){const s=i.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];case"aaaa":default:return s==="am"?"a.m.":"p.m."}},h(i,n){return Fe(i.getHours()%12||12,n.length)},H(i,n){return Fe(i.getHours(),n.length)},m(i,n){return Fe(i.getMinutes(),n.length)},s(i,n){return Fe(i.getSeconds(),n.length)},S(i,n){const s=n.length,a=i.getMilliseconds(),o=Math.trunc(a*Math.pow(10,s-3));return Fe(o,n.length)}},wr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vy={G:function(i,n,s){const a=i.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return s.era(a,{width:"abbreviated"});case"GGGGG":return s.era(a,{width:"narrow"});case"GGGG":default:return s.era(a,{width:"wide"})}},y:function(i,n,s){if(n==="yo"){const a=i.getFullYear(),o=a>0?a:1-a;return s.ordinalNumber(o,{unit:"year"})}return Xs.y(i,n)},Y:function(i,n,s,a){const o=Fg(i,a),f=o>0?o:1-o;if(n==="YY"){const d=f%100;return Fe(d,2)}return n==="Yo"?s.ordinalNumber(f,{unit:"year"}):Fe(f,n.length)},R:function(i,n){const s=Yg(i);return Fe(s,n.length)},u:function(i,n){const s=i.getFullYear();return Fe(s,n.length)},Q:function(i,n,s){const a=Math.ceil((i.getMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return Fe(a,2);case"Qo":return s.ordinalNumber(a,{unit:"quarter"});case"QQQ":return s.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(a,{width:"wide",context:"formatting"})}},q:function(i,n,s){const a=Math.ceil((i.getMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return Fe(a,2);case"qo":return s.ordinalNumber(a,{unit:"quarter"});case"qqq":return s.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(a,{width:"wide",context:"standalone"})}},M:function(i,n,s){const a=i.getMonth();switch(n){case"M":case"MM":return Xs.M(i,n);case"Mo":return s.ordinalNumber(a+1,{unit:"month"});case"MMM":return s.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(a,{width:"wide",context:"formatting"})}},L:function(i,n,s){const a=i.getMonth();switch(n){case"L":return String(a+1);case"LL":return Fe(a+1,2);case"Lo":return s.ordinalNumber(a+1,{unit:"month"});case"LLL":return s.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(a,{width:"wide",context:"standalone"})}},w:function(i,n,s,a){const o=gE(i,a);return n==="wo"?s.ordinalNumber(o,{unit:"week"}):Fe(o,n.length)},I:function(i,n,s){const a=pE(i);return n==="Io"?s.ordinalNumber(a,{unit:"week"}):Fe(a,n.length)},d:function(i,n,s){return n==="do"?s.ordinalNumber(i.getDate(),{unit:"date"}):Xs.d(i,n)},D:function(i,n,s){const a=mE(i);return n==="Do"?s.ordinalNumber(a,{unit:"dayOfYear"}):Fe(a,n.length)},E:function(i,n,s){const a=i.getDay();switch(n){case"E":case"EE":case"EEE":return s.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(a,{width:"short",context:"formatting"});case"EEEE":default:return s.day(a,{width:"wide",context:"formatting"})}},e:function(i,n,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(f);case"ee":return Fe(f,2);case"eo":return s.ordinalNumber(f,{unit:"day"});case"eee":return s.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(o,{width:"short",context:"formatting"});case"eeee":default:return s.day(o,{width:"wide",context:"formatting"})}},c:function(i,n,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(f);case"cc":return Fe(f,n.length);case"co":return s.ordinalNumber(f,{unit:"day"});case"ccc":return s.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(o,{width:"narrow",context:"standalone"});case"cccccc":return s.day(o,{width:"short",context:"standalone"});case"cccc":default:return s.day(o,{width:"wide",context:"standalone"})}},i:function(i,n,s){const a=i.getDay(),o=a===0?7:a;switch(n){case"i":return String(o);case"ii":return Fe(o,n.length);case"io":return s.ordinalNumber(o,{unit:"day"});case"iii":return s.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(a,{width:"short",context:"formatting"});case"iiii":default:return s.day(a,{width:"wide",context:"formatting"})}},a:function(i,n,s){const o=i.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(i,n,s){const a=i.getHours();let o;switch(a===12?o=wr.noon:a===0?o=wr.midnight:o=a/12>=1?"pm":"am",n){case"b":case"bb":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(i,n,s){const a=i.getHours();let o;switch(a>=17?o=wr.evening:a>=12?o=wr.afternoon:a>=4?o=wr.morning:o=wr.night,n){case"B":case"BB":case"BBB":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(i,n,s){if(n==="ho"){let a=i.getHours()%12;return a===0&&(a=12),s.ordinalNumber(a,{unit:"hour"})}return Xs.h(i,n)},H:function(i,n,s){return n==="Ho"?s.ordinalNumber(i.getHours(),{unit:"hour"}):Xs.H(i,n)},K:function(i,n,s){const a=i.getHours()%12;return n==="Ko"?s.ordinalNumber(a,{unit:"hour"}):Fe(a,n.length)},k:function(i,n,s){let a=i.getHours();return a===0&&(a=24),n==="ko"?s.ordinalNumber(a,{unit:"hour"}):Fe(a,n.length)},m:function(i,n,s){return n==="mo"?s.ordinalNumber(i.getMinutes(),{unit:"minute"}):Xs.m(i,n)},s:function(i,n,s){return n==="so"?s.ordinalNumber(i.getSeconds(),{unit:"second"}):Xs.s(i,n)},S:function(i,n){return Xs.S(i,n)},X:function(i,n,s){const a=i.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return wy(a);case"XXXX":case"XX":return ki(a);case"XXXXX":case"XXX":default:return ki(a,":")}},x:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"x":return wy(a);case"xxxx":case"xx":return ki(a);case"xxxxx":case"xxx":default:return ki(a,":")}},O:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+_y(a,":");case"OOOO":default:return"GMT"+ki(a,":")}},z:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+_y(a,":");case"zzzz":default:return"GMT"+ki(a,":")}},t:function(i,n,s){const a=Math.trunc(+i/1e3);return Fe(a,n.length)},T:function(i,n,s){return Fe(+i,n.length)}};function _y(i,n=""){const s=i>0?"-":"+",a=Math.abs(i),o=Math.trunc(a/60),f=a%60;return f===0?s+String(o):s+String(o)+n+Fe(f,2)}function wy(i,n){return i%60===0?(i>0?"-":"+")+Fe(Math.abs(i)/60,2):ki(i,n)}function ki(i,n=""){const s=i>0?"-":"+",a=Math.abs(i),o=Fe(Math.trunc(a/60),2),f=Fe(a%60,2);return s+o+n+f}const Sy=(i,n)=>{switch(i){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Ig=(i,n)=>{switch(i){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},bE=(i,n)=>{const s=i.match(/(P+)(p+)?/)||[],a=s[1],o=s[2];if(!o)return Sy(i,n);let f;switch(a){case"P":f=n.dateTime({width:"short"});break;case"PP":f=n.dateTime({width:"medium"});break;case"PPP":f=n.dateTime({width:"long"});break;case"PPPP":default:f=n.dateTime({width:"full"});break}return f.replace("{{date}}",Sy(a,n)).replace("{{time}}",Ig(o,n))},xE={p:Ig,P:bE},vE=/^D+$/,_E=/^Y+$/,wE=["D","DD","YY","YYYY"];function SE(i){return vE.test(i)}function EE(i){return _E.test(i)}function AE(i,n,s){const a=jE(i,n,s);if(console.warn(a),wE.includes(i))throw new RangeError(a)}function jE(i,n,s){const a=i[0]==="Y"?"years":"days of the month";return`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${n}\`) for formatting ${a} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const OE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kE=/^'([^]*?)'?$/,NE=/''/g,CE=/[a-zA-Z]/;function kh(i,n,s){var E,_,T,z;const a=sl(),o=a.locale??Gg,f=a.firstWeekContainsDate??((_=(E=a.locale)==null?void 0:E.options)==null?void 0:_.firstWeekContainsDate)??1,d=a.weekStartsOn??((z=(T=a.locale)==null?void 0:T.options)==null?void 0:z.weekStartsOn)??0,m=cn(i,s==null?void 0:s.in);if(!R2(m))throw new RangeError("Invalid time value");let y=n.match(TE).map(M=>{const D=M[0];if(D==="p"||D==="P"){const J=xE[D];return J(M,o.formatLong)}return M}).join("").match(OE).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const D=M[0];if(D==="'")return{isToken:!1,value:ME(M)};if(vy[D])return{isToken:!0,value:M};if(D.match(CE))throw new RangeError("Format string contains an unescaped latin alphabet character `"+D+"`");return{isToken:!1,value:M}});o.localize.preprocessor&&(y=o.localize.preprocessor(m,y));const g={firstWeekContainsDate:f,weekStartsOn:d,locale:o};return y.map(M=>{if(!M.isToken)return M.value;const D=M.value;(EE(D)||SE(D))&&AE(D,n,String(i));const J=vy[D[0]];return J(m,D,o.localize,g)}).join("")}function ME(i){const n=i.match(kE);return n?n[1].replace(NE,"'"):i}function RE(i,n,s){const a=sl(),o=(s==null?void 0:s.locale)??a.locale??Gg,f=N2(i,n);if(isNaN(f))throw new RangeError("Invalid time value");const d=Object.assign({},s,{addSuffix:s==null?void 0:s.addSuffix,comparison:f}),[m,y]=Vg(s==null?void 0:s.in,...f>0?[n,i]:[i,n]),g=D2((s==null?void 0:s.roundingMethod)??"round"),E=y.getTime()-m.getTime(),_=E/my,T=ec(y)-ec(m),z=(E-T)/my,M=s==null?void 0:s.unit;let D;if(M?D=M:_<1?D="second":_<60?D="minute":_<gy?D="hour":z<yy?D="day":z<py?D="month":D="year",D==="second"){const J=g(E/1e3);return o.formatDistance("xSeconds",J,d)}else if(D==="minute"){const J=g(_);return o.formatDistance("xMinutes",J,d)}else if(D==="hour"){const J=g(_/60);return o.formatDistance("xHours",J,d)}else if(D==="day"){const J=g(z/gy);return o.formatDistance("xDays",J,d)}else if(D==="month"){const J=g(z/yy);return J===12&&M!=="month"?o.formatDistance("xYears",1,d):o.formatDistance("xMonths",J,d)}else{const J=g(z/py);return o.formatDistance("xYears",J,d)}}function DE(i,n){return RE(i,C2(i),n)}function Oj(i){return i.toLocaleString()}function Tj(i){return i>=1e9?`${(i/1e9).toFixed(1).replace(/\.0$/,"")}B`:i>=1e6?`${(i/1e6).toFixed(1).replace(/\.0$/,"")}M`:i>=1e4?`${(i/1e3).toFixed(1).replace(/\.0$/,"")}K`:i.toLocaleString()}function qE(i){const n=new Date(i);return n.getTime()>Date.now()?"just now":DE(n,{addSuffix:!0})}function kj(i){const n=Date.now()-new Date(i).getTime();if(n<0)return"now";const s=Math.floor(n/1e3);if(s<60)return`${s}s`;const a=Math.floor(s/60);if(a<60)return`${a}m`;const o=Math.floor(a/60);if(o<24)return`${o}h`;const f=Math.floor(o/24);return f<7?`${f}d`:f<30?`${Math.floor(f/7)}w`:f<365?`${Math.floor(f/30)}mo`:`${Math.floor(f/365)}y`}function Nj(i){return i<=0?"Expired":Nh(i)}function zE(i){return i==null?"--":Nh(i)}function Cj(i){return i?kh(new Date(i),"MMM d, yyyy h:mm a"):"--"}function Nh(i){if(i<1e3)return`${Math.round(i)}ms`;if(i<6e4){const d=i/1e3;return Number.isInteger(d)?`${d}s`:`${d.toFixed(1)}s`}const n=Math.floor(i/1e3),s=Math.floor(n/86400),a=Math.floor(n%86400/3600),o=Math.floor(n%3600/60),f=n%60;return s>0?a>0?`${s}d ${a}h`:`${s}d`:a>0?o>0?`${a}h ${o}m`:`${a}h`:f>0?`${o}m ${f}s`:`${o}m`}function Mj(i,n){const s=new Date(i).getTime(),a=n?new Date(n).getTime():Date.now();return Nh(a-s)}function Qg({options:i,children:n,className:s=""}){const[a,o]=j.useState(!1),[f,d]=j.useState(null),[m,y]=j.useState(null),g=j.useRef(null),E=j.useRef(void 0),_=j.useRef(void 0),T=220,z=j.useCallback(()=>{if(!g.current)return;const ie=g.current.getBoundingClientRect(),G=window.innerWidth-T-8,ce=Math.max(8,Math.min(ie.left,G));y({top:ie.bottom+4,left:ce})},[]),M=j.useCallback(async(ie,G)=>{try{await navigator.clipboard.writeText(ie),d(G),clearTimeout(E.current),E.current=setTimeout(()=>d(null),1200)}catch{}},[]),D=j.useCallback(()=>{clearTimeout(_.current),z(),o(!0)},[z]),J=j.useCallback(()=>{_.current=setTimeout(()=>o(!1),150)},[]);return j.useEffect(()=>()=>{clearTimeout(E.current),clearTimeout(_.current)},[]),h.jsxs("span",{ref:g,className:`inline-flex items-center cursor-default ${s}`,onMouseEnter:D,onMouseLeave:J,children:[n,a&&m&&Cy.createPortal(h.jsx("span",{className:"fixed z-[9999] bg-surface-raised border border-surface-border rounded shadow-lg py-1 min-w-[180px]",style:{top:m.top,left:m.left},onMouseEnter:D,onMouseLeave:J,children:i.map(ie=>h.jsxs("button",{onClick:G=>{G.stopPropagation(),M(ie.value,ie.label)},className:"flex items-center justify-between w-full px-2.5 py-1 text-left hover:bg-surface-hover transition-colors",children:[h.jsx("span",{className:"text-[9px] font-medium uppercase tracking-wider text-text-tertiary w-10 shrink-0",children:ie.label}),h.jsx("span",{className:"text-[10px] font-mono text-text-secondary truncate ml-2",children:f===ie.label?"✓":ie.value})]},ie.label))}),document.body)]})}function UE(i,n){const s=new Date(i);switch(n){case"relative":return qE(i);case"datetime":return kh(s,"MMM d, yyyy h:mm a");case"time":return s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function BE(i){const n=new Date(i);return[{label:"ms",value:String(n.getTime())},{label:"utc",value:n.toISOString()},{label:"local",value:kh(n,"MMM d, yyyy h:mm:ss a")}]}function LE({date:i,format:n="relative",className:s=""}){const[,a]=j.useState(0);j.useEffect(()=>{if(n!=="relative")return;const f=setInterval(()=>a(d=>d+1),3e4);return()=>clearInterval(f)},[n]);const o=j.useMemo(()=>BE(i),[i]);return h.jsx(Qg,{options:o,children:h.jsx("time",{dateTime:i,className:`text-xs text-text-tertiary ${s}`,children:UE(i,n)})})}function HE({ms:i,className:n=""}){const s=zE(i),a=j.useMemo(()=>i==null?[]:[{label:"ms",value:String(i)},{label:"sec",value:`${(i/1e3).toFixed(3)}s`},{label:"text",value:s}],[i,s]);return i==null?h.jsx("span",{className:`text-xs text-text-tertiary ${n}`,children:"--"}):h.jsx(Qg,{options:a,children:h.jsx("span",{className:`text-xs text-text-tertiary ${n}`,children:s})})}const PE=["sm","md","lg","full"],Ey={sm:"w-[28rem] max-h-[40vh]",md:"w-[36rem] max-h-[60vh]",lg:"w-[48rem] max-h-[80vh]",full:"inset-4 w-auto max-h-none"},Ay={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function $E({which:i}){const n="stroke-current";switch(i){case"sm":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"5",y:"5",width:"7",height:"7",rx:"1.5",className:n,strokeWidth:"1.5"})});case"md":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"3",y:"3",width:"9",height:"9",rx:"1.5",className:n,strokeWidth:"1.5"})});case"lg":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",className:n,strokeWidth:"1.5"})});case"full":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"0.75",y:"0.75",width:"12.5",height:"12.5",rx:"1.5",className:n,strokeWidth:"1.5"})})}}function YE({msg:i}){const[n,s]=j.useState(0);j.useEffect(()=>{const d=new Date(i.timestamp).getTime(),m=()=>s(Math.floor((Date.now()-d)/1e3));m();const y=setInterval(m,1e3);return()=>clearInterval(y)},[i.timestamp]);const a=Math.floor(n/60),o=n%60,f=a>0?`${a}m ${o}s`:`${o}s`;return h.jsxs("span",{className:"inline-flex flex-col gap-1.5",children:[h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx("span",{className:"text-text-tertiary",children:"Thinking"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:150ms]"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:300ms]"}),h.jsx("span",{className:"text-text-muted ml-1 tabular-nums",children:f})]}),i.workflowId&&h.jsxs(Ni,{to:`/workflows/executions/${i.workflowId}`,className:"inline-flex items-center gap-1 text-[10px] text-accent/70 hover:text-accent transition-colors",children:[h.jsx(ah,{className:"w-2.5 h-2.5",strokeWidth:1.5}),"watch execution"]})]})}function VE({msg:i,compileMessage:n}){const s=i.role==="assistant";return h.jsxs("div",{className:`flex items-center gap-1.5 ${s?"justify-start":"justify-end"}`,children:[h.jsx(LE,{date:i.timestamp,format:"time",className:"!text-[9px] text-text-muted/50"}),i.durationMs!=null&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-text-muted/30 text-[8px]",children:"·"}),h.jsx(HE,{ms:i.durationMs,className:"!text-[9px] text-text-muted/50"})]}),i.workflowId&&h.jsx(Ni,{to:`/workflows/executions/${i.workflowId}`,className:"text-text-muted/40 hover:text-accent transition-colors",title:"View workflow execution",children:h.jsx(ah,{className:"w-2.5 h-2.5",strokeWidth:1.5})}),s&&i.workflowId&&!i.pending&&h.jsx("button",{onClick:()=>n(i.id),disabled:i.compilationStatus==="compiling"||i.compilationStatus==="done",className:"transition-colors",title:i.compilationStatus==="done"?"Compiled — future queries will match this pipeline":i.compilationStatus==="error"?i.compilationError??"Compilation failed":i.compilationStatus==="compiling"?"Compiling...":"Compile to fast pipeline",children:h.jsx(qv,{className:`w-2.5 h-2.5 ${i.compilationStatus==="done"?"text-status-success":i.compilationStatus==="error"?"text-status-error":i.compilationStatus==="compiling"?"text-accent/40 animate-pulse":"text-text-muted/40 hover:text-accent"}`,strokeWidth:1.5})})]})}function GE(){const{helpOpen:i,setHelpOpen:n,messages:s,sendMessage:a,pageContext:o,activeWorkflowId:f,clearMessages:d,compileMessage:m}=Pg(),[y,g]=j.useState(""),[E,_]=j.useState("md"),[T,z]=j.useState(!0),M=j.useRef(null),D=j.useRef(null);if(j.useEffect(()=>{M.current&&(M.current.scrollTop=M.current.scrollHeight)},[s]),j.useEffect(()=>{i&&D.current&&D.current.focus()},[i]),j.useEffect(()=>{if(!i)return;const k=Z=>{Z.key==="Escape"&&(E==="full"?_("lg"):E==="lg"?_("md"):E==="md"?_("sm"):n(!1))};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[i,E,n]),!i)return null;const J=()=>{const k=y.trim();!k||f||(a(k),g(""),D.current&&(D.current.style.height="auto"))},ie=k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),J())},G=E==="full",ce=o.page.replace(/-/g," "),ae=G?{}:{bottom:"108px"};return h.jsxs("div",{className:`fixed z-[45] flex flex-col border border-surface-border rounded-lg overflow-hidden transition-all duration-300 ${G?Ey.full:`right-6 ${Ey[E]}`} ${T?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:ae,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[h.jsxs("div",{className:`flex items-center justify-between px-4 py-2.5 border-b border-surface-border shrink-0 transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"text-xs font-medium text-text-primary truncate",children:"Help Assistant"}),h.jsx("p",{className:"text-[10px] text-text-tertiary truncate",children:ce})]}),h.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h.jsx("div",{className:"flex items-center gap-0.5 border border-surface-border rounded p-0.5",role:"radiogroup","aria-label":"Panel size",children:PE.map(k=>h.jsx("button",{onClick:()=>_(k),className:`p-1 rounded transition-colors ${k===E?"bg-accent/15 text-accent":"text-text-muted hover:text-text-secondary hover:bg-surface-hover"}`,role:"radio","aria-checked":k===E,"aria-label":Ay[k],title:Ay[k],children:h.jsx($E,{which:k})},k))}),s.length>0&&h.jsx("button",{onClick:d,className:"p-1 text-text-tertiary hover:text-text-secondary transition-colors","aria-label":"Clear conversation",title:"Clear conversation",children:h.jsx(zv,{className:"w-3.5 h-3.5",strokeWidth:1.5})}),h.jsx("button",{onClick:()=>n(!1),className:"p-1 text-text-tertiary hover:text-text-primary transition-colors","aria-label":"Close",title:"Close",children:h.jsx(Mi,{className:"w-3.5 h-3.5",strokeWidth:1.5})})]})]}),h.jsxs("div",{ref:M,className:`flex-1 overflow-y-auto px-4 py-3 space-y-3 min-h-[120px] transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[s.length===0&&h.jsx("p",{className:"text-xs text-text-tertiary text-center py-6",children:"Ask anything about what you're viewing."}),s.map(k=>h.jsxs("div",{className:`text-xs leading-relaxed ${k.role==="user"?"text-right":"text-left"}`,children:[h.jsx("div",{className:`inline-block max-w-[85%] px-3 py-2 rounded-md whitespace-pre-wrap ${k.role==="user"?"bg-accent/10 text-text-primary":"bg-surface-sunken text-text-secondary"}`,children:k.pending?h.jsx(YE,{msg:k}):k.role==="assistant"?h.jsx(Th,{content:k.content}):k.content}),!k.pending&&h.jsx("div",{className:"mt-0.5",children:h.jsx(VE,{msg:k,compileMessage:m})})]},k.id))]}),h.jsxs("div",{className:`border-t border-surface-border px-3 py-2.5 flex gap-2 shrink-0 transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[h.jsx("textarea",{ref:D,value:y,onChange:k=>{g(k.target.value);const Z=k.target;Z.style.height="auto",Z.style.height=`${Math.min(Z.scrollHeight,120)}px`},onKeyDown:ie,placeholder:"Ask a question...",rows:2,className:"flex-1 resize-none bg-surface text-xs text-text-primary placeholder:text-text-tertiary rounded px-2.5 py-1.5 border border-surface-border focus:outline-none focus:border-accent",style:{minHeight:"2.5rem"},disabled:!!f}),h.jsx("button",{onClick:J,disabled:!y.trim()||!!f,className:"px-2.5 py-1.5 text-accent hover:text-accent-hover disabled:text-text-muted transition-colors self-end","aria-label":"Send",children:h.jsx(Uv,{className:"w-4 h-4",strokeWidth:1.5})})]})]})}function FE(){var ie;const{isBuilder:i,isOps:n,viewAs:s}=xg(),{canSeePaceBoard:a}=vg(),{data:o}=Br(),f=gg(),d=f!==null?f:!!((ie=o==null?void 0:o.ai)!=null&&ie.enabled),{collapsed:m,toggle:y}=wg(),[g,E]=j.useState(!1),[_,T]=j.useState(!1),[z,M]=j.useState(()=>window.location.hash.startsWith("#docs")),D=xs(),J=j.useRef(null);return j.useEffect(()=>{const G=J.current;G&&(G.classList.remove("animate-page-in"),G.offsetWidth,G.classList.add("animate-page-in"))},[D.pathname]),j.useEffect(()=>{const G=()=>{window.location.hash.startsWith("#docs")&&M(!0)};return window.addEventListener("hashchange",G),()=>window.removeEventListener("hashchange",G)},[]),h.jsxs("div",{className:"h-screen bg-surface flex flex-col",children:[h.jsx(MS,{onToggleEventFeed:()=>E(G=>!G),onToggleDocs:()=>M(G=>!G)}),h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsxs("aside",{className:`${m?"w-16":"w-60"} shrink-0 bg-surface-raised border-r border-surface-border flex flex-col transition-[width] duration-200 ease-out overflow-hidden relative z-20`,children:[h.jsxs("nav",{className:"flex-1 px-3 pt-[36px] pb-4 space-y-2 overflow-y-auto overflow-x-hidden",children:[h.jsx(US,{aiEnabled:d,isBuilder:i,isOps:n,viewAs:s,canSeePaceBoard:a}),h.jsx(LS,{}),i&&h.jsx(HS,{}),i&&d&&h.jsx($S,{}),i&&h.jsx(VS,{}),(i||n)&&h.jsx(GS,{isBuilder:i,isOps:n})]}),h.jsx("button",{onClick:y,className:`shrink-0 py-3 text-text-tertiary hover:text-text-secondary transition-colors duration-150 ${m?"flex justify-center":"flex items-center px-7"}`,"aria-label":m?"Expand sidebar":"Collapse sidebar",children:m?h.jsx(Bv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5}):h.jsx(Lv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5})}),!m&&(o==null?void 0:o.environment)&&h.jsxs("div",{className:"shrink-0 px-5 pb-3 text-[10px] leading-tight text-text-tertiary whitespace-nowrap overflow-hidden text-ellipsis",title:`long-tail v${o.environment.longTailVersion} · HotMesh v${o.environment.hotmeshVersion} · Node ${o.environment.nodeVersion} · ${o.environment.nodeEnv}`,children:["long-tail v",o.environment.longTailVersion,h.jsx("span",{className:"mx-1 text-surface-border",children:"·"}),"HotMesh v",o.environment.hotmeshVersion]})]}),h.jsx("main",{className:"flex-1 overflow-y-auto",children:h.jsx("div",{ref:J,className:"w-full px-10 py-10 pb-16 animate-page-in h-full flex flex-col",children:h.jsx(Or,{})})})]}),h.jsx(u2,{open:g,onToggle:()=>E(G=>!G),configOpen:_,onToggleConfig:()=>T(G=>!G)}),h.jsx(v2,{open:z,onClose:()=>{M(!1),history.replaceState(null,"",window.location.pathname+window.location.search)}}),d&&h.jsx(A2,{}),d&&h.jsx(GE,{})]})}function IE(){const{isAuthenticated:i}=In(),n=xs();return i?h.jsx(rS,{children:h.jsx(E2,{children:h.jsx(FE,{})})}):h.jsx($n,{to:"/login",state:{from:n.pathname},replace:!0})}function Jg({provider:i,className:n="w-5 h-5"}){switch(i){case"google":return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:[h.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),h.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),h.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),h.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]});case"github":return h.jsx("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})});case"microsoft":return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:[h.jsx("path",{d:"M3 3h8.5v8.5H3z",fill:"#F25022"}),h.jsx("path",{d:"M12.5 3H21v8.5h-8.5z",fill:"#7FBA00"}),h.jsx("path",{d:"M3 12.5h8.5V21H3z",fill:"#00A4EF"}),h.jsx("path",{d:"M12.5 12.5H21V21h-8.5z",fill:"#FFB900"})]});case"anthropic":return h.jsx("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M13.827 3.52h3.603L24 20.48h-3.603l-6.57-16.96zm-7.258 0h3.767L16.906 20.48h-3.674l-1.343-3.461H6.396l-1.34 3.461H1.5l5.07-16.96zm2.327 5.14l-2.065 5.326h4.108l-2.043-5.326z"})});default:return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10"}),h.jsx("path",{d:"M12 8v4l3 3"})]})}}async function QE(){return Te("/auth/oauth/providers")}async function JE(i,n){const s=n?`?label=${encodeURIComponent(n)}`:"";return Te(`/auth/oauth/connections/${i}${s}`,{method:"DELETE"})}function Rj(){return xt({queryKey:["oauth-connections"],queryFn:()=>Te("/auth/oauth/connections")})}function Dj(){const i=Tt();return Rt({mutationFn:({provider:n,label:s})=>JE(n,s),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function KE(){var oe;const{login:i,isAuthenticated:n}=In(),s=My(),a=xs(),o=new URLSearchParams(a.search),f=o.get("token"),d=o.get("error"),m=((oe=a.state)==null?void 0:oe.from)??o.get("returnTo")??"/",y=j.useRef(!1);f&&!y.current&&(y.current=!0,i(f,void 0,{displayName:o.get("displayName"),username:o.get("username")}));const[g,E]=j.useState(""),[_,T]=j.useState(""),[z,M]=j.useState(d||""),[D,J]=j.useState(!1),[ie,G]=j.useState(!!f),[ce,ae]=j.useState([]),k=j.useRef(!1);if(j.useEffect(()=>{f||k.current||(k.current=!0,(async()=>{var F,V,K,Q;try{const se=await fetch(`${Ft}/api/settings`);if(!se.ok)return;const he=await se.json();if(!((F=he.auth)!=null&&F.sso))return;const Se=await fetch(`${Ft}/api/auth/sso`,{method:"POST"});if(!Se.ok){M("Host authentication required — please log in to your organization first");return}const ke=await Se.json();ke.token&&((V=he.auth)!=null&&V.ssoLogoutUrl&&sessionStorage.setItem("lt_sso_logout_url",he.auth.ssoLogoutUrl),G(!0),i(ke.token,void 0,{displayName:(K=ke.user)==null?void 0:K.display_name,username:(Q=ke.user)==null?void 0:Q.external_id}))}catch{}})())},[]),j.useEffect(()=>{f||QE().then(ae).catch(()=>{})},[]),j.useEffect(()=>{if(!ie)return;const F=setTimeout(()=>s(m,{replace:!0}),1500);return()=>clearTimeout(F)},[ie]),n&&!ie)return h.jsx($n,{to:m,replace:!0});const Z=async F=>{var V,K;if(F.preventDefault(),M(""),!g.trim()||!_){M("Username and password are required");return}J(!0);try{const Q=await fetch(`${Ft}/api/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:g.trim(),password:_})}),se=await Q.json();if(!Q.ok){M(se.error||"Login failed");return}G(!0),i(se.token,{username:g.trim(),password:_},{displayName:(V=se.user)==null?void 0:V.display_name,username:(K=se.user)==null?void 0:K.external_id})}catch{M("Unable to connect to server")}finally{J(!1)}};return h.jsx("div",{className:"min-h-screen bg-surface flex items-center justify-center overflow-hidden",children:h.jsxs("div",{className:"w-full max-w-md p-10",children:[h.jsx("div",{className:`mb-10 transition-all duration-[1500ms] ease-in ${ie?"translate-x-[120vw] -translate-y-[60vh] scale-[3] opacity-0":""}`,children:h.jsx(Ah,{size:"lg",hideLabel:ie})}),h.jsxs("form",{onSubmit:Z,className:`space-y-5 transition-opacity duration-300 ${ie?"opacity-0":""}`,children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"username",className:"block text-sm font-medium text-text-secondary mb-2",children:"Username"}),h.jsx("input",{id:"username",type:"text",value:g,onChange:F=>E(F.target.value),className:"input",placeholder:"Enter your username",autoFocus:!ie,autoComplete:"username"})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-text-secondary mb-2",children:"Password"}),h.jsx("input",{id:"password",type:"password",value:_,onChange:F=>T(F.target.value),className:"input",placeholder:"Enter your password",autoComplete:"current-password"})]}),z&&h.jsx("p",{className:"text-sm text-status-error",children:z}),h.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:D||ie,children:D?"Signing in...":"Sign In"}),ce.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center gap-3 mt-6",children:[h.jsx("div",{className:"flex-1 h-px bg-border"}),h.jsx("span",{className:"text-xs text-text-tertiary",children:"or continue with"}),h.jsx("div",{className:"flex-1 h-px bg-border"})]}),h.jsx("div",{className:"space-y-2",children:ce.filter(F=>F.provider!=="anthropic").map(F=>h.jsxs("a",{href:`${Ft}/api/auth/oauth/${F.provider}?returnTo=${encodeURIComponent(m)}`,className:"btn-secondary w-full flex items-center justify-center gap-2",children:[h.jsx(Jg,{provider:F.provider}),"Sign in with ",F.name]},F.provider))})]})]})]})})}function jy(){const{isAuthenticated:i}=In(),n=My(),s=xs(),a=new URLSearchParams(s.search),o=a.get("state")||"";j.useEffect(()=>{i||n(`/login?returnTo=${encodeURIComponent(s.pathname+s.search)}`)},[i]);const[f,d]=j.useState(""),[m,y]=j.useState(a.get("label")||"default"),[g,E]=j.useState(""),[_,T]=j.useState(!1),z=f.trim().startsWith("sk-ant-oat"),M=f.trim().startsWith("sk-ant-api"),D=J=>{J.preventDefault();const ie=f.trim();if(!ie){E("A token or API key is required");return}if(!ie.startsWith("sk-ant-")){E('Invalid format. Must start with "sk-ant-oat" (OAuth token) or "sk-ant-api" (API key)');return}T(!0),E("");const G=`${Ft}/api/auth/oauth/anthropic/callback?code=${encodeURIComponent(ie)}&state=${encodeURIComponent(o)}`;window.location.href=G};return h.jsx("div",{className:"min-h-screen bg-surface flex items-center justify-center",children:h.jsxs("div",{className:"w-full max-w-md p-10",children:[h.jsx("div",{className:"mb-10",children:h.jsx(Ah,{size:"lg"})}),h.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[h.jsx(Jg,{provider:"anthropic",className:"w-6 h-6"}),h.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Connect Anthropic"})]}),h.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"Connect your Anthropic account so Claude Code tasks run under your credentials. Your token is encrypted at rest."}),h.jsxs("form",{onSubmit:D,className:"space-y-5",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"token",className:"block text-sm font-medium text-text-secondary mb-2",children:"OAuth Token or API Key"}),h.jsx("input",{id:"token",type:"password",value:f,onChange:J=>d(J.target.value),className:"input",placeholder:"sk-ant-oat01-... or sk-ant-api03-...",autoFocus:!0,autoComplete:"off"}),z&&h.jsx("p",{className:"text-xs text-status-success mt-1",children:"OAuth token detected — uses your Claude subscription (flat rate)"}),M&&h.jsx("p",{className:"text-xs text-status-warning mt-1",children:"API key detected — billed per-token from your Anthropic API account"})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"label",className:"block text-sm font-medium text-text-secondary mb-2",children:"Label"}),h.jsx("input",{id:"label",type:"text",value:m,onChange:J=>y(J.target.value.replace(/\s+/g,"-").toLowerCase()),className:"input",placeholder:"default",autoComplete:"off"}),h.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:'A name for this credential. Use different labels to store multiple credentials (e.g., "subscription", "api-batch").'})]}),g&&h.jsx("p",{className:"text-sm text-status-error",children:g}),h.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:_,children:_?"Validating...":"Connect"}),h.jsx("a",{href:"/",className:"block text-center text-sm text-text-tertiary hover:text-text-secondary",children:"Cancel"})]}),h.jsxs("div",{className:"mt-6 space-y-3 text-xs text-text-tertiary",children:[h.jsxs("div",{children:[h.jsx("span",{className:"font-medium text-text-secondary",children:"Recommended:"})," ","Run"," ",h.jsx("code",{className:"px-1 py-0.5 bg-surface-sunken rounded text-[11px]",children:"claude setup-token"})," ","in your terminal to generate an OAuth token that uses your subscription."]}),h.jsxs("div",{children:[h.jsx("span",{className:"font-medium text-text-secondary",children:"Alternative:"})," ","Use an API key from"," ",h.jsx("a",{href:"https://console.anthropic.com/settings/keys",target:"_blank",rel:"noopener noreferrer",className:"text-accent-secondary hover:underline",children:"console.anthropic.com"})," ","(billed per-token)."]})]})]})})}function La({roleTypes:i,roleNames:n,redirectTo:s="/"}){const{isSuperAdmin:a,hasRole:o,hasRoleType:f}=In();return a?h.jsx(Or,{}):i&&i.some(d=>f(d))?h.jsx(Or,{}):n&&n.some(d=>o(d))?h.jsx(Or,{}):h.jsx($n,{to:s,replace:!0})}function XE({redirectTo:i="/"}){var a;const{data:n,isLoading:s}=Br();return s||!n?null:(a=n.ai)!=null&&a.enabled?h.jsx(Or,{}):h.jsx($n,{to:i,replace:!0})}function ZE({flag:i,redirectTo:n="/"}){var o;const{data:s,isLoading:a}=Br();return a||!s?null:((o=s.features)==null?void 0:o[i])===!1?h.jsx($n,{to:n,replace:!0}):h.jsx(Or,{})}const WE=j.lazy(()=>Ee(()=>import("./ProcessesListPage-DPrvuLoU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url).then(i=>({default:i.ProcessesListPage}))),eA=j.lazy(()=>Ee(()=>import("./ProcessDetailPage-Bcp3GKFo.js"),__vite__mapDeps([18,1,2,4,19,15,20,17,11,6,21,22,23]),import.meta.url).then(i=>({default:i.ProcessDetailPage}))),tA=j.lazy(()=>Ee(()=>import("./McpOverview-ChZ36p9t.js"),__vite__mapDeps([24,1,25,26,27,28,14,15,29,6]),import.meta.url).then(i=>({default:i.McpOverview}))),nA=j.lazy(()=>Ee(()=>import("./McpRunsPage-BHZHCwMM.js"),__vite__mapDeps([30,1,26,27,5,6,31,28,8,9,10,17,15,32,14,13,12,16,33]),import.meta.url).then(i=>({default:i.McpRunsPage}))),sA=j.lazy(()=>Ee(()=>import("./McpRunDetailPage-18d7Iqfy.js"),__vite__mapDeps([34,1,26,20,14,15,35,6,36,37,13,38,39,16]),import.meta.url).then(i=>({default:i.McpRunDetailPage}))),iA=j.lazy(()=>Ee(()=>import("./McpQueryPage-C30HsQfZ.js"),__vite__mapDeps([40,1,14,15,9,10,13,12,16,8,11,32,17,33,5,6,4,41]),import.meta.url).then(i=>({default:i.McpQueryPage}))),rA=j.lazy(()=>Ee(()=>import("./McpQueryDetailPage-X4j_jm3r.js"),__vite__mapDeps([42,1,14,15,20,41,6,27,4,43,36,26,3,2,44,45,46,47,48,49,35,50,38,39]),import.meta.url).then(i=>({default:i.McpQueryDetailPage}))),aA=j.lazy(()=>Ee(()=>import("./EscalationsOverview-BH8cxgLI.js"),__vite__mapDeps([51,1,4,14,15,29,6]),import.meta.url).then(i=>({default:i.EscalationsOverview}))),lA=j.lazy(()=>Ee(()=>import("./AvailableEscalationsPage-Dx51E6s_.js"),__vite__mapDeps([52,1,6,53,4,54,55,56,15,20,12,5,7,8,9,10,23,57,13,58,21,17,33,16]),import.meta.url).then(i=>({default:i.AvailableEscalationsPage}))),oA=j.lazy(()=>Ee(()=>import("./OperatorDashboard-BGJrxLMU.js"),__vite__mapDeps([59,1,4,5,6,7,8,9,10,14,15,12,33,57,13,58,21,17,53,16]),import.meta.url).then(i=>({default:i.OperatorDashboard}))),cA=j.lazy(()=>Ee(()=>import("./index-BeFjLCIQ.js"),__vite__mapDeps([60,1,54,55,6,56,14,15,16,53,3,4,61,20,21,35,22,23]),import.meta.url).then(i=>({default:i.EscalationDetailPage}))),uA=j.lazy(()=>Ee(()=>import("./WorkflowsOverview-CRyHvUBx.js"),__vite__mapDeps([62,1,3,4,14,15,29,6]),import.meta.url).then(i=>({default:i.WorkflowsOverview}))),fA=j.lazy(()=>Ee(()=>import("./index-YWvrMcqh.js"),__vite__mapDeps([63,1,3,14,15,13,17,64,47,48,6]),import.meta.url).then(i=>({default:i.StartWorkflowPage}))),hA=j.lazy(()=>Ee(()=>import("./index-YWvrMcqh.js"),__vite__mapDeps([63,1,3,14,15,13,17,64,47,48,6]),import.meta.url).then(i=>({default:i.DurableInvokePage}))),dA=j.lazy(()=>Ee(()=>import("./WorkflowsDashboard-DOyZbqzf.js"),__vite__mapDeps([65,1,32,3,31,28,6,4,5,8,9,10,17,15,14,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"durable"})}))),mA=j.lazy(()=>Ee(()=>import("./WorkflowsDashboard-DOyZbqzf.js"),__vite__mapDeps([65,1,32,3,31,28,6,4,5,8,9,10,17,15,14,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"all"})}))),pA=j.lazy(()=>Ee(()=>import("./YamlWorkflowsPage-HnI-9eBW.js"),__vite__mapDeps([66,1,27,5,6,14,15,13,10,49,64,20]),import.meta.url).then(i=>({default:i.YamlWorkflowsPage}))),yA=j.lazy(()=>Ee(()=>import("./GraphInvokePage-Cf9c_LJ-.js"),__vite__mapDeps([67,1,27,14,15,44,46,47,48,45,6,49,64]),import.meta.url).then(i=>({default:i.GraphInvokePage}))),gA=j.lazy(()=>Ee(()=>import("./YamlWorkflowDetailPage-DRBmQXY6.js"),__vite__mapDeps([68,1,27,20,64,15,6]),import.meta.url).then(i=>({default:i.YamlWorkflowDetailPage}))),bA=j.lazy(()=>Ee(()=>import("./TasksListPage-DNGp5lfi.js"),__vite__mapDeps([69,1,2,3,5,6,9,10,20,58,50,12,13,14,15,17]),import.meta.url).then(i=>({default:i.TasksListPage}))),xA=j.lazy(()=>Ee(()=>import("./TaskDetailPage-DVr31zDE.js"),__vite__mapDeps([70,1,2,20,58,14,15,6]),import.meta.url).then(i=>({default:i.TaskDetailPage}))),Oy=j.lazy(()=>Ee(()=>import("./WorkflowExecutionPage-CSw2aQJC.js"),__vite__mapDeps([71,1,3,4,37,13,38,20,6,39,15,2,14,36,16,61,35]),import.meta.url).then(i=>({default:i.WorkflowExecutionPage}))),vA=j.lazy(()=>Ee(()=>import("./AdminDashboard-D7Amh-EJ.js"),__vite__mapDeps([72,1,2,4,25,19,15,6]),import.meta.url).then(i=>({default:i.AdminDashboard}))),_A=j.lazy(()=>Ee(()=>import("./index-D1Q8WfGN.js"),__vite__mapDeps([73,1,3,9,10,13,33,5,6,14,15,74,17]),import.meta.url).then(i=>({default:i.WorkersPage}))),wA=j.lazy(()=>Ee(()=>import("./index-O2wWcCLo.js"),__vite__mapDeps([75,1,3,13,76,55,6,21,15,17,14,47,48,64]),import.meta.url).then(i=>({default:i.WorkflowConfigsPage}))),Ty=j.lazy(()=>Ee(()=>import("./index-O2wWcCLo.js"),__vite__mapDeps([75,1,3,13,76,55,6,21,15,17,14,47,48,64]),import.meta.url).then(i=>({default:i.WorkflowConfigDetailPage}))),SA=j.lazy(()=>Ee(()=>import("./index-BXrm76Hm.js"),__vite__mapDeps([77,1,25,10,76,55,6,14,15,13,12,5,78,46,47,48,49,45,33,20]),import.meta.url).then(i=>({default:i.McpServersPage}))),ky=j.lazy(()=>Ee(()=>import("./index-DSjih1iX.js"),__vite__mapDeps([79,1,25,14,15,43,6]),import.meta.url).then(i=>({default:i.McpServerDetailPage}))),EA=j.lazy(()=>Ee(()=>import("./index-CVMA5PVQ.js"),__vite__mapDeps([80,1,23,5,6,9,10,12,13,76,55,33,14,15,21,48,11,50]),import.meta.url).then(i=>({default:i.UsersPage}))),AA=j.lazy(()=>Ee(()=>import("./RolesPage-D3NNU92h.js"),__vite__mapDeps([81,1,14,15,55,6]),import.meta.url).then(i=>({default:i.RolesPage}))),jA=j.lazy(()=>Ee(()=>import("./RoleDetailPage-Ws3umQKQ.js"),__vite__mapDeps([82,1,76,55,6,23,15]),import.meta.url).then(i=>({default:i.RoleDetailPage}))),OA=j.lazy(()=>Ee(()=>import("./EscalationSchemaPage-DnEnvolM.js"),__vite__mapDeps([83,1,15,6]),import.meta.url).then(i=>({default:i.EscalationSchemaPage}))),TA=j.lazy(()=>Ee(()=>import("./EscalationListSchemaPage-CLdsR-hK.js"),__vite__mapDeps([84,1,15,6]),import.meta.url).then(i=>({default:i.EscalationListSchemaPage}))),kA=j.lazy(()=>Ee(()=>import("./index-Dx6-4esw.js"),__vite__mapDeps([85,1,14,15,55,6,56]),import.meta.url).then(i=>({default:i.MaintenancePage}))),NA=j.lazy(()=>Ee(()=>import("./OperationsPage-GMojwL3q.js").then(i=>i.O),__vite__mapDeps([86,1,4,14,15,6]),import.meta.url).then(i=>({default:i.OperationsPage}))),CA=j.lazy(()=>Ee(()=>import("./index-BI-9M7z3.js"),__vite__mapDeps([87,1,19,15,13,5,6,31,28,55,36,74,9,10,33]),import.meta.url).then(i=>({default:i.ControlPlanePage}))),MA=j.lazy(()=>Ee(()=>import("./index-CP6D_Gtw.js"),__vite__mapDeps([88,1,61,15,39,5,6,31,28,8,9,10,12,13,14,16]),import.meta.url).then(i=>({default:i.StreamMessagesPage}))),RA=j.lazy(()=>Ee(()=>import("./CredentialsPage-CaH3J3SE.js"),__vite__mapDeps([89,1,14,15,50,76,55,6]),import.meta.url).then(i=>({default:i.CredentialsPage}))),DA=j.lazy(()=>Ee(()=>import("./index-B4FaugP1.js"),__vite__mapDeps([90,1,6,14,15,13,16,8,10,91,50]),import.meta.url).then(i=>({default:i.FilesPage}))),qA=j.lazy(()=>Ee(()=>import("./index-CWkAN6wc.js"),__vite__mapDeps([92,1,14,15,13,16,12,10,91,50,93,43,6]),import.meta.url).then(i=>({default:i.KnowledgePage}))),zA=j.lazy(()=>Ee(()=>import("./HomePage-BdCtKXAV.js"),__vite__mapDeps([94,1,3,26,28,4,21,15,17,16,86,14,6]),import.meta.url).then(i=>({default:i.HomePage}))),UA=j.lazy(()=>Ee(()=>import("./AgentsPage-D7WePZ0o.js"),__vite__mapDeps([95,1,96,4,5,6,8,9,10,12,13,14,15,16]),import.meta.url).then(i=>({default:i.AgentsPage}))),BA=j.lazy(()=>Ee(()=>import("./AgentDetailPage-Dy3Qvlfk.js"),__vite__mapDeps([97,1,96,98,15,4,17,6]),import.meta.url).then(i=>({default:i.AgentDetailPage}))),Ny=j.lazy(()=>Ee(()=>import("./AgentConfigPage-CW2udbSO.js"),__vite__mapDeps([99,1,96,98,15,14,93,46,47,48,3,27,100,101,17,6]),import.meta.url).then(i=>({default:i.AgentConfigPage}))),LA=j.lazy(()=>Ee(()=>import("./CapabilitiesPage-3VTLEPGO.js"),__vite__mapDeps([102,1,100,78,25,46,47,48,15,49,6,45,14,13]),import.meta.url).then(i=>({default:i.CapabilitiesPage}))),HA=j.lazy(()=>Ee(()=>import("./TopicsPage-Ctb_85Tw.js"),__vite__mapDeps([103,1,101,14,15,13,6]),import.meta.url).then(i=>({default:i.TopicsPage}))),PA=j.lazy(()=>Ee(()=>import("./TopicDetailPage-ynUkO1A8.js"),__vite__mapDeps([104,1,101,16,15,6]),import.meta.url).then(i=>({default:i.TopicDetailPage})));function $A(){return h.jsxs("div",{className:"animate-pulse space-y-4",children:[h.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),h.jsx("div",{className:"h-40 bg-surface-sunken rounded"})]})}function we({children:i}){return h.jsx(j.Suspense,{fallback:h.jsx($A,{}),children:h.jsx("div",{className:"animate-page-enter flex flex-col flex-1 min-h-0",children:i})})}const Kg=new lv({defaultOptions:{queries:{staleTime:1e4,retry:(i,n)=>n instanceof Error&&n.message==="Session expired"?!1:i<1}}});window.addEventListener("auth:unauthorized",()=>{Kg.clear(),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info");const i=window.__LT_BASE__||"",n=`${i}/login`;if(window.location.pathname!==n){const s=window.location.pathname+window.location.search,a=i&&s.startsWith(i)?s.slice(i.length)||"/":s;window.location.href=`${n}?returnTo=${encodeURIComponent(a)}`}});const YA=uv([{path:"/login",element:h.jsx(KE,{})},{path:"/connect/anthropic",element:h.jsx(jy,{})},{path:"/connect/:provider",element:h.jsx(jy,{})},{path:"/",element:h.jsx(IE,{}),children:[{index:!0,element:h.jsx(we,{children:h.jsx(zA,{})})},{path:"processes/all",element:h.jsx(we,{children:h.jsx(WE,{})})},{path:"processes/detail/:originId",element:h.jsx(we,{children:h.jsx(eA,{})})},{path:"credentials",element:h.jsx(we,{children:h.jsx(RA,{})})},{path:"connections",element:h.jsx($n,{to:"/credentials",replace:!0})},{path:"escalations",element:h.jsx(we,{children:h.jsx(aA,{})})},{path:"escalations/available",element:h.jsx(we,{children:h.jsx(lA,{})})},{path:"escalations/queue",element:h.jsx(we,{children:h.jsx(oA,{})})},{path:"escalations/detail/:id",element:h.jsx(we,{children:h.jsx(cA,{})})},{path:"capabilities",element:h.jsx(we,{children:h.jsx(LA,{})})},{path:"agents",element:h.jsx(we,{children:h.jsx(UA,{})})},{path:"agents/new",element:h.jsx(we,{children:h.jsx(Ny,{})})},{path:"agents/:id",element:h.jsx(we,{children:h.jsx(BA,{})})},{path:"agents/:id/edit",element:h.jsx(we,{children:h.jsx(Ny,{})})},{path:"topics",element:h.jsx(we,{children:h.jsx(HA,{})})},{path:"topics/:topic",element:h.jsx(we,{children:h.jsx(PA,{})})},{element:h.jsx(La,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"workflows",element:h.jsx(we,{children:h.jsx(uA,{})})},{path:"workflows/executions",element:h.jsx(we,{children:h.jsx(mA,{})})},{path:"workflows/durable/executions",element:h.jsx(we,{children:h.jsx(dA,{})})},{path:"workflows/durable/executions/:workflowId",element:h.jsx(we,{children:h.jsx(Oy,{})})},{path:"workflows/tasks",element:h.jsx(we,{children:h.jsx(bA,{})})},{path:"workflows/tasks/detail/:id",element:h.jsx(we,{children:h.jsx(xA,{})})},{path:"workflows/executions/:workflowId",element:h.jsx(we,{children:h.jsx(Oy,{})})},{path:"workflows/start",element:h.jsx(we,{children:h.jsx(fA,{})})},{path:"workflows/durable/invoke",element:h.jsx(we,{children:h.jsx(hA,{})})},{path:"workflows/cron",element:h.jsx($n,{to:"/workflows/start?mode=schedule",replace:!0})},{path:"workflows/workers",element:h.jsx(we,{children:h.jsx(_A,{})})},{path:"workflows/registry",element:h.jsx(we,{children:h.jsx(wA,{})})},{path:"workflows/registry/new",element:h.jsx(we,{children:h.jsx(Ty,{})})},{path:"workflows/registry/:workflowType",element:h.jsx(we,{children:h.jsx(Ty,{})})}]},{element:h.jsx(La,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"mcp/workflows",element:h.jsx(we,{children:h.jsx(pA,{})})},{path:"mcp/workflows/invoke",element:h.jsx(we,{children:h.jsx(yA,{})})},{path:"mcp/workflows/:id",element:h.jsx(we,{children:h.jsx(gA,{})})},{path:"mcp/executions",element:h.jsx(we,{children:h.jsx(nA,{})})},{path:"mcp/executions/:jobId",element:h.jsx(we,{children:h.jsx(sA,{})})},{path:"files",element:h.jsx(we,{children:h.jsx(DA,{})})},{path:"knowledge",element:h.jsx(we,{children:h.jsx(qA,{})})},{element:h.jsx(XE,{}),children:[{path:"mcp",element:h.jsx(we,{children:h.jsx(tA,{})})},{path:"mcp/queries",element:h.jsx(we,{children:h.jsx(iA,{})})},{path:"mcp/queries/:workflowId",element:h.jsx(we,{children:h.jsx(rA,{})})},{path:"mcp/tools",element:h.jsx($n,{to:"/mcp/servers",replace:!0})},{path:"mcp/servers",element:h.jsx(we,{children:h.jsx(SA,{})})},{path:"mcp/servers/new",element:h.jsx(we,{children:h.jsx(ky,{})})},{path:"mcp/servers/:serverId",element:h.jsx(we,{children:h.jsx(ky,{})})}]}]},{element:h.jsx(La,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"operations",element:h.jsx(we,{children:h.jsx(NA,{})})}]},{element:h.jsx(La,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"admin",element:h.jsx(we,{children:h.jsx(vA,{})})},{path:"admin/users",element:h.jsx(we,{children:h.jsx(EA,{})})},{path:"admin/escalation-chains",element:h.jsx($n,{to:"/admin/roles",replace:!0})},{path:"admin/roles",element:h.jsx(we,{children:h.jsx(AA,{})})},{path:"admin/roles/:role",element:h.jsx(we,{children:h.jsx(jA,{})})},{path:"admin/roles/:role/schema",element:h.jsx(we,{children:h.jsx(OA,{})})},{path:"admin/roles/:role/list-schema",element:h.jsx(we,{children:h.jsx(TA,{})})}]},{element:h.jsx(La,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"admin/bots",element:h.jsx($n,{to:"/admin/users?tab=service-accounts",replace:!0})},{element:h.jsx(ZE,{flag:"dbMaintenance"}),children:[{path:"admin/maintenance",element:h.jsx(we,{children:h.jsx(kA,{})})}]},{path:"admin/controlplane",element:h.jsx(we,{children:h.jsx(CA,{})})},{path:"admin/streams",element:h.jsx(we,{children:h.jsx(MA,{})})}]}]}],{basename:window.__LT_BASE__||"/"});function VA(){return h.jsx(ov,{client:Kg,children:h.jsx(Qv,{children:h.jsx(Zw,{children:h.jsx(fv,{router:YA})})})})}Cg(Ng());Vv.createRoot(document.getElementById("root")).render(h.jsx(j.StrictMode,{children:h.jsx(VA,{})}));export{xj as $,SS as A,lS as B,Oh as C,HE as D,vj as E,Ug as F,Nh as G,sj as H,Cj as I,l2 as J,kj as K,tj as L,Th as M,X_ as N,rj as O,fj as P,pj as Q,kh as R,JS as S,Qg as T,Nj as U,wj as V,mj as W,Sj as X,Ej as Y,yj as Z,gj as _,Mj as a,bj as a0,_j as a1,Oj as a2,Ft as a3,By as a4,KA as a5,Aj as a6,jj as a7,Ro as a8,Ya as a9,Sr as aa,_r as ab,Rj as ac,Dj as ad,Jg as ae,BS as af,vg as ag,Tj as ah,LE as b,W_ as c,Te as d,ej as e,zE as f,nj as g,ij as h,XA as i,wS as j,aS as k,gg as l,In as m,WA as n,xg as o,aj as p,lj as q,oj as r,cj as s,uj as t,Br as u,hj as v,dj as w,Eg as x,ZA as y,jg as z};
63
+ //# sourceMappingURL=index-iX8HLLB9.js.map