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

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 (696) hide show
  1. package/app/dist/assets/{AddMachineDialog-CG2ZZhp-.js → AddMachineDialog-Dl8463-H.js} +1 -1
  2. package/app/dist/assets/AddMachineDialog-Dl8463-H.js.br +0 -0
  3. package/app/dist/assets/AddMachineDialog-Dl8463-H.js.gz +0 -0
  4. package/app/dist/assets/{AppCommandShortcutHint-CCVkbqD1.js → AppCommandShortcutHint-BFFp1FEJ.js} +1 -1
  5. package/app/dist/assets/{AppFileExternalNavigationDispatcher-DETVZfBW.js → AppFileExternalNavigationDispatcher-Drn52GtO.js} +1 -1
  6. package/app/dist/assets/AppFileExternalNavigationDispatcher-Drn52GtO.js.br +0 -0
  7. package/app/dist/assets/AppFileExternalNavigationDispatcher-Drn52GtO.js.gz +0 -0
  8. package/app/dist/assets/{AppToasterView-BpJaGVQ1.js → AppToasterView-C38q0zKd.js} +1 -1
  9. package/app/dist/assets/BrowserTabDeck-C1WR3N8t.js +1 -0
  10. package/app/dist/assets/BrowserTabDeck-C1WR3N8t.js.br +0 -0
  11. package/app/dist/assets/BrowserTabDeck-C1WR3N8t.js.gz +0 -0
  12. package/app/dist/assets/{CommandPaletteBody-BeiWvSTK.js → CommandPaletteBody-DYF_dqYa.js} +1 -1
  13. package/app/dist/assets/CommandPaletteBody-DYF_dqYa.js.br +0 -0
  14. package/app/dist/assets/CommandPaletteBody-DYF_dqYa.js.gz +0 -0
  15. package/app/dist/assets/DiffHost-BWn6U0v1.js +1 -0
  16. package/app/dist/assets/DiffHost-BWn6U0v1.js.br +0 -0
  17. package/app/dist/assets/DiffHost-BWn6U0v1.js.gz +0 -0
  18. package/app/dist/assets/{ExperimentalFileLinkMenu-CDVoETHe.js → ExperimentalFileLinkMenu-BKYFmwiR.js} +1 -1
  19. package/app/dist/assets/ExperimentalFileLinkMenu-BKYFmwiR.js.br +0 -0
  20. package/app/dist/assets/ExperimentalFileLinkMenu-BKYFmwiR.js.gz +0 -0
  21. package/app/dist/assets/{FilePreview-CzacGZ35.js → FilePreview-U1tgNJMa.js} +2 -2
  22. package/app/dist/assets/FilePreview-U1tgNJMa.js.br +0 -0
  23. package/app/dist/assets/FilePreview-U1tgNJMa.js.gz +0 -0
  24. package/app/dist/assets/{GitDiffCardHeader-CJtFaq1K.js → GitDiffCardHeader-BzQWJkXM.js} +1 -1
  25. package/app/dist/assets/GitDiffCardHeader-BzQWJkXM.js.br +0 -0
  26. package/app/dist/assets/GitDiffCardHeader-BzQWJkXM.js.gz +0 -0
  27. package/app/dist/assets/{InlineMessageEditorFrame-C0rqOlNn.js → InlineMessageEditorFrame-DBKxXp7v.js} +1 -1
  28. package/app/dist/assets/InlineMessageEditorFrame-DBKxXp7v.js.br +0 -0
  29. package/app/dist/assets/InlineMessageEditorFrame-DBKxXp7v.js.gz +0 -0
  30. package/app/dist/assets/{MachineLabel-vUI5j8ve.js → MachineLabel-DS8PSJc_.js} +1 -1
  31. package/app/dist/assets/MachineLabel-DS8PSJc_.js.br +0 -0
  32. package/app/dist/assets/MachineLabel-DS8PSJc_.js.gz +0 -0
  33. package/app/dist/assets/{MachineRenameDialog-CrnZuppe.js → MachineRenameDialog-CQx4XFLY.js} +1 -1
  34. package/app/dist/assets/MachineRenameDialog-CQx4XFLY.js.br +0 -0
  35. package/app/dist/assets/MachineRenameDialog-CQx4XFLY.js.gz +0 -0
  36. package/app/dist/assets/MachineSettingsView-C72F-k0u.js +1 -0
  37. package/app/dist/assets/MachineSettingsView-C72F-k0u.js.br +0 -0
  38. package/app/dist/assets/MachineSettingsView-C72F-k0u.js.gz +0 -0
  39. package/app/dist/assets/{MicrophonePreferences-wMQ36e_Q.js → MicrophonePreferences-CHIX4UC2.js} +1 -1
  40. package/app/dist/assets/MicrophonePreferences-CHIX4UC2.js.br +0 -0
  41. package/app/dist/assets/MicrophonePreferences-CHIX4UC2.js.gz +0 -0
  42. package/app/dist/assets/ModelReasoningMenu-CqzyGKPV.js +1 -0
  43. package/app/dist/assets/ModelReasoningMenu-CqzyGKPV.js.br +0 -0
  44. package/app/dist/assets/ModelReasoningMenu-CqzyGKPV.js.gz +0 -0
  45. package/app/dist/assets/MoonletDiff-Cn_8GRyT.js +1 -0
  46. package/app/dist/assets/MoonletDiff-Cn_8GRyT.js.br +0 -0
  47. package/app/dist/assets/MoonletDiff-Cn_8GRyT.js.gz +0 -0
  48. package/app/dist/assets/MoonletDiffSplit-BGjCtQ2R.js +2 -0
  49. package/app/dist/assets/MoonletDiffSplit-BGjCtQ2R.js.br +0 -0
  50. package/app/dist/assets/MoonletDiffSplit-BGjCtQ2R.js.gz +0 -0
  51. package/app/dist/assets/MoonletSourceCode-DxMzgoHq.js +2 -0
  52. package/app/dist/assets/MoonletSourceCode-DxMzgoHq.js.br +0 -0
  53. package/app/dist/assets/MoonletSourceCode-DxMzgoHq.js.gz +0 -0
  54. package/app/dist/assets/{NewTabPage-BOqCqqLe.js → NewTabPage-BFN-aWBP.js} +2 -2
  55. package/app/dist/assets/NewTabPage-BFN-aWBP.js.br +0 -0
  56. package/app/dist/assets/NewTabPage-BFN-aWBP.js.gz +0 -0
  57. package/app/dist/assets/NewThreadComposer-hC_11bnI.js +1 -0
  58. package/app/dist/assets/NewThreadComposer-hC_11bnI.js.br +0 -0
  59. package/app/dist/assets/NewThreadComposer-hC_11bnI.js.gz +0 -0
  60. package/app/dist/assets/OnboardingFlow-CojLVjXc.js +1 -0
  61. package/app/dist/assets/OnboardingFlow-CojLVjXc.js.br +0 -0
  62. package/app/dist/assets/OnboardingFlow-CojLVjXc.js.gz +0 -0
  63. package/app/dist/assets/OptionPicker-BqVSa33I.js +1 -0
  64. package/app/dist/assets/OptionPicker-BqVSa33I.js.br +0 -0
  65. package/app/dist/assets/OptionPicker-BqVSa33I.js.gz +0 -0
  66. package/app/dist/assets/{PaletteShell-BMkwhUdz.js → PaletteShell-B6LeovGF.js} +1 -1
  67. package/app/dist/assets/PaletteShell-B6LeovGF.js.br +0 -0
  68. package/app/dist/assets/PaletteShell-B6LeovGF.js.gz +0 -0
  69. package/app/dist/assets/{PaneMaximizeButton-DgXn2p5T.js → PaneMaximizeButton-CRY2ZNg8.js} +1 -1
  70. package/app/dist/assets/PaneMaximizeButton-CRY2ZNg8.js.br +0 -0
  71. package/app/dist/assets/PaneMaximizeButton-CRY2ZNg8.js.gz +0 -0
  72. package/app/dist/assets/{PierreLineSelectionActions-V_GPrVau.js → PierreLineSelectionActions-iQ58D4fK.js} +1 -1
  73. package/app/dist/assets/PierreLineSelectionActions-iQ58D4fK.js.br +0 -0
  74. package/app/dist/assets/PierreLineSelectionActions-iQ58D4fK.js.gz +0 -0
  75. package/app/dist/assets/PluginPanelRightPanelHost-DtG4vnDS.js +1 -0
  76. package/app/dist/assets/PluginPanelRightPanelHost-DtG4vnDS.js.br +0 -0
  77. package/app/dist/assets/PluginPanelRightPanelHost-DtG4vnDS.js.gz +0 -0
  78. package/app/dist/assets/{PluginSettingsSections-ZnUNrvlJ.js → PluginSettingsSections-BNhCRdhP.js} +2 -2
  79. package/app/dist/assets/PluginSettingsSections-BNhCRdhP.js.br +0 -0
  80. package/app/dist/assets/PluginSettingsSections-BNhCRdhP.js.gz +0 -0
  81. package/app/dist/assets/{PluginThreadChat-DtIyKaqq.js → PluginThreadChat-BGmTPVqg.js} +1 -1
  82. package/app/dist/assets/PluginThreadChat-BGmTPVqg.js.br +0 -0
  83. package/app/dist/assets/PluginThreadChat-BGmTPVqg.js.gz +0 -0
  84. package/app/dist/assets/ProjectDetailSettingsView-ZnMhDqoI.js +1 -0
  85. package/app/dist/assets/ProjectDetailSettingsView-ZnMhDqoI.js.br +0 -0
  86. package/app/dist/assets/ProjectDetailSettingsView-ZnMhDqoI.js.gz +0 -0
  87. package/app/dist/assets/ProjectMachineSetupDialog-Dm9AuMWJ.js +1 -0
  88. package/app/dist/assets/ProjectMachineSetupDialog-Dm9AuMWJ.js.br +0 -0
  89. package/app/dist/assets/ProjectMachineSetupDialog-Dm9AuMWJ.js.gz +0 -0
  90. package/app/dist/assets/{ProjectsSettingsSection-CIshX8Xc.js → ProjectsSettingsSection-BeLBrzeB.js} +3 -3
  91. package/app/dist/assets/ProjectsSettingsSection-BeLBrzeB.js.br +0 -0
  92. package/app/dist/assets/ProjectsSettingsSection-BeLBrzeB.js.gz +0 -0
  93. package/app/dist/assets/QueuedMessagesList-DMbZRCEm.js +3 -0
  94. package/app/dist/assets/QueuedMessagesList-DMbZRCEm.js.br +0 -0
  95. package/app/dist/assets/QueuedMessagesList-DMbZRCEm.js.gz +0 -0
  96. package/app/dist/assets/RemotePathBrowser-DLztiVGH.js +1 -0
  97. package/app/dist/assets/RemotePathBrowser-DLztiVGH.js.br +0 -0
  98. package/app/dist/assets/RemotePathBrowser-DLztiVGH.js.gz +0 -0
  99. package/app/dist/assets/RootComposeView-DUgxvM9u.js +1 -0
  100. package/app/dist/assets/RootComposeView-DUgxvM9u.js.br +0 -0
  101. package/app/dist/assets/RootComposeView-DUgxvM9u.js.gz +0 -0
  102. package/app/dist/assets/SecondaryPanelLayout-BCmpBdPU.js +1 -0
  103. package/app/dist/assets/SecondaryPanelLayout-BCmpBdPU.js.br +0 -0
  104. package/app/dist/assets/SecondaryPanelLayout-BCmpBdPU.js.gz +0 -0
  105. package/app/dist/assets/{ServerMoveOverlayView-BSJahQeB.js → ServerMoveOverlayView-C2OCw9Kf.js} +1 -1
  106. package/app/dist/assets/ServerMoveOverlayView-C2OCw9Kf.js.br +0 -0
  107. package/app/dist/assets/ServerMoveOverlayView-C2OCw9Kf.js.gz +0 -0
  108. package/app/dist/assets/SettingsSidebar-p9_ibXT8.js +1 -0
  109. package/app/dist/assets/SettingsSidebar-p9_ibXT8.js.br +0 -0
  110. package/app/dist/assets/SettingsSidebar-p9_ibXT8.js.gz +0 -0
  111. package/app/dist/assets/SettingsView-BKRQE25G.js +7 -0
  112. package/app/dist/assets/SettingsView-BKRQE25G.js.br +0 -0
  113. package/app/dist/assets/SettingsView-BKRQE25G.js.gz +0 -0
  114. package/app/dist/assets/SidebarFooterCustomize-DbS8mpRZ.js +1 -0
  115. package/app/dist/assets/SidebarFooterCustomize-DbS8mpRZ.js.br +0 -0
  116. package/app/dist/assets/SidebarFooterCustomize-DbS8mpRZ.js.gz +0 -0
  117. package/app/dist/assets/SidebarVisibilityCustomize-CHL1v-5j.js +1 -0
  118. package/app/dist/assets/SidebarVisibilityCustomize-CHL1v-5j.js.br +0 -0
  119. package/app/dist/assets/SidebarVisibilityCustomize-CHL1v-5j.js.gz +0 -0
  120. package/app/dist/assets/SourceCodeHost-HqsxZuJa.js +2 -0
  121. package/app/dist/assets/SourceCodeHost-HqsxZuJa.js.br +0 -0
  122. package/app/dist/assets/SourceCodeHost-HqsxZuJa.js.gz +0 -0
  123. package/app/dist/assets/SplitWorkspaceRoute-DGc30R4l.js +2 -0
  124. package/app/dist/assets/SplitWorkspaceRoute-DGc30R4l.js.br +0 -0
  125. package/app/dist/assets/SplitWorkspaceRoute-DGc30R4l.js.gz +0 -0
  126. package/app/dist/assets/{TerminalOutputBlock-DKsNjK8s.js → TerminalOutputBlock-jTcwIxVj.js} +1 -1
  127. package/app/dist/assets/TerminalOutputBlock-jTcwIxVj.js.br +0 -0
  128. package/app/dist/assets/TerminalOutputBlock-jTcwIxVj.js.gz +0 -0
  129. package/app/dist/assets/ThreadActionsMenu-D_7lWawN.js +1 -0
  130. package/app/dist/assets/ThreadActionsMenu-D_7lWawN.js.br +0 -0
  131. package/app/dist/assets/ThreadActionsMenu-D_7lWawN.js.gz +0 -0
  132. package/app/dist/assets/ThreadDetailView-s8_9uPY3.js +6 -0
  133. package/app/dist/assets/ThreadDetailView-s8_9uPY3.js.br +0 -0
  134. package/app/dist/assets/ThreadDetailView-s8_9uPY3.js.gz +0 -0
  135. package/app/dist/assets/ThreadSearchPaletteMode-bFrWtr14.js +1 -0
  136. package/app/dist/assets/ThreadSearchPaletteMode-bFrWtr14.js.br +0 -0
  137. package/app/dist/assets/ThreadSearchPaletteMode-bFrWtr14.js.gz +0 -0
  138. package/app/dist/assets/ThreadSecondaryPanel-ByRjsBee.js +1 -0
  139. package/app/dist/assets/ThreadSecondaryPanel-ByRjsBee.js.br +0 -0
  140. package/app/dist/assets/ThreadSecondaryPanel-ByRjsBee.js.gz +0 -0
  141. package/app/dist/assets/ThreadSecondaryPanelTabContent-CS-0RsBb.js +3 -0
  142. package/app/dist/assets/ThreadSecondaryPanelTabContent-CS-0RsBb.js.br +0 -0
  143. package/app/dist/assets/ThreadSecondaryPanelTabContent-CS-0RsBb.js.gz +0 -0
  144. package/app/dist/assets/ThreadStatusGlyph-BpAxP0Tu.js +1 -0
  145. package/app/dist/assets/ThreadStatusGlyph-BpAxP0Tu.js.br +0 -0
  146. package/app/dist/assets/ThreadStatusGlyph-BpAxP0Tu.js.gz +0 -0
  147. package/app/dist/assets/{ThreadTerminalPanel-Cfe76daj.js → ThreadTerminalPanel-CO1mCoJe.js} +1 -1
  148. package/app/dist/assets/ThreadTerminalPanel-CO1mCoJe.js.br +0 -0
  149. package/app/dist/assets/ThreadTerminalPanel-CO1mCoJe.js.gz +0 -0
  150. package/app/dist/assets/ThreadTerminalView-N_bmnfJo.js +1 -0
  151. package/app/dist/assets/ThreadTerminalView-N_bmnfJo.js.br +0 -0
  152. package/app/dist/assets/ThreadTerminalView-N_bmnfJo.js.gz +0 -0
  153. package/app/dist/assets/{ThreadTimelineNavigationContext-2--wIUmU.js → ThreadTimelineNavigationContext-Dpli_fFK.js} +2 -2
  154. package/app/dist/assets/ThreadTimelineNavigationContext-Dpli_fFK.js.br +0 -0
  155. package/app/dist/assets/ThreadTimelineNavigationContext-Dpli_fFK.js.gz +0 -0
  156. package/app/dist/assets/{ThreadUnarchiveButton-CiDbuPzJ.js → ThreadUnarchiveButton-CW3uEz1Q.js} +1 -1
  157. package/app/dist/assets/{TimelineDetailScroll-DnMC8nYC.js → TimelineDetailScroll-BLU-5S7-.js} +1 -1
  158. package/app/dist/assets/TimelineDetailScroll-BLU-5S7-.js.br +0 -0
  159. package/app/dist/assets/TimelineDetailScroll-BLU-5S7-.js.gz +0 -0
  160. package/app/dist/assets/{TimelineFileDiffBlock-D8pKEcE0.js → TimelineFileDiffBlock-Bb0-OH7e.js} +1 -1
  161. package/app/dist/assets/TimelineFileDiffBlock-Bb0-OH7e.js.br +0 -0
  162. package/app/dist/assets/TimelineFileDiffBlock-Bb0-OH7e.js.gz +0 -0
  163. package/app/dist/assets/{TimelineSelectionMenu-DDYrgVgK.js → TimelineSelectionMenu-CgAxp7QF.js} +1 -1
  164. package/app/dist/assets/TimelineSelectionMenu-CgAxp7QF.js.br +0 -0
  165. package/app/dist/assets/TimelineSelectionMenu-CgAxp7QF.js.gz +0 -0
  166. package/app/dist/assets/ToolsView-DYdtuuCy.js +4 -0
  167. package/app/dist/assets/ToolsView-DYdtuuCy.js.br +0 -0
  168. package/app/dist/assets/ToolsView-DYdtuuCy.js.gz +0 -0
  169. package/app/dist/assets/{ToolsViewSplits-VIMb0WxO.js → ToolsViewSplits-D-KM5VbR.js} +2 -2
  170. package/app/dist/assets/ToolsViewSplits-D-KM5VbR.js.br +0 -0
  171. package/app/dist/assets/ToolsViewSplits-D-KM5VbR.js.gz +0 -0
  172. package/app/dist/assets/{WaveformVisualizer-CyOfIcDU.js → WaveformVisualizer-VFrU7IdS.js} +1 -1
  173. package/app/dist/assets/WaveformVisualizer-VFrU7IdS.js.br +0 -0
  174. package/app/dist/assets/WaveformVisualizer-VFrU7IdS.js.gz +0 -0
  175. package/app/dist/assets/absolute-file-path-CugCBUdo.js +1 -0
  176. package/app/dist/assets/{app-fixed-tab-navigation-nG5duhr6.js → app-fixed-tab-navigation-C3t3sTTR.js} +1 -1
  177. package/app/dist/assets/app-fixed-tab-navigation-C3t3sTTR.js.br +0 -0
  178. package/app/dist/assets/app-fixed-tab-navigation-C3t3sTTR.js.gz +0 -0
  179. package/app/dist/assets/{audio-input-device-preference-Civxk2e_.js → audio-input-device-preference-wrxvijvs.js} +1 -1
  180. package/app/dist/assets/audio-input-device-preference-wrxvijvs.js.br +0 -0
  181. package/app/dist/assets/audio-input-device-preference-wrxvijvs.js.gz +0 -0
  182. package/app/dist/assets/{bottom-anchored-scroll-body-izL_2xQo.js → bottom-anchored-scroll-body-DrFjjITd.js} +1 -1
  183. package/app/dist/assets/bottom-anchored-scroll-body-DrFjjITd.js.br +0 -0
  184. package/app/dist/assets/bottom-anchored-scroll-body-DrFjjITd.js.gz +0 -0
  185. package/app/dist/assets/{browser-url-DQsPFWqd.js → browser-url-CRNmQmct.js} +1 -1
  186. package/app/dist/assets/browser-url-CRNmQmct.js.br +0 -0
  187. package/app/dist/assets/browser-url-CRNmQmct.js.gz +0 -0
  188. package/app/dist/assets/{checkbox-Dxs9oAMl.js → checkbox-1HfQvu2d.js} +1 -1
  189. package/app/dist/assets/checkbox-1HfQvu2d.js.br +0 -0
  190. package/app/dist/assets/checkbox-1HfQvu2d.js.gz +0 -0
  191. package/app/dist/assets/{code-loading-skeletons-CkiXPS0M.js → code-loading-skeletons-DtdoAfrj.js} +1 -1
  192. package/app/dist/assets/code-loading-skeletons-DtdoAfrj.js.br +4 -0
  193. package/app/dist/assets/code-loading-skeletons-DtdoAfrj.js.gz +0 -0
  194. package/app/dist/assets/code-rendering-CHgc25DA.js +1 -0
  195. package/app/dist/assets/{code-theme-registration-DWaGQiqG.js → code-theme-registration-BogeZhC7.js} +1 -1
  196. package/app/dist/assets/detail-card-D4_D7Wq-.js +1 -0
  197. package/app/dist/assets/detail-card-D4_D7Wq-.js.br +0 -0
  198. package/app/dist/assets/detail-card-D4_D7Wq-.js.gz +0 -0
  199. package/app/dist/assets/{diff-stats-tally-DQHS3tHN.js → diff-stats-tally-dxAKjCQi.js} +1 -1
  200. package/app/dist/assets/diff-stats-tally-dxAKjCQi.js.br +0 -0
  201. package/app/dist/assets/diff-stats-tally-dxAKjCQi.js.gz +0 -0
  202. package/app/dist/assets/{dist-DCULoGTS.js → dist-CgnI8mYy.js} +1 -1
  203. package/app/dist/assets/dist-CgnI8mYy.js.br +0 -0
  204. package/app/dist/assets/dist-CgnI8mYy.js.gz +0 -0
  205. package/app/dist/assets/{environment-mutations-Zes88JN-.js → environment-mutations-CHDn6qee.js} +1 -1
  206. package/app/dist/assets/environment-mutations-CHDn6qee.js.br +0 -0
  207. package/app/dist/assets/environment-mutations-CHDn6qee.js.gz +0 -0
  208. package/app/dist/assets/environment-workspace-display-aXNFFHRN.js +4 -0
  209. package/app/dist/assets/environment-workspace-display-aXNFFHRN.js.br +0 -0
  210. package/app/dist/assets/environment-workspace-display-aXNFFHRN.js.gz +0 -0
  211. package/app/dist/assets/{event-code-block-QXnzoFqm.js → event-code-block-989B1EqM.js} +1 -1
  212. package/app/dist/assets/event-code-block-989B1EqM.js.br +0 -0
  213. package/app/dist/assets/event-code-block-989B1EqM.js.gz +0 -0
  214. package/app/dist/assets/{expandable-text-DkUA9RQT.js → expandable-text-BQmCrn1r.js} +1 -1
  215. package/app/dist/assets/expandable-text-BQmCrn1r.js.br +0 -0
  216. package/app/dist/assets/expandable-text-BQmCrn1r.js.gz +0 -0
  217. package/app/dist/assets/{file-opener-preference-CXZHmESv.js → file-opener-preference-Yd0VIEdJ.js} +1 -1
  218. package/app/dist/assets/{file-path-link-D7DFjBWZ.js → file-path-link-BnuQ7GOP.js} +1 -1
  219. package/app/dist/assets/file-path-link-BnuQ7GOP.js.br +0 -0
  220. package/app/dist/assets/file-path-link-BnuQ7GOP.js.gz +0 -0
  221. package/app/dist/assets/{host-mutations-Fl0RjER0.js → host-mutations-BFX2sxxm.js} +1 -1
  222. package/app/dist/assets/host-mutations-BFX2sxxm.js.br +0 -0
  223. package/app/dist/assets/host-mutations-BFX2sxxm.js.gz +0 -0
  224. package/app/dist/assets/{icon-extended-C0LTNXfN.js → icon-extended-CVTvSZPU.js} +1 -1
  225. package/app/dist/assets/icon-extended-CVTvSZPU.js.br +0 -0
  226. package/app/dist/assets/icon-extended-CVTvSZPU.js.gz +0 -0
  227. package/app/dist/assets/{image-lightbox-DhNslR-8.js → image-lightbox-CYq-aV6a.js} +1 -1
  228. package/app/dist/assets/image-lightbox-CYq-aV6a.js.br +0 -0
  229. package/app/dist/assets/image-lightbox-CYq-aV6a.js.gz +0 -0
  230. package/app/dist/assets/index-DcGF-i5V.js +395 -0
  231. package/app/dist/assets/index-DcGF-i5V.js.br +0 -0
  232. package/app/dist/assets/index-DcGF-i5V.js.gz +0 -0
  233. package/app/dist/assets/index-DeeEkTuL.css +2 -0
  234. package/app/dist/assets/index-DeeEkTuL.css.br +0 -0
  235. package/app/dist/assets/index-DeeEkTuL.css.gz +0 -0
  236. package/app/dist/assets/{inline-rename-editor-nrH2d_Gy.js → inline-rename-editor-DsTTMQeQ.js} +1 -1
  237. package/app/dist/assets/inline-rename-editor-DsTTMQeQ.js.br +0 -0
  238. package/app/dist/assets/inline-rename-editor-DsTTMQeQ.js.gz +0 -0
  239. package/app/dist/assets/{launcherRow-CVYGyeOl.js → launcherRow-Mm64WYs2.js} +1 -1
  240. package/app/dist/assets/launcherRow-Mm64WYs2.js.br +0 -0
  241. package/app/dist/assets/launcherRow-Mm64WYs2.js.gz +0 -0
  242. package/app/dist/assets/{localhost-link-rewrite-description-C0FphFZq.js → localhost-link-rewrite-description-Da9LQDcz.js} +1 -1
  243. package/app/dist/assets/localhost-link-rewrite-description-Da9LQDcz.js.br +0 -0
  244. package/app/dist/assets/localhost-link-rewrite-description-Da9LQDcz.js.gz +0 -0
  245. package/app/dist/assets/{machine-provider-queries-BTz8Sz3J.js → machine-provider-queries-D3D5u7xT.js} +1 -1
  246. package/app/dist/assets/{machine-server-access-CGfd5e1r.js → machine-server-access-BBZR2E-e.js} +1 -1
  247. package/app/dist/assets/markdown-file-image-routing-BW14VUGE.js +1 -0
  248. package/app/dist/assets/{markdown-html-CLi3FhDR.js → markdown-html-BVwgNf0A.js} +1 -1
  249. package/app/dist/assets/markdown-html-BVwgNf0A.js.br +0 -0
  250. package/app/dist/assets/markdown-html-BVwgNf0A.js.gz +0 -0
  251. package/app/dist/assets/{markdown-local-file-link-BROpdQPF.js → markdown-local-file-link-Dhlzsjvu.js} +1 -1
  252. package/app/dist/assets/markdown-local-file-link-Dhlzsjvu.js.br +0 -0
  253. package/app/dist/assets/markdown-local-file-link-Dhlzsjvu.js.gz +0 -0
  254. package/app/dist/assets/{markdown-preview-CGXXNhJo.js → markdown-preview-BFrQHjqt.js} +9 -9
  255. package/app/dist/assets/markdown-preview-BFrQHjqt.js.br +0 -0
  256. package/app/dist/assets/markdown-preview-BFrQHjqt.js.gz +0 -0
  257. package/app/dist/assets/{markdown-prompt-mentions-CPWKCtMa.js → markdown-prompt-mentions-B_hjpVwF.js} +2 -2
  258. package/app/dist/assets/markdown-prompt-mentions-B_hjpVwF.js.br +0 -0
  259. package/app/dist/assets/markdown-prompt-mentions-B_hjpVwF.js.gz +0 -0
  260. package/app/dist/assets/{model-load-error-message-CH_k4E7q.js → model-load-error-message-C_DsOzNx.js} +1 -1
  261. package/app/dist/assets/model-load-error-message-C_DsOzNx.js.br +0 -0
  262. package/app/dist/assets/model-load-error-message-C_DsOzNx.js.gz +0 -0
  263. package/app/dist/assets/onboarding-telemetry-DepO9NTK.js +1 -0
  264. package/app/dist/assets/{open-in-editor-button-tA10Nkqn.js → open-in-editor-button-Jn2gF-rw.js} +1 -1
  265. package/app/dist/assets/open-in-editor-button-Jn2gF-rw.js.br +0 -0
  266. package/app/dist/assets/open-in-editor-button-Jn2gF-rw.js.gz +0 -0
  267. package/app/dist/assets/{page-shell-CNCVT3Uj.js → page-shell-CL1JEzGN.js} +1 -1
  268. package/app/dist/assets/page-shell-CL1JEzGN.js.br +0 -0
  269. package/app/dist/assets/page-shell-CL1JEzGN.js.gz +0 -0
  270. package/app/dist/assets/{pierre-worker-pool-pXJFsMd7.js → pierre-worker-pool-DDCagStH.js} +1 -1
  271. package/app/dist/assets/pierre-worker-pool-DDCagStH.js.br +0 -0
  272. package/app/dist/assets/pierre-worker-pool-DDCagStH.js.gz +0 -0
  273. package/app/dist/assets/plugin-detail-navigation-CJq8d7f0.js +1 -0
  274. package/app/dist/assets/plugin-detail-navigation-CJq8d7f0.js.br +0 -0
  275. package/app/dist/assets/plugin-detail-navigation-CJq8d7f0.js.gz +0 -0
  276. package/app/dist/assets/{plugin-frontend-DoWZV45B.js → plugin-frontend-D_R6h69s.js} +3 -3
  277. package/app/dist/assets/plugin-frontend-D_R6h69s.js.br +0 -0
  278. package/app/dist/assets/plugin-frontend-D_R6h69s.js.gz +0 -0
  279. package/app/dist/assets/{plugin-ui-Cu8MrXLJ.js → plugin-ui-BS-kYzwm.js} +1 -1
  280. package/app/dist/assets/plugin-ui-BS-kYzwm.js.br +0 -0
  281. package/app/dist/assets/plugin-ui-BS-kYzwm.js.gz +0 -0
  282. package/app/dist/assets/{project-default-execution-options-query-gaQEWNK0.js → project-default-execution-options-query-D-0QJ6Qt.js} +1 -1
  283. package/app/dist/assets/{queued-editor-typeahead-layout-DTUSPVuA.js → queued-editor-typeahead-layout-DyiJC3nu.js} +1 -1
  284. package/app/dist/assets/queued-editor-typeahead-layout-DyiJC3nu.js.br +0 -0
  285. package/app/dist/assets/queued-editor-typeahead-layout-DyiJC3nu.js.gz +0 -0
  286. package/app/dist/assets/queued-messages-layout-CghcpVJY.js +3 -0
  287. package/app/dist/assets/queued-messages-layout-CghcpVJY.js.br +0 -0
  288. package/app/dist/assets/queued-messages-layout-CghcpVJY.js.gz +0 -0
  289. package/app/dist/assets/{resource-list-DLZLjUCf.js → resource-list-QtZbobOx.js} +1 -1
  290. package/app/dist/assets/resource-list-QtZbobOx.js.br +0 -0
  291. package/app/dist/assets/resource-list-QtZbobOx.js.gz +0 -0
  292. package/app/dist/assets/root-compose-create-preference-CpyRZea5.js +1 -0
  293. package/app/dist/assets/{save-file-B8sl9wgP.js → save-file-D1NL0mtk.js} +1 -1
  294. package/app/dist/assets/settings-nav-CUMx1aUt.js +1 -0
  295. package/app/dist/assets/settings-nav-CUMx1aUt.js.br +0 -0
  296. package/app/dist/assets/settings-nav-CUMx1aUt.js.gz +0 -0
  297. package/app/dist/assets/{settings-sections-Dfo35J2q.js → settings-sections-DLsEgaeq.js} +1 -1
  298. package/app/dist/assets/settings-sections-DLsEgaeq.js.br +0 -0
  299. package/app/dist/assets/settings-sections-DLsEgaeq.js.gz +0 -0
  300. package/app/dist/assets/{shortcut-pill-BMlNncTw.js → shortcut-pill-D97ehvHS.js} +1 -1
  301. package/app/dist/assets/{sidebarTouchSensor-Da_E8eSx.js → sidebarTouchSensor-Cb66p7gD.js} +1 -1
  302. package/app/dist/assets/sidebarTouchSensor-Cb66p7gD.js.br +0 -0
  303. package/app/dist/assets/sidebarTouchSensor-Cb66p7gD.js.gz +0 -0
  304. package/app/dist/assets/{switch-BRYzbFH-.js → switch-Bnugzgln.js} +1 -1
  305. package/app/dist/assets/switch-Bnugzgln.js.br +0 -0
  306. package/app/dist/assets/switch-Bnugzgln.js.gz +0 -0
  307. package/app/dist/assets/{textarea-DpRLVuDl.js → textarea-CmXpn-W-.js} +1 -1
  308. package/app/dist/assets/{thread-event-parser-BrLyjs4v.js → thread-event-parser-BZ2rhDfl.js} +1 -1
  309. package/app/dist/assets/thread-event-parser-BZ2rhDfl.js.br +0 -0
  310. package/app/dist/assets/thread-event-parser-BZ2rhDfl.js.gz +0 -0
  311. package/app/dist/assets/thread-panel-queries-Km3N9Osi.js +1 -0
  312. package/app/dist/assets/thread-panel-queries-Km3N9Osi.js.br +0 -0
  313. package/app/dist/assets/thread-panel-queries-Km3N9Osi.js.gz +0 -0
  314. package/app/dist/assets/thread-runtime-mutations-0LwFE8jq.js +3 -0
  315. package/app/dist/assets/thread-runtime-mutations-0LwFE8jq.js.br +0 -0
  316. package/app/dist/assets/thread-runtime-mutations-0LwFE8jq.js.gz +0 -0
  317. package/app/dist/assets/{thread-terminal-queries-Blou76c_.js → thread-terminal-queries-B26oP9UT.js} +1 -1
  318. package/app/dist/assets/thread-terminal-queries-B26oP9UT.js.br +0 -0
  319. package/app/dist/assets/thread-terminal-queries-B26oP9UT.js.gz +0 -0
  320. package/app/dist/assets/{threadRecentItems-BiCe3SkL.js → threadRecentItems-Cmjzl7bQ.js} +1 -1
  321. package/app/dist/assets/threadRecentItems-Cmjzl7bQ.js.br +0 -0
  322. package/app/dist/assets/threadRecentItems-Cmjzl7bQ.js.gz +0 -0
  323. package/app/dist/assets/{threadWorkspaceOpenPath-C9eC_XGN.js → threadWorkspaceOpenPath-Bmp_PIxV.js} +1 -1
  324. package/app/dist/assets/threadWorkspaceOpenPath-Bmp_PIxV.js.br +0 -0
  325. package/app/dist/assets/threadWorkspaceOpenPath-Bmp_PIxV.js.gz +0 -0
  326. package/app/dist/assets/{title-bar-scroll-fade-OrK4M84v.js → title-bar-scroll-fade-aNQrbfIG.js} +1 -1
  327. package/app/dist/assets/title-bar-scroll-fade-aNQrbfIG.js.br +0 -0
  328. package/app/dist/assets/title-bar-scroll-fade-aNQrbfIG.js.gz +0 -0
  329. package/app/dist/assets/{truncate-start-Ck1IPV62.js → truncate-start-Bny9cWRF.js} +1 -1
  330. package/app/dist/assets/{use-hover-popover-uokpMJ80.js → use-hover-popover-BdiH_Tfy.js} +1 -1
  331. package/app/dist/assets/use-hover-popover-BdiH_Tfy.js.br +0 -0
  332. package/app/dist/assets/use-hover-popover-BdiH_Tfy.js.gz +0 -0
  333. package/app/dist/assets/{useElementWidth-EbzKQ0bg.js → useElementWidth-DWdvxoro.js} +1 -1
  334. package/app/dist/assets/useElementWidth-DWdvxoro.js.br +0 -0
  335. package/app/dist/assets/useElementWidth-DWdvxoro.js.gz +0 -0
  336. package/app/dist/assets/{useLocalOpenTargets-CtvcdlZg.js → useLocalOpenTargets-zowTaKCQ.js} +1 -1
  337. package/app/dist/assets/useLocalOpenTargets-zowTaKCQ.js.br +0 -0
  338. package/app/dist/assets/useLocalOpenTargets-zowTaKCQ.js.gz +0 -0
  339. package/app/dist/assets/{usePanelResizeSnap-CuwA4rg3.js → usePanelResizeSnap-B_dDez74.js} +1 -1
  340. package/app/dist/assets/usePanelResizeSnap-B_dDez74.js.br +0 -0
  341. package/app/dist/assets/usePanelResizeSnap-B_dDez74.js.gz +0 -0
  342. package/app/dist/assets/usePanelTerminals-BAudrwH4.js +1 -0
  343. package/app/dist/assets/usePanelTerminals-BAudrwH4.js.br +0 -0
  344. package/app/dist/assets/usePanelTerminals-BAudrwH4.js.gz +0 -0
  345. package/app/dist/assets/{usePathSuggestions-DZ1XPM_t.js → usePathSuggestions-DMFe0E0a.js} +1 -1
  346. package/app/dist/assets/usePathSuggestions-DMFe0E0a.js.br +0 -0
  347. package/app/dist/assets/usePathSuggestions-DMFe0E0a.js.gz +0 -0
  348. package/app/dist/assets/{useResolvedLiveFileTarget-DlZUgf7A.js → useResolvedLiveFileTarget-G_UQNMF1.js} +1 -1
  349. package/app/dist/assets/useResolvedLiveFileTarget-G_UQNMF1.js.br +0 -0
  350. package/app/dist/assets/useResolvedLiveFileTarget-G_UQNMF1.js.gz +0 -0
  351. package/app/dist/assets/{useThreadTerminalController-D4Cr2aY0.js → useThreadTerminalController-JoWrmPHn.js} +1 -1
  352. package/app/dist/assets/useThreadTerminalController-JoWrmPHn.js.br +0 -0
  353. package/app/dist/assets/useThreadTerminalController-JoWrmPHn.js.gz +0 -0
  354. package/app/dist/assets/{workspace-change-summary-C1EKX0Np.js → workspace-change-summary-BtZwT2e6.js} +1 -1
  355. package/app/dist/assets/workspace-change-summary-BtZwT2e6.js.br +0 -0
  356. package/app/dist/assets/workspace-change-summary-BtZwT2e6.js.gz +0 -0
  357. package/app/dist/assets/{workspace-checkout-display-DRAc3j4u.js → workspace-checkout-display-DnaC1zwT.js} +7 -7
  358. package/app/dist/assets/workspace-checkout-display-DnaC1zwT.js.br +0 -0
  359. package/app/dist/assets/workspace-checkout-display-DnaC1zwT.js.gz +0 -0
  360. package/app/dist/index.html +31 -17
  361. package/app/dist/index.html.br +0 -0
  362. package/app/dist/index.html.gz +0 -0
  363. package/dist/index.d.ts +61 -60
  364. package/dist/index.js +21 -3
  365. package/host-daemon/dist/bb +2 -2
  366. package/host-daemon/dist/daemon-bundle.mjs +109 -109
  367. package/host-daemon/dist/moonlet +2 -2
  368. package/host-daemon/dist/moonlet-chunks/{browser-3YADF5CZ.js → browser-44ZQ3FOI.js} +1 -1
  369. package/host-daemon/dist/moonlet-chunks/{chunk-ZY4JRPPT.js → chunk-JBLSGIQQ.js} +1 -1
  370. package/host-daemon/dist/moonlet-chunks/{chunk-DYWN65E6.js → chunk-JXM67MRW.js} +1 -1
  371. package/host-daemon/dist/moonlet-chunks/{chunk-Z7UFAOBI.js → chunk-PMU3UDAI.js} +1 -1
  372. package/host-daemon/dist/moonlet-chunks/{chunk-UASCWFYV.js → chunk-QAWZMDCJ.js} +1 -1
  373. package/host-daemon/dist/moonlet-chunks/{chunk-UZIJUXRX.js → chunk-QDRMQGXG.js} +1 -1
  374. package/host-daemon/dist/moonlet-chunks/{chunk-VRIDG567.js → chunk-URPVHDSN.js} +1 -1
  375. package/host-daemon/dist/moonlet-chunks/{chunk-UBCGVKZ2.js → chunk-VLBDIUPP.js} +1 -1
  376. package/host-daemon/dist/moonlet-chunks/{chunk-CJVCV7LA.js → chunk-XLQMIU5E.js} +1 -1
  377. package/host-daemon/dist/moonlet-chunks/chunk-YKNGHXJL.js +2 -0
  378. package/host-daemon/dist/moonlet-chunks/{chunk-GJNT53PW.js → chunk-ZIPJ3D34.js} +1 -1
  379. package/host-daemon/dist/moonlet-chunks/{client-HJ57QVLD.js → client-QUJX2VXF.js} +1 -1
  380. package/host-daemon/dist/moonlet-chunks/{commander-errors-VI7J6RNT.js → commander-errors-NYPVEQE6.js} +1 -1
  381. package/host-daemon/dist/moonlet-chunks/{context-env-C4YEBBVX.js → context-env-UZULKJG3.js} +1 -1
  382. package/host-daemon/dist/moonlet-chunks/{context-hints-FZ224BCX.js → context-hints-NIGZFDZ2.js} +1 -1
  383. package/host-daemon/dist/moonlet-chunks/{diagnostics-OU2KW3CN.js → diagnostics-ZMN3WD5F.js} +1 -1
  384. package/host-daemon/dist/moonlet-chunks/{environment-45XH2PJT.js → environment-LFNVVRTR.js} +1 -1
  385. package/host-daemon/dist/moonlet-chunks/{file-OHC2H5AH.js → file-VMCXXBWE.js} +1 -1
  386. package/host-daemon/dist/moonlet-chunks/{guide-T2HEZTCZ.js → guide-JMDCPBCD.js} +1 -1
  387. package/host-daemon/dist/moonlet-chunks/{machine-7DB7FE7G.js → machine-FG42HUJ4.js} +1 -1
  388. package/host-daemon/dist/moonlet-chunks/{marketplace-GSP2IPGS.js → marketplace-BUVTLJBV.js} +1 -1
  389. package/host-daemon/dist/moonlet-chunks/{permissions-SOZPETLR.js → permissions-OLVTX7QS.js} +1 -1
  390. package/host-daemon/dist/moonlet-chunks/{plugin-672NQWPG.js → plugin-TREJAZTC.js} +1 -1
  391. package/host-daemon/dist/moonlet-chunks/{plugin-cli-proxy-YK6LMDCS.js → plugin-cli-proxy-XYQ4P6CO.js} +1 -1
  392. package/host-daemon/dist/moonlet-chunks/{project-KMNJH6RG.js → project-PVNIZCFU.js} +1 -1
  393. package/host-daemon/dist/moonlet-chunks/{prompt-history-H3Y2IHDY.js → prompt-history-BYCO2ZB3.js} +1 -1
  394. package/host-daemon/dist/moonlet-chunks/{provider-EKKSYF2D.js → provider-K7IJAPU7.js} +1 -1
  395. package/host-daemon/dist/moonlet-chunks/{schedule-KVSISSIR.js → schedule-QTGQ2OQJ.js} +1 -1
  396. package/host-daemon/dist/moonlet-chunks/{server-53I6IGAP.js → server-TNYQLXN4.js} +1 -1
  397. package/host-daemon/dist/moonlet-chunks/settings-X5E35QAK.js +4 -0
  398. package/host-daemon/dist/moonlet-chunks/{skill-DXINIPQ3.js → skill-D3TXRI2H.js} +1 -1
  399. package/host-daemon/dist/moonlet-chunks/{status-BSMUYEAO.js → status-ZON5QALD.js} +1 -1
  400. package/host-daemon/dist/moonlet-chunks/{terminal-VKBGZFLN.js → terminal-RMTHR7AY.js} +1 -1
  401. package/host-daemon/dist/moonlet-chunks/{theme-3YCCZBGC.js → theme-K6MCVSLL.js} +1 -1
  402. package/host-daemon/dist/moonlet-chunks/{thread-PFBPLD4F.js → thread-SVRDPK2D.js} +1 -1
  403. package/host-daemon/dist/moonlet-chunks/{updates-OO7GE7UB.js → updates-M6NCKC4T.js} +1 -1
  404. package/host-daemon/dist/moonlet-chunks/{voice-ZJOSAJW7.js → voice-AYXDFHQ4.js} +1 -1
  405. package/package.json +2 -2
  406. package/server/dist/builtin-plugins/github/dist/app.css +1 -1
  407. package/server/dist/builtin-plugins/github/dist/app.js +1 -1
  408. package/server/dist/builtin-plugins/mail/skills/mail/SKILL.md +14 -12
  409. package/server/dist/builtin-plugins/notify-feed/dist/app.css +1 -1
  410. package/server/dist/builtin-plugins/notify-feed/dist/app.js +3 -3
  411. package/server/dist/builtin-plugins/orbit/dist/app.css +1 -1
  412. package/server/dist/builtin-plugins/orbit/dist/app.js +83 -83
  413. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/migrations/task-index-tail.json +10 -0
  414. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/fixed-runner/linux-x64/manifest.json +4 -4
  415. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/revision +1 -1
  416. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/source.json +1 -1
  417. package/server/dist/builtin-plugins/orbit/dist/host.js +1 -1
  418. package/server/dist/builtin-plugins/orbit/dist/host.meta.json +1 -1
  419. package/server/dist/builtin-plugins/orbit/dist/server.js +420 -420
  420. package/server/dist/start-server.js +21 -3
  421. package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.br +0 -0
  422. package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.gz +0 -0
  423. package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.br +0 -0
  424. package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.gz +0 -0
  425. package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js +0 -1
  426. package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.br +0 -0
  427. package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.gz +0 -0
  428. package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.br +0 -0
  429. package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.gz +0 -0
  430. package/app/dist/assets/DiffHost-xesYsZUt.js +0 -1
  431. package/app/dist/assets/DiffHost-xesYsZUt.js.br +0 -0
  432. package/app/dist/assets/DiffHost-xesYsZUt.js.gz +0 -0
  433. package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.br +0 -0
  434. package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.gz +0 -0
  435. package/app/dist/assets/FilePreview-CzacGZ35.js.br +0 -0
  436. package/app/dist/assets/FilePreview-CzacGZ35.js.gz +0 -0
  437. package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.br +0 -0
  438. package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.gz +0 -0
  439. package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.br +0 -0
  440. package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.gz +0 -0
  441. package/app/dist/assets/MachineLabel-vUI5j8ve.js.br +0 -0
  442. package/app/dist/assets/MachineLabel-vUI5j8ve.js.gz +0 -0
  443. package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.br +0 -0
  444. package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.gz +0 -0
  445. package/app/dist/assets/MachineSettingsView-BR6qseai.js +0 -1
  446. package/app/dist/assets/MachineSettingsView-BR6qseai.js.br +0 -0
  447. package/app/dist/assets/MachineSettingsView-BR6qseai.js.gz +0 -0
  448. package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.br +0 -0
  449. package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.gz +0 -0
  450. package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js +0 -1
  451. package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.br +0 -0
  452. package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.gz +0 -0
  453. package/app/dist/assets/MoonletDiff-CCvaiEEC.js +0 -1
  454. package/app/dist/assets/MoonletDiff-CCvaiEEC.js.br +0 -0
  455. package/app/dist/assets/MoonletDiff-CCvaiEEC.js.gz +0 -0
  456. package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js +0 -2
  457. package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.br +0 -0
  458. package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.gz +0 -0
  459. package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js +0 -2
  460. package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.br +0 -0
  461. package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.gz +0 -0
  462. package/app/dist/assets/NewTabPage-BOqCqqLe.js.br +0 -0
  463. package/app/dist/assets/NewTabPage-BOqCqqLe.js.gz +0 -0
  464. package/app/dist/assets/NewThreadComposer-DyB52pmS.js +0 -1
  465. package/app/dist/assets/NewThreadComposer-DyB52pmS.js.br +0 -0
  466. package/app/dist/assets/NewThreadComposer-DyB52pmS.js.gz +0 -0
  467. package/app/dist/assets/OnboardingFlow-DTPixZrb.js +0 -1
  468. package/app/dist/assets/OnboardingFlow-DTPixZrb.js.br +0 -0
  469. package/app/dist/assets/OnboardingFlow-DTPixZrb.js.gz +0 -0
  470. package/app/dist/assets/OptionPicker-CxOGHDd8.js +0 -1
  471. package/app/dist/assets/OptionPicker-CxOGHDd8.js.br +0 -0
  472. package/app/dist/assets/OptionPicker-CxOGHDd8.js.gz +0 -0
  473. package/app/dist/assets/PaletteShell-BMkwhUdz.js.br +0 -0
  474. package/app/dist/assets/PaletteShell-BMkwhUdz.js.gz +0 -0
  475. package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.br +0 -0
  476. package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.gz +0 -0
  477. package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.br +0 -0
  478. package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.gz +0 -0
  479. package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js +0 -1
  480. package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.br +0 -0
  481. package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.gz +0 -0
  482. package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.br +0 -0
  483. package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.gz +0 -0
  484. package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.br +0 -0
  485. package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.gz +0 -0
  486. package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js +0 -1
  487. package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.br +0 -0
  488. package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.gz +0 -0
  489. package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js +0 -1
  490. package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.br +0 -0
  491. package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.gz +0 -0
  492. package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.br +0 -0
  493. package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.gz +0 -0
  494. package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js +0 -3
  495. package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.br +0 -0
  496. package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.gz +0 -0
  497. package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js +0 -1
  498. package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.br +0 -0
  499. package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.gz +0 -0
  500. package/app/dist/assets/RootComposeView-BIZpqYG3.js +0 -1
  501. package/app/dist/assets/RootComposeView-BIZpqYG3.js.br +0 -0
  502. package/app/dist/assets/RootComposeView-BIZpqYG3.js.gz +0 -0
  503. package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js +0 -1
  504. package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.br +0 -0
  505. package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.gz +0 -0
  506. package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.br +0 -0
  507. package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.gz +0 -0
  508. package/app/dist/assets/SettingsSidebar-DY_kbv4v.js +0 -1
  509. package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.br +0 -0
  510. package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.gz +0 -0
  511. package/app/dist/assets/SettingsView-CR1GzBCl.js +0 -7
  512. package/app/dist/assets/SettingsView-CR1GzBCl.js.br +0 -0
  513. package/app/dist/assets/SettingsView-CR1GzBCl.js.gz +0 -0
  514. package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js +0 -1
  515. package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.br +0 -0
  516. package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.gz +0 -0
  517. package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js +0 -1
  518. package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.br +0 -0
  519. package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.gz +0 -0
  520. package/app/dist/assets/SourceCodeHost-DkoXO-RM.js +0 -2
  521. package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.br +0 -0
  522. package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.gz +0 -0
  523. package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js +0 -2
  524. package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.br +0 -0
  525. package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.gz +0 -0
  526. package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.br +0 -0
  527. package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.gz +0 -0
  528. package/app/dist/assets/ThreadActionsMenu-BulopjpY.js +0 -1
  529. package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.br +0 -0
  530. package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.gz +0 -0
  531. package/app/dist/assets/ThreadDetailView-C6cu9JmT.js +0 -6
  532. package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.br +0 -0
  533. package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.gz +0 -0
  534. package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js +0 -1
  535. package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.br +0 -0
  536. package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.gz +0 -0
  537. package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js +0 -1
  538. package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.br +0 -0
  539. package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.gz +0 -0
  540. package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js +0 -3
  541. package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.br +0 -0
  542. package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.gz +0 -0
  543. package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js +0 -1
  544. package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.br +0 -0
  545. package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.gz +0 -0
  546. package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.br +0 -0
  547. package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.gz +0 -0
  548. package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js +0 -1
  549. package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.br +0 -0
  550. package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.gz +0 -0
  551. package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.br +0 -0
  552. package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.gz +0 -0
  553. package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.br +0 -0
  554. package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.gz +0 -0
  555. package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.br +0 -0
  556. package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.gz +0 -0
  557. package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.br +0 -0
  558. package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.gz +0 -0
  559. package/app/dist/assets/ToolsView-CXmmNmMz.js +0 -4
  560. package/app/dist/assets/ToolsView-CXmmNmMz.js.br +0 -0
  561. package/app/dist/assets/ToolsView-CXmmNmMz.js.gz +0 -0
  562. package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.br +0 -0
  563. package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.gz +0 -0
  564. package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.br +0 -0
  565. package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.gz +0 -0
  566. package/app/dist/assets/absolute-file-path-BxWHDkiV.js +0 -1
  567. package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.br +0 -0
  568. package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.gz +0 -0
  569. package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.br +0 -0
  570. package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.gz +0 -0
  571. package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.br +0 -0
  572. package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.gz +0 -0
  573. package/app/dist/assets/browser-url-DQsPFWqd.js.br +0 -0
  574. package/app/dist/assets/browser-url-DQsPFWqd.js.gz +0 -0
  575. package/app/dist/assets/checkbox-Dxs9oAMl.js.br +0 -0
  576. package/app/dist/assets/checkbox-Dxs9oAMl.js.gz +0 -0
  577. package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.br +0 -0
  578. package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.gz +0 -0
  579. package/app/dist/assets/code-rendering-DjLdb6cB.js +0 -1
  580. package/app/dist/assets/detail-card-BFm1NEQz.js +0 -1
  581. package/app/dist/assets/detail-card-BFm1NEQz.js.br +0 -0
  582. package/app/dist/assets/detail-card-BFm1NEQz.js.gz +0 -0
  583. package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.br +0 -0
  584. package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.gz +0 -0
  585. package/app/dist/assets/dist-DCULoGTS.js.br +0 -0
  586. package/app/dist/assets/dist-DCULoGTS.js.gz +0 -0
  587. package/app/dist/assets/environment-mutations-Zes88JN-.js.br +0 -0
  588. package/app/dist/assets/environment-mutations-Zes88JN-.js.gz +0 -0
  589. package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js +0 -4
  590. package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.br +0 -0
  591. package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.gz +0 -0
  592. package/app/dist/assets/event-code-block-QXnzoFqm.js.br +0 -0
  593. package/app/dist/assets/event-code-block-QXnzoFqm.js.gz +0 -0
  594. package/app/dist/assets/expandable-text-DkUA9RQT.js.br +0 -0
  595. package/app/dist/assets/expandable-text-DkUA9RQT.js.gz +0 -0
  596. package/app/dist/assets/file-path-link-D7DFjBWZ.js.br +0 -0
  597. package/app/dist/assets/file-path-link-D7DFjBWZ.js.gz +0 -0
  598. package/app/dist/assets/host-mutations-Fl0RjER0.js.br +0 -0
  599. package/app/dist/assets/host-mutations-Fl0RjER0.js.gz +0 -0
  600. package/app/dist/assets/icon-extended-C0LTNXfN.js.br +0 -0
  601. package/app/dist/assets/icon-extended-C0LTNXfN.js.gz +0 -0
  602. package/app/dist/assets/image-lightbox-DhNslR-8.js.br +0 -0
  603. package/app/dist/assets/image-lightbox-DhNslR-8.js.gz +0 -0
  604. package/app/dist/assets/index-C2K528W0.css +0 -2
  605. package/app/dist/assets/index-C2K528W0.css.br +0 -0
  606. package/app/dist/assets/index-C2K528W0.css.gz +0 -0
  607. package/app/dist/assets/index-DCps_qBD.js +0 -395
  608. package/app/dist/assets/index-DCps_qBD.js.br +0 -0
  609. package/app/dist/assets/index-DCps_qBD.js.gz +0 -0
  610. package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.br +0 -0
  611. package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.gz +0 -0
  612. package/app/dist/assets/launcherRow-CVYGyeOl.js.br +0 -0
  613. package/app/dist/assets/launcherRow-CVYGyeOl.js.gz +0 -0
  614. package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.br +0 -0
  615. package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.gz +0 -0
  616. package/app/dist/assets/markdown-file-image-routing-BhGjphhz.js +0 -1
  617. package/app/dist/assets/markdown-html-CLi3FhDR.js.br +0 -0
  618. package/app/dist/assets/markdown-html-CLi3FhDR.js.gz +0 -0
  619. package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.br +0 -0
  620. package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.gz +0 -0
  621. package/app/dist/assets/markdown-preview-CGXXNhJo.js.br +0 -0
  622. package/app/dist/assets/markdown-preview-CGXXNhJo.js.gz +0 -0
  623. package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.br +0 -0
  624. package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.gz +0 -0
  625. package/app/dist/assets/model-load-error-message-CH_k4E7q.js.br +0 -0
  626. package/app/dist/assets/model-load-error-message-CH_k4E7q.js.gz +0 -0
  627. package/app/dist/assets/onboarding-telemetry-BXIyQ5F4.js +0 -1
  628. package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.br +0 -0
  629. package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.gz +0 -0
  630. package/app/dist/assets/page-shell-CNCVT3Uj.js.br +0 -0
  631. package/app/dist/assets/page-shell-CNCVT3Uj.js.gz +0 -0
  632. package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.br +0 -0
  633. package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.gz +0 -0
  634. package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js +0 -1
  635. package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.br +0 -0
  636. package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.gz +0 -0
  637. package/app/dist/assets/plugin-frontend-DoWZV45B.js.br +0 -0
  638. package/app/dist/assets/plugin-frontend-DoWZV45B.js.gz +0 -0
  639. package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.br +0 -0
  640. package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.gz +0 -0
  641. package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.br +0 -0
  642. package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.gz +0 -0
  643. package/app/dist/assets/queued-messages-layout-Bj1foecI.js +0 -3
  644. package/app/dist/assets/queued-messages-layout-Bj1foecI.js.br +0 -0
  645. package/app/dist/assets/queued-messages-layout-Bj1foecI.js.gz +0 -0
  646. package/app/dist/assets/resource-list-DLZLjUCf.js.br +0 -0
  647. package/app/dist/assets/resource-list-DLZLjUCf.js.gz +0 -0
  648. package/app/dist/assets/root-compose-create-preference-Bv_dFEsH.js +0 -1
  649. package/app/dist/assets/settings-nav-D5tWYG52.js +0 -1
  650. package/app/dist/assets/settings-nav-D5tWYG52.js.br +0 -0
  651. package/app/dist/assets/settings-nav-D5tWYG52.js.gz +0 -0
  652. package/app/dist/assets/settings-sections-Dfo35J2q.js.br +0 -0
  653. package/app/dist/assets/settings-sections-Dfo35J2q.js.gz +0 -0
  654. package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.br +0 -0
  655. package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.gz +0 -0
  656. package/app/dist/assets/switch-BRYzbFH-.js.br +0 -0
  657. package/app/dist/assets/switch-BRYzbFH-.js.gz +0 -0
  658. package/app/dist/assets/thread-event-parser-BrLyjs4v.js.br +0 -0
  659. package/app/dist/assets/thread-event-parser-BrLyjs4v.js.gz +0 -0
  660. package/app/dist/assets/thread-panel-queries-s8vzntf7.js +0 -1
  661. package/app/dist/assets/thread-panel-queries-s8vzntf7.js.br +0 -0
  662. package/app/dist/assets/thread-panel-queries-s8vzntf7.js.gz +0 -0
  663. package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js +0 -3
  664. package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.br +0 -0
  665. package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.gz +0 -0
  666. package/app/dist/assets/thread-terminal-queries-Blou76c_.js.br +0 -0
  667. package/app/dist/assets/thread-terminal-queries-Blou76c_.js.gz +0 -0
  668. package/app/dist/assets/threadRecentItems-BiCe3SkL.js.br +0 -0
  669. package/app/dist/assets/threadRecentItems-BiCe3SkL.js.gz +0 -0
  670. package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.br +0 -0
  671. package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.gz +0 -0
  672. package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.br +0 -0
  673. package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.gz +0 -0
  674. package/app/dist/assets/use-hover-popover-uokpMJ80.js.br +0 -0
  675. package/app/dist/assets/use-hover-popover-uokpMJ80.js.gz +0 -0
  676. package/app/dist/assets/useElementWidth-EbzKQ0bg.js.br +0 -0
  677. package/app/dist/assets/useElementWidth-EbzKQ0bg.js.gz +0 -0
  678. package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.br +0 -0
  679. package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.gz +0 -0
  680. package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.br +0 -0
  681. package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.gz +0 -0
  682. package/app/dist/assets/usePanelTerminals-BZhTVWNX.js +0 -1
  683. package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.br +0 -0
  684. package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.gz +0 -0
  685. package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.br +0 -0
  686. package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.gz +0 -0
  687. package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.br +0 -0
  688. package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.gz +0 -0
  689. package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.br +0 -0
  690. package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.gz +0 -0
  691. package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.br +0 -0
  692. package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.gz +0 -0
  693. package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.br +0 -0
  694. package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.gz +0 -0
  695. package/host-daemon/dist/moonlet-chunks/chunk-MNJOOMMT.js +0 -2
  696. package/host-daemon/dist/moonlet-chunks/settings-MKGSGNIO.js +0 -4
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,jr as n,kr as r,qr as i,ri as a}from"./boot-vendor-CKEhulXz.js";import{Co as o,Dh as s,Do as c,Eo as l,Gd as u,Go as d,La as f,Qi as p,So as m,Zo as h,ea as g,g as _,ia as v,jh as y,ki as b,km as x,wo as S,xm as C}from"./index-DCps_qBD.js";import{n as w}from"./index.browser-usHDzq3C.js";import{t as T}from"./OptionPicker-CxOGHDd8.js";import{s as E}from"./dist-DCULoGTS.js";import{n as D,r as O}from"./machine-server-access-CGfd5e1r.js";var k=r(),A=e(t(),1),j=e(a(),1);function M(e){try{return new URL(e)}catch{return null}}function N(){let e=d(),t=_(),n=e.data?.generalSettings,r=e.data?.serverAccess,i=n?.machineServerUrl??``,[a,o]=(0,A.useState)(null),[s,c]=(0,A.useState)(null),l=!n,u=r?.defaultProviderId??`direct`,[f,p]=(0,A.useState)(null);(0,A.useEffect)(()=>{f===u&&p(null)},[u,f]);let m=f??u;return{access:r,disabled:l,draft:a,error:s,effective:r?.providers.find(e=>e.id===m),configurationMessage:D(r,m),saving:t.isPending,selected:m,value:i,editDraft:e=>{o(e),c(null)},selectProvider:e=>{!n||e===m||(p(e),t.mutate({defaultMachineAccess:e},{onError:()=>p(null)}))},commitUrl:async()=>{if(!n||a===null)return;let e=a.trim();if(e){let t=M(e);if(t===null||![`http:`,`https:`].includes(t.protocol)||t.username||t.password){c(`Enter a valid HTTP or HTTPS URL without credentials`);return}if(b(e)){c(`Other machines cannot reach localhost. Use a domain or shared-network address.`);return}}try{await t.mutateAsync({machineServerUrl:e||null})}catch(e){c(h({error:e,fallbackMessage:`Couldn't save the address.`}));return}o(null),c(null)}}}function P(e){let t=(0,k.c)(7),{children:n,title:r}=e,i=r===void 0?`Machine access`:r,a=N(),o;t[0]!==n||t[1]!==a?(o=n?.(a.selected===`direct`?null:a.effective?.pluginId??null),t[0]=n,t[1]=a,t[2]=o):o=t[2];let s;return t[3]!==a||t[4]!==o||t[5]!==i?(s=(0,j.jsx)(F,{machineAccess:a,title:i,children:o}),t[3]=a,t[4]=o,t[5]=i,t[6]=s):s=t[6],s}function F(e){let t=(0,k.c)(12),{machineAccess:n,children:r,title:i}=e,a=i===void 0?`Machine access`:i,o;t[0]===a?o=t[1]:(o=(0,j.jsx)(`h2`,{className:`text-sm font-semibold`,children:a}),t[0]=a,t[1]=o);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,j.jsx)(`p`,{className:`mt-1 text-xs text-subtle-foreground`,children:`Choose how your devices reach this Moonlet server.`}),t[2]=c):c=t[2];let l;t[3]===o?l=t[4]:(l=(0,j.jsxs)(`div`,{children:[o,c]}),t[3]=o,t[4]=l);let u;t[5]!==r||t[6]!==n?(u=(0,j.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,j.jsx)(`div`,{className:`px-4 py-3`,children:n.access===void 0?(0,j.jsxs)(`p`,{role:`status`,className:`flex h-8 items-center gap-2 text-xs text-subtle-foreground`,children:[(0,j.jsx)(s,{name:`Spinner`,className:`size-3.5 animate-spin`}),`Loading connection settings…`]}):(0,j.jsxs)(j.Fragment,{children:[n.selected!==`direct`&&n.effective?(0,j.jsx)(V,{machineAccess:n,methodPicker:(0,j.jsx)(R,{machineAccess:n,align:`start`})}):(0,j.jsxs)(`div`,{className:`space-y-3`,children:[(0,j.jsx)(`div`,{className:`flex`,children:(0,j.jsx)(R,{machineAccess:n,align:`start`})}),(0,j.jsx)(B,{machineAccess:n})]}),r]})})}),t[5]=r,t[6]=n,t[7]=u):u=t[7];let d;return t[8]!==l||t[9]!==u||t[10]!==a?(d=(0,j.jsxs)(`section`,{"aria-label":a,className:`space-y-3`,children:[l,u]}),t[8]=l,t[9]=u,t[10]=a,t[11]=d):d=t[11],d}function I(e){let t=(0,k.c)(3),{onNavigate:n}=e,r=N(),i;return t[0]!==r||t[1]!==n?(i=(0,j.jsx)(L,{machineAccess:r,onNavigate:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function L(e){let t=(0,k.c)(9),{machineAccess:n,onNavigate:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsx)(`span`,{className:`text-sm font-normal text-foreground`,children:`Connection method`}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[i,(0,j.jsx)(R,{machineAccess:n})]}),t[1]=n,t[2]=a);let o;t[3]!==n||t[4]!==r?(o=(0,j.jsx)(B,{machineAccess:n,onNavigate:r}),t[3]=n,t[4]=r,t[5]=o):o=t[5];let s;return t[6]!==a||t[7]!==o?(s=(0,j.jsxs)(`div`,{className:`space-y-3`,children:[a,o]}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function R(e){let t=(0,k.c)(15),{machineAccess:n,align:r}=e,i=r===void 0?`end`:r,{access:a,disabled:o,selected:s}=n,c;t[0]!==a||t[1]!==n.effective?(c=a&&!n.effective?{label:`Unavailable method`}:void 0,t[0]=a,t[1]=n.effective,t[2]=c):c=t[2];let l=i===`start`?`-ml-1`:void 0,u;t[3]===a?.providers?u=t[4]:(u=a?.providers??[],t[3]=a?.providers,t[4]=u);let d;t[5]===u?d=t[6]:(d=u.map(z),t[5]=u,t[6]=d);let f;return t[7]!==i||t[8]!==o||t[9]!==n.selectProvider||t[10]!==s||t[11]!==c||t[12]!==l||t[13]!==d?(f=(0,j.jsx)(T,{modal:!1,label:`Connection method`,value:s,displayOverride:c,disabled:o,showChevronWhenDisabled:!0,align:i,className:l,options:d,onChange:n.selectProvider}),t[7]=i,t[8]=o,t[9]=n.selectProvider,t[10]=s,t[11]=c,t[12]=l,t[13]=d,t[14]=f):f=t[14],f}function z(e){return{value:e.id,label:e.displayName,description:e.description}}function B(e){let t=(0,k.c)(21),{machineAccess:n,onNavigate:r}=e,{access:i,disabled:a,draft:o,effective:s,error:c,saving:l,selected:u,value:d}=n,f;t[0]!==s||t[1]!==n||t[2]!==r||t[3]!==u?(f=u!==`direct`&&s!==void 0&&(0,j.jsx)(V,{machineAccess:n,onNavigate:r}),t[0]=s,t[1]=n,t[2]=r,t[3]=u,t[4]=f):f=t[4];let p;t[5]!==s||t[6]!==u?(p=u!==`direct`&&s===void 0&&(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`This connection method is not installed. Choose another method above.`}),t[5]=s,t[6]=u,t[7]=p):p=t[7];let m;t[8]!==i?.effectiveUrl||t[9]!==a||t[10]!==o||t[11]!==c||t[12]!==n||t[13]!==l||t[14]!==u||t[15]!==d?(m=u===`direct`&&(0,j.jsxs)(E,{label:`Server address`,description:`Use your own domain or an address on a shared network. Your devices must be able to reach this address; localhost won’t work.`,controlPlacement:`below`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(v,{className:`min-w-0 flex-1 basis-48`,"aria-label":`Server address`,"aria-invalid":c!==null,value:o??d,placeholder:i?.effectiveUrl??`https://moonlet.example.com`,disabled:a,onChange:e=>n.editDraft(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n.commitUrl()}}),(0,j.jsx)(y,{variant:`outline`,className:`h-9 max-md:pointer-coarse:h-10`,disabled:a||o===null||o.trim()===d,onClick:()=>void n.commitUrl(),children:l?`Saving…`:`Save`})]}),c!==null&&(0,j.jsx)(`p`,{role:`alert`,className:`mt-2 text-xs text-destructive-text`,children:c})]}),t[8]=i?.effectiveUrl,t[9]=a,t[10]=o,t[11]=c,t[12]=n,t[13]=l,t[14]=u,t[15]=d,t[16]=m):m=t[16];let h;return t[17]!==f||t[18]!==p||t[19]!==m?(h=(0,j.jsxs)(j.Fragment,{children:[f,p,m]}),t[17]=f,t[18]=p,t[19]=m,t[20]=h):h=t[20],h}function V(e){let t=(0,k.c)(22),{machineAccess:r,onNavigate:i,methodPicker:a}=e,{effective:o,configurationMessage:c}=r;if(!o)return null;let l=c===null,u=o.availability?.status===`setup-required`&&o.pluginId!==null,d=u?`flex flex-col items-start gap-2`:`flex min-h-7 items-center justify-between gap-3`,f;t[0]!==c||t[1]!==o.description||t[2]!==u?(f=u&&(0,j.jsxs)(`p`,{className:`max-w-xl text-xs text-subtle-foreground`,children:[o.description,` `,c]}),t[0]=c,t[1]=o.description,t[2]=u,t[3]=f):f=t[3];let p;t[4]!==o.displayName||t[5]!==o.pluginId||t[6]!==i||t[7]!==u?(p=o.pluginId!==null&&(0,j.jsx)(y,{variant:u?`default`:`link`,size:`sm`,className:u?`shrink-0`:`h-7 shrink-0 px-3 font-normal text-subtle-foreground/75 no-underline hover:text-subtle-foreground hover:no-underline`,asChild:!0,children:(0,j.jsx)(n,{onClick:i,to:C({pluginId:o.pluginId}),children:u?(0,j.jsxs)(j.Fragment,{children:[`Set up `,o.displayName,(0,j.jsx)(s,{name:`ArrowRight`})]}):`Manage`})}),t[4]=o.displayName,t[5]=o.pluginId,t[6]=i,t[7]=u,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==d||t[11]!==f||t[12]!==p?(m=(0,j.jsxs)(`div`,{className:d,children:[a,f,p]}),t[9]=a,t[10]=d,t[11]=f,t[12]=p,t[13]=m):m=t[13];let h;t[14]!==c||t[15]!==o.availability||t[16]!==l||t[17]!==u?(h=!u&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs`,children:[(0,j.jsxs)(`p`,{className:`inline-flex shrink-0 items-center gap-1.5 font-medium`,children:[l?(0,j.jsx)(`span`,{className:`size-1.5 shrink-0 rounded-full bg-success`,"aria-hidden":`true`}):null,l?`Ready`:`Unavailable`]}),(0,j.jsx)(`p`,{className:`min-w-0 break-words text-subtle-foreground [overflow-wrap:anywhere]`,children:c??(o.availability?.status===`available`?o.availability.serverUrl:null)??`Ready to connect devices.`})]}),t[14]=c,t[15]=o.availability,t[16]=l,t[17]=u,t[18]=h):h=t[18];let g;return t[19]!==m||t[20]!==h?(g=(0,j.jsxs)(`div`,{className:`space-y-0`,children:[m,h]}),t[19]=m,t[20]=h,t[21]=g):g=t[21],g}var H=`manual`;function U(e){let t=(0,k.c)(12),{open:n,onOpenChange:r}=e,i=p(),a;t[0]!==i||t[1]!==r?(a=e=>{e||i.refetch(),r(e)},t[0]=i,t[1]=r,t[2]=a):a=t[2];let s=a,c;t[3]!==s||t[4]!==n?(c=n&&(0,j.jsx)(W,{onOpenChange:s}),t[3]=s,t[4]=n,t[5]=c):c=t[5];let l;t[6]===c?l=t[7]:(l=(0,j.jsx)(o,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,children:c}),t[6]=c,t[7]=l);let u;return t[8]!==s||t[9]!==n||t[10]!==l?(u=(0,j.jsx)(m,{open:n,onOpenChange:s,modal:!1,children:l}),t[8]=s,t[9]=n,t[10]=l,t[11]=u):u=t[11],u}function W(e){let t=(0,k.c)(13),{onOpenChange:n}=e,r=d(),i=p();if(!O(r.data?.serverAccess)){let e;t[0]===r?e=t[1]:(e=r.isPending?{status:`checking`}:r.isError?{status:`failed`,onRetry:()=>void r.refetch()}:{status:`blocked`},t[0]=r,t[1]=e);let i;t[2]===n?i=t[3]:(i=(0,j.jsx)(I,{onNavigate:()=>n(!1)}),t[2]=n,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,j.jsx)(K,{state:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}let a=r.data?.primaryHostId??null,o;t[7]!==i.data||t[8]!==a?(o=i.data?.find(e=>e.id===a)?.name??null,t[7]=i.data,t[8]=a,t[9]=o):o=t[9];let s=o,c;return t[10]!==n||t[11]!==s?(c=(0,j.jsx)(q,{serverMachineName:s,onOpenChange:n}),t[10]=n,t[11]=s,t[12]=c):c=t[12],c}function G(e){return e===null?`The new machine will connect to your Moonlet server. Keep the server machine on so the new machine can keep working.`:`The new machine will connect to the Moonlet server on ${e}. Keep that computer on so the new machine can keep working.`}function K(e){let t=(0,k.c)(7),{state:n,children:r}=e;if(n.status===`checking`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c,{className:`sr-only`,children:`Add a machine`}),(0,j.jsx)(`p`,{role:`status`,className:`text-sm text-subtle-foreground`,children:`Checking machine access…`})]}),t[0]=e):e=t[0],e}if(n.status===`failed`){let e;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(l,{children:[(0,j.jsx)(c,{children:`Add a machine`}),(0,j.jsx)(S,{className:`text-destructive-text`,children:`Couldn’t check whether machines can reach this server.`})]}),t[1]=e):e=t[1];let r;return t[2]===n.onRetry?r=t[3]:(r=(0,j.jsxs)(j.Fragment,{children:[e,(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(y,{variant:`outline`,size:`sm`,onClick:n.onRetry,children:`Try again`})})]}),t[2]=n.onRetry,t[3]=r),r}let i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsxs)(l,{children:[(0,j.jsx)(c,{children:`Set up machine access`}),(0,j.jsx)(S,{children:`A new machine has to reach this server over the network. Choose the address it should use.`})]}),t[4]=i):i=t[4];let a;return t[5]===r?a=t[6]:(a=(0,j.jsxs)(j.Fragment,{children:[i,r]}),t[5]=r,t[6]=a),a}function q({serverMachineName:e,onOpenChange:t}){let n=(0,A.useRef)(null),r=(0,A.useRef)(null),a=(0,A.useRef)(new Set),o=(0,A.useRef)(0),[s,c]=(0,A.useState)(null),[l,d]=(0,A.useState)(null);(0,A.useEffect)(()=>()=>{o.current+=1,n.current?.abort(),r.current=null;for(let e of a.current)u.hosts.delete({hostId:e}).catch(()=>void 0);a.current.clear()},[]);let f=i({meta:{showErrorToast:!1},mutationFn:async e=>{let t=o.current;if(e.replaceLaunch){n.current?.abort(),n.current=null;let e=[...a.current];a.current.clear(),await Promise.all(e.map(e=>u.hosts.delete({hostId:e}))),r.current=null}c(null);let i=new AbortController;n.current=i,r.current??=w();try{let e=await u.hosts.experimental_create({key:r.current,machineProviderId:H,inputs:null,wait:!1,signal:i.signal});if(a.current.add(e.id),t!==o.current)throw a.current.delete(e.id),await u.hosts.delete({hostId:e.id}),Error(`Machine setup closed`);let n=null;for(;e.lifecycle.phase===`creating`;){i.signal.throwIfAborted();let t=await u.hosts.experimental_getEnrollmentCommand({hostId:e.id,signal:i.signal});if(t!==null)n=t,c({value:t.command,windowsValue:t.windowsCommand,expiresAt:t.expiresAt,unavailable:!1});else if(n!==null){let e=n;c(t=>t?.unavailable?t:{value:e.command,windowsValue:e.windowsCommand,expiresAt:e.expiresAt,unavailable:!0})}await new Promise(e=>setTimeout(e,1e3)),i.signal.throwIfAborted(),e=await u.hosts.get({hostId:e.id,signal:i.signal})}if(r.current=null,a.current.delete(e.id),e.lifecycle.phase!==`active`)throw Error(e.lifecycle.message??`Machine setup cancelled`);return e}finally{n.current===i&&(n.current=null)}},onSuccess:e=>{r.current=null,d(e)}}),p=f.mutate;return(0,A.useEffect)(()=>{p({replaceLaunch:!1})},[p]),(0,j.jsx)(J,{command:s,connectedHost:l,serverMachineName:e,errorMessage:f.isError?h({error:f.error,fallbackMessage:`Couldn't prepare an enrollment command.`}):null,onRetry:()=>f.mutate({replaceLaunch:!1}),onRegenerate:()=>f.mutate({replaceLaunch:!0}),onOpenMachine:()=>t(!1)})}function J(e){let t=(0,k.c)(24),{command:r,connectedHost:i,serverMachineName:a,errorMessage:o,onRetry:u,onRegenerate:d,onOpenMachine:f}=e,p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,j.jsx)(c,{children:`Add a machine`}),t[0]=p):p=t[0];let m=o===null?void 0:`text-destructive-text`,h=o??`Run this command on the machine you want to add. It installs Moonlet and keeps the machine connected to this server.`,_;t[1]!==m||t[2]!==h?(_=(0,j.jsxs)(l,{children:[p,(0,j.jsx)(S,{className:m,children:h})]}),t[1]=m,t[2]=h,t[3]=_):_=t[3];let v;t[4]!==o||t[5]!==u?(v=o===null?null:(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(y,{variant:`outline`,size:`sm`,onClick:u,children:`Try again`})}),t[4]=o,t[5]=u,t[6]=v):v=t[6];let b;t[7]!==r||t[8]!==d?(b=r===null?null:(0,j.jsx)(Z,{command:r.value,windowsCommand:r.windowsValue,expiresAt:r.expiresAt,unavailable:r.unavailable,onRegenerate:d},r.value),t[7]=r,t[8]=d,t[9]=b):b=t[9];let C;t[10]!==r||t[11]!==i||t[12]!==o||t[13]!==f?(C=o===null?(0,j.jsx)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:i===null?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(s,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,j.jsx)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:r===null?`Preparing an enrollment command…`:`Waiting for the machine to connect…`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(g,{connected:!0}),(0,j.jsxs)(`span`,{role:`status`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:[i.name,` connected`]}),(0,j.jsx)(y,{asChild:!0,size:`sm`,variant:`ghost`,className:`h-7 shrink-0 px-2 text-xs`,children:(0,j.jsxs)(n,{to:x(i.id),onClick:f,children:[`Open machine`,(0,j.jsx)(s,{name:`ArrowRight`})]})})]})}):null,t[10]=r,t[11]=i,t[12]=o,t[13]=f,t[14]=C):C=t[14];let w;t[15]!==o||t[16]!==a?(w=o===null?(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:G(a)}):null,t[15]=o,t[16]=a,t[17]=w):w=t[17];let T;return t[18]!==_||t[19]!==v||t[20]!==b||t[21]!==C||t[22]!==w?(T=(0,j.jsxs)(j.Fragment,{children:[_,v,b,C,w]}),t[18]=_,t[19]=v,t[20]=b,t[21]=C,t[22]=w,t[23]=T):T=t[23],T}function Y(e){let t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}var X=[{id:`posix`,label:`macOS or Linux`},{id:`windows`,label:`Windows`}];function Z(e){let t=(0,k.c)(34),{command:n,windowsCommand:r,expiresAt:i,unavailable:a,onRegenerate:o}=e,s=a===void 0?!1:a,[c,l]=(0,A.useState)(`posix`),u=c===`windows`?r:n,d;t[0]===u?d=t[1]:(d={text:u},t[0]=u,t[1]=d);let{copied:p,copy:m}=f(d),h;t[2]===i?h=t[3]:(h=()=>i-Date.now(),t[2]=i,t[3]=h);let[g,_]=(0,A.useState)(h),v,b;t[4]===i?(v=t[5],b=t[6]):(v=()=>{let e=setInterval(()=>_(i-Date.now()),1e3);return()=>clearInterval(e)},b=[i],t[4]=i,t[5]=v,t[6]=b),(0,A.useEffect)(v,b);let x=g<=0,S;t[7]===c?S=t[8]:(S=X.map(e=>(0,j.jsx)(y,{type:`button`,size:`sm`,variant:c===e.id?`secondary`:`ghost`,"aria-pressed":c===e.id,className:`h-6 px-2 text-xs`,onClick:()=>l(e.id),children:e.label},e.id)),t[7]=c,t[8]=S);let C;t[9]===c?C=t[10]:(C=c===`windows`?(0,j.jsx)(`span`,{className:`ml-auto text-xs text-subtle-foreground`,children:`Run in PowerShell`}):null,t[9]=c,t[10]=C);let w;t[11]!==S||t[12]!==C?(w=(0,j.jsxs)(`div`,{role:`group`,"aria-label":`Machine operating system`,className:`flex items-center gap-1 border-b border-border px-2 py-1.5`,children:[S,C]}),t[11]=S,t[12]=C,t[13]=w):w=t[13];let T;t[14]===u?T=t[15]:(T=(0,j.jsx)(`pre`,{className:`overflow-x-auto whitespace-pre-wrap break-all p-3 font-mono text-xs text-foreground`,children:u}),t[14]=u,t[15]=T);let E;t[16]!==x||t[17]!==o||t[18]!==g||t[19]!==s?(E=s?(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command used`}):x?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command expired`}),(0,j.jsx)(y,{type:`button`,size:`sm`,variant:`ghost`,className:`h-7 px-2 text-xs`,onClick:o,children:`Generate a new command`})]}):(0,j.jsxs)(`span`,{role:`status`,className:`text-xs tabular-nums text-subtle-foreground`,children:[`Command expires in `,Y(g)]}),t[16]=x,t[17]=o,t[18]=g,t[19]=s,t[20]=E):E=t[20];let D=x||s,O;t[21]===m?O=t[22]:(O=()=>void m(),t[21]=m,t[22]=O);let M=p?`Copied`:`Copy`,N;t[23]!==D||t[24]!==O||t[25]!==M?(N=(0,j.jsx)(y,{type:`button`,size:`sm`,variant:`outline`,className:`ml-auto h-7 px-2.5 text-xs`,disabled:D,onClick:O,children:M}),t[23]=D,t[24]=O,t[25]=M,t[26]=N):N=t[26];let P;t[27]!==E||t[28]!==N?(P=(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-border px-3 py-2`,children:[E,N]}),t[27]=E,t[28]=N,t[29]=P):P=t[29];let F;return t[30]!==P||t[31]!==w||t[32]!==T?(F=(0,j.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-border bg-muted/30`,children:[w,T,P]}),t[30]=P,t[31]=w,t[32]=T,t[33]=F):F=t[33],F}export{Z as n,P as r,U as t};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,jr as n,kr as r,qr as i,ri as a}from"./boot-vendor-CKEhulXz.js";import{Ah as o,Ao as s,Ba as c,Do as l,Eo as u,Jd as d,Jo as f,Mi as p,Mm as m,Ph as h,To as g,es as _,g as v,ko as y,ra as b,sa as x,ta as S,wm as C}from"./index-DcGF-i5V.js";import{n as w}from"./index.browser-usHDzq3C.js";import{t as T}from"./OptionPicker-BqVSa33I.js";import{s as E}from"./dist-CgnI8mYy.js";import{n as D,r as O}from"./machine-server-access-BBZR2E-e.js";var k=r(),A=e(t(),1),j=e(a(),1);function M(e){try{return new URL(e)}catch{return null}}function N(){let e=f(),t=v(),n=e.data?.generalSettings,r=e.data?.serverAccess,i=n?.machineServerUrl??``,[a,o]=(0,A.useState)(null),[s,c]=(0,A.useState)(null),l=!n,u=r?.defaultProviderId??`direct`,[d,m]=(0,A.useState)(null);(0,A.useEffect)(()=>{d===u&&m(null)},[u,d]);let h=d??u;return{access:r,disabled:l,draft:a,error:s,effective:r?.providers.find(e=>e.id===h),configurationMessage:D(r,h),saving:t.isPending,selected:h,value:i,editDraft:e=>{o(e),c(null)},selectProvider:e=>{!n||e===h||(m(e),t.mutate({defaultMachineAccess:e},{onError:()=>m(null)}))},commitUrl:async()=>{if(!n||a===null)return;let e=a.trim();if(e){let t=M(e);if(t===null||![`http:`,`https:`].includes(t.protocol)||t.username||t.password){c(`Enter a valid HTTP or HTTPS URL without credentials`);return}if(p(e)){c(`Other machines cannot reach localhost. Use a domain or shared-network address.`);return}}try{await t.mutateAsync({machineServerUrl:e||null})}catch(e){c(_({error:e,fallbackMessage:`Couldn't save the address.`}));return}o(null),c(null)}}}function P(e){let t=(0,k.c)(7),{children:n,title:r}=e,i=r===void 0?`Machine access`:r,a=N(),o;t[0]!==n||t[1]!==a?(o=n?.(a.selected===`direct`?null:a.effective?.pluginId??null),t[0]=n,t[1]=a,t[2]=o):o=t[2];let s;return t[3]!==a||t[4]!==o||t[5]!==i?(s=(0,j.jsx)(F,{machineAccess:a,title:i,children:o}),t[3]=a,t[4]=o,t[5]=i,t[6]=s):s=t[6],s}function F(e){let t=(0,k.c)(12),{machineAccess:n,children:r,title:i}=e,a=i===void 0?`Machine access`:i,s;t[0]===a?s=t[1]:(s=(0,j.jsx)(`h2`,{className:`text-sm font-semibold`,children:a}),t[0]=a,t[1]=s);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,j.jsx)(`p`,{className:`mt-1 text-xs text-subtle-foreground`,children:`Choose how your devices reach this Moonlet server.`}),t[2]=c):c=t[2];let l;t[3]===s?l=t[4]:(l=(0,j.jsxs)(`div`,{children:[s,c]}),t[3]=s,t[4]=l);let u;t[5]!==r||t[6]!==n?(u=(0,j.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,j.jsx)(`div`,{className:`px-4 py-3`,children:n.access===void 0?(0,j.jsxs)(`p`,{role:`status`,className:`flex h-8 items-center gap-2 text-xs text-subtle-foreground`,children:[(0,j.jsx)(o,{name:`Spinner`,className:`size-3.5 animate-spin`}),`Loading connection settings…`]}):(0,j.jsxs)(j.Fragment,{children:[n.selected!==`direct`&&n.effective?(0,j.jsx)(V,{machineAccess:n,methodPicker:(0,j.jsx)(R,{machineAccess:n,align:`start`})}):(0,j.jsxs)(`div`,{className:`space-y-3`,children:[(0,j.jsx)(`div`,{className:`flex`,children:(0,j.jsx)(R,{machineAccess:n,align:`start`})}),(0,j.jsx)(B,{machineAccess:n})]}),r]})})}),t[5]=r,t[6]=n,t[7]=u):u=t[7];let d;return t[8]!==l||t[9]!==u||t[10]!==a?(d=(0,j.jsxs)(`section`,{"aria-label":a,className:`space-y-3`,children:[l,u]}),t[8]=l,t[9]=u,t[10]=a,t[11]=d):d=t[11],d}function I(e){let t=(0,k.c)(3),{onNavigate:n}=e,r=N(),i;return t[0]!==r||t[1]!==n?(i=(0,j.jsx)(L,{machineAccess:r,onNavigate:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function L(e){let t=(0,k.c)(9),{machineAccess:n,onNavigate:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsx)(`span`,{className:`text-sm font-normal text-foreground`,children:`Connection method`}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[i,(0,j.jsx)(R,{machineAccess:n})]}),t[1]=n,t[2]=a);let o;t[3]!==n||t[4]!==r?(o=(0,j.jsx)(B,{machineAccess:n,onNavigate:r}),t[3]=n,t[4]=r,t[5]=o):o=t[5];let s;return t[6]!==a||t[7]!==o?(s=(0,j.jsxs)(`div`,{className:`space-y-3`,children:[a,o]}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function R(e){let t=(0,k.c)(15),{machineAccess:n,align:r}=e,i=r===void 0?`end`:r,{access:a,disabled:o,selected:s}=n,c;t[0]!==a||t[1]!==n.effective?(c=a&&!n.effective?{label:`Unavailable method`}:void 0,t[0]=a,t[1]=n.effective,t[2]=c):c=t[2];let l=i===`start`?`-ml-1`:void 0,u;t[3]===a?.providers?u=t[4]:(u=a?.providers??[],t[3]=a?.providers,t[4]=u);let d;t[5]===u?d=t[6]:(d=u.map(z),t[5]=u,t[6]=d);let f;return t[7]!==i||t[8]!==o||t[9]!==n.selectProvider||t[10]!==s||t[11]!==c||t[12]!==l||t[13]!==d?(f=(0,j.jsx)(T,{modal:!1,label:`Connection method`,value:s,displayOverride:c,disabled:o,showChevronWhenDisabled:!0,align:i,className:l,options:d,onChange:n.selectProvider}),t[7]=i,t[8]=o,t[9]=n.selectProvider,t[10]=s,t[11]=c,t[12]=l,t[13]=d,t[14]=f):f=t[14],f}function z(e){return{value:e.id,label:e.displayName,description:e.description}}function B(e){let t=(0,k.c)(21),{machineAccess:n,onNavigate:r}=e,{access:i,disabled:a,draft:o,effective:s,error:c,saving:l,selected:u,value:d}=n,f;t[0]!==s||t[1]!==n||t[2]!==r||t[3]!==u?(f=u!==`direct`&&s!==void 0&&(0,j.jsx)(V,{machineAccess:n,onNavigate:r}),t[0]=s,t[1]=n,t[2]=r,t[3]=u,t[4]=f):f=t[4];let p;t[5]!==s||t[6]!==u?(p=u!==`direct`&&s===void 0&&(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`This connection method is not installed. Choose another method above.`}),t[5]=s,t[6]=u,t[7]=p):p=t[7];let m;t[8]!==i?.effectiveUrl||t[9]!==a||t[10]!==o||t[11]!==c||t[12]!==n||t[13]!==l||t[14]!==u||t[15]!==d?(m=u===`direct`&&(0,j.jsxs)(E,{label:`Server address`,description:`Use your own domain or an address on a shared network. Your devices must be able to reach this address; localhost won’t work.`,controlPlacement:`below`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(x,{className:`min-w-0 flex-1 basis-48`,"aria-label":`Server address`,"aria-invalid":c!==null,value:o??d,placeholder:i?.effectiveUrl??`https://moonlet.example.com`,disabled:a,onChange:e=>n.editDraft(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n.commitUrl()}}),(0,j.jsx)(h,{variant:`outline`,className:`h-9 max-md:pointer-coarse:h-10`,disabled:a||o===null||o.trim()===d,onClick:()=>void n.commitUrl(),children:l?`Saving…`:`Save`})]}),c!==null&&(0,j.jsx)(`p`,{role:`alert`,className:`mt-2 text-xs text-destructive-text`,children:c})]}),t[8]=i?.effectiveUrl,t[9]=a,t[10]=o,t[11]=c,t[12]=n,t[13]=l,t[14]=u,t[15]=d,t[16]=m):m=t[16];let g;return t[17]!==f||t[18]!==p||t[19]!==m?(g=(0,j.jsxs)(j.Fragment,{children:[f,p,m]}),t[17]=f,t[18]=p,t[19]=m,t[20]=g):g=t[20],g}function V(e){let t=(0,k.c)(22),{machineAccess:r,onNavigate:i,methodPicker:a}=e,{effective:s,configurationMessage:c}=r;if(!s)return null;let l=c===null,u=s.availability?.status===`setup-required`&&s.pluginId!==null,d=u?`flex flex-col items-start gap-2`:`flex min-h-7 items-center justify-between gap-3`,f;t[0]!==c||t[1]!==s.description||t[2]!==u?(f=u&&(0,j.jsxs)(`p`,{className:`max-w-xl text-xs text-subtle-foreground`,children:[s.description,` `,c]}),t[0]=c,t[1]=s.description,t[2]=u,t[3]=f):f=t[3];let p;t[4]!==s.displayName||t[5]!==s.pluginId||t[6]!==i||t[7]!==u?(p=s.pluginId!==null&&(0,j.jsx)(h,{variant:u?`default`:`link`,size:`sm`,className:u?`shrink-0`:`h-7 shrink-0 px-3 font-normal text-subtle-foreground/75 no-underline hover:text-subtle-foreground hover:no-underline`,asChild:!0,children:(0,j.jsx)(n,{onClick:i,to:C({pluginId:s.pluginId}),children:u?(0,j.jsxs)(j.Fragment,{children:[`Set up `,s.displayName,(0,j.jsx)(o,{name:`ArrowRight`})]}):`Manage`})}),t[4]=s.displayName,t[5]=s.pluginId,t[6]=i,t[7]=u,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==d||t[11]!==f||t[12]!==p?(m=(0,j.jsxs)(`div`,{className:d,children:[a,f,p]}),t[9]=a,t[10]=d,t[11]=f,t[12]=p,t[13]=m):m=t[13];let g;t[14]!==c||t[15]!==s.availability||t[16]!==l||t[17]!==u?(g=!u&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs`,children:[(0,j.jsxs)(`p`,{className:`inline-flex shrink-0 items-center gap-1.5 font-medium`,children:[l?(0,j.jsx)(`span`,{className:`size-1.5 shrink-0 rounded-full bg-success`,"aria-hidden":`true`}):null,l?`Ready`:`Unavailable`]}),(0,j.jsx)(`p`,{className:`min-w-0 break-words text-subtle-foreground [overflow-wrap:anywhere]`,children:c??(s.availability?.status===`available`?s.availability.serverUrl:null)??`Ready to connect devices.`})]}),t[14]=c,t[15]=s.availability,t[16]=l,t[17]=u,t[18]=g):g=t[18];let _;return t[19]!==m||t[20]!==g?(_=(0,j.jsxs)(`div`,{className:`space-y-0`,children:[m,g]}),t[19]=m,t[20]=g,t[21]=_):_=t[21],_}var H=`manual`;function U(e){let t=(0,k.c)(12),{open:n,onOpenChange:r}=e,i=S(),a;t[0]!==i||t[1]!==r?(a=e=>{e||i.refetch(),r(e)},t[0]=i,t[1]=r,t[2]=a):a=t[2];let o=a,s;t[3]!==o||t[4]!==n?(s=n&&(0,j.jsx)(W,{onOpenChange:o}),t[3]=o,t[4]=n,t[5]=s):s=t[5];let c;t[6]===s?c=t[7]:(c=(0,j.jsx)(u,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,children:s}),t[6]=s,t[7]=c);let l;return t[8]!==o||t[9]!==n||t[10]!==c?(l=(0,j.jsx)(g,{open:n,onOpenChange:o,modal:!1,children:c}),t[8]=o,t[9]=n,t[10]=c,t[11]=l):l=t[11],l}function W(e){let t=(0,k.c)(13),{onOpenChange:n}=e,r=f(),i=S();if(!O(r.data?.serverAccess)){let e;t[0]===r?e=t[1]:(e=r.isPending?{status:`checking`}:r.isError?{status:`failed`,onRetry:()=>void r.refetch()}:{status:`blocked`},t[0]=r,t[1]=e);let i;t[2]===n?i=t[3]:(i=(0,j.jsx)(I,{onNavigate:()=>n(!1)}),t[2]=n,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,j.jsx)(K,{state:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}let a=r.data?.primaryHostId??null,o;t[7]!==i.data||t[8]!==a?(o=i.data?.find(e=>e.id===a)?.name??null,t[7]=i.data,t[8]=a,t[9]=o):o=t[9];let s=o,c;return t[10]!==n||t[11]!==s?(c=(0,j.jsx)(q,{serverMachineName:s,onOpenChange:n}),t[10]=n,t[11]=s,t[12]=c):c=t[12],c}function G(e){return e===null?`The new machine will connect to your Moonlet server. Keep the server machine on so the new machine can keep working.`:`The new machine will connect to the Moonlet server on ${e}. Keep that computer on so the new machine can keep working.`}function K(e){let t=(0,k.c)(7),{state:n,children:r}=e;if(n.status===`checking`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(s,{className:`sr-only`,children:`Add a machine`}),(0,j.jsx)(`p`,{role:`status`,className:`text-sm text-subtle-foreground`,children:`Checking machine access…`})]}),t[0]=e):e=t[0],e}if(n.status===`failed`){let e;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(y,{children:[(0,j.jsx)(s,{children:`Add a machine`}),(0,j.jsx)(l,{className:`text-destructive-text`,children:`Couldn’t check whether machines can reach this server.`})]}),t[1]=e):e=t[1];let r;return t[2]===n.onRetry?r=t[3]:(r=(0,j.jsxs)(j.Fragment,{children:[e,(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(h,{variant:`outline`,size:`sm`,onClick:n.onRetry,children:`Try again`})})]}),t[2]=n.onRetry,t[3]=r),r}let i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsxs)(y,{children:[(0,j.jsx)(s,{children:`Set up machine access`}),(0,j.jsx)(l,{children:`A new machine has to reach this server over the network. Choose the address it should use.`})]}),t[4]=i):i=t[4];let a;return t[5]===r?a=t[6]:(a=(0,j.jsxs)(j.Fragment,{children:[i,r]}),t[5]=r,t[6]=a),a}function q({serverMachineName:e,onOpenChange:t}){let n=(0,A.useRef)(null),r=(0,A.useRef)(null),a=(0,A.useRef)(new Set),o=(0,A.useRef)(0),[s,c]=(0,A.useState)(null),[l,u]=(0,A.useState)(null);(0,A.useEffect)(()=>()=>{o.current+=1,n.current?.abort(),r.current=null;for(let e of a.current)d.hosts.delete({hostId:e}).catch(()=>void 0);a.current.clear()},[]);let f=i({meta:{showErrorToast:!1},mutationFn:async e=>{let t=o.current;if(e.replaceLaunch){n.current?.abort(),n.current=null;let e=[...a.current];a.current.clear(),await Promise.all(e.map(e=>d.hosts.delete({hostId:e}))),r.current=null}c(null);let i=new AbortController;n.current=i,r.current??=w();try{let e=await d.hosts.experimental_create({key:r.current,machineProviderId:H,inputs:null,wait:!1,signal:i.signal});if(a.current.add(e.id),t!==o.current)throw a.current.delete(e.id),await d.hosts.delete({hostId:e.id}),Error(`Machine setup closed`);let n=null;for(;e.lifecycle.phase===`creating`;){i.signal.throwIfAborted();let t=await d.hosts.experimental_getEnrollmentCommand({hostId:e.id,signal:i.signal});if(t!==null)n=t,c({value:t.command,windowsValue:t.windowsCommand,expiresAt:t.expiresAt,unavailable:!1});else if(n!==null){let e=n;c(t=>t?.unavailable?t:{value:e.command,windowsValue:e.windowsCommand,expiresAt:e.expiresAt,unavailable:!0})}await new Promise(e=>setTimeout(e,1e3)),i.signal.throwIfAborted(),e=await d.hosts.get({hostId:e.id,signal:i.signal})}if(r.current=null,a.current.delete(e.id),e.lifecycle.phase!==`active`)throw Error(e.lifecycle.message??`Machine setup cancelled`);return e}finally{n.current===i&&(n.current=null)}},onSuccess:e=>{r.current=null,u(e)}}),p=f.mutate;return(0,A.useEffect)(()=>{p({replaceLaunch:!1})},[p]),(0,j.jsx)(J,{command:s,connectedHost:l,serverMachineName:e,errorMessage:f.isError?_({error:f.error,fallbackMessage:`Couldn't prepare an enrollment command.`}):null,onRetry:()=>f.mutate({replaceLaunch:!1}),onRegenerate:()=>f.mutate({replaceLaunch:!0}),onOpenMachine:()=>t(!1)})}function J(e){let t=(0,k.c)(24),{command:r,connectedHost:i,serverMachineName:a,errorMessage:c,onRetry:u,onRegenerate:d,onOpenMachine:f}=e,p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,j.jsx)(s,{children:`Add a machine`}),t[0]=p):p=t[0];let g=c===null?void 0:`text-destructive-text`,_=c??`Run this command on the machine you want to add. It installs Moonlet and keeps the machine connected to this server.`,v;t[1]!==g||t[2]!==_?(v=(0,j.jsxs)(y,{children:[p,(0,j.jsx)(l,{className:g,children:_})]}),t[1]=g,t[2]=_,t[3]=v):v=t[3];let x;t[4]!==c||t[5]!==u?(x=c===null?null:(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(h,{variant:`outline`,size:`sm`,onClick:u,children:`Try again`})}),t[4]=c,t[5]=u,t[6]=x):x=t[6];let S;t[7]!==r||t[8]!==d?(S=r===null?null:(0,j.jsx)(Z,{command:r.value,windowsCommand:r.windowsValue,expiresAt:r.expiresAt,unavailable:r.unavailable,onRegenerate:d},r.value),t[7]=r,t[8]=d,t[9]=S):S=t[9];let C;t[10]!==r||t[11]!==i||t[12]!==c||t[13]!==f?(C=c===null?(0,j.jsx)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:i===null?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(o,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,j.jsx)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:r===null?`Preparing an enrollment command…`:`Waiting for the machine to connect…`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b,{connected:!0}),(0,j.jsxs)(`span`,{role:`status`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:[i.name,` connected`]}),(0,j.jsx)(h,{asChild:!0,size:`sm`,variant:`ghost`,className:`h-7 shrink-0 px-2 text-xs`,children:(0,j.jsxs)(n,{to:m(i.id),onClick:f,children:[`Open machine`,(0,j.jsx)(o,{name:`ArrowRight`})]})})]})}):null,t[10]=r,t[11]=i,t[12]=c,t[13]=f,t[14]=C):C=t[14];let w;t[15]!==c||t[16]!==a?(w=c===null?(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:G(a)}):null,t[15]=c,t[16]=a,t[17]=w):w=t[17];let T;return t[18]!==v||t[19]!==x||t[20]!==S||t[21]!==C||t[22]!==w?(T=(0,j.jsxs)(j.Fragment,{children:[v,x,S,C,w]}),t[18]=v,t[19]=x,t[20]=S,t[21]=C,t[22]=w,t[23]=T):T=t[23],T}function Y(e){let t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}var X=[{id:`posix`,label:`macOS or Linux`},{id:`windows`,label:`Windows`}];function Z(e){let t=(0,k.c)(34),{command:n,windowsCommand:r,expiresAt:i,unavailable:a,onRegenerate:o}=e,s=a===void 0?!1:a,[l,u]=(0,A.useState)(`posix`),d=l===`windows`?r:n,f;t[0]===d?f=t[1]:(f={text:d},t[0]=d,t[1]=f);let{copied:p,copy:m}=c(f),g;t[2]===i?g=t[3]:(g=()=>i-Date.now(),t[2]=i,t[3]=g);let[_,v]=(0,A.useState)(g),y,b;t[4]===i?(y=t[5],b=t[6]):(y=()=>{let e=setInterval(()=>v(i-Date.now()),1e3);return()=>clearInterval(e)},b=[i],t[4]=i,t[5]=y,t[6]=b),(0,A.useEffect)(y,b);let x=_<=0,S;t[7]===l?S=t[8]:(S=X.map(e=>(0,j.jsx)(h,{type:`button`,size:`sm`,variant:l===e.id?`secondary`:`ghost`,"aria-pressed":l===e.id,className:`h-6 px-2 text-xs`,onClick:()=>u(e.id),children:e.label},e.id)),t[7]=l,t[8]=S);let C;t[9]===l?C=t[10]:(C=l===`windows`?(0,j.jsx)(`span`,{className:`ml-auto text-xs text-subtle-foreground`,children:`Run in PowerShell`}):null,t[9]=l,t[10]=C);let w;t[11]!==S||t[12]!==C?(w=(0,j.jsxs)(`div`,{role:`group`,"aria-label":`Machine operating system`,className:`flex items-center gap-1 border-b border-border px-2 py-1.5`,children:[S,C]}),t[11]=S,t[12]=C,t[13]=w):w=t[13];let T;t[14]===d?T=t[15]:(T=(0,j.jsx)(`pre`,{className:`overflow-x-auto whitespace-pre-wrap break-all p-3 font-mono text-xs text-foreground`,children:d}),t[14]=d,t[15]=T);let E;t[16]!==x||t[17]!==o||t[18]!==_||t[19]!==s?(E=s?(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command used`}):x?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command expired`}),(0,j.jsx)(h,{type:`button`,size:`sm`,variant:`ghost`,className:`h-7 px-2 text-xs`,onClick:o,children:`Generate a new command`})]}):(0,j.jsxs)(`span`,{role:`status`,className:`text-xs tabular-nums text-subtle-foreground`,children:[`Command expires in `,Y(_)]}),t[16]=x,t[17]=o,t[18]=_,t[19]=s,t[20]=E):E=t[20];let D=x||s,O;t[21]===m?O=t[22]:(O=()=>void m(),t[21]=m,t[22]=O);let M=p?`Copied`:`Copy`,N;t[23]!==D||t[24]!==O||t[25]!==M?(N=(0,j.jsx)(h,{type:`button`,size:`sm`,variant:`outline`,className:`ml-auto h-7 px-2.5 text-xs`,disabled:D,onClick:O,children:M}),t[23]=D,t[24]=O,t[25]=M,t[26]=N):N=t[26];let P;t[27]!==E||t[28]!==N?(P=(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-border px-3 py-2`,children:[E,N]}),t[27]=E,t[28]=N,t[29]=P):P=t[29];let F;return t[30]!==P||t[31]!==w||t[32]!==T?(F=(0,j.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-border bg-muted/30`,children:[w,T,P]}),t[30]=P,t[31]=w,t[32]=T,t[33]=F):F=t[33],F}export{Z as n,P as r,U as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{po as r}from"./index-DCps_qBD.js";import{t as i}from"./shortcut-pill-BMlNncTw.js";var a=t(),o=e(n(),1);function s(e){let t=(0,a.c)(3),{shortcut:n,className:s}=e;if(!r()||!n)return null;let c;return t[0]!==s||t[1]!==n?(c=(0,o.jsx)(i,{shortcut:n,className:s}),t[0]=s,t[1]=n,t[2]=c):c=t[2],c}export{s as t};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{go as r}from"./index-DcGF-i5V.js";import{t as i}from"./shortcut-pill-D97ehvHS.js";var a=t(),o=e(n(),1);function s(e){let t=(0,a.c)(3),{shortcut:n,className:s}=e;if(!r()||!n)return null;let c;return t[0]!==s||t[1]!==n?(c=(0,o.jsx)(i,{shortcut:n,className:s}),t[0]=s,t[1]=n,t[2]=c):c=t[2],c}export{s as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n}from"./boot-vendor-CKEhulXz.js";import{Wn as r,wh as i}from"./index-DCps_qBD.js";import{t as a}from"./useLocalOpenTargets-CtvcdlZg.js";import{t as o}from"./useResolvedLiveFileTarget-DlZUgf7A.js";var s=n(),c=e(t(),1);function l(e){let t=(0,s.c)(20),{intent:n,onSettled:l}=e,u=(0,c.useRef)(!1),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={enabled:!0},t[0]=d):d=t[0];let f=o(n.target,d),p=f.status===`available`,m;t[1]!==f.openContext||t[2]!==f.status?(m=f.status===`available`?{openContext:f.openContext}:{},t[1]=f.openContext,t[2]=f.status,t[3]=m):m=t[3];let h;t[4]!==p||t[5]!==m?(h={enabled:p,...m},t[4]=p,t[5]=m,t[6]=h):h=t[6];let{isLoading:g,openPathInPreferredFileTarget:_}=a(h),v;t[7]!==g||t[8]!==n.location||t[9]!==l||t[10]!==_||t[11]!==f.absolutePath||t[12]!==f.status?(v=()=>{if(u.current||f.status===`loading`||g)return;if(u.current=!0,l(),f.status===`unavailable`){i.error(`Failed to open file externally`,{description:`The file target is not available on its declared host.`});return}let e=r(n.location);_({columnNumber:e.columnNumber,lineNumber:e.lineNumber,path:f.absolutePath})},t[7]=g,t[8]=n.location,t[9]=l,t[10]=_,t[11]=f.absolutePath,t[12]=f.status,t[13]=v):v=t[13];let y;return t[14]!==g||t[15]!==n.location||t[16]!==l||t[17]!==_||t[18]!==f?(y=[n.location,g,_,l,f],t[14]=g,t[15]=n.location,t[16]=l,t[17]=_,t[18]=f,t[19]=y):y=t[19],(0,c.useEffect)(v,y),null}export{l as AppFileExternalNavigationDispatcher};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n}from"./boot-vendor-CKEhulXz.js";import{Dh as r,qn as i}from"./index-DcGF-i5V.js";import{t as a}from"./useLocalOpenTargets-zowTaKCQ.js";import{t as o}from"./useResolvedLiveFileTarget-G_UQNMF1.js";var s=n(),c=e(t(),1);function l(e){let t=(0,s.c)(20),{intent:n,onSettled:l}=e,u=(0,c.useRef)(!1),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={enabled:!0},t[0]=d):d=t[0];let f=o(n.target,d),p=f.status===`available`,m;t[1]!==f.openContext||t[2]!==f.status?(m=f.status===`available`?{openContext:f.openContext}:{},t[1]=f.openContext,t[2]=f.status,t[3]=m):m=t[3];let h;t[4]!==p||t[5]!==m?(h={enabled:p,...m},t[4]=p,t[5]=m,t[6]=h):h=t[6];let{isLoading:g,openPathInPreferredFileTarget:_}=a(h),v;t[7]!==g||t[8]!==n.location||t[9]!==l||t[10]!==_||t[11]!==f.absolutePath||t[12]!==f.status?(v=()=>{if(u.current||f.status===`loading`||g)return;if(u.current=!0,l(),f.status===`unavailable`){r.error(`Failed to open file externally`,{description:`The file target is not available on its declared host.`});return}let e=i(n.location);_({columnNumber:e.columnNumber,lineNumber:e.lineNumber,path:f.absolutePath})},t[7]=g,t[8]=n.location,t[9]=l,t[10]=_,t[11]=f.absolutePath,t[12]=f.status,t[13]=v):v=t[13];let y;return t[14]!==g||t[15]!==n.location||t[16]!==l||t[17]!==_||t[18]!==f?(y=[n.location,g,_,l,f],t[14]=g,t[15]=n.location,t[16]=l,t[17]=_,t[18]=f,t[19]=y):y=t[19],(0,c.useEffect)(v,y),null}export{l as AppFileExternalNavigationDispatcher};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dp as i,Th as a,V as o,ya as s}from"./index-DCps_qBD.js";import{r as c,t as l}from"./dist-5xeFhhwk.js";var u=n(),d=e(t(),1),f=e(r(),1),p={top:`calc(env(safe-area-inset-top) + var(--bb-app-chrome-row-height) + 16px)`},m=[`top`,`left`,`right`];function h(){let e=(0,u.c)(8),t=o(),n=i(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[0]=r):r=e[0],(0,d.useEffect)(g,r);let a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a={zIndex:s.toast},e[1]=a):a=e[1];let c=n?`top-center`:`bottom-right`,h=n?p:void 0,_=n?p:void 0,v=n?m:void 0,y;return e[2]!==c||e[3]!==h||e[4]!==_||e[5]!==v||e[6]!==t?(y=(0,f.jsx)(l,{theme:t,style:a,position:c,offset:h,mobileOffset:_,swipeDirections:v}),e[2]=c,e[3]=h,e[4]=_,e[5]=v,e[6]=t,e[7]=y):y=e[7],y}function g(){a(c)}export{h as AppToasterView};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Ap as i,Oh as a,Sa as o,V as s}from"./index-DcGF-i5V.js";import{r as c,t as l}from"./dist-5xeFhhwk.js";var u=n(),d=e(t(),1),f=e(r(),1),p={top:`calc(env(safe-area-inset-top) + var(--bb-app-chrome-row-height) + 16px)`},m=[`top`,`left`,`right`];function h(){let e=(0,u.c)(8),t=s(),n=i(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[0]=r):r=e[0],(0,d.useEffect)(g,r);let a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a={zIndex:o.toast},e[1]=a):a=e[1];let c=n?`top-center`:`bottom-right`,h=n?p:void 0,_=n?p:void 0,v=n?m:void 0,y;return e[2]!==c||e[3]!==h||e[4]!==_||e[5]!==v||e[6]!==t?(y=(0,f.jsx)(l,{theme:t,style:a,position:c,offset:h,mobileOffset:_,swipeDirections:v}),e[2]=c,e[3]=h,e[4]=_,e[5]=v,e[6]=t,e[7]=y):y=e[7],y}function g(){a(c)}export{h as AppToasterView};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Cr as t,Et as n,St as r,bt as i,dr as a,hi as o,kr as s,ri as c,t as l,vr as u,yr as d}from"./boot-vendor-CKEhulXz.js";import{Ah as f,Ap as p,Cr as m,Cv as h,Dp as g,Er as _,Fo as v,Gf as y,Ia as b,Jd as x,Mi as S,Ph as C,Rh as w,Tc as T,Tr as E,Vm as D,Wf as O,Wm as k,_p as A,at as j,bo as M,do as N,jn as P,md as F,mp as ee,po as I,pp as L,rm as R,vt as z,za as B,zr as V}from"./index-DcGF-i5V.js";import{n as H,r as U,t as W}from"./browser-url-CRNmQmct.js";import{r as te}from"./panelChromeClasses-BubpnwAb.js";import{a as G,i as K,n as q,r as ne}from"./launcherRow-Mm64WYs2.js";var J=e(o(),1),Y=s(),re=`bb.thread.browserHistory`,ie=`1`,ae=24,X=a(d({url:t().min(1),title:t().min(1).nullable(),visitedAt:u().int().nonnegative()}).strict()),oe=[],se=F({parse:(e,t)=>{if(e===null)return t;try{let n=X.safeParse(JSON.parse(e));return n.success?n.data:t}catch{return t}},serialize:e=>JSON.stringify(e)});function ce(e){return`${re}-${encodeURIComponent(e.trim())}-${ie}`}var le=n(oe),ue=l(e=>i(ce(e),oe,se,{getOnInit:!0}));function de(e){return e!=null&&e.trim().length>0}function fe(e){let t=(0,Y.c)(10),n;t[0]===e?n=t[1]:(n=de(e)?ue(e):le,t[0]=e,t[1]=n);let[i,a]=r(n),o;t[2]===a?o=t[3]:(o=e=>{let{url:t,title:n}=e;t.length!==0&&a(e=>[{url:t,title:n,visitedAt:Date.now()},...e.filter(e=>e.url!==t)].slice(0,ae))},t[2]=a,t[3]=o);let s=o,c;t[4]===a?c=t[5]:(c=()=>{a(oe)},t[4]=a,t[5]=c);let l=c,u;return t[6]!==l||t[7]!==i||t[8]!==s?(u={entries:i,recordVisit:s,clear:l},t[6]=l,t[7]=i,t[8]=s,t[9]=u):u=t[9],u}var Z=e(c(),1);function pe(e){return e===null?null:`${e.activeMatchOrdinal}/${e.matches}`}function Q(e){let t=(0,Y.c)(9),{icon:n,label:r,disabled:i,onClick:a,shortcut:o}=e,s=o?`${r} (${o.label})`:r,c=o?.ariaKeyshortcuts,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=w(`flex shrink-0 items-center justify-center transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40`,A,j),t[0]=l):l=t[0];let u;t[1]===n?u=t[2]:(u=(0,Z.jsx)(f,{name:n,"aria-hidden":!0}),t[1]=n,t[2]=u);let d;return t[3]!==s||t[4]!==i||t[5]!==a||t[6]!==c||t[7]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,onClick:a,disabled:i,"aria-label":s,"aria-keyshortcuts":c,className:l,children:u}),t[3]=s,t[4]=i,t[5]=a,t[6]=c,t[7]=u,t[8]=d):d=t[8],d}function me(e){let t=(0,Y.c)(36),{inputRef:n,query:r,matches:i,onQueryChange:a,onFindNext:o,onFindPrevious:s,onClose:c,shortcut:l}=e,u;t[0]===i?u=t[1]:(u=pe(i),t[0]=i,t[1]=u);let d=u,f=i!==null&&i.matches>0,p=i!==null&&i.matches===0,m;t[2]!==c||t[3]!==o||t[4]!==s?(m=e=>{if(!e.nativeEvent.isComposing){if(e.key===`Enter`){e.preventDefault(),e.shiftKey?s():o();return}e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),c())}},t[2]=c,t[3]=o,t[4]=s,t[5]=m):m=t[5];let h=m,_;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=w(`flex h-9 shrink-0 items-center gap-1 border-b border-border/70 py-1 pl-2 pr-2`,te),t[6]=_):_=t[6];let v;t[7]===a?v=t[8]:(v=e=>a(e.target.value),t[7]=a,t[8]=v);let y=l?`Find in page (${l.label})`:`Find in page`,b=l?.ariaKeyshortcuts,x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(x=w(`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted-foreground`,g),t[9]=x):x=t[9];let S;t[10]!==h||t[11]!==n||t[12]!==r||t[13]!==v||t[14]!==y||t[15]!==b?(S=(0,Z.jsx)(`input`,{ref:n,type:`text`,value:r,onChange:v,onKeyDown:h,placeholder:`Find in page`,"aria-label":y,"aria-keyshortcuts":b,autoComplete:`off`,spellCheck:!1,maxLength:D,className:x}),t[10]=h,t[11]=n,t[12]=r,t[13]=v,t[14]=y,t[15]=b,t[16]=S):S=t[16];let C;t[17]!==d||t[18]!==p?(C=d===null?null:(0,Z.jsx)(`span`,{"data-testid":`browser-find-match-count`,"aria-live":`polite`,className:w(`shrink-0 tabular-nums`,p?`text-destructive`:`text-muted-foreground`,g),children:d}),t[17]=d,t[18]=p,t[19]=C):C=t[19];let T;t[20]!==S||t[21]!==C?(T=(0,Z.jsxs)(`div`,{className:`flex h-7 min-w-0 flex-1 items-center gap-2 rounded-md border border-border/70 bg-background/70 px-2`,children:[S,C]}),t[20]=S,t[21]=C,t[22]=T):T=t[22];let E=!f,O;t[23]!==s||t[24]!==E?(O=(0,Z.jsx)(Q,{icon:`ChevronUp`,label:`Previous match`,disabled:E,onClick:s}),t[23]=s,t[24]=E,t[25]=O):O=t[25];let k=!f,A;t[26]!==o||t[27]!==k?(A=(0,Z.jsx)(Q,{icon:`ChevronDown`,label:`Next match`,disabled:k,onClick:o}),t[26]=o,t[27]=k,t[28]=A):A=t[28];let j;t[29]===c?j=t[30]:(j=(0,Z.jsx)(Q,{icon:`X`,label:`Close find bar`,onClick:c}),t[29]=c,t[30]=j);let M;return t[31]!==T||t[32]!==O||t[33]!==A||t[34]!==j?(M=(0,Z.jsxs)(`div`,{"data-testid":`browser-find-bar`,role:`search`,"aria-label":`Find in page`,className:_,children:[T,O,A,j]}),t[31]=T,t[32]=O,t[33]=A,t[34]=j,t[35]=M):M=t[35],M}function he(e){let t=(0,Y.c)(17),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({onFocus:r,onBlur:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(0,J.useRef)(null),o=(0,J.useRef)(!1),s,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{o.current=!0,a.current=null},t=()=>{o.current=!1};return window.addEventListener(`blur`,e),window.addEventListener(`keydown`,t,!0),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`keydown`,t,!0)}},c=[],t[4]=s,t[5]=c):(s=t[4],c=t[5]),(0,J.useEffect)(s,c);let l,u,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=e=>{a.current=e.button===0&&(o.current||document.activeElement!==e.currentTarget)?{x:e.clientX,y:e.clientY}:null,o.current=!1},u=e=>{let t=a.current;t!==null&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>4&&(a.current=null)},d=e=>{a.current!==null&&(a.current=null,e.preventDefault(),e.currentTarget.select())},t[6]=l,t[7]=u,t[8]=d):(l=t[6],u=t[7],d=t[8]);let f;t[9]===r?f=t[10]:(f=e=>{a.current===null&&!o.current&&e.currentTarget.select(),r?.(e)},t[9]=r,t[10]=f);let p;t[11]===n?p=t[12]:(p=e=>{a.current=null,n?.(e)},t[11]=n,t[12]=p);let m;return t[13]!==i||t[14]!==f||t[15]!==p?(m=(0,Z.jsx)(`input`,{type:`text`,placeholder:`Enter a URL`,autoComplete:`off`,spellCheck:!1,...i,onMouseDown:l,onMouseMove:u,onMouseUp:d,onFocus:f,onBlur:p}),t[13]=i,t[14]=f,t[15]=p,t[16]=m):m=t[16],m}function ge(e){let t=(0,Y.c)(27),{entry:n,now:r,onNavigate:i}=e,a;t[0]===n.url?a=t[1]:(a=W(n.url),t[0]=n.url,t[1]=a);let o=a,s;t[2]===n.title?s=t[3]:(s=n.title?.trim(),t[2]=n.title,t[3]=s);let c=s,l=c&&c.length>0?c:o,u;t[4]!==n.visitedAt||t[5]!==r?(u=b({timestamp:n.visitedAt,now:r}),t[4]=n.visitedAt,t[5]=r,t[6]=u):u=t[6];let d=u,p;t[7]!==n.url||t[8]!==i?(p=()=>i(n.url),t[7]=n.url,t[8]=i,t[9]=p):p=t[9];let m=n.url,h;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(h=w(q,`hover:bg-state-hover`),t[10]=h):h=t[10];let g;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(`span`,{className:ne,children:(0,Z.jsx)(f,{name:`Browser`,className:L,"aria-hidden":!0})}),t[11]=g):g=t[11];let _;t[12]===l?_=t[13]:(_=(0,Z.jsx)(`span`,{className:`truncate text-foreground`,children:l}),t[12]=l,t[13]=_);let v;t[14]!==o||t[15]!==l?(v=l===o?null:(0,Z.jsx)(`span`,{className:`truncate font-mono text-muted-foreground [flex-shrink:9999]`,children:o}),t[14]=o,t[15]=l,t[16]=v):v=t[16];let y;t[17]!==_||t[18]!==v?(y=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[_,v]}),t[17]=_,t[18]=v,t[19]=y):y=t[19];let x;t[20]===d?x=t[21]:(x=(0,Z.jsx)(K,{idle:d,isActive:!1}),t[20]=d,t[21]=x);let S;return t[22]!==n.url||t[23]!==y||t[24]!==x||t[25]!==p?(S=(0,Z.jsxs)(`button`,{type:`button`,onClick:p,title:m,className:h,children:[g,y,x]}),t[22]=n.url,t[23]=y,t[24]=x,t[25]=p,t[26]=S):S=t[26],S}function _e(e){let t=(0,Y.c)(17),{onNavigateInput:n,recent:r,onClearRecent:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=Date.now(),t[0]=a):a=t[0];let o=a;if(r.length===0)return null;let s=r.length,c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=w(`rounded text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,g),t[1]=c):c=t[1];let l;t[2]===i?l=t[3]:(l=(0,Z.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`Clear recently visited`,className:c,children:`Clear`}),t[2]=i,t[3]=l);let u;t[4]!==r.length||t[5]!==l?(u=(0,Z.jsx)(G,{label:`Recently visited`,count:s,action:l}),t[4]=r.length,t[5]=l,t[6]=u):u=t[6];let d;if(t[7]!==n||t[8]!==r){let e;t[10]===n?e=t[11]:(e=e=>(0,Z.jsx)(`li`,{children:(0,Z.jsx)(ge,{entry:e,now:o,onNavigate:n})},e.url),t[10]=n,t[11]=e),d=r.map(e),t[7]=n,t[8]=r,t[9]=d}else d=t[9];let f;t[12]===d?f=t[13]:(f=(0,Z.jsx)(`ul`,{"aria-label":`Recently visited`,className:`flex flex-col gap-px`,children:d}),t[12]=d,t[13]=f);let p;return t[14]!==u||t[15]!==f?(p=(0,Z.jsx)(`div`,{className:`flex h-full flex-col overflow-y-auto px-4 pb-6 pt-8`,children:(0,Z.jsx)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col gap-6`,children:(0,Z.jsxs)(`section`,{children:[u,f]})})}),t[14]=u,t[15]=f,t[16]=p):p=t[16],p}function ve({desktopBrowser:e,pluginId:t,tabId:n}){let r=e?.evaluate,i=e?.onPageMessage;return r===void 0||i===void 0?null:{async evaluate(e,i){let a=await r({tabId:n,expression:e,world:i?.world??`isolated`,channel:t});if(!a.ok)throw Error(a.error);return a.value},onMessage(e){return i(r=>{r.tabId===n&&r.channel===t&&e(r.data)})}}}function ye(e){let t=(0,Y.c)(18),{slot:n,threadId:r,tabId:i,url:a,isCompactViewport:o}=e,s;t[0]!==n.pluginId||t[1]!==i?(s=ve({desktopBrowser:O(),pluginId:n.pluginId,tabId:i}),t[0]=n.pluginId,t[1]=i,t[2]=s):s=t[2];let c=s,l=n.component,u=`${r}/${i}`,d;t[3]!==l||t[4]!==o||t[5]!==c||t[6]!==i||t[7]!==r||t[8]!==a?(d=(0,Z.jsx)(l,{threadId:r,tabId:i,url:a,isCompactViewport:o,experimental_page:c}),t[3]=l,t[4]=o,t[5]=c,t[6]=i,t[7]=r,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==n.title||t[11]!==d?(f=(0,Z.jsx)(`span`,{role:`group`,"aria-label":n.title,className:`flex shrink-0 items-center`,children:d}),t[10]=n.title,t[11]=d,t[12]=f):f=t[12];let p;return t[13]!==n.id||t[14]!==n.pluginId||t[15]!==u||t[16]!==f?(p=(0,Z.jsx)(V,{pluginId:n.pluginId,slotKind:`browserToolbarAction`,slotId:n.id,instanceId:u,crashFallback:null,children:f}),t[13]=n.id,t[14]=n.pluginId,t[15]=u,t[16]=f,t[17]=p):p=t[17],p}function be(e){let t=(0,Y.c)(11),{threadId:n,tabId:r,url:i,isCompactViewport:a}=e,{browserToolbarActions:o}=R();if(o.length===0)return null;let s;if(t[0]!==o||t[1]!==a||t[2]!==r||t[3]!==n||t[4]!==i){let e;t[6]!==a||t[7]!==r||t[8]!==n||t[9]!==i?(e=e=>(0,Z.jsx)(ye,{slot:e,threadId:n,tabId:r,url:i,isCompactViewport:a},`${e.pluginId}/${e.id}/${e.generation}/${n}/${r}`),t[6]=a,t[7]=r,t[8]=n,t[9]=i,t[10]=e):e=t[10],s=o.map(e),t[0]=o,t[1]=a,t[2]=r,t[3]=n,t[4]=i,t[5]=s}else s=t[5];return s}var xe={x:0,y:0,width:0,height:0};function Se(e){return{x:Math.round(e.left),y:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)}}function Ce(){return{width:window.innerWidth,height:window.innerHeight}}function we(e){return k({bounds:Se(e.element.getBoundingClientRect()),viewport:Ce()})}function Te(e){return e===`flex-grow`||e===`flex-basis`}function Ee(e){return e.a.x===e.b.x&&e.a.y===e.b.y&&e.a.width===e.b.width&&e.a.height===e.b.height}function De(e){return S(e.url)?`Server not reachable`:e.errorText.includes(`ERR_BLOCKED_BY_CLIENT`)?`Page blocked`:`Page unavailable`}function Oe(e){let t=(0,Y.c)(48),{addressDraft:n,isEditing:r,state:i,currentUrl:a,addressInputRef:o,onAddressChange:s,onAddressFocus:c,onAddressBlur:l,onAddressKeyDown:u,onSubmit:d,onBack:p,onForward:m,onReloadOrStop:h,onOpenExternal:_,locationShortcut:v,reloadShortcut:y,pluginActions:b}=e,x=i?.isLoading??!1,S;t[0]===a?S=t[1]:(S=H(a),t[0]=a,t[1]=S);let C=S,T=r?n:a,E,D;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(E=w(`relative h-11 shrink-0 overflow-hidden focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring max-md:pointer-coarse:h-[52px]`,te),D=w(`absolute inset-x-0 top-0 flex h-11 translate-y-0 items-center gap-1 py-1.5 pl-2 pr-4 opacity-100 max-md:pointer-coarse:h-[52px]`),t[2]=E,t[3]=D):(E=t[2],D=t[3]);let O=!(i?.canGoBack??!1),k;t[4]!==p||t[5]!==O?(k=(0,Z.jsx)(Q,{icon:`ChevronLeft`,label:`Go back`,disabled:O,onClick:p}),t[4]=p,t[5]=O,t[6]=k):k=t[6];let A=!(i?.canGoForward??!1),j;t[7]!==m||t[8]!==A?(j=(0,Z.jsx)(Q,{icon:`ChevronRight`,label:`Go forward`,disabled:A,onClick:m}),t[7]=m,t[8]=A,t[9]=j):j=t[9];let M=x?`X`:`RotateCcw`,N=x?`Stop loading`:`Reload`,P=x?null:y,F;t[10]!==h||t[11]!==P||t[12]!==M||t[13]!==N?(F=(0,Z.jsx)(Q,{icon:M,label:N,shortcut:P,onClick:h}),t[10]=h,t[11]=P,t[12]=M,t[13]=N,t[14]=F):F=t[14];let I;t[15]===C?I=t[16]:(I=C===`secure`?(0,Z.jsx)(f,{name:`Lock`,className:w(ee,`text-success`),"aria-label":`Secure connection`}):C===`insecure`?(0,Z.jsx)(f,{name:`AlertTriangle`,className:w(ee,`text-warning`),"aria-label":`Connection not secure`}):(0,Z.jsx)(f,{name:`Search`,className:w(ee,`text-muted-foreground`),"aria-hidden":!0}),t[15]=C,t[16]=I);let L;t[17]===s?L=t[18]:(L=e=>s(e.target.value),t[17]=s,t[18]=L);let R=v?`Address and search bar (${v.label})`:`Address and search bar`,z=v?.ariaKeyshortcuts,B;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=w(`min-w-0 flex-1 bg-transparent font-mono text-foreground outline-none placeholder:font-sans placeholder:text-muted-foreground`,g),t[19]=B):B=t[19];let V;t[20]!==o||t[21]!==T||t[22]!==l||t[23]!==c||t[24]!==u||t[25]!==L||t[26]!==R||t[27]!==z?(V=(0,Z.jsx)(he,{ref:o,value:T,onChange:L,onFocus:c,onBlur:l,onKeyDown:u,"aria-label":R,"aria-keyshortcuts":z,className:B}),t[20]=o,t[21]=T,t[22]=l,t[23]=c,t[24]=u,t[25]=L,t[26]=R,t[27]=z,t[28]=V):V=t[28];let U;t[29]!==I||t[30]!==V?(U=(0,Z.jsxs)(`div`,{className:`flex h-8 items-center gap-2 rounded-full border border-border/70 bg-background/70 px-3 max-md:pointer-coarse:h-10`,children:[I,V]}),t[29]=I,t[30]=V,t[31]=U):U=t[31];let W;t[32]!==d||t[33]!==U?(W=(0,Z.jsx)(`form`,{onSubmit:d,className:`min-w-0 flex-1`,children:U}),t[32]=d,t[33]=U,t[34]=W):W=t[34];let G=a.length===0,K;t[35]!==_||t[36]!==G?(K=(0,Z.jsx)(Q,{icon:`ExternalLink`,label:`Open in external browser`,disabled:G,onClick:_}),t[35]=_,t[36]=G,t[37]=K):K=t[37];let q;t[38]===x?q=t[39]:(q=x?(0,Z.jsx)(`span`,{className:`absolute inset-x-0 bottom-0 h-0.5 overflow-hidden`,children:(0,Z.jsx)(`span`,{className:`block h-full w-1/3 animate-pulse bg-ring/70 motion-reduce:animate-none`})}):null,t[38]=x,t[39]=q);let ne;return t[40]!==b||t[41]!==F||t[42]!==W||t[43]!==K||t[44]!==q||t[45]!==k||t[46]!==j?(ne=(0,Z.jsx)(`div`,{role:`region`,"aria-label":`Browser navigation`,tabIndex:-1,className:E,children:(0,Z.jsxs)(`div`,{className:D,children:[k,j,F,W,b,K,q]})}),t[40]=b,t[41]=F,t[42]=W,t[43]=K,t[44]=q,t[45]=k,t[46]=j,t[47]=ne):ne=t[47],ne}function ke(){let e=(0,Y.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,Z.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground`,children:(0,Z.jsx)(f,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),(0,Z.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Browser tabs need the desktop app`}),(0,Z.jsx)(`p`,{className:w(`max-w-xs text-muted-foreground`,g),children:`The in-app web browser runs in the Moonlet desktop app. Open this thread there to browse the web.`})]}),e[0]=t):t=e[0],t}function Ae(e){let t=(0,Y.c)(32),{errorText:n,onOpenExternal:r,onRetry:i,url:a}=e,o;t[0]===a?o=t[1]:(o=W(a),t[0]=a,t[1]=o);let s=o,c;t[2]!==n||t[3]!==a?(c=De({errorText:n,url:a}),t[2]=n,t[3]=a,t[4]=c):c=t[4];let l=c,u;t[5]!==s||t[6]!==a?(u=S(a)?`The browser could not reach ${s||`this local server`}. Start the server, then reload.`:`The browser could not load this page. Try reloading or opening it externally.`,t[5]=s,t[6]=a,t[7]=u):u=t[7];let d=u,p;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-surface-recessed text-muted-foreground`,children:(0,Z.jsx)(f,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),t[8]=p):p=t[8];let m;t[9]===l?m=t[10]:(m=(0,Z.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:l}),t[9]=l,t[10]=m);let h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=w(`mt-1 text-muted-foreground`,g),t[11]=h):h=t[11];let _;t[12]===d?_=t[13]:(_=(0,Z.jsx)(`p`,{className:h,children:d}),t[12]=d,t[13]=_);let v;t[14]!==m||t[15]!==_?(v=(0,Z.jsxs)(`div`,{children:[m,_]}),t[14]=m,t[15]=_,t[16]=v):v=t[16];let y;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(f,{name:`RotateCcw`,className:`size-3.5`,"aria-hidden":!0}),t[17]=y):y=t[17];let b;t[18]===i?b=t[19]:(b=(0,Z.jsxs)(`button`,{type:`button`,onClick:i,className:`inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-xs font-medium text-foreground transition-colors hover:bg-state-hover`,children:[y,`Reload`]}),t[18]=i,t[19]=b);let x;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(f,{name:`ExternalLink`,className:`size-3.5`,"aria-hidden":!0}),t[20]=x):x=t[20];let C;t[21]===r?C=t[22]:(C=(0,Z.jsxs)(`button`,{type:`button`,onClick:r,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground`,children:[x,`Open externally`]}),t[21]=r,t[22]=C);let T;t[23]!==b||t[24]!==C?(T=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2 pt-1`,children:[b,C]}),t[23]=b,t[24]=C,t[25]=T):T=t[25];let E;t[26]===n?E=t[27]:(E=(0,Z.jsx)(`p`,{className:`max-w-full truncate pt-1 font-mono text-xs text-subtle-foreground`,children:n}),t[26]=n,t[27]=E);let D;return t[28]!==T||t[29]!==E||t[30]!==v?(D=(0,Z.jsx)(`div`,{className:`flex h-full flex-col items-center justify-center px-6 text-center`,children:(0,Z.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col items-center gap-3`,children:[p,v,T,E]})}),t[28]=T,t[29]=E,t[30]=v,t[31]=D):D=t[31],D}function je({tabId:e,desktopTarget:t,existingOnly:n,initialUrl:r,addressFocusRequest:i,onAddressFocusRequestConsumed:a,canShowNativeBrowserView:o,canHandleBrowserCommands:s=o,onNativeFocus:c,visibilityCoordinator:l,environmentId:u,threadId:d,onUpdate:f,onOpenInNewTab:m}){let g=I(`browser.focusLocation`),b=I(`browser.reload`),x=I(`browser.find`),S=(0,J.useMemo)(()=>O(),[]),C=(0,J.useRef)(null),w=(0,J.useRef)(null),k=(0,J.useRef)(null),A=T(),j=p(),{entries:F,recordVisit:ee,clear:L}=fe(d),[R,z]=(0,J.useState)(null),[B,V]=(0,J.useState)(null);(0,J.useEffect)(()=>{let t=!0,n=!1;V(null);let r=n=>{t&&n.tabId===e&&n.threadId===d&&V(n.control)},i=S?.onControl?.(t=>{t.tabId!==e||t.threadId!==d||(n=!0,r(t))});return S?.getControl?.(e).then(e=>{e!==null&&!n&&r(e)}).catch(()=>void 0),()=>{t=!1,i?.()}},[S,e,d]);let[H,W]=(0,J.useState)(r),[te,G]=(0,J.useState)(r),[K,q]=(0,J.useState)(!1),[ne,Y]=(0,J.useState)(!1),[re,ie]=(0,J.useState)(!1),ae=(0,J.useRef)(!1);ae.current=re;let[X,oe]=(0,J.useState)(``),[se,ce]=(0,J.useState)(null),[le,ue]=(0,J.useState)(null),de=(0,J.useRef)(f),pe=(0,J.useRef)(ee);de.current=f,pe.current=ee;let Q=(0,J.useRef)(r),he=(0,J.useRef)(n),ge=(0,J.useRef)(t),[ve,ye]=(0,J.useState)(null),Se=ve!==null&&ve.environmentId===u&&ve.tabId===e&&ve.threadId===d,Ce=H.length>0,De=S?.focus!==void 0&&S.onFocus!==void 0&&S.setVisibleWithoutFocus!==void 0,je=R?.errorText??null,Me=je!==null&&Ce,Ne=v(),Pe=(0,J.useRef)(null),Fe=(0,J.useCallback)(()=>{let e=C.current;return e===null?null:we({element:e})},[]),Ie=(0,J.useCallback)(t=>{S!==null&&(Pe.current=t,S.setBounds({tabId:e,bounds:t}))},[S,e]),Le=(0,J.useCallback)(({force:e})=>{let t=Fe();if(t===null)return;let n=Pe.current;!e&&n!==null&&Ee({a:n,b:t})||Ie(t)},[Fe,Ie]),Re=(0,J.useCallback)(()=>{Le({force:!0})},[Le]),$=(0,J.useCallback)(()=>{Le({force:!1})},[Le]),ze=(0,J.useCallback)(()=>{let e=Fe();return Pe.current=e,e??xe},[Fe]);(0,J.useEffect)(()=>{if(S===null)return;let t=ze(),n=Q.current;E({environmentId:u,tabId:e,threadId:d});let r=ge.current,i=he.current===!0&&(r===void 0||!_(e,r));S.attach({tabId:e,threadId:d,...i?{existingOnly:!0}:{},url:n,bounds:t,visible:!1}),ye({environmentId:u,tabId:e,threadId:d});let a=null,o=S.onState(t=>{t.tabId===e&&(a!==null&&(a.url!==t.url||t.isLoading&&!a.isLoading)&&ce(null),a=t,z(t),W(t.url),de.current({tabId:e,url:t.url,title:t.title}),!t.isLoading&&t.url.length>0&&pe.current({url:t.url,title:t.title}))}),s=S.onSnapshot?.(t=>{t.tabId===e&&ue(t.dataUrl)}),c=S.onFindResult?.(t=>{t.tabId===e&&ce({activeMatchOrdinal:t.activeMatchOrdinal,matches:t.matches})});return()=>{o(),s?.(),c?.(),ae.current&&S.stopFindInPage?.({tabId:e,action:`clearSelection`}),l?.release(e)}},[S,u,ze,l,e,d]),(0,J.useEffect)(()=>{let e=C.current;if(e===null||S===null)return;let t=new ResizeObserver(()=>{$()});return t.observe(e),()=>{t.disconnect()}},[S,$]),(0,J.useEffect)(()=>{if(S===null)return;let e=e=>{Te(e.propertyName)&&$()};return window.addEventListener(P,$),window.addEventListener(`resize`,$),document.addEventListener(`transitionend`,e,!0),document.addEventListener(`transitioncancel`,e,!0),()=>{window.removeEventListener(P,$),window.removeEventListener(`resize`,$),document.removeEventListener(`transitionend`,e,!0),document.removeEventListener(`transitioncancel`,e,!0)}},[S,$]);let Be=o&&(s||De)&&Ce&&!Me&&Se&&!Ne;(0,J.useLayoutEffect)(()=>{if(l!==null){if(Be)return l.show(e,Re,{focus:!1}),()=>{l.hide(e)};l.hide(e)}},[l,e,Be,Re]),(0,J.useLayoutEffect)(()=>{if(ne){if(!o||!s||Me||Ne){Y(!1);return}Be&&(Y(!1),S?.focus?.(e))}},[ne,o,s,Me,Ne,Be,S,e]),(0,J.useEffect)(()=>{if(!(S?.onFocus===void 0||c===void 0))return S.onFocus(t=>{t===e&&c()})},[S,c,e]),(0,J.useEffect)(()=>{if(i===null||i.tabId!==e)return;if(A){a?.(i);return}G(H),q(!0),w.current?.focus({preventScroll:!0});let t=requestAnimationFrame(()=>{w.current?.focus({preventScroll:!0}),a?.(i)});return()=>cancelAnimationFrame(t)},[i,H,A,a,e]);let Ve=(0,J.useCallback)(t=>{let n=U(t);n!==null&&(W(n),q(!1),w.current?.blur(),S?.navigate({tabId:e,url:n}),Y(!0))},[S,e]),He=(0,J.useCallback)(e=>{e.preventDefault(),Ve(te)},[te,Ve]),Ue=(0,J.useCallback)(e=>{if(e.nativeEvent.isComposing)return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),G(H);let t=e.currentTarget;window.requestAnimationFrame(()=>{document.activeElement===t&&t.select()});return}if(m===null||e.key!==`Enter`||e.shiftKey||e.ctrlKey||!(h(M())?e.metaKey&&!e.altKey:e.altKey&&!e.metaKey))return;e.preventDefault();let t=U(te);t!==null&&(G(H),q(!1),w.current?.blur(),m(t))},[te,H,m]),We=(0,J.useCallback)(()=>{G(H),q(!0)},[H]),Ge=(0,J.useCallback)(()=>{if(R?.isLoading??!1){S?.stop(e);return}S?.reload(e)},[S,R?.isLoading,e]);N(`browser.focusLocation`,(0,J.useCallback)(()=>!s||S===null?!1:(G(H),q(!0),w.current?.focus({preventScroll:!0}),window.requestAnimationFrame(()=>{w.current?.focus({preventScroll:!0}),w.current?.select()}),!0),[s,H,S]),100);let Ke=o&&S!==null&&S.findInPage!==void 0&&Ce,qe=(0,J.useCallback)(t=>{S?.findInPage?.({tabId:e,...t})},[S,e]),Je=(0,J.useCallback)(()=>{S?.stopFindInPage?.({tabId:e,action:`clearSelection`}),ce(null)},[S,e]),Ye=(0,J.useCallback)(()=>{k.current?.focus({preventScroll:!0}),window.requestAnimationFrame(()=>{k.current?.focus({preventScroll:!0}),k.current?.select()})},[]),Xe=(0,J.useCallback)(e=>{let t=e.slice(0,D);if(oe(t),t.length===0){Je();return}qe({text:t,forward:!0,newSession:!0})},[Je,qe]),Ze=(0,J.useCallback)(()=>{X.length!==0&&qe({text:X,forward:!0,newSession:!1})},[X,qe]),Qe=(0,J.useCallback)(()=>{X.length!==0&&qe({text:X,forward:!1,newSession:!1})},[X,qe]),$e=(0,J.useCallback)(()=>{ie(!1),Je()},[Je]);N(`browser.find`,(0,J.useCallback)(()=>Ke?(ie(!0),X.length>0&&qe({text:X,forward:!0,newSession:!0}),Ye(),!0):!1,[Ke,X,Ye,qe]),100),(0,J.useEffect)(()=>{re&&!Ke&&(ie(!1),Je())},[Ke,Je,re]),N(`browser.reload`,()=>!s||S===null||!Ce?!1:(S.reload(e),!0),100);let et=(0,J.useCallback)(()=>{y()?.openExternalUrl(H)},[H]);return S===null?(0,Z.jsx)(ke,{}):(0,Z.jsxs)(`div`,{"data-app-browser":!0,className:`flex h-full min-h-0 flex-col`,children:[(0,Z.jsx)(Oe,{addressDraft:te,isEditing:K,state:R,currentUrl:H,addressInputRef:w,onAddressChange:G,onAddressFocus:We,onAddressBlur:()=>q(!1),onAddressKeyDown:Ue,onSubmit:He,onBack:()=>{S.goBack(e)},onForward:()=>{S.goForward(e)},onReloadOrStop:Ge,onOpenExternal:et,locationShortcut:g,reloadShortcut:b,pluginActions:(0,Z.jsx)(be,{threadId:d,tabId:e,url:H,isCompactViewport:j})}),B===null?null:(0,Z.jsxs)(`div`,{role:`status`,className:`flex shrink-0 items-center gap-3 border-b border-border bg-surface-recessed px-3 py-2 text-xs`,children:[(0,Z.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[B.controllerLabel,` is controlling this tab`]}),(0,Z.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 hover:bg-state-hover`,onClick:()=>S.releaseControl?.(e),children:`Stop`}),(0,Z.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 hover:bg-state-hover`,onClick:()=>{S.releaseControl?.(e),S.focus?.(e)},children:`Take over`})]}),re?(0,Z.jsx)(me,{inputRef:k,query:X,matches:se,onQueryChange:Xe,onFindNext:Ze,onFindPrevious:Qe,onClose:$e,shortcut:x}):null,(0,Z.jsxs)(`div`,{ref:C,className:`relative min-h-0 flex-1`,children:[Me?(0,Z.jsx)(Ae,{errorText:je,onOpenExternal:et,onRetry:Ge,url:H}):Ce&&!Ne?null:(0,Z.jsx)(_e,{onNavigateInput:Ve,recent:F,onClearRecent:L}),Ce&&le!==null?(0,Z.jsx)(`img`,{src:le,alt:``,draggable:!1,className:`absolute inset-0 size-full`}):null]})]})}function Me(e,t){return t===null?null:e.find(e=>e.id===t)??null}var Ne=4,Pe=32,Fe=2e3;function Ie(e){return Math.min(250*2**(e-1),Fe)}function Le(e,t){if(e===void 0)return`open`;if(t.status===`pending`)return`pending`;let n=t.target;return n===null||n.hostId!==e.hostId?`unavailable`:n.instanceId===e.instanceId?`attach`:`check-saved-window`}function Re(e){let t=(0,Y.c)(40),{browserTabs:n,activeBrowserTabId:r,addressFocusRequest:i,onAddressFocusRequestConsumed:a,environmentId:o,canShowNativeBrowserView:s,canHandleBrowserCommands:c,onNativeFocus:l,threadId:u,onUpdate:d,onOpenInNewTab:f}=e,p=i===void 0?null:i,h=c===void 0?s:c,g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=O(),t[0]=g):g=t[0];let _=g,v;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=_===null?null:m(_),t[1]=v):v=t[1];let y=v,b=Me(n,r),S=b?.desktopTarget,C=S?.hostId,w;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>_?.getTarget===void 0?{status:`ready`,target:null}:{status:`pending`},t[2]=w):w=t[2];let[T,E]=(0,J.useState)(w),[D,k]=(0,J.useState)(0),A=S===void 0?null:`${b?.id}:${D}:${S.hostId}:${S.instanceId}:${S.generation}`,[j,M]=(0,J.useState)(null),N;t[3]!==A||t[4]!==M?(N=()=>{let e=_?.getTarget?.bind(_);if(e===void 0)return;let t=!0,n=0,r,i=()=>{e().catch(ze).then(e=>{if(t){if(e!==null){E({status:`ready`,target:e});return}if(n+=1,n>=Ne&&E({status:`ready`,target:null}),n>=Pe){M(A);return}r=setTimeout(i,Ie(n))}})};return i(),()=>{t=!1,clearTimeout(r)}},t[3]=A,t[4]=M,t[5]=N):N=t[5],(0,J.useEffect)(N,[_,C,S?.instanceId,S?.generation,A]);let P=Le(S,T),F=P===`check-saved-window`?A:null,[ee,I]=(0,J.useState)(null),L=S?.instanceId,R;t[6]!==A||t[7]!==L||t[8]!==F||t[9]!==M||t[10]!==C?(R=()=>{if(F===null||C===void 0||L===void 0)return;let e=!0,t=0,n,r=()=>{x.experimental_desktopBrowsers.listInstances({hostId:C}).then(t=>{let{instances:n}=t;e&&I({key:F,status:n.some(e=>e.instanceId===L)?`live`:`gone`})},()=>{if(e){if(t+=1,t>=Ne&&I({key:F,status:`unknown`}),t>=Pe){M(A);return}n=setTimeout(r,Ie(t))}})};return r(),()=>{e=!1,clearTimeout(n)}},t[6]=A,t[7]=L,t[8]=F,t[9]=M,t[10]=C,t[11]=R):R=t[11];let z;if(t[12]!==A||t[13]!==L||t[14]!==F||t[15]!==C?(z=[F,C,L,A],t[12]=A,t[13]=L,t[14]=F,t[15]=C,t[16]=z):z=t[16],(0,J.useEffect)(R,z),b===null)return null;let B=ee?.key===F?ee.status:null,V=A!==null&&j===A;if(P===`pending`||P===`check-saved-window`&&B===null){let e;return t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 bg-sidebar`}),t[17]=e):e=t[17],e}if(P===`unavailable`||P===`check-saved-window`&&B!==`gone`){let e;t[18]!==V||t[19]!==B||t[20]!==k?(e=V||B===`live`?()=>k($):null,t[18]=V,t[19]=B,t[20]=k,t[21]=e):e=t[21];let n=_===null?`desktop-required`:B===`live`?`other-window`:T.status===`ready`&&T.target!==null&&T.target.hostId!==S?.hostId?`other-computer`:V?`unreachable`:`reconnecting`,r;return t[22]!==b.url||t[23]!==n||t[24]!==e?(r=(0,Z.jsx)(Ve,{url:b.url,onRetry:e,reason:n}),t[22]=b.url,t[23]=n,t[24]=e,t[25]=r):r=t[25],r}let H=P===`attach`?!0:void 0,U=p?.tabId===b.id?p:null,W;return t[26]!==b.id||t[27]!==b.url||t[28]!==h||t[29]!==s||t[30]!==o||t[31]!==a||t[32]!==l||t[33]!==f||t[34]!==d||t[35]!==U||t[36]!==H||t[37]!==S||t[38]!==u?(W=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-sidebar`,children:(0,Z.jsx)(je,{tabId:b.id,desktopTarget:S,existingOnly:H,initialUrl:b.url,addressFocusRequest:U,onAddressFocusRequestConsumed:a,canShowNativeBrowserView:s,canHandleBrowserCommands:h,onNativeFocus:l,visibilityCoordinator:y,environmentId:o,threadId:u,onUpdate:d,onOpenInNewTab:f},b.id)}),t[26]=b.id,t[27]=b.url,t[28]=h,t[29]=s,t[30]=o,t[31]=a,t[32]=l,t[33]=f,t[34]=d,t[35]=U,t[36]=H,t[37]=S,t[38]=u,t[39]=W):W=t[39],W}function $(e){return e+1}function ze(){return null}var Be={"desktop-required":{title:`Browser tabs need the desktop app`,body:`This tab is open in the Moonlet desktop app.`},"other-window":{title:`This tab is open in another Moonlet window`,body:`Switch to that window to keep browsing.`},"other-computer":{title:`This tab is open on another computer`,body:`It was opened in Moonlet on a different computer.`},reconnecting:{title:`Reconnecting to this tab`,body:`The tab opens again as soon as Moonlet reconnects.`},unreachable:{title:`Can't reach this tab`,body:`Moonlet couldn't reconnect. Try again in a moment.`}};function Ve(e){let t=(0,Y.c)(24),{url:n,reason:r,onRetry:i}=e,a=Be[r],o;t[0]===n?o=t[1]:(o=URL.canParse(n)?new URL(n):null,t[0]=n,t[1]=o);let s=o,c=s?.protocol===`https:`||s?.protocol===`http:`,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground`,children:(0,Z.jsx)(f,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),t[2]=l):l=t[2];let u;t[3]===a.title?u=t[4]:(u=(0,Z.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:a.title}),t[3]=a.title,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=w(`max-w-xs text-muted-foreground`,g),t[5]=d):d=t[5];let p;t[6]===a.body?p=t[7]:(p=(0,Z.jsx)(`p`,{className:d,children:a.body}),t[6]=a.body,t[7]=p);let m;t[8]===n?m=t[9]:(m=n.length>0?(0,Z.jsx)(`p`,{className:w(`max-w-full truncate font-mono text-muted-foreground select-text`,g),title:n,children:n}):null,t[8]=n,t[9]=m);let h;t[10]===i?h=t[11]:(h=i===null?null:(0,Z.jsxs)(C,{type:`button`,variant:`outline`,size:`sm`,onClick:i,children:[(0,Z.jsx)(f,{name:`RotateCcw`,"aria-hidden":!0}),`Try again`]}),t[10]=i,t[11]=h);let _;t[12]!==c||t[13]!==i||t[14]!==n?(_=n.length>0?(0,Z.jsxs)(Z.Fragment,{children:[c?(0,Z.jsxs)(C,{type:`button`,variant:i===null?`outline`:`ghost`,size:`sm`,onClick:()=>z(n),children:[(0,Z.jsx)(f,{name:`ExternalLink`,"aria-hidden":!0}),`Open in browser`]}):null,(0,Z.jsxs)(C,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{B(n,{successMessage:`Link copied`})},children:[(0,Z.jsx)(f,{name:`Copy`,"aria-hidden":!0}),`Copy link`]})]}):null,t[12]=c,t[13]=i,t[14]=n,t[15]=_):_=t[15];let v;t[16]!==h||t[17]!==_?(v=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[h,_]}),t[16]=h,t[17]=_,t[18]=v):v=t[18];let y;return t[19]!==u||t[20]!==p||t[21]!==m||t[22]!==v?(y=(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-3 bg-sidebar px-6 text-center`,children:[l,u,p,m,v]}),t[19]=u,t[20]=p,t[21]=m,t[22]=v,t[23]=y):y=t[23],y}export{Re as BrowserTabDeck};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Br as t,hi as n,kr as r,ri as i}from"./boot-vendor-CKEhulXz.js";import{$a as a,Cm as o,Dp as s,Fh as c,ao as l,em as u,xm as d}from"./index-DCps_qBD.js";import{i as f,n as p,r as m,t as h}from"./PaletteShell-BMkwhUdz.js";import{r as g}from"./settings-sections-Dfo35J2q.js";import{s as _,t as v}from"./settings-nav-D5tWYG52.js";var y=e(n(),1),b=r();function x(){let e=typeof window>`u`?void 0:window.bbDesktop;return e?.getServerChoices&&e.onServerChoicesChange&&e.selectServer?{list:e.getServerChoices.bind(e),subscribe:e.onServerChoicesChange.bind(e),select:e.selectServer.bind(e)}:null}function ee(){let e=(0,b.c)(7),[t]=(0,y.useState)(x),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],e[0]=n):n=e[0];let[r,i]=(0,y.useState)(n),a,o;e[1]===t?(a=e[2],o=e[3]):(a=()=>{if(t===null)return;let e=!1,n=!1,r=t.subscribe(t=>{n=!0,e||i(t)});return t.list().then(t=>{!e&&!n&&i(t)}).catch(S),()=>{e=!0,r()}},o=[t],e[1]=t,e[2]=a,e[3]=o),(0,y.useEffect)(a,o);let s=t?.select,c;return e[4]!==r||e[5]!==s?(c={choices:r,select:s},e[4]=r,e[5]=s,e[6]=c):c=e[6],c}function S(){}var te=[`Threads`,`Actions`,`Settings`,`Plugins`];function ne(e){return[...e.sections.map(t=>({id:`settings:${t.id}`,bucket:`Settings`,group:`Settings`,title:`${t.label} settings`,shortcut:null,run:()=>e.navigate(g(t.id))})),...e.pluginEntries.map(t=>({id:`settings:plugin:${t.id}`,bucket:`Settings`,group:`Plugin settings`,title:`${t.label} settings`,shortcut:null,run:()=>e.navigate(d({pluginId:t.id}))}))]}function re(e){return e.panels.map(t=>({id:`plugin-page:${t.pluginId}/${t.id}`,bucket:`Plugins`,group:`Plugin pages`,title:t.title,shortcut:null,run:()=>e.navigate(o({pluginId:t.pluginId,path:t.path}))}))}var C=e(i(),1),ie=l(`thread.search`);function ae(e){let n=(0,b.c)(60),{actions:r,installedPlugins:i,recents:o,query:c,onQueryChange:l,onChoose:d}=e,m=t(),g=s(),x=(0,y.useId)(),S=(0,y.useId)(),[ae,w]=(0,y.useState)(0),T=u(),de=v(T.fileOpeners),E;n[0]!==i||n[1]!==T.settingsSections?(E=_({installedPlugins:i,settingsSections:T.settingsSections}),n[0]=i,n[1]=T.settingsSections,n[2]=E):E=n[2];let fe=E,D;n[3]===m?D=n[4]:(D=e=>void m(e),n[3]=m,n[4]=D);let O;n[5]!==fe||n[6]!==de||n[7]!==D?(O=ne({navigate:D,pluginEntries:fe,sections:de}),n[5]=fe,n[6]=de,n[7]=D,n[8]=O):O=n[8];let pe=O,k;n[9]===m?k=n[10]:(k=e=>void m(e),n[9]=m,n[10]=k);let A;n[11]!==T.navPanels||n[12]!==k?(A=re({navigate:k,panels:T.navPanels}),n[11]=T.navPanels,n[12]=k,n[13]=A):A=n[13];let me=A,{choices:he,select:j}=ee(),M;n[14]!==he||n[15]!==j?(M=j===void 0?[]:he.filter(le).map(e=>({id:`server:${e.id}`,title:`Switch to ${e.name}`,bucket:`Actions`,group:`Servers`,shortcut:null,run:()=>j(e.id)})),n[14]=he,n[15]=j,n[16]=M):M=n[16];let N=M,P;n[17]!==r||n[18]!==me||n[19]!==N||n[20]!==pe?(P=[...r,...pe,...me,...N],n[17]=r,n[18]=me,n[19]=N,n[20]=pe,n[21]=P):P=n[21];let ge=P,F;n[22]===c?F=n[23]:(F=c.startsWith(`>`)?c.slice(1):c,n[22]=c,n[23]=F);let I=F,L;n[24]!==ge||n[25]!==I||n[26]!==o?(L=f({actions:ge,query:I,recentIds:o}),n[24]=ge,n[25]=I,n[26]=o,n[27]=L):L=n[27];let R=L,z;n[28]===I?z=n[29]:(z=I.trim(),n[28]=I,n[29]=z);let B=z===``,V;if(n[30]!==R){let e=te.map(e=>({bucket:e,entries:R.filter(t=>t.action.bucket===e)})).filter(ce);V=e.map((t,n)=>({...t,startIndex:e.slice(0,n).reduce(se,0)})),n[30]=R,n[31]=V}else V=n[31];let H=V,U;n[32]!==B||n[33]!==R||n[34]!==H?(U=B?H.flatMap(oe):R,n[32]=B,n[33]=R,n[34]=H,n[35]=U):U=n[35];let W=U,G=W.length===0?-1:Math.min(ae,W.length-1),K=(0,y.useRef)(null),q=(0,y.useRef)(!1),J;n[36]===Symbol.for(`react.memo_cache_sentinel`)?(J=()=>{q.current&&(q.current=!1,K.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`}))},n[36]=J):J=n[36];let Y;n[37]===G?Y=n[38]:(Y=[G],n[37]=G,n[38]=Y),(0,y.useEffect)(J,Y);let X;n[39]!==G||n[40]!==d||n[41]!==W?(X=e=>{if(!e.nativeEvent.isComposing&&W.length!==0){if(e.key===`ArrowDown`){e.preventDefault(),q.current=!0,w(e=>e+1>=W.length?0:e+1);return}if(e.key===`ArrowUp`){e.preventDefault(),q.current=!0,w(e=>e<=0?W.length-1:e-1);return}if(e.key===`Home`){e.preventDefault(),q.current=!0,w(0);return}if(e.key===`End`){e.preventDefault(),q.current=!0,w(W.length-1);return}if(e.key===`Enter`){let t=W[G];if(t===void 0)return;e.preventDefault(),d(t.action)}}},n[39]=G,n[40]=d,n[41]=W,n[42]=X):X=n[42];let _e=X,ve=G===-1?void 0:`${S}-${G}`,Z;n[43]===l?Z=n[44]:(Z=e=>{l(e),w(0),K.current!==null&&(K.current.scrollTop=0)},n[43]=l,n[44]=Z);let Q;n[45]!==G||n[46]!==g||n[47]!==B||n[48]!==d||n[49]!==S||n[50]!==H||n[51]!==W?(Q=!B&&W.length===0?(0,C.jsx)(`p`,{className:`px-3 py-4 text-center text-sm text-muted-foreground`,children:`No matching commands`}):B?H.map(e=>{let t=`${S}-${e.bucket.toLowerCase()}-label`;return(0,C.jsxs)(`div`,{role:`group`,"aria-labelledby":t,"data-palette-bucket":e.bucket,children:[(0,C.jsx)(`div`,{id:t,className:h,children:e.bucket}),e.entries.map((t,n)=>{let r=e.startIndex+n;return(0,C.jsx)(ue,{entry:t,id:`${S}-${r}`,isActive:r===G,isDrillIn:t.action.id===ie,showShortcut:!g,onActivate:()=>{w(r)},onSelect:()=>d(t.action)},t.action.id)})]},e.bucket)}):W.map((e,t)=>(0,C.jsx)(ue,{entry:e,id:`${S}-${t}`,isActive:t===G,isDrillIn:e.action.id===ie,showShortcut:!g,onActivate:()=>{w(t)},onSelect:()=>d(e.action)},e.action.id)),n[45]=G,n[46]=g,n[47]=B,n[48]=d,n[49]=S,n[50]=H,n[51]=W,n[52]=Q):Q=n[52];let $;return n[53]!==_e||n[54]!==x||n[55]!==c||n[56]!==ve||n[57]!==Z||n[58]!==Q?($=(0,C.jsx)(p,{activeDescendantId:ve,inputDescription:a.description,inputLabel:a.label,listId:x,listLabel:`Commands`,listRef:K,onInputChange:Z,onInputKeyDown:_e,placeholder:a.placeholder,value:c,children:Q}),n[53]=_e,n[54]=x,n[55]=c,n[56]=ve,n[57]=Z,n[58]=Q,n[59]=$):$=n[59],$}function oe(e){return e.entries}function se(e,t){return e+t.entries.length}function ce(e){return e.entries.length>0}function le(e){return!e.active}function ue(e){let t=(0,b.c)(19),{entry:n,id:r,isActive:i,isDrillIn:a,showShortcut:o,onActivate:s,onSelect:l}=e,u=n.action.group===`Browser`||n.action.id.startsWith(`plugin:`)?n.action.group:null,d=a?`${n.action.title}…`:n.action.title,f=o?n.action.shortcut:null,p=u!==null||f!==null||a,h=a?`drill-in`:`terminal`,g=i&&`bg-state-hover text-foreground`,_;t[0]===g?_=t[1]:(_=c(`flex min-h-8 w-full min-w-0 cursor-pointer items-center gap-3 rounded-md px-2 py-1.5 text-left text-sm outline-none`,g),t[0]=g,t[1]=_);let v;t[2]!==n.positions||t[3]!==d?(v=(0,C.jsx)(`span`,{className:`min-w-0 truncate`,children:(0,C.jsx)(w,{title:d,positions:n.positions})}),t[2]=n.positions,t[3]=d,t[4]=v):v=t[4];let y;t[5]!==p||t[6]!==a||t[7]!==u||t[8]!==f?(y=p?(0,C.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[u===null?null:(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:u}),f===null?null:(0,C.jsx)(m,{children:f.label}),a?(0,C.jsx)(`span`,{className:`sr-only`,children:`Opens a search view`}):null]}):null,t[5]=p,t[6]=a,t[7]=u,t[8]=f,t[9]=y):y=t[9];let x;return t[10]!==r||t[11]!==i||t[12]!==s||t[13]!==l||t[14]!==h||t[15]!==_||t[16]!==v||t[17]!==y?(x=(0,C.jsxs)(`div`,{id:r,role:`option`,"aria-selected":i,"data-palette-action-kind":h,className:_,onPointerMove:s,onClick:l,children:[v,y]}),t[10]=r,t[11]=i,t[12]=s,t[13]=l,t[14]=h,t[15]=_,t[16]=v,t[17]=y,t[18]=x):x=t[18],x}function w(e){let t=(0,b.c)(9),{title:n,positions:r}=e;if(r.length===0){let e;return t[0]===n?e=t[1]:(e=(0,C.jsx)(C.Fragment,{children:n}),t[0]=n,t[1]=e),e}let i;t[2]===r?i=t[3]:(i=new Set(r),t[2]=r,t[3]=i);let a=i,o;t[4]===n?o=t[5]:(o=[...n],t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,C.jsx)(C.Fragment,{children:o.map((e,t)=>a.has(t)?(0,C.jsx)(`span`,{className:`font-semibold text-foreground`,children:e},t):(0,C.jsx)(`span`,{children:e},t))}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}export{ae as CommandPaletteBody};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Br as t,hi as n,kr as r,ri as i}from"./boot-vendor-CKEhulXz.js";import{Ap as a,Em as o,Rh as s,co as c,no as l,rm as u,wm as d}from"./index-DcGF-i5V.js";import{i as f,n as p,r as m,t as h}from"./PaletteShell-B6LeovGF.js";import{r as g}from"./settings-sections-DLsEgaeq.js";import{s as _,t as v}from"./settings-nav-CUMx1aUt.js";var y=e(n(),1),b=r();function x(){let e=typeof window>`u`?void 0:window.bbDesktop;return e?.getServerChoices&&e.onServerChoicesChange&&e.selectServer?{list:e.getServerChoices.bind(e),subscribe:e.onServerChoicesChange.bind(e),select:e.selectServer.bind(e)}:null}function ee(){let e=(0,b.c)(7),[t]=(0,y.useState)(x),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],e[0]=n):n=e[0];let[r,i]=(0,y.useState)(n),a,o;e[1]===t?(a=e[2],o=e[3]):(a=()=>{if(t===null)return;let e=!1,n=!1,r=t.subscribe(t=>{n=!0,e||i(t)});return t.list().then(t=>{!e&&!n&&i(t)}).catch(S),()=>{e=!0,r()}},o=[t],e[1]=t,e[2]=a,e[3]=o),(0,y.useEffect)(a,o);let s=t?.select,c;return e[4]!==r||e[5]!==s?(c={choices:r,select:s},e[4]=r,e[5]=s,e[6]=c):c=e[6],c}function S(){}var te=[`Threads`,`Actions`,`Settings`,`Plugins`];function ne(e){return[...e.sections.map(t=>({id:`settings:${t.id}`,bucket:`Settings`,group:`Settings`,title:`${t.label} settings`,shortcut:null,run:()=>e.navigate(g(t.id))})),...e.pluginEntries.map(t=>({id:`settings:plugin:${t.id}`,bucket:`Settings`,group:`Plugin settings`,title:`${t.label} settings`,shortcut:null,run:()=>e.navigate(d({pluginId:t.id}))}))]}function re(e){return e.panels.map(t=>({id:`plugin-page:${t.pluginId}/${t.id}`,bucket:`Plugins`,group:`Plugin pages`,title:t.title,shortcut:null,run:()=>e.navigate(o({pluginId:t.pluginId,path:t.path}))}))}var C=e(i(),1),ie=c(`thread.search`);function ae(e){let n=(0,b.c)(60),{actions:r,installedPlugins:i,recents:o,query:s,onQueryChange:c,onChoose:d}=e,m=t(),g=a(),x=(0,y.useId)(),S=(0,y.useId)(),[ae,w]=(0,y.useState)(0),T=u(),de=v(T.fileOpeners),E;n[0]!==i||n[1]!==T.settingsSections?(E=_({installedPlugins:i,settingsSections:T.settingsSections}),n[0]=i,n[1]=T.settingsSections,n[2]=E):E=n[2];let fe=E,D;n[3]===m?D=n[4]:(D=e=>void m(e),n[3]=m,n[4]=D);let O;n[5]!==fe||n[6]!==de||n[7]!==D?(O=ne({navigate:D,pluginEntries:fe,sections:de}),n[5]=fe,n[6]=de,n[7]=D,n[8]=O):O=n[8];let pe=O,k;n[9]===m?k=n[10]:(k=e=>void m(e),n[9]=m,n[10]=k);let A;n[11]!==T.navPanels||n[12]!==k?(A=re({navigate:k,panels:T.navPanels}),n[11]=T.navPanels,n[12]=k,n[13]=A):A=n[13];let me=A,{choices:he,select:j}=ee(),M;n[14]!==he||n[15]!==j?(M=j===void 0?[]:he.filter(le).map(e=>({id:`server:${e.id}`,title:`Switch to ${e.name}`,bucket:`Actions`,group:`Servers`,shortcut:null,run:()=>j(e.id)})),n[14]=he,n[15]=j,n[16]=M):M=n[16];let ge=M,N;n[17]!==r||n[18]!==me||n[19]!==ge||n[20]!==pe?(N=[...r,...pe,...me,...ge],n[17]=r,n[18]=me,n[19]=ge,n[20]=pe,n[21]=N):N=n[21];let P=N,F;n[22]===s?F=n[23]:(F=s.startsWith(`>`)?s.slice(1):s,n[22]=s,n[23]=F);let I=F,L;n[24]!==P||n[25]!==I||n[26]!==o?(L=f({actions:P,query:I,recentIds:o}),n[24]=P,n[25]=I,n[26]=o,n[27]=L):L=n[27];let R=L,z;n[28]===I?z=n[29]:(z=I.trim(),n[28]=I,n[29]=z);let B=z===``,V;if(n[30]!==R){let e=te.map(e=>({bucket:e,entries:R.filter(t=>t.action.bucket===e)})).filter(ce);V=e.map((t,n)=>({...t,startIndex:e.slice(0,n).reduce(se,0)})),n[30]=R,n[31]=V}else V=n[31];let H=V,U;n[32]!==B||n[33]!==R||n[34]!==H?(U=B?H.flatMap(oe):R,n[32]=B,n[33]=R,n[34]=H,n[35]=U):U=n[35];let W=U,G=W.length===0?-1:Math.min(ae,W.length-1),K=(0,y.useRef)(null),q=(0,y.useRef)(!1),J;n[36]===Symbol.for(`react.memo_cache_sentinel`)?(J=()=>{q.current&&(q.current=!1,K.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`}))},n[36]=J):J=n[36];let Y;n[37]===G?Y=n[38]:(Y=[G],n[37]=G,n[38]=Y),(0,y.useEffect)(J,Y);let X;n[39]!==G||n[40]!==d||n[41]!==W?(X=e=>{if(!e.nativeEvent.isComposing&&W.length!==0){if(e.key===`ArrowDown`){e.preventDefault(),q.current=!0,w(e=>e+1>=W.length?0:e+1);return}if(e.key===`ArrowUp`){e.preventDefault(),q.current=!0,w(e=>e<=0?W.length-1:e-1);return}if(e.key===`Home`){e.preventDefault(),q.current=!0,w(0);return}if(e.key===`End`){e.preventDefault(),q.current=!0,w(W.length-1);return}if(e.key===`Enter`){let t=W[G];if(t===void 0)return;e.preventDefault(),d(t.action)}}},n[39]=G,n[40]=d,n[41]=W,n[42]=X):X=n[42];let _e=X,ve=G===-1?void 0:`${S}-${G}`,Z;n[43]===c?Z=n[44]:(Z=e=>{c(e),w(0),K.current!==null&&(K.current.scrollTop=0)},n[43]=c,n[44]=Z);let Q;n[45]!==G||n[46]!==g||n[47]!==B||n[48]!==d||n[49]!==S||n[50]!==H||n[51]!==W?(Q=!B&&W.length===0?(0,C.jsx)(`p`,{className:`px-3 py-4 text-center text-sm text-muted-foreground`,children:`No matching commands`}):B?H.map(e=>{let t=`${S}-${e.bucket.toLowerCase()}-label`;return(0,C.jsxs)(`div`,{role:`group`,"aria-labelledby":t,"data-palette-bucket":e.bucket,children:[(0,C.jsx)(`div`,{id:t,className:h,children:e.bucket}),e.entries.map((t,n)=>{let r=e.startIndex+n;return(0,C.jsx)(ue,{entry:t,id:`${S}-${r}`,isActive:r===G,isDrillIn:t.action.id===ie,showShortcut:!g,onActivate:()=>{w(r)},onSelect:()=>d(t.action)},t.action.id)})]},e.bucket)}):W.map((e,t)=>(0,C.jsx)(ue,{entry:e,id:`${S}-${t}`,isActive:t===G,isDrillIn:e.action.id===ie,showShortcut:!g,onActivate:()=>{w(t)},onSelect:()=>d(e.action)},e.action.id)),n[45]=G,n[46]=g,n[47]=B,n[48]=d,n[49]=S,n[50]=H,n[51]=W,n[52]=Q):Q=n[52];let $;return n[53]!==_e||n[54]!==x||n[55]!==s||n[56]!==ve||n[57]!==Z||n[58]!==Q?($=(0,C.jsx)(p,{activeDescendantId:ve,inputDescription:l.description,inputLabel:l.label,listId:x,listLabel:`Commands`,listRef:K,onInputChange:Z,onInputKeyDown:_e,placeholder:l.placeholder,value:s,children:Q}),n[53]=_e,n[54]=x,n[55]=s,n[56]=ve,n[57]=Z,n[58]=Q,n[59]=$):$=n[59],$}function oe(e){return e.entries}function se(e,t){return e+t.entries.length}function ce(e){return e.entries.length>0}function le(e){return!e.active}function ue(e){let t=(0,b.c)(19),{entry:n,id:r,isActive:i,isDrillIn:a,showShortcut:o,onActivate:c,onSelect:l}=e,u=n.action.group===`Browser`||n.action.id.startsWith(`plugin:`)?n.action.group:null,d=a?`${n.action.title}…`:n.action.title,f=o?n.action.shortcut:null,p=u!==null||f!==null||a,h=a?`drill-in`:`terminal`,g=i&&`bg-state-hover text-foreground`,_;t[0]===g?_=t[1]:(_=s(`flex min-h-8 w-full min-w-0 cursor-pointer items-center gap-3 rounded-md px-2 py-1.5 text-left text-sm outline-none`,g),t[0]=g,t[1]=_);let v;t[2]!==n.positions||t[3]!==d?(v=(0,C.jsx)(`span`,{className:`min-w-0 truncate`,children:(0,C.jsx)(w,{title:d,positions:n.positions})}),t[2]=n.positions,t[3]=d,t[4]=v):v=t[4];let y;t[5]!==p||t[6]!==a||t[7]!==u||t[8]!==f?(y=p?(0,C.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[u===null?null:(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:u}),f===null?null:(0,C.jsx)(m,{children:f.label}),a?(0,C.jsx)(`span`,{className:`sr-only`,children:`Opens a search view`}):null]}):null,t[5]=p,t[6]=a,t[7]=u,t[8]=f,t[9]=y):y=t[9];let x;return t[10]!==r||t[11]!==i||t[12]!==c||t[13]!==l||t[14]!==h||t[15]!==_||t[16]!==v||t[17]!==y?(x=(0,C.jsxs)(`div`,{id:r,role:`option`,"aria-selected":i,"data-palette-action-kind":h,className:_,onPointerMove:c,onClick:l,children:[v,y]}),t[10]=r,t[11]=i,t[12]=c,t[13]=l,t[14]=h,t[15]=_,t[16]=v,t[17]=y,t[18]=x):x=t[18],x}function w(e){let t=(0,b.c)(9),{title:n,positions:r}=e;if(r.length===0){let e;return t[0]===n?e=t[1]:(e=(0,C.jsx)(C.Fragment,{children:n}),t[0]=n,t[1]=e),e}let i;t[2]===r?i=t[3]:(i=new Set(r),t[2]=r,t[3]=i);let a=i,o;t[4]===n?o=t[5]:(o=[...n],t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,C.jsx)(C.Fragment,{children:o.map((e,t)=>a.has(t)?(0,C.jsx)(`span`,{className:`font-semibold text-foreground`,children:e},t):(0,C.jsx)(`span`,{children:e},t))}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}export{ae as CommandPaletteBody};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{nt as r}from"./index-DcGF-i5V.js";import{r as i}from"./git-diff-patch-text-SHpUxhZL.js";import{t as a}from"./MoonletDiffSplit-BGjCtQ2R.js";import{a as o,n as s,t as c}from"./code-rendering-CHgc25DA.js";var l=t(),u=e(n(),1),d=`diffRenderer`;function f(e){let t=(0,l.c)(25),{file:n,patchText:f,fullFileContents:p,view:m,overflow:h,showLineNumbers:g,className:_,onSelectionAddToChat:v}=e,y=m===void 0?s:m,b=h===void 0?c:h,x=g===void 0?!0:g,S=o(),C=S.kind===`plugin`,w;t[0]!==n||t[1]!==C||t[2]!==f?(w=C?f??i(n):``,t[0]=n,t[1]=C,t[2]=f,t[3]=w):w=t[3];let T=w,E;t[4]!==_||t[5]!==n||t[6]!==p||t[7]!==v||t[8]!==b||t[9]!==f||t[10]!==x||t[11]!==y?(E=(0,u.jsx)(a,{file:n,patchText:f,fullFileContents:p,view:y,overflow:b,showLineNumbers:x,className:_,onSelectionAddToChat:v}),t[4]=_,t[5]=n,t[6]=p,t[7]=v,t[8]=b,t[9]=f,t[10]=x,t[11]=y,t[12]=E):E=t[12];let D=E,O;t[13]!==_||t[14]!==n.name||t[15]!==p||t[16]!==b||t[17]!==T||t[18]!==x||t[19]!==y?(O=(e,t)=>(0,u.jsx)(`div`,{className:_,children:(0,u.jsx)(e.component,{patch:T,path:n.name,view:y,overflow:b,showLineNumbers:x,experimental_fullFileContents:p,Original:t})}),t[13]=_,t[14]=n.name,t[15]=p,t[16]=b,t[17]=T,t[18]=x,t[19]=y,t[20]=O):O=t[20];let k;return t[21]!==D||t[22]!==S||t[23]!==O?(k=(0,u.jsx)(r,{replacement:S,original:D,slotKind:d,children:O}),t[21]=D,t[22]=S,t[23]=O,t[24]=k):k=t[24],k}export{f as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Bi as r,Gn as i,Hi as a,Ia as o,Ui as s,Vi as c,Wi as l,Wn as u,Xn as d,em as f}from"./index-DCps_qBD.js";import{t as p}from"./useLocalOpenTargets-CtvcdlZg.js";import{t as m}from"./useResolvedLiveFileTarget-DlZUgf7A.js";var h=t(),g=e(n(),1);function _(e){let t=i(e),n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():null}function v(e){let t=(0,h.c)(40),{intent:n}=e,v=d(),y;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={enabled:!0},t[0]=y):y=t[0];let b=m(n.target,y),x=b.status===`available`,S;t[1]!==b.openContext||t[2]!==b.status?(S=b.status===`available`?{openContext:b.openContext}:{},t[1]=b.openContext,t[2]=b.status,t[3]=S):S=t[3];let C;t[4]!==x||t[5]!==S?(C={enabled:x,...S},t[4]=x,t[5]=S,t[6]=C):C=t[6];let w=p(C),{fileOpeners:T}=f(),E,D,O,k;if(t[7]!==T||t[8]!==n||t[9]!==w||t[10]!==v||t[11]!==b.absolutePath||t[12]!==b.status){let e=_(n.target.path),i=e===null?[]:T.filter(t=>t.extensions.includes(e)),o=u(n.location);t[17]!==n||t[18]!==v?(E=(0,g.jsx)(r,{onSelect:()=>v.openFilePreview(n),children:`Open preview`}),t[17]=n,t[18]=v,t[19]=E):E=t[19],D=i.length>0?(0,g.jsxs)(a,{children:[(0,g.jsx)(l,{children:`Open with`}),(0,g.jsxs)(s,{className:`min-w-52`,children:[(0,g.jsx)(r,{onSelect:()=>v.openFilePreview({...n,viewer:`builtin`}),children:`Moonlet preview`}),i.map(e=>(0,g.jsx)(r,{onSelect:()=>v.openFilePreview({...n,viewer:{pluginId:e.pluginId,openerId:e.id}}),children:e.title},`${e.pluginId}:${e.id}`))]})]}):null;let c=b.status!==`available`||w.isLoading||!w.canOpenPreferredFileTarget,d;t[20]!==n||t[21]!==v?(d=()=>v.openFileExternally(n),t[20]=n,t[21]=v,t[22]=d):d=t[22],t[23]!==d||t[24]!==c?(O=(0,g.jsx)(r,{disabled:c,onSelect:d,children:`Open externally`}),t[23]=d,t[24]=c,t[25]=O):O=t[25],k=b.status===`available`&&w.fileOpenTargets.length>0?(0,g.jsxs)(a,{children:[(0,g.jsx)(l,{children:`Open in`}),(0,g.jsx)(s,{className:`min-w-52`,children:w.fileOpenTargets.map(e=>(0,g.jsx)(r,{onSelect:()=>{w.openPathInFileTarget({columnNumber:o.columnNumber,lineNumber:o.lineNumber,path:b.absolutePath,rememberTarget:!1,targetId:e.id})},children:e.label},e.id))})]}):null,t[7]=T,t[8]=n,t[9]=w,t[10]=v,t[11]=b.absolutePath,t[12]=b.status,t[13]=E,t[14]=D,t[15]=O,t[16]=k}else E=t[13],D=t[14],O=t[15],k=t[16];let A;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,g.jsx)(c,{}),t[26]=A):A=t[26];let j;t[27]!==n.target.path||t[28]!==b.absolutePath||t[29]!==b.status?(j=(0,g.jsx)(r,{onSelect:()=>{o(b.status===`available`?b.absolutePath:n.target.path,{successMessage:`File path copied`,errorMessage:`Failed to copy file path`})},children:`Copy file path`}),t[27]=n.target.path,t[28]=b.absolutePath,t[29]=b.status,t[30]=j):j=t[30];let M;t[31]===n.target.path?M=t[32]:(M=(0,g.jsx)(r,{onSelect:()=>{o(i(n.target.path),{successMessage:`File name copied`,errorMessage:`Failed to copy file name`})},children:`Copy file name`}),t[31]=n.target.path,t[32]=M);let N;return t[33]!==j||t[34]!==M||t[35]!==E||t[36]!==D||t[37]!==O||t[38]!==k?(N=(0,g.jsxs)(g.Fragment,{children:[E,D,O,k,A,j,M]}),t[33]=j,t[34]=M,t[35]=E,t[36]=D,t[37]=O,t[38]=k,t[39]=N):N=t[39],N}export{v as ExperimentalFileLinkMenu};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{$n as r,Gi as i,Jn as a,Ki as o,Ui as s,Wi as c,qi as l,qn as u,rm as d,za as f}from"./index-DcGF-i5V.js";import{t as p}from"./useLocalOpenTargets-zowTaKCQ.js";import{t as m}from"./useResolvedLiveFileTarget-G_UQNMF1.js";var h=t(),g=e(n(),1);function _(e){let t=a(e),n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():null}function v(e){let t=(0,h.c)(40),{intent:n}=e,v=r(),y;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={enabled:!0},t[0]=y):y=t[0];let b=m(n.target,y),x=b.status===`available`,S;t[1]!==b.openContext||t[2]!==b.status?(S=b.status===`available`?{openContext:b.openContext}:{},t[1]=b.openContext,t[2]=b.status,t[3]=S):S=t[3];let C;t[4]!==x||t[5]!==S?(C={enabled:x,...S},t[4]=x,t[5]=S,t[6]=C):C=t[6];let w=p(C),{fileOpeners:T}=d(),E,D,O,k;if(t[7]!==T||t[8]!==n||t[9]!==w||t[10]!==v||t[11]!==b.absolutePath||t[12]!==b.status){let e=_(n.target.path),r=e===null?[]:T.filter(t=>t.extensions.includes(e)),a=u(n.location);t[17]!==n||t[18]!==v?(E=(0,g.jsx)(s,{onSelect:()=>v.openFilePreview(n),children:`Open preview`}),t[17]=n,t[18]=v,t[19]=E):E=t[19],D=r.length>0?(0,g.jsxs)(i,{children:[(0,g.jsx)(l,{children:`Open with`}),(0,g.jsxs)(o,{className:`min-w-52`,children:[(0,g.jsx)(s,{onSelect:()=>v.openFilePreview({...n,viewer:`builtin`}),children:`Moonlet preview`}),r.map(e=>(0,g.jsx)(s,{onSelect:()=>v.openFilePreview({...n,viewer:{pluginId:e.pluginId,openerId:e.id}}),children:e.title},`${e.pluginId}:${e.id}`))]})]}):null;let c=b.status!==`available`||w.isLoading||!w.canOpenPreferredFileTarget,d;t[20]!==n||t[21]!==v?(d=()=>v.openFileExternally(n),t[20]=n,t[21]=v,t[22]=d):d=t[22],t[23]!==d||t[24]!==c?(O=(0,g.jsx)(s,{disabled:c,onSelect:d,children:`Open externally`}),t[23]=d,t[24]=c,t[25]=O):O=t[25],k=b.status===`available`&&w.fileOpenTargets.length>0?(0,g.jsxs)(i,{children:[(0,g.jsx)(l,{children:`Open in`}),(0,g.jsx)(o,{className:`min-w-52`,children:w.fileOpenTargets.map(e=>(0,g.jsx)(s,{onSelect:()=>{w.openPathInFileTarget({columnNumber:a.columnNumber,lineNumber:a.lineNumber,path:b.absolutePath,rememberTarget:!1,targetId:e.id})},children:e.label},e.id))})]}):null,t[7]=T,t[8]=n,t[9]=w,t[10]=v,t[11]=b.absolutePath,t[12]=b.status,t[13]=E,t[14]=D,t[15]=O,t[16]=k}else E=t[13],D=t[14],O=t[15],k=t[16];let A;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,g.jsx)(c,{}),t[26]=A):A=t[26];let j;t[27]!==n.target.path||t[28]!==b.absolutePath||t[29]!==b.status?(j=(0,g.jsx)(s,{onSelect:()=>{f(b.status===`available`?b.absolutePath:n.target.path,{successMessage:`File path copied`,errorMessage:`Failed to copy file path`})},children:`Copy file path`}),t[27]=n.target.path,t[28]=b.absolutePath,t[29]=b.status,t[30]=j):j=t[30];let M;t[31]===n.target.path?M=t[32]:(M=(0,g.jsx)(s,{onSelect:()=>{f(a(n.target.path),{successMessage:`File name copied`,errorMessage:`Failed to copy file name`})},children:`Copy file name`}),t[31]=n.target.path,t[32]=M);let N;return t[33]!==j||t[34]!==M||t[35]!==E||t[36]!==D||t[37]!==O||t[38]!==k?(N=(0,g.jsxs)(g.Fragment,{children:[E,D,O,k,A,j,M]}),t[33]=j,t[34]=M,t[35]=E,t[36]=D,t[37]=O,t[38]=k,t[39]=N):N=t[39],N}export{v as ExperimentalFileLinkMenu};
@@ -1,3 +1,3 @@
1
- import{o as e,r as t}from"./rolldown-runtime-BM3Ffeng.js";import{hi as n,kr as r,ri as i}from"./boot-vendor-CKEhulXz.js";import{$f as a,Dh as o,Dp as s,Fh as c,Ia as l,Pn as u,Sc as d,Zt as f,aa as p,da as m,dp as h,ep as g,ha as _,ht as v,jh as y,la as b,np as x,oa as S,ra as C,sa as w,tp as T,ua as E,uo as D,wp as O}from"./index-DCps_qBD.js";import{n as k}from"./code-loading-skeletons-CkiXPS0M.js";import{a as A,i as j,o as M,r as N,t as P}from"./TimelineSelectionMenu-DDYrgVgK.js";import{t as F}from"./esm-CUQGeFi6.js";import{a as I,n as ee,r as te,t as ne}from"./useElementWidth-EbzKQ0bg.js";import{n as L}from"./save-file-B8sl9wgP.js";import{t as re}from"./AppCommandShortcutHint-CCVkbqD1.js";import{n as R,r as z}from"./image-lightbox-DhNslR-8.js";import{h as ie,m as ae,t as B}from"./markdown-preview-CGXXNhJo.js";import{n as V}from"./SourceCodeHost-DkoXO-RM.js";import{t as oe}from"./open-in-editor-button-tA10Nkqn.js";var H=r(),U=e(n(),1),W=(0,U.createContext)(null),G=e(i(),1);function K(e,t){return t===null||!(e.target instanceof Node)?!1:t.contains(e.target)}function q(e,t){let{commonAncestorContainer:n}=e;return!!(t.contains(n)||typeof e.intersectsNode==`function`&&(()=>{try{return e.intersectsNode(t)}catch{return!1}})())}function J(e,t){let n=e.cloneRange();return t.contains(e.startContainer)||n.setStart(t,0),t.contains(e.endContainer)||n.setEnd(t,t.childNodes.length),M(n,t,`markdown`).text}function Y({anchor:e,markdown:t,node:n,pointerStartedInNode:r}){if(n===null||typeof window>`u`)return null;let i=window.getSelection();if(i===null||i.rangeCount===0||i.isCollapsed)return null;let a=i.toString().trim();if(a.length===0)return null;let o=i.getRangeAt(0);if(!r&&!q(o,n))return null;let s=e??null,c=j(o)??(s===null?n.getBoundingClientRect():new DOMRect(s.point.x,s.point.y,0,0)),l={text:t?J(o,n):a,rect:c};return s!==null&&(l.anchorPoint=s.point,l.anchorSide=s.side),l}function X(e){let t=(0,H.c)(22),{children:n,markdown:r,onSelectionAddToChat:i}=e,a=r===void 0?!1:r,o=(0,U.useRef)(null),s=(0,U.useRef)(!1),c=(0,U.useRef)(null),l=(0,U.useRef)(!1),u=(0,U.useRef)(null),f=d(),[p,m]=(0,U.useState)(null),h=!f,g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{m(null)},t[0]=g):g=t[0];let _=g,v;t[1]===a?v=t[2]:(v=e=>{m(Y({anchor:e,markdown:a,node:o.current,pointerStartedInNode:s.current}))},t[1]=a,t[2]=v);let y=v,b,x;t[3]!==h||t[4]!==y?(b=()=>{if(!h||typeof window>`u`)return;let e=null,t=()=>{e!==null&&(window.cancelAnimationFrame(e),e=null)},n=n=>{let r=n===void 0?null:n;t(),e=window.requestAnimationFrame(()=>{e=null,y(r)})},r=e=>{t(),s.current=K(e,o.current),c.current=s.current?N(e):null,l.current=!0},i=e=>{let t=s.current&&c.current!==null?A(c.current,e):null;t!==null&&(u.current=t),l.current=!1,c.current=null,n(t??u.current)},a=()=>{l.current=!1,c.current=null,n(u.current)},d=()=>{l.current||n(u.current)};return document.addEventListener(`pointerdown`,r),document.addEventListener(`pointerup`,i),document.addEventListener(`pointercancel`,a),document.addEventListener(`mouseup`,i),document.addEventListener(`selectionchange`,d),document.addEventListener(`keyup`,d),()=>{t(),document.removeEventListener(`pointerdown`,r),document.removeEventListener(`pointerup`,i),document.removeEventListener(`pointercancel`,a),document.removeEventListener(`mouseup`,i),document.removeEventListener(`selectionchange`,d),document.removeEventListener(`keyup`,d)}},x=[h,y],t[3]=h,t[4]=y,t[5]=b,t[6]=x):(b=t[5],x=t[6]),(0,U.useEffect)(b,x);let S,C;t[7]===a?(S=t[8],C=t[9]):(S=()=>{if(!a)return;let e=e=>{let t=o.current,n=window.getSelection();if(e.defaultPrevented||e.clipboardData===null||t===null||n===null||n.isCollapsed||n.rangeCount!==1)return;let r=n.getRangeAt(0);if(!t.contains(r.startContainer)||!t.contains(r.endContainer))return;let i=M(r,t,`text`);i.text&&(e.clipboardData.setData(`text/plain`,i.text),e.clipboardData.setData(`text/html`,i.html),e.preventDefault())};return document.addEventListener(`copy`,e),()=>document.removeEventListener(`copy`,e)},C=[a],t[7]=a,t[8]=S,t[9]=C),(0,U.useEffect)(S,C);let w;t[10]===i?w=t[11]:(w=e=>{i?.(e),m(null)},t[10]=i,t[11]=w);let T=w,E;t[12]===n?E=t[13]:(E=(0,G.jsx)(`div`,{ref:o,className:`contents`,children:n}),t[12]=n,t[13]=E);let D;t[14]!==T||t[15]!==h||t[16]!==i||t[17]!==p?(D=h?(0,G.jsx)(P,{selection:p,onAddToChat:i===void 0?void 0:T,onDismiss:_}):null,t[14]=T,t[15]=h,t[16]=i,t[17]=p,t[18]=D):D=t[18];let O;return t[19]!==D||t[20]!==E?(O=(0,G.jsxs)(G.Fragment,{children:[E,D]}),t[19]=D,t[20]=E,t[21]=O):O=t[21],O}var Z=new Set([`avif`,`bmp`,`gif`,`ico`,`jpeg`,`jpg`,`png`,`webp`]),Q=(0,U.createContext)(null);function se(e){if(e.tab.kind!==`workspace-file-preview`&&e.tab.kind!==`host-file-preview`&&e.tab.kind!==`thread-storage-file-preview`&&e.tab.kind!==`attachment-file-preview`)return!1;let t=e.tab.path.split(`.`).pop()?.toLowerCase();return t!==void 0&&Z.has(t)}function ce(e){let t=(0,H.c)(33),{activeTabId:n,children:r,tabs:i}=e,[a,o]=(0,U.useState)(null),[s,c]=(0,U.useState)(!1),[l,u]=(0,U.useState)(le),d;t[0]===i?d=t[1]:(d=i.filter(se),t[0]=i,t[1]=d);let f=d,p;t[2]!==f||t[3]!==l?(p=e=>{let t=f[e];t!==void 0&&(o(l.get(t.tab.id)??null),t.onSelect())},t[2]=f,t[3]=l,t[4]=p):p=t[4];let m=p,h;t[5]!==n||t[6]!==f||t[7]!==m?(h=e=>{let t=f.findIndex(e=>e.tab.id===n);t===-1||f.length<=1||m(z({currentIndex:t,direction:e,itemCount:f.length}))},t[5]=n,t[6]=f,t[7]=m,t[8]=h):h=t[8];let g=h,_;t[9]===n?_=t[10]:(_=e=>{o(e),n!==null&&u(t=>t.get(n)?.src===e.src?t:new Map(t).set(n,e))},t[9]=n,t[10]=_);let v=_,y;t[11]===v?y=t[12]:(y=e=>{v(e),c(!0)},t[11]=v,t[12]=y);let b;t[13]!==s||t[14]!==y||t[15]!==v?(b={isOpen:s,open:y,update:v},t[13]=s,t[14]=y,t[15]=v,t[16]=b):b=t[16];let x=b,S=a?.alt??`Image preview`,C=s?a?.src??null:null,w=a?.alt??`Image preview`,T=f.length>1,E,D;t[17]===g?(E=t[18],D=t[19]):(E=()=>g(`previous`),D=()=>g(`next`),t[17]=g,t[18]=E,t[19]=D);let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>c(!1),t[20]=O):O=t[20];let k;t[21]!==s||t[22]!==T||t[23]!==E||t[24]!==D||t[25]!==S||t[26]!==C||t[27]!==w?(k=(0,G.jsx)(R,{imageAlt:S,imageSrc:C,isOpen:s,title:w,hasMultipleImages:T,onPrevious:E,onNext:D,onClose:O}),t[21]=s,t[22]=T,t[23]=E,t[24]=D,t[25]=S,t[26]=C,t[27]=w,t[28]=k):k=t[28];let A;return t[29]!==r||t[30]!==k||t[31]!==x?(A=(0,G.jsxs)(Q.Provider,{value:x,children:[r,k]}),t[29]=r,t[30]=k,t[31]=x,t[32]=A):A=t[32],A}function le(){return new Map}function ue(){return(0,U.useContext)(Q)}var de=t({FilePreview:()=>je,buildCsvPreviewData:()=>ke,getCsvTruncationNote:()=>Ae}),fe=100,pe=500,me=29,he=8,ge={width:`100%`,height:`100%`,border:0},_e=160,$=`h-5 w-5 rounded-sm p-0 [&_[data-icon-root]]:size-3 max-md:pointer-coarse:h-9 max-md:pointer-coarse:w-9 max-md:pointer-coarse:[&_[data-icon-root]]:size-5`,ve=`h-5 rounded-sm px-2 text-muted-foreground max-md:pointer-coarse:h-9`;function ye(e){return e.kind===`html`?e.iframe.url:null}function be(e){return typeof window>`u`?e:new URL(e,window.location.href).toString()}function xe(e){return e.kind===`html`?`html`:e.kind===`ready`?e.textPreviewKind:null}function Se(e){switch(e){case`csv`:return`CSV view mode`;case`html`:return`HTML view mode`;case`markdown`:return`Markdown view mode`}}function Ce(e){return e===`csv`?`Copy CSV`:e===`markdown`?`Copy markdown`:e===`html`?`Copy HTML source`:`Copy file contents`}function we(e){return e.kind===`html`||e.kind===`ready`?e.lineRange:null}function Te(e){return e.kind===`html`||e.kind===`ready`?e.file.contents:null}function Ee({lineRange:e,toggleKind:t}){return t===`csv`||t===`html`||t===`markdown`||e===null?`preview`:`source`}function De(e,t){return e.kind===`html`?t===`source`:e.kind===`ready`?e.textPreviewKind===null||t===`source`:!1}function Oe(e,t){let n=[],r=[],i=``,a=!1,o=!1,s=!1;for(let c=0;c<e.length;c+=1){let l=e[c];if(s=!1,a){l===`"`?e[c+1]===`"`?(i+=`"`,c+=1):a=!1:i+=l;continue}if(l===`"`&&i.length===0){a=!0,o=!0;continue}if(l===`,`){r.push(i),i=``,o=!1;continue}if(l===`
1
+ import{o as e,r as t}from"./rolldown-runtime-BM3Ffeng.js";import{hi as n,kr as r,ri as i}from"./boot-vendor-CKEhulXz.js";import{Ah as a,Ap as o,Dp as s,Ln as c,Ph as l,Rh as u,Tc as d,ap as f,ca as p,en as m,fa as h,ip as g,la as _,ma as v,mp as y,np as b,oa as x,pa as S,po as C,rp as w,ua as T,va as E,vt as D,za as O}from"./index-DcGF-i5V.js";import{n as k}from"./code-loading-skeletons-DtdoAfrj.js";import{a as A,i as j,o as M,r as N,t as P}from"./TimelineSelectionMenu-CgAxp7QF.js";import{t as F}from"./esm-CUQGeFi6.js";import{a as I,n as ee,r as te,t as ne}from"./useElementWidth-DWdvxoro.js";import{n as L}from"./save-file-D1NL0mtk.js";import{t as re}from"./AppCommandShortcutHint-BFFp1FEJ.js";import{n as R,r as z}from"./image-lightbox-CYq-aV6a.js";import{h as ie,m as ae,t as B}from"./markdown-preview-BFrQHjqt.js";import{n as V}from"./SourceCodeHost-HqsxZuJa.js";import{t as oe}from"./open-in-editor-button-Jn2gF-rw.js";var H=r(),U=e(n(),1),W=(0,U.createContext)(null),G=e(i(),1);function K(e,t){return t===null||!(e.target instanceof Node)?!1:t.contains(e.target)}function q(e,t){let{commonAncestorContainer:n}=e;return!!(t.contains(n)||typeof e.intersectsNode==`function`&&(()=>{try{return e.intersectsNode(t)}catch{return!1}})())}function J(e,t){let n=e.cloneRange();return t.contains(e.startContainer)||n.setStart(t,0),t.contains(e.endContainer)||n.setEnd(t,t.childNodes.length),M(n,t,`markdown`).text}function Y({anchor:e,markdown:t,node:n,pointerStartedInNode:r}){if(n===null||typeof window>`u`)return null;let i=window.getSelection();if(i===null||i.rangeCount===0||i.isCollapsed)return null;let a=i.toString().trim();if(a.length===0)return null;let o=i.getRangeAt(0);if(!r&&!q(o,n))return null;let s=e??null,c=j(o)??(s===null?n.getBoundingClientRect():new DOMRect(s.point.x,s.point.y,0,0)),l={text:t?J(o,n):a,rect:c};return s!==null&&(l.anchorPoint=s.point,l.anchorSide=s.side),l}function X(e){let t=(0,H.c)(22),{children:n,markdown:r,onSelectionAddToChat:i}=e,a=r===void 0?!1:r,o=(0,U.useRef)(null),s=(0,U.useRef)(!1),c=(0,U.useRef)(null),l=(0,U.useRef)(!1),u=(0,U.useRef)(null),f=d(),[p,m]=(0,U.useState)(null),h=!f,g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{m(null)},t[0]=g):g=t[0];let _=g,v;t[1]===a?v=t[2]:(v=e=>{m(Y({anchor:e,markdown:a,node:o.current,pointerStartedInNode:s.current}))},t[1]=a,t[2]=v);let y=v,b,x;t[3]!==h||t[4]!==y?(b=()=>{if(!h||typeof window>`u`)return;let e=null,t=()=>{e!==null&&(window.cancelAnimationFrame(e),e=null)},n=n=>{let r=n===void 0?null:n;t(),e=window.requestAnimationFrame(()=>{e=null,y(r)})},r=e=>{t(),s.current=K(e,o.current),c.current=s.current?N(e):null,l.current=!0},i=e=>{let t=s.current&&c.current!==null?A(c.current,e):null;t!==null&&(u.current=t),l.current=!1,c.current=null,n(t??u.current)},a=()=>{l.current=!1,c.current=null,n(u.current)},d=()=>{l.current||n(u.current)};return document.addEventListener(`pointerdown`,r),document.addEventListener(`pointerup`,i),document.addEventListener(`pointercancel`,a),document.addEventListener(`mouseup`,i),document.addEventListener(`selectionchange`,d),document.addEventListener(`keyup`,d),()=>{t(),document.removeEventListener(`pointerdown`,r),document.removeEventListener(`pointerup`,i),document.removeEventListener(`pointercancel`,a),document.removeEventListener(`mouseup`,i),document.removeEventListener(`selectionchange`,d),document.removeEventListener(`keyup`,d)}},x=[h,y],t[3]=h,t[4]=y,t[5]=b,t[6]=x):(b=t[5],x=t[6]),(0,U.useEffect)(b,x);let S,C;t[7]===a?(S=t[8],C=t[9]):(S=()=>{if(!a)return;let e=e=>{let t=o.current,n=window.getSelection();if(e.defaultPrevented||e.clipboardData===null||t===null||n===null||n.isCollapsed||n.rangeCount!==1)return;let r=n.getRangeAt(0);if(!t.contains(r.startContainer)||!t.contains(r.endContainer))return;let i=M(r,t,`text`);i.text&&(e.clipboardData.setData(`text/plain`,i.text),e.clipboardData.setData(`text/html`,i.html),e.preventDefault())};return document.addEventListener(`copy`,e),()=>document.removeEventListener(`copy`,e)},C=[a],t[7]=a,t[8]=S,t[9]=C),(0,U.useEffect)(S,C);let w;t[10]===i?w=t[11]:(w=e=>{i?.(e),m(null)},t[10]=i,t[11]=w);let T=w,E;t[12]===n?E=t[13]:(E=(0,G.jsx)(`div`,{ref:o,className:`contents`,children:n}),t[12]=n,t[13]=E);let D;t[14]!==T||t[15]!==h||t[16]!==i||t[17]!==p?(D=h?(0,G.jsx)(P,{selection:p,onAddToChat:i===void 0?void 0:T,onDismiss:_}):null,t[14]=T,t[15]=h,t[16]=i,t[17]=p,t[18]=D):D=t[18];let O;return t[19]!==D||t[20]!==E?(O=(0,G.jsxs)(G.Fragment,{children:[E,D]}),t[19]=D,t[20]=E,t[21]=O):O=t[21],O}var Z=new Set([`avif`,`bmp`,`gif`,`ico`,`jpeg`,`jpg`,`png`,`webp`]),Q=(0,U.createContext)(null);function se(e){if(e.tab.kind!==`workspace-file-preview`&&e.tab.kind!==`host-file-preview`&&e.tab.kind!==`thread-storage-file-preview`&&e.tab.kind!==`attachment-file-preview`)return!1;let t=e.tab.path.split(`.`).pop()?.toLowerCase();return t!==void 0&&Z.has(t)}function ce(e){let t=(0,H.c)(33),{activeTabId:n,children:r,tabs:i}=e,[a,o]=(0,U.useState)(null),[s,c]=(0,U.useState)(!1),[l,u]=(0,U.useState)(le),d;t[0]===i?d=t[1]:(d=i.filter(se),t[0]=i,t[1]=d);let f=d,p;t[2]!==f||t[3]!==l?(p=e=>{let t=f[e];t!==void 0&&(o(l.get(t.tab.id)??null),t.onSelect())},t[2]=f,t[3]=l,t[4]=p):p=t[4];let m=p,h;t[5]!==n||t[6]!==f||t[7]!==m?(h=e=>{let t=f.findIndex(e=>e.tab.id===n);t===-1||f.length<=1||m(z({currentIndex:t,direction:e,itemCount:f.length}))},t[5]=n,t[6]=f,t[7]=m,t[8]=h):h=t[8];let g=h,_;t[9]===n?_=t[10]:(_=e=>{o(e),n!==null&&u(t=>t.get(n)?.src===e.src?t:new Map(t).set(n,e))},t[9]=n,t[10]=_);let v=_,y;t[11]===v?y=t[12]:(y=e=>{v(e),c(!0)},t[11]=v,t[12]=y);let b;t[13]!==s||t[14]!==y||t[15]!==v?(b={isOpen:s,open:y,update:v},t[13]=s,t[14]=y,t[15]=v,t[16]=b):b=t[16];let x=b,S=a?.alt??`Image preview`,C=s?a?.src??null:null,w=a?.alt??`Image preview`,T=f.length>1,E,D;t[17]===g?(E=t[18],D=t[19]):(E=()=>g(`previous`),D=()=>g(`next`),t[17]=g,t[18]=E,t[19]=D);let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>c(!1),t[20]=O):O=t[20];let k;t[21]!==s||t[22]!==T||t[23]!==E||t[24]!==D||t[25]!==S||t[26]!==C||t[27]!==w?(k=(0,G.jsx)(R,{imageAlt:S,imageSrc:C,isOpen:s,title:w,hasMultipleImages:T,onPrevious:E,onNext:D,onClose:O}),t[21]=s,t[22]=T,t[23]=E,t[24]=D,t[25]=S,t[26]=C,t[27]=w,t[28]=k):k=t[28];let A;return t[29]!==r||t[30]!==k||t[31]!==x?(A=(0,G.jsxs)(Q.Provider,{value:x,children:[r,k]}),t[29]=r,t[30]=k,t[31]=x,t[32]=A):A=t[32],A}function le(){return new Map}function ue(){return(0,U.useContext)(Q)}var de=t({FilePreview:()=>je,buildCsvPreviewData:()=>ke,getCsvTruncationNote:()=>Ae}),fe=100,pe=500,me=29,he=8,ge={width:`100%`,height:`100%`,border:0},_e=160,$=`h-5 w-5 rounded-sm p-0 [&_[data-icon-root]]:size-3 max-md:pointer-coarse:h-9 max-md:pointer-coarse:w-9 max-md:pointer-coarse:[&_[data-icon-root]]:size-5`,ve=`h-5 rounded-sm px-2 text-muted-foreground max-md:pointer-coarse:h-9`;function ye(e){return e.kind===`html`?e.iframe.url:null}function be(e){return typeof window>`u`?e:new URL(e,window.location.href).toString()}function xe(e){return e.kind===`html`?`html`:e.kind===`ready`?e.textPreviewKind:null}function Se(e){switch(e){case`csv`:return`CSV view mode`;case`html`:return`HTML view mode`;case`markdown`:return`Markdown view mode`}}function Ce(e){return e===`csv`?`Copy CSV`:e===`markdown`?`Copy markdown`:e===`html`?`Copy HTML source`:`Copy file contents`}function we(e){return e.kind===`html`||e.kind===`ready`?e.lineRange:null}function Te(e){return e.kind===`html`||e.kind===`ready`?e.file.contents:null}function Ee({lineRange:e,toggleKind:t}){return t===`csv`||t===`html`||t===`markdown`||e===null?`preview`:`source`}function De(e,t){return e.kind===`html`?t===`source`:e.kind===`ready`?e.textPreviewKind===null||t===`source`:!1}function Oe(e,t){let n=[],r=[],i=``,a=!1,o=!1,s=!1;for(let c=0;c<e.length;c+=1){let l=e[c];if(s=!1,a){l===`"`?e[c+1]===`"`?(i+=`"`,c+=1):a=!1:i+=l;continue}if(l===`"`&&i.length===0){a=!0,o=!0;continue}if(l===`,`){r.push(i),i=``,o=!1;continue}if(l===`
2
2
  `||l===`\r`){if(r.push(i),n.push(r),r=[],i=``,o=!1,s=!0,l===`\r`&&e[c+1]===`
3
- `&&(c+=1),n.length>=t)return{rows:n,truncatedRows:c+1<e.length};continue}i+=l}return(i.length>0||r.length>0||o||!s)&&(r.push(i),n.push(r)),{rows:n,truncatedRows:!1}}function ke(e){let{rows:t,truncatedRows:n}=Oe(e,pe+1),r=t.reduce((e,t)=>Math.max(e,t.length),0);return{columnCount:Math.min(r,fe),rows:t,truncatedColumns:r>fe,truncatedRows:n}}function Ae(e,t){let n=[];return e.truncatedRows&&n.push(`${t.toLocaleString()} rows`),e.truncatedColumns&&n.push(`${e.columnCount.toLocaleString()} columns`),n.length===0?null:`Showing the first ${n.join(` and `)}.`}function je(e){let t=(0,H.c)(61),{download:n,state:r,path:i,copyPath:a,headerMode:o,onSelectionAddToChat:s,onOpenInEditor:l,onRefresh:u,isRefreshing:d,markdownLinkRouting:f,statusLabel:p}=e,m=n===void 0?null:n,h=a===void 0?null:a,g=o===void 0?`file`:o,_=d===void 0?!1:d,v=p===void 0?null:p,y=r.kind===`html`?r.iframe:null,b;t[0]!==y?.url||t[1]!==r.file||t[2]!==r.kind?(b=JSON.stringify([r.kind,y?.url,r.kind===`html`?r.file.cacheKey:null]),t[0]=y?.url,t[1]=r.file,t[2]=r.kind,t[3]=b):b=t[3];let x=b,S;t[4]===x?S=t[5]:(S={key:x,status:`loading`},t[4]=x,t[5]=S);let[C,w]=(0,U.useState)(S);C.key!==x&&w({key:x,status:`loading`});let T=C.key===x?C.status:`loading`,E;t[6]!==x||t[7]!==T||t[8]!==y?(E=y===null?null:(0,G.jsx)(Ve,{...y,loadState:T,onLoadStateChange:e=>w(t=>t.key===x?{key:x,status:e}:t)},x),t[6]=x,t[7]=T,t[8]=y,t[9]=E):E=t[9];let D=E,O,k,A,j,M,N;t[10]===r?(O=t[11],k=t[12],A=t[13],j=t[14],M=t[15],N=t[16]):(N=xe(r),k=we(r),A=Te(r),O=ye(r),M=U.useState,j=Ee({lineRange:k,toggleKind:N}),t[10]=r,t[11]=O,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N);let[P,F]=M(j),[I,te]=(0,U.useState)(ae),ne;t[17]!==k||t[18]!==N?(ne=()=>{F(Ee({lineRange:k,toggleKind:N}))},t[17]=k,t[18]=N,t[19]=ne):ne=t[19];let L;t[20]!==k||t[21]!==i||t[22]!==N?(L=[k,i,N],t[20]=k,t[21]=i,t[22]=N,t[23]=L):L=t[23],(0,U.useEffect)(ne,L);let re=r.kind===`html`&&P===`preview`,R=N===null?`preview`:P,z;t[24]!==R||t[25]!==r?(z=De(r,R),t[24]=R,t[25]=r,t[26]=z):z=t[26];let ie=z,B=ie,V=r.kind===`ready`&&r.textPreviewKind===`markdown`&&R===`preview`,oe=r.kind===`ready`&&r.textPreviewKind===`csv`&&R===`preview`,W=re||oe||ie||V,K;t[27]!==W||t[28]!==V?(K=W?c(`@container/page flex h-full min-h-0 flex-col`,V&&`overflow-y-auto`):`@container/page min-h-full`,t[27]=W,t[28]=V,t[29]=K):K=t[29];let q=V?``:void 0,J;t[30]!==h||t[31]!==m||t[32]!==O||t[33]!==g||t[34]!==T||t[35]!==_||t[36]!==I||t[37]!==l||t[38]!==u||t[39]!==i||t[40]!==A||t[41]!==B||t[42]!==r.kind||t[43]!==v||t[44]!==N||t[45]!==re||t[46]!==P?(J=g===`file`?(0,G.jsx)(Ne,{download:m,previewIcon:(0,G.jsx)(Be,{loading:r.kind===`loading`||_||re&&T===`loading`},i),path:i,copyPath:h,rawContents:A,externalUrl:O,onOpenInEditor:l,onRefresh:u,isRefreshing:_,statusLabel:v,toggleKind:N,showLineOverflowToggle:B,lineOverflowMode:I,onLineOverflowModeChange:te,viewMode:P,onViewModeChange:F}):null,t[30]=h,t[31]=m,t[32]=O,t[33]=g,t[34]=T,t[35]=_,t[36]=I,t[37]=l,t[38]=u,t[39]=i,t[40]=A,t[41]=B,t[42]=r.kind,t[43]=v,t[44]=N,t[45]=re,t[46]=P,t[47]=J):J=t[47];let Y;t[48]!==R||t[49]!==D||t[50]!==I||t[51]!==f||t[52]!==s||t[53]!==i||t[54]!==r?(Y=(0,G.jsx)(Me,{iframePreview:D,state:r,path:i,lineOverflowMode:I,viewMode:R,markdownLinkRouting:f,onSelectionAddToChat:s}),t[48]=R,t[49]=D,t[50]=I,t[51]=f,t[52]=s,t[53]=i,t[54]=r,t[55]=Y):Y=t[55];let X;return t[56]!==K||t[57]!==q||t[58]!==J||t[59]!==Y?(X=(0,G.jsxs)(`div`,{className:K,"data-file-preview-scroll-container":q,style:ee,children:[J,Y]}),t[56]=K,t[57]=q,t[58]=J,t[59]=Y,t[60]=X):X=t[60],X}function Me(e){let t=(0,H.c)(32),{iframePreview:n,state:r,path:i,lineOverflowMode:a,viewMode:o,markdownLinkRouting:s,onSelectionAddToChat:c}=e;if(r.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(k,{}),t[0]=e):e=t[0],e}if(r.kind===`empty`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ue,{message:`Empty file.`}),t[1]=e):e=t[1],e}if(r.kind===`not-found`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ue,{message:`File not found.`,role:`alert`}),t[2]=e):e=t[2],e}if(r.kind===`error`){let e=r.message??`Failed to load file`,n;return t[3]===e?n=t[4]:(n=(0,G.jsx)(Ue,{message:e,role:`alert`}),t[3]=e,t[4]=n),n}if(r.kind===`unsupported`){let e;return t[5]===r.file?e=t[6]:(e=(0,G.jsx)(He,{file:r.file}),t[5]=r.file,t[6]=e),e}if(r.kind===`image`){let e;return t[7]!==i||t[8]!==r.url?(e=(0,G.jsx)(Re,{url:r.url,alt:i}),t[7]=i,t[8]=r.url,t[9]=e):e=t[9],e}if(r.kind===`video`){let e;return t[10]!==i||t[11]!==r.url?(e=(0,G.jsx)(ze,{url:r.url,title:i}),t[10]=i,t[11]=r.url,t[12]=e):e=t[12],e}if(r.kind===`html`){let e;return t[13]!==n||t[14]!==a||t[15]!==c||t[16]!==r||t[17]!==o?(e=(0,G.jsx)(Fe,{iframePreview:n,lineOverflowMode:a,onSelectionAddToChat:c,state:r,viewMode:o}),t[13]=n,t[14]=a,t[15]=c,t[16]=r,t[17]=o,t[18]=e):e=t[18],e}if(r.textPreviewKind===`csv`&&o===`preview`){let e;return t[19]!==c||t[20]!==r.file?(e=(0,G.jsx)(Le,{file:r.file,onSelectionAddToChat:c}),t[19]=c,t[20]=r.file,t[21]=e):e=t[21],e}if(r.textPreviewKind===`markdown`&&o===`preview`){let e;return t[22]!==s||t[23]!==c||t[24]!==r.file?(e=(0,G.jsx)(Ie,{file:r.file,markdownLinkRouting:s,onSelectionAddToChat:c}),t[22]=s,t[23]=c,t[24]=r.file,t[25]=e):e=t[25],e}let l=r.lineRange??null,u;return t[26]!==a||t[27]!==c||t[28]!==i||t[29]!==r.file||t[30]!==l?(u=(0,G.jsx)(We,{file:r.file,lineOverflowMode:a,lineRange:l,onSelectionAddToChat:c,path:i}),t[26]=a,t[27]=c,t[28]=i,t[29]=r.file,t[30]=l,t[31]=u):u=t[31],u}function Ne(e){let t=(0,H.c)(45),{download:n,previewIcon:r,path:i,copyPath:u,rawContents:d,externalUrl:h,onOpenInEditor:C,onRefresh:k,isRefreshing:A,statusLabel:j,toggleKind:M,showLineOverflowToggle:N,lineOverflowMode:P,onLineOverflowModeChange:F,viewMode:ee,onViewModeChange:R}=e,z=D(`workspace.openPreferred`),{ref:ae,width:B}=ne(),V=s(),U=B>0?B<560:V,W=N||M!==null,K;t[0]===M?K=t[1]:(K=Ce(M),t[0]=M,t[1]=K);let q=K,J;t[2]!==u||t[3]!==i?(J=(0,G.jsx)(I,{path:i,copyPath:u}),t[2]=u,t[3]=i,t[4]=J):J=t[4];let Y;t[5]===j?Y=t[6]:(Y=j===null?null:(0,G.jsxs)(`span`,{className:c(`shrink-0 leading-5 text-muted-foreground`,O),children:[`(`,j,`)`]}),t[5]=j,t[6]=Y);let X;t[7]!==q||t[8]!==n||t[9]!==h||t[10]!==U||t[11]!==A||t[12]!==C||t[13]!==k||t[14]!==z||t[15]!==i||t[16]!==d?(X=U?null:(0,G.jsxs)(T,{delayDuration:300,children:[k?(0,G.jsxs)(a,{children:[(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`icon`,className:c($,`shrink-0 text-muted-foreground hover:bg-state-hover hover:text-foreground`),onClick:k,disabled:A,"aria-label":A?`Refreshing file`:`Refresh file`,children:(0,G.jsx)(o,{name:`RotateCcw`,"aria-hidden":!0})})}),(0,G.jsx)(g,{side:`bottom`,children:A?`Refreshing file`:`Refresh file`})]}):null,n===null?null:(0,G.jsxs)(a,{children:[(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`icon`,className:$,onClick:()=>void L(n),"aria-label":`Download`,children:(0,G.jsx)(o,{name:`Download`,"aria-hidden":!0})})}),(0,G.jsx)(g,{side:`bottom`,children:`Download`})]}),d===null?null:(0,G.jsxs)(a,{children:[(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(f,{text:d,label:q,className:c($,`shrink-0 rounded-md hover:bg-state-hover hover:text-foreground`)})}),(0,G.jsx)(g,{side:`bottom`,children:q})]}),h===null?null:(0,G.jsxs)(a,{children:[(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`icon`,className:c($,`shrink-0 text-muted-foreground hover:bg-state-hover hover:text-foreground`),onClick:()=>{v(be(h))},"aria-label":`Open in external browser`,children:(0,G.jsx)(o,{name:`Globe`,"aria-hidden":!0})})}),(0,G.jsx)(g,{side:`bottom`,children:`Open in external browser`})]}),C?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(a,{children:[(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(oe,{onClick:()=>C(i),className:$,label:z?`Open in editor (${z.label})`:`Open in editor`,"aria-keyshortcuts":z?.ariaKeyshortcuts})}),(0,G.jsx)(g,{side:`bottom`,children:z?`Open in editor (${z.label})`:`Open in editor`})]}),(0,G.jsx)(re,{shortcut:z})]}):null]}),t[7]=q,t[8]=n,t[9]=h,t[10]=U,t[11]=A,t[12]=C,t[13]=k,t[14]=z,t[15]=i,t[16]=d,t[17]=X):X=t[17];let Z;t[18]!==r||t[19]!==J||t[20]!==Y||t[21]!==X?(Z=(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[r,J,Y,X]}),t[18]=r,t[19]=J,t[20]=Y,t[21]=X,t[22]=Z):Z=t[22];let Q;t[23]!==q||t[24]!==u||t[25]!==n||t[26]!==h||t[27]!==U||t[28]!==A||t[29]!==P||t[30]!==F||t[31]!==C||t[32]!==k||t[33]!==R||t[34]!==i||t[35]!==d||t[36]!==W||t[37]!==N||t[38]!==M||t[39]!==ee?(Q=W||U?(0,G.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[(0,G.jsx)(Pe,{showLineOverflowToggle:N&&!U,lineOverflowMode:P,onLineOverflowModeChange:F}),M===null?null:(0,G.jsxs)(`div`,{className:`inline-flex shrink-0 items-center gap-0.5 rounded-md border border-border p-0.5`,role:`tablist`,"aria-label":Se(M),children:[(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`sm`,className:c(ve,O),onClick:()=>R(`preview`),"aria-pressed":ee===`preview`,children:`Preview`}),(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`sm`,className:c(ve,O),onClick:()=>R(`source`),"aria-pressed":ee===`source`,children:`Raw`})]}),U?(0,G.jsxs)(p,{modal:!1,children:[(0,G.jsx)(_,{asChild:!0,children:(0,G.jsx)(y,{variant:`ghost`,size:`icon`,className:c($,`shrink-0 max-md:pointer-coarse:size-10`),"aria-label":`File actions`,children:(0,G.jsx)(o,{name:`MoreHorizontal`,"aria-hidden":!0})})}),(0,G.jsxs)(w,{align:`end`,mobileTitle:`File actions`,className:`max-md:pointer-coarse:[&_[role=menuitem]]:min-h-11 max-md:pointer-coarse:[&_[role=menuitem]]:text-sm max-md:pointer-coarse:[&_[role=menuitemcheckbox]]:min-h-11 max-md:pointer-coarse:[&_[role=menuitemcheckbox]]:text-sm`,children:[(0,G.jsx)(E,{className:`max-w-80 break-all font-mono`,children:i}),(0,G.jsx)(m,{}),(0,G.jsxs)(b,{onSelect:()=>{l(u??i,{successMessage:`File path copied`,errorMessage:`Failed to copy file path`})},children:[(0,G.jsx)(o,{name:`Copy`,"aria-hidden":!0}),` Copy file path`]}),d===null?null:(0,G.jsxs)(b,{onSelect:()=>{l(d,{successMessage:`Copied to clipboard`,errorMessage:`Failed to copy file contents`})},children:[(0,G.jsx)(o,{name:`Copy`,"aria-hidden":!0}),` `,q]}),n===null?null:(0,G.jsxs)(b,{onSelect:()=>void L(n),children:[(0,G.jsx)(o,{name:`Download`,"aria-hidden":!0}),` Download`]}),k?(0,G.jsxs)(b,{disabled:A,onSelect:k,children:[(0,G.jsx)(o,{name:`RotateCcw`,"aria-hidden":!0}),` `,A?`Refreshing file`:`Refresh file`]}):null,h===null?null:(0,G.jsxs)(b,{onSelect:()=>v(be(h)),children:[(0,G.jsx)(o,{name:`Globe`,"aria-hidden":!0}),` Open in external browser`]}),C?(0,G.jsxs)(b,{onSelect:()=>C(i),children:[(0,G.jsx)(o,{name:`ExternalLink`,"aria-hidden":!0}),` Open in editor`]}):null,N?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(m,{}),(0,G.jsxs)(S,{className:`gap-2 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0`,checked:P===`wrap`,onCheckedChange:e=>F(e?`wrap`:`scroll`),children:[(0,G.jsx)(o,{name:`TextWrap`,"aria-hidden":!0}),ie]})]}):null]})]}):null]}):null,t[23]=q,t[24]=u,t[25]=n,t[26]=h,t[27]=U,t[28]=A,t[29]=P,t[30]=F,t[31]=C,t[32]=k,t[33]=R,t[34]=i,t[35]=d,t[36]=W,t[37]=N,t[38]=M,t[39]=ee,t[40]=Q):Q=t[40];let se;return t[41]!==ae||t[42]!==Z||t[43]!==Q?(se=(0,G.jsxs)(te,{headerRef:ae,children:[Z,Q]}),t[41]=ae,t[42]=Z,t[43]=Q,t[44]=se):se=t[44],se}function Pe(e){let t=(0,H.c)(11),{showLineOverflowToggle:n,lineOverflowMode:r,onLineOverflowModeChange:i}=e;if(!n)return null;let s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=c($,`text-muted-foreground`),t[0]=s):s=t[0];let l=r===`wrap`,u;t[1]!==r||t[2]!==i?(u=()=>{i(r===`wrap`?`scroll`:`wrap`)},t[1]=r,t[2]=i,t[3]=u):u=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,G.jsx)(o,{name:`TextWrap`}),t[4]=d):d=t[4];let f;t[5]!==l||t[6]!==u?(f=(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`icon`,className:s,"aria-label":ie,"aria-pressed":l,onClick:u,children:d})}),t[5]=l,t[6]=u,t[7]=f):f=t[7];let p;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,G.jsx)(g,{side:`bottom`,children:ie}),t[8]=p):p=t[8];let m;return t[9]===f?m=t[10]:(m=(0,G.jsx)(T,{delayDuration:300,children:(0,G.jsxs)(a,{children:[f,p]})}),t[9]=f,t[10]=m),m}function Fe(e){let t=(0,H.c)(16),{iframePreview:n,lineOverflowMode:r,onSelectionAddToChat:i,state:a,viewMode:o}=e,s=o===`preview`,c=s?`contents`:`hidden`,l=s?void 0:!0,u;t[0]!==n||t[1]!==c||t[2]!==l?(u=(0,G.jsx)(`div`,{className:c,"aria-hidden":l,children:n}),t[0]=n,t[1]=c,t[2]=l,t[3]=u):u=t[3];let d=s?`hidden`:`contents`,f=s?!0:void 0,p;t[4]!==r||t[5]!==i||t[6]!==a.file||t[7]!==a.lineRange?(p=(0,G.jsx)(We,{file:a.file,lineOverflowMode:r,lineRange:a.lineRange,onSelectionAddToChat:i,path:a.file.name}),t[4]=r,t[5]=i,t[6]=a.file,t[7]=a.lineRange,t[8]=p):p=t[8];let m;t[9]!==d||t[10]!==f||t[11]!==p?(m=(0,G.jsx)(`div`,{className:d,"aria-hidden":f,children:p}),t[9]=d,t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;return t[13]!==u||t[14]!==m?(h=(0,G.jsxs)(G.Fragment,{children:[u,m]}),t[13]=u,t[14]=m,t[15]=h):h=t[15],h}function Ie(e){let t=(0,H.c)(12),{file:n,onSelectionAddToChat:r,markdownLinkRouting:i}=e,a=(0,U.useRef)(null),o=(0,U.useContext)(W),s;t[0]===o?s=t[1]:(s=()=>{let e=a.current?.closest(`[data-file-preview-scroll-container]`);if(!e||!o)return;e.scrollTop=o.scrollTop;let t=()=>{o.scrollTop=e.scrollTop};return e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)},t[0]=o,t[1]=s);let c;t[2]!==n.contents||t[3]!==n.name||t[4]!==o?(c=[o,n.name,n.contents],t[2]=n.contents,t[3]=n.name,t[4]=o,t[5]=c):c=t[5],(0,U.useLayoutEffect)(s,c);let l;t[6]!==n.contents||t[7]!==i?(l=(0,G.jsx)(`div`,{ref:a,className:`flex-auto bg-background px-4 py-4`,children:(0,G.jsx)(B,{allowHtml:!0,content:n.contents,linkRouting:i})}),t[6]=n.contents,t[7]=i,t[8]=l):l=t[8];let u;return t[9]!==r||t[10]!==l?(u=(0,G.jsx)(X,{markdown:!0,onSelectionAddToChat:r,children:l}),t[9]=r,t[10]=l,t[11]=u):u=t[11],u}function Le({file:e,onSelectionAddToChat:t}){let n=(0,U.useMemo)(()=>ke(e.contents),[e.contents]),r=n.rows[0]??[],i=n.rows.slice(1),a=Array.from({length:n.columnCount},(e,t)=>({index:t,label:r[t]??``})),o=`max(100%, ${3+a.length*18}rem)`,s=Ae(n,i.length),c=(0,U.useRef)(null),l=F({count:i.length,getScrollElement:()=>c.current,estimateSize:()=>me,overscan:he}),u=l.getVirtualItems(),d=l.getTotalSize(),f=u[0],p=u[u.length-1],m=f?.start??0,h=p===void 0?d:d-p.end;return(0,G.jsx)(X,{onSelectionAddToChat:t,children:(0,G.jsxs)(`div`,{className:`flex min-h-0 flex-auto flex-col bg-surface-raised px-4 py-4`,children:[(0,G.jsx)(`div`,{ref:c,className:`persistent-scrollbar min-h-0 overflow-auto overscroll-contain rounded-md border border-border bg-background`,children:(0,G.jsxs)(`table`,{className:`min-w-full table-fixed border-separate border-spacing-0 font-mono text-xs leading-5`,"aria-label":`${e.name} CSV preview`,style:{width:o},children:[(0,G.jsxs)(`colgroup`,{children:[(0,G.jsx)(`col`,{className:`w-12`}),a.map(e=>(0,G.jsx)(`col`,{className:`w-72`},e.index))]}),(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{scope:`col`,className:`sticky left-0 top-0 z-30 w-12 min-w-12 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-right font-medium text-muted-foreground`,children:`#`}),a.map(e=>(0,G.jsx)(`th`,{scope:`col`,className:`sticky top-0 z-20 w-72 max-w-72 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-left font-medium text-foreground`,title:e.label,children:(0,G.jsx)(`span`,{className:`block max-w-full truncate`,children:e.label||`Column ${e.index+1}`})},e.index))]})}),(0,G.jsxs)(`tbody`,{children:[m>0?(0,G.jsx)(`tr`,{"aria-hidden":!0,style:{height:m},children:(0,G.jsx)(`td`,{colSpan:a.length+1,className:`p-0`})}):null,u.map(e=>{let t=e.index,n=i[t]??[];return(0,G.jsxs)(`tr`,{"data-index":t,ref:l.measureElement,children:[(0,G.jsx)(`th`,{scope:`row`,className:`sticky left-0 z-10 w-12 min-w-12 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-right font-medium text-muted-foreground`,children:t+2}),a.map(e=>{let t=n[e.index]??``;return(0,G.jsx)(`td`,{className:`w-72 max-w-72 overflow-hidden border-b border-r border-border px-2 py-1 align-top text-foreground`,title:t,children:(0,G.jsx)(`span`,{className:`block max-w-full truncate`,children:t})},e.index)})]},e.key)}),h>0?(0,G.jsx)(`tr`,{"aria-hidden":!0,style:{height:h},children:(0,G.jsx)(`td`,{colSpan:a.length+1,className:`p-0`})}):null]})]})}),s===null?null:(0,G.jsx)(`p`,{className:`mt-2 shrink-0 text-xs leading-5 text-muted-foreground`,children:s})]})})}function Re(e){let t=(0,H.c)(24),{url:n,alt:r}=e,[i,a]=(0,U.useState)(!1),o=ue(),s,c;t[0]!==r||t[1]!==o||t[2]!==n?(s=()=>{o?.isOpen&&o.update({alt:r,src:n})},c=[r,o,n],t[0]=r,t[1]=o,t[2]=n,t[3]=s,t[4]=c):(s=t[3],c=t[4]),(0,U.useLayoutEffect)(s,c);let l=`Open ${r} in full screen preview`,u;t[5]!==r||t[6]!==o||t[7]!==n?(u=()=>{if(o){o.open({alt:r,src:n});return}a(!0)},t[5]=r,t[6]=o,t[7]=n,t[8]=u):u=t[8];let d;t[9]!==r||t[10]!==n?(d=(0,G.jsx)(`img`,{src:n,alt:r,className:`mx-auto block h-auto max-w-full`}),t[9]=r,t[10]=n,t[11]=d):d=t[11];let f;t[12]!==l||t[13]!==u||t[14]!==d?(f=(0,G.jsx)(`button`,{type:`button`,className:`block w-full cursor-zoom-in`,"aria-label":l,onClick:u,children:d}),t[12]=l,t[13]=u,t[14]=d,t[15]=f):f=t[15];let p;t[16]!==r||t[17]!==o||t[18]!==i||t[19]!==n?(p=o===null?(0,G.jsx)(R,{title:r,imageSrc:i?n:null,imageAlt:r,onClose:()=>a(!1)}):null,t[16]=r,t[17]=o,t[18]=i,t[19]=n,t[20]=p):p=t[20];let m;return t[21]!==f||t[22]!==p?(m=(0,G.jsxs)(`div`,{className:`pt-4`,children:[f,p]}),t[21]=f,t[22]=p,t[23]=m):m=t[23],m}function ze(e){let t=(0,H.c)(3),{url:n,title:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,G.jsx)(`div`,{className:`pt-4`,children:(0,G.jsx)(`video`,{src:n,title:r,className:`block max-h-[34rem] w-full bg-black`,controls:!0,preload:`metadata`})}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function Be(e){let t=(0,H.c)(14),{loading:n}=e,[r,i]=(0,U.useState)(!1),a,s;t[0]===n?(a=t[1],s=t[2]):(a=()=>{if(!n){i(!1);return}let e=window.setTimeout(()=>i(!0),_e);return()=>window.clearTimeout(e)},s=[n],t[0]=n,t[1]=a,t[2]=s),(0,U.useEffect)(a,s);let l=n&&r,u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=c(`flex items-center justify-center text-subtle-foreground`,h),t[3]=u):u=t[3];let d=l?`Spinner`:`File`,f=l&&`animate-spin motion-reduce:animate-none`,p;t[4]===f?p=t[5]:(p=c(`size-full`,f),t[4]=f,t[5]=p);let m;t[6]!==d||t[7]!==p?(m=(0,G.jsx)(o,{name:d,className:p,"aria-hidden":!0}),t[6]=d,t[7]=p,t[8]=m):m=t[8];let g;t[9]===l?g=t[10]:(g=l?(0,G.jsx)(`span`,{role:`status`,className:`sr-only`,children:`Loading preview…`}):null,t[9]=l,t[10]=g);let _;return t[11]!==m||t[12]!==g?(_=(0,G.jsxs)(`span`,{className:u,children:[m,g]}),t[11]=m,t[12]=g,t[13]=_):_=t[13],_}function Ve(e){let t=(0,H.c)(10),{sandbox:n,title:r,url:i,loadState:a,onLoadStateChange:o}=e;if(a===`error`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,G.jsx)(Ue,{message:`Failed to load HTML preview.`,role:`alert`})}),t[0]=e):e=t[0],e}let s,c;t[1]===o?(s=t[2],c=t[3]):(s=()=>o(`loaded`),c=()=>o(`error`),t[1]=o,t[2]=s,t[3]=c);let l;return t[4]!==n||t[5]!==s||t[6]!==c||t[7]!==r||t[8]!==i?(l=(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,G.jsx)(`iframe`,{title:r,src:i,sandbox:n,style:ge,onLoad:s,onError:c})}),t[4]=n,t[5]=s,t[6]=c,t[7]=r,t[8]=i,t[9]=l):l=t[9],l}function He(e){let t=(0,H.c)(24),{file:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-lg bg-surface-raised text-muted-foreground`,children:(0,G.jsx)(o,{name:`File`,className:`size-6`,"aria-hidden":!0})}),t[0]=r):r=t[0];let i;t[1]===n.name?i=t[2]:(i=(0,G.jsx)(`p`,{className:`truncate text-sm font-medium text-foreground`,children:n.name}),t[1]=n.name,t[2]=i);let a=n.mimeType,s;t[3]===n.sizeBytes?s=t[4]:(s=u(n.sizeBytes),t[3]=n.sizeBytes,t[4]=s);let c=`${a} · ${s}`,l;t[5]===c?l=t[6]:(l=(0,G.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c}),t[5]=c,t[6]=l);let d;t[7]!==i||t[8]!==l?(d=(0,G.jsxs)(`div`,{className:`flex max-w-full min-w-0 flex-col gap-1`,children:[i,l]}),t[7]=i,t[8]=l,t[9]=d):d=t[9];let f=n.reason===`too-large`?`This file is too large to preview.`:`This file type can't be previewed.`,p;t[10]===f?p=t[11]:(p=(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f}),t[10]=f,t[11]=p);let m;t[12]!==n.name||t[13]!==n.url?(m=e=>{e.preventDefault(),L({url:n.url,fileName:n.name})},t[12]=n.name,t[13]=n.url,t[14]=m):m=t[14];let h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,G.jsx)(o,{name:`Download`,"aria-hidden":!0}),t[15]=h):h=t[15];let g;t[16]!==n.name||t[17]!==n.url||t[18]!==m?(g=(0,G.jsx)(y,{asChild:!0,variant:`outline`,size:`sm`,children:(0,G.jsxs)(`a`,{href:n.url,download:n.name,onClick:m,children:[h,`Download`]})}),t[16]=n.name,t[17]=n.url,t[18]=m,t[19]=g):g=t[19];let _;return t[20]!==g||t[21]!==d||t[22]!==p?(_=(0,G.jsxs)(`div`,{className:`flex flex-col items-center gap-4 px-6 py-12 text-center`,children:[r,d,p,g]}),t[20]=g,t[21]=d,t[22]=p,t[23]=_):_=t[23],_}function Ue(e){let t=(0,H.c)(3),{message:n,role:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,G.jsx)(C,{role:r,className:`mx-4 mt-4 rounded-lg`,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function We(e){let t=(0,H.c)(9),{file:n,lineOverflowMode:r,lineRange:i,onSelectionAddToChat:a,path:o}=e,s;t[0]===i?s=t[1]:(s=i===null?null:{start:i.startLineNumber,end:i.endLineNumber},t[0]=i,t[1]=s);let c=s,l=n.cacheKey??n.name,u;return t[2]!==n.contents||t[3]!==c||t[4]!==r||t[5]!==a||t[6]!==o||t[7]!==l?(u=(0,G.jsx)(V,{content:n.contents,path:o,cacheKey:l,overflow:r,highlightedLines:c,scrollToHighlightedLines:!0,onSelectionAddToChat:a}),t[2]=n.contents,t[3]=c,t[4]=r,t[5]=a,t[6]=o,t[7]=l,t[8]=u):u=t[8],u}export{W as i,de as n,ce as r,je as t};
3
+ `&&(c+=1),n.length>=t)return{rows:n,truncatedRows:c+1<e.length};continue}i+=l}return(i.length>0||r.length>0||o||!s)&&(r.push(i),n.push(r)),{rows:n,truncatedRows:!1}}function ke(e){let{rows:t,truncatedRows:n}=Oe(e,pe+1),r=t.reduce((e,t)=>Math.max(e,t.length),0);return{columnCount:Math.min(r,fe),rows:t,truncatedColumns:r>fe,truncatedRows:n}}function Ae(e,t){let n=[];return e.truncatedRows&&n.push(`${t.toLocaleString()} rows`),e.truncatedColumns&&n.push(`${e.columnCount.toLocaleString()} columns`),n.length===0?null:`Showing the first ${n.join(` and `)}.`}function je(e){let t=(0,H.c)(61),{download:n,state:r,path:i,copyPath:a,headerMode:o,onSelectionAddToChat:s,onOpenInEditor:c,onRefresh:l,isRefreshing:d,markdownLinkRouting:f,statusLabel:p}=e,m=n===void 0?null:n,h=a===void 0?null:a,g=o===void 0?`file`:o,_=d===void 0?!1:d,v=p===void 0?null:p,y=r.kind===`html`?r.iframe:null,b;t[0]!==y?.url||t[1]!==r.file||t[2]!==r.kind?(b=JSON.stringify([r.kind,y?.url,r.kind===`html`?r.file.cacheKey:null]),t[0]=y?.url,t[1]=r.file,t[2]=r.kind,t[3]=b):b=t[3];let x=b,S;t[4]===x?S=t[5]:(S={key:x,status:`loading`},t[4]=x,t[5]=S);let[C,w]=(0,U.useState)(S);C.key!==x&&w({key:x,status:`loading`});let T=C.key===x?C.status:`loading`,E;t[6]!==x||t[7]!==T||t[8]!==y?(E=y===null?null:(0,G.jsx)(Ve,{...y,loadState:T,onLoadStateChange:e=>w(t=>t.key===x?{key:x,status:e}:t)},x),t[6]=x,t[7]=T,t[8]=y,t[9]=E):E=t[9];let D=E,O,k,A,j,M,N;t[10]===r?(O=t[11],k=t[12],A=t[13],j=t[14],M=t[15],N=t[16]):(N=xe(r),k=we(r),A=Te(r),O=ye(r),M=U.useState,j=Ee({lineRange:k,toggleKind:N}),t[10]=r,t[11]=O,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N);let[P,F]=M(j),[I,te]=(0,U.useState)(ae),ne;t[17]!==k||t[18]!==N?(ne=()=>{F(Ee({lineRange:k,toggleKind:N}))},t[17]=k,t[18]=N,t[19]=ne):ne=t[19];let L;t[20]!==k||t[21]!==i||t[22]!==N?(L=[k,i,N],t[20]=k,t[21]=i,t[22]=N,t[23]=L):L=t[23],(0,U.useEffect)(ne,L);let re=r.kind===`html`&&P===`preview`,R=N===null?`preview`:P,z;t[24]!==R||t[25]!==r?(z=De(r,R),t[24]=R,t[25]=r,t[26]=z):z=t[26];let ie=z,B=ie,V=r.kind===`ready`&&r.textPreviewKind===`markdown`&&R===`preview`,oe=r.kind===`ready`&&r.textPreviewKind===`csv`&&R===`preview`,W=re||oe||ie||V,K;t[27]!==W||t[28]!==V?(K=W?u(`@container/page flex h-full min-h-0 flex-col`,V&&`overflow-y-auto`):`@container/page min-h-full`,t[27]=W,t[28]=V,t[29]=K):K=t[29];let q=V?``:void 0,J;t[30]!==h||t[31]!==m||t[32]!==O||t[33]!==g||t[34]!==T||t[35]!==_||t[36]!==I||t[37]!==c||t[38]!==l||t[39]!==i||t[40]!==A||t[41]!==B||t[42]!==r.kind||t[43]!==v||t[44]!==N||t[45]!==re||t[46]!==P?(J=g===`file`?(0,G.jsx)(Ne,{download:m,previewIcon:(0,G.jsx)(Be,{loading:r.kind===`loading`||_||re&&T===`loading`},i),path:i,copyPath:h,rawContents:A,externalUrl:O,onOpenInEditor:c,onRefresh:l,isRefreshing:_,statusLabel:v,toggleKind:N,showLineOverflowToggle:B,lineOverflowMode:I,onLineOverflowModeChange:te,viewMode:P,onViewModeChange:F}):null,t[30]=h,t[31]=m,t[32]=O,t[33]=g,t[34]=T,t[35]=_,t[36]=I,t[37]=c,t[38]=l,t[39]=i,t[40]=A,t[41]=B,t[42]=r.kind,t[43]=v,t[44]=N,t[45]=re,t[46]=P,t[47]=J):J=t[47];let Y;t[48]!==R||t[49]!==D||t[50]!==I||t[51]!==f||t[52]!==s||t[53]!==i||t[54]!==r?(Y=(0,G.jsx)(Me,{iframePreview:D,state:r,path:i,lineOverflowMode:I,viewMode:R,markdownLinkRouting:f,onSelectionAddToChat:s}),t[48]=R,t[49]=D,t[50]=I,t[51]=f,t[52]=s,t[53]=i,t[54]=r,t[55]=Y):Y=t[55];let X;return t[56]!==K||t[57]!==q||t[58]!==J||t[59]!==Y?(X=(0,G.jsxs)(`div`,{className:K,"data-file-preview-scroll-container":q,style:ee,children:[J,Y]}),t[56]=K,t[57]=q,t[58]=J,t[59]=Y,t[60]=X):X=t[60],X}function Me(e){let t=(0,H.c)(32),{iframePreview:n,state:r,path:i,lineOverflowMode:a,viewMode:o,markdownLinkRouting:s,onSelectionAddToChat:c}=e;if(r.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(k,{}),t[0]=e):e=t[0],e}if(r.kind===`empty`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ue,{message:`Empty file.`}),t[1]=e):e=t[1],e}if(r.kind===`not-found`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ue,{message:`File not found.`,role:`alert`}),t[2]=e):e=t[2],e}if(r.kind===`error`){let e=r.message??`Failed to load file`,n;return t[3]===e?n=t[4]:(n=(0,G.jsx)(Ue,{message:e,role:`alert`}),t[3]=e,t[4]=n),n}if(r.kind===`unsupported`){let e;return t[5]===r.file?e=t[6]:(e=(0,G.jsx)(He,{file:r.file}),t[5]=r.file,t[6]=e),e}if(r.kind===`image`){let e;return t[7]!==i||t[8]!==r.url?(e=(0,G.jsx)(Re,{url:r.url,alt:i}),t[7]=i,t[8]=r.url,t[9]=e):e=t[9],e}if(r.kind===`video`){let e;return t[10]!==i||t[11]!==r.url?(e=(0,G.jsx)(ze,{url:r.url,title:i}),t[10]=i,t[11]=r.url,t[12]=e):e=t[12],e}if(r.kind===`html`){let e;return t[13]!==n||t[14]!==a||t[15]!==c||t[16]!==r||t[17]!==o?(e=(0,G.jsx)(Fe,{iframePreview:n,lineOverflowMode:a,onSelectionAddToChat:c,state:r,viewMode:o}),t[13]=n,t[14]=a,t[15]=c,t[16]=r,t[17]=o,t[18]=e):e=t[18],e}if(r.textPreviewKind===`csv`&&o===`preview`){let e;return t[19]!==c||t[20]!==r.file?(e=(0,G.jsx)(Le,{file:r.file,onSelectionAddToChat:c}),t[19]=c,t[20]=r.file,t[21]=e):e=t[21],e}if(r.textPreviewKind===`markdown`&&o===`preview`){let e;return t[22]!==s||t[23]!==c||t[24]!==r.file?(e=(0,G.jsx)(Ie,{file:r.file,markdownLinkRouting:s,onSelectionAddToChat:c}),t[22]=s,t[23]=c,t[24]=r.file,t[25]=e):e=t[25],e}let l=r.lineRange??null,u;return t[26]!==a||t[27]!==c||t[28]!==i||t[29]!==r.file||t[30]!==l?(u=(0,G.jsx)(We,{file:r.file,lineOverflowMode:a,lineRange:l,onSelectionAddToChat:c,path:i}),t[26]=a,t[27]=c,t[28]=i,t[29]=r.file,t[30]=l,t[31]=u):u=t[31],u}function Ne(e){let t=(0,H.c)(45),{download:n,previewIcon:r,path:i,copyPath:c,rawContents:d,externalUrl:y,onOpenInEditor:x,onRefresh:k,isRefreshing:A,statusLabel:j,toggleKind:M,showLineOverflowToggle:N,lineOverflowMode:P,onLineOverflowModeChange:F,viewMode:ee,onViewModeChange:R}=e,z=C(`workspace.openPreferred`),{ref:ae,width:B}=ne(),V=o(),U=B>0?B<560:V,W=N||M!==null,K;t[0]===M?K=t[1]:(K=Ce(M),t[0]=M,t[1]=K);let q=K,J;t[2]!==c||t[3]!==i?(J=(0,G.jsx)(I,{path:i,copyPath:c}),t[2]=c,t[3]=i,t[4]=J):J=t[4];let Y;t[5]===j?Y=t[6]:(Y=j===null?null:(0,G.jsxs)(`span`,{className:u(`shrink-0 leading-5 text-muted-foreground`,s),children:[`(`,j,`)`]}),t[5]=j,t[6]=Y);let X;t[7]!==q||t[8]!==n||t[9]!==y||t[10]!==U||t[11]!==A||t[12]!==x||t[13]!==k||t[14]!==z||t[15]!==i||t[16]!==d?(X=U?null:(0,G.jsxs)(g,{delayDuration:300,children:[k?(0,G.jsxs)(b,{children:[(0,G.jsx)(f,{asChild:!0,children:(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`icon`,className:u($,`shrink-0 text-muted-foreground hover:bg-state-hover hover:text-foreground`),onClick:k,disabled:A,"aria-label":A?`Refreshing file`:`Refresh file`,children:(0,G.jsx)(a,{name:`RotateCcw`,"aria-hidden":!0})})}),(0,G.jsx)(w,{side:`bottom`,children:A?`Refreshing file`:`Refresh file`})]}):null,n===null?null:(0,G.jsxs)(b,{children:[(0,G.jsx)(f,{asChild:!0,children:(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`icon`,className:$,onClick:()=>void L(n),"aria-label":`Download`,children:(0,G.jsx)(a,{name:`Download`,"aria-hidden":!0})})}),(0,G.jsx)(w,{side:`bottom`,children:`Download`})]}),d===null?null:(0,G.jsxs)(b,{children:[(0,G.jsx)(f,{asChild:!0,children:(0,G.jsx)(m,{text:d,label:q,className:u($,`shrink-0 rounded-md hover:bg-state-hover hover:text-foreground`)})}),(0,G.jsx)(w,{side:`bottom`,children:q})]}),y===null?null:(0,G.jsxs)(b,{children:[(0,G.jsx)(f,{asChild:!0,children:(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`icon`,className:u($,`shrink-0 text-muted-foreground hover:bg-state-hover hover:text-foreground`),onClick:()=>{D(be(y))},"aria-label":`Open in external browser`,children:(0,G.jsx)(a,{name:`Globe`,"aria-hidden":!0})})}),(0,G.jsx)(w,{side:`bottom`,children:`Open in external browser`})]}),x?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(b,{children:[(0,G.jsx)(f,{asChild:!0,children:(0,G.jsx)(oe,{onClick:()=>x(i),className:$,label:z?`Open in editor (${z.label})`:`Open in editor`,"aria-keyshortcuts":z?.ariaKeyshortcuts})}),(0,G.jsx)(w,{side:`bottom`,children:z?`Open in editor (${z.label})`:`Open in editor`})]}),(0,G.jsx)(re,{shortcut:z})]}):null]}),t[7]=q,t[8]=n,t[9]=y,t[10]=U,t[11]=A,t[12]=x,t[13]=k,t[14]=z,t[15]=i,t[16]=d,t[17]=X):X=t[17];let Z;t[18]!==r||t[19]!==J||t[20]!==Y||t[21]!==X?(Z=(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[r,J,Y,X]}),t[18]=r,t[19]=J,t[20]=Y,t[21]=X,t[22]=Z):Z=t[22];let Q;t[23]!==q||t[24]!==c||t[25]!==n||t[26]!==y||t[27]!==U||t[28]!==A||t[29]!==P||t[30]!==F||t[31]!==x||t[32]!==k||t[33]!==R||t[34]!==i||t[35]!==d||t[36]!==W||t[37]!==N||t[38]!==M||t[39]!==ee?(Q=W||U?(0,G.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[(0,G.jsx)(Pe,{showLineOverflowToggle:N&&!U,lineOverflowMode:P,onLineOverflowModeChange:F}),M===null?null:(0,G.jsxs)(`div`,{className:`inline-flex shrink-0 items-center gap-0.5 rounded-md border border-border p-0.5`,role:`tablist`,"aria-label":Se(M),children:[(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`sm`,className:u(ve,s),onClick:()=>R(`preview`),"aria-pressed":ee===`preview`,children:`Preview`}),(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`sm`,className:u(ve,s),onClick:()=>R(`source`),"aria-pressed":ee===`source`,children:`Raw`})]}),U?(0,G.jsxs)(p,{modal:!1,children:[(0,G.jsx)(E,{asChild:!0,children:(0,G.jsx)(l,{variant:`ghost`,size:`icon`,className:u($,`shrink-0 max-md:pointer-coarse:size-10`),"aria-label":`File actions`,children:(0,G.jsx)(a,{name:`MoreHorizontal`,"aria-hidden":!0})})}),(0,G.jsxs)(T,{align:`end`,mobileTitle:`File actions`,className:`max-md:pointer-coarse:[&_[role=menuitem]]:min-h-11 max-md:pointer-coarse:[&_[role=menuitem]]:text-sm max-md:pointer-coarse:[&_[role=menuitemcheckbox]]:min-h-11 max-md:pointer-coarse:[&_[role=menuitemcheckbox]]:text-sm`,children:[(0,G.jsx)(S,{className:`max-w-80 break-all font-mono`,children:i}),(0,G.jsx)(v,{}),(0,G.jsxs)(h,{onSelect:()=>{O(c??i,{successMessage:`File path copied`,errorMessage:`Failed to copy file path`})},children:[(0,G.jsx)(a,{name:`Copy`,"aria-hidden":!0}),` Copy file path`]}),d===null?null:(0,G.jsxs)(h,{onSelect:()=>{O(d,{successMessage:`Copied to clipboard`,errorMessage:`Failed to copy file contents`})},children:[(0,G.jsx)(a,{name:`Copy`,"aria-hidden":!0}),` `,q]}),n===null?null:(0,G.jsxs)(h,{onSelect:()=>void L(n),children:[(0,G.jsx)(a,{name:`Download`,"aria-hidden":!0}),` Download`]}),k?(0,G.jsxs)(h,{disabled:A,onSelect:k,children:[(0,G.jsx)(a,{name:`RotateCcw`,"aria-hidden":!0}),` `,A?`Refreshing file`:`Refresh file`]}):null,y===null?null:(0,G.jsxs)(h,{onSelect:()=>D(be(y)),children:[(0,G.jsx)(a,{name:`Globe`,"aria-hidden":!0}),` Open in external browser`]}),x?(0,G.jsxs)(h,{onSelect:()=>x(i),children:[(0,G.jsx)(a,{name:`ExternalLink`,"aria-hidden":!0}),` Open in editor`]}):null,N?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(v,{}),(0,G.jsxs)(_,{className:`gap-2 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0`,checked:P===`wrap`,onCheckedChange:e=>F(e?`wrap`:`scroll`),children:[(0,G.jsx)(a,{name:`TextWrap`,"aria-hidden":!0}),ie]})]}):null]})]}):null]}):null,t[23]=q,t[24]=c,t[25]=n,t[26]=y,t[27]=U,t[28]=A,t[29]=P,t[30]=F,t[31]=x,t[32]=k,t[33]=R,t[34]=i,t[35]=d,t[36]=W,t[37]=N,t[38]=M,t[39]=ee,t[40]=Q):Q=t[40];let se;return t[41]!==ae||t[42]!==Z||t[43]!==Q?(se=(0,G.jsxs)(te,{headerRef:ae,children:[Z,Q]}),t[41]=ae,t[42]=Z,t[43]=Q,t[44]=se):se=t[44],se}function Pe(e){let t=(0,H.c)(11),{showLineOverflowToggle:n,lineOverflowMode:r,onLineOverflowModeChange:i}=e;if(!n)return null;let o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=u($,`text-muted-foreground`),t[0]=o):o=t[0];let s=r===`wrap`,c;t[1]!==r||t[2]!==i?(c=()=>{i(r===`wrap`?`scroll`:`wrap`)},t[1]=r,t[2]=i,t[3]=c):c=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,G.jsx)(a,{name:`TextWrap`}),t[4]=d):d=t[4];let p;t[5]!==s||t[6]!==c?(p=(0,G.jsx)(f,{asChild:!0,children:(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`icon`,className:o,"aria-label":ie,"aria-pressed":s,onClick:c,children:d})}),t[5]=s,t[6]=c,t[7]=p):p=t[7];let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,G.jsx)(w,{side:`bottom`,children:ie}),t[8]=m):m=t[8];let h;return t[9]===p?h=t[10]:(h=(0,G.jsx)(g,{delayDuration:300,children:(0,G.jsxs)(b,{children:[p,m]})}),t[9]=p,t[10]=h),h}function Fe(e){let t=(0,H.c)(16),{iframePreview:n,lineOverflowMode:r,onSelectionAddToChat:i,state:a,viewMode:o}=e,s=o===`preview`,c=s?`contents`:`hidden`,l=s?void 0:!0,u;t[0]!==n||t[1]!==c||t[2]!==l?(u=(0,G.jsx)(`div`,{className:c,"aria-hidden":l,children:n}),t[0]=n,t[1]=c,t[2]=l,t[3]=u):u=t[3];let d=s?`hidden`:`contents`,f=s?!0:void 0,p;t[4]!==r||t[5]!==i||t[6]!==a.file||t[7]!==a.lineRange?(p=(0,G.jsx)(We,{file:a.file,lineOverflowMode:r,lineRange:a.lineRange,onSelectionAddToChat:i,path:a.file.name}),t[4]=r,t[5]=i,t[6]=a.file,t[7]=a.lineRange,t[8]=p):p=t[8];let m;t[9]!==d||t[10]!==f||t[11]!==p?(m=(0,G.jsx)(`div`,{className:d,"aria-hidden":f,children:p}),t[9]=d,t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;return t[13]!==u||t[14]!==m?(h=(0,G.jsxs)(G.Fragment,{children:[u,m]}),t[13]=u,t[14]=m,t[15]=h):h=t[15],h}function Ie(e){let t=(0,H.c)(12),{file:n,onSelectionAddToChat:r,markdownLinkRouting:i}=e,a=(0,U.useRef)(null),o=(0,U.useContext)(W),s;t[0]===o?s=t[1]:(s=()=>{let e=a.current?.closest(`[data-file-preview-scroll-container]`);if(!e||!o)return;e.scrollTop=o.scrollTop;let t=()=>{o.scrollTop=e.scrollTop};return e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)},t[0]=o,t[1]=s);let c;t[2]!==n.contents||t[3]!==n.name||t[4]!==o?(c=[o,n.name,n.contents],t[2]=n.contents,t[3]=n.name,t[4]=o,t[5]=c):c=t[5],(0,U.useLayoutEffect)(s,c);let l;t[6]!==n.contents||t[7]!==i?(l=(0,G.jsx)(`div`,{ref:a,className:`flex-auto bg-background px-4 py-4`,children:(0,G.jsx)(B,{allowHtml:!0,content:n.contents,linkRouting:i})}),t[6]=n.contents,t[7]=i,t[8]=l):l=t[8];let u;return t[9]!==r||t[10]!==l?(u=(0,G.jsx)(X,{markdown:!0,onSelectionAddToChat:r,children:l}),t[9]=r,t[10]=l,t[11]=u):u=t[11],u}function Le({file:e,onSelectionAddToChat:t}){let n=(0,U.useMemo)(()=>ke(e.contents),[e.contents]),r=n.rows[0]??[],i=n.rows.slice(1),a=Array.from({length:n.columnCount},(e,t)=>({index:t,label:r[t]??``})),o=`max(100%, ${3+a.length*18}rem)`,s=Ae(n,i.length),c=(0,U.useRef)(null),l=F({count:i.length,getScrollElement:()=>c.current,estimateSize:()=>me,overscan:he}),u=l.getVirtualItems(),d=l.getTotalSize(),f=u[0],p=u[u.length-1],m=f?.start??0,h=p===void 0?d:d-p.end;return(0,G.jsx)(X,{onSelectionAddToChat:t,children:(0,G.jsxs)(`div`,{className:`flex min-h-0 flex-auto flex-col bg-surface-raised px-4 py-4`,children:[(0,G.jsx)(`div`,{ref:c,className:`persistent-scrollbar min-h-0 overflow-auto overscroll-contain rounded-md border border-border bg-background`,children:(0,G.jsxs)(`table`,{className:`min-w-full table-fixed border-separate border-spacing-0 font-mono text-xs leading-5`,"aria-label":`${e.name} CSV preview`,style:{width:o},children:[(0,G.jsxs)(`colgroup`,{children:[(0,G.jsx)(`col`,{className:`w-12`}),a.map(e=>(0,G.jsx)(`col`,{className:`w-72`},e.index))]}),(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{scope:`col`,className:`sticky left-0 top-0 z-30 w-12 min-w-12 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-right font-medium text-muted-foreground`,children:`#`}),a.map(e=>(0,G.jsx)(`th`,{scope:`col`,className:`sticky top-0 z-20 w-72 max-w-72 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-left font-medium text-foreground`,title:e.label,children:(0,G.jsx)(`span`,{className:`block max-w-full truncate`,children:e.label||`Column ${e.index+1}`})},e.index))]})}),(0,G.jsxs)(`tbody`,{children:[m>0?(0,G.jsx)(`tr`,{"aria-hidden":!0,style:{height:m},children:(0,G.jsx)(`td`,{colSpan:a.length+1,className:`p-0`})}):null,u.map(e=>{let t=e.index,n=i[t]??[];return(0,G.jsxs)(`tr`,{"data-index":t,ref:l.measureElement,children:[(0,G.jsx)(`th`,{scope:`row`,className:`sticky left-0 z-10 w-12 min-w-12 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-right font-medium text-muted-foreground`,children:t+2}),a.map(e=>{let t=n[e.index]??``;return(0,G.jsx)(`td`,{className:`w-72 max-w-72 overflow-hidden border-b border-r border-border px-2 py-1 align-top text-foreground`,title:t,children:(0,G.jsx)(`span`,{className:`block max-w-full truncate`,children:t})},e.index)})]},e.key)}),h>0?(0,G.jsx)(`tr`,{"aria-hidden":!0,style:{height:h},children:(0,G.jsx)(`td`,{colSpan:a.length+1,className:`p-0`})}):null]})]})}),s===null?null:(0,G.jsx)(`p`,{className:`mt-2 shrink-0 text-xs leading-5 text-muted-foreground`,children:s})]})})}function Re(e){let t=(0,H.c)(24),{url:n,alt:r}=e,[i,a]=(0,U.useState)(!1),o=ue(),s,c;t[0]!==r||t[1]!==o||t[2]!==n?(s=()=>{o?.isOpen&&o.update({alt:r,src:n})},c=[r,o,n],t[0]=r,t[1]=o,t[2]=n,t[3]=s,t[4]=c):(s=t[3],c=t[4]),(0,U.useLayoutEffect)(s,c);let l=`Open ${r} in full screen preview`,u;t[5]!==r||t[6]!==o||t[7]!==n?(u=()=>{if(o){o.open({alt:r,src:n});return}a(!0)},t[5]=r,t[6]=o,t[7]=n,t[8]=u):u=t[8];let d;t[9]!==r||t[10]!==n?(d=(0,G.jsx)(`img`,{src:n,alt:r,className:`mx-auto block h-auto max-w-full`}),t[9]=r,t[10]=n,t[11]=d):d=t[11];let f;t[12]!==l||t[13]!==u||t[14]!==d?(f=(0,G.jsx)(`button`,{type:`button`,className:`block w-full cursor-zoom-in`,"aria-label":l,onClick:u,children:d}),t[12]=l,t[13]=u,t[14]=d,t[15]=f):f=t[15];let p;t[16]!==r||t[17]!==o||t[18]!==i||t[19]!==n?(p=o===null?(0,G.jsx)(R,{title:r,imageSrc:i?n:null,imageAlt:r,onClose:()=>a(!1)}):null,t[16]=r,t[17]=o,t[18]=i,t[19]=n,t[20]=p):p=t[20];let m;return t[21]!==f||t[22]!==p?(m=(0,G.jsxs)(`div`,{className:`pt-4`,children:[f,p]}),t[21]=f,t[22]=p,t[23]=m):m=t[23],m}function ze(e){let t=(0,H.c)(3),{url:n,title:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,G.jsx)(`div`,{className:`pt-4`,children:(0,G.jsx)(`video`,{src:n,title:r,className:`block max-h-[34rem] w-full bg-black`,controls:!0,preload:`metadata`})}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function Be(e){let t=(0,H.c)(14),{loading:n}=e,[r,i]=(0,U.useState)(!1),o,s;t[0]===n?(o=t[1],s=t[2]):(o=()=>{if(!n){i(!1);return}let e=window.setTimeout(()=>i(!0),_e);return()=>window.clearTimeout(e)},s=[n],t[0]=n,t[1]=o,t[2]=s),(0,U.useEffect)(o,s);let c=n&&r,l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=u(`flex items-center justify-center text-subtle-foreground`,y),t[3]=l):l=t[3];let d=c?`Spinner`:`File`,f=c&&`animate-spin motion-reduce:animate-none`,p;t[4]===f?p=t[5]:(p=u(`size-full`,f),t[4]=f,t[5]=p);let m;t[6]!==d||t[7]!==p?(m=(0,G.jsx)(a,{name:d,className:p,"aria-hidden":!0}),t[6]=d,t[7]=p,t[8]=m):m=t[8];let h;t[9]===c?h=t[10]:(h=c?(0,G.jsx)(`span`,{role:`status`,className:`sr-only`,children:`Loading preview…`}):null,t[9]=c,t[10]=h);let g;return t[11]!==m||t[12]!==h?(g=(0,G.jsxs)(`span`,{className:l,children:[m,h]}),t[11]=m,t[12]=h,t[13]=g):g=t[13],g}function Ve(e){let t=(0,H.c)(10),{sandbox:n,title:r,url:i,loadState:a,onLoadStateChange:o}=e;if(a===`error`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,G.jsx)(Ue,{message:`Failed to load HTML preview.`,role:`alert`})}),t[0]=e):e=t[0],e}let s,c;t[1]===o?(s=t[2],c=t[3]):(s=()=>o(`loaded`),c=()=>o(`error`),t[1]=o,t[2]=s,t[3]=c);let l;return t[4]!==n||t[5]!==s||t[6]!==c||t[7]!==r||t[8]!==i?(l=(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,G.jsx)(`iframe`,{title:r,src:i,sandbox:n,style:ge,onLoad:s,onError:c})}),t[4]=n,t[5]=s,t[6]=c,t[7]=r,t[8]=i,t[9]=l):l=t[9],l}function He(e){let t=(0,H.c)(24),{file:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-lg bg-surface-raised text-muted-foreground`,children:(0,G.jsx)(a,{name:`File`,className:`size-6`,"aria-hidden":!0})}),t[0]=r):r=t[0];let i;t[1]===n.name?i=t[2]:(i=(0,G.jsx)(`p`,{className:`truncate text-sm font-medium text-foreground`,children:n.name}),t[1]=n.name,t[2]=i);let o=n.mimeType,s;t[3]===n.sizeBytes?s=t[4]:(s=c(n.sizeBytes),t[3]=n.sizeBytes,t[4]=s);let u=`${o} · ${s}`,d;t[5]===u?d=t[6]:(d=(0,G.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:u}),t[5]=u,t[6]=d);let f;t[7]!==i||t[8]!==d?(f=(0,G.jsxs)(`div`,{className:`flex max-w-full min-w-0 flex-col gap-1`,children:[i,d]}),t[7]=i,t[8]=d,t[9]=f):f=t[9];let p=n.reason===`too-large`?`This file is too large to preview.`:`This file type can't be previewed.`,m;t[10]===p?m=t[11]:(m=(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:p}),t[10]=p,t[11]=m);let h;t[12]!==n.name||t[13]!==n.url?(h=e=>{e.preventDefault(),L({url:n.url,fileName:n.name})},t[12]=n.name,t[13]=n.url,t[14]=h):h=t[14];let g;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,G.jsx)(a,{name:`Download`,"aria-hidden":!0}),t[15]=g):g=t[15];let _;t[16]!==n.name||t[17]!==n.url||t[18]!==h?(_=(0,G.jsx)(l,{asChild:!0,variant:`outline`,size:`sm`,children:(0,G.jsxs)(`a`,{href:n.url,download:n.name,onClick:h,children:[g,`Download`]})}),t[16]=n.name,t[17]=n.url,t[18]=h,t[19]=_):_=t[19];let v;return t[20]!==_||t[21]!==f||t[22]!==m?(v=(0,G.jsxs)(`div`,{className:`flex flex-col items-center gap-4 px-6 py-12 text-center`,children:[r,f,m,_]}),t[20]=_,t[21]=f,t[22]=m,t[23]=v):v=t[23],v}function Ue(e){let t=(0,H.c)(3),{message:n,role:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,G.jsx)(x,{role:r,className:`mx-4 mt-4 rounded-lg`,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function We(e){let t=(0,H.c)(9),{file:n,lineOverflowMode:r,lineRange:i,onSelectionAddToChat:a,path:o}=e,s;t[0]===i?s=t[1]:(s=i===null?null:{start:i.startLineNumber,end:i.endLineNumber},t[0]=i,t[1]=s);let c=s,l=n.cacheKey??n.name,u;return t[2]!==n.contents||t[3]!==c||t[4]!==r||t[5]!==a||t[6]!==o||t[7]!==l?(u=(0,G.jsx)(V,{content:n.contents,path:o,cacheKey:l,overflow:r,highlightedLines:c,scrollToHighlightedLines:!0,onSelectionAddToChat:a}),t[2]=n.contents,t[3]=c,t[4]=r,t[5]=a,t[6]=o,t[7]=l,t[8]=u):u=t[8],u}export{W as i,de as n,ce as r,je as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dh as i,Fh as a,Pn as o,Sc as s,Zt as c,jh as l}from"./index-DCps_qBD.js";import{t as u}from"./code-loading-skeletons-CkiXPS0M.js";import{f as d,l as f,o as p,u as m}from"./git-diff-patch-text-SHpUxhZL.js";import{t as h}from"./truncate-start-Ck1IPV62.js";import{n as g,r as _,t as v}from"./image-lightbox-DhNslR-8.js";import{a as y}from"./absolute-file-path-BxWHDkiV.js";import{n as b}from"./diff-stats-tally-DQHS3tHN.js";import{t as x}from"./open-in-editor-button-tA10Nkqn.js";import{n as S,t as C}from"./file-path-link-D7DFjBWZ.js";import{t as w}from"./DiffHost-xesYsZUt.js";var T=n(),E=e(t(),1),D=e(r(),1),O={contain:`layout paint style`,contentVisibility:`auto`,containIntrinsicSize:`0 600px`};function k(e){return e===`modified`||e===`renamed`||e===`copied`}function ee(e){if(typeof window.requestIdleCallback==`function`){let t=window.requestIdleCallback(e,{timeout:2e3});return()=>window.cancelIdleCallback(t)}let t=window.setTimeout(e,200);return()=>window.clearTimeout(t)}function A(e,t,n){let r=d(e.name)??e.name,i=d(e.prevName)??r,a=t===`added`?{kind:`empty`,path:r}:{kind:`request`,path:t===`renamed`?i:r,side:`old`},o=t===`deleted`?{kind:`empty`,path:r}:{kind:`request`,path:r,side:`new`},s=e.hunks.map(e=>`${e.hunkSpecs??``}:${e.additionStart}:${e.additionCount}:${e.deletionStart}:${e.deletionCount}`).join(`|`);return{identity:[t,j(a),j(o),s,n??``,e.deletionLines.join(``),e.additionLines.join(``)].join(`:`),old:a,new:o}}function j(e){return e.kind===`empty`?`empty:${e.path}`:`request:${e.side}:${e.path}`}function te(e,t){return e.kind===`empty`?Promise.resolve({kind:`text`,file:{name:e.path,contents:``}}):t(e.path,e.side)}function M(e,t){return{old:{path:e.name,content:e.contents},new:{path:t.name,content:t.contents}}}function N(e,t){return e.hunks.length===0&&e.type!==`rename-pure`&&t!==void 0&&f(e.name)}function P(e,t){return e.type!==`rename-pure`&&t!==void 0&&m(e)}function F(e){let t=e.trim();return t.length===0?null:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function I(e){let t=(0,T.c)(75),{fileDiff:n,changeKind:r,onRequestFileContents:i,patchText:a,renderBeforeVisible:o}=e,c=r===`deleted`,l;t[0]!==n||t[1]!==i?(l=N(n,i),t[0]=n,t[1]=i,t[2]=l):l=t[2];let u=l,d;t[3]!==n||t[4]!==i?(d=P(n,i),t[3]=n,t[4]=i,t[5]=d):d=t[5];let f=d,m;t[6]===n?m=t[7]:(m=p(n),t[6]=n,t[7]=m);let h=m,g;t[8]!==r||t[9]!==n||t[10]!==a?(g=A(n,r,a),t[8]=r,t[9]=n,t[10]=a,t[11]=g):g=t[11];let _=g,v;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(v={initialIsIntersecting:!1,rootMargin:`200px`},t[12]=v):v=t[12];let{ref:y,isIntersecting:b}=S(v),x=(0,E.useRef)(i),C;t[13]===i?C=t[14]:(C=()=>{x.current=i},t[13]=i,t[14]=C),(0,E.useEffect)(C);let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w={status:`idle`},t[15]=w):w=t[15];let[D,O]=(0,E.useState)(w),j=(0,E.useRef)(`idle`),[I,z]=(0,E.useState)(o),[B,V]=(0,E.useState)(!1),[U,W]=(0,E.useState)(0),[G,re]=(0,E.useState)(!1),K=s(),q;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(q=()=>{j.current=`idle`,O({status:`idle`}),V(!1),W(0),re(!1)},t[16]=q):q=t[16];let J;t[17]!==_.identity||t[18]!==u||t[19]!==f?(J=[_.identity,u,f],t[17]=_.identity,t[18]=u,t[19]=f,t[20]=J):J=t[20],(0,E.useEffect)(q,J);let Y,X;t[21]===b?(Y=t[22],X=t[23]):(Y=()=>{b&&z(!0)},X=[b],t[21]=b,t[22]=Y,t[23]=X),(0,E.useEffect)(Y,X);let ie=c&&!u&&!f&&!B,Z=I&&!ie,ae=u||f,oe;t[24]!==r||t[25]!==n||t[26]!==ae||t[27]!==i||t[28]!==a?(oe=!ae&&i!==void 0&&a!==void 0&&n.hunks.length>0&&k(r),t[24]=r,t[25]=n,t[26]=ae,t[27]=i,t[28]=a,t[29]=oe):oe=t[29];let Q=oe,$=Z&&(ae||Q&&U>0),se,ce;t[30]!==Q||t[31]!==U||t[32]!==K||t[33]!==Z?(se=()=>{if(!(K||!Z||!Q||U>0))return ee(()=>{W(L)})},ce=[Q,U,K,Z],t[30]=Q,t[31]=U,t[32]=K,t[33]=Z,t[34]=se,t[35]=ce):(se=t[34],ce=t[35]),(0,E.useEffect)(se,ce);let le;t[36]!==_.new||t[37]!==_.old||t[38]!==f||t[39]!==$?(le=()=>{if(!$||j.current!==`idle`)return;let e=x.current;if(!e)return;let t=!1;return j.current=`loading`,O({status:`loading`}),Promise.all([te(_.old,e),te(_.new,e)]).then(e=>{let[n,r]=e;if(t)return;let i=n?.kind===`image`?n:null,a=r?.kind===`image`?r:null;if(i!==null||a!==null){j.current=`ready-image`,O({status:`ready-image`,oldImageUrl:i?.dataUrl??null,newImageUrl:a?.dataUrl??null,oldSizeBytes:i?.sizeBytes??null,newSizeBytes:a?.sizeBytes??null});return}if(n?.kind!==`text`||r?.kind!==`text`){j.current=`unavailable`,O({status:`unavailable`});return}let o=M(n.file,r.file);if(f){j.current=`ready-svg`,O({status:`ready-svg`,fullFileContents:o,oldImageUrl:F(n.file.contents),newImageUrl:F(r.file.contents)});return}j.current=`ready`,O({status:`ready`,fullFileContents:o})}).catch(()=>{t||(j.current=`error`,O({status:`error`}))}),()=>{t=!0,j.current===`loading`&&(j.current=`idle`)}},t[36]=_.new,t[37]=_.old,t[38]=f,t[39]=$,t[40]=le):le=t[40];let ue;t[41]!==U||t[42]!==_||t[43]!==n||t[44]!==f||t[45]!==a||t[46]!==$?(ue=[U,_,n,f,a,$],t[41]=U,t[42]=_,t[43]=n,t[44]=f,t[45]=a,t[46]=$,t[47]=ue):ue=t[47],(0,E.useEffect)(le,ue);let de;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(de=()=>{j.current===`error`&&(j.current=`idle`,O({status:`idle`})),re(!0),W(ne)},t[48]=de):de=t[48];let fe=de,pe=U>0,me=!K,he;t[49]!==Q||t[50]!==D.status||t[51]!==G||t[52]!==pe||t[53]!==me?(he=R({canExpandContext:Q,contextRequested:pe,enrichmentStatus:D.status,isPrefetchedAutomatically:me,isRequestedByUser:G}),t[49]=Q,t[50]=D.status,t[51]=G,t[52]=pe,t[53]=me,t[54]=he):he=t[54];let ge=he,_e;t[55]===ge?_e=t[56]:(_e={status:ge,request:fe},t[55]=ge,t[56]=_e);let ve=_e,ye=D.status===`ready`||D.status===`ready-svg`?D.fullFileContents:null,be;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(be=()=>{V(!0),z(!0)},t[57]=be):be=t[57];let xe=be,Se;t[58]!==r||t[59]!==D||t[60]!==u?(Se=u&&D.status===`ready-image`?H(D,r):null,t[58]=r,t[59]=D,t[60]=u,t[61]=Se):Se=t[61];let Ce=Se,we;return t[62]!==y||t[63]!==ve||t[64]!==D||t[65]!==n||t[66]!==h||t[67]!==ye||t[68]!==Ce||t[69]!==u||t[70]!==f||t[71]!==a||t[72]!==ie||t[73]!==Z?(we={bodySentinelRef:y,enrichment:D,fileDiff:n,fileDiffLabel:h,isImageCard:u,isSvgPreviewCard:f,shouldGateDeletedDiff:ie,shouldRenderDiffView:Z,loadDeletedDiff:xe,imageSizeStat:Ce,contextExpansion:ve,fullFileContents:ye,patchText:a},t[62]=y,t[63]=ve,t[64]=D,t[65]=n,t[66]=h,t[67]=ye,t[68]=Ce,t[69]=u,t[70]=f,t[71]=a,t[72]=ie,t[73]=Z,t[74]=we):we=t[74],we}function ne(e){return e+1}function L(e){return e===0?1:e}function R({canExpandContext:e,contextRequested:t,enrichmentStatus:n,isPrefetchedAutomatically:r,isRequestedByUser:i}){if(!e)return`unavailable`;let a=i?`loading`:`prefetching`;switch(n){case`idle`:return t?a:r?`prefetching`:`idle`;case`loading`:return a;case`ready`:return`ready`;case`error`:return`error`;case`ready-image`:case`ready-svg`:case`unavailable`:return`unavailable`;default:return n}}function z(e,t){let n=e!==null&&t!==null,r=[];return e!==null&&r.push({url:e,caption:n?`Old`:null}),t!==null&&r.push({url:t,caption:n?`New`:null}),r}function B(e,t){return t.caption===null?e:`${e} (${t.caption.toLowerCase()})`}function V(e){return e.status!==`ready-image`&&e.status!==`ready-svg`?null:{oldImageUrl:e.oldImageUrl,newImageUrl:e.newImageUrl}}function H(e,t){let n=t===`deleted`?null:e.newSizeBytes,r=t===`added`?null:e.oldSizeBytes;return n===null&&r===null?null:{addedBytes:n,removedBytes:r}}function U(e){let t=(0,T.c)(32),{preview:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i,[o,s]=(0,E.useState)(null),c,l,u,d,f,p,m,h;if(t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==n.newImageUrl||t[4]!==n.oldImageUrl){h=Symbol.for(`react.early_return_sentinel`);bb0:{if(l=z(n.oldImageUrl,n.newImageUrl),l.length===0){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[13]=e):e=t[13],h=e;break bb0}let e=o===null?void 0:l[o];u=e=>{s(t=>t===null?null:_({currentIndex:t,direction:e,itemCount:l.length}))};let i;t[14]!==r||t[15]!==a?(i=(e,t)=>(0,D.jsxs)(`figure`,{className:`min-w-0 max-w-full`,children:[(0,D.jsx)(`button`,{type:`button`,className:a?`flex h-64 w-full cursor-zoom-in items-center justify-center rounded-md border border-border bg-surface-recessed p-3`:`block max-w-full cursor-zoom-in`,onClick:()=>s(t),children:(0,D.jsx)(`img`,{src:e.url,alt:B(r,e),style:v,className:a?`block h-full w-full object-contain`:`block max-h-80 max-w-full rounded-md border border-border object-contain`})}),e.caption===null?null:(0,D.jsx)(`figcaption`,{className:`mt-1 text-xs text-muted-foreground`,children:e.caption})]},e.url),t[14]=r,t[15]=a,t[16]=i):i=t[16],m=(0,D.jsx)(`div`,{className:`@container/diff-preview min-w-0`,children:(0,D.jsx)(`div`,{className:a?l.length>1?`grid grid-cols-1 gap-3 px-3 py-3 @min-[32rem]/diff-preview:grid-cols-2`:`grid grid-cols-1 gap-3 px-3 py-3`:`flex flex-col items-start gap-3 px-3 py-3 @min-[32rem]/diff-preview:flex-row`,children:l.map(i)})}),c=g,d=`${r} image preview`,f=e?.url??null,p=e?B(r,e):r}t[0]=o,t[1]=r,t[2]=a,t[3]=n.newImageUrl,t[4]=n.oldImageUrl,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h}else c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12];if(h!==Symbol.for(`react.early_return_sentinel`))return h;let y=l.length>1,b,x;t[17]===u?(b=t[18],x=t[19]):(b=()=>u(`previous`),x=()=>u(`next`),t[17]=u,t[18]=b,t[19]=x);let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>s(null),t[20]=S):S=t[20];let C;t[21]!==c||t[22]!==d||t[23]!==f||t[24]!==p||t[25]!==y||t[26]!==b||t[27]!==x?(C=(0,D.jsx)(c,{title:d,imageSrc:f,imageAlt:p,hasMultipleImages:y,onPrevious:b,onNext:x,onClose:S}),t[21]=c,t[22]=d,t[23]=f,t[24]=p,t[25]=y,t[26]=b,t[27]=x,t[28]=C):C=t[28];let w;return t[29]!==C||t[30]!==m?(w=(0,D.jsxs)(D.Fragment,{children:[m,C]}),t[29]=C,t[30]=m,t[31]=w):w=t[31],w}function W(e){let t=(0,T.c)(8),{enrichment:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i;if(n.status===`idle`||n.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(u,{}),t[0]=e):e=t[0],e}let o;t[1]===n?o=t[2]:(o=V(n),t[1]=n,t[2]=o);let s=o;if(s===null){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[3]=e):e=t[3],e}let c;return t[4]!==r||t[5]!==a||t[6]!==s?(c=(0,D.jsx)(U,{preview:s,fileDiffLabel:r,fitToFrame:a}),t[4]=r,t[5]=a,t[6]=s,t[7]=c):c=t[7],c}function G(e){let t=(0,T.c)(9),{displayMode:n,enrichment:r,fileDiff:i,fileDiffLabel:a,patchText:o,fullFileContents:s,presentation:c,onSelectionAddToChat:l}=e,u;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==s||t[5]!==l||t[6]!==o||t[7]!==c?(u=n===`preview`?(0,D.jsx)(W,{enrichment:r,fileDiffLabel:a,fitToFrame:!0}):(0,D.jsx)(w,{file:i,patchText:o,fullFileContents:s,...c,onSelectionAddToChat:l}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=s,t[5]=l,t[6]=o,t[7]=c,t[8]=u):u=t[8],u}function re(e){let t=(0,T.c)(19),{state:n,presentation:r,svgDisplayMode:i,reservesCollapseGutter:a,onSelectionAddToChat:o}=e,{bodySentinelRef:s,enrichment:c,fileDiff:d,fileDiffLabel:f,isImageCard:p,isSvgPreviewCard:m,shouldGateDeletedDiff:h,shouldRenderDiffView:g,loadDeletedDiff:_,contextExpansion:v,fullFileContents:y,patchText:b}=n,x;t[0]!==v||t[1]!==c||t[2]!==d||t[3]!==f||t[4]!==y||t[5]!==p||t[6]!==m||t[7]!==_||t[8]!==o||t[9]!==b||t[10]!==r||t[11]!==a||t[12]!==h||t[13]!==g||t[14]!==i?(x=h?(0,D.jsxs)(`div`,{className:`flex items-center py-3 pl-2 pr-3 text-xs text-muted-foreground`,children:[a?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,(0,D.jsxs)(`span`,{className:`pl-[1ch]`,children:[(0,D.jsx)(`span`,{children:`This file was deleted.`}),` `,(0,D.jsx)(l,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:_,children:`Load diff`})]})]}):g?p?(0,D.jsx)(W,{enrichment:c,fileDiffLabel:f}):m?(0,D.jsx)(G,{displayMode:i,enrichment:c,fileDiff:d,fileDiffLabel:f,patchText:b,fullFileContents:y,presentation:r,onSelectionAddToChat:o}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(w,{file:d,patchText:b,fullFileContents:y,...r,onSelectionAddToChat:o}),(0,D.jsx)(K,{contextExpansion:v,reservesCollapseGutter:a})]}):(0,D.jsx)(u,{}),t[0]=v,t[1]=c,t[2]=d,t[3]=f,t[4]=y,t[5]=p,t[6]=m,t[7]=_,t[8]=o,t[9]=b,t[10]=r,t[11]=a,t[12]=h,t[13]=g,t[14]=i,t[15]=x):x=t[15];let S;return t[16]!==s||t[17]!==x?(S=(0,D.jsx)(`div`,{ref:s,className:`overflow-hidden rounded-b-lg bg-background`,style:O,children:x}),t[16]=s,t[17]=x,t[18]=S):S=t[18],S}function K(e){let t=(0,T.c)(8),{contextExpansion:n,reservesCollapseGutter:r}=e,{status:i,request:a}=n;if(i===`unavailable`||i===`ready`||i===`prefetching`)return null;let o;t[0]===r?o=t[1]:(o=r?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,t[0]=r,t[1]=o);let s;t[2]!==a||t[3]!==i?(s=(0,D.jsx)(`span`,{className:`pl-[1ch]`,children:i===`loading`?(0,D.jsx)(`span`,{role:`status`,children:`Loading context…`}):(0,D.jsxs)(D.Fragment,{children:[i===`error`?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:`text-destructive`,children:`Couldn't load surrounding context.`}),` `]}):null,(0,D.jsx)(l,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:a,children:i===`error`?`Retry`:`Expand context`})]})}),t[2]=a,t[3]=i,t[4]=s):s=t[4];let c;return t[5]!==o||t[6]!==s?(c=(0,D.jsxs)(`div`,{className:`flex items-center py-2 pl-2 pr-3 text-xs text-muted-foreground`,children:[o,s]}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function q(e){let t=(0,T.c)(7),{stat:n}=e,r;t[0]===n.addedBytes?r=t[1]:(r=n.addedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-added`,children:`+${o(n.addedBytes)}`}),t[0]=n.addedBytes,t[1]=r);let i;t[2]===n.removedBytes?i=t[3]:(i=n.removedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-removed`,children:`-${o(n.removedBytes)}`}),t[2]=n.removedBytes,t[3]=i);let a;return t[4]!==r||t[5]!==i?(a=(0,D.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 whitespace-nowrap text-xs tabular-nums`,children:[r,i]}),t[4]=r,t[5]=i,t[6]=a):a=t[6],a}function J(e){let t=(0,T.c)(5),{fileLabel:n,isRaw:r,onToggle:a}=e,o=r?`Show image preview for ${n}`:`Show raw SVG diff for ${n}`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,D.jsx)(i,{name:`Code`,"aria-hidden":!0,className:`size-3.5`}),t[0]=s):s=t[0];let c;return t[1]!==r||t[2]!==o||t[3]!==a?(c=(0,D.jsx)(`button`,{type:`button`,className:`inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-pressed:bg-state-active aria-pressed:text-foreground`,onClick:a,"aria-label":o,"aria-pressed":r,children:s}),t[1]=r,t[2]=o,t[3]=a,t[4]=c):c=t[4],c}function Y(e,t){return e.changeKind!==`renamed`&&e.changeKind!==`copied`?null:t&&t!==e.path?{from:t,to:e.path}:null}function X(e){let t=(0,T.c)(53),{model:n,previousPath:r,filePathRoot:o,onOpenFileInEditor:s,onOpenFilePreview:l,isCollapsed:u,onToggleCollapsed:d,hasChanges:f,statSlot:p,actionSlot:m}=e,g=n.changeKind===`added`,_=n.changeKind===`deleted`,v=_?0:n.insertions,S=g?0:n.deletions,w=g||_,E;t[0]!==n||t[1]!==r?(E=Y(n,r),t[0]=n,t[1]=r,t[2]=E):E=t[2];let O=E,k=n.openablePath,ee;t[3]!==o||t[4]!==k?(ee=k?y({path:k,rootPath:o}):null,t[3]=o,t[4]=k,t[5]=ee):ee=t[5];let A=ee,j=!!k,te=u!==void 0&&d!==void 0,M;t[6]!==f||t[7]!==u||t[8]!==n.label||t[9]!==d||t[10]!==te?(M=te?(0,D.jsx)(`button`,{type:`button`,className:a(`inline-flex w-8 shrink-0 items-center justify-center text-muted-foreground transition-colors`,f?`hover:text-foreground`:`cursor-not-allowed opacity-40`),onClick:f?d:void 0,disabled:!f,"aria-label":f?`${u?`Expand`:`Collapse`} ${n.label}`:`${n.label} has no changes to expand`,"aria-expanded":f?!u:void 0,children:(0,D.jsx)(i,{name:`ChevronRight`,className:a(`size-3.5 shrink-0 transition-transform duration-150`,f&&!u&&`rotate-90`)})}):null,t[6]=f,t[7]=u,t[8]=n.label,t[9]=d,t[10]=te,t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=a(`flex min-w-0 items-center gap-1.5`,`pl-[1ch]`),t[12]=N):N=t[12];let P;t[13]===O?P=t[14]:(P=O?(0,D.jsx)(h,{className:`min-w-0 font-mono text-xs leading-5 text-muted-foreground`,title:O.from,children:O.from}):null,t[13]=O,t[14]=P);let F;t[15]===O?F=t[16]:(F=O?(0,D.jsx)(i,{name:`ArrowRight`,"aria-hidden":`true`,className:`size-3 shrink-0 text-subtle-foreground`}):null,t[15]=O,t[16]=F);let I=k??n.path,ne=O?O.to:n.label,L;t[17]!==j||t[18]!==l||t[19]!==k?(L=j&&k&&l?()=>l(k):void 0,t[17]=j,t[18]=l,t[19]=k,t[20]=L):L=t[20];let R;t[21]!==I||t[22]!==ne||t[23]!==L?(R=(0,D.jsx)(C,{path:I,displayName:ne,onClick:L,className:`font-mono font-medium text-foreground`}),t[21]=I,t[22]=ne,t[23]=L,t[24]=R):R=t[24];let z;t[25]!==A||t[26]!==n.label?(z=A?(0,D.jsx)(c,{text:A,label:`Copy path for ${n.label}`,className:`rounded-md hover:bg-state-hover`}):null,t[25]=A,t[26]=n.label,t[27]=z):z=t[27];let B;t[28]!==j||t[29]!==n.label||t[30]!==s||t[31]!==k?(B=j&&k&&s?(0,D.jsx)(x,{onClick:()=>s(k),label:`Open ${n.label} in editor`}):null,t[28]=j,t[29]=n.label,t[30]=s,t[31]=k,t[32]=B):B=t[32];let V;t[33]!==R||t[34]!==z||t[35]!==B||t[36]!==P||t[37]!==F?(V=(0,D.jsxs)(`span`,{className:N,children:[P,F,R,z,B]}),t[33]=R,t[34]=z,t[35]=B,t[36]=P,t[37]=F,t[38]=V):V=t[38];let H;t[39]!==V||t[40]!==M?(H=(0,D.jsxs)(`span`,{className:`flex min-w-0 grow basis-48 items-center`,children:[M,V]}),t[39]=V,t[40]=M,t[41]=H):H=t[41];let U;t[42]!==S||t[43]!==v||t[44]!==w||t[45]!==p?(U=p??(0,D.jsx)(b,{insertions:v,deletions:S,hideZero:w,className:`text-xs`}),t[42]=S,t[43]=v,t[44]=w,t[45]=p,t[46]=U):U=t[46];let W;t[47]!==m||t[48]!==U?(W=(0,D.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[U,m]}),t[47]=m,t[48]=U,t[49]=W):W=t[49];let G;return t[50]!==H||t[51]!==W?(G=(0,D.jsxs)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center justify-between gap-x-2 gap-y-1`,children:[H,W]}),t[50]=H,t[51]=W,t[52]=G):G=t[52],G}var ie=`rounded-lg bg-background py-1.5 pl-2 pr-3 text-xs font-medium text-foreground`;function Z({stickyHeader:e,isBodyHidden:t,isStuck:n,showStuckHeaderEdge:r=!0}){return a(ie,e&&`sticky z-30`,e&&`top-0`,!t&&`rounded-b-none`,n&&`rounded-t-none`,n&&r&&`shadow-[inset_0_1px_0_var(--border)]`)}export{re as a,I as c,Z as i,q as n,U as o,J as r,H as s,X as t};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Ah as i,Ln as a,Ph as o,Rh as s,Tc as c,en as l}from"./index-DcGF-i5V.js";import{t as u}from"./code-loading-skeletons-DtdoAfrj.js";import{f as d,l as f,o as p,u as m}from"./git-diff-patch-text-SHpUxhZL.js";import{t as h}from"./truncate-start-Bny9cWRF.js";import{n as g,r as _,t as v}from"./image-lightbox-CYq-aV6a.js";import{a as y}from"./absolute-file-path-CugCBUdo.js";import{n as b}from"./diff-stats-tally-dxAKjCQi.js";import{t as x}from"./open-in-editor-button-Jn2gF-rw.js";import{n as S,t as C}from"./file-path-link-BnuQ7GOP.js";import{t as w}from"./DiffHost-BWn6U0v1.js";var T=n(),E=e(t(),1),D=e(r(),1),O={contain:`layout paint style`,contentVisibility:`auto`,containIntrinsicSize:`0 600px`};function k(e){return e===`modified`||e===`renamed`||e===`copied`}function ee(e){if(typeof window.requestIdleCallback==`function`){let t=window.requestIdleCallback(e,{timeout:2e3});return()=>window.cancelIdleCallback(t)}let t=window.setTimeout(e,200);return()=>window.clearTimeout(t)}function A(e,t,n){let r=d(e.name)??e.name,i=d(e.prevName)??r,a=t===`added`?{kind:`empty`,path:r}:{kind:`request`,path:t===`renamed`?i:r,side:`old`},o=t===`deleted`?{kind:`empty`,path:r}:{kind:`request`,path:r,side:`new`},s=e.hunks.map(e=>`${e.hunkSpecs??``}:${e.additionStart}:${e.additionCount}:${e.deletionStart}:${e.deletionCount}`).join(`|`);return{identity:[t,j(a),j(o),s,n??``,e.deletionLines.join(``),e.additionLines.join(``)].join(`:`),old:a,new:o}}function j(e){return e.kind===`empty`?`empty:${e.path}`:`request:${e.side}:${e.path}`}function te(e,t){return e.kind===`empty`?Promise.resolve({kind:`text`,file:{name:e.path,contents:``}}):t(e.path,e.side)}function M(e,t){return{old:{path:e.name,content:e.contents},new:{path:t.name,content:t.contents}}}function N(e,t){return e.hunks.length===0&&e.type!==`rename-pure`&&t!==void 0&&f(e.name)}function P(e,t){return e.type!==`rename-pure`&&t!==void 0&&m(e)}function F(e){let t=e.trim();return t.length===0?null:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function I(e){let t=(0,T.c)(75),{fileDiff:n,changeKind:r,onRequestFileContents:i,patchText:a,renderBeforeVisible:o}=e,s=r===`deleted`,l;t[0]!==n||t[1]!==i?(l=N(n,i),t[0]=n,t[1]=i,t[2]=l):l=t[2];let u=l,d;t[3]!==n||t[4]!==i?(d=P(n,i),t[3]=n,t[4]=i,t[5]=d):d=t[5];let f=d,m;t[6]===n?m=t[7]:(m=p(n),t[6]=n,t[7]=m);let h=m,g;t[8]!==r||t[9]!==n||t[10]!==a?(g=A(n,r,a),t[8]=r,t[9]=n,t[10]=a,t[11]=g):g=t[11];let _=g,v;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(v={initialIsIntersecting:!1,rootMargin:`200px`},t[12]=v):v=t[12];let{ref:y,isIntersecting:b}=S(v),x=(0,E.useRef)(i),C;t[13]===i?C=t[14]:(C=()=>{x.current=i},t[13]=i,t[14]=C),(0,E.useEffect)(C);let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w={status:`idle`},t[15]=w):w=t[15];let[D,O]=(0,E.useState)(w),j=(0,E.useRef)(`idle`),[I,z]=(0,E.useState)(o),[B,V]=(0,E.useState)(!1),[U,W]=(0,E.useState)(0),[G,re]=(0,E.useState)(!1),K=c(),q;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(q=()=>{j.current=`idle`,O({status:`idle`}),V(!1),W(0),re(!1)},t[16]=q):q=t[16];let J;t[17]!==_.identity||t[18]!==u||t[19]!==f?(J=[_.identity,u,f],t[17]=_.identity,t[18]=u,t[19]=f,t[20]=J):J=t[20],(0,E.useEffect)(q,J);let Y,X;t[21]===b?(Y=t[22],X=t[23]):(Y=()=>{b&&z(!0)},X=[b],t[21]=b,t[22]=Y,t[23]=X),(0,E.useEffect)(Y,X);let ie=s&&!u&&!f&&!B,Z=I&&!ie,ae=u||f,oe;t[24]!==r||t[25]!==n||t[26]!==ae||t[27]!==i||t[28]!==a?(oe=!ae&&i!==void 0&&a!==void 0&&n.hunks.length>0&&k(r),t[24]=r,t[25]=n,t[26]=ae,t[27]=i,t[28]=a,t[29]=oe):oe=t[29];let Q=oe,$=Z&&(ae||Q&&U>0),se,ce;t[30]!==Q||t[31]!==U||t[32]!==K||t[33]!==Z?(se=()=>{if(!(K||!Z||!Q||U>0))return ee(()=>{W(L)})},ce=[Q,U,K,Z],t[30]=Q,t[31]=U,t[32]=K,t[33]=Z,t[34]=se,t[35]=ce):(se=t[34],ce=t[35]),(0,E.useEffect)(se,ce);let le;t[36]!==_.new||t[37]!==_.old||t[38]!==f||t[39]!==$?(le=()=>{if(!$||j.current!==`idle`)return;let e=x.current;if(!e)return;let t=!1;return j.current=`loading`,O({status:`loading`}),Promise.all([te(_.old,e),te(_.new,e)]).then(e=>{let[n,r]=e;if(t)return;let i=n?.kind===`image`?n:null,a=r?.kind===`image`?r:null;if(i!==null||a!==null){j.current=`ready-image`,O({status:`ready-image`,oldImageUrl:i?.dataUrl??null,newImageUrl:a?.dataUrl??null,oldSizeBytes:i?.sizeBytes??null,newSizeBytes:a?.sizeBytes??null});return}if(n?.kind!==`text`||r?.kind!==`text`){j.current=`unavailable`,O({status:`unavailable`});return}let o=M(n.file,r.file);if(f){j.current=`ready-svg`,O({status:`ready-svg`,fullFileContents:o,oldImageUrl:F(n.file.contents),newImageUrl:F(r.file.contents)});return}j.current=`ready`,O({status:`ready`,fullFileContents:o})}).catch(()=>{t||(j.current=`error`,O({status:`error`}))}),()=>{t=!0,j.current===`loading`&&(j.current=`idle`)}},t[36]=_.new,t[37]=_.old,t[38]=f,t[39]=$,t[40]=le):le=t[40];let ue;t[41]!==U||t[42]!==_||t[43]!==n||t[44]!==f||t[45]!==a||t[46]!==$?(ue=[U,_,n,f,a,$],t[41]=U,t[42]=_,t[43]=n,t[44]=f,t[45]=a,t[46]=$,t[47]=ue):ue=t[47],(0,E.useEffect)(le,ue);let de;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(de=()=>{j.current===`error`&&(j.current=`idle`,O({status:`idle`})),re(!0),W(ne)},t[48]=de):de=t[48];let fe=de,pe=U>0,me=!K,he;t[49]!==Q||t[50]!==D.status||t[51]!==G||t[52]!==pe||t[53]!==me?(he=R({canExpandContext:Q,contextRequested:pe,enrichmentStatus:D.status,isPrefetchedAutomatically:me,isRequestedByUser:G}),t[49]=Q,t[50]=D.status,t[51]=G,t[52]=pe,t[53]=me,t[54]=he):he=t[54];let ge=he,_e;t[55]===ge?_e=t[56]:(_e={status:ge,request:fe},t[55]=ge,t[56]=_e);let ve=_e,ye=D.status===`ready`||D.status===`ready-svg`?D.fullFileContents:null,be;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(be=()=>{V(!0),z(!0)},t[57]=be):be=t[57];let xe=be,Se;t[58]!==r||t[59]!==D||t[60]!==u?(Se=u&&D.status===`ready-image`?H(D,r):null,t[58]=r,t[59]=D,t[60]=u,t[61]=Se):Se=t[61];let Ce=Se,we;return t[62]!==y||t[63]!==ve||t[64]!==D||t[65]!==n||t[66]!==h||t[67]!==ye||t[68]!==Ce||t[69]!==u||t[70]!==f||t[71]!==a||t[72]!==ie||t[73]!==Z?(we={bodySentinelRef:y,enrichment:D,fileDiff:n,fileDiffLabel:h,isImageCard:u,isSvgPreviewCard:f,shouldGateDeletedDiff:ie,shouldRenderDiffView:Z,loadDeletedDiff:xe,imageSizeStat:Ce,contextExpansion:ve,fullFileContents:ye,patchText:a},t[62]=y,t[63]=ve,t[64]=D,t[65]=n,t[66]=h,t[67]=ye,t[68]=Ce,t[69]=u,t[70]=f,t[71]=a,t[72]=ie,t[73]=Z,t[74]=we):we=t[74],we}function ne(e){return e+1}function L(e){return e===0?1:e}function R({canExpandContext:e,contextRequested:t,enrichmentStatus:n,isPrefetchedAutomatically:r,isRequestedByUser:i}){if(!e)return`unavailable`;let a=i?`loading`:`prefetching`;switch(n){case`idle`:return t?a:r?`prefetching`:`idle`;case`loading`:return a;case`ready`:return`ready`;case`error`:return`error`;case`ready-image`:case`ready-svg`:case`unavailable`:return`unavailable`;default:return n}}function z(e,t){let n=e!==null&&t!==null,r=[];return e!==null&&r.push({url:e,caption:n?`Old`:null}),t!==null&&r.push({url:t,caption:n?`New`:null}),r}function B(e,t){return t.caption===null?e:`${e} (${t.caption.toLowerCase()})`}function V(e){return e.status!==`ready-image`&&e.status!==`ready-svg`?null:{oldImageUrl:e.oldImageUrl,newImageUrl:e.newImageUrl}}function H(e,t){let n=t===`deleted`?null:e.newSizeBytes,r=t===`added`?null:e.oldSizeBytes;return n===null&&r===null?null:{addedBytes:n,removedBytes:r}}function U(e){let t=(0,T.c)(32),{preview:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i,[o,s]=(0,E.useState)(null),c,l,u,d,f,p,m,h;if(t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==n.newImageUrl||t[4]!==n.oldImageUrl){h=Symbol.for(`react.early_return_sentinel`);bb0:{if(l=z(n.oldImageUrl,n.newImageUrl),l.length===0){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[13]=e):e=t[13],h=e;break bb0}let e=o===null?void 0:l[o];u=e=>{s(t=>t===null?null:_({currentIndex:t,direction:e,itemCount:l.length}))};let i;t[14]!==r||t[15]!==a?(i=(e,t)=>(0,D.jsxs)(`figure`,{className:`min-w-0 max-w-full`,children:[(0,D.jsx)(`button`,{type:`button`,className:a?`flex h-64 w-full cursor-zoom-in items-center justify-center rounded-md border border-border bg-surface-recessed p-3`:`block max-w-full cursor-zoom-in`,onClick:()=>s(t),children:(0,D.jsx)(`img`,{src:e.url,alt:B(r,e),style:v,className:a?`block h-full w-full object-contain`:`block max-h-80 max-w-full rounded-md border border-border object-contain`})}),e.caption===null?null:(0,D.jsx)(`figcaption`,{className:`mt-1 text-xs text-muted-foreground`,children:e.caption})]},e.url),t[14]=r,t[15]=a,t[16]=i):i=t[16],m=(0,D.jsx)(`div`,{className:`@container/diff-preview min-w-0`,children:(0,D.jsx)(`div`,{className:a?l.length>1?`grid grid-cols-1 gap-3 px-3 py-3 @min-[32rem]/diff-preview:grid-cols-2`:`grid grid-cols-1 gap-3 px-3 py-3`:`flex flex-col items-start gap-3 px-3 py-3 @min-[32rem]/diff-preview:flex-row`,children:l.map(i)})}),c=g,d=`${r} image preview`,f=e?.url??null,p=e?B(r,e):r}t[0]=o,t[1]=r,t[2]=a,t[3]=n.newImageUrl,t[4]=n.oldImageUrl,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h}else c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12];if(h!==Symbol.for(`react.early_return_sentinel`))return h;let y=l.length>1,b,x;t[17]===u?(b=t[18],x=t[19]):(b=()=>u(`previous`),x=()=>u(`next`),t[17]=u,t[18]=b,t[19]=x);let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>s(null),t[20]=S):S=t[20];let C;t[21]!==c||t[22]!==d||t[23]!==f||t[24]!==p||t[25]!==y||t[26]!==b||t[27]!==x?(C=(0,D.jsx)(c,{title:d,imageSrc:f,imageAlt:p,hasMultipleImages:y,onPrevious:b,onNext:x,onClose:S}),t[21]=c,t[22]=d,t[23]=f,t[24]=p,t[25]=y,t[26]=b,t[27]=x,t[28]=C):C=t[28];let w;return t[29]!==C||t[30]!==m?(w=(0,D.jsxs)(D.Fragment,{children:[m,C]}),t[29]=C,t[30]=m,t[31]=w):w=t[31],w}function W(e){let t=(0,T.c)(8),{enrichment:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i;if(n.status===`idle`||n.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(u,{}),t[0]=e):e=t[0],e}let o;t[1]===n?o=t[2]:(o=V(n),t[1]=n,t[2]=o);let s=o;if(s===null){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[3]=e):e=t[3],e}let c;return t[4]!==r||t[5]!==a||t[6]!==s?(c=(0,D.jsx)(U,{preview:s,fileDiffLabel:r,fitToFrame:a}),t[4]=r,t[5]=a,t[6]=s,t[7]=c):c=t[7],c}function G(e){let t=(0,T.c)(9),{displayMode:n,enrichment:r,fileDiff:i,fileDiffLabel:a,patchText:o,fullFileContents:s,presentation:c,onSelectionAddToChat:l}=e,u;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==s||t[5]!==l||t[6]!==o||t[7]!==c?(u=n===`preview`?(0,D.jsx)(W,{enrichment:r,fileDiffLabel:a,fitToFrame:!0}):(0,D.jsx)(w,{file:i,patchText:o,fullFileContents:s,...c,onSelectionAddToChat:l}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=s,t[5]=l,t[6]=o,t[7]=c,t[8]=u):u=t[8],u}function re(e){let t=(0,T.c)(19),{state:n,presentation:r,svgDisplayMode:i,reservesCollapseGutter:a,onSelectionAddToChat:s}=e,{bodySentinelRef:c,enrichment:l,fileDiff:d,fileDiffLabel:f,isImageCard:p,isSvgPreviewCard:m,shouldGateDeletedDiff:h,shouldRenderDiffView:g,loadDeletedDiff:_,contextExpansion:v,fullFileContents:y,patchText:b}=n,x;t[0]!==v||t[1]!==l||t[2]!==d||t[3]!==f||t[4]!==y||t[5]!==p||t[6]!==m||t[7]!==_||t[8]!==s||t[9]!==b||t[10]!==r||t[11]!==a||t[12]!==h||t[13]!==g||t[14]!==i?(x=h?(0,D.jsxs)(`div`,{className:`flex items-center py-3 pl-2 pr-3 text-xs text-muted-foreground`,children:[a?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,(0,D.jsxs)(`span`,{className:`pl-[1ch]`,children:[(0,D.jsx)(`span`,{children:`This file was deleted.`}),` `,(0,D.jsx)(o,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:_,children:`Load diff`})]})]}):g?p?(0,D.jsx)(W,{enrichment:l,fileDiffLabel:f}):m?(0,D.jsx)(G,{displayMode:i,enrichment:l,fileDiff:d,fileDiffLabel:f,patchText:b,fullFileContents:y,presentation:r,onSelectionAddToChat:s}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(w,{file:d,patchText:b,fullFileContents:y,...r,onSelectionAddToChat:s}),(0,D.jsx)(K,{contextExpansion:v,reservesCollapseGutter:a})]}):(0,D.jsx)(u,{}),t[0]=v,t[1]=l,t[2]=d,t[3]=f,t[4]=y,t[5]=p,t[6]=m,t[7]=_,t[8]=s,t[9]=b,t[10]=r,t[11]=a,t[12]=h,t[13]=g,t[14]=i,t[15]=x):x=t[15];let S;return t[16]!==c||t[17]!==x?(S=(0,D.jsx)(`div`,{ref:c,className:`overflow-hidden rounded-b-lg bg-background`,style:O,children:x}),t[16]=c,t[17]=x,t[18]=S):S=t[18],S}function K(e){let t=(0,T.c)(8),{contextExpansion:n,reservesCollapseGutter:r}=e,{status:i,request:a}=n;if(i===`unavailable`||i===`ready`||i===`prefetching`)return null;let s;t[0]===r?s=t[1]:(s=r?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,t[0]=r,t[1]=s);let c;t[2]!==a||t[3]!==i?(c=(0,D.jsx)(`span`,{className:`pl-[1ch]`,children:i===`loading`?(0,D.jsx)(`span`,{role:`status`,children:`Loading context…`}):(0,D.jsxs)(D.Fragment,{children:[i===`error`?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:`text-destructive`,children:`Couldn't load surrounding context.`}),` `]}):null,(0,D.jsx)(o,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:a,children:i===`error`?`Retry`:`Expand context`})]})}),t[2]=a,t[3]=i,t[4]=c):c=t[4];let l;return t[5]!==s||t[6]!==c?(l=(0,D.jsxs)(`div`,{className:`flex items-center py-2 pl-2 pr-3 text-xs text-muted-foreground`,children:[s,c]}),t[5]=s,t[6]=c,t[7]=l):l=t[7],l}function q(e){let t=(0,T.c)(7),{stat:n}=e,r;t[0]===n.addedBytes?r=t[1]:(r=n.addedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-added`,children:`+${a(n.addedBytes)}`}),t[0]=n.addedBytes,t[1]=r);let i;t[2]===n.removedBytes?i=t[3]:(i=n.removedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-removed`,children:`-${a(n.removedBytes)}`}),t[2]=n.removedBytes,t[3]=i);let o;return t[4]!==r||t[5]!==i?(o=(0,D.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 whitespace-nowrap text-xs tabular-nums`,children:[r,i]}),t[4]=r,t[5]=i,t[6]=o):o=t[6],o}function J(e){let t=(0,T.c)(5),{fileLabel:n,isRaw:r,onToggle:a}=e,o=r?`Show image preview for ${n}`:`Show raw SVG diff for ${n}`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,D.jsx)(i,{name:`Code`,"aria-hidden":!0,className:`size-3.5`}),t[0]=s):s=t[0];let c;return t[1]!==r||t[2]!==o||t[3]!==a?(c=(0,D.jsx)(`button`,{type:`button`,className:`inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-pressed:bg-state-active aria-pressed:text-foreground`,onClick:a,"aria-label":o,"aria-pressed":r,children:s}),t[1]=r,t[2]=o,t[3]=a,t[4]=c):c=t[4],c}function Y(e,t){return e.changeKind!==`renamed`&&e.changeKind!==`copied`?null:t&&t!==e.path?{from:t,to:e.path}:null}function X(e){let t=(0,T.c)(53),{model:n,previousPath:r,filePathRoot:a,onOpenFileInEditor:o,onOpenFilePreview:c,isCollapsed:u,onToggleCollapsed:d,hasChanges:f,statSlot:p,actionSlot:m}=e,g=n.changeKind===`added`,_=n.changeKind===`deleted`,v=_?0:n.insertions,S=g?0:n.deletions,w=g||_,E;t[0]!==n||t[1]!==r?(E=Y(n,r),t[0]=n,t[1]=r,t[2]=E):E=t[2];let O=E,k=n.openablePath,ee;t[3]!==a||t[4]!==k?(ee=k?y({path:k,rootPath:a}):null,t[3]=a,t[4]=k,t[5]=ee):ee=t[5];let A=ee,j=!!k,te=u!==void 0&&d!==void 0,M;t[6]!==f||t[7]!==u||t[8]!==n.label||t[9]!==d||t[10]!==te?(M=te?(0,D.jsx)(`button`,{type:`button`,className:s(`inline-flex w-8 shrink-0 items-center justify-center text-muted-foreground transition-colors`,f?`hover:text-foreground`:`cursor-not-allowed opacity-40`),onClick:f?d:void 0,disabled:!f,"aria-label":f?`${u?`Expand`:`Collapse`} ${n.label}`:`${n.label} has no changes to expand`,"aria-expanded":f?!u:void 0,children:(0,D.jsx)(i,{name:`ChevronRight`,className:s(`size-3.5 shrink-0 transition-transform duration-150`,f&&!u&&`rotate-90`)})}):null,t[6]=f,t[7]=u,t[8]=n.label,t[9]=d,t[10]=te,t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=s(`flex min-w-0 items-center gap-1.5`,`pl-[1ch]`),t[12]=N):N=t[12];let P;t[13]===O?P=t[14]:(P=O?(0,D.jsx)(h,{className:`min-w-0 font-mono text-xs leading-5 text-muted-foreground`,title:O.from,children:O.from}):null,t[13]=O,t[14]=P);let F;t[15]===O?F=t[16]:(F=O?(0,D.jsx)(i,{name:`ArrowRight`,"aria-hidden":`true`,className:`size-3 shrink-0 text-subtle-foreground`}):null,t[15]=O,t[16]=F);let I=k??n.path,ne=O?O.to:n.label,L;t[17]!==j||t[18]!==c||t[19]!==k?(L=j&&k&&c?()=>c(k):void 0,t[17]=j,t[18]=c,t[19]=k,t[20]=L):L=t[20];let R;t[21]!==I||t[22]!==ne||t[23]!==L?(R=(0,D.jsx)(C,{path:I,displayName:ne,onClick:L,className:`font-mono font-medium text-foreground`}),t[21]=I,t[22]=ne,t[23]=L,t[24]=R):R=t[24];let z;t[25]!==A||t[26]!==n.label?(z=A?(0,D.jsx)(l,{text:A,label:`Copy path for ${n.label}`,className:`rounded-md hover:bg-state-hover`}):null,t[25]=A,t[26]=n.label,t[27]=z):z=t[27];let B;t[28]!==j||t[29]!==n.label||t[30]!==o||t[31]!==k?(B=j&&k&&o?(0,D.jsx)(x,{onClick:()=>o(k),label:`Open ${n.label} in editor`}):null,t[28]=j,t[29]=n.label,t[30]=o,t[31]=k,t[32]=B):B=t[32];let V;t[33]!==R||t[34]!==z||t[35]!==B||t[36]!==P||t[37]!==F?(V=(0,D.jsxs)(`span`,{className:N,children:[P,F,R,z,B]}),t[33]=R,t[34]=z,t[35]=B,t[36]=P,t[37]=F,t[38]=V):V=t[38];let H;t[39]!==V||t[40]!==M?(H=(0,D.jsxs)(`span`,{className:`flex min-w-0 grow basis-48 items-center`,children:[M,V]}),t[39]=V,t[40]=M,t[41]=H):H=t[41];let U;t[42]!==S||t[43]!==v||t[44]!==w||t[45]!==p?(U=p??(0,D.jsx)(b,{insertions:v,deletions:S,hideZero:w,className:`text-xs`}),t[42]=S,t[43]=v,t[44]=w,t[45]=p,t[46]=U):U=t[46];let W;t[47]!==m||t[48]!==U?(W=(0,D.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[U,m]}),t[47]=m,t[48]=U,t[49]=W):W=t[49];let G;return t[50]!==H||t[51]!==W?(G=(0,D.jsxs)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center justify-between gap-x-2 gap-y-1`,children:[H,W]}),t[50]=H,t[51]=W,t[52]=G):G=t[52],G}var ie=`rounded-lg bg-background py-1.5 pl-2 pr-3 text-xs font-medium text-foreground`;function Z({stickyHeader:e,isBodyHidden:t,isStuck:n,showStuckHeaderEdge:r=!0}){return s(ie,e&&`sticky z-30`,e&&`top-0`,!t&&`rounded-b-none`,n&&`rounded-t-none`,n&&r&&`shadow-[inset_0_1px_0_var(--border)]`)}export{re as a,I as c,Z as i,q as n,U as o,J as r,H as s,X as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dh as i,Fh as a,jh as o}from"./index-DCps_qBD.js";import{o as s}from"./queued-editor-typeahead-layout-DTUSPVuA.js";var c=n(),l=e(t(),1),u=e(r(),1),d=`bg-background shadow-xs`,f=`cursor-pointer text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60`,p=a(`inline-flex items-center whitespace-nowrap rounded border border-border px-1.5 py-0.5 text-xs`,d,f);a(`text-xs`,f,`focus-visible:z-10`);var m=(0,l.forwardRef)(function(e,t){let n=(0,c.c)(11),r,i,o;n[0]===e?(r=n[1],i=n[2],o=n[3]):({className:r,type:o,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o);let s=o===void 0?`button`:o,l;n[4]===r?l=n[5]:(l=a(p,r),n[4]=r,n[5]=l);let d;return n[6]!==i||n[7]!==t||n[8]!==l||n[9]!==s?(d=(0,u.jsx)(`button`,{ref:t,type:s,className:l,...i}),n[6]=i,n[7]=t,n[8]=l,n[9]=s,n[10]=d):d=n[10],d}),h=`relative bg-surface-raised-solid before:pointer-events-none before:absolute before:inset-y-0 before:right-full before:w-4 before:bg-gradient-to-r before:from-transparent before:to-surface-raised-solid before:content-['']`;function g(e){let t=(0,c.c)(4),{children:n,hideInCompact:r,hideInTiny:i}=e,a=r===void 0?!1:r,o=i===void 0?!0:i,s=a?``:void 0,l=o?``:void 0,d;return t[0]!==n||t[1]!==s||t[2]!==l?(d=(0,u.jsx)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1.5 pr-2 text-xs text-muted-foreground`,"data-promptbox-hide-compact":s,"data-promptbox-hide-tiny":l,children:n}),t[0]=n,t[1]=s,t[2]=l,t[3]=d):d=t[3],d}function _(e){let t=(0,c.c)(27),{cancelLabel:n,children:r,label:l,onCancel:d,variant:f}=e,p=f===void 0?`embedded`:f,m=p===`cap`?`h-8 px-3`:`mb-1.5 pl-1`,h;t[0]===m?h=t[1]:(h=a(`flex min-h-7 items-center gap-1.5 text-xs text-subtle-foreground`,m),t[0]=m,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,u.jsx)(i,{name:`Edit`,className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[2]=g):g=t[2];let _=p===`cap`&&`font-medium`,v;t[3]===_?v=t[4]:(v=a(`shrink-0`,_),t[3]=_,t[4]=v);let y;t[5]!==l||t[6]!==v?(y=(0,u.jsx)(`span`,{className:v,children:l}),t[5]=l,t[6]=v,t[7]=y):y=t[7];let b;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,u.jsx)(i,{name:`X`,className:`size-3`,"aria-hidden":!0}),t[8]=b):b=t[8];let x;t[9]!==n||t[10]!==d?(x=(0,u.jsx)(o,{type:`button`,size:`icon`,variant:`ghost`,className:`ml-auto size-6 shrink-0 text-subtle-foreground`,onClick:d,"aria-label":n,children:b}),t[9]=n,t[10]=d,t[11]=x):x=t[11];let S;t[12]!==h||t[13]!==y||t[14]!==x?(S=(0,u.jsxs)(`div`,{className:h,children:[g,y,x]}),t[12]=h,t[13]=y,t[14]=x,t[15]=S):S=t[15];let C=S;if(p===`cap`){let e;t[16]!==C||t[17]!==l?(e=(0,u.jsx)(s,{ariaLabel:l,className:`relative z-10 -mb-5 rounded-xl rounded-b-none border-b-0 bg-surface-raised-solid pb-3 shadow-lift`,children:C}),t[16]=C,t[17]=l,t[18]=e):e=t[18];let n;t[19]===r?n=t[20]:(n=(0,u.jsx)(`div`,{className:`relative z-20`,children:r}),t[19]=r,t[20]=n);let i;return t[21]!==e||t[22]!==n?(i=(0,u.jsxs)(`div`,{className:`relative z-20 space-y-2`,"data-inline-message-editor-frame":`cap`,children:[e,n]}),t[21]=e,t[22]=n,t[23]=i):i=t[23],i}let w;return t[24]!==r||t[25]!==C?(w=(0,u.jsxs)(`div`,{className:`relative z-20`,"data-inline-message-editor-frame":`embedded`,children:[C,r]}),t[24]=r,t[25]=C,t[26]=w):w=t[26],w}export{m as i,g as n,h as r,_ as t};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Ah as i,Ph as a,Rh as o}from"./index-DcGF-i5V.js";import{o as s}from"./queued-editor-typeahead-layout-DyiJC3nu.js";var c=n(),l=e(t(),1),u=e(r(),1),d=`bg-background shadow-xs`,f=`cursor-pointer text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60`,p=o(`inline-flex items-center whitespace-nowrap rounded border border-border px-1.5 py-0.5 text-xs`,d,f);o(`text-xs`,f,`focus-visible:z-10`);var m=(0,l.forwardRef)(function(e,t){let n=(0,c.c)(11),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,type:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let s=a===void 0?`button`:a,l;n[4]===r?l=n[5]:(l=o(p,r),n[4]=r,n[5]=l);let d;return n[6]!==i||n[7]!==t||n[8]!==l||n[9]!==s?(d=(0,u.jsx)(`button`,{ref:t,type:s,className:l,...i}),n[6]=i,n[7]=t,n[8]=l,n[9]=s,n[10]=d):d=n[10],d}),h=`relative bg-surface-raised-solid before:pointer-events-none before:absolute before:inset-y-0 before:right-full before:w-4 before:bg-gradient-to-r before:from-transparent before:to-surface-raised-solid before:content-['']`;function g(e){let t=(0,c.c)(4),{children:n,hideInCompact:r,hideInTiny:i}=e,a=r===void 0?!1:r,o=i===void 0?!0:i,s=a?``:void 0,l=o?``:void 0,d;return t[0]!==n||t[1]!==s||t[2]!==l?(d=(0,u.jsx)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1.5 pr-2 text-xs text-muted-foreground`,"data-promptbox-hide-compact":s,"data-promptbox-hide-tiny":l,children:n}),t[0]=n,t[1]=s,t[2]=l,t[3]=d):d=t[3],d}function _(e){let t=(0,c.c)(27),{cancelLabel:n,children:r,label:l,onCancel:d,variant:f}=e,p=f===void 0?`embedded`:f,m=p===`cap`?`h-8 px-3`:`mb-1.5 pl-1`,h;t[0]===m?h=t[1]:(h=o(`flex min-h-7 items-center gap-1.5 text-xs text-subtle-foreground`,m),t[0]=m,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,u.jsx)(i,{name:`Edit`,className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[2]=g):g=t[2];let _=p===`cap`&&`font-medium`,v;t[3]===_?v=t[4]:(v=o(`shrink-0`,_),t[3]=_,t[4]=v);let y;t[5]!==l||t[6]!==v?(y=(0,u.jsx)(`span`,{className:v,children:l}),t[5]=l,t[6]=v,t[7]=y):y=t[7];let b;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,u.jsx)(i,{name:`X`,className:`size-3`,"aria-hidden":!0}),t[8]=b):b=t[8];let x;t[9]!==n||t[10]!==d?(x=(0,u.jsx)(a,{type:`button`,size:`icon`,variant:`ghost`,className:`ml-auto size-6 shrink-0 text-subtle-foreground`,onClick:d,"aria-label":n,children:b}),t[9]=n,t[10]=d,t[11]=x):x=t[11];let S;t[12]!==h||t[13]!==y||t[14]!==x?(S=(0,u.jsxs)(`div`,{className:h,children:[g,y,x]}),t[12]=h,t[13]=y,t[14]=x,t[15]=S):S=t[15];let C=S;if(p===`cap`){let e;t[16]!==C||t[17]!==l?(e=(0,u.jsx)(s,{ariaLabel:l,className:`relative z-10 -mb-5 rounded-xl rounded-b-none border-b-0 bg-surface-raised-solid pb-3 shadow-lift`,children:C}),t[16]=C,t[17]=l,t[18]=e):e=t[18];let n;t[19]===r?n=t[20]:(n=(0,u.jsx)(`div`,{className:`relative z-20`,children:r}),t[19]=r,t[20]=n);let i;return t[21]!==e||t[22]!==n?(i=(0,u.jsxs)(`div`,{className:`relative z-20 space-y-2`,"data-inline-message-editor-frame":`cap`,children:[e,n]}),t[21]=e,t[22]=n,t[23]=i):i=t[23],i}let w;return t[24]!==r||t[25]!==C?(w=(0,u.jsxs)(`div`,{className:`relative z-20`,"data-inline-message-editor-frame":`embedded`,children:[C,r]}),t[24]=r,t[25]=C,t[26]=w):w=t[26],w}export{m as i,g as n,h as r,_ as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Dh as r,Fh as i,tn as a}from"./index-DCps_qBD.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(3),{provider:n,className:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,s.jsx)(a,{providerKind:`machine`,provider:n,fallback:`Zap`,className:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function l(e,t){return e.type!==`ephemeral`||e.machineProviderId===null?null:t?.id===e.machineProviderId?t:{id:e.machineProviderId,displayName:e.machineProviderId,icon:`ComputerCloud`,logoUrl:null}}function u(e){let t=(0,o.c)(12),{host:n,machineProvider:a,className:u}=e,d;t[0]!==n||t[1]!==a?(d=l(n,a),t[0]=n,t[1]=a,t[2]=d):d=t[2];let f=d;if(f===null){let e;t[3]===u?e=t[4]:(e=i(`size-3.5 shrink-0`,u),t[3]=u,t[4]=e);let n;return t[5]===e?n=t[6]:(n=(0,s.jsx)(r,{name:`Laptop`,className:e,"aria-hidden":!0}),t[5]=e,t[6]=n),n}let p;t[7]===u?p=t[8]:(p=i(`size-3.5 shrink-0`,u),t[7]=u,t[8]=p);let m;return t[9]!==f||t[10]!==p?(m=(0,s.jsx)(c,{provider:f,className:p}),t[9]=f,t[10]=p,t[11]=m):m=t[11],m}function d(e){let t=(0,o.c)(15),{host:n,machineProvider:r,className:a,iconClassName:c,nameClassName:l}=e,d;t[0]===a?d=t[1]:(d=i(`inline-flex min-w-0 items-center gap-1.5`,a),t[0]=a,t[1]=d);let f;t[2]!==n||t[3]!==c||t[4]!==r?(f=(0,s.jsx)(u,{host:n,machineProvider:r,className:c}),t[2]=n,t[3]=c,t[4]=r,t[5]=f):f=t[5];let p;t[6]===l?p=t[7]:(p=i(`min-w-0 truncate`,l),t[6]=l,t[7]=p);let m;t[8]!==n.name||t[9]!==p?(m=(0,s.jsx)(`span`,{className:p,children:n.name}),t[8]=n.name,t[9]=p,t[10]=m):m=t[10];let h;return t[11]!==d||t[12]!==f||t[13]!==m?(h=(0,s.jsxs)(`span`,{className:d,children:[f,m]}),t[11]=d,t[12]=f,t[13]=m,t[14]=h):h=t[14],h}export{d as n,u as t};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Ah as r,Rh as i,in as a}from"./index-DcGF-i5V.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(3),{provider:n,className:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,s.jsx)(a,{providerKind:`machine`,provider:n,fallback:`Zap`,className:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function l(e,t){return e.type!==`ephemeral`||e.machineProviderId===null?null:t?.id===e.machineProviderId?t:{id:e.machineProviderId,displayName:e.machineProviderId,icon:`ComputerCloud`,logoUrl:null}}function u(e){let t=(0,o.c)(12),{host:n,machineProvider:a,className:u}=e,d;t[0]!==n||t[1]!==a?(d=l(n,a),t[0]=n,t[1]=a,t[2]=d):d=t[2];let f=d;if(f===null){let e;t[3]===u?e=t[4]:(e=i(`size-3.5 shrink-0`,u),t[3]=u,t[4]=e);let n;return t[5]===e?n=t[6]:(n=(0,s.jsx)(r,{name:`Laptop`,className:e,"aria-hidden":!0}),t[5]=e,t[6]=n),n}let p;t[7]===u?p=t[8]:(p=i(`size-3.5 shrink-0`,u),t[7]=u,t[8]=p);let m;return t[9]!==f||t[10]!==p?(m=(0,s.jsx)(c,{provider:f,className:p}),t[9]=f,t[10]=p,t[11]=m):m=t[11],m}function d(e){let t=(0,o.c)(15),{host:n,machineProvider:r,className:a,iconClassName:c,nameClassName:l}=e,d;t[0]===a?d=t[1]:(d=i(`inline-flex min-w-0 items-center gap-1.5`,a),t[0]=a,t[1]=d);let f;t[2]!==n||t[3]!==c||t[4]!==r?(f=(0,s.jsx)(u,{host:n,machineProvider:r,className:c}),t[2]=n,t[3]=c,t[4]=r,t[5]=f):f=t[5];let p;t[6]===l?p=t[7]:(p=i(`min-w-0 truncate`,l),t[6]=l,t[7]=p);let m;t[8]!==n.name||t[9]!==p?(m=(0,s.jsx)(`span`,{className:p,children:n.name}),t[8]=n.name,t[9]=p,t[10]=m):m=t[10];let h;return t[11]!==d||t[12]!==f||t[13]!==m?(h=(0,s.jsxs)(`span`,{className:d,children:[f,m]}),t[11]=d,t[12]=f,t[13]=m,t[14]=h):h=t[14],h}export{d as n,u as t};