@halcyonlabs/app 0.47.0-halcyon.604 → 0.47.0-halcyon.607

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 (782) hide show
  1. package/app/dist/assets/{AddMachineDialog-BHF-GkBG.js → AddMachineDialog-CG2ZZhp-.js} +1 -1
  2. package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.br +0 -0
  3. package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.gz +0 -0
  4. package/app/dist/assets/{AppCommandShortcutHint-7JPI7Au-.js → AppCommandShortcutHint-CCVkbqD1.js} +1 -1
  5. package/app/dist/assets/{AppFileExternalNavigationDispatcher-BNbJsP1g.js → AppFileExternalNavigationDispatcher-DETVZfBW.js} +1 -1
  6. package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.br +0 -0
  7. package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.gz +0 -0
  8. package/app/dist/assets/{AppToasterView-DP33gZcS.js → AppToasterView-BpJaGVQ1.js} +1 -1
  9. package/app/dist/assets/{BrowserTabDeck-BlOoU-vR.js → BrowserTabDeck-c6VRKA-g.js} +1 -1
  10. package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.br +0 -0
  11. package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.gz +0 -0
  12. package/app/dist/assets/{CommandPaletteBody-CBbTgLrW.js → CommandPaletteBody-BeiWvSTK.js} +1 -1
  13. package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.br +0 -0
  14. package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.gz +0 -0
  15. package/app/dist/assets/{DiffHost-DYBSO1_c.js → DiffHost-xesYsZUt.js} +1 -1
  16. package/app/dist/assets/DiffHost-xesYsZUt.js.br +0 -0
  17. package/app/dist/assets/DiffHost-xesYsZUt.js.gz +0 -0
  18. package/app/dist/assets/{ExperimentalFileLinkMenu-DO2lGQoK.js → ExperimentalFileLinkMenu-CDVoETHe.js} +1 -1
  19. package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.br +0 -0
  20. package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.gz +0 -0
  21. package/app/dist/assets/{FilePreview-ORcgsTax.js → FilePreview-CzacGZ35.js} +1 -1
  22. package/app/dist/assets/FilePreview-CzacGZ35.js.br +0 -0
  23. package/app/dist/assets/FilePreview-CzacGZ35.js.gz +0 -0
  24. package/app/dist/assets/{GitDiffCardHeader-i4vt7tT5.js → GitDiffCardHeader-CJtFaq1K.js} +1 -1
  25. package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.br +0 -0
  26. package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.gz +0 -0
  27. package/app/dist/assets/{InlineMessageEditorFrame-y089xCLP.js → InlineMessageEditorFrame-C0rqOlNn.js} +1 -1
  28. package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.br +0 -0
  29. package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.gz +0 -0
  30. package/app/dist/assets/{MachineLabel-D07WUIMh.js → MachineLabel-vUI5j8ve.js} +1 -1
  31. package/app/dist/assets/MachineLabel-vUI5j8ve.js.br +0 -0
  32. package/app/dist/assets/MachineLabel-vUI5j8ve.js.gz +0 -0
  33. package/app/dist/assets/{MachineRenameDialog-RyrwvNas.js → MachineRenameDialog-CrnZuppe.js} +1 -1
  34. package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.br +0 -0
  35. package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.gz +0 -0
  36. package/app/dist/assets/{MachineSettingsView-Bg6Op62W.js → MachineSettingsView-BR6qseai.js} +1 -1
  37. package/app/dist/assets/MachineSettingsView-BR6qseai.js.br +0 -0
  38. package/app/dist/assets/MachineSettingsView-BR6qseai.js.gz +0 -0
  39. package/app/dist/assets/{MicrophonePreferences-DwsTYfON.js → MicrophonePreferences-wMQ36e_Q.js} +1 -1
  40. package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.br +0 -0
  41. package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.gz +0 -0
  42. package/app/dist/assets/{ModelReasoningMenu-Dth3XXm8.js → ModelReasoningMenu-Do0jyo5Q.js} +1 -1
  43. package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.br +0 -0
  44. package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.gz +0 -0
  45. package/app/dist/assets/{MoonletDiff-Da65ABAI.js → MoonletDiff-CCvaiEEC.js} +1 -1
  46. package/app/dist/assets/MoonletDiff-CCvaiEEC.js.br +0 -0
  47. package/app/dist/assets/MoonletDiff-CCvaiEEC.js.gz +0 -0
  48. package/app/dist/assets/{MoonletDiffSplit-Phl7m23w.js → MoonletDiffSplit-3xEwFpfu.js} +2 -2
  49. package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.br +0 -0
  50. package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.gz +0 -0
  51. package/app/dist/assets/{MoonletSourceCode-C5aa88dK.js → MoonletSourceCode-BgaVW-e6.js} +1 -1
  52. package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.br +0 -0
  53. package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.gz +0 -0
  54. package/app/dist/assets/{NewTabPage-BKkv1maV.js → NewTabPage-BOqCqqLe.js} +1 -1
  55. package/app/dist/assets/NewTabPage-BOqCqqLe.js.br +0 -0
  56. package/app/dist/assets/NewTabPage-BOqCqqLe.js.gz +0 -0
  57. package/app/dist/assets/{NewThreadComposer-00DY4i8k.js → NewThreadComposer-DyB52pmS.js} +1 -1
  58. package/app/dist/assets/NewThreadComposer-DyB52pmS.js.br +0 -0
  59. package/app/dist/assets/NewThreadComposer-DyB52pmS.js.gz +0 -0
  60. package/app/dist/assets/{OnboardingFlow-GwpuTTqu.js → OnboardingFlow-DTPixZrb.js} +1 -1
  61. package/app/dist/assets/OnboardingFlow-DTPixZrb.js.br +0 -0
  62. package/app/dist/assets/OnboardingFlow-DTPixZrb.js.gz +0 -0
  63. package/app/dist/assets/{OptionPicker-Cy_W5NWS.js → OptionPicker-CxOGHDd8.js} +1 -1
  64. package/app/dist/assets/OptionPicker-CxOGHDd8.js.br +0 -0
  65. package/app/dist/assets/OptionPicker-CxOGHDd8.js.gz +0 -0
  66. package/app/dist/assets/{PaletteShell-CRwrb4lb.js → PaletteShell-BMkwhUdz.js} +1 -1
  67. package/app/dist/assets/PaletteShell-BMkwhUdz.js.br +0 -0
  68. package/app/dist/assets/PaletteShell-BMkwhUdz.js.gz +0 -0
  69. package/app/dist/assets/{PaneMaximizeButton-CMp4cCoZ.js → PaneMaximizeButton-DgXn2p5T.js} +1 -1
  70. package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.br +0 -0
  71. package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.gz +0 -0
  72. package/app/dist/assets/{PierreLineSelectionActions-BXbCJV8P.js → PierreLineSelectionActions-V_GPrVau.js} +1 -1
  73. package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.br +0 -0
  74. package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.gz +0 -0
  75. package/app/dist/assets/{PluginPanelRightPanelHost-CuKRaAaL.js → PluginPanelRightPanelHost-CRDSntoM.js} +1 -1
  76. package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.br +0 -0
  77. package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.gz +0 -0
  78. package/app/dist/assets/{PluginSettingsSections-DJo5h7Qh.js → PluginSettingsSections-ZnUNrvlJ.js} +1 -1
  79. package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.br +0 -0
  80. package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.gz +0 -0
  81. package/app/dist/assets/{PluginThreadChat-BV6OMCzu.js → PluginThreadChat-DtIyKaqq.js} +1 -1
  82. package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.br +0 -0
  83. package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.gz +0 -0
  84. package/app/dist/assets/{ProjectDetailSettingsView-DdF6YsSg.js → ProjectDetailSettingsView-B3apTKMj.js} +1 -1
  85. package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.br +0 -0
  86. package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.gz +0 -0
  87. package/app/dist/assets/{ProjectMachineSetupDialog-CtbI4XxM.js → ProjectMachineSetupDialog-C43S09Ex.js} +1 -1
  88. package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.br +0 -0
  89. package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.gz +0 -0
  90. package/app/dist/assets/{ProjectsSettingsSection-BT1kXbPn.js → ProjectsSettingsSection-CIshX8Xc.js} +1 -1
  91. package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.br +0 -0
  92. package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.gz +0 -0
  93. package/app/dist/assets/{QueuedMessagesList-D1aAchqp.js → QueuedMessagesList-Dh5dxmNK.js} +1 -1
  94. package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.br +0 -0
  95. package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.gz +0 -0
  96. package/app/dist/assets/{RemotePathBrowser-vPIL8lVm.js → RemotePathBrowser-1A5-qAxD.js} +1 -1
  97. package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.br +0 -0
  98. package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.gz +0 -0
  99. package/app/dist/assets/{RootComposeView-DV6JGFlA.js → RootComposeView-BIZpqYG3.js} +1 -1
  100. package/app/dist/assets/RootComposeView-BIZpqYG3.js.br +0 -0
  101. package/app/dist/assets/RootComposeView-BIZpqYG3.js.gz +0 -0
  102. package/app/dist/assets/{SecondaryPanelLayout-BpHDgFJ_.js → SecondaryPanelLayout-BIQDxJLi.js} +1 -1
  103. package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.br +0 -0
  104. package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.gz +0 -0
  105. package/app/dist/assets/{ServerMoveOverlayView-CGkGzv8t.js → ServerMoveOverlayView-BSJahQeB.js} +1 -1
  106. package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.br +0 -0
  107. package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.gz +0 -0
  108. package/app/dist/assets/{SettingsSidebar-1XC0Uxwo.js → SettingsSidebar-DY_kbv4v.js} +1 -1
  109. package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.br +0 -0
  110. package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.gz +0 -0
  111. package/app/dist/assets/SettingsView-CR1GzBCl.js +7 -0
  112. package/app/dist/assets/SettingsView-CR1GzBCl.js.br +0 -0
  113. package/app/dist/assets/SettingsView-CR1GzBCl.js.gz +0 -0
  114. package/app/dist/assets/{SidebarFooterCustomize-D7sLYPwD.js → SidebarFooterCustomize-pIj856Zr.js} +1 -1
  115. package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.br +0 -0
  116. package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.gz +0 -0
  117. package/app/dist/assets/{SidebarVisibilityCustomize-DpTzFoGl.js → SidebarVisibilityCustomize-CR7hQOIF.js} +1 -1
  118. package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.br +0 -0
  119. package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.gz +0 -0
  120. package/app/dist/assets/{SourceCodeHost-DVEXLJK1.js → SourceCodeHost-DkoXO-RM.js} +2 -2
  121. package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.br +0 -0
  122. package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.gz +0 -0
  123. package/app/dist/assets/{SplitWorkspaceRoute-BfxQQdOx.js → SplitWorkspaceRoute-DN3j-Nio.js} +2 -2
  124. package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.br +0 -0
  125. package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.gz +0 -0
  126. package/app/dist/assets/{TerminalOutputBlock-COQNamKR.js → TerminalOutputBlock-DKsNjK8s.js} +1 -1
  127. package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.br +0 -0
  128. package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.gz +0 -0
  129. package/app/dist/assets/{ThreadActionsMenu-064Gcy7T.js → ThreadActionsMenu-BulopjpY.js} +1 -1
  130. package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.br +0 -0
  131. package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.gz +0 -0
  132. package/app/dist/assets/{ThreadDetailView-CjoXzweq.js → ThreadDetailView-C6cu9JmT.js} +3 -3
  133. package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.br +0 -0
  134. package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.gz +0 -0
  135. package/app/dist/assets/{ThreadSearchPaletteMode-CwdePsHK.js → ThreadSearchPaletteMode-D0MKJ8PL.js} +1 -1
  136. package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.br +0 -0
  137. package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.gz +0 -0
  138. package/app/dist/assets/{ThreadSecondaryPanel-CtYtgTla.js → ThreadSecondaryPanel-CzjhigwP.js} +1 -1
  139. package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.br +0 -0
  140. package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.gz +0 -0
  141. package/app/dist/assets/{ThreadSecondaryPanelTabContent-BNQi8b2n.js → ThreadSecondaryPanelTabContent-BX5A98YK.js} +1 -1
  142. package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.br +0 -0
  143. package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.gz +0 -0
  144. package/app/dist/assets/{ThreadStatusGlyph-DxxHDn0P.js → ThreadStatusGlyph-BYavMHiP.js} +1 -1
  145. package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.br +0 -0
  146. package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.gz +0 -0
  147. package/app/dist/assets/{ThreadTerminalPanel-fb5Kk0KG.js → ThreadTerminalPanel-Cfe76daj.js} +1 -1
  148. package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.br +0 -0
  149. package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.gz +0 -0
  150. package/app/dist/assets/{ThreadTerminalView-BiGdt3Fd.js → ThreadTerminalView-CgMKh6rk.js} +1 -1
  151. package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.br +0 -0
  152. package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.gz +0 -0
  153. package/app/dist/assets/{ThreadTimelineNavigationContext-epkIpS1J.js → ThreadTimelineNavigationContext-2--wIUmU.js} +2 -2
  154. package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.br +0 -0
  155. package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.gz +0 -0
  156. package/app/dist/assets/{ThreadUnarchiveButton-CExEP4wZ.js → ThreadUnarchiveButton-CiDbuPzJ.js} +1 -1
  157. package/app/dist/assets/{TimelineDetailScroll-D8gge5Y9.js → TimelineDetailScroll-DnMC8nYC.js} +1 -1
  158. package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.br +0 -0
  159. package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.gz +0 -0
  160. package/app/dist/assets/{TimelineFileDiffBlock-BJt7kifl.js → TimelineFileDiffBlock-D8pKEcE0.js} +1 -1
  161. package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.br +0 -0
  162. package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.gz +0 -0
  163. package/app/dist/assets/{TimelineSelectionMenu-DrK39LAT.js → TimelineSelectionMenu-DDYrgVgK.js} +1 -1
  164. package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.br +0 -0
  165. package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.gz +0 -0
  166. package/app/dist/assets/{ToolsView-4tUvUv2U.js → ToolsView-CXmmNmMz.js} +1 -1
  167. package/app/dist/assets/ToolsView-CXmmNmMz.js.br +0 -0
  168. package/app/dist/assets/ToolsView-CXmmNmMz.js.gz +0 -0
  169. package/app/dist/assets/{ToolsViewSplits-BWOxgNc1.js → ToolsViewSplits-VIMb0WxO.js} +2 -2
  170. package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.br +0 -0
  171. package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.gz +0 -0
  172. package/app/dist/assets/{WaveformVisualizer-C1SzIkiu.js → WaveformVisualizer-CyOfIcDU.js} +1 -1
  173. package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.br +0 -0
  174. package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.gz +0 -0
  175. package/app/dist/assets/{absolute-file-path-CbI5cppS.js → absolute-file-path-BxWHDkiV.js} +1 -1
  176. package/app/dist/assets/{app-fixed-tab-navigation-Cv4Tj7xZ.js → app-fixed-tab-navigation-nG5duhr6.js} +1 -1
  177. package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.br +0 -0
  178. package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.gz +0 -0
  179. package/app/dist/assets/{audio-input-device-preference-D8tr0bqw.js → audio-input-device-preference-Civxk2e_.js} +1 -1
  180. package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.br +0 -0
  181. package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.gz +0 -0
  182. package/app/dist/assets/{bottom-anchored-scroll-body-VYrnz8Hl.js → bottom-anchored-scroll-body-izL_2xQo.js} +1 -1
  183. package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.br +0 -0
  184. package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.gz +0 -0
  185. package/app/dist/assets/{browser-url-jhAVtSw2.js → browser-url-DQsPFWqd.js} +1 -1
  186. package/app/dist/assets/browser-url-DQsPFWqd.js.br +0 -0
  187. package/app/dist/assets/browser-url-DQsPFWqd.js.gz +0 -0
  188. package/app/dist/assets/{checkbox-qaQbU8-H.js → checkbox-Dxs9oAMl.js} +1 -1
  189. package/app/dist/assets/checkbox-Dxs9oAMl.js.br +0 -0
  190. package/app/dist/assets/checkbox-Dxs9oAMl.js.gz +0 -0
  191. package/app/dist/assets/{code-loading-skeletons-pfQDO26Y.js → code-loading-skeletons-CkiXPS0M.js} +1 -1
  192. package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.br +0 -0
  193. package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.gz +0 -0
  194. package/app/dist/assets/{code-rendering-CuFk1qJ1.js → code-rendering-DjLdb6cB.js} +1 -1
  195. package/app/dist/assets/{code-theme-registration-wCS4GRn4.js → code-theme-registration-DWaGQiqG.js} +1 -1
  196. package/app/dist/assets/{detail-card-C3OH86kJ.js → detail-card-BFm1NEQz.js} +1 -1
  197. package/app/dist/assets/detail-card-BFm1NEQz.js.br +0 -0
  198. package/app/dist/assets/detail-card-BFm1NEQz.js.gz +0 -0
  199. package/app/dist/assets/{diff-stats-tally-DkIHmiEl.js → diff-stats-tally-DQHS3tHN.js} +1 -1
  200. package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.br +0 -0
  201. package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.gz +0 -0
  202. package/app/dist/assets/{dist-CWXlD45B.js → dist-DCULoGTS.js} +1 -1
  203. package/app/dist/assets/dist-DCULoGTS.js.br +0 -0
  204. package/app/dist/assets/dist-DCULoGTS.js.gz +0 -0
  205. package/app/dist/assets/{environment-mutations-BrA6u8Ev.js → environment-mutations-Zes88JN-.js} +1 -1
  206. package/app/dist/assets/environment-mutations-Zes88JN-.js.br +0 -0
  207. package/app/dist/assets/environment-mutations-Zes88JN-.js.gz +0 -0
  208. package/app/dist/assets/{environment-workspace-display-0oqBMXMB.js → environment-workspace-display-Blt7U9Mn.js} +3 -3
  209. package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.br +0 -0
  210. package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.gz +0 -0
  211. package/app/dist/assets/{event-code-block-BfPSBXNn.js → event-code-block-QXnzoFqm.js} +1 -1
  212. package/app/dist/assets/event-code-block-QXnzoFqm.js.br +0 -0
  213. package/app/dist/assets/event-code-block-QXnzoFqm.js.gz +0 -0
  214. package/app/dist/assets/{expandable-text-01SvfXRm.js → expandable-text-DkUA9RQT.js} +1 -1
  215. package/app/dist/assets/expandable-text-DkUA9RQT.js.br +0 -0
  216. package/app/dist/assets/expandable-text-DkUA9RQT.js.gz +0 -0
  217. package/app/dist/assets/{file-opener-preference-C5_P-Zfr.js → file-opener-preference-CXZHmESv.js} +1 -1
  218. package/app/dist/assets/{file-path-link-Ddg7Fzor.js → file-path-link-D7DFjBWZ.js} +1 -1
  219. package/app/dist/assets/file-path-link-D7DFjBWZ.js.br +0 -0
  220. package/app/dist/assets/file-path-link-D7DFjBWZ.js.gz +0 -0
  221. package/app/dist/assets/{host-mutations-CAtir6jv.js → host-mutations-Fl0RjER0.js} +1 -1
  222. package/app/dist/assets/host-mutations-Fl0RjER0.js.br +0 -0
  223. package/app/dist/assets/host-mutations-Fl0RjER0.js.gz +0 -0
  224. package/app/dist/assets/{icon-extended-D2fR2GTF.js → icon-extended-C0LTNXfN.js} +1 -1
  225. package/app/dist/assets/icon-extended-C0LTNXfN.js.br +0 -0
  226. package/app/dist/assets/icon-extended-C0LTNXfN.js.gz +0 -0
  227. package/app/dist/assets/{image-lightbox-Dhmri6WK.js → image-lightbox-DhNslR-8.js} +1 -1
  228. package/app/dist/assets/image-lightbox-DhNslR-8.js.br +0 -0
  229. package/app/dist/assets/image-lightbox-DhNslR-8.js.gz +0 -0
  230. package/app/dist/assets/index-C2K528W0.css +2 -0
  231. package/app/dist/assets/index-C2K528W0.css.br +0 -0
  232. package/app/dist/assets/index-C2K528W0.css.gz +0 -0
  233. package/app/dist/assets/{index-CfvM6UcU.js → index-DCps_qBD.js} +8 -8
  234. package/app/dist/assets/index-DCps_qBD.js.br +0 -0
  235. package/app/dist/assets/index-DCps_qBD.js.gz +0 -0
  236. package/app/dist/assets/{inline-rename-editor-Bg8SXoZ3.js → inline-rename-editor-nrH2d_Gy.js} +1 -1
  237. package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.br +0 -0
  238. package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.gz +0 -0
  239. package/app/dist/assets/{launcherRow-CqPaUYWn.js → launcherRow-CVYGyeOl.js} +1 -1
  240. package/app/dist/assets/launcherRow-CVYGyeOl.js.br +0 -0
  241. package/app/dist/assets/launcherRow-CVYGyeOl.js.gz +0 -0
  242. package/app/dist/assets/{localhost-link-rewrite-description-DP-bXSL8.js → localhost-link-rewrite-description-C0FphFZq.js} +1 -1
  243. package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.br +0 -0
  244. package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.gz +0 -0
  245. package/app/dist/assets/{machine-provider-queries-CoghZyj9.js → machine-provider-queries-BTz8Sz3J.js} +1 -1
  246. package/app/dist/assets/{machine-server-access-Drk0mdHH.js → machine-server-access-CGfd5e1r.js} +1 -1
  247. package/app/dist/assets/{markdown-file-image-routing-BJjI1Te3.js → markdown-file-image-routing-BhGjphhz.js} +1 -1
  248. package/app/dist/assets/{markdown-html-BU8qsXmq.js → markdown-html-CLi3FhDR.js} +1 -1
  249. package/app/dist/assets/markdown-html-CLi3FhDR.js.br +0 -0
  250. package/app/dist/assets/markdown-html-CLi3FhDR.js.gz +0 -0
  251. package/app/dist/assets/{markdown-local-file-link-D-MSnVWD.js → markdown-local-file-link-BROpdQPF.js} +1 -1
  252. package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.br +0 -0
  253. package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.gz +0 -0
  254. package/app/dist/assets/{markdown-preview-BLL1QuNp.js → markdown-preview-CGXXNhJo.js} +3 -3
  255. package/app/dist/assets/markdown-preview-CGXXNhJo.js.br +0 -0
  256. package/app/dist/assets/markdown-preview-CGXXNhJo.js.gz +0 -0
  257. package/app/dist/assets/{markdown-prompt-mentions-B5LVmCbO.js → markdown-prompt-mentions-CPWKCtMa.js} +1 -1
  258. package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.br +0 -0
  259. package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.gz +0 -0
  260. package/app/dist/assets/{model-load-error-message-Dmp1hUNg.js → model-load-error-message-CH_k4E7q.js} +1 -1
  261. package/app/dist/assets/model-load-error-message-CH_k4E7q.js.br +0 -0
  262. package/app/dist/assets/model-load-error-message-CH_k4E7q.js.gz +0 -0
  263. package/app/dist/assets/onboarding-telemetry-BXIyQ5F4.js +1 -0
  264. package/app/dist/assets/{open-in-editor-button-D0wnpT6x.js → open-in-editor-button-tA10Nkqn.js} +1 -1
  265. package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.br +0 -0
  266. package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.gz +0 -0
  267. package/app/dist/assets/{page-shell-CgSxnF9m.js → page-shell-CNCVT3Uj.js} +1 -1
  268. package/app/dist/assets/page-shell-CNCVT3Uj.js.br +0 -0
  269. package/app/dist/assets/page-shell-CNCVT3Uj.js.gz +0 -0
  270. package/app/dist/assets/{pierre-worker-pool-CHGWu76e.js → pierre-worker-pool-pXJFsMd7.js} +1 -1
  271. package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.br +0 -0
  272. package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.gz +0 -0
  273. package/app/dist/assets/{plugin-detail-navigation-DuR8_JCx.js → plugin-detail-navigation-SAqiVR3K.js} +1 -1
  274. package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.br +0 -0
  275. package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.gz +0 -0
  276. package/app/dist/assets/{plugin-frontend-D5ijLuKC.js → plugin-frontend-DoWZV45B.js} +3 -3
  277. package/app/dist/assets/plugin-frontend-DoWZV45B.js.br +0 -0
  278. package/app/dist/assets/plugin-frontend-DoWZV45B.js.gz +0 -0
  279. package/app/dist/assets/{plugin-ui-Dpa8hcuk.js → plugin-ui-Cu8MrXLJ.js} +1 -1
  280. package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.br +0 -0
  281. package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.gz +0 -0
  282. package/app/dist/assets/{project-default-execution-options-query-DfOIRKKL.js → project-default-execution-options-query-gaQEWNK0.js} +1 -1
  283. package/app/dist/assets/{queued-editor-typeahead-layout-Czaq8Cl9.js → queued-editor-typeahead-layout-DTUSPVuA.js} +1 -1
  284. package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.br +0 -0
  285. package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.gz +0 -0
  286. package/app/dist/assets/{queued-messages-layout-B5xwiued.js → queued-messages-layout-Bj1foecI.js} +1 -1
  287. package/app/dist/assets/queued-messages-layout-Bj1foecI.js.br +0 -0
  288. package/app/dist/assets/queued-messages-layout-Bj1foecI.js.gz +0 -0
  289. package/app/dist/assets/{resource-list-BKpxiO2e.js → resource-list-DLZLjUCf.js} +1 -1
  290. package/app/dist/assets/resource-list-DLZLjUCf.js.br +0 -0
  291. package/app/dist/assets/resource-list-DLZLjUCf.js.gz +0 -0
  292. package/app/dist/assets/root-compose-create-preference-Bv_dFEsH.js +1 -0
  293. package/app/dist/assets/{save-file-CNFl2iiR.js → save-file-B8sl9wgP.js} +1 -1
  294. package/app/dist/assets/{settings-nav-C9-jh_HN.js → settings-nav-D5tWYG52.js} +1 -1
  295. package/app/dist/assets/settings-nav-D5tWYG52.js.br +0 -0
  296. package/app/dist/assets/settings-nav-D5tWYG52.js.gz +0 -0
  297. package/app/dist/assets/{settings-sections-BMr_XU5l.js → settings-sections-Dfo35J2q.js} +1 -1
  298. package/app/dist/assets/settings-sections-Dfo35J2q.js.br +0 -0
  299. package/app/dist/assets/settings-sections-Dfo35J2q.js.gz +0 -0
  300. package/app/dist/assets/{shortcut-pill-_XSUZHxZ.js → shortcut-pill-BMlNncTw.js} +1 -1
  301. package/app/dist/assets/{sidebarTouchSensor-DG_A1RmT.js → sidebarTouchSensor-Da_E8eSx.js} +1 -1
  302. package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.br +0 -0
  303. package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.gz +0 -0
  304. package/app/dist/assets/{switch-BjJ8825r.js → switch-BRYzbFH-.js} +1 -1
  305. package/app/dist/assets/switch-BRYzbFH-.js.br +0 -0
  306. package/app/dist/assets/switch-BRYzbFH-.js.gz +0 -0
  307. package/app/dist/assets/{textarea-DY_k-BJR.js → textarea-DpRLVuDl.js} +1 -1
  308. package/app/dist/assets/{thread-event-parser-ma5CGP66.js → thread-event-parser-BrLyjs4v.js} +1 -1
  309. package/app/dist/assets/thread-event-parser-BrLyjs4v.js.br +0 -0
  310. package/app/dist/assets/thread-event-parser-BrLyjs4v.js.gz +0 -0
  311. package/app/dist/assets/{thread-panel-queries-BXeOzk_6.js → thread-panel-queries-s8vzntf7.js} +1 -1
  312. package/app/dist/assets/thread-panel-queries-s8vzntf7.js.br +0 -0
  313. package/app/dist/assets/thread-panel-queries-s8vzntf7.js.gz +0 -0
  314. package/app/dist/assets/{thread-runtime-mutations-DmKkyel0.js → thread-runtime-mutations-BOdkZ-H-.js} +1 -1
  315. package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.br +0 -0
  316. package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.gz +0 -0
  317. package/app/dist/assets/{thread-terminal-queries-AFVZ5K6p.js → thread-terminal-queries-Blou76c_.js} +1 -1
  318. package/app/dist/assets/thread-terminal-queries-Blou76c_.js.br +0 -0
  319. package/app/dist/assets/thread-terminal-queries-Blou76c_.js.gz +0 -0
  320. package/app/dist/assets/{threadRecentItems-DXsdcpBk.js → threadRecentItems-BiCe3SkL.js} +1 -1
  321. package/app/dist/assets/threadRecentItems-BiCe3SkL.js.br +0 -0
  322. package/app/dist/assets/threadRecentItems-BiCe3SkL.js.gz +0 -0
  323. package/app/dist/assets/{threadWorkspaceOpenPath-DwKd-s_5.js → threadWorkspaceOpenPath-C9eC_XGN.js} +1 -1
  324. package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.br +0 -0
  325. package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.gz +0 -0
  326. package/app/dist/assets/{title-bar-scroll-fade-Dw_BPLyx.js → title-bar-scroll-fade-OrK4M84v.js} +1 -1
  327. package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.br +0 -0
  328. package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.gz +0 -0
  329. package/app/dist/assets/{truncate-start-CGyRoGtG.js → truncate-start-Ck1IPV62.js} +1 -1
  330. package/app/dist/assets/{use-hover-popover-DzrAfLzd.js → use-hover-popover-uokpMJ80.js} +1 -1
  331. package/app/dist/assets/use-hover-popover-uokpMJ80.js.br +0 -0
  332. package/app/dist/assets/use-hover-popover-uokpMJ80.js.gz +0 -0
  333. package/app/dist/assets/{useElementWidth-Kv5FX-9C.js → useElementWidth-EbzKQ0bg.js} +1 -1
  334. package/app/dist/assets/useElementWidth-EbzKQ0bg.js.br +0 -0
  335. package/app/dist/assets/useElementWidth-EbzKQ0bg.js.gz +0 -0
  336. package/app/dist/assets/{useLocalOpenTargets-B7rqz64L.js → useLocalOpenTargets-CtvcdlZg.js} +1 -1
  337. package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.br +0 -0
  338. package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.gz +0 -0
  339. package/app/dist/assets/{usePanelResizeSnap-Dizp45Ab.js → usePanelResizeSnap-CuwA4rg3.js} +1 -1
  340. package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.br +0 -0
  341. package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.gz +0 -0
  342. package/app/dist/assets/{usePanelTerminals-ByzphxXd.js → usePanelTerminals-BZhTVWNX.js} +1 -1
  343. package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.br +0 -0
  344. package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.gz +0 -0
  345. package/app/dist/assets/{usePathSuggestions-Bd5UhdCh.js → usePathSuggestions-DZ1XPM_t.js} +1 -1
  346. package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.br +0 -0
  347. package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.gz +0 -0
  348. package/app/dist/assets/{useResolvedLiveFileTarget-x5Gd-Gzx.js → useResolvedLiveFileTarget-DlZUgf7A.js} +1 -1
  349. package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.br +0 -0
  350. package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.gz +0 -0
  351. package/app/dist/assets/{useThreadTerminalController-CUnfO0Da.js → useThreadTerminalController-D4Cr2aY0.js} +1 -1
  352. package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.br +0 -0
  353. package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.gz +0 -0
  354. package/app/dist/assets/{workspace-change-summary-CLNpSq_E.js → workspace-change-summary-C1EKX0Np.js} +1 -1
  355. package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.br +0 -0
  356. package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.gz +0 -0
  357. package/app/dist/assets/{workspace-checkout-display-Aad1Wxi4.js → workspace-checkout-display-DRAc3j4u.js} +4 -4
  358. package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.br +0 -0
  359. package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.gz +0 -0
  360. package/app/dist/index.html +17 -17
  361. package/app/dist/index.html.br +0 -0
  362. package/app/dist/index.html.gz +0 -0
  363. package/dist/bb-app.js +1 -1
  364. package/dist/index.d.ts +64 -64
  365. package/dist/index.js +39 -34
  366. package/host-daemon/dist/bb +2 -2
  367. package/host-daemon/dist/daemon-bundle.mjs +9 -9
  368. package/host-daemon/dist/moonlet +2 -2
  369. package/host-daemon/dist/moonlet-chunks/{browser-LWDG5PCA.js → browser-3YADF5CZ.js} +1 -1
  370. package/host-daemon/dist/moonlet-chunks/{chunk-4BNITW7L.js → chunk-CJVCV7LA.js} +1 -1
  371. package/host-daemon/dist/moonlet-chunks/{chunk-5AOUW4I4.js → chunk-DYWN65E6.js} +1 -1
  372. package/host-daemon/dist/moonlet-chunks/{chunk-GUMXNH56.js → chunk-GJNT53PW.js} +1 -1
  373. package/host-daemon/dist/moonlet-chunks/chunk-MNJOOMMT.js +2 -0
  374. package/host-daemon/dist/moonlet-chunks/{chunk-2QTAZF4P.js → chunk-OZFHGPH4.js} +2 -2
  375. package/host-daemon/dist/moonlet-chunks/{chunk-OW2VWWPF.js → chunk-UASCWFYV.js} +1 -1
  376. package/host-daemon/dist/moonlet-chunks/{chunk-3GDA5QRC.js → chunk-UBCGVKZ2.js} +1 -1
  377. package/host-daemon/dist/moonlet-chunks/{chunk-ZJ3M74CR.js → chunk-UZIJUXRX.js} +1 -1
  378. package/host-daemon/dist/moonlet-chunks/{chunk-I2TDLRZL.js → chunk-VRIDG567.js} +80 -80
  379. package/host-daemon/dist/moonlet-chunks/{chunk-LQ55GYT2.js → chunk-Z7UFAOBI.js} +1 -1
  380. package/host-daemon/dist/moonlet-chunks/{chunk-IRGDLZXQ.js → chunk-ZY4JRPPT.js} +1 -1
  381. package/host-daemon/dist/moonlet-chunks/{client-LVL2RUQ5.js → client-HJ57QVLD.js} +1 -1
  382. package/host-daemon/dist/moonlet-chunks/{commander-errors-RQKAT5HQ.js → commander-errors-VI7J6RNT.js} +1 -1
  383. package/host-daemon/dist/moonlet-chunks/{context-env-74PECPQU.js → context-env-C4YEBBVX.js} +1 -1
  384. package/host-daemon/dist/moonlet-chunks/{context-hints-GQMM7IUB.js → context-hints-FZ224BCX.js} +1 -1
  385. package/host-daemon/dist/moonlet-chunks/{diagnostics-GZNLDKFH.js → diagnostics-OU2KW3CN.js} +1 -1
  386. package/host-daemon/dist/moonlet-chunks/{environment-2OF5OYK6.js → environment-45XH2PJT.js} +1 -1
  387. package/host-daemon/dist/moonlet-chunks/{file-ICBUEP7H.js → file-OHC2H5AH.js} +1 -1
  388. package/host-daemon/dist/moonlet-chunks/{guide-I3LO3KWD.js → guide-T2HEZTCZ.js} +1 -1
  389. package/host-daemon/dist/moonlet-chunks/{machine-ZH4VN36Y.js → machine-7DB7FE7G.js} +1 -1
  390. package/host-daemon/dist/moonlet-chunks/{marketplace-72G2CIZT.js → marketplace-GSP2IPGS.js} +1 -1
  391. package/host-daemon/dist/moonlet-chunks/{permissions-ZKMW6XVA.js → permissions-SOZPETLR.js} +1 -1
  392. package/host-daemon/dist/moonlet-chunks/{plugin-J33MYYP6.js → plugin-672NQWPG.js} +26 -26
  393. package/host-daemon/dist/moonlet-chunks/{plugin-cli-proxy-KK4YO745.js → plugin-cli-proxy-YK6LMDCS.js} +1 -1
  394. package/host-daemon/dist/moonlet-chunks/{project-CAOBT6PT.js → project-KMNJH6RG.js} +1 -1
  395. package/host-daemon/dist/moonlet-chunks/{prompt-history-3CTG22DW.js → prompt-history-H3Y2IHDY.js} +1 -1
  396. package/host-daemon/dist/moonlet-chunks/{provider-T7SNTFH5.js → provider-EKKSYF2D.js} +1 -1
  397. package/host-daemon/dist/moonlet-chunks/{schedule-2G2I4DCW.js → schedule-KVSISSIR.js} +1 -1
  398. package/host-daemon/dist/moonlet-chunks/{server-R3LHIEJF.js → server-53I6IGAP.js} +2 -2
  399. package/host-daemon/dist/moonlet-chunks/{settings-WR7UCFPE.js → settings-MKGSGNIO.js} +1 -1
  400. package/host-daemon/dist/moonlet-chunks/{skill-GHMBJF4G.js → skill-DXINIPQ3.js} +1 -1
  401. package/host-daemon/dist/moonlet-chunks/{status-ES5SEMUE.js → status-BSMUYEAO.js} +1 -1
  402. package/host-daemon/dist/moonlet-chunks/{terminal-45KOGD2U.js → terminal-VKBGZFLN.js} +1 -1
  403. package/host-daemon/dist/moonlet-chunks/{theme-DEIR5VHK.js → theme-3YCCZBGC.js} +1 -1
  404. package/host-daemon/dist/moonlet-chunks/{thread-NNUIM6R7.js → thread-PFBPLD4F.js} +1 -1
  405. package/host-daemon/dist/moonlet-chunks/{updates-23J52P44.js → updates-OO7GE7UB.js} +1 -1
  406. package/host-daemon/dist/moonlet-chunks/{voice-CSQR656B.js → voice-ZJOSAJW7.js} +1 -1
  407. package/package.json +3 -3
  408. package/server/dist/builtin-plugins/account-pool/dist/app.js +9 -9
  409. package/server/dist/builtin-plugins/account-pool/skills/account-pool/SKILL.md +1 -1
  410. package/server/dist/builtin-plugins/agent-annotations/dist/app.js +2 -2
  411. package/server/dist/builtin-plugins/agent-board/dist/THIRD_PARTY_NOTICES.md +3 -3
  412. package/server/dist/builtin-plugins/agent-board/dist/app.js +6 -6
  413. package/server/dist/builtin-plugins/agent-board/dist/server.js +1 -1
  414. package/server/dist/builtin-plugins/ask-user-question/dist/app.js +6 -6
  415. package/server/dist/builtin-plugins/automations/dist/app.js +1 -1
  416. package/server/dist/builtin-plugins/automations/skills/automations/SKILL.md +1 -1
  417. package/server/dist/builtin-plugins/bb-account/dist/app.js +1 -1
  418. package/server/dist/builtin-plugins/bb-account/skills/bb-account/SKILL.md +1 -1
  419. package/server/dist/builtin-plugins/bb-ai/dist/server.js +2 -2
  420. package/server/dist/builtin-plugins/bb-ai/skills/bb-cloud-ai/SKILL.md +1 -1
  421. package/server/dist/builtin-plugins/bb-guide/dist/app.js +1 -1
  422. package/server/dist/builtin-plugins/bb-guide/dist/server.js +2 -2
  423. package/server/dist/builtin-plugins/bb-guide/package.json +2 -2
  424. package/server/dist/builtin-plugins/bb-guide/skills/bb-cli/SKILL.md +3 -3
  425. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/SKILL.md +4 -4
  426. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-cli-agents.md +6 -6
  427. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-events.md +2 -2
  428. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
  429. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-sdk.md +1 -1
  430. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/distribution.md +2 -2
  431. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-components.md +4 -4
  432. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-core-slots.md +15 -15
  433. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-hooks-and-ui.md +9 -9
  434. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/providers.md +3 -3
  435. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/quickstart.md +10 -10
  436. package/server/dist/builtin-plugins/bb-guide/skills/skill-creator/SKILL.md +2 -2
  437. package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/SKILL.md +3 -3
  438. package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/references/marketplace-entry.md +8 -8
  439. package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/references/plugin-release.md +1 -1
  440. package/server/dist/builtin-plugins/browser-automation/dist/app.js +1 -1
  441. package/server/dist/builtin-plugins/browser-automation/dist/server.js +2 -2
  442. package/server/dist/builtin-plugins/browser-automation/skills/browser-automation/SKILL.md +3 -3
  443. package/server/dist/builtin-plugins/composer/dist/app.js +4 -4
  444. package/server/dist/builtin-plugins/concurrency-limit/dist/app.js +1 -1
  445. package/server/dist/builtin-plugins/concurrency-limit/skills/concurrency-limit/SKILL.md +1 -1
  446. package/server/dist/builtin-plugins/connect/dist/app.js +2 -2
  447. package/server/dist/builtin-plugins/connect/skills/share-server-links/SKILL.md +1 -1
  448. package/server/dist/builtin-plugins/connect-next/dist/app.js +2 -2
  449. package/server/dist/builtin-plugins/connect-next/dist/server.js +1 -1
  450. package/server/dist/builtin-plugins/connect-next/skills/connect-next/SKILL.md +1 -1
  451. package/server/dist/builtin-plugins/custom-instructions/dist/app.js +1 -1
  452. package/server/dist/builtin-plugins/docs/dist/app.js +3 -3
  453. package/server/dist/builtin-plugins/docs/skills/docs/SKILL.md +1 -1
  454. package/server/dist/builtin-plugins/drafts/dist/app.js +1 -1
  455. package/server/dist/builtin-plugins/environment-git-worktree/dist/app.js +1 -1
  456. package/server/dist/builtin-plugins/environment-modal-sandbox/dist/app.js +1 -1
  457. package/server/dist/builtin-plugins/environment-modal-sandbox/dist/server.js +1 -1
  458. package/server/dist/builtin-plugins/environment-modal-sandbox/skills/modal-sandboxes/SKILL.md +5 -5
  459. package/server/dist/builtin-plugins/environment-project-checkout/dist/app.js +1 -1
  460. package/server/dist/builtin-plugins/github/dist/app.js +2 -2
  461. package/server/dist/builtin-plugins/github/dist/server.js +7 -7
  462. package/server/dist/builtin-plugins/github/package.json +2 -2
  463. package/server/dist/builtin-plugins/github/skills/github-change/SKILL.md +2 -2
  464. package/server/dist/builtin-plugins/github/skills/github-change/references/merging.md +8 -8
  465. package/server/dist/builtin-plugins/github-pr-status/dist/app.js +6 -6
  466. package/server/dist/builtin-plugins/inline-vis/dist/app.js +2 -2
  467. package/server/dist/builtin-plugins/inline-vis/skills/inline-vis/SKILL.md +2 -2
  468. package/server/dist/builtin-plugins/keep-awake/dist/app.js +1 -1
  469. package/server/dist/builtin-plugins/keep-awake/dist/server.js +1 -1
  470. package/server/dist/builtin-plugins/library/dist/app.js +2 -2
  471. package/server/dist/builtin-plugins/mail/skills/mail/SKILL.md +1 -1
  472. package/server/dist/builtin-plugins/marketplace.json +10 -10
  473. package/server/dist/builtin-plugins/mcp/dist/server.js +8 -8
  474. package/server/dist/builtin-plugins/mcp/skills/mcp/SKILL.md +1 -1
  475. package/server/dist/builtin-plugins/memory/dist/app.js +1 -1
  476. package/server/dist/builtin-plugins/memory/dist/server.js +4 -4
  477. package/server/dist/builtin-plugins/memory/skills/memory/SKILL.md +5 -5
  478. package/server/dist/builtin-plugins/monaco-editor/dist/app.js +1 -1
  479. package/server/dist/builtin-plugins/navigation/dist/app.js +1 -1
  480. package/server/dist/builtin-plugins/notify-feed/dist/app.js +3 -3
  481. package/server/dist/builtin-plugins/notify-feed/dist/server.js +2 -2
  482. package/server/dist/builtin-plugins/orbit/dist/app.js +2 -2
  483. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/docs/handoff-to-new-conversation.md +1 -1
  484. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/fixed-runner/linux-x64/manifest.json +4 -4
  485. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/revision +1 -1
  486. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/source.json +1 -1
  487. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/back/CLAUDE.md +5 -5
  488. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/front/CLAUDE.md +15 -15
  489. package/server/dist/builtin-plugins/orbit/dist/host.js +49 -49
  490. package/server/dist/builtin-plugins/orbit/dist/host.meta.json +1 -1
  491. package/server/dist/builtin-plugins/orbit/dist/server.js +148 -148
  492. package/server/dist/builtin-plugins/pdf-preview/dist/app.js +1 -1
  493. package/server/dist/builtin-plugins/plugin-api-docs/dist/app.js +2 -2
  494. package/server/dist/builtin-plugins/plugin-api-tester/dist/app.js +1 -1
  495. package/server/dist/builtin-plugins/prompt-library/dist/app.js +2 -2
  496. package/server/dist/builtin-plugins/prompt-library/skills/prompt-library/SKILL.md +1 -1
  497. package/server/dist/builtin-plugins/provider-acp/dist/app.js +1 -1
  498. package/server/dist/builtin-plugins/provider-acp/dist/host.js +5 -5
  499. package/server/dist/builtin-plugins/provider-acp/dist/host.meta.json +1 -1
  500. package/server/dist/builtin-plugins/provider-acp/dist/server.js +97 -97
  501. package/server/dist/builtin-plugins/provider-acp/skills/acp-provider/SKILL.md +9 -9
  502. package/server/dist/builtin-plugins/provider-claude-code/dist/app.js +1 -1
  503. package/server/dist/builtin-plugins/provider-claude-code/dist/host.js +3 -3
  504. package/server/dist/builtin-plugins/provider-claude-code/dist/host.meta.json +1 -1
  505. package/server/dist/builtin-plugins/provider-claude-code/dist/server.js +1 -1
  506. package/server/dist/builtin-plugins/provider-codex/dist/app.js +2 -2
  507. package/server/dist/builtin-plugins/provider-codex/dist/host.js +45 -45
  508. package/server/dist/builtin-plugins/provider-codex/dist/host.meta.json +1 -1
  509. package/server/dist/builtin-plugins/provider-codex/dist/server.js +1 -1
  510. package/server/dist/builtin-plugins/provider-pi/dist/app.js +1 -1
  511. package/server/dist/builtin-plugins/provider-pi/skills/pi-provider/SKILL.md +1 -1
  512. package/server/dist/builtin-plugins/provider-retry/dist/app.js +1 -1
  513. package/server/dist/builtin-plugins/provider-retry/skills/provider-retry/SKILL.md +1 -1
  514. package/server/dist/builtin-plugins/provider-usage/dist/app.js +12 -12
  515. package/server/dist/builtin-plugins/push-notifications/dist/app.js +2 -2
  516. package/server/dist/builtin-plugins/push-notifications/skills/push-notifications/SKILL.md +1 -1
  517. package/server/dist/builtin-plugins/scheduled-send/dist/app.js +1 -1
  518. package/server/dist/builtin-plugins/secrets/dist/app.js +1 -1
  519. package/server/dist/builtin-plugins/side-chat/dist/app.js +1 -1
  520. package/server/dist/builtin-plugins/storage-retention/dist/app.js +1 -1
  521. package/server/dist/builtin-plugins/storage-retention/dist/server.js +2 -2
  522. package/server/dist/builtin-plugins/storage-retention/skills/storage-retention/SKILL.md +5 -5
  523. package/server/dist/builtin-plugins/tasks/dist/app.js +4 -4
  524. package/server/dist/builtin-plugins/tasks/skills/tasks/SKILL.md +1 -1
  525. package/server/dist/builtin-plugins/theme-preview/dist/app.js +2 -2
  526. package/server/dist/builtin-plugins/theme-preview/skills/bb-theme-authoring/SKILL.md +1 -1
  527. package/server/dist/builtin-plugins/thread-list/dist/app.js +2 -2
  528. package/server/dist/builtin-plugins/thread-list/dist/server.js +2 -2
  529. package/server/dist/builtin-plugins/workflows/dist/app.js +1 -1
  530. package/server/dist/builtin-plugins/workflows/dist/server.js +4 -4
  531. package/server/dist/builtin-plugins/workflows/skills/workflows/SKILL.md +4 -4
  532. package/server/dist/builtin-plugins/workflows/skills/workflows/references/authoring.md +7 -7
  533. package/server/dist/builtin-skills/bb-cli/SKILL.md +3 -3
  534. package/server/dist/builtin-skills/bb-plugin-authoring/SKILL.md +4 -4
  535. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-cli-agents.md +6 -6
  536. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-events.md +2 -2
  537. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
  538. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-sdk.md +1 -1
  539. package/server/dist/builtin-skills/bb-plugin-authoring/references/distribution.md +2 -2
  540. package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-components.md +4 -4
  541. package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-core-slots.md +15 -15
  542. package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-hooks-and-ui.md +9 -9
  543. package/server/dist/builtin-skills/bb-plugin-authoring/references/providers.md +3 -3
  544. package/server/dist/builtin-skills/bb-plugin-authoring/references/quickstart.md +10 -10
  545. package/server/dist/builtin-skills/skill-creator/SKILL.md +2 -2
  546. package/server/dist/builtin-skills/submit-a-plugin/SKILL.md +3 -3
  547. package/server/dist/builtin-skills/submit-a-plugin/references/marketplace-entry.md +8 -8
  548. package/server/dist/builtin-skills/submit-a-plugin/references/plugin-release.md +1 -1
  549. package/server/dist/start-server.js +75 -70
  550. package/app/dist/assets/AddMachineDialog-BHF-GkBG.js.br +0 -0
  551. package/app/dist/assets/AddMachineDialog-BHF-GkBG.js.gz +0 -0
  552. package/app/dist/assets/AppFileExternalNavigationDispatcher-BNbJsP1g.js.br +0 -0
  553. package/app/dist/assets/AppFileExternalNavigationDispatcher-BNbJsP1g.js.gz +0 -0
  554. package/app/dist/assets/BrowserTabDeck-BlOoU-vR.js.br +0 -0
  555. package/app/dist/assets/BrowserTabDeck-BlOoU-vR.js.gz +0 -0
  556. package/app/dist/assets/CommandPaletteBody-CBbTgLrW.js.br +0 -0
  557. package/app/dist/assets/CommandPaletteBody-CBbTgLrW.js.gz +0 -0
  558. package/app/dist/assets/DiffHost-DYBSO1_c.js.br +0 -0
  559. package/app/dist/assets/DiffHost-DYBSO1_c.js.gz +0 -0
  560. package/app/dist/assets/ExperimentalFileLinkMenu-DO2lGQoK.js.br +0 -0
  561. package/app/dist/assets/ExperimentalFileLinkMenu-DO2lGQoK.js.gz +0 -0
  562. package/app/dist/assets/FilePreview-ORcgsTax.js.br +0 -0
  563. package/app/dist/assets/FilePreview-ORcgsTax.js.gz +0 -0
  564. package/app/dist/assets/GitDiffCardHeader-i4vt7tT5.js.br +0 -0
  565. package/app/dist/assets/GitDiffCardHeader-i4vt7tT5.js.gz +0 -0
  566. package/app/dist/assets/InlineMessageEditorFrame-y089xCLP.js.br +0 -0
  567. package/app/dist/assets/InlineMessageEditorFrame-y089xCLP.js.gz +0 -0
  568. package/app/dist/assets/MachineLabel-D07WUIMh.js.br +0 -0
  569. package/app/dist/assets/MachineLabel-D07WUIMh.js.gz +0 -0
  570. package/app/dist/assets/MachineRenameDialog-RyrwvNas.js.br +0 -0
  571. package/app/dist/assets/MachineRenameDialog-RyrwvNas.js.gz +0 -0
  572. package/app/dist/assets/MachineSettingsView-Bg6Op62W.js.br +0 -0
  573. package/app/dist/assets/MachineSettingsView-Bg6Op62W.js.gz +0 -0
  574. package/app/dist/assets/MicrophonePreferences-DwsTYfON.js.br +0 -0
  575. package/app/dist/assets/MicrophonePreferences-DwsTYfON.js.gz +0 -0
  576. package/app/dist/assets/ModelReasoningMenu-Dth3XXm8.js.br +0 -0
  577. package/app/dist/assets/ModelReasoningMenu-Dth3XXm8.js.gz +0 -0
  578. package/app/dist/assets/MoonletDiff-Da65ABAI.js.br +0 -0
  579. package/app/dist/assets/MoonletDiff-Da65ABAI.js.gz +0 -0
  580. package/app/dist/assets/MoonletDiffSplit-Phl7m23w.js.br +0 -0
  581. package/app/dist/assets/MoonletDiffSplit-Phl7m23w.js.gz +0 -0
  582. package/app/dist/assets/MoonletSourceCode-C5aa88dK.js.br +0 -0
  583. package/app/dist/assets/MoonletSourceCode-C5aa88dK.js.gz +0 -0
  584. package/app/dist/assets/NewTabPage-BKkv1maV.js.br +0 -0
  585. package/app/dist/assets/NewTabPage-BKkv1maV.js.gz +0 -0
  586. package/app/dist/assets/NewThreadComposer-00DY4i8k.js.br +0 -0
  587. package/app/dist/assets/NewThreadComposer-00DY4i8k.js.gz +0 -0
  588. package/app/dist/assets/OnboardingFlow-GwpuTTqu.js.br +0 -0
  589. package/app/dist/assets/OnboardingFlow-GwpuTTqu.js.gz +0 -0
  590. package/app/dist/assets/OptionPicker-Cy_W5NWS.js.br +0 -0
  591. package/app/dist/assets/OptionPicker-Cy_W5NWS.js.gz +0 -0
  592. package/app/dist/assets/PaletteShell-CRwrb4lb.js.br +0 -0
  593. package/app/dist/assets/PaletteShell-CRwrb4lb.js.gz +0 -0
  594. package/app/dist/assets/PaneMaximizeButton-CMp4cCoZ.js.br +0 -0
  595. package/app/dist/assets/PaneMaximizeButton-CMp4cCoZ.js.gz +0 -0
  596. package/app/dist/assets/PierreLineSelectionActions-BXbCJV8P.js.br +0 -0
  597. package/app/dist/assets/PierreLineSelectionActions-BXbCJV8P.js.gz +0 -0
  598. package/app/dist/assets/PluginPanelRightPanelHost-CuKRaAaL.js.br +0 -0
  599. package/app/dist/assets/PluginPanelRightPanelHost-CuKRaAaL.js.gz +0 -0
  600. package/app/dist/assets/PluginSettingsSections-DJo5h7Qh.js.br +0 -0
  601. package/app/dist/assets/PluginSettingsSections-DJo5h7Qh.js.gz +0 -0
  602. package/app/dist/assets/PluginThreadChat-BV6OMCzu.js.br +0 -0
  603. package/app/dist/assets/PluginThreadChat-BV6OMCzu.js.gz +0 -0
  604. package/app/dist/assets/ProjectDetailSettingsView-DdF6YsSg.js.br +0 -0
  605. package/app/dist/assets/ProjectDetailSettingsView-DdF6YsSg.js.gz +0 -0
  606. package/app/dist/assets/ProjectMachineSetupDialog-CtbI4XxM.js.br +0 -0
  607. package/app/dist/assets/ProjectMachineSetupDialog-CtbI4XxM.js.gz +0 -0
  608. package/app/dist/assets/ProjectsSettingsSection-BT1kXbPn.js.br +0 -0
  609. package/app/dist/assets/ProjectsSettingsSection-BT1kXbPn.js.gz +0 -0
  610. package/app/dist/assets/QueuedMessagesList-D1aAchqp.js.br +0 -0
  611. package/app/dist/assets/QueuedMessagesList-D1aAchqp.js.gz +0 -0
  612. package/app/dist/assets/RemotePathBrowser-vPIL8lVm.js.br +0 -0
  613. package/app/dist/assets/RemotePathBrowser-vPIL8lVm.js.gz +0 -0
  614. package/app/dist/assets/RootComposeView-DV6JGFlA.js.br +0 -0
  615. package/app/dist/assets/RootComposeView-DV6JGFlA.js.gz +0 -0
  616. package/app/dist/assets/SecondaryPanelLayout-BpHDgFJ_.js.br +0 -0
  617. package/app/dist/assets/SecondaryPanelLayout-BpHDgFJ_.js.gz +0 -0
  618. package/app/dist/assets/ServerMoveOverlayView-CGkGzv8t.js.br +0 -0
  619. package/app/dist/assets/ServerMoveOverlayView-CGkGzv8t.js.gz +0 -0
  620. package/app/dist/assets/SettingsSidebar-1XC0Uxwo.js.br +0 -0
  621. package/app/dist/assets/SettingsSidebar-1XC0Uxwo.js.gz +0 -0
  622. package/app/dist/assets/SettingsView-BUobmesT.js +0 -7
  623. package/app/dist/assets/SettingsView-BUobmesT.js.br +0 -0
  624. package/app/dist/assets/SettingsView-BUobmesT.js.gz +0 -0
  625. package/app/dist/assets/SidebarFooterCustomize-D7sLYPwD.js.br +0 -0
  626. package/app/dist/assets/SidebarFooterCustomize-D7sLYPwD.js.gz +0 -0
  627. package/app/dist/assets/SidebarVisibilityCustomize-DpTzFoGl.js.br +0 -0
  628. package/app/dist/assets/SidebarVisibilityCustomize-DpTzFoGl.js.gz +0 -0
  629. package/app/dist/assets/SourceCodeHost-DVEXLJK1.js.br +0 -0
  630. package/app/dist/assets/SourceCodeHost-DVEXLJK1.js.gz +0 -0
  631. package/app/dist/assets/SplitWorkspaceRoute-BfxQQdOx.js.br +0 -0
  632. package/app/dist/assets/SplitWorkspaceRoute-BfxQQdOx.js.gz +0 -0
  633. package/app/dist/assets/TerminalOutputBlock-COQNamKR.js.br +0 -0
  634. package/app/dist/assets/TerminalOutputBlock-COQNamKR.js.gz +0 -0
  635. package/app/dist/assets/ThreadActionsMenu-064Gcy7T.js.br +0 -0
  636. package/app/dist/assets/ThreadActionsMenu-064Gcy7T.js.gz +0 -0
  637. package/app/dist/assets/ThreadDetailView-CjoXzweq.js.br +0 -0
  638. package/app/dist/assets/ThreadDetailView-CjoXzweq.js.gz +0 -0
  639. package/app/dist/assets/ThreadSearchPaletteMode-CwdePsHK.js.br +0 -0
  640. package/app/dist/assets/ThreadSearchPaletteMode-CwdePsHK.js.gz +0 -0
  641. package/app/dist/assets/ThreadSecondaryPanel-CtYtgTla.js.br +0 -0
  642. package/app/dist/assets/ThreadSecondaryPanel-CtYtgTla.js.gz +0 -0
  643. package/app/dist/assets/ThreadSecondaryPanelTabContent-BNQi8b2n.js.br +0 -0
  644. package/app/dist/assets/ThreadSecondaryPanelTabContent-BNQi8b2n.js.gz +0 -0
  645. package/app/dist/assets/ThreadStatusGlyph-DxxHDn0P.js.br +0 -0
  646. package/app/dist/assets/ThreadStatusGlyph-DxxHDn0P.js.gz +0 -0
  647. package/app/dist/assets/ThreadTerminalPanel-fb5Kk0KG.js.br +0 -0
  648. package/app/dist/assets/ThreadTerminalPanel-fb5Kk0KG.js.gz +0 -0
  649. package/app/dist/assets/ThreadTerminalView-BiGdt3Fd.js.br +0 -0
  650. package/app/dist/assets/ThreadTerminalView-BiGdt3Fd.js.gz +0 -0
  651. package/app/dist/assets/ThreadTimelineNavigationContext-epkIpS1J.js.br +0 -0
  652. package/app/dist/assets/ThreadTimelineNavigationContext-epkIpS1J.js.gz +0 -0
  653. package/app/dist/assets/TimelineDetailScroll-D8gge5Y9.js.br +0 -0
  654. package/app/dist/assets/TimelineDetailScroll-D8gge5Y9.js.gz +0 -0
  655. package/app/dist/assets/TimelineFileDiffBlock-BJt7kifl.js.br +0 -0
  656. package/app/dist/assets/TimelineFileDiffBlock-BJt7kifl.js.gz +0 -0
  657. package/app/dist/assets/TimelineSelectionMenu-DrK39LAT.js.br +0 -0
  658. package/app/dist/assets/TimelineSelectionMenu-DrK39LAT.js.gz +0 -0
  659. package/app/dist/assets/ToolsView-4tUvUv2U.js.br +0 -0
  660. package/app/dist/assets/ToolsView-4tUvUv2U.js.gz +0 -0
  661. package/app/dist/assets/ToolsViewSplits-BWOxgNc1.js.br +0 -0
  662. package/app/dist/assets/ToolsViewSplits-BWOxgNc1.js.gz +0 -0
  663. package/app/dist/assets/WaveformVisualizer-C1SzIkiu.js.br +0 -0
  664. package/app/dist/assets/WaveformVisualizer-C1SzIkiu.js.gz +0 -0
  665. package/app/dist/assets/app-fixed-tab-navigation-Cv4Tj7xZ.js.br +0 -0
  666. package/app/dist/assets/app-fixed-tab-navigation-Cv4Tj7xZ.js.gz +0 -0
  667. package/app/dist/assets/audio-input-device-preference-D8tr0bqw.js.br +0 -0
  668. package/app/dist/assets/audio-input-device-preference-D8tr0bqw.js.gz +0 -0
  669. package/app/dist/assets/bottom-anchored-scroll-body-VYrnz8Hl.js.br +0 -0
  670. package/app/dist/assets/bottom-anchored-scroll-body-VYrnz8Hl.js.gz +0 -0
  671. package/app/dist/assets/browser-url-jhAVtSw2.js.br +0 -0
  672. package/app/dist/assets/browser-url-jhAVtSw2.js.gz +0 -0
  673. package/app/dist/assets/checkbox-qaQbU8-H.js.br +0 -0
  674. package/app/dist/assets/checkbox-qaQbU8-H.js.gz +0 -0
  675. package/app/dist/assets/code-loading-skeletons-pfQDO26Y.js.br +0 -0
  676. package/app/dist/assets/code-loading-skeletons-pfQDO26Y.js.gz +0 -0
  677. package/app/dist/assets/detail-card-C3OH86kJ.js.br +0 -0
  678. package/app/dist/assets/detail-card-C3OH86kJ.js.gz +0 -0
  679. package/app/dist/assets/diff-stats-tally-DkIHmiEl.js.br +0 -0
  680. package/app/dist/assets/diff-stats-tally-DkIHmiEl.js.gz +0 -0
  681. package/app/dist/assets/dist-CWXlD45B.js.br +0 -0
  682. package/app/dist/assets/dist-CWXlD45B.js.gz +0 -0
  683. package/app/dist/assets/environment-mutations-BrA6u8Ev.js.br +0 -0
  684. package/app/dist/assets/environment-mutations-BrA6u8Ev.js.gz +0 -0
  685. package/app/dist/assets/environment-workspace-display-0oqBMXMB.js.br +0 -0
  686. package/app/dist/assets/environment-workspace-display-0oqBMXMB.js.gz +0 -0
  687. package/app/dist/assets/event-code-block-BfPSBXNn.js.br +0 -0
  688. package/app/dist/assets/event-code-block-BfPSBXNn.js.gz +0 -0
  689. package/app/dist/assets/expandable-text-01SvfXRm.js.br +0 -0
  690. package/app/dist/assets/expandable-text-01SvfXRm.js.gz +0 -0
  691. package/app/dist/assets/file-path-link-Ddg7Fzor.js.br +0 -0
  692. package/app/dist/assets/file-path-link-Ddg7Fzor.js.gz +0 -0
  693. package/app/dist/assets/host-mutations-CAtir6jv.js.br +0 -0
  694. package/app/dist/assets/host-mutations-CAtir6jv.js.gz +0 -0
  695. package/app/dist/assets/icon-extended-D2fR2GTF.js.br +0 -0
  696. package/app/dist/assets/icon-extended-D2fR2GTF.js.gz +0 -0
  697. package/app/dist/assets/image-lightbox-Dhmri6WK.js.br +0 -0
  698. package/app/dist/assets/image-lightbox-Dhmri6WK.js.gz +0 -0
  699. package/app/dist/assets/index-5EQKiTkW.css +0 -2
  700. package/app/dist/assets/index-5EQKiTkW.css.br +0 -0
  701. package/app/dist/assets/index-5EQKiTkW.css.gz +0 -0
  702. package/app/dist/assets/index-CfvM6UcU.js.br +0 -0
  703. package/app/dist/assets/index-CfvM6UcU.js.gz +0 -0
  704. package/app/dist/assets/inline-rename-editor-Bg8SXoZ3.js.br +0 -0
  705. package/app/dist/assets/inline-rename-editor-Bg8SXoZ3.js.gz +0 -0
  706. package/app/dist/assets/launcherRow-CqPaUYWn.js.br +0 -0
  707. package/app/dist/assets/launcherRow-CqPaUYWn.js.gz +0 -0
  708. package/app/dist/assets/localhost-link-rewrite-description-DP-bXSL8.js.br +0 -0
  709. package/app/dist/assets/localhost-link-rewrite-description-DP-bXSL8.js.gz +0 -0
  710. package/app/dist/assets/markdown-html-BU8qsXmq.js.br +0 -0
  711. package/app/dist/assets/markdown-html-BU8qsXmq.js.gz +0 -0
  712. package/app/dist/assets/markdown-local-file-link-D-MSnVWD.js.br +0 -0
  713. package/app/dist/assets/markdown-local-file-link-D-MSnVWD.js.gz +0 -0
  714. package/app/dist/assets/markdown-preview-BLL1QuNp.js.br +0 -0
  715. package/app/dist/assets/markdown-preview-BLL1QuNp.js.gz +0 -0
  716. package/app/dist/assets/markdown-prompt-mentions-B5LVmCbO.js.br +0 -0
  717. package/app/dist/assets/markdown-prompt-mentions-B5LVmCbO.js.gz +0 -0
  718. package/app/dist/assets/model-load-error-message-Dmp1hUNg.js.br +0 -0
  719. package/app/dist/assets/model-load-error-message-Dmp1hUNg.js.gz +0 -0
  720. package/app/dist/assets/onboarding-telemetry-BSt5c7Sg.js +0 -1
  721. package/app/dist/assets/open-in-editor-button-D0wnpT6x.js.br +0 -0
  722. package/app/dist/assets/open-in-editor-button-D0wnpT6x.js.gz +0 -0
  723. package/app/dist/assets/page-shell-CgSxnF9m.js.br +0 -0
  724. package/app/dist/assets/page-shell-CgSxnF9m.js.gz +0 -0
  725. package/app/dist/assets/pierre-worker-pool-CHGWu76e.js.br +0 -0
  726. package/app/dist/assets/pierre-worker-pool-CHGWu76e.js.gz +0 -0
  727. package/app/dist/assets/plugin-detail-navigation-DuR8_JCx.js.br +0 -0
  728. package/app/dist/assets/plugin-detail-navigation-DuR8_JCx.js.gz +0 -0
  729. package/app/dist/assets/plugin-frontend-D5ijLuKC.js.br +0 -0
  730. package/app/dist/assets/plugin-frontend-D5ijLuKC.js.gz +0 -0
  731. package/app/dist/assets/plugin-ui-Dpa8hcuk.js.br +0 -0
  732. package/app/dist/assets/plugin-ui-Dpa8hcuk.js.gz +0 -0
  733. package/app/dist/assets/queued-editor-typeahead-layout-Czaq8Cl9.js.br +0 -0
  734. package/app/dist/assets/queued-editor-typeahead-layout-Czaq8Cl9.js.gz +0 -0
  735. package/app/dist/assets/queued-messages-layout-B5xwiued.js.br +0 -0
  736. package/app/dist/assets/queued-messages-layout-B5xwiued.js.gz +0 -0
  737. package/app/dist/assets/resource-list-BKpxiO2e.js.br +0 -0
  738. package/app/dist/assets/resource-list-BKpxiO2e.js.gz +0 -0
  739. package/app/dist/assets/root-compose-create-preference-BeAvwSHy.js +0 -1
  740. package/app/dist/assets/settings-nav-C9-jh_HN.js.br +0 -0
  741. package/app/dist/assets/settings-nav-C9-jh_HN.js.gz +0 -0
  742. package/app/dist/assets/settings-sections-BMr_XU5l.js.br +0 -0
  743. package/app/dist/assets/settings-sections-BMr_XU5l.js.gz +0 -0
  744. package/app/dist/assets/sidebarTouchSensor-DG_A1RmT.js.br +0 -0
  745. package/app/dist/assets/sidebarTouchSensor-DG_A1RmT.js.gz +0 -0
  746. package/app/dist/assets/switch-BjJ8825r.js.br +0 -0
  747. package/app/dist/assets/switch-BjJ8825r.js.gz +0 -0
  748. package/app/dist/assets/thread-event-parser-ma5CGP66.js.br +0 -0
  749. package/app/dist/assets/thread-event-parser-ma5CGP66.js.gz +0 -0
  750. package/app/dist/assets/thread-panel-queries-BXeOzk_6.js.br +0 -0
  751. package/app/dist/assets/thread-panel-queries-BXeOzk_6.js.gz +0 -0
  752. package/app/dist/assets/thread-runtime-mutations-DmKkyel0.js.br +0 -0
  753. package/app/dist/assets/thread-runtime-mutations-DmKkyel0.js.gz +0 -0
  754. package/app/dist/assets/thread-terminal-queries-AFVZ5K6p.js.br +0 -0
  755. package/app/dist/assets/thread-terminal-queries-AFVZ5K6p.js.gz +0 -0
  756. package/app/dist/assets/threadRecentItems-DXsdcpBk.js.br +0 -0
  757. package/app/dist/assets/threadRecentItems-DXsdcpBk.js.gz +0 -0
  758. package/app/dist/assets/threadWorkspaceOpenPath-DwKd-s_5.js.br +0 -0
  759. package/app/dist/assets/threadWorkspaceOpenPath-DwKd-s_5.js.gz +0 -0
  760. package/app/dist/assets/title-bar-scroll-fade-Dw_BPLyx.js.br +0 -0
  761. package/app/dist/assets/title-bar-scroll-fade-Dw_BPLyx.js.gz +0 -0
  762. package/app/dist/assets/use-hover-popover-DzrAfLzd.js.br +0 -0
  763. package/app/dist/assets/use-hover-popover-DzrAfLzd.js.gz +0 -0
  764. package/app/dist/assets/useElementWidth-Kv5FX-9C.js.br +0 -0
  765. package/app/dist/assets/useElementWidth-Kv5FX-9C.js.gz +0 -0
  766. package/app/dist/assets/useLocalOpenTargets-B7rqz64L.js.br +0 -0
  767. package/app/dist/assets/useLocalOpenTargets-B7rqz64L.js.gz +0 -0
  768. package/app/dist/assets/usePanelResizeSnap-Dizp45Ab.js.br +0 -0
  769. package/app/dist/assets/usePanelResizeSnap-Dizp45Ab.js.gz +0 -0
  770. package/app/dist/assets/usePanelTerminals-ByzphxXd.js.br +0 -0
  771. package/app/dist/assets/usePanelTerminals-ByzphxXd.js.gz +0 -0
  772. package/app/dist/assets/usePathSuggestions-Bd5UhdCh.js.br +0 -0
  773. package/app/dist/assets/usePathSuggestions-Bd5UhdCh.js.gz +0 -0
  774. package/app/dist/assets/useResolvedLiveFileTarget-x5Gd-Gzx.js.br +0 -0
  775. package/app/dist/assets/useResolvedLiveFileTarget-x5Gd-Gzx.js.gz +0 -0
  776. package/app/dist/assets/useThreadTerminalController-CUnfO0Da.js.br +0 -0
  777. package/app/dist/assets/useThreadTerminalController-CUnfO0Da.js.gz +0 -0
  778. package/app/dist/assets/workspace-change-summary-CLNpSq_E.js.br +0 -0
  779. package/app/dist/assets/workspace-change-summary-CLNpSq_E.js.gz +0 -0
  780. package/app/dist/assets/workspace-checkout-display-Aad1Wxi4.js.br +0 -0
  781. package/app/dist/assets/workspace-checkout-display-Aad1Wxi4.js.gz +0 -0
  782. package/host-daemon/dist/moonlet-chunks/chunk-4XWRV5U3.js +0 -2
@@ -1,7 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Br as t,Cr as n,Gt as r,It as i,J as a,Lr as o,Lt as s,Nr as c,Qr as l,Qt as u,Rr as d,Sr as f,St as p,Ur as m,Vr as h,X as g,Xn as _,Y as v,Yt as y,Z as b,Zt as x,hi as S,jr as C,kr as w,ni as T,qr as E,ri as D,yr as O}from"./boot-vendor-CKEhulXz.js";import{A as k}from"./environment-workspace-display-0oqBMXMB.js";import{t as A}from"./permission-mode-options-BrNWKCMS.js";import{$_ as j,$f as M,$p as N,At as P,B as F,Bo as I,Bt as L,Ci as R,Co as z,Ct as B,Cv as V,Dh as H,Dn as U,Do as W,Dt as ee,Dv as te,En as G,Eo as K,Et as ne,Ev as re,Fh as q,Gd as ie,Go as ae,H as oe,Hf as se,Hh as ce,Ht as le,I as ue,Ia as de,It as fe,Jd as pe,Jr as me,Jt as he,Kd as ge,Lc as _e,Lt as ve,M as ye,Mh as be,Mr as xe,Mt as Se,N as Ce,Na as we,Ni as Te,Nn as Ee,No as De,Nt as Oe,Om as ke,Ot as Ae,P as je,Pm as Me,Pt as Ne,Q_ as Pe,Qd as Fe,Qi as Ie,Rr as Le,Rs as Re,Rt as ze,So as Be,Sv as Ve,T as He,Tn as Ue,To as We,Tt as Ge,Tv as Ke,Uf as qe,Va as Je,Vf as Ye,Vo as Xe,Vt as Ze,Wa as Qe,Wo as $e,Wt as et,Xg as tt,Xo as nt,Xt as rt,Yr as it,Ys as at,Yt as ot,Zo as st,_ as ct,_c as lt,_m as ut,_n as dt,_o as ft,_v as pt,aa as mt,bt as ht,bv as gt,c as _t,cs as vt,d as yt,da as bt,ds as xt,ea as St,em as Ct,ep as wt,f as Tt,fs as Et,fv as Dt,g as Ot,gn as kt,go as At,h as jt,ha as Mt,hd as Nt,hm as Pt,ho as Ft,hp as It,hs as Lt,ht as Rt,i_ as zt,ia as Bt,in as Vt,j as Ht,jh as J,jp as Ut,jt as Wt,km as Gt,kt as Kt,l as qt,la as Jt,lc as Yt,ls as Xt,m as Zt,mo as Qt,ms as $t,nc as en,np as tn,oa as nn,oc as rn,oo as an,p as on,p_ as sn,pv as cn,qd as ln,qi as un,qo as dn,qu as fn,r_ as pn,ra as mn,sa as hn,tn as gn,tp as _n,tv as vn,u as yn,vt as bn,vv as xn,wh as Sn,wi as Cn,wo as wn,wr as Tn,wt as En,wv as Dn,xn as On,xo as kn,xt as An,xv as jn,y as Mn,yv as Nn,z as Pn,zo as Fn,zt as In}from"./index-CfvM6UcU.js";import{a as Ln,n as Rn}from"./settings-nav-C9-jh_HN.js";import{a as zn,i as Bn,n as Vn,o as Y,s as X}from"./dist-CWXlD45B.js";import{r as Hn,t as Un}from"./AddMachineDialog-BHF-GkBG.js";import{t as Wn}from"./expandable-text-01SvfXRm.js";import{a as Gn,i as Kn,o as qn,t as Jn}from"./PluginSettingsSections-DJo5h7Qh.js";import{t as Yn}from"./switch-BjJ8825r.js";import{C as Xn,S as Zn,_ as Qn,b as $n,y as er}from"./resource-list-BKpxiO2e.js";import{t as tr}from"./machine-provider-queries-CoghZyj9.js";import{t as nr}from"./checkbox-qaQbU8-H.js";import{a as rr,i as ir,n as ar,o as or,r as sr}from"./useLocalOpenTargets-B7rqz64L.js";import{t as cr}from"./file-opener-preference-C5_P-Zfr.js";import{n as lr}from"./MachineLabel-D07WUIMh.js";import{t as ur}from"./page-shell-CgSxnF9m.js";import{i as dr,r as fr}from"./audio-input-device-preference-D8tr0bqw.js";import{t as pr}from"./shortcut-pill-_XSUZHxZ.js";import{f as mr,n as hr,p as gr}from"./markdown-preview-BLL1QuNp.js";import{t as _r}from"./lib-EkxklCWa.js";import{f as vr,p as yr}from"./ThreadTimelineNavigationContext-epkIpS1J.js";import{t as br}from"./search-flash-CN7Cd-7c.js";import{n as xr,o as Sr,s as Cr,t as wr}from"./sortable.esm-Bb-mbyoc.js";import{i as Tr,r as Er}from"./code-rendering-CuFk1qJ1.js";import{n as Dr,t as Or}from"./use-reorder-dnd-Dj_SzaWx.js";import{n as kr,t as Ar}from"./localhost-link-rewrite-description-DP-bXSL8.js";import{n as jr}from"./NewThreadComposer-00DY4i8k.js";import{d as Mr,i as Nr,l as Pr,n as Fr,o as Ir,r as Lr,t as Rr,u as zr}from"./MachineRenameDialog-RyrwvNas.js";import{n as Br,r as Vr,t as Hr}from"./update-state-CuYJKY13.js";import{a as Ur,i as Wr,o as Gr,r as Kr,s as qr}from"./host-mutations-CAtir6jv.js";import{a as Jr,i as Yr,o as Xr,t as Zr}from"./ProjectsSettingsSection-BT1kXbPn.js";import"./icon-extended-D2fR2GTF.js";import{t as Qr}from"./root-compose-create-preference-BeAvwSHy.js";import{PluginDetailPaneView as $r,n as ei,r as ti,t as ni}from"./ToolsView-4tUvUv2U.js";import{t as ri}from"./ThreadUnarchiveButton-CExEP4wZ.js";var Z=w(),Q=e(S(),1),$=e(D(),1),ii=[{path:`name`,label:`Name`},{path:`kind`,label:`Kind`,choices:[`cli`,`ssh`]},{path:`program`,label:`Program`},{path:`host`,label:`SSH host`},{path:`user`,label:`SSH user`},{path:`host_key`,label:`SSH public key`},{path:`secret.item`,label:`Secret item`},{path:`secret.field`,label:`Secret field`},{path:`secret.as`,label:`Pass secret as`},{path:`read`,label:`Read commands (one per line)`,kind:`lines`},{path:`act`,label:`Change commands (one per line)`,kind:`lines`},{path:`never`,label:`Refused commands (one per line)`,kind:`lines`},{path:`default`,label:`Other commands`,choices:[`read`,`act`,`never`]}],ai=[{path:`name`,label:`Name`},{path:`item`,label:`Secret item`},{path:`bridge`,label:`Proton Bridge`,kind:`boolean`},{path:`unit`,label:`Linux app unit`},{path:`app`,label:`macOS app bundle ID`},{path:`url`,label:`Sign-in page (HTTPS)`},{path:`username`,label:`Username field`},{path:`password`,label:`Password field`},{path:`otp`,label:`One-time code field`},{path:`mailbox_password`,label:`Mailbox password field`}],oi=[{path:`id`,label:`Name`},{path:`caller`,label:`Account (account:name)`},{path:`secret`,label:`Secret reference`},{path:`purpose`,label:`Purpose`},{path:`expires_at`,label:`Expires at (Unix seconds)`,kind:`number`},{path:`limits.uses_per_hour`,label:`Uses per hour`,kind:`number`},{path:`limits.concurrent`,label:`At once`,kind:`number`},{path:`limits.input_bytes`,label:`Input bytes`,kind:`number`},{path:`limits.output_bytes`,label:`Output bytes`,kind:`number`},{path:`limits.seconds`,label:`Seconds`,kind:`number`}],si=[{path:`host`,label:`HTTPS host`},{path:`port`,label:`Port`,kind:`number`},{path:`methods`,label:`HTTP methods (one per line)`,kind:`lines`},{path:`paths`,label:`Paths (one per line)`,kind:`lines`},{path:`credential.location`,label:`Credential location`,choices:[`header`,`query`,`json`,`form`]},{path:`credential.name`,label:`Credential field name`},{path:`credential.prefix`,label:`Credential prefix`,choices:[``,`Bearer `]}],ci=[{path:`command`,label:`Reviewed program`},{path:`actions`,label:`Allowed actions (one per line)`,kind:`lines`}];function li(e,t){let n=e;for(let e of t.split(`.`))n=n&&typeof n==`object`&&!Array.isArray(n)?n[e]:void 0;return n}function ui(e,t,n){let r=structuredClone(e),i=t.split(`.`),a=r;for(let e of i.slice(0,-1)){let t=a[e];(!t||typeof t!=`object`||Array.isArray(t))&&(a[e]={});let n=a[e];n&&typeof n==`object`&&!Array.isArray(n)&&(a=n)}let o=i.at(-1);return n===void 0?delete a[o]:a[o]=n,r}function di(e){let t=(0,Z.c)(56),{name:n,settings:r,save:i,reload:a}=e,[o,s]=(0,Q.useState)(null),c;t[0]===r.sensitive?c=t[1]:(c=JSON.stringify(r.sensitive),t[0]=r.sensitive,t[1]=c);let l=c,u;t[2]!==o?.text||t[3]!==r.sensitive?(u=o?.text??r.sensitive.join(`
2
- `),t[2]=o?.text,t[3]=r.sensitive,t[4]=u):u=t[4];let d=u,f=o!==null&&o.source!==l,p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`legend`,{className:`px-1 text-sm font-medium`,children:`When to ask`}),t[5]=p):p=t[5];let m=`${n}: when to ask`,h;t[6]!==i||t[7]!==r?(h=e=>{let t=e.target.value;(t===`never-ask`||t===`ask-changes`||t===`always-ask`||t===`read-only`)&&i({...r,level:t}).catch(hi)},t[6]=i,t[7]=r,t[8]=h):h=t[8];let g,_,v,y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`option`,{value:`never-ask`,children:`Never ask`}),_=(0,$.jsx)(`option`,{value:`ask-changes`,children:`Ask before changes`}),v=(0,$.jsx)(`option`,{value:`always-ask`,children:`Always ask`}),y=(0,$.jsx)(`option`,{value:`read-only`,children:`Read only`}),t[9]=g,t[10]=_,t[11]=v,t[12]=y):(g=t[9],_=t[10],v=t[11],y=t[12]);let b;t[13]!==r.level||t[14]!==m||t[15]!==h?(b=(0,$.jsxs)(`label`,{className:`flex flex-wrap items-center justify-between gap-2 text-sm`,children:[`Permission level`,(0,$.jsxs)(`select`,{"aria-label":m,className:`rounded border bg-background p-2`,value:r.level,onChange:h,children:[g,_,v,y]})]}),t[13]=r.level,t[14]=m,t[15]=h,t[16]=b):b=t[16];let x=`${n}: unanswered questions`,S=r.expireMinutes??``,C;t[17]!==i||t[18]!==r?(C=e=>void i({...r,expireMinutes:e.target.value?Number(e.target.value):null}).catch(mi),t[17]=i,t[18]=r,t[19]=C):C=t[19];let w,T,E,D;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(`option`,{value:``,children:`Wait for an answer`}),T=(0,$.jsx)(`option`,{value:`15`,children:`Refuse after 15 minutes`}),E=(0,$.jsx)(`option`,{value:`60`,children:`Refuse after 1 hour`}),D=(0,$.jsx)(`option`,{value:`1440`,children:`Refuse after 1 day`}),t[20]=w,t[21]=T,t[22]=E,t[23]=D):(w=t[20],T=t[21],E=t[22],D=t[23]);let O;t[24]===r.expireMinutes?O=t[25]:(O=r.expireMinutes!==null&&![15,60,1440].includes(r.expireMinutes)&&(0,$.jsxs)(`option`,{value:r.expireMinutes,children:[`Refuse after `,r.expireMinutes,` minutes`]}),t[24]=r.expireMinutes,t[25]=O);let k;t[26]!==x||t[27]!==S||t[28]!==C||t[29]!==O?(k=(0,$.jsxs)(`label`,{className:`flex flex-wrap items-center justify-between gap-2 text-sm`,children:[`Unanswered questions`,(0,$.jsxs)(`select`,{"aria-label":x,className:`rounded border bg-background p-2`,value:S,onChange:C,children:[w,T,E,D,O]})]}),t[26]=x,t[27]=S,t[28]=C,t[29]=O,t[30]=k):k=t[30];let A;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsx)(`span`,{children:`Always ask for these commands (one per line)`}),t[31]=A):A=t[31];let j=`${n}: sensitive commands`,M;t[32]!==o?.source||t[33]!==l?(M=e=>s({source:o?.source??l,text:e.target.value}),t[32]=o?.source,t[33]=l,t[34]=M):M=t[34];let N;t[35]!==d||t[36]!==j||t[37]!==M?(N=(0,$.jsxs)(`label`,{className:`block space-y-1 text-sm`,children:[A,(0,$.jsx)(`textarea`,{"aria-label":j,className:`w-full rounded border bg-background p-2`,value:d,onChange:M})]}),t[35]=d,t[36]=j,t[37]=M,t[38]=N):N=t[38];let P;t[39]!==a||t[40]!==f?(P=f&&(0,$.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-sm`,children:[(0,$.jsx)(`p`,{children:`These commands changed while you were editing. Your draft is kept; reload before saving it.`}),(0,$.jsx)(J,{variant:`outline`,onClick:()=>void a(),children:`Discard drafts and reload`})]}),t[39]=a,t[40]=f,t[41]=P):P=t[41];let F;t[42]!==i||t[43]!==d||t[44]!==r||t[45]!==f?(F=()=>{f||i({...r,sensitive:d.split(`
3
- `).map(pi).filter(Boolean)}).then(()=>s(null)).catch(fi)},t[42]=i,t[43]=d,t[44]=r,t[45]=f,t[46]=F):F=t[46];let I;t[47]!==f||t[48]!==F?(I=(0,$.jsx)(J,{variant:`outline`,disabled:f,onClick:F,children:`Save commands`}),t[47]=f,t[48]=F,t[49]=I):I=t[49];let L;return t[50]!==b||t[51]!==k||t[52]!==N||t[53]!==P||t[54]!==I?(L=(0,$.jsxs)(`fieldset`,{className:`space-y-3 rounded-md border p-3`,children:[p,b,k,N,P,I]}),t[50]=b,t[51]=k,t[52]=N,t[53]=P,t[54]=I,t[55]=L):L=t[55],L}function fi(){}function pi(e){return e.trim()}function mi(){}function hi(){}function gi(e){let t=(0,Z.c)(25),{row:n,fields:r,save:i,cancel:a,stale:o}=e,[s,c]=(0,Q.useState)(n),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={},t[0]=l):l=t[0];let[u,d]=(0,Q.useState)(l),[f,p]=(0,Q.useState)(!1),m;t[1]!==s||t[2]!==u||t[3]!==i||t[4]!==o?(m=e=>{e.preventDefault(),!o&&(p(!0),i(Object.entries(u).reduce(yi,s)).catch(vi).finally(()=>p(!1)))},t[1]=s,t[2]=u,t[3]=i,t[4]=o,t[5]=m):m=t[5];let h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`Secret fields below are references and field names. Keep credential values in Secrets.`}),t[6]=h):h=t[6];let g;if(t[7]!==s||t[8]!==r||t[9]!==u){let e;t[11]!==s||t[12]!==u?(e=e=>{let t=li(s,e.path),n=e.label,r=t=>c(ui(s,e.path,t));return(0,$.jsxs)(`label`,{className:`block space-y-1 text-sm`,children:[(0,$.jsx)(`span`,{children:n}),e.kind===`boolean`?(0,$.jsx)(`input`,{"aria-label":n,type:`checkbox`,checked:t===!0,onChange:e=>r(e.target.checked)}):e.choices?(0,$.jsx)(`select`,{"aria-label":n,className:`block w-full rounded border bg-background p-2`,value:typeof t==`string`?t:``,onChange:e=>r(e.target.value),children:e.choices.map(_i)}):e.kind===`lines`?(0,$.jsx)(`textarea`,{"aria-label":n,className:`block w-full rounded border bg-background p-2`,value:u[e.path]??(Array.isArray(t)?t.join(`
4
- `):``),onChange:t=>d(n=>({...n,[e.path]:t.target.value}))}):(0,$.jsx)(Bt,{"aria-label":n,type:e.kind===`number`?`number`:`text`,value:typeof t==`string`||typeof t==`number`?t:``,onChange:t=>r(t.target.value===``?void 0:e.kind===`number`?Number(t.target.value):t.target.value)})]},e.path)},t[11]=s,t[12]=u,t[13]=e):e=t[13],g=r.map(e),t[7]=s,t[8]=r,t[9]=u,t[10]=g}else g=t[10];let _=f||o,v;t[14]===_?v=t[15]:(v=(0,$.jsx)(J,{type:`submit`,disabled:_,children:`Save`}),t[14]=_,t[15]=v);let y;t[16]===a?y=t[17]:(y=(0,$.jsx)(J,{type:`button`,variant:`ghost`,onClick:a,children:`Cancel`}),t[16]=a,t[17]=y);let b;t[18]!==v||t[19]!==y?(b=(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[v,y]}),t[18]=v,t[19]=y,t[20]=b):b=t[20];let x;return t[21]!==m||t[22]!==g||t[23]!==b?(x=(0,$.jsxs)(`form`,{className:`space-y-3 rounded-md border p-4`,onSubmit:m,children:[h,g,b]}),t[21]=m,t[22]=g,t[23]=b,t[24]=x):x=t[24],x}function _i(e){return(0,$.jsx)(`option`,{value:e,children:e||`None`},e)}function vi(){}function yi(e,t){let[n,r]=t;return ui(e,n,r.split(`
5
- `).map(bi).filter(Boolean))}function bi(e){return e.trim()}function xi(e){let t=(0,Z.c)(65),{policy:n,approvals:r,edit:i,setAbility:a,reload:o}=e,[s,c]=(0,Q.useState)(null),l=s?.network??n.network,u;t[0]!==s?.allow||t[1]!==n.network?(u=s?.allow??n.network.allow.join(`
6
- `),t[0]=s?.allow,t[1]=n.network,t[2]=u):u=t[2];let d=u,f;t[3]===n.network?f=t[4]:(f=JSON.stringify(n.network),t[3]=n.network,t[4]=f);let p=f,m=s!==null&&s.source!==p,h;t[5]!==s?.source||t[6]!==p?(h=(e,t)=>c({source:s?.source??p,network:e,allow:t}),t[5]=s?.source,t[6]=p,t[7]=h):h=t[7];let g=h,[_,v]=(0,Q.useState)(null),y,b;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Network`}),b=(0,$.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`What your moonlet’s machines can reach. Abilities open their own destinations separately.`}),t[8]=y,t[9]=b):(y=t[8],b=t[9]);let x;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(`span`,{children:`Access`}),t[10]=x):x=t[10];let S;t[11]!==d||t[12]!==g||t[13]!==l?(S=e=>{let t=e.target.value;(t===`internet`||t===`allowlist`||t===`open`)&&g({...l,level:t},d)},t[11]=d,t[12]=g,t[13]=l,t[14]=S):S=t[14];let C,w,T;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(`option`,{value:`internet`,children:`Public internet`}),T=(0,$.jsx)(`option`,{value:`allowlist`,children:`Public internet and listed destinations`}),C=(0,$.jsx)(`option`,{value:`open`,children:`Everything the machine can reach`}),t[15]=C,t[16]=w,t[17]=T):(C=t[15],w=t[16],T=t[17]);let E;t[18]!==l.level||t[19]!==S?(E=(0,$.jsxs)(`label`,{className:`block space-y-1 text-sm`,children:[x,(0,$.jsxs)(`select`,{"aria-label":`Network access`,className:`block w-full rounded border bg-background p-2`,value:l.level,onChange:S,children:[w,T,C]})]}),t[18]=l.level,t[19]=S,t[20]=E):E=t[20];let D;t[21]!==d||t[22]!==g||t[23]!==l?(D=l.level===`allowlist`&&(0,$.jsxs)(`label`,{className:`block space-y-1 text-sm`,children:[(0,$.jsx)(`span`,{children:`Allowed private addresses (one per line)`}),(0,$.jsx)(`textarea`,{"aria-label":`Allowed destinations`,className:`w-full rounded border bg-background p-2`,value:d,onChange:e=>g(l,e.target.value)})]}),t[21]=d,t[22]=g,t[23]=l,t[24]=D):D=t[24];let O;t[25]!==m||t[26]!==o?(O=m&&(0,$.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-sm`,children:[(0,$.jsx)(`p`,{children:`Network permissions changed while you were editing. Your draft is kept; reload before saving it.`}),(0,$.jsx)(J,{variant:`outline`,onClick:()=>void o(),children:`Discard drafts and reload`})]}),t[25]=m,t[26]=o,t[27]=O):O=t[27];let k;t[28]!==d||t[29]!==i||t[30]!==l||t[31]!==m?(k=()=>{m||i(`network`,{...l,allow:l.level===`allowlist`?d.split(`
7
- `).map(wi).filter(Boolean):[]}).then(()=>c(null)).catch(Ci)},t[28]=d,t[29]=i,t[30]=l,t[31]=m,t[32]=k):k=t[32];let A;t[33]!==m||t[34]!==k?(A=(0,$.jsx)(J,{variant:`outline`,disabled:m,onClick:k,children:`Save network`}),t[33]=m,t[34]=k,t[35]=A):A=t[35];let j;t[36]!==E||t[37]!==D||t[38]!==O||t[39]!==A?(j=(0,$.jsxs)(`section`,{"aria-label":`Network`,className:`space-y-3`,children:[y,b,(0,$.jsxs)(`div`,{className:`space-y-3 rounded-lg border p-4`,children:[E,D,O,A]})]}),t[36]=E,t[37]=D,t[38]=O,t[39]=A,t[40]=j):j=t[40];let M;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(M=[`capability`,`login`,`secret_use`],t[41]=M):M=t[41];let N;t[42]!==r.capabilities||t[43]!==i||t[44]!==_||t[45]!==n||t[46]!==o||t[47]!==a?(N=M.map(e=>{let t=e===`capability`?`Abilities`:e===`login`?`Sign-ins`:`Secret uses`,s=n[e],c=t=>{let n=t===void 0?`web`:t;return v({source:JSON.stringify(s),section:e,index:s.length,row:e===`capability`?{name:``,kind:`cli`,secret:{item:``,field:``,as:`file:TOKEN_FILE`},read:[],act:[],never:[],default:`act`}:e===`login`?{name:``,item:``,bridge:!1,username:`username`,password:`password`}:{id:``,mode:n,caller:`account:service`,secret:``,purpose:``,expires_at:Math.floor(Date.now()/1e3)+86400,limits:{uses_per_hour:1,concurrent:1,input_bytes:1024,output_bytes:4096,seconds:30},...n===`web`?{host:``,port:443,methods:[`GET`],paths:[`/`],credential:{location:`header`,name:`Authorization`,prefix:`Bearer `}}:{command:``,actions:[]}}})};return(0,$.jsxs)(`section`,{"aria-label":t,className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold`,children:t}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsxs)(J,{variant:`outline`,onClick:()=>c(),children:[`Add`,` `,e===`capability`?`ability`:e===`login`?`sign-in`:`web use`]}),e===`secret_use`&&(0,$.jsx)(J,{variant:`outline`,onClick:()=>c(`runner`),children:`Add program use`})]})]}),(0,$.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:e===`capability`?`Programs that use credentials your moonlet never sees. Refused commands and secret protections apply at every permission level.`:e===`login`?`A stored login for one app or site. Linux and macOS app identities are saved together. Check sign-in health on the machine with orbit-login check; it returns a health result, never a credential.`:`Bounded uses of a secret by a reviewed service. Saving does not bypass the protected service or authorize a separate question.`}),s.length===0&&(0,$.jsx)(`p`,{className:`text-sm text-subtle-foreground`,children:`None configured.`}),s.map((t,n)=>{let c=typeof t.name==`string`?t.name:typeof t.id==`string`?t.id:``,l=r.capabilities.find(e=>e.name===c);return(0,$.jsxs)(`div`,{className:`space-y-3 rounded-lg border p-4`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`flex-1 break-all text-sm font-medium`,children:c}),(0,$.jsxs)(J,{variant:`outline`,onClick:()=>v({source:JSON.stringify(s),section:e,index:n,row:t}),children:[`Edit `,c]}),(0,$.jsxs)(J,{variant:`ghost`,onClick:()=>void i(e,s.filter((e,t)=>t!==n)).catch(Si),children:[`Remove `,c]})]}),e===`login`&&(0,$.jsxs)(`p`,{className:`break-all text-xs text-subtle-foreground`,children:[`Secret item: `,String(t.item??``),` ·`,` `,t.bridge===!0?`Proton Bridge`:`${String(t.url??``)} · Linux: ${String(t.unit??`Not set`)} · macOS: ${String(t.app??`Not set`)}`]}),e===`secret_use`&&(0,$.jsxs)(`p`,{className:`break-all text-xs text-subtle-foreground`,children:[String(t.secret??``),` · `,String(t.purpose??``),` ·`,` `,String(t.caller??``),` · Expires`,` `,new Date(Number(t.expires_at)*1e3).toLocaleString()]}),e!==`secret_use`&&l&&(0,$.jsx)(di,{name:c,settings:l.settings,save:e=>a(c,e),reload:o},c)]},`${e}-${c||n}`)}),_?.section===e&&(0,$.jsxs)(`div`,{className:`space-y-3`,children:[_.source!==JSON.stringify(s)&&(0,$.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-sm`,children:[(0,$.jsx)(`p`,{children:`This list changed while you were editing. Your draft is kept; reload before saving it.`}),(0,$.jsx)(J,{variant:`outline`,onClick:()=>void o(),children:`Discard drafts and reload`})]}),(0,$.jsx)(gi,{row:_.row,stale:_.source!==JSON.stringify(s),fields:e===`capability`?ii:e===`login`?ai:[...oi,..._.row.mode===`runner`?ci:si],cancel:()=>v(null),save:async t=>{_.source===JSON.stringify(s)&&(await i(e,[...s.slice(0,_.index),t,...s.slice(_.index+1)]),v(null))}},`${e}-${_.index}`)]})]},e)}),t[42]=r.capabilities,t[43]=i,t[44]=_,t[45]=n,t[46]=o,t[47]=a,t[48]=N):N=t[48];let P;if(t[49]!==r.capabilities||t[50]!==n.capability||t[51]!==n.login||t[52]!==o||t[53]!==a){let e;t[55]!==n.capability||t[56]!==n.login?(e=e=>!n.capability.some(t=>t.name===e.name)&&!n.login.some(t=>t.name===e.name),t[55]=n.capability,t[56]=n.login,t[57]=e):e=t[57];let i;t[58]!==o||t[59]!==a?(i=e=>(0,$.jsxs)(`section`,{className:`space-y-3`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold`,children:e.name}),(0,$.jsx)(di,{name:e.name,settings:e.settings,save:t=>a(e.name,t),reload:o},e.name)]},e.name),t[58]=o,t[59]=a,t[60]=i):i=t[60],P=r.capabilities.filter(e).map(i),t[49]=r.capabilities,t[50]=n.capability,t[51]=n.login,t[52]=o,t[53]=a,t[54]=P}else P=t[54];let F;return t[61]!==j||t[62]!==N||t[63]!==P?(F=(0,$.jsxs)($.Fragment,{children:[j,N,P]}),t[61]=j,t[62]=N,t[63]=P,t[64]=F):F=t[64],F}function Si(){}function Ci(){}function wi(e){return e.trim()}function Ti(e){let t=(0,Z.c)(32),{recipients:n,relay:r,save:i}=e,[a,o]=(0,Q.useState)(null),s,c,l,u,d,f,p,m,h,g,_;if(t[0]!==a||t[1]!==n||t[2]!==r.hosts||t[3]!==r.targets||t[4]!==i){let e=[...n.map(Mi),...r.targets.map(ji),...r.hosts.map(Ai)],v=a??e,y=(e,t)=>o(v.map((n,r)=>r===e?t:n));m=`Who it can message`,h=`space-y-3`,t[16]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Who it can message`}),_=(0,$.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`Each destination keeps its delivery rules and limits. Ask holds a named message for delivery; for relays and files it opens the original question. An empty list permits no messages. A message never answers an approval.`}),t[16]=g,t[17]=_):(g=t[16],_=t[17]),c=v.length===0&&(0,$.jsx)(`p`,{className:`text-sm text-subtle-foreground`,children:`No recipients.`}),l=v.map((e,t)=>(0,$.jsxs)(`div`,{className:`space-y-2 rounded-lg border p-4`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium`,children:e.transport===`message`?`Named recipient`:e.transport===`relay`?`Relayed conversation`:`File on a machine`}),e.transport===`message`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`label`,{className:`block text-sm`,children:[`Name`,(0,$.jsx)(Bt,{"aria-label":`Recipient name`,value:e.value.name,onChange:n=>y(t,{...e,value:{...e.value,name:n.target.value}})})]}),(0,$.jsxs)(`label`,{className:`block text-sm`,children:[`Destination kind`,(0,$.jsxs)(`select`,{"aria-label":`Recipient kind`,className:`ml-2 rounded border bg-background p-2`,value:e.value.kind,onChange:n=>{let r=n.target.value;(r===`thread`||r===`machine`)&&y(t,{...e,value:{...e.value,kind:r}})},children:[(0,$.jsx)(`option`,{value:`thread`,children:`Conversation`}),(0,$.jsx)(`option`,{value:`machine`,children:`Machine`})]})]}),(0,$.jsxs)(`label`,{className:`block text-sm`,children:[`Conversation or machine ID`,(0,$.jsx)(Bt,{"aria-label":`Recipient target`,value:e.value.target,onChange:n=>y(t,{...e,value:{...e.value,target:n.target.value}})})]}),(0,$.jsxs)(`label`,{className:`block text-sm`,children:[`Label`,(0,$.jsx)(Bt,{"aria-label":`Recipient label`,value:e.value.label,onChange:n=>y(t,{...e,value:{...e.value,label:n.target.value}})})]})]}):e.transport===`relay`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`label`,{className:`block text-sm`,children:[`Conversation ID`,(0,$.jsx)(Bt,{"aria-label":`Relay conversation`,value:e.value.threadId,onChange:n=>y(t,{...e,value:{...e.value,threadId:n.target.value}})})]}),(0,$.jsxs)(`label`,{className:`block text-sm`,children:[`Label`,(0,$.jsx)(Bt,{"aria-label":`Relay label`,value:e.value.label,onChange:n=>y(t,{...e,value:{...e.value,label:n.target.value}})})]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`label`,{className:`block text-sm`,children:[`Machine ID or name`,(0,$.jsx)(Bt,{"aria-label":`Relay machine`,value:e.value.host,onChange:n=>y(t,{...e,value:{...e.value,host:n.target.value}})})]}),(0,$.jsxs)(`label`,{className:`block text-sm`,children:[`Role alias`,(0,$.jsx)(Bt,{"aria-label":`Relay role`,value:e.value.role,onChange:n=>y(t,{...e,value:{...e.value,role:n.target.value}})})]}),(0,$.jsxs)(`label`,{className:`block text-sm`,children:[`Inbox folder`,(0,$.jsx)(Bt,{"aria-label":`Relay folder`,value:e.value.folder,onChange:n=>y(t,{...e,value:{...e.value,folder:n.target.value}})})]})]}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsxs)(`label`,{className:`text-sm`,children:[`Delivery`,(0,$.jsxs)(`select`,{className:`ml-2 rounded border bg-background p-2`,"aria-label":`Recipient delivery`,value:e.value.mode,onChange:n=>{let r=n.target.value;r!==`ask`&&r!==`allow`||(e.transport===`message`?y(t,{transport:`message`,value:{...e.value,mode:r}}):e.transport===`relay`?y(t,{transport:`relay`,value:{...e.value,mode:r}}):y(t,{transport:`file`,value:{...e.value,mode:r}}))},children:[(0,$.jsx)(`option`,{value:`ask`,children:`Ask`}),(0,$.jsx)(`option`,{value:`allow`,children:`Allow`})]})]}),(0,$.jsx)(J,{variant:`ghost`,onClick:()=>o(v.filter((e,n)=>n!==t)),children:`Remove recipient`})]})]},t)),s=`flex flex-wrap gap-2`,u=(0,$.jsx)(J,{variant:`outline`,onClick:()=>o([...v,{transport:`message`,value:{name:``,kind:`thread`,target:``,label:``,mode:`ask`}}]),children:`Add recipient`}),d=(0,$.jsx)(J,{variant:`outline`,onClick:()=>o([...v,{transport:`relay`,value:{threadId:``,label:``,mode:`ask`}}]),children:`Add relay`}),f=(0,$.jsx)(J,{variant:`outline`,onClick:()=>o([...v,{transport:`file`,value:{host:``,role:``,folder:``,mode:`ask`}}]),children:`Add machine inbox`}),p=a&&(0,$.jsxs)($.Fragment,{children:[[`message`,`relay`,`file`].filter(t=>JSON.stringify(v.filter(e=>e.transport===t))!==JSON.stringify(e.filter(e=>e.transport===t))).map(e=>(0,$.jsx)(J,{onClick:()=>void i(v.flatMap(ki),v.flatMap(Oi),v.flatMap(Di),e).catch(Ei),children:e===`message`?`Save named recipients`:e===`relay`?`Save relayed conversations`:`Save machine inboxes`},e)),(0,$.jsx)(J,{variant:`ghost`,onClick:()=>o(null),children:`Discard`})]}),t[0]=a,t[1]=n,t[2]=r.hosts,t[3]=r.targets,t[4]=i,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h,t[14]=g,t[15]=_}else s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14],_=t[15];let v;t[18]!==s||t[19]!==u||t[20]!==d||t[21]!==f||t[22]!==p?(v=(0,$.jsxs)(`div`,{className:s,children:[u,d,f,p]}),t[18]=s,t[19]=u,t[20]=d,t[21]=f,t[22]=p,t[23]=v):v=t[23];let y;return t[24]!==c||t[25]!==l||t[26]!==v||t[27]!==m||t[28]!==h||t[29]!==g||t[30]!==_?(y=(0,$.jsxs)(`section`,{"aria-label":m,className:h,children:[g,_,c,l,v]}),t[24]=c,t[25]=l,t[26]=v,t[27]=m,t[28]=h,t[29]=g,t[30]=_,t[31]=y):y=t[31],y}function Ei(){}function Di(e){return e.transport===`file`?[e.value]:[]}function Oi(e){return e.transport===`relay`?[e.value]:[]}function ki(e){return e.transport===`message`?[e.value]:[]}function Ai(e){return{transport:`file`,value:e}}function ji(e){return{transport:`relay`,value:e}}function Mi(e){return{transport:`message`,value:e}}function Ni(e){let t=URL.createObjectURL(new Blob([e],{type:`application/toml`})),n=document.createElement(`a`);n.href=t,n.download=`policy.toml`,n.click(),setTimeout(()=>URL.revokeObjectURL(t),1e3)}function Pi(){let e=ie.experimental_permissions,[t,n]=(0,Q.useState)(null),[r,i]=(0,Q.useState)(null),[a,o]=(0,Q.useState)(null),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),[d,f]=(0,Q.useState)({}),[p,m]=(0,Q.useState)(null),[h,g]=(0,Q.useState)(0),_=(0,Q.useCallback)(async(t=!1)=>{let[r,i,a,o,s]=await Promise.all([e.policy(),e.approvals(),e.config(),e.recipients(),e.relay()]);n(e=>({policy:t||!e?r:e.policy,latestPolicyBase:r.base,approvals:i,config:a,recipients:o,relay:s}))},[e]);(0,Q.useEffect)(()=>{_().catch(e=>i(e instanceof Error?e.message:String(e)))},[_]),(0,Q.useEffect)(()=>{let e=setInterval(()=>{_().catch(e=>i(e instanceof Error?e.message:String(e)))},5e3);return()=>clearInterval(e)},[_]);let v=async(e,t,n=!1)=>{c(!0),i(null),o(null);try{await e(),await _(n),t&&o(t)}catch(e){throw i(e instanceof Error?e.message:String(e)),e}finally{c(!1)}},y=(e,t,n=!1)=>v(e,t,n).catch(()=>{}),b=()=>y(async()=>{await _(!0),u(null),g(e=>e+1)});if(!t)return(0,$.jsxs)(`section`,{className:`space-y-3`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Permissions`}),r?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-text`,children:r}):(0,$.jsx)(`p`,{role:`status`,className:`text-sm`,children:`Loading permissions…`}),(0,$.jsx)(J,{variant:`outline`,onClick:()=>void y(_),children:`Reload`})]});let x=p??t.config.stations.map(e=>e.name),S=l?.text??t.config.policy.text,C=l!==null&&S!==t.config.policy.text,w=e=>u(n=>({text:e,base:n?.base??t.policy.base}));return(0,$.jsxs)(`div`,{className:`space-y-7`,"aria-label":`Permissions`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{className:`text-xl font-semibold`,children:`Permissions`}),(0,$.jsx)(`p`,{className:`mt-1 text-sm text-subtle-foreground`,children:`What your moonlet may reach, use and do without asking you first.`})]}),r&&(0,$.jsx)(`p`,{role:`alert`,className:`break-words text-sm text-destructive-text`,children:r}),a&&(0,$.jsx)(`p`,{role:`status`,className:`text-sm`,children:a}),t.latestPolicyBase!==t.policy.base&&(0,$.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-sm`,children:[(0,$.jsx)(`p`,{children:`Saved permissions changed elsewhere. Your draft is kept; reload before saving another change.`}),(0,$.jsx)(J,{variant:`outline`,disabled:s,onClick:()=>void b(),children:`Discard drafts and reload`})]}),(0,$.jsxs)(`fieldset`,{disabled:s,className:`space-y-7`,children:[(0,$.jsx)(`div`,{className:`rounded-lg border bg-card p-4 text-sm`,children:`Policy changes reach machines through Review and apply below. Questions, standing permissions and exact-command grants keep their own rules.`}),(0,$.jsx)(xi,{policy:t.policy,approvals:t.approvals,edit:(n,r)=>v(()=>e.edit({base:t.policy.base,section:n,value:r}),`Saved. Review and apply to send this policy to machines.`,!0).then(()=>{}),setAbility:(t,n)=>v(()=>e.setAbility(t,n),`When to ask updated.`),reload:b},h),(0,$.jsxs)(`section`,{"aria-label":`Sign-in health`,className:`space-y-3`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Sign-in health`}),(0,$.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`Checks configured secret item titles through the existing broker, without reading values.`}),t.config.stations.map(t=>(0,$.jsxs)(`div`,{className:`space-y-2 rounded-lg border p-4 text-sm`,children:[(0,$.jsxs)(J,{variant:`outline`,onClick:()=>void y(async()=>{let n=await e.checkSignIns(t.name);f(e=>({...e,[t.name]:n}))}),children:[`Check sign-ins on `,t.name]}),d[t.name]&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`p`,{children:[new Date(d[t.name].at).toLocaleString(),` ·`,` `,d[t.name].code===0?`Check complete`:`Needs attention`]}),(0,$.jsx)(`pre`,{className:`whitespace-pre-wrap break-words text-xs`,children:d[t.name].output})]})]},t.name))]}),(0,$.jsx)(Ti,{recipients:t.recipients,relay:t.relay,save:(t,n,r,i)=>v(async()=>{i===`message`?await e.saveRecipients(t):i===`relay`?await e.saveRelayTargets(n):await e.saveRelayHosts(r)},`Recipients saved.`).then(()=>{})}),(0,$.jsxs)(`section`,{"aria-label":`Standing permissions`,className:`space-y-3`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Standing permissions`}),(0,$.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`Taking one back opens its original protected question. Work already authorized may finish.`}),t.approvals.standing.length===0&&(0,$.jsx)(`p`,{className:`text-sm text-subtle-foreground`,children:`No standing permissions.`}),t.approvals.standing.map(t=>(0,$.jsxs)(`div`,{className:`space-y-2 rounded-lg border p-4 text-sm`,children:[(0,$.jsx)(`p`,{children:t.description}),(0,$.jsxs)(`p`,{className:`text-xs text-subtle-foreground`,children:[t.station,` ·`,` `,t.revoked?`Taken back`:t.expired?`Expired`:t.expiresAt?`Until ${new Date(t.expiresAt).toLocaleString()}`:`No time limit`]}),!t.revoked&&(0,$.jsx)(J,{variant:`outline`,onClick:()=>void y(async()=>{let n=await e.takeBack(t.id);if(n.decision===`deny`)throw Error(n.reason??`The question could not be opened.`)},`The original question is available in your conversation.`),children:`Take this permission back`})]},t.id)),t.approvals.standingSummary&&(0,$.jsx)(`pre`,{className:`whitespace-pre-wrap text-xs`,children:t.approvals.standingSummary})]}),(0,$.jsxs)(`section`,{"aria-label":`Always allowed`,className:`space-y-3`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Always allowed`}),t.approvals.grants.length===0?(0,$.jsx)(`p`,{className:`text-sm text-subtle-foreground`,children:`Nothing yet. Always allow on a question adds that exact command here.`}):t.approvals.grants.map(t=>(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-lg border p-4 text-sm`,children:[(0,$.jsx)(`span`,{children:t.capability}),(0,$.jsx)(`code`,{className:`min-w-0 flex-1 break-all`,children:t.command}),(0,$.jsx)(J,{variant:`outline`,onClick:()=>void y(()=>e.revokeGrant(t.id),`Grant revoked.`),children:`Revoke`})]},t.id))]}),(0,$.jsxs)(`section`,{"aria-label":`Review and apply`,className:`space-y-3`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Review and apply`}),(0,$.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`Uses the existing station deploy on each machine’s managing machine, including the bundle update. The managing machine must be connected. Review shows changes without applying them. Apply retains its deployment approval.`}),(0,$.jsx)(`div`,{className:`flex flex-wrap gap-3`,children:t.config.stations.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:x.includes(e.name),onChange:t=>m(t.target.checked?[...x,e.name]:x.filter(t=>t!==e.name))}),e.name,` (`,e.os,e.connected?``:`, offline`,`)`]},e.name))}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(J,{variant:`outline`,disabled:C||!x.length,onClick:()=>void y(()=>e.apply(x,!0),`Review started.`),children:`Review`}),(0,$.jsx)(J,{disabled:C||!x.length,onClick:()=>void y(()=>e.apply(x,!1),`Application started.`),children:`Apply to machines`})]}),C&&(0,$.jsx)(`p`,{className:`text-sm`,children:`Save or discard your policy draft first.`}),t.config.jobs.map(e=>(0,$.jsxs)(`div`,{className:`space-y-1 text-sm`,children:[(0,$.jsxs)(`p`,{children:[e.station,`: `,e.dryRun?`review `:``,e.status,e.code===null?``:` (exit ${e.code})`]}),e.output&&(0,$.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap rounded border p-3 text-xs`,children:e.output})]},e.station))]}),(0,$.jsxs)(`details`,{className:`space-y-3 rounded-lg border p-4`,children:[(0,$.jsx)(`summary`,{className:`cursor-pointer text-sm font-semibold`,children:`Advanced · Policy file and history`}),(0,$.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`The same permissions in full detail, including tools, builders and deployment settings. Values belong in Secrets; this file holds references.`}),(0,$.jsx)(`textarea`,{"aria-label":`Policy file`,className:`min-h-80 w-full rounded border bg-background p-3 font-mono text-xs`,value:S??t.config.policy.text,onChange:e=>w(e.target.value)}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(J,{disabled:!C,onClick:()=>void y(async()=>{let n=await e.checkPolicy(S??``);if(n.error)throw Error(n.error);await e.savePolicy(S,l?.base??t.policy.base),u(null)},`Saved. Review and apply to send this policy to machines.`,!0),children:`Save policy file`}),(0,$.jsx)(J,{variant:`ghost`,onClick:()=>u(null),children:`Discard draft`}),(0,$.jsx)(J,{variant:`outline`,onClick:()=>Ni(t.config.policy.text),children:`Export`}),(0,$.jsxs)(`label`,{className:`text-sm`,children:[`Import`,(0,$.jsx)(`input`,{"aria-label":`Import policy`,type:`file`,accept:`.toml,text/plain`,onChange:e=>void e.target.files?.[0]?.text().then(w)})]})]}),(0,$.jsx)(`h3`,{className:`text-sm font-medium`,children:`History`}),t.config.history.policy.map(t=>(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 text-xs`,children:[(0,$.jsxs)(`span`,{children:[new Date(t.at).toLocaleString(),` · `,t.by]}),(0,$.jsx)(J,{variant:`ghost`,onClick:()=>void y(async()=>{let n=await e.history(t.id);if(n.name!==`policy`)throw Error(`This history entry is not a policy.`);w(n.text)}),children:`Load into editor`})]},t.id))]})]})]})}var Fi=[`base-schedules`];function Ii(e){return e.queryClient.invalidateQueries({queryKey:Fi})}var Li={completed:`Finished`,dispatched:`Handed over`,dispatching:`Starting`,blocked:`Waiting`,uncertain:`Needs checking`,skipped:`Skipped`};function Ri(){let e=(0,Z.c)(15),t=T(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={queryKey:Fi,queryFn:Bi,refetchInterval:5e3},e[0]=n):n=e[0];let r=l(n),i;e[1]===t?i=e[2]:(i={mutationFn:zi,onSettled:()=>Ii({queryClient:t})},e[1]=t,e[2]=i);let a=E(i);if(r.isPending){let t;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`p`,{children:`Loading schedules…`}),e[3]=t):t=e[3],t}if(r.isError){let t;return e[4]===r.error.message?t=e[5]:(t=(0,$.jsxs)(`p`,{role:`alert`,children:[`Could not load schedules: `,r.error.message]}),e[4]=r.error.message,e[5]=t),t}let o;e[6]!==a.error||e[7]!==a.isError?(o=a.isError&&(0,$.jsx)(`p`,{role:`alert`,children:a.error.message}),e[6]=a.error,e[7]=a.isError,e[8]=o):o=e[8];let s;e[9]!==a||e[10]!==r.data.schedules?(s=r.data.schedules.length===0?(0,$.jsx)(`p`,{children:`Nothing scheduled.`}):(0,$.jsx)(`ul`,{className:`divide-y`,children:r.data.schedules.map(e=>(0,$.jsxs)(`li`,{className:`flex flex-col gap-2 py-4 text-sm`,children:[(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`font-medium`,children:e.title}),(0,$.jsxs)(`p`,{className:`text-muted-foreground`,children:[e.kind,` · `,e.machine??`No machine selected`,` ·`,` `,e.zone]})]}),(0,$.jsx)(J,{size:`sm`,variant:`outline`,disabled:!e.enabled||a.isPending,onClick:()=>a.mutate({id:e.id,expectedRevision:e.revision}),children:e.enabled?`Turn off`:`Off`})]}),(0,$.jsxs)(`p`,{className:`text-muted-foreground`,children:[e.nextRunAt?`Next ${new Date(e.nextRunAt).toLocaleString(void 0,{timeZone:e.zone})}`:e.enabled?`Completed`:`Turned off`,e.cron?` · ${e.cron}`:!e.nextRunAt&&e.onceAt?` · Set for ${new Date(e.onceAt).toLocaleString(void 0,{timeZone:e.zone})}`:``]}),e.lastStatus&&(0,$.jsx)(`p`,{children:e.lastStatus}),e.script!==null&&(0,$.jsxs)(`details`,{children:[(0,$.jsx)(`summary`,{children:`Saved check`}),e.savedFrom&&(0,$.jsxs)(`p`,{className:`break-all text-muted-foreground`,children:[`Saved from `,e.savedFrom]}),(0,$.jsx)(`pre`,{className:`overflow-auto whitespace-pre-wrap break-all`,children:e.script})]}),e.occurrences.length>0&&(0,$.jsxs)(`details`,{children:[(0,$.jsx)(`summary`,{children:`Recent runs`}),(0,$.jsx)(`ul`,{children:e.occurrences.map(t=>(0,$.jsxs)(`li`,{children:[new Date(t.scheduledFor).toLocaleString(void 0,{timeZone:e.zone}),` `,`· `,Li[t.status]??t.status,`: `,t.detail]},t.id))})]})]},e.id))}),e[9]=a,e[10]=r.data.schedules,e[11]=s):s=e[11];let c;return e[12]!==o||e[13]!==s?(c=(0,$.jsxs)(Y,{title:`Schedules`,description:`Reminders, routines, checks and automations, with their machines and saved history.`,children:[o,s]}),e[12]=o,e[13]=s,e[14]=c):c=e[14],c}function zi(e){return ie.experimental_schedules.disable(e)}function Bi(){return ie.experimental_schedules.list()}function Vi(e){let t=(0,Z.c)(35),{value:n,disabled:r,onChange:i}=e,a,o,s,c,l,u,d,f,p,m,h,g;if(t[0]!==r||t[1]!==i||t[2]!==n){let e=[...new Set([...Intl.supportedValuesOf(`timeZone`),`UTC`,...n?[n]:[]])].sort();o=Y,c=`Clock`,a=X,h=`Time zone`,g=`Your clock for reminders, routines and deadlines. Server default follows the server’s time zone.`,s=`Time zone`,l=`h-8 max-w-full rounded-md border border-input bg-background px-2 text-sm`,u=r,d=n??``,t[15]===i?f=t[16]:(f=e=>i(e.target.value||null),t[15]=i,t[16]=f),t[17]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`option`,{value:``,children:`Server default`}),t[17]=p):p=t[17],m=e.map(Hi),t[0]=r,t[1]=i,t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h,t[14]=g}else a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14];let _;t[18]!==s||t[19]!==l||t[20]!==u||t[21]!==d||t[22]!==f||t[23]!==p||t[24]!==m?(_=(0,$.jsxs)(`select`,{"aria-label":s,className:l,disabled:u,value:d,onChange:f,children:[p,m]}),t[18]=s,t[19]=l,t[20]=u,t[21]=d,t[22]=f,t[23]=p,t[24]=m,t[25]=_):_=t[25];let v;t[26]!==a||t[27]!==_||t[28]!==h||t[29]!==g?(v=(0,$.jsx)(a,{label:h,description:g,children:_}),t[26]=a,t[27]=_,t[28]=h,t[29]=g,t[30]=v):v=t[30];let y;return t[31]!==o||t[32]!==c||t[33]!==v?(y=(0,$.jsx)(o,{title:c,children:v}),t[31]=o,t[32]=c,t[33]=v,t[34]=y):y=t[34],y}function Hi(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function Ui(e){let t=(0,Z.c)(7),{platform:n}=e,r=n===`ios`?16:20,i=n===`ios`?16:20,a=n===`ios`?`block -translate-y-px`:`block`,o=n===`ios`?`M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701`:`M18.4395 5.5586c-.675 1.1664-1.352 2.3318-2.0274 3.498-.0366-.0155-.0742-.0286-.1113-.043-1.8249-.6957-3.484-.8-4.42-.787-1.8551.0185-3.3544.4643-4.2597.8203-.084-.1494-1.7526-3.021-2.0215-3.4864a1.1451 1.1451 0 0 0-.1406-.1914c-.3312-.364-.9054-.4859-1.379-.203-.475.282-.7136.9361-.3886 1.5019 1.9466 3.3696-.0966-.2158 1.9473 3.3593.0172.031-.4946.2642-1.3926 1.0177C2.8987 12.176.452 14.772 0 18.9902h24c-.119-1.1108-.3686-2.099-.7461-3.0683-.7438-1.9118-1.8435-3.2928-2.7402-4.1836a12.1048 12.1048 0 0 0-2.1309-1.6875c.6594-1.122 1.312-2.2559 1.9649-3.3848.2077-.3615.1886-.7956-.0079-1.1191a1.1001 1.1001 0 0 0-.8515-.5332c-.5225-.0536-.9392.3128-1.0488.5449zm-.0391 8.461c.3944.5926.324 1.3306-.1563 1.6503-.4799.3197-1.188.0985-1.582-.4941-.3944-.5927-.324-1.3307.1563-1.6504.4727-.315 1.1812-.1086 1.582.4941zM7.207 13.5273c.4803.3197.5506 1.0577.1563 1.6504-.394.5926-1.1038.8138-1.584.4941-.48-.3197-.5503-1.0577-.1563-1.6504.4008-.6021 1.1087-.8106 1.584-.4941z`,s;t[0]===o?s=t[1]:(s=(0,$.jsx)(`path`,{d:o}),t[0]=o,t[1]=s);let c;return t[2]!==r||t[3]!==i||t[4]!==a||t[5]!==s?(c=(0,$.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center`,children:(0,$.jsx)(`svg`,{viewBox:`0 0 24 24`,width:r,height:i,fill:`currentColor`,"aria-hidden":`true`,className:a,children:s})}),t[2]=r,t[3]=i,t[4]=a,t[5]=s,t[6]=c):c=t[6],c}function Wi(){let e=(0,Z.c)(19),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`system`,`mobile-app-releases`],queryFn:Ki,staleTime:3e5,retry:!1},e[0]=t):t=e[0];let n=l(t),r=n.data?.android,i=tt()?.handshake,a=i?.platform===`android`?i:null,o,s;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-base font-semibold`,children:`Mobile apps`}),(0,$.jsx)(`p`,{className:`mt-1 text-sm text-subtle-foreground`,children:`Use Moonlet from your phone`})]}),s=(0,$.jsx)(Hn,{title:`Accessing Moonlet from your phone`,children:Gi}),e[1]=o,e[2]=s):(o=e[1],s=e[2]);let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Ui,{platform:`ios`}),`iOS`]}),e[3]=c):c=e[3];let u;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsxs)(`p`,{className:`text-sm text-subtle-foreground`,children:[`Install`,` `,(0,$.jsx)(`a`,{href:`https://apps.apple.com/app/testflight/id899247664`,target:`_blank`,rel:`noopener noreferrer`,className:`underline underline-offset-2`,children:`TestFlight`}),`, then join the Moonlet beta to install the app on your iPhone.`]}),e[4]=u):u=e[4];let d;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsxs)(Y,{title:c,description:`Available through TestFlight`,bodyClassName:`space-y-4`,children:[u,(0,$.jsx)(`a`,{href:sn.ios,target:`_blank`,rel:`noopener noreferrer`,className:be(),children:`Join iOS TestFlight`})]}),e[5]=d):d=e[5];let f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Ui,{platform:`android`}),`Android`]}),e[6]=f):f=e[6];let p,m;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`p`,{className:`text-sm text-subtle-foreground`,children:`Download the APK and open it on your phone to install. Allow installation from your browser if prompted.`}),m=(0,$.jsx)(`p`,{className:`text-sm text-subtle-foreground`,children:`Google Play access is under review. For now, return here for updates.`}),e[7]=p,e[8]=m):(p=e[7],m=e[8]);let h;e[9]!==r||e[10]!==n.isPending?(h=a&&(0,$.jsxs)(`div`,{className:`space-y-1 text-sm`,children:[(0,$.jsxs)(`p`,{children:[`Installed: `,a.appVersion,a.androidVersionCode!==void 0&&` (build ${a.androidVersionCode})`]}),(0,$.jsx)(`p`,{role:`status`,children:a.androidVersionCode===void 0?`This app does not report its build number. Download the latest APK to check for updates.`:n.isPending?`Checking for updates…`:r?a.androidVersionCode<r.versionCode?`Update available`:a.androidVersionCode===r.versionCode?`You’re up to date`:`You’re running a newer build than the latest published release`:`Unable to check for updates. You can still download the latest APK.`})]}),e[9]=r,e[10]=n.isPending,e[11]=h):h=e[11];let g;e[12]!==r||e[13]!==n.isPending?(g=r?(0,$.jsxs)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm`,children:[(0,$.jsx)(`dt`,{className:`text-subtle-foreground`,children:`Version`}),(0,$.jsxs)(`dd`,{children:[r.version,` (build `,r.versionCode,`)`]}),(0,$.jsx)(`dt`,{className:`text-subtle-foreground`,children:`Updated`}),(0,$.jsx)(`dd`,{children:(0,$.jsx)(`time`,{dateTime:r.updatedAt,children:new Date(r.updatedAt).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`})})}),(0,$.jsx)(`dt`,{className:`text-subtle-foreground`,children:`Download size`}),(0,$.jsxs)(`dd`,{children:[Math.ceil(r.size/1024/1024),` MB`]})]}):(0,$.jsx)(`p`,{className:`text-sm text-subtle-foreground`,role:`status`,children:n.isPending?`Checking the latest release…`:`Release details are unavailable. You can still download the APK.`}),e[12]=r,e[13]=n.isPending,e[14]=g):g=e[14];let _;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(`a`,{href:sn.android,target:`_blank`,rel:`noopener noreferrer`,className:be(),children:`Download Android APK`}),e[15]=_):_=e[15];let v;return e[16]!==g||e[17]!==h?(v=(0,$.jsxs)(`section`,{"aria-label":`Mobile app downloads`,className:`space-y-5`,children:[o,s,(0,$.jsxs)(`div`,{className:`space-y-5`,children:[d,(0,$.jsxs)(Y,{title:f,description:`Direct download for Android phones`,bodyClassName:`space-y-4`,children:[p,m,h,g,_]})]})]}),e[16]=g,e[17]=h,e[18]=v):v=e[18],v}function Gi(e){return(0,$.jsx)(Jn,{pluginId:e})}function Ki(){return ie.system.mobileAppReleases()}var qi=`Tabs`,[Ji,Yi]=x(qi,[g]),Xi=g(),[Zi,Qi]=Ji(qi),$i=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:a,onValueChange:o,defaultValue:s,orientation:c=`horizontal`,dir:l,activationMode:u=`automatic`,...d}=e,f=b(l),[p,m]=i({prop:a,onChange:o,defaultProp:s??``,caller:qi});return(0,$.jsx)(Zi,{scope:n,baseId:r(),value:p,onValueChange:m,orientation:c,dir:f,activationMode:u,children:(0,$.jsx)(y.div,{dir:f,"data-orientation":c,...d,ref:t})})});$i.displayName=qi;var ea=`TabsList`,ta=Q.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=Qi(ea,n),o=Xi(n);return(0,$.jsx)(v,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,$.jsx)(y.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});ta.displayName=ea;var na=`TabsTrigger`,ra=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=Qi(na,n),c=Xi(n),l=oa(s.baseId,r),d=sa(s.baseId,r),f=r===s.value;return(0,$.jsx)(a,{asChild:!0,...c,focusable:!i,active:f,children:(0,$.jsx)(y.button,{type:`button`,role:`tab`,"aria-selected":f,"aria-controls":d,"data-state":f?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:l,...o,ref:t,onMouseDown:u(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?s.onValueChange(r):e.preventDefault()}),onKeyDown:u(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&s.onValueChange(r)}),onFocus:u(e.onFocus,()=>{let e=s.activationMode!==`manual`;!f&&!i&&e&&s.onValueChange(r)})})})});ra.displayName=na;var ia=`TabsContent`,aa=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,c=Qi(ia,n),l=oa(c.baseId,r),u=sa(c.baseId,r),d=r===c.value,f=Q.useRef(d);return Q.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,$.jsx)(s,{present:i||d,children:({present:n})=>(0,$.jsx)(y.div,{"data-state":d?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})});aa.displayName=ia;function oa(e,t){return`${e}-trigger-${t}`}function sa(e,t){return`${e}-content-${t}`}var ca=$i,la=ta,ua=ra,da=aa,fa=ca,pa=Q.forwardRef((e,t)=>{let n=(0,Z.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=q(`inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,$.jsx)(la,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});pa.displayName=la.displayName;var ma=Q.forwardRef((e,t)=>{let n=(0,Z.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=q(`inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-xs`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,$.jsx)(ua,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});ma.displayName=ua.displayName;var ha=Q.forwardRef((e,t)=>{let n=(0,Z.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=q(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,$.jsx)(da,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});ha.displayName=da.displayName;function ga(){Ht(),je(),Pn()}function _a(e){ye(Ce(e)),ue(e.resolvedCodeTheme),Pn()}function va(){let e=(0,Z.c)(4),t=T(),n=(0,Q.useRef)(0),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>()=>{n.current+=1,ga()},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a={prefetchThemes(e){for(let n of e)t.prefetchQuery(Fn(n))},previewTheme(e){n.current+=1;let r=n.current;if(e===null){ga();return}t.fetchQuery(Fn(e)).then(e=>{n.current===r&&_a(e)},ya)}},e[2]=t,e[3]=a),a}function ya(){}function ba(){let e=(0,Z.c)(3),t=T(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={errorMessage:`Could not change provider availability.`},e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={meta:n,mutationFn:xa,onSuccess:e=>et({queryClient:t,catalog:e})},e[1]=t,e[2]=r),E(r)}function xa(e){return ie.providers.setEnabled(e)}function Sa(e){return e===0?`ASAP`:`${e} minutes`}function Ca(e,t){if(t===null||e.length!==t.length||e.some(e=>!t.includes(e.id)))return e;let n=new Map(e.map(e=>[e.id,e]));return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[t]})}function wa(e,t,n){let r=e.indexOf(t),i=e.indexOf(n);return r===-1||i===-1||r===i?null:xr([...e],r,i)}function Ta(e,t,n){let r=Object.fromEntries(Object.entries(e.providerCompletedTurnDisplay).filter(([e])=>e!==t.id));return{providerCompletedTurnDisplay:n===t.completedTurnDisplay?r:{...r,[t.id]:n}}}function Ea(e){let t=(0,Z.c)(2),{provider:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center`,children:(0,$.jsx)(gn,{providerKind:`agent`,provider:n,className:It})}),t[0]=n,t[1]=r),r}function Da(e){let t=(0,Z.c)(20),{provider:n,enabled:r,isDefault:i,disabled:a,onToggle:o,onMakeDefault:s}=e,c=`Actions for ${n.displayName}`,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(H,{name:`MoreHorizontal`}),t[0]=l):l=t[0];let u;t[1]===c?u=t[2]:(u=(0,$.jsx)(Mt,{asChild:!0,children:(0,$.jsx)(J,{variant:`ghost`,size:`icon`,className:`size-8 shrink-0 text-muted-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground`,"aria-label":c,children:l})}),t[1]=c,t[2]=u);let d;t[3]!==a||t[4]!==r||t[5]!==i||t[6]!==s?(d=r?(0,$.jsx)(nn,{checked:i,disabled:a||s===null,onCheckedChange:e=>{e&&s?.()},children:`Default`}):null,t[3]=a,t[4]=r,t[5]=i,t[6]=s,t[7]=d):d=t[7];let f=r?`destructive`:`default`,p=r?`Disable`:`Enable`,m;t[8]!==a||t[9]!==o||t[10]!==f||t[11]!==p?(m=(0,$.jsx)(Jt,{disabled:a,onSelect:o,variant:f,children:p}),t[8]=a,t[9]=o,t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;t[13]!==n.displayName||t[14]!==d||t[15]!==m?(h=(0,$.jsxs)(hn,{align:`end`,mobileTitle:n.displayName,children:[d,m]}),t[13]=n.displayName,t[14]=d,t[15]=m,t[16]=h):h=t[16];let g;return t[17]!==u||t[18]!==h?(g=(0,$.jsxs)(mt,{children:[u,h]}),t[17]=u,t[18]=h,t[19]=g):g=t[19],g}function Oa(e){let t=(0,Z.c)(32),{disabled:n,generalSettings:r,index:i,onGeneralSettingsChange:a,provider:o,onDisable:s}=e,c;t[0]!==n||t[1]!==o.displayName||t[2]!==o.id?(c={id:o.id,disabled:n,label:o.displayName},t[0]=n,t[1]=o.displayName,t[2]=o.id,t[3]=c):c=t[3];let{setNodeRef:l,style:u,isDragging:d,handle:f}=Jr(c),p=r.defaultProviderId===o.id||r.defaultProviderId===null&&i===0,m=d&&`relative z-10 rounded-md bg-card opacity-90 shadow-lift`,h;t[4]===m?h=t[5]:(h=q(`group/provider-row`,m),t[4]=m,t[5]=h);let g;t[6]===o?g=t[7]:(g=(0,$.jsx)(Ea,{provider:o}),t[6]=o,t[7]=g);let _;t[8]===o.displayName?_=t[9]:(_=(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:o.displayName}),t[8]=o.displayName,t[9]=_);let v;t[10]!==p||t[11]!==o.available?(v=o.available?p?(0,$.jsx)(Vn,{children:`Default`}):null:(0,$.jsx)(Vn,{children:`Unavailable`}),t[10]=p,t[11]=o.available,t[12]=v):v=t[12];let y;t[13]!==a||t[14]!==o.available||t[15]!==o.id?(y=o.available?()=>{a({defaultProviderId:o.id})}:null,t[13]=a,t[14]=o.available,t[15]=o.id,t[16]=y):y=t[16];let b;t[17]!==n||t[18]!==p||t[19]!==s||t[20]!==o||t[21]!==y?(b=(0,$.jsx)(Da,{provider:o,enabled:!0,isDefault:p,disabled:n,onToggle:s,onMakeDefault:y}),t[17]=n,t[18]=p,t[19]=s,t[20]=o,t[21]=y,t[22]=b):b=t[22];let x;return t[23]!==f||t[24]!==l||t[25]!==u||t[26]!==h||t[27]!==g||t[28]!==_||t[29]!==v||t[30]!==b?(x=(0,$.jsxs)(Bn,{ref:l,style:u,className:h,children:[f,g,_,v,b]}),t[23]=f,t[24]=l,t[25]=u,t[26]=h,t[27]=g,t[28]=_,t[29]=v,t[30]=b,t[31]=x):x=t[31],x}function ka(e){let t=(0,Z.c)(17),{disabled:n,generalSettings:r,onGeneralSettingsChange:i,provider:a}=e,o=r.providerCompletedTurnDisplay[a.id]??a.completedTurnDisplay,s;t[0]===a?s=t[1]:(s=(0,$.jsx)(Ea,{provider:a}),t[0]=a,t[1]=s);let c;t[2]===a.displayName?c=t[3]:(c=(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:a.displayName}),t[2]=a.displayName,t[3]=c);let l=o===`collapse`,u=`Collapse finished ${a.displayName} turns`,d;t[4]!==r||t[5]!==i||t[6]!==a?(d=e=>i(Ta(r,a,e?`collapse`:`flat`)),t[4]=r,t[5]=i,t[6]=a,t[7]=d):d=t[7];let f;t[8]!==n||t[9]!==l||t[10]!==u||t[11]!==d?(f=(0,$.jsx)(Yn,{checked:l,disabled:n,"aria-label":u,onCheckedChange:d}),t[8]=n,t[9]=l,t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;return t[13]!==s||t[14]!==c||t[15]!==f?(p=(0,$.jsxs)(Bn,{children:[s,c,f]}),t[13]=s,t[14]=c,t[15]=f,t[16]=p):p=t[16],p}function Aa(e){let t=(0,Z.c)(32),{disabled:n,generalSettings:r,onGeneralSettingsChange:i}=e,a=nt(),o=dn(),s=ba(),c=(o.data??[]).filter(Na),l=n||s.isPending,u=a.data??[],[d,f]=(0,Q.useState)(null),p=Ca(u,d),m=p.map(Ma),h=a.isPending?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading providers…`}):p.length===0&&c.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No providers available. Install a provider plugin in Settings → Plugins.`}):(0,$.jsxs)(Yr,{ids:m,disabled:n,onReorder:(e,t)=>{let n=wa(m,e,t);if(n===null)return;f(n);let r;try{r=i({providerOrder:n})}catch{f(null);return}Promise.resolve(r).catch(ja).finally(()=>f(null))},children:[p.map((e,t)=>(0,$.jsx)(Oa,{disabled:l,onDisable:()=>s.mutate({providerId:e.id,enabled:!1}),generalSettings:r,index:t,onGeneralSettingsChange:i,provider:e},e.id)),c.map(e=>(0,$.jsxs)(Bn,{className:`text-muted-foreground`,children:[(0,$.jsx)(`span`,{className:`-ml-2 w-7 shrink-0`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`shrink-0 opacity-60 grayscale`,children:(0,$.jsx)(Ea,{provider:e.info??e})}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.displayName}),(0,$.jsx)(Vn,{children:`Disabled`}),(0,$.jsx)(Da,{provider:e,enabled:!1,isDefault:!1,disabled:l,onToggle:()=>s.mutate({providerId:e.id,enabled:!0}),onMakeDefault:null})]},e.id))]}),g;t[0]===h?g=t[1]:(g=(0,$.jsx)(Y,{title:`Providers`,description:`Choose which agents you use in Moonlet. Drag to reorder them in provider pickers.`,children:h}),t[0]=h,t[1]=g);let _=Y,v;t[2]===i?v=t[3]:(v=e=>i({allowFastServiceTier:e}),t[2]=i,t[3]=v);let y;t[4]!==n||t[5]!==r.allowFastServiceTier||t[6]!==v?(y=(0,$.jsx)(X,{label:`Allow faster service tiers`,description:`Turn this off to use the default service tier for all new turns, including those from queued messages and automations.`,children:(0,$.jsx)(Yn,{checked:r.allowFastServiceTier,disabled:n,onCheckedChange:v,"aria-label":`Allow faster service tiers`})}),t[4]=n,t[5]=r.allowFastServiceTier,t[6]=v,t[7]=y):y=t[7];let b;t[8]===r.idleProviderSessionTimeoutMinutes?b=t[9]:(b=Sa(r.idleProviderSessionTimeoutMinutes),t[8]=r.idleProviderSessionTimeoutMinutes,t[9]=b);let x;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(H,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),t[10]=x):x=t[10];let S;t[11]!==n||t[12]!==b?(S=(0,$.jsx)(Mt,{asChild:!0,children:(0,$.jsxs)(J,{variant:`outline`,size:`sm`,className:qn,disabled:n,"aria-label":`Release idle agent sessions`,children:[b,x]})}),t[11]=n,t[12]=b,t[13]=S):S=t[13];let C;t[14]!==r.idleProviderSessionTimeoutMinutes||t[15]!==i?(C=Ke.map(e=>(0,$.jsxs)(Jt,{onSelect:()=>i({idleProviderSessionTimeoutMinutes:e}),children:[Sa(e),e===re.idleProviderSessionTimeoutMinutes?` (default)`:null,(0,$.jsx)(H,{name:`Check`,className:q(`ml-auto`,e!==r.idleProviderSessionTimeoutMinutes&&`opacity-0`,It)})]},e)),t[14]=r.idleProviderSessionTimeoutMinutes,t[15]=i,t[16]=C):C=t[16];let w;t[17]===C?w=t[18]:(w=(0,$.jsx)(hn,{align:`end`,className:Gn,children:C}),t[17]=C,t[18]=w);let T;t[19]!==w||t[20]!==S?(T=(0,$.jsx)(X,{label:`Release idle agent sessions`,description:`Stop agents that have been idle this long to free memory. Threads keep their history and pick up on your next message. Checked every 5 minutes.`,children:(0,$.jsxs)(mt,{children:[S,w]})}),t[19]=w,t[20]=S,t[21]=T):T=t[21];let E;t[22]!==T||t[23]!==y?(E=(0,$.jsxs)(`div`,{className:`space-y-5`,children:[y,T]}),t[22]=T,t[23]=y,t[24]=E):E=t[24];let D=p.length===0?null:(0,$.jsxs)(`div`,{className:`mt-4 space-y-3 border-t border-border pt-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:`Collapse finished turns`}),(0,$.jsx)(`p`,{className:`mt-0.5 text-xs leading-snug text-subtle-foreground/75`,children:`When a turn finishes, fold its work into one Worked for row and keep the final answer visible. Turn off collapsing to keep every step of a finished turn visible.`})]}),(0,$.jsx)(zn,{children:p.map(e=>(0,$.jsx)(ka,{disabled:n,generalSettings:r,onGeneralSettingsChange:i,provider:e},e.id))})]}),O;t[25]!==_||t[26]!==E||t[27]!==D?(O=(0,$.jsxs)(_,{title:`Configuration`,children:[E,D]}),t[25]=_,t[26]=E,t[27]=D,t[28]=O):O=t[28];let k;return t[29]!==O||t[30]!==g?(k=(0,$.jsxs)($.Fragment,{children:[g,O]}),t[29]=O,t[30]=g,t[31]=k):k=t[31],k}function ja(){}function Ma(e){return e.id}function Na(e){return!e.enabled||!e.pluginEnabled}function Pa(e){let t=(0,Z.c)(26),{label:n,description:r,triggerAriaLabel:i,options:a,selected:o,onSelect:s,disabled:c,children:l}=e,u=c===void 0?!1:c,d;t[0]===o.title?d=t[1]:(d=(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:o.title}),t[0]=o.title,t[1]=d);let f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(H,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),t[2]=f):f=t[2];let p;t[3]!==u||t[4]!==d||t[5]!==i?(p=(0,$.jsx)(Mt,{asChild:!0,children:(0,$.jsxs)(J,{variant:`outline`,size:`sm`,className:`min-w-0 flex-1 justify-between @min-[36rem]/settings:w-40 @min-[36rem]/settings:flex-none`,"aria-label":i,disabled:u,children:[d,f]})}),t[3]=u,t[4]=d,t[5]=i,t[6]=p):p=t[6];let m;if(t[7]!==s||t[8]!==a||t[9]!==o.key){let e;t[11]!==s||t[12]!==o.key?(e=e=>(0,$.jsxs)(Jt,{disabled:e.disabled,onSelect:()=>s(e.key),className:`flex items-start gap-2`,children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,$.jsx)(`span`,{className:`truncate`,children:e.title}),(0,$.jsx)(`span`,{className:`whitespace-normal break-words text-xs text-muted-foreground`,children:e.description})]}),(0,$.jsx)(H,{name:`Check`,className:q(`ml-auto mt-0.5`,o.key!==e.key&&`opacity-0`,It)})]},e.key),t[11]=s,t[12]=o.key,t[13]=e):e=t[13],m=a.map(e),t[7]=s,t[8]=a,t[9]=o.key,t[10]=m}else m=t[10];let h;t[14]===m?h=t[15]:(h=(0,$.jsx)(hn,{align:`end`,className:`w-72`,children:m}),t[14]=m,t[15]=h);let g;t[16]!==p||t[17]!==h?(g=(0,$.jsxs)(mt,{children:[p,h]}),t[16]=p,t[17]=h,t[18]=g):g=t[18];let _;t[19]!==l||t[20]!==g?(_=(0,$.jsxs)(`div`,{className:`flex w-full min-w-0 items-center gap-2 @min-[36rem]/settings:w-auto`,children:[g,l]}),t[19]=l,t[20]=g,t[21]=_):_=t[21];let v;return t[22]!==r||t[23]!==n||t[24]!==_?(v=(0,$.jsx)(X,{label:n,description:r,children:_}),t[22]=r,t[23]=n,t[24]=_,t[25]=v):v=t[25],v}function Fa(e){let t=(0,Z.c)(44),{label:n,description:r,triggerAriaLabel:i,builtInDescription:a,allowAutomatic:o,preferenceAtom:s,slots:c}=e,l=o===void 0?!0:o,[u,d]=p(s),f=N(),m;t[0]===f?m=t[1]:(m=e=>f.has(e.pluginId),t[0]=f,t[1]=m);let h=m,g,_,v,y,b;if(t[2]!==f||t[3]!==h||t[4]!==c){b=Symbol.for(`react.early_return_sentinel`);bb0:{let e=xt(c,f);if(e===void 0){b=null;break bb0}v=vt,y=`Automatic`,g=e.title,_=h(e)?`built-in`:e.pluginId}t[2]=f,t[3]=h,t[4]=c,t[5]=g,t[6]=_,t[7]=v,t[8]=y,t[9]=b}else g=t[5],_=t[6],v=t[7],y=t[8],b=t[9];if(b!==Symbol.for(`react.early_return_sentinel`))return b;let x=`Chooses ${g} (${_}).`,S;t[10]!==v||t[11]!==y||t[12]!==x?(S={key:v,title:y,description:x},t[10]=v,t[11]=y,t[12]=x,t[13]=S):S=t[13];let C=S,w;t[14]===a?w=t[15]:(w=a===void 0?null:{key:Xt,title:`Moonlet (built-in)`,description:a},t[14]=a,t[15]=w);let T=w,E;t[16]===h?E=t[17]:(E=e=>h(e)?{key:Et(e),title:`${e.title} (built-in)`,description:e.description??``}:{key:Et(e),title:e.title,description:e.description===void 0?`From the ${e.pluginId} plugin.`:`${e.pluginId} plugin. ${e.description}`},t[16]=h,t[17]=E);let D=E,O;t[18]!==l||t[19]!==C?(O=l?[C]:[],t[18]=l,t[19]=C,t[20]=O):O=t[20];let k;if(t[21]!==T||t[22]!==h||t[23]!==D||t[24]!==c||t[25]!==O){let e;t[27]===h?e=t[28]:(e=e=>!h(e),t[27]=h,t[28]=e);let n;t[29]===T?n=t[30]:(n=T===null?[]:[T],t[29]=T,t[30]=n),k=[...O,...c.filter(e).map(D),...c.filter(h).map(D),...n],t[21]=T,t[22]=h,t[23]=D,t[24]=c,t[25]=O,t[26]=k}else k=t[26];let A=k,j;t[31]!==l||t[32]!==C||t[33]!==T||t[34]!==A||t[35]!==u?(j=A.find(e=>e.key===u)??T??(l?C:{key:u,title:`Unavailable plugin`}),t[31]=l,t[32]=C,t[33]=T,t[34]=A,t[35]=u,t[36]=j):j=t[36];let M=j,P;return t[37]!==r||t[38]!==n||t[39]!==A||t[40]!==M||t[41]!==d||t[42]!==i?(P=(0,$.jsx)(Pa,{label:n,description:r,triggerAriaLabel:i,options:A,selected:M,onSelect:d}),t[37]=r,t[38]=n,t[39]=A,t[40]=M,t[41]=d,t[42]=i,t[43]=P):P=t[43],P}function Ia(){let e=(0,Z.c)(10),{sourceCodeRenderers:t,diffRenderers:n,composers:r}=Ct(),i;e[0]===t?i=e[1]:(i=(0,$.jsx)(Fa,{label:`Source code`,triggerAriaLabel:`Source code`,description:`Choose automatic activation, Moonlet's viewer, or a specific plugin on this device.`,builtInDescription:`Syntax highlighting and gutters from the Moonlet code theme.`,preferenceAtom:Tr,slots:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,$.jsx)(Fa,{label:`Diffs`,triggerAriaLabel:`Diffs`,description:`Applies to file diffs in threads, the diff panel, and plugin views.`,builtInDescription:`Unified and split diffs from the Moonlet code theme.`,preferenceAtom:Er,slots:n}),e[2]=n,e[3]=a);let o;e[4]===r?o=e[5]:(o=(0,$.jsx)(Fa,{label:`Composer`,triggerAriaLabel:`Composer`,description:`The prompt box in threads, the New thread screen, and message editors.`,preferenceAtom:k,slots:r}),e[4]=r,e[5]=o);let s;return e[6]!==i||e[7]!==a||e[8]!==o?(s=(0,$.jsxs)($.Fragment,{children:[i,a,o]}),e[6]=i,e[7]=a,e[8]=o,e[9]=s):s=e[9],s}function La(){let e=(0,Z.c)(2),{threadLists:t}=Ct(),n;return e[0]===t?n=e[1]:(n=(0,$.jsx)(Fa,{label:`Sidebar thread list`,triggerAriaLabel:`Sidebar thread list`,description:`Which plugin draws your threads in the sidebar.`,preferenceAtom:On,slots:t}),e[0]=t,e[1]=n),n}function Ra(){let e=(0,Z.c)(2),{homes:t}=Ct(),n;return e[0]===t?n=e[1]:(n=(0,$.jsx)(Fa,{label:`Home page`,triggerAriaLabel:`Home page`,description:`Which page opens at home. New thread is always at /new.`,builtInDescription:`Moonlet's new-thread page.`,preferenceAtom:De,slots:t}),e[0]=t,e[1]=n),n}function za(){let e=(0,Z.c)(2),{experimentalSidebarNavigations:t}=Ct(),n;return e[0]===t?n=e[1]:(n=(0,$.jsx)(Fa,{label:`Navigation`,triggerAriaLabel:`Sidebar navigation`,description:`What draws New thread, Plugins, Skills, and plugin pages in the sidebar.`,preferenceAtom:dt,slots:t}),e[0]=t,e[1]=n),n}function Ba(){let e=(0,Z.c)(15),t=kt(),n;e[0]===t?n=e[1]:(n={onDragEnd(e){typeof e.active.id==`string`&&typeof e.over?.id==`string`&&t.move(e.active.id,e.over.id)}},e[0]=t,e[1]=n);let{dndContextProps:r,onClickCapture:i}=Or(n),a;e[2]===t.items?a=e[3]:(a=t.items.map(Va),e[2]=t.items,e[3]=a);let o;e[4]===t?o=e[5]:(o=t.items.map(e=>(0,$.jsx)(Ha,{item:e,visible:t.footer.includes(e),disabled:t.isFull&&!t.footer.includes(e),onVisibleChange:n=>n?t.addToFooter(e.key):t.hideFromFooter(e.key)},e.key)),e[4]=t,e[5]=o);let s;e[6]!==a||e[7]!==o?(s=(0,$.jsx)(wr,{items:a,strategy:Sr,children:o}),e[6]=a,e[7]=o,e[8]=s):s=e[8];let c;e[9]!==r||e[10]!==s?(c=(0,$.jsx)(Cr,{...r,children:s}),e[9]=r,e[10]=s,e[11]=c):c=e[11];let l;return e[12]!==i||e[13]!==c?(l=(0,$.jsx)(X,{label:`Sidebar footer`,description:`Drag to reorder.`,controlPlacement:`below`,children:(0,$.jsx)(`div`,{className:`rounded-md border border-border`,onClickCapture:i,children:c})}),e[12]=i,e[13]=c,e[14]=l):l=e[14],l}function Va(e){return e.key}function Ha({item:e,visible:t,disabled:n,onVisibleChange:r}){let{dragBindings:i,setNodeRef:a,style:o}=Dr({id:e.key,disabled:!1});return(0,$.jsxs)(`div`,{ref:a,style:o,className:`flex items-center gap-2 border-b border-border px-2 py-2 last:border-b-0`,"data-footer-setting":e.key,children:[(0,$.jsx)(J,{variant:`ghost`,size:`icon`,className:`size-7 touch-none text-muted-foreground`,ref:i.setActivatorNodeRef,...i.attributes,...i.listeners,"aria-label":`Reorder ${e.label}`,children:(0,$.jsx)(H,{name:`DragDropVertical`,className:`size-4`})}),(0,$.jsx)(Vt,{item:e}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:e.label}),(0,$.jsx)(Yn,{checked:t,disabled:n,onCheckedChange:r,"aria-label":`Show ${e.label} in footer`})]})}var Ua=`Fade inactive splits`;function Wa(){let e=(0,Z.c)(3),[t,n]=p(fn),r;return e[0]!==t||e[1]!==n?(r=(0,$.jsx)(X,{label:Ua,description:`Fade out splits that do not have focus.`,children:(0,$.jsx)(Yn,{checked:t,onCheckedChange:n,"aria-label":Ua})}),e[0]=t,e[1]=n,e[2]=r):r=e[2],r}var Ga=5e3;function Ka(e){for(let t of document.querySelectorAll(`[data-settings-anchor]`))if(t.dataset.settingsAnchor===e)return t;return null}function qa(e){let t=Ka(e);return t===null?!1:(t.scrollIntoView({block:t.tagName===`SECTION`?`start`:`center`}),br(t),!0)}function Ja(){let e=(0,Z.c)(8),t=d(),n=h(),r;e[0]!==t.state||e[1]!==n?(r=n===`POP`?null:Ln(t.state),e[0]=t.state,e[1]=n,e[2]=r):r=e[2];let i=r,a=t.key,o;e[3]===i?o=e[4]:(o=()=>{if(i===null||qa(i))return;let e=()=>{t.disconnect(),window.clearTimeout(n)},t=new MutationObserver(()=>{qa(i)&&e()}),n=window.setTimeout(e,Ga);return t.observe(document.body,{childList:!0,subtree:!0}),e},e[3]=i,e[4]=o);let s;e[5]!==i||e[6]!==a?(s=[i,a],e[5]=i,e[6]=a,e[7]=s):s=e[7],(0,Q.useEffect)(o,s)}var Ya=`__automatic__`,Xa=`Built-in preview`;function Za(){let e=(0,Z.c)(13),{fileOpeners:t}=Ct(),[n,r]=cr(),i;e[0]===t?i=e[1]:(i=[...new Set(t.flatMap(Qa))].sort(),e[0]=t,e[1]=i);let a=i;if(a.length===0)return null;let o;if(e[2]!==a||e[3]!==t||e[4]!==n||e[5]!==r){let i;e[7]!==t||e[8]!==n||e[9]!==r?(i=e=>(0,$.jsx)($a,{extension:e,openers:t.filter(t=>t.extensions.includes(e)),preference:n[e]??Ya,onSelect:t=>r(n=>{let r={...n};return t===Ya?delete r[e]:r[e]=t,r})},e),e[7]=t,e[8]=n,e[9]=r,e[10]=i):i=e[10],o=a.map(i),e[2]=a,e[3]=t,e[4]=n,e[5]=r,e[6]=o}else o=e[6];let s;return e[11]===o?s=e[12]:(s=(0,$.jsx)(Y,{title:`File openers`,description:`Automatically use matching plugins, or choose a viewer for each file type. Right-click a file link for a one-off choice.`,children:(0,$.jsx)(`div`,{className:`space-y-5`,children:o})}),e[11]=o,e[12]=s),s}function Qa(e){return e.extensions}function $a(e){let t=(0,Z.c)(25),{extension:n,onSelect:r,openers:i,preference:a}=e,o=i[0];if(o===void 0)return null;let s=`Automatic (${o.title})`,c;t[0]===s?c=t[1]:(c={key:Ya,label:s},t[0]=s,t[1]=c);let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l={key:$t,label:Xa},t[2]=l):l=t[2];let u;t[3]!==i||t[4]!==c?(u=[c,l,...i.map(eo)],t[3]=i,t[4]=c,t[5]=u):u=t[5];let d=u,f;t[6]!==d||t[7]!==a?(f=d.find(e=>e.key===a)??d[1],t[6]=d,t[7]=a,t[8]=f):f=t[8];let p=f;if(p===void 0)return null;let m=`.${n} files`,h=`Default opener for .${n} files`,g;t[9]===p.label?g=t[10]:(g=(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:p.label}),t[9]=p.label,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(H,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),t[11]=_):_=t[11];let v;t[12]!==h||t[13]!==g?(v=(0,$.jsx)(Mt,{asChild:!0,children:(0,$.jsxs)(J,{variant:`outline`,size:`sm`,className:qn,"aria-label":h,children:[g,_]})}),t[12]=h,t[13]=g,t[14]=v):v=t[14];let y;t[15]!==r||t[16]!==d||t[17]!==p.key?(y=(0,$.jsx)(hn,{align:`end`,className:Gn,children:d.map(e=>(0,$.jsxs)(Jt,{onSelect:()=>r(e.key),children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label}),(0,$.jsx)(H,{name:`Check`,className:q(`ml-auto`,p.key!==e.key&&`opacity-0`,It)})]},e.key))}),t[15]=r,t[16]=d,t[17]=p.key,t[18]=y):y=t[18];let b;t[19]!==v||t[20]!==y?(b=(0,$.jsxs)(mt,{children:[v,y]}),t[19]=v,t[20]=y,t[21]=b):b=t[21];let x;return t[22]!==b||t[23]!==m?(x=(0,$.jsx)(X,{label:m,children:b}),t[22]=b,t[23]=m,t[24]=x):x=t[24],x}function eo(e){return{key:Lt(e),label:`${e.title} (${e.pluginId})`}}var to=`System default`,no=`Microphone`;function ro({devices:e,isSupported:t,preferredDeviceId:n}){return t?n===null?to:e.find(e=>e.deviceId===n)?.label??to:`Unsupported`}function io({devices:e,errorMessage:t,isLoading:n,isSupported:r,preferredDeviceId:i,onRequestAccess:a}){return r?n?`Loading microphones.`:t===null?e.length===0?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{type:`button`,className:`rounded-sm underline underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,onClick:a,children:`Check microphone access`}),` `,`to see available devices.`]}):i!==null&&e.every(e=>e.deviceId!==i)?`Preferred microphone is disconnected. Using another input until it reconnects.`:`Used for prompt voice input.`:t:`This browser does not expose microphone devices.`}function ao(e){let t=(0,Z.c)(50),{devices:n,errorMessage:r,isLoading:i,isSupported:a,onRefresh:o,preferredDeviceId:s}=e,[c,l]=(0,Q.useState)(!1),u;t[0]!==n||t[1]!==a||t[2]!==s?(u=ro({devices:n,isSupported:a,preferredDeviceId:s}),t[0]=n,t[1]=a,t[2]=s,t[3]=u):u=t[3];let d=u,f=!a||i,p;t[4]===o?p=t[5]:(p=()=>o(!0),t[4]=o,t[5]=p);let m=i?`Loading microphones`:`Load microphones`,h=i&&`animate-spin`,g;t[6]===h?g=t[7]:(g=q(`size-3.5`,h),t[6]=h,t[7]=g);let _;t[8]===g?_=t[9]:(_=(0,$.jsx)(H,{name:`RotateCcw`,className:g}),t[8]=g,t[9]=_);let v;t[10]!==f||t[11]!==p||t[12]!==m||t[13]!==_?(v=(0,$.jsx)(tn,{asChild:!0,children:(0,$.jsx)(J,{variant:`ghost`,size:`icon`,className:`size-7 text-muted-foreground hover:text-foreground`,disabled:f,onClick:p,"aria-label":m,children:_})}),t[10]=f,t[11]=p,t[12]=m,t[13]=_,t[14]=v):v=t[14];let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(wt,{side:`bottom`,children:`Load microphones`}),t[15]=y):y=t[15];let b;t[16]===v?b=t[17]:(b=(0,$.jsxs)(M,{delayDuration:300,disableHoverableContent:!0,children:[v,y]}),t[16]=v,t[17]=b);let x;t[18]===o?x=t[19]:(x=()=>o(!0),t[18]=o,t[19]=x);let S;t[20]!==n||t[21]!==r||t[22]!==i||t[23]!==a||t[24]!==s||t[25]!==x?(S=io({onRequestAccess:x,devices:n,errorMessage:r,isLoading:i,isSupported:a,preferredDeviceId:s}),t[20]=n,t[21]=r,t[22]=i,t[23]=a,t[24]=s,t[25]=x,t[26]=S):S=t[26];let C;t[27]===o?C=t[28]:(C=e=>{l(e),o(!1)},t[27]=o,t[28]=C);let w=!a,T;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(H,{name:`Mic`,className:`size-3.5 shrink-0`}),t[29]=T):T=t[29];let E;t[30]===d?E=t[31]:(E=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[T,(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:d})]}),t[30]=d,t[31]=E);let D;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(H,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),t[32]=D):D=t[32];let O;t[33]!==w||t[34]!==E?(O=(0,$.jsx)(Qe,{asChild:!0,children:(0,$.jsxs)(J,{variant:`outline`,size:`sm`,className:qn,...yr.intentProps,"aria-label":no,disabled:w,children:[E,D]})}),t[33]=w,t[34]=E,t[35]=O):O=t[35];let k;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>l(!1),t[36]=k):k=t[36];let A;t[37]===c?A=t[38]:(A=(0,$.jsx)(vr,{open:c,onClose:k,warning:null,align:`end`,side:`bottom`}),t[37]=c,t[38]=A);let j;t[39]!==c||t[40]!==C||t[41]!==O||t[42]!==A?(j=(0,$.jsxs)(Je,{open:c,onOpenChange:C,children:[O,A]}),t[39]=c,t[40]=C,t[41]=O,t[42]=A,t[43]=j):j=t[43];let N;t[44]!==S||t[45]!==j?(N=(0,$.jsx)(X,{label:no,description:S,children:j}),t[44]=S,t[45]=j,t[46]=N):N=t[46];let P;return t[47]!==b||t[48]!==N?(P=(0,$.jsx)(Y,{title:`Voice Input`,actionPlacement:`inline`,action:b,children:N}),t[47]=b,t[48]=N,t[49]=P):P=t[49],P}function oo(){let e=(0,Z.c)(9),t=fr(),{devices:n,errorMessage:r,isLoading:i,isSupported:a,refresh:o}=dr(),s;e[0]===o?s=e[1]:(s=e=>{o({requestPermission:e})},e[0]=o,e[1]=s);let c;return e[2]!==n||e[3]!==r||e[4]!==i||e[5]!==a||e[6]!==t||e[7]!==s?(c=(0,$.jsx)(ao,{devices:n,errorMessage:r,isLoading:i,isSupported:a,onRefresh:s,preferredDeviceId:t}),e[2]=n,e[3]=r,e[4]=i,e[5]=a,e[6]=t,e[7]=s,e[8]=c):c=e[8],c}var so=`automatic`,co=`off`,lo=[{task:`thread-title`,label:`Thread titles`,hint:`Branch names follow the title.`,offDescription:`Titles use the start of the prompt.`,testTask:`thread-title`},{task:`commit-message`,label:`Commit messages`,hint:`Written when you use the Commit action.`,offDescription:`Commits say “bb: automated commit”.`,testTask:`commit-message`},{task:`voice`,label:`Voice input`,hint:`Transcribes the microphone in the composer.`,offDescription:`Hides the microphone.`,testTask:null}];function uo(e){return`service:${e.pluginId}:${e.id}`}function fo(e){return e.mode===`service`?uo({id:e.serviceId,pluginId:e.pluginId}):e.mode}function po(e,t){return e.services.filter(e=>e.automaticRank!==null&&e.tasks.includes(t)&&e.status.ready).sort((e,t)=>(e.automaticRank??0)-(t.automaticRank??0))[0]??null}function mo(e){return e.status.ready?`From the ${e.pluginId} plugin.`:e.status.message}function ho(e,t){let n=po(e,t.task);return[{key:so,title:`Automatic`,description:n===null?`Nothing Moonlet ships is ready right now.`:`Currently using ${n.displayName}.`},...e.services.filter(e=>e.tasks.includes(t.task)).map(e=>({key:uo(e),title:e.displayName,description:mo(e)})),{key:co,title:`Off`,description:t.offDescription}]}function go(e,t){if(t===so)return{mode:`automatic`};if(t===co)return{mode:`off`};let n=e.services.find(e=>uo(e)===t);return n===void 0?null:{mode:`service`,pluginId:n.pluginId,serviceId:n.id}}function _o(e,t,n){let r=e.selections[t.task],i=``;if(r.mode===`automatic`){let n=po(e,t.task);i=n===null?` Nothing is ready, so Moonlet falls back.`:` Using ${n.displayName}.`}else if(r.mode===`service`){let t=e.services.find(e=>e.id===r.serviceId&&e.pluginId===r.pluginId);i=t===void 0?` The ${r.pluginId} plugin is not loaded.`:t.status.ready?``:` ${t.status.message}`}let a=n===void 0?``:n.ok?` Test: “${n.text}” from ${n.displayName} in ${n.durationMs} ms.`:` Test failed: ${n.message}`;return`${t.hint}${i}${a}`}function vo(){let e=T(),t=$e(),[n,r]=(0,Q.useState)({}),i=E({meta:{showErrorToast:!1},mutationFn:e=>ie.system.setAiServiceSelection(e),onSuccess:t=>{Te(e,t)},onError:e=>{Sn.error(`Changing the AI service failed`,{description:e instanceof Error?e.message:void 0})}}),a=E({meta:{showErrorToast:!1},mutationFn:e=>ie.system.testAiService({task:e}),onSuccess:(e,t)=>{r(n=>({...n,[t]:e}))},onError:(e,t)=>{let n=e instanceof Error&&e.message.trim().length>0?e.message:`The request failed`;r(e=>({...e,[t]:{ok:!1,message:n}}))}}),o=t.data;return(0,$.jsx)(Y,{title:`AI services`,description:`Choose services for thread titles, commit messages, and voice input. Automatic prefers Moonlet cloud, then other available services. A service you choose stays selected.`,children:(0,$.jsx)(`div`,{className:`space-y-5`,children:lo.map(e=>{if(o===void 0)return(0,$.jsx)(Pa,{label:e.label,description:e.hint,triggerAriaLabel:e.label,options:[],selected:{key:so,title:`Loading`},onSelect:()=>void 0,disabled:!0},e.task);let t=ho(o,e),s=fo(o.selections[e.task]),c=t.find(e=>e.key===s)??{key:s,title:`Unavailable plugin`},l=e.testTask;return(0,$.jsx)(Pa,{label:e.label,description:_o(o,e,l===null?void 0:n[l]),triggerAriaLabel:e.label,options:t,selected:c,disabled:i.isPending,onSelect:t=>{let n=go(o,t);n!==null&&(r(e=>{if(l===null)return e;let{[l]:t,...n}=e;return n}),i.mutate({task:e.task,selection:n}))},children:l===null?null:(0,$.jsx)(J,{variant:`ghost`,size:`sm`,"aria-label":`Test ${e.label.toLowerCase()}`,disabled:a.isPending,onClick:()=>a.mutate(l),children:a.isPending&&a.variables===l?`Testing…`:`Test`})},e.task)})})})}var yo=`https://discord.gg/kvBU6tJhcJ`,bo=`https://github.com/get-bb/bb`;function xo(e){let t=(0,Z.c)(16),{description:n,href:r,icon:i,iconClassName:a,label:o,openLabel:s}=e,c;t[0]===r?c=t[1]:(c=()=>{Rt(r)},t[0]=r,t[1]=c);let l;t[2]===a?l=t[3]:(l=q(`size-3.5 shrink-0`,a),t[2]=a,t[3]=l);let u;t[4]!==i||t[5]!==l?(u=(0,$.jsx)(H,{name:i,className:l}),t[4]=i,t[5]=l,t[6]=u):u=t[6];let d;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(H,{name:`ExternalLink`,className:`size-3 shrink-0 text-muted-foreground`}),t[7]=d):d=t[7];let f;t[8]!==s||t[9]!==c||t[10]!==u?(f=(0,$.jsxs)(J,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 gap-1.5 px-2.5 text-xs`,"aria-label":s,onClick:c,children:[u,s,d]}),t[8]=s,t[9]=c,t[10]=u,t[11]=f):f=t[11];let p;return t[12]!==n||t[13]!==o||t[14]!==f?(p=(0,$.jsx)(X,{label:o,description:n,children:f}),t[12]=n,t[13]=o,t[14]=f,t[15]=p):p=t[15],p}function So(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Y,{title:`Community`,description:`Chat with other Moonlet users and follow development on GitHub.`,children:(0,$.jsxs)(`div`,{className:`space-y-5`,children:[(0,$.jsx)(xo,{label:`Discord`,description:`Join the server for support, feedback, and announcements.`,href:yo,icon:`DiscordLogo`,iconClassName:`text-brand-discord`,openLabel:`Join Discord`}),(0,$.jsx)(xo,{label:`GitHub`,description:`Source code, issues, and releases for the Moonlet project.`,href:bo,icon:`GithubLogo`,openLabel:`View on GitHub`})]})}),e[0]=t):t=e[0],t}var Co=!1,wo=new Set;function To(){for(let e of wo)e()}function Eo(e){return wo.add(e),()=>{wo.delete(e)}}function Do(){return Co}function Oo(e){return e instanceof Error&&e.message.length>0?e.message:`The update check did not complete.`}function ko(e){Co||(Co=!0,To(),e().catch(e=>{Sn.error(`Update check failed`,{description:Oo(e)})}).finally(()=>{Co=!1,To()}))}var Ao=`@halcyonlabs/app`,jo=`https://registry.npmjs.org/`;function Mo(e){return`${e.endsWith(`/`)?e:`${e}/`}${Ao.replace(`/`,`%2f`)}`}var No=`https://www.npmjs.com/package/${Ao}?activeTab=versions`,Po=new Intl.DateTimeFormat(`en-US`,{dateStyle:`long`}),Fo=O({time:f(n(),n()),versions:f(n(),O({moonletRelease:O({summary:n().trim().min(1)}).optional().catch(void 0)}))});function Io(e){return Object.entries(e.versions).flatMap(([t,n])=>{let r=Date.parse(e.time[t]??``);return n.moonletRelease===void 0||Number.isNaN(r)?[]:[{publishedAt:r,summary:n.moonletRelease.summary,version:t}]}).sort((e,t)=>t.publishedAt-e.publishedAt)}function Lo(e){let[t,...n]=Io(Fo.parse(e));if(t===void 0)return null;let r=n.slice(0,9);return{date:Po.format(t.publishedAt),headline:t.summary,entry:{version:t.version,lede:[],sections:r.length===0?[]:[{title:`Earlier releases`,blocks:[{kind:`list`,items:r.map(e=>`${e.summary} (${e.version})`)}]}]}}}async function Ro(e,t){let n=await e(Mo(jo),{signal:t});if(!n.ok)throw Error(`Release notes request failed (${n.status})`);return Lo(await n.json())}var zo=5*6e4,Bo=`bb.settings.updates.dismissed-changelog-version`,Vo=2e3,Ho=180;function Uo(e,t){let n=/^\d+(?:\.\d+)*$/;if(!n.test(e)||!n.test(t))return e!==t;let r=e.split(`.`).map(Number),i=t.split(`.`).map(Number),a=Math.max(r.length,i.length);for(let e=0;e<a;e+=1){let t=r[e]??0,n=i[e]??0;if(t!==n)return t>n}return!1}var Wo=1;function Go(e){let t=(0,Z.c)(29),{label:n,tooltipLabel:r,icon:i,iconPosition:a,visibleLabel:o,className:s,variant:c,loading:l,onClick:u}=e,d=a===void 0?`start`:a,f=l===void 0?!1:l;if(o===void 0){let e=c===`default`&&`bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground`,a;t[0]!==s||t[1]!==e?(a=q(`size-7`,e,s),t[0]=s,t[1]=e,t[2]=a):a=t[2];let o;t[3]===u?o=t[4]:(o=()=>u?.(),t[3]=u,t[4]=o);let l;return t[5]!==i||t[6]!==n||t[7]!==f||t[8]!==a||t[9]!==o||t[10]!==r?(l=(0,$.jsx)(Qn,{label:n,tooltipLabel:r,icon:i,loading:f,disabled:f,className:a,onClick:o}),t[5]=i,t[6]=n,t[7]=f,t[8]=a,t[9]=o,t[10]=r,t[11]=l):l=t[11],l}let p=c===void 0||c===`ghost`,m=c??`ghost`,h=p&&`text-subtle-foreground hover:text-foreground`,g;t[12]!==s||t[13]!==h?(g=q(`h-7 gap-1.5 px-2.5 font-normal`,h,s),t[12]=s,t[13]=h,t[14]=g):g=t[14];let _=d===`end`?o:null,v=f?`Spinner`:i,y=f&&`animate-spin`,b;t[15]===y?b=t[16]:(b=q(`size-3.5`,y),t[15]=y,t[16]=b);let x;t[17]!==v||t[18]!==b?(x=(0,$.jsx)(H,{"aria-hidden":!0,name:v,className:b}),t[17]=v,t[18]=b,t[19]=x):x=t[19];let S=d===`start`?o:null,C;return t[20]!==n||t[21]!==f||t[22]!==u||t[23]!==x||t[24]!==S||t[25]!==m||t[26]!==g||t[27]!==_?(C=(0,$.jsxs)(J,{type:`button`,variant:m,size:`sm`,"aria-label":n,"aria-busy":f,className:g,onClick:u,children:[_,x,S]}),t[20]=n,t[21]=f,t[22]=u,t[23]=x,t[24]=S,t[25]=m,t[26]=g,t[27]=_,t[28]=C):C=t[28],C}function Ko(e){let t=(0,Z.c)(8),{leading:n,children:r,actions:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`span`,{className:`flex h-5 w-6 shrink-0 items-center justify-center`,children:n}),t[0]=n,t[1]=a);let o;t[2]!==r||t[3]!==a?(o=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-start gap-3`,children:[a,r]}),t[2]=r,t[3]=a,t[4]=o):o=t[4];let s;return t[5]!==i||t[6]!==o?(s=(0,$.jsxs)(`div`,{className:`@container/update-row grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-start gap-3 px-4 py-3.5 text-sm`,children:[o,i]}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s}function qo(e){let t=(0,Z.c)(6),{current:n,latest:r}=e;if(n===null)return null;let i;t[0]!==n||t[1]!==r?(i=r!==null&&r!==n?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`px-1`,children:`→`}),(0,$.jsx)(`span`,{className:`font-semibold text-version-upgrade`,children:r})]}):null,t[0]=n,t[1]=r,t[2]=i):i=t[2];let a;return t[3]!==n||t[4]!==i?(a=(0,$.jsxs)(`span`,{"data-version-metadata":!0,className:`min-w-0 shrink text-2xs text-muted-foreground`,children:[n,i]}),t[3]=n,t[4]=i,t[5]=a):a=t[5],a}function Jo(e){let t=(0,Z.c)(9),{name:n,detail:r,current:i,latest:a}=e,o;t[0]===n?o=t[1]:(o=(0,$.jsx)(`span`,{className:`w-16 shrink-0 truncate text-sm font-medium text-foreground`,children:n}),t[0]=n,t[1]=o);let s;t[2]!==i||t[3]!==a?(s=i===null?null:(0,$.jsx)(`span`,{className:`min-w-0 basis-full @min-[28rem]/update-row:basis-auto`,children:(0,$.jsx)(qo,{current:i,latest:a})}),t[2]=i,t[3]=a,t[4]=s):s=t[4];let c;return t[5]!==r||t[6]!==o||t[7]!==s?(c=(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1`,children:[o,s,r]}),t[5]=r,t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function Yo(e){return Vr[e].tone===`error`?`font-semibold text-destructive`:`font-semibold text-subtle-foreground`}function Xo(e){let t=(0,Z.c)(5),{state:n,children:r}=e,i;t[0]===n?i=t[1]:(i=q(`min-w-0 text-2xs break-words`,Yo(n)),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,$.jsx)(`span`,{className:i,children:r}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function Zo(e){let t=(0,Z.c)(16),{reason:n,openLabel:r,openTooltip:i,onOpen:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(H,{"aria-hidden":!0,name:`AlertTriangle`,className:`size-3.5`}),t[0]=o):o=t[0];let s=o,c;t[1]!==a||t[2]!==n?(c=a===void 0?null:(0,$.jsx)(`span`,{className:`sr-only`,children:n}),t[1]=a,t[2]=n,t[3]=c):c=t[3];let l;t[4]!==a||t[5]!==r||t[6]!==n?(l=(0,$.jsx)(tn,{asChild:!0,children:a===void 0?(0,$.jsx)(`span`,{role:`img`,"aria-label":n,tabIndex:0,className:`flex size-6 shrink-0 items-center justify-center rounded-sm text-destructive focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:s}):(0,$.jsx)(`button`,{type:`button`,"aria-label":r,className:q(`flex size-6 shrink-0 items-center justify-center rounded-sm text-destructive focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`cursor-pointer hover:bg-state-hover`),onClick:a,children:s})}),t[4]=a,t[5]=r,t[6]=n,t[7]=l):l=t[7];let u=a===void 0?n:i,d;t[8]===u?d=t[9]:(d=(0,$.jsx)(wt,{children:u}),t[8]=u,t[9]=d);let f;t[10]!==l||t[11]!==d?(f=(0,$.jsx)(_n,{delayDuration:250,children:(0,$.jsxs)(M,{children:[l,d]})}),t[10]=l,t[11]=d,t[12]=f):f=t[12];let p;return t[13]!==c||t[14]!==f?(p=(0,$.jsxs)(`span`,{"data-row-action":!0,className:`-my-1 flex shrink-0 items-center self-center`,children:[c,f]}),t[13]=c,t[14]=f,t[15]=p):p=t[15],p}function Qo(e){let t=(0,Z.c)(46),{state:n,actionIcon:r,actionLabel:i,actionTooltip:a,buttonLeading:o,buttonLabel:s,loading:c,live:l,onClick:u}=e,d=c===void 0?!1:c,f=l===void 0?!1:l,p=Vr[n],m=r??p.icon,h=d||p.inFlight===!0,g=p.label,_=p.inFlight!==!0;if(u!==void 0&&s!==void 0){let e;t[0]!==i||t[1]!==g?(e=[g,i].filter(Boolean),t[0]=i,t[1]=g,t[2]=e):e=t[2];let n=e.join(` · `),r;t[3]!==o||t[4]!==d?(r=d?(0,$.jsx)(H,{"aria-hidden":!0,name:`Loading`,className:`size-3 animate-spin`}):o,t[3]=o,t[4]=d,t[5]=r):r=t[5];let a;return t[6]!==s||t[7]!==d||t[8]!==u||t[9]!==n||t[10]!==r?(a=(0,$.jsx)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:(0,$.jsxs)(J,{type:`button`,variant:`outline`,size:`sm`,"aria-label":n,"aria-busy":d,disabled:d,className:`h-6 shrink-0 gap-1.5 px-2 text-xs`,onClick:u,children:[r,s]})}),t[6]=s,t[7]=d,t[8]=u,t[9]=n,t[10]=r,t[11]=a):a=t[11],a}if(u!==void 0&&m!==null){let e;t[12]!==i||t[13]!==g?(e=[g,i].filter(Boolean),t[12]=i,t[13]=g,t[14]=e):e=t[14];let n=e.join(` · `),r=a??i??p.label,o;return t[15]!==m||t[16]!==d||t[17]!==u||t[18]!==n||t[19]!==r?(o=(0,$.jsx)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:(0,$.jsx)(Go,{label:n,tooltipLabel:r,icon:m,loading:d,onClick:u})}),t[15]=m,t[16]=d,t[17]=u,t[18]=n,t[19]=r,t[20]=o):o=t[20],o}if(m===null){let e;return t[21]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`span`,{className:`flex h-7 shrink-0 items-center`}),t[21]=e):e=t[21],e}let v=f?`status`:void 0,y=f?`polite`:void 0,b=h&&`animate-spin`,x=p.tone===`muted`&&(n===`up-to-date`?`text-input`:`text-subtle-foreground`),S=p.tone===`error`&&`text-destructive`,C;t[22]!==b||t[23]!==x||t[24]!==S?(C=q(`size-4`,b,x,S),t[22]=b,t[23]=x,t[24]=S,t[25]=C):C=t[25];let w;t[26]!==m||t[27]!==C?(w=(0,$.jsx)(H,{"aria-hidden":!0,name:m,className:C}),t[26]=m,t[27]=C,t[28]=w):w=t[28];let T;t[29]===g?T=t[30]:(T=(0,$.jsx)(`span`,{className:`sr-only`,children:g}),t[29]=g,t[30]=T);let E;t[31]!==n||t[32]!==T||t[33]!==v||t[34]!==y||t[35]!==w?(E=(0,$.jsxs)(`span`,{role:v,"aria-live":y,"data-update-state":n,className:`flex size-7 shrink-0 items-center justify-center`,children:[w,T]}),t[31]=n,t[32]=T,t[33]=v,t[34]=y,t[35]=w,t[36]=E):E=t[36];let D=E;if(!_){let e;return t[37]===D?e=t[38]:(e=(0,$.jsx)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:D}),t[37]=D,t[38]=e),e}let O;t[39]===D?O=t[40]:(O=(0,$.jsx)(tn,{asChild:!0,children:D}),t[39]=D,t[40]=O);let k;t[41]===p.label?k=t[42]:(k=(0,$.jsx)(wt,{children:p.label}),t[41]=p.label,t[42]=k);let A;return t[43]!==O||t[44]!==k?(A=(0,$.jsx)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:(0,$.jsx)(_n,{delayDuration:250,children:(0,$.jsxs)(M,{children:[O,k]})})}),t[43]=O,t[44]=k,t[45]=A):A=t[45],A}function $o(e){let t=(0,Z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(`span`,{className:`ml-auto flex h-5 shrink-0 items-center justify-end gap-1`,children:n}),t[0]=n,t[1]=r),r}var es={p:({children:e})=>(0,$.jsx)($.Fragment,{children:e}),img:({src:e,alt:t})=>(0,$.jsx)(`img`,{src:e,alt:t,loading:`lazy`,className:`mt-4 h-auto w-full rounded-lg`}),a:({children:e,href:t})=>(0,$.jsx)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`text-foreground underline decoration-border underline-offset-2 hover:decoration-foreground`,onClick:e=>{e.preventDefault(),t!==void 0&&Rt(t)},children:e}),code:({children:e})=>(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-foreground`,children:e}),strong:({children:e})=>(0,$.jsx)(`strong`,{className:`font-semibold text-foreground`,children:e})};function ts(e){let t=(0,Z.c)(2),{text:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(_r,{components:es,skipHtml:!0,children:n}),t[0]=n,t[1]=r),r}function ns({blocks:e,lede:t=!1}){return e.map((e,n)=>e.kind===`list`?(0,$.jsx)(`ul`,{className:`mt-2.5 space-y-1.5`,children:e.items.map(e=>(0,$.jsx)(`li`,{className:`relative pl-4 text-sm leading-normal text-muted-foreground before:absolute before:left-0 before:top-2 before:size-1 before:rounded-sm before:bg-border`,children:(0,$.jsx)(ts,{text:e})},e))},n):(0,$.jsx)(`p`,{className:q(`mt-2.5 text-sm leading-relaxed text-muted-foreground first:mt-0`,t&&`text-foreground/80`),children:(0,$.jsx)(ts,{text:e.text})},n))}function rs(){let e=(0,Z.c)(79),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`updates`,`changelog`,`moonlet-releases`],queryFn:ss,retry:!1,staleTime:zo},e[0]=t):t=e[0];let n=l(t),r=n.data??null,i=r?.entry??null,[a,o]=(0,Q.useState)(os),[s,c]=(0,Q.useState)(null),u=Ut(),d=(0,Q.useRef)(null),[f,p]=(0,Q.useState)(!1),m;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>{e!==null&&p(e.scrollTop+e.clientHeight<e.scrollHeight-1)},e[1]=m):m=e[1];let h=m,g;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{h(d.current)},e[2]=g):g=e[2];let _;e[3]===i?_=e[4]:(_=[i],e[3]=i,e[4]=_),(0,Q.useEffect)(g,_);let v,y;e[5]===s?(v=e[6],y=e[7]):(v=()=>{if(s?.phase!==`confirming`)return;let e=window.setTimeout(()=>{c(e=>e?.version===s.version?{...e,phase:`exiting`}:e)},Vo);return()=>window.clearTimeout(e)},y=[s],e[5]=s,e[6]=v,e[7]=y),(0,Q.useEffect)(v,y);let b,x;if(e[8]!==s||e[9]!==u?(b=()=>{if(s?.phase!==`exiting`)return;let e=s.version,t=window.setTimeout(()=>{o(e),c(t=>t?.version===e?null:t)},u?0:Ho);return()=>window.clearTimeout(t)},x=[s,u],e[8]=s,e[9]=u,e[10]=b,e[11]=x):(b=e[10],x=e[11]),(0,Q.useEffect)(b,x),r===null||i===null||a.length>0&&(n.dataUpdatedAt===0||!Uo(i.version,a)))return null;let S=s?.version===i.version?s.phase:`visible`,C=S===`visible`,w=S===`exiting`?`-mb-6 grid-rows-[0fr] -translate-y-1 opacity-0`:`grid-rows-[1fr] translate-y-0 opacity-100`,T;e[12]===w?T=e[13]:(T=q(`grid transition-[grid-template-rows,margin,opacity,transform] duration-[180ms] ease-[cubic-bezier(0.16,1,0.3,1)] motion-reduce:transition-none [&>section]:min-h-0 [&>section]:overflow-hidden`,w),e[12]=w,e[13]=T);let E=!C,D=C?`grid-rows-[1fr] opacity-100`:`pointer-events-none grid-rows-[0fr] opacity-0`,O;e[14]===D?O=e[15]:(O=q(`grid transition-[grid-template-rows,opacity] duration-[180ms] ease-[cubic-bezier(0.16,1,0.3,1)] motion-reduce:transition-none`,D),e[14]=D,e[15]=O);let k;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(`h2`,{className:`min-w-0`,children:(0,$.jsx)(`span`,{"data-changelog-label":!0,className:`inline-flex rounded-sm border border-border bg-muted/40 px-2.5 py-1 text-xs font-medium leading-none text-muted-foreground`,children:`What's new`})}),e[16]=k):k=e[16];let A;e[17]!==i.version||e[18]!==C?(A=C?(0,$.jsxs)(M,{delayDuration:300,disableHoverableContent:!0,children:[(0,$.jsx)(tn,{asChild:!0,children:(0,$.jsx)(J,{"data-changelog-dismiss":!0,type:`button`,variant:`ghost`,size:`icon`,className:`size-7 text-muted-foreground hover:text-foreground`,"aria-label":`Dismiss Moonlet ${i.version} changelog preview`,onClick:()=>{Nt.setItem(Bo,i.version),c({phase:`confirming`,version:i.version})},children:(0,$.jsx)(H,{"aria-hidden":!0,name:`X`,className:`size-3.5`})})}),(0,$.jsx)(wt,{side:`bottom`,children:`Dismiss`})]}):null,e[17]=i.version,e[18]=C,e[19]=A):A=e[19];let j;e[20]===A?j=e[21]:(j=(0,$.jsxs)(`div`,{"data-changelog-header":!0,className:`flex min-w-0 items-center justify-between gap-4`,children:[k,A]}),e[20]=A,e[21]=j);let N;e[22]===i.version?N=e[23]:(N=(0,$.jsx)(`span`,{"data-changelog-version":i.version,className:`inline-flex rounded-full border border-border bg-muted/30 px-2.5 py-1 font-mono text-xs font-semibold leading-none tracking-tight text-foreground`,children:i.version}),e[22]=i.version,e[23]=N);let P;e[24]===r.date?P=e[25]:(P=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:r.date}),e[24]=r.date,e[25]=P);let F;e[26]!==N||e[27]!==P?(F=(0,$.jsxs)(`div`,{className:`mt-4 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1`,children:[N,P]}),e[26]=N,e[27]=P,e[28]=F):F=e[28];let I;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>h(e.currentTarget),e[29]=I):I=e[29];let L;e[30]===r.headline?L=e[31]:(L=(0,$.jsx)(`h3`,{className:`text-lg font-semibold leading-snug tracking-tight text-foreground`,children:r.headline}),e[30]=r.headline,e[31]=L);let R;e[32]===i.lede?R=e[33]:(R=i.lede.length===0?null:(0,$.jsx)(`div`,{className:`mt-2`,children:(0,$.jsx)(ns,{blocks:i.lede,lede:!0})}),e[32]=i.lede,e[33]=R);let z;e[34]===i.sections?z=e[35]:(z=i.sections.map(as),e[34]=i.sections,e[35]=z);let B;e[36]!==L||e[37]!==R||e[38]!==z?(B=(0,$.jsxs)(`div`,{ref:d,"data-changelog-release-scroll":!0,onScroll:I,className:`max-h-56 overflow-y-auto pr-3`,children:[L,R,z]}),e[36]=L,e[37]=R,e[38]=z,e[39]=B):B=e[39];let V;e[40]===f?V=e[41]:(V=f?(0,$.jsx)(Ue,{placement:`below`,inset:!0}):null,e[40]=f,e[41]=V);let U;e[42]!==B||e[43]!==V?(U=(0,$.jsxs)(`div`,{className:`relative mt-3 min-w-0`,children:[B,V]}),e[42]=B,e[43]=V,e[44]=U):U=e[44];let W;e[45]!==j||e[46]!==F||e[47]!==U?(W=(0,$.jsxs)(`article`,{"data-changelog-preview":!0,className:`min-w-0 p-4 sm:p-5`,children:[j,F,U]}),e[45]=j,e[46]=F,e[47]=U,e[48]=W):W=e[48];let ee=!C,te;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,$.jsx)(H,{"aria-hidden":!0,name:`ExternalLink`,className:`size-3.5`}),e[49]=te):te=e[49];let G;e[50]===ee?G=e[51]:(G=(0,$.jsx)(`div`,{"data-changelog-footer":!0,className:`flex items-center justify-end border-t border-foreground bg-foreground px-4 py-2.5 text-background sm:px-5`,children:(0,$.jsxs)(`button`,{type:`button`,disabled:ee,"aria-label":`Open all Moonlet releases`,onClick:is,className:`inline-flex cursor-pointer items-center gap-1.5 rounded-sm text-xs font-semibold text-background underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-background`,children:[`All releases`,te]})}),e[50]=ee,e[51]=G);let K;e[52]!==W||e[53]!==G?(K=(0,$.jsxs)(`div`,{className:`min-h-0 overflow-hidden`,children:[W,G]}),e[52]=W,e[53]=G,e[54]=K):K=e[54];let ne;e[55]!==E||e[56]!==O||e[57]!==K?(ne=(0,$.jsx)(`div`,{"data-changelog-release-panel":!0,"aria-hidden":E,className:O,children:K}),e[55]=E,e[56]=O,e[57]=K,e[58]=ne):ne=e[58];let re=C?`pointer-events-none grid-rows-[0fr] opacity-0`:`grid-rows-[1fr] opacity-100`,ie;e[59]===re?ie=e[60]:(ie=q(`grid transition-[grid-template-rows,opacity] duration-[180ms] ease-[cubic-bezier(0.16,1,0.3,1)] motion-reduce:transition-none`,re),e[59]=re,e[60]=ie);let ae;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(H,{"aria-hidden":!0,name:`CircleCheck`,className:`size-4 text-muted-foreground`}),e[61]=ae):ae=e[61];let oe;e[62]===i.version?oe=e[63]:(oe=(0,$.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[ae,(0,$.jsx)(`span`,{className:`inline-flex rounded-full border border-border bg-muted/30 px-2.5 py-1 font-mono text-xs font-semibold leading-none tracking-tight text-foreground`,children:i.version})]}),e[62]=i.version,e[63]=oe);let se,ce;e[64]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,$.jsx)(`h3`,{className:`mt-3 text-lg font-semibold leading-snug tracking-tight text-foreground`,children:`You're all caught up`}),ce=(0,$.jsx)(`p`,{className:`mt-1.5 text-sm leading-relaxed text-muted-foreground`,children:`We'll show the next Moonlet release here.`}),e[64]=se,e[65]=ce):(se=e[64],ce=e[65]);let le;e[66]===oe?le=e[67]:(le=(0,$.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:(0,$.jsx)(`div`,{className:`p-4 text-center sm:p-5`,children:(0,$.jsxs)(`div`,{className:`mx-auto max-w-sm`,children:[oe,se,ce]})})}),e[66]=oe,e[67]=le);let ue;e[68]!==C||e[69]!==ie||e[70]!==le?(ue=(0,$.jsx)(`div`,{"data-changelog-dismiss-confirmation":!0,role:`status`,"aria-live":`polite`,"aria-hidden":C,className:ie,children:le}),e[68]=C,e[69]=ie,e[70]=le,e[71]=ue):ue=e[71];let de;e[72]!==ne||e[73]!==ue?(de=(0,$.jsxs)(`section`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:[ne,ue]}),e[72]=ne,e[73]=ue,e[74]=de):de=e[74];let fe;return e[75]!==S||e[76]!==de||e[77]!==T?(fe=(0,$.jsx)(`div`,{"data-updates-domain":`changelog`,"data-changelog-dismiss-phase":S,className:T,children:de}),e[75]=S,e[76]=de,e[77]=T,e[78]=fe):fe=e[78],fe}function is(){return Rt(No)}function as(e){return(0,$.jsxs)(`div`,{className:`mt-4`,children:[(0,$.jsx)(`h4`,{className:`text-sm font-semibold leading-snug text-foreground`,children:e.title}),(0,$.jsx)(ns,{blocks:e.blocks})]},e.title)}function os(){return Nt.getItem(Bo,``)}function ss(e){let{signal:t}=e;return Ro(fetch,t)}function cs(e){let t=(0,Z.c)(93),{name:n,systemVersion:r,appUpdate:i,applyPending:a,desktopInfo:o,isDesktop:s,onApplyAppUpdate:c,onRollbackAppUpdate:l,onRetryAppCheck:u,onRelaunchDesktop:d,onRetryDesktop:f,onShowAppUpdateResult:p,isChecking:m}=e,h=n===void 0?`Server`:n,g=a===void 0?!1:a,_=c===void 0?null:c,v=l===void 0?null:l,y=u===void 0?null:u,b=p===void 0?null:p,x=m===void 0?!1:m,S;t[0]===x?S=t[1]:(S=x?(0,$.jsx)(Qo,{live:!0,state:`in-progress`}):(0,$.jsx)(Qo,{state:`up-to-date`}),t[0]=x,t[1]=S);let C=S,w;t[2]!==x||t[3]!==y?(w=y===null?null:(0,$.jsx)(Qo,{state:`latest-unknown`,buttonLabel:`Retry`,actionLabel:`Retry the release check`,loading:x,onClick:y}),t[2]=x,t[3]=y,t[4]=w):w=t[4];let T=w,E=ls;if(s&&o===null){let e;t[5]===h?e=t[6]:(e=(0,$.jsx)(Jo,{name:h,current:null,latest:null}),t[5]=h,t[6]=e);let n;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(Qo,{live:!0,state:`in-progress`}),t[7]=n):n=t[7];let r;return t[8]===e?r=t[9]:(r=E(e,n),t[8]=e,t[9]=r),r}if(o!==null){let e=o.pendingVersion??o.latestVersion,n=o.updateAvailable?e:null,r;t[10]!==o.version||t[11]!==n||t[12]!==h?(r=(0,$.jsx)(Jo,{name:h,current:o.version,latest:n}),t[10]=o.version,t[11]=n,t[12]=h,t[13]=r):r=t[13];let i=r;if(o.updateDownloaded){let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ht,{className:`size-3`}),t[14]=e):e=t[14];let n;t[15]===d?n=t[16]:(n=(0,$.jsx)(Qo,{state:`restart-required`,buttonLeading:e,buttonLabel:`Relaunch`,actionLabel:`Relaunch Moonlet to finish updating`,onClick:()=>d?.()}),t[15]=d,t[16]=n);let r;return t[17]!==i||t[18]!==n?(r=E(i,n),t[17]=i,t[18]=n,t[19]=r):r=t[19],r}if(o.downloadState===`downloading`){let e;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Qo,{live:!0,state:`in-progress`}),t[20]=e):e=t[20];let n;return t[21]===i?n=t[22]:(n=E(i,e),t[21]=i,t[22]=n),n}if(o.downloadState===`failed`){let e;t[23]===f?e=t[24]:(e=(0,$.jsx)(Qo,{state:`failed`,actionIcon:Hr,actionTooltip:`Retry`,actionLabel:`Retry the download`,onClick:()=>f?.()}),t[23]=f,t[24]=e);let n;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(Zo,{reason:`Download failed`}),t[25]=n):n=t[25];let r;return t[26]!==i||t[27]!==e?(r=E(i,e,n),t[26]=i,t[27]=e,t[28]=r):r=t[28],r}if(o.updateAvailable){let e;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Qo,{state:`update-available`}),t[29]=e):e=t[29];let n;return t[30]===i?n=t[31]:(n=E(i,e),t[30]=i,t[31]=n),n}if(o.latestVersion===null){let e=y??f,n=o.lastCheckedAt===null,r;t[32]!==e||t[33]!==x||t[34]!==C||t[35]!==n?(r=e===null?x?C:null:(0,$.jsx)(Qo,{state:`latest-unknown`,buttonLabel:n?`Check`:`Retry`,actionLabel:n?`Check for desktop releases`:`Retry the desktop release check`,loading:x,onClick:e}),t[32]=e,t[33]=x,t[34]=C,t[35]=n,t[36]=r):r=t[36];let a=x?`Checking for a newer desktop release…`:n?`Desktop updates haven't been checked yet.`:`Couldn't determine the latest desktop release.`,s;return t[37]!==i||t[38]!==r||t[39]!==a?(s=E(i,r,void 0,a),t[37]=i,t[38]=r,t[39]=a,t[40]=s):s=t[40],s}let a;return t[41]!==i||t[42]!==C?(a=E(i,C),t[41]=i,t[42]=C,t[43]=a):a=t[43],a}if(i!==void 0&&(i.support.kind===`supported`||i.desktopUpdateSupported===!0)){let e=r?.installKind??null,n;return t[44]!==i||t[45]!==g||t[46]!==_||t[47]!==v||t[48]!==b||t[49]!==h||t[50]!==C||t[51]!==e||t[52]!==T?(n=(0,$.jsx)(us,{name:h,installKind:e,status:i,applyPending:g,settledStatus:C,unavailableCheckControl:T,row:E,onApply:_,onRollback:v,onShowResult:b}),t[44]=i,t[45]=g,t[46]=_,t[47]=v,t[48]=b,t[49]=h,t[50]=C,t[51]=e,t[52]=T,t[53]=n):n=t[53],n}if(r===void 0){let e;t[54]===h?e=t[55]:(e=(0,$.jsx)(Jo,{name:h,current:null,latest:null}),t[54]=h,t[55]=e);let n;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(Qo,{state:`in-progress`}),t[56]=n):n=t[56];let r;return t[57]===e?r=t[58]:(r=E(e,n),t[57]=e,t[58]=r),r}if(r.installKind===`source`){let e;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`span`,{className:`shrink-0 text-2xs text-muted-foreground`,children:`Source checkout`}),t[59]=e):e=t[59];let n;t[60]!==r.currentCommit||t[61]!==r.currentVersion?(n=r.currentCommit===null?`Build ${r.currentVersion}`:r.currentCommit.slice(0,7),t[60]=r.currentCommit,t[61]=r.currentVersion,t[62]=n):n=t[62];let i;return t[63]!==h||t[64]!==n?(i=E((0,$.jsx)(Jo,{name:h,detail:e,current:n,latest:null}),null),t[63]=h,t[64]=n,t[65]=i):i=t[65],i}let D;t[66]!==i||t[67]!==r.installKind?(D=r.installKind===`desktop`||i!==void 0&&Kt(i),t[66]=i,t[67]=r.installKind,t[68]=D):D=t[68];let O=D,k;t[69]!==O||t[70]!==r.updateAvailable||t[71]!==r.upgradeCommand?(k=r.updateAvailable&&!O?(0,$.jsx)(`span`,{className:`hidden truncate font-mono text-2xs text-muted-foreground sm:inline`,children:r.upgradeCommand}):void 0,t[69]=O,t[70]=r.updateAvailable,t[71]=r.upgradeCommand,t[72]=k):k=t[72];let A=r.updateAvailable?r.latestVersion:null,j;t[73]!==h||t[74]!==r.currentVersion||t[75]!==k||t[76]!==A?(j=(0,$.jsx)(Jo,{name:h,detail:k,current:r.currentVersion,latest:A}),t[73]=h,t[74]=r.currentVersion,t[75]=k,t[76]=A,t[77]=j):j=t[77];let M=j;if(r.updateAvailable){if(O){let e;t[78]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Qo,{state:`update-available`}),t[78]=e):e=t[78];let n;return t[79]===M?n=t[80]:(n=E(M,e),t[79]=M,t[80]=n),n}let e;t[81]===r.upgradeCommand?e=t[82]:(e=(0,$.jsx)(Qo,{state:`update-available`,actionIcon:`Copy`,actionLabel:`Copy the upgrade command`,actionTooltip:`Copy command`,onClick:()=>{de(r.upgradeCommand,{successMessage:`Upgrade command copied`,errorMessage:`Couldn't copy upgrade command`})}}),t[81]=r.upgradeCommand,t[82]=e);let n;return t[83]!==M||t[84]!==e?(n=E(M,e),t[83]=M,t[84]=e,t[85]=n):n=t[85],n}if(r.latestVersion===null){let e=x?`Checking npm for a newer release…`:`Couldn't check npm for a newer release.`,n;return t[86]!==M||t[87]!==e||t[88]!==T?(n=E(M,T,void 0,e),t[86]=M,t[87]=e,t[88]=T,t[89]=n):n=t[89],n}let N;return t[90]!==M||t[91]!==C?(N=E(M,C),t[90]=M,t[91]=C,t[92]=N):N=t[92],N}function ls(e,t,n,r){return(0,$.jsx)(Ko,{leading:(0,$.jsx)(`span`,{"data-bb-update-role":`app`,"aria-hidden":!0,children:(0,$.jsx)(ht,{className:`size-4 -translate-y-px`})}),actions:(0,$.jsx)($o,{children:t}),children:(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-1 @min-[28rem]/update-row:flex-row @min-[28rem]/update-row:items-baseline @min-[28rem]/update-row:gap-2`,children:[e,n]}),r===void 0?null:(0,$.jsx)(`span`,{className:`mt-0.5 text-xs leading-snug text-muted-foreground`,children:r})]})})}function us(e){let t=(0,Z.c)(66),{name:n,status:r,installKind:i,applyPending:a,settledStatus:o,unavailableCheckControl:s,row:c,onApply:l,onRollback:u,onShowResult:d}=e,f=r.available,p;t[0]===i?p=t[1]:(p=i===`source`?(0,$.jsx)(`span`,{className:`shrink-0 text-2xs text-muted-foreground`,children:`Source checkout`}):void 0,t[0]=i,t[1]=p);let m;t[2]===r.current?m=t[3]:(m=ee(r.current),t[2]=r.current,t[3]=m);let h;t[4]===f?h=t[5]:(h=f===null?null:Ae(f),t[4]=f,t[5]=h);let g;t[6]!==n||t[7]!==p||t[8]!==m||t[9]!==h?(g=(0,$.jsx)(Jo,{name:n,detail:p,current:m,latest:h}),t[6]=n,t[7]=p,t[8]=m,t[9]=h,t[10]=g):g=t[10];let _=g,v=r.activity;if(v.phase===`preparing`){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Qo,{live:!0,state:`in-progress`}),t[11]=e):e=t[11];let n;t[12]===v.step?n=t[13]:(n=(0,$.jsx)(Xo,{state:`in-progress`,children:v.step}),t[12]=v.step,t[13]=n);let r;return t[14]!==_||t[15]!==c||t[16]!==n?(r=c(_,e,n),t[14]=_,t[15]=c,t[16]=n,t[17]=r):r=t[17],r}if(v.phase===`restarting`){let e,n;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Qo,{live:!0,state:`in-progress`}),n=(0,$.jsx)(Xo,{state:`in-progress`,children:`Restarting`}),t[18]=e,t[19]=n):(e=t[18],n=t[19]);let r;return t[20]!==_||t[21]!==c?(r=c(_,e,n),t[20]=_,t[21]=c,t[22]=r):r=t[22],r}let y=r.rollback??null,b;t[23]!==u||t[24]!==y?(b=y===null||!y.available||u===null?void 0:(0,$.jsxs)(J,{variant:`link`,size:`sm`,className:`h-auto p-0 text-xs`,onClick:u,children:[`Go back to `,y.version]}),t[23]=u,t[24]=y,t[25]=b):b=t[25];let x=b,S;t[26]===r?S=t[27]:(S=P(r),t[26]=r,t[27]=S);let C=S,w=C!==null&&C.outcome!==`updated`?C:null,T;t[28]!==a||t[29]!==f||t[30]!==w||t[31]!==l||t[32]!==r.blocked?(T=f===null||r.blocked!==null||l===null?null:(0,$.jsx)(Qo,{state:w===null?`update-available`:`failed`,buttonLabel:w===null?`Update`:void 0,actionIcon:w===null?void 0:Hr,actionTooltip:w===null?void 0:`Retry`,actionLabel:`Download the update and restart Moonlet`,loading:a,onClick:l}),t[28]=a,t[29]=f,t[30]=w,t[31]=l,t[32]=r.blocked,t[33]=T):T=t[33];let E=T;if(w!==null){let e;t[34]!==w||t[35]!==d?(e=d===null?void 0:()=>d(w),t[34]=w,t[35]=d,t[36]=e):e=t[36];let n;t[37]===e?n=t[38]:(n=(0,$.jsx)(Zo,{reason:`Last update failed`,openLabel:`View the failed Moonlet update`,openTooltip:`View details`,onOpen:e}),t[37]=e,t[38]=n);let r;return t[39]!==x||t[40]!==_||t[41]!==c||t[42]!==n||t[43]!==E?(r=c(_,E,n,x),t[39]=x,t[40]=_,t[41]=c,t[42]=n,t[43]=E,t[44]=r):r=t[44],r}if(r.blocked!==null){let e=(r.support.kind===`supported`&&r.support.mode===`npm`||r.desktopUpdateSupported===!0)&&r.blocked.reason===`fetch-failed`?s:null,n;t[45]!==x||t[46]!==r.blocked.message?(n=x===void 0?r.blocked.message:(0,$.jsxs)(`span`,{className:`flex flex-col items-start gap-0.5`,children:[(0,$.jsx)(`span`,{children:r.blocked.message}),x]}),t[45]=x,t[46]=r.blocked.message,t[47]=n):n=t[47];let i;return t[48]!==_||t[49]!==c||t[50]!==e||t[51]!==n?(i=c(_,e,void 0,n),t[48]=_,t[49]=c,t[50]=e,t[51]=n,t[52]=i):i=t[52],i}if(E!==null){let e;return t[53]!==x||t[54]!==_||t[55]!==c||t[56]!==E?(e=c(_,E,void 0,x),t[53]=x,t[54]=_,t[55]=c,t[56]=E,t[57]=e):e=t[57],e}let D;t[58]!==f||t[59]!==o?(D=f===null?o:(0,$.jsx)(Qo,{state:`update-available`}),t[58]=f,t[59]=o,t[60]=D):D=t[60];let O;return t[61]!==x||t[62]!==_||t[63]!==c||t[64]!==D?(O=c(_,D,void 0,x),t[61]=x,t[62]=_,t[63]=c,t[64]=D,t[65]=O):O=t[65],O}function ds(e){return e.statusError||e.canRetryDaemonUpdate||e.host.status!==`connected`}function fs(e){return!(e.canRetryDaemonUpdate||e.host.status!==`connected`||e.statusError||e.statusPending||e.providerStatus===null)}function ps(e){return fs(e)?e.issues.filter(ve):[]}function ms(e){return!fs(e)||e.providerStatus===null?[]:ze(e.providerStatus).filter(e=>e.status.installed)}function hs(e,t){let{host:n}=e;return e.canRetryDaemonUpdate?Ge(n,t)?`stalled`:`updating`:En(n)&&!B(n)?`ahead`:n.status===`connected`?null:`offline`}function gs(e,t){let n=hs(e,t);return n!==null&&n!==`offline`||e.statusError||ps(e).length>0}function _s(e,t){let n=new Map(ps(e).map(e=>[e.provider,e]));return ms(e).map(({provider:r,status:i})=>{let a=n.get(r)??null,o=le(e.host.id,r),s=t.failuresByJobKey.get(o)??null;return{provider:r,status:i,issue:a,activity:t.runningJobKey===o?`running`:t.queuedJobKeys.has(o)?`queued`:null,failure:a!==null&&s?.issueFingerprint===a.fingerprint?s:null}})}function vs(e){return e.issue!==null&&fe(e.issue)&&e.activity===null}var ys={brew:`Homebrew`,bun:`Bun`,mise:`mise`,npm:`npm`,pnpm:`pnpm`};function bs(e){let t=e.installAction?.command.trim().split(/\s+/u)[0];if(t===void 0||t.length===0)return null;let n=(t.split(/[\\/]/u).pop()??t).replace(/\.(?:exe|cmd|bat)$/iu,``);return n===e.executableName?`Built-in updater`:ys[n]??n}function xs(e){return e.issue===null?e.status.latestVersion===null?`latest-unknown`:`up-to-date`:e.issue.action===null?`update-manually`:`update-available`}function Ss(e){let t=(0,Z.c)(30),{item:n,providerInfo:r,onToggle:i}=e,a=n.issue?.action===null,o=n.provider,s=n.failure===null?n.activity??void 0:`failed`,c=a?``:void 0,l=a?`bg-card outline-1 -outline-offset-1 outline-subtle-foreground outline-dashed`:`bg-muted`,u;t[0]===l?u=t[1]:(u=q(`relative z-10 -ml-1.5 flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full ring-2 ring-card first:ml-0`,l),t[0]=l,t[1]=u);let d;t[2]!==n.provider||t[3]!==r?(d=r??{id:n.provider},t[2]=n.provider,t[3]=r,t[4]=d):d=t[4];let f=a&&`opacity-60`,p;t[5]===f?p=t[6]:(p=q(`size-3.5`,f),t[5]=f,t[6]=p);let m;t[7]!==d||t[8]!==p?(m=(0,$.jsx)(gn,{providerKind:`agent`,provider:d,className:p}),t[7]=d,t[8]=p,t[9]=m):m=t[9];let h;t[10]===n.activity?h=t[11]:(h=n.activity===`running`?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`absolute -inset-0.5 animate-spin rounded-full border-2 border-transparent border-t-foreground motion-reduce:animate-none`}):null,t[10]=n.activity,t[11]=h);let g;t[12]===n.failure?g=t[13]:(g=n.failure===null?null:(0,$.jsx)(`span`,{"aria-hidden":!0,className:`absolute -right-0.5 -bottom-0.5 size-2 rounded-full bg-destructive ring-2 ring-card`}),t[12]=n.failure,t[13]=g);let _;t[14]!==n.provider||t[15]!==i||t[16]!==h||t[17]!==g||t[18]!==s||t[19]!==c||t[20]!==u||t[21]!==m?(_=(0,$.jsx)(tn,{asChild:!0,children:(0,$.jsxs)(`span`,{"data-provider-avatar":o,"data-provider-activity":s,"data-provider-manual":c,className:u,onClick:i,children:[m,h,g]})}),t[14]=n.provider,t[15]=i,t[16]=h,t[17]=g,t[18]=s,t[19]=c,t[20]=u,t[21]=m,t[22]=_):_=t[22];let v=n.status.currentVersion===null?null:` ${n.status.currentVersion}`,y=n.status.latestVersion===null||n.status.latestVersion===n.status.currentVersion?null:` → ${n.status.latestVersion}`,b;t[23]!==n.status.displayName||t[24]!==v||t[25]!==y?(b=(0,$.jsxs)(wt,{children:[n.status.displayName,v,y]}),t[23]=n.status.displayName,t[24]=v,t[25]=y,t[26]=b):b=t[26];let x;return t[27]!==_||t[28]!==b?(x=(0,$.jsxs)(M,{children:[_,b]}),t[27]=_,t[28]=b,t[29]=x):x=t[29],x}function Cs(e){let t=(0,Z.c)(44),{hostName:n,item:r,providerInfo:i,onStart:a}=e,{status:o,issue:s,failure:c}=r,l;t[0]===r?l=t[1]:(l=xs(r),t[0]=r,t[1]=l);let u=l,d;t[2]!==s||t[3]!==o?(d=s===null?null:bs(o),t[2]=s,t[3]=o,t[4]=d):d=t[4];let f=d,p=c!==null&&vs(r)?r.issue:null,m;t[5]!==r.provider||t[6]!==i?(m=i??{id:r.provider},t[5]=r.provider,t[6]=i,t[7]=m):m=t[7];let h;t[8]===m?h=t[9]:(h=(0,$.jsx)(gn,{providerKind:`agent`,provider:m,className:`size-3.5 text-muted-foreground`}),t[8]=m,t[9]=h);let g;t[10]!==r.provider||t[11]!==h?(g=(0,$.jsx)(`span`,{"data-provider-icon":r.provider,"aria-hidden":!0,className:`flex size-3.5 shrink-0 items-center justify-center`,children:h}),t[10]=r.provider,t[11]=h,t[12]=g):g=t[12];let _;t[13]===o.displayName?_=t[14]:(_=(0,$.jsx)(`span`,{className:`w-28 shrink-0 truncate text-foreground`,children:o.displayName}),t[13]=o.displayName,t[14]=_);let v=s===null?null:o.latestVersion,y;t[15]!==o.currentVersion||t[16]!==v?(y=(0,$.jsx)(qo,{current:o.currentVersion,latest:v}),t[15]=o.currentVersion,t[16]=v,t[17]=y):y=t[17];let b;t[18]!==_||t[19]!==y?(b=(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-0.5`,children:[_,y]}),t[18]=_,t[19]=y,t[20]=b):b=t[20];let x;t[21]!==u||t[22]!==o.installAction||t[23]!==f?(x=u===`update-manually`?(0,$.jsx)(`span`,{className:`text-xs text-subtle-foreground`,children:Vr[`update-manually`].label}):f===null||o.installAction===null?null:(0,$.jsxs)(M,{children:[(0,$.jsx)(tn,{asChild:!0,children:(0,$.jsx)(`span`,{"data-provider-updater":!0,tabIndex:0,className:`rounded-sm text-xs text-subtle-foreground focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none`,children:f})}),(0,$.jsx)(wt,{children:(0,$.jsx)(`code`,{className:`font-mono`,children:o.installAction.command})})]}),t[21]=u,t[22]=o.installAction,t[23]=f,t[24]=x):x=t[24];let S;t[25]!==c||t[26]!==o.displayName?(S=c===null?null:(0,$.jsx)(Zo,{reason:L[c.kind],openLabel:`View ${o.displayName} update log`,openTooltip:`View log`,onOpen:()=>Ze(c.logDialogState)}),t[25]=c,t[26]=o.displayName,t[27]=S):S=t[27];let C;t[28]!==n||t[29]!==r.activity||t[30]!==a||t[31]!==p||t[32]!==u||t[33]!==o.displayName?(C=r.activity===null?p===null?u===`up-to-date`||u===`latest-unknown`?(0,$.jsx)(Qo,{state:u}):null:(0,$.jsx)(Qo,{state:`failed`,actionIcon:Hr,actionLabel:`Retry ${o.displayName} on ${n}`,actionTooltip:`Retry`,onClick:()=>a(p)}):(0,$.jsx)(Qo,{live:!0,state:`in-progress`}),t[28]=n,t[29]=r.activity,t[30]=a,t[31]=p,t[32]=u,t[33]=o.displayName,t[34]=C):C=t[34];let w;t[35]!==x||t[36]!==S||t[37]!==C?(w=(0,$.jsxs)(`span`,{className:`flex shrink-0 items-center justify-end gap-1.5`,children:[x,S,C]}),t[35]=x,t[36]=S,t[37]=C,t[38]=w):w=t[38];let T;return t[39]!==r.provider||t[40]!==w||t[41]!==g||t[42]!==b?(T=(0,$.jsxs)(`div`,{"data-provider-row":r.provider,className:`grid min-h-8 min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto] items-center gap-x-2.5 text-sm`,children:[g,b,w]}),t[39]=r.provider,t[40]=w,t[41]=g,t[42]=b,t[43]=T):T=t[43],T}function ws(e){let t=(0,Z.c)(39),{machine:n,daemon:r,items:i,retryUpdatePending:a,onStartInstall:o,onRetryDaemonUpdate:s,onRecheckClis:c}=e,{host:l}=n;if(r===`updating`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Xo,{state:`in-progress`,children:`Updating Moonlet`}),(0,$.jsx)(Qo,{live:!0,state:`in-progress`})]}),t[0]=e):e=t[0],e}if(r===`stalled`){let e;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Xo,{state:`failed`,children:`Update didn't finish`}),t[1]=e):e=t[1];let n=`Retry on ${l.name} now`,r;t[2]!==l.id||t[3]!==s?(r=()=>s(l.id),t[2]=l.id,t[3]=s,t[4]=r):r=t[4];let i;return t[5]!==a||t[6]!==n||t[7]!==r?(i=(0,$.jsxs)($.Fragment,{children:[e,(0,$.jsx)(Qo,{state:`failed`,actionIcon:Hr,actionTooltip:`Retry`,actionLabel:n,loading:a,onClick:r})]}),t[5]=a,t[6]=n,t[7]=r,t[8]=i):i=t[8],i}if(r===`ahead`){let e;return t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Xo,{state:`offline`,children:`Update this app to reconnect`}),t[9]=e):e=t[9],e}if(r===`offline`){let e;return t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Xo,{state:`offline`,children:`Offline`}),t[10]=e):e=t[10],e}if(n.statusError){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Xo,{state:`failed`,children:`Couldn't check for updates`}),t[11]=e):e=t[11];let r=`Check ${l.name}'s CLIs again`,i;t[12]!==l.id||t[13]!==c?(i=()=>c(l.id),t[12]=l.id,t[13]=c,t[14]=i):i=t[14];let a;return t[15]!==n.statusFetching||t[16]!==r||t[17]!==i?(a=(0,$.jsxs)($.Fragment,{children:[e,(0,$.jsx)(Qo,{state:`failed`,actionIcon:Hr,actionTooltip:`Retry`,actionLabel:r,loading:n.statusFetching,onClick:i})]}),t[15]=n.statusFetching,t[16]=r,t[17]=i,t[18]=a):a=t[18],a}let u;if(t[19]!==l||t[20]!==i||t[21]!==o){u=Symbol.for(`react.early_return_sentinel`);bb0:{let e=i.filter(Es);if(e.length>0){let n=e.filter(vs),r=e.length===1?`${e[0]?.status.displayName} failed`:`${e.length} failed`,i;t[23]===r?i=t[24]:(i=(0,$.jsx)(Xo,{state:`failed`,children:r}),t[23]=r,t[24]=i);let a;t[25]!==l||t[26]!==o||t[27]!==n?(a=n.length===0?null:(0,$.jsx)(Qo,{state:`failed`,actionIcon:Hr,actionTooltip:`Retry`,actionLabel:`Retry failed updates on ${l.name}`,onClick:()=>{for(let e of n)o(l.id,e.issue)}}),t[25]=l,t[26]=o,t[27]=n,t[28]=a):a=t[28];let s;t[29]!==i||t[30]!==a?(s=(0,$.jsxs)($.Fragment,{children:[i,a]}),t[29]=i,t[30]=a,t[31]=s):s=t[31],u=s;break bb0}}t[19]=l,t[20]=i,t[21]=o,t[22]=u}else u=t[22];if(u!==Symbol.for(`react.early_return_sentinel`))return u;let d;t[32]===i?d=t[33]:(d=i.filter(Ts),t[32]=i,t[33]=d);let f=d.length;if(f>0){let e;t[34]===f?e=t[35]:(e=(0,$.jsx)(tn,{asChild:!0,children:(0,$.jsxs)(`span`,{tabIndex:0,className:`rounded-sm text-xs text-subtle-foreground focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none`,children:[f,` manual`]})}),t[34]=f,t[35]=e);let n;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(wt,{children:Vr[`update-manually`].label}),t[36]=n):n=t[36];let r;return t[37]===e?r=t[38]:(r=(0,$.jsxs)(M,{children:[e,n]}),t[37]=e,t[38]=r),r}return null}function Ts(e){return e.issue?.action===null}function Es(e){return e.failure!==null}function Ds(e){let t=(0,Z.c)(67),{machine:n,now:r,tags:i,expanded:a,retryUpdatePending:o,runningJobKey:s,queuedJobKeys:c,failuresByJobKey:l,onToggle:u,onStartInstall:d,onRetryDaemonUpdate:f,onRecheckClis:p}=e,{host:m}=n,h=nt().data,g,_,v,y,b,x,S,C,w,T,E;if(t[0]!==a||t[1]!==l||t[2]!==m.id||t[3]!==m.name||t[4]!==n||t[5]!==r||t[6]!==p||t[7]!==f||t[8]!==d||t[9]!==u||t[10]!==h||t[11]!==c||t[12]!==o||t[13]!==s||t[14]!==i){v=_s(n,{runningJobKey:s,queuedJobKeys:c,failuresByJobKey:l});let e=v.filter(ks);b=v.filter(vs);let D;t[26]!==n||t[27]!==r?(D=hs(n,r),t[26]=n,t[27]=r,t[28]=D):D=t[28];let O=D;_=v.length>0,g=`updates-machine-detail-${m.id}`;let k;t[29]===h?k=t[30]:(k=e=>h?.find(t=>t.id===e),t[29]=h,t[30]=k),y=k,E=m.id;let A=_&&`hover:bg-state-hover`;t[31]===A?w=t[32]:(w=q(`relative grid min-h-12 min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-3 px-4 py-2 text-sm`,A),t[31]=A,t[32]=w);let j;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(`span`,{className:`flex h-5 w-6 shrink-0 items-center justify-center`,children:(0,$.jsx)(H,{"aria-hidden":!0,name:`Laptop`,className:`size-4 text-muted-foreground`})}),t[33]=j):j=t[33];let M;t[34]!==g||t[35]!==_||t[36]!==a||t[37]!==m.name||t[38]!==u?(M=_?(0,$.jsx)(`button`,{type:`button`,"aria-expanded":a,"aria-controls":g,className:`min-w-0 cursor-pointer truncate rounded-sm text-left font-medium text-foreground after:absolute after:inset-0 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none`,onClick:u,children:m.name}):(0,$.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:m.name}),t[34]=g,t[35]=_,t[36]=a,t[37]=m.name,t[38]=u,t[39]=M):M=t[39];let N;t[40]===i?N=t[41]:(N=i.map(Os),t[40]=i,t[41]=N),t[42]!==M||t[43]!==N?(T=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3`,children:[j,(0,$.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[M,N]})]}),t[42]=M,t[43]=N,t[44]=T):T=t[44],x=`relative z-10 flex min-w-0 items-center justify-end gap-2`,S=(0,$.jsx)(ws,{machine:n,daemon:O,items:v,retryUpdatePending:o,onStartInstall:d,onRetryDaemonUpdate:f,onRecheckClis:p}),C=e.length===0?null:(0,$.jsx)(`span`,{"data-provider-pile":!0,className:`flex shrink-0 items-center pl-1`,children:e.map(e=>(0,$.jsx)(Ss,{item:e,providerInfo:y(e.provider),onToggle:u},e.provider))}),t[0]=a,t[1]=l,t[2]=m.id,t[3]=m.name,t[4]=n,t[5]=r,t[6]=p,t[7]=f,t[8]=d,t[9]=u,t[10]=h,t[11]=c,t[12]=o,t[13]=s,t[14]=i,t[15]=g,t[16]=_,t[17]=v,t[18]=y,t[19]=b,t[20]=x,t[21]=S,t[22]=C,t[23]=w,t[24]=T,t[25]=E}else g=t[15],_=t[16],v=t[17],y=t[18],b=t[19],x=t[20],S=t[21],C=t[22],w=t[23],T=t[24],E=t[25];let D;t[45]!==x||t[46]!==S||t[47]!==C?(D=(0,$.jsxs)(`span`,{className:x,children:[S,C]}),t[45]=x,t[46]=S,t[47]=C,t[48]=D):D=t[48];let O;t[49]!==w||t[50]!==T||t[51]!==D?(O=(0,$.jsxs)(`div`,{className:w,children:[T,D]}),t[49]=w,t[50]=T,t[51]=D,t[52]=O):O=t[52];let k;t[53]!==g||t[54]!==_||t[55]!==a||t[56]!==m.id||t[57]!==m.name||t[58]!==v||t[59]!==d||t[60]!==y||t[61]!==b?(k=a&&_?(0,$.jsxs)(`div`,{id:g,"data-updates-machine-detail":!0,className:`border-t border-border-seam bg-muted/25 py-2 pr-4 pl-[3.25rem]`,children:[v.map(e=>(0,$.jsx)(Cs,{hostName:m.name,item:e,providerInfo:y(e.provider),onStart:e=>d(m.id,e)},e.provider)),b.length===0?null:(0,$.jsx)(`div`,{className:`flex justify-end pt-1.5`,children:(0,$.jsxs)(J,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 px-2.5 text-xs`,onClick:()=>{for(let e of b)d(m.id,e.issue)},children:[`Update `,m.name]})})]}):null,t[53]=g,t[54]=_,t[55]=a,t[56]=m.id,t[57]=m.name,t[58]=v,t[59]=d,t[60]=y,t[61]=b,t[62]=k):k=t[62];let A;return t[63]!==E||t[64]!==O||t[65]!==k?(A=(0,$.jsxs)(`div`,{"data-updates-machine":E,children:[O,k]}),t[63]=E,t[64]=O,t[65]=k,t[66]=A):A=t[66],A}function Os(e){return(0,$.jsx)(`span`,{"data-machine-tag":!0,className:`shrink-0 text-xs text-subtle-foreground`,children:e},e)}function ks(e){return e.issue!==null}function As(e){let t=(0,Z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(`section`,{"aria-label":`Moonlet`,"data-updates-domain":`bb`,children:(0,$.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,$.jsx)(`div`,{className:`divide-y divide-border`,children:n})})}),t[0]=n,t[1]=r),r}function js(e){return`${e} machine${e===1?``:`s`}`}function Ms(e){let t=e.filter(e=>e.host.status===`connected`),n=e.length-t.length;return t.some(e=>e.statusPending)?{message:`Checking for updates…`,checking:!0}:t.length===0?{message:e.length===1?`${e[0]?.host.name} is offline.`:`All ${js(e.length)} are offline.`,checking:!1}:{message:`Nothing to update ${e.length===1?`on ${t[0]?.host.name}`:n===0?`on all ${js(t.length)}`:`on ${js(t.length)}`}.${n===0?``:` ${n} offline.`}`,checking:!1}}function Ns(e){let t=(0,Z.c)(36),{machines:n,now:r,localDaemonHostId:i,serverHostId:a,retryPendingHostId:o,runningJobKey:s,queuedJobKeys:c,failuresByJobKey:l,onStartInstall:u,onRetryDaemonUpdate:d,onRetryAllDaemonUpdates:f,onRecheckClis:p}=e,[m,h]=(0,Q.useState)(Ls),[g,_]=(0,Q.useState)(!1),v={runningJobKey:s,queuedJobKeys:c,failuresByJobKey:l},y=(s===null?0:1)+c.size,b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={total:0,remaining:0},t[0]=b):b=t[0];let[x,S]=(0,Q.useState)(b);x.remaining!==y&&S({total:y===0?0:x.remaining===0?y:x.total+Math.max(0,y-x.remaining),remaining:y});let C;t[1]===r?C=t[2]:(C=e=>gs(e,r),t[1]=r,t[2]=C);let w=n.filter(C),T;t[3]===r?T=t[4]:(T=e=>!gs(e,r),t[3]=r,t[4]=T);let E=n.filter(T),D=g?[...w,...E]:w,O=n.flatMap(e=>_s(e,v).filter(vs).map(t=>({hostId:e.host.id,issue:t.issue}))),k;if(t[5]!==n||t[6]!==r){let e;t[8]===r?e=t[9]:(e=e=>hs(e,r)===`stalled`,t[8]=r,t[9]=e),k=n.filter(e).map(Is),t[5]=n,t[6]=r,t[7]=k}else k=t[7];let A=k,j;t[10]!==u||t[11]!==y||t[12]!==O?(j=y===0&&O.length>0?(0,$.jsx)(Go,{label:`Update all ${O.length} CLI tool${O.length===1?``:`s`}`,tooltipLabel:`Update all`,icon:Br,visibleLabel:`Update all`,variant:`default`,onClick:()=>{for(let{hostId:e,issue:t}of O)u(e,t)}}):null,t[10]=u,t[11]=y,t[12]=O,t[13]=j):j=t[13];let M=j,N;t[14]!==x.remaining||t[15]!==x.total||t[16]!==y?(N=y>0?(0,$.jsxs)(`span`,{role:`status`,"data-updates-progress":!0,className:`flex h-7 items-center gap-1.5 text-xs text-subtle-foreground`,children:[(0,$.jsx)(H,{"aria-hidden":!0,name:`Loading`,className:`size-3.5 animate-spin`}),x.total>1&&x.remaining===y?`Updating ${x.total-y+1} of ${x.total}`:`Updating`]}):null,t[14]=x.remaining,t[15]=x.total,t[16]=y,t[17]=N):N=t[17];let P=N,F;t[18]!==f||t[19]!==A?(F=A.length>Wo?(0,$.jsx)(Go,{label:`Update all ${A.length} machines now`,visibleLabel:`Retry all`,icon:`RotateCcw`,iconPosition:`end`,variant:`default`,className:`font-medium`,onClick:()=>f(A)}):null,t[18]=f,t[19]=A,t[20]=F):F=t[20];let I=F,L;t[21]!==P||t[22]!==I||t[23]!==M?(L=I!==null||M!==null||P!==null?(0,$.jsxs)(`div`,{role:`toolbar`,"aria-label":`Bulk update actions`,className:`flex flex-wrap items-center justify-end gap-2`,children:[P,I,M]}):null,t[21]=P,t[22]=I,t[23]=M,t[24]=L):L=t[24];let R=L,z=Ms(E),B=Y,V=n.length===0?(0,$.jsx)(er,{state:`empty`,message:`No machines available.`}):D.length===0?(0,$.jsxs)(`div`,{"data-updates-summary":!0,className:`flex min-h-12 items-center gap-3 px-4 py-2 text-sm text-muted-foreground`,children:[(0,$.jsx)(`span`,{className:`flex h-5 w-6 shrink-0 items-center justify-center`,children:(0,$.jsx)(H,{"aria-hidden":!0,name:z.checking?`Loading`:`CircleCheck`,className:q(`size-4 text-input`,z.checking&&`animate-spin`)})}),z.message]}):(0,$.jsx)(`div`,{className:`divide-y divide-border`,children:D.map(e=>{let t=e.host.id;return(0,$.jsx)(Ds,{machine:e,now:r,tags:[t===a?`Server`:null,n.length>1&&t===i?`This machine`:null].filter(Fs),expanded:m.has(t),retryUpdatePending:o===t,runningJobKey:s,queuedJobKeys:c,failuresByJobKey:l,onToggle:()=>{h(e=>{let n=new Set(e);return n.delete(t)||n.add(t),n})},onStartInstall:u,onRetryDaemonUpdate:d,onRecheckClis:p},t)})}),U;t[25]!==B||t[26]!==R||t[27]!==V?(U=(0,$.jsx)(B,{action:R,actionPlacement:`inline`,bodyClassName:`overflow-hidden p-0`,title:`Provider CLIs`,children:V}),t[25]=B,t[26]=R,t[27]=V,t[28]=U):U=t[28];let W;t[29]!==w||t[30]!==E.length||t[31]!==g?(W=E.length===0?null:(0,$.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 px-1 text-xs text-subtle-foreground`,children:[w.length===0?null:(0,$.jsx)(`span`,{children:E.length===1?`1 other machine has nothing to update`:`${E.length} other machines have nothing to update`}),(0,$.jsx)(`button`,{type:`button`,"aria-expanded":g,className:`cursor-pointer rounded-sm underline decoration-border underline-offset-4 hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none`,onClick:()=>_(Ps),children:g?w.length===0?`Hide machines`:`Hide`:w.length===0?`Show machines`:`Show all`})]}),t[29]=w,t[30]=E.length,t[31]=g,t[32]=W):W=t[32];let ee;return t[33]!==U||t[34]!==W?(ee=(0,$.jsxs)(`div`,{"data-updates-domain":`provider-clis`,className:`space-y-2`,children:[U,W]}),t[33]=U,t[34]=W,t[35]=ee):ee=t[35],ee}function Ps(e){return!e}function Fs(e){return e!==null}function Is(e){return e.host.id}function Ls(){return new Set}function Rs(e){return e===null?!1:e.updateAvailable||e.updateDownloaded||e.downloadState===`downloading`||e.downloadState===`failed`?!0:e.latestVersion===null&&e.lastCheckedAt!==null}function zs(e){let t=(0,Z.c)(3),[n,r]=(0,Q.useState)(Bs),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{let t=setInterval(()=>r(Date.now()),e);return()=>clearInterval(t)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,Q.useEffect)(i,a),n}function Bs(){return Date.now()}function Vs(e){let t=(0,Z.c)(116),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{showChangelogPreview:r}=n,i=r===void 0?!1:r,a=T(),o=An(),{localDaemonHostId:s}=R(),c=ae().data?.primaryHostId??null,{desktopApi:l,desktopInfo:u,isDesktop:d}=Ee(),f=Gr(),p=(0,Q.useSyncExternalStore)(Eo,Do),m=zs(3e4),{failuresByJobKey:h,queuedJobKeys:g,runningJobKey:_,startInstall:v}=In(),y=ne(),b=qt(),x=yn(),[S,C]=(0,Q.useState)(null),[w,E]=(0,Q.useState)(!1),D=y.data,O;t[2]!==D?.runningThreadCount||t[3]!==b?(O=function(){let e=D?.runningThreadCount??0;if(e>0){C(e);return}b.mutate({confirmInterruptingThreads:!1},{onError:e=>{let t=Se(e);t!==null&&C(t)}})},t[2]=D?.runningThreadCount,t[3]=b,t[4]=O):O=t[4];let k=O,A;t[5]===o.machines?A=t[6]:(A=o.machines.filter(Ks).map(Gs),t[5]=o.machines,t[6]=A);let j=A,M;t[7]!==j||t[8]!==l||t[9]!==a?(M=function(){ko(async()=>{let[e,t,n]=await Promise.allSettled([ie.system.version({force:!0}),ie.system.appUpdate({force:!0}),l?.checkForUpdates()]);if(t.status===`fulfilled`&&ot({queryClient:a,status:t.value}),e.status===`rejected`)throw e.reason;if(he({queryClient:a,version:e.value}),n.status===`rejected`)throw n.reason;await Promise.all(j.map(e=>rt({queryClient:a,hostId:e})))})},t[7]=j,t[8]=l,t[9]=a,t[10]=M):M=t[10];let N=M,F=!o.isLoading,I=(0,Q.useRef)(!1),L;t[11]!==N||t[12]!==F?(L=()=>{I.current||!F||(I.current=!0,N())},t[11]=N,t[12]=F,t[13]=L):L=t[13];let z;t[14]===F?z=t[15]:(z=[F],t[14]=F,t[15]=z),(0,Q.useEffect)(L,z);let B;t[16]!==D||t[17]!==u?.updateAvailable||t[18]!==o.appUpdateAvailable||t[19]!==o.systemVersion?.updateAvailable?(B=u?.updateAvailable===!0||o.systemVersion?.updateAvailable===!0||o.appUpdateAvailable||(D?.support.kind===`supported`||D?.desktopUpdateSupported===!0)&&(D.available!==null||D.activity.phase!==`idle`||P(D)!==null),t[16]=D,t[17]=u?.updateAvailable,t[18]=o.appUpdateAvailable,t[19]=o.systemVersion?.updateAvailable,t[20]=B):B=t[20];let V=B,H,U;if(t[21]!==o.machines||t[22]!==m){H=o.machines.filter(ds);let e;t[25]===m?e=t[26]:(e=e=>hs(e,m)===`stalled`,t[25]=m,t[26]=e),U=H.some(e),t[21]=o.machines,t[22]=m,t[23]=H,t[24]=U}else H=t[23],U=t[24];let W=U,ee;t[27]===o.machines?ee=t[28]:(ee=o.machines.some(Ws),t[27]=o.machines,t[28]=ee);let te=ee,G;t[29]!==D||t[30]!==d||t[31]!==s||t[32]!==c?(G=d&&!(D!==void 0&&Kt(D)&&s!==null&&s===c),t[29]=D,t[30]=d,t[31]=s,t[32]=c,t[33]=G):G=t[33];let K=G,re=V||te||W,q=H.length===0,oe=!re&&!q&&d&&u===null,se;t[34]!==l||t[35]!==oe?(se=l===null||oe?null:()=>{l.installUpdate().catch(Us)},t[34]=l,t[35]=oe,t[36]=se):se=t[36];let ce=se,le;t[37]!==l||t[38]!==oe?(le=l===null||oe?null:()=>{l.checkForUpdates().catch(Hs)},t[37]=l,t[38]=oe,t[39]=le):le=t[39];let ue=le,de=K||D?.desktopUpdateSupported===!0,fe=de||u===null?D:void 0,pe=de?null:u,ge=!de&&d,_e;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(_e=()=>E(!0),t[40]=_e):_e=t[40];let ve=de?null:ce,ye=de?null:ue,be;t[41]!==b.isPending||t[42]!==N||t[43]!==o.systemVersion||t[44]!==p||t[45]!==k||t[46]!==fe||t[47]!==pe||t[48]!==ge||t[49]!==ve||t[50]!==ye?(be=(0,$.jsx)(cs,{name:`Server`,systemVersion:o.systemVersion,appUpdate:fe,applyPending:b.isPending,desktopInfo:pe,isDesktop:ge,isChecking:p,onApplyAppUpdate:k,onRollbackAppUpdate:_e,onRetryAppCheck:N,onShowAppUpdateResult:_t,onRelaunchDesktop:ve,onRetryDesktop:ye}),t[41]=b.isPending,t[42]=N,t[43]=o.systemVersion,t[44]=p,t[45]=k,t[46]=fe,t[47]=pe,t[48]=ge,t[49]=ve,t[50]=ye,t[51]=be):be=t[51];let xe=be,Ce;t[52]!==u||t[53]!==N||t[54]!==p||t[55]!==d||t[56]!==ce||t[57]!==ue?(Ce=(0,$.jsx)(cs,{name:`Desktop`,systemVersion:void 0,desktopInfo:u,isDesktop:d,isChecking:p,onRetryAppCheck:N,onRelaunchDesktop:ce,onRetryDesktop:ue}),t[52]=u,t[53]=N,t[54]=p,t[55]=d,t[56]=ce,t[57]=ue,t[58]=Ce):Ce=t[58];let we=Ce,Te;t[59]!==o.machines||t[60]!==f?(Te=function(e){f.mutate(e,{onSuccess:()=>{let t=o.machines.find(t=>t.host.id===e);Sn.success(`Retrying the update on ${t?.host.name??`the requested machine`}`)}})},t[59]=o.machines,t[60]=f,t[61]=Te):Te=t[61];let De=Te,ke;t[62]===f?ke=t[63]:(ke=function(e){for(let t of e)f.mutate(t);Sn.success(`Retrying the update on ${e.length} machines`)},t[62]=f,t[63]=ke);let Ae=ke,je;t[64]===i?je=t[65]:(je=i?(0,$.jsx)(rs,{}):null,t[64]=i,t[65]=je);let Me;t[66]!==we||t[67]!==u||t[68]!==K?(Me=K&&Rs(u)?we:null,t[66]=we,t[67]=u,t[68]=K,t[69]=Me):Me=t[69];let Ne;t[70]!==xe||t[71]!==Me?(Ne=(0,$.jsxs)(As,{children:[xe,Me]}),t[70]=xe,t[71]=Me,t[72]=Ne):Ne=t[72];let Pe=f.isPending?f.variables??null:null,Fe;t[73]===v?Fe=t[74]:(Fe=(e,t)=>v({hostId:e,issue:t}),t[73]=v,t[74]=Fe);let Ie;t[75]===a?Ie=t[76]:(Ie=e=>{rt({queryClient:a,hostId:e})},t[75]=a,t[76]=Ie);let Le;t[77]!==h||t[78]!==o.machines||t[79]!==s||t[80]!==m||t[81]!==g||t[82]!==Ae||t[83]!==De||t[84]!==_||t[85]!==c||t[86]!==Pe||t[87]!==Fe||t[88]!==Ie?(Le=(0,$.jsx)(Ns,{machines:o.machines,now:m,localDaemonHostId:s,serverHostId:c,retryPendingHostId:Pe,runningJobKey:_,queuedJobKeys:g,failuresByJobKey:h,onStartInstall:Fe,onRetryDaemonUpdate:De,onRetryAllDaemonUpdates:Ae,onRecheckClis:Ie}),t[77]=h,t[78]=o.machines,t[79]=s,t[80]=m,t[81]=g,t[82]=Ae,t[83]=De,t[84]=_,t[85]=c,t[86]=Pe,t[87]=Fe,t[88]=Ie,t[89]=Le):Le=t[89];let Re=S!==null,ze;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ze=e=>{e||C(null)},t[90]=ze):ze=t[90];let Be=S??0,Ve;t[91]===Be?Ve=t[92]:(Ve=Oe(Be),t[91]=Be,t[92]=Ve);let He;t[93]===Symbol.for(`react.memo_cache_sentinel`)?(He=()=>C(null),t[93]=He):He=t[93];let Ue;t[94]===b?Ue=t[95]:(Ue=()=>{b.mutate({confirmInterruptingThreads:!0},{onSettled:()=>C(null)})},t[94]=b,t[95]=Ue);let We;t[96]!==b.isPending||t[97]!==Ve||t[98]!==Ue?(We=(0,$.jsx)(it,{title:`Update Moonlet now?`,description:Ve,confirmLabel:`Update and restart`,pending:b.isPending,onCancel:He,onConfirm:Ue}),t[96]=b.isPending,t[97]=Ve,t[98]=Ue,t[99]=We):We=t[99];let Ge;t[100]!==Re||t[101]!==We?(Ge=(0,$.jsx)(me,{open:Re,onOpenChange:ze,children:We}),t[100]=Re,t[101]=We,t[102]=Ge):Ge=t[102];let Ke=w&&D?.rollback?.available===!0,qe;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(qe=e=>{e||E(!1)},t[103]=qe):qe=t[103];let Je;t[104]!==D||t[105]!==x?(Je=D?.rollback?.available===!0?(0,$.jsx)(it,{title:`Go back to ${D.rollback.version}?`,description:Wt({version:D.rollback.version,losesChangesSince:D.rollback.losesChangesSince,runningThreadCount:D.runningThreadCount}),confirmLabel:`Go back and restart`,pending:x.isPending,onCancel:()=>E(!1),onConfirm:()=>{x.mutate({confirmInterruptingThreads:!0},{onSettled:()=>E(!1)})}}):null,t[104]=D,t[105]=x,t[106]=Je):Je=t[106];let Ye;t[107]!==Ke||t[108]!==Je?(Ye=(0,$.jsx)(me,{open:Ke,onOpenChange:qe,children:Je}),t[107]=Ke,t[108]=Je,t[109]=Ye):Ye=t[109];let Xe;return t[110]!==je||t[111]!==Ne||t[112]!==Le||t[113]!==Ge||t[114]!==Ye?(Xe=(0,$.jsxs)(`div`,{className:`space-y-6`,children:[je,Ne,Le,Ge,Ye]}),t[110]=je,t[111]=Ne,t[112]=Le,t[113]=Ge,t[114]=Ye,t[115]=Xe):Xe=t[115],Xe}function Hs(e){Sn.error(`Update retry failed`,{description:Oo(e)})}function Us(e){Sn.error(`Relaunch failed`,{description:Oo(e)})}function Ws(e){return ps(e).length>0}function Gs(e){return e.host.id}function Ks(e){return e.host.status===`connected`}var qs=new Set([`Alt`,`Control`,`Meta`,`OS`,`Shift`]),Js=new Set(pt);function Ys(e,t){if(qs.has(e.key)||e.key===`Dead`||e.key===`Unidentified`)return null;let n=V(e);if(n.length===0||n.length>32)return null;let r=gt(t),i=r?e.metaKey:e.ctrlKey;return{key:n.length===1?n.toLowerCase():n,mod:i,meta:e.metaKey&&!(i&&r),control:e.ctrlKey&&!(i&&!r),alt:e.altKey,shift:e.shiftKey}}function Xs(e,t){return e.key.toLowerCase()===t.key.toLowerCase()&&e.mod===t.mod&&e.meta===t.meta&&e.control===t.control&&e.alt===t.alt&&e.shift===t.shift}function Zs(e,t){return t.mod||t.meta||t.control||t.alt||/^F(?:[1-9]|1[0-9]|2[0-4])$/u.test(t.key)||Js.has(e)}function Qs(e,t,n,r,i){let a=null,o=!1;for(let t=e.length-1;t>=0;--t){let s=e[t];if(s?.command===n&&Nn(s,{isDesktop:r,platform:i})){o=!0,a=s.shortcut;break}}if(!o)return null;let s=xn(t,n,jn(i));return s===void 0?a:s.shortcut}function $s(e,t,n,r){return e.some(e=>e.command===t&&Nn(e,{isDesktop:n,platform:r}))}function ec(e,t,n,r){let i=jn(r);return[...e.filter(e=>e.command!==t||e.platform!==i),{command:t,shortcut:n,platform:i}]}function tc(e,t,n){let r=jn(n),i=e.filter(e=>e.command!==t||e.platform!==void 0&&e.platform!==r),a=e.find(e=>e.command===t&&e.platform===void 0);return a===void 0?i:[...i,...Ve.options.filter(e=>e!==r&&!i.some(n=>n.command===t&&n.platform===e)).map(e=>({...a,platform:e}))]}function nc(e,t,n,r,i){let a=Qs(e,t,n,r,i);return a===null?[]:[...new Set(e.map(e=>e.command))].filter(o=>{if(o===n)return!1;let s=Qs(e,t,o,r,i);return s!==null&&Ft(a,s,i)})}var rc=[],ic=`rounded-none bg-transparent px-0 py-0 text-foreground opacity-100`,ac=`bg-muted/40 px-1.5 py-0.5 text-foreground opacity-100`,oc=`rounded-none border-l border-border bg-transparent px-1.5 py-0.5 text-foreground opacity-100`;function sc(e,t){return e===t||e!==null&&t!==null&&Xs(e,t)}var cc=(0,Q.memo)(function(e){let t=(0,Z.c)(34),{label:n,command:r,disabled:i,onChange:a,onRecordingChange:o,recording:s,shortcut:c}=e,l=ft(),[u,d]=(0,Q.useState)(null),f=c===null?null:kn(c,l),p=f?.label??`unassigned`,m;t[0]!==r||t[1]!==a||t[2]!==o||t[3]!==l||t[4]!==s||t[5]!==d?(m=function(e){if(!s)return;if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){d(null),o(null);return}let t=Ys(e,l);if(t===null){d(`Press a non-modifier key.`);return}if(!Zs(r,t)){d(`Use Command, Control, or Alt with a key.`);return}d(null),a(r,t),o(null)},t[0]=r,t[1]=a,t[2]=o,t[3]=l,t[4]=s,t[5]=d,t[6]=m):m=t[6];let h=m,g=s?`Recording shortcut for ${n}. Press keys or Escape to cancel.`:`Record shortcut for ${n}, current shortcut ${p}`,_=s&&`border-ring text-foreground`,v;t[7]===_?v=t[8]:(v=q(`h-7 min-w-24 px-2 text-xs`,_),t[7]=_,t[8]=v);let y;t[9]!==o||t[10]!==d?(y=()=>{d(null),o(null)},t[9]=o,t[10]=d,t[11]=y):y=t[11];let b;t[12]!==r||t[13]!==o||t[14]!==s||t[15]!==d?(b=()=>{s||(d(null),o(r))},t[12]=r,t[13]=o,t[14]=s,t[15]=d,t[16]=b):b=t[16];let x;t[17]!==s||t[18]!==f?(x=s?`Press keys`:f===null?`Unassigned`:(0,$.jsx)(pr,{className:ic,shortcut:f}),t[17]=s,t[18]=f,t[19]=x):x=t[19];let S;t[20]!==i||t[21]!==h||t[22]!==s||t[23]!==g||t[24]!==v||t[25]!==y||t[26]!==b||t[27]!==x?(S=(0,$.jsx)(J,{"aria-label":g,"aria-pressed":s,className:v,disabled:i,onBlur:y,onClick:b,onKeyDown:h,size:`sm`,type:`button`,variant:`outline`,children:x}),t[20]=i,t[21]=h,t[22]=s,t[23]=g,t[24]=v,t[25]=y,t[26]=b,t[27]=x,t[28]=S):S=t[28];let C;t[29]===u?C=t[30]:(C=u?(0,$.jsx)(`p`,{className:`text-xs text-destructive`,role:`alert`,children:u}):null,t[29]=u,t[30]=C);let w;return t[31]!==S||t[32]!==C?(w=(0,$.jsxs)(`div`,{className:`flex flex-col items-end gap-1`,children:[S,C]}),t[31]=S,t[32]=C,t[33]=w):w=t[33],w},function(e,t){return e.label===t.label&&e.command===t.command&&e.disabled===t.disabled&&e.onChange===t.onChange&&e.onRecordingChange===t.onRecordingChange&&e.recording===t.recording&&sc(e.shortcut,t.shortcut)});function lc({label:e,description:t,labels:n,defaultConflicts:r,command:i,defaults:a,isDesktop:o,overrides:s,platform:c}){let l=Qs(a,s,i,o,c),u=xn(s,i,jn(c))!==void 0,d=a.filter(e=>e.command===i),f=Qs(a,[],i,!1,c),p=Qs(a,[],i,!0,c),m=$s(a,i,o,c),h=d.length>0&&d.every(e=>e.desktopOnly);return{availableOnClient:m,command:i,conflicts:(u?nc(a,s,i,o,c):[]).map(e=>n.get(e)??e),label:e,description:t,defaultConflicts:r.map(e=>n.get(e)??e),customized:u,desktopDefaultShortcut:p,desktopOnly:h,shortcut:l,webDefaultShortcut:f}}function uc(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function dc(e,t){return e.command===t.command&&e.label===t.label&&e.description===t.description&&uc(e.defaultConflicts,t.defaultConflicts)&&e.availableOnClient===t.availableOnClient&&e.customized===t.customized&&e.desktopOnly===t.desktopOnly&&sc(e.shortcut,t.shortcut)&&sc(e.webDefaultShortcut,t.webDefaultShortcut)&&sc(e.desktopDefaultShortcut,t.desktopDefaultShortcut)&&uc(e.conflicts,t.conflicts)}var fc=(0,Q.memo)(function(e){let t=(0,Z.c)(72),{model:n,onChange:r,onReset:i,onRecordingChange:a,pending:o,platform:s,recording:c}=e,{availableOnClient:l,command:u,conflicts:d,customized:f,desktopDefaultShortcut:p,desktopOnly:m,shortcut:h,webDefaultShortcut:g}=n,_=n,v,y,b,x,S,C;if(t[0]!==f||t[1]!==p||t[2]!==m||t[3]!==_.description||t[4]!==_.label||t[5]!==o||t[6]!==s||t[7]!==g){let e=g!==null&&p!==null&&!Xs(g,p)?[{label:`Web`,shortcut:g},{label:`Desktop`,shortcut:p}]:null,n=e===null?g??p:null;S=o||void 0;let r=o&&`opacity-50`;t[14]===r?C=t[15]:(C=q(`flex flex-col gap-2 py-3 first:pt-0 last:pb-0 @min-[36rem]/settings:flex-row @min-[36rem]/settings:items-center @min-[36rem]/settings:gap-5`,r),t[14]=r,t[15]=C),v=`min-w-0 flex-1`;let i;t[16]===_.label?i=t[17]:(i=(0,$.jsx)(`p`,{className:`text-sm text-foreground`,children:_.label}),t[16]=_.label,t[17]=i);let a;t[18]===m?a=t[19]:(a=m?(0,$.jsx)(Vn,{children:`Desktop`}):null,t[18]=m,t[19]=a);let c;t[20]===f?c=t[21]:(c=f?(0,$.jsx)(Vn,{children:`Custom`}):null,t[20]=f,t[21]=c),t[22]!==c||t[23]!==i||t[24]!==a?(y=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[i,a,c]}),t[22]=c,t[23]=i,t[24]=a,t[25]=y):y=t[25],t[26]===_.description?b=t[27]:(b=(0,$.jsx)(`p`,{className:`mt-0.5 text-xs leading-snug text-subtle-foreground/75`,children:_.description}),t[26]=_.description,t[27]=b),x=e!==null||n!==null?(0,$.jsxs)(`div`,{"aria-label":`${e===null?`Default shortcut`:`Default shortcuts`} for ${_.label}`,className:`mt-1.5 flex flex-wrap items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`text-xs text-subtle-foreground/75`,children:e===null?`Default:`:`Defaults:`}),n===null?e?.map(e=>(0,$.jsxs)(`span`,{className:`inline-flex items-stretch overflow-hidden rounded border border-border text-foreground`,children:[(0,$.jsx)(`span`,{className:`inline-flex items-center bg-muted/40 px-1.5 text-2xs leading-none text-subtle-foreground`,children:e.label}),(0,$.jsx)(pr,{ariaHidden:!1,className:oc,shortcut:kn(e.shortcut,s)})]},e.label)):(0,$.jsx)(pr,{ariaHidden:!1,className:ac,shortcut:kn(n,s)})]}):null,t[0]=f,t[1]=p,t[2]=m,t[3]=_.description,t[4]=_.label,t[5]=o,t[6]=s,t[7]=g,t[8]=v,t[9]=y,t[10]=b,t[11]=x,t[12]=S,t[13]=C}else v=t[8],y=t[9],b=t[10],x=t[11],S=t[12],C=t[13];let w;t[28]===n.defaultConflicts?w=t[29]:(w=n.defaultConflicts.length>0?(0,$.jsxs)(`p`,{className:`mt-1 text-xs text-warning-text`,children:[`Default shortcut left unbound: also used by`,` `,n.defaultConflicts.join(`, `),`.`]}):null,t[28]=n.defaultConflicts,t[29]=w);let T;t[30]===d?T=t[31]:(T=d.length>0?(0,$.jsxs)(`p`,{className:`mt-1 text-xs text-warning-text`,children:[`Also used by `,d.join(`, `),`. Context determines which command runs.`]}):null,t[30]=d,t[31]=T);let E;t[32]!==v||t[33]!==y||t[34]!==b||t[35]!==x||t[36]!==w||t[37]!==T?(E=(0,$.jsxs)(`div`,{className:v,children:[y,b,x,w,T]}),t[32]=v,t[33]=y,t[34]=b,t[35]=x,t[36]=w,t[37]=T,t[38]=E):E=t[38];let D=!l,O;t[39]!==u||t[40]!==_.label||t[41]!==r||t[42]!==a||t[43]!==c||t[44]!==h||t[45]!==D?(O=(0,$.jsx)(cc,{label:_.label,command:u,disabled:D,onChange:r,onRecordingChange:a,recording:c,shortcut:h}),t[39]=u,t[40]=_.label,t[41]=r,t[42]=a,t[43]=c,t[44]=h,t[45]=D,t[46]=O):O=t[46];let k=`Clear shortcut for ${_.label}`,A=!l||h===null,j;t[47]!==u||t[48]!==r?(j=()=>r(u,null),t[47]=u,t[48]=r,t[49]=j):j=t[49];let M;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(H,{name:`X`,className:`size-3.5`}),t[50]=M):M=t[50];let N;t[51]!==k||t[52]!==A||t[53]!==j?(N=(0,$.jsx)(J,{"aria-label":k,className:`size-7`,disabled:A,onClick:j,size:`icon`,type:`button`,variant:`ghost`,children:M}),t[51]=k,t[52]=A,t[53]=j,t[54]=N):N=t[54];let P=`Reset shortcut for ${_.label}`,F=!l||!f,I;t[55]!==u||t[56]!==i?(I=()=>i(u),t[55]=u,t[56]=i,t[57]=I):I=t[57];let L;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(H,{name:`RotateCcw`,className:`size-3.5`}),t[58]=L):L=t[58];let R;t[59]!==P||t[60]!==F||t[61]!==I?(R=(0,$.jsx)(J,{"aria-label":P,className:`size-7`,disabled:F,onClick:I,size:`icon`,type:`button`,variant:`ghost`,children:L}),t[59]=P,t[60]=F,t[61]=I,t[62]=R):R=t[62];let z;t[63]!==O||t[64]!==N||t[65]!==R?(z=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-start justify-end gap-1`,children:[O,N,R]}),t[63]=O,t[64]=N,t[65]=R,t[66]=z):z=t[66];let B;return t[67]!==z||t[68]!==S||t[69]!==C||t[70]!==E?(B=(0,$.jsxs)(`div`,{"aria-busy":S,className:C,children:[E,z]}),t[67]=z,t[68]=S,t[69]=C,t[70]=E,t[71]=B):B=t[71],B},function(e,t){return e.onChange===t.onChange&&e.onReset===t.onReset&&e.onRecordingChange===t.onRecordingChange&&e.pending===t.pending&&e.platform===t.platform&&e.recording===t.recording&&dc(e.model,t.model)});function pc(){let e=ae(),t=Ot(),{isPending:n,mutate:r}=ct(),i=se()!==null,a=ft(),o=e.data?.generalSettings??re,{defaults:s,commands:c,conflicts:l}=Qt(),u=(0,Q.useMemo)(()=>[...an,{label:`Plugin commands`,commands:c.map(e=>({command:Dn(e.pluginId,e.id),label:e.title,description:`Plugin: ${e.pluginId}`}))}],[c]),d=(0,Q.useMemo)(()=>new Map(u.flatMap(e=>e.commands.map(e=>[e.command,e.label]))),[u]),[f,p]=(0,Q.useState)(null),m=e.data?.keybindingOverrides??rc,h=JSON.stringify(m),[g,_]=(0,Q.useState)(()=>({sourceKey:h,value:m})),v=g.sourceKey===h?g.value:m,[y,b]=(0,Q.useState)(null),[x,S]=(0,Q.useState)(``),C=(0,Q.useRef)(null),w=(0,Q.useMemo)(()=>new Map(u.flatMap(e=>e.commands.map(({command:e,label:t,description:n})=>[e,lc({command:e,label:t,description:n,labels:d,defaultConflicts:l.get(e)??[],defaults:s,isDesktop:i,overrides:v,platform:a})]))),[u,l,s,i,d,v,a]),T=(0,Q.useCallback)((e,t)=>{let n=w.get(e);return n===void 0?!1:[n.shortcut,n.webDefaultShortcut,n.desktopDefaultShortcut].filter(e=>e!==null).some(e=>At(e,a,t))},[w,a]),E=(0,Q.useMemo)(()=>{let e=x.trim().toLowerCase();if(e.length===0)return u;let t=u.flatMap(t=>t.commands.map(t=>{let n=t.label.toLowerCase();return{metadata:t,rank:[n===e,n.startsWith(e),n.includes(e),T(t.command,e),t.command.toLowerCase().includes(e),t.description.toLowerCase().includes(e)].findIndex(Boolean)}})).filter(({rank:e})=>e!==-1).sort((e,t)=>e.rank-t.rank).map(({metadata:e})=>e);return t.length===0?[]:[{label:`Search results`,commands:t}]},[u,x,T]),D=(0,Q.useRef)({defaults:s,isDesktop:i,overrides:v,platform:a,serverOverridesKey:h});(0,Q.useLayoutEffect)(()=>{D.current={defaults:s,isDesktop:i,overrides:v,platform:a,serverOverridesKey:h}},[s,i,v,a,h]);let O=(0,Q.useCallback)((e,t,n,i)=>{C.current=t,_({sourceKey:i,value:e}),r(e,{onError:()=>_({sourceKey:i,value:n})})},[r]),k=(0,Q.useCallback)((e,t,n)=>{let r=D.current,i=ec(r.overrides,e,t,r.platform),a=nc(r.defaults,i,e,r.isDesktop,r.platform);if(t!==null&&a.length>0&&!n){p({command:e,shortcut:t,conflicts:a});return}if(n)for(let e of a)i=ec(i,e,null,r.platform);p(null),O(i,e,r.overrides,r.serverOverridesKey)},[O]),A=(0,Q.useCallback)((e,t)=>k(e,t,!1),[k]),j=(0,Q.useCallback)(e=>{let t=D.current;O(tc(t.overrides,e,t.platform),e,t.overrides,t.serverOverridesKey)},[O]),M=n?C.current:null,N=e.data===void 0||n,P=[...w.values()].filter(e=>e.availableOnClient&&e.customized),F=P.length>0;return(0,$.jsx)(Y,{actionPlacement:`inline`,action:(0,$.jsx)(J,{disabled:N||!F,onClick:()=>O(P.reduce((e,t)=>tc(e,t.command,a),v),null,v,h),size:`sm`,type:`button`,variant:`outline`,children:`Reset all`}),description:`Click a shortcut, then press its new keys. Changes sync to every Moonlet window.`,title:`Keyboard shortcuts`,children:(0,$.jsxs)(`div`,{className:`space-y-5`,children:[(0,$.jsx)(X,{description:`Show shortcut badges after holding Command or Control.`,label:`Show keyboard hints when holding CMD / Control`,children:(0,$.jsx)(Yn,{"aria-label":`Show keyboard hints when holding CMD / Control`,checked:o.showKeyboardHints,disabled:e.data===void 0,onCheckedChange:e=>t.mutate({showKeyboardHints:e})})}),(0,$.jsx)(Bt,{"aria-label":`Search keyboard shortcuts`,onChange:e=>S(e.target.value),placeholder:`Search shortcuts`,value:x}),f===null?null:(0,$.jsxs)(`div`,{role:`alert`,className:`space-y-2 rounded border border-border p-3`,children:[(0,$.jsxs)(`p`,{className:`text-sm`,children:[`Shortcut already used by`,` `,f.conflicts.map(e=>d.get(e)??e).join(`, `),`. Replace it with`,` `,d.get(f.command)??f.command,`?`]}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(J,{disabled:N,onClick:()=>k(f.command,f.shortcut,!0),size:`sm`,children:`Replace binding`}),(0,$.jsx)(J,{onClick:()=>p(null),size:`sm`,variant:`outline`,children:`Cancel`})]})]}),(0,$.jsxs)(`fieldset`,{className:q(`m-0 min-w-0 space-y-5 border-0 p-0`,n&&`[&:disabled_button:not([disabled])]:opacity-100`),disabled:N,children:[E.map(e=>(0,$.jsxs)(`section`,{children:[(0,$.jsx)(`h3`,{className:`mb-2 text-xs font-medium text-subtle-foreground`,children:e.label}),(0,$.jsx)(`div`,{className:`divide-y divide-border`,children:e.commands.map(e=>{let t=w.get(e.command);return t===void 0?null:(0,$.jsx)(fc,{model:t,onChange:A,onReset:j,onRecordingChange:b,pending:M===e.command,platform:a,recording:y===e.command},e.command)})})]},e.label)),E.length===0?(0,$.jsxs)(`p`,{className:`py-6 text-center text-sm text-subtle-foreground`,children:[`No shortcuts match “`,x,`”.`]}):null]})]})})}function mc(e){let t=(0,Z.c)(10),{source:n,className:r}=e;if(n.icon){let e=n.icon,i;t[0]===r?i=t[1]:(i=q(`shrink-0 object-contain`,r),t[0]=r,t[1]=i);let a;return t[2]!==n.icon||t[3]!==i?(a=(0,$.jsx)(`img`,{src:e,alt:``,"aria-hidden":!0,draggable:!1,className:i}),t[2]=n.icon,t[3]=i,t[4]=a):a=t[4],a}let i;t[5]===r?i=t[6]:(i=q(`flex shrink-0 items-center justify-center bg-muted/60 text-subtle-foreground`,r),t[5]=r,t[6]=i);let a;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(H,{name:`Globe`,className:`size-[60%]`}),t[7]=a):a=t[7];let o;return t[8]===i?o=t[9]:(o=(0,$.jsx)(`span`,{"aria-hidden":!0,className:i,children:a}),t[8]=i,t[9]=o),o}var hc=`bb:browser-import:records`;function gc(e){try{let t=e?.getItem(hc);if(!t)return{};let n=JSON.parse(t);if(typeof n!=`object`||!n)return{};let r={};for(let[e,t]of Object.entries(n)){if(typeof t!=`object`||!t)continue;let n=t;typeof n.at!=`number`||typeof n.profileName!=`string`||typeof n.imported!=`number`||typeof n.skipped!=`number`||!Array.isArray(n.skippedDomains)||(r[e]={at:n.at,profileName:n.profileName,imported:n.imported,skipped:n.skipped,skippedDomains:n.skippedDomains.filter(e=>typeof e==`string`)})}return r}catch{return{}}}function _c(e){return e.unavailable===`browserRunning`?{step:`blocked`,reason:`browserRunning`}:e.unavailable===`needsFullDiskAccess`?{step:`fullDiskAccess`,checked:!1}:e.unavailable===void 0?e.profiles.length===0?{step:`blocked`,reason:`unknownSourceProfile`}:{step:`configure`}:{step:`blocked`,reason:e.unavailable}}function vc(e){return e===`needsFullDiskAccess`?{step:`fullDiskAccess`,checked:!0}:{step:`blocked`,reason:e}}function yc(e,t){switch(t){case`browserRunning`:case`needsFullDiskAccess`:case`needsKeychainApproval`:case`keychainItemMissing`:return{...e,unavailable:t};default:return null}}function bc(e,t){if(e===void 0)return{step:`blocked`,reason:`unknownSource`};let n=_c(e);return n.step===`fullDiskAccess`&&t.step===`fullDiskAccess`?{step:`fullDiskAccess`,checked:!0}:n}function xc(e){return e.step!==`importing`}function Sc(e){return e.unavailable===void 0&&e.profiles.length>1}function Cc(e,t){return e!==null&&t.profiles.some(t=>t.directory===e)?e:t.profiles[0]?.directory??null}function wc(e,t,n){return{at:n,profileName:t,imported:e.imported,skipped:e.skipped,skippedDomains:e.skippedDomains}}function Tc(e){return`${e.toLocaleString()} ${e===1?`cookie`:`cookies`}`}function Ec(e){return e.length===0?``:e.length===1?e[0]:e.length<=3?`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`:`${e.slice(0,3).join(`, `)} and ${e.length-3} more`}function Dc(e){return e.filter(e=>e.unavailable!==`unsupportedPlatform`&&e.unavailable!==`notInstalled`)}function Oc(e){let t=0,n=!1;for(let r of e.profiles){if(r.cookieCount===void 0)return;t+=r.cookieCount,n=!0}return n?t:void 0}function kc(e,t){let n=e.profiles.length,r=`${n} ${n===1?`profile`:`profiles`}`,i=Oc(e);switch(e.unavailable){case`browserRunning`:return{status:`Running · quit ${e.name} to import`,tone:`attention`,details:[],action:`recheck`,actionLabel:`Recheck`};case`needsFullDiskAccess`:return{status:`Needs Full Disk Access`,tone:`attention`,details:[],action:`grant`,actionLabel:`Grant access…`};case`needsKeychainApproval`:return{status:`Needs Keychain access`,tone:`attention`,details:[],action:`import`,actionLabel:`Import…`};case`keychainItemMissing`:return{status:`No encryption key in Keychain`,tone:`idle`,details:[],action:`recheck`,actionLabel:`Recheck`};case void 0:break;default:return{status:`Unavailable`,tone:`idle`,details:[],action:`none`,actionLabel:`Import…`}}return n===0||i===0?{status:`No cookies yet`,tone:`idle`,details:n===0?[]:[r],action:`none`,actionLabel:`Import…`}:{status:`Ready`,tone:`ready`,details:t?[`${t.profileName} · ${Tc(t.imported)} imported`,...t.skipped>0?[`${t.skipped.toLocaleString()} skipped${t.skippedDomains.length>0?` (${Ec(t.skippedDomains)})`:``}`]:[]]:i===void 0?[r]:[r,Tc(i)],action:`import`,actionLabel:`Import…`}}var Ac=`flex w-full items-center gap-2.5 rounded-md border px-3 py-2 text-left text-sm transition-colors hover:bg-state-hover`,jc=`border-surface-selected-border bg-surface-selected`,Mc=`border-border`;function Nc(e){let t=(0,Z.c)(47),{source:n,desktopBrowser:r,onClose:i,onImported:a}=e,[o,s]=(0,Q.useState)(n),c;t[0]===n?c=t[1]:(c=()=>_c(n),t[0]=n,t[1]=c);let[l,u]=(0,Q.useState)(c),d;t[2]===n?d=t[3]:(d=()=>Cc(null,n),t[2]=n,t[3]=d);let[f,p]=(0,Q.useState)(d),m=(0,Q.useRef)(!0),h,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>(m.current=!0,()=>{m.current=!1}),g=[],t[4]=h,t[5]=g):(h=t[4],g=t[5]),(0,Q.useEffect)(h,g);let _,v,y,b,x,S,C,w;if(t[6]!==r||t[7]!==i||t[8]!==a||t[9]!==o||t[10]!==f||t[11]!==l){let e;t[20]===f?e=t[21]:(e=e=>e.directory===f,t[20]=f,t[21]=e);let n=o.profiles.find(e),c=()=>{if(f===null||n===void 0||!r.importCookies){u({step:`blocked`,reason:`unknownSourceProfile`});return}let e=n.name;u({step:`importing`}),r.importCookies({sourceId:o.id,sourceProfileDirectory:f}).then(t=>{if(m.current){if(t.ok){a(o,e,t),i();return}u(vc(t.reason))}}).catch(()=>{m.current&&u({step:`blocked`,reason:`readFailed`})})},d;t[22]!==r||t[23]!==o.id||t[24]!==l?(d=()=>{if(!r.listImportSources)return;let e=l;u({step:`checking`}),r.listImportSources().then(t=>{if(!m.current)return;let n=t.sources.find(e=>e.id===o.id);n&&(s(n),p(e=>Cc(e,n))),u(bc(n,e))}).catch(()=>{m.current&&u({step:`blocked`,reason:`readFailed`})})},t[22]=r,t[23]=o.id,t[24]=l,t[25]=d):d=t[25];let h=d,g;t[26]===l?g=t[27]:(g=xc(l),t[26]=l,t[27]=g);let T=g,E;t[28]===o?E=t[29]:(E=e=>(0,$.jsxs)(W,{className:`flex items-center gap-2.5`,children:[(0,$.jsx)(mc,{source:o,className:`size-5 rounded-[5px]`}),e]}),t[28]=o,t[29]=E);let D=E;v=Be,w=!0,t[30]!==T||t[31]!==i?(y=e=>{!e&&T&&i()},t[30]=T,t[31]=i,t[32]=y):y=t[32],_=z,b=!T,t[33]===T?(x=t[34],S=t[35]):(x=e=>{T||e.preventDefault()},S=e=>{T||e.preventDefault()},t[33]=T,t[34]=x,t[35]=S),C=l.step===`fullDiskAccess`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(K,{children:[D(`Allow Full Disk Access for ${o.name}`),(0,$.jsxs)(wn,{children:[o.name,` keeps its cookies in a protected folder. Turn on Full Disk Access for Moonlet in System Settings → Privacy & Security, then come back. You can turn it off again after the import.`]})]}),l.checked?(0,$.jsx)(`p`,{className:`text-xs text-destructive-text`,children:`Full Disk Access is still off. macOS may require quitting and reopening Moonlet before the grant applies.`}):null,(0,$.jsxs)(We,{children:[(0,$.jsx)(J,{variant:`outline`,onClick:i,children:`Cancel`}),r.openFullDiskAccessSettings?(0,$.jsx)(J,{variant:`outline`,onClick:()=>r.openFullDiskAccessSettings?.(),children:`Open System Settings`}):null,(0,$.jsx)(J,{onClick:h,children:`I've turned it on`})]})]}):l.step===`checking`?(0,$.jsxs)(K,{children:[D(`Checking ${o.name}…`),(0,$.jsx)(wn,{children:`This only takes a moment.`})]}):l.step===`importing`?(0,$.jsxs)(K,{children:[D(`Importing from ${o.name}…`),(0,$.jsx)(wn,{children:`Reading and decrypting cookies. macOS may ask for Keychain access.`})]}):l.step===`blocked`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(K,{children:[D(`Can't import from ${o.name}`),(0,$.jsx)(wn,{children:pn[l.reason]})]}),(0,$.jsxs)(We,{children:[(0,$.jsx)(J,{variant:`outline`,onClick:i,children:`Close`}),zt(l.reason)?(0,$.jsx)(J,{onClick:h,children:l.reason===`browserRunning`?`I've quit it`:`Try again`}):null]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(K,{children:[D(`Import from ${o.name}`),(0,$.jsx)(wn,{children:`Which profile's cookies should be copied into the Moonlet browser?`})]}),(0,$.jsx)(`div`,{role:`radiogroup`,"aria-label":`Source profile`,className:`flex flex-col gap-1.5`,children:o.profiles.map(e=>{let t=e.directory===f;return(0,$.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,className:q(Ac,t?jc:Mc),onClick:()=>p(e.directory),children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:q(`flex size-3.5 shrink-0 items-center justify-center rounded-full border`,t?`border-foreground`:`border-border`),children:t?(0,$.jsx)(`span`,{className:`size-1.5 rounded-full bg-foreground`}):null}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`span`,{className:`block truncate font-medium text-foreground`,children:e.name}),e.cookieCount===void 0?null:(0,$.jsx)(`span`,{className:`block text-xs text-subtle-foreground`,children:Tc(e.cookieCount)})]})]},e.directory)})}),(0,$.jsxs)(`p`,{className:`text-xs text-subtle-foreground`,children:[o.name,` must stay closed during the import. macOS may ask for Keychain access to its encryption key; choose Allow.`]}),(0,$.jsxs)(We,{children:[(0,$.jsx)(J,{variant:`outline`,onClick:i,children:`Cancel`}),(0,$.jsx)(J,{onClick:c,disabled:f===null,children:n?.cookieCount===void 0?`Import`:`Import ${Tc(n.cookieCount)}`})]})]}),t[6]=r,t[7]=i,t[8]=a,t[9]=o,t[10]=f,t[11]=l,t[12]=_,t[13]=v,t[14]=y,t[15]=b,t[16]=x,t[17]=S,t[18]=C,t[19]=w}else _=t[12],v=t[13],y=t[14],b=t[15],x=t[16],S=t[17],C=t[18],w=t[19];let T;t[36]!==_||t[37]!==b||t[38]!==x||t[39]!==S||t[40]!==C?(T=(0,$.jsx)(_,{hideCloseButton:b,onEscapeKeyDown:x,onInteractOutside:S,children:C}),t[36]=_,t[37]=b,t[38]=x,t[39]=S,t[40]=C,t[41]=T):T=t[41];let E;return t[42]!==v||t[43]!==y||t[44]!==T||t[45]!==w?(E=(0,$.jsx)(v,{open:w,onOpenChange:y,children:T}),t[42]=v,t[43]=y,t[44]=T,t[45]=w,t[46]=E):E=t[46],E}var Pc={ready:`bg-success`,attention:`bg-warning`,idle:`border border-muted-foreground`};function Fc(){try{return typeof window>`u`?null:window.localStorage}catch{return null}}function Ic(e){let t=(0,Z.c)(51),{source:n,record:r,now:i,pending:a,onImport:o,onRecheck:s}=e,c,l,u,d,f,p,m,h,g,_,v;if(t[0]!==i||t[1]!==r||t[2]!==n){u=kc(n,r),l=u.action!==`none`,c=Bn,v=`browser-import-${n.id}`,g=`group -mx-2 flex min-w-0 flex-1 items-center gap-3 rounded-md px-2 py-1.5`,t[14]===n?_=t[15]:(_=(0,$.jsx)(mc,{source:n,className:`size-7 rounded-[7px]`}),t[14]=n,t[15]=_),m=`min-w-0 flex-1 space-y-0.5`;let e;t[16]===n.name?e=t[17]:(e=(0,$.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-foreground`,children:n.name}),t[16]=n.name,t[17]=e);let a;t[18]!==i||t[19]!==r?(a=r?(0,$.jsxs)(Vn,{children:[`imported `,we({timestamp:r.at,now:i})]}):null,t[18]=i,t[19]=r,t[20]=a):a=t[20],t[21]!==a||t[22]!==e?(h=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[e,a]}),t[21]=a,t[22]=e,t[23]=h):h=t[23],d=`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-0.5 text-xs text-subtle-foreground/75`;let o=u.tone===`attention`&&`text-warning-text`,s;t[24]===o?s=t[25]:(s=q(`inline-flex shrink-0 items-center gap-1.5`,o),t[24]=o,t[25]=s);let y=Pc[u.tone],b;t[26]===y?b=t[27]:(b=q(`size-1.5 shrink-0 rounded-full`,y),t[26]=y,t[27]=b);let x;t[28]===b?x=t[29]:(x=(0,$.jsx)(`span`,{"aria-hidden":!0,className:b}),t[28]=b,t[29]=x),f=(0,$.jsxs)(`span`,{className:s,children:[x,u.status]}),p=u.details.map(Lc),t[0]=i,t[1]=r,t[2]=n,t[3]=c,t[4]=l,t[5]=u,t[6]=d,t[7]=f,t[8]=p,t[9]=m,t[10]=h,t[11]=g,t[12]=_,t[13]=v}else c=t[3],l=t[4],u=t[5],d=t[6],f=t[7],p=t[8],m=t[9],h=t[10],g=t[11],_=t[12],v=t[13];let y;t[30]!==d||t[31]!==f||t[32]!==p?(y=(0,$.jsxs)(`div`,{className:d,children:[f,p]}),t[30]=d,t[31]=f,t[32]=p,t[33]=y):y=t[33];let b;t[34]!==m||t[35]!==h||t[36]!==y?(b=(0,$.jsxs)(`div`,{className:m,children:[h,y]}),t[34]=m,t[35]=h,t[36]=y,t[37]=b):b=t[37];let x=!l||a,S=u.action===`recheck`?s:o,C;t[38]!==u.actionLabel||t[39]!==x||t[40]!==S?(C=(0,$.jsx)(`div`,{className:`flex shrink-0 items-center gap-1`,children:(0,$.jsx)(J,{size:`sm`,variant:`outline`,disabled:x,onClick:S,children:u.actionLabel})}),t[38]=u.actionLabel,t[39]=x,t[40]=S,t[41]=C):C=t[41];let w;t[42]!==b||t[43]!==C||t[44]!==g||t[45]!==_?(w=(0,$.jsxs)(`div`,{className:g,children:[_,b,C]}),t[42]=b,t[43]=C,t[44]=g,t[45]=_,t[46]=w):w=t[46];let T;return t[47]!==c||t[48]!==w||t[49]!==v?(T=(0,$.jsx)(c,{"data-testid":v,children:w}),t[47]=c,t[48]=w,t[49]=v,t[50]=T):T=t[50],T}function Lc(e){return(0,$.jsx)(Wn,{expandLabel:`Show details`,className:`min-w-0`,children:e},e)}function Rc({desktopBrowser:e}){let t=e?.listImportSources!==void 0,[n,r]=(0,Q.useState)({status:`loading`}),[i,a]=(0,Q.useState)(()=>gc(Fc())),[o,s]=(0,Q.useState)(null),[c,l]=(0,Q.useState)(()=>new Set),u=c.size>0,d=(0,Q.useCallback)(()=>{e?.listImportSources&&(r(e=>e.status===`ready`?e:{status:`loading`}),e.listImportSources().then(e=>r({status:`ready`,sources:e.sources})).catch(e=>r({status:`error`,message:e instanceof Error?e.message:`Could not check installed browsers.`})))},[e]);(0,Q.useEffect)(()=>{d()},[d]);let f=(e,t,n)=>{let r=wc(n,t,Date.now());a(t=>{let n={...t,[e.id]:r};try{Fc()?.setItem(hc,JSON.stringify(n))}catch{return n}return n}),Sn.success(n.imported>0?`Imported ${Tc(n.imported)} from ${e.name}`:`No cookies were imported from ${e.name}`)},p=t=>{let n=t.profiles[0];if(!n||!e?.importCookies){s(t);return}l(e=>new Set(e).add(t.id)),e.importCookies({sourceId:t.id,sourceProfileDirectory:n.directory}).then(e=>{if(e.ok){f(t,n.name,e);return}let r=yc(t,e.reason);r?s(r):Sn.error(`${t.name}: ${pn[e.reason]}`)}).catch(()=>{Sn.error(`Could not read ${t.name}'s cookies.`)}).finally(()=>{l(e=>{let n=new Set(e);return n.delete(t.id),n}),d()})},m=n.status===`ready`?Dc(n.sources):[],h=Date.now();return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Y,{title:`Browsers`,description:`Bring signed-in sessions from a browser on this machine into the Moonlet browser, so previews and agent tabs open already logged in.`,action:t?(0,$.jsx)(J,{variant:`ghost`,size:`sm`,onClick:d,disabled:n.status===`loading`,children:`Refresh`}):void 0,children:t?n.status===`loading`?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`}):n.status===`error`?(0,$.jsx)(`p`,{className:`text-sm text-destructive-text`,children:n.message}):m.length===0?(0,$.jsx)(`p`,{className:`text-sm text-subtle-foreground`,children:`No supported browsers were found on this machine.`}):(0,$.jsx)(zn,{children:m.map(e=>(0,$.jsx)(Ic,{source:e,record:i[e.id],now:h,pending:u,onRecheck:d,onImport:()=>{Sc(e)?s(e):e.unavailable===void 0?p(e):s(e)}},e.id))}):(0,$.jsx)(`p`,{className:`text-sm text-subtle-foreground`,children:`Only available in the Moonlet desktop app.`})}),t?(0,$.jsxs)(`p`,{className:`mt-4 text-xs text-subtle-foreground/75`,children:[`Also from the CLI: `,(0,$.jsx)(`code`,{children:`moonlet browser import-sources`}),` and`,` `,(0,$.jsx)(`code`,{children:`moonlet browser import-cookies`}),`.`]}):null,o&&e?(0,$.jsx)(Nc,{source:o,desktopBrowser:e,onClose:()=>{s(null),d()},onImported:f},`${o.id}:${o.unavailable??`ready`}`):null]})}function zc(){let e=(0,Z.c)(2),[t]=(0,Q.useState)(Ye),n;return e[0]===t?n=e[1]:(n=(0,$.jsx)(Rc,{desktopBrowser:t}),e[0]=t,e[1]=n),n}var Bc=Object.fromEntries(A.map(e=>[e.value,e])),Vc={darwin:`macOS`,linux:`Linux`,wsl:`WSL`,win32:`Windows`,unknown:null};function Hc(e){let n=(0,Z.c)(77),{host:r,isPrimary:i,isThisMachine:a,showServerBadge:o,platformLabel:s,projectCount:c,now:l,onRename:u,onRemove:d,onReconnect:f,onRetryUpdate:p,onSuspend:m,onResume:h,onRetryCleanup:g,canMoveServerHere:_,onMoveServerHere:v,serverMoveEnabled:y,lifecycleActionPending:b,retryUpdatePending:x,machineProvider:S}=e,w=t(),T;n[0]===r.id?T=n[1]:(T=Gt(r.id),n[0]=r.id,n[1]=T);let E=T,D=Bc[r.maxPermissionMode],O=`${c} ${c===1?`project`:`projects`}`,k;n[2]!==r||n[3]!==l?(k=Pr({host:r,now:l}),n[2]=r,n[3]=l,n[4]=k):k=n[4];let A=k,j;n[5]!==E||n[6]!==w?(j=e=>{Xn(e)||w(E)},n[5]=E,n[6]=w,n[7]=j):j=n[7];let M;n[8]===r.id?M=n[9]:(M=Gt(r.id),n[8]=r.id,n[9]=M);let N=`Open ${r.name}`,P;n[10]!==r||n[11]!==S?(P=(0,$.jsx)(lr,{host:r,machineProvider:S,nameClassName:`text-sm font-medium text-foreground`}),n[10]=r,n[11]=S,n[12]=P):P=n[12];let F;n[13]===a?F=n[14]:(F=a?(0,$.jsx)(Vn,{children:`this machine`}):null,n[13]=a,n[14]=F);let I;n[15]===o?I=n[16]:(I=o?(0,$.jsx)(Vn,{children:`server`}):null,n[15]=o,n[16]=I);let L;n[17]!==P||n[18]!==F||n[19]!==I?(L=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[P,F,I]}),n[17]=P,n[18]=F,n[19]=I,n[20]=L):L=n[20];let R;n[21]===r?R=n[22]:(R=zr(r),n[21]=r,n[22]=R);let z;n[23]===R?z=n[24]:(z=(0,$.jsx)(St,{tone:R}),n[23]=R,n[24]=z);let B;n[25]===A?B=n[26]:(B=(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:A}),n[25]=A,n[26]=B);let V;n[27]!==z||n[28]!==B?(V=(0,$.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[z,B]}),n[27]=z,n[28]=B,n[29]=V):V=n[29];let H;n[30]===s?H=n[31]:(H=s===null?null:(0,$.jsx)(`span`,{className:`truncate`,children:s}),n[30]=s,n[31]=H);let U;n[32]===O?U=n[33]:(U=(0,$.jsx)(`span`,{className:`shrink-0`,children:O}),n[32]=O,n[33]=U);let W=D.tone===`warning`&&`text-warning-text`,ee;n[34]===W?ee=n[35]:(ee=q(`shrink-0`,W),n[34]=W,n[35]=ee);let te;n[36]!==D.label||n[37]!==ee?(te=(0,$.jsx)(`span`,{className:ee,children:D.label}),n[36]=D.label,n[37]=ee,n[38]=te):te=n[38];let G;n[39]!==V||n[40]!==H||n[41]!==U||n[42]!==te?(G=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-0.5 text-xs text-subtle-foreground/75`,children:[V,H,U,te]}),n[39]=V,n[40]=H,n[41]=U,n[42]=te,n[43]=G):G=n[43];let K;n[44]!==G||n[45]!==L?(K=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[L,G]}),n[44]=G,n[45]=L,n[46]=K):K=n[46];let ne;n[47]!==K||n[48]!==M||n[49]!==N?(ne=(0,$.jsx)(C,{to:M,"aria-label":N,className:`flex min-w-0 flex-1 items-center rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:K}),n[47]=K,n[48]=M,n[49]=N,n[50]=ne):ne=n[50];let re=`${r.name} actions`,ie;n[51]!==_||n[52]!==r||n[53]!==i||n[54]!==b||n[55]!==S||n[56]!==v||n[57]!==f||n[58]!==d||n[59]!==u||n[60]!==h||n[61]!==g||n[62]!==p||n[63]!==m||n[64]!==x||n[65]!==y?(ie=Nr({host:r,machineProvider:S,isPrimary:i,canMoveServerHere:_,serverMoveEnabled:y,lifecycleActionPending:b,retryUpdatePending:x,onRename:u,onReconnect:f,onRetryUpdate:p,onSuspend:m,onResume:h,onRetryCleanup:g,onMoveServerHere:v,onRemove:d}),n[51]=_,n[52]=r,n[53]=i,n[54]=b,n[55]=S,n[56]=v,n[57]=f,n[58]=d,n[59]=u,n[60]=h,n[61]=g,n[62]=p,n[63]=m,n[64]=x,n[65]=y,n[66]=ie):ie=n[66];let ae;n[67]!==re||n[68]!==ie?(ae=(0,$.jsx)($n,{label:re,items:ie}),n[67]=re,n[68]=ie,n[69]=ae):ae=n[69];let oe;n[70]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsx)(Zn,{}),n[70]=oe):oe=n[70];let se;n[71]===ae?se=n[72]:(se=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[ae,oe]}),n[71]=ae,n[72]=se);let ce;return n[73]!==ne||n[74]!==se||n[75]!==j?(ce=(0,$.jsx)(Bn,{children:(0,$.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:(0,$.jsxs)(`div`,{"data-machine-row":!0,className:`group group/machine -mx-2 flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-2 py-2 transition-colors hover:bg-state-hover focus-within:bg-state-hover`,onClick:j,children:[ne,se]})})}),n[73]=ne,n[74]=se,n[75]=j,n[76]=ce):ce=n[76],ce}function Uc(){let e=(0,Z.c)(107),t=ae(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={includeCreating:!0},e[0]=n):n=e[0];let r=Ie(n),{providers:i}=tr(),{localDaemonHostId:a,platform:o}=R(),s=_e(),c=Kr(),l=Gr(),u=qr(),d=Wr(),f=Ur(),p=He(),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(null),[b,x]=(0,Q.useState)(null),[S,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(null),E=r.data,D=t.data?.primaryHostId??null,O=t.data?.experiments.serverMove??!1,k=p.data?.move??null,A=s.data?.projects,j;if(e[1]!==A){j=new Map;for(let e of A??[]){let t=new Set(e.sources.map(Xc));for(let e of t)j.set(e,(j.get(e)??0)+1)}e[1]=A,e[2]=j}else j=e[2];let M=j,N;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(N=Date.now(),e[3]=N):N=e[3];let P=N,F=t.data?.primaryHostPlatform??null,I,L,z,B,V,U,W,ee,te;if(e[4]!==E||e[5]!==a||e[6]!==o||e[7]!==i||e[8]!==F||e[9]!==M||e[10]!==c||e[11]!==d||e[12]!==f||e[13]!==l||e[14]!==k||e[15]!==O||e[16]!==D||e[17]!==g||e[18]!==u||e[19]!==t.data){let n=E?.filter(Yc),r=(E??[]).flatMap(Jc),s=r.every(qc),[p]=r,m=r.length===1?p:void 0;L=E?.filter(Kc);let _=g&&L!==void 0?[...n??[],...L]:n??[],v=(n?.length??0)>1,b=n!==void 0&&n.length>0,S;e[29]===i?S=e[30]:(S=new Map((i??[]).map(Gc)),e[29]=i,e[30]=S);let w=S,A;e[31]!==a||e[32]!==o||e[33]!==w||e[34]!==F||e[35]!==M||e[36]!==c||e[37]!==d||e[38]!==f||e[39]!==l||e[40]!==k||e[41]!==O||e[42]!==D||e[43]!==v||e[44]!==u||e[45]!==t.data?(A=e=>(0,$.jsx)(zn,{children:e.map(e=>(0,$.jsx)(Hc,{host:e,isPrimary:e.id===D,isThisMachine:v&&e.id===a,showServerBadge:e.id===D,platformLabel:e.id===a&&o!==null?Vc[o]:e.id===D&&F!==null?Vc[F]:null,projectCount:M.get(e.id)??0,now:P,onRename:()=>{c.reset(),y(e)},onRemove:()=>{x(e)},onReconnect:()=>{C(e.id)},onRetryUpdate:()=>l.mutate(e.id,{onSuccess:()=>{Sn.success(`Update retry requested for ${e.name}`)}}),retryUpdatePending:l.isPending&&l.variables===e.id,onSuspend:()=>u.mutate(e.id,{onSuccess:()=>Sn.success(`${e.name} suspended`)}),onResume:()=>d.mutate(e.id,{onSuccess:()=>Sn.success(`${e.name} resumed`)}),onRetryCleanup:()=>f.mutate(e.id,{onSuccess:()=>Sn.success(`Cleanup retried for ${e.name}`)}),canMoveServerHere:t.data!==void 0&&Mn({host:e,primaryHostId:D,move:k,serverMoveEnabled:O}),onMoveServerHere:()=>T(e),serverMoveEnabled:O,lifecycleActionPending:u.isPending&&u.variables===e.id||d.isPending&&d.variables===e.id||f.isPending&&f.variables===e.id,machineProvider:e.machineProviderId===null?null:w.get(e.machineProviderId)??null},e.id))}),e[31]=a,e[32]=o,e[33]=w,e[34]=F,e[35]=M,e[36]=c,e[37]=d,e[38]=f,e[39]=l,e[40]=k,e[41]=O,e[42]=D,e[43]=v,e[44]=u,e[45]=t.data,e[46]=A):A=e[46];let j=A;I=Y,V=`Machines`,U=`space-y-3 border-0 bg-transparent p-0`,e[47]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsxs)(J,{size:`sm`,variant:`outline`,onClick:()=>h(!0),children:[(0,$.jsx)(H,{name:`Plus`,className:`size-3.5`}),`Add a machine`]}),e[47]=W):W=e[47],ee=r.length>0?(0,$.jsx)(ei,{title:m===void 0?s?`${r.length} machines are offline`:`${r.length} machines need attention`:m.issue.label,children:m===void 0?(0,$.jsx)(`ul`,{className:`space-y-2`,children:r.map(e=>{let{host:t,issue:n}=e;return(0,$.jsxs)(`li`,{className:`min-w-0`,children:[(0,$.jsx)(`p`,{className:`font-medium`,children:t.name}),s?null:(0,$.jsx)(`p`,{className:`line-clamp-2 whitespace-pre-wrap text-xs text-muted-foreground`,children:n.offline?`Offline`:t.lifecycle.message===null?`Cleanup failed`:`Cleanup failed: ${t.lifecycle.message}`})]},t.id)})}):m.issue.offline||m.host.lifecycle.message===null?null:(0,$.jsx)(`p`,{className:`line-clamp-3 whitespace-pre-wrap text-xs text-muted-foreground`,children:m.host.lifecycle.message})}):null;let N;e[48]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(H,{name:`Info`,className:`mt-0.5 size-4 shrink-0 text-subtle-foreground`,"aria-hidden":!0}),e[48]=N):N=e[48];let R,G;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsx)(`p`,{className:`font-medium text-foreground`,children:`How machines connect`}),G=(0,$.jsx)(`p`,{children:`All your machines connect to one central Moonlet server, where your threads and settings are stored. Choose a machine that can stay awake and online to run the server.`}),e[49]=R,e[50]=G):(R=e[49],G=e[50]);let K;e[51]===O?K=e[52]:(K=O?(0,$.jsxs)(`p`,{children:[`To change which machine runs the server, open the ⋯ menu on another machine below and choose`,` `,(0,$.jsx)(`span`,{className:`font-medium text-foreground`,children:`Move server here`}),`.`]}):null,e[51]=O,e[52]=K),e[53]===K?te=e[54]:(te=(0,$.jsxs)(`div`,{role:`note`,"aria-label":`About the Moonlet server`,className:`flex items-start gap-3 rounded-lg border border-border bg-muted/40 px-4 py-3`,children:[N,(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1 text-xs leading-relaxed text-subtle-foreground`,children:[R,G,K]})]}),e[53]=K,e[54]=te);let ne=b&&`py-2`;e[55]===ne?z=e[56]:(z=q(`rounded-lg border border-border bg-card px-4 py-3.5`,ne),e[55]=ne,e[56]=z),B=E===void 0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`}):_.length===0?(0,$.jsx)(`p`,{className:`text-sm text-subtle-foreground`,children:`No machines yet.`}):j(_),e[4]=E,e[5]=a,e[6]=o,e[7]=i,e[8]=F,e[9]=M,e[10]=c,e[11]=d,e[12]=f,e[13]=l,e[14]=k,e[15]=O,e[16]=D,e[17]=g,e[18]=u,e[19]=t.data,e[20]=I,e[21]=L,e[22]=z,e[23]=B,e[24]=V,e[25]=U,e[26]=W,e[27]=ee,e[28]=te}else I=e[20],L=e[21],z=e[22],B=e[23],V=e[24],U=e[25],W=e[26],ee=e[27],te=e[28];let G;e[57]!==L||e[58]!==g?(G=L!==void 0&&L.length>0?(0,$.jsxs)(`button`,{type:`button`,"aria-expanded":g,onClick:()=>_(Wc),className:`-ml-1 inline-flex items-center gap-1.5 self-start rounded-md px-1.5 py-0.5 text-xs text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground`,children:[(0,$.jsx)(H,{name:`ChevronDown`,className:q(`size-3.5 transition-transform`,g&&`rotate-180`),"aria-hidden":!0}),(0,$.jsx)(`span`,{children:g?`Show fewer machines`:`Show all machines`})]}):null,e[57]=L,e[58]=g,e[59]=G):G=e[59];let K;e[60]!==z||e[61]!==B||e[62]!==G?(K=(0,$.jsxs)(`div`,{className:z,children:[B,G]}),e[60]=z,e[61]=B,e[62]=G,e[63]=K):K=e[63];let ne;e[64]!==I||e[65]!==K||e[66]!==V||e[67]!==U||e[68]!==W||e[69]!==ee||e[70]!==te?(ne=(0,$.jsxs)(I,{title:V,bodyClassName:U,action:W,children:[ee,te,K]}),e[64]=I,e[65]=K,e[66]=V,e[67]=U,e[68]=W,e[69]=ee,e[70]=te,e[71]=ne):ne=e[71];let re;e[72]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,$.jsx)(Mr,{}),e[72]=re):re=e[72];let ie;e[73]===m?ie=e[74]:(ie=(0,$.jsx)(Un,{open:m,onOpenChange:h}),e[73]=m,e[74]=ie);let oe;e[75]!==c.error||e[76]!==c.isError?(oe=c.isError?st({error:c.error,fallbackMessage:`Couldn't rename the machine.`}):null,e[75]=c.error,e[76]=c.isError,e[77]=oe):oe=e[77];let se;e[78]===c.isPending?se=e[79]:(se=e=>{!e&&!c.isPending&&y(null)},e[78]=c.isPending,e[79]=se);let ce;e[80]===c?ce=e[81]:(ce=(e,t)=>c.mutate({hostId:e.id,name:t},{onSuccess:()=>y(null)}),e[80]=c,e[81]=ce);let le;e[82]!==c.isPending||e[83]!==v||e[84]!==oe||e[85]!==se||e[86]!==ce?(le=(0,$.jsx)(Rr,{target:v,pending:c.isPending,errorMessage:oe,onOpenChange:se,onRename:ce}),e[82]=c.isPending,e[83]=v,e[84]=oe,e[85]=se,e[86]=ce,e[87]=le):le=e[87];let ue;e[88]!==E||e[89]!==S?(ue=E?.find(e=>e.id===S)??null,e[88]=E,e[89]=S,e[90]=ue):ue=e[90];let de;e[91]===Symbol.for(`react.memo_cache_sentinel`)?(de=e=>{e||C(null)},e[91]=de):de=e[91];let fe;e[92]===ue?fe=e[93]:(fe=(0,$.jsx)(Lr,{target:ue,onOpenChange:de}),e[92]=ue,e[93]=fe);let pe;e[94]===Symbol.for(`react.memo_cache_sentinel`)?(pe=e=>{e||x(null)},e[94]=pe):pe=e[94];let me;e[95]===b?me=e[96]:(me=(0,$.jsx)(Ir,{target:b,onOpenChange:pe}),e[95]=b,e[96]=me);let he;e[97]===Symbol.for(`react.memo_cache_sentinel`)?(he=e=>{e||T(null)},e[97]=he):he=e[97];let ge;e[98]===w?ge=e[99]:(ge=(0,$.jsx)(Fr,{target:w,onOpenChange:he}),e[98]=w,e[99]=ge);let ve;return e[100]!==ne||e[101]!==ie||e[102]!==le||e[103]!==fe||e[104]!==me||e[105]!==ge?(ve=(0,$.jsxs)($.Fragment,{children:[ne,re,ie,le,fe,me,ge]}),e[100]=ne,e[101]=ie,e[102]=le,e[103]=fe,e[104]=me,e[105]=ge,e[106]=ve):ve=e[106],ve}function Wc(e){return!e}function Gc(e){return[e.id,e]}function Kc(e){return e.type===`ephemeral`}function qc(e){let{issue:t}=e;return t.offline}function Jc(e){let t=Ne(e);return t===null?[]:[{host:e,issue:t}]}function Yc(e){return e.type===`persistent`}function Xc(e){return e.hostId}var Zc=`all`,Qc=50,$c=[{label:`All threads`,value:`all`},{label:`Threads`,value:`root`},{label:`Child threads`,value:`child`}];function el(e){let t=(0,Z.c)(22),{icon:n,label:r,onChange:i,options:a,value:o}=e,s;t[0]===n?s=t[1]:(s=(0,$.jsx)(H,{name:n,className:`size-3.5 shrink-0`}),t[0]=n,t[1]=s);let c;t[2]===r?c=t[3]:(c=(0,$.jsx)(`span`,{className:`truncate`,children:r}),t[2]=r,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(H,{name:`ChevronDown`,className:`size-3.5 shrink-0`}),t[7]=u):u=t[7];let d;t[8]===l?d=t[9]:(d=(0,$.jsx)(Mt,{asChild:!0,children:(0,$.jsxs)(J,{type:`button`,variant:`outline`,className:`h-8 min-w-36 justify-between gap-2 px-3 text-xs font-normal`,children:[l,u]})}),t[8]=l,t[9]=d);let f;if(t[10]!==i||t[11]!==a||t[12]!==o){let e;t[14]!==i||t[15]!==o?(e=e=>(0,$.jsxs)(Jt,{onSelect:()=>i(e.value),children:[(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.value===o?(0,$.jsx)(H,{name:`Check`,className:`size-3.5`}):null]},e.value),t[14]=i,t[15]=o,t[16]=e):e=t[16],f=a.map(e),t[10]=i,t[11]=a,t[12]=o,t[13]=f}else f=t[13];let p;t[17]===f?p=t[18]:(p=(0,$.jsx)(hn,{align:`end`,className:`min-w-44`,children:f}),t[17]=f,t[18]=p);let m;return t[19]!==d||t[20]!==p?(m=(0,$.jsxs)(mt,{children:[d,p]}),t[19]=d,t[20]=p,t[21]=m):m=t[21],m}function tl(e,t,n){let r=t.trim().toLocaleLowerCase();return r.length===0?e:e.filter(e=>{let t=en(e);return[t,n(t)].some(e=>e.toLocaleLowerCase().includes(r))})}function nl(){let e=(0,Z.c)(63),[t,n]=(0,Q.useState)(``),[r,i]=(0,Q.useState)(`all`),[a,o]=(0,Q.useState)(Zc),s=_e(),c;e[0]===t?c=e[1]:(c=rn(t),e[0]=t,e[1]=c);let l=c,u;e[2]===a?u=e[3]:(u=a===Zc?{}:{projectId:a},e[2]=a,e[3]=u);let d;e[4]!==r||e[5]!==u?(d={...u,kind:r},e[4]=r,e[5]=u,e[6]=d):d=e[6];let f=!l,p;e[7]===f?p=e[8]:(p={enabled:f},e[7]=f,e[8]=p);let m=Yt(d,p),h;e[9]!==t||e[10]!==l?(h={active:l,limitPerGroup:Qc,query:t},e[9]=t,e[10]=l,e[11]=h):h=e[11];let g=lt(h),_=xe(),v=at(),y;bb0:{if(!s.data){let t;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[12]=t):t=e[12],y=t;break bb0}let t;e[13]!==s.data.personalProject||e[14]!==s.data.projects?(t=[s.data.personalProject,...s.data.projects],e[13]=s.data.personalProject,e[14]=s.data.projects,e[15]=t):t=e[15],y=t}let b=y,x;e[16]===b?x=e[17]:(x=new Map(b.map(il)),e[16]=b,e[17]=x);let S=x,w;if(e[18]!==m.data?.pages||e[19]!==r||e[20]!==a||e[21]!==v||e[22]!==t||e[23]!==l||e[24]!==g.data?.archived){let n=l?g.data?.archived.results.map(rl)??[]:(m.data?.pages??[]).flat(),i;e[26]!==r||e[27]!==a?(i=e=>e.archivedAt!==null&&(a===Zc||e.projectId===a)&&(r===`all`||e.parentThreadId!==null==(r===`child`)),e[26]=r,e[27]=a,e[28]=i):i=e[28];let o=n.filter(i);w=l?o:tl(o,t,v),e[18]=m.data?.pages,e[19]=r,e[20]=a,e[21]=v,e[22]=t,e[23]=l,e[24]=g.data?.archived,e[25]=w}else w=e[25];let T=w,E;if(e[29]!==T){let t=new Map;for(let e of T){let n=t.get(e.projectId);n?n.push(e):t.set(e.projectId,[e])}E=[...t.entries()],e[29]=T,e[30]=E}else E=e[30];let D=E,O;e[31]===r?O=e[32]:(O=$c.find(e=>e.value===r)?.label??`All threads`,e[31]=r,e[32]=O);let k=O,A=l?g.isDebouncing||g.isLoading&&g.data===void 0:m.isPending,j;e[33]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-lg font-semibold text-foreground`,children:`Archived threads`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-subtle-foreground`,children:`Find and restore archived threads from across your projects.`})]}),e[33]=j):j=e[33];let M;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(H,{name:`Search`,className:`pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-subtle-foreground`}),e[34]=M):M=e[34];let N;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>n(e.target.value),e[35]=N):N=e[35];let P;e[36]===t?P=e[37]:(P=(0,$.jsxs)(`div`,{className:`relative min-w-56 flex-1`,children:[M,(0,$.jsx)(Bt,{"aria-label":`Search archived threads`,className:`h-8 pl-8 text-xs`,onChange:N,placeholder:`Search archived threads…`,value:t})]}),e[36]=t,e[37]=P);let F;e[38]!==r||e[39]!==k?(F=(0,$.jsx)(el,{icon:`SlidersHorizontal`,label:k,onChange:i,options:$c,value:r}),e[38]=r,e[39]=k,e[40]=F):F=e[40];let I;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>o(e??Zc),e[41]=I):I=e[41];let L;e[42]!==a||e[43]!==b?(L=(0,$.jsx)(jr,{projects:b,value:a,onChange:I,allProjectsValue:Zc,variant:`outline`,modal:!1,className:`min-w-36 justify-between gap-2 px-3 font-normal`}),e[42]=a,e[43]=b,e[44]=L):L=e[44];let R;e[45]!==P||e[46]!==F||e[47]!==L?(R=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[P,F,L]}),e[45]=P,e[46]=F,e[47]=L,e[48]=R):R=e[48];let z;e[49]!==T||e[50]!==D||e[51]!==A||e[52]!==S||e[53]!==t||e[54]!==_?(z=A?(0,$.jsx)(`p`,{className:`py-8 text-center text-sm text-muted-foreground`,children:`Loading archived threads…`}):T.length===0?(0,$.jsx)(mn,{className:`py-8`,children:t.trim().length>0?`No archived threads match your search.`:`No archived threads match these filters.`}):(0,$.jsx)(`div`,{className:`space-y-6`,children:D.map(e=>{let[t,n]=e;return(0,$.jsxs)(`section`,{className:`space-y-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 px-0.5 text-xs font-medium text-muted-foreground`,children:[(0,$.jsx)(H,{name:`Folder`,className:`size-3.5`}),(0,$.jsx)(`h3`,{className:`min-w-0 flex-1 truncate`,children:S.get(t)??`Unknown project`}),(0,$.jsxs)(`span`,{children:[n.length,` `,n.length===1?`thread`:`threads`]})]}),(0,$.jsx)(`div`,{className:`divide-y divide-border overflow-hidden rounded-lg border border-border bg-card`,children:n.map(e=>(0,$.jsxs)(`div`,{className:`flex min-h-14 items-center gap-3 px-4 py-2.5`,children:[(0,$.jsxs)(C,{className:`min-w-0 flex-1`,to:Me({projectId:e.projectId,threadId:e.id}),children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-sm`,children:[(0,$.jsx)(Re,{title:en(e)}),e.parentThreadId===null?null:(0,$.jsx)(Le,{variant:`outline`,className:`shrink-0`,children:(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 align-middle`,children:[(0,$.jsx)(H,{name:`ChildThread`,className:`size-3`,"aria-hidden":!0}),Tn]})})]}),e.archivedAt===null?null:(0,$.jsxs)(`span`,{className:`mt-0.5 block text-xs text-subtle-foreground`,children:[`Archived`,` `,we({timestamp:e.archivedAt,now:Date.now()})]})]}),(0,$.jsx)(ri,{variant:`secondary`,isPending:_.isPending&&_.variables?.id===e.id,onUnarchive:()=>_.mutate({id:e.id})})]},e.id))})]},t)})}),e[49]=T,e[50]=D,e[51]=A,e[52]=S,e[53]=t,e[54]=_,e[55]=z):z=e[55];let B;e[56]!==m||e[57]!==l?(B=!l&&m.hasNextPage?(0,$.jsx)(J,{type:`button`,variant:`ghost`,className:`h-9 w-full text-sm font-normal text-muted-foreground`,disabled:m.isFetchingNextPage,onClick:()=>m.fetchNextPage(),children:m.isFetchingNextPage?`Loading…`:`Load more`}):null,e[56]=m,e[57]=l,e[58]=B):B=e[58];let V;return e[59]!==R||e[60]!==z||e[61]!==B?(V=(0,$.jsxs)(`section`,{className:`space-y-5`,children:[j,R,z,B]}),e[59]=R,e[60]=z,e[61]=B,e[62]=V):V=e[62],V}function rl(e){return e.thread}function il(e){return[e.id,e.name]}var al=`Moonlet CLI`;function ol(e){return e.installedPath===null?e.shadowedBy===null?`Install the Moonlet CLI for use outside Moonlet. You can control Moonlet from any terminal, and so can agents outside Moonlet, such as Claude Code or Codex. Threads in Moonlet already have it.`:e.shadowedBy.source===`npm`?`Already installed for use outside Moonlet at ${e.shadowedBy.path}, by npm.`:e.shadowedBy.source===`machine`?`Already installed for use outside Moonlet at ${e.shadowedBy.path}, with the Moonlet machine on this computer.`:`Another Moonlet at ${e.shadowedBy.path} comes first on your PATH. Remove it to install this one.`:e.onPath?`Installed at ${e.installedPath}. You can control Moonlet from any terminal, and so can agents outside Moonlet, such as Claude Code or Codex.`:`Installed at ${e.installedPath}, but its folder is not on your PATH. Add the folder to your PATH to use the CLI outside Moonlet.`}function sl(e){let t=(0,Z.c)(16),{onChange:n,pending:r,status:i}=e,a=i.installedPath!==null,o;t[0]===a?o=t[1]:(o=a?{labelBadge:`Installed`}:{},t[0]=a,t[1]=o);let s;t[2]===i?s=t[3]:(s=ol(i),t[2]=i,t[3]=s);let c=r||!a&&i.shadowedBy!==null,l;t[4]!==a||t[5]!==n?(l=()=>n(a?`remove`:`install`),t[4]=a,t[5]=n,t[6]=l):l=t[6];let u=`${a?`Remove`:`Install`} ${al}`,d=a?`Remove`:`Install`,f;t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d?(f=(0,$.jsx)(J,{type:`button`,variant:`outline`,size:`sm`,disabled:c,onClick:l,"aria-label":u,children:d}),t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f):f=t[11];let p;return t[12]!==o||t[13]!==s||t[14]!==f?(p=(0,$.jsx)(Y,{title:`Command line`,children:(0,$.jsx)(X,{controlPlacement:`trailing`,label:al,...o,description:s,children:f})}),t[12]=o,t[13]=s,t[14]=f,t[15]=p):p=t[15],p}function cl(){let e=(0,Z.c)(7),t=I(),n=yt(),r=t.data;if(r===void 0||!r.supported)return null;let i=n.isPending||t.isRefetching,a;e[0]!==n||e[1]!==t?(a=e=>n.mutate(e,{onSettled:()=>{t.refetch()}}),e[0]=n,e[1]=t,e[2]=a):a=e[2];let o;return e[3]!==r||e[4]!==i||e[5]!==a?(o=(0,$.jsx)(sl,{status:r,pending:i,onChange:a}),e[3]=r,e[4]=i,e[5]=a,e[6]=o):o=e[6],o}var ll={installed:`Installed`,outdated:`Out of date`,missing:`Not installed`,unknown:null};function ul(e){return e.status===`connected`}function dl(e){return e.connected?e.status===void 0?null:ll[e.status]:`Disconnected`}function fl(e){let t=(0,Z.c)(32),{hosts:n,onCancel:r,onInstall:i,pending:a,statusByHostId:o}=e,s;t[0]===n?s=t[1]:(s=n.filter(ul).map(pl),t[0]=n,t[1]=s);let c=s,[l,u]=(0,Q.useState)(c),d=n.length>1,f;t[2]!==d||t[3]!==c||t[4]!==l?(f=d?l.filter(e=>c.includes(e)):c,t[2]=d,t[3]=c,t[4]=l,t[5]=f):f=t[5];let p=f,m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(W,{children:`Install Moonlet CLI skills`}),t[6]=m):m=t[6];let h=d?`Choose the machines to install them onto. Each one gets the skills in ~/.agents/skills and ~/.claude/skills, replacing any copy already there.`:`The skills go in ~/.agents/skills and ~/.claude/skills on ${n[0]?.name??`the selected machine`}, replacing any copy already there.`,g;t[7]===h?g=t[8]:(g=(0,$.jsxs)(K,{children:[m,(0,$.jsx)(wn,{children:h})]}),t[7]=h,t[8]=g);let _;t[9]!==d||t[10]!==n||t[11]!==a||t[12]!==p||t[13]!==o?(_=d?(0,$.jsx)(`div`,{className:`flex flex-col gap-1 py-1`,children:n.map(e=>{let t=ul(e),n=dl({connected:t,status:o.get(e.id)});return(0,$.jsxs)(`label`,{className:`flex items-center gap-2.5 rounded-md px-1 py-2 text-sm has-[:disabled]:opacity-60`,children:[(0,$.jsx)(nr,{checked:p.includes(e.id),disabled:!t||a,onCheckedChange:t=>u(n=>t===!0?[...n,e.id]:n.filter(t=>t!==e.id)),"aria-label":e.name}),(0,$.jsx)(St,{connected:t}),(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:e.name}),n===null?null:(0,$.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-subtle-foreground`,children:n})]},e.id)})}):null,t[9]=d,t[10]=n,t[11]=a,t[12]=p,t[13]=o,t[14]=_):_=t[14];let v;t[15]!==r||t[16]!==a?(v=(0,$.jsx)(J,{type:`button`,variant:`outline`,disabled:a,onClick:r,children:`Cancel`}),t[15]=r,t[16]=a,t[17]=v):v=t[17];let y=a||p.length===0,b;t[18]!==i||t[19]!==p?(b=()=>i([...p]),t[18]=i,t[19]=p,t[20]=b):b=t[20];let x=a?`Installing…`:`Install`,S;t[21]!==x||t[22]!==y||t[23]!==b?(S=(0,$.jsx)(J,{type:`button`,disabled:y,onClick:b,children:x}),t[21]=x,t[22]=y,t[23]=b,t[24]=S):S=t[24];let C;t[25]!==S||t[26]!==v?(C=(0,$.jsxs)(We,{children:[v,S]}),t[25]=S,t[26]=v,t[27]=C):C=t[27];let w;return t[28]!==C||t[29]!==g||t[30]!==_?(w=(0,$.jsxs)($.Fragment,{children:[g,_,C]}),t[28]=C,t[29]=g,t[30]=_,t[31]=w):w=t[31],w}function pl(e){return e.id}function ml(e){let t=(0,Z.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({onOpenChange:r,open:i,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]!==n||t[5]!==i?(a=i?(0,$.jsx)(fl,{...n}):null,t[4]=n,t[5]=i,t[6]=a):a=t[6];let o;t[7]===a?o=t[8]:(o=(0,$.jsx)(z,{children:a}),t[7]=a,t[8]=o);let s;return t[9]!==r||t[10]!==i||t[11]!==o?(s=(0,$.jsx)(Be,{open:i,onOpenChange:r,children:o}),t[9]=r,t[10]=i,t[11]=o,t[12]=s):s=t[12],s}var hl=`Moonlet CLI skills`;function gl(e){return e?`Install them into ~/.agents/skills and ~/.claude/skills so agents outside Moonlet can use the Moonlet CLI.`:`Connect a machine to install them into ~/.agents/skills and ~/.claude/skills.`}function _l(e){let t=e.filter(e=>e!==`unknown`);if(t.length===0)return null;let n=t.filter(e=>e===`installed`).length;return n===t.length?t.length>1?`Installed on ${t.length} machines`:`Installed`:n>0?`Installed on ${n} of ${t.length} machines`:t.some(e=>e===`outdated`)?`Out of date`:`Not installed`}function vl(e){let t=(0,Z.c)(12),{hasConnectedMachine:n,onOpenPicker:r,pending:i,statusBadge:a}=e,o;t[0]===a?o=t[1]:(o=a===null?{}:{labelBadge:a},t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=gl(n),t[2]=n,t[3]=s);let c=!n||i,l=i?`Installing…`:`Install`,u;t[4]!==r||t[5]!==c||t[6]!==l?(u=(0,$.jsx)(J,{type:`button`,variant:`outline`,size:`sm`,disabled:c,onClick:r,"aria-label":`Install ${hl}`,children:l}),t[4]=r,t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;return t[8]!==o||t[9]!==s||t[10]!==u?(d=(0,$.jsx)(Y,{title:`Skills`,children:(0,$.jsx)(X,{controlPlacement:`trailing`,label:hl,...o,description:s,children:u})}),t[8]=o,t[9]=s,t[10]=u,t[11]=d):d=t[11],d}function yl(e){let t=e.results.filter(e=>e.ok),n=e.results.filter(e=>!e.ok);t.length>0&&Sn.success(`Installed the Moonlet CLI skills on ${t.map(e=>e.hostName).join(`, `)}`);for(let e of n)Sn.error(`${e.hostName}: ${e.errorMessage}`)}function bl(e){return new Map((e?.machines??[]).map(e=>[e.hostId,e.status]))}function xl(){let e=(0,Z.c)(31),t=Ie(),n=Xe(),r=Tt(),[i,a]=(0,Q.useState)(!1),o;e[0]===t.data?o=e[1]:(o=un(t.data,`persistent`),e[0]=t.data,e[1]=o);let s=o,c,l,u,d,f;e[2]!==s||e[3]!==r.isPending||e[4]!==n.data?(l=bl(n.data),c=vl,e[10]===s?u=e[11]:(u=s.some(Sl),e[10]=s,e[11]=u),d=r.isPending,f=_l([...l.values()]),e[2]=s,e[3]=r.isPending,e[4]=n.data,e[5]=c,e[6]=l,e[7]=u,e[8]=d,e[9]=f):(c=e[5],l=e[6],u=e[7],d=e[8],f=e[9]);let p;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>a(!0),e[12]=p):p=e[12];let m;e[13]!==c||e[14]!==u||e[15]!==d||e[16]!==f?(m=(0,$.jsx)(c,{hasConnectedMachine:u,pending:d,statusBadge:f,onOpenPicker:p}),e[13]=c,e[14]=u,e[15]=d,e[16]=f,e[17]=m):m=e[17];let h;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>a(!1),e[18]=h):h=e[18];let g;e[19]!==r||e[20]!==n?(g=e=>r.mutate({hostIds:e},{onSuccess:e=>{a(!1),yl(e),n.refetch()}}),e[19]=r,e[20]=n,e[21]=g):g=e[21];let _;e[22]!==s||e[23]!==r.isPending||e[24]!==i||e[25]!==l||e[26]!==g?(_=(0,$.jsx)(ml,{open:i,onOpenChange:a,hosts:s,statusByHostId:l,pending:r.isPending,onCancel:h,onInstall:g}),e[22]=s,e[23]=r.isPending,e[24]=i,e[25]=l,e[26]=g,e[27]=_):_=e[27];let v;return e[28]!==m||e[29]!==_?(v=(0,$.jsxs)($.Fragment,{children:[m,_]}),e[28]=m,e[29]=_,e[30]=v):v=e[30],v}function Sl(e){return e.status===`connected`}var Cl=_(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-foreground text-background shadow-xs`,secondary:`border-transparent bg-secondary text-secondary-foreground`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow-xs`,outline:`text-foreground`}},defaultVariants:{variant:`default`}});function wl(e){let t=(0,Z.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]!==n||t[5]!==i?(a=q(Cl({variant:i}),n),t[4]=n,t[5]=i,t[6]=a):a=t[6];let o;return t[7]!==r||t[8]!==a?(o=(0,$.jsx)(`div`,{className:a,...r}),t[7]=r,t[8]=a,t[9]=o):o=t[9],o}var Tl=`https://example.com/marketplace.json`,El=`Subdirectory (optional)`;function Dl(e){return e.lastError===null?e.lastRefreshAt===null?`Never refreshed`:`Refreshed ${new Date(e.lastRefreshAt).toLocaleString()}`:`Last refresh failed: ${e.lastError}`}function Ol(){let e=(0,Z.c)(73),t=T(),[n,r]=(0,Q.useState)(``),[i,a]=(0,Q.useState)(``),o;e[0]===n?o=e[1]:(o=n.trimStart().startsWith(`git:`),e[0]=n,e[1]=o);let s=o,[c,l]=(0,Q.useState)(null),u;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(u={enabled:!0},e[2]=u):u=e[2];let d=Fe(u),f;e[3]===d.data?f=e[4]:(f=d.data??[],e[3]=d.data,e[4]=f);let p=f,m;e[5]===t?m=e[6]:(m=()=>ce({queryClient:t}),e[5]=t,e[6]=m);let h=m,g;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(g={showErrorToast:!1},e[7]=g):g=e[7];let _;e[8]===h?_=e[9]:(_={meta:g,mutationFn:Fl,onSuccess:e=>{r(``),a(``),h(),Sn.success(`Added ${e.displayName}`,{description:`${e.entryCount} plugins listed. Adding a marketplace installs nothing.`})},onError:Pl},e[8]=h,e[9]=_);let v=E(_),y;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(y={showErrorToast:!1},e[10]=y):y=e[10];let b;e[11]===h?b=e[12]:(b={meta:y,mutationFn:Nl,onSuccess:e=>{h();let t=e.filter(Ml);if(t.length===0){Sn.success(`Marketplace refreshed`);return}Sn.error(`Refreshing the marketplace failed`,{description:`${t[0]?.error??`Unknown error`}. The last catalog Moonlet validated is still in use.`})},onError:jl},e[11]=h,e[12]=b);let x=E(b),S;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(S={showErrorToast:!1},e[13]=S):S=e[13];let C;e[14]===h?C=e[15]:(C={meta:S,mutationFn:Al,onSuccess:e=>{l(null),h(),Sn.success(`Marketplace removed`,{description:e.convertedPluginIds.length===0?void 0:`Kept as direct installs: ${e.convertedPluginIds.join(`, `)}`})},onError:kl},e[14]=h,e[15]=C);let w=E(C),D;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>r(e.target.value),e[16]=D):D=e[16];let O;e[17]===n?O=e[18]:(O=(0,$.jsx)(Bt,{value:n,"aria-label":`Marketplace source`,placeholder:Tl,className:`h-8 font-mono text-xs`,onChange:D}),e[17]=n,e[18]=O);let k;e[19]!==s||e[20]!==i?(k=s?(0,$.jsx)(Bt,{value:i,"aria-label":`Marketplace subdirectory`,placeholder:El,className:`h-8 font-mono text-xs`,onChange:e=>a(e.target.value)}):null,e[19]=s,e[20]=i,e[21]=k):k=e[21];let A;e[22]!==O||e[23]!==k?(A=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1.5`,children:[O,k]}),e[22]=O,e[23]=k,e[24]=A):A=e[24];let j;e[25]!==v.isPending||e[26]!==n?(j=n.trim().length===0||v.isPending,e[25]=v.isPending,e[26]=n,e[27]=j):j=e[27];let M;e[28]!==v||e[29]!==s||e[30]!==n||e[31]!==i?(M=()=>v.mutate({source:n.trim(),subdirectory:s&&i.trim().length>0?i.trim():null}),e[28]=v,e[29]=s,e[30]=n,e[31]=i,e[32]=M):M=e[32];let N=v.isPending?`Adding…`:`Add`,P;e[33]!==j||e[34]!==M||e[35]!==N?(P=(0,$.jsx)(J,{type:`button`,size:`sm`,disabled:j,onClick:M,children:N}),e[33]=j,e[34]=M,e[35]=N,e[36]=P):P=e[36];let F;e[37]!==A||e[38]!==P?(F=(0,$.jsxs)(`div`,{className:`flex items-start gap-2`,children:[A,P]}),e[37]=A,e[38]=P,e[39]=F):F=e[39];let I;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsx)(`code`,{children:`git:<url>[@<ref>]`}),e[40]=I):I=e[40];let L;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(`code`,{children:`path:<directory>`}),e[41]=L):L=e[41];let R=s?` Set a subdirectory when the repository keeps marketplace.json outside its root.`:null,z;e[42]===R?z=e[43]:(z=(0,$.jsxs)(`p`,{className:`text-2xs text-subtle-foreground`,children:[`An https manifest URL, `,I,`, or`,` `,L,` on the Moonlet server’s machine.`,R]}),e[42]=R,e[43]=z);let B;e[44]!==F||e[45]!==z?(B=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[F,z]}),e[44]=F,e[45]=z,e[46]=B):B=e[46];let V;if(e[47]!==p||e[48]!==x){let t;e[50]===x?t=e[51]:(t=e=>(0,$.jsxs)(`li`,{className:`flex items-start gap-3 rounded-md border border-border p-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-foreground`,children:[e.displayName,(0,$.jsx)(`span`,{className:`font-mono text-2xs text-subtle-foreground`,children:e.name}),e.official?(0,$.jsx)(wl,{variant:`outline`,className:`text-2xs font-normal`,children:`Official`}):null]}),(0,$.jsxs)(`p`,{className:`truncate font-mono text-2xs text-subtle-foreground`,children:[e.source,e.subdirectory===null?null:` · subdirectory ${e.subdirectory}`]}),(0,$.jsxs)(`p`,{className:`text-2xs text-subtle-foreground`,children:[e.entryCount,` plugins ·`,` `,Dl(e)]})]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 gap-1.5`,children:[(0,$.jsx)(J,{type:`button`,variant:`outline`,size:`sm`,disabled:x.isPending,"aria-label":`Refresh ${e.displayName}`,onClick:()=>x.mutate(e.name),children:`Refresh`}),e.official?null:(0,$.jsx)(J,{type:`button`,variant:`outline`,size:`sm`,"aria-label":`Remove ${e.displayName}`,onClick:()=>l(e),children:`Remove`})]})]},e.name),e[50]=x,e[51]=t),V=p.map(t),e[47]=p,e[48]=x,e[49]=V}else V=e[49];let H;e[52]===V?H=e[53]:(H=(0,$.jsx)(`ul`,{className:`space-y-2 pt-3`,children:V}),e[52]=V,e[53]=H);let U=c!==null,W;e[54]===w.isPending?W=e[55]:(W=e=>{!e&&!w.isPending&&l(null)},e[54]=w.isPending,e[55]=W);let ee=`Remove ${c?.displayName??`marketplace`}?`,te=w.isPending?`Removing…`:`Remove`,G;e[56]!==w||e[57]!==c?(G=()=>{c!==null&&w.mutate(c.name)},e[56]=w,e[57]=c,e[58]=G):G=e[58];let K;e[59]===Symbol.for(`react.memo_cache_sentinel`)?(K=()=>l(null),e[59]=K):K=e[59];let ne;e[60]!==w.isPending||e[61]!==ee||e[62]!==te||e[63]!==G?(ne=(0,$.jsx)(it,{title:ee,description:`Its catalog and cached icons are deleted. Plugins installed from it keep running as direct installs and keep checking for updates from their recorded source.`,confirmLabel:te,pending:w.isPending,onConfirm:G,onCancel:K}),e[60]=w.isPending,e[61]=ee,e[62]=te,e[63]=G,e[64]=ne):ne=e[64];let re;e[65]!==U||e[66]!==W||e[67]!==ne?(re=(0,$.jsx)(me,{open:U,onOpenChange:W,children:ne}),e[65]=U,e[66]=W,e[67]=ne,e[68]=re):re=e[68];let q;return e[69]!==B||e[70]!==H||e[71]!==re?(q=(0,$.jsxs)(Y,{title:`Plugin marketplaces`,description:`Moonlet reads plugin catalogs from these marketplaces. Adding one validates and caches its catalog; it never installs, updates, or runs plugin code.`,bodyClassName:`border-0 bg-transparent p-0`,children:[B,H,re]}),e[69]=B,e[70]=H,e[71]=re,e[72]=q):q=e[72],q}function kl(e){Sn.error(`Removing the marketplace failed`,{description:ti(e)})}function Al(e){return pe(fetch,e)}function jl(e){Sn.error(`Refreshing the marketplace failed`,{description:ti(e)})}function Ml(e){return!e.ok}function Nl(e){return ln(fetch,e)}function Pl(e){Sn.error(`Adding the marketplace failed`,{description:ti(e)})}function Fl(e){return ge(fetch,e)}var Il=`https://github.com/get-bb/bb/blob/main/docs/multiple-devices.md#open-bb-from-another-browser`;function Ll(e,t){return Dt.find(t=>t.id===e.themeId)?.name??t.find(t=>t.id===e.themeId)?.name??e.themeId}var Rl=[{label:`System`,value:`system`},{label:`Light`,value:`light`},{label:`Dark`,value:`dark`}],zl={dark:`Dark`,light:`Light`,system:`System`},Bl=[{label:`Default`,value:`default`},{label:`Red`,value:`red`},{label:`Orange`,value:`orange`},{label:`Yellow`,value:`yellow`},{label:`Green`,value:`green`},{label:`Teal`,value:`teal`},{label:`Blue`,value:`blue`},{label:`Purple`,value:`purple`},{label:`Pink`,value:`pink`}],Vl={blue:`Blue`,default:`Default`,green:`Green`,orange:`Orange`,pink:`Pink`,purple:`Purple`,red:`Red`,teal:`Teal`,yellow:`Yellow`},Hl=`h-7 w-full justify-between border-border/60 bg-card px-2 text-xs @min-[36rem]/settings:w-36`,Ul=`min-w-[var(--radix-dropdown-menu-trigger-width)]`,Wl="Create a custom Moonlet palette. First run `moonlet theme dir` to find the custom theme directory. Ask me for the palette name and visual direction, then create `<theme-dir>/<name>/theme.css` with light and dark theme variables compatible with Moonlet's theme tokens.",Gl=`Palettes change Moonlet's colors, including syntax colors in diffs and file previews. Choose a built-in palette or create one from a prompt.`;function Kl(e){let t=(0,Z.c)(18),{active:n,children:r,onPreview:i,onSelect:a,themeId:o}=e,s;t[0]!==i||t[1]!==o?(s=()=>i(o),t[0]=i,t[1]=o,t[2]=s):s=t[2];let c;t[3]===i?c=t[4]:(c=()=>i(null),t[3]=i,t[4]=c);let l;t[5]!==a||t[6]!==o?(l=()=>a(o),t[5]=a,t[6]=o,t[7]=l):l=t[7];let u=!n&&`opacity-0`,d;t[8]===u?d=t[9]:(d=q(`ml-auto`,u,It),t[8]=u,t[9]=d);let f;t[10]===d?f=t[11]:(f=(0,$.jsx)(H,{name:`Check`,className:d}),t[10]=d,t[11]=f);let p;return t[12]!==r||t[13]!==s||t[14]!==c||t[15]!==l||t[16]!==f?(p=(0,$.jsxs)(Jt,{onFocus:s,onBlur:c,onSelect:l,children:[r,f]}),t[12]=r,t[13]=s,t[14]=c,t[15]=l,t[16]=f,t[17]=p):p=t[17],p}function ql(e){let t=(0,Z.c)(10),{value:n}=e,r=n===`default`&&`bg-foreground`,i;t[0]===r?i=t[1]:(i=q(`size-4 shrink-0`,r),t[0]=r,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=U(),t[2]=a):a=t[2];let o;t[3]===n?o=t[4]:(o=n===`default`?void 0:{backgroundColor:G[n]},t[3]=n,t[4]=o);let s;t[5]===o?s=t[6]:(s={mask:`url("${a}") center / contain no-repeat`,...o},t[5]=o,t[6]=s);let c;return t[7]!==i||t[8]!==s?(c=(0,$.jsx)(`span`,{"aria-hidden":!0,className:i,style:s}),t[7]=i,t[8]=s,t[9]=c):c=t[9],c}function Jl(e){let t=(0,Z.c)(19),{disabled:n,faviconColor:r,onFaviconColorChange:i}=e,a;t[0]===r?a=t[1]:(a=(0,$.jsx)(ql,{value:r}),t[0]=r,t[1]=a);let o=Vl[r],s;t[2]===o?s=t[3]:(s=(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:o}),t[2]=o,t[3]=s);let c;t[4]!==a||t[5]!==s?(c=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[a,s]}),t[4]=a,t[5]=s,t[6]=c):c=t[6];let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(H,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),t[7]=l):l=t[7];let u;t[8]!==n||t[9]!==c?(u=(0,$.jsx)(Mt,{asChild:!0,children:(0,$.jsxs)(J,{variant:`outline`,size:`sm`,className:Hl,"aria-label":`Favicon color`,disabled:n,children:[c,l]})}),t[8]=n,t[9]=c,t[10]=u):u=t[10];let d;t[11]!==r||t[12]!==i?(d=Bl.map(e=>(0,$.jsxs)(Jt,{onSelect:()=>i(e.value),children:[(0,$.jsx)(ql,{value:e.value}),e.label,(0,$.jsx)(H,{name:`Check`,className:q(`ml-auto`,r!==e.value&&`opacity-0`,It)})]},e.value)),t[11]=r,t[12]=i,t[13]=d):d=t[13];let f;t[14]===d?f=t[15]:(f=(0,$.jsx)(hn,{align:`end`,className:Ul,children:d}),t[14]=d,t[15]=f);let p;return t[16]!==u||t[17]!==f?(p=(0,$.jsx)(X,{label:`Favicon color`,description:`Tint browser tabs to tell instances apart.`,children:(0,$.jsxs)(mt,{children:[u,f]})}),t[16]=u,t[17]=f,t[18]=p):p=t[18],p}var Yl={capability:`openDirectory`,emptyDescription:`No local app can open directories.`,label:`Directory default`},Xl={capability:`openFile`,emptyDescription:`No local app can open files.`,label:`File default`};function Zl(e){let t=(0,Z.c)(37),{definition:n,onTargetChange:r,preferredTargetId:i,targets:a}=e,o;if(t[0]!==n.capability||t[1]!==a){let e;t[3]===n.capability?e=t[4]:(e=e=>ir({capability:n.capability,target:e}),t[3]=n.capability,t[4]=e),o=a.filter(e),t[0]=n.capability,t[1]=a,t[2]=o}else o=t[2];let s=o,c;t[5]!==n.capability||t[6]!==i||t[7]!==a?(c=sr({capability:n.capability,preferredTargetId:i,targets:a}),t[5]=n.capability,t[6]=i,t[7]=a,t[8]=c):c=t[8];let l=c,u=s.length===0?n.emptyDescription:null,d=l?.id??i,f;t[9]!==i||t[10]!==l?.label?(f=l?.label??(i?gr(i):`Unavailable`),t[9]=i,t[10]=l?.label,t[11]=f):f=t[11];let p=f,m;t[12]!==l||t[13]!==d?(m=d?(0,$.jsx)(mr,{...l?{target:l}:{targetId:d},className:`size-5`}):null,t[12]=l,t[13]=d,t[14]=m):m=t[14];let h;t[15]===p?h=t[16]:(h=(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:p}),t[15]=p,t[16]=h);let g;t[17]!==m||t[18]!==h?(g=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[m,h]}),t[17]=m,t[18]=h,t[19]=g):g=t[19];let _;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(H,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),t[20]=_):_=t[20];let v;t[21]!==n.label||t[22]!==g?(v=(0,$.jsx)(Mt,{asChild:!0,children:(0,$.jsxs)(J,{variant:`outline`,size:`sm`,className:Hl,"aria-label":n.label,children:[g,_]})}),t[21]=n.label,t[22]=g,t[23]=v):v=t[23];let y;t[24]!==s||t[25]!==r||t[26]!==l?.id||t[27]!==u?(y=u?(0,$.jsx)(`div`,{role:`note`,className:`px-2 py-[0.3125rem] text-xs leading-snug text-foreground`,children:u}):s.map(e=>(0,$.jsxs)(Jt,{onSelect:()=>r(e.id),children:[(0,$.jsx)(mr,{target:e,className:`size-5`}),(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label}),(0,$.jsx)(H,{name:`Check`,className:q(`ml-auto`,l?.id!==e.id&&`opacity-0`,It)})]},e.id)),t[24]=s,t[25]=r,t[26]=l?.id,t[27]=u,t[28]=y):y=t[28];let b;t[29]===y?b=t[30]:(b=(0,$.jsx)(hn,{align:`end`,className:Ul,children:y}),t[29]=y,t[30]=b);let x;t[31]!==b||t[32]!==v?(x=(0,$.jsxs)(mt,{children:[v,b]}),t[31]=b,t[32]=v,t[33]=x):x=t[33];let S;return t[34]!==n.label||t[35]!==x?(S=(0,$.jsx)(X,{label:n.label,children:x}),t[34]=n.label,t[35]=x,t[36]=S):S=t[36],S}function Ql({accessState:e,directoryTargetId:t,fileTargetId:n,hasDaemon:r,onDirectoryTargetChange:i,onFileTargetChange:a,onRequestAccess:o,targets:s}){let[c,l]=(0,Q.useState)(!1);if(e===`unavailable`)return null;let u=async()=>{l(!0);try{await o()}finally{l(!1)}};if(!r){let t=e===`denied`,n=e===`available`;return(0,$.jsx)(Y,{title:`File preferences`,children:(0,$.jsx)(X,{label:`Local editor integration`,description:(0,$.jsxs)($.Fragment,{children:[t?`Your browser blocked access to Moonlet on this device. Allow local network access for this site in browser settings, then reload Moonlet.`:n?`Moonlet couldn’t connect to its local editor helper. Make sure the Moonlet desktop app or CLI is running on this device, then retry. If it is already running, a remote browser origin may need to be configured.`:`Connect this browser to Moonlet on this device so it can discover installed editors. Moonlet only contacts the local helper after you choose Enable; your browser may ask for local network access.`,` `,(0,$.jsxs)(`a`,{href:Il,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-0.5 rounded-sm underline underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,onClick:e=>{e.preventDefault(),Rt(Il)},children:[`Setup guide`,(0,$.jsx)(H,{name:`ExternalLink`,className:`size-3 shrink-0`,"aria-hidden":!0})]})]}),children:(0,$.jsx)(J,{type:`button`,variant:`outline`,size:`sm`,disabled:c||t,onClick:u,children:c?n?`Retrying…`:`Enabling…`:t?`Blocked`:n?`Retry`:`Enable`})})})}return(0,$.jsx)(Y,{title:`File preferences`,children:(0,$.jsxs)(`div`,{className:`space-y-5`,children:[(0,$.jsx)(Zl,{definition:Yl,onTargetChange:i,preferredTargetId:t,targets:s}),(0,$.jsx)(Zl,{definition:Xl,onTargetChange:a,preferredTargetId:n,targets:s})]})})}var $l=`Open links in the in-app browser`,eu=`Rewrite localhost links`,tu=`Navigate to threads on creation`,nu=`Show diagnostic events`,ru=`Default thread followup behavior`,iu=[{steerOnEnter:!1,label:`Queue`,description:`Enter adds a follow-up. It runs when the agent stops. Command+Enter (Ctrl+Enter on Windows and Linux) steers the run.`},{steerOnEnter:!0,label:`Steer`,description:`Enter steers the run now. Command+Enter (Ctrl+Enter on Windows and Linux) adds a follow-up for later.`}],au=`Streamer mode`,ou=`New branch prefix`,su=`fix-login-flow-thr_ab12cd34ef`;function cu(e){let t=(0,Z.c)(26),{disabled:n,onChange:r,value:i}=e,[a,o]=(0,Q.useState)(i),[s,c]=(0,Q.useState)(i);i!==s&&(c(i),o(i));let l;t[0]===a?l=t[1]:(l=te.safeParse(a),t[0]=a,t[1]=l);let u=l.success,d;t[2]!==a||t[3]!==r||t[4]!==u||t[5]!==i?(d=()=>{if(!u){o(i);return}a!==i&&Promise.resolve(r(a)).catch(()=>o(i))},t[2]=a,t[3]=r,t[4]=u,t[5]=i,t[6]=d):d=t[6];let f=d,p;t[7]!==a||t[8]!==u?(p=u?`Moonlet puts this in front of every branch it creates for a worktree, such as ${a}${su}. Leave it empty for no prefix.`:(0,$.jsx)(`span`,{className:`text-destructive`,role:`alert`,children:`This prefix cannot start a valid git branch name.`}),t[7]=a,t[8]=u,t[9]=p):p=t[9];let m=!u,h=!u&&`border-destructive focus-visible:ring-destructive`,g;t[10]===h?g=t[11]:(g=q(`h-8 font-mono text-xs`,h),t[10]=h,t[11]=g);let _;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>o(e.target.value),t[12]=_):_=t[12];let v;t[13]!==f||t[14]!==i?(v=e=>{e.key===`Enter`&&(e.preventDefault(),f()),e.key===`Escape`&&(e.preventDefault(),o(i))},t[13]=f,t[14]=i,t[15]=v):v=t[15];let y;t[16]!==f||t[17]!==n||t[18]!==a||t[19]!==m||t[20]!==g||t[21]!==v?(y=(0,$.jsx)(Bt,{value:a,"aria-label":ou,"aria-invalid":m,disabled:n,placeholder:`No prefix`,className:g,onChange:_,onBlur:f,onKeyDown:v}),t[16]=f,t[17]=n,t[18]=a,t[19]=m,t[20]=g,t[21]=v,t[22]=y):y=t[22];let b;return t[23]!==p||t[24]!==y?(b=(0,$.jsx)(X,{label:ou,description:p,controlPlacement:`below`,children:y}),t[23]=p,t[24]=y,t[25]=b):b=t[25],b}function lu(e){let t=(0,Z.c)(76),{appearance:n,appearanceDisabled:r,customThemes:i,pluginThemes:a,faviconColor:o,onAppearanceThemeChange:s,onAppearanceThemePrefetch:c,onAppearanceThemePreview:l,onFaviconColorChange:u,onCreatePalette:d,onThemePreferenceChange:f,themePreference:p}=e,m=(0,Q.useRef)(!1),h;t[0]===l?h=t[1]:(h=e=>{e===null&&m.current||l(e)},t[0]=l,t[1]=h);let g=h,_;t[2]===s?_=t[3]:(_=e=>{m.current=!0,s(e)},t[2]=s,t[3]=_);let v=_,y=zl[p],b;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(H,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),t[4]=b):b=t[4];let x;t[5]===y?x=t[6]:(x=(0,$.jsx)(Mt,{asChild:!0,children:(0,$.jsxs)(J,{variant:`outline`,size:`sm`,className:Hl,"aria-label":`Theme`,children:[y,b]})}),t[5]=y,t[6]=x);let S;t[7]!==f||t[8]!==p?(S=Rl.map(e=>(0,$.jsxs)(Jt,{onSelect:()=>f(e.value),children:[e.label,(0,$.jsx)(H,{name:`Check`,className:q(`ml-auto`,p!==e.value&&`opacity-0`,It)})]},e.value)),t[7]=f,t[8]=p,t[9]=S):S=t[9];let C;t[10]===S?C=t[11]:(C=(0,$.jsx)(hn,{align:`end`,className:Ul,children:S}),t[10]=S,t[11]=C);let w;t[12]!==x||t[13]!==C?(w=(0,$.jsx)(X,{label:`Theme`,children:(0,$.jsxs)(mt,{children:[x,C]})}),t[12]=x,t[13]=C,t[14]=w):w=t[14];let T;t[15]!==i||t[16]!==c||t[17]!==a||t[18]!==g?(T=e=>{if(e){m.current=!1,c([...Dt.map(du),...i,...a.map(uu)]);return}g(null)},t[15]=i,t[16]=c,t[17]=a,t[18]=g,t[19]=T):T=t[19];let E;t[20]!==n||t[21]!==a?(E=Ll(n,a),t[20]=n,t[21]=a,t[22]=E):E=t[22];let D;t[23]===E?D=t[24]:(D=(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:E}),t[23]=E,t[24]=D);let O;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(H,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),t[25]=O):O=t[25];let k;t[26]!==r||t[27]!==D?(k=(0,$.jsx)(Mt,{asChild:!0,children:(0,$.jsxs)(J,{variant:`outline`,size:`sm`,className:Hl,"aria-label":`Palette`,disabled:r,children:[D,O]})}),t[26]=r,t[27]=D,t[28]=k):k=t[28];let A;t[29]!==n||t[30]!==g||t[31]!==v?(A=Dt.map(e=>(0,$.jsx)(Kl,{themeId:e.id,active:n.themeId===e.id,onPreview:g,onSelect:v,children:e.name},e.id)),t[29]=n,t[30]=g,t[31]=v,t[32]=A):A=t[32];let j;if(t[33]!==n||t[34]!==i||t[35]!==g||t[36]!==v){let e;t[38]!==n||t[39]!==g||t[40]!==v?(e=e=>(0,$.jsx)(Kl,{themeId:e,active:n.themeId===e,onPreview:g,onSelect:v,children:e},`custom:${e}`),t[38]=n,t[39]=g,t[40]=v,t[41]=e):e=t[41],j=i.map(e),t[33]=n,t[34]=i,t[35]=g,t[36]=v,t[37]=j}else j=t[37];let M;if(t[42]!==n||t[43]!==a||t[44]!==g||t[45]!==v){let e;t[47]!==n||t[48]!==g||t[49]!==v?(e=e=>(0,$.jsxs)(Kl,{themeId:e.id,active:n.themeId===e.id,onPreview:g,onSelect:v,children:[e.name,(0,$.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,e.pluginId,`)`]})]},e.id),t[47]=n,t[48]=g,t[49]=v,t[50]=e):e=t[50],M=a.map(e),t[42]=n,t[43]=a,t[44]=g,t[45]=v,t[46]=M}else M=t[46];let N;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(bt,{}),t[51]=N):N=t[51];let P;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(H,{name:`Plus`,className:It}),t[52]=P):P=t[52];let F;t[53]===d?F=t[54]:(F=(0,$.jsxs)(Jt,{onSelect:d,children:[P,`Create`]}),t[53]=d,t[54]=F);let I;t[55]!==A||t[56]!==j||t[57]!==M||t[58]!==F?(I=(0,$.jsxs)(hn,{align:`end`,className:Ul,children:[A,j,M,N,F]}),t[55]=A,t[56]=j,t[57]=M,t[58]=F,t[59]=I):I=t[59];let L;t[60]!==k||t[61]!==I||t[62]!==T?(L=(0,$.jsx)(X,{label:`Palette`,description:Gl,children:(0,$.jsxs)(mt,{onOpenChange:T,children:[k,I]})}),t[60]=k,t[61]=I,t[62]=T,t[63]=L):L=t[63];let R;t[64]!==r||t[65]!==o||t[66]!==u?(R=(0,$.jsx)(Jl,{disabled:r,faviconColor:o,onFaviconColorChange:u}),t[64]=r,t[65]=o,t[66]=u,t[67]=R):R=t[67];let z;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(Wa,{}),t[68]=z):z=t[68];let B;t[69]!==L||t[70]!==R||t[71]!==w?(B=(0,$.jsx)(Y,{title:`Appearance`,children:(0,$.jsxs)(`div`,{className:`space-y-5`,children:[w,L,R,z]})}),t[69]=L,t[70]=R,t[71]=w,t[72]=B):B=t[72];let V;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(Y,{title:`Interface`,children:(0,$.jsxs)(`div`,{className:`space-y-5`,children:[(0,$.jsx)(za,{}),(0,$.jsx)(La,{}),(0,$.jsx)(Ra,{}),(0,$.jsx)(Ia,{}),(0,$.jsx)(Ba,{})]})}),t[73]=V):V=t[73];let U;return t[74]===B?U=t[75]:(U=(0,$.jsxs)(`div`,{className:`space-y-6`,children:[B,V]}),t[74]=B,t[75]=U),U}function uu(e){return e.id}function du(e){return e.id}function fu(e){let t=(0,Z.c)(60),{showGitChanges:n,onShowGitChangesChange:r,confirmThreadArchive:i,onConfirmThreadArchiveChange:a,keepHistoryAfterContextClear:o,onKeepHistoryAfterContextClearChange:s,summarizeShellCommands:c,onSummarizeShellCommandsChange:l,resumeThreadsAfterRestart:u,onResumeThreadsAfterRestartChange:d,generalSettingsDisabled:f,managedBranchPrefix:p,navigateToThreadAfterCreate:m,onManagedBranchPrefixChange:h,onNavigateToThreadAfterCreateChange:g,onReplaySetupGuide:_,onSteerActiveThreadOnEnterChange:v,onTerminalCopyOnSelectChange:y,terminalCopyOnSelect:b,steerActiveThreadOnEnter:x}=e,S;t[0]!==m||t[1]!==g?(S=(0,$.jsx)(X,{label:tu,children:(0,$.jsx)(Yn,{checked:m,onCheckedChange:g,"aria-label":tu})}),t[0]=m,t[1]=g,t[2]=S):S=t[2];let C;t[3]!==f||t[4]!==r||t[5]!==n?(C=(0,$.jsx)(X,{label:`Show Git changes and Commit button`,description:`Show Git and PR controls above the composer, and Commit in the header.`,children:(0,$.jsx)(Yn,{checked:n,disabled:f,onCheckedChange:r,"aria-label":`Show Git changes and Commit button`})}),t[3]=f,t[4]=r,t[5]=n,t[6]=C):C=t[6];let w=x?`Steer`:`Queue`,T;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(H,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),t[7]=T):T=t[7];let E;t[8]!==f||t[9]!==w?(E=(0,$.jsx)(Mt,{asChild:!0,children:(0,$.jsxs)(J,{variant:`outline`,size:`sm`,className:Hl,disabled:f,"aria-label":ru,children:[w,T]})}),t[8]=f,t[9]=w,t[10]=E):E=t[10];let D;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(D=q(Ul,`max-w-72`),t[11]=D):D=t[11];let O;t[12]!==v||t[13]!==x?(O=iu.map(e=>(0,$.jsxs)(Jt,{className:`items-start`,onSelect:()=>v(e.steerOnEnter),children:[(0,$.jsxs)(`span`,{className:`min-w-0`,children:[(0,$.jsx)(`span`,{className:`block`,children:e.label}),(0,$.jsx)(`span`,{className:`block text-2xs leading-snug text-subtle-foreground`,children:e.description})]}),(0,$.jsx)(H,{name:`Check`,className:q(`ml-auto`,x!==e.steerOnEnter&&`opacity-0`,It)})]},e.label)),t[12]=v,t[13]=x,t[14]=O):O=t[14];let k;t[15]===O?k=t[16]:(k=(0,$.jsx)(hn,{align:`end`,className:D,children:O}),t[15]=O,t[16]=k);let A;t[17]!==E||t[18]!==k?(A=(0,$.jsx)(X,{label:ru,description:`What Enter does in the prompt box while the thread runs.`,children:(0,$.jsxs)(mt,{children:[E,k]})}),t[17]=E,t[18]=k,t[19]=A):A=t[19];let j;t[20]!==i||t[21]!==f||t[22]!==a?(j=(0,$.jsx)(X,{label:`Thread archive confirmation`,description:`Ask before archiving a thread with unarchived child threads.`,children:(0,$.jsx)(Yn,{checked:i,disabled:f,onCheckedChange:a,"aria-label":`Thread archive confirmation`})}),t[20]=i,t[21]=f,t[22]=a,t[23]=j):j=t[23];let M;t[24]!==f||t[25]!==o||t[26]!==s?(M=(0,$.jsx)(X,{label:`Show messages from before a context clear`,description:`Earlier messages stay in the thread for you to read. The agent doesn't see them.`,children:(0,$.jsx)(Yn,{checked:o,disabled:f,onCheckedChange:s,"aria-label":`Show messages from before a context clear`})}),t[24]=f,t[25]=o,t[26]=s,t[27]=M):M=t[27];let N;t[28]!==f||t[29]!==d||t[30]!==u?(N=(0,$.jsx)(X,{label:`Resume interrupted threads after a restart`,description:`Resume threads interrupted by an update, crash or restart, and tell the agent what was cut off. Queued messages send afterward.`,children:(0,$.jsx)(Yn,{checked:u,disabled:f,onCheckedChange:d,"aria-label":`Resume interrupted threads after a restart`})}),t[28]=f,t[29]=d,t[30]=u,t[31]=N):N=t[31];let P;t[32]!==f||t[33]!==l||t[34]!==c?(P=(0,$.jsx)(X,{label:`Summarize shell commands`,description:`Show short summaries for commands that read, list, or search files. Turn off to show command text and let you expand each command to view its output.`,children:(0,$.jsx)(Yn,{checked:c,disabled:f,onCheckedChange:l,"aria-label":`Summarize shell commands`})}),t[32]=f,t[33]=l,t[34]=c,t[35]=P):P=t[35];let F;t[36]!==f||t[37]!==_?(F=(0,$.jsx)(X,{label:`Setup guide`,description:`Walk through connecting an agent, adding projects, plugins, and devices again.`,children:(0,$.jsx)(J,{type:`button`,variant:`outline`,size:`sm`,disabled:f,onClick:_,children:`Show setup guide`})}),t[36]=f,t[37]=_,t[38]=F):F=t[38];let I;t[39]!==S||t[40]!==j||t[41]!==M||t[42]!==N||t[43]!==P||t[44]!==F||t[45]!==C||t[46]!==A?(I=(0,$.jsx)(Y,{title:`Threads & editing`,children:(0,$.jsxs)(`div`,{className:`space-y-5`,children:[S,C,A,j,M,N,P,F]})}),t[39]=S,t[40]=j,t[41]=M,t[42]=N,t[43]=P,t[44]=F,t[45]=C,t[46]=A,t[47]=I):I=t[47];let L;t[48]!==f||t[49]!==y||t[50]!==b?(L=(0,$.jsx)(Y,{title:`Terminals`,children:(0,$.jsx)(X,{label:`Copy on select`,description:`Automatically copy selected terminal text and show a notification. Does not affect text elsewhere in the app. Linux middle-click paste uses the primary selection independently.`,children:(0,$.jsx)(Yn,{checked:b,disabled:f,onCheckedChange:y,"aria-label":`Copy on select`})})}),t[48]=f,t[49]=y,t[50]=b,t[51]=L):L=t[51];let R;t[52]!==f||t[53]!==p||t[54]!==h?(R=(0,$.jsx)(Y,{title:`Git`,children:(0,$.jsx)(`div`,{className:`space-y-5`,children:(0,$.jsx)(cu,{value:p,disabled:f,onChange:h})})}),t[52]=f,t[53]=p,t[54]=h,t[55]=R):R=t[55];let z;return t[56]!==I||t[57]!==L||t[58]!==R?(z=(0,$.jsxs)($.Fragment,{children:[I,L,R]}),t[56]=I,t[57]=L,t[58]=R,t[59]=z):z=t[59],z}function pu(e){let t=(0,Z.c)(9),{desktopBrowserAvailable:n,onOpenLinksInAppBrowserChange:r,onRewriteLocalhostLinksChange:i,openLinksInAppBrowser:a,rewriteLocalhostLinks:o}=e,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=Ar(typeof window>`u`?void 0:window.location.hostname),t[0]=s):s=t[0];let c=s,l;t[1]!==n||t[2]!==r||t[3]!==i||t[4]!==a||t[5]!==o?(l=n||c!==null?(0,$.jsx)(Y,{title:`Links`,children:(0,$.jsxs)(`div`,{className:`space-y-5`,children:[n?(0,$.jsx)(X,{label:$l,description:`Open web links inside Moonlet.`,children:(0,$.jsx)(Yn,{checked:a,onCheckedChange:r,"aria-label":$l})}):null,c===null?null:(0,$.jsx)(X,{label:eu,description:(0,$.jsx)(`span`,{className:`break-words [overflow-wrap:anywhere]`,children:c}),children:(0,$.jsx)(Yn,{checked:o,onCheckedChange:i,"aria-label":eu})})]})}):null,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=l):l=t[6];let u;return t[7]===l?u=t[8]:(u=(0,$.jsx)($.Fragment,{children:l}),t[7]=l,t[8]=u),u}function mu(e){let t=(0,Z.c)(4),{checked:n,disabled:r,onCheckedChange:i}=e,a;return t[0]!==n||t[1]!==r||t[2]!==i?(a=(0,$.jsx)(Y,{title:`Automatic updates`,children:(0,$.jsx)(X,{label:`Update automatically`,description:`When a new release is published, Moonlet installs it after ten minutes with no conversation running, and its machines follow. A failed update keeps the current version and shows below. Turn this off to update only from this page.`,children:(0,$.jsx)(Yn,{checked:n,disabled:r,onCheckedChange:i,"aria-label":`Update automatically`})})}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):a=t[3],a}function hu(e){let t=(0,Z.c)(16),{disabled:n,enabled:r,onEnabledChange:i,streamerMode:a,onStreamerModeChange:o,telemetryEnabled:s,onTelemetryEnabledChange:c}=e,l;t[0]!==n||t[1]!==o||t[2]!==a?(l=(0,$.jsx)(X,{label:au,description:`Hide the custom models from config.json in every model picker, so a screen share does not show them.`,children:(0,$.jsx)(Yn,{checked:a,disabled:n,onCheckedChange:o,"aria-label":au})}),t[0]=n,t[1]=o,t[2]=a,t[3]=l):l=t[3];let u;t[4]!==n||t[5]!==c||t[6]!==s?(u=(0,$.jsx)(X,{label:`Share anonymous usage data`,description:`Off by default, and nothing is sent until this server is started with a PostHog key (BB_POSTHOG_API_KEY) and BB_TELEMETRY=true. With both set, sends anonymous usage data, such as app starts, setup progress and feature use, to that PostHog project. Turning this off takes effect immediately for this server.`,children:(0,$.jsx)(Yn,{checked:s,disabled:n,onCheckedChange:c,"aria-label":`Share anonymous usage data`})}),t[4]=n,t[5]=c,t[6]=s,t[7]=u):u=t[7];let d;t[8]!==n||t[9]!==r||t[10]!==i?(d=(0,$.jsx)(X,{label:nu,description:`Show provider environment resolution and unhandled provider events for troubleshooting.`,children:(0,$.jsx)(Yn,{checked:r,disabled:n,onCheckedChange:i,"aria-label":nu})}),t[8]=n,t[9]=r,t[10]=i,t[11]=d):d=t[11];let f;return t[12]!==l||t[13]!==u||t[14]!==d?(f=(0,$.jsx)(Y,{title:`Privacy & diagnostics`,children:(0,$.jsxs)(`div`,{className:`space-y-5`,children:[l,u,d]})}),t[12]=l,t[13]=u,t[14]=d,t[15]=f):f=t[15],f}var gu={changelogPreview:{label:`Changelog preview`,description:`Show the latest release notes as a compact preview on the Updates page.`},compactExpiredCache:{label:`Compact before resuming expired sessions`,description:`When an idle thread holds at least 100k tokens and its prompt cache has expired, the composer offers to compact before your next send. Works with supported providers (e.g. Claude Code, Pi).`},performanceDiagnostics:{label:`Server performance diagnostics`,description:`Collect CPU profiles and detailed performance logs while the server was launched with --perf-diagnostics. Turning this off stops collection; saved profiles remain.`},serverMove:{label:`Server move`,description:`Move the Moonlet server to another machine from Settings → Machines, and export or import server data with bb server.`},sidebarMultiSelect:{label:`Select multiple sidebar threads`,description:`In the built-in thread list sidebar, Cmd/Ctrl-click and Shift-click threads to select several, right-click for bulk actions, and drag them together into a section, under a thread, into Pinned, or into a composer as mentions.`},timelinePush:{label:`Pushed timeline updates`,description:`Send an open thread's timeline changes over the live connection instead of reloading the latest window after each update.`}};function _u(e){return vn.filter(t=>t!==`performanceDiagnostics`||e)}var vu=`Early adopter`;function yu(e){let t=(0,Z.c)(20),{performanceDiagnosticsAvailable:n,disabled:r,earlyAdopter:i,onEarlyAdopterChange:a,experiments:o,onExperimentChange:s}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`div`,{className:`flex size-8 shrink-0 items-center justify-center rounded-md bg-background`,children:(0,$.jsx)(H,{name:`Beaker`,className:`size-4 text-foreground`,"aria-hidden":!0})}),t[0]=c):c=t[0];let l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:`Become an early adopter`}),(0,$.jsx)(`p`,{className:`mt-0.5 text-xs leading-snug text-subtle-foreground`,children:`Get new experiments turned on by default sooner and help us try out features before they reach everyone. Turn this off anytime; experiments you switch yourself keep your choice.`})]}),t[1]=l):l=t[1];let u;t[2]!==r||t[3]!==i||t[4]!==a?(u=(0,$.jsxs)(`section`,{"data-settings-anchor":vu,"aria-label":vu,className:`flex scroll-mt-4 items-start gap-3 rounded-lg border border-border bg-accent px-4 py-3.5`,children:[c,l,(0,$.jsx)(Yn,{checked:i,disabled:r,onCheckedChange:a,"aria-label":vu})]}),t[2]=r,t[3]=i,t[4]=a,t[5]=u):u=t[5];let d;if(t[6]!==r||t[7]!==o||t[8]!==s||t[9]!==n){let e;t[11]!==r||t[12]!==o||t[13]!==s?(e=e=>{let t=gu[e];return(0,$.jsx)(X,{label:t.label,labelBadge:j[e]?vu:void 0,description:t.description,children:(0,$.jsx)(Yn,{checked:o[e],disabled:r,onCheckedChange:t=>s(e,t),"aria-label":t.label})},e)},t[11]=r,t[12]=o,t[13]=s,t[14]=e):e=t[14],d=_u(n).map(e),t[6]=r,t[7]=o,t[8]=s,t[9]=n,t[10]=d}else d=t[10];let f;t[15]===d?f=t[16]:(f=(0,$.jsx)(`div`,{className:`space-y-5`,children:d}),t[15]=d,t[16]=f);let p;return t[17]!==u||t[18]!==f?(p=(0,$.jsx)($.Fragment,{children:(0,$.jsx)(Y,{title:`Experiments`,description:`Early features that are off by default. Opt in to try them.`,banner:u,children:f})}),t[17]=u,t[18]=f,t[19]=p):p=t[19],p}function bu(){let e=(0,Z.c)(8),[t,n]=m(),r=t.get(`tab`)===`marketplaces`?`marketplaces`:`installed`,i;e[0]===n?i=e[1]:(i=e=>n(e===`marketplaces`?{tab:e}:{},{replace:!0}),e[0]=n,e[1]=i);let a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsxs)(pa,{className:`mx-4 self-start md:mx-5`,children:[(0,$.jsx)(ma,{value:`installed`,children:`Installed`}),(0,$.jsx)(ma,{value:`marketplaces`,children:`Marketplaces`})]}),e[2]=a):a=e[2];let o;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(ha,{value:`installed`,className:`flex min-h-0 flex-1 flex-col data-[state=inactive]:hidden`,children:(0,$.jsx)(ni,{mode:`installed`})}),e[3]=o):o=e[3];let s;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(ha,{value:`marketplaces`,className:`min-h-0 flex-1 overflow-y-auto px-4 pb-6 md:px-5`,children:(0,$.jsx)(`div`,{className:`w-full max-w-3xl pt-2`,children:(0,$.jsx)(Ol,{})})}),e[4]=s):s=e[4];let c;return e[5]!==i||e[6]!==r?(c=(0,$.jsxs)(fa,{value:r,onValueChange:i,className:`flex min-h-0 flex-1 flex-col pt-4 md:pt-5`,children:[a,o,s]}),e[5]=i,e[6]=r,e[7]=c):c=e[7],c}function xu(){let e=(0,Z.c)(167),n=t(),r=oe(),i=ae(),{hasDaemon:a}=R(),{accessState:s,requestAccess:l}=Cn(),u;e[0]===a?u=e[1]:(u={enabled:a},e[0]=a,e[1]=u);let{workspaceOpenTargets:f}=ar(u),[p,m]=or(f),[h,g]=rr(f),[_,v]=bn(),[y,b]=hr(),[x,S]=Qr(),[C]=(0,Q.useState)(qe),w=i.data?.experiments??Pe,T=jt(),E=i.data?.generalSettings??re,D=Ot(),O=on(),k=i.data?.appearance??cn,A=Zt(),j=va(),M=d(),{activePluginId:N,activeSection:P,hasUnknownSection:I,redirectTo:L}=Rn();if(Ja(),L!==null){let t;return e[2]===L?t=e[3]:(t=(0,$.jsx)(c,{to:L,replace:!0}),e[2]=L,e[3]=t),t}if(I){let t;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(c,{to:ut,replace:!0}),e[4]=t):t=e[4],t}if(P===`plugins`){let t;e[5]===M.pathname?t=e[6]:(t=o(Pt,M.pathname)?.params.pluginId,e[5]=M.pathname,e[6]=t);let n=t,r;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(kr,{sectionId:`plugins`}),e[7]=r):r=e[7];let i;return e[8]===n?i=e[9]:(i=(0,$.jsxs)(`div`,{className:`-mx-4 -mt-4 flex min-h-0 flex-1 flex-col overflow-hidden md:-mx-5 md:-mt-5`,children:[r,n?(0,$.jsx)($r,{pluginId:n}):(0,$.jsx)(bu,{})]}),e[8]=n,e[9]=i),i}let z;if(N!==null){let t;e[10]===N?t=e[11]:(t=(0,$.jsx)(Kn,{pluginId:N}),e[10]=N,e[11]=t),z=t}else if(P===`providers`){let t=i.data===void 0,n;e[12]===D?n=e[13]:(n=e=>D.mutateAsync(e),e[12]=D,e[13]=n);let r;e[14]!==E||e[15]!==t||e[16]!==n?(r=(0,$.jsx)(Aa,{disabled:t,generalSettings:E,onGeneralSettingsChange:n}),e[14]=E,e[15]=t,e[16]=n,e[17]=r):r=e[17];let a;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(vo,{}),e[18]=a):a=e[18];let o;e[19]===r?o=e[20]:(o=(0,$.jsxs)($.Fragment,{children:[r,a]}),e[19]=r,e[20]=o),z=o}else if(P===`appearance`){let t=i.data===void 0||A.isPending,a;e[21]===i.data?.customThemes?a=e[22]:(a=i.data?.customThemes??[],e[21]=i.data?.customThemes,e[22]=a);let o;e[23]===i.data?.pluginThemes?o=e[24]:(o=i.data?.pluginThemes??[],e[23]=i.data?.pluginThemes,e[24]=o);let s;e[25]!==j||e[26]!==k.faviconColor||e[27]!==A?(s=e=>A.mutate({themeId:e,faviconColor:k.faviconColor},{onError:()=>j.previewTheme(null)}),e[25]=j,e[26]=k.faviconColor,e[27]=A,e[28]=s):s=e[28];let c;e[29]===n?c=e[30]:(c=()=>n(ke(),{state:{focusPrompt:!0,initialPrompt:Wl}}),e[29]=n,e[30]=c);let l;e[31]!==k.themeId||e[32]!==A?(l=e=>A.mutate({themeId:k.themeId,faviconColor:e}),e[31]=k.themeId,e[32]=A,e[33]=l):l=e[33];let u;e[34]!==j.prefetchThemes||e[35]!==j.previewTheme||e[36]!==k||e[37]!==t||e[38]!==a||e[39]!==o||e[40]!==s||e[41]!==c||e[42]!==l||e[43]!==r?(u=(0,$.jsx)(lu,{appearance:k,appearanceDisabled:t,customThemes:a,pluginThemes:o,faviconColor:k.faviconColor,themePreference:r,onAppearanceThemeChange:s,onAppearanceThemePrefetch:j.prefetchThemes,onAppearanceThemePreview:j.previewTheme,onCreatePalette:c,onFaviconColorChange:l,onThemePreferenceChange:F}),e[34]=j.prefetchThemes,e[35]=j.previewTheme,e[36]=k,e[37]=t,e[38]=a,e[39]=o,e[40]=s,e[41]=c,e[42]=l,e[43]=r,e[44]=u):u=e[44],z=u}else if(P===`keyboard`){let t;e[45]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(pc,{}),e[45]=t):t=e[45],z=t}else if(P===`files`){let t;e[46]!==s||e[47]!==p||e[48]!==h||e[49]!==a||e[50]!==l||e[51]!==m||e[52]!==g||e[53]!==f?(t=(0,$.jsx)(Ql,{accessState:s,directoryTargetId:p,fileTargetId:h,hasDaemon:a,onDirectoryTargetChange:m,onFileTargetChange:g,onRequestAccess:l,targets:f}),e[46]=s,e[47]=p,e[48]=h,e[49]=a,e[50]=l,e[51]=m,e[52]=g,e[53]=f,e[54]=t):t=e[54];let n;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(Za,{}),e[55]=n):n=e[55];let r;e[56]!==C||e[57]!==_||e[58]!==y||e[59]!==v||e[60]!==b?(r=(0,$.jsx)(pu,{desktopBrowserAvailable:C,openLinksInAppBrowser:_,rewriteLocalhostLinks:y,onOpenLinksInAppBrowserChange:v,onRewriteLocalhostLinksChange:b}),e[56]=C,e[57]=_,e[58]=y,e[59]=v,e[60]=b,e[61]=r):r=e[61];let i;e[62]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(zc,{}),e[62]=i):i=e[62];let o;e[63]!==t||e[64]!==r?(o=(0,$.jsxs)($.Fragment,{children:[t,n,r,i]}),e[63]=t,e[64]=r,e[65]=o):o=e[65],z=o}else if(P===`projects`){let t;e[66]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Zr,{}),e[66]=t):t=e[66],z=t}else if(P===`schedules`){let t;e[67]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Ri,{}),e[67]=t):t=e[67],z=t}else if(P===`machines`){let t;e[68]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Uc,{}),(0,$.jsx)(Hn,{}),(0,$.jsx)(cl,{}),(0,$.jsx)(xl,{})]}),e[68]=t):t=e[68],z=t}else if(P===`permissions`){let t;e[69]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Pi,{}),e[69]=t):t=e[69],z=t}else if(P===`environment-variables`){let t;e[70]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Xr,{}),e[70]=t):t=e[70],z=t}else if(P===`updates`){let t=i.data===void 0,n;e[71]===D?n=e[72]:(n=e=>D.mutate({automaticUpdates:e}),e[71]=D,e[72]=n);let r;e[73]!==E.automaticUpdates||e[74]!==t||e[75]!==n?(r=(0,$.jsx)(mu,{checked:E.automaticUpdates,disabled:t,onCheckedChange:n}),e[73]=E.automaticUpdates,e[74]=t,e[75]=n,e[76]=r):r=e[76];let a;e[77]===w.changelogPreview?a=e[78]:(a=(0,$.jsx)(Vs,{showChangelogPreview:w.changelogPreview}),e[77]=w.changelogPreview,e[78]=a);let o;e[79]!==r||e[80]!==a?(o=(0,$.jsxs)($.Fragment,{children:[r,a]}),e[79]=r,e[80]=a,e[81]=o):o=e[81],z=o}else if(P===`remote-access`){let t;e[82]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Wi,{}),e[82]=t):t=e[82],z=t}else if(P===`experiments`){let t=i.data===void 0,n;e[83]===D?n=e[84]:(n=e=>D.mutate({earlyAdopter:e}),e[83]=D,e[84]=n);let r=i.data?.performanceDiagnosticsAvailable??!1,a;e[85]===T?a=e[86]:(a=(e,t)=>T.mutate({[e]:t}),e[85]=T,e[86]=a);let o;e[87]!==w||e[88]!==E.earlyAdopter||e[89]!==t||e[90]!==n||e[91]!==r||e[92]!==a?(o=(0,$.jsx)(yu,{disabled:t,earlyAdopter:E.earlyAdopter,onEarlyAdopterChange:n,experiments:w,performanceDiagnosticsAvailable:r,onExperimentChange:a}),e[87]=w,e[88]=E.earlyAdopter,e[89]=t,e[90]=n,e[91]=r,e[92]=a,e[93]=o):o=e[93],z=o}else if(P===`archived`){let t;e[94]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(nl,{}),e[94]=t):t=e[94],z=t}else if(P!==`general`)z=null;else{let t=i.data===void 0||D.isPending,n;e[95]===D?n=e[96]:(n=e=>D.mutate({timeZone:e}),e[95]=D,e[96]=n);let r;e[97]!==E.timeZone||e[98]!==t||e[99]!==n?(r=(0,$.jsx)(Vi,{value:E.timeZone,disabled:t,onChange:n}),e[97]=E.timeZone,e[98]=t,e[99]=n,e[100]=r):r=e[100];let a;e[101]===D?a=e[102]:(a=e=>D.mutate({showGitChanges:e}),e[101]=D,e[102]=a);let o;e[103]===D?o=e[104]:(o=e=>D.mutate({confirmThreadArchive:e}),e[103]=D,e[104]=o);let s;e[105]!==E||e[106]!==D?(s=e=>D.mutate({...E,keepHistoryAfterContextClear:e}),e[105]=E,e[106]=D,e[107]=s):s=e[107];let c;e[108]===D?c=e[109]:(c=e=>D.mutate({summarizeShellCommands:e}),e[108]=D,e[109]=c);let l;e[110]===D?l=e[111]:(l=e=>D.mutate({resumeThreadsAfterRestart:e}),e[110]=D,e[111]=l);let u;e[112]===O?u=e[113]:(u=()=>O.mutate(),e[112]=O,e[113]=u);let d=i.data===void 0,f;e[114]===D?f=e[115]:(f=async e=>{await D.mutateAsync({managedBranchPrefix:e})},e[114]=D,e[115]=f);let p;e[116]!==E||e[117]!==D?(p=e=>D.mutate({...E,terminalCopyOnSelect:e}),e[116]=E,e[117]=D,e[118]=p):p=e[118];let m;e[119]===D?m=e[120]:(m=e=>D.mutate({steerActiveThreadOnEnter:e}),e[119]=D,e[120]=m);let h;e[121]!==E.confirmThreadArchive||e[122]!==E.keepHistoryAfterContextClear||e[123]!==E.managedBranchPrefix||e[124]!==E.resumeThreadsAfterRestart||e[125]!==E.showGitChanges||e[126]!==E.steerActiveThreadOnEnter||e[127]!==E.summarizeShellCommands||e[128]!==E.terminalCopyOnSelect||e[129]!==x||e[130]!==S||e[131]!==d||e[132]!==f||e[133]!==p||e[134]!==m||e[135]!==a||e[136]!==o||e[137]!==s||e[138]!==c||e[139]!==l||e[140]!==u?(h=(0,$.jsx)(fu,{showGitChanges:E.showGitChanges,onShowGitChangesChange:a,confirmThreadArchive:E.confirmThreadArchive,onConfirmThreadArchiveChange:o,keepHistoryAfterContextClear:E.keepHistoryAfterContextClear,onKeepHistoryAfterContextClearChange:s,summarizeShellCommands:E.summarizeShellCommands,onSummarizeShellCommandsChange:c,resumeThreadsAfterRestart:E.resumeThreadsAfterRestart,onResumeThreadsAfterRestartChange:l,onReplaySetupGuide:u,generalSettingsDisabled:d,managedBranchPrefix:E.managedBranchPrefix,onManagedBranchPrefixChange:f,navigateToThreadAfterCreate:x,steerActiveThreadOnEnter:E.steerActiveThreadOnEnter,terminalCopyOnSelect:E.terminalCopyOnSelect,onTerminalCopyOnSelectChange:p,onNavigateToThreadAfterCreateChange:S,onSteerActiveThreadOnEnterChange:m}),e[121]=E.confirmThreadArchive,e[122]=E.keepHistoryAfterContextClear,e[123]=E.managedBranchPrefix,e[124]=E.resumeThreadsAfterRestart,e[125]=E.showGitChanges,e[126]=E.steerActiveThreadOnEnter,e[127]=E.summarizeShellCommands,e[128]=E.terminalCopyOnSelect,e[129]=x,e[130]=S,e[131]=d,e[132]=f,e[133]=p,e[134]=m,e[135]=a,e[136]=o,e[137]=s,e[138]=c,e[139]=l,e[140]=u,e[141]=h):h=e[141];let g;e[142]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(oo,{}),e[142]=g):g=e[142];let _;e[143]===D?_=e[144]:(_=e=>D.mutate({telemetryEnabled:e}),e[143]=D,e[144]=_);let v;e[145]===D?v=e[146]:(v=e=>D.mutate({streamerMode:e}),e[145]=D,e[146]=v);let y=i.data===void 0,b;e[147]===D?b=e[148]:(b=e=>D.mutate({showDiagnosticEvents:e}),e[147]=D,e[148]=b);let C;e[149]!==E.showDiagnosticEvents||e[150]!==E.streamerMode||e[151]!==E.telemetryEnabled||e[152]!==_||e[153]!==v||e[154]!==y||e[155]!==b?(C=(0,$.jsx)(hu,{telemetryEnabled:E.telemetryEnabled,onTelemetryEnabledChange:_,streamerMode:E.streamerMode,onStreamerModeChange:v,enabled:E.showDiagnosticEvents,disabled:y,onEnabledChange:b}),e[149]=E.showDiagnosticEvents,e[150]=E.streamerMode,e[151]=E.telemetryEnabled,e[152]=_,e[153]=v,e[154]=y,e[155]=b,e[156]=C):C=e[156];let w;e[157]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(So,{}),e[157]=w):w=e[157];let T;e[158]!==h||e[159]!==C||e[160]!==r?(T=(0,$.jsxs)($.Fragment,{children:[r,h,g,C,w]}),e[158]=h,e[159]=C,e[160]=r,e[161]=T):T=e[161],z=T}let B;e[162]===P?B=e[163]:(B=P?(0,$.jsx)(kr,{sectionId:P}):null,e[162]=P,e[163]=B);let V;return e[164]!==z||e[165]!==B?(V=(0,$.jsx)(ur,{contentClassName:`pt-4 md:pt-5`,children:(0,$.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-10`,children:[z,B]})}),e[164]=z,e[165]=B,e[166]=V):V=e[166],V}export{xu as SettingsView};