@p4code/cli 0.8.13 → 0.8.15

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 (294) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/{binCli-B9aQxlIK.mjs → binCli-IAUzRF0Y.mjs} +283 -105
  3. package/dist/client/.vite/manifest.json +2143 -2143
  4. package/dist/client/assets/AlertDialogRoot-DYtW2IF3.js +2 -0
  5. package/dist/client/assets/{AnimatedHeight-CH-N3JTc.js → AnimatedHeight-CzFc8xri.js} +2 -2
  6. package/dist/client/assets/{AuthSurfaceShell-CJdXkxyH.js → AuthSurfaceShell-ByOYQAV0.js} +2 -2
  7. package/dist/client/assets/{CSPContext-4VAD2_gc.js → CSPContext-DcW0os5z.js} +2 -2
  8. package/dist/client/assets/{ChatGptUsageButton-7u9uPgbK.js → ChatGptUsageButton-KFBZLDN7.js} +2 -2
  9. package/dist/client/assets/{ChatMarkdown-C22JFyYa.js → ChatMarkdown-BoxySKsC.js} +4 -4
  10. package/dist/client/assets/{CheckboxIndicator-ClY0P0ol.js → CheckboxIndicator-DRAilQdq.js} +2 -2
  11. package/dist/client/assets/{CodexSetupSection.logic-CEAT7YdZ.js → CodexSetupSection.logic-d-rT4H0o.js} +2 -2
  12. package/dist/client/assets/{CollapsiblePanel-Cubscn-a.js → CollapsiblePanel-DMH4QH0_.js} +2 -2
  13. package/dist/client/assets/{ComboboxClear-qTthzuJh.js → ComboboxClear-DV4ygCOL.js} +2 -2
  14. package/dist/client/assets/{CommandBlock-CWt29kmi.js → CommandBlock-_boutMAe.js} +2 -2
  15. package/dist/client/assets/{ComposerPromptEditor-Bt_L4smq.js → ComposerPromptEditor-BTCrYVhm.js} +4 -4
  16. package/dist/client/assets/{CompositeRoot-DUqf78yV.js → CompositeRoot-CsrLt1o5.js} +2 -2
  17. package/dist/client/assets/{ConnectionStatusDot-cdpNRZhA.js → ConnectionStatusDot-uWbIqk3l.js} +2 -2
  18. package/dist/client/assets/{DevicePanel-CZm-f5TC.js → DevicePanel-DwMrOlt0.js} +2 -2
  19. package/dist/client/assets/{DeviceSetup-BdrkGme6.js → DeviceSetup-CbOHLIaV.js} +2 -2
  20. package/dist/client/assets/{DialogTitle-CQU6s1Wy.js → DialogTitle-BgclXafx.js} +2 -2
  21. package/dist/client/assets/{DiffCommentAnnotation-B-XoYYxb.js → DiffCommentAnnotation-Aq3V-yP1.js} +2 -2
  22. package/dist/client/assets/{DiffFileTree-CwTkSU3R.js → DiffFileTree-CKQPTUag.js} +2 -2
  23. package/dist/client/assets/{DiffPanel-BCI9XXpF.js → DiffPanel-BXML30Ty.js} +2 -2
  24. package/dist/client/assets/{DiffWorkerPoolProvider-OPZsOibX.js → DiffWorkerPoolProvider-CibTihO7.js} +2 -2
  25. package/dist/client/assets/{EmbeddedDesign-DwRAPHYl.js → EmbeddedDesign-722JShay.js} +2 -2
  26. package/dist/client/assets/{EnvironmentMachineIcon-DCdlTSYU.js → EnvironmentMachineIcon-Czk_PJpp.js} +2 -2
  27. package/dist/client/assets/{ExpandableText-BtdwzlFy.js → ExpandableText-Ggw0uVXl.js} +2 -2
  28. package/dist/client/assets/{FieldControl-BI2gK4Z0.js → FieldControl-Bw2_eFMa.js} +2 -2
  29. package/dist/client/assets/{FileDiff-BkJG5QAe.js → FileDiff-Cen-Dayi.js} +2 -2
  30. package/dist/client/assets/{FilePreviewPanel-CURtQAD1.js → FilePreviewPanel-BMK5AG_P.js} +2 -2
  31. package/dist/client/assets/{FoldedSettingsSection-B9B8i8Gg.js → FoldedSettingsSection-G9y7luve.js} +2 -2
  32. package/dist/client/assets/{FormContext-Bgwez2tv.js → FormContext-7fCTOXXA.js} +2 -2
  33. package/dist/client/assets/{Icons-B5JVkp3z.js → Icons-CSAp87pJ.js} +2 -2
  34. package/dist/client/assets/Input-Cr3X6dPy.js +2 -0
  35. package/dist/client/assets/{KeybindingsSettings.logic-6lVDnd1N.js → KeybindingsSettings.logic-CsSjvH9c.js} +2 -2
  36. package/dist/client/assets/{NoProjectsHero-CkhVaJk9.js → NoProjectsHero-iGEFavkK.js} +2 -2
  37. package/dist/client/assets/{PanelLayoutControls-CxuV0JO3.js → PanelLayoutControls-C4Gm81F_.js} +4 -4
  38. package/dist/client/assets/{PierreEntryIcon-CPG-jnaN.js → PierreEntryIcon-CnGUKKOC.js} +2 -2
  39. package/dist/client/assets/{PopoverHandle-CBT8hFut.js → PopoverHandle-BkhR-kKK.js} +2 -2
  40. package/dist/client/assets/{PreviewPanel-Doh1peEu.js → PreviewPanel-BZNqorNM.js} +2 -2
  41. package/dist/client/assets/{ProjectDefaultsSettings-DfhAk0_Y.js → ProjectDefaultsSettings-DzMIpb2U.js} +2 -2
  42. package/dist/client/assets/{ProjectFavicon-DUW6Bo66.js → ProjectFavicon-Dk18tk1C.js} +3 -3
  43. package/dist/client/assets/{ProjectIconPickerDialog-C613hnVY.js → ProjectIconPickerDialog-DnmG78V1.js} +2 -2
  44. package/dist/client/assets/{ProjectMonogram-B9iJhcVp.js → ProjectMonogram-CWdfC9NP.js} +2 -2
  45. package/dist/client/assets/{ProviderAuthTerminal-eq346NX_.js → ProviderAuthTerminal-nDUEuuwR.js} +2 -2
  46. package/dist/client/assets/{ProviderModelPicker-DPb-88ui.js → ProviderModelPicker-DhOV_BIX.js} +2 -2
  47. package/dist/client/assets/{ProviderSettingsForm-DTYqzs8W.js → ProviderSettingsForm-Cyw48DUr.js} +2 -2
  48. package/dist/client/assets/{PullRequestCodeTab-BBz0FfLD.js → PullRequestCodeTab-BpjwcQvb.js} +2 -2
  49. package/dist/client/assets/{ReadOnlySourcePreview-CkeeLVAm.js → ReadOnlySourcePreview-DMF3eLls.js} +2 -2
  50. package/dist/client/assets/{RenderErrorBoundary-mfAvIiFU.js → RenderErrorBoundary-DQC7sq87.js} +2 -2
  51. package/dist/client/assets/{ScheduledTasksSettings-BMUE9M9Z.js → ScheduledTasksSettings-CZK46eKO.js} +2 -2
  52. package/dist/client/assets/{ScopedSwitch-BKOdsllO.js → ScopedSwitch-BECzQob0.js} +2 -2
  53. package/dist/client/assets/{ScrollAreaCorner-CoeXGFSL.js → ScrollAreaCorner-DXYr9Xbu.js} +2 -2
  54. package/dist/client/assets/{SecretInput-CROqj1gF.js → SecretInput-WUih9JDs.js} +2 -2
  55. package/dist/client/assets/{SelectScrollUpArrow-SDOpV3nj.js → SelectScrollUpArrow-BIdW5z3c.js} +2 -2
  56. package/dist/client/assets/{SettingsPanels-BHhMJaVc.js → SettingsPanels-B3TcgEEZ.js} +2 -2
  57. package/dist/client/assets/{SettingsPanels.logic-BwmY39Sq.js → SettingsPanels.logic-DpJJdWIn.js} +2 -2
  58. package/dist/client/assets/{SettingsScopeNotice-DAPsshab.js → SettingsScopeNotice-CcgRSc9E.js} +2 -2
  59. package/dist/client/assets/{T3ConnectAccountPages-CDuVbE2z.js → T3ConnectAccountPages-8GTdhVAB.js} +2 -2
  60. package/dist/client/assets/{T3ConnectSidebarSignIn-BSQHp-Xq.js → T3ConnectSidebarSignIn-CY6WtOps.js} +2 -2
  61. package/dist/client/assets/{ThemeEditorPanel-BiuI7Uiy.js → ThemeEditorPanel-i2RAKM6Z.js} +2 -2
  62. package/dist/client/assets/{ThreadTerminalDrawer-B8n6TAqv.js → ThreadTerminalDrawer-D7lW_0Ez.js} +2 -2
  63. package/dist/client/assets/{TooltipViewport-BKD6QABG.js → TooltipViewport-Daddx30c.js} +2 -2
  64. package/dist/client/assets/{Virtualizer-CTnacEby.js → Virtualizer-CTxMd1UV.js} +2 -2
  65. package/dist/client/assets/{WorkspaceBreadcrumb-BmVcurpi.js → WorkspaceBreadcrumb-B3WecLwo.js} +2 -2
  66. package/dist/client/assets/{WorkspacePageContainer-BSjVd7h4.js → WorkspacePageContainer-rn16R8Ps.js} +2 -2
  67. package/dist/client/assets/{WorkspacePageHeader-BLYOcS9Z.js → WorkspacePageHeader-B2wsiKGJ.js} +2 -2
  68. package/dist/client/assets/{_chat-z348gvgF.js → _chat-DCAacYa_.js} +6 -6
  69. package/dist/client/assets/{_chat.index-CBbUzaK7.js → _chat.index-CqT22uaz.js} +2 -2
  70. package/dist/client/assets/{_chat.new-7TTfcDf1.js → _chat.new-CTRPd-7l.js} +2 -2
  71. package/dist/client/assets/{_chat.pull-requests-BE7Q2lUu.js → _chat.pull-requests-DZwiHPhH.js} +2 -2
  72. package/dist/client/assets/{abnfDiagram-VCTEODGH-HaXM7twL.js → abnfDiagram-VCTEODGH-0sYdmV4a.js} +2 -2
  73. package/dist/client/assets/{alert-5swcxUBm.js → alert-CvIEaZOb.js} +2 -2
  74. package/dist/client/assets/architecture-7GRP2DOG-Cre3v_DI.js +1 -0
  75. package/dist/client/assets/{architectureDiagram-5GKGNRK7-BhWXFsXS.js → architectureDiagram-5GKGNRK7-CyILOixS.js} +2 -2
  76. package/dist/client/assets/{assets-DXnV2oRj.js → assets-CqHuBXjp.js} +2 -2
  77. package/dist/client/assets/{blockDiagram-I7D4REHJ-D213N9iF.js → blockDiagram-I7D4REHJ-x-VvNLUl.js} +2 -2
  78. package/dist/client/assets/{browserHistoryStore-DURO3U2L.js → browserHistoryStore-BpqZwrsk.js} +2 -2
  79. package/dist/client/assets/{browserLinkTarget-DcGx3A8F.js → browserLinkTarget-EXHYn6yB.js} +2 -2
  80. package/dist/client/assets/{c4Diagram-7LVT6UL2-58POuQV-.js → c4Diagram-7LVT6UL2-B0k0wHF6.js} +2 -2
  81. package/dist/client/assets/channel-DQC0VAAf.js +2 -0
  82. package/dist/client/assets/{checkbox-1tz9neVf.js → checkbox-EHQPSidC.js} +2 -2
  83. package/dist/client/assets/{chunk-4HAMMTFA-Bcwcw8Wz.js → chunk-4HAMMTFA-Uul0p-TJ.js} +2 -2
  84. package/dist/client/assets/{chunk-75Z2AOVW-BaYdZ0Fq.js → chunk-75Z2AOVW-SUa_8bmt.js} +2 -2
  85. package/dist/client/assets/{chunk-DU6HZSFF-B6TRgw4-.js → chunk-DU6HZSFF-DZ_qPx6g.js} +2 -2
  86. package/dist/client/assets/{chunk-F27PBJKO-B5arSwg6.js → chunk-F27PBJKO-DNArajpV.js} +2 -2
  87. package/dist/client/assets/{chunk-GMAD6QVW-XeNCd3gb.js → chunk-GMAD6QVW-DCcQWsDo.js} +2 -2
  88. package/dist/client/assets/{chunk-GVQU2GXP-CWVbbWh7.js → chunk-GVQU2GXP-CUeM0ruH.js} +2 -2
  89. package/dist/client/assets/{chunk-IMKFNOWR-Cb-yxIAE.js → chunk-IMKFNOWR-Dz48fQ1q.js} +2 -2
  90. package/dist/client/assets/{chunk-L3NEJ4N5-Di7nZhzu.js → chunk-L3NEJ4N5-Css7u6Lh.js} +2 -2
  91. package/dist/client/assets/{chunk-OSK3NFVY-DcqBXKUK.js → chunk-OSK3NFVY-CDaAT2I-.js} +2 -2
  92. package/dist/client/assets/{chunk-P2QGCYS3-DJ1kMiTY.js → chunk-P2QGCYS3-CrKr6f8Y.js} +2 -2
  93. package/dist/client/assets/{chunk-POPQ4Y6H-Ba9RYr-b.js → chunk-POPQ4Y6H-BqMK6oaX.js} +2 -2
  94. package/dist/client/assets/{chunk-PWAF6VOD-D4Ch07S8.js → chunk-PWAF6VOD-CyuqbEJS.js} +2 -2
  95. package/dist/client/assets/{chunk-SHT3W25Y-BafMUZgc.js → chunk-SHT3W25Y-BrH-w9EI.js} +2 -2
  96. package/dist/client/assets/{chunk-SVP7TREG-CsEVe0s3.js → chunk-SVP7TREG-DC8LP4Dl.js} +2 -2
  97. package/dist/client/assets/{chunk-TICWLB2K-D3tgdZlp.js → chunk-TICWLB2K-D9Rk3v5O.js} +2 -2
  98. package/dist/client/assets/classDiagram-ZZMXUADV-BnsjDrR7.js +2 -0
  99. package/dist/client/assets/classDiagram-v2-VYDZK3BY-BnsjDrR7.js +2 -0
  100. package/dist/client/assets/{color-picker-N6f_Hu7P.js → color-picker-Dd1K-QRk.js} +2 -2
  101. package/dist/client/assets/{combobox-B07cVaQY.js → combobox-BqpUmoio.js} +2 -2
  102. package/dist/client/assets/{command-B70eQIps.js → command-D1peviZr.js} +2 -2
  103. package/dist/client/assets/{connect-Vt7wlrih.js → connect-_R8iiudK.js} +2 -2
  104. package/dist/client/assets/{connect-agent-CX70rAkF.js → connect-agent-hovmaVDF.js} +2 -2
  105. package/dist/client/assets/{cynefin-OW5HDTMX-CU8HnD4F.js → cynefin-OW5HDTMX-EgbU-rQt.js} +1 -1
  106. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-Cvc6_oYZ.js → cynefinDiagram-5FMLGOSQ-D1_um-xk.js} +2 -2
  107. package/dist/client/assets/{dagre-GXQ25YYZ-Bx5buWLS.js → dagre-GXQ25YYZ-BUeriIID.js} +2 -2
  108. package/dist/client/assets/{device-BgvBRE7C.js → device-DIh4Fmq_.js} +2 -2
  109. package/dist/client/assets/{diagram-S7CK7UJ4-CPZrAy0P.js → diagram-S7CK7UJ4-Du3htb_X.js} +2 -2
  110. package/dist/client/assets/{diagram-UQ7AKVKN-kBtSnHpL.js → diagram-UQ7AKVKN-B02FTV2h.js} +2 -2
  111. package/dist/client/assets/{diagram-VSXAHHWV-DQP2q1tS.js → diagram-VSXAHHWV-C-GXxjgO.js} +2 -2
  112. package/dist/client/assets/{diagram-VX7I27RA-DRUN0yEk.js → diagram-VX7I27RA-C9x6jBO2.js} +2 -2
  113. package/dist/client/assets/{diagram-Z3DM3KII-D4WMsQZZ.js → diagram-Z3DM3KII-BOzwpZ6f.js} +2 -2
  114. package/dist/client/assets/{dialog-DmneyTGi.js → dialog-BfenC7sz.js} +2 -2
  115. package/dist/client/assets/{diffRendering-iR2meoVj.js → diffRendering-EPxtkQvT.js} +2 -2
  116. package/dist/client/assets/{discovery-list-ZGkddsst.js → discovery-list-NHMaJPrr.js} +2 -2
  117. package/dist/client/assets/{dist-vr51zfzA.js → dist-BgOJfdC2.js} +3 -3
  118. package/dist/client/assets/{draft-input-DHZ1J7B_.js → draft-input-rVkOduh_.js} +2 -2
  119. package/dist/client/assets/{duoViewer-DTVry3xd.js → duoViewer-CbfTiSKj.js} +2 -2
  120. package/dist/client/assets/{dynamic-CuoX2JEO.js → dynamic-7n-O1eEM.js} +2 -2
  121. package/dist/client/assets/{ebnfDiagram-PWID7BFC-BNUtunQw.js → ebnfDiagram-PWID7BFC-B-aK7ztf.js} +2 -2
  122. package/dist/client/assets/{embeddedScripts-BMvBWRz_.js → embeddedScripts-D-v7UxHT.js} +2 -2
  123. package/dist/client/assets/{empty-hFNkAHps.js → empty-xf3NEL4p.js} +2 -2
  124. package/dist/client/assets/{entities-7B8nzlQw.js → entities-CyQRuOur.js} +2 -2
  125. package/dist/client/assets/{environments-DYIXXf7q.js → environments-CjU9SGCA.js} +2 -2
  126. package/dist/client/assets/{erDiagram-RLTQ6QDP-DHjjowZq.js → erDiagram-RLTQ6QDP-BUkP1ax_.js} +2 -2
  127. package/dist/client/assets/eventmodeling-NTZA5JFV-an9DCCTW.js +1 -0
  128. package/dist/client/assets/{fileLinks-BYi-XNUG.js → fileLinks-sFAkJkUp.js} +2 -2
  129. package/dist/client/assets/{fileTreeExpansion-DIOxQqDo.js → fileTreeExpansion-BoG00fm4.js} +2 -2
  130. package/dist/client/assets/flowDiagram-HODETNUW-pchK5tHw.js +1 -0
  131. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-DEPOqoj0.js → ganttDiagram-EL5Y4UJY-C9-_e4R8.js} +2 -2
  132. package/dist/client/assets/{getDiffFileInput-DMj15wpy.js → getDiffFileInput-Eacwf1x6.js} +2 -2
  133. package/dist/client/assets/{gitGraph-4MIJSDKK-BGKW_zhb.js → gitGraph-4MIJSDKK-DpJxnpww.js} +1 -1
  134. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-7UhsI5zi.js → gitGraphDiagram-WWUBYQGX-D1kbQfjj.js} +2 -2
  135. package/dist/client/assets/{guideRunStore-BEkwZ9H7.js → guideRunStore-pssxpidL.js} +2 -2
  136. package/dist/client/assets/{htmlRender-BxVc1PlI.js → htmlRender-CDbYs9Mi.js} +2 -2
  137. package/dist/client/assets/{index-C_MVyH59.js → index-BcfzEf8A.js} +3 -3
  138. package/dist/client/assets/{info-A6RAGUB7-jvyzx_4e.js → info-A6RAGUB7-NwzA9LEB.js} +1 -1
  139. package/dist/client/assets/{infoDiagram-27XIBGKW-lTTpu3as.js → infoDiagram-27XIBGKW--zzuhsyp.js} +2 -2
  140. package/dist/client/assets/{input-RqvQJ9gh.js → input-CF-egQtG.js} +2 -2
  141. package/dist/client/assets/{input-group-BFtrsedw.js → input-group-CifPZlNg.js} +2 -2
  142. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-DlrQNGG9.js → ishikawaDiagram-5VMMS53U-BtNAzuJP.js} +2 -2
  143. package/dist/client/assets/{journeyDiagram-3NMN7TZE-Buy9e-fU.js → journeyDiagram-3NMN7TZE-CkOdxsrK.js} +2 -2
  144. package/dist/client/assets/{kanban-definition-UXKFOSKX-1KgAXH0g.js → kanban-definition-UXKFOSKX-L-Zve5xm.js} +2 -2
  145. package/dist/client/assets/{kbd-BnsXAHsc.js → kbd-DN9MXWor.js} +2 -2
  146. package/dist/client/assets/{keybindings-BtHOXkP-.js → keybindings-BlEA4Dlt.js} +2 -2
  147. package/dist/client/assets/{lazyRouteComponent-T0YE6Rn9.js → lazyRouteComponent-b9hpLjZB.js} +2 -2
  148. package/dist/client/assets/{line-DUV1hs6X.js → line-CUIFqVat.js} +2 -2
  149. package/dist/client/assets/{link-gKYnbTYT.js → link-BIudTto8.js} +2 -2
  150. package/dist/client/assets/{linkedPrompt-Da8rJho3.js → linkedPrompt-DQkjE7kc.js} +2 -2
  151. package/dist/client/assets/{main-Bh6Hj0_-.js → main-C58_iQqs.js} +7 -7
  152. package/dist/client/assets/{mediaReference-CLlAiRVc.js → mediaReference-D5Qxnp2d.js} +2 -2
  153. package/dist/client/assets/{mediaSource-BTCWn94E.js → mediaSource-DRXKCFCg.js} +2 -2
  154. package/dist/client/assets/{mermaid-parser.core-CsBuWV4-.js → mermaid-parser.core-Dy9NqIcU.js} +4 -4
  155. package/dist/client/assets/{mermaid.core-BcICv5EB.js → mermaid.core-C1Tbkxei.js} +5 -5
  156. package/dist/client/assets/{mindmap-definition-YA3MSWOX-BqCqe4io.js → mindmap-definition-YA3MSWOX-CNHVmlJ4.js} +2 -2
  157. package/dist/client/assets/{number-field-DIYUxout.js → number-field-CydqGM9B.js} +2 -2
  158. package/dist/client/assets/{observeResize-D9ECzP-D.js → observeResize-BxVCxCXG.js} +2 -2
  159. package/dist/client/assets/{onboarding-COQ6KgRG.js → onboarding-DQxSrthd.js} +2 -2
  160. package/dist/client/assets/{openFileInPreview-BhRAqg63.js → openFileInPreview-tPdJXpV4.js} +2 -2
  161. package/dist/client/assets/{p4ProjectFile-z5Hlq99W.js → p4ProjectFile-Dqppy-Sd.js} +2 -2
  162. package/dist/client/assets/{packet-AYTQ26CC-BYCaPqFA.js → packet-AYTQ26CC-D66WQAPv.js} +1 -1
  163. package/dist/client/assets/{pair-BDKjGij-.js → pair-BgezPXaC.js} +2 -2
  164. package/dist/client/assets/{pegDiagram-XKGWAZYB-CqCw5Z-L.js → pegDiagram-XKGWAZYB-D4RZHNwH.js} +2 -2
  165. package/dist/client/assets/{phoneViewer-DLSM0QXE.js → phoneViewer-DKIr7vIR.js} +2 -2
  166. package/dist/client/assets/{pie-WAS4IAKB-BfOlqQx1.js → pie-WAS4IAKB-ChXk3493.js} +1 -1
  167. package/dist/client/assets/{pieDiagram-E7YTZNPT-DZpCrUQF.js → pieDiagram-E7YTZNPT-BYlPIaAz.js} +2 -2
  168. package/dist/client/assets/{pierre-icons-BG7vd34x.js → pierre-icons-ByQ4P7uM.js} +2 -2
  169. package/dist/client/assets/{popover-DE9WCm99.js → popover-BunL7s_L.js} +2 -2
  170. package/dist/client/assets/{preview-Cl-7ojv-.js → preview-B_wcdd8X.js} +2 -2
  171. package/dist/client/assets/{preview-bd-MGMMz.js → preview-DDUAtKQn.js} +2 -2
  172. package/dist/client/assets/{previewMiniPlayerStore-Bz1T9oVV.js → previewMiniPlayerStore-gZV-IkW-.js} +2 -2
  173. package/dist/client/assets/{primary-BwHoAoya.js → primary-BI3yNRjI.js} +2 -2
  174. package/dist/client/assets/{primaryCloudLinkState-DtOYGRkF.js → primaryCloudLinkState-Dn_lMN_C.js} +2 -2
  175. package/dist/client/assets/{projectFilesQueryState-BP_JvI7-.js → projectFilesQueryState-DfToGDLi.js} +2 -2
  176. package/dist/client/assets/{projectScriptEditor-BGLshibY.js → projectScriptEditor-De4HeOtY.js} +2 -2
  177. package/dist/client/assets/{providerSkills-DxYtwoxJ.js → providerSkills-DrIXn_7R.js} +2 -2
  178. package/dist/client/assets/{pullRequestDetail.logic-C_aVDAY_.js → pullRequestDetail.logic-CGUKFcHo.js} +2 -2
  179. package/dist/client/assets/{pullRequestIcons-D5Yo5Zsn.js → pullRequestIcons-BZCS4C5B.js} +2 -2
  180. package/dist/client/assets/{pullRequestReviewStore-DaEzt1m1.js → pullRequestReviewStore-BqvYYzmT.js} +2 -2
  181. package/dist/client/assets/{pullRequests-D0no1PZS.js → pullRequests-tIwkUcK2.js} +2 -2
  182. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-BTtuOXlL.js → quadrantDiagram-AXDQQJYC-kMIaUDbV.js} +2 -2
  183. package/dist/client/assets/{queries-DkmaXOL-.js → queries-DMjiMwzO.js} +2 -2
  184. package/dist/client/assets/{query-Bd5_Y_Vy.js → query-CRswjQ7f.js} +2 -2
  185. package/dist/client/assets/{radar-RG4KPBEZ-BiJgnIUY.js → radar-RG4KPBEZ-_vEYfKqV.js} +1 -1
  186. package/dist/client/assets/{radio-group-CBunNtTU.js → radio-group-DzD2uI5x.js} +2 -2
  187. package/dist/client/assets/{railroad-74A4TZTK-C0CA0mcr.js → railroad-74A4TZTK-BiD9GwPs.js} +1 -1
  188. package/dist/client/assets/railroad-abnf-HS5TGJTU-Dx3SBIg8.js +1 -0
  189. package/dist/client/assets/railroad-ebnf-LZEXJU2U-DqrIX1EX.js +1 -0
  190. package/dist/client/assets/railroad-peg-WCYAUIDC-zKUem5fh.js +1 -0
  191. package/dist/client/assets/{railroadDiagram-O6MQD6OU-WczOSoF4.js → railroadDiagram-O6MQD6OU-VThEbY2-.js} +2 -2
  192. package/dist/client/assets/{renderScheduler-BLjFSKnt.js → renderScheduler-ZbiToRGe.js} +2 -2
  193. package/dist/client/assets/{requirementDiagram-BXWQKSXE-B3qCIQP5.js → requirementDiagram-BXWQKSXE-CYlc8xoq.js} +2 -2
  194. package/dist/client/assets/{rightPanelStore-6-YhsfkE.js → rightPanelStore-CcmIdfDA.js} +2 -2
  195. package/dist/client/assets/{runtime-Bni_zt6P.js → runtime-BjJBBHTp.js} +2 -2
  196. package/dist/client/assets/{runtime-D8mKjOP-.js → runtime-D102A-Bu.js} +3 -3
  197. package/dist/client/assets/{runtimeModeConfig-C3q8YqVA.js → runtimeModeConfig-CGosfJJ5.js} +2 -2
  198. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-e2-j7ERe.js → sankeyDiagram-P5KCCOFB-CHYSv9pX.js} +2 -2
  199. package/dist/client/assets/{scheduledTasksSettings.logic-BNC897-_.js → scheduledTasksSettings.logic-DhrwaClP.js} +2 -2
  200. package/dist/client/assets/{scroll-area-Davaj52_.js → scroll-area-OkcD8f0Y.js} +2 -2
  201. package/dist/client/assets/{select-B47XfaxQ.js → select-BUFUt6O3.js} +2 -2
  202. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-DG7-8UJk.js → sequenceDiagram-WJ2MYXX4-D1y7ChUn.js} +2 -2
  203. package/dist/client/assets/{server-CaLEm3Wt.js → server-DTGT8WWf.js} +2 -2
  204. package/dist/client/assets/{session-2CRBJwS7.js → session-Dh8maTO3.js} +2 -2
  205. package/dist/client/assets/session-logic-CJeISKsG.js +26 -0
  206. package/dist/client/assets/{settings-BIwaDm1N.js → settings-CrZbdtKO.js} +2 -2
  207. package/dist/client/assets/{settings.appearance-ToUM8fHh.js → settings.appearance-BNB57wVJ.js} +2 -2
  208. package/dist/client/assets/settings.archived-C3Vs8tIa.js +2 -0
  209. package/dist/client/assets/{settings.computer-use-BEghs16L.js → settings.computer-use-CNLnfXe7.js} +2 -2
  210. package/dist/client/assets/{settings.connections-C_LVk0gJ.js → settings.connections-CKn7dmOC.js} +2 -2
  211. package/dist/client/assets/{settings.data-controls-BaTil8NB.js → settings.data-controls-B8uFJ36x.js} +2 -2
  212. package/dist/client/assets/{settings.decisions-JTbMt08J.js → settings.decisions-Cy46-IzS.js} +2 -2
  213. package/dist/client/assets/{settings.diagnostics-ByG62ZGs.js → settings.diagnostics-BeATxGLt.js} +2 -2
  214. package/dist/client/assets/{settings.general-BT78z_Cn.js → settings.general-BAL2BKm_.js} +2 -2
  215. package/dist/client/assets/{settings.integrations-C3jj2T1d.js → settings.integrations-Bg8Ve2zj.js} +2 -2
  216. package/dist/client/assets/{settings.keybindings-CeqZWQEi.js → settings.keybindings-B3Yph4YE.js} +2 -2
  217. package/dist/client/assets/{settings.open-source-licenses-BAFwkfI8.js → settings.open-source-licenses-Dx_Hoxhs.js} +2 -2
  218. package/dist/client/assets/settings.plugins-TfmhiHSr.js +5 -0
  219. package/dist/client/assets/{settings.projects-Cqx1zAvs.js → settings.projects-DyqRcoD5.js} +3 -3
  220. package/dist/client/assets/{settings.providers-CS55UrI1.js → settings.providers-CqMvOZmv.js} +3 -3
  221. package/dist/client/assets/{settings.scheduled-tasks-CFJTEOb1.js → settings.scheduled-tasks-gzepleP4.js} +2 -2
  222. package/dist/client/assets/{settings.snap-shot-E3AITJyC.js → settings.snap-shot-DPIz29B9.js} +2 -2
  223. package/dist/client/assets/{settings.source-control-CWWy9E3b.js → settings.source-control-BMPVT8GA.js} +2 -2
  224. package/dist/client/assets/{settings.storage-BnUI1rFT.js → settings.storage-Cd4Vn9s1.js} +2 -2
  225. package/dist/client/assets/{settingsLayout-DHc6oKfL.js → settingsLayout-BRcW18Dy.js} +2 -2
  226. package/dist/client/assets/{sidebar-BkujXU9U.js → sidebar-CNP67lTi.js} +2 -2
  227. package/dist/client/assets/{sidebarProjectGrouping-DD4nu9RX.js → sidebarProjectGrouping-BRC9yCnW.js} +2 -2
  228. package/dist/client/assets/{skeleton-C6_D5JUu.js → skeleton-DDh76jpd.js} +2 -2
  229. package/dist/client/assets/{sortable.esm-BAEGChD3.js → sortable.esm-KZlxUbRj.js} +2 -2
  230. package/dist/client/assets/{sourceControl-BAghu6LN.js → sourceControl-DXwrIEUZ.js} +2 -2
  231. package/dist/client/assets/{spinner-CpLstN6u.js → spinner-DYnZ-Bpa.js} +2 -2
  232. package/dist/client/assets/{standalone-page-7vaVYOp-.js → standalone-page-DUgQaNPq.js} +2 -2
  233. package/dist/client/assets/{stateDiagram-D77RDMKH-CpZF58eW.js → stateDiagram-D77RDMKH-DhHX_ym0.js} +2 -2
  234. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Dy0yVJgc.js +2 -0
  235. package/dist/client/assets/{swimlanes-42K2YHIH-D1b49puG.js → swimlanes-42K2YHIH-gr_Fo6MW.js} +2 -2
  236. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-CPHF5kgn.js +9 -0
  237. package/dist/client/assets/{terminal-links-CjmSI9gV.js → terminal-links-CV_3r1U3.js} +2 -2
  238. package/dist/client/assets/{terminalSessions-Q2t1JYPS.js → terminalSessions-aS2PVMmc.js} +2 -2
  239. package/dist/client/assets/{textarea-DKdxwZZC.js → textarea-Dt0w6mtc.js} +2 -2
  240. package/dist/client/assets/{themePalette-7p_LOU3J.js → themePalette-9CODTNe7.js} +2 -2
  241. package/dist/client/assets/{threadSort-C5oCCRfj.js → threadSort-BGtAZpdL.js} +2 -2
  242. package/dist/client/assets/{timeline-definition-24CTP7MA-89AJY6KO.js → timeline-definition-24CTP7MA-DOSB4Ras.js} +2 -2
  243. package/dist/client/assets/{toast-DhMYg_gN.js → toast-SPJYfh08.js} +2 -2
  244. package/dist/client/assets/{toggle-BshAsXT6.js → toggle-C3pF5hng.js} +2 -2
  245. package/dist/client/assets/{toggle-group-ZNzhUvHt.js → toggle-group-C4V_4iet.js} +2 -2
  246. package/dist/client/assets/{tooltip-Cq9yz15d.js → tooltip-Cco13jKX.js} +2 -2
  247. package/dist/client/assets/{treeView-Q6P3EWNA-CqNF2YcW.js → treeView-Q6P3EWNA-DTI4SxFY.js} +1 -1
  248. package/dist/client/assets/{treemap-WGGIJYW6-LJa3ZEYA.js → treemap-WGGIJYW6-CVnkW1D0.js} +1 -1
  249. package/dist/client/assets/{usage-CJVyABbK.js → usage-539lpsjW.js} +2 -2
  250. package/dist/client/assets/{usageAccess-CieOJbVm.js → usageAccess-CeCsk7TS.js} +2 -2
  251. package/dist/client/assets/{usageFormat-BEGhDYfU.js → usageFormat-CQXspPhL.js} +2 -2
  252. package/dist/client/assets/{usageShortcuts-DxuByyhD.js → usageShortcuts-DaMuOxo1.js} +2 -2
  253. package/dist/client/assets/{use-atom-command-x4GQBtio.js → use-atom-command-BHmF32aL.js} +2 -2
  254. package/dist/client/assets/{useAriaLabelledBy-u5efXUxw.js → useAriaLabelledBy-BinWYOc0.js} +2 -2
  255. package/dist/client/assets/{useHandleNewThread-CReGBX6y.js → useHandleNewThread-Tv2D0mTw.js} +2 -2
  256. package/dist/client/assets/{useLocation-B3ir4ben.js → useLocation-BQwksr61.js} +2 -2
  257. package/dist/client/assets/useNavigate-LjcLtV_e.js +2 -0
  258. package/dist/client/assets/{useNavigateBack-XQd0WINI.js → useNavigateBack-D2S1CDHR.js} +2 -2
  259. package/dist/client/assets/{useParams-Cil-ZIwd.js → useParams-D_8gJiai.js} +2 -2
  260. package/dist/client/assets/{usePermissionStatus-C4aMrLLP.js → usePermissionStatus-Bl_cAihc.js} +2 -2
  261. package/dist/client/assets/{usePullRequestActions-BL4mjngC.js → usePullRequestActions-DscMhi-m.js} +2 -2
  262. package/dist/client/assets/{useRegisterFieldControl-75QESVfk.js → useRegisterFieldControl-Bp078Il-.js} +2 -2
  263. package/dist/client/assets/{useScopedModelAvailability-CBOIiaXC.js → useScopedModelAvailability-BP4GoHk-.js} +2 -2
  264. package/dist/client/assets/{useSettings-Dx076NWT.js → useSettings-DUgjfqYw.js} +2 -2
  265. package/dist/client/assets/{useT3ConnectAuthPrompt-1zTdZLsH.js → useT3ConnectAuthPrompt-D0cW1Kb6.js} +2 -2
  266. package/dist/client/assets/utils-Dx_TSvdC.js +37 -0
  267. package/dist/client/assets/{vcsRefInvalidation-46AnO9mr.js → vcsRefInvalidation-CRBfa6Wz.js} +2 -2
  268. package/dist/client/assets/{vennDiagram-4TSXK5OY-CvvE7gMp.js → vennDiagram-4TSXK5OY-BVgFdMgp.js} +2 -2
  269. package/dist/client/assets/{wardley-WFR3VGLG-Ca8Qzkpo.js → wardley-WFR3VGLG-Dmh19KFW.js} +1 -1
  270. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-BBSNgSMI.js → wardleyDiagram-VM6X3IG4-CLjnvp-z.js} +2 -2
  271. package/dist/client/assets/{welcome-B3wsq5wK.js → welcome-BcEvYhrg.js} +2 -2
  272. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-D8OhWe48.js → xychartDiagram-S5SC5T6Z-CmyAZ93b.js} +2 -2
  273. package/dist/client/index.html +1 -1
  274. package/dist/{renderer-C4CdFj__.mjs → renderer-B8qsc7RL.mjs} +2 -2
  275. package/dist/{runtime-CCVFqL3Y.mjs → runtime-CEdmfdaF.mjs} +20 -6
  276. package/package.json +1 -1
  277. package/dist/client/assets/AlertDialogRoot-DvQNG7Nt.js +0 -2
  278. package/dist/client/assets/Input-BQRZG5rU.js +0 -2
  279. package/dist/client/assets/architecture-7GRP2DOG-CiMEl2LX.js +0 -1
  280. package/dist/client/assets/channel-CDbYAV2D.js +0 -2
  281. package/dist/client/assets/classDiagram-ZZMXUADV-Cdtwlmxc.js +0 -2
  282. package/dist/client/assets/classDiagram-v2-VYDZK3BY-Cdtwlmxc.js +0 -2
  283. package/dist/client/assets/eventmodeling-NTZA5JFV-DNKqiuCf.js +0 -1
  284. package/dist/client/assets/flowDiagram-HODETNUW-CbOoDtR7.js +0 -1
  285. package/dist/client/assets/railroad-abnf-HS5TGJTU-BtC_0p6z.js +0 -1
  286. package/dist/client/assets/railroad-ebnf-LZEXJU2U-IeTBC6cs.js +0 -1
  287. package/dist/client/assets/railroad-peg-WCYAUIDC-DLoLKYq3.js +0 -1
  288. package/dist/client/assets/session-logic-BLOBsHEA.js +0 -26
  289. package/dist/client/assets/settings.archived-Cq_qclay.js +0 -2
  290. package/dist/client/assets/settings.plugins-D5l1ZPSB.js +0 -5
  291. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-DewOo-MV.js +0 -2
  292. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-d9EGwk-5.js +0 -9
  293. package/dist/client/assets/useNavigate-DRqH9NhA.js +0 -2
  294. package/dist/client/assets/utils-BEVyjoxo.js +0 -37
@@ -1,4 +1,4 @@
1
- import{i as e,r as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{r}from"./Icon-l19w4AjM.js";import{Cm as i,Dc as a,Es as o,Ft as s,Ht as c,It as l,Jp as u,Jt as d,Kd as f,Ks as p,NE as m,Nt as h,Pp as g,Qp as _,Tp as v,Vt as y,Wd as b,XT as x,Zw as S,__ as C,_p as w,fh as T,gh as E,hd as D,ib as O,jm as k,ks as A,lE as j,lh as M,lp as N,mm as P,n_ as F,nn as I,rh as L,sr as R,t as z,vd as B,vp as V,xy as H,yp as U,zd as W}from"./utils-BEVyjoxo.js";import{W as ee,g as G}from"./runtime-D8mKjOP-.js";import{F as K,I as te,L as ne,Pt as re,x as ie}from"./runtime-Bni_zt6P.js";import{a as ae,i as oe,n as se,r as ce,t as le}from"./number-field-DIYUxout.js";import{a as q,c as ue,n as de,o as fe,s as pe,t as me}from"./select-B47XfaxQ.js";import{t as he}from"./spinner-CpLstN6u.js";import{t as ge}from"./link-gKYnbTYT.js";import{t as _e}from"./useNavigate-DRqH9NhA.js";import{i as ve}from"./toast-DhMYg_gN.js";import{a as ye,n as be,r as xe,t as Se}from"./tooltip-Cq9yz15d.js";import{t as Ce}from"./server-CaLEm3Wt.js";import{o as we}from"./session-2CRBJwS7.js";import{I as Te,L as Ee,M as De,N as Oe,P as ke,R as Ae,j as je,k as Me}from"./useSettings-Dx076NWT.js";import{n as Ne}from"./toastHelpers-Dsph6LwL.js";import{r as Pe}from"./queries-DkmaXOL-.js";import{A as Fe,H as Ie,I as Le,J as Re,M as ze,O as Be,R as Ve,S as He,T as Ue,U as We,W as Ge,X as Ke,Y as qe,Z as Je,d as Ye,h as Xe,j as Ze,m as Qe,q as $e,u as et,v as tt,y as nt}from"./themePalette-7p_LOU3J.js";import{$ as rt,D as it,G as at,f as ot,l as st,vt as ct,yt as lt}from"./diffRendering-iR2meoVj.js";import{A as ut,C as dt,D as ft,E as pt,T as mt,lt as ht,n as gt,st as _t,t as vt}from"./getDiffFileInput-DMj15wpy.js";import{t as yt}from"./env-wK1YYxA8.js";import{a as bt,l as xt,n as St,o as Ct,r as wt,s as Tt,t as Et}from"./combobox-B07cVaQY.js";import{t as Dt}from"./input-RqvQJ9gh.js";import{a as Ot,c as kt,i as At,o as jt,r as Mt,s as Nt,t as Pt}from"./dialog-DmneyTGi.js";import{m as Ft,r as It,t as Lt}from"./ComposerPromptEditor-Bt_L4smq.js";import{h as Rt,p as zt}from"./Icons-B5JVkp3z.js";import{t as Bt}from"./ProjectFavicon-DUW6Bo66.js";import{n as Vt,r as Ht,t as Ut}from"./input-group-BFtrsedw.js";import{c as Wt,r as Gt}from"./ThreadTerminalDrawer-B8n6TAqv.js";import{r as Kt,t as qt}from"./alert-5swcxUBm.js";import{B as Jt,F as Yt,I as Xt,L as Zt,P as Qt,U as $t,a as J,d as en,f as tn,i as nn,n as rn,r as Y,s as an,t as on}from"./settingsLayout-DHc6oKfL.js";import{$r as sn,An as cn,Ar as ln,C as un,Ca as dn,Da as fn,Dn as pn,Ea as mn,En as hn,Fa as gn,Fr as _n,Gr as vn,Ia as yn,Ir as bn,La as xn,Mr as Sn,Nr as Cn,Oa as wn,On as Tn,Pa as En,Pr as Dn,Qr as On,Ra as kn,S as An,Ta as jn,Tn as Mn,Ur as Nn,Xr as Pn,Zr as Fn,_i as In,b as Ln,ei as Rn,ir as X,ji as zn,jr as Bn,kn as Vn,ln as Hn,qa as Un,ti as Wn,w as Gn,wa as Kn,wn as qn,x as Jn,xa as Yn,xn as Xn,y as Zn}from"./main-Bh6Hj0_-.js";import{t as Qn}from"./ProviderModelPicker-DPb-88ui.js";import{t as $n}from"./legalLinks-C4VP5hPh.js";import{t as er}from"./useScopedModelAvailability-CBOIiaXC.js";import{t as tr}from"./ProjectDefaultsSettings-DfhAk0_Y.js";import{t as nr}from"./draft-input-DHZ1J7B_.js";import{t as rr}from"./ScopedSwitch-BKOdsllO.js";import{a as ir,c as ar,d as or,f as sr,i as cr,l as lr,n as ur,o as dr,p as fr,s as pr,t as mr,u as hr}from"./SettingsPanels.logic-BwmY39Sq.js";function gr(e,t=!1){return _t({tagName:`style`,children:[ht(t?mt(e):ft(e))],properties:{[rt]:t?``:void 0,[lt]:t?void 0:``}})}function _r(e){return _t({tagName:`style`,children:[ht(e)],properties:{[ct]:``}})}var Z=m(),Q=e(r(),1),$=e(j(),1);function vr(){let e=Qt(e=>e.notificationMode),t=Zt(),[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1);return(0,$.jsx)(J,{...X(`thread-notifications`),description:n??`System alerts when a thread finishes, fails, or needs input or approval. Applies to this device while P4 Code is open.`,control:(0,$.jsxs)(me,{value:e,disabled:i,onValueChange:async e=>{if(e===`off`||e===`notifications`||e===`sound`||e===`notifications-and-sound`){if(r(null),Jn(e)&&An(),Ln(e)){if(typeof Notification>`u`||!window.isSecureContext){r(`Notifications need a supported browser over HTTPS, or the desktop app. Sound only is still available.`);return}a(!0);try{if(await Notification.requestPermission()!==`granted`){r(`Allow notifications in your browser or system settings, then choose this option again. Sound only is still available.`);return}}catch{r(`Notifications are unavailable in this browser. Sound only is still available.`);return}finally{a(!1)}}t({notificationMode:e})}},children:[(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Thread notifications`,children:(0,$.jsx)(ue,{children:Zn[e]})}),(0,$.jsx)(fe,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(Zn).map(([e,t])=>(0,$.jsx)(q,{hideIndicator:!0,value:e,children:t},e))})]})})}function yr(){let e=(0,Z.c)(15),t=typeof window>`u`?void 0:window.desktopBridge?.cliCommand,[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1),o,s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{if(!t)return;let e=!1;return t.getState().then(t=>{e||r(t)}).catch(br),()=>{e=!0}},s=[t],e[0]=o,e[1]=s):(o=e[0],s=e[1]),(0,Q.useEffect)(o,s);let c;e[2]===i?c=e[3]:(c=e=>{t&&!i&&(a(!0),t[e]().then(r).catch(t=>{ve.add(Ne({type:`error`,title:e===`install`?`Could not install p4c`:`Could not remove p4c`,description:t instanceof Error?t.message:`Something went wrong.`}))}).finally(()=>a(!1)))},e[2]=i,e[3]=c);let l=c;if(!t||!n?.supported)return null;let u=n.installedPath!==null,d=n.shadowedBy?`Another p4c at ${n.shadowedBy} runs first in a new terminal. Remove it to use P4 Code's.`:u?n.onPath?`Installed at ${n.installedPath}. Open a new terminal to use it.`:`Installed at ${n.installedPath}, which is not on your PATH yet. Add its folder to your PATH to run \`p4c\`.`:"Run P4 Code's CLI as `p4c` from any terminal.",f;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=X(`cli-command`),e[4]=f):f=e[4];let p;e[5]!==l||e[6]!==u?(p=()=>l(u?`uninstall`:`install`),e[5]=l,e[6]=u,e[7]=p):p=e[7];let m=u?`Remove`:`Install`,h;e[8]!==i||e[9]!==p||e[10]!==m?(h=(0,$.jsx)(R,{size:`sm`,variant:`outline`,disabled:i,onClick:p,children:m}),e[8]=i,e[9]=p,e[10]=m,e[11]=h):h=e[11];let g;return e[12]!==d||e[13]!==h?(g=(0,$.jsx)(J,{...f,description:d,control:h}),e[12]=d,e[13]=h,e[14]=g):g=e[14],g}function br(){}function xr(e){return`${ut}${it(e)}`}async function Sr({fileDiff:e,oldFile:t,newFile:n,options:r,annotations:i}){let a=vt({oldFile:t,newFile:n},`preloadDiffHTML`);if(e==null&&a!=null&&(e=ot(a.oldFile,a.newFile,r?.parseDiffOptions)),e==null)throw Error(`preloadFileDiff: You must pass at least a fileDiff, oldFile, or newFile prop`);let o=new gt(Tr(r));return i!=null&&i.length>0&&o.setLineAnnotations(i),xr(wr(await o.asyncRender(e),o,r?.unsafeCSS,r?.themeType??`system`))}async function Cr({fileDiff:e,options:t,annotations:n}){return{fileDiff:e,options:t,annotations:n,prerenderedHTML:await Sr({fileDiff:e,options:t,annotations:n})}}function wr(e,t,n,r){let i=[gr(e.css,!0)];i.push(_r(pt(e.themeStyles,e.baseThemeType??r))),n!=null&&i.push(gr(n)),e.headerElement!=null&&i.push(e.headerElement);let a=t.renderFullAST(e);return a.properties[`data-dehydrated`]=``,i.push(a),i}function Tr(e){return{...e,useTokenTransformer:dt(e),headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators}}async function Er({patch:e,options:t}){let n=[],r=at(e);for(let e of r)for(let r of e.files)n.push(Cr({fileDiff:r,options:t}));return await Promise.all(n)}var Dr=[],Or=`Use $frontend-design to fix the flaky test in [surface.test.ts](apps/web/src/terminal/ghostty/surface.test.ts) and align the header with [SettingsPanels.tsx](apps/web/src/components/settings/SettingsPanels.tsx) before shipping.`;function kr(){}function Ar(){let e=(0,Z.c)(4),t=(0,Q.useRef)(null),[n,r]=(0,Q.useState)(Or),[i,a]=(0,Q.useState)(227),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(e,t)=>{r(e),a(t)},e[0]=o):o=e[0];let s=o,c;return e[1]!==i||e[2]!==n?(c=(0,$.jsx)(`div`,{className:`mt-1 mb-2 rounded-lg border border-border bg-background px-3 py-2`,children:(0,$.jsx)(Lt,{ariaLabel:`Prompt font preview`,editorRef:t,value:n,cursor:i,contextRecords:It,skills:Dr,disabled:!1,placeholder:Ft,className:`max-h-42 min-h-14`,onChange:s,onPaste:kr})}),e[1]=i,e[2]=n,e[3]=c):c=e[3],c}var jr=[`diff --git a/src/formatUser.ts b/src/formatUser.ts`,`--- a/src/formatUser.ts`,`+++ b/src/formatUser.ts`,`@@ -1,3 +1,3 @@`,` export function formatUser(user: User) {`,`- return user.name.toUpperCase();`,"+ return `${user.name} <${user.email}>`; // 0O 1lI",` }`,``].join(`
1
+ import{i as e,r as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{r}from"./Icon-l19w4AjM.js";import{Cm as i,Dc as a,Es as o,Ft as s,Ht as c,It as l,Jp as u,Jt as d,Kd as f,Ks as p,NE as m,Nt as h,Pp as g,Qp as _,Tp as v,Vt as y,Wd as b,XT as x,Zw as S,__ as C,_p as w,fh as T,gh as E,hd as D,ib as O,jm as k,ks as A,lE as j,lh as M,lp as N,mm as P,n_ as F,nn as I,rh as L,sr as R,t as z,vd as B,vp as V,xy as H,yp as U,zd as W}from"./utils-Dx_TSvdC.js";import{W as ee,g as G}from"./runtime-D102A-Bu.js";import{F as K,I as te,L as ne,Pt as re,x as ie}from"./runtime-BjJBBHTp.js";import{a as ae,i as oe,n as se,r as ce,t as le}from"./number-field-CydqGM9B.js";import{a as q,c as ue,n as de,o as fe,s as pe,t as me}from"./select-BUFUt6O3.js";import{t as he}from"./spinner-DYnZ-Bpa.js";import{t as ge}from"./link-BIudTto8.js";import{t as _e}from"./useNavigate-LjcLtV_e.js";import{i as ve}from"./toast-SPJYfh08.js";import{a as ye,n as be,r as xe,t as Se}from"./tooltip-Cco13jKX.js";import{t as Ce}from"./server-DTGT8WWf.js";import{o as we}from"./session-Dh8maTO3.js";import{I as Te,L as Ee,M as De,N as Oe,P as ke,R as Ae,j as je,k as Me}from"./useSettings-DUgjfqYw.js";import{n as Ne}from"./toastHelpers-Dsph6LwL.js";import{r as Pe}from"./queries-DMjiMwzO.js";import{A as Fe,H as Ie,I as Le,J as Re,M as ze,O as Be,R as Ve,S as He,T as Ue,U as We,W as Ge,X as Ke,Y as qe,Z as Je,d as Ye,h as Xe,j as Ze,m as Qe,q as $e,u as et,v as tt,y as nt}from"./themePalette-9CODTNe7.js";import{$ as rt,D as it,G as at,f as ot,l as st,vt as ct,yt as lt}from"./diffRendering-EPxtkQvT.js";import{A as ut,C as dt,D as ft,E as pt,T as mt,lt as ht,n as gt,st as _t,t as vt}from"./getDiffFileInput-Eacwf1x6.js";import{t as yt}from"./env-wK1YYxA8.js";import{a as bt,l as xt,n as St,o as Ct,r as wt,s as Tt,t as Et}from"./combobox-BqpUmoio.js";import{t as Dt}from"./input-CF-egQtG.js";import{a as Ot,c as kt,i as At,o as jt,r as Mt,s as Nt,t as Pt}from"./dialog-BfenC7sz.js";import{m as Ft,r as It,t as Lt}from"./ComposerPromptEditor-BTCrYVhm.js";import{h as Rt,p as zt}from"./Icons-CSAp87pJ.js";import{t as Bt}from"./ProjectFavicon-Dk18tk1C.js";import{n as Vt,r as Ht,t as Ut}from"./input-group-CifPZlNg.js";import{c as Wt,r as Gt}from"./ThreadTerminalDrawer-D7lW_0Ez.js";import{r as Kt,t as qt}from"./alert-CvIEaZOb.js";import{B as Jt,F as Yt,I as Xt,L as Zt,P as Qt,U as $t,a as J,d as en,f as tn,i as nn,n as rn,r as Y,s as an,t as on}from"./settingsLayout-BRcW18Dy.js";import{$r as sn,An as cn,Ar as ln,C as un,Ca as dn,Da as fn,Dn as pn,Ea as mn,En as hn,Fa as gn,Fr as _n,Gr as vn,Ia as yn,Ir as bn,La as xn,Mr as Sn,Nr as Cn,Oa as wn,On as Tn,Pa as En,Pr as Dn,Qr as On,Ra as kn,S as An,Ta as jn,Tn as Mn,Ur as Nn,Xr as Pn,Zr as Fn,_i as In,b as Ln,ei as Rn,ir as X,ji as zn,jr as Bn,kn as Vn,ln as Hn,qa as Un,ti as Wn,w as Gn,wa as Kn,wn as qn,x as Jn,xa as Yn,xn as Xn,y as Zn}from"./main-C58_iQqs.js";import{t as Qn}from"./ProviderModelPicker-DhOV_BIX.js";import{t as $n}from"./legalLinks-C4VP5hPh.js";import{t as er}from"./useScopedModelAvailability-BP4GoHk-.js";import{t as tr}from"./ProjectDefaultsSettings-DzMIpb2U.js";import{t as nr}from"./draft-input-rVkOduh_.js";import{t as rr}from"./ScopedSwitch-BECzQob0.js";import{a as ir,c as ar,d as or,f as sr,i as cr,l as lr,n as ur,o as dr,p as fr,s as pr,t as mr,u as hr}from"./SettingsPanels.logic-DpJJdWIn.js";function gr(e,t=!1){return _t({tagName:`style`,children:[ht(t?mt(e):ft(e))],properties:{[rt]:t?``:void 0,[lt]:t?void 0:``}})}function _r(e){return _t({tagName:`style`,children:[ht(e)],properties:{[ct]:``}})}var Z=m(),Q=e(r(),1),$=e(j(),1);function vr(){let e=Qt(e=>e.notificationMode),t=Zt(),[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1);return(0,$.jsx)(J,{...X(`thread-notifications`),description:n??`System alerts when a thread finishes, fails, or needs input or approval. Applies to this device while P4 Code is open.`,control:(0,$.jsxs)(me,{value:e,disabled:i,onValueChange:async e=>{if(e===`off`||e===`notifications`||e===`sound`||e===`notifications-and-sound`){if(r(null),Jn(e)&&An(),Ln(e)){if(typeof Notification>`u`||!window.isSecureContext){r(`Notifications need a supported browser over HTTPS, or the desktop app. Sound only is still available.`);return}a(!0);try{if(await Notification.requestPermission()!==`granted`){r(`Allow notifications in your browser or system settings, then choose this option again. Sound only is still available.`);return}}catch{r(`Notifications are unavailable in this browser. Sound only is still available.`);return}finally{a(!1)}}t({notificationMode:e})}},children:[(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Thread notifications`,children:(0,$.jsx)(ue,{children:Zn[e]})}),(0,$.jsx)(fe,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(Zn).map(([e,t])=>(0,$.jsx)(q,{hideIndicator:!0,value:e,children:t},e))})]})})}function yr(){let e=(0,Z.c)(15),t=typeof window>`u`?void 0:window.desktopBridge?.cliCommand,[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1),o,s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{if(!t)return;let e=!1;return t.getState().then(t=>{e||r(t)}).catch(br),()=>{e=!0}},s=[t],e[0]=o,e[1]=s):(o=e[0],s=e[1]),(0,Q.useEffect)(o,s);let c;e[2]===i?c=e[3]:(c=e=>{t&&!i&&(a(!0),t[e]().then(r).catch(t=>{ve.add(Ne({type:`error`,title:e===`install`?`Could not install p4c`:`Could not remove p4c`,description:t instanceof Error?t.message:`Something went wrong.`}))}).finally(()=>a(!1)))},e[2]=i,e[3]=c);let l=c;if(!t||!n?.supported)return null;let u=n.installedPath!==null,d=n.shadowedBy?`Another p4c at ${n.shadowedBy} runs first in a new terminal. Remove it to use P4 Code's.`:u?n.onPath?`Installed at ${n.installedPath}. Open a new terminal to use it.`:`Installed at ${n.installedPath}, which is not on your PATH yet. Add its folder to your PATH to run \`p4c\`.`:"Run P4 Code's CLI as `p4c` from any terminal.",f;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=X(`cli-command`),e[4]=f):f=e[4];let p;e[5]!==l||e[6]!==u?(p=()=>l(u?`uninstall`:`install`),e[5]=l,e[6]=u,e[7]=p):p=e[7];let m=u?`Remove`:`Install`,h;e[8]!==i||e[9]!==p||e[10]!==m?(h=(0,$.jsx)(R,{size:`sm`,variant:`outline`,disabled:i,onClick:p,children:m}),e[8]=i,e[9]=p,e[10]=m,e[11]=h):h=e[11];let g;return e[12]!==d||e[13]!==h?(g=(0,$.jsx)(J,{...f,description:d,control:h}),e[12]=d,e[13]=h,e[14]=g):g=e[14],g}function br(){}function xr(e){return`${ut}${it(e)}`}async function Sr({fileDiff:e,oldFile:t,newFile:n,options:r,annotations:i}){let a=vt({oldFile:t,newFile:n},`preloadDiffHTML`);if(e==null&&a!=null&&(e=ot(a.oldFile,a.newFile,r?.parseDiffOptions)),e==null)throw Error(`preloadFileDiff: You must pass at least a fileDiff, oldFile, or newFile prop`);let o=new gt(Tr(r));return i!=null&&i.length>0&&o.setLineAnnotations(i),xr(wr(await o.asyncRender(e),o,r?.unsafeCSS,r?.themeType??`system`))}async function Cr({fileDiff:e,options:t,annotations:n}){return{fileDiff:e,options:t,annotations:n,prerenderedHTML:await Sr({fileDiff:e,options:t,annotations:n})}}function wr(e,t,n,r){let i=[gr(e.css,!0)];i.push(_r(pt(e.themeStyles,e.baseThemeType??r))),n!=null&&i.push(gr(n)),e.headerElement!=null&&i.push(e.headerElement);let a=t.renderFullAST(e);return a.properties[`data-dehydrated`]=``,i.push(a),i}function Tr(e){return{...e,useTokenTransformer:dt(e),headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators}}async function Er({patch:e,options:t}){let n=[],r=at(e);for(let e of r)for(let r of e.files)n.push(Cr({fileDiff:r,options:t}));return await Promise.all(n)}var Dr=[],Or=`Use $frontend-design to fix the flaky test in [surface.test.ts](apps/web/src/terminal/ghostty/surface.test.ts) and align the header with [SettingsPanels.tsx](apps/web/src/components/settings/SettingsPanels.tsx) before shipping.`;function kr(){}function Ar(){let e=(0,Z.c)(4),t=(0,Q.useRef)(null),[n,r]=(0,Q.useState)(Or),[i,a]=(0,Q.useState)(227),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(e,t)=>{r(e),a(t)},e[0]=o):o=e[0];let s=o,c;return e[1]!==i||e[2]!==n?(c=(0,$.jsx)(`div`,{className:`mt-1 mb-2 rounded-lg border border-border bg-background px-3 py-2`,children:(0,$.jsx)(Lt,{ariaLabel:`Prompt font preview`,editorRef:t,value:n,cursor:i,contextRecords:It,skills:Dr,disabled:!1,placeholder:Ft,className:`max-h-42 min-h-14`,onChange:s,onPaste:kr})}),e[1]=i,e[2]=n,e[3]=c):c=e[3],c}var jr=[`diff --git a/src/formatUser.ts b/src/formatUser.ts`,`--- a/src/formatUser.ts`,`+++ b/src/formatUser.ts`,`@@ -1,3 +1,3 @@`,` export function formatUser(user: User) {`,`- return user.name.toUpperCase();`,"+ return `${user.name} <${user.email}>`; // 0O 1lI",` }`,``].join(`
2
2
  `),Mr=new Map;function Nr(e){let t=Mr.get(e);return t===void 0&&(t=Er({patch:jr,options:{diffStyle:`unified`,theme:e,preferredHighlighter:kn}}).then(e=>e.map(e=>e.prerenderedHTML)),Mr.set(e,t)),t}var Pr=`
3
3
  :host {
4
4
  color: var(--code-foreground);
@@ -36,4 +36,4 @@ import{i as e,r as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{r}from".
36
36
  "colors": { ... }
37
37
  }`,spellCheck:!1,value:r}),t[10]=n,t[11]=p,t[12]=m,t[13]=r,t[14]=h):h=t[14];let g;return t[15]!==d||t[16]!==h?(g=(0,$.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl border border-input bg-background shadow-xs/5 focus-within:border-ring focus-within:ring-3 focus-within:ring-inset focus-within:ring-ring/24`,children:[d,h]}),t[15]=d,t[16]=h,t[17]=g):g=t[17],g}function Pa({open:e,onOpenChange:t,onImported:n,onImportedMany:r}){let i=(0,Q.useRef)(null),[a,o]=(0,Q.useState)(``),[s,c]=(0,Q.useState)(null),[l,u]=(0,Q.useState)(null),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(!1),[h,_]=(0,Q.useState)(null),v=(0,Q.useRef)(0);(0,Q.useEffect)(()=>{v.current+=1,m(!1),e&&(o(``),c(null),u(null),f(!1),_(null))},[e]);let y=(0,Q.useCallback)(async e=>{let t=Aa(e.size);if(t){u(t);return}let n=++v.current;f(!0);try{let t=await e.text();if(n!==v.current)return;o(t),c(e.name),u(null)}catch{if(n!==v.current)return;u(`Could not read that file. Paste the JSON below instead.`)}finally{n===v.current&&f(!1)}},[]),x=(0,Q.useCallback)(async e=>{let n=++v.current;f(!0);let i=[],a=[];try{for(let t of e){if(Aa(t.size)){i.push(`${t.name}: too large`);continue}try{let e=JSON.parse(await t.text());a.push({sourceName:t.name,theme:pi(e)?_i(e):Be(e)})}catch(e){i.push(`${t.name}: ${e instanceof Error?e.message:`not a theme file`}`)}}if(n!==v.current)return;let o=[],s=[];for(let e of vi(yi(a))){if(Ye().some(t=>t.id===e.id)){s.push(e);continue}try{o.push(He(e))}catch(t){i.push(`${e.label}: ${t instanceof Error?t.message:`could not install`}`)}}o.length>0&&r(o,{updated:!1}),i.length>0?u(i.join(` — `)):s.length>0?_(s):o.length>0&&t(!1)}finally{n===v.current&&f(!1)}},[r,t]),S=(0,Q.useCallback)(e=>{e.length!==0&&(e.length===1?y(e[0]):x(e))},[x,y]),C=(0,Q.useCallback)(()=>{let e=window.desktopBridge;if(e?.pickThemeFiles){e.pickThemeFiles().then(e=>{e&&e.length!==0&&S(e.map(e=>({name:e.name,size:e.size,text:()=>Promise.resolve(e.text)})))});return}i.current?.click()},[S]),w=(0,Q.useCallback)(e=>{let t=[...e.currentTarget.files??[]];e.currentTarget.value=``,S(t)},[S]),T=(0,Q.useCallback)(e=>{e.preventDefault(),m(!1),S([...e.dataTransfer.files])},[S]),E=(e,t)=>{if(t&&t.toLowerCase()!==e.label.toLowerCase()){let n=Be({version:1,name:t.slice(0,48),appearance:e.appearance,colors:e.colors,...e.variants?{variants:e.variants}:{},...e.managed?{managed:!0}:{}});if(!Ye().some(e=>e.id===n.id))return n}for(let t=1;t<100;t+=1){let n=Be({version:1,name:`${e.label.slice(0,48-` (${t})`.length)} (${t})`,appearance:e.appearance,colors:e.colors,...e.variants?{variants:e.variants}:{},...e.managed?{managed:!0}:{}});if(!Ye().some(e=>e.id===n.id))return n}throw Error(`Too many copies of "${e.label}".`)},D=(0,Q.useCallback)(e=>{if(!h)return;let n=[],i=[],a=h.length===1&&s?hi(s.replace(/\.[^.]+$/,``)):null;for(let t of h)try{let r=e===`update`?Ye().find(e=>e.id===t.id):void 0,i=r?.collection?{...t,collection:r.collection}:t;n.push(e===`update`?Ge(i):He(E(t,a)))}catch(e){i.push(`${t.label}: ${e instanceof Error?e.message:`failed`}`)}n.length>0&&r(n,{updated:e===`update`}),_(null),i.length>0?u(i.join(` — `)):t(!1)},[h,s,r,t]),O=(0,Q.useCallback)(()=>{let e=Aa(a.length);if(e){u(e);return}try{let e=JSON.parse(a),r=pi(e)?_i(e):Be(e);if(Ye().some(e=>e.id===r.id)){u(null),_([r]);return}let i=He(r);if(!n(i)){try{Fe(i.id)}catch{}u(`Theme added, but it could not be selected. Try again.`);return}t(!1)}catch(e){u(e instanceof Error?e.message:`That theme file is invalid.`)}},[a,n,t]);return(0,$.jsx)(Pt,{open:e,onOpenChange:e=>{e||u(null),t(e)},children:(0,$.jsxs)(Nt,{className:`max-w-3xl overflow-hidden`,children:[(0,$.jsx)(Ot,{children:(0,$.jsx)(kt,{children:`Add a theme`})}),(0,$.jsxs)(jt,{children:[(0,$.jsx)(Ta,{onInstalled:(e,n)=>{r(e,n),t(!1)},open:e}),(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,"aria-hidden":!0,children:[(0,$.jsx)(`div`,{className:`h-px flex-1 bg-border`}),(0,$.jsx)(`span`,{className:`text-muted-foreground text-2xs uppercase tracking-wider`,children:`or import a file`}),(0,$.jsx)(`div`,{className:`h-px flex-1 bg-border`})]}),(()=>{let e={onDragEnter:e=>{e.preventDefault(),m(!0)},onDragOver:e=>{e.preventDefault(),m(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||m(!1)},onDrop:T},n=(0,$.jsx)(`input`,{ref:i,accept:`.json,application/json`,className:`sr-only`,onChange:w,multiple:!0,type:`file`}),r=(e=`Choose files`)=>(0,$.jsxs)(R,{disabled:d,size:`sm`,variant:`outline`,onClick:C,children:[(0,$.jsx)(b,{}),d?`Reading…`:e]}),c=()=>(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`div`,{className:`flex items-baseline justify-between gap-3`,children:(0,$.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:`theme-json-editor`,children:`Theme JSON`})}),(0,$.jsx)(Na,{id:`theme-json-editor`,onChange:o,value:a})]});return h?(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-muted/20 p-3`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Already installed`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:h.map(e=>e.label).join(`, `)})]}),(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(R,{size:`sm`,onClick:()=>D(`update`),children:`Update existing`}),(0,$.jsx)(R,{size:`sm`,variant:`outline`,onClick:()=>D(`copy`),children:`Keep both`}),(0,$.jsx)(R,{size:`sm`,variant:`ghost`,onClick:()=>_(null),children:`Back`}),(0,$.jsx)(R,{size:`sm`,variant:`ghost`,onClick:()=>t(!1),children:`Cancel`})]})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:z(`flex flex-wrap items-center justify-between gap-3 rounded-xl border border-dashed px-3 py-3 transition-colors`,p?`border-ring bg-accent/20`:`border-border/80 bg-muted/20`),...e,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Theme file`}),(0,$.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:s??`Drop P4 Code or VS Code .json files`})]}),r(),n]}),c(),(0,$.jsxs)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,children:[(0,$.jsx)(R,{variant:`ghost`,onClick:()=>t(!1),children:`Cancel`}),(0,$.jsxs)(R,{disabled:!a.trim()||d,onClick:O,children:[(0,$.jsx)(g,{}),`Add theme`]})]})]})})(),l?(0,$.jsx)(qt,{"aria-live":`polite`,variant:`error`,children:l}):null]})]})})}function Fa(e){let t=(0,Z.c)(45),{colors:n,clip:r}=e,i;t[0]===r?i=t[1]:(i=r===void 0?void 0:{clipPath:r===`left`?`polygon(0 0, calc(50% - 1px) 0, calc(50% - 1px) 100%, 0 100%)`:`polygon(calc(50% + 1px) 0, 100% 0, 100% 100%, calc(50% + 1px) 100%)`},t[0]=r,t[1]=i);let a;t[2]===n.canvas?a=t[3]:(a=(0,$.jsx)(`span`,{className:`absolute inset-0`,style:{backgroundColor:n.canvas}}),t[2]=n.canvas,t[3]=a);let o;t[4]===n.sidebar?o=t[5]:(o=(0,$.jsx)(`span`,{className:`absolute inset-y-0 left-0 w-[22%]`,style:{backgroundColor:n.sidebar,boxShadow:`inset -1px 0 0 rgb(127 127 127 / 0.25)`}}),t[4]=n.sidebar,t[5]=o);let s;t[6]===n.surface?s=t[7]:(s=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[8%] h-[8%] w-[16%] rounded-md`,style:{backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25)`}}),t[6]=n.surface,t[7]=s);let c;t[8]===n.accentSurface?c=t[9]:(c=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[22%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.accentSurface}}),t[8]=n.accentSurface,t[9]=c);let l;t[10]===n.messageSurface?l=t[11]:(l=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[32%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.messageSurface,opacity:.7}}),t[10]=n.messageSurface,t[11]=l);let u;t[12]===n.messageSurface?u=t[13]:(u=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[42%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.messageSurface,opacity:.5}}),t[12]=n.messageSurface,t[13]=u);let d;t[14]===n.messageSurface?d=t[15]:(d=(0,$.jsx)(`span`,{className:`absolute right-[28%] top-[11%] h-[9%] w-[24%] rounded-lg`,style:{backgroundColor:n.messageSurface}}),t[14]=n.messageSurface,t[15]=d);let f;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(`span`,{className:`absolute left-[27%] top-[28%] h-[5%] w-[34%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}}),t[16]=f):f=t[16];let p;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`absolute left-[27%] top-[38%] h-[5%] w-[26%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}}),t[17]=p):p=t[17];let m;t[18]===n.surface?m=t[19]:(m={backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25)`},t[18]=n.surface,t[19]=m);let h;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`span`,{className:`block h-[26%] w-[34%] rounded-full`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`,opacity:.7}}),t[20]=h):h=t[20];let g;t[21]===n.messageAction?g=t[22]:(g=(0,$.jsx)(`span`,{className:`block aspect-square h-[58%] rounded-full`,style:{backgroundColor:n.messageAction}}),t[21]=n.messageAction,t[22]=g);let _;t[23]!==m||t[24]!==g?(_=(0,$.jsxs)(`span`,{className:`absolute bottom-[8%] left-[26%] right-[6%] flex h-[15%] items-center justify-between rounded-md px-1`,style:m,children:[h,g]}),t[23]=m,t[24]=g,t[25]=_):_=t[25];let v;t[26]===n.surface?v=t[27]:(v={backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25), 0 2px 5px rgb(0 0 0 / 0.14)`},t[26]=n.surface,t[27]=v);let y;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(y=[0,1,2],t[28]=y):y=t[28];let b;t[29]===n.messageAction?b=t[30]:(b=y.map(e=>(0,$.jsxs)(`span`,{className:`absolute left-[11%] right-[11%] flex items-center gap-1`,style:{top:`${10+e*30}%`,height:`20%`},children:[(0,$.jsx)(`span`,{className:`block aspect-square h-[26%] rounded-full`,style:{backgroundColor:e===0?`#34d399`:e===1?n.messageAction:`#fbbf24`,opacity:.55}}),(0,$.jsx)(`span`,{className:`block h-[30%] w-[52%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}})]},e)),t[29]=n.messageAction,t[30]=b);let x;t[31]!==v||t[32]!==b?(x=(0,$.jsx)(`span`,{className:`absolute right-[5%] top-[8%] h-[46%] w-[20%] rounded-lg`,style:v,children:b}),t[31]=v,t[32]=b,t[33]=x):x=t[33];let S;return t[34]!==i||t[35]!==_||t[36]!==x||t[37]!==a||t[38]!==o||t[39]!==s||t[40]!==c||t[41]!==l||t[42]!==u||t[43]!==d?(S=(0,$.jsxs)(`span`,{className:`absolute inset-0`,style:i,children:[a,o,s,c,l,u,d,f,p,_,x]}),t[34]=i,t[35]=_,t[36]=x,t[37]=a,t[38]=o,t[39]=s,t[40]=c,t[41]=l,t[42]=u,t[43]=d,t[44]=S):S=t[44],S}function Ia(e){let t=(0,Z.c)(7),{className:n,panes:r}=e,i;t[0]===n?i=t[1]:(i=z(`relative block w-full overflow-hidden rounded-lg border border-border/60`,n),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r.map(La),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsx)(`span`,{"aria-hidden":!0,className:i,children:a}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function La(e){return(0,$.jsx)(Fa,{clip:e.clip,colors:e.colors},e.clip??`pane`)}var Ra=[Je,Re,Ke,$e,qe];function za(e){if(e.length===0)return[];let t=e.map(e=>e.label.trim().split(/\s+/)),n=t[0],r=n.findIndex((e,n)=>t.some(t=>t[n]?.toLocaleLowerCase()!==e.toLocaleLowerCase())),i=r===-1?n.length-1:r;return e.map((e,n)=>t[n]?.slice(Math.max(0,i)).join(` `).trim()||e.label)}function Ba(e,t){let n=URL.createObjectURL(new Blob([t],{type:`application/json`})),r=document.createElement(`a`);r.href=n,r.download=e,r.click(),setTimeout(()=>URL.revokeObjectURL(n),3e4)}function Va(e){let t=(0,Z.c)(7),{label:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,$.jsx)(ye,{render:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,$.jsx)(be,{children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsxs)(Se,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Ha(e){let t=(0,Z.c)(59),{theme:n,isActive:r,onUse:a,onUseMode:o,activeModes:s,onEdit:c,onDuplicate:l,onDownload:u,onRemove:d,variantNavigation:f}=e,p;t[0]===n.previews?p=t[1]:(p=n.previews.map(Ua),t[0]=n.previews,t[1]=p);let m=p,[h,g]=(0,Q.useState)(null),_,y,b,x,S,C,w,T;if(t[2]!==s||t[3]!==r||t[4]!==a||t[5]!==o||t[6]!==h||t[7]!==n.id||t[8]!==n.label||t[9]!==n.previews||t[10]!==f){let e=[`light`,`dark`].map(e=>{let t=f?.options.flatMap(t=>{let n=t.preview;return n.mode===e?[{option:t,preview:n}]:[]})??[];return{mode:e,options:t,selected:t.find(t=>{let{option:n}=t;return n.activeModes.includes(e)})??t[0]}});y=Se,_=ye;let i=r&&`bg-accent/30`;t[19]===i?S=t[20]:(S=z(`cursor-pointer overflow-hidden rounded-xl border border-border/70 bg-card/60 transition-colors hover:bg-accent/10`,i),t[19]=i,t[20]=S),C=n.id,w=a,t[21]===r?T=t[22]:(T=r?{boxShadow:`inset 0 0 0 1px var(--ring)`}:void 0,t[21]=r,t[22]=T),b=`relative`,x=f?(0,$.jsx)(`div`,{"aria-label":`Light and dark theme variants`,className:`relative h-20`,role:`group`,onBlurCapture:e=>{let t=e.relatedTarget;(!(t instanceof Node)||!e.currentTarget.contains(t))&&g(null)},onKeyDown:e=>{e.key===`Escape`&&g(null)},onMouseLeave:()=>g(null),children:e.map(e=>{let{mode:t,options:n,selected:r}=e;if(!r)return null;let i=t===`light`?-52:52,a=h===t,o=r.option.activeModes.includes(t);return(0,$.jsxs)(`div`,{className:`contents`,children:[(0,$.jsx)(Va,{label:`${t===`light`?`Light`:`Dark`}: ${r.option.label}`,children:(0,$.jsxs)(`button`,{"aria-label":n.length>1?`Choose ${t} variant, ${n.length} options, currently ${r.option.label}`:`Use ${t} variant, currently ${r.option.label}`,"aria-pressed":o,className:`absolute left-1/2 top-2 z-20 flex size-14 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,style:{transform:`translateX(calc(-50% + ${i}px))`},type:`button`,onClick:e=>{e.stopPropagation(),f.onSelectAndUse(r.option.themeIndex,t)},onFocus:()=>g(t),onMouseEnter:()=>g(t),children:[(0,$.jsx)(Mn,{colors:r.preview.colors,mode:r.preview.mode}),o?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 rounded-full ring-2 ring-inset ring-ring`}):null,o?(0,$.jsx)(`span`,{className:`pointer-events-none absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full border border-border/70 bg-background text-foreground shadow-sm`,children:t===`light`?(0,$.jsx)(P,{className:`size-2.5`}):(0,$.jsx)(N,{className:`size-2.5`})}):null]})}),(0,$.jsxs)(`span`,{className:`pointer-events-none absolute bottom-0 left-1/2 inline-flex max-w-24 -translate-x-1/2 items-center gap-1 text-2xs font-medium text-foreground`,style:{marginLeft:i},children:[(0,$.jsx)(`span`,{className:`truncate`,children:r.option.label}),n.length>1?(0,$.jsxs)(`span`,{className:`shrink-0 rounded-full bg-muted px-1 text-3xs text-muted-foreground`,children:[`+`,n.length-1]}):null]}),n.length>1?n.map((e,r)=>{let{option:o,preview:s}=e,c=r/(n.length-1)-.5,l=i+c*68,u=Math.abs(c)*10,d=o.activeModes.includes(t);return(0,$.jsx)(Va,{label:`Use ${o.label} for ${t} mode`,children:(0,$.jsx)(`button`,{"aria-label":`Use ${o.label} for ${t} mode${d?`, currently active`:``}`,"aria-pressed":d,className:z(`absolute left-1/2 top-1 z-30 flex size-7 items-center justify-center rounded-full bg-background shadow-sm outline-none transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,d?`ring-2 ring-inset ring-ring`:`ring-1 ring-border/70`),style:{opacity:+!!a,pointerEvents:a?`auto`:`none`,transform:`translate(calc(-50% + ${a?l:i}px), ${a?u:28}px) scale(${a?1:.55})`,transitionDelay:a?`${r*35}ms`:`0ms`},type:`button`,onClick:e=>{e.stopPropagation(),f.onSelectAndUse(o.themeIndex,t)},onFocus:()=>g(t),onMouseEnter:()=>g(t),children:(0,$.jsx)(`span`,{className:`pointer-events-none scale-[0.43]`,children:(0,$.jsx)(Mn,{colors:s.colors,mode:s.mode})})})},o.label)}):null]},t)})}):(0,$.jsx)(hn,{label:n.label,activeModes:s,onSelectMode:o,previews:n.previews}),t[2]=s,t[3]=r,t[4]=a,t[5]=o,t[6]=h,t[7]=n.id,t[8]=n.label,t[9]=n.previews,t[10]=f,t[11]=_,t[12]=y,t[13]=b,t[14]=x,t[15]=S,t[16]=C,t[17]=w,t[18]=T}else _=t[11],y=t[12],b=t[13],x=t[14],S=t[15],C=t[16],w=t[17],T=t[18];let E;t[23]!==b||t[24]!==x?(E=(0,$.jsx)(`div`,{className:b,children:x}),t[23]=b,t[24]=x,t[25]=E):E=t[25];let D=`Use ${f?`${f.collectionLabel}, ${n.label} variant`:`${n.label} theme`}${r?`, currently active`:``}`,O;t[26]===a?O=t[27]:(O=e=>{e.stopPropagation(),a()},t[26]=a,t[27]=O);let A=f?.collectionLabel??n.label,j;t[28]!==r||t[29]!==O||t[30]!==A||t[31]!==D?(j=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,$.jsx)(`div`,{className:`flex items-center gap-1.5`,children:(0,$.jsx)(`button`,{"aria-label":D,"aria-pressed":r,className:`min-w-0 cursor-pointer truncate rounded-sm text-left text-sm font-medium text-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card`,type:`button`,onClick:O,children:A})})}),t[28]=r,t[29]=O,t[30]=A,t[31]=D,t[32]=j):j=t[32];let M;t[33]!==u||t[34]!==l||t[35]!==c||t[36]!==d||t[37]!==n.label||t[38]!==f?(M=c||l||u||d?(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[l?(0,$.jsxs)(Se,{children:[(0,$.jsx)(ye,{render:(0,$.jsx)(R,{"aria-label":`Duplicate ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),l()},children:(0,$.jsx)(W,{})})}),(0,$.jsx)(be,{children:`Duplicate theme`})]}):null,c?(0,$.jsxs)(Se,{children:[(0,$.jsx)(ye,{render:(0,$.jsx)(R,{"aria-label":`Edit ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),c()},children:(0,$.jsx)(v,{})})}),(0,$.jsx)(be,{children:`Edit theme`})]}):null,u?(0,$.jsxs)(Se,{children:[(0,$.jsx)(ye,{render:(0,$.jsx)(R,{"aria-label":`Export ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),u()},children:(0,$.jsx)(k,{})})}),(0,$.jsx)(be,{children:`Export theme file`})]}):null,d?(0,$.jsxs)(Se,{children:[(0,$.jsx)(ye,{render:(0,$.jsx)(R,{"aria-label":f?`Remove themes from ${f.collectionLabel}`:`Remove ${n.label}`,size:`icon-xs`,variant:`ghost-destructive`,onClick:e=>{e.stopPropagation(),d()},children:(0,$.jsx)(i,{})})}),(0,$.jsx)(be,{children:f?`Remove themes`:`Remove theme`})]}):null]}):null,t[33]=u,t[34]=l,t[35]=c,t[36]=d,t[37]=n.label,t[38]=f,t[39]=M):M=t[39];let F;t[40]!==j||t[41]!==M?(F=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pb-3 pt-2`,children:[j,M]}),t[40]=j,t[41]=M,t[42]=F):F=t[42];let I;t[43]!==F||t[44]!==S||t[45]!==C||t[46]!==w||t[47]!==T||t[48]!==E?(I=(0,$.jsxs)(`div`,{className:S,"data-theme-library-card":C,onClick:w,style:T,children:[E,F]}),t[43]=F,t[44]=S,t[45]=C,t[46]=w,t[47]=T,t[48]=E,t[49]=I):I=t[49];let L;t[50]!==_||t[51]!==I?(L=(0,$.jsx)(_,{render:I}),t[50]=_,t[51]=I,t[52]=L):L=t[52];let B=f?`Use the first variants for light and dark`:m.length>1?`Use for both light and dark`:`Use for ${m[0]} mode only`,V;t[53]===B?V=t[54]:(V=(0,$.jsx)(be,{children:B}),t[53]=B,t[54]=V);let H;return t[55]!==y||t[56]!==L||t[57]!==V?(H=(0,$.jsxs)(y,{children:[L,V]}),t[55]=y,t[56]=L,t[57]=V,t[58]=H):H=t[58],H}function Ua(e){return e.mode}function Wa(e){let t=(0,Z.c)(49),{themes:n,activeModesFor:r,onUse:i,onUseMode:a,onDuplicate:o,onEdit:s,onDownload:c,onRemove:l}=e,u;t[0]!==r||t[1]!==n?(u=()=>{let e=n.findIndex(e=>r(e.id).length>0);return e<0?0:e},t[0]=r,t[1]=n,t[2]=u):u=t[2];let[d,f]=(0,Q.useState)(u),p=Math.min(d,n.length-1),m=n[p],h,g;if(t[3]!==p||t[4]!==d?(h=()=>{d!==p&&f(p)},g=[p,d],t[3]=p,t[4]=d,t[5]=h,t[6]=g):(h=t[5],g=t[6]),(0,Q.useEffect)(h,g),!m)return null;let _=m.collection?.label??m.label,v;if(t[7]!==r||t[8]!==_||t[9]!==c||t[10]!==o||t[11]!==s||t[12]!==l||t[13]!==i||t[14]!==a||t[15]!==m||t[16]!==n){let e=za(n),u;t[18]===n?u=t[19]:(u=n.find(Ka),t[18]=n,t[19]=u);let d=u,p;t[20]===n?p=t[21]:(p=n.find(Ga),t[20]=n,t[21]=p);let h=p,g;t[22]!==h||t[23]!==d||t[24]!==i||t[25]!==a||t[26]!==m||t[27]!==n.length?(g=()=>{if(n.length===1){i(m);return}d&&a(d,`light`),h&&a(h,`dark`),f(0)},t[22]=h,t[23]=d,t[24]=i,t[25]=a,t[26]=m,t[27]=n.length,t[28]=g):g=t[28];let y=g,b;t[29]!==r||t[30]!==m.id?(b=r(m.id),t[29]=r,t[30]=m.id,t[31]=b):b=t[31];let x;t[32]!==c||t[33]!==m?(x=()=>c(m),t[32]=c,t[33]=m,t[34]=x):x=t[34];let S;t[35]!==o||t[36]!==m?(S=()=>o(m),t[35]=o,t[36]=m,t[37]=S):S=t[37];let C;t[38]!==s||t[39]!==m?(C=()=>s(m),t[38]=s,t[39]=m,t[40]=C):C=t[40];let w;t[41]!==l||t[42]!==m?(w=()=>l(m),t[41]=l,t[42]=m,t[43]=w):w=t[43];let T;t[44]!==a||t[45]!==m?(T=e=>a(m,e),t[44]=a,t[45]=m,t[46]=T):T=t[46];let E;t[47]===m?E=t[48]:(E=pn(m),t[47]=m,t[48]=E),v=(0,$.jsx)(Ha,{activeModes:b,isActive:!1,onDownload:x,onDuplicate:S,onEdit:C,onRemove:w,onUse:y,onUseMode:T,theme:E,...n.length>1?{variantNavigation:{collectionLabel:_,options:n.flatMap((t,n)=>pn(t).previews.map(i=>({themeIndex:n,label:e[n]??t.label,activeModes:r(t.id),preview:i}))),onSelectAndUse:(e,t)=>{let r=n[e];r&&(f(e),a(r,t))}}}:{}}),t[7]=r,t[8]=_,t[9]=c,t[10]=o,t[11]=s,t[12]=l,t[13]=i,t[14]=a,t[15]=m,t[16]=n,t[17]=v}else v=t[17];return v}function Ga(e){return nt(e).includes(`dark`)}function Ka(e){return nt(e).includes(`light`)}function qa(e){let t=(0,Z.c)(118),{theme:n,setTheme:r,appearanceMode:i,setAppearanceMode:a,customThemes:o,initialAppearance:s,refreshTheme:c,isImportOpen:l,onImportOpenChange:u,themeHalves:d,setThemeHalf:f}=e,p=Hn(to),m=Vn(),[h,_]=(0,Q.useState)(null),[v,y]=(0,Q.useState)(!1),b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[0]=b):b=t[0];let[x,S]=(0,Q.useState)(b),C;t[1]===x?C=t[2]:(C=new Set(x),t[1]=x,t[2]=C);let w=C,T=h?.theme,E;t[3]===h?.collectionThemes?E=t[4]:(E=h?.collectionThemes??[],t[3]=h?.collectionThemes,t[4]=E);let O=E,k=O.length>1,A=T?.collection?.label??T?.label,j=eo,M=$a,N;t[5]===r?N=t[6]:(N=e=>{let t=r(e);return t||j(),t},t[5]=r,t[6]=N);let P=N,F;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(F=(e,t)=>{_({theme:e,collectionThemes:t}),S(t.length>1?[]:[e.id]),y(!0)},t[7]=F):F=t[7];let I=F,L;t[8]!==i||t[9]!==P||t[10]!==f||t[11]!==n||t[12]!==x||t[13]!==h?(L=()=>{if(!h)return;let e=new Set(x);if(e.size===0)return;let t=e.has(tt(n)?.id??``),r=Oe();if(!t||P(i===`system`?`system`:i)){for(let n of[`light`,`dark`]){let i=r[n];if(i===void 0)continue;let a=i&&e.has(i)?null:t?i:void 0;if(a!==void 0&&!f(n,a)){M();return}}try{Ze([...e])}catch{M();return}y(!1)}},t[8]=i,t[9]=P,t[10]=f,t[11]=n,t[12]=x,t[13]=h,t[14]=L):L=t[14];let B=L,H=tt(n)?.id??null,U=d?.light??H,W=d?.dark??H,ee;t[15]!==i||t[16]!==H||t[17]!==P||t[18]!==r||t[19]!==f||t[20]!==n?(ee=(e,t)=>{let a=e===`light`?`dark`:`light`;if(t===null&&H!==null){let e=Oe()[a]??H;if(!P(i===`system`?`system`:i))return;f(a,e)||(r(n),j());return}f(e,t)||j()},t[15]=i,t[16]=H,t[17]=P,t[18]=r,t[19]=f,t[20]=n,t[21]=ee):ee=t[21];let G=ee,K;t[22]!==W||t[23]!==s||t[24]!==U?(K=tt((s===`light`?U:W)??``)??null,t[22]=W,t[23]=s,t[24]=U,t[25]=K):K=t[25];let te=K,ne=Qa,re;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(re=(e,t)=>{let n=ne(e);return Tn(n,t)??n.previews[0].colors},t[26]=re):re=t[26];let ie=re,ae;t[27]===a?ae=t[28]:(ae=e=>{a(e)||j()},t[27]=a,t[28]=ae);let oe=ae,se;t[29]===G?se=t[30]:(se=e=>t=>{t!==`system`&&G(t,e)},t[29]=G,t[30]=se);let ce=se,le;t[31]!==W||t[32]!==U?(le=e=>{let t=[];return U===e&&t.push(`light`),W===e&&t.push(`dark`),t},t[31]=W,t[32]=U,t[33]=le):le=t[33];let q=le,ue;if(t[34]!==W||t[35]!==U){let e=e=>ie(e===`light`?U:W,e);ue=t=>(0,$.jsx)(Ia,{className:`h-[8.75rem]`,panes:t===`system`?[{clip:`left`,colors:e(`light`)},{clip:`right`,colors:e(`dark`)}]:[{colors:e(t===`dark`?`dark`:`light`)}]}),t[34]=W,t[35]=U,t[36]=ue}else ue=t[36];let de=ue,fe;t[37]!==i||t[38]!==de||t[39]!==oe?(fe=()=>(0,$.jsx)(`div`,{"aria-label":`Appearance mode`,className:`grid w-full grid-cols-3 gap-3`,role:`group`,children:[`system`,`light`,`dark`].map(e=>{let t=i===e;return(0,$.jsxs)(`button`,{"aria-label":e===`system`?`Follow the system appearance`:`Use ${e} mode`,"aria-pressed":t,className:z(`flex cursor-pointer flex-col items-stretch gap-1.5 rounded-xl border p-2 outline-none transition-colors focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,t?`border-transparent bg-accent/30`:`border-border/70 bg-card/60 hover:bg-accent/10`),style:t?{boxShadow:`inset 0 0 0 1px var(--ring)`}:void 0,onClick:()=>oe(e),type:`button`,children:[de(e),(0,$.jsx)(`span`,{className:z(`flex items-center justify-center text-xs font-medium`,t?`text-foreground`:`text-muted-foreground`),children:e===`system`?`System`:e===`light`?`Light`:`Dark`})]},e)})}),t[37]=i,t[38]=de,t[39]=oe,t[40]=fe):fe=t[40];let pe=fe,me,he,ge,_e,ye;if(t[41]!==te?.id||t[42]!==i||t[43]!==G||t[44]!==o||t[45]!==m||t[46]!==ce||t[47]!==s||t[48]!==u||t[49]!==p||t[50]!==P||t[51]!==q||t[52]!==pe){let e=[...o.reduce(Za,new Map).entries()],n=()=>(0,$.jsx)(xe,{children:(0,$.jsxs)(`div`,{className:`grid w-full gap-2`,style:{gridTemplateColumns:`repeat(auto-fit, minmax(min(100%, 16rem), 1fr))`},children:[qn.map(e=>(0,$.jsx)(Ha,{activeModes:q(null),isActive:!1,onDuplicate:()=>p({editingThemeId:null,seedThemeId:null,seedName:`${e.label} copy`,initialAppearance:s}),onUse:()=>P(i===`system`?`system`:i),onUseMode:ce(null),theme:e},e.id)),Ra.map(e=>{let t=pn(e);return(0,$.jsx)(Ha,{activeModes:q(e.id),isActive:!1,onDuplicate:()=>p({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:s}),onUse:()=>P(e.id),onUseMode:ce(e.id),theme:t},e.id)}),m.filter(e=>!o.some(t=>t.id===e.id)).map(e=>(0,$.jsx)(Ha,{activeModes:q(e.id),isActive:!1,onDuplicate:()=>p({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:s}),onUse:()=>{let t=Ve(e);t===null?P(e.id):G(t,e.id)},onUseMode:ce(e.id),theme:pn(e)},e.id)),e.map(e=>{let[t,n]=e;return(0,$.jsx)(Wa,{activeModesFor:q,onDownload:Xa,onDuplicate:e=>p({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:s}),onEdit:e=>p({editingThemeId:e.id,seedThemeId:null,seedName:null,initialAppearance:s}),onRemove:e=>I(e,n),onUse:e=>{let t=nt(e);t.length===1?G(t[0],e.id):P(e.id)},onUseMode:(e,t)=>ce(e.id)(t),themes:n},t)})]})});me=`space-y-3`,t[58]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,$.jsx)(`h3`,{className:`px-3 text-sm font-normal text-foreground/70 sm:px-4`,children:X(`color-scheme`).title}),t[58]=he):he=t[58],t[59]===pe?ge=t[60]:(ge=pe(),t[59]=pe,t[60]=ge);let r;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`h3`,{className:`text-sm font-normal text-foreground/70`,children:X(`theme`).title}),t[61]=r):r=t[61];let a;t[62]!==te?.id||t[63]!==s||t[64]!==p?(a=()=>p({editingThemeId:null,seedThemeId:te?.id??null,seedName:null,initialAppearance:s}),t[62]=te?.id,t[63]=s,t[64]=p,t[65]=a):a=t[65];let c;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(V,{}),t[66]=c):c=t[66];let l;t[67]===a?l=t[68]:(l=(0,$.jsxs)(R,{size:`xs`,variant:`outline`,onClick:a,children:[c,`Create theme`]}),t[67]=a,t[68]=l);let d;t[69]===u?d=t[70]:(d=()=>u(!0),t[69]=u,t[70]=d);let f;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(g,{}),t[71]=f):f=t[71];let h;t[72]===d?h=t[73]:(h=(0,$.jsxs)(R,{size:`xs`,variant:`outline`,onClick:d,children:[f,`Add theme`]}),t[72]=d,t[73]=h),t[74]!==l||t[75]!==h?(_e=(0,$.jsxs)(`div`,{className:`flex min-h-8 flex-wrap items-center justify-between gap-3 px-3 pt-2 sm:px-4`,children:[r,(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[l,h]})]}),t[74]=l,t[75]=h,t[76]=_e):_e=t[76],ye=n(),t[41]=te?.id,t[42]=i,t[43]=G,t[44]=o,t[45]=m,t[46]=ce,t[47]=s,t[48]=u,t[49]=p,t[50]=P,t[51]=q,t[52]=pe,t[53]=me,t[54]=he,t[55]=ge,t[56]=_e,t[57]=ye}else me=t[53],he=t[54],ge=t[55],_e=t[56],ye=t[57];let be;t[77]===c?be=t[78]:(be=(e,t)=>{let{updated:n}=t;n&&c();let r=n?`updated`:`added`;ve.add(Ne({type:`success`,title:e.length===1?`${e[0].label} ${r}`:`${e.length} themes ${r}`,description:e.map(Ya).join(`, `)}))},t[77]=c,t[78]=be);let Se;t[79]!==G||t[80]!==P?(Se=e=>{let t=nt(e);return t.length===1?(G(t[0],e.id),ve.add(Ne({type:`success`,title:`${e.label} added`,description:`It’s now your ${t[0]} theme.`})),!0):P(e.id)?(ve.add(Ne({type:`success`,title:`${e.label} added`,description:`It’s now active.`})),!0):!1},t[79]=G,t[80]=P,t[81]=Se):Se=t[81];let Ce;t[82]!==l||t[83]!==u||t[84]!==be||t[85]!==Se?(Ce=(0,$.jsx)(Pa,{onImportedMany:be,onImported:Se,onOpenChange:u,open:l}),t[82]=l,t[83]=u,t[84]=be,t[85]=Se,t[86]=Ce):Ce=t[86];let we=k?`Remove themes from “${A}”?`:`Remove “${T?.label}”?`,Te;t[87]===we?Te=t[88]:(Te=(0,$.jsx)(bn,{children:we}),t[87]=we,t[88]=Te);let Ee=k?`Select the variants you want to remove. You can restore them by importing the extension again.`:`You can bring it back anytime by importing its JSON file.`,De;t[89]===Ee?De=t[90]:(De=(0,$.jsx)(Sn,{children:Ee}),t[89]=Ee,t[90]=De);let ke;t[91]!==Te||t[92]!==De?(ke=(0,$.jsxs)(Dn,{children:[Te,De]}),t[91]=Te,t[92]=De,t[93]=ke):ke=t[93];let Ae;t[94]!==k||t[95]!==O||t[96]!==w?(Ae=k?(0,$.jsx)(`div`,{className:`grid max-h-72 grid-cols-1 gap-2 overflow-y-auto px-6 pb-6 sm:grid-cols-2`,children:O.map(e=>{let t=w.has(e.id),n=pn(e),r=`remove-theme-${e.id}`;return(0,$.jsxs)(`label`,{className:`group relative flex min-h-28 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border border-border/70 bg-muted/25 p-3 has-checked:border-ring has-checked:bg-accent/20 hover:bg-muted/40`,htmlFor:r,children:[(0,$.jsxs)(`span`,{className:`absolute right-2 top-2 inline-grid size-5 grid-cols-1 sm:size-4`,children:[(0,$.jsx)(`input`,{checked:t,className:`col-start-1 row-start-1 size-full appearance-none rounded-sm border border-input bg-background outline-none checked:border-primary checked:bg-primary focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring checked:focus-visible:inset-ring-3 checked:focus-visible:inset-ring-background dark:not-checked:bg-input/32 forced-colors:appearance-auto`,id:r,name:`themes-to-remove`,type:`checkbox`,onChange:t=>{let n=t.currentTarget.checked;S(t=>n?[...t,e.id]:t.filter(t=>t!==e.id))}}),(0,$.jsx)(D,{className:`pointer-events-none col-start-1 row-start-1 size-3.5 shrink-0 self-center justify-self-center stroke-primary-foreground opacity-0 group-has-checked:opacity-100 sm:size-3`})]}),(0,$.jsx)(`span`,{className:`flex min-h-12 items-center justify-center gap-1`,children:n.previews.map(Ja)}),(0,$.jsx)(`p`,{className:`max-w-full truncate text-center text-base font-medium text-foreground sm:text-sm`,children:e.label})]},e.id)})}):null,t[94]=k,t[95]=O,t[96]=w,t[97]=Ae):Ae=t[97];let je;t[98]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,$.jsx)(Bn,{render:(0,$.jsx)(R,{variant:`outline`}),children:`Cancel`}),t[98]=je):je=t[98];let Me=x.length===0,Pe=k?`Remove selected${x.length>0?` (${x.length})`:``}`:`Remove theme`,Fe;t[99]!==B||t[100]!==Me||t[101]!==Pe?(Fe=(0,$.jsxs)(Cn,{children:[je,(0,$.jsx)(R,{disabled:Me,variant:`destructive`,onClick:B,children:Pe})]}),t[99]=B,t[100]=Me,t[101]=Pe,t[102]=Fe):Fe=t[102];let Ie;t[103]!==ke||t[104]!==Ae||t[105]!==Fe?(Ie=(0,$.jsxs)(_n,{children:[ke,Ae,Fe]}),t[103]=ke,t[104]=Ae,t[105]=Fe,t[106]=Ie):Ie=t[106];let Le;t[107]!==v||t[108]!==Ie?(Le=(0,$.jsx)(ln,{open:v,onOpenChange:y,children:Ie}),t[107]=v,t[108]=Ie,t[109]=Le):Le=t[109];let Re;return t[110]!==me||t[111]!==he||t[112]!==ge||t[113]!==_e||t[114]!==ye||t[115]!==Ce||t[116]!==Le?(Re=(0,$.jsxs)(`div`,{className:me,children:[he,ge,_e,ye,Ce,Le]}),t[110]=me,t[111]=he,t[112]=ge,t[113]=_e,t[114]=ye,t[115]=Ce,t[116]=Le,t[117]=Re):Re=t[117],Re}function Ja(e){return(0,$.jsx)(`span`,{className:`flex size-11 shrink-0 items-center justify-center`,children:(0,$.jsx)(`span`,{className:`flex scale-75`,children:(0,$.jsx)(Mn,{colors:e.colors,mode:e.mode})})},e.mode)}function Ya(e){return e.label}function Xa(e){return Ba(`${e.id}.json`,Le(e))}function Za(e,t){let n=t.collection?`collection:${t.collection.id}`:`theme:${t.id}`,r=e.get(n);return r?r.push(t):e.set(n,[t]),e}function Qa(e){if(e===null)return qn[0];let t=tt(e);return t?pn(t):qn[0]}function $a(){ve.add(Ne({type:`error`,title:`Couldn’t remove theme`,description:`Try again.`}))}function eo(){ve.add(Ne({type:`error`,title:`Couldn’t save theme selection`,description:`Try again.`}))}function to(e){return e.openThemeEditor}function no(e){let t=(0,Z.c)(22),{durationMs:n}=e,[r,i]=(0,Q.useState)(!0),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>i(ro),t[0]=a):a=t[0];let o=`${n}ms`,s;t[1]===o?s=t[2]:(s={"--preview-duration":o},t[1]=o,t[2]=s);let c=s,l=r?`w-4`:`w-0`,u;t[3]===l?u=t[4]:(u=z(`h-full shrink-0 overflow-hidden rounded-md bg-sidebar`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,l),t[3]=l,t[4]=u);let d;t[5]===u?d=t[6]:(d=(0,$.jsx)(`span`,{"aria-hidden":!0,className:u}),t[5]=u,t[6]=d);let f;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(`span`,{className:`flex min-h-0 flex-1 flex-col gap-1 pt-1`,children:[(0,$.jsx)(`span`,{className:`h-0.5 w-full rounded-full bg-muted-foreground/25`}),(0,$.jsx)(`span`,{className:`h-0.5 w-4/5 rounded-full bg-muted-foreground/20`}),(0,$.jsx)(`span`,{className:`h-0.5 w-3/5 rounded-full bg-muted-foreground/15`})]}),t[7]=f):f=t[7];let p=r?`h-2 border-t border-border/70`:`h-0 border-t-0`,m;t[8]===p?m=t[9]:(m=z(`flex shrink-0 items-center overflow-hidden bg-foreground/5 px-2`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,p),t[8]=p,t[9]=m);let h;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`span`,{className:`h-px w-2/3 rounded-full bg-muted-foreground/25`}),t[10]=h):h=t[10];let g;t[11]===m?g=t[12]:(g=(0,$.jsxs)(`span`,{"aria-hidden":!0,className:`flex min-w-0 flex-1 flex-col px-1`,children:[f,(0,$.jsx)(`span`,{className:m,children:h})]}),t[11]=m,t[12]=g);let _=r?`w-5`:`w-0`,v;t[13]===_?v=t[14]:(v=z(`h-full shrink-0 overflow-hidden rounded-md bg-muted`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,_),t[13]=_,t[14]=v);let y;t[15]===v?y=t[16]:(y=(0,$.jsx)(`span`,{"aria-hidden":!0,className:v}),t[15]=v,t[16]=y);let b;return t[17]!==g||t[18]!==y||t[19]!==c||t[20]!==d?(b=(0,$.jsxs)(`button`,{type:`button`,"aria-label":`Replay panel animation preview`,className:`flex h-10 w-full cursor-pointer overflow-hidden rounded-lg border border-border bg-background p-1 shadow-xs/5 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`,onClick:a,style:c,children:[d,g,y]}),t[17]=g,t[18]=y,t[19]=c,t[20]=d,t[21]=b):b=t[21],b}function ro(e){return!e}function io(){let{scope:e,connectedEnvironments:t}=Jt(),n=In(),{snapshots:r,error:a,isLoading:o,refresh:s}=zn(e.environmentIds),c=we(t,C),[l,d]=(0,Q.useState)(``),[f,m]=(0,Q.useState)(`all`),[h,g]=(0,Q.useState)(`newest`),[_,v]=(0,Q.useState)(!1),y=(0,Q.useRef)(!1),[b,x]=(0,Q.useState)(null),S=(0,Q.useMemo)(()=>{let t=e.kind===`project`||e.kind===`checkout`?new Set(e.members.map(e=>`${e.environmentId}:${e.id}`)):null;return r.flatMap(({environmentId:e,snapshot:n})=>n.projects.flatMap(r=>{let i=`${e}:${r.id}`;if(t!==null&&!t.has(i))return[];let a=n.threads.filter(e=>e.projectId===r.id).map(t=>re(e,t));return a.length?[{key:i,project:{...r,environmentId:e},threads:a}]:[]}))},[r,e]),w=S.flatMap(e=>e.threads),T=S.some(e=>e.key===f)?f:`all`,E=S.flatMap(e=>{if(T!==`all`&&e.key!==T)return[];let t=e.threads.filter(e=>e.title.toLocaleLowerCase().includes(l.trim().toLocaleLowerCase())).toSorted((e,t)=>{if(h===`title`)return e.title.localeCompare(t.title);let n=(t.archivedAt??t.createdAt).localeCompare(e.archivedAt??e.createdAt);return h===`oldest`?-n:n});return t.length?[{...e,threads:t}]:[]}),D=!o&&!a&&e.environmentIds.every(e=>t.some(t=>t.environmentId===e)&&r.some(t=>t.environmentId===e)),O=async(t,r,i=!1)=>{if(!y.current){y.current=!0,v(!0),x(null);try{if(i&&!await Ee().dialogs.confirm(`Permanently delete all ${t.length} archived chats in ${e.label}? Search and project filters do not limit this action. This cannot be undone.`,{variant:`destructive`}))return;for(let e of t){let t=r===`unarchive`?await n.unarchiveThread(e):i?await n.deleteThread(e):await n.confirmAndDeleteThread(e);if(t._tag===`Failure`)throw ee(t)}}catch(e){x(e instanceof Error?e.message:`The action could not be completed. Try again.`)}finally{s(),y.current=!1,v(!1)}}};return(0,$.jsxs)(nn,{width:`wide`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,$.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Archived chats`}),(0,$.jsxs)(R,{variant:`destructive-outline`,size:`sm`,disabled:_||!D||!w.length||w.some(e=>!c.has(e.environmentId)),onClick:()=>void O(w.map(e=>p(e.environmentId,e.id)),`delete`,!0),children:[(0,$.jsx)(i,{"aria-hidden":!0}),` Delete all`]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-[minmax(0,1fr)_9rem_10rem]`,children:[(0,$.jsx)(`div`,{className:`col-span-2 min-w-0 sm:col-span-1`,children:(0,$.jsxs)(Ut,{children:[(0,$.jsx)(Vt,{children:(0,$.jsx)(u,{"aria-hidden":!0})}),(0,$.jsx)(Ht,{type:`search`,"aria-label":`Search archived chats`,placeholder:`Search archived chats`,value:l,onChange:e=>d(e.currentTarget.value)})]})}),(0,$.jsxs)(me,{value:h,onValueChange:e=>e&&g(e),children:[(0,$.jsx)(pe,{"aria-label":`Sort archived chats`,children:(0,$.jsx)(ue,{children:h===`newest`?`Newest first`:h===`oldest`?`Oldest first`:`By title`})}),(0,$.jsxs)(fe,{children:[(0,$.jsx)(q,{value:`newest`,children:`Newest first`}),(0,$.jsx)(q,{value:`oldest`,children:`Oldest first`}),(0,$.jsx)(q,{value:`title`,children:`By title`})]})]}),(0,$.jsxs)(me,{value:T,onValueChange:e=>e&&m(e),children:[(0,$.jsx)(pe,{"aria-label":`Filter by project`,children:(0,$.jsx)(ue,{children:T===`all`?`All projects`:S.find(e=>e.key===f)?.project.title??`All projects`})}),(0,$.jsxs)(fe,{children:[(0,$.jsx)(q,{value:`all`,children:`All projects`}),S.map(e=>(0,$.jsx)(q,{value:e.key,children:e.project.title},e.key))]})]})]}),b||a?(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-destructive-foreground`,children:[(0,$.jsx)(`p`,{children:b??a}),(0,$.jsx)(R,{variant:`outline`,size:`sm`,onClick:s,children:`Retry`})]}):null,E.map(({key:e,project:t,threads:n},r)=>(0,$.jsx)(an,{id:r===0?`archive`:void 0,title:t.title,icon:(0,$.jsx)(Bt,{project:t}),headerAction:(0,$.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[n.length,` `,n.length===1?`chat`:`chats`]}),children:n.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-4`,onContextMenu:t=>{t.preventDefault(),!_&&c.has(e.environmentId)&&Ee().contextMenu.show([{id:`unarchive`,label:`Unarchive`},{id:`delete`,label:`Delete`,destructive:!0}],{x:t.clientX,y:t.clientY}).then(t=>{if(t===`delete`||t===`unarchive`)return O([p(e.environmentId,e.id)],t)}).catch(e=>x(e instanceof Error?e.message:`Could not open chat actions.`))},children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`break-words text-sm font-medium`,children:e.title||`Untitled chat`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:new Date(e.archivedAt??e.createdAt).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})})]}),(0,$.jsxs)(Se,{children:[(0,$.jsx)(ye,{render:(0,$.jsx)(R,{variant:`ghost-destructive`,size:`icon-sm`,"aria-label":`Delete ${e.title}`,disabled:_||!c.has(e.environmentId),onClick:()=>void O([p(e.environmentId,e.id)],`delete`),children:(0,$.jsx)(i,{"aria-hidden":!0})})}),(0,$.jsx)(be,{children:`Delete chat`})]}),(0,$.jsx)(R,{variant:`soft`,size:`sm`,disabled:_||!c.has(e.environmentId),onClick:()=>void O([p(e.environmentId,e.id)],`unarchive`),children:`Unarchive`})]},e.id))},e)),E.length?null:(0,$.jsx)(`p`,{id:`archive`,role:`status`,className:`py-8 text-center text-sm text-muted-foreground`,children:o?`Loading archived chats…`:a?`Archived chats could not be loaded.`:w.length?`No chats match your filters.`:`No archived chats.`})]})}var ao={artwork:`Artwork`,pill:`Version pill`,none:`None`},oo={turn:`Wait for the full response`,paragraph:`Show finished paragraphs`},so={turn:`Text appears once the agent finishes its turn.`,paragraph:`Each paragraph or code block appears as soon as it is complete.`},co={updated_at:`Last user message`,created_at:`Created at`,manual:`Manual`},lo=O(E),uo={locale:`System default`,"12-hour":`12-hour`,"24-hour":`24-hour`},fo={comfortable:`Comfortable`,wide:`Wide`,full:`Full`},po={p4:`P4`,lucide:`Lucide`},mo={stacked:`Stacked`,split:`Split`},ho={direct:`Direct`,hold:`Hold`,"double-click":`Double press`},go={balanced:`Balanced`,performance:`Performance`,"battery-saver":`Battery saver`},_o={...go,advanced:`Advanced`},vo={balanced:`Pauses probes for idle clients, locked hosts, or low power mode.`,performance:`Allows scoped background probes while any subscribed client remains connected.`,"battery-saver":`Also pauses background probes when the host or client is on battery.`},yo=`Uses custom intervals.`,bo=F.make(`codex`),xo=[{key:`pauseWhenHostLocked`,label:`Pause when host is locked`},{key:`pauseWhenHostLowPower`,label:`Pause on host low power`},{key:`pauseWhenClientLowPower`,label:`Pause on client low power`},{key:`pauseWhenOnBattery`,label:`Pause on battery`}];function So(){return{backgroundActivity:T.backgroundActivity}}function Co(e){return{backgroundActivity:{schemaVersion:1,profile:e,overrides:{}}}}function wo(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`span`,{className:`inline-flex items-baseline gap-2`,children:[(0,$.jsx)(`span`,{children:`Version`}),(0,$.jsx)(`code`,{className:`text-2xs font-medium text-muted-foreground`,children:K})]}),e[0]=t):t=e[0],t}function To(){let e=Wn(),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(!1),a=typeof window<`u`&&!!window.desktopBridge,o=e?.channel??`latest`,s=a?null:te,c=un||a&&o===`nightly`,l=(0,Q.useCallback)(e=>{let t=window.desktopBridge;t&&typeof t.setUpdateChannel==`function`&&e!==o&&(n(!0),t.setUpdateChannel(e).catch(e=>{ve.add(Ne({type:`error`,title:`Could not change update track`,description:e instanceof Error?e.message:`Update track change failed.`}))}).finally(()=>{n(!1)}))},[o]),u=(0,Q.useCallback)(async()=>{let t=window.desktopBridge;if(!t)return;let n=e?Rn(e):`none`;if(n===`download`){t.downloadUpdate().catch(e=>{ve.add(Ne({type:`error`,title:`Could not download update`,description:e instanceof Error?e.message:`Download failed.`}))});return}if(n===`install`){if(r)return;i(!0);let n=!1;try{n=await Ee().dialogs.confirm(On(e??{availableVersion:null,downloadedVersion:null}))}catch(e){i(!1),ve.add(Ne({type:`error`,title:`Could not confirm update`,description:e instanceof Error?e.message:`Update confirmation failed.`}));return}if(!n){i(!1);return}t.installUpdate().catch(e=>{ve.add(Ne({type:`error`,title:`Could not install update`,description:e instanceof Error?e.message:`Install failed.`}))}).finally(()=>i(!1));return}typeof t.checkForUpdate==`function`&&t.checkForUpdate().then(e=>{e.checked||ve.add(Ne({type:`error`,title:`Could not check for updates`,description:e.state.message??`Automatic updates are not available in this build.`}))}).catch(e=>{ve.add(Ne({type:`error`,title:`Could not check for updates`,description:e instanceof Error?e.message:`Update check failed.`}))})},[r,e]),d=e?Rn(e):`none`,f=e?Fn(e):null,p=d===`none`?!Pn(e):sn(e),m={download:`Download`,install:`Install`}[d]??{checking:`Checking…`,downloading:`Downloading…`,"up-to-date":`Up to Date`}[e?.status??``]??`Check for Updates`,h=d===`download`||d===`install`?`Update available.`:`Current version of the application.`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{id:X(`app-version`).id,title:(0,$.jsx)(wo,{}),description:h,control:(0,$.jsxs)(Se,{children:[(0,$.jsx)(ye,{render:(0,$.jsx)(R,{size:`sm`,variant:`outline`,disabled:p||r,onClick:u,children:m})}),f?(0,$.jsx)(be,{children:f}):null]})}),a?(0,$.jsx)(J,{...X(`update-track`),description:`Use stable releases or nightly builds. Switch back anytime.`,control:(0,$.jsxs)(me,{value:o,onValueChange:e=>{l(e)},children:[(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Update track`,disabled:t,children:(0,$.jsx)(ue,{children:o===`nightly`?`Nightly`:`Stable`})}),(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`latest`,children:`Stable`}),(0,$.jsx)(q,{hideIndicator:!0,value:`nightly`,children:`Nightly`})]})]})}):s?(0,$.jsx)(J,{...X(`update-track`),description:`Switches the hosted app release channel.`,control:(0,$.jsxs)(me,{value:s,onValueChange:e=>{e!==s&&window.location.assign(ie({channel:e}))},children:[(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Update track`,children:(0,$.jsx)(ue,{children:ne})}),(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`latest`,children:`Latest`}),(0,$.jsx)(q,{hideIndicator:!0,value:`nightly`,children:`Nightly`})]})]})}):null,c?(0,$.jsx)(Gn,{}):null,a?(0,$.jsx)(yr,{}):null]})}function Eo(e){let{theme:t,setTheme:n,followSystem:r,setFollowSystem:i,setThemeHalf:a,clearThemeHalves:o,themeHalves:s}=Te(),c=Qt(),l=Zt(),u=!x(c.textGenerationModelSelection??null,T.textGenerationModelSelection??null),d=pr(c),f=(0,Q.useMemo)(()=>[...t===`system`?[]:[`Theme`],...r?[]:[`Follow system`],...s===null?[]:[`Theme mix`],...c.appearanceContrast===T.appearanceContrast?[]:[`Contrast`],...c.glassOpacity===T.glassOpacity?[]:[`Glass opacity`],...c.diffColorScheme===T.diffColorScheme?[]:[`Diff colors`],...c.chatWidth===T.chatWidth?[]:[`Chat width`],...c.iconSet===T.iconSet?[]:[`Icon set`],...c.panelAnimationDurationMs===T.panelAnimationDurationMs?[]:[`Panel animations`],...c.environmentIdentificationMode===T.environmentIdentificationMode?[]:[`Environment identification`],...c.timestampFormat===T.timestampFormat?[]:[`Time format`],...c.notificationMode===T.notificationMode?[]:[`Thread notifications`],...c.inAppNotificationsEnabled===T.inAppNotificationsEnabled?[]:[`In-app notifications`],...c.sidebarThreadPreviewCount===T.sidebarThreadPreviewCount?[]:[`Visible threads`],...c.sidebarProjectGroupingMode===T.sidebarProjectGroupingMode?[]:[`Project Grouping`],...c.sidebarProjectSortOrder===T.sidebarProjectSortOrder?[]:[`Project order`],...c.sidebarWorkingShelfEnabled===T.sidebarWorkingShelfEnabled?[]:[`Working section`],...c.sidebarAutoSettleAfterDays===T.sidebarAutoSettleAfterDays?[]:[`Auto-settle inactive threads`],...c.sidebarAutoSettleKeepPullRequests===T.sidebarAutoSettleKeepPullRequests?[]:[`Keep threads with a PR`],...c.sidebarAutoSettleOnMerge===T.sidebarAutoSettleOnMerge?[]:[`Auto-settle merged threads`],...c.autoResumeLimitedThreads===T.autoResumeLimitedThreads?[]:[`Auto-resume limited threads`],...c.snoozeLimitedThreads===T.snoozeLimitedThreads?[]:[`Snooze limited threads`],...c.wordWrap===T.wordWrap?[]:[`Word wrap`],...c.persistComposerContextStrip===T.persistComposerContextStrip?[]:[`Composer context`],...dr(c),...c.diffFilesCollapsed===T.diffFilesCollapsed?[]:[`Default diff file state`],...c.diffIgnoreWhitespace===T.diffIgnoreWhitespace?[]:[`Diff whitespace changes`],...c.diffLayout===T.diffLayout?[]:[`Diff layout`],...c.proactivePanelsEnabled===T.proactivePanelsEnabled?[]:[`Proactive panels`],...c.showSkillsInSlashMenu===T.showSkillsInSlashMenu?[]:[`Show skills in slash menu`],...c.composerCollapseOnScroll===T.composerCollapseOnScroll?[]:[`Collapse composer on scroll`],...c.composerRichTextEnabled===T.composerRichTextEnabled?[]:[`Rich text composer`],...c.sendShortcut===T.sendShortcut?[]:[`Send shortcut`],...c.followUpBehavior===T.followUpBehavior?[]:[`Follow-up behavior`],...c.contextWindowMeterEnabled===T.contextWindowMeterEnabled?[]:[`Context window indicator`],...c.responseStreamingMode===T.responseStreamingMode?[]:[`Response streaming`],...c.enableProviderUpdateChecks===T.enableProviderUpdateChecks?[]:[`Provider update checks`],...c.continueThreadsAfterServerUpdate===T.continueThreadsAfterServerUpdate?[]:[`Continue threads after restarts`],...d?[`Background activity`]:[],...c.defaultThreadEnvMode===T.defaultThreadEnvMode?[]:[`New thread mode`],...c.newWorktreesStartFromOrigin===T.newWorktreesStartFromOrigin?[]:[`New worktrees start from origin`],...c.addProjectBaseDirectory===T.addProjectBaseDirectory?[]:[`Add project base directory`],...c.confirmThreadUnpin===T.confirmThreadUnpin?[]:[`Unpin confirmation`],...c.confirmThreadArchive===T.confirmThreadArchive?[]:[`Archive confirmation`],...c.confirmThreadDelete===T.confirmThreadDelete?[]:[`Delete confirmation`],...c.confirmQuit===T.confirmQuit?[]:[`Quit shortcut`],...u?[`Text generation model`]:[],...ir(c),...c.enableAgentBrowserAccess===T.enableAgentBrowserAccess?[]:[`Agent browser access`]],[u,d,c.browserDefaultViewport,c.browserDefaultZoomFactor,c.browserDefaultAppearance,c.browserRecordingFrameRate,c.browserRecordingShowKeyPresses,c.browserRecordingShowMousePresses,c.browserLinkTarget,c.browserAutoShowFloatingPreview,c.appearanceContrast,c.diffColorScheme,c.chatWidth,c.iconSet,c.enableAgentBrowserAccess,c.confirmQuit,c.confirmThreadArchive,c.confirmThreadDelete,c.confirmThreadUnpin,c.composerCollapseOnScroll,c.composerRichTextEnabled,c.sendShortcut,c.followUpBehavior,c.addProjectBaseDirectory,c.defaultThreadEnvMode,c.newWorktreesStartFromOrigin,c.diffFilesCollapsed,c.diffIgnoreWhitespace,c.diffLayout,c.proactivePanelsEnabled,c.environmentIdentificationMode,c.contextWindowMeterEnabled,c.fontFamilyCode,c.fontFamilyComposer,c.fontFamilySans,c.fontFamilyTerminal,c.fontSizeCode,c.fontSizeInterface,c.fontSizePrompt,c.fontSizeTerminal,c.glassOpacity,c.panelAnimationDurationMs,c.responseStreamingMode,c.persistComposerContextStrip,c.enableProviderUpdateChecks,c.continueThreadsAfterServerUpdate,c.sidebarAutoSettleAfterDays,c.sidebarAutoSettleKeepPullRequests,c.sidebarAutoSettleOnMerge,c.autoResumeLimitedThreads,c.snoozeLimitedThreads,c.sidebarProjectGroupingMode,c.sidebarProjectSortOrder,c.sidebarWorkingShelfEnabled,c.sidebarThreadPreviewCount,c.showSkillsInSlashMenu,c.timestampFormat,c.notificationMode,c.inAppNotificationsEnabled,c.wordWrap,r,t,s]);return{changedSettingLabels:f,restoreDefaults:(0,Q.useCallback)(async()=>{if(f.length===0||!await(Ae()??Ee()).dialogs.confirm([`Restore default settings?`,`This will reset: ${f.join(`, `)}.`].join(`
38
38
  `),{variant:`destructive`}))return;let r=t;try{r=ke()}catch{}let s=De(),c=r!==`system`,u=s!==null,d=je(r)!==`system`,p=()=>{ve.add(Ne({type:`error`,title:`Couldn’t restore theme settings`,description:`Try again.`}))},m=s,h=()=>{c&&n(r),m?.light&&a(`light`,m.light),m?.dark&&a(`dark`,m.dark)};if(c&&!n(`system`)){p();return}if(u&&!o()){h(),p();return}if(d&&!i(!0)){h(),p();return}l({appearanceContrast:T.appearanceContrast,diffColorScheme:T.diffColorScheme,chatWidth:T.chatWidth,iconSet:T.iconSet,timestampFormat:T.timestampFormat,notificationMode:T.notificationMode,inAppNotificationsEnabled:T.inAppNotificationsEnabled,wordWrap:T.wordWrap,persistComposerContextStrip:T.persistComposerContextStrip,diffFilesCollapsed:T.diffFilesCollapsed,diffIgnoreWhitespace:T.diffIgnoreWhitespace,diffLayout:T.diffLayout,proactivePanelsEnabled:T.proactivePanelsEnabled,showSkillsInSlashMenu:T.showSkillsInSlashMenu,composerCollapseOnScroll:T.composerCollapseOnScroll,composerRichTextEnabled:T.composerRichTextEnabled,sendShortcut:T.sendShortcut,followUpBehavior:T.followUpBehavior,contextWindowMeterEnabled:T.contextWindowMeterEnabled,environmentIdentificationMode:T.environmentIdentificationMode,glassOpacity:T.glassOpacity,panelAnimationDurationMs:T.panelAnimationDurationMs,sidebarThreadPreviewCount:T.sidebarThreadPreviewCount,sidebarProjectGroupingMode:T.sidebarProjectGroupingMode,sidebarProjectSortOrder:T.sidebarProjectSortOrder,sidebarWorkingShelfEnabled:T.sidebarWorkingShelfEnabled,sidebarAutoSettleAfterDays:T.sidebarAutoSettleAfterDays,sidebarAutoSettleKeepPullRequests:T.sidebarAutoSettleKeepPullRequests,sidebarAutoSettleOnMerge:T.sidebarAutoSettleOnMerge,autoResumeLimitedThreads:T.autoResumeLimitedThreads,snoozeLimitedThreads:T.snoozeLimitedThreads,responseStreamingMode:T.responseStreamingMode,enableProviderUpdateChecks:T.enableProviderUpdateChecks,continueThreadsAfterServerUpdate:T.continueThreadsAfterServerUpdate,backgroundActivity:T.backgroundActivity,backgroundActivityProfile:T.backgroundActivityProfile,automaticGitFetchInterval:T.automaticGitFetchInterval,providerHealthRefreshInterval:T.providerHealthRefreshInterval,defaultThreadEnvMode:T.defaultThreadEnvMode,newWorktreesStartFromOrigin:T.newWorktreesStartFromOrigin,addProjectBaseDirectory:T.addProjectBaseDirectory,confirmThreadArchive:T.confirmThreadArchive,confirmThreadDelete:T.confirmThreadDelete,confirmThreadUnpin:T.confirmThreadUnpin,confirmQuit:T.confirmQuit,textGenerationModelSelection:T.textGenerationModelSelection,fontFamilySans:T.fontFamilySans,fontFamilyComposer:T.fontFamilyComposer,fontFamilyCode:T.fontFamilyCode,fontFamilyTerminal:T.fontFamilyTerminal,fontSizeInterface:T.fontSizeInterface,fontSizePrompt:T.fontSizePrompt,fontSizeCode:T.fontSizeCode,fontSizeTerminal:T.fontSizeTerminal,browserDefaultViewport:T.browserDefaultViewport,browserDefaultZoomFactor:T.browserDefaultZoomFactor,browserDefaultAppearance:T.browserDefaultAppearance,browserRecordingFrameRate:T.browserRecordingFrameRate,browserRecordingShowKeyPresses:T.browserRecordingShowKeyPresses,browserRecordingShowMousePresses:T.browserRecordingShowMousePresses,browserLinkTarget:T.browserLinkTarget,browserAutoShowFloatingPreview:T.browserAutoShowFloatingPreview,enableAgentBrowserAccess:T.enableAgentBrowserAccess}),e?.()},[f,o,e,i,n,a,t,s,l])}}function Do(e){let t=(0,Z.c)(98),{open:n,onOpenChange:r}=e,i=Xt(),a=Qt(),o=Zt(),s,c,l,u,d,f;t[0]===a?(s=t[1],c=t[2],l=t[3],u=t[4],d=t[5],f=t[6]):(d=Me(a),s=d.profile,c=cr(d.automaticGitFetchInterval),u=cr(d.providerHealthRefreshInterval),l=cr(d.hostPowerMonitorActiveInterval),f=cr(d.hostPowerMonitorIdleInterval),t[0]=a,t[1]=s,t[2]=c,t[3]=l,t[4]=u,t[5]=d,t[6]=f);let p=f,m=n&&i,h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsxs)(Ot,{children:[(0,$.jsx)(kt,{children:`Background Activity`}),(0,$.jsx)(Mt,{children:`Tune the shared power policy and the background intervals that feed it.`})]}),t[7]=h):h=t[7];let g=!i,_;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Shared policy`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Controls whether background work may run after a subscribed interval fires.`})]}),t[8]=_):_=t[8];let v;t[9]!==a||t[10]!==o?(v=e=>{(e===`balanced`||e===`performance`||e===`battery-saver`)&&o({backgroundActivity:ur(a,e)})},t[9]=a,t[10]=o,t[11]=v):v=t[11];let y=go[s],b;t[12]===y?b=t[13]:(b=(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Shared background policy`,children:(0,$.jsx)(ue,{children:y})}),t[12]=y,t[13]=b);let x;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`balanced`,children:go.balanced}),(0,$.jsx)(q,{hideIndicator:!0,value:`performance`,children:go.performance}),(0,$.jsx)(q,{hideIndicator:!0,value:`battery-saver`,children:go[`battery-saver`]})]}),t[14]=x):x=t[14];let C;t[15]!==s||t[16]!==v||t[17]!==b?(C=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[_,(0,$.jsxs)(me,{value:s,onValueChange:v,children:[b,x]})]}),t[15]=s,t[16]=v,t[17]=b,t[18]=C):C=t[18];let w;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:X(`git-fetch-interval`).title}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Refresh remote branch status in the background.`})]}),t[19]=w):w=t[19];let T;t[20]!==d||t[21]!==a.backgroundActivity||t[22]!==o?(T=e=>o(mr(a.backgroundActivity,d,{automaticGitFetchInterval:S(lr(e))})),t[20]=d,t[21]=a.backgroundActivity,t[22]=o,t[23]=T):T=t[23];let E;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsxs)(ce,{children:[(0,$.jsx)(se,{"aria-label":`Decrease Git fetch interval`}),(0,$.jsx)(ae,{"aria-label":`Git fetch interval in seconds`}),(0,$.jsx)(oe,{"aria-label":`Increase Git fetch interval`})]}),t[24]=E):E=t[24];let D;t[25]!==c||t[26]!==T?(D=(0,$.jsx)(le,{value:c,min:0,step:5,size:`sm`,className:`w-32`,onValueChange:T,children:E}),t[25]=c,t[26]=T,t[27]=D):D=t[27];let O;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[28]=O):O=t[28];let k;t[29]===D?k=t[30]:(k=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[w,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[D,O]})]}),t[29]=D,t[30]=k);let A;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Provider health interval`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Refresh provider availability, versions, and auth state. Model catalog updates follow Provider update checks.`})]}),t[31]=A):A=t[31];let j;t[32]!==d||t[33]!==a.backgroundActivity||t[34]!==o?(j=e=>o(mr(a.backgroundActivity,d,{providerHealthRefreshInterval:S(lr(e))})),t[32]=d,t[33]=a.backgroundActivity,t[34]=o,t[35]=j):j=t[35];let M;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsxs)(ce,{children:[(0,$.jsx)(se,{"aria-label":`Decrease provider health interval`}),(0,$.jsx)(ae,{"aria-label":`Provider health interval in seconds`}),(0,$.jsx)(oe,{"aria-label":`Increase provider health interval`})]}),t[36]=M):M=t[36];let N;t[37]!==u||t[38]!==j?(N=(0,$.jsx)(le,{value:u,min:0,step:30,size:`sm`,className:`w-32`,onValueChange:j,children:M}),t[37]=u,t[38]=j,t[39]=N):N=t[39];let P;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[40]=P):P=t[40];let F;t[41]===N?F=t[42]:(F=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[A,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[N,P]})]}),t[41]=N,t[42]=F);let I;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Host power monitor`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Poll host power state while clients are active.`})]}),t[43]=I):I=t[43];let L;t[44]!==d||t[45]!==a.backgroundActivity||t[46]!==o?(L=e=>o(mr(a.backgroundActivity,d,{hostPowerMonitorActiveInterval:S(lr(e,5))})),t[44]=d,t[45]=a.backgroundActivity,t[46]=o,t[47]=L):L=t[47];let z;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsxs)(ce,{children:[(0,$.jsx)(se,{"aria-label":`Decrease active host power interval`}),(0,$.jsx)(ae,{"aria-label":`Active host power interval in seconds`}),(0,$.jsx)(oe,{"aria-label":`Increase active host power interval`})]}),t[48]=z):z=t[48];let B;t[49]!==l||t[50]!==L?(B=(0,$.jsx)(le,{value:l,min:5,step:5,size:`sm`,className:`w-32`,onValueChange:L,children:z}),t[49]=l,t[50]=L,t[51]=B):B=t[51];let V;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[52]=V):V=t[52];let H;t[53]===B?H=t[54]:(H=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-t px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[I,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[B,V]})]}),t[53]=B,t[54]=H);let U;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Idle host monitor`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Poll host power state when no foreground client is active.`})]}),t[55]=U):U=t[55];let W;t[56]!==d||t[57]!==a.backgroundActivity||t[58]!==o?(W=e=>o(mr(a.backgroundActivity,d,{hostPowerMonitorIdleInterval:S(lr(e,5))})),t[56]=d,t[57]=a.backgroundActivity,t[58]=o,t[59]=W):W=t[59];let ee;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsxs)(ce,{children:[(0,$.jsx)(se,{"aria-label":`Decrease idle host power interval`}),(0,$.jsx)(ae,{"aria-label":`Idle host power interval in seconds`}),(0,$.jsx)(oe,{"aria-label":`Increase idle host power interval`})]}),t[60]=ee):ee=t[60];let G;t[61]!==p||t[62]!==W?(G=(0,$.jsx)(le,{value:p,min:5,step:30,size:`sm`,className:`w-32`,onValueChange:W,children:ee}),t[61]=p,t[62]=W,t[63]=G):G=t[63];let K;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[64]=K):K=t[64];let te;t[65]===G?te=t[66]:(te=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-t px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[U,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[G,K]})]}),t[65]=G,t[66]=te);let ne;t[67]!==d||t[68]!==a.backgroundActivity||t[69]!==o?(ne=xo.map(e=>{let{key:t,label:n}=e;return(0,$.jsxs)(`label`,{className:`flex items-center justify-between gap-3 border-b px-4 py-3 last:border-b-0 sm:border-r sm:even:border-r-0`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium`,children:n}),(0,$.jsx)(xn,{checked:d[t],onCheckedChange:e=>o(mr(a.backgroundActivity,d,{[t]:!!e})),"aria-label":n})]},t)}),t[67]=d,t[68]=a.backgroundActivity,t[69]=o,t[70]=ne):ne=t[70];let re;t[71]===ne?re=t[72]:(re=(0,$.jsx)(`div`,{className:`grid gap-0 border-t sm:grid-cols-2`,children:ne}),t[71]=ne,t[72]=re);let ie;t[73]!==C||t[74]!==k||t[75]!==F||t[76]!==H||t[77]!==te||t[78]!==re||t[79]!==g?(ie=(0,$.jsx)(jt,{children:(0,$.jsxs)(`fieldset`,{disabled:g,className:`min-w-0 overflow-hidden rounded-xl border bg-card text-card-foreground`,children:[C,k,F,H,te,re]})}),t[73]=C,t[74]=k,t[75]=F,t[76]=H,t[77]=te,t[78]=re,t[79]=g,t[80]=ie):ie=t[80];let de=!i,he;t[81]===o?he=t[82]:(he=()=>o(So()),t[81]=o,t[82]=he);let ge;t[83]!==de||t[84]!==he?(ge=(0,$.jsx)(R,{variant:`outline`,disabled:de,onClick:he,children:`Reset all`}),t[83]=de,t[84]=he,t[85]=ge):ge=t[85];let _e;t[86]===r?_e=t[87]:(_e=(0,$.jsx)(R,{onClick:()=>r(!1),children:`Done`}),t[86]=r,t[87]=_e);let ve;t[88]!==ge||t[89]!==_e?(ve=(0,$.jsxs)(At,{children:[ge,_e]}),t[88]=ge,t[89]=_e,t[90]=ve):ve=t[90];let ye;t[91]!==ie||t[92]!==ve?(ye=(0,$.jsxs)(Nt,{className:`max-w-xl`,children:[h,ie,ve]}),t[91]=ie,t[92]=ve,t[93]=ye):ye=t[93];let be;return t[94]!==r||t[95]!==m||t[96]!==ye?(be=(0,$.jsx)(Pt,{open:m,onOpenChange:r,children:ye}),t[94]=r,t[95]=m,t[96]=ye,t[97]=be):be=t[97],be}function Oo(){let e=(0,Z.c)(166),{appearanceMode:t,refreshTheme:n,resolvedTheme:r,setAppearanceMode:i,setTheme:a,setThemeHalf:o,theme:s,themeHalves:c}=Te(),l=cn(),[u,d]=(0,Q.useState)(!1),f=Qt(),p=Zt(),m=vn(),h;e[0]===m?h=e[1]:(h=Nn(m),e[0]=m,e[1]=h);let g=h!==null,_=(f.glassOpacity-40)/60,v=`${_*100}%`,y=`${.5-_}rem`,b;e[2]!==v||e[3]!==y?(b={"--settings-slider-progress":v,"--settings-slider-fill-offset":y},e[2]=v,e[3]=y,e[4]=b):b=e[4];let x=b,S=(f.appearanceContrast-50)/150,C=`${S*100}%`,w=`${.5-S}rem`,E;e[5]!==C||e[6]!==w?(E={"--settings-slider-progress":C,"--settings-slider-fill-offset":w},e[5]=C,e[6]=w,e[7]=E):E=e[7];let D=E,O=(f.panelAnimationDurationMs-0)/400,k=`${O*100}%`,A=`${.5-O}rem`,j;e[8]!==k||e[9]!==A?(j={"--settings-slider-progress":k,"--settings-slider-fill-offset":A},e[8]=k,e[9]=A,e[10]=j):j=e[10];let N=j,P;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=X(`theme`),e[11]=P):P=e[11];let F;e[12]!==t||e[13]!==l||e[14]!==u||e[15]!==n||e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==o||e[20]!==s||e[21]!==c?(F=(0,$.jsx)(an,{id:`appearance`,title:`Colors & themes`,variant:`plain`,hideTitle:!0,children:(0,$.jsx)(`div`,{id:P.id,children:(0,$.jsx)(qa,{appearanceMode:t,customThemes:l,initialAppearance:r,refreshTheme:n,isImportOpen:u,setAppearanceMode:i,setTheme:a,setThemeHalf:o,theme:s,themeHalves:c,onImportOpenChange:d})})}),e[12]=t,e[13]=l,e[14]=u,e[15]=n,e[16]=r,e[17]=i,e[18]=a,e[19]=o,e[20]=s,e[21]=c,e[22]=F):F=e[22];let I;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(I=X(`setting-appearance-contrast`),e[23]=I):I=e[23];let L;e[24]!==f.appearanceContrast||e[25]!==p?(L=f.appearanceContrast===T.appearanceContrast?null:(0,$.jsx)(Y,{label:`contrast`,onClick:()=>p({appearanceContrast:T.appearanceContrast})}),e[24]=f.appearanceContrast,e[25]=p,e[26]=L):L=e[26];let R;e[27]===f.appearanceContrast?R=e[28]:(R=(0,$.jsxs)(`output`,{className:`min-w-12 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`appearance-contrast`,children:[f.appearanceContrast,`%`]}),e[27]=f.appearanceContrast,e[28]=R);let z;e[29]===p?z=e[30]:(z=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=50&&t<=200&&p({appearanceContrast:t})},e[29]=p,e[30]=z);let B;e[31]!==D||e[32]!==f.appearanceContrast||e[33]!==z?(B=(0,$.jsx)(`input`,{"aria-label":`Contrast`,className:`settings-slider min-w-0 flex-1`,id:`appearance-contrast`,max:200,min:50,onChange:z,step:5,style:D,type:`range`,value:f.appearanceContrast}),e[31]=D,e[32]=f.appearanceContrast,e[33]=z,e[34]=B):B=e[34];let V;e[35]!==R||e[36]!==B?(V=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3 sm:w-52`,children:[R,B]}),e[35]=R,e[36]=B,e[37]=V):V=e[37];let H;e[38]!==L||e[39]!==V?(H=(0,$.jsx)(J,{...I,description:`Adjust the contrast of colors and borders across the interface.`,resetAction:L,control:V}),e[38]=L,e[39]=V,e[40]=H):H=e[40];let U;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=X(`setting-glass-opacity`),e[41]=U):U=e[41];let W;e[42]!==f.glassOpacity||e[43]!==p?(W=f.glassOpacity===T.glassOpacity?null:(0,$.jsx)(Y,{label:`glass opacity`,onClick:()=>p({glassOpacity:T.glassOpacity})}),e[42]=f.glassOpacity,e[43]=p,e[44]=W):W=e[44];let ee;e[45]===f.glassOpacity?ee=e[46]:(ee=(0,$.jsxs)(`output`,{className:`min-w-12 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`glass-opacity`,children:[f.glassOpacity,`%`]}),e[45]=f.glassOpacity,e[46]=ee);let G;e[47]===p?G=e[48]:(G=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=40&&t<=100&&p({glassOpacity:t})},e[47]=p,e[48]=G);let K;e[49]!==x||e[50]!==f.glassOpacity||e[51]!==G?(K=(0,$.jsx)(`input`,{"aria-label":`Glass opacity`,className:`settings-slider min-w-0 flex-1`,id:`glass-opacity`,max:100,min:40,onChange:G,step:5,style:x,type:`range`,value:f.glassOpacity}),e[49]=x,e[50]=f.glassOpacity,e[51]=G,e[52]=K):K=e[52];let te;e[53]!==ee||e[54]!==K?(te=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3 sm:w-52`,children:[ee,K]}),e[53]=ee,e[54]=K,e[55]=te):te=e[55];let ne;e[56]!==W||e[57]!==te?(ne=(0,$.jsx)(J,{...U,description:`Higher values make menus, dialogs, and the composer more solid.`,resetAction:W,control:te}),e[56]=W,e[57]=te,e[58]=ne):ne=e[58];let re;e[59]!==f.environmentIdentificationMode||e[60]!==g||e[61]!==p?(re=g?(0,$.jsx)(J,{...X(`environment-identification`),description:`Choose how Dev and Nightly environments are identified.`,resetAction:f.environmentIdentificationMode===`artwork`?null:(0,$.jsx)(Y,{label:`environment identification`,onClick:()=>p({environmentIdentificationMode:M})}),control:(0,$.jsxs)(me,{value:f.environmentIdentificationMode,onValueChange:e=>{(e===`artwork`||e===`pill`||e===`none`)&&p({environmentIdentificationMode:e})},children:[(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Environment identification`,children:(0,$.jsx)(ue,{children:ao[f.environmentIdentificationMode]})}),(0,$.jsx)(fe,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(ao).map(ko)})]})}):null,e[59]=f.environmentIdentificationMode,e[60]=g,e[61]=p,e[62]=re):re=e[62];let ie;e[63]===Symbol.for(`react.memo_cache_sentinel`)?(ie=X(`diff-color-scheme`),e[63]=ie):ie=e[63];let ae;e[64]!==f.diffColorScheme||e[65]!==p?(ae=f.diffColorScheme===T.diffColorScheme?null:(0,$.jsx)(Y,{label:`diff colors`,onClick:()=>p({diffColorScheme:T.diffColorScheme})}),e[64]=f.diffColorScheme,e[65]=p,e[66]=ae):ae=e[66];let oe;e[67]===p?oe=e[68]:(oe=e=>{(e===`red-green`||e===`blue-orange`)&&p({diffColorScheme:e})},e[67]=p,e[68]=oe);let se=f.diffColorScheme===`blue-orange`?`flex shrink-0 flex-row-reverse gap-1`:`flex shrink-0 gap-1`,ce,le;e[69]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,$.jsx)(`span`,{className:`size-2 rounded-full bg-diff-deletion`}),le=(0,$.jsx)(`span`,{className:`size-2 rounded-full bg-diff-addition`}),e[69]=ce,e[70]=le):(ce=e[69],le=e[70]);let de;e[71]===se?de=e[72]:(de=(0,$.jsxs)(`span`,{"aria-hidden":`true`,className:se,children:[ce,le]}),e[71]=se,e[72]=de);let he=f.diffColorScheme===`blue-orange`?`Blue & orange`:`Red & green`,ge;e[73]===he?ge=e[74]:(ge=(0,$.jsx)(ue,{children:he}),e[73]=he,e[74]=ge);let _e;e[75]!==de||e[76]!==ge?(_e=(0,$.jsxs)(pe,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Diff colors`,children:[de,ge]}),e[75]=de,e[76]=ge,e[77]=_e):_e=e[77];let ve;e[78]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{value:`red-green`,children:`Red & green (default)`}),(0,$.jsx)(q,{value:`blue-orange`,children:`Blue & orange`})]}),e[78]=ve):ve=e[78];let ye;e[79]!==f.diffColorScheme||e[80]!==oe||e[81]!==_e?(ye=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(me,{value:f.diffColorScheme,onValueChange:oe,children:[_e,ve]})}),e[79]=f.diffColorScheme,e[80]=oe,e[81]=_e,e[82]=ye):ye=e[82];let be;e[83]!==ae||e[84]!==ye?(be=(0,$.jsx)(J,{...ie,description:`Choose colors for additions and deletions, including change counts.`,resetAction:ae,control:ye}),e[83]=ae,e[84]=ye,e[85]=be):be=e[85];let xe;e[86]===Symbol.for(`react.memo_cache_sentinel`)?(xe=X(`composer-context`),e[86]=xe):xe=e[86];let Se;e[87]!==f.persistComposerContextStrip||e[88]!==p?(Se=f.persistComposerContextStrip===T.persistComposerContextStrip?null:(0,$.jsx)(Y,{label:`composer context`,onClick:()=>p({persistComposerContextStrip:T.persistComposerContextStrip})}),e[87]=f.persistComposerContextStrip,e[88]=p,e[89]=Se):Se=e[89];let Ce;e[90]===p?Ce=e[91]:(Ce=e=>p({persistComposerContextStrip:!!e}),e[90]=p,e[91]=Ce);let we;e[92]!==f.persistComposerContextStrip||e[93]!==Ce?(we=(0,$.jsx)(xn,{checked:f.persistComposerContextStrip,onCheckedChange:Ce,"aria-label":`Keep composer context visible in active threads`}),e[92]=f.persistComposerContextStrip,e[93]=Ce,e[94]=we):we=e[94];let Ee;e[95]!==Se||e[96]!==we?(Ee=(0,$.jsx)(J,{...xe,description:`Keep branch and worktree controls below the composer after a thread starts.`,resetAction:Se,control:we}),e[95]=Se,e[96]=we,e[97]=Ee):Ee=e[97];let De;e[98]===Symbol.for(`react.memo_cache_sentinel`)?(De=X(`chat-width`),e[98]=De):De=e[98];let Oe;e[99]!==f.chatWidth||e[100]!==p?(Oe=f.chatWidth===T.chatWidth?null:(0,$.jsx)(Y,{label:`chat width`,onClick:()=>p({chatWidth:T.chatWidth})}),e[99]=f.chatWidth,e[100]=p,e[101]=Oe):Oe=e[101];let ke;e[102]===p?ke=e[103]:(ke=e=>{(e===`comfortable`||e===`wide`||e===`full`)&&p({chatWidth:e})},e[102]=p,e[103]=ke);let Ae=fo[f.chatWidth],je;e[104]===Ae?je=e[105]:(je=(0,$.jsx)(pe,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Chat width`,children:(0,$.jsx)(ue,{children:Ae})}),e[104]=Ae,e[105]=je);let Me;e[106]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{value:`comfortable`,children:`Comfortable (default)`}),(0,$.jsx)(q,{value:`wide`,children:`Wide`}),(0,$.jsx)(q,{value:`full`,children:`Full`})]}),e[106]=Me):Me=e[106];let Ne;e[107]!==f.chatWidth||e[108]!==ke||e[109]!==je?(Ne=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(me,{value:f.chatWidth,onValueChange:ke,children:[je,Me]})}),e[107]=f.chatWidth,e[108]=ke,e[109]=je,e[110]=Ne):Ne=e[110];let Pe;e[111]!==Oe||e[112]!==Ne?(Pe=(0,$.jsx)(J,{...De,description:`Set how wide messages and the composer can grow on large screens.`,resetAction:Oe,control:Ne}),e[111]=Oe,e[112]=Ne,e[113]=Pe):Pe=e[113];let Fe;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=X(`icon-set`),e[114]=Fe):Fe=e[114];let Ie;e[115]!==f.iconSet||e[116]!==p?(Ie=f.iconSet===T.iconSet?null:(0,$.jsx)(Y,{label:`icon set`,onClick:()=>p({iconSet:T.iconSet})}),e[115]=f.iconSet,e[116]=p,e[117]=Ie):Ie=e[117];let Le;e[118]===p?Le=e[119]:(Le=e=>{(e===`p4`||e===`lucide`)&&p({iconSet:e})},e[118]=p,e[119]=Le);let Re=po[f.iconSet],ze;e[120]===Re?ze=e[121]:(ze=(0,$.jsx)(pe,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Icon set`,children:(0,$.jsx)(ue,{children:Re})}),e[120]=Re,e[121]=ze);let Be;e[122]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{value:`p4`,children:`P4 (default)`}),(0,$.jsx)(q,{value:`lucide`,children:`Lucide`})]}),e[122]=Be):Be=e[122];let Ve;e[123]!==f.iconSet||e[124]!==Le||e[125]!==ze?(Ve=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(me,{value:f.iconSet,onValueChange:Le,children:[ze,Be]})}),e[123]=f.iconSet,e[124]=Le,e[125]=ze,e[126]=Ve):Ve=e[126];let He;e[127]!==Ie||e[128]!==Ve?(He=(0,$.jsx)(J,{...Fe,description:`Choose which icon drawings the app uses. An icon missing from one set shows the other set's drawing.`,resetAction:Ie,control:Ve}),e[127]=Ie,e[128]=Ve,e[129]=He):He=e[129];let Ue;e[130]!==H||e[131]!==ne||e[132]!==re||e[133]!==be||e[134]!==Ee||e[135]!==Pe||e[136]!==He?(Ue=(0,$.jsxs)(an,{id:`appearance-interface`,title:`Interface`,children:[H,ne,re,be,Ee,Pe,He]}),e[130]=H,e[131]=ne,e[132]=re,e[133]=be,e[134]=Ee,e[135]=Pe,e[136]=He,e[137]=Ue):Ue=e[137];let We;e[138]===Symbol.for(`react.memo_cache_sentinel`)?(We=X(`panel-animations`),e[138]=We):We=e[138];let Ge;e[139]===f.panelAnimationDurationMs?Ge=e[140]:(Ge=(0,$.jsx)(no,{durationMs:f.panelAnimationDurationMs}),e[139]=f.panelAnimationDurationMs,e[140]=Ge);let Ke;e[141]===f.panelAnimationDurationMs?Ke=e[142]:(Ke=(0,$.jsxs)(`output`,{className:`min-w-16 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`panel-animation-duration`,children:[f.panelAnimationDurationMs,` ms`]}),e[141]=f.panelAnimationDurationMs,e[142]=Ke);let qe;e[143]===p?qe=e[144]:(qe=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=0&&t<=400&&p({panelAnimationDurationMs:t})},e[143]=p,e[144]=qe);let Je;e[145]!==N||e[146]!==f.panelAnimationDurationMs||e[147]!==qe?(Je=(0,$.jsx)(`input`,{"aria-label":`Panel animation duration`,className:`settings-slider min-w-0 flex-1`,id:`panel-animation-duration`,max:400,min:0,onChange:qe,step:25,style:N,type:`range`,value:f.panelAnimationDurationMs}),e[145]=N,e[146]=f.panelAnimationDurationMs,e[147]=qe,e[148]=Je):Je=e[148];let Ye;e[149]!==Ke||e[150]!==Je?(Ye=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3`,children:[Ke,Je]}),e[149]=Ke,e[150]=Je,e[151]=Ye):Ye=e[151];let Xe;e[152]!==Ge||e[153]!==Ye?(Xe=(0,$.jsxs)(`div`,{className:`grid w-full grid-cols-[5rem_minmax(0,1fr)] items-center gap-3 sm:w-auto sm:grid-cols-[7rem_13rem] sm:gap-4`,children:[Ge,Ye]}),e[152]=Ge,e[153]=Ye,e[154]=Xe):Xe=e[154];let Ze;e[155]!==f.panelAnimationDurationMs||e[156]!==p?(Ze=f.panelAnimationDurationMs===T.panelAnimationDurationMs?null:(0,$.jsx)(Y,{label:`panel animations`,onClick:()=>p({panelAnimationDurationMs:T.panelAnimationDurationMs})}),e[155]=f.panelAnimationDurationMs,e[156]=p,e[157]=Ze):Ze=e[157];let Qe;e[158]!==Xe||e[159]!==Ze?(Qe=(0,$.jsx)(an,{id:`motion`,title:`Motion`,children:(0,$.jsx)(J,{...We,description:`Set how fast panels open and close.`,control:Xe,resetAction:Ze})}),e[158]=Xe,e[159]=Ze,e[160]=Qe):Qe=e[160];let $e;e[161]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,$.jsx)(Bo,{}),e[161]=$e):$e=e[161];let et;return e[162]!==F||e[163]!==Ue||e[164]!==Qe?(et=(0,$.jsxs)(nn,{children:[F,Ue,Qe,$e]}),e[162]=F,e[163]=Ue,e[164]=Qe,e[165]=et):et=e[165],et}function ko(e){let[t,n]=e;return(0,$.jsx)(q,{hideIndicator:!0,value:t,children:n},t)}function Ao(){let e=(0,Z.c)(5),t=Qt(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={sans:mn(`-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif`)??`System default`,code:mn(`"SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace`)??`System monospace`},e[0]=n):n=e[0];let r=n,i;e[1]===t.fontFamilySans?i=e[2]:(i=t.fontFamilySans.trim()||r.sans,e[1]=t.fontFamilySans,e[2]=i);let a;return e[3]===i?a=e[4]:(a={sans:r.sans,code:r.code,interfaceFamily:i},e[3]=i,e[4]=a),a}function jo(e){let t=(0,Z.c)(18),{preview:n}=e,r=Qt(),i=Zt(),a=Ao(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=X(`interface-font`),t[0]=o):o=t[0];let s,c;t[1]===i?(s=t[2],c=t[3]):(s=e=>i({fontFamilySans:e}),c=()=>i({fontFamilySans:T.fontFamilySans,fontSizeInterface:T.fontSizeInterface}),t[1]=i,t[2]=s,t[3]=c);let l;t[4]===i?l=t[5]:(l=e=>i({fontSizeInterface:e}),t[4]=i,t[5]=l);let u;t[6]!==r.fontSizeInterface||t[7]!==l?(u={label:`Interface font size`,min:12,max:20,value:r.fontSizeInterface,defaultValue:T.fontSizeInterface,onChange:l},t[6]=r.fontSizeInterface,t[7]=l,t[8]=u):u=t[8];let d;t[9]===n?d=t[10]:(d=n===void 0?{}:{preview:n},t[9]=n,t[10]=d);let f;return t[11]!==a.sans||t[12]!==r.fontFamilySans||t[13]!==s||t[14]!==c||t[15]!==u||t[16]!==d?(f=(0,$.jsx)(Vo,{...o,description:`Everything outside code blocks and the terminal.`,defaultFamily:a.sans,defaultValue:T.fontFamilySans,value:r.fontFamilySans,onValueChange:s,onReset:c,size:u,...d}),t[11]=a.sans,t[12]=r.fontFamilySans,t[13]=s,t[14]=c,t[15]=u,t[16]=d,t[17]=f):f=t[17],f}function Mo(){let e=(0,Z.c)(16),t=Qt(),n=Zt(),r=Ao(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=X(`prompt-font`),e[0]=i):i=e[0];let a,o;e[1]===n?(a=e[2],o=e[3]):(a=e=>n({fontFamilyComposer:e}),o=()=>n({fontFamilyComposer:T.fontFamilyComposer,fontSizePrompt:T.fontSizePrompt}),e[1]=n,e[2]=a,e[3]=o);let s;e[4]===n?s=e[5]:(s=e=>n({fontSizePrompt:e}),e[4]=n,e[5]=s);let c;e[6]!==t.fontSizePrompt||e[7]!==s?(c={label:`Prompt font size`,min:12,max:20,value:t.fontSizePrompt,defaultValue:T.fontSizePrompt,onChange:s},e[6]=t.fontSizePrompt,e[7]=s,e[8]=c):c=e[8];let l;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(Ar,{}),e[9]=l):l=e[9];let u;return e[10]!==r.interfaceFamily||e[11]!==t.fontFamilyComposer||e[12]!==a||e[13]!==o||e[14]!==c?(u=(0,$.jsx)(Vo,{...i,description:`Only the box you write prompts in. Mono works well here.`,defaultFamily:r.interfaceFamily,defaultValue:T.fontFamilyComposer,value:t.fontFamilyComposer,onValueChange:a,onReset:o,size:c,preview:l}),e[10]=r.interfaceFamily,e[11]=t.fontFamilyComposer,e[12]=a,e[13]=o,e[14]=c,e[15]=u):u=e[15],u}function No(e){let t=(0,Z.c)(22),{title:n,description:r,preview:i}=e,a=r===void 0?`Code blocks, diffs, and file previews.`:r,o=Qt(),s=Zt(),c=Ao(),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=X(`code-font`),t[0]=l):l=t[0];let u;t[1]===n?u=t[2]:(u=n===void 0?{}:{title:n},t[1]=n,t[2]=u);let d,f;t[3]===s?(d=t[4],f=t[5]):(d=e=>s({fontFamilyCode:e}),f=()=>s({fontFamilyCode:T.fontFamilyCode,fontSizeCode:T.fontSizeCode}),t[3]=s,t[4]=d,t[5]=f);let p;t[6]===s?p=t[7]:(p=e=>s({fontSizeCode:e}),t[6]=s,t[7]=p);let m;t[8]!==o.fontSizeCode||t[9]!==p?(m={label:`Code font size`,min:10,max:18,value:o.fontSizeCode,defaultValue:T.fontSizeCode,onChange:p},t[8]=o.fontSizeCode,t[9]=p,t[10]=m):m=t[10];let h;t[11]===i?h=t[12]:(h=i??(0,$.jsx)(Ir,{}),t[11]=i,t[12]=h);let g;return t[13]!==c.code||t[14]!==a||t[15]!==o.fontFamilyCode||t[16]!==u||t[17]!==d||t[18]!==f||t[19]!==m||t[20]!==h?(g=(0,$.jsx)(Vo,{...l,...u,description:a,defaultFamily:c.code,defaultValue:T.fontFamilyCode,value:o.fontFamilyCode,onValueChange:d,onReset:f,requireMonospace:!0,size:m,preview:h}),t[13]=c.code,t[14]=a,t[15]=o.fontFamilyCode,t[16]=u,t[17]=d,t[18]=f,t[19]=m,t[20]=h,t[21]=g):g=t[21],g}function Po(){let e=(0,Z.c)(22),t=Qt(),n=Zt(),r=Ao(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=X(`terminal-font`),e[0]=i):i=e[0];let a=r.code,o=t.fontFamilyTerminal,s,c;e[1]===n?(s=e[2],c=e[3]):(s=e=>n({fontFamilyTerminal:e}),c=()=>n({fontFamilyTerminal:T.fontFamilyTerminal,fontSizeTerminal:T.fontSizeTerminal}),e[1]=n,e[2]=s,e[3]=c);let l;e[4]===n?l=e[5]:(l=e=>n({fontSizeTerminal:e}),e[4]=n,e[5]=l);let u;e[6]!==t.fontSizeTerminal||e[7]!==l?(u={label:`Terminal font size`,min:8,max:20,value:t.fontSizeTerminal,defaultValue:T.fontSizeTerminal,onChange:l},e[6]=t.fontSizeTerminal,e[7]=l,e[8]=u):u=e[8];let d;e[9]!==t.fontFamilyCode||e[10]!==t.fontFamilyTerminal?(d=fn({advanced:!0,code:t.fontFamilyCode,terminal:t.fontFamilyTerminal}),e[9]=t.fontFamilyCode,e[10]=t.fontFamilyTerminal,e[11]=d):d=e[11];let f;e[12]!==t.fontSizeTerminal||e[13]!==d?(f=(0,$.jsx)(Vr,{family:d,size:t.fontSizeTerminal}),e[12]=t.fontSizeTerminal,e[13]=d,e[14]=f):f=e[14];let p;return e[15]!==r.code||e[16]!==t.fontFamilyTerminal||e[17]!==s||e[18]!==c||e[19]!==u||e[20]!==f?(p=(0,$.jsx)(Vo,{...i,description:`Terminal output, independent from code blocks and diffs.`,defaultFamily:a,defaultValue:T.fontFamilyTerminal,value:o,onValueChange:s,onReset:c,requireMonospace:!0,size:u,preview:f}),e[15]=r.code,e[16]=t.fontFamilyTerminal,e[17]=s,e[18]=c,e[19]=u,e[20]=f,e[21]=p):p=e[21],p}function Fo(){let e=(0,Z.c)(12),t=Qt(),n=Zt();if(!a(navigator.platform))return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=X(`font-smoothing`),e[0]=r):r=e[0];let i;e[1]!==t.fontSmoothing||e[2]!==n?(i=t.fontSmoothing===T.fontSmoothing?null:(0,$.jsx)(Y,{label:`font smoothing`,onClick:()=>n({fontSmoothing:T.fontSmoothing})}),e[1]=t.fontSmoothing,e[2]=n,e[3]=i):i=e[3];let o;e[4]===n?o=e[5]:(o=e=>n({fontSmoothing:!!e}),e[4]=n,e[5]=o);let s;e[6]!==t.fontSmoothing||e[7]!==o?(s=(0,$.jsx)(xn,{checked:t.fontSmoothing,onCheckedChange:o,"aria-label":`Font smoothing`}),e[6]=t.fontSmoothing,e[7]=o,e[8]=s):s=e[8];let c;return e[9]!==i||e[10]!==s?(c=(0,$.jsx)(J,{...r,description:`Use thinner grayscale text smoothing instead of the macOS default.`,resetAction:i,control:s}),e[9]=i,e[10]=s,e[11]=c):c=e[11],c}function Io(){let e=(0,Z.c)(12),t=Qt(),n=Zt(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=X(`word-wrap`),e[0]=r):r=e[0];let i;e[1]!==t.wordWrap||e[2]!==n?(i=t.wordWrap===T.wordWrap?null:(0,$.jsx)(Y,{label:`word wrapping`,onClick:()=>n({wordWrap:T.wordWrap})}),e[1]=t.wordWrap,e[2]=n,e[3]=i):i=e[3];let a;e[4]===n?a=e[5]:(a=e=>n({wordWrap:!!e}),e[4]=n,e[5]=a);let o;e[6]!==t.wordWrap||e[7]!==a?(o=(0,$.jsx)(xn,{checked:t.wordWrap,onCheckedChange:a,"aria-label":`Wrap code, tables, diffs, and file previews by default`}),e[6]=t.wordWrap,e[7]=a,e[8]=o):o=e[8];let s;return e[9]!==i||e[10]!==o?(s=(0,$.jsx)(J,{...r,description:`Wrap long lines in code blocks, tables, diffs, and file previews by default.`,resetAction:i,control:o}),e[9]=i,e[10]=o,e[11]=s):s=e[11],s}function Lo(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(jo,{}),(0,$.jsx)(Mo,{}),(0,$.jsx)(No,{}),(0,$.jsx)(Po,{}),(0,$.jsx)(Fo,{})]}),e[0]=t):t=e[0],t}function Ro(){let e=(0,Z.c)(11),t=Qt(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(jo,{preview:(0,$.jsx)(Ar,{})}),e[0]=n):n=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(Ir,{}),e[1]=r):r=e[1];let i;e[2]!==t.fontFamilyCode||e[3]!==t.fontFamilyTerminal?(i=fn({advanced:!1,code:t.fontFamilyCode,terminal:t.fontFamilyTerminal}),e[2]=t.fontFamilyCode,e[3]=t.fontFamilyTerminal,e[4]=i):i=e[4];let a;e[5]!==t.fontSizeCode||e[6]!==t.fontSizeTerminal?(a=wn({advanced:!1,code:t.fontSizeCode,terminal:t.fontSizeTerminal}),e[5]=t.fontSizeCode,e[6]=t.fontSizeTerminal,e[7]=a):a=e[7];let o;return e[8]!==i||e[9]!==a?(o=(0,$.jsxs)($.Fragment,{children:[n,(0,$.jsx)(No,{title:`Monospace font`,description:`Code blocks, diffs, file previews, and the terminal.`,preview:(0,$.jsxs)($.Fragment,{children:[r,(0,$.jsx)(Vr,{family:i,size:a})]})})]}),e[8]=i,e[9]=a,e[10]=o):o=e[10],o}var zo=new Set([`prompt-font`,`terminal-font`,...typeof navigator<`u`&&a(navigator.platform)?[`font-smoothing`]:[]]);function Bo(){let e=(0,Z.c)(15),[t,n]=o(Yn,!1,H),r=tn(),i=(0,Q.useRef)(null),a,s;e[0]!==r||e[1]!==n?(a=()=>{r!==null&&zo.has(r)&&i.current!==r&&(i.current=r,n(!0))},s=[r,n],e[0]=r,e[1]=n,e[2]=a,e[3]=s):(a=e[2],s=e[3]),(0,Q.useEffect)(a,s);let c;e[4]===n?c=e[5]:(c=e=>n(!!e),e[4]=n,e[5]=c);let l;e[6]!==t||e[7]!==c?(l=(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 text-xs font-medium text-muted-foreground`,children:[`Advanced`,(0,$.jsx)(xn,{checked:t,onCheckedChange:c,"aria-label":`Show advanced typography settings`})]}),e[6]=t,e[7]=c,e[8]=l):l=e[8];let u;e[9]===t?u=e[10]:(u=t?(0,$.jsx)(Lo,{}):(0,$.jsx)(Ro,{}),e[9]=t,e[10]=u);let d;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(Io,{}),e[11]=d):d=e[11];let f;return e[12]!==l||e[13]!==u?(f=(0,$.jsxs)(an,{id:`typography`,title:`Typography`,headerAction:l,children:[u,d]}),e[12]=l,e[13]=u,e[14]=f):f=e[14],f}function Vo({id:e,title:t,description:n,defaultFamily:r,defaultValue:i,preview:a,value:o,onValueChange:s,onReset:c,requireMonospace:l=!1,size:u}){let d=o.trim(),[f,p]=(0,Q.useState)(o),[m,h]=(0,Q.useState)(!0),g=(0,Q.useRef)(null),_=(0,Q.useRef)(o);_.current!==o&&(_.current=o,g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(o),h(!0)),(0,Q.useEffect)(()=>()=>{g.current!==null&&window.clearTimeout(g.current)},[]);let v=e=>dn(e)&&(!l||Kn(e)),y=e=>{h(!0),(e.trim().length===0||v(e))&&s(e)},b=()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null,y(f))},x=f.trim(),S=m&&x.length>0&&x!==d,C=o!==i||u.value!==u.defaultValue?(0,$.jsx)(Y,{label:t.toLowerCase(),onClick:()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(i),h(!0),c()}}):null,w=ei(),T=(0,Q.useRef)(!1),E=w.status===`granted`?(0,$.jsx)(ti,{ariaLabel:`${t} family`,defaultFamily:r,selectedFamily:d,requireMonospace:l,initialOpen:T.current,onSelect:s}):(0,$.jsx)(Dt,{size:`sm`,"aria-label":`${t} family`,"aria-invalid":S||void 0,autoCapitalize:`off`,autoComplete:`off`,className:`min-w-0 flex-1`,maxLength:200,onFocus:()=>{T.current=!0,Zr()},onBlur:()=>{T.current=!1,b()},onChange:e=>{let t=e.currentTarget.value;p(t),h(!1),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,y(t)},400)},onKeyDown:e=>{e.key===`Enter`&&b(),e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(o),h(!0))},placeholder:r,spellCheck:!1,value:f}),D=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-2 sm:w-auto`,children:[(0,$.jsx)(`div`,{className:`min-w-0 flex-1 sm:w-44 sm:flex-none`,children:E}),(0,$.jsxs)(me,{value:String(u.value),onValueChange:e=>{if(typeof e!=`string`)return;let t=Number(e);Number.isInteger(t)&&t>=u.min&&t<=u.max&&u.onChange(t)},children:[(0,$.jsx)(pe,{size:`sm`,className:`w-22 shrink-0`,"aria-label":u.label,children:(0,$.jsxs)(ue,{children:[u.value,` px`]})}),(0,$.jsx)(fe,{align:`end`,alignItemWithTrigger:!1,children:Array.from({length:u.max-u.min+1},(e,t)=>u.min+t).map(e=>(0,$.jsxs)(q,{hideIndicator:!0,value:String(e),children:[e,` px`]},e))})]})]});return(0,$.jsx)(J,{...e===void 0?{}:{id:e},title:t,description:n,resetAction:C,control:D,children:a})}var Ho=T.sidebarAutoSettleAfterDays??3;function Uo(e){let t=(0,Z.c)(11),{value:n,onCommit:r}=e,[i,a]=(0,Q.useState)(String(n)),o,s;t[0]===n?(o=t[1],s=t[2]):(o=()=>{a(String(n))},s=[n],t[0]=n,t[1]=o,t[2]=s),(0,Q.useEffect)(o,s);let c;t[3]===r?c=t[4]:(c=e=>{a(e.target.value);let t=Number(e.target.value);Number.isInteger(t)&&t>=1&&t<=90&&r(t)},t[3]=r,t[4]=c);let l;t[5]===n?l=t[6]:(l=()=>a(String(n)),t[5]=n,t[6]=l);let u;return t[7]!==i||t[8]!==c||t[9]!==l?(u=(0,$.jsx)(Dt,{size:`sm`,type:`number`,min:1,max:90,className:`w-full sm:w-24`,value:i,onChange:c,onBlur:l,"aria-label":`Days of inactivity before auto-settle`}),t[7]=i,t[8]=c,t[9]=l,t[10]=u):u=t[10],u}var Wo=new Set([`legacy-plan-mode`,`legacy-context-window-indicator`]);function Go(){let e=(0,Z.c)(25),t=Qt(),n=Zt(),[r,i]=(0,Q.useState)(!1),a=tn(),o=en(`legacy-features`),s=(0,Q.useRef)(null),c,l;e[0]===a?(c=e[1],l=e[2]):(c=()=>{if(a===null){s.current=null;return}Wo.has(a)&&s.current!==a&&(s.current=a,i(!0))},l=[a],e[0]=a,e[1]=c,e[2]=l),(0,Q.useEffect)(c,l);let u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsxs)(yn,{className:`group flex min-h-8 w-full items-center gap-2 px-3 sm:px-4`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-normal text-foreground/70 transition-colors group-hover:text-foreground`,children:`Legacy features`}),(0,$.jsx)(B,{className:`size-4 text-muted-foreground transition-transform duration-200 group-data-panel-open:rotate-90`})]}),e[3]=u):u=e[3];let d;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=X(`legacy-plan-mode`),e[4]=d):d=e[4];let f;e[5]===n?f=e[6]:(f=e=>{n({planModeEnabled:!!e})},e[5]=n,e[6]=f);let p;e[7]!==t.planModeEnabled||e[8]!==f?(p=(0,$.jsx)(J,{...d,description:`Restore Build/Plan, /plan, /default, and Shift+Tab. Off uses build mode.`,control:(0,$.jsx)(xn,{checked:t.planModeEnabled,onCheckedChange:f,"aria-label":`Plan mode (legacy)`})}),e[7]=t.planModeEnabled,e[8]=f,e[9]=p):p=e[9];let m;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=X(`legacy-context-window-indicator`),e[10]=m):m=e[10];let h;e[11]===n?h=e[12]:(h=e=>n({contextWindowMeterEnabled:!!e}),e[11]=n,e[12]=h);let g;e[13]!==t.contextWindowMeterEnabled||e[14]!==h?(g=(0,$.jsx)(J,{...m,description:`Shows context window usage as a circular indicator in the composer.`,control:(0,$.jsx)(xn,{checked:t.contextWindowMeterEnabled,onCheckedChange:h,"aria-label":`Context window indicator (legacy)`})}),e[13]=t.contextWindowMeterEnabled,e[14]=h,e[15]=g):g=e[15];let _;e[16]!==p||e[17]!==g?(_=(0,$.jsx)(gn,{children:(0,$.jsxs)($t,{children:[p,g]})}),e[16]=p,e[17]=g,e[18]=_):_=e[18];let v;e[19]!==r||e[20]!==_?(v=(0,$.jsxs)(En,{open:r,onOpenChange:i,children:[u,_]}),e[19]=r,e[20]=_,e[21]=v):v=e[21];let y;return e[22]!==v||e[23]!==o?(y=(0,$.jsx)(`section`,{id:`legacy-features`,ref:o,tabIndex:-1,className:`space-y-2.5`,children:v}),e[22]=v,e[23]=o,e[24]=y):y=e[24],y}function Ko(){let e=(0,Z.c)(463),t=a(navigator.platform)?`⌘`:`Ctrl`,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[{value:`enter`,label:`Enter`},{value:`mod-enter-multiline`,label:`${t} + Enter for multiline prompts`},{value:`mod-enter`,label:`${t} + Enter always`}],e[0]=n):n=e[0];let r=n,i=Qt(),o=Zt(),u=_e(),{scope:f,environment:p,connectedEnvironments:m,target:g}=Jt(),v=p?.environmentId??null,b=f.environmentIds.length===1&&v!==null,S=m.length>0,[C,w]=(0,Q.useState)(!1),O;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(O=[`compressMode`],e[1]=O):O=e[1];let k=Yt(O),j;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(j=[`responseStreamingMode`],e[2]=j):j=e[2];let M=Yt(j),N;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(N=or(),e[3]=N):N=e[3];let P=(0,Q.useRef)(N),F=p?.serverConfig?.providers??Ce,z;e[4]===m?z=e[5]:(z=m.length>0&&m.every(is),e[4]=m,e[5]=z);let B=z,V;e[6]===m?V=e[7]:(V=m.every(rs),e[6]=m,e[7]=V);let H=V,U;e[8]===m?U=e[9]:(U=m.length>0&&m.every(ns),e[8]=m,e[9]=U);let W=U,ee=F.filter(ts),G=s(i,ee),K=G.instanceId,ne=G.model,re=G.options,ie=d(y(c(ee),i,g?.projectId??null)),ae=ie.some(es),oe=ie.find(e=>e.instanceId===K),se=oe?.driverKind??bo,ce=h(i,ee,K,ne),le;e[10]===i.textGenerationModelSelection?le=e[11]:(le=x(i.textGenerationModelSelection??null,T.textGenerationModelSelection??null),e[10]=i.textGenerationModelSelection,e[11]=le);let de=!le,he=er(i,ie),xe=Me(i),we=xe.profile,Te;e[12]===i?Te=e[13]:(Te=fr(i),e[12]=i,e[13]=Te);let Ee=Te,De;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(De=[`backgroundActivity`],e[14]=De):De=e[14];let Oe=Yt(De),ke;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(ke=[`addProjectBaseDirectory`],e[15]=ke):ke=e[15];let Ae=Yt(ke),je;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(je=[`textGenerationModelSelection`],e[16]=je):je=e[16];let Ne=Yt(je),Pe=Ee===`advanced`?`${yo} Shared policy: ${go[we]}.`:vo[xe.profile],Fe;e[17]===i.backgroundActivity?Fe=e[18]:(Fe=x(i.backgroundActivity,T.backgroundActivity),e[17]=i.backgroundActivity,e[18]=Fe);let Ie=!Fe,Le=nn,Re;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,$.jsx)(tr,{category:`general`}),e[19]=Re):Re=e[19];let ze;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(ze=X(`project-grouping`),e[20]=ze):ze=e[20];let Be;e[21]!==i.sidebarProjectGroupingMode||e[22]!==o?(Be=i.sidebarProjectGroupingMode===T.sidebarProjectGroupingMode?null:(0,$.jsx)(Y,{label:`project grouping`,onClick:()=>o({sidebarProjectGroupingMode:T.sidebarProjectGroupingMode})}),e[21]=i.sidebarProjectGroupingMode,e[22]=o,e[23]=Be):Be=e[23];let Ve;e[24]===i.sidebarProjectGroupingMode?Ve=e[25]:(Ve=ar(i.sidebarProjectGroupingMode),e[24]=i.sidebarProjectGroupingMode,e[25]=Ve);let He;e[26]!==i.sidebarProjectGroupingMode||e[27]!==o?(He=e=>{!e&&i.sidebarProjectGroupingMode!==`separate`&&(P.current=i.sidebarProjectGroupingMode,sr(i.sidebarProjectGroupingMode)),o({sidebarProjectGroupingMode:hr(e,P.current)})},e[26]=i.sidebarProjectGroupingMode,e[27]=o,e[28]=He):He=e[28];let Ue;e[29]!==Ve||e[30]!==He?(Ue=(0,$.jsx)(xn,{checked:Ve,onCheckedChange:He,"aria-label":`Project grouping`}),e[29]=Ve,e[30]=He,e[31]=Ue):Ue=e[31];let We;e[32]!==Be||e[33]!==Ue?(We=(0,$.jsx)(J,{...ze,description:`Combine matching repositories across environments.`,resetAction:Be,control:Ue}),e[32]=Be,e[33]=Ue,e[34]=We):We=e[34];let Ge;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=X(`project-order`),e[35]=Ge):Ge=e[35];let Ke;e[36]!==i.sidebarProjectSortOrder||e[37]!==o?(Ke=i.sidebarProjectSortOrder===T.sidebarProjectSortOrder?null:(0,$.jsx)(Y,{label:`project order`,onClick:()=>o({sidebarProjectSortOrder:T.sidebarProjectSortOrder})}),e[36]=i.sidebarProjectSortOrder,e[37]=o,e[38]=Ke):Ke=e[38];let qe;e[39]===o?qe=e[40]:(qe=e=>{lo(e)&&o({sidebarProjectSortOrder:e})},e[39]=o,e[40]=qe);let Je=co[i.sidebarProjectSortOrder],Ye;e[41]===Je?Ye=e[42]:(Ye=(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-44`,"aria-label":`Project order`,children:(0,$.jsx)(ue,{children:Je})}),e[41]=Je,e[42]=Ye);let Xe;e[43]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,$.jsx)(fe,{align:`end`,alignItemWithTrigger:!1,children:E.literals.map($o)}),e[43]=Xe):Xe=e[43];let Ze;e[44]!==i.sidebarProjectSortOrder||e[45]!==qe||e[46]!==Ye?(Ze=(0,$.jsxs)(me,{value:i.sidebarProjectSortOrder,onValueChange:qe,children:[Ye,Xe]}),e[44]=i.sidebarProjectSortOrder,e[45]=qe,e[46]=Ye,e[47]=Ze):Ze=e[47];let Qe;e[48]!==Ke||e[49]!==Ze?(Qe=(0,$.jsx)(J,{...Ge,description:`Order of projects in the sidebar project picker and command palette.`,resetAction:Ke,control:Ze}),e[48]=Ke,e[49]=Ze,e[50]=Qe):Qe=e[50];let $e;e[51]===Symbol.for(`react.memo_cache_sentinel`)?($e=X(`auto-resume-limited-threads`),e[51]=$e):$e=e[51];let et;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(et=[`autoResumeLimitedThreads`],e[52]=et):et=e[52];let tt;e[53]===Symbol.for(`react.memo_cache_sentinel`)?(tt=[`autoResumeLimitedThreads`],e[53]=tt):tt=e[53];let nt;e[54]===o?nt=e[55]:(nt=e=>o({autoResumeLimitedThreads:!!e}),e[54]=o,e[55]=nt);let rt;e[56]!==i.autoResumeLimitedThreads||e[57]!==nt?(rt=(0,$.jsx)(J,{serverScoped:!0,...$e,description:`Resume usage-limit stops at the reported reset time. Each thread can cancel its scheduled continuation.`,settingKeys:et,control:(0,$.jsx)(rr,{settingKeys:tt,checked:i.autoResumeLimitedThreads,onCheckedChange:nt,"aria-label":`Auto-resume limited threads`})}),e[56]=i.autoResumeLimitedThreads,e[57]=nt,e[58]=rt):rt=e[58];let it;e[59]===Symbol.for(`react.memo_cache_sentinel`)?(it=X(`snooze-limited-threads`),e[59]=it):it=e[59];let at;e[60]===Symbol.for(`react.memo_cache_sentinel`)?(at=[`snoozeLimitedThreads`],e[60]=at):at=e[60];let ot;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(ot=[`snoozeLimitedThreads`],e[61]=ot):ot=e[61];let st;e[62]===o?st=e[63]:(st=e=>o({snoozeLimitedThreads:!!e}),e[62]=o,e[63]=st);let ct;e[64]!==i.snoozeLimitedThreads||e[65]!==st?(ct=(0,$.jsx)(J,{serverScoped:!0,...it,description:`Snooze usage-limit stops until the reported reset time. Combine with auto-resume to continue when they wake.`,settingKeys:at,control:(0,$.jsx)(rr,{settingKeys:ot,checked:i.snoozeLimitedThreads,onCheckedChange:st,"aria-label":`Snooze limited threads`})}),e[64]=i.snoozeLimitedThreads,e[65]=st,e[66]=ct):ct=e[66];let lt;e[67]===Symbol.for(`react.memo_cache_sentinel`)?(lt=X(`working-shelf`),e[67]=lt):lt=e[67];let ut;e[68]!==i.sidebarWorkingShelfEnabled||e[69]!==o?(ut=i.sidebarWorkingShelfEnabled===T.sidebarWorkingShelfEnabled?null:(0,$.jsx)(Y,{label:`working section`,onClick:()=>o({sidebarWorkingShelfEnabled:T.sidebarWorkingShelfEnabled})}),e[68]=i.sidebarWorkingShelfEnabled,e[69]=o,e[70]=ut):ut=e[70];let dt;e[71]===o?dt=e[72]:(dt=e=>o({sidebarWorkingShelfEnabled:!!e}),e[71]=o,e[72]=dt);let ft;e[73]!==i.sidebarWorkingShelfEnabled||e[74]!==dt?(ft=(0,$.jsx)(xn,{checked:i.sidebarWorkingShelfEnabled,onCheckedChange:dt,"aria-label":`Working section (beta)`}),e[73]=i.sidebarWorkingShelfEnabled,e[74]=dt,e[75]=ft):ft=e[75];let pt;e[76]!==ut||e[77]!==ft?(pt=(0,$.jsx)(J,{...lt,description:`Fold working and monitoring threads into a Working section. They return to the top of the inbox when they need you.`,resetAction:ut,control:ft}),e[76]=ut,e[77]=ft,e[78]=pt):pt=e[78];let mt;e[79]!==i.sidebarAutoSettleAfterDays||e[80]!==i.sidebarAutoSettleKeepPullRequests||e[81]!==i.sidebarAutoSettleOnMerge||e[82]!==B||e[83]!==H||e[84]!==o?(mt=B?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleOnMerge`],...X(`auto-settle-merged-threads`),description:`Settle a thread when its pull request merges. Closed pull requests still settle automatically.`,resetAction:i.sidebarAutoSettleOnMerge===T.sidebarAutoSettleOnMerge?null:(0,$.jsx)(Y,{label:`auto-settle on merge`,onClick:()=>o({sidebarAutoSettleOnMerge:T.sidebarAutoSettleOnMerge})}),control:(0,$.jsx)(rr,{settingKeys:[`sidebarAutoSettleOnMerge`],checked:i.sidebarAutoSettleOnMerge,onCheckedChange:e=>o({sidebarAutoSettleOnMerge:!!e}),"aria-label":`Auto-settle merged threads`})}),(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleAfterDays`],...X(`auto-settle-inactive-threads`),description:`Sidebar threads with no activity for this long settle automatically.`,resetAction:i.sidebarAutoSettleAfterDays===T.sidebarAutoSettleAfterDays?null:(0,$.jsx)(Y,{label:`auto-settle`,onClick:()=>o({sidebarAutoSettleAfterDays:T.sidebarAutoSettleAfterDays})}),control:(0,$.jsx)(rr,{settingKeys:[`sidebarAutoSettleAfterDays`],checked:i.sidebarAutoSettleAfterDays!==null,onCheckedChange:e=>o({sidebarAutoSettleAfterDays:e?Ho:null}),"aria-label":`Auto-settle inactive threads`})}),i.sidebarAutoSettleAfterDays===null?null:(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleAfterDays`],title:X(`days-before-auto-settle`).title,description:`Any new activity un-settles a thread automatically.`,control:(0,$.jsx)(Uo,{value:i.sidebarAutoSettleAfterDays,onCommit:e=>o({sidebarAutoSettleAfterDays:e})})}),i.sidebarAutoSettleAfterDays!==null&&H?(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleKeepPullRequests`],title:`Keep threads with a PR`,description:`Inactivity does not settle threads with a pull request. Merge and close still do.`,control:(0,$.jsx)(rr,{settingKeys:[`sidebarAutoSettleKeepPullRequests`],checked:i.sidebarAutoSettleKeepPullRequests,onCheckedChange:e=>o({sidebarAutoSettleKeepPullRequests:e}),"aria-label":`Keep threads with a PR`})}):null]}):null,e[79]=i.sidebarAutoSettleAfterDays,e[80]=i.sidebarAutoSettleKeepPullRequests,e[81]=i.sidebarAutoSettleOnMerge,e[82]=B,e[83]=H,e[84]=o,e[85]=mt):mt=e[85];let ht;e[86]!==We||e[87]!==Qe||e[88]!==rt||e[89]!==ct||e[90]!==pt||e[91]!==mt?(ht=(0,$.jsxs)(an,{id:`organization`,title:`Organization`,children:[We,Qe,rt,ct,pt,mt]}),e[86]=We,e[87]=Qe,e[88]=rt,e[89]=ct,e[90]=pt,e[91]=mt,e[92]=ht):ht=e[92];let gt;e[93]===Symbol.for(`react.memo_cache_sentinel`)?(gt=(0,$.jsx)(vr,{}),e[93]=gt):gt=e[93];let _t;e[94]===Symbol.for(`react.memo_cache_sentinel`)?(_t=X(`in-app-notifications`),e[94]=_t):_t=e[94];let vt;e[95]===o?vt=e[96]:(vt=e=>o({inAppNotificationsEnabled:e}),e[95]=o,e[96]=vt);let bt;e[97]!==i.inAppNotificationsEnabled||e[98]!==vt?(bt=(0,$.jsx)(J,{..._t,description:`Show a toast when another thread finishes, fails, or needs input or approval while this app has focus.`,control:(0,$.jsx)(xn,{checked:i.inAppNotificationsEnabled,onCheckedChange:vt,"aria-label":`In-app notifications`})}),e[97]=i.inAppNotificationsEnabled,e[98]=vt,e[99]=bt):bt=e[99];let xt;e[100]===Symbol.for(`react.memo_cache_sentinel`)?(xt=X(`time-format`),e[100]=xt):xt=e[100];let St;e[101]!==i.timestampFormat||e[102]!==o?(St=i.timestampFormat===T.timestampFormat?null:(0,$.jsx)(Y,{label:`time format`,onClick:()=>o({timestampFormat:T.timestampFormat})}),e[101]=i.timestampFormat,e[102]=o,e[103]=St):St=e[103];let Ct;e[104]===o?Ct=e[105]:(Ct=e=>{(e===`locale`||e===`12-hour`||e===`24-hour`)&&o({timestampFormat:e})},e[104]=o,e[105]=Ct);let wt=uo[i.timestampFormat],Tt;e[106]===wt?Tt=e[107]:(Tt=(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Timestamp format`,children:(0,$.jsx)(ue,{children:wt})}),e[106]=wt,e[107]=Tt);let Et;e[108]===Symbol.for(`react.memo_cache_sentinel`)?(Et=(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`locale`,children:uo.locale}),(0,$.jsx)(q,{hideIndicator:!0,value:`12-hour`,children:uo[`12-hour`]}),(0,$.jsx)(q,{hideIndicator:!0,value:`24-hour`,children:uo[`24-hour`]})]}),e[108]=Et):Et=e[108];let Dt;e[109]!==i.timestampFormat||e[110]!==Ct||e[111]!==Tt?(Dt=(0,$.jsxs)(me,{value:i.timestampFormat,onValueChange:Ct,children:[Tt,Et]}),e[109]=i.timestampFormat,e[110]=Ct,e[111]=Tt,e[112]=Dt):Dt=e[112];let Ot;e[113]!==St||e[114]!==Dt?(Ot=(0,$.jsx)(J,{...xt,description:`System default follows your browser or OS clock preference.`,resetAction:St,control:Dt}),e[113]=St,e[114]=Dt,e[115]=Ot):Ot=e[115];let kt,At;e[116]===Symbol.for(`react.memo_cache_sentinel`)?(kt=[`compressMode`],At=X(`response-compression`),e[116]=kt,e[117]=At):(kt=e[116],At=e[117]);let jt=k?null:i.compressMode,Mt;e[118]===o?Mt=e[119]:(Mt=e=>{L.literals.some(t=>t===e)&&o({compressMode:e})},e[118]=o,e[119]=Mt);let Nt;e[120]===Symbol.for(`react.memo_cache_sentinel`)?(Nt=(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Response compression`,children:(0,$.jsx)(ue,{children:Qo})}),e[120]=Nt):Nt=e[120];let Pt;e[121]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,$.jsx)(fe,{align:`end`,alignItemWithTrigger:!1,children:L.literals.map(Zo)}),e[121]=Pt):Pt=e[121];let Ft;e[122]!==jt||e[123]!==Mt?(Ft=(0,$.jsx)(J,{serverScoped:!0,settingKeys:kt,...At,description:`Response style for all threads on this server, starting next turn. Code and saved documents retain normal prose.`,control:(0,$.jsxs)(me,{value:jt,onValueChange:Mt,children:[Nt,Pt]})}),e[122]=jt,e[123]=Mt,e[124]=Ft):Ft=e[124];let It,Lt;e[125]===Symbol.for(`react.memo_cache_sentinel`)?(It=[`responseStreamingMode`],Lt=X(`response-streaming`),e[125]=It,e[126]=Lt):(It=e[125],Lt=e[126]);let Rt=M?`The selected targets use different streaming modes.`:so[i.responseStreamingMode],zt;e[127]!==i.responseStreamingMode||e[128]!==o?(zt=i.responseStreamingMode===T.responseStreamingMode?null:(0,$.jsx)(Y,{label:`response streaming`,onClick:()=>o({responseStreamingMode:T.responseStreamingMode})}),e[127]=i.responseStreamingMode,e[128]=o,e[129]=zt):zt=e[129];let Bt=M?null:i.responseStreamingMode,Vt;e[130]===o?Vt=e[131]:(Vt=e=>{(e===`turn`||e===`paragraph`)&&o({responseStreamingMode:e})},e[130]=o,e[131]=Vt);let Ht;e[132]===Symbol.for(`react.memo_cache_sentinel`)?(Ht=(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Response streaming`,children:(0,$.jsx)(ue,{children:Xo})}),e[132]=Ht):Ht=e[132];let Ut;e[133]===Symbol.for(`react.memo_cache_sentinel`)?(Ut=(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`turn`,children:oo.turn}),(0,$.jsx)(q,{hideIndicator:!0,value:`paragraph`,children:oo.paragraph})]}),e[133]=Ut):Ut=e[133];let Wt;e[134]!==Bt||e[135]!==Vt?(Wt=(0,$.jsxs)(me,{value:Bt,onValueChange:Vt,children:[Ht,Ut]}),e[134]=Bt,e[135]=Vt,e[136]=Wt):Wt=e[136];let Gt;e[137]!==Rt||e[138]!==zt||e[139]!==Wt?(Gt=(0,$.jsx)(J,{serverScoped:!0,settingKeys:It,...Lt,description:Rt,resetAction:zt,control:Wt}),e[137]=Rt,e[138]=zt,e[139]=Wt,e[140]=Gt):Gt=e[140];let Kt;e[141]===Symbol.for(`react.memo_cache_sentinel`)?(Kt=X(`hide-whitespace-changes`),e[141]=Kt):Kt=e[141];let qt;e[142]!==i.diffIgnoreWhitespace||e[143]!==o?(qt=i.diffIgnoreWhitespace===T.diffIgnoreWhitespace?null:(0,$.jsx)(Y,{label:`diff whitespace changes`,onClick:()=>o({diffIgnoreWhitespace:T.diffIgnoreWhitespace})}),e[142]=i.diffIgnoreWhitespace,e[143]=o,e[144]=qt):qt=e[144];let Xt;e[145]===o?Xt=e[146]:(Xt=e=>o({diffIgnoreWhitespace:!!e}),e[145]=o,e[146]=Xt);let $t;e[147]!==i.diffIgnoreWhitespace||e[148]!==Xt?($t=(0,$.jsx)(xn,{checked:i.diffIgnoreWhitespace,onCheckedChange:Xt,"aria-label":`Hide whitespace changes by default`}),e[147]=i.diffIgnoreWhitespace,e[148]=Xt,e[149]=$t):$t=e[149];let en;e[150]!==qt||e[151]!==$t?(en=(0,$.jsx)(J,{...Kt,description:`Set whether the diff panel ignores whitespace-only edits by default.`,resetAction:qt,control:$t}),e[150]=qt,e[151]=$t,e[152]=en):en=e[152];let tn;e[153]===Symbol.for(`react.memo_cache_sentinel`)?(tn=X(`default-diff-file-state`),e[153]=tn):tn=e[153];let sn;e[154]!==i.diffFilesCollapsed||e[155]!==o?(sn=i.diffFilesCollapsed===T.diffFilesCollapsed?null:(0,$.jsx)(Y,{label:`default diff file state`,onClick:()=>o({diffFilesCollapsed:T.diffFilesCollapsed})}),e[154]=i.diffFilesCollapsed,e[155]=o,e[156]=sn):sn=e[156];let cn=i.diffFilesCollapsed?`collapsed`:`expanded`,ln;e[157]===o?ln=e[158]:(ln=e=>{(e===`expanded`||e===`collapsed`)&&o({diffFilesCollapsed:e===`collapsed`})},e[157]=o,e[158]=ln);let dn=i.diffFilesCollapsed?`Collapsed`:`Expanded`,fn;e[159]===dn?fn=e[160]:(fn=(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Default diff file state`,children:(0,$.jsx)(ue,{children:dn})}),e[159]=dn,e[160]=fn);let pn;e[161]===Symbol.for(`react.memo_cache_sentinel`)?(pn=(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`expanded`,children:`Expanded`}),(0,$.jsx)(q,{hideIndicator:!0,value:`collapsed`,children:`Collapsed`})]}),e[161]=pn):pn=e[161];let mn;e[162]!==cn||e[163]!==ln||e[164]!==fn?(mn=(0,$.jsxs)(me,{value:cn,onValueChange:ln,children:[fn,pn]}),e[162]=cn,e[163]=ln,e[164]=fn,e[165]=mn):mn=e[165];let hn;e[166]!==sn||e[167]!==mn?(hn=(0,$.jsx)(J,{...tn,description:`Start with files expanded or collapsed when opening diffs or a pull request's Code tab.`,resetAction:sn,control:mn}),e[166]=sn,e[167]=mn,e[168]=hn):hn=e[168];let gn;e[169]===Symbol.for(`react.memo_cache_sentinel`)?(gn=X(`diff-layout`),e[169]=gn):gn=e[169];let _n;e[170]!==i.diffLayout||e[171]!==o?(_n=i.diffLayout===T.diffLayout?null:(0,$.jsx)(Y,{label:`diff layout`,onClick:()=>o({diffLayout:T.diffLayout})}),e[170]=i.diffLayout,e[171]=o,e[172]=_n):_n=e[172];let vn;e[173]===o?vn=e[174]:(vn=e=>{(e===`stacked`||e===`split`)&&o({diffLayout:e})},e[173]=o,e[174]=vn);let yn=mo[i.diffLayout],bn;e[175]===yn?bn=e[176]:(bn=(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Diff layout`,children:(0,$.jsx)(ue,{children:yn})}),e[175]=yn,e[176]=bn);let Sn;e[177]===Symbol.for(`react.memo_cache_sentinel`)?(Sn=(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`stacked`,children:mo.stacked}),(0,$.jsx)(q,{hideIndicator:!0,value:`split`,children:mo.split})]}),e[177]=Sn):Sn=e[177];let Cn;e[178]!==i.diffLayout||e[179]!==vn||e[180]!==bn?(Cn=(0,$.jsxs)(me,{value:i.diffLayout,onValueChange:vn,children:[bn,Sn]}),e[178]=i.diffLayout,e[179]=vn,e[180]=bn,e[181]=Cn):Cn=e[181];let wn;e[182]!==_n||e[183]!==Cn?(wn=(0,$.jsx)(J,{...gn,description:`Show diffs stacked or side by side. The toggle in the diff toolbar changes this too.`,resetAction:_n,control:Cn}),e[182]=_n,e[183]=Cn,e[184]=wn):wn=e[184];let Tn;e[185]===Symbol.for(`react.memo_cache_sentinel`)?(Tn=X(`proactive-panels`),e[185]=Tn):Tn=e[185];let En;e[186]!==i.proactivePanelsEnabled||e[187]!==o?(En=i.proactivePanelsEnabled===T.proactivePanelsEnabled?null:(0,$.jsx)(Y,{label:`proactive panels`,onClick:()=>o({proactivePanelsEnabled:T.proactivePanelsEnabled})}),e[186]=i.proactivePanelsEnabled,e[187]=o,e[188]=En):En=e[188];let Dn;e[189]===o?Dn=e[190]:(Dn=e=>o({proactivePanelsEnabled:!!e}),e[189]=o,e[190]=Dn);let On;e[191]!==i.proactivePanelsEnabled||e[192]!==Dn?(On=(0,$.jsx)(xn,{checked:i.proactivePanelsEnabled,onCheckedChange:Dn,"aria-label":`Proactive panels`}),e[191]=i.proactivePanelsEnabled,e[192]=Dn,e[193]=On):On=e[193];let kn;e[194]!==En||e[195]!==On?(kn=(0,$.jsx)(J,{...Tn,description:`Open linked pull requests first. Otherwise, open Changes for edits to at least 3 files or 50 lines.`,resetAction:En,control:On}),e[194]=En,e[195]=On,e[196]=kn):kn=e[196];let An;e[197]===Symbol.for(`react.memo_cache_sentinel`)?(An=X(`skills-in-slash-menu`),e[197]=An):An=e[197];let jn;e[198]!==i.showSkillsInSlashMenu||e[199]!==o?(jn=i.showSkillsInSlashMenu===T.showSkillsInSlashMenu?null:(0,$.jsx)(Y,{label:`skills in slash menu`,onClick:()=>o({showSkillsInSlashMenu:T.showSkillsInSlashMenu})}),e[198]=i.showSkillsInSlashMenu,e[199]=o,e[200]=jn):jn=e[200];let Mn;e[201]===o?Mn=e[202]:(Mn=e=>o({showSkillsInSlashMenu:!!e}),e[201]=o,e[202]=Mn);let Nn;e[203]!==i.showSkillsInSlashMenu||e[204]!==Mn?(Nn=(0,$.jsx)(xn,{checked:i.showSkillsInSlashMenu,onCheckedChange:Mn,"aria-label":`Show skills in slash menu`}),e[203]=i.showSkillsInSlashMenu,e[204]=Mn,e[205]=Nn):Nn=e[205];let Pn;e[206]!==jn||e[207]!==Nn?(Pn=(0,$.jsx)(J,{...An,description:`Also include skills in the / command menu. Skills always appear when you type $.`,resetAction:jn,control:Nn}),e[206]=jn,e[207]=Nn,e[208]=Pn):Pn=e[208];let Fn;e[209]===Symbol.for(`react.memo_cache_sentinel`)?(Fn=X(`composer-rich-text`),e[209]=Fn):Fn=e[209];let In;e[210]!==i.composerRichTextEnabled||e[211]!==o?(In=i.composerRichTextEnabled===T.composerRichTextEnabled?null:(0,$.jsx)(Y,{label:`rich text composer`,onClick:()=>o({composerRichTextEnabled:T.composerRichTextEnabled})}),e[210]=i.composerRichTextEnabled,e[211]=o,e[212]=In):In=e[212];let Ln;e[213]===o?Ln=e[214]:(Ln=e=>o({composerRichTextEnabled:!!e}),e[213]=o,e[214]=Ln);let Rn;e[215]!==i.composerRichTextEnabled||e[216]!==Ln?(Rn=(0,$.jsx)(xn,{checked:i.composerRichTextEnabled,onCheckedChange:Ln,"aria-label":`Rich text composer`}),e[215]=i.composerRichTextEnabled,e[216]=Ln,e[217]=Rn):Rn=e[217];let zn;e[218]!==In||e[219]!==Rn?(zn=(0,$.jsx)(J,{...Fn,description:`Show formatted Markdown as you type.`,resetAction:In,control:Rn}),e[218]=In,e[219]=Rn,e[220]=zn):zn=e[220];let Bn;e[221]===Symbol.for(`react.memo_cache_sentinel`)?(Bn=X(`composer-collapse`),e[221]=Bn):Bn=e[221];let Vn;e[222]!==i.composerCollapseOnScroll||e[223]!==o?(Vn=i.composerCollapseOnScroll===T.composerCollapseOnScroll?null:(0,$.jsx)(Y,{label:`collapse composer on scroll`,onClick:()=>o({composerCollapseOnScroll:T.composerCollapseOnScroll})}),e[222]=i.composerCollapseOnScroll,e[223]=o,e[224]=Vn):Vn=e[224];let Hn;e[225]===o?Hn=e[226]:(Hn=e=>o({composerCollapseOnScroll:!!e}),e[225]=o,e[226]=Hn);let Un;e[227]!==i.composerCollapseOnScroll||e[228]!==Hn?(Un=(0,$.jsx)(xn,{checked:i.composerCollapseOnScroll,onCheckedChange:Hn,"aria-label":`Collapse composer on scroll`}),e[227]=i.composerCollapseOnScroll,e[228]=Hn,e[229]=Un):Un=e[229];let Wn;e[230]!==Vn||e[231]!==Un?(Wn=(0,$.jsx)(J,{...Bn,description:`Rest the composer of an existing thread into a single line when you scroll the conversation. Focus the composer or start typing to expand it again.`,resetAction:Vn,control:Un}),e[230]=Vn,e[231]=Un,e[232]=Wn):Wn=e[232];let Kn;e[233]===Symbol.for(`react.memo_cache_sentinel`)?(Kn=X(`send-shortcut`),e[233]=Kn):Kn=e[233];let qn;e[234]!==i.sendShortcut||e[235]!==o?(qn=i.sendShortcut===T.sendShortcut?null:(0,$.jsx)(Y,{label:`send shortcut`,onClick:()=>o({sendShortcut:T.sendShortcut})}),e[234]=i.sendShortcut,e[235]=o,e[236]=qn):qn=e[236];let Jn;e[237]===o?Jn=e[238]:(Jn=e=>{let t=r.find(t=>t.value===e);t&&o({sendShortcut:t.value})},e[237]=o,e[238]=Jn);let Yn=r.find(e=>e.value===i.sendShortcut)?.label,Xn;e[239]===Yn?Xn=e[240]:(Xn=(0,$.jsx)(pe,{size:`sm`,className:`w-auto min-w-0 max-w-full`,"aria-label":`Send shortcut`,children:(0,$.jsx)(ue,{children:Yn})}),e[239]=Yn,e[240]=Xn);let Zn;e[241]===i.sendShortcut?Zn=e[242]:(Zn=(0,$.jsx)(fe,{align:`end`,alignItemWithTrigger:!1,children:r.map(e=>(0,$.jsx)(q,{value:e.value,children:(0,$.jsxs)(`span`,{className:`flex items-center justify-between gap-4`,children:[e.label,i.sendShortcut===e.value&&(0,$.jsx)(D,{"aria-hidden":`true`})]})},e.value))}),e[241]=i.sendShortcut,e[242]=Zn);let ir;e[243]!==i.sendShortcut||e[244]!==Jn||e[245]!==Xn||e[246]!==Zn?(ir=(0,$.jsxs)(me,{value:i.sendShortcut,onValueChange:Jn,children:[Xn,Zn]}),e[243]=i.sendShortcut,e[244]=Jn,e[245]=Xn,e[246]=Zn,e[247]=ir):ir=e[247];let cr;e[248]!==qn||e[249]!==ir?(cr=(0,$.jsx)(J,{...Kn,description:`Choose when Enter sends a prompt or inserts a new line`,resetAction:qn,control:ir}),e[248]=qn,e[249]=ir,e[250]=cr):cr=e[250];let lr;e[251]===Symbol.for(`react.memo_cache_sentinel`)?(lr=X(`follow-up-behavior`),e[251]=lr):lr=e[251];let ur=`Queue follow-ups while the agent runs or steer the current run. `+(i.sendShortcut===`mod-enter-multiline`?`Press ${t} + Enter for single-line prompts or ${t} + Shift + Enter for multiline prompts to do the opposite for one message.`:`Press ${t}${i.sendShortcut===`mod-enter`?` + Shift`:``} + Enter to do the opposite for one message.`),dr;e[252]!==i.followUpBehavior||e[253]!==o?(dr=i.followUpBehavior===T.followUpBehavior?null:(0,$.jsx)(Y,{label:`follow-up behavior`,onClick:()=>o({followUpBehavior:T.followUpBehavior})}),e[252]=i.followUpBehavior,e[253]=o,e[254]=dr):dr=e[254];let pr;e[255]===o?pr=e[256]:(pr=e=>{(e===`queue`||e===`steer`)&&o({followUpBehavior:e})},e[255]=o,e[256]=pr);let mr=i.followUpBehavior===`queue`?`Queue`:`Steer`,gr;e[257]===mr?gr=e[258]:(gr=(0,$.jsx)(pe,{size:`sm`,className:`w-auto min-w-0`,"aria-label":`Follow-up behavior`,children:(0,$.jsx)(ue,{children:mr})}),e[257]=mr,e[258]=gr);let _r;e[259]===Symbol.for(`react.memo_cache_sentinel`)?(_r=(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{value:`queue`,children:`Queue`}),(0,$.jsx)(q,{value:`steer`,children:`Steer`})]}),e[259]=_r):_r=e[259];let yr;e[260]!==i.followUpBehavior||e[261]!==pr||e[262]!==gr?(yr=(0,$.jsxs)(me,{value:i.followUpBehavior,onValueChange:pr,children:[gr,_r]}),e[260]=i.followUpBehavior,e[261]=pr,e[262]=gr,e[263]=yr):yr=e[263];let br;e[264]!==ur||e[265]!==dr||e[266]!==yr?(br=(0,$.jsx)(J,{...lr,description:ur,resetAction:dr,control:yr}),e[264]=ur,e[265]=dr,e[266]=yr,e[267]=br):br=e[267];let xr,Sr;e[268]===Symbol.for(`react.memo_cache_sentinel`)?(xr=[`enableProviderUpdateChecks`],Sr=X(`provider-update-checks`),e[268]=xr,e[269]=Sr):(xr=e[268],Sr=e[269]);let Cr;e[270]!==i.enableProviderUpdateChecks||e[271]!==o?(Cr=i.enableProviderUpdateChecks===T.enableProviderUpdateChecks?null:(0,$.jsx)(Y,{label:`provider update checks`,onClick:()=>o({enableProviderUpdateChecks:T.enableProviderUpdateChecks})}),e[270]=i.enableProviderUpdateChecks,e[271]=o,e[272]=Cr):Cr=e[272];let wr;e[273]===Symbol.for(`react.memo_cache_sentinel`)?(wr=[`enableProviderUpdateChecks`],e[273]=wr):wr=e[273];let Tr;e[274]===o?Tr=e[275]:(Tr=e=>o({enableProviderUpdateChecks:!!e}),e[274]=o,e[275]=Tr);let Er;e[276]!==i.enableProviderUpdateChecks||e[277]!==Tr?(Er=(0,$.jsx)(rr,{settingKeys:wr,checked:i.enableProviderUpdateChecks,onCheckedChange:Tr,"aria-label":`Check provider versions`}),e[276]=i.enableProviderUpdateChecks,e[277]=Tr,e[278]=Er):Er=e[278];let Dr;e[279]!==Cr||e[280]!==Er?(Dr=(0,$.jsx)(J,{serverScoped:!0,settingKeys:xr,...Sr,description:`Check installed provider CLIs for newer available versions and fetch model catalog updates. When off, new models may not appear.`,resetAction:Cr,control:Er}),e[279]=Cr,e[280]=Er,e[281]=Dr):Dr=e[281];let Or;e[282]===Symbol.for(`react.memo_cache_sentinel`)?(Or=X(`continue-threads-after-server-update`),e[282]=Or):Or=e[282];let kr;e[283]===Symbol.for(`react.memo_cache_sentinel`)?(kr=[`continueThreadsAfterServerUpdate`],e[283]=kr):kr=e[283];let Ar=W?void 0:`All selected connected environments must support restart continuation.`,jr;e[284]!==i.continueThreadsAfterServerUpdate||e[285]!==W||e[286]!==o?(jr=W&&i.continueThreadsAfterServerUpdate!==T.continueThreadsAfterServerUpdate?(0,$.jsx)(Y,{label:`continue threads after restarts`,onClick:()=>o({continueThreadsAfterServerUpdate:T.continueThreadsAfterServerUpdate})}):null,e[284]=i.continueThreadsAfterServerUpdate,e[285]=W,e[286]=o,e[287]=jr):jr=e[287];let Mr;e[288]===Symbol.for(`react.memo_cache_sentinel`)?(Mr=[`continueThreadsAfterServerUpdate`],e[288]=Mr):Mr=e[288];let Nr=!W,Pr;e[289]===o?Pr=e[290]:(Pr=e=>o({continueThreadsAfterServerUpdate:!!e}),e[289]=o,e[290]=Pr);let Fr;e[291]!==i.continueThreadsAfterServerUpdate||e[292]!==Nr||e[293]!==Pr?(Fr=(0,$.jsx)(rr,{settingKeys:Mr,checked:i.continueThreadsAfterServerUpdate,disabled:Nr,onCheckedChange:Pr,"aria-label":`Continue threads after restarts`}),e[291]=i.continueThreadsAfterServerUpdate,e[292]=Nr,e[293]=Pr,e[294]=Fr):Fr=e[294];let Ir;e[295]!==Ar||e[296]!==jr||e[297]!==Fr?(Ir=(0,$.jsx)(J,{...Or,serverScoped:!0,settingKeys:kr,description:`Automatically resume interrupted threads after an update, crash, or machine restart on the selected environments.`,status:Ar,resetAction:jr,control:Fr}),e[295]=Ar,e[296]=jr,e[297]=Fr,e[298]=Ir):Ir=e[298];let Lr,Rr;e[299]===Symbol.for(`react.memo_cache_sentinel`)?(Lr=[`backgroundActivity`],Rr=X(`background-activity`),e[299]=Lr,e[300]=Rr):(Lr=e[299],Rr=e[300]);let zr=Rr.id,Br;e[301]===Symbol.for(`react.memo_cache_sentinel`)?(Br=X(`background-activity`),e[301]=Br):Br=e[301];let Vr;e[302]===Symbol.for(`react.memo_cache_sentinel`)?(Vr=(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[Br.title,(0,$.jsx)(on,{children:`This shared policy gates background work such as Git refreshes and provider health probes after their individual intervals elapse.`})]}),e[302]=Vr):Vr=e[302];let Hr;e[303]!==Ie||e[304]!==o?(Hr=Ie?(0,$.jsx)(Y,{label:`background activity`,onClick:()=>o(So())}):null,e[303]=Ie,e[304]=o,e[305]=Hr):Hr=e[305];let Ur=Oe?null:Ee,Wr;e[306]!==b||e[307]!==o?(Wr=e=>{if(e===`advanced`){b&&w(!0);return}(e===`balanced`||e===`performance`||e===`battery-saver`)&&o(Co(e))},e[306]=b,e[307]=o,e[308]=Wr):Wr=e[308];let Gr;e[309]===Symbol.for(`react.memo_cache_sentinel`)?(Gr=(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Background activity profile`,children:(0,$.jsx)(ue,{children:Yo})}),e[309]=Gr):Gr=e[309];let Kr,qr,Jr;e[310]===Symbol.for(`react.memo_cache_sentinel`)?(Kr=(0,$.jsx)(q,{hideIndicator:!0,value:`balanced`,children:go.balanced}),qr=(0,$.jsx)(q,{hideIndicator:!0,value:`performance`,children:go.performance}),Jr=(0,$.jsx)(q,{hideIndicator:!0,value:`battery-saver`,children:go[`battery-saver`]}),e[310]=Kr,e[311]=qr,e[312]=Jr):(Kr=e[310],qr=e[311],Jr=e[312]);let Yr=!b,Xr=b?_o.advanced:`${_o.advanced} (one environment)`,Zr;e[313]!==Yr||e[314]!==Xr?(Zr=(0,$.jsxs)(fe,{align:`end`,alignItemWithTrigger:!1,children:[Kr,qr,Jr,(0,$.jsx)(q,{hideIndicator:!0,value:`advanced`,disabled:Yr,children:Xr})]}),e[313]=Yr,e[314]=Xr,e[315]=Zr):Zr=e[315];let Qr;e[316]!==Ur||e[317]!==Wr||e[318]!==Zr?(Qr=(0,$.jsxs)(me,{value:Ur,onValueChange:Wr,children:[Gr,Zr]}),e[316]=Ur,e[317]=Wr,e[318]=Zr,e[319]=Qr):Qr=e[319];let $r;e[320]!==Ee||e[321]!==b?($r=Ee===`advanced`&&b?(0,$.jsxs)(Se,{children:[(0,$.jsx)(ye,{render:(0,$.jsx)(R,{size:`icon-sm`,variant:`outline`,"aria-label":`Configure advanced background activity`,onClick:()=>w(!0),children:(0,$.jsx)(_,{className:`size-4`})})}),(0,$.jsx)(be,{side:`top`,children:`Configure background activity`})]}):null,e[320]=Ee,e[321]=b,e[322]=$r):$r=e[322];let ei=C&&b,ti;e[323]===ei?ti=e[324]:(ti=(0,$.jsx)(Do,{open:ei,onOpenChange:w}),e[323]=ei,e[324]=ti);let ni;e[325]!==Qr||e[326]!==$r||e[327]!==ti?(ni=(0,$.jsxs)($.Fragment,{children:[Qr,$r,ti]}),e[325]=Qr,e[326]=$r,e[327]=ti,e[328]=ni):ni=e[328];let ri;e[329]!==Pe||e[330]!==Hr||e[331]!==ni?(ri=(0,$.jsx)(J,{serverScoped:!0,settingKeys:Lr,id:zr,title:Vr,description:Pe,resetAction:Hr,control:ni}),e[329]=Pe,e[330]=Hr,e[331]=ni,e[332]=ri):ri=e[332];let ii;e[333]!==kn||e[334]!==Pn||e[335]!==zn||e[336]!==Wn||e[337]!==cr||e[338]!==br||e[339]!==Dr||e[340]!==Ir||e[341]!==ri||e[342]!==bt||e[343]!==Ot||e[344]!==Ft||e[345]!==Gt||e[346]!==en||e[347]!==hn||e[348]!==wn?(ii=(0,$.jsxs)(an,{id:`behavior`,title:`Behavior`,children:[gt,bt,Ot,Ft,Gt,en,hn,wn,kn,Pn,zn,Wn,cr,br,Dr,Ir,ri]}),e[333]=kn,e[334]=Pn,e[335]=zn,e[336]=Wn,e[337]=cr,e[338]=br,e[339]=Dr,e[340]=Ir,e[341]=ri,e[342]=bt,e[343]=Ot,e[344]=Ft,e[345]=Gt,e[346]=en,e[347]=hn,e[348]=wn,e[349]=ii):ii=e[349];let ai,oi;e[350]===Symbol.for(`react.memo_cache_sentinel`)?(ai=[`newWorktreesStartFromOrigin`],oi=X(`start-from-origin`),e[350]=ai,e[351]=oi):(ai=e[350],oi=e[351]);let si;e[352]!==i.newWorktreesStartFromOrigin||e[353]!==o?(si=i.newWorktreesStartFromOrigin===T.newWorktreesStartFromOrigin?null:(0,$.jsx)(Y,{label:`new worktrees start from origin`,onClick:()=>o({newWorktreesStartFromOrigin:T.newWorktreesStartFromOrigin})}),e[352]=i.newWorktreesStartFromOrigin,e[353]=o,e[354]=si):si=e[354];let ci;e[355]===Symbol.for(`react.memo_cache_sentinel`)?(ci=[`newWorktreesStartFromOrigin`],e[355]=ci):ci=e[355];let li;e[356]===o?li=e[357]:(li=e=>o({newWorktreesStartFromOrigin:!!e}),e[356]=o,e[357]=li);let ui;e[358]!==i.newWorktreesStartFromOrigin||e[359]!==li?(ui=(0,$.jsx)(rr,{settingKeys:ci,checked:i.newWorktreesStartFromOrigin,onCheckedChange:li,"aria-label":`Start new worktrees from origin by default`}),e[358]=i.newWorktreesStartFromOrigin,e[359]=li,e[360]=ui):ui=e[360];let di;e[361]!==si||e[362]!==ui?(di=(0,$.jsx)(J,{serverScoped:!0,settingKeys:ai,...oi,description:`Creates the worktree from the latest matching branch on origin instead of your local branch.`,resetAction:si,control:ui}),e[361]=si,e[362]=ui,e[363]=di):di=e[363];let fi,pi;e[364]===Symbol.for(`react.memo_cache_sentinel`)?(fi=[`addProjectBaseDirectory`],pi=X(`add-project-starts-in`),e[364]=fi,e[365]=pi):(fi=e[364],pi=e[365]);let mi;e[366]!==i.addProjectBaseDirectory||e[367]!==o?(mi=i.addProjectBaseDirectory===T.addProjectBaseDirectory?null:(0,$.jsx)(Y,{label:`add project base directory`,onClick:()=>o({addProjectBaseDirectory:T.addProjectBaseDirectory})}),e[366]=i.addProjectBaseDirectory,e[367]=o,e[368]=mi):mi=e[368];let hi=Ae?``:i.addProjectBaseDirectory,gi;e[369]===o?gi=e[370]:(gi=e=>o({addProjectBaseDirectory:e}),e[369]=o,e[370]=gi);let _i=Ae?`Mixed`:`~/`,vi;e[371]!==hi||e[372]!==gi||e[373]!==_i?(vi=(0,$.jsx)(nr,{size:`sm`,className:`w-full sm:w-72`,value:hi,onCommit:gi,placeholder:_i,spellCheck:!1,"aria-label":`Add project base directory`}),e[371]=hi,e[372]=gi,e[373]=_i,e[374]=vi):vi=e[374];let yi;e[375]!==mi||e[376]!==vi?(yi=(0,$.jsx)(J,{serverScoped:!0,settingKeys:fi,...pi,description:`Leave empty to use "~/" when the Add Project browser opens.`,resetAction:mi,control:vi}),e[375]=mi,e[376]=vi,e[377]=yi):yi=e[377];let bi;e[378]!==di||e[379]!==yi?(bi=(0,$.jsxs)(an,{id:`projects-and-threads`,title:`Projects & threads`,children:[di,yi]}),e[378]=di,e[379]=yi,e[380]=bi):bi=e[380];let xi;e[381]===Symbol.for(`react.memo_cache_sentinel`)?(xi=X(`unpin-confirmation`),e[381]=xi):xi=e[381];let Si;e[382]!==i.confirmThreadUnpin||e[383]!==o?(Si=i.confirmThreadUnpin===T.confirmThreadUnpin?null:(0,$.jsx)(Y,{label:`unpin confirmation`,onClick:()=>o({confirmThreadUnpin:T.confirmThreadUnpin})}),e[382]=i.confirmThreadUnpin,e[383]=o,e[384]=Si):Si=e[384];let Ci;e[385]===o?Ci=e[386]:(Ci=e=>o({confirmThreadUnpin:!!e}),e[385]=o,e[386]=Ci);let wi;e[387]!==i.confirmThreadUnpin||e[388]!==Ci?(wi=(0,$.jsx)(xn,{checked:i.confirmThreadUnpin,onCheckedChange:Ci,"aria-label":`Confirm thread unpinning`}),e[387]=i.confirmThreadUnpin,e[388]=Ci,e[389]=wi):wi=e[389];let Ti;e[390]!==Si||e[391]!==wi?(Ti=(0,$.jsx)(J,{...xi,description:`Ask before unpinning a thread from the pinned section.`,resetAction:Si,control:wi}),e[390]=Si,e[391]=wi,e[392]=Ti):Ti=e[392];let Ei;e[393]===Symbol.for(`react.memo_cache_sentinel`)?(Ei=X(`archive-confirmation`),e[393]=Ei):Ei=e[393];let Di;e[394]!==i.confirmThreadArchive||e[395]!==o?(Di=i.confirmThreadArchive===T.confirmThreadArchive?null:(0,$.jsx)(Y,{label:`archive confirmation`,onClick:()=>o({confirmThreadArchive:T.confirmThreadArchive})}),e[394]=i.confirmThreadArchive,e[395]=o,e[396]=Di):Di=e[396];let Oi;e[397]===o?Oi=e[398]:(Oi=e=>o({confirmThreadArchive:!!e}),e[397]=o,e[398]=Oi);let ki;e[399]!==i.confirmThreadArchive||e[400]!==Oi?(ki=(0,$.jsx)(xn,{checked:i.confirmThreadArchive,onCheckedChange:Oi,"aria-label":`Confirm thread archiving`}),e[399]=i.confirmThreadArchive,e[400]=Oi,e[401]=ki):ki=e[401];let Ai;e[402]!==Di||e[403]!==ki?(Ai=(0,$.jsx)(J,{...Ei,description:`Require a second click on the inline archive action before a thread is archived.`,resetAction:Di,control:ki}),e[402]=Di,e[403]=ki,e[404]=Ai):Ai=e[404];let ji;e[405]===Symbol.for(`react.memo_cache_sentinel`)?(ji=X(`delete-confirmation`),e[405]=ji):ji=e[405];let Mi;e[406]!==i.confirmThreadDelete||e[407]!==o?(Mi=i.confirmThreadDelete===T.confirmThreadDelete?null:(0,$.jsx)(Y,{label:`delete confirmation`,onClick:()=>o({confirmThreadDelete:T.confirmThreadDelete})}),e[406]=i.confirmThreadDelete,e[407]=o,e[408]=Mi):Mi=e[408];let Ni;e[409]===o?Ni=e[410]:(Ni=e=>o({confirmThreadDelete:!!e}),e[409]=o,e[410]=Ni);let Pi;e[411]!==i.confirmThreadDelete||e[412]!==Ni?(Pi=(0,$.jsx)(xn,{checked:i.confirmThreadDelete,onCheckedChange:Ni,"aria-label":`Confirm thread deletion`}),e[411]=i.confirmThreadDelete,e[412]=Ni,e[413]=Pi):Pi=e[413];let Fi;e[414]!==Mi||e[415]!==Pi?(Fi=(0,$.jsx)(J,{...ji,description:`Ask before deleting a thread and its chat history.`,resetAction:Mi,control:Pi}),e[414]=Mi,e[415]=Pi,e[416]=Fi):Fi=e[416];let Ii;e[417]!==i.confirmQuit||e[418]!==o?(Ii=yt?(0,$.jsx)(J,{...X(`quit-confirmation`),description:`Hold mode also quits on two quick presses.`,resetAction:i.confirmQuit===T.confirmQuit?null:(0,$.jsx)(Y,{label:`quit shortcut behavior`,onClick:()=>o({confirmQuit:T.confirmQuit})}),control:(0,$.jsxs)(me,{value:i.confirmQuit,onValueChange:e=>{(e===`direct`||e===`hold`||e===`double-click`)&&o({confirmQuit:e})},children:[(0,$.jsx)(pe,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Quit shortcut behavior`,children:(0,$.jsx)(ue,{children:ho[i.confirmQuit]})}),(0,$.jsx)(fe,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(ho).map(Jo)})]})}):null,e[417]=i.confirmQuit,e[418]=o,e[419]=Ii):Ii=e[419];let Li;e[420]!==Ti||e[421]!==Ai||e[422]!==Fi||e[423]!==Ii?(Li=(0,$.jsxs)(an,{id:`confirmations`,title:`Confirmations`,children:[Ti,Ai,Fi,Ii]}),e[420]=Ti,e[421]=Ai,e[422]=Fi,e[423]=Ii,e[424]=Li):Li=e[424];let Ri=an,zi=J,Bi,Vi;e[425]===Symbol.for(`react.memo_cache_sentinel`)?(Bi=[`textGenerationModelSelection`],Vi=X(`text-generation-model`),e[425]=Bi,e[426]=Vi):(Bi=e[425],Vi=e[426]);let Hi;e[427]!==S||e[428]!==de||e[429]!==o?(Hi=S&&de?(0,$.jsx)(Y,{label:`text generation model`,onClick:()=>o({textGenerationModelSelection:T.textGenerationModelSelection})}):null,e[427]=S,e[428]=de,e[429]=o,e[430]=Hi):Hi=e[430];let Ui=S?ae?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1.5`,children:[(0,$.jsx)(Qn,{environmentId:v,activeInstanceId:K,model:ne,lockedProvider:null,instanceEntries:ie,modelOptionsByInstance:ce,triggerClassName:rn,...Ne?{triggerLabel:`Mixed`}:{},getModelDisabledReason:he,...v?{onOpenProviderSetup:e=>{u({to:`/settings/providers`,search:{environmentId:v,instanceId:e}})}}:{},onInstanceModelChange:(e,t)=>{let n=he(e,t);if(n){ve.add({type:`error`,title:`Text generation model not saved`,description:n});return}o({textGenerationModelSelection:s({...i,textGenerationModelSelection:A(e,t)},ee)})}}),oe?(0,$.jsx)(I,{provider:se,models:oe?.models??[],model:ne,prompt:``,onPromptChange:qo,modelOptions:re,allowPromptInjectedEffort:!1,planModeEnabled:i.planModeEnabled||l(re),triggerClassName:rn,onModelOptionsChange:e=>{o({textGenerationModelSelection:s({...i,textGenerationModelSelection:A(K,ne,e)},ee)})}}):null]}):(0,$.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No text generation providers available.`}):(0,$.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Connect an environment to choose its text generation model.`}),Wi;e[431]!==zi||e[432]!==Bi||e[433]!==Vi||e[434]!==Hi||e[435]!==Ui?(Wi=(0,$.jsx)(zi,{serverScoped:!0,settingKeys:Bi,...Vi,description:`Used for thread titles and other generated text on connected devices with this provider. Source control can override it.`,resetAction:Hi,control:Ui}),e[431]=zi,e[432]=Bi,e[433]=Vi,e[434]=Hi,e[435]=Ui,e[436]=Wi):Wi=e[436];let Gi;e[437]!==Ri||e[438]!==Wi?(Gi=(0,$.jsx)(Ri,{id:`text-generation`,title:`Text generation`,children:Wi}),e[437]=Ri,e[438]=Wi,e[439]=Gi):Gi=e[439];let Ki;e[440]===Symbol.for(`react.memo_cache_sentinel`)?(Ki=yt||te?(0,$.jsx)(To,{}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{id:X(`app-version`).id,title:(0,$.jsx)(wo,{}),description:`Current version of the application.`}),un?(0,$.jsx)(Gn,{}):null]}),e[440]=Ki):Ki=e[440];let qi;e[441]===Symbol.for(`react.memo_cache_sentinel`)?(qi=X(`privacy-policy`),e[441]=qi):qi=e[441];let Ji;e[442]===Symbol.for(`react.memo_cache_sentinel`)?(Ji=(0,$.jsxs)(an,{id:`about`,title:`About`,children:[Ki,(0,$.jsx)(J,{...qi,description:`How we handle your data, including the anonymous usage data P4 Code collects.`,control:(0,$.jsx)(R,{render:(0,$.jsx)(`a`,{href:$n,target:`_blank`,rel:`noreferrer noopener`}),size:`sm`,variant:`outline`,children:`View policy`})})]}),e[442]=Ji):Ji=e[442];let Yi;e[443]===Symbol.for(`react.memo_cache_sentinel`)?(Yi=X(`diagnostics`),e[443]=Yi):Yi=e[443];let Xi=b?`Inspect processes, resource use, and logs on this environment.`:`Inspect processes, resource use, and logs on one environment at a time.`,Zi=v??void 0,Qi;e[444]===Zi?Qi=e[445]:(Qi=(0,$.jsx)(R,{render:(0,$.jsx)(ge,{to:`/settings/diagnostics`,search:{machine:Zi}}),size:`sm`,variant:`outline`,children:`View diagnostics`}),e[444]=Zi,e[445]=Qi);let $i;e[446]!==Xi||e[447]!==Qi?($i=(0,$.jsx)(J,{...Yi,description:Xi,control:Qi}),e[446]=Xi,e[447]=Qi,e[448]=$i):$i=e[448];let ea;e[449]===Symbol.for(`react.memo_cache_sentinel`)?(ea=X(`open-source-licenses`),e[449]=ea):ea=e[449];let ta;e[450]===Symbol.for(`react.memo_cache_sentinel`)?(ta=(0,$.jsx)(J,{...ea,description:`Notices for dependencies, assets, and optional tools used by P4 Code.`,control:(0,$.jsx)(R,{render:(0,$.jsx)(ge,{to:`/settings/open-source-licenses`}),size:`sm`,variant:`outline`,children:`View licenses`})}),e[450]=ta):ta=e[450];let na;e[451]===$i?na=e[452]:(na=(0,$.jsxs)(an,{title:`Diagnostics`,children:[$i,ta]}),e[451]=$i,e[452]=na);let ra;e[453]===Symbol.for(`react.memo_cache_sentinel`)?(ra=(0,$.jsx)(Go,{}),e[453]=ra):ra=e[453];let ia;return e[454]!==Le||e[455]!==Re||e[456]!==ii||e[457]!==bi||e[458]!==Li||e[459]!==Gi||e[460]!==na||e[461]!==ht?(ia=(0,$.jsxs)(Le,{children:[Re,ht,ii,bi,Li,Gi,Ji,na,ra]}),e[454]=Le,e[455]=Re,e[456]=ii,e[457]=bi,e[458]=Li,e[459]=Gi,e[460]=na,e[461]=ht,e[462]=ia):ia=e[462],ia}function qo(){}function Jo(e){let[t,n]=e;return(0,$.jsx)(q,{hideIndicator:!0,value:t,children:n},t)}function Yo(e){return e===null?`Mixed`:_o[e]}function Xo(e){return e===null?`Mixed`:oo[e]}function Zo(e){return(0,$.jsx)(q,{value:e,children:e===`off`?`Off`:e.charAt(0).toUpperCase()+e.slice(1)},e)}function Qo(e){return e===null?`Mixed`:e===`off`?`Off`:e.charAt(0).toUpperCase()+e.slice(1)}function $o(e){return(0,$.jsx)(q,{hideIndicator:!0,value:e,children:co[e]},e)}function es(e){return e.enabled&&e.isAvailable}function ts(e){return e.supportsTextGeneration!==!1}function ns(e){return e.serverConfig?.environment.capabilities.threadRestartContinuation===!0}function rs(e){return e.serverConfig?.environment.capabilities.threadAutoSettlementScope===!0}function is(e){return e.serverConfig?.environment.capabilities.threadAutoSettlement===!0}export{io as i,Ko as n,Eo as r,Oo as t};
39
- //# sourceMappingURL=SettingsPanels-BHhMJaVc.js.map
39
+ //# sourceMappingURL=SettingsPanels-B3TcgEEZ.js.map
@@ -1,2 +1,2 @@
1
- import{$w as e,XT as t,fh as n}from"./utils-BEVyjoxo.js";import{D as r,O as i,T as a,k as o}from"./useSettings-Dx076NWT.js";function s(e){return e!==`separate`}function c(e,t=`repository`){return e?t===`repository_path`?`repository_path`:`repository`:`separate`}var l=`t3code:last-enabled-project-grouping-mode`;function u(){try{return localStorage.getItem(l)===`repository_path`?`repository_path`:`repository`}catch{return`repository`}}function d(e){if(e!==`separate`)try{localStorage.setItem(l,e)}catch{}}function f(e){return!t(e.backgroundActivity,n.backgroundActivity)||e.backgroundActivityProfile!==n.backgroundActivityProfile||!t(e.automaticGitFetchInterval,n.automaticGitFetchInterval)||!t(e.providerHealthRefreshInterval,n.providerHealthRefreshInterval)}function p(e){return[...e.fontFamilySans!==n.fontFamilySans||e.fontSizeInterface!==n.fontSizeInterface?[`Interface font`]:[],...e.fontFamilyComposer!==n.fontFamilyComposer||e.fontSizePrompt!==n.fontSizePrompt?[`Prompt font`]:[],...e.fontFamilyCode!==n.fontFamilyCode||e.fontSizeCode!==n.fontSizeCode?[`Code font`]:[],...e.fontFamilyTerminal!==n.fontFamilyTerminal||e.fontSizeTerminal!==n.fontSizeTerminal?[`Terminal font`]:[]]}function m(e,t){return e._tag===t._tag?e._tag===`fill`||t._tag===`fill`?!0:e.width!==t.width||e.height!==t.height?!1:e._tag===`preset`&&t._tag===`preset`?e.presetId===t.presetId:!0:!1}function h(e){return[...m(e.browserDefaultViewport,n.browserDefaultViewport)?[]:[`Browser viewport`],...e.browserDefaultZoomFactor===n.browserDefaultZoomFactor?[]:[`Browser zoom`],...e.browserDefaultAppearance===n.browserDefaultAppearance?[]:[`Browser appearance`],...e.browserRecordingFrameRate===n.browserRecordingFrameRate?[]:[`Recording frame rate`],...e.browserRecordingShowKeyPresses?[`Recording key presses`]:[],...e.browserRecordingShowMousePresses?[`Recording mouse presses`]:[],...e.browserLinkTarget===n.browserLinkTarget?[]:[`Open links in`],...e.browserAutoShowFloatingPreview===n.browserAutoShowFloatingPreview?[]:[`Floating preview`]]}function g(e){let t=o(e),n=r({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}});return n.profile===`custom`?`advanced`:n.profile}function _(e,t){let n=i(e);return{schemaVersion:1,profile:`custom`,baseProfile:t,overrides:n.profile===`custom`?n.overrides:{}}}function v(e){return{providerInstances:{...e.settings.providerInstances,[e.instanceId]:e.instance},...e.textGenerationModelSelection===void 0?{}:{textGenerationModelSelection:e.textGenerationModelSelection}}}function y(t){return Math.round(e(t)/1e3)}function b(e,t=0){return e===null||!Number.isFinite(e)?t:Math.max(t,Math.round(e))}function x(e,t,n){let r={automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery,...n};for(let[e,t]of Object.entries(r))t===void 0&&delete r[e];return{backgroundActivity:{schemaVersion:1,profile:`custom`,baseProfile:a(e),overrides:r}}}export{h as a,s as c,u as d,d as f,y as i,b as l,_ as n,p as o,g as p,v as r,f as s,x as t,c as u};
2
- //# sourceMappingURL=SettingsPanels.logic-BwmY39Sq.js.map
1
+ import{$w as e,XT as t,fh as n}from"./utils-Dx_TSvdC.js";import{D as r,O as i,T as a,k as o}from"./useSettings-DUgjfqYw.js";function s(e){return e!==`separate`}function c(e,t=`repository`){return e?t===`repository_path`?`repository_path`:`repository`:`separate`}var l=`t3code:last-enabled-project-grouping-mode`;function u(){try{return localStorage.getItem(l)===`repository_path`?`repository_path`:`repository`}catch{return`repository`}}function d(e){if(e!==`separate`)try{localStorage.setItem(l,e)}catch{}}function f(e){return!t(e.backgroundActivity,n.backgroundActivity)||e.backgroundActivityProfile!==n.backgroundActivityProfile||!t(e.automaticGitFetchInterval,n.automaticGitFetchInterval)||!t(e.providerHealthRefreshInterval,n.providerHealthRefreshInterval)}function p(e){return[...e.fontFamilySans!==n.fontFamilySans||e.fontSizeInterface!==n.fontSizeInterface?[`Interface font`]:[],...e.fontFamilyComposer!==n.fontFamilyComposer||e.fontSizePrompt!==n.fontSizePrompt?[`Prompt font`]:[],...e.fontFamilyCode!==n.fontFamilyCode||e.fontSizeCode!==n.fontSizeCode?[`Code font`]:[],...e.fontFamilyTerminal!==n.fontFamilyTerminal||e.fontSizeTerminal!==n.fontSizeTerminal?[`Terminal font`]:[]]}function m(e,t){return e._tag===t._tag?e._tag===`fill`||t._tag===`fill`?!0:e.width!==t.width||e.height!==t.height?!1:e._tag===`preset`&&t._tag===`preset`?e.presetId===t.presetId:!0:!1}function h(e){return[...m(e.browserDefaultViewport,n.browserDefaultViewport)?[]:[`Browser viewport`],...e.browserDefaultZoomFactor===n.browserDefaultZoomFactor?[]:[`Browser zoom`],...e.browserDefaultAppearance===n.browserDefaultAppearance?[]:[`Browser appearance`],...e.browserRecordingFrameRate===n.browserRecordingFrameRate?[]:[`Recording frame rate`],...e.browserRecordingShowKeyPresses?[`Recording key presses`]:[],...e.browserRecordingShowMousePresses?[`Recording mouse presses`]:[],...e.browserLinkTarget===n.browserLinkTarget?[]:[`Open links in`],...e.browserAutoShowFloatingPreview===n.browserAutoShowFloatingPreview?[]:[`Floating preview`]]}function g(e){let t=o(e),n=r({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}});return n.profile===`custom`?`advanced`:n.profile}function _(e,t){let n=i(e);return{schemaVersion:1,profile:`custom`,baseProfile:t,overrides:n.profile===`custom`?n.overrides:{}}}function v(e){return{providerInstances:{...e.settings.providerInstances,[e.instanceId]:e.instance},...e.textGenerationModelSelection===void 0?{}:{textGenerationModelSelection:e.textGenerationModelSelection}}}function y(t){return Math.round(e(t)/1e3)}function b(e,t=0){return e===null||!Number.isFinite(e)?t:Math.max(t,Math.round(e))}function x(e,t,n){let r={automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery,...n};for(let[e,t]of Object.entries(r))t===void 0&&delete r[e];return{backgroundActivity:{schemaVersion:1,profile:`custom`,baseProfile:a(e),overrides:r}}}export{h as a,s as c,u as d,d as f,y as i,b as l,_ as n,p as o,g as p,v as r,f as s,x as t,c as u};
2
+ //# sourceMappingURL=SettingsPanels.logic-DpJJdWIn.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{NE as t,lE as n,sr as r}from"./utils-BEVyjoxo.js";import{t as i}from"./useNavigate-DRqH9NhA.js";import{t as a}from"./useLocation-B3ir4ben.js";import{a as o}from"./environments-DYIXXf7q.js";import{n as s,r as c,t as l}from"./alert-5swcxUBm.js";import{B as u,H as d,i as f}from"./settingsLayout-DHc6oKfL.js";var p=t(),m=e(n(),1);function h(e){let t=(0,p.c)(42),{children:n,target:h,targetId:y,eligibleEnvironmentIds:b}=e,{selectScope:x,search:S}=u(),C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(C={from:`/settings`},t[0]=C):C=t[0];let w=i(C),T;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(T={select:v},t[1]=T):T=t[1];let E=a(T),{environments:D}=o(),O=d(),k,A,j,M,N,P,F,I;if(t[2]!==n||t[3]!==b||t[4]!==D||t[5]!==O||t[6]!==w||t[7]!==E||t[8]!==S||t[9]!==x||t[10]!==h||t[11]!==y){let e=h===`checkout`?O.filter(e=>!S.project||e.projectKey===S.project).flatMap(_):h===`project`?O.map(g):h===`environment`?D.filter(e=>b===void 0||b.includes(e.environmentId)).map(e=>({label:D.some(t=>t.environmentId!==e.environmentId&&t.label===e.label)?`${e.label} · ${e.displayUrl||e.environmentId}`:e.label,search:{machine:e.environmentId}})):[{label:`Open all environments`,search:{}}];M=f,j=l,I=`status`,A=c,t[20]===n?F=t[21]:(F=(0,m.jsx)(`p`,{children:n}),t[20]=n,t[21]=F),k=s,N=`flex-wrap`;let i;t[22]!==w||t[23]!==E||t[24]!==x||t[25]!==y?(i=e=>(0,m.jsx)(r,{size:`sm-multiline`,variant:`outline`,className:`max-w-full break-all text-left`,onClick:()=>{y?w({to:E,search:()=>e.search,hash:y}):x(e.search)},children:e.label},JSON.stringify(e.search)),t[22]=w,t[23]=E,t[24]=x,t[25]=y,t[26]=i):i=t[26],P=e.map(i),t[2]=n,t[3]=b,t[4]=D,t[5]=O,t[6]=w,t[7]=E,t[8]=S,t[9]=x,t[10]=h,t[11]=y,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N,t[17]=P,t[18]=F,t[19]=I}else k=t[12],A=t[13],j=t[14],M=t[15],N=t[16],P=t[17],F=t[18],I=t[19];let L;t[27]!==k||t[28]!==N||t[29]!==P?(L=(0,m.jsx)(k,{className:N,children:P}),t[27]=k,t[28]=N,t[29]=P,t[30]=L):L=t[30];let R;t[31]!==A||t[32]!==F||t[33]!==L?(R=(0,m.jsxs)(A,{children:[F,L]}),t[31]=A,t[32]=F,t[33]=L,t[34]=R):R=t[34];let z;t[35]!==j||t[36]!==I||t[37]!==R?(z=(0,m.jsx)(j,{role:I,children:R}),t[35]=j,t[36]=I,t[37]=R,t[38]=z):z=t[38];let B;return t[39]!==M||t[40]!==z?(B=(0,m.jsx)(M,{children:z}),t[39]=M,t[40]=z,t[41]=B):B=t[41],B}function g(e){return{label:e.displayName,search:{project:e.projectKey}}}function _(e){return e.memberProjects.map(t=>({label:`${e.displayName} · ${t.environmentLabel??`Environment`} · ${t.workspaceRoot}`,search:{project:e.projectKey,machine:t.environmentId,checkout:t.physicalProjectKey}}))}function v(e){return e.pathname}export{h as t};
2
- //# sourceMappingURL=SettingsScopeNotice-DAPsshab.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{NE as t,lE as n,sr as r}from"./utils-Dx_TSvdC.js";import{t as i}from"./useNavigate-LjcLtV_e.js";import{t as a}from"./useLocation-BQwksr61.js";import{a as o}from"./environments-CjU9SGCA.js";import{n as s,r as c,t as l}from"./alert-CvIEaZOb.js";import{B as u,H as d,i as f}from"./settingsLayout-BRcW18Dy.js";var p=t(),m=e(n(),1);function h(e){let t=(0,p.c)(42),{children:n,target:h,targetId:y,eligibleEnvironmentIds:b}=e,{selectScope:x,search:S}=u(),C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(C={from:`/settings`},t[0]=C):C=t[0];let w=i(C),T;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(T={select:v},t[1]=T):T=t[1];let E=a(T),{environments:D}=o(),O=d(),k,A,j,M,N,P,F,I;if(t[2]!==n||t[3]!==b||t[4]!==D||t[5]!==O||t[6]!==w||t[7]!==E||t[8]!==S||t[9]!==x||t[10]!==h||t[11]!==y){let e=h===`checkout`?O.filter(e=>!S.project||e.projectKey===S.project).flatMap(_):h===`project`?O.map(g):h===`environment`?D.filter(e=>b===void 0||b.includes(e.environmentId)).map(e=>({label:D.some(t=>t.environmentId!==e.environmentId&&t.label===e.label)?`${e.label} · ${e.displayUrl||e.environmentId}`:e.label,search:{machine:e.environmentId}})):[{label:`Open all environments`,search:{}}];M=f,j=l,I=`status`,A=c,t[20]===n?F=t[21]:(F=(0,m.jsx)(`p`,{children:n}),t[20]=n,t[21]=F),k=s,N=`flex-wrap`;let i;t[22]!==w||t[23]!==E||t[24]!==x||t[25]!==y?(i=e=>(0,m.jsx)(r,{size:`sm-multiline`,variant:`outline`,className:`max-w-full break-all text-left`,onClick:()=>{y?w({to:E,search:()=>e.search,hash:y}):x(e.search)},children:e.label},JSON.stringify(e.search)),t[22]=w,t[23]=E,t[24]=x,t[25]=y,t[26]=i):i=t[26],P=e.map(i),t[2]=n,t[3]=b,t[4]=D,t[5]=O,t[6]=w,t[7]=E,t[8]=S,t[9]=x,t[10]=h,t[11]=y,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N,t[17]=P,t[18]=F,t[19]=I}else k=t[12],A=t[13],j=t[14],M=t[15],N=t[16],P=t[17],F=t[18],I=t[19];let L;t[27]!==k||t[28]!==N||t[29]!==P?(L=(0,m.jsx)(k,{className:N,children:P}),t[27]=k,t[28]=N,t[29]=P,t[30]=L):L=t[30];let R;t[31]!==A||t[32]!==F||t[33]!==L?(R=(0,m.jsxs)(A,{children:[F,L]}),t[31]=A,t[32]=F,t[33]=L,t[34]=R):R=t[34];let z;t[35]!==j||t[36]!==I||t[37]!==R?(z=(0,m.jsx)(j,{role:I,children:R}),t[35]=j,t[36]=I,t[37]=R,t[38]=z):z=t[38];let B;return t[39]!==M||t[40]!==z?(B=(0,m.jsx)(M,{children:z}),t[39]=M,t[40]=z,t[41]=B):B=t[41],B}function g(e){return{label:e.displayName,search:{project:e.projectKey}}}function _(e){return e.memberProjects.map(t=>({label:`${e.displayName} · ${t.environmentLabel??`Environment`} · ${t.workspaceRoot}`,search:{project:e.projectKey,machine:t.environmentId,checkout:t.physicalProjectKey}}))}function v(e){return e.pathname}export{h as t};
2
+ //# sourceMappingURL=SettingsScopeNotice-CcgRSc9E.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$o as n,$x as r,DC as i,Go as a,NE as o,Qo as s,Wn as c,Xp as l,Yo as u,lE as d,ns as f,oT as p,rm as m,sr as h,ss as g,t as _,va as v,xs as y}from"./utils-BEVyjoxo.js";import{I as b,O as x,R as S,W as C,d as w,f as T,h as E,k as D,m as O,mn as k,r as ee}from"./runtime-D8mKjOP-.js";import{i as A}from"./toast-DhMYg_gN.js";import{t as j}from"./use-atom-command-x4GQBtio.js";import{t as M}from"./skeleton-C6_D5JUu.js";import{i as te,r as ne}from"./dist-vr51zfzA.js";import{a as N,i as P,o as F,r as I,t as L}from"./empty-hFNkAHps.js";import{Fa as re,Ia as ie,Pa as ae,qa as oe}from"./main-Bh6Hj0_-.js";var R=e(v(),1),z=o(),B=e(t(),1),V=f(i(k,ee.contextEffect.pipe(r(e=>p(e,k))))),H=w(V),U=D(),W=b(V,{label:`web:managed-relay:deregister-environment`,scheduler:U,concurrency:{mode:`serial`,key:e=>e.accountId},execute:(e,t)=>T(t,e)}),G=n(y([])).pipe(s,g(`managed-relay:web:environments:null`)),K=n(y([])).pipe(s,g(`managed-relay:web:devices:null`));function se(){let e=(0,z.c)(14),t=u(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.environmentsAtom(t):G,e[0]=t,e[1]=n);let r=u(n),i;e[2]===r?i=e[3]:(i=E(r),e[2]=r,e[3]=i);let o=i,s,c;e[4]!==o.error||e[5]!==o.errorTraceId?(s=()=>{o.error&&console.error(`[t3-cloud] Relay environment listing failed`,{message:o.error,traceId:o.errorTraceId})},c=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=s,e[7]=c):(s=e[6],c=e[7]),(0,B.useEffect)(s,c);let l;e[8]===t?l=e[9]:(l=()=>{t&&H.refreshEnvironments(a,t)},e[8]=t,e[9]=l);let d=l,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}function q(){let e=(0,z.c)(14),t=u(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.devicesAtom(t):K,e[0]=t,e[1]=n);let r=u(n),i;e[2]===r?i=e[3]:(i=E(r),e[2]=r,e[3]=i);let o=i,s,c;e[4]!==o.error||e[5]!==o.errorTraceId?(s=()=>{o.error&&console.error(`[t3-cloud] Relay device listing failed`,{message:o.error,traceId:o.errorTraceId})},c=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=s,e[7]=c):(s=e[6],c=e[7]),(0,B.useEffect)(s,c);let l;e[8]===t?l=e[9]:(l=()=>{t&&H.refreshDevices(a,t)},e[8]=t,e[9]=l);let d=l,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}var ce=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}),le=[[`notifyOnApproval`,`approvals`],[`notifyOnInput`,`input requests`],[`notifyOnCompletion`,`completions`],[`notifyOnFailure`,`failures`]];function ue(e){return`${e.platform===`android`?`Android`:e.iosMajorVersion===null?`iOS`:`iOS ${e.iosMajorVersion}`}${e.appVersion?` · P4 Code ${e.appVersion}`:``}`}function de(e){if(!e.notifications.enabled)return`Push notifications are disabled on this device.`;let t=le.flatMap(([t,n])=>e.notifications[t]?[n]:[]);return t.length>0?`Alerts enabled for ${t.join(`, `)}.`:`Push notifications are enabled, but no alert types are selected.`}function fe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Update time unavailable`:`Updated ${ce.format(t)}`}var J=e(d(),1);function Y(e){let t=(0,z.c)(18),{action:n,children:r,className:i,description:a,title:o}=e,s;t[0]===i?s=t[1]:(s=_(`w-full min-w-0 text-foreground`,i),t[0]=i,t[1]=s);let c;t[2]===o?c=t[3]:(c=(0,J.jsx)(`h2`,{className:`text-base leading-6 font-semibold`,children:o}),t[2]=o,t[3]=c);let l;t[4]===a?l=t[5]:(l=a?(0,J.jsx)(`p`,{className:`mt-1 max-w-[34rem] text-xs leading-4.5 text-muted-foreground sm:min-h-9`,children:a}):null,t[4]=a,t[5]=l);let u;t[6]!==c||t[7]!==l?(u=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;t[9]===n?d=t[10]:(d=n?(0,J.jsx)(`div`,{className:`shrink-0`,children:n}):null,t[9]=n,t[10]=d);let f;t[11]!==u||t[12]!==d?(f=(0,J.jsxs)(`header`,{className:`flex flex-col gap-3 pb-4 sm:flex-row sm:items-center sm:justify-between sm:gap-4 sm:pr-8`,children:[u,d]}),t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;return t[14]!==r||t[15]!==s||t[16]!==f?(p=(0,J.jsxs)(`div`,{className:s,children:[f,r]}),t[14]=r,t[15]=s,t[16]=f,t[17]=p):p=t[17],p}function X(e){let t=(0,z.c)(7),{className:n,disabled:r,isPending:i,onClick:a}=e,o=r!==void 0&&r||i,s;t[0]===i?s=t[1]:(s=(0,J.jsx)(oe,{"aria-hidden":`true`,size:`sm`,refreshing:i}),t[0]=i,t[1]=s);let c;return t[2]!==n||t[3]!==a||t[4]!==o||t[5]!==s?(c=(0,J.jsxs)(h,{size:`sm`,variant:`outline`,className:n,disabled:o,onClick:a,children:[s,`Refresh`]}),t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=c):c=t[6],c}function Z(e){let t=(0,z.c)(12),{children:n,className:r,icon:i}=e,a;t[0]===r?a=t[1]:(a=_(`border-t py-4 first:border-t-0`,r),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`flex size-8 shrink-0 items-center justify-center rounded-lg border bg-muted/32 text-muted-foreground`,children:i}),t[2]=i,t[3]=o);let s;t[4]===n?s=t[5]:(s=(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:n}),t[4]=n,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,J.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,J.jsx)(`li`,{className:a,children:c}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}var pe=[`primary`,`secondary`];function Q(e){let t=(0,z.c)(4),{enabled:n,label:r}=e,i=n?`success`:`outline`,a=n?`On`:`Off`,o;return t[0]!==r||t[1]!==i||t[2]!==a?(o=(0,J.jsxs)(c,{variant:i,children:[r,`: `,a]}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):o=t[3],o}function me(e){let t=(0,z.c)(32),{device:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(m,{className:`size-4`}),t[0]=r):r=t[0];let i;t[1]===n.label?i=t[2]:(i=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=i);let a;t[3]===n?a=t[4]:(a=ue(n),t[3]=n,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,J.jsx)(`p`,{className:`text-xs leading-4.5 text-muted-foreground`,children:a}),t[5]=a,t[6]=o);let s;t[7]!==i||t[8]!==o?(s=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[i,o]}),t[7]=i,t[8]=o,t[9]=s):s=t[9];let c;t[10]===n.updatedAt?c=t[11]:(c=fe(n.updatedAt),t[10]=n.updatedAt,t[11]=c);let l;t[12]===c?l=t[13]:(l=(0,J.jsx)(`p`,{className:`shrink-0 text-2xs leading-4 text-muted-foreground/75`,children:c}),t[12]=c,t[13]=l);let u;t[14]!==s||t[15]!==l?(u=(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5 sm:flex-row sm:items-start sm:justify-between sm:gap-3`,children:[s,l]}),t[14]=s,t[15]=l,t[16]=u):u=t[16];let d;t[17]===n.notifications.enabled?d=t[18]:(d=(0,J.jsx)(Q,{enabled:n.notifications.enabled,label:`Push notifications`}),t[17]=n.notifications.enabled,t[18]=d);let f;t[19]===n.liveActivities.enabled?f=t[20]:(f=(0,J.jsx)(Q,{enabled:n.liveActivities.enabled,label:`Live Activities`}),t[19]=n.liveActivities.enabled,t[20]=f);let p;t[21]!==f||t[22]!==d?(p=(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[d,f]}),t[21]=f,t[22]=d,t[23]=p):p=t[23];let h;t[24]===n?h=t[25]:(h=de(n),t[24]=n,t[25]=h);let g;t[26]===h?g=t[27]:(g=(0,J.jsx)(`p`,{className:`mt-1.5 text-xs leading-4.5 text-muted-foreground/80`,children:h}),t[26]=h,t[27]=g);let _;return t[28]!==p||t[29]!==g||t[30]!==u?(_=(0,J.jsxs)(Z,{icon:r,children:[u,p,g]}),t[28]=p,t[29]=g,t[30]=u,t[31]=_):_=t[31],_}function he(){let e=(0,z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`div`,{"aria-label":`Loading mobile clients`,className:`divide-y border-t`,role:`status`,children:pe.map(ge)}),e[0]=t):t=e[0],t}function ge(e){return(0,J.jsx)(`div`,{className:`py-4`,children:(0,J.jsxs)(`div`,{className:`flex gap-3`,children:[(0,J.jsx)(M,{shape:`card`,className:`size-8 shrink-0`}),(0,J.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,J.jsx)(M,{className:`h-3.5 w-36`}),(0,J.jsx)(M,{className:`h-3 w-28`}),(0,J.jsxs)(`div`,{className:`flex gap-2`,children:[(0,J.jsx)(M,{className:`h-4.5 w-28`}),(0,J.jsx)(M,{className:`h-4.5 w-24`})]})]})]})},e)}function _e(){let e=(0,z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(m,{})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsxs)(L,{size:`compact`,children:[t,(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No mobile clients`}),(0,J.jsx)(I,{children:`Install P4 Code on your phone and sign in to P4 Connect to get push notifications and Live Activities.`})]})]}),e[1]=n):n=e[1],n}function ve(){let e=(0,z.c)(18),t=q(),n;e[0]===t.data?n=e[1]:(n=t.data??[],e[0]=t.data,e[1]=n);let r=n,i=!t.accountId||t.data===null&&!t.error,a=t.error!==null&&t.data===null,o;e[2]!==t.isPending||e[3]!==t.refresh?(o=(0,J.jsx)(X,{isPending:t.isPending,onClick:t.refresh}),e[2]=t.isPending,e[3]=t.refresh,e[4]=o):o=e[4];let s;e[5]!==t.error||e[6]!==t.refresh?(s=t.error?(0,J.jsxs)(`div`,{className:`mb-4 flex flex-col gap-3 border-t border-destructive/35 py-3 text-xs sm:flex-row sm:items-center sm:justify-between`,role:`alert`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load mobile clients`}),(0,J.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:t.error})]}),(0,J.jsx)(h,{size:`xs`,variant:`outline`,onClick:t.refresh,children:`Try again`})]}):null,e[5]=t.error,e[6]=t.refresh,e[7]=s):s=e[7];let c;e[8]!==r||e[9]!==a||e[10]!==i?(c=i?(0,J.jsx)(he,{}):a?null:r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(ye)}):(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsx)(_e,{})}),e[8]=r,e[9]=a,e[10]=i,e[11]=c):c=e[11];let l;e[12]!==s||e[13]!==c?(l=(0,J.jsxs)(`div`,{children:[s,c]}),e[12]=s,e[13]=c,e[14]=l):l=e[14];let u;return e[15]!==o||e[16]!==l?(u=(0,J.jsx)(Y,{title:`Mobile clients`,description:`Mobile devices that get notifications from your environments.`,action:o,children:l}),e[15]=o,e[16]=l,e[17]=u):u=e[17],u}function ye(e){return(0,J.jsx)(me,{device:e},e.deviceId)}var be=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`});function xe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Link date unavailable`:`Linked ${be.format(t)}`}function Se(e){return e.endpoint.providerKind===`cloudflare_tunnel`?`Managed tunnel`:`Activity publishing only`}function Ce(e){let t=(0,z.c)(46),{environment:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(l,{className:`size-4`}),t[0]=r):r=t[0];let i=e.confirmationOpen,a=e.onConfirmationChange,o;t[1]===n.label?o=t[2]:(o=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=o);let s;t[3]===n.linkedAt?s=t[4]:(s=xe(n.linkedAt),t[3]=n.linkedAt,t[4]=s);let c;t[5]===n?c=t[6]:(c=Se(n),t[5]=n,t[6]=c);let u;t[7]!==s||t[8]!==c?(u=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[s,` · `,c]}),t[7]=s,t[8]=c,t[9]=u):u=t[9];let d;t[10]!==o||t[11]!==u?(d=(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[o,u]}),t[10]=o,t[11]=u,t[12]=d):d=t[12];let f;t[13]===e.mutationPending?f=t[14]:(f=(0,J.jsx)(ie,{render:(0,J.jsx)(h,{size:`sm`,variant:`destructive-outline`,disabled:e.mutationPending,children:`Deregister`})}),t[13]=e.mutationPending,t[14]=f);let p;t[15]!==d||t[16]!==f?(p=(0,J.jsxs)(`div`,{className:`flex items-start gap-4`,children:[d,f]}),t[15]=d,t[16]=f,t[17]=p):p=t[17];let m=`Confirm deregistration of ${n.label}`,g;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,J.jsx)(`h4`,{className:`text-sm leading-4.5 font-semibold text-foreground`,children:`Deregister server`}),t[18]=g):g=t[18];let _;t[19]===n.label?_=t[20]:(_=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[`“`,n.label,`” will be removed from this account.`]}),t[19]=n.label,t[20]=_);let v;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,J.jsx)(`p`,{className:`mt-4 max-w-xl text-xs leading-4.5 text-muted-foreground`,children:`P4 Connect access will be revoked, any managed tunnel will be removed, and a host space will become available. Local connections on your devices are not changed.`}),t[21]=v):v=t[21];let y;t[22]===e?y=t[23]:(y=()=>e.onConfirmationChange(!1),t[22]=e,t[23]=y);let b;t[24]!==e.mutationPending||t[25]!==y?(b=(0,J.jsx)(h,{size:`sm`,variant:`ghost`,disabled:e.mutationPending,onClick:y,children:`Cancel`}),t[24]=e.mutationPending,t[25]=y,t[26]=b):b=t[26];let x;t[27]!==n||t[28]!==e?(x=()=>e.onDeregister(n),t[27]=n,t[28]=e,t[29]=x):x=t[29];let S=e.mutationPending?`Deregistering…`:`Deregister`,C;t[30]!==e.mutationPending||t[31]!==x||t[32]!==S?(C=(0,J.jsx)(h,{size:`sm`,variant:`destructive`,disabled:e.mutationPending,onClick:x,children:S}),t[30]=e.mutationPending,t[31]=x,t[32]=S,t[33]=C):C=t[33];let w;t[34]!==b||t[35]!==C?(w=(0,J.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[b,C]}),t[34]=b,t[35]=C,t[36]=w):w=t[36];let T;t[37]!==m||t[38]!==_||t[39]!==w?(T=(0,J.jsx)(re,{children:(0,J.jsx)(`div`,{className:`pt-3`,children:(0,J.jsxs)(`div`,{className:`rounded-lg border border-input bg-muted/32 px-5 py-4 shadow-xs/5`,role:`group`,"aria-label":m,children:[g,_,v,w]})})}),t[37]=m,t[38]=_,t[39]=w,t[40]=T):T=t[40];let E;return t[41]!==e.confirmationOpen||t[42]!==e.onConfirmationChange||t[43]!==T||t[44]!==p?(E=(0,J.jsx)(Z,{icon:r,children:(0,J.jsxs)(ae,{open:i,onOpenChange:a,children:[p,T]})}),t[41]=e.confirmationOpen,t[42]=e.onConfirmationChange,t[43]=T,t[44]=p,t[45]=E):E=t[45],E}function we(){let e=(0,z.c)(41),t=se(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},e[0]=n):n=e[0];let r=j(W,n),[i,a]=(0,B.useState)(null),[o,s]=(0,B.useState)(null),c=(0,B.useRef)(!1),u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(u={accountId:null,linkedAtById:new Map},e[1]=u):u=e[1];let[d,f]=(0,B.useState)(u),p;e[2]!==r||e[3]!==t?(p=async e=>{let n=t.accountId;if(!n||c.current)return;c.current=!0,a(e.environmentId);let i=await r({accountId:n,environmentId:e.environmentId});if(c.current=!1,a(null),i._tag===`Success`){s(null),f(t=>{let r=new Map(t.accountId===n?t.linkedAtById:[]);return r.set(e.environmentId,e.linkedAt),{accountId:n,linkedAtById:r}}),t.refresh(),A.add({type:`success`,title:`Server deregistered`,description:`P4 Connect access was revoked and a host space is now available.`});return}if(S(i))return;let o=C(i),l=o instanceof Error?o.message:`Could not deregister the server.`,u=x(o);console.error(`[t3-connect] Could not deregister environment`,{environmentId:e.environmentId,message:l,traceId:u,cause:o}),A.add({type:`error`,title:`Could not deregister server`,description:l,data:u?{secondaryActionProps:{children:`Copy trace ID`,onClick:()=>void navigator.clipboard?.writeText(u)}}:void 0})},e[2]=r,e[3]=t,e[4]=p):p=e[4];let m=p,h;e[5]!==t.accountId||e[6]!==d.accountId||e[7]!==d.linkedAtById?(h=d.accountId===t.accountId?d.linkedAtById:new Map,e[5]=t.accountId,e[6]=d.accountId,e[7]=d.linkedAtById,e[8]=h):h=e[8];let g=h,_,v,y,b,w,T;if(e[9]!==o||e[10]!==i||e[11]!==t.accountId||e[12]!==t.data||e[13]!==t.error||e[14]!==t.isPending||e[15]!==t.refresh||e[16]!==m||e[17]!==g){let n;e[24]===g?n=e[25]:(n=e=>g.get(e.environmentId)!==e.linkedAt,e[24]=g,e[25]=n);let r=(t.data??[]).filter(n),a=!t.accountId||t.data===null&&!t.error;_=Y,b=`P4 Connect`,w=`Environments registered to your account. Connections on this device are managed in Settings.`;let c=i!==null;e[26]!==t.isPending||e[27]!==t.refresh||e[28]!==c?(T=(0,J.jsx)(X,{disabled:c,isPending:t.isPending,onClick:t.refresh}),e[26]=t.isPending,e[27]=t.refresh,e[28]=c,e[29]=T):T=e[29],e[30]===t.error?v=e[31]:(v=t.error?(0,J.jsxs)(`div`,{className:`mb-4 border-t border-destructive/35 py-3 text-xs`,role:`alert`,children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load P4 Connect environments`}),(0,J.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:t.error})]}):null,e[30]=t.error,e[31]=v),y=a?(0,J.jsx)(`p`,{className:`border-t py-4 text-xs text-muted-foreground`,role:`status`,children:`Loading environments…`}):r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(e=>(0,J.jsx)(Ce,{environment:e,confirmationOpen:o===e.environmentId,mutationPending:i!==null,onConfirmationChange:t=>s(t?e.environmentId:null),onDeregister:e=>void m(e)},e.environmentId))}):t.error?null:(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsxs)(L,{size:`compact`,children:[(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(l,{})}),(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No P4 Connect environments`}),(0,J.jsx)(I,{children:`Link an environment from its local Settings to make it available through P4 Connect.`})]})]})}),e[9]=o,e[10]=i,e[11]=t.accountId,e[12]=t.data,e[13]=t.error,e[14]=t.isPending,e[15]=t.refresh,e[16]=m,e[17]=g,e[18]=_,e[19]=v,e[20]=y,e[21]=b,e[22]=w,e[23]=T}else _=e[18],v=e[19],y=e[20],b=e[21],w=e[22],T=e[23];let E;e[32]!==v||e[33]!==y?(E=(0,J.jsxs)(`div`,{children:[v,y]}),e[32]=v,e[33]=y,e[34]=E):E=e[34];let D;return e[35]!==_||e[36]!==b||e[37]!==w||e[38]!==T||e[39]!==E?(D=(0,J.jsx)(_,{title:b,description:w,action:T,children:E}),e[35]=_,e[36]=b,e[37]=w,e[38]=T,e[39]=E,e[40]=D):D=e[40],D}var $=[{label:`Mobile clients`,url:`mobile-clients`,icon:(0,J.jsx)(m,{className:`size-4`}),content:(0,J.jsx)(ve,{})},{label:`P4 Connect`,url:`t3-connect`,icon:(0,J.jsx)(l,{className:`size-4`}),content:(0,J.jsx)(we,{})}];function Te(){let e=(0,z.c)(8),t=te(),{isSignedIn:n}=ne(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},e[0]=r):r=e[0];let[i,a]=(0,B.useState)(r),o;e[1]===t?o=e[2]:(o=()=>{let e=(e,t)=>a(n=>({...n,[e]:t}));t.openUserProfile({__experimental_startPath:`/t3-connect`,customPages:$.map(t=>({label:t.label,url:t.url,mount:n=>e(`content:${t.url}`,n),unmount:()=>e(`content:${t.url}`,void 0),mountIcon:n=>e(`icon:${t.url}`,n),unmountIcon:()=>e(`icon:${t.url}`,void 0)}))})},e[1]=t,e[2]=o);let s=o,c;e[3]===i?c=e[4]:(c=$.flatMap(e=>{let t=i[`content:${e.url}`],n=i[`icon:${e.url}`];return[t?(0,R.createPortal)(e.content,t,`content:${e.url}`):null,n?(0,R.createPortal)(e.icon,n,`icon:${e.url}`):null]}),e[3]=i,e[4]=c);let l=c,u=n?s:null,d;return e[5]!==l||e[6]!==u?(d={open:u,portals:l},e[5]=l,e[6]=u,e[7]=d):d=e[7],d}export{Te as n,$ as t};
2
- //# sourceMappingURL=T3ConnectAccountPages-CDuVbE2z.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$o as n,$x as r,DC as i,Go as a,NE as o,Qo as s,Wn as c,Xp as l,Yo as u,lE as d,ns as f,oT as p,rm as m,sr as h,ss as g,t as _,va as v,xs as y}from"./utils-Dx_TSvdC.js";import{I as b,O as x,R as S,W as C,d as w,f as T,h as E,k as D,m as O,mn as k,r as ee}from"./runtime-D102A-Bu.js";import{i as A}from"./toast-SPJYfh08.js";import{t as j}from"./use-atom-command-BHmF32aL.js";import{t as M}from"./skeleton-DDh76jpd.js";import{i as te,r as ne}from"./dist-BgOJfdC2.js";import{a as N,i as P,o as F,r as I,t as L}from"./empty-xf3NEL4p.js";import{Fa as re,Ia as ie,Pa as ae,qa as oe}from"./main-C58_iQqs.js";var R=e(v(),1),z=o(),B=e(t(),1),V=f(i(k,ee.contextEffect.pipe(r(e=>p(e,k))))),H=w(V),U=D(),W=b(V,{label:`web:managed-relay:deregister-environment`,scheduler:U,concurrency:{mode:`serial`,key:e=>e.accountId},execute:(e,t)=>T(t,e)}),G=n(y([])).pipe(s,g(`managed-relay:web:environments:null`)),K=n(y([])).pipe(s,g(`managed-relay:web:devices:null`));function se(){let e=(0,z.c)(14),t=u(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.environmentsAtom(t):G,e[0]=t,e[1]=n);let r=u(n),i;e[2]===r?i=e[3]:(i=E(r),e[2]=r,e[3]=i);let o=i,s,c;e[4]!==o.error||e[5]!==o.errorTraceId?(s=()=>{o.error&&console.error(`[t3-cloud] Relay environment listing failed`,{message:o.error,traceId:o.errorTraceId})},c=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=s,e[7]=c):(s=e[6],c=e[7]),(0,B.useEffect)(s,c);let l;e[8]===t?l=e[9]:(l=()=>{t&&H.refreshEnvironments(a,t)},e[8]=t,e[9]=l);let d=l,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}function q(){let e=(0,z.c)(14),t=u(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.devicesAtom(t):K,e[0]=t,e[1]=n);let r=u(n),i;e[2]===r?i=e[3]:(i=E(r),e[2]=r,e[3]=i);let o=i,s,c;e[4]!==o.error||e[5]!==o.errorTraceId?(s=()=>{o.error&&console.error(`[t3-cloud] Relay device listing failed`,{message:o.error,traceId:o.errorTraceId})},c=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=s,e[7]=c):(s=e[6],c=e[7]),(0,B.useEffect)(s,c);let l;e[8]===t?l=e[9]:(l=()=>{t&&H.refreshDevices(a,t)},e[8]=t,e[9]=l);let d=l,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}var ce=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}),le=[[`notifyOnApproval`,`approvals`],[`notifyOnInput`,`input requests`],[`notifyOnCompletion`,`completions`],[`notifyOnFailure`,`failures`]];function ue(e){return`${e.platform===`android`?`Android`:e.iosMajorVersion===null?`iOS`:`iOS ${e.iosMajorVersion}`}${e.appVersion?` · P4 Code ${e.appVersion}`:``}`}function de(e){if(!e.notifications.enabled)return`Push notifications are disabled on this device.`;let t=le.flatMap(([t,n])=>e.notifications[t]?[n]:[]);return t.length>0?`Alerts enabled for ${t.join(`, `)}.`:`Push notifications are enabled, but no alert types are selected.`}function fe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Update time unavailable`:`Updated ${ce.format(t)}`}var J=e(d(),1);function Y(e){let t=(0,z.c)(18),{action:n,children:r,className:i,description:a,title:o}=e,s;t[0]===i?s=t[1]:(s=_(`w-full min-w-0 text-foreground`,i),t[0]=i,t[1]=s);let c;t[2]===o?c=t[3]:(c=(0,J.jsx)(`h2`,{className:`text-base leading-6 font-semibold`,children:o}),t[2]=o,t[3]=c);let l;t[4]===a?l=t[5]:(l=a?(0,J.jsx)(`p`,{className:`mt-1 max-w-[34rem] text-xs leading-4.5 text-muted-foreground sm:min-h-9`,children:a}):null,t[4]=a,t[5]=l);let u;t[6]!==c||t[7]!==l?(u=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;t[9]===n?d=t[10]:(d=n?(0,J.jsx)(`div`,{className:`shrink-0`,children:n}):null,t[9]=n,t[10]=d);let f;t[11]!==u||t[12]!==d?(f=(0,J.jsxs)(`header`,{className:`flex flex-col gap-3 pb-4 sm:flex-row sm:items-center sm:justify-between sm:gap-4 sm:pr-8`,children:[u,d]}),t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;return t[14]!==r||t[15]!==s||t[16]!==f?(p=(0,J.jsxs)(`div`,{className:s,children:[f,r]}),t[14]=r,t[15]=s,t[16]=f,t[17]=p):p=t[17],p}function X(e){let t=(0,z.c)(7),{className:n,disabled:r,isPending:i,onClick:a}=e,o=r!==void 0&&r||i,s;t[0]===i?s=t[1]:(s=(0,J.jsx)(oe,{"aria-hidden":`true`,size:`sm`,refreshing:i}),t[0]=i,t[1]=s);let c;return t[2]!==n||t[3]!==a||t[4]!==o||t[5]!==s?(c=(0,J.jsxs)(h,{size:`sm`,variant:`outline`,className:n,disabled:o,onClick:a,children:[s,`Refresh`]}),t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=c):c=t[6],c}function Z(e){let t=(0,z.c)(12),{children:n,className:r,icon:i}=e,a;t[0]===r?a=t[1]:(a=_(`border-t py-4 first:border-t-0`,r),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`flex size-8 shrink-0 items-center justify-center rounded-lg border bg-muted/32 text-muted-foreground`,children:i}),t[2]=i,t[3]=o);let s;t[4]===n?s=t[5]:(s=(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:n}),t[4]=n,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,J.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,J.jsx)(`li`,{className:a,children:c}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}var pe=[`primary`,`secondary`];function Q(e){let t=(0,z.c)(4),{enabled:n,label:r}=e,i=n?`success`:`outline`,a=n?`On`:`Off`,o;return t[0]!==r||t[1]!==i||t[2]!==a?(o=(0,J.jsxs)(c,{variant:i,children:[r,`: `,a]}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):o=t[3],o}function me(e){let t=(0,z.c)(32),{device:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(m,{className:`size-4`}),t[0]=r):r=t[0];let i;t[1]===n.label?i=t[2]:(i=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=i);let a;t[3]===n?a=t[4]:(a=ue(n),t[3]=n,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,J.jsx)(`p`,{className:`text-xs leading-4.5 text-muted-foreground`,children:a}),t[5]=a,t[6]=o);let s;t[7]!==i||t[8]!==o?(s=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[i,o]}),t[7]=i,t[8]=o,t[9]=s):s=t[9];let c;t[10]===n.updatedAt?c=t[11]:(c=fe(n.updatedAt),t[10]=n.updatedAt,t[11]=c);let l;t[12]===c?l=t[13]:(l=(0,J.jsx)(`p`,{className:`shrink-0 text-2xs leading-4 text-muted-foreground/75`,children:c}),t[12]=c,t[13]=l);let u;t[14]!==s||t[15]!==l?(u=(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5 sm:flex-row sm:items-start sm:justify-between sm:gap-3`,children:[s,l]}),t[14]=s,t[15]=l,t[16]=u):u=t[16];let d;t[17]===n.notifications.enabled?d=t[18]:(d=(0,J.jsx)(Q,{enabled:n.notifications.enabled,label:`Push notifications`}),t[17]=n.notifications.enabled,t[18]=d);let f;t[19]===n.liveActivities.enabled?f=t[20]:(f=(0,J.jsx)(Q,{enabled:n.liveActivities.enabled,label:`Live Activities`}),t[19]=n.liveActivities.enabled,t[20]=f);let p;t[21]!==f||t[22]!==d?(p=(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[d,f]}),t[21]=f,t[22]=d,t[23]=p):p=t[23];let h;t[24]===n?h=t[25]:(h=de(n),t[24]=n,t[25]=h);let g;t[26]===h?g=t[27]:(g=(0,J.jsx)(`p`,{className:`mt-1.5 text-xs leading-4.5 text-muted-foreground/80`,children:h}),t[26]=h,t[27]=g);let _;return t[28]!==p||t[29]!==g||t[30]!==u?(_=(0,J.jsxs)(Z,{icon:r,children:[u,p,g]}),t[28]=p,t[29]=g,t[30]=u,t[31]=_):_=t[31],_}function he(){let e=(0,z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`div`,{"aria-label":`Loading mobile clients`,className:`divide-y border-t`,role:`status`,children:pe.map(ge)}),e[0]=t):t=e[0],t}function ge(e){return(0,J.jsx)(`div`,{className:`py-4`,children:(0,J.jsxs)(`div`,{className:`flex gap-3`,children:[(0,J.jsx)(M,{shape:`card`,className:`size-8 shrink-0`}),(0,J.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,J.jsx)(M,{className:`h-3.5 w-36`}),(0,J.jsx)(M,{className:`h-3 w-28`}),(0,J.jsxs)(`div`,{className:`flex gap-2`,children:[(0,J.jsx)(M,{className:`h-4.5 w-28`}),(0,J.jsx)(M,{className:`h-4.5 w-24`})]})]})]})},e)}function _e(){let e=(0,z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(m,{})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsxs)(L,{size:`compact`,children:[t,(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No mobile clients`}),(0,J.jsx)(I,{children:`Install P4 Code on your phone and sign in to P4 Connect to get push notifications and Live Activities.`})]})]}),e[1]=n):n=e[1],n}function ve(){let e=(0,z.c)(18),t=q(),n;e[0]===t.data?n=e[1]:(n=t.data??[],e[0]=t.data,e[1]=n);let r=n,i=!t.accountId||t.data===null&&!t.error,a=t.error!==null&&t.data===null,o;e[2]!==t.isPending||e[3]!==t.refresh?(o=(0,J.jsx)(X,{isPending:t.isPending,onClick:t.refresh}),e[2]=t.isPending,e[3]=t.refresh,e[4]=o):o=e[4];let s;e[5]!==t.error||e[6]!==t.refresh?(s=t.error?(0,J.jsxs)(`div`,{className:`mb-4 flex flex-col gap-3 border-t border-destructive/35 py-3 text-xs sm:flex-row sm:items-center sm:justify-between`,role:`alert`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load mobile clients`}),(0,J.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:t.error})]}),(0,J.jsx)(h,{size:`xs`,variant:`outline`,onClick:t.refresh,children:`Try again`})]}):null,e[5]=t.error,e[6]=t.refresh,e[7]=s):s=e[7];let c;e[8]!==r||e[9]!==a||e[10]!==i?(c=i?(0,J.jsx)(he,{}):a?null:r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(ye)}):(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsx)(_e,{})}),e[8]=r,e[9]=a,e[10]=i,e[11]=c):c=e[11];let l;e[12]!==s||e[13]!==c?(l=(0,J.jsxs)(`div`,{children:[s,c]}),e[12]=s,e[13]=c,e[14]=l):l=e[14];let u;return e[15]!==o||e[16]!==l?(u=(0,J.jsx)(Y,{title:`Mobile clients`,description:`Mobile devices that get notifications from your environments.`,action:o,children:l}),e[15]=o,e[16]=l,e[17]=u):u=e[17],u}function ye(e){return(0,J.jsx)(me,{device:e},e.deviceId)}var be=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`});function xe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Link date unavailable`:`Linked ${be.format(t)}`}function Se(e){return e.endpoint.providerKind===`cloudflare_tunnel`?`Managed tunnel`:`Activity publishing only`}function Ce(e){let t=(0,z.c)(46),{environment:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(l,{className:`size-4`}),t[0]=r):r=t[0];let i=e.confirmationOpen,a=e.onConfirmationChange,o;t[1]===n.label?o=t[2]:(o=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=o);let s;t[3]===n.linkedAt?s=t[4]:(s=xe(n.linkedAt),t[3]=n.linkedAt,t[4]=s);let c;t[5]===n?c=t[6]:(c=Se(n),t[5]=n,t[6]=c);let u;t[7]!==s||t[8]!==c?(u=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[s,` · `,c]}),t[7]=s,t[8]=c,t[9]=u):u=t[9];let d;t[10]!==o||t[11]!==u?(d=(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[o,u]}),t[10]=o,t[11]=u,t[12]=d):d=t[12];let f;t[13]===e.mutationPending?f=t[14]:(f=(0,J.jsx)(ie,{render:(0,J.jsx)(h,{size:`sm`,variant:`destructive-outline`,disabled:e.mutationPending,children:`Deregister`})}),t[13]=e.mutationPending,t[14]=f);let p;t[15]!==d||t[16]!==f?(p=(0,J.jsxs)(`div`,{className:`flex items-start gap-4`,children:[d,f]}),t[15]=d,t[16]=f,t[17]=p):p=t[17];let m=`Confirm deregistration of ${n.label}`,g;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,J.jsx)(`h4`,{className:`text-sm leading-4.5 font-semibold text-foreground`,children:`Deregister server`}),t[18]=g):g=t[18];let _;t[19]===n.label?_=t[20]:(_=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[`“`,n.label,`” will be removed from this account.`]}),t[19]=n.label,t[20]=_);let v;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,J.jsx)(`p`,{className:`mt-4 max-w-xl text-xs leading-4.5 text-muted-foreground`,children:`P4 Connect access will be revoked, any managed tunnel will be removed, and a host space will become available. Local connections on your devices are not changed.`}),t[21]=v):v=t[21];let y;t[22]===e?y=t[23]:(y=()=>e.onConfirmationChange(!1),t[22]=e,t[23]=y);let b;t[24]!==e.mutationPending||t[25]!==y?(b=(0,J.jsx)(h,{size:`sm`,variant:`ghost`,disabled:e.mutationPending,onClick:y,children:`Cancel`}),t[24]=e.mutationPending,t[25]=y,t[26]=b):b=t[26];let x;t[27]!==n||t[28]!==e?(x=()=>e.onDeregister(n),t[27]=n,t[28]=e,t[29]=x):x=t[29];let S=e.mutationPending?`Deregistering…`:`Deregister`,C;t[30]!==e.mutationPending||t[31]!==x||t[32]!==S?(C=(0,J.jsx)(h,{size:`sm`,variant:`destructive`,disabled:e.mutationPending,onClick:x,children:S}),t[30]=e.mutationPending,t[31]=x,t[32]=S,t[33]=C):C=t[33];let w;t[34]!==b||t[35]!==C?(w=(0,J.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[b,C]}),t[34]=b,t[35]=C,t[36]=w):w=t[36];let T;t[37]!==m||t[38]!==_||t[39]!==w?(T=(0,J.jsx)(re,{children:(0,J.jsx)(`div`,{className:`pt-3`,children:(0,J.jsxs)(`div`,{className:`rounded-lg border border-input bg-muted/32 px-5 py-4 shadow-xs/5`,role:`group`,"aria-label":m,children:[g,_,v,w]})})}),t[37]=m,t[38]=_,t[39]=w,t[40]=T):T=t[40];let E;return t[41]!==e.confirmationOpen||t[42]!==e.onConfirmationChange||t[43]!==T||t[44]!==p?(E=(0,J.jsx)(Z,{icon:r,children:(0,J.jsxs)(ae,{open:i,onOpenChange:a,children:[p,T]})}),t[41]=e.confirmationOpen,t[42]=e.onConfirmationChange,t[43]=T,t[44]=p,t[45]=E):E=t[45],E}function we(){let e=(0,z.c)(41),t=se(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},e[0]=n):n=e[0];let r=j(W,n),[i,a]=(0,B.useState)(null),[o,s]=(0,B.useState)(null),c=(0,B.useRef)(!1),u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(u={accountId:null,linkedAtById:new Map},e[1]=u):u=e[1];let[d,f]=(0,B.useState)(u),p;e[2]!==r||e[3]!==t?(p=async e=>{let n=t.accountId;if(!n||c.current)return;c.current=!0,a(e.environmentId);let i=await r({accountId:n,environmentId:e.environmentId});if(c.current=!1,a(null),i._tag===`Success`){s(null),f(t=>{let r=new Map(t.accountId===n?t.linkedAtById:[]);return r.set(e.environmentId,e.linkedAt),{accountId:n,linkedAtById:r}}),t.refresh(),A.add({type:`success`,title:`Server deregistered`,description:`P4 Connect access was revoked and a host space is now available.`});return}if(S(i))return;let o=C(i),l=o instanceof Error?o.message:`Could not deregister the server.`,u=x(o);console.error(`[t3-connect] Could not deregister environment`,{environmentId:e.environmentId,message:l,traceId:u,cause:o}),A.add({type:`error`,title:`Could not deregister server`,description:l,data:u?{secondaryActionProps:{children:`Copy trace ID`,onClick:()=>void navigator.clipboard?.writeText(u)}}:void 0})},e[2]=r,e[3]=t,e[4]=p):p=e[4];let m=p,h;e[5]!==t.accountId||e[6]!==d.accountId||e[7]!==d.linkedAtById?(h=d.accountId===t.accountId?d.linkedAtById:new Map,e[5]=t.accountId,e[6]=d.accountId,e[7]=d.linkedAtById,e[8]=h):h=e[8];let g=h,_,v,y,b,w,T;if(e[9]!==o||e[10]!==i||e[11]!==t.accountId||e[12]!==t.data||e[13]!==t.error||e[14]!==t.isPending||e[15]!==t.refresh||e[16]!==m||e[17]!==g){let n;e[24]===g?n=e[25]:(n=e=>g.get(e.environmentId)!==e.linkedAt,e[24]=g,e[25]=n);let r=(t.data??[]).filter(n),a=!t.accountId||t.data===null&&!t.error;_=Y,b=`P4 Connect`,w=`Environments registered to your account. Connections on this device are managed in Settings.`;let c=i!==null;e[26]!==t.isPending||e[27]!==t.refresh||e[28]!==c?(T=(0,J.jsx)(X,{disabled:c,isPending:t.isPending,onClick:t.refresh}),e[26]=t.isPending,e[27]=t.refresh,e[28]=c,e[29]=T):T=e[29],e[30]===t.error?v=e[31]:(v=t.error?(0,J.jsxs)(`div`,{className:`mb-4 border-t border-destructive/35 py-3 text-xs`,role:`alert`,children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load P4 Connect environments`}),(0,J.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:t.error})]}):null,e[30]=t.error,e[31]=v),y=a?(0,J.jsx)(`p`,{className:`border-t py-4 text-xs text-muted-foreground`,role:`status`,children:`Loading environments…`}):r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(e=>(0,J.jsx)(Ce,{environment:e,confirmationOpen:o===e.environmentId,mutationPending:i!==null,onConfirmationChange:t=>s(t?e.environmentId:null),onDeregister:e=>void m(e)},e.environmentId))}):t.error?null:(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsxs)(L,{size:`compact`,children:[(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(l,{})}),(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No P4 Connect environments`}),(0,J.jsx)(I,{children:`Link an environment from its local Settings to make it available through P4 Connect.`})]})]})}),e[9]=o,e[10]=i,e[11]=t.accountId,e[12]=t.data,e[13]=t.error,e[14]=t.isPending,e[15]=t.refresh,e[16]=m,e[17]=g,e[18]=_,e[19]=v,e[20]=y,e[21]=b,e[22]=w,e[23]=T}else _=e[18],v=e[19],y=e[20],b=e[21],w=e[22],T=e[23];let E;e[32]!==v||e[33]!==y?(E=(0,J.jsxs)(`div`,{children:[v,y]}),e[32]=v,e[33]=y,e[34]=E):E=e[34];let D;return e[35]!==_||e[36]!==b||e[37]!==w||e[38]!==T||e[39]!==E?(D=(0,J.jsx)(_,{title:b,description:w,action:T,children:E}),e[35]=_,e[36]=b,e[37]=w,e[38]=T,e[39]=E,e[40]=D):D=e[40],D}var $=[{label:`Mobile clients`,url:`mobile-clients`,icon:(0,J.jsx)(m,{className:`size-4`}),content:(0,J.jsx)(ve,{})},{label:`P4 Connect`,url:`t3-connect`,icon:(0,J.jsx)(l,{className:`size-4`}),content:(0,J.jsx)(we,{})}];function Te(){let e=(0,z.c)(8),t=te(),{isSignedIn:n}=ne(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},e[0]=r):r=e[0];let[i,a]=(0,B.useState)(r),o;e[1]===t?o=e[2]:(o=()=>{let e=(e,t)=>a(n=>({...n,[e]:t}));t.openUserProfile({__experimental_startPath:`/t3-connect`,customPages:$.map(t=>({label:t.label,url:t.url,mount:n=>e(`content:${t.url}`,n),unmount:()=>e(`content:${t.url}`,void 0),mountIcon:n=>e(`icon:${t.url}`,n),unmountIcon:()=>e(`icon:${t.url}`,void 0)}))})},e[1]=t,e[2]=o);let s=o,c;e[3]===i?c=e[4]:(c=$.flatMap(e=>{let t=i[`content:${e.url}`],n=i[`icon:${e.url}`];return[t?(0,R.createPortal)(e.content,t,`content:${e.url}`):null,n?(0,R.createPortal)(e.icon,n,`icon:${e.url}`):null]}),e[3]=i,e[4]=c);let l=c,u=n?s:null,d;return e[5]!==l||e[6]!==u?(d={open:u,portals:l},e[5]=l,e[6]=u,e[7]=d):d=e[7],d}export{Te as n,$ as t};
2
+ //# sourceMappingURL=T3ConnectAccountPages-8GTdhVAB.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{NE as t,lE as n,qf as r}from"./utils-BEVyjoxo.js";import{o as i}from"./runtime-D8mKjOP-.js";import{n as a,r as o}from"./dist-vr51zfzA.js";import{c as s,l as c,s as l}from"./sidebar-BkujXU9U.js";import{t as u}from"./T3ConnectAccountPages-CDuVbE2z.js";import{t as d}from"./useT3ConnectAuthPrompt-1zTdZLsH.js";var f=t(),p=e(n(),1);function m(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(v,{}),e[0]=t):t=e[0],t}function h(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(g,{}),e[0]=t):t=e[0],t}function g(){let e=(0,f.c)(1),{isLoaded:t,isSignedIn:n}=o();if(!t||!n)return null;let r;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,p.jsx)(a,{appearance:{elements:{avatarBox:`size-7`,userButtonTrigger:`rounded-lg p-1 hover:bg-sidebar-row-hover`}},children:u.map(_)}),e[0]=r):r=e[0],r}function _(e){return(0,p.jsx)(a.UserProfilePage,{label:e.label,labelIcon:e.icon,url:e.url,children:e.content},e.url)}function v(){let e=(0,f.c)(7),{isLoaded:t,isSignedIn:n}=o(),{authPrompt:i,openAuthPrompt:a}=d();if(!t||n)return null;let u,m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,p.jsx)(r,{}),m=(0,p.jsx)(`span`,{children:`Sign in to P4 Connect`}),e[0]=u,e[1]=m):(u=e[0],m=e[1]);let h;e[2]===a?h=e[3]:(h=(0,p.jsx)(l,{children:(0,p.jsx)(c,{children:(0,p.jsxs)(s,{onClick:a,children:[u,m]})})}),e[2]=a,e[3]=h);let g;return e[4]!==i||e[5]!==h?(g=(0,p.jsxs)(p.Fragment,{children:[h,i]}),e[4]=i,e[5]=h,e[6]=g):g=e[6],g}export{h as T3ConnectSidebarAvatar,m as T3ConnectSidebarSignIn};
2
- //# sourceMappingURL=T3ConnectSidebarSignIn-BSQHp-Xq.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{NE as t,lE as n,qf as r}from"./utils-Dx_TSvdC.js";import{o as i}from"./runtime-D102A-Bu.js";import{n as a,r as o}from"./dist-BgOJfdC2.js";import{c as s,l as c,s as l}from"./sidebar-CNP67lTi.js";import{t as u}from"./T3ConnectAccountPages-8GTdhVAB.js";import{t as d}from"./useT3ConnectAuthPrompt-D0cW1Kb6.js";var f=t(),p=e(n(),1);function m(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(v,{}),e[0]=t):t=e[0],t}function h(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(g,{}),e[0]=t):t=e[0],t}function g(){let e=(0,f.c)(1),{isLoaded:t,isSignedIn:n}=o();if(!t||!n)return null;let r;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,p.jsx)(a,{appearance:{elements:{avatarBox:`size-7`,userButtonTrigger:`rounded-lg p-1 hover:bg-sidebar-row-hover`}},children:u.map(_)}),e[0]=r):r=e[0],r}function _(e){return(0,p.jsx)(a.UserProfilePage,{label:e.label,labelIcon:e.icon,url:e.url,children:e.content},e.url)}function v(){let e=(0,f.c)(7),{isLoaded:t,isSignedIn:n}=o(),{authPrompt:i,openAuthPrompt:a}=d();if(!t||n)return null;let u,m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,p.jsx)(r,{}),m=(0,p.jsx)(`span`,{children:`Sign in to P4 Connect`}),e[0]=u,e[1]=m):(u=e[0],m=e[1]);let h;e[2]===a?h=e[3]:(h=(0,p.jsx)(l,{children:(0,p.jsx)(c,{children:(0,p.jsxs)(s,{onClick:a,children:[u,m]})})}),e[2]=a,e[3]=h);let g;return e[4]!==i||e[5]!==h?(g=(0,p.jsxs)(p.Fragment,{children:[h,i]}),e[4]=i,e[5]=h,e[6]=g):g=e[6],g}export{h as T3ConnectSidebarAvatar,m as T3ConnectSidebarSignIn};
2
+ //# sourceMappingURL=T3ConnectSidebarSignIn-CY6WtOps.js.map