@openscout/scout 0.2.96 → 0.2.97

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 (305) hide show
  1. package/bin/scoutd +0 -0
  2. package/dist/build-manifest.json +3 -3
  3. package/dist/client/assets/{ActivityScreen-BnoaUkVZ.js → ActivityScreen-y-5DLleY.js} +1 -1
  4. package/dist/client/assets/{AddProjectForm-IqOtJfRs.js → AddProjectForm-r_1tVuWk.js} +1 -1
  5. package/dist/client/assets/{AgentAvatar-6-KBVKUu.js → AgentAvatar-B7c0egdP.js} +1 -1
  6. package/dist/client/assets/{AgentConfigurationScreen-CuZJy07q.js → AgentConfigurationScreen-BD7Unt2P.js} +1 -1
  7. package/dist/client/assets/{AgentDefinitionsWorkspace-Iyl4BesU.js → AgentDefinitionsWorkspace-BbcZc9Xk.js} +1 -1
  8. package/dist/client/assets/{AgentDetailCard-C9rn3Fj5.js → AgentDetailCard-B_KLcgsP.js} +1 -1
  9. package/dist/client/assets/{AgentFloorView-YT-Jjccf.js → AgentFloorView-DMFiHs21.js} +1 -1
  10. package/dist/client/assets/{AgentInfoScreen-Dr99gQEZ.js → AgentInfoScreen-DHGLRddI.js} +1 -1
  11. package/dist/client/assets/{AgentLaneCard-DI2iW9zO.js → AgentLaneCard-ajZvcfdW.js} +1 -1
  12. package/dist/client/assets/{AgentLaneChrome-D8bARHMx.js → AgentLaneChrome-CTp39syR.js} +1 -1
  13. package/dist/client/assets/{AgentLaneDetailSheet-52un7dKC.js → AgentLaneDetailSheet-DRc-TpMB.js} +1 -1
  14. package/dist/client/assets/{AgentLaneSummaryResize-CEBjmPTa.js → AgentLaneSummaryResize-VMNDo7kD.js} +1 -1
  15. package/dist/client/assets/AgentLanesEmbedScreen-C5k_dDS8.js +1 -0
  16. package/dist/client/assets/{AgentLanesPreflight-q20mTjms.js → AgentLanesPreflight-CFadSaia.js} +1 -1
  17. package/dist/client/assets/{AgentLanesView-CetZZDyF.js → AgentLanesView-u5vpLwQf.js} +1 -1
  18. package/dist/client/assets/{AgentLiveActions-DrEJDJef.js → AgentLiveActions-CsQA3pu_.js} +1 -1
  19. package/dist/client/assets/{AgentMasterScreen-DJPnstoD.js → AgentMasterScreen-C5WlWNmk.js} +1 -1
  20. package/dist/client/assets/{AgentSessions-DCPCG4xb.js → AgentSessions-BePq5Lgc.js} +1 -1
  21. package/dist/client/assets/{AgentsConsole-CsYOoFJi.js → AgentsConsole-BuiZ_bDo.js} +1 -1
  22. package/dist/client/assets/{AgentsScreen-k8LvBuU_.js → AgentsScreen-CRi-hG2k.js} +1 -1
  23. package/dist/client/assets/AgentsSubnav-DUsya4WK.js +1 -0
  24. package/dist/client/assets/{AstronautSuit-DbjQtfD_.js → AstronautSuit-Cjjcv6yQ.js} +1 -1
  25. package/dist/client/assets/{AtopView-Daq_ob3z.js → AtopView-PxWQd-sX.js} +1 -1
  26. package/dist/client/assets/{BackToPicker-CXZjBRAe.js → BackToPicker-Cto0Ioz9.js} +1 -1
  27. package/dist/client/assets/{BriefingDetailScreen-CUCXO-KH.js → BriefingDetailScreen-C29smC5d.js} +1 -1
  28. package/dist/client/assets/{BriefingsScreen-B5oMTGKv.js → BriefingsScreen-DNyFBrPn.js} +1 -1
  29. package/dist/client/assets/{BrokerMetadataPanel-BsiU8lTD.js → BrokerMetadataPanel-DbaCQlhw.js} +1 -1
  30. package/dist/client/assets/{BrokerScreen-BPbOHhCS.js → BrokerScreen-CS0s4Gm4.js} +1 -1
  31. package/dist/client/assets/{CastPicker-_5E5hNUe.js → CastPicker-CTBHjjGw.js} +1 -1
  32. package/dist/client/assets/{ChatCollapsedStrip-D-eXhzPf.js → ChatCollapsedStrip-D4rc7wBQ.js} +1 -1
  33. package/dist/client/assets/{CodeDiffPane-n7W4iGUG.js → CodeDiffPane-QvxCUzTi.js} +1 -1
  34. package/dist/client/assets/{CodeProjectPicker-CMsbSTDq.js → CodeProjectPicker-DplkpM7f.js} +1 -1
  35. package/dist/client/assets/{CodeScreen-CeuO3EhR.js → CodeScreen-CrR2JaVj.js} +1 -1
  36. package/dist/client/assets/{ConversationComposer-CXPKx86g.js → ConversationComposer-H8_hsYSc.js} +1 -1
  37. package/dist/client/assets/{ConversationFeedRows-WrH-YI3L.js → ConversationFeedRows-hlEFlURs.js} +1 -1
  38. package/dist/client/assets/{ConversationHeader-BQWzGzLK.js → ConversationHeader-B0ZBhE_E.js} +1 -1
  39. package/dist/client/assets/{ConversationPanels-Dujvnmup.js → ConversationPanels-fMo6Uy1v.js} +2 -2
  40. package/dist/client/assets/{ConversationScreen-CR9pWB65.js → ConversationScreen-CXAHQwQ3.js} +1 -1
  41. package/dist/client/assets/{ConversationStatus-DVzSb2Hv.js → ConversationStatus-DI5GCiyW.js} +1 -1
  42. package/dist/client/assets/{CrewAvatar-BwXjyg8N.js → CrewAvatar-CXJHLNVM.js} +1 -1
  43. package/dist/client/assets/CrewWorkspaces-Bz2Dcnt4.js +1 -0
  44. package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +1 -0
  45. package/dist/client/assets/{DataTable-Bp8tU9AK.js → DataTable-DXIlOlVu.js} +1 -1
  46. package/dist/client/assets/{DispatchAftermath-B-6rmXzL.js → DispatchAftermath-CrELgl2e.js} +1 -1
  47. package/dist/client/assets/{DocumentFocusViewer-Do3wQ_3Z.js → DocumentFocusViewer-DFFE85Tq.js} +1 -1
  48. package/dist/client/assets/{EmbeddableSurfacesLab-C1orRyP9.js → EmbeddableSurfacesLab-DgpewB3y.js} +1 -1
  49. package/dist/client/assets/{EmptyState-CJzXj1l5.js → EmptyState-D9X16fKq.js} +1 -1
  50. package/dist/client/assets/{FileViewerPane-Df6VzXjA.js → FileViewerPane-CY0RN78e.js} +1 -1
  51. package/dist/client/assets/{FlightObserveScreen-6mGnmWQA.js → FlightObserveScreen-qyzHzxLa.js} +1 -1
  52. package/dist/client/assets/{FollowScreen-DvnxYLVh.js → FollowScreen-wZ-z67mX.js} +1 -1
  53. package/dist/client/assets/{HarnessMark-B979GCSB.js → HarnessMark-DAaWPiT_.js} +1 -1
  54. package/dist/client/assets/{HarnessesScreen-CHTuv8p6.js → HarnessesScreen-DbKkQM4o.js} +1 -1
  55. package/dist/client/assets/{HerdrSession-B3McuYgi.js → HerdrSession-CYKRfBad.js} +1 -1
  56. package/dist/client/assets/{HomeHero-CdUVPjkG.js → HomeHero-DYyd3cpz.js} +1 -1
  57. package/dist/client/assets/{HostAdvisorView-Bok5Sk5c.js → HostAdvisorView-NtM0bsg8.js} +1 -1
  58. package/dist/client/assets/{KnowledgeSearchInspector-B7XSoJsu.js → KnowledgeSearchInspector-CU6BCFcS.js} +1 -1
  59. package/dist/client/assets/{KnowledgeSearchScreen-D3o3IODW.js → KnowledgeSearchScreen-DvbRRPQB.js} +1 -1
  60. package/dist/client/assets/{LaneToolHoverCard-HByf2ndx.js → LaneToolHoverCard-Bo2Zl-1a.js} +1 -1
  61. package/dist/client/assets/{LaneTraceDetailSheet-BUgHz-sd.js → LaneTraceDetailSheet-C3C8UjXv.js} +1 -1
  62. package/dist/client/assets/{LaneTraceEventFocus-DM-hoPxG.js → LaneTraceEventFocus-Cek_64zR.js} +1 -1
  63. package/dist/client/assets/{MeshCanvas-DCLJRsBy.js → MeshCanvas-TvsID4fe.js} +1 -1
  64. package/dist/client/assets/{MeshCanvasMinimap-cEFS9eW7.js → MeshCanvasMinimap-CxqeVVco.js} +1 -1
  65. package/dist/client/assets/{MeshScreen-BcxPkhm6.js → MeshScreen-BJ-j9YXv.js} +1 -1
  66. package/dist/client/assets/{MeshTopologyView-CCRPd8PU.js → MeshTopologyView-BjprutE8.js} +2 -2
  67. package/dist/client/assets/{MessagesScreen-Bb5l13MO.js → MessagesScreen-CyNIZ3-X.js} +1 -1
  68. package/dist/client/assets/{MissionContextRail-DF0_kiU7.js → MissionContextRail-Be0uXljQ.js} +1 -1
  69. package/dist/client/assets/{MissionControlView-E3V7bENU.js → MissionControlView-Bj7cAbZd.js} +1 -1
  70. package/dist/client/assets/{MissionFocusOverlay-h15sQFvP.js → MissionFocusOverlay-DvTw6ts5.js} +1 -1
  71. package/dist/client/assets/{MissionLeftAgentRow-KPdk9rSa.js → MissionLeftAgentRow-B0QG7Gys.js} +1 -1
  72. package/dist/client/assets/{MissionLogPane-BbdDKjUl.js → MissionLogPane-EsM_S3ro.js} +1 -1
  73. package/dist/client/assets/{NewAgentModal-DfHxad34.js → NewAgentModal-Cqiq1CE1.js} +1 -1
  74. package/dist/client/assets/{NewChatComposer-_Stj0fZy.js → NewChatComposer-C_1op4dH.js} +1 -1
  75. package/dist/client/assets/{NewChatOrigin-B1u7ki70.js → NewChatOrigin-D7hwp6dm.js} +1 -1
  76. package/dist/client/assets/{ObserveEmbedScreen-Co0xTii6.js → ObserveEmbedScreen-CGHI_hb5.js} +1 -1
  77. package/dist/client/assets/{ObserveTextFlow-ZQWwrK3i.js → ObserveTextFlow-BcrGQet8.js} +2 -2
  78. package/dist/client/assets/{ObservedTopologyPanel-BJUhDSuQ.js → ObservedTopologyPanel-BhVsvwkh.js} +1 -1
  79. package/dist/client/assets/{OpenScoutAppShell-CUd2yOLu.js → OpenScoutAppShell-BtfvMkAp.js} +1 -1
  80. package/dist/client/assets/{OpsAgentsView-DI5wu1si.js → OpsAgentsView-DBYtmLnh.js} +1 -1
  81. package/dist/client/assets/OpsScreen-CuYVgkC_.js +1 -0
  82. package/dist/client/assets/OpsSubnav-BEU4kKXm.js +1 -0
  83. package/dist/client/assets/ProjectAgentProfile-BhXAZEkW.js +1 -0
  84. package/dist/client/assets/{ProjectAgentProfileBar-k2QHHHsQ.js → ProjectAgentProfileBar-uJw9Wdfk.js} +1 -1
  85. package/dist/client/assets/{ProjectAgentProfileHero-Bpxk1ui2.js → ProjectAgentProfileHero-CIMS4Dy_.js} +1 -1
  86. package/dist/client/assets/{ProjectsInbox-C_bMHLCc.js → ProjectsInbox-JgU0lrY8.js} +1 -1
  87. package/dist/client/assets/{ProjectsRail-J-aH_pxT.js → ProjectsRail-p99BRBOa.js} +1 -1
  88. package/dist/client/assets/ProjectsScreen-BB45DU53.js +1 -0
  89. package/dist/client/assets/{ProjectsThreadAside-_ourdM-Q.js → ProjectsThreadAside-BHDTJWOz.js} +1 -1
  90. package/dist/client/assets/{Provider-CtXJeLrP.js → Provider-Bu-C8Hxc.js} +1 -1
  91. package/dist/client/assets/{RailRow-CEH2MFBw.js → RailRow-ClMmtaIE.js} +1 -1
  92. package/dist/client/assets/{RawSessionsTable-CDyrom-F.js → RawSessionsTable-BtKdQPiv.js} +1 -1
  93. package/dist/client/assets/{RealtimeVoiceScreen-DBl3DN1H.js → RealtimeVoiceScreen-KPHJgO1l.js} +1 -1
  94. package/dist/client/assets/{RepoDiffEmbedScreen-kY2pHjIs.js → RepoDiffEmbedScreen-CjZ5ew3y.js} +1 -1
  95. package/dist/client/assets/{RepoDiffPageScreen-C6LhoKrn.js → RepoDiffPageScreen-CdTFfmbk.js} +1 -1
  96. package/dist/client/assets/{RepoDiffViewer-BhcIIQQg.js → RepoDiffViewer-BFperHQg.js} +1 -1
  97. package/dist/client/assets/{RepoDiffViewerLazy-Csy_j9LD.js → RepoDiffViewerLazy-BkBmbi1Z.js} +2 -2
  98. package/dist/client/assets/{ReposScreen-B_cB0zu7.js → ReposScreen-C8dT4bK0.js} +1 -1
  99. package/dist/client/assets/{ScoutDeckSurface-CSy_fjcG.js → ScoutDeckSurface-BcJsm2Kq.js} +1 -1
  100. package/dist/client/assets/{ScoutSurface-CQVcSrin.js → ScoutSurface-DmzEtrx8.js} +1 -1
  101. package/dist/client/assets/{ScoutbotFxLab-DqGiLYNy.js → ScoutbotFxLab-DU15Plja.js} +1 -1
  102. package/dist/client/assets/{SecondaryNav-BR4VRdgh.js → SecondaryNav-BrXMtvKE.js} +1 -1
  103. package/dist/client/assets/{SessionEmbedScreen-BTlZ9gAg.js → SessionEmbedScreen-Bt4flmAx.js} +1 -1
  104. package/dist/client/assets/{SessionObserve-dQDN23pP.js → SessionObserve-BCehTlO8.js} +1 -1
  105. package/dist/client/assets/{SessionObserveEvidence-BRBGKAgd.js → SessionObserveEvidence-Bb6U-dem.js} +1 -1
  106. package/dist/client/assets/{SessionRefScreen-COVQMbtE.js → SessionRefScreen-C8BiRVPx.js} +1 -1
  107. package/dist/client/assets/SessionsScreen-BNvjUflN.js +1 -0
  108. package/dist/client/assets/{SettingsDrawer-RGVK_bmE.js → SettingsDrawer-BieUmb8g.js} +1 -1
  109. package/dist/client/assets/{SettingsScreen-CCxzy5IU.js → SettingsScreen-3JvX1WFL.js} +1 -1
  110. package/dist/client/assets/{ShikiPane-DYI9Hkge.js → ShikiPane-DPWsVNtn.js} +1 -1
  111. package/dist/client/assets/{SlidePanel-B9ugxWgA.js → SlidePanel-BMRIR6bH.js} +1 -1
  112. package/dist/client/assets/{SpriteAvatar-z5hHesx9.js → SpriteAvatar-56DTXxSV.js} +1 -1
  113. package/dist/client/assets/{StatusPill-BFvMjmZV.js → StatusPill-BcuYUgsD.js} +1 -1
  114. package/dist/client/assets/{TailView-0uEIj2JH.js → TailView-BDy8c2VB.js} +1 -1
  115. package/dist/client/assets/{Terminal-DouZeNxc.js → Terminal-BlUQY9_Z.js} +1 -1
  116. package/dist/client/assets/{TerminalEmbedScreen-dMNUbzXr.js → TerminalEmbedScreen-DTjxktyr.js} +1 -1
  117. package/dist/client/assets/{TerminalHeaderMount-BL07cd0q.js → TerminalHeaderMount-Cy-uxkey.js} +1 -1
  118. package/dist/client/assets/{TextDocumentSurface-BflAwXeZ.js → TextDocumentSurface-BeSwe3Yl.js} +1 -1
  119. package/dist/client/assets/{TmuxPeek-BTnjOQi0.js → TmuxPeek-B4no_aGI.js} +1 -1
  120. package/dist/client/assets/{VoicePermissionsPanel-CgQ6GGS-.js → VoicePermissionsPanel-Bd16scwz.js} +1 -1
  121. package/dist/client/assets/{WorkDetailScreen-CaLG-zDs.js → WorkDetailScreen-DIFQufak.js} +1 -1
  122. package/dist/client/assets/{WorkFilesViewer-B9Sil_No.js → WorkFilesViewer-CT5XEFGf.js} +1 -1
  123. package/dist/client/assets/{activity-DcrMApUY.js → activity-CqZafWfx.js} +1 -1
  124. package/dist/client/assets/{addon-fit-DMVrz5Sv.js → addon-fit-CM6F_JRD.js} +1 -1
  125. package/dist/client/assets/{addon-webgl-BYvpZUyu.js → addon-webgl-DRTiePFC.js} +1 -1
  126. package/dist/client/assets/{agent-autocomplete-B-5QTeas.js → agent-autocomplete-DXUBnlkN.js} +1 -1
  127. package/dist/client/assets/{agent-essentials-D7KRGYvF.js → agent-essentials-vytdybaX.js} +1 -1
  128. package/dist/client/assets/{agent-master-model-DqjrVI2h.js → agent-master-model-DAZL92oe.js} +1 -1
  129. package/dist/client/assets/{agent-specialization-BujJVUTD.js → agent-specialization-BtxLN4UR.js} +1 -1
  130. package/dist/client/assets/agents-project-DgbqDc65.css +1 -0
  131. package/dist/client/assets/{arc.es-NHqHWohb.js → arc.es-Bh84oHJ7.js} +1 -1
  132. package/dist/client/assets/{arrow-down-CKtSUjmW.js → arrow-down-DvTsLokL.js} +1 -1
  133. package/dist/client/assets/{arrow-left-Czpf-AE4.js → arrow-left-DHfdXJVZ.js} +1 -1
  134. package/dist/client/assets/{arrow-right-BuzMnLYP.js → arrow-right-BBsrogWf.js} +1 -1
  135. package/dist/client/assets/{arrow-up-right-C6Wl-1uw.js → arrow-up-right-CY0Vw_67.js} +1 -1
  136. package/dist/client/assets/{bot-rd0awxD3.js → bot-DzkOUFBb.js} +1 -1
  137. package/dist/client/assets/{check-ofKUE8yH.js → check-DbIkldnK.js} +1 -1
  138. package/dist/client/assets/{chevron-down-wciXnOQz.js → chevron-down-C475vltS.js} +1 -1
  139. package/dist/client/assets/{chevron-right-D-HdlPg8.js → chevron-right-CnZRSd-V.js} +1 -1
  140. package/dist/client/assets/{chunk-HRAB3GC3-Tyv9rzx7.js → chunk-HRAB3GC3-DLNT8aOo.js} +1 -1
  141. package/dist/client/assets/{chunk-JTPDIGGW-BC2Mandc.js → chunk-JTPDIGGW-Ci5j4vzV.js} +3 -3
  142. package/dist/client/assets/{chunk-T65CQEWV-C1AWTYZZ.js → chunk-T65CQEWV-BtNvicWs.js} +1 -1
  143. package/dist/client/assets/{chunk-YOZR3KYS-DwHPHa6f.js → chunk-YOZR3KYS-DN5EJulq.js} +1 -1
  144. package/dist/client/assets/{clock-B88r8OrZ.js → clock-DVvENUU5.js} +1 -1
  145. package/dist/client/assets/{code-xml-D7pOQM9l.js → code-xml-CvKBY3KA.js} +1 -1
  146. package/dist/client/assets/{compass-Dt1AMXz2.js → compass-BcRI_YXo.js} +1 -1
  147. package/dist/client/assets/content--T3p6akp.js +1 -0
  148. package/dist/client/assets/content-4nFMLuzF.js +1 -0
  149. package/dist/client/assets/content-BJ4nHvcu.js +1 -0
  150. package/dist/client/assets/{content-nkx0swDe.js → content-BNyAjpUl.js} +1 -1
  151. package/dist/client/assets/content-BmGp9wNl.js +1 -0
  152. package/dist/client/assets/content-CBWhwaRo.js +1 -0
  153. package/dist/client/assets/{content-C9ijJxyl.js → content-CQlykFbe.js} +1 -1
  154. package/dist/client/assets/content-CevL0DgF.js +1 -0
  155. package/dist/client/assets/content-Ch8pf2bj.js +1 -0
  156. package/dist/client/assets/content-Cpvdcm_l.js +1 -0
  157. package/dist/client/assets/content-DfS3vgAu.js +1 -0
  158. package/dist/client/assets/content-DpQdNePJ.js +1 -0
  159. package/dist/client/assets/content-Dqpibejl.js +1 -0
  160. package/dist/client/assets/content-TV0nd6-r.js +1 -0
  161. package/dist/client/assets/{content-BWPNyXJ0.js → content-odbb5H4U.js} +1 -1
  162. package/dist/client/assets/content-uXHLPHe0.js +1 -0
  163. package/dist/client/assets/{conversation-icons-tp9BX6X2.js → conversation-icons-CBMKBGHd.js} +1 -1
  164. package/dist/client/assets/{conversation-model-Dc02NsGp.js → conversation-model-QsJVfSeG.js} +1 -1
  165. package/dist/client/assets/conversation-motion-features-BFLHX2eg.js +1 -0
  166. package/dist/client/assets/{copy-CWWAJ75H.js → copy-Cj-owMb-.js} +1 -1
  167. package/dist/client/assets/{cpu-DrqejfkB.js → cpu-DuD3RFX5.js} +1 -1
  168. package/dist/client/assets/{createLucideIcon-DezKXSG2.js → createLucideIcon-DthwWQIg.js} +1 -1
  169. package/dist/client/assets/{discover-C2CZO4Tk.js → discover-B3uQlh5L.js} +2 -2
  170. package/dist/client/assets/embed-entry-DkRcHKTh.js +2 -0
  171. package/dist/client/assets/{external-link-Dp_a2vRZ.js → external-link-C_nxk0MJ.js} +1 -1
  172. package/dist/client/assets/{eye-BRyD0jno.js → eye-FnaaPfja.js} +1 -1
  173. package/dist/client/assets/{file-code-corner-muIVH_xO.js → file-code-corner-DDPq4Cur.js} +1 -1
  174. package/dist/client/assets/{file-text-CqJgwxmv.js → file-text--hfhwZH1.js} +1 -1
  175. package/dist/client/assets/{gauge-hU--hKVP.js → gauge-BVEknshP.js} +1 -1
  176. package/dist/client/assets/{gestures-DN4hEeqv.js → gestures-3gw5VgUS.js} +1 -1
  177. package/dist/client/assets/{git-branch-CK5v8F2v.js → git-branch-DJyvr0k-.js} +1 -1
  178. package/dist/client/assets/{home-moving-signal-BjDtEJUP.js → home-moving-signal-BPqBoNSm.js} +1 -1
  179. package/dist/client/assets/{home-now-card-nF8OotI-.js → home-now-card-UspVW2-2.js} +1 -1
  180. package/dist/client/assets/{home-now-card-nano-C-r_bBg5.js → home-now-card-nano-G8kMB32m.js} +1 -1
  181. package/dist/client/assets/{hooks-D46bABUP.js → hooks-BMsQzo9j.js} +1 -1
  182. package/dist/client/assets/{index-DvLtl7rV.js → index-BI9AljSD.js} +2 -2
  183. package/dist/client/assets/{index-kL1WLbeS.js → index-C-v0Z6ZS.js} +1 -1
  184. package/dist/client/assets/{index-CPrU5q04.js → index-D9DzUORB.js} +1 -1
  185. package/dist/client/assets/index-DfsTyYDx.js +1 -0
  186. package/dist/client/assets/{inspector-panel-Dkc7rLvY.js → inspector-panel-CFSArQ8Y.js} +1 -1
  187. package/dist/client/assets/{keyboard-nav-BLYDhL3Z.js → keyboard-nav-e6yGeorb.js} +1 -1
  188. package/dist/client/assets/{lane-roster-store-DOdI1O13.js → lane-roster-store-Q7pcblY5.js} +1 -1
  189. package/dist/client/assets/{layers-CSsg3JVP.js → layers-Dz2dKOnU.js} +1 -1
  190. package/dist/client/assets/{layout-grid-DOChPJdZ.js → layout-grid-Bvs5fdB4.js} +1 -1
  191. package/dist/client/assets/{left-BNRFiRsb.js → left-B4Ak-Ibt.js} +1 -1
  192. package/dist/client/assets/{left-BggzhgXN.js → left-BMb493FZ.js} +1 -1
  193. package/dist/client/assets/{left-YT7mIGuH.js → left-BjFLvVOC.js} +1 -1
  194. package/dist/client/assets/{left-B3wSE6ql.js → left-CsXQ8Q3G.js} +1 -1
  195. package/dist/client/assets/left-FNH7faCI.js +1 -0
  196. package/dist/client/assets/{left-CARCvvxS.js → left-POkqE8gI.js} +1 -1
  197. package/dist/client/assets/{left-CpokZYHt.js → left-UulOTcWh.js} +1 -1
  198. package/dist/client/assets/{left-advisor-CCY0vkcO.js → left-advisor-CJkQS2d6.js} +1 -1
  199. package/dist/client/assets/{left-agents-trhO5sL8.js → left-agents-CFMxyEjT.js} +1 -1
  200. package/dist/client/assets/{left-default-CG33elBs.js → left-default-rnX5HANc.js} +1 -1
  201. package/dist/client/assets/{left-lanes-CitMgeTp.js → left-lanes-BpLXT_qH.js} +1 -1
  202. package/dist/client/assets/{left-mission-Zl2m_5eU.js → left-mission-B0bhseWw.js} +1 -1
  203. package/dist/client/assets/library-D1iXfda2.js +1 -0
  204. package/dist/client/assets/{loader-circle-pM56HNhR.js → loader-circle-B2W9DPG5.js} +1 -1
  205. package/dist/client/assets/{local-agents-C8xAhbO5.js → local-agents-DKr-gIDC.js} +1 -1
  206. package/dist/client/assets/{mentions-DG6OQrsc.js → mentions-DuLQnEcn.js} +1 -1
  207. package/dist/client/assets/{mesh-ops-BZ1h5RQs.js → mesh-ops-CRR-KnCG.js} +1 -1
  208. package/dist/client/assets/{mesh-view-store-ChUOASK8.js → mesh-view-store-CiET-yN8.js} +1 -1
  209. package/dist/client/assets/{message-circle-mZCv8tvB.js → message-circle-B2DoYKDO.js} +1 -1
  210. package/dist/client/assets/{message-markup-C2LQDm_k.js → message-markup-Cc_O-WdA.js} +1 -1
  211. package/dist/client/assets/{message-square-C7t_qtuj.js → message-square-O-Hu9Mk2.js} +1 -1
  212. package/dist/client/assets/{mission-control-store-nDLdUZPA.js → mission-control-store-DDAgWKUl.js} +1 -1
  213. package/dist/client/assets/{observe-BpEm1INu.js → observe-Da2mRAsc.js} +1 -1
  214. package/dist/client/assets/{page-status-E5jnk48p.js → page-status-Crtgjbq3.js} +1 -1
  215. package/dist/client/assets/{paperclip-C64lkcbM.js → paperclip-BudMKSyr.js} +1 -1
  216. package/dist/client/assets/{persistent-state-EHXw8WNy.js → persistent-state-xJz-qAFc.js} +1 -1
  217. package/dist/client/assets/{plus-Co-dqKul.js → plus-BJ1If8vj.js} +1 -1
  218. package/dist/client/assets/{profile-APxDsN2P.js → profile-B3qDSbrH.js} +1 -1
  219. package/dist/client/assets/{projects-inbox-Cg4X2lUQ.js → projects-inbox-CLek3QaG.js} +1 -1
  220. package/dist/client/assets/{proxy-BiW5suC7.js → proxy-1BABCaDb.js} +1 -1
  221. package/dist/client/assets/{radio-BOxBQX-T.js → radio-B5OpHrrK.js} +1 -1
  222. package/dist/client/assets/{refresh-cw-DMxGzDwn.js → refresh-cw-DmNAhaH0.js} +1 -1
  223. package/dist/client/assets/resolve-panes-DXw-cHaj.js +1 -0
  224. package/dist/client/assets/resolve-sidebar-context-CDdbRDEa.js +1 -0
  225. package/dist/client/assets/{right-Bmfd3pjP.js → right-BgJ4mQLf.js} +1 -1
  226. package/dist/client/assets/{right-Dz_xD0Vj.js → right-Bk6h7o-Z.js} +1 -1
  227. package/dist/client/assets/{right-CkCCPbCX.js → right-BrICCmEt.js} +1 -1
  228. package/dist/client/assets/{right-CdkcrmeD.js → right-C1QIbqFZ.js} +1 -1
  229. package/dist/client/assets/{right-BwlW6E57.js → right-CfliKiHY.js} +1 -1
  230. package/dist/client/assets/{right-BuCgE0fZ.js → right-CtOLXB9s.js} +1 -1
  231. package/dist/client/assets/{right-CimaAvQN.js → right-D8id_DWQ.js} +1 -1
  232. package/dist/client/assets/{right-C0ybUw0j.js → right-DJ34yMAi.js} +1 -1
  233. package/dist/client/assets/{right-D3eSiy41.js → right-DiFmtw6d.js} +1 -1
  234. package/dist/client/assets/{right-BqI-nr9G.js → right-Lx79pxpG.js} +1 -1
  235. package/dist/client/assets/{rocket-BQm5_CvR.js → rocket-D3-TUJ2m.js} +1 -1
  236. package/dist/client/assets/{router-B9vQkNJL.js → router-DTtux5sP.js} +1 -1
  237. package/dist/client/assets/{scope-views-1IYJdl41.js → scope-views-CPM0sBw_.js} +1 -1
  238. package/dist/client/assets/{scout-voice-BVUqGhth.js → scout-voice-BZKsdquE.js} +1 -1
  239. package/dist/client/assets/{scoutbot-markdown-BQ_Ee2Ic.js → scoutbot-markdown-CQ7Y1McC.js} +1 -1
  240. package/dist/client/assets/{scroll-text-Dze_dXtQ.js → scroll-text-kPhYbh-M.js} +1 -1
  241. package/dist/client/assets/{search-CDko0PKE.js → search-DmFM_9jm.js} +1 -1
  242. package/dist/client/assets/{secondaryNavConfig-BoQ_zYR9.js → secondaryNavConfig-C9bQ9_IA.js} +1 -1
  243. package/dist/client/assets/{selection-bridge-Din6yV3h.js → selection-bridge-Dy2mtMyi.js} +1 -1
  244. package/dist/client/assets/{send-horizontal-CSjIm6xg.js → send-horizontal-qyjNgEaV.js} +1 -1
  245. package/dist/client/assets/{server-Bzj7lPIx.js → server-nWqndnxu.js} +1 -1
  246. package/dist/client/assets/{session-catalog-DsaZJXZt.js → session-catalog-BkmktBHI.js} +1 -1
  247. package/dist/client/assets/{session-table-BQfR7u6r.js → session-table-DKSF0mrS.js} +1 -1
  248. package/dist/client/assets/{settings-Dyvpkb1D.js → settings-C6h9y5XX.js} +1 -1
  249. package/dist/client/assets/{sliders-horizontal-C8njVwfg.js → sliders-horizontal-BhHKxsCO.js} +1 -1
  250. package/dist/client/assets/{sparkles-CETYrxGA.js → sparkles-Cf8gin88.js} +1 -1
  251. package/dist/client/assets/{sse-CD9MMUxl.js → sse-DDHEHUgz.js} +1 -1
  252. package/dist/client/assets/{tail-events-Ps8KpKah.js → tail-events-BdUrO0kb.js} +1 -1
  253. package/dist/client/assets/{terminal-9GRS_Qdc.js → terminal-C3YRPfyz.js} +1 -1
  254. package/dist/client/assets/{terminal-relay-GYMIvKs1.js → terminal-relay-BFhdIstF.js} +1 -1
  255. package/dist/client/assets/{terminal-takeover-_Jyys4me.js → terminal-takeover-B6H4llRR.js} +1 -1
  256. package/dist/client/assets/{text-BP3oyl8-.js → text-Faa3ZStB.js} +1 -1
  257. package/dist/client/assets/{use-conversation-list-C9ABzjXI.js → use-conversation-list-DO5J8T1H.js} +1 -1
  258. package/dist/client/assets/{use-fleet-active-asks-DAspZQjE.js → use-fleet-active-asks-BtgNnRgK.js} +1 -1
  259. package/dist/client/assets/{use-mesh-ops-items-Dh54ymEp.js → use-mesh-ops-items-N1HHhChY.js} +1 -1
  260. package/dist/client/assets/{use-reduced-motion-x8pJMVrG.js → use-reduced-motion-8WuxLa5l.js} +1 -1
  261. package/dist/client/assets/{use-scout-dev-flags-DhCbiDK3.js → use-scout-dev-flags-B31qTy6m.js} +1 -1
  262. package/dist/client/assets/{useAgentHoverCard-DoBwV0LX.js → useAgentHoverCard-Bkv-Uz_V.js} +1 -1
  263. package/dist/client/assets/useContentSecondaryNav-Bpkc8ayb.js +1 -0
  264. package/dist/client/assets/{usePierreRuntime-ejq9dCWV.js → usePierreRuntime-BfZHKAkI.js} +1 -1
  265. package/dist/client/assets/{wrench-DjkoAOQt.js → wrench-DkxnZRlR.js} +1 -1
  266. package/dist/client/assets/{x-CAbNespN.js → x-DfRJbqrh.js} +1 -1
  267. package/dist/client/assets/{xterm-Cf-ngcGP.js → xterm-CJw8Epxv.js} +1 -1
  268. package/dist/client/assets/{zap-Cq8eWkcF.js → zap-CIo8msJB.js} +1 -1
  269. package/dist/client/index.html +1 -1
  270. package/dist/main.mjs +65 -21
  271. package/dist/pairing-runtime-controller.mjs +8 -0
  272. package/dist/runtime/broker-daemon.mjs +58 -10
  273. package/dist/scout-control-plane-web.mjs +8 -0
  274. package/package.json +2 -2
  275. package/dist/client/assets/AgentLanesEmbedScreen-Dgcm7zd_.js +0 -1
  276. package/dist/client/assets/AgentsSubnav-C4xpQhsv.js +0 -1
  277. package/dist/client/assets/CrewWorkspaces-CkQDhyie.css +0 -1
  278. package/dist/client/assets/CrewWorkspaces-NKujRzwh.js +0 -1
  279. package/dist/client/assets/OpsScreen-D8fQafCl.js +0 -1
  280. package/dist/client/assets/OpsSubnav-1K4Jaf__.js +0 -1
  281. package/dist/client/assets/ProjectAgentProfile-Bdjd_dAx.js +0 -1
  282. package/dist/client/assets/ProjectsScreen-cVUkGbPz.js +0 -1
  283. package/dist/client/assets/SessionsScreen--5OJ3p3v.js +0 -1
  284. package/dist/client/assets/agents-project-COzHxZAF.css +0 -1
  285. package/dist/client/assets/content-9K38QchR.js +0 -1
  286. package/dist/client/assets/content-BRgnyXWh.js +0 -1
  287. package/dist/client/assets/content-BdkI07v3.js +0 -1
  288. package/dist/client/assets/content-C4oWa8SB.js +0 -1
  289. package/dist/client/assets/content-CFZ4rghn.js +0 -1
  290. package/dist/client/assets/content-CIqu_Ci_.js +0 -1
  291. package/dist/client/assets/content-CnJF9DGO.js +0 -1
  292. package/dist/client/assets/content-CriW8Y8u.js +0 -1
  293. package/dist/client/assets/content-DDCyPPk_.js +0 -1
  294. package/dist/client/assets/content-DtcZeh5m.js +0 -1
  295. package/dist/client/assets/content-U9tsdtle.js +0 -1
  296. package/dist/client/assets/content-hFLK3CON.js +0 -1
  297. package/dist/client/assets/content-p00KQrtD.js +0 -1
  298. package/dist/client/assets/conversation-motion-features-D9-RmBSq.js +0 -1
  299. package/dist/client/assets/embed-entry-BSMUykuG.js +0 -2
  300. package/dist/client/assets/index-zvhpRHao.js +0 -1
  301. package/dist/client/assets/left-B-SdEJSJ.js +0 -1
  302. package/dist/client/assets/library-DkALuCh5.js +0 -1
  303. package/dist/client/assets/resolve-panes-DeVJbS9c.js +0 -1
  304. package/dist/client/assets/resolve-sidebar-context-BQe5J6xF.js +0 -1
  305. package/dist/client/assets/useContentSecondaryNav-pZe2Zfk1.js +0 -1
@@ -1 +1 @@
1
- import{c as n}from"./createLucideIcon-DezKXSG2.js";import{M as f}from"./message-square-C7t_qtuj.js";import{F as l}from"./file-text-CqJgwxmv.js";import{S as c}from"./search-CDko0PKE.js";import{C as p}from"./compass-Dt1AMXz2.js";import{S as g}from"./settings-Dyvpkb1D.js";import{T as k}from"./terminal-9GRS_Qdc.js";import{G as y}from"./git-branch-CK5v8F2v.js";import{C as O}from"./code-xml-D7pOQM9l.js";import{S}from"./scroll-text-Dze_dXtQ.js";const A=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],C=n("folder-kanban",A);const _=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],v=n("house",_);const E=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],u=n("send",E),R=[{id:"home",label:"Home",icon:v,defaultRoute:{view:"inbox"},section:"navigate"},{id:"chat",label:"Messages",icon:f,defaultRoute:{view:"messages"},section:"navigate"},{id:"projects",label:"Crew",icon:C,defaultRoute:{view:"agents-v2"},section:"navigate"},{id:"sessions",label:"Sessions",icon:l,defaultRoute:{view:"sessions"},section:"navigate"},{id:"dispatch",label:"Dispatch",icon:u,defaultRoute:{view:"broker"},section:"navigate"},{id:"search",label:"Search",icon:c,defaultRoute:{view:"search"},section:"navigate"},{id:"ops",label:"Operations",icon:p,defaultRoute:{view:"ops",mode:"mission"},section:"system"},{id:"settings",label:"Settings",icon:g,defaultRoute:{view:"settings",section:"appearance"},section:"system"}],d={inbox:"home",activity:"home",briefings:"home","agents-v2":"projects","agent-info":"projects",repos:"projects","repo-diff":"projects",code:"projects",sessions:"sessions",terminal:"sessions",messages:"chat",conversation:"chat",broker:"dispatch",work:"dispatch",follow:"dispatch",search:"search",ops:"ops",mesh:"ops","mesh-ops":"ops",harnesses:"ops",settings:"settings",voice:"settings"},N=new Map(R.map(e=>[e.id,e]));function j(e){const i=N.get(e);if(!i)throw new Error(`Unknown primary area: ${e}`);return i}function se(e){if(e.view==="follow"&&e.preferredView)switch(e.preferredView){case"tail":return"ops";case"session":return"sessions";case"chat":return"chat";case"work":return"dispatch"}return d[e.view]}function ae(e,i){const t=j(e);return e==="ops"?i?.opsControlEnabled??!0?{view:"ops",mode:"mission"}:{view:"ops",mode:"tail"}:t.defaultRoute}function T(e){return e.view==="ops"&&(e.mode===void 0||e.mode==="mission"||e.mode==="issues")}const G=[{id:"home",label:"Home",route:{view:"inbox"},active:e=>e.view==="inbox"},{id:"projects",label:"Crew & Workspaces",route:{view:"agents-v2"},active:e=>e.view==="agents-v2"||e.view==="agent-info"},{id:"sessions",label:"Sessions",route:{view:"sessions"},active:e=>e.view==="sessions"},{id:"chat",label:"Messages",route:{view:"messages"},active:e=>e.view==="messages"||e.view==="conversation"},{id:"search",label:"Search",route:{view:"search"},active:e=>e.view==="search"},{id:"terminals",label:"Terminals",route:{view:"terminal"},active:e=>e.view==="terminal"},{id:"tail",label:"Live Activity",route:{view:"ops",mode:"tail"},active:e=>e.view==="ops"&&e.mode==="tail"},{id:"dispatch",label:"Dispatch",route:{view:"broker"},active:e=>e.view==="broker"},{id:"activity",label:"Activity Log",route:{view:"activity"},active:e=>e.view==="activity"},{id:"mesh",label:"Network",route:{view:"mesh"},active:e=>e.view==="mesh"},{id:"mesh-ops",label:"Mesh Ops",route:{view:"mesh-ops"},active:e=>e.view==="mesh-ops",capability:"surface.mesh-ops"},{id:"mission-control",label:"Mission Control",route:{view:"ops",mode:"mission"},active:T,capability:"ops.control"},{id:"lanes",label:"Agent Lanes",route:{view:"ops",mode:"lanes"},active:e=>e.view==="ops"&&e.mode==="lanes"},{id:"repos",label:"Repositories",route:{view:"repos"},active:e=>e.view==="repos"||e.view==="repo-diff"},{id:"code",label:"Code Browser",route:{view:"code"},active:e=>e.view==="code"},{id:"providers",label:"Agent Providers",route:{view:"harnesses"},active:e=>e.view==="harnesses"},{id:"runtime",label:"Runtime Monitor",route:{view:"ops",mode:"atop"},active:e=>e.view==="ops"&&e.mode==="atop",capability:"ops.control"},{id:"advisor",label:"Host Advisor",route:{view:"ops",mode:"advisor"},active:e=>e.view==="ops"&&e.mode==="advisor"},{id:"agent-config",label:"Agent Configuration",route:{view:"settings",section:"agents"},active:e=>e.view==="settings"&&e.section==="agents"}],M=new Map(G.map(e=>[e.id,e]));function s(e){const i=M.get(e);if(!i)throw new Error(`Unknown nav destination: ${e}`);return i}function a(e,i){const t=s(e);return{id:t.id,label:i?.label??t.label,route:i?.route??t.route,active:i?.active??t.active,capability:t.capability}}const P=[{destinationId:"home",key:"home"},{destinationId:"projects",key:"agents",label:"Crew"},{destinationId:"sessions",key:"sessions"},{destinationId:"chat",key:"chat",label:"Messages"}];function ne(){return P.map(e=>{const i=s(e.destinationId);return{key:e.key,label:e.label??i.label,route:i.route}})}const D=[{destinationId:"search",key:"search"},{destinationId:"terminals",key:"terminals"},{destinationId:"tail",key:"tail"},{destinationId:"dispatch",key:"dispatch"}],x=[{destinationId:"mission-control",key:"control"},{destinationId:"lanes",key:"lanes"},{destinationId:"providers",key:"providers"},{destinationId:"mesh",key:"mesh"},{destinationId:"mesh-ops",key:"mesh-ops"},{destinationId:"runtime",key:"runtime"},{destinationId:"advisor",key:"advisor"}];function m(e){const i=a(e.destinationId,{label:e.label});return{key:e.key,label:i.label,route:i.route,active:i.active,destinationId:i.id,capability:i.capability}}function de(){return D.map(m)}function re(){return x.map(m)}function b(e){return{items:e.map(i=>{const t=a(i.destinationId,{label:i.label,route:i.route,active:i.active});return{id:i.id,label:t.label,route:t.route,active:t.active}})}}function B(){return[b([{destinationId:"agent-config",id:"config",label:"Agent Configuration"}])]}function J(){return[b([{destinationId:"lanes",id:"lanes"},{destinationId:"mission-control",id:"control"},{destinationId:"providers",id:"harnesses",label:"Agent Providers"},{destinationId:"mesh",id:"mesh"},{destinationId:"tail",id:"tail"},{destinationId:"runtime",id:"runtime"},{destinationId:"advisor",id:"advisor"}])]}const V=[{key:"h",label:"Go home",destinationId:"home"},{key:"i",label:"Go to messages",destinationId:"chat"},{key:"c",label:"Go to messages",destinationId:"chat"},{key:"p",label:"Go to crew",destinationId:"projects"},{key:"s",label:"Go to sessions",destinationId:"sessions"},{key:"t",label:"Go to terminals",destinationId:"terminals"},{key:"r",label:"Go to repositories",destinationId:"repos"},{key:"b",label:"Go to code browser",destinationId:"code"},{key:"f",label:"Go to search",destinationId:"search"},{key:"l",label:"Go to live activity",destinationId:"tail"},{key:"o",label:"Go to operations",destinationId:"mission-control",route:{view:"ops"}},{key:"d",label:"Go to dispatch",destinationId:"dispatch"},{key:"m",label:"Go to network",destinationId:"mesh"},{key:"a",label:"Go to activity log",destinationId:"activity"}];function le(){return V.map(e=>{const i=s(e.destinationId);return{key:e.key,label:e.label,route:e.route??i.route,destinationId:e.destinationId}})}const U=[{destinationId:"sessions",id:"sessions",icon:l},{destinationId:"terminals",id:"terminals",icon:k},{destinationId:"repos",id:"repos",icon:y},{destinationId:"code",id:"code",icon:O},{destinationId:"search",id:"search",icon:c},{destinationId:"tail",id:"tail",icon:S},{destinationId:"mission-control",id:"ops",label:"Operations",icon:p,route:{view:"ops",mode:"mission"},opsGated:!0},{destinationId:"home",id:"home",icon:v},{destinationId:"dispatch",id:"dispatch",icon:u}];function ce(){return U.map(e=>{const i=s(e.destinationId);return{id:e.id,label:e.label??i.label,icon:e.icon,route:e.route??i.route,destinationId:e.destinationId,opsGated:e.opsGated??i.capability==="ops.control"}})}const F=[{id:"nav:home",label:"Go to Home",destinationId:"home",shortcut:"Cmd+1"},{id:"nav:agents",label:"Go to Crew",destinationId:"projects",shortcut:"Cmd+2"},{id:"nav:messages",label:"Go to Chat",destinationId:"chat",shortcut:"Cmd+3"},{id:"nav:sessions",label:"Open Sessions",destinationId:"sessions"},{id:"nav:terminals",label:"Open Terminals",destinationId:"terminals"},{id:"nav:search",label:"Go to Search",destinationId:"search",shortcut:"Cmd+4"},{id:"nav:activity",label:"Open Activity",destinationId:"activity"},{id:"nav:mesh",label:"Open Mesh",destinationId:"mesh"},{id:"nav:dispatch",label:"Open Dispatch",destinationId:"dispatch"},{id:"nav:repos",label:"Open Repositories",destinationId:"repos"},{id:"nav:code",label:"Open Code Browser",destinationId:"code"},{id:"nav:harnesses",label:"Open Providers",destinationId:"providers"},{id:"nav:ops-lanes",label:"Open Agent Lanes",destinationId:"lanes"},{id:"nav:ops",label:"Go to Ops",destinationId:"mission-control",route:{view:"ops"},shortcut:"Cmd+5",capability:"ops.control"},{id:"nav:ops-atop",label:"Open Runtime",destinationId:"runtime",capability:"ops.control"},{id:"nav:agent-config",label:"Open Agent Configuration",destinationId:"agent-config"}];function H(e){const i=e?.opsEnabled??!0;return F.filter(t=>!((t.capability??s(t.destinationId).capability)==="ops.control"&&!i)).map(t=>{const o=s(t.destinationId);return{id:t.id,label:t.label,destinationId:t.destinationId,route:t.route??o.route,shortcut:t.shortcut,capability:t.capability??o.capability}})}function pe(e,i){return H(i).map(t=>({id:t.id,label:t.label,action:()=>e(t.route),shortcut:t.shortcut}))}const h={projects:[{destinationId:"projects",id:"projects"},{destinationId:"repos",id:"repos"},{destinationId:"code",id:"code"}],sessions:[{destinationId:"sessions",id:"sessions"},{destinationId:"terminals",id:"terminals"}]};function Y(e){const i=a(e.destinationId,{label:e.label});return{id:e.id,label:i.label,route:i.route,active:i.active,destinationId:i.id}}function L(e){return h[e].map(Y)}function ve(e){const i=d[e.view];if(i!=="projects"&&i!=="sessions")return null;const t=i;return{areaId:t,items:L(t)}}const r={...h,dispatch:[{destinationId:"dispatch",id:"dispatch-all",label:"All Dispatches",route:{view:"broker"},active:e=>e.view==="broker"&&(e.filter===void 0||e.filter==="all")},{destinationId:"dispatch",id:"dispatch-delivered",label:"Delivered",route:{view:"broker",filter:"delivered"},active:e=>e.view==="broker"&&e.filter==="delivered"},{destinationId:"dispatch",id:"dispatch-failed",label:"Failed",route:{view:"broker",filter:"failed"},active:e=>e.view==="broker"&&e.filter==="failed"}],ops:[{destinationId:"lanes",id:"lanes",label:"Lanes"},{destinationId:"mission-control",id:"control"},{destinationId:"providers",id:"harnesses",label:"Providers"},{destinationId:"runtime",id:"runtime",label:"Runtime"},{destinationId:"mesh",id:"mesh"},{destinationId:"tail",id:"tail"},{destinationId:"advisor",id:"advisor"}]};function $(e){const i=a(e.destinationId,{label:e.label,route:e.route,active:e.active});return{id:e.id,label:i.label,route:i.route,active:i.active,destinationId:i.id}}function ue(e,i){const t=d[e.view];if(!(t in r))return null;const o=t,I=r[o].map($).filter(w=>s(w.destinationId).capability!=="ops.control"||i?.opsControlEnabled!==!1);return{areaId:o,items:I}}const me=B(),be=J();export{me as A,be as O,R as P,ne as a,de as b,re as c,pe as d,le as e,se as f,ae as g,j as h,ve as i,ce as p,ue as s};
1
+ import{c as n}from"./createLucideIcon-DthwWQIg.js";import{M as f}from"./message-square-O-Hu9Mk2.js";import{F as l}from"./file-text--hfhwZH1.js";import{S as c}from"./search-DmFM_9jm.js";import{C as p}from"./compass-BcRI_YXo.js";import{S as g}from"./settings-C6h9y5XX.js";import{T as k}from"./terminal-C3YRPfyz.js";import{G as y}from"./git-branch-DJyvr0k-.js";import{C as O}from"./code-xml-CvKBY3KA.js";import{S}from"./scroll-text-kPhYbh-M.js";const A=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],C=n("folder-kanban",A);const _=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],v=n("house",_);const E=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],u=n("send",E),R=[{id:"home",label:"Home",icon:v,defaultRoute:{view:"inbox"},section:"navigate"},{id:"chat",label:"Messages",icon:f,defaultRoute:{view:"messages"},section:"navigate"},{id:"projects",label:"Crew",icon:C,defaultRoute:{view:"agents-v2"},section:"navigate"},{id:"sessions",label:"Sessions",icon:l,defaultRoute:{view:"sessions"},section:"navigate"},{id:"dispatch",label:"Dispatch",icon:u,defaultRoute:{view:"broker"},section:"navigate"},{id:"search",label:"Search",icon:c,defaultRoute:{view:"search"},section:"navigate"},{id:"ops",label:"Operations",icon:p,defaultRoute:{view:"ops",mode:"mission"},section:"system"},{id:"settings",label:"Settings",icon:g,defaultRoute:{view:"settings",section:"appearance"},section:"system"}],d={inbox:"home",activity:"home",briefings:"home","agents-v2":"projects","agent-info":"projects",repos:"projects","repo-diff":"projects",code:"projects",sessions:"sessions",terminal:"sessions",messages:"chat",conversation:"chat",broker:"dispatch",work:"dispatch",follow:"dispatch",search:"search",ops:"ops",mesh:"ops","mesh-ops":"ops",harnesses:"ops",settings:"settings",voice:"settings"},N=new Map(R.map(e=>[e.id,e]));function j(e){const i=N.get(e);if(!i)throw new Error(`Unknown primary area: ${e}`);return i}function se(e){if(e.view==="follow"&&e.preferredView)switch(e.preferredView){case"tail":return"ops";case"session":return"sessions";case"chat":return"chat";case"work":return"dispatch"}return d[e.view]}function ae(e,i){const t=j(e);return e==="ops"?i?.opsControlEnabled??!0?{view:"ops",mode:"mission"}:{view:"ops",mode:"tail"}:t.defaultRoute}function T(e){return e.view==="ops"&&(e.mode===void 0||e.mode==="mission"||e.mode==="issues")}const G=[{id:"home",label:"Home",route:{view:"inbox"},active:e=>e.view==="inbox"},{id:"projects",label:"Crew & Workspaces",route:{view:"agents-v2"},active:e=>e.view==="agents-v2"||e.view==="agent-info"},{id:"sessions",label:"Sessions",route:{view:"sessions"},active:e=>e.view==="sessions"},{id:"chat",label:"Messages",route:{view:"messages"},active:e=>e.view==="messages"||e.view==="conversation"},{id:"search",label:"Search",route:{view:"search"},active:e=>e.view==="search"},{id:"terminals",label:"Terminals",route:{view:"terminal"},active:e=>e.view==="terminal"},{id:"tail",label:"Live Activity",route:{view:"ops",mode:"tail"},active:e=>e.view==="ops"&&e.mode==="tail"},{id:"dispatch",label:"Dispatch",route:{view:"broker"},active:e=>e.view==="broker"},{id:"activity",label:"Activity Log",route:{view:"activity"},active:e=>e.view==="activity"},{id:"mesh",label:"Network",route:{view:"mesh"},active:e=>e.view==="mesh"},{id:"mesh-ops",label:"Mesh Ops",route:{view:"mesh-ops"},active:e=>e.view==="mesh-ops",capability:"surface.mesh-ops"},{id:"mission-control",label:"Mission Control",route:{view:"ops",mode:"mission"},active:T,capability:"ops.control"},{id:"lanes",label:"Agent Lanes",route:{view:"ops",mode:"lanes"},active:e=>e.view==="ops"&&e.mode==="lanes"},{id:"repos",label:"Repositories",route:{view:"repos"},active:e=>e.view==="repos"||e.view==="repo-diff"},{id:"code",label:"Code Browser",route:{view:"code"},active:e=>e.view==="code"},{id:"providers",label:"Agent Providers",route:{view:"harnesses"},active:e=>e.view==="harnesses"},{id:"runtime",label:"Runtime Monitor",route:{view:"ops",mode:"atop"},active:e=>e.view==="ops"&&e.mode==="atop",capability:"ops.control"},{id:"advisor",label:"Host Advisor",route:{view:"ops",mode:"advisor"},active:e=>e.view==="ops"&&e.mode==="advisor"},{id:"agent-config",label:"Agent Configuration",route:{view:"settings",section:"agents"},active:e=>e.view==="settings"&&e.section==="agents"}],M=new Map(G.map(e=>[e.id,e]));function s(e){const i=M.get(e);if(!i)throw new Error(`Unknown nav destination: ${e}`);return i}function a(e,i){const t=s(e);return{id:t.id,label:i?.label??t.label,route:i?.route??t.route,active:i?.active??t.active,capability:t.capability}}const P=[{destinationId:"home",key:"home"},{destinationId:"projects",key:"agents",label:"Crew"},{destinationId:"sessions",key:"sessions"},{destinationId:"chat",key:"chat",label:"Messages"}];function ne(){return P.map(e=>{const i=s(e.destinationId);return{key:e.key,label:e.label??i.label,route:i.route}})}const D=[{destinationId:"search",key:"search"},{destinationId:"terminals",key:"terminals"},{destinationId:"tail",key:"tail"},{destinationId:"dispatch",key:"dispatch"}],x=[{destinationId:"mission-control",key:"control"},{destinationId:"lanes",key:"lanes"},{destinationId:"providers",key:"providers"},{destinationId:"mesh",key:"mesh"},{destinationId:"mesh-ops",key:"mesh-ops"},{destinationId:"runtime",key:"runtime"},{destinationId:"advisor",key:"advisor"}];function m(e){const i=a(e.destinationId,{label:e.label});return{key:e.key,label:i.label,route:i.route,active:i.active,destinationId:i.id,capability:i.capability}}function de(){return D.map(m)}function re(){return x.map(m)}function b(e){return{items:e.map(i=>{const t=a(i.destinationId,{label:i.label,route:i.route,active:i.active});return{id:i.id,label:t.label,route:t.route,active:t.active}})}}function B(){return[b([{destinationId:"agent-config",id:"config",label:"Agent Configuration"}])]}function J(){return[b([{destinationId:"lanes",id:"lanes"},{destinationId:"mission-control",id:"control"},{destinationId:"providers",id:"harnesses",label:"Agent Providers"},{destinationId:"mesh",id:"mesh"},{destinationId:"tail",id:"tail"},{destinationId:"runtime",id:"runtime"},{destinationId:"advisor",id:"advisor"}])]}const V=[{key:"h",label:"Go home",destinationId:"home"},{key:"i",label:"Go to messages",destinationId:"chat"},{key:"c",label:"Go to messages",destinationId:"chat"},{key:"p",label:"Go to crew",destinationId:"projects"},{key:"s",label:"Go to sessions",destinationId:"sessions"},{key:"t",label:"Go to terminals",destinationId:"terminals"},{key:"r",label:"Go to repositories",destinationId:"repos"},{key:"b",label:"Go to code browser",destinationId:"code"},{key:"f",label:"Go to search",destinationId:"search"},{key:"l",label:"Go to live activity",destinationId:"tail"},{key:"o",label:"Go to operations",destinationId:"mission-control",route:{view:"ops"}},{key:"d",label:"Go to dispatch",destinationId:"dispatch"},{key:"m",label:"Go to network",destinationId:"mesh"},{key:"a",label:"Go to activity log",destinationId:"activity"}];function le(){return V.map(e=>{const i=s(e.destinationId);return{key:e.key,label:e.label,route:e.route??i.route,destinationId:e.destinationId}})}const U=[{destinationId:"sessions",id:"sessions",icon:l},{destinationId:"terminals",id:"terminals",icon:k},{destinationId:"repos",id:"repos",icon:y},{destinationId:"code",id:"code",icon:O},{destinationId:"search",id:"search",icon:c},{destinationId:"tail",id:"tail",icon:S},{destinationId:"mission-control",id:"ops",label:"Operations",icon:p,route:{view:"ops",mode:"mission"},opsGated:!0},{destinationId:"home",id:"home",icon:v},{destinationId:"dispatch",id:"dispatch",icon:u}];function ce(){return U.map(e=>{const i=s(e.destinationId);return{id:e.id,label:e.label??i.label,icon:e.icon,route:e.route??i.route,destinationId:e.destinationId,opsGated:e.opsGated??i.capability==="ops.control"}})}const F=[{id:"nav:home",label:"Go to Home",destinationId:"home",shortcut:"Cmd+1"},{id:"nav:agents",label:"Go to Crew",destinationId:"projects",shortcut:"Cmd+2"},{id:"nav:messages",label:"Go to Chat",destinationId:"chat",shortcut:"Cmd+3"},{id:"nav:sessions",label:"Open Sessions",destinationId:"sessions"},{id:"nav:terminals",label:"Open Terminals",destinationId:"terminals"},{id:"nav:search",label:"Go to Search",destinationId:"search",shortcut:"Cmd+4"},{id:"nav:activity",label:"Open Activity",destinationId:"activity"},{id:"nav:mesh",label:"Open Mesh",destinationId:"mesh"},{id:"nav:dispatch",label:"Open Dispatch",destinationId:"dispatch"},{id:"nav:repos",label:"Open Repositories",destinationId:"repos"},{id:"nav:code",label:"Open Code Browser",destinationId:"code"},{id:"nav:harnesses",label:"Open Providers",destinationId:"providers"},{id:"nav:ops-lanes",label:"Open Agent Lanes",destinationId:"lanes"},{id:"nav:ops",label:"Go to Ops",destinationId:"mission-control",route:{view:"ops"},shortcut:"Cmd+5",capability:"ops.control"},{id:"nav:ops-atop",label:"Open Runtime",destinationId:"runtime",capability:"ops.control"},{id:"nav:agent-config",label:"Open Agent Configuration",destinationId:"agent-config"}];function H(e){const i=e?.opsEnabled??!0;return F.filter(t=>!((t.capability??s(t.destinationId).capability)==="ops.control"&&!i)).map(t=>{const o=s(t.destinationId);return{id:t.id,label:t.label,destinationId:t.destinationId,route:t.route??o.route,shortcut:t.shortcut,capability:t.capability??o.capability}})}function pe(e,i){return H(i).map(t=>({id:t.id,label:t.label,action:()=>e(t.route),shortcut:t.shortcut}))}const h={projects:[{destinationId:"projects",id:"projects"},{destinationId:"repos",id:"repos"},{destinationId:"code",id:"code"}],sessions:[{destinationId:"sessions",id:"sessions"},{destinationId:"terminals",id:"terminals"}]};function Y(e){const i=a(e.destinationId,{label:e.label});return{id:e.id,label:i.label,route:i.route,active:i.active,destinationId:i.id}}function L(e){return h[e].map(Y)}function ve(e){const i=d[e.view];if(i!=="projects"&&i!=="sessions")return null;const t=i;return{areaId:t,items:L(t)}}const r={...h,dispatch:[{destinationId:"dispatch",id:"dispatch-all",label:"All Dispatches",route:{view:"broker"},active:e=>e.view==="broker"&&(e.filter===void 0||e.filter==="all")},{destinationId:"dispatch",id:"dispatch-delivered",label:"Delivered",route:{view:"broker",filter:"delivered"},active:e=>e.view==="broker"&&e.filter==="delivered"},{destinationId:"dispatch",id:"dispatch-failed",label:"Failed",route:{view:"broker",filter:"failed"},active:e=>e.view==="broker"&&e.filter==="failed"}],ops:[{destinationId:"lanes",id:"lanes",label:"Lanes"},{destinationId:"mission-control",id:"control"},{destinationId:"providers",id:"harnesses",label:"Providers"},{destinationId:"runtime",id:"runtime",label:"Runtime"},{destinationId:"mesh",id:"mesh"},{destinationId:"tail",id:"tail"},{destinationId:"advisor",id:"advisor"}]};function $(e){const i=a(e.destinationId,{label:e.label,route:e.route,active:e.active});return{id:e.id,label:i.label,route:i.route,active:i.active,destinationId:i.id}}function ue(e,i){const t=d[e.view];if(!(t in r))return null;const o=t,I=r[o].map($).filter(w=>s(w.destinationId).capability!=="ops.control"||i?.opsControlEnabled!==!1);return{areaId:o,items:I}}const me=B(),be=J();export{me as A,be as O,R as P,ne as a,de as b,re as c,pe as d,le as e,se as f,ae as g,j as h,ve as i,ce as p,ue as s};
@@ -1 +1 @@
1
- import{j as r,r as o}from"./index-DvLtl7rV.js";import{j as l}from"./ui-LM8pS8qE.js";function p({branch:t,fallback:s}){const e=l(t,s);return e.detached?r.jsx("span",{className:"pre",children:e.sha??"detached"}):e.prefix?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"pre",children:e.prefix}),e.leaf]}):r.jsx(r.Fragment,{children:e.leaf})}const a={worktree:null,project:null,generatedAt:0,tone:"warm"};let n=a;const c=new Set;function i(){for(const t of c)t()}function h(t){n=t,i()}function d(){n!==a&&(n=a,i())}function m(){const[t,s]=o.useState(()=>n);return o.useEffect(()=>{s(n);const e=()=>s(n);return c.add(e),()=>{c.delete(e)}},[]),t}export{p as B,d as c,h as p,m as u};
1
+ import{j as r,r as o}from"./index-BI9AljSD.js";import{j as l}from"./ui-LM8pS8qE.js";function p({branch:t,fallback:s}){const e=l(t,s);return e.detached?r.jsx("span",{className:"pre",children:e.sha??"detached"}):e.prefix?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"pre",children:e.prefix}),e.leaf]}):r.jsx(r.Fragment,{children:e.leaf})}const a={worktree:null,project:null,generatedAt:0,tone:"warm"};let n=a;const c=new Set;function i(){for(const t of c)t()}function h(t){n=t,i()}function d(){n!==a&&(n=a,i())}function m(){const[t,s]=o.useState(()=>n);return o.useEffect(()=>{s(n);const e=()=>s(n);return c.add(e),()=>{c.delete(e)}},[]),t}export{p as B,d as c,h as p,m as u};
@@ -1 +1 @@
1
- import{c as a}from"./createLucideIcon-DezKXSG2.js";const o=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],e=a("send-horizontal",o);export{e as S};
1
+ import{c as a}from"./createLucideIcon-DthwWQIg.js";const o=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],e=a("send-horizontal",o);export{e as S};
@@ -1 +1 @@
1
- import{c as e}from"./createLucideIcon-DezKXSG2.js";const r=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],i=e("server",r);export{i as S};
1
+ import{c as e}from"./createLucideIcon-DthwWQIg.js";const r=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],i=e("server",r);export{i as S};
@@ -1 +1 @@
1
- import{r as d}from"./terminal-relay-GYMIvKs1.js";function S(r,e){const s=d(r),n=s?r.harnessSessionId??s.sessionName:null;return e?.activeSessionId??n}function I(r,e){return[...r].sort((s,n)=>{const t=s.id===e?1:0,o=n.id===e?1:0;return t!==o?o-t:(n.endedAt??n.startedAt)-(s.endedAt??s.startedAt)})}function c(r){const e=r;return[e.id,e.surfaceSessionId,e.harnessSessionId,e.externalSessionId,e.threadId,e.runtimeSessionId,e.runtimeSessionRef,e.runtimeRef,e.sourceSessionId,e.sessionId,e.refId].flatMap(s=>{const n=s?.trim();return n?[n]:[]})}function u(r){const e=/^relay-(.+)-(claude|codex)$/iu.exec(r);return e?{scope:e[1].toLowerCase(),harness:e[2].toLowerCase()}:null}function l(r,e){const s=u(r),n=u(e);return!s||!n?!1:s.harness===n.harness&&(s.scope===n.scope||s.scope.startsWith(`${n.scope}-`))}function f(r,e){const s=r?.trim();if(!s)return null;const n=e.find(a=>c(a).some(i=>i===s));if(n)return n.id;const t=e.filter(a=>c(a).some(i=>l(i,s)));return new Set(t.map(a=>a.id)).size===1?t[0]?.id??null:null}function h(r,e,s,n,t){const o=f(t,n);return o||(s??n[0]?.id??null)}function A(r,e,s,n){const t=!!d(r),o=n&&(!!s.canObserve||t),a=n&&(!!s.canTakeover||t||!!e?.resumeCommand);return{canObserve:o,canTakeover:a}}export{h as a,f as b,A as c,S as r,I as s};
1
+ import{r as d}from"./terminal-relay-BFhdIstF.js";function S(r,e){const s=d(r),n=s?r.harnessSessionId??s.sessionName:null;return e?.activeSessionId??n}function I(r,e){return[...r].sort((s,n)=>{const t=s.id===e?1:0,o=n.id===e?1:0;return t!==o?o-t:(n.endedAt??n.startedAt)-(s.endedAt??s.startedAt)})}function c(r){const e=r;return[e.id,e.surfaceSessionId,e.harnessSessionId,e.externalSessionId,e.threadId,e.runtimeSessionId,e.runtimeSessionRef,e.runtimeRef,e.sourceSessionId,e.sessionId,e.refId].flatMap(s=>{const n=s?.trim();return n?[n]:[]})}function u(r){const e=/^relay-(.+)-(claude|codex)$/iu.exec(r);return e?{scope:e[1].toLowerCase(),harness:e[2].toLowerCase()}:null}function l(r,e){const s=u(r),n=u(e);return!s||!n?!1:s.harness===n.harness&&(s.scope===n.scope||s.scope.startsWith(`${n.scope}-`))}function f(r,e){const s=r?.trim();if(!s)return null;const n=e.find(a=>c(a).some(i=>i===s));if(n)return n.id;const t=e.filter(a=>c(a).some(i=>l(i,s)));return new Set(t.map(a=>a.id)).size===1?t[0]?.id??null:null}function h(r,e,s,n,t){const o=f(t,n);return o||(s??n[0]?.id??null)}function A(r,e,s,n){const t=!!d(r),o=n&&(!!s.canObserve||t),a=n&&(!!s.canTakeover||t||!!e?.resumeCommand);return{canObserve:o,canTakeover:a}}export{h as a,f as b,A as c,S as r,I as s};
@@ -1 +1 @@
1
- import{c as u}from"./createLucideIcon-DezKXSG2.js";const l=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],b=u("power",l),d=10080*60*1e3,f=720*60*60*1e3,p={column:"state",direction:"desc"},S=[{id:"name",label:"Session",initialDirection:"asc"},{id:"host",label:"Host",initialDirection:"asc"},{id:"state",label:"State",initialDirection:"desc"},{id:"project",label:"Project",initialDirection:"asc"},{id:"activity",label:"Activity",initialDirection:"desc"}];function c(t){const e=typeof t.session.metadata?.attachedClients=="number"?t.session.metadata.attachedClients:0;return t.surface.state==="exited"?0:e>0?3:t.surface.state==="detached"?1:2}function y(t){const e=typeof t.session.metadata?.attachedClients=="number"?t.session.metadata.attachedClients:null;return t.surface.state==="exited"?"exited":e&&e>0?`${e} attached`:t.surface.state??"live"}function o(t){const e=t.session.metadata?.activityAt;if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;const n=t.session.metadata?.startedAt;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:t.origin==="backend"?null:t.session.updatedAt||null}function v(t,e=Date.now()){const n=t.session.metadata?.activityAt,i=typeof n=="number"&&Number.isFinite(n)&&n>0?n:t.origin==="backend"?null:t.session.updatedAt||null;if(i===null)return"current";const a=Math.max(0,e-i);return a>=f?"review":a>=d?"inactive":"current"}function s(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}function _(t,e){const n=e.direction==="asc"?1:-1;return[...t].sort((i,a)=>{const r=m(i,a,e.column)*n;return r!==0?r:s(i.title,a.title)})}function m(t,e,n){switch(n){case"name":return s(t.title,e.title);case"host":return s(t.surface.backend,e.surface.backend);case"state":return c(t)-c(e);case"project":return s(t.project,e.project);case"activity":{const i=o(t),a=o(e);return i===null&&a===null?0:i===null?-1:a===null?1:i-a}}}function E(t,e){if(t.column===e)return{column:e,direction:t.direction==="asc"?"desc":"asc"};const n=S.find(i=>i.id===e)?.initialDirection??"asc";return{column:e,direction:n}}export{p as D,b as P,S as T,o as a,v as b,E as c,y as d,_ as s,c as t};
1
+ import{c as u}from"./createLucideIcon-DthwWQIg.js";const l=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],b=u("power",l),d=10080*60*1e3,f=720*60*60*1e3,p={column:"state",direction:"desc"},S=[{id:"name",label:"Session",initialDirection:"asc"},{id:"host",label:"Host",initialDirection:"asc"},{id:"state",label:"State",initialDirection:"desc"},{id:"project",label:"Project",initialDirection:"asc"},{id:"activity",label:"Activity",initialDirection:"desc"}];function c(t){const e=typeof t.session.metadata?.attachedClients=="number"?t.session.metadata.attachedClients:0;return t.surface.state==="exited"?0:e>0?3:t.surface.state==="detached"?1:2}function y(t){const e=typeof t.session.metadata?.attachedClients=="number"?t.session.metadata.attachedClients:null;return t.surface.state==="exited"?"exited":e&&e>0?`${e} attached`:t.surface.state??"live"}function o(t){const e=t.session.metadata?.activityAt;if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;const n=t.session.metadata?.startedAt;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:t.origin==="backend"?null:t.session.updatedAt||null}function v(t,e=Date.now()){const n=t.session.metadata?.activityAt,i=typeof n=="number"&&Number.isFinite(n)&&n>0?n:t.origin==="backend"?null:t.session.updatedAt||null;if(i===null)return"current";const a=Math.max(0,e-i);return a>=f?"review":a>=d?"inactive":"current"}function s(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}function _(t,e){const n=e.direction==="asc"?1:-1;return[...t].sort((i,a)=>{const r=m(i,a,e.column)*n;return r!==0?r:s(i.title,a.title)})}function m(t,e,n){switch(n){case"name":return s(t.title,e.title);case"host":return s(t.surface.backend,e.surface.backend);case"state":return c(t)-c(e);case"project":return s(t.project,e.project);case"activity":{const i=o(t),a=o(e);return i===null&&a===null?0:i===null?-1:a===null?1:i-a}}}function E(t,e){if(t.column===e)return{column:e,direction:t.direction==="asc"?"desc":"asc"};const n=S.find(i=>i.id===e)?.initialDirection??"asc";return{column:e,direction:n}}export{p as D,b as P,S as T,o as a,v as b,E as c,y as d,_ as s,c as t};
@@ -1 +1 @@
1
- import{c}from"./createLucideIcon-DezKXSG2.js";const e=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],o=c("settings",e);export{o as S};
1
+ import{c}from"./createLucideIcon-DthwWQIg.js";const e=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],o=c("settings",e);export{o as S};
@@ -1 +1 @@
1
- import{c as t}from"./createLucideIcon-DezKXSG2.js";const a=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],h=t("sliders-horizontal",a);export{h as S};
1
+ import{c as t}from"./createLucideIcon-DthwWQIg.js";const a=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],h=t("sliders-horizontal",a);export{h as S};
@@ -1 +1 @@
1
- import{c as a}from"./createLucideIcon-DezKXSG2.js";const e=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],l=a("sparkles",e);export{l as S};
1
+ import{c as a}from"./createLucideIcon-DthwWQIg.js";const e=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],l=a("sparkles",e);export{l as S};
@@ -1 +1 @@
1
- import{r as n,c as R}from"./index-DvLtl7rV.js";import{c as v,a as k,w as p}from"./index-BWHgHrtv.js";const u=new Set;let i=null,a=null,c=null,s=null;function b(e){for(const r of[...u])r(e)}function E(){s||u.size===0||(s=setTimeout(()=>{s=null,d()},2e3))}function d(){c||u.size===0||(i||(i=v({url:R()}),a=k({links:[p({client:i})]})),c=a.control.events.subscribe(void 0,{onData:e=>{const r=e.data;r&&b(r)},onError:()=>{c=null,E()}}),b({kind:"unknown",payload:{reason:"control_subscription_started"}}))}function w(){s&&(clearTimeout(s),s=null),c?.unsubscribe(),c=null}function S(e){return u.add(e),d(),()=>{u.delete(e),!(u.size>0)&&w()}}function T(e){const r=n.useRef(e);r.current=e,n.useEffect(()=>S(o=>{r.current(o)}),[])}function z(e,r,o=250){const l=n.useRef(e);l.current=e;const f=n.useRef(r);f.current=r;const t=n.useRef(null);T(m=>{l.current(m)&&(t.current||(t.current=setTimeout(()=>{t.current=null,f.current()},o)))}),n.useEffect(()=>()=>{t.current&&(clearTimeout(t.current),t.current=null)},[])}export{z as a,T as u};
1
+ import{r as n,c as R}from"./index-BI9AljSD.js";import{c as v,a as k,w as p}from"./index-BWHgHrtv.js";const u=new Set;let i=null,a=null,c=null,s=null;function b(e){for(const r of[...u])r(e)}function E(){s||u.size===0||(s=setTimeout(()=>{s=null,d()},2e3))}function d(){c||u.size===0||(i||(i=v({url:R()}),a=k({links:[p({client:i})]})),c=a.control.events.subscribe(void 0,{onData:e=>{const r=e.data;r&&b(r)},onError:()=>{c=null,E()}}),b({kind:"unknown",payload:{reason:"control_subscription_started"}}))}function w(){s&&(clearTimeout(s),s=null),c?.unsubscribe(),c=null}function S(e){return u.add(e),d(),()=>{u.delete(e),!(u.size>0)&&w()}}function T(e){const r=n.useRef(e);r.current=e,n.useEffect(()=>S(o=>{r.current(o)}),[])}function z(e,r,o=250){const l=n.useRef(e);l.current=e;const f=n.useRef(r);f.current=r;const t=n.useRef(null);T(m=>{l.current(m)&&(t.current||(t.current=setTimeout(()=>{t.current=null,f.current()},o)))}),n.useEffect(()=>()=>{t.current&&(clearTimeout(t.current),t.current=null)},[])}export{z as a,T as u};
@@ -1 +1 @@
1
- import{r as c,i as o}from"./index-DvLtl7rV.js";import{c as f,a as b,w as d}from"./index-BWHgHrtv.js";const r=new Set;let n=null,l=null,s=null;function p(t){for(const e of[...r])e(t)}function S(){s||(n||(n=f({url:o()}),l=b({links:[d({client:n})]})),s=l.tail.events.subscribe(void 0,{onData:t=>{const e=t.data;e&&p(e)}}))}function m(){s?.unsubscribe(),s=null}function C(t,e=!0){const i=c.useRef(t);i.current=t,c.useEffect(()=>{if(!e)return;const u=a=>i.current(a);return r.add(u),S(),()=>{r.delete(u),r.size===0&&m()}},[e])}export{C as u};
1
+ import{r as c,i as o}from"./index-BI9AljSD.js";import{c as f,a as b,w as d}from"./index-BWHgHrtv.js";const r=new Set;let n=null,l=null,s=null;function p(t){for(const e of[...r])e(t)}function S(){s||(n||(n=f({url:o()}),l=b({links:[d({client:n})]})),s=l.tail.events.subscribe(void 0,{onData:t=>{const e=t.data;e&&p(e)}}))}function m(){s?.unsubscribe(),s=null}function C(t,e=!0){const i=c.useRef(t);i.current=t,c.useEffect(()=>{if(!e)return;const u=a=>i.current(a);return r.add(u),S(),()=>{r.delete(u),r.size===0&&m()}},[e])}export{C as u};
@@ -1 +1 @@
1
- import{c as e}from"./createLucideIcon-DezKXSG2.js";const o=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],a=e("terminal",o);export{a as T};
1
+ import{c as e}from"./createLucideIcon-DthwWQIg.js";const o=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],a=e("terminal",o);export{a as T};
@@ -1 +1 @@
1
- import{a as i}from"./api-Co9aQ2Jw.js";import{a as c}from"./router-B9vQkNJL.js";import{s as l}from"./terminal-sessions-BQ6t92tJ.js";const v=132,b=44;function u(e){return e==="codex"?"codex":e==="pi"?"pi":void 0}function a(e){return e==="observe"?"observe":"takeover"}function f(e,n,t="takeover"){return`scout-tmux-${e}-${n}-${t}`}function m(e){return e?e.terminalSurface?e.terminalSurface:e.transport==="tmux"&&e.harnessSessionId?{backend:"tmux",sessionName:e.harnessSessionId,paneId:null,socketDir:null}:null:null}function g(e,n){if(!n)return e;try{const t=new URL(e);return t.searchParams.set("agentId",n),t.toString()}catch{const t=e.includes("?")?"&":"?";return`${e}${t}agentId=${encodeURIComponent(n)}`}}function $(e,n){return n==="takeover"&&!!e&&!m(e)}function y(e){return e?{backend:e.backend,terminalSession:e.sessionName,...e.backend==="tmux"?{tmuxSession:e.sessionName}:{},...e.backend==="zellij"?{zellijSession:e.sessionName,...e.socketDir?{zellijSocketDir:e.socketDir}:{}}:{},...e.backend==="herdr"?{herdrSession:e.sessionName,tmuxSession:e.sessionName}:{}}:null}function T(e){const{agentId:n,agent:t,terminalSurface:o,registeredTarget:s}=e,r=a(e.mode),d=o&&t?`scout-terminal-${o.backend}-${t.id}-${o.sessionName}-${r}`:s&&o?`scout-terminal-registry-${s.session.id}-${o.backend}-${o.sessionName}-${r}`:n?`scout-takeover-${n}-${r}`:`scout-takeover-${r}`;return o?.backend==="tmux"&&t?f(t.id,o.sessionName,r):d}function N(e){const n=T({agentId:e.agentId,agent:e.agent,terminalSurface:e.terminalSurface,registeredTarget:e.registeredTarget,mode:e.mode}),t=a(e.mode);return{relayStorageSessionKey:n,scopedRelayUrl:g(e.relayUrl,e.agentId),cwd:e.cwd??void 0,relayAgent:u(e.harness),surfaceOptions:y(e.terminalSurface),orphanTTL:e.terminalSurface?1e3:void 0,controlMode:t}}function h(e){return e.registeredTarget?{view:"terminal",terminalSessionId:e.registeredTarget.session.id,terminalSurfaceKey:l(e.registeredTarget.surface)}:e.agentId?{view:"terminal",agentId:e.agentId}:{view:"terminal"}}function R(e,n){return n?{...e,mode:n}:e}function w(e){const n=c(e);return typeof window>"u"?n:new URL(n,window.location.href).toString()}function x(e,n){return i("/api/terminal-sessions/control",{method:"POST",body:JSON.stringify({backend:e.backend,sessionName:e.sessionName,action:n})})}function O(e){return i("/api/terminal-relay/session/destroy",{method:"POST",body:JSON.stringify({sessionId:e})})}function U(e){try{window.localStorage.removeItem(`hudson.relay.${e}`)}catch{}}export{v as S,b as a,N as b,x as c,h as d,w as e,U as f,O as g,m as r,$ as s,R as w};
1
+ import{a as i}from"./api-Co9aQ2Jw.js";import{a as c}from"./router-DTtux5sP.js";import{s as l}from"./terminal-sessions-BQ6t92tJ.js";const v=132,b=44;function u(e){return e==="codex"?"codex":e==="pi"?"pi":void 0}function a(e){return e==="observe"?"observe":"takeover"}function f(e,n,t="takeover"){return`scout-tmux-${e}-${n}-${t}`}function m(e){return e?e.terminalSurface?e.terminalSurface:e.transport==="tmux"&&e.harnessSessionId?{backend:"tmux",sessionName:e.harnessSessionId,paneId:null,socketDir:null}:null:null}function g(e,n){if(!n)return e;try{const t=new URL(e);return t.searchParams.set("agentId",n),t.toString()}catch{const t=e.includes("?")?"&":"?";return`${e}${t}agentId=${encodeURIComponent(n)}`}}function $(e,n){return n==="takeover"&&!!e&&!m(e)}function y(e){return e?{backend:e.backend,terminalSession:e.sessionName,...e.backend==="tmux"?{tmuxSession:e.sessionName}:{},...e.backend==="zellij"?{zellijSession:e.sessionName,...e.socketDir?{zellijSocketDir:e.socketDir}:{}}:{},...e.backend==="herdr"?{herdrSession:e.sessionName,tmuxSession:e.sessionName}:{}}:null}function T(e){const{agentId:n,agent:t,terminalSurface:o,registeredTarget:s}=e,r=a(e.mode),d=o&&t?`scout-terminal-${o.backend}-${t.id}-${o.sessionName}-${r}`:s&&o?`scout-terminal-registry-${s.session.id}-${o.backend}-${o.sessionName}-${r}`:n?`scout-takeover-${n}-${r}`:`scout-takeover-${r}`;return o?.backend==="tmux"&&t?f(t.id,o.sessionName,r):d}function N(e){const n=T({agentId:e.agentId,agent:e.agent,terminalSurface:e.terminalSurface,registeredTarget:e.registeredTarget,mode:e.mode}),t=a(e.mode);return{relayStorageSessionKey:n,scopedRelayUrl:g(e.relayUrl,e.agentId),cwd:e.cwd??void 0,relayAgent:u(e.harness),surfaceOptions:y(e.terminalSurface),orphanTTL:e.terminalSurface?1e3:void 0,controlMode:t}}function h(e){return e.registeredTarget?{view:"terminal",terminalSessionId:e.registeredTarget.session.id,terminalSurfaceKey:l(e.registeredTarget.surface)}:e.agentId?{view:"terminal",agentId:e.agentId}:{view:"terminal"}}function R(e,n){return n?{...e,mode:n}:e}function w(e){const n=c(e);return typeof window>"u"?n:new URL(n,window.location.href).toString()}function x(e,n){return i("/api/terminal-sessions/control",{method:"POST",body:JSON.stringify({backend:e.backend,sessionName:e.sessionName,action:n})})}function O(e){return i("/api/terminal-relay/session/destroy",{method:"POST",body:JSON.stringify({sessionId:e})})}function U(e){try{window.localStorage.removeItem(`hudson.relay.${e}`)}catch{}}export{v as S,b as a,N as b,x as c,h as d,w as e,U as f,O as g,m as r,$ as s,R as w};
@@ -1 +1 @@
1
- import{d as o}from"./index-DvLtl7rV.js";async function n(e){if(t(e.agentId),!(await fetch(o("terminalRunPath"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e.command,...e.cwd?{cwd:e.cwd}:{},...e.agentId?{agentId:e.agentId}:{}})})).ok)throw new Error("Failed to queue takeover")}function t(e){if(!(typeof window>"u"))try{window.localStorage.removeItem("hudson.relay.scout-takeover"),e&&window.localStorage.removeItem(`hudson.relay.scout-takeover-${e}`)}catch{}}export{n as q};
1
+ import{d as o}from"./index-BI9AljSD.js";async function n(e){if(t(e.agentId),!(await fetch(o("terminalRunPath"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e.command,...e.cwd?{cwd:e.cwd}:{},...e.agentId?{agentId:e.agentId}:{}})})).ok)throw new Error("Failed to queue takeover")}function t(e){if(!(typeof window>"u"))try{window.localStorage.removeItem("hudson.relay.scout-takeover"),e&&window.localStorage.removeItem(`hudson.relay.scout-takeover-${e}`)}catch{}}export{n as q};
@@ -1 +1 @@
1
- import{r,j as t,L as Ce}from"./index-DvLtl7rV.js";import{g as ke,e as Ne,s as Me,a as de,f as Re}from"./scout-voice-BVUqGhth.js";import{createLevelHistory as Ee,energyFromPartialDelta as me,tryStartMicLevelMeter as Le,VOICE_WAVE_BARS as pe}from"./voice-levels-Dcr3jglk.js";import{L as Ve}from"./loader-circle-pM56HNhR.js";import{c as he}from"./createLucideIcon-DezKXSG2.js";const Ae=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Be=he("mic",Ae);const _e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Pe=he("square",_e);function Te(e,s=!1){return e.key==="Enter"&&!e.shiftKey&&(s||!!(e.metaKey||e.ctrlKey))&&!e.nativeEvent?.isComposing}function De(e){switch(e){case"starting":return"starting";case"recording":return"recording";case"processing":return"processing";default:return"idle"}}function qe(e,s,l){if(l)return l;switch(e){case"starting":return"Starting voice…";case"recording":return s.trim()?s.trim():null;case"processing":return"Transcribing…";default:return null}}function fe(e){return new Promise(s=>window.setTimeout(s,e))}function Fe({onAppend:e,onError:s,onStatus:l,disabled:L,className:m}){const p=r.useRef(ke()),u=r.useRef(null),h=r.useRef(Ee(pe)),K=r.useRef(null),C=r.useRef(!1),S=r.useRef(""),T=r.useRef(0),b=r.useRef(0),[v,k]=r.useState("idle"),[G,_]=r.useState(""),[J,D]=r.useState("probing"),[se,q]=r.useState(null),[R,V]=r.useState(null),[P,W]=r.useState(null),[Q,y]=r.useState(0),N=r.useCallback(()=>{b.current&&(window.cancelAnimationFrame(b.current),b.current=0),K.current?.stop(),K.current=null,C.current=!1},[]),j=r.useCallback(n=>{W(n),s?.(n)},[s]),X=r.useCallback((n,i,o)=>{l?.({state:n,partial:i,message:qe(n,i,o),tone:o?"error":n==="recording"?"recording":n==="processing"?"processing":"neutral",levels:n==="idle"&&!o?[]:h.current.snapshot(),levelsLive:C.current})},[l]);r.useEffect(()=>{X(v,G,P)},[X,P,G,v,Q]);const A=r.useCallback(async(n=!1)=>{const i=p.current;D(x=>x==="launching"?x:"probing");const o=await i.probe(n?{force:!0}:void 0);return q(o),V(null),D("idle"),o},[]);r.useEffect(()=>{Ne();const n=p.current,i=Me(o=>{q(o.ok),V(null),D("idle")});return n.connectionState==="unknown"?A():(q(n.connectionState==="connected"),V(null),D("idle")),()=>{i(),N();const o=u.current;o&&(o.cancel().catch(()=>{}),u.current=null)}},[A,N]);const B=r.useCallback(n=>{h.current.push(n),y(i=>i+1)},[]),Z=r.useCallback(()=>{if(b.current)return;let n=performance.now();const i=o=>{if(o-n>=36){n=o;const x=o-(T.current||o),w=me(S.current,S.current,x);h.current.push(Math.max(.05,w)),y(c=>c+1)}b.current=window.requestAnimationFrame(i)};b.current=window.requestAnimationFrame(i)},[]),ee=r.useCallback(async()=>{const n=p.current;W(null),_(""),S.current="",T.current=performance.now(),h.current.clear(),y(c=>c+1),k("starting"),N();let i=await de({surface:"chat-composer",requestPermissions:!0});if(!i.ready&&i.issue?.code==="microphone_not_requested"&&(await fe(1800),i=await de({surface:"chat-composer"})),!(i.ready||i.issue?.code==="microphone_not_requested")){k("idle");const c=i.issue;c?(V(c),j(Re(c))):j("Scout voice is not ready."),A(!0);return}V(null),q(!0);let x=null,w=!1;try{if(x=await n.startLive({onState:g=>k(De(g)),onPartial:g=>{const U=S.current;if(S.current=g,T.current=performance.now(),_(g),!C.current){const ce=me(U,g,0);B(ce)}},onLevel:g=>{w=!0,C.current=!0,b.current&&(window.cancelAnimationFrame(b.current),b.current=0),B(g)}}),u.current=x,k("recording"),await fe(140),u.current&&!w&&!C.current){const g=await Le(U=>{w=!0,C.current=!0,b.current&&(window.cancelAnimationFrame(b.current),b.current=0),B(U)});g&&u.current?K.current=g:u.current&&!C.current&&(C.current=!1,Z())}const c=await x.result;u.current=null,N(),k("idle");const $=S.current.trim();_(""),S.current="",W(null),h.current.clear(),y(g=>g+1);const E=c.text?.trim()||$;E?e(E):j("No speech was detected. Check your microphone in Settings → Voice."),A(!0)}catch(c){u.current=null,N(),k("idle");const $=S.current.trim();_(""),S.current="",h.current.clear(),y(g=>g+1);const E=c instanceof Error?c.message:"Scout voice recording failed.";if($){e($),c instanceof Error&&c.name==="AbortError"||j(`Recording ended early, but Scout recovered the partial transcript. ${E}`);return}if(c instanceof Error&&c.name==="AbortError")return;j(E),A(!0)}},[e,A,B,j,Z,N]),te=r.useCallback(async()=>{const n=u.current;if(!n)return;k("processing"),N();const i=window.setInterval(()=>{h.current.decay(.82),y(o=>o+1)},50);window.setTimeout(()=>window.clearInterval(i),600);try{await n.stop()}catch(o){try{await n.cancel()}catch{}u.current=null,k("idle");const x=S.current.trim();_(""),S.current="",h.current.clear(),y(c=>c+1);const w=o instanceof Error?o.message:"Scout voice recording did not finish.";x?(e(x),j(`Recording ended early, but Scout recovered the partial transcript. ${w}`)):j(w)}},[e,j,N]),ne=r.useCallback(()=>{if(v==="recording"){te();return}v==="processing"||v==="starting"||ee()},[v,ee,te]),f=v==="recording",M=J==="launching"||v==="starting"||v==="processing",z=(p.current.canRequestMicrophone||R?.action==="request_microphone"||R?.action==="request_speech")&&!f&&!M,O=(p.current.isMicrophoneHardDenied||R?.action==="open_microphone_settings")&&!f&&!M,F=(se===!1||R!==null)&&!z&&!O&&!f&&!M,I=P||(R?R.title:O?"Microphone blocked. Open Privacy & Security → Microphone to change it.":z?"Allow microphone access":F?"Scout voice is not ready":J==="probing"?"Checking voice…":f?"Stop recording":v==="processing"?"Transcribing…":v==="starting"?"Starting voice…":"Start recording"),oe=P?"s-dictation-mic--error":f?"s-dictation-mic--recording":O?"s-dictation-mic--error":z?"s-dictation-mic--needs-permission":F?"s-dictation-mic--unavailable":M?"s-dictation-mic--busy":"",H=M?Ve:f?Pe:Be,d=f?12:14;return t.jsx("button",{type:"button",title:I,"aria-label":I,"aria-pressed":f,onClick:ne,disabled:L||v==="processing",className:["s-dictation-mic",oe,m].filter(Boolean).join(" "),children:t.jsx(H,{size:d,className:M?"s-dictation-mic-spin":f?"fill-current":""})})}function Ie({samples:e,active:s,processing:l=!1,className:L}){const m=$e(e,pe,l?.06:.04),p=["s-msg-compose-wave",s?"s-msg-compose-wave--live":"",l?"s-msg-compose-wave--processing":"",L??""].filter(Boolean).join(" ");return t.jsx("div",{className:p,"aria-hidden":"true","data-wave-source":e&&e.length>0?"levels":"floor",children:m.map((u,h)=>t.jsx("span",{className:"s-msg-compose-wave-bar",style:{transform:`scaleY(${Math.max(.08,u)})`,opacity:l?.28+u*.35:s?.4+u*.55:.25}},h))})}function $e(e,s,l){if(!e||e.length===0)return Array.from({length:s},()=>l);if(e.length===s)return e.map(m=>Math.max(l,Math.min(1,m)));const L=new Array(s);for(let m=0;m<s;m+=1){const p=Math.min(e.length-1,Math.round(m/Math.max(1,s-1)*(e.length-1)));L[m]=Math.max(l,Math.min(1,e[p]??l))}return L}function Ke(){return t.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("path",{d:"M12 19V5"}),t.jsx("path",{d:"m5 12 7-7 7 7"})]})}function We(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:t.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})})}function ze(){return t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t.jsx("path",{d:"M21.44 11.05 12.05 20.44a5.5 5.5 0 0 1-7.78-7.78l9.19-9.19a3.5 3.5 0 0 1 4.95 4.95l-9.2 9.19a1.5 1.5 0 0 1-2.12-2.12l8.49-8.48"})})}function ge(e,s){e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,s)}px`}function Oe(e){return e.tone==="error"?"Voice":e.state==="recording"?"Listening":e.state==="processing"?"Transcribing":e.state==="starting"?"Starting":"Voice"}function Xe({renderWhenEmbedded:e=!1,...s}){return Ce()&&!e?null:t.jsx(He,{...s})}function He({value:e,onChange:s,onSend:l,placeholder:L="Type a message…",disabled:m=!1,sending:p=!1,canSend:u,stopMode:h=!1,onStop:K,sendTitle:C="Send (Cmd+Enter)",sendAriaLabel:S="Send message (Cmd+Enter)",stopAriaLabel:T="Stop agent",showDictation:b=!0,onDictationStatusChange:v,showAttach:k=!1,onAttach:G,attachTitle:_="Add attachment",attachAriaLabel:J="Add attachment",onPaste:D,dropHandlers:se,dragActive:q=!1,secondaryAction:R,leadingTools:V,tools:P,footer:W,header:Q,above:y,aboveAttached:N=!1,input:j,overlay:X,status:A,textareaRef:B,onKeyDown:Z,sendOnEnter:ee=!1,onSelect:te,onBlur:ne,density:f="panel",as:M="form",className:z,rows:O=1,autoResize:F=!0,maxHeightPx:I=160,"aria-label":oe="Message"}){const H=r.useRef(null),[d,n]=r.useState(null),i=r.useCallback(a=>{H.current=a,B&&(B.current=a)},[B]);r.useEffect(()=>{if(!F)return;const a=H.current;a&&ge(a,I)},[e,F,I]);const o=(u??e.trim().length>0)&&!p&&!m,x=P??W,w=d?.state==="recording"||d?.state==="starting",c=d?.state==="processing",$=!!(d&&(d.tone==="error"||w||c||d.partial&&d.partial.trim())),E=r.useCallback(()=>{h||!(u??e.trim().length>0)||p||m||l()},[u,m,l,p,h,e]),g=a=>{a.preventDefault(),E()},U=a=>{if(Z?.(a)){a.preventDefault();return}if(Te(a,ee)){a.preventDefault(),E();return}},ce=a=>{const Y=a.target.value;s(Y,{caret:a.target.selectionStart??Y.length}),F&&ge(a.target,I)},ve=a=>{const Y=e.trim()?`${e.trimEnd()} ${a}`:a;s(Y,{caret:Y.length}),requestAnimationFrame(()=>H.current?.focus())},be=r.useCallback(a=>{n(a),v?.(a)},[v]),ie=["s-msg-compose",`s-msg-compose--${f}`,f==="thread"?"s-thread-compose":"",z??""].filter(Boolean).join(" "),xe=["s-msg-compose-shell",f==="thread"?"s-thread-compose-shell":""].filter(Boolean).join(" "),Se=["s-msg-compose-input",f==="thread"?"s-thread-compose-input":""].filter(Boolean).join(" "),ae=["s-msg-compose-send",f==="thread"?"s-thread-compose-send":"",h?"s-msg-compose-send--agent-stop s-thread-compose-send--stop":""].filter(Boolean).join(" "),we=["s-msg-compose-voice",d?.tone==="recording"||w?"s-msg-compose-voice--recording":"",d?.tone==="processing"||c?"s-msg-compose-voice--processing":"",d?.tone==="error"?"s-msg-compose-voice--error":""].filter(Boolean).join(" "),re=d?.tone==="error",ye=d?.partial?.trim()||null,le=re?d?.message:c?"Finalizing transcript…":ye,je=t.jsxs("div",{className:xe,"data-drag-active":q?"true":void 0,...se,children:[Q?t.jsx("div",{className:"s-msg-compose-header",children:Q}):null,t.jsxs("div",{className:"s-msg-compose-body",children:[j??t.jsx("textarea",{ref:i,className:Se,placeholder:L,value:e,disabled:m,rows:O,"aria-label":oe,onChange:ce,onKeyDown:U,onSelect:te,onBlur:ne,onPaste:D}),$?t.jsxs("div",{className:we,role:re?"alert":"status","aria-live":re?"assertive":"polite",children:[!re&&(w||c)?t.jsx(Ie,{samples:d?.levels,active:w,processing:c}):null,t.jsxs("div",{className:"s-msg-compose-voice-meta",children:[t.jsx("span",{className:"s-msg-compose-voice-label",children:d?Oe(d):"Voice"}),le?t.jsx("span",{className:"s-msg-compose-voice-text",children:le}):null]})]}):null]}),t.jsxs("div",{className:["s-msg-compose-toolbar",f==="thread"?"s-thread-compose-footer":""].filter(Boolean).join(" "),children:[t.jsxs("div",{className:"s-msg-compose-toolbar-start",children:[V,k?t.jsx("button",{type:"button",className:"s-msg-compose-icon-btn",title:_,"aria-label":J,disabled:m||p,onClick:G,children:t.jsx(ze,{})}):V?null:t.jsx("span",{className:"s-msg-compose-toolbar-spacer","aria-hidden":"true"})]}),t.jsxs("div",{className:"s-msg-compose-toolbar-end",children:[x?t.jsx("div",{className:"s-msg-compose-tools",children:x}):null,b?t.jsx(Fe,{onAppend:ve,onStatus:be,disabled:m||p}):null,R?t.jsx("div",{className:"s-msg-compose-secondary",children:R}):null,h?t.jsx("button",{type:"button",className:ae,onClick:K,title:T,"aria-label":T,children:t.jsx(We,{})}):t.jsx("button",{type:M==="form"?"submit":"button",className:ae,disabled:!o,title:C,"aria-label":S,"data-action":"send",onClick:M==="div"?()=>E():void 0,children:t.jsx(Ke,{})})]})]}),A]}),ue=t.jsxs("div",{className:"s-msg-compose-frame","data-above-attached":y&&N?"true":void 0,children:[X,y?t.jsx("div",{className:"s-msg-compose-above",children:y}):null,je]});return M==="div"?t.jsx("div",{className:ie,children:ue}):t.jsx("form",{className:ie,onSubmit:g,children:ue})}function Ze(e){if(!e)return null;const s=e.replace(/_/g," ");return s.toLowerCase()==="relay agent"?"agent":s}export{Fe as D,Xe as M,Pe as S,Be as a,Ze as f,Te as i};
1
+ import{r,j as t,L as Ce}from"./index-BI9AljSD.js";import{g as ke,e as Ne,s as Me,a as de,f as Re}from"./scout-voice-BZKsdquE.js";import{createLevelHistory as Ee,energyFromPartialDelta as me,tryStartMicLevelMeter as Le,VOICE_WAVE_BARS as pe}from"./voice-levels-Dcr3jglk.js";import{L as Ve}from"./loader-circle-B2W9DPG5.js";import{c as he}from"./createLucideIcon-DthwWQIg.js";const Ae=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Be=he("mic",Ae);const _e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Pe=he("square",_e);function Te(e,s=!1){return e.key==="Enter"&&!e.shiftKey&&(s||!!(e.metaKey||e.ctrlKey))&&!e.nativeEvent?.isComposing}function De(e){switch(e){case"starting":return"starting";case"recording":return"recording";case"processing":return"processing";default:return"idle"}}function qe(e,s,l){if(l)return l;switch(e){case"starting":return"Starting voice…";case"recording":return s.trim()?s.trim():null;case"processing":return"Transcribing…";default:return null}}function fe(e){return new Promise(s=>window.setTimeout(s,e))}function Fe({onAppend:e,onError:s,onStatus:l,disabled:L,className:m}){const p=r.useRef(ke()),u=r.useRef(null),h=r.useRef(Ee(pe)),K=r.useRef(null),C=r.useRef(!1),S=r.useRef(""),T=r.useRef(0),b=r.useRef(0),[v,k]=r.useState("idle"),[G,_]=r.useState(""),[J,D]=r.useState("probing"),[se,q]=r.useState(null),[R,V]=r.useState(null),[P,W]=r.useState(null),[Q,y]=r.useState(0),N=r.useCallback(()=>{b.current&&(window.cancelAnimationFrame(b.current),b.current=0),K.current?.stop(),K.current=null,C.current=!1},[]),j=r.useCallback(n=>{W(n),s?.(n)},[s]),X=r.useCallback((n,i,o)=>{l?.({state:n,partial:i,message:qe(n,i,o),tone:o?"error":n==="recording"?"recording":n==="processing"?"processing":"neutral",levels:n==="idle"&&!o?[]:h.current.snapshot(),levelsLive:C.current})},[l]);r.useEffect(()=>{X(v,G,P)},[X,P,G,v,Q]);const A=r.useCallback(async(n=!1)=>{const i=p.current;D(x=>x==="launching"?x:"probing");const o=await i.probe(n?{force:!0}:void 0);return q(o),V(null),D("idle"),o},[]);r.useEffect(()=>{Ne();const n=p.current,i=Me(o=>{q(o.ok),V(null),D("idle")});return n.connectionState==="unknown"?A():(q(n.connectionState==="connected"),V(null),D("idle")),()=>{i(),N();const o=u.current;o&&(o.cancel().catch(()=>{}),u.current=null)}},[A,N]);const B=r.useCallback(n=>{h.current.push(n),y(i=>i+1)},[]),Z=r.useCallback(()=>{if(b.current)return;let n=performance.now();const i=o=>{if(o-n>=36){n=o;const x=o-(T.current||o),w=me(S.current,S.current,x);h.current.push(Math.max(.05,w)),y(c=>c+1)}b.current=window.requestAnimationFrame(i)};b.current=window.requestAnimationFrame(i)},[]),ee=r.useCallback(async()=>{const n=p.current;W(null),_(""),S.current="",T.current=performance.now(),h.current.clear(),y(c=>c+1),k("starting"),N();let i=await de({surface:"chat-composer",requestPermissions:!0});if(!i.ready&&i.issue?.code==="microphone_not_requested"&&(await fe(1800),i=await de({surface:"chat-composer"})),!(i.ready||i.issue?.code==="microphone_not_requested")){k("idle");const c=i.issue;c?(V(c),j(Re(c))):j("Scout voice is not ready."),A(!0);return}V(null),q(!0);let x=null,w=!1;try{if(x=await n.startLive({onState:g=>k(De(g)),onPartial:g=>{const U=S.current;if(S.current=g,T.current=performance.now(),_(g),!C.current){const ce=me(U,g,0);B(ce)}},onLevel:g=>{w=!0,C.current=!0,b.current&&(window.cancelAnimationFrame(b.current),b.current=0),B(g)}}),u.current=x,k("recording"),await fe(140),u.current&&!w&&!C.current){const g=await Le(U=>{w=!0,C.current=!0,b.current&&(window.cancelAnimationFrame(b.current),b.current=0),B(U)});g&&u.current?K.current=g:u.current&&!C.current&&(C.current=!1,Z())}const c=await x.result;u.current=null,N(),k("idle");const $=S.current.trim();_(""),S.current="",W(null),h.current.clear(),y(g=>g+1);const E=c.text?.trim()||$;E?e(E):j("No speech was detected. Check your microphone in Settings → Voice."),A(!0)}catch(c){u.current=null,N(),k("idle");const $=S.current.trim();_(""),S.current="",h.current.clear(),y(g=>g+1);const E=c instanceof Error?c.message:"Scout voice recording failed.";if($){e($),c instanceof Error&&c.name==="AbortError"||j(`Recording ended early, but Scout recovered the partial transcript. ${E}`);return}if(c instanceof Error&&c.name==="AbortError")return;j(E),A(!0)}},[e,A,B,j,Z,N]),te=r.useCallback(async()=>{const n=u.current;if(!n)return;k("processing"),N();const i=window.setInterval(()=>{h.current.decay(.82),y(o=>o+1)},50);window.setTimeout(()=>window.clearInterval(i),600);try{await n.stop()}catch(o){try{await n.cancel()}catch{}u.current=null,k("idle");const x=S.current.trim();_(""),S.current="",h.current.clear(),y(c=>c+1);const w=o instanceof Error?o.message:"Scout voice recording did not finish.";x?(e(x),j(`Recording ended early, but Scout recovered the partial transcript. ${w}`)):j(w)}},[e,j,N]),ne=r.useCallback(()=>{if(v==="recording"){te();return}v==="processing"||v==="starting"||ee()},[v,ee,te]),f=v==="recording",M=J==="launching"||v==="starting"||v==="processing",z=(p.current.canRequestMicrophone||R?.action==="request_microphone"||R?.action==="request_speech")&&!f&&!M,O=(p.current.isMicrophoneHardDenied||R?.action==="open_microphone_settings")&&!f&&!M,F=(se===!1||R!==null)&&!z&&!O&&!f&&!M,I=P||(R?R.title:O?"Microphone blocked. Open Privacy & Security → Microphone to change it.":z?"Allow microphone access":F?"Scout voice is not ready":J==="probing"?"Checking voice…":f?"Stop recording":v==="processing"?"Transcribing…":v==="starting"?"Starting voice…":"Start recording"),oe=P?"s-dictation-mic--error":f?"s-dictation-mic--recording":O?"s-dictation-mic--error":z?"s-dictation-mic--needs-permission":F?"s-dictation-mic--unavailable":M?"s-dictation-mic--busy":"",H=M?Ve:f?Pe:Be,d=f?12:14;return t.jsx("button",{type:"button",title:I,"aria-label":I,"aria-pressed":f,onClick:ne,disabled:L||v==="processing",className:["s-dictation-mic",oe,m].filter(Boolean).join(" "),children:t.jsx(H,{size:d,className:M?"s-dictation-mic-spin":f?"fill-current":""})})}function Ie({samples:e,active:s,processing:l=!1,className:L}){const m=$e(e,pe,l?.06:.04),p=["s-msg-compose-wave",s?"s-msg-compose-wave--live":"",l?"s-msg-compose-wave--processing":"",L??""].filter(Boolean).join(" ");return t.jsx("div",{className:p,"aria-hidden":"true","data-wave-source":e&&e.length>0?"levels":"floor",children:m.map((u,h)=>t.jsx("span",{className:"s-msg-compose-wave-bar",style:{transform:`scaleY(${Math.max(.08,u)})`,opacity:l?.28+u*.35:s?.4+u*.55:.25}},h))})}function $e(e,s,l){if(!e||e.length===0)return Array.from({length:s},()=>l);if(e.length===s)return e.map(m=>Math.max(l,Math.min(1,m)));const L=new Array(s);for(let m=0;m<s;m+=1){const p=Math.min(e.length-1,Math.round(m/Math.max(1,s-1)*(e.length-1)));L[m]=Math.max(l,Math.min(1,e[p]??l))}return L}function Ke(){return t.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("path",{d:"M12 19V5"}),t.jsx("path",{d:"m5 12 7-7 7 7"})]})}function We(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:t.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})})}function ze(){return t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t.jsx("path",{d:"M21.44 11.05 12.05 20.44a5.5 5.5 0 0 1-7.78-7.78l9.19-9.19a3.5 3.5 0 0 1 4.95 4.95l-9.2 9.19a1.5 1.5 0 0 1-2.12-2.12l8.49-8.48"})})}function ge(e,s){e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,s)}px`}function Oe(e){return e.tone==="error"?"Voice":e.state==="recording"?"Listening":e.state==="processing"?"Transcribing":e.state==="starting"?"Starting":"Voice"}function Xe({renderWhenEmbedded:e=!1,...s}){return Ce()&&!e?null:t.jsx(He,{...s})}function He({value:e,onChange:s,onSend:l,placeholder:L="Type a message…",disabled:m=!1,sending:p=!1,canSend:u,stopMode:h=!1,onStop:K,sendTitle:C="Send (Cmd+Enter)",sendAriaLabel:S="Send message (Cmd+Enter)",stopAriaLabel:T="Stop agent",showDictation:b=!0,onDictationStatusChange:v,showAttach:k=!1,onAttach:G,attachTitle:_="Add attachment",attachAriaLabel:J="Add attachment",onPaste:D,dropHandlers:se,dragActive:q=!1,secondaryAction:R,leadingTools:V,tools:P,footer:W,header:Q,above:y,aboveAttached:N=!1,input:j,overlay:X,status:A,textareaRef:B,onKeyDown:Z,sendOnEnter:ee=!1,onSelect:te,onBlur:ne,density:f="panel",as:M="form",className:z,rows:O=1,autoResize:F=!0,maxHeightPx:I=160,"aria-label":oe="Message"}){const H=r.useRef(null),[d,n]=r.useState(null),i=r.useCallback(a=>{H.current=a,B&&(B.current=a)},[B]);r.useEffect(()=>{if(!F)return;const a=H.current;a&&ge(a,I)},[e,F,I]);const o=(u??e.trim().length>0)&&!p&&!m,x=P??W,w=d?.state==="recording"||d?.state==="starting",c=d?.state==="processing",$=!!(d&&(d.tone==="error"||w||c||d.partial&&d.partial.trim())),E=r.useCallback(()=>{h||!(u??e.trim().length>0)||p||m||l()},[u,m,l,p,h,e]),g=a=>{a.preventDefault(),E()},U=a=>{if(Z?.(a)){a.preventDefault();return}if(Te(a,ee)){a.preventDefault(),E();return}},ce=a=>{const Y=a.target.value;s(Y,{caret:a.target.selectionStart??Y.length}),F&&ge(a.target,I)},ve=a=>{const Y=e.trim()?`${e.trimEnd()} ${a}`:a;s(Y,{caret:Y.length}),requestAnimationFrame(()=>H.current?.focus())},be=r.useCallback(a=>{n(a),v?.(a)},[v]),ie=["s-msg-compose",`s-msg-compose--${f}`,f==="thread"?"s-thread-compose":"",z??""].filter(Boolean).join(" "),xe=["s-msg-compose-shell",f==="thread"?"s-thread-compose-shell":""].filter(Boolean).join(" "),Se=["s-msg-compose-input",f==="thread"?"s-thread-compose-input":""].filter(Boolean).join(" "),ae=["s-msg-compose-send",f==="thread"?"s-thread-compose-send":"",h?"s-msg-compose-send--agent-stop s-thread-compose-send--stop":""].filter(Boolean).join(" "),we=["s-msg-compose-voice",d?.tone==="recording"||w?"s-msg-compose-voice--recording":"",d?.tone==="processing"||c?"s-msg-compose-voice--processing":"",d?.tone==="error"?"s-msg-compose-voice--error":""].filter(Boolean).join(" "),re=d?.tone==="error",ye=d?.partial?.trim()||null,le=re?d?.message:c?"Finalizing transcript…":ye,je=t.jsxs("div",{className:xe,"data-drag-active":q?"true":void 0,...se,children:[Q?t.jsx("div",{className:"s-msg-compose-header",children:Q}):null,t.jsxs("div",{className:"s-msg-compose-body",children:[j??t.jsx("textarea",{ref:i,className:Se,placeholder:L,value:e,disabled:m,rows:O,"aria-label":oe,onChange:ce,onKeyDown:U,onSelect:te,onBlur:ne,onPaste:D}),$?t.jsxs("div",{className:we,role:re?"alert":"status","aria-live":re?"assertive":"polite",children:[!re&&(w||c)?t.jsx(Ie,{samples:d?.levels,active:w,processing:c}):null,t.jsxs("div",{className:"s-msg-compose-voice-meta",children:[t.jsx("span",{className:"s-msg-compose-voice-label",children:d?Oe(d):"Voice"}),le?t.jsx("span",{className:"s-msg-compose-voice-text",children:le}):null]})]}):null]}),t.jsxs("div",{className:["s-msg-compose-toolbar",f==="thread"?"s-thread-compose-footer":""].filter(Boolean).join(" "),children:[t.jsxs("div",{className:"s-msg-compose-toolbar-start",children:[V,k?t.jsx("button",{type:"button",className:"s-msg-compose-icon-btn",title:_,"aria-label":J,disabled:m||p,onClick:G,children:t.jsx(ze,{})}):V?null:t.jsx("span",{className:"s-msg-compose-toolbar-spacer","aria-hidden":"true"})]}),t.jsxs("div",{className:"s-msg-compose-toolbar-end",children:[x?t.jsx("div",{className:"s-msg-compose-tools",children:x}):null,b?t.jsx(Fe,{onAppend:ve,onStatus:be,disabled:m||p}):null,R?t.jsx("div",{className:"s-msg-compose-secondary",children:R}):null,h?t.jsx("button",{type:"button",className:ae,onClick:K,title:T,"aria-label":T,children:t.jsx(We,{})}):t.jsx("button",{type:M==="form"?"submit":"button",className:ae,disabled:!o,title:C,"aria-label":S,"data-action":"send",onClick:M==="div"?()=>E():void 0,children:t.jsx(Ke,{})})]})]}),A]}),ue=t.jsxs("div",{className:"s-msg-compose-frame","data-above-attached":y&&N?"true":void 0,children:[X,y?t.jsx("div",{className:"s-msg-compose-above",children:y}):null,je]});return M==="div"?t.jsx("div",{className:ie,children:ue}):t.jsx("form",{className:ie,onSubmit:g,children:ue})}function Ze(e){if(!e)return null;const s=e.replace(/_/g," ");return s.toLowerCase()==="relay agent"?"agent":s}export{Fe as D,Xe as M,Pe as S,Be as a,Ze as f,Te as i};
@@ -1 +1 @@
1
- import{r as n}from"./index-DvLtl7rV.js";import{f as S}from"./Provider-CtXJeLrP.js";import{a as g}from"./api-Co9aQ2Jw.js";import{u as L}from"./sse-CD9MMUxl.js";let r=null,i=null,c=null;const f=new Set,y=[];function E(){return r}function m(){return r??y}function k(){return c}function R(t){return f.add(t),()=>{f.delete(t)}}function C(){for(const t of f)t()}async function d(t={}){if(r&&!t.force)return r;if(i)return t.force&&(u=!0),i;const o=g("/api/conversations").then(e=>(r=e,c=null,C(),e)).catch(e=>{throw c=e instanceof Error?e.message:String(e),C(),e}).finally(()=>{i=null,u&&(u=!1,d({force:!0}).catch(()=>null))});return i=o,o}const T=250;let l=null,u=!1;function b(){l||(l=setTimeout(()=>{l=null,d({force:!0}).catch(()=>null)},T))}function A(){const t=n.useSyncExternalStore(R,m,m),[o,e]=n.useState(()=>E()==null),[p,h]=n.useState(()=>k()),a=n.useCallback(async(s=!1)=>{E()!=null||e(!0);try{await d({force:s}),h(null)}catch(v){h(S(v))}finally{e(!1)}},[]);return n.useEffect(()=>{a(!1)},[a]),L(s=>{(s.kind==="message.posted"||s.kind==="conversation.upserted")&&b()}),{sessions:t,loading:o,loadError:p,reload:a}}export{A as u};
1
+ import{r as n}from"./index-BI9AljSD.js";import{f as S}from"./Provider-Bu-C8Hxc.js";import{a as g}from"./api-Co9aQ2Jw.js";import{u as L}from"./sse-DDHEHUgz.js";let r=null,i=null,c=null;const f=new Set,y=[];function E(){return r}function m(){return r??y}function k(){return c}function R(t){return f.add(t),()=>{f.delete(t)}}function C(){for(const t of f)t()}async function d(t={}){if(r&&!t.force)return r;if(i)return t.force&&(u=!0),i;const o=g("/api/conversations").then(e=>(r=e,c=null,C(),e)).catch(e=>{throw c=e instanceof Error?e.message:String(e),C(),e}).finally(()=>{i=null,u&&(u=!1,d({force:!0}).catch(()=>null))});return i=o,o}const T=250;let l=null,u=!1;function b(){l||(l=setTimeout(()=>{l=null,d({force:!0}).catch(()=>null)},T))}function A(){const t=n.useSyncExternalStore(R,m,m),[o,e]=n.useState(()=>E()==null),[p,h]=n.useState(()=>k()),a=n.useCallback(async(s=!1)=>{E()!=null||e(!0);try{await d({force:s}),h(null)}catch(v){h(S(v))}finally{e(!1)}},[]);return n.useEffect(()=>{a(!1)},[a]),L(s=>{(s.kind==="message.posted"||s.kind==="conversation.upserted")&&b()}),{sessions:t,loading:o,loadError:p,reload:a}}export{A as u};
@@ -1 +1 @@
1
- import{r as a}from"./index-DvLtl7rV.js";import{a as f}from"./api-Co9aQ2Jw.js";import{u as d}from"./sse-CD9MMUxl.js";const A=new Set(["working","queued","needs_attention"]);function i(t,e){if(!t)return e;const n={needs_attention:5,working:4,queued:3,failed:2,completed:1},o=n[e.status]-n[t.status];return o!==0?o>0?e:t:e.updatedAt!==t.updatedAt?e.updatedAt>t.updatedAt?e:t:e.invocationId.localeCompare(t.invocationId)<0?e:t}function c(t,e,n){t.set(e,i(t.get(e),n))}function g(t){const e=t.filter(s=>A.has(s.status)),n=new Map,o=new Map,r=new Map;for(const s of e){const u=r.get(s.agentId);u?u.push(s):r.set(s.agentId,[s]);const l=s.conversationId?.trim();l?c(n,l,s):c(o,s.agentId,s)}return{asks:e,byConversationId:n,fallbackByAgentId:o,byAgentId:r}}function b(t,e){let n;const o=new Set([e.id,...e.equivalentConversationIds??[]]);for(const r of o){const s=t.byConversationId.get(r);s&&(n=i(n,s))}return n||(e.agentId?t.fallbackByAgentId.get(e.agentId):void 0)}function m(t,e){let n;for(const o of e)for(const r of t.byAgentId.get(o)??[])n=i(n,r);return n}function w(t,e){return(t.byAgentId.get(e)?.length??0)>0}const k=1500;function h(){const[t,e]=a.useState(null),n=a.useRef(null),o=a.useCallback(async()=>{const s=await f("/api/fleet").catch(()=>null);e(s)},[]);a.useEffect(()=>(o(),()=>{n.current!==null&&(window.clearTimeout(n.current),n.current=null)}),[o]);const r=a.useCallback(()=>{n.current===null&&(n.current=window.setTimeout(()=>{n.current=null,o()},k))},[o]);return d(s=>{(s.kind==="message.posted"||s.kind==="flight.updated"||s.kind==="collaboration.event.appended")&&r()}),a.useMemo(()=>g(t?.activeAsks??[]),[t?.activeAsks])}export{m as b,b as f,w as h,h as u};
1
+ import{r as a}from"./index-BI9AljSD.js";import{a as f}from"./api-Co9aQ2Jw.js";import{u as d}from"./sse-DDHEHUgz.js";const A=new Set(["working","queued","needs_attention"]);function i(t,e){if(!t)return e;const n={needs_attention:5,working:4,queued:3,failed:2,completed:1},o=n[e.status]-n[t.status];return o!==0?o>0?e:t:e.updatedAt!==t.updatedAt?e.updatedAt>t.updatedAt?e:t:e.invocationId.localeCompare(t.invocationId)<0?e:t}function c(t,e,n){t.set(e,i(t.get(e),n))}function g(t){const e=t.filter(s=>A.has(s.status)),n=new Map,o=new Map,r=new Map;for(const s of e){const u=r.get(s.agentId);u?u.push(s):r.set(s.agentId,[s]);const l=s.conversationId?.trim();l?c(n,l,s):c(o,s.agentId,s)}return{asks:e,byConversationId:n,fallbackByAgentId:o,byAgentId:r}}function b(t,e){let n;const o=new Set([e.id,...e.equivalentConversationIds??[]]);for(const r of o){const s=t.byConversationId.get(r);s&&(n=i(n,s))}return n||(e.agentId?t.fallbackByAgentId.get(e.agentId):void 0)}function m(t,e){let n;for(const o of e)for(const r of t.byAgentId.get(o)??[])n=i(n,r);return n}function w(t,e){return(t.byAgentId.get(e)?.length??0)>0}const k=1500;function h(){const[t,e]=a.useState(null),n=a.useRef(null),o=a.useCallback(async()=>{const s=await f("/api/fleet").catch(()=>null);e(s)},[]);a.useEffect(()=>(o(),()=>{n.current!==null&&(window.clearTimeout(n.current),n.current=null)}),[o]);const r=a.useCallback(()=>{n.current===null&&(n.current=window.setTimeout(()=>{n.current=null,o()},k))},[o]);return d(s=>{(s.kind==="message.posted"||s.kind==="flight.updated"||s.kind==="collaboration.event.appended")&&r()}),a.useMemo(()=>g(t?.activeAsks??[]),[t?.activeAsks])}export{m as b,b as f,w as h,h as u};
@@ -1 +1 @@
1
- import{r as m}from"./index-DvLtl7rV.js";import{a as S}from"./api-Co9aQ2Jw.js";import{u as k}from"./sse-CD9MMUxl.js";import{u as E,m as p,j as M,k as l,l as _,n as q}from"./mesh-ops-BZ1h5RQs.js";const w=new Set(["collaboration.event.appended","flight.updated","message.posted"]),y=750;let b=0;const c=new Map,f=new Map,g=new Map;let d=0;function h(e,s){const t=e??"",r=s.background?`background:${t}`:`foreground:${t}:${s.refreshToken??0}`,a=c.get(r);if(a)return s.background||l(e),a;const n=++b;g.set(t,n),s.background||l(e);const i=(async()=>{try{const o=new URLSearchParams;e&&o.set("machineId",e),o.set("limit","200"),s.background||o.set("refresh",String(n));const u=await S(`/api/mesh-ops?${o.toString()}`);if(g.get(t)!==n||p().machineId!==e)return;_(e,Array.isArray(u.items)?u.items:[],u.generatedAt??null,Array.isArray(u.hosts)?u.hosts:[])}catch(o){!s.background&&g.get(t)===n&&p().machineId===e&&q(e,o instanceof Error?o.message:String(o))}finally{f.get(r)===n&&(c.delete(r),f.delete(r))}})();return c.set(r,i),f.set(r,n),i}function F(e){const{items:s,status:t,error:r,refreshToken:a}=E();return m.useEffect(()=>{h(e,{background:!1,refreshToken:a})},[e,a]),k(n=>{if(!w.has(n.kind))return;const i=Date.now();i-d<y||(d=i,h(p().machineId,{background:!0}))}),{items:s,loading:t==="idle"||t==="loading",error:r,refresh:M}}export{F as u};
1
+ import{r as m}from"./index-BI9AljSD.js";import{a as S}from"./api-Co9aQ2Jw.js";import{u as k}from"./sse-DDHEHUgz.js";import{u as E,m as p,j as M,k as l,l as _,n as q}from"./mesh-ops-CRR-KnCG.js";const w=new Set(["collaboration.event.appended","flight.updated","message.posted"]),y=750;let b=0;const c=new Map,f=new Map,g=new Map;let d=0;function h(e,s){const t=e??"",r=s.background?`background:${t}`:`foreground:${t}:${s.refreshToken??0}`,a=c.get(r);if(a)return s.background||l(e),a;const n=++b;g.set(t,n),s.background||l(e);const i=(async()=>{try{const o=new URLSearchParams;e&&o.set("machineId",e),o.set("limit","200"),s.background||o.set("refresh",String(n));const u=await S(`/api/mesh-ops?${o.toString()}`);if(g.get(t)!==n||p().machineId!==e)return;_(e,Array.isArray(u.items)?u.items:[],u.generatedAt??null,Array.isArray(u.hosts)?u.hosts:[])}catch(o){!s.background&&g.get(t)===n&&p().machineId===e&&q(e,o instanceof Error?o.message:String(o))}finally{f.get(r)===n&&(c.delete(r),f.delete(r))}})();return c.set(r,i),f.set(r,n),i}function F(e){const{items:s,status:t,error:r,refreshToken:a}=E();return m.useEffect(()=>{h(e,{background:!1,refreshToken:a})},[e,a]),k(n=>{if(!w.has(n.kind))return;const i=Date.now();i-d<y||(d=i,h(p().machineId,{background:!0}))}),{items:s,loading:t==="idle"||t==="loading",error:r,refresh:M}}export{F as u};
@@ -1 +1 @@
1
- import{r as p,j as yt}from"./index-DvLtl7rV.js";const Me=p.createContext({});function xe(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ce=typeof window<"u",Ae=Ce?p.useLayoutEffect:p.useEffect,Dt=p.createContext(null);function Pe(t,e){t.indexOf(e)===-1&&t.push(e)}function Fe(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Wt=(t,e,n)=>n>e?e:n<t?t:n;let Re=()=>{};const jt={},Ee=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ne=t=>/^0[^.\s]+$/u.test(t);function Be(t){let e;return()=>(e===void 0&&(e=t()),e)}const $t=t=>t;class Kt{constructor(){this.subscriptions=[]}add(e){return Pe(this.subscriptions,e),()=>Fe(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const a=this.subscriptions[r];a&&a(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Yt=t=>t*1e3,q=t=>t/1e3,Ie=(t,e)=>e?t*(1e3/e):0,Oe=t=>Array.isArray(t)&&typeof t[0]=="number",j=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ke(t,e){let n=new Set,s=new Set,i=!1,r=!1;const a=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function c(l){a.has(l)&&(d.schedule(l),t()),l(u)}const d={schedule:(l,f=!1,h=!1)=>{const m=h&&i?n:s;return f&&a.add(l),m.add(l),l},cancel:l=>{s.delete(l),a.delete(l)},process:l=>{if(u=l,i){r=!0;return}i=!0;const f=n;n=s,s=f,n.forEach(c),n.clear(),i=!1,r&&(r=!1,d.process(l))}};return d}const Le=40;function Ut(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=j.reduce((b,V)=>(b[V]=ke(r),b),{}),{setup:u,read:c,resolveKeyframes:d,preUpdate:l,update:f,preRender:h,render:g,postRender:m}=a,v=()=>{const b=jt.useManualTiming,V=b?i.timestamp:performance.now();n=!1,b||(i.delta=s?1e3/60:Math.max(Math.min(V-i.timestamp,Le),1)),i.timestamp=V,i.isProcessing=!0,u.process(i),c.process(i),d.process(i),l.process(i),f.process(i),h.process(i),g.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(v))},x=()=>{n=!0,s=!0,i.isProcessing||t(v)};return{schedule:j.reduce((b,V)=>{const Ve=a[V];return b[V]=(ve,we=!1,Te=!1)=>(n||x(),Ve.schedule(ve,we,Te)),b},{}),cancel:b=>{for(let V=0;V<j.length;V++)a[j[V]].cancel(b)},state:i,steps:a}}const{schedule:k,cancel:bt,state:St,steps:Ls}=Ut(typeof requestAnimationFrame<"u"?requestAnimationFrame:$t,!0);let Y;function De(){Y=void 0}const I={now:()=>(Y===void 0&&I.set(St.isProcessing||jt.useManualTiming?St.timestamp:performance.now()),Y),set:t=>{Y=t,queueMicrotask(De)}},zt=t=>e=>typeof e=="string"&&e.startsWith(t),We=zt("--"),je=zt("var(--"),Ds=t=>je(t)?$e.test(t.split("/*")[0].trim()):!1,$e=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ws(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const R={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},L={...R,transform:t=>Wt(0,1,t)},$={...R,default:1},O=t=>Math.round(t*1e5)/1e5,ft=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ke(t){return t==null}const Ye=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dt=(t,e)=>n=>!!(typeof n=="string"&&Ye.test(n)&&n.startsWith(t)||e&&!Ke(n)&&Object.prototype.hasOwnProperty.call(n,e)),Xt=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,a,u]=s.match(ft);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}},Ue=t=>Wt(0,255,t),Q={...R,transform:t=>Math.round(Ue(t))},N={test:dt("rgb","red"),parse:Xt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Q.transform(t)+", "+Q.transform(e)+", "+Q.transform(n)+", "+O(L.transform(s))+")"};function ze(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Vt={test:dt("#"),parse:ze,transform:N.transform},D=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),T=D("deg"),F=D("%"),o=D("px"),Xe=D("vh"),_e=D("vw"),vt={...F,parse:t=>F.parse(t)/100,transform:t=>F.transform(t*100)},K={test:dt("hsl","hue"),parse:Xt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+F.transform(O(e))+", "+F.transform(O(n))+", "+O(L.transform(s))+")"},y={test:t=>N.test(t)||Vt.test(t)||K.test(t),parse:t=>N.test(t)?N.parse(t):K.test(t)?K.parse(t):Vt.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?N.transform(t):K.transform(t),getAnimatableNone:t=>{const e=y.parse(t);return e.alpha=0,y.transform(e)}},He=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ze(t){return isNaN(t)&&typeof t=="string"&&(t.match(ft)?.length||0)+(t.match(He)?.length||0)>0}const _t="number",Ht="color",Ge="var",qe="var(",wt="${}",Qe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ht(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const u=e.replace(Qe,c=>(y.test(c)?(s.color.push(r),i.push(Ht),n.push(y.parse(c))):c.startsWith(qe)?(s.var.push(r),i.push(Ge),n.push(c)):(s.number.push(r),i.push(_t),n.push(parseFloat(c))),++r,wt)).split(wt);return{values:n,split:u,indexes:s,types:i}}function Je(t){return ht(t).values}function Zt({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const a=e[r];a===_t?i+=O(s[r]):a===Ht?i+=y.transform(s[r]):i+=s[r]}return i}}function tn(t){return Zt(ht(t))}const en=t=>typeof t=="number"?0:y.test(t)?y.getAnimatableNone(t):t,nn=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:en(t);function sn(t){const e=ht(t);return Zt(e)(e.values.map((s,i)=>nn(s,e.split[i])))}const M={test:Ze,parse:Je,createTransformer:tn,getAnimatableNone:sn},rn=(t,e,n)=>t+(e-t)*n,an=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},on=t=>t!==null;function un(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(on),u=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!u||s===void 0?r[u]:s}class cn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}function ln(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const A=t=>t*180/Math.PI,tt=t=>{const e=A(Math.atan2(t[1],t[0]));return et(e)},fn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tt,rotateZ:tt,skewX:t=>A(Math.atan(t[1])),skewY:t=>A(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},et=t=>(t=t%360,t<0&&(t+=360),t),Tt=tt,Mt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),xt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),dn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Mt,scaleY:xt,scale:t=>(Mt(t)+xt(t))/2,rotateX:t=>et(A(Math.atan2(t[6],t[5]))),rotateY:t=>et(A(Math.atan2(-t[2],t[0]))),rotateZ:Tt,rotate:Tt,skewX:t=>A(Math.atan(t[4])),skewY:t=>A(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ct(t){return t.includes("scale")?1:0}function nt(t,e){if(!t||t==="none")return Ct(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=dn,i=n;else{const u=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=fn,i=u}if(!i)return Ct(e);const r=s[e],a=i[1].split(",").map(hn);return typeof r=="function"?r(a):a[r]}const js=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return nt(n,e)};function hn(t){return parseFloat(t.trim())}const W=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pt=new Set([...W,"pathRotation"]),$s=t=>t===R||t===o,pn=new Set(["x","y","z"]),mn=W.filter(t=>!pn.has(t));function gn(t){const e=[];return mn.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const U={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>nt(e,"x"),y:(t,{transform:e})=>nt(e,"y")};U.translateX=U.x;U.translateY=U.y;const P=new Set;let st=!1,it=!1,rt=!1;function Gt(){if(it){const t=Array.from(P).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=gn(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,a])=>{s.getValue(r)?.set(a)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}it=!1,st=!1,P.forEach(t=>t.complete(rt)),P.clear()}function qt(){P.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(it=!0)})}function Ks(){rt=!0,qt(),Gt(),rt=!1}class yn{constructor(e,n,s,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(P.add(this),st||(st=!0,k.read(qt),k.resolveKeyframes(Gt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const u=s.readValue(n,a);u!=null&&(e[0]=u)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}ln(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),P.delete(this)}cancel(){this.state==="scheduled"&&(P.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const bn=t=>t.startsWith("--");function Sn(t,e,n){bn(e)?t.style.setProperty(e,n):t.style[e]=n}const Vn={};function Qt(t,e){const n=Be(t);return()=>Vn[e]??n()}const vn=Qt(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Jt=Qt(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),B=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,At={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:B([0,.65,.55,1]),circOut:B([.55,0,1,.45]),backIn:B([.31,.01,.66,-.59]),backOut:B([.33,1.53,.69,.99])};function te(t,e){if(t)return typeof t=="function"?Jt()?an(t,e):"ease-out":Oe(t)?B(t):Array.isArray(t)?t.map(n=>te(n,e)||At.easeOut):At[t]}function wn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:a="loop",ease:u="easeOut",times:c}={},d=void 0){const l={[e]:n};c&&(l.offset=c);const f=te(u,i);Array.isArray(f)&&(l.easing=f);const h={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return d&&(h.pseudoElement=d),t.animate(l,h)}function Tn(t){return typeof t=="function"&&"applyToOptions"in t}function Mn({type:t,...e}){return Tn(t)&&Jt()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class xn extends cn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:u,onComplete:c}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,Re(typeof e.type!="string");const d=Mn(e);this.animation=wn(n,s,i,d,r),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const l=un(i,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(l),Sn(n,s,l),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return q(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+q(e)}get time(){return q(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Yt(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&vn()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),$t):i(this)}}const Cn=new Set(["opacity","clipPath","filter","transform"]),Pt=30,An=t=>!isNaN(parseFloat(t));class Pn{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=I.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=An(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Kt);const s=this.events[e].add(n);return e==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Pt)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pt);return Ie(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function at(t,e){return new Pn(t,e)}function Ft(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function ee(t,e,n,s){if(typeof e=="function"){const[i,r]=Ft(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Ft(s);e=e(n!==void 0?n:t.custom,i,r)}return e}const S=t=>!!(t&&t.getVelocity);function Fn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Rn="framerAppearId",En="data-"+Fn(Rn),Nn={test:t=>t==="auto",parse:t=>t},ne=t=>e=>e.test(t),se=[R,o,F,T,_e,Xe,Nn],Ys=t=>se.find(ne(t)),Bn=new Set(["brightness","contrast","saturate","opacity"]);function In(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ft)||[];if(!s)return t;const i=n.replace(s,"");let r=Bn.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const On=/\b([a-z-]*)\(.*?\)/gu,ot={...M,getAnimatableNone:t=>{const e=t.match(On);return e?e.map(In).join(" "):t}},ut={...M,getAnimatableNone:t=>{const e=M.parse(t);return M.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Rt={...R,transform:Math.round},kn={rotate:T,pathRotation:T,rotateX:T,rotateY:T,rotateZ:T,scale:$,scaleX:$,scaleY:$,scaleZ:$,skew:T,skewX:T,skewY:T,distance:o,translateX:o,translateY:o,translateZ:o,x:o,y:o,z:o,perspective:o,transformPerspective:o,opacity:L,originX:vt,originY:vt,originZ:o},z={borderWidth:o,borderTopWidth:o,borderRightWidth:o,borderBottomWidth:o,borderLeftWidth:o,borderRadius:o,borderTopLeftRadius:o,borderTopRightRadius:o,borderBottomRightRadius:o,borderBottomLeftRadius:o,width:o,maxWidth:o,height:o,maxHeight:o,top:o,right:o,bottom:o,left:o,inset:o,insetBlock:o,insetBlockStart:o,insetBlockEnd:o,insetInline:o,insetInlineStart:o,insetInlineEnd:o,padding:o,paddingTop:o,paddingRight:o,paddingBottom:o,paddingLeft:o,paddingBlock:o,paddingBlockStart:o,paddingBlockEnd:o,paddingInline:o,paddingInlineStart:o,paddingInlineEnd:o,margin:o,marginTop:o,marginRight:o,marginBottom:o,marginLeft:o,marginBlock:o,marginBlockStart:o,marginBlockEnd:o,marginInline:o,marginInlineStart:o,marginInlineEnd:o,fontSize:o,backgroundPositionX:o,backgroundPositionY:o,...kn,zIndex:Rt,fillOpacity:L,strokeOpacity:L,numOctaves:Rt},Ln={...z,color:y,backgroundColor:y,outlineColor:y,fill:y,stroke:y,borderColor:y,borderTopColor:y,borderRightColor:y,borderBottomColor:y,borderLeftColor:y,filter:ot,WebkitFilter:ot,mask:ut,WebkitMask:ut},Dn=t=>Ln[t],Wn=new Set([ot,ut]);function jn(t,e){let n=Dn(t);return Wn.has(n)||(n=M),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ct=(t,e)=>e&&typeof t=="number"?e.transform(t):t,{schedule:$n}=Ut(queueMicrotask,!1),Kn=[...se,y,M],Yn=t=>Kn.find(ne(t)),Et=()=>({translate:0,scale:1,origin:0,originPoint:0}),Us=()=>({x:Et(),y:Et()}),Nt=()=>({min:0,max:0}),Un=()=>({x:Nt(),y:Nt()}),zn=new WeakMap;function ie(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function lt(t){return typeof t=="string"||Array.isArray(t)}const Xn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_n=["initial",...Xn];function Z(t){return ie(t.animate)||_n.some(e=>lt(t[e]))}function re(t){return!!(Z(t)||t.variants)}function Hn(t,e,n){for(const s in e){const i=e[s],r=n[s];if(S(i))t.addValue(s,i);else if(S(r))t.addValue(s,at(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const a=t.getValue(s);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,at(a!==void 0?a:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const X={current:null},mt={current:!1},Zn=typeof window<"u";function ae(){if(mt.current=!0,!!Zn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>X.current=t.matches;t.addEventListener("change",e),e()}else X.current=!1}const Bt=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _={};function oe(t){_=t}function Gn(){return _}class zs{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:a,visualState:u},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=yn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=I.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,k.render(this.render,!1,!0))};const{latestValues:d,renderState:l}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=Z(n),this.isVariantNode=re(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in h){const m=h[g];d[g]!==void 0&&S(m)&&m.set(d[g])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,zn.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(mt.current||ae(),this.shouldReduceMotion=X.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),bt(this.notifyUpdate),bt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Cn.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:u,times:c,ease:d,duration:l}=n.accelerate,f=new xn({element:this.current,name:e,keyframes:u,times:c,ease:d,duration:Yt(l)}),h=a(f);this.valueSubscriptions.set(e,()=>{h(),f.cancel()});return}const s=pt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in _){const n=_[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Un()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Bt.length;s++){const i=Bt[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,a=e[r];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Hn(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=at(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ee(s)||Ne(s))?s=parseFloat(s):!Yn(s)&&M.test(n)&&(s=jn(e,n)),this.setBaseTarget(e,S(s)?s.get():s)),S(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=ee(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!S(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Kt),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){$n.render(this.render)}}const qn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qn=W.length;function Jn(t,e,n){let s="",i=!0;for(let a=0;a<Qn;a++){const u=W[a],c=t[u];if(c===void 0)continue;let d=!0;if(typeof c=="number")d=c===(u.startsWith("scale")?1:0);else{const l=parseFloat(c);d=u.startsWith("scale")?l===1:l===0}if(!d||n){const l=ct(c,z[u]);if(!d){i=!1;const f=qn[u]||u;s+=`${f}(${l}) `}n&&(e[u]=l)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${ct(r,z.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function ue(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let a=!1,u=!1;for(const c in e){const d=e[c];if(pt.has(c)){a=!0;continue}else if(We(c)){i[c]=d;continue}else{const l=ct(d,z[c]);c.startsWith("origin")?(u=!0,r[c]=l):s[c]=l}}if(e.transform||(a||n?s.transform=Jn(e,t.transform,n):s.transform&&(s.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:l=0}=r;s.transformOrigin=`${c} ${d} ${l}`}}function It(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const E={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(o.test(t))t=parseFloat(t);else return t;const n=It(t,e.target.x),s=It(t,e.target.y);return`${n}% ${s}%`}},ts={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=M.parse(t);if(i.length>5)return s;const r=M.createTransformer(t),a=typeof i[0]!="number"?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;i[0+a]/=u,i[1+a]/=c;const d=rn(u,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=d),typeof i[3+a]=="number"&&(i[3+a]/=d),r(i)}},es={borderRadius:{...E,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomLeftRadius:E,borderBottomRightRadius:E,boxShadow:ts};function ce(t,{layout:e,layoutId:n}){return pt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!es[t]||t==="opacity")}function le(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const a in s)(S(s[a])||i&&S(i[a])||ce(a,t)||n?.getValue(a)?.liveStyle!==void 0)&&(r[a]=s[a]);return r}const ns={offset:"stroke-dashoffset",array:"stroke-dasharray"},ss={offset:"strokeDashoffset",array:"strokeDasharray"};function is(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?ns:ss;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const rs=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function as(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...u},c,d,l){if(ue(t,u,d),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h}=t;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=l?.transformBox??"fill-box",delete f.transformBox);for(const g of rs)f[g]!==void 0&&(h[g]=f[g],delete f[g]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&is(f,i,r,a,!1)}const os=t=>typeof t=="string"&&t.toLowerCase()==="svg";function us(t,e,n){const s=le(t,e,n);for(const i in t)if(S(t[i])||S(e[i])){const r=W.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function cs(t){return S(t)?t.get():t}const fe=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),de=p.createContext({strict:!1}),Ot={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let kt=!1;function ls(){if(kt)return;const t={};for(const e in Ot)t[e]={isEnabled:n=>Ot[e].some(s=>!!n[s])};oe(t),kt=!0}function he(){return ls(),Gn()}function fs(t){const e=he();for(const n in t)e[n]={...e[n],...t[n]};oe(e)}const ds=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function H(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ds.has(t)}let pe=t=>!H(t);function hs(t){typeof t=="function"&&(pe=e=>e.startsWith("on")?!H(e):t(e))}try{hs(require("@emotion/is-prop-valid").default)}catch{}function ps(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||S(t[i])||(pe(i)||n===!0&&H(i)||!e&&!H(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const G=p.createContext({});function ms(t,e){if(Z(t)){const{initial:n,animate:s}=t;return{initial:n===!1||lt(n)?n:void 0,animate:lt(s)?s:void 0}}return t.inherit!==!1?e:{}}function gs(t){const{initial:e,animate:n}=ms(t,p.useContext(G));return p.useMemo(()=>({initial:e,animate:n}),[Lt(e),Lt(n)])}function Lt(t){return Array.isArray(t)?t.join(" "):t}const gt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function me(t,e,n){for(const s in e)!S(e[s])&&!ce(s,n)&&(t[s]=e[s])}function ys({transformTemplate:t},e){return p.useMemo(()=>{const n=gt();return ue(n,e,t),Object.assign({},n.vars,n.style)},[e])}function bs(t,e){const n=t.style||{},s={};return me(s,n,t),Object.assign(s,ys(t,e)),s}function Ss(t,e){const n={},s=bs(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const ge=()=>({...gt(),attrs:{}});function Vs(t,e,n,s){const i=p.useMemo(()=>{const r=ge();return as(r,e,os(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};me(r,t.style,t),i.style={...r,...i.style}}return i}const vs=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ye(t){return typeof t!="string"||t.includes("-")?!1:!!(vs.indexOf(t)>-1||/[A-Z]/u.test(t))}function ws(t,e,n,{latestValues:s},i,r=!1,a){const c=(a??ye(t)?Vs:Ss)(e,s,i,t),d=ps(e,typeof t=="string",r),l=t!==p.Fragment?{...d,...c,ref:n}:{},{children:f}=e,h=p.useMemo(()=>S(f)?f.get():f,[f]);return p.createElement(t,{...l,children:h})}function Ts({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Ms(n,s,i,t),renderState:e()}}function Ms(t,e,n,s){const i={},r=s(t,{});for(const h in r)i[h]=cs(r[h]);let{initial:a,animate:u}=t;const c=Z(t),d=re(t);e&&d&&!c&&t.inherit!==!1&&(a===void 0&&(a=e.initial),u===void 0&&(u=e.animate));let l=n?n.initial===!1:!1;l=l||a===!1;const f=l?u:a;if(f&&typeof f!="boolean"&&!ie(f)){const h=Array.isArray(f)?f:[f];for(let g=0;g<h.length;g++){const m=ee(t,h[g]);if(m){const{transitionEnd:v,transition:x,...C}=m;for(const w in C){let b=C[w];if(Array.isArray(b)){const V=l?b.length-1:0;b=b[V]}b!==null&&(i[w]=b)}for(const w in v)i[w]=v[w]}}}return i}const be=t=>(e,n)=>{const s=p.useContext(G),i=p.useContext(Dt),r=()=>Ts(t,e,s,i);return n?r():xe(r)},xs=be({scrapeMotionValuesFromProps:le,createRenderState:gt}),Cs=be({scrapeMotionValuesFromProps:us,createRenderState:ge}),As=Symbol.for("motionComponentSymbol");function Ps(t,e,n){const s=p.useRef(n);p.useInsertionEffect(()=>{s.current=n});const i=p.useRef(null);return p.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const a=s.current;if(typeof a=="function")if(r){const u=a(r);typeof u=="function"&&(i.current=u)}else i.current?(i.current(),i.current=null):a(r);else a&&(a.current=r)},[e])}const Fs=p.createContext({});function Rs(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Es(t,e,n,s,i,r){const{visualElement:a}=p.useContext(G),u=p.useContext(de),c=p.useContext(Dt),d=p.useContext(fe),l=d.reducedMotion,f=d.skipAnimations,h=p.useRef(null),g=p.useRef(!1);s=s||u.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,skipAnimations:f,isSVG:r}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,v=p.useContext(Fs);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Ns(h.current,n,i,v);const x=p.useRef(!1);p.useInsertionEffect(()=>{m&&x.current&&m.update(n,c)});const C=n[En],w=p.useRef(!!C&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(C)&&window.MotionHasOptimisedAnimation?.(C));return Ae(()=>{g.current=!0,m&&(x.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),w.current&&m.animationState&&m.animationState.animateChanges())}),p.useEffect(()=>{m&&(!w.current&&m.animationState&&m.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(C)}),w.current=!1),m.enteringChildren=void 0)}),m}function Ns(t,e,n,s){const{layoutId:i,layout:r,drag:a,dragConstraints:u,layoutScroll:c,layoutRoot:d,layoutAnchor:l,layoutCrossfade:f}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Se(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!a||u&&Rs(u),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:c,layoutRoot:d,layoutAnchor:l})}function Se(t){if(t)return t.options.allowProjection!==!1?t.projection:Se(t.parent)}function J(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&fs(s);const r=n?n==="svg":ye(t),a=r?Cs:xs;function u(d,l){let f;const h={...p.useContext(fe),...d,layoutId:Bs(d)},{isStatic:g}=h,m=gs(d),v=a(d,g);if(!g&&typeof window<"u"){Is();const x=Os(h);f=x.MeasureLayout,m.visualElement=Es(t,v,h,i,x.ProjectionNode,r)}return yt.jsxs(G.Provider,{value:m,children:[f&&m.visualElement?yt.jsx(f,{visualElement:m.visualElement,...h}):null,ws(t,d,Ps(v,m.visualElement,l),v,g,e,r)]})}u.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=p.forwardRef(u);return c[As]=t,c}function Bs({layoutId:t}){const e=p.useContext(Me).id;return e&&t!==void 0?e+"-"+t:t}function Is(t,e){p.useContext(de).strict}function Os(t){const e=he(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Xs(t,e){if(typeof Proxy>"u")return J;const n=new Map,s=(r,a)=>J(r,a,t,e),i=(r,a)=>s(r,a);return new Proxy(i,{get:(r,a)=>a==="create"?s:(n.has(a)||n.set(a,J(a,void 0,t,e)),n.get(a))})}function _s(){!mt.current&&ae();const[t]=p.useState(X.current);return t}export{Ks as $,q as A,Rs as B,Fs as C,Oe as D,Re as E,N as F,K as G,Vt as H,Ds as I,y as J,M as K,de as L,fe as M,ht as N,an as O,Dt as P,Ie as Q,jt as R,Kt as S,un as T,xn as U,Sn as V,cn as W,Tn as X,Cn as Y,Be as Z,yn as _,o as a,pt as a0,Ee as a1,ee as a2,W as a3,En as a4,Ne as a5,jn as a6,Ys as a7,Ws as a8,U as a9,$s as aa,zs as ab,Ct as ac,js as ad,We as ae,ue as af,le as ag,Fn as ah,us as ai,as as aj,os as ak,Dn as al,lt as am,_n as an,ie as ao,Xn as ap,ye as aq,at as b,Xs as c,Pe as d,bt as e,k as f,St as g,Wt as h,S as i,Ls as j,$n as k,fs as l,rn as m,$t as n,Un as o,F as p,Us as q,Fe as r,cs as s,I as t,_s as u,es as v,xe as w,Ae as x,Me as y,Yt as z};
1
+ import{r as p,j as yt}from"./index-BI9AljSD.js";const Me=p.createContext({});function xe(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ce=typeof window<"u",Ae=Ce?p.useLayoutEffect:p.useEffect,Dt=p.createContext(null);function Pe(t,e){t.indexOf(e)===-1&&t.push(e)}function Fe(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Wt=(t,e,n)=>n>e?e:n<t?t:n;let Re=()=>{};const jt={},Ee=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ne=t=>/^0[^.\s]+$/u.test(t);function Be(t){let e;return()=>(e===void 0&&(e=t()),e)}const $t=t=>t;class Kt{constructor(){this.subscriptions=[]}add(e){return Pe(this.subscriptions,e),()=>Fe(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const a=this.subscriptions[r];a&&a(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Yt=t=>t*1e3,q=t=>t/1e3,Ie=(t,e)=>e?t*(1e3/e):0,Oe=t=>Array.isArray(t)&&typeof t[0]=="number",j=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ke(t,e){let n=new Set,s=new Set,i=!1,r=!1;const a=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function c(l){a.has(l)&&(d.schedule(l),t()),l(u)}const d={schedule:(l,f=!1,h=!1)=>{const m=h&&i?n:s;return f&&a.add(l),m.add(l),l},cancel:l=>{s.delete(l),a.delete(l)},process:l=>{if(u=l,i){r=!0;return}i=!0;const f=n;n=s,s=f,n.forEach(c),n.clear(),i=!1,r&&(r=!1,d.process(l))}};return d}const Le=40;function Ut(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=j.reduce((b,V)=>(b[V]=ke(r),b),{}),{setup:u,read:c,resolveKeyframes:d,preUpdate:l,update:f,preRender:h,render:g,postRender:m}=a,v=()=>{const b=jt.useManualTiming,V=b?i.timestamp:performance.now();n=!1,b||(i.delta=s?1e3/60:Math.max(Math.min(V-i.timestamp,Le),1)),i.timestamp=V,i.isProcessing=!0,u.process(i),c.process(i),d.process(i),l.process(i),f.process(i),h.process(i),g.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(v))},x=()=>{n=!0,s=!0,i.isProcessing||t(v)};return{schedule:j.reduce((b,V)=>{const Ve=a[V];return b[V]=(ve,we=!1,Te=!1)=>(n||x(),Ve.schedule(ve,we,Te)),b},{}),cancel:b=>{for(let V=0;V<j.length;V++)a[j[V]].cancel(b)},state:i,steps:a}}const{schedule:k,cancel:bt,state:St,steps:Ls}=Ut(typeof requestAnimationFrame<"u"?requestAnimationFrame:$t,!0);let Y;function De(){Y=void 0}const I={now:()=>(Y===void 0&&I.set(St.isProcessing||jt.useManualTiming?St.timestamp:performance.now()),Y),set:t=>{Y=t,queueMicrotask(De)}},zt=t=>e=>typeof e=="string"&&e.startsWith(t),We=zt("--"),je=zt("var(--"),Ds=t=>je(t)?$e.test(t.split("/*")[0].trim()):!1,$e=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ws(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const R={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},L={...R,transform:t=>Wt(0,1,t)},$={...R,default:1},O=t=>Math.round(t*1e5)/1e5,ft=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ke(t){return t==null}const Ye=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dt=(t,e)=>n=>!!(typeof n=="string"&&Ye.test(n)&&n.startsWith(t)||e&&!Ke(n)&&Object.prototype.hasOwnProperty.call(n,e)),Xt=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,a,u]=s.match(ft);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}},Ue=t=>Wt(0,255,t),Q={...R,transform:t=>Math.round(Ue(t))},N={test:dt("rgb","red"),parse:Xt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Q.transform(t)+", "+Q.transform(e)+", "+Q.transform(n)+", "+O(L.transform(s))+")"};function ze(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Vt={test:dt("#"),parse:ze,transform:N.transform},D=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),T=D("deg"),F=D("%"),o=D("px"),Xe=D("vh"),_e=D("vw"),vt={...F,parse:t=>F.parse(t)/100,transform:t=>F.transform(t*100)},K={test:dt("hsl","hue"),parse:Xt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+F.transform(O(e))+", "+F.transform(O(n))+", "+O(L.transform(s))+")"},y={test:t=>N.test(t)||Vt.test(t)||K.test(t),parse:t=>N.test(t)?N.parse(t):K.test(t)?K.parse(t):Vt.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?N.transform(t):K.transform(t),getAnimatableNone:t=>{const e=y.parse(t);return e.alpha=0,y.transform(e)}},He=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ze(t){return isNaN(t)&&typeof t=="string"&&(t.match(ft)?.length||0)+(t.match(He)?.length||0)>0}const _t="number",Ht="color",Ge="var",qe="var(",wt="${}",Qe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ht(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const u=e.replace(Qe,c=>(y.test(c)?(s.color.push(r),i.push(Ht),n.push(y.parse(c))):c.startsWith(qe)?(s.var.push(r),i.push(Ge),n.push(c)):(s.number.push(r),i.push(_t),n.push(parseFloat(c))),++r,wt)).split(wt);return{values:n,split:u,indexes:s,types:i}}function Je(t){return ht(t).values}function Zt({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const a=e[r];a===_t?i+=O(s[r]):a===Ht?i+=y.transform(s[r]):i+=s[r]}return i}}function tn(t){return Zt(ht(t))}const en=t=>typeof t=="number"?0:y.test(t)?y.getAnimatableNone(t):t,nn=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:en(t);function sn(t){const e=ht(t);return Zt(e)(e.values.map((s,i)=>nn(s,e.split[i])))}const M={test:Ze,parse:Je,createTransformer:tn,getAnimatableNone:sn},rn=(t,e,n)=>t+(e-t)*n,an=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},on=t=>t!==null;function un(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(on),u=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!u||s===void 0?r[u]:s}class cn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}function ln(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const A=t=>t*180/Math.PI,tt=t=>{const e=A(Math.atan2(t[1],t[0]));return et(e)},fn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tt,rotateZ:tt,skewX:t=>A(Math.atan(t[1])),skewY:t=>A(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},et=t=>(t=t%360,t<0&&(t+=360),t),Tt=tt,Mt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),xt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),dn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Mt,scaleY:xt,scale:t=>(Mt(t)+xt(t))/2,rotateX:t=>et(A(Math.atan2(t[6],t[5]))),rotateY:t=>et(A(Math.atan2(-t[2],t[0]))),rotateZ:Tt,rotate:Tt,skewX:t=>A(Math.atan(t[4])),skewY:t=>A(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ct(t){return t.includes("scale")?1:0}function nt(t,e){if(!t||t==="none")return Ct(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=dn,i=n;else{const u=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=fn,i=u}if(!i)return Ct(e);const r=s[e],a=i[1].split(",").map(hn);return typeof r=="function"?r(a):a[r]}const js=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return nt(n,e)};function hn(t){return parseFloat(t.trim())}const W=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pt=new Set([...W,"pathRotation"]),$s=t=>t===R||t===o,pn=new Set(["x","y","z"]),mn=W.filter(t=>!pn.has(t));function gn(t){const e=[];return mn.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const U={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>nt(e,"x"),y:(t,{transform:e})=>nt(e,"y")};U.translateX=U.x;U.translateY=U.y;const P=new Set;let st=!1,it=!1,rt=!1;function Gt(){if(it){const t=Array.from(P).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=gn(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,a])=>{s.getValue(r)?.set(a)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}it=!1,st=!1,P.forEach(t=>t.complete(rt)),P.clear()}function qt(){P.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(it=!0)})}function Ks(){rt=!0,qt(),Gt(),rt=!1}class yn{constructor(e,n,s,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(P.add(this),st||(st=!0,k.read(qt),k.resolveKeyframes(Gt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const u=s.readValue(n,a);u!=null&&(e[0]=u)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}ln(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),P.delete(this)}cancel(){this.state==="scheduled"&&(P.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const bn=t=>t.startsWith("--");function Sn(t,e,n){bn(e)?t.style.setProperty(e,n):t.style[e]=n}const Vn={};function Qt(t,e){const n=Be(t);return()=>Vn[e]??n()}const vn=Qt(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Jt=Qt(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),B=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,At={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:B([0,.65,.55,1]),circOut:B([.55,0,1,.45]),backIn:B([.31,.01,.66,-.59]),backOut:B([.33,1.53,.69,.99])};function te(t,e){if(t)return typeof t=="function"?Jt()?an(t,e):"ease-out":Oe(t)?B(t):Array.isArray(t)?t.map(n=>te(n,e)||At.easeOut):At[t]}function wn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:a="loop",ease:u="easeOut",times:c}={},d=void 0){const l={[e]:n};c&&(l.offset=c);const f=te(u,i);Array.isArray(f)&&(l.easing=f);const h={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return d&&(h.pseudoElement=d),t.animate(l,h)}function Tn(t){return typeof t=="function"&&"applyToOptions"in t}function Mn({type:t,...e}){return Tn(t)&&Jt()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class xn extends cn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:u,onComplete:c}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,Re(typeof e.type!="string");const d=Mn(e);this.animation=wn(n,s,i,d,r),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const l=un(i,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(l),Sn(n,s,l),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return q(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+q(e)}get time(){return q(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Yt(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&vn()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),$t):i(this)}}const Cn=new Set(["opacity","clipPath","filter","transform"]),Pt=30,An=t=>!isNaN(parseFloat(t));class Pn{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=I.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=An(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Kt);const s=this.events[e].add(n);return e==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Pt)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pt);return Ie(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function at(t,e){return new Pn(t,e)}function Ft(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function ee(t,e,n,s){if(typeof e=="function"){const[i,r]=Ft(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Ft(s);e=e(n!==void 0?n:t.custom,i,r)}return e}const S=t=>!!(t&&t.getVelocity);function Fn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Rn="framerAppearId",En="data-"+Fn(Rn),Nn={test:t=>t==="auto",parse:t=>t},ne=t=>e=>e.test(t),se=[R,o,F,T,_e,Xe,Nn],Ys=t=>se.find(ne(t)),Bn=new Set(["brightness","contrast","saturate","opacity"]);function In(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ft)||[];if(!s)return t;const i=n.replace(s,"");let r=Bn.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const On=/\b([a-z-]*)\(.*?\)/gu,ot={...M,getAnimatableNone:t=>{const e=t.match(On);return e?e.map(In).join(" "):t}},ut={...M,getAnimatableNone:t=>{const e=M.parse(t);return M.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Rt={...R,transform:Math.round},kn={rotate:T,pathRotation:T,rotateX:T,rotateY:T,rotateZ:T,scale:$,scaleX:$,scaleY:$,scaleZ:$,skew:T,skewX:T,skewY:T,distance:o,translateX:o,translateY:o,translateZ:o,x:o,y:o,z:o,perspective:o,transformPerspective:o,opacity:L,originX:vt,originY:vt,originZ:o},z={borderWidth:o,borderTopWidth:o,borderRightWidth:o,borderBottomWidth:o,borderLeftWidth:o,borderRadius:o,borderTopLeftRadius:o,borderTopRightRadius:o,borderBottomRightRadius:o,borderBottomLeftRadius:o,width:o,maxWidth:o,height:o,maxHeight:o,top:o,right:o,bottom:o,left:o,inset:o,insetBlock:o,insetBlockStart:o,insetBlockEnd:o,insetInline:o,insetInlineStart:o,insetInlineEnd:o,padding:o,paddingTop:o,paddingRight:o,paddingBottom:o,paddingLeft:o,paddingBlock:o,paddingBlockStart:o,paddingBlockEnd:o,paddingInline:o,paddingInlineStart:o,paddingInlineEnd:o,margin:o,marginTop:o,marginRight:o,marginBottom:o,marginLeft:o,marginBlock:o,marginBlockStart:o,marginBlockEnd:o,marginInline:o,marginInlineStart:o,marginInlineEnd:o,fontSize:o,backgroundPositionX:o,backgroundPositionY:o,...kn,zIndex:Rt,fillOpacity:L,strokeOpacity:L,numOctaves:Rt},Ln={...z,color:y,backgroundColor:y,outlineColor:y,fill:y,stroke:y,borderColor:y,borderTopColor:y,borderRightColor:y,borderBottomColor:y,borderLeftColor:y,filter:ot,WebkitFilter:ot,mask:ut,WebkitMask:ut},Dn=t=>Ln[t],Wn=new Set([ot,ut]);function jn(t,e){let n=Dn(t);return Wn.has(n)||(n=M),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ct=(t,e)=>e&&typeof t=="number"?e.transform(t):t,{schedule:$n}=Ut(queueMicrotask,!1),Kn=[...se,y,M],Yn=t=>Kn.find(ne(t)),Et=()=>({translate:0,scale:1,origin:0,originPoint:0}),Us=()=>({x:Et(),y:Et()}),Nt=()=>({min:0,max:0}),Un=()=>({x:Nt(),y:Nt()}),zn=new WeakMap;function ie(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function lt(t){return typeof t=="string"||Array.isArray(t)}const Xn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_n=["initial",...Xn];function Z(t){return ie(t.animate)||_n.some(e=>lt(t[e]))}function re(t){return!!(Z(t)||t.variants)}function Hn(t,e,n){for(const s in e){const i=e[s],r=n[s];if(S(i))t.addValue(s,i);else if(S(r))t.addValue(s,at(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const a=t.getValue(s);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,at(a!==void 0?a:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const X={current:null},mt={current:!1},Zn=typeof window<"u";function ae(){if(mt.current=!0,!!Zn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>X.current=t.matches;t.addEventListener("change",e),e()}else X.current=!1}const Bt=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _={};function oe(t){_=t}function Gn(){return _}class zs{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:a,visualState:u},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=yn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=I.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,k.render(this.render,!1,!0))};const{latestValues:d,renderState:l}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=Z(n),this.isVariantNode=re(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in h){const m=h[g];d[g]!==void 0&&S(m)&&m.set(d[g])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,zn.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(mt.current||ae(),this.shouldReduceMotion=X.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),bt(this.notifyUpdate),bt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Cn.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:u,times:c,ease:d,duration:l}=n.accelerate,f=new xn({element:this.current,name:e,keyframes:u,times:c,ease:d,duration:Yt(l)}),h=a(f);this.valueSubscriptions.set(e,()=>{h(),f.cancel()});return}const s=pt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in _){const n=_[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Un()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Bt.length;s++){const i=Bt[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,a=e[r];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Hn(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=at(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ee(s)||Ne(s))?s=parseFloat(s):!Yn(s)&&M.test(n)&&(s=jn(e,n)),this.setBaseTarget(e,S(s)?s.get():s)),S(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=ee(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!S(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Kt),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){$n.render(this.render)}}const qn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qn=W.length;function Jn(t,e,n){let s="",i=!0;for(let a=0;a<Qn;a++){const u=W[a],c=t[u];if(c===void 0)continue;let d=!0;if(typeof c=="number")d=c===(u.startsWith("scale")?1:0);else{const l=parseFloat(c);d=u.startsWith("scale")?l===1:l===0}if(!d||n){const l=ct(c,z[u]);if(!d){i=!1;const f=qn[u]||u;s+=`${f}(${l}) `}n&&(e[u]=l)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${ct(r,z.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function ue(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let a=!1,u=!1;for(const c in e){const d=e[c];if(pt.has(c)){a=!0;continue}else if(We(c)){i[c]=d;continue}else{const l=ct(d,z[c]);c.startsWith("origin")?(u=!0,r[c]=l):s[c]=l}}if(e.transform||(a||n?s.transform=Jn(e,t.transform,n):s.transform&&(s.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:l=0}=r;s.transformOrigin=`${c} ${d} ${l}`}}function It(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const E={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(o.test(t))t=parseFloat(t);else return t;const n=It(t,e.target.x),s=It(t,e.target.y);return`${n}% ${s}%`}},ts={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=M.parse(t);if(i.length>5)return s;const r=M.createTransformer(t),a=typeof i[0]!="number"?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;i[0+a]/=u,i[1+a]/=c;const d=rn(u,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=d),typeof i[3+a]=="number"&&(i[3+a]/=d),r(i)}},es={borderRadius:{...E,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomLeftRadius:E,borderBottomRightRadius:E,boxShadow:ts};function ce(t,{layout:e,layoutId:n}){return pt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!es[t]||t==="opacity")}function le(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const a in s)(S(s[a])||i&&S(i[a])||ce(a,t)||n?.getValue(a)?.liveStyle!==void 0)&&(r[a]=s[a]);return r}const ns={offset:"stroke-dashoffset",array:"stroke-dasharray"},ss={offset:"strokeDashoffset",array:"strokeDasharray"};function is(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?ns:ss;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const rs=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function as(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...u},c,d,l){if(ue(t,u,d),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h}=t;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=l?.transformBox??"fill-box",delete f.transformBox);for(const g of rs)f[g]!==void 0&&(h[g]=f[g],delete f[g]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&is(f,i,r,a,!1)}const os=t=>typeof t=="string"&&t.toLowerCase()==="svg";function us(t,e,n){const s=le(t,e,n);for(const i in t)if(S(t[i])||S(e[i])){const r=W.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function cs(t){return S(t)?t.get():t}const fe=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),de=p.createContext({strict:!1}),Ot={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let kt=!1;function ls(){if(kt)return;const t={};for(const e in Ot)t[e]={isEnabled:n=>Ot[e].some(s=>!!n[s])};oe(t),kt=!0}function he(){return ls(),Gn()}function fs(t){const e=he();for(const n in t)e[n]={...e[n],...t[n]};oe(e)}const ds=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function H(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ds.has(t)}let pe=t=>!H(t);function hs(t){typeof t=="function"&&(pe=e=>e.startsWith("on")?!H(e):t(e))}try{hs(require("@emotion/is-prop-valid").default)}catch{}function ps(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||S(t[i])||(pe(i)||n===!0&&H(i)||!e&&!H(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const G=p.createContext({});function ms(t,e){if(Z(t)){const{initial:n,animate:s}=t;return{initial:n===!1||lt(n)?n:void 0,animate:lt(s)?s:void 0}}return t.inherit!==!1?e:{}}function gs(t){const{initial:e,animate:n}=ms(t,p.useContext(G));return p.useMemo(()=>({initial:e,animate:n}),[Lt(e),Lt(n)])}function Lt(t){return Array.isArray(t)?t.join(" "):t}const gt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function me(t,e,n){for(const s in e)!S(e[s])&&!ce(s,n)&&(t[s]=e[s])}function ys({transformTemplate:t},e){return p.useMemo(()=>{const n=gt();return ue(n,e,t),Object.assign({},n.vars,n.style)},[e])}function bs(t,e){const n=t.style||{},s={};return me(s,n,t),Object.assign(s,ys(t,e)),s}function Ss(t,e){const n={},s=bs(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const ge=()=>({...gt(),attrs:{}});function Vs(t,e,n,s){const i=p.useMemo(()=>{const r=ge();return as(r,e,os(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};me(r,t.style,t),i.style={...r,...i.style}}return i}const vs=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ye(t){return typeof t!="string"||t.includes("-")?!1:!!(vs.indexOf(t)>-1||/[A-Z]/u.test(t))}function ws(t,e,n,{latestValues:s},i,r=!1,a){const c=(a??ye(t)?Vs:Ss)(e,s,i,t),d=ps(e,typeof t=="string",r),l=t!==p.Fragment?{...d,...c,ref:n}:{},{children:f}=e,h=p.useMemo(()=>S(f)?f.get():f,[f]);return p.createElement(t,{...l,children:h})}function Ts({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Ms(n,s,i,t),renderState:e()}}function Ms(t,e,n,s){const i={},r=s(t,{});for(const h in r)i[h]=cs(r[h]);let{initial:a,animate:u}=t;const c=Z(t),d=re(t);e&&d&&!c&&t.inherit!==!1&&(a===void 0&&(a=e.initial),u===void 0&&(u=e.animate));let l=n?n.initial===!1:!1;l=l||a===!1;const f=l?u:a;if(f&&typeof f!="boolean"&&!ie(f)){const h=Array.isArray(f)?f:[f];for(let g=0;g<h.length;g++){const m=ee(t,h[g]);if(m){const{transitionEnd:v,transition:x,...C}=m;for(const w in C){let b=C[w];if(Array.isArray(b)){const V=l?b.length-1:0;b=b[V]}b!==null&&(i[w]=b)}for(const w in v)i[w]=v[w]}}}return i}const be=t=>(e,n)=>{const s=p.useContext(G),i=p.useContext(Dt),r=()=>Ts(t,e,s,i);return n?r():xe(r)},xs=be({scrapeMotionValuesFromProps:le,createRenderState:gt}),Cs=be({scrapeMotionValuesFromProps:us,createRenderState:ge}),As=Symbol.for("motionComponentSymbol");function Ps(t,e,n){const s=p.useRef(n);p.useInsertionEffect(()=>{s.current=n});const i=p.useRef(null);return p.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const a=s.current;if(typeof a=="function")if(r){const u=a(r);typeof u=="function"&&(i.current=u)}else i.current?(i.current(),i.current=null):a(r);else a&&(a.current=r)},[e])}const Fs=p.createContext({});function Rs(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Es(t,e,n,s,i,r){const{visualElement:a}=p.useContext(G),u=p.useContext(de),c=p.useContext(Dt),d=p.useContext(fe),l=d.reducedMotion,f=d.skipAnimations,h=p.useRef(null),g=p.useRef(!1);s=s||u.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,skipAnimations:f,isSVG:r}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,v=p.useContext(Fs);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Ns(h.current,n,i,v);const x=p.useRef(!1);p.useInsertionEffect(()=>{m&&x.current&&m.update(n,c)});const C=n[En],w=p.useRef(!!C&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(C)&&window.MotionHasOptimisedAnimation?.(C));return Ae(()=>{g.current=!0,m&&(x.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),w.current&&m.animationState&&m.animationState.animateChanges())}),p.useEffect(()=>{m&&(!w.current&&m.animationState&&m.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(C)}),w.current=!1),m.enteringChildren=void 0)}),m}function Ns(t,e,n,s){const{layoutId:i,layout:r,drag:a,dragConstraints:u,layoutScroll:c,layoutRoot:d,layoutAnchor:l,layoutCrossfade:f}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Se(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!a||u&&Rs(u),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:c,layoutRoot:d,layoutAnchor:l})}function Se(t){if(t)return t.options.allowProjection!==!1?t.projection:Se(t.parent)}function J(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&fs(s);const r=n?n==="svg":ye(t),a=r?Cs:xs;function u(d,l){let f;const h={...p.useContext(fe),...d,layoutId:Bs(d)},{isStatic:g}=h,m=gs(d),v=a(d,g);if(!g&&typeof window<"u"){Is();const x=Os(h);f=x.MeasureLayout,m.visualElement=Es(t,v,h,i,x.ProjectionNode,r)}return yt.jsxs(G.Provider,{value:m,children:[f&&m.visualElement?yt.jsx(f,{visualElement:m.visualElement,...h}):null,ws(t,d,Ps(v,m.visualElement,l),v,g,e,r)]})}u.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=p.forwardRef(u);return c[As]=t,c}function Bs({layoutId:t}){const e=p.useContext(Me).id;return e&&t!==void 0?e+"-"+t:t}function Is(t,e){p.useContext(de).strict}function Os(t){const e=he(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Xs(t,e){if(typeof Proxy>"u")return J;const n=new Map,s=(r,a)=>J(r,a,t,e),i=(r,a)=>s(r,a);return new Proxy(i,{get:(r,a)=>a==="create"?s:(n.has(a)||n.set(a,J(a,void 0,t,e)),n.get(a))})}function _s(){!mt.current&&ae();const[t]=p.useState(X.current);return t}export{Ks as $,q as A,Rs as B,Fs as C,Oe as D,Re as E,N as F,K as G,Vt as H,Ds as I,y as J,M as K,de as L,fe as M,ht as N,an as O,Dt as P,Ie as Q,jt as R,Kt as S,un as T,xn as U,Sn as V,cn as W,Tn as X,Cn as Y,Be as Z,yn as _,o as a,pt as a0,Ee as a1,ee as a2,W as a3,En as a4,Ne as a5,jn as a6,Ys as a7,Ws as a8,U as a9,$s as aa,zs as ab,Ct as ac,js as ad,We as ae,ue as af,le as ag,Fn as ah,us as ai,as as aj,os as ak,Dn as al,lt as am,_n as an,ie as ao,Xn as ap,ye as aq,at as b,Xs as c,Pe as d,bt as e,k as f,St as g,Wt as h,S as i,Ls as j,$n as k,fs as l,rn as m,$t as n,Un as o,F as p,Us as q,Fe as r,cs as s,I as t,_s as u,es as v,xe as w,Ae as x,Me as y,Yt as z};
@@ -1 +1 @@
1
- import{r as t}from"./index-DvLtl7rV.js";import{u as f,d as p,e as m,f as w,w as s,g as v}from"./router-B9vQkNJL.js";import{a as g}from"./api-Co9aQ2Jw.js";let o=null;function h(){return import.meta.env?.DEV===!0}function y(){if(typeof window>"u")return!1;const e=window.location.hostname.trim().toLowerCase();return e==="localhost"||e==="127.0.0.1"||e==="[::1]"||e.endsWith(".local")}function S(){typeof window>"u"||o!==null||g("/api/build").then(e=>{o=e.mode==="production"?"production":"dev"}).catch(()=>{o=null})}typeof window<"u"&&S();function b(){return!!(h()||y()||o==="dev")}function F(){const e=v(new URL(window.location.href));window.history.replaceState(window.history.state,"",`${e.pathname}${e.search}${e.hash}`)}function C(){const e=f(),a=t.useMemo(()=>p()??m(),[e.layers]),r=t.useCallback(i=>{e.resetLocalOverrides();const n=w(i);n.audience&&e.setLocalAudienceOverride(n.audience);for(const[d,l]of Object.entries(n.flags??{}))typeof l=="boolean"&&e.setLocalOverride(d,l);s({action:"set",bundle:i})},[e]),u=t.useCallback(()=>{r(a==="max-pro"?"light-prod":"max-pro")},[a,r]),c=t.useCallback(()=>{e.resetLocalOverrides(),s({action:"clear"}),F(),window.location.reload()},[e]);return{activeBundle:a,applyBundle:r,toggleBundle:u,resetBundle:c}}export{b as i,C as u};
1
+ import{r as t}from"./index-BI9AljSD.js";import{u as f,d as p,e as m,f as w,w as s,g as v}from"./router-DTtux5sP.js";import{a as g}from"./api-Co9aQ2Jw.js";let o=null;function h(){return import.meta.env?.DEV===!0}function y(){if(typeof window>"u")return!1;const e=window.location.hostname.trim().toLowerCase();return e==="localhost"||e==="127.0.0.1"||e==="[::1]"||e.endsWith(".local")}function S(){typeof window>"u"||o!==null||g("/api/build").then(e=>{o=e.mode==="production"?"production":"dev"}).catch(()=>{o=null})}typeof window<"u"&&S();function b(){return!!(h()||y()||o==="dev")}function F(){const e=v(new URL(window.location.href));window.history.replaceState(window.history.state,"",`${e.pathname}${e.search}${e.hash}`)}function C(){const e=f(),a=t.useMemo(()=>p()??m(),[e.layers]),r=t.useCallback(i=>{e.resetLocalOverrides();const n=w(i);n.audience&&e.setLocalAudienceOverride(n.audience);for(const[d,l]of Object.entries(n.flags??{}))typeof l=="boolean"&&e.setLocalOverride(d,l);s({action:"set",bundle:i})},[e]),u=t.useCallback(()=>{r(a==="max-pro"?"light-prod":"max-pro")},[a,r]),c=t.useCallback(()=>{e.resetLocalOverrides(),s({action:"clear"}),F(),window.location.reload()},[e]);return{activeBundle:a,applyBundle:r,toggleBundle:u,resetBundle:c}}export{b as i,C as u};
@@ -1 +1 @@
1
- import{r as t,j as B}from"./index-DvLtl7rV.js";import{r as N}from"./index-zvhpRHao.js";import{A as Y}from"./AgentDetailCard-C9rn3Fj5.js";const A=340,S=16,$=180,q=100,I=A+S;function F(s,m){const i=window.innerWidth,y=window.innerHeight,c=12,u=i-s.right,o=s.left;if(u<I&&o<I)return{top:Math.max(c,Math.min(y/2-m/2,y-m-c)),left:Math.max(c,i/2-A/2),side:"center"};const p=u>=o?"right":"left",v=p==="right"?Math.min(s.right+S,i-A-c):Math.max(s.left-S-A,c),h=s.top+s.height/2-m/2;return{top:Math.max(c,Math.min(h,y-m-c)),left:v,side:p}}function Q({agents:s,orderedIds:m,navigate:i,selectMode:y="preview"}){const[c,u]=t.useState(null),[o,p]=t.useState(null),[v,D]=t.useState(null),h=t.useRef(new Map),l=t.useRef(null),C=t.useRef(null),b=t.useRef(null),T=t.useRef(null),a=o??c,d=t.useMemo(()=>a?s.find(e=>e.id===a)??null:null,[a,s]),O=t.useMemo(()=>o?s.find(e=>e.id===o)??null:null,[o,s]),f=t.useCallback(()=>{l.current&&(window.clearTimeout(l.current),l.current=null),C.current&&(window.clearTimeout(C.current),C.current=null)},[]);t.useEffect(()=>()=>f(),[f]),t.useEffect(()=>{if(!a){D(null);return}const e=h.current.get(a);if(!e)return;const n=()=>{const E=e.getBoundingClientRect(),w=b.current?.offsetHeight??260;D(F(E,w))};n(),window.addEventListener("scroll",n,!0),window.addEventListener("resize",n);const r=new ResizeObserver(n);return b.current&&r.observe(b.current),()=>{window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n),r.disconnect()}},[a]),t.useEffect(()=>{if(!o)return;const e=r=>{r.key==="Escape"&&(p(null),u(null))},n=r=>{const E=r.target;if(!b.current?.contains(E)){for(const w of h.current.values())if(w.contains(E))return;p(null)}};return window.addEventListener("keydown",e),window.addEventListener("mousedown",n),()=>{window.removeEventListener("keydown",e),window.removeEventListener("mousedown",n)}},[o]);const g=t.useCallback(e=>{if(!e)return;const n=h.current.get(e);n&&(typeof n.focus=="function"&&n.focus({preventScroll:!1}),n.scrollIntoView({block:"nearest",behavior:"smooth"}))},[]);t.useEffect(()=>{const e=T.current;if(!e)return;const n=r=>{const E=document.activeElement,w=E?.dataset?.agentId??null,k=m;if(!(k.length===0||!e.contains(E)&&r.key!=="Escape")){if(r.key==="ArrowDown"||r.key==="ArrowUp"){r.preventDefault();const x=w?k.indexOf(w):-1,W=r.key==="ArrowDown"?x<0?0:Math.min(x+1,k.length-1):x<=0?0:x-1;g(k[W]);return}if(r.key==="Home"){r.preventDefault(),g(k[0]);return}if(r.key==="End"){r.preventDefault(),g(k[k.length-1]);return}r.key.toLowerCase()==="o"&&w&&!r.metaKey&&!r.ctrlKey&&!r.altKey&&(r.preventDefault(),i({view:"agents-v2",agentId:w}))}};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[m,g,i]);const R=t.useCallback(e=>{if(f(),!(o&&o!==e)){if(c||o===e){u(e);return}l.current=window.setTimeout(()=>{u(e),l.current=null},$)}},[f,c,o]),L=t.useCallback(()=>{o||(l.current&&(window.clearTimeout(l.current),l.current=null),C.current=window.setTimeout(()=>{u(null),C.current=null},q))},[o]),H=t.useCallback(e=>{if(y==="navigate"){i({view:"agents-v2",agentId:e});return}f(),p(n=>n===e?null:e),u(e)},[y,i,f]),P=t.useCallback(()=>{d&&i({view:"agents-v2",agentId:d.id})},[d,i]),M=t.useCallback(()=>{f(),p(null),u(null)},[f]),_=t.useCallback(e=>({ref:n=>{n?h.current.set(e,n):h.current.delete(e)},onMouseEnter:()=>R(e),onMouseLeave:()=>L(),onFocus:()=>R(e),onBlur:()=>L(),onClick:()=>H(e),"data-agent-id":e,tabIndex:0}),[R,L,H]),K=t.useCallback(e=>({isActive:a===e,isPinned:o===e}),[a,o]),j=v?{position:"fixed",top:v.top,left:v.left,width:A}:void 0,z=d&&v&&typeof document<"u"?N.createPortal(B.jsx(Y,{ref:b,agent:d,pinned:o===d.id,onOpen:P,onClose:M,onAction:M,style:j,className:`agent-card--side-${v.side}${o===d.id?"":" agent-card--preview"}`}),document.querySelector("[data-scout-theme]")??document.body):null;return{bind:_,getState:K,activeAgent:d,pinnedAgent:O,clear:M,card:z,containerRef:T}}export{Q as u};
1
+ import{r as t,j as B}from"./index-BI9AljSD.js";import{r as N}from"./index-DfsTyYDx.js";import{A as Y}from"./AgentDetailCard-B_KLcgsP.js";const A=340,S=16,$=180,q=100,I=A+S;function F(s,m){const i=window.innerWidth,y=window.innerHeight,c=12,u=i-s.right,o=s.left;if(u<I&&o<I)return{top:Math.max(c,Math.min(y/2-m/2,y-m-c)),left:Math.max(c,i/2-A/2),side:"center"};const p=u>=o?"right":"left",v=p==="right"?Math.min(s.right+S,i-A-c):Math.max(s.left-S-A,c),h=s.top+s.height/2-m/2;return{top:Math.max(c,Math.min(h,y-m-c)),left:v,side:p}}function Q({agents:s,orderedIds:m,navigate:i,selectMode:y="preview"}){const[c,u]=t.useState(null),[o,p]=t.useState(null),[v,D]=t.useState(null),h=t.useRef(new Map),l=t.useRef(null),C=t.useRef(null),b=t.useRef(null),T=t.useRef(null),a=o??c,d=t.useMemo(()=>a?s.find(e=>e.id===a)??null:null,[a,s]),O=t.useMemo(()=>o?s.find(e=>e.id===o)??null:null,[o,s]),f=t.useCallback(()=>{l.current&&(window.clearTimeout(l.current),l.current=null),C.current&&(window.clearTimeout(C.current),C.current=null)},[]);t.useEffect(()=>()=>f(),[f]),t.useEffect(()=>{if(!a){D(null);return}const e=h.current.get(a);if(!e)return;const n=()=>{const E=e.getBoundingClientRect(),w=b.current?.offsetHeight??260;D(F(E,w))};n(),window.addEventListener("scroll",n,!0),window.addEventListener("resize",n);const r=new ResizeObserver(n);return b.current&&r.observe(b.current),()=>{window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n),r.disconnect()}},[a]),t.useEffect(()=>{if(!o)return;const e=r=>{r.key==="Escape"&&(p(null),u(null))},n=r=>{const E=r.target;if(!b.current?.contains(E)){for(const w of h.current.values())if(w.contains(E))return;p(null)}};return window.addEventListener("keydown",e),window.addEventListener("mousedown",n),()=>{window.removeEventListener("keydown",e),window.removeEventListener("mousedown",n)}},[o]);const g=t.useCallback(e=>{if(!e)return;const n=h.current.get(e);n&&(typeof n.focus=="function"&&n.focus({preventScroll:!1}),n.scrollIntoView({block:"nearest",behavior:"smooth"}))},[]);t.useEffect(()=>{const e=T.current;if(!e)return;const n=r=>{const E=document.activeElement,w=E?.dataset?.agentId??null,k=m;if(!(k.length===0||!e.contains(E)&&r.key!=="Escape")){if(r.key==="ArrowDown"||r.key==="ArrowUp"){r.preventDefault();const x=w?k.indexOf(w):-1,W=r.key==="ArrowDown"?x<0?0:Math.min(x+1,k.length-1):x<=0?0:x-1;g(k[W]);return}if(r.key==="Home"){r.preventDefault(),g(k[0]);return}if(r.key==="End"){r.preventDefault(),g(k[k.length-1]);return}r.key.toLowerCase()==="o"&&w&&!r.metaKey&&!r.ctrlKey&&!r.altKey&&(r.preventDefault(),i({view:"agents-v2",agentId:w}))}};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[m,g,i]);const R=t.useCallback(e=>{if(f(),!(o&&o!==e)){if(c||o===e){u(e);return}l.current=window.setTimeout(()=>{u(e),l.current=null},$)}},[f,c,o]),L=t.useCallback(()=>{o||(l.current&&(window.clearTimeout(l.current),l.current=null),C.current=window.setTimeout(()=>{u(null),C.current=null},q))},[o]),H=t.useCallback(e=>{if(y==="navigate"){i({view:"agents-v2",agentId:e});return}f(),p(n=>n===e?null:e),u(e)},[y,i,f]),P=t.useCallback(()=>{d&&i({view:"agents-v2",agentId:d.id})},[d,i]),M=t.useCallback(()=>{f(),p(null),u(null)},[f]),_=t.useCallback(e=>({ref:n=>{n?h.current.set(e,n):h.current.delete(e)},onMouseEnter:()=>R(e),onMouseLeave:()=>L(),onFocus:()=>R(e),onBlur:()=>L(),onClick:()=>H(e),"data-agent-id":e,tabIndex:0}),[R,L,H]),K=t.useCallback(e=>({isActive:a===e,isPinned:o===e}),[a,o]),j=v?{position:"fixed",top:v.top,left:v.left,width:A}:void 0,z=d&&v&&typeof document<"u"?N.createPortal(B.jsx(Y,{ref:b,agent:d,pinned:o===d.id,onOpen:P,onClose:M,onAction:M,style:j,className:`agent-card--side-${v.side}${o===d.id?"":" agent-card--preview"}`}),document.querySelector("[data-scout-theme]")??document.body):null;return{bind:_,getState:K,activeAgent:d,pinnedAgent:O,clear:M,card:z,containerRef:T}}export{Q as u};
@@ -0,0 +1 @@
1
+ import{h as e}from"./router-DTtux5sP.js";function n(){return!e("nav.sidebar",!1)}export{n as u};
@@ -1,4 +1,4 @@
1
- import{j as r,r as h}from"./index-DvLtl7rV.js";import{u as Q}from"./chunk-HRAB3GC3-Tyv9rzx7.js";function je({className:e,children:t}){return r.jsx("div",{className:e?`rd-viewer ${e}`:"rd-viewer","data-scout-theme":!0,children:t})}function P({children:e}){return r.jsx("div",{className:"rd-center",children:r.jsx("div",{className:"rd-center-card",children:e})})}const Pe=["branch","unstaged","staged"],X={unstaged:"Unstaged",staged:"Staged",branch:"Branch"},ye={added:"A",modified:"M",deleted:"D",renamed:"R",copied:"C",typechange:"T",conflict:"!",unknown:"?"};function Z(e){return e.newPath??e.oldPath??"(unknown)"}function Ne(e){const t=e.split("/"),n=t[t.length-1]||e,i=t.slice(0,-1).join("/");return{name:n,dir:i}}function ee(e,t){return`${e.oldPath??""}→${e.newPath??""}#${t}`}function Le(e){return e.files.reduce((t,n)=>({add:t.add+(n.additions??0),del:t.del+(n.deletions??0)}),{add:0,del:0})}function Se(e,t,n=null){return{fetchedAt:e.fetchedAt,cacheHit:!0,refreshing:t,refreshError:n}}function Ee(e,t){return{fetchedAt:e.fetchedAt,cacheHit:e.cacheHit,refreshing:t,refreshError:null}}function W(e){const t=e.trim();return!t||t==="/dev/null"?null:t.startsWith("a/")||t.startsWith("b/")?t.slice(2):t}function te(e,t){return[t.newPath,t.oldPath].filter(i=>!!i).includes(e)}function ne(e,t){if(!e?.rawPatch)return[];const n=[];let i=null,c=null,a=null,d=null;for(const s of e.rawPatch.split(`
1
+ import{j as r,r as h}from"./index-BI9AljSD.js";import{u as Q}from"./chunk-HRAB3GC3-DLNT8aOo.js";function je({className:e,children:t}){return r.jsx("div",{className:e?`rd-viewer ${e}`:"rd-viewer","data-scout-theme":!0,children:t})}function P({children:e}){return r.jsx("div",{className:"rd-center",children:r.jsx("div",{className:"rd-center-card",children:e})})}const Pe=["branch","unstaged","staged"],X={unstaged:"Unstaged",staged:"Staged",branch:"Branch"},ye={added:"A",modified:"M",deleted:"D",renamed:"R",copied:"C",typechange:"T",conflict:"!",unknown:"?"};function Z(e){return e.newPath??e.oldPath??"(unknown)"}function Ne(e){const t=e.split("/"),n=t[t.length-1]||e,i=t.slice(0,-1).join("/");return{name:n,dir:i}}function ee(e,t){return`${e.oldPath??""}→${e.newPath??""}#${t}`}function Le(e){return e.files.reduce((t,n)=>({add:t.add+(n.additions??0),del:t.del+(n.deletions??0)}),{add:0,del:0})}function Se(e,t,n=null){return{fetchedAt:e.fetchedAt,cacheHit:!0,refreshing:t,refreshError:n}}function Ee(e,t){return{fetchedAt:e.fetchedAt,cacheHit:e.cacheHit,refreshing:t,refreshError:null}}function W(e){const t=e.trim();return!t||t==="/dev/null"?null:t.startsWith("a/")||t.startsWith("b/")?t.slice(2):t}function te(e,t){return[t.newPath,t.oldPath].filter(i=>!!i).includes(e)}function ne(e,t){if(!e?.rawPatch)return[];const n=[];let i=null,c=null,a=null,d=null;for(const s of e.rawPatch.split(`
2
2
  `)){if(s.startsWith("diff --git ")){i=null,c=null,a=null,d=null;continue}if(s.startsWith("--- ")){i=W(s.slice(4));continue}if(s.startsWith("+++ ")){c=W(s.slice(4));continue}const o=/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/.exec(s);if(o){a=Number(o[1]),d=Number(o[2]);continue}if(a==null||d==null)continue;const f=c??i;f&&(t&&!te(f,t)||(s.startsWith("+")?(n.push({layer:e.kind,filePath:f,side:"add",oldLine:null,newLine:d,text:s.slice(1)}),d+=1):s.startsWith("-")?(n.push({layer:e.kind,filePath:f,side:"del",oldLine:a,newLine:null,text:s.slice(1)}),a+=1):s.startsWith(" ")&&(n.push({layer:e.kind,filePath:f,side:"context",oldLine:a,newLine:d,text:s.slice(1)}),a+=1,d+=1)))}return n}function re(e){return e.newLine!=null?`L${e.newLine}`:e.oldLine!=null?`old L${e.oldLine}`:"line"}function ie(e,t=160){const n=e.replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function Re(e){const{line:t}=e,n=t.side==="add"?"+":t.side==="del"?"-":" ";return`[Diff line: ${t.layer} · ${t.filePath}:${re(t)} · ${n} ${ie(t.text)}]`}function Ce(e){const{selection:t}=e;return[`[Diff selection: ${[t.layer??"diff",t.filePath].filter(Boolean).join(" · ")||"diff"}]`,t.text.trim(),"[/Diff selection]"].join(`
3
3
  `)}function B(e){const t=window.getSelection(),n=t?.toString().trim()??"";if(!t||!n||!e.root)return null;const i=t.anchorNode,c=t.focusNode;return i&&!e.root.contains(i)||c&&!e.root.contains(c)?null:{layer:e.activeLayer,filePath:e.selectedFile?Z(e.selectedFile):null,text:n}}const ae="1.2.7",C=`https://esm.sh/@pierre/diffs@${ae}`,A={base:`${C}?external=react,react-dom`,react:`${C}/react?external=react,react-dom`,worker:`${C}/worker/worker.js`},O=["typescript","tsx","javascript","jsx","json","markdown","rust","swift","shellscript","yaml","css","html"];function se(){return import(A.react)}function oe(){return import(A.base)}let y=null;function H(){return y||(y=(async()=>{const e="react",t="react-dom/client",[n,i,c,a]=await Promise.all([se(),oe(),import(e),import(t)]),d=o=>typeof o=="function"||typeof o=="object"&&o!==null;if(!d(n?.CodeView)||!d(n?.WorkerPoolContextProvider)||typeof i?.parsePatchFiles!="function"||typeof c?.createElement!="function"||typeof a?.createRoot!="function")throw new Error(`Pierre loaded from ${C} but the expected exports are missing.`);const s=()=>{const o=`import ${JSON.stringify(A.worker)};`,f=URL.createObjectURL(new Blob([o],{type:"text/javascript"})),u=new Worker(f,{type:"module"});return URL.revokeObjectURL(f),u};return{CodeView:n.CodeView,PatchDiff:n.PatchDiff,WorkerPoolContextProvider:n.WorkerPoolContextProvider,parsePatchFiles:i.parsePatchFiles,preloadHighlighter:i.preloadHighlighter,workerFactory:s,createElement:c.createElement,createRoot:a.createRoot}})(),y.catch(()=>{y=null}),y)}let E=null;function de(e,t){return E||(E=e.preloadHighlighter({themes:[t],langs:[...O]}).catch(()=>{E=null}),E)}function le(e,t,n){return e.parsePatchFiles(t,n,!0)}const ce=`
4
4
  [data-line-type="change-addition"]:is(
@@ -1 +1 @@
1
- import{c}from"./createLucideIcon-DezKXSG2.js";const a=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],o=c("wrench",a);export{o as W};
1
+ import{c}from"./createLucideIcon-DthwWQIg.js";const a=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],o=c("wrench",a);export{o as W};
@@ -1 +1 @@
1
- import{c as o}from"./createLucideIcon-DezKXSG2.js";const c=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],t=o("x",c);export{t as X};
1
+ import{c as o}from"./createLucideIcon-DthwWQIg.js";const c=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],t=o("x",c);export{t as X};