@p4code/cli 0.9.18 → 0.9.19

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 (362) hide show
  1. package/dist/AcpMcpStdioBridge-DbCGhPmy.mjs +3 -0
  2. package/dist/{AcpMcpStdioBridge-4vUttgH1.mjs → AcpMcpStdioBridge-DxIZyDJz.mjs} +4 -4
  3. package/dist/{Effect-_Rz7VLdg.mjs → Effect-BqRgldaH.mjs} +20 -4
  4. package/dist/{Schema-APnY3Ozr.mjs → Schema-CkGB1Dgx.mjs} +2 -2
  5. package/dist/{Stream-CJtpwu3-.mjs → Stream-DZTo5F3N.mjs} +2 -2
  6. package/dist/{TraceDiagnostics-CeQ-TvdA.mjs → TraceDiagnostics-BU8mTsuy.mjs} +278 -50
  7. package/dist/bin.mjs +2 -2
  8. package/dist/{binCli-DzRO6f_z.mjs → binCli-CJGD6FcB.mjs} +297 -125
  9. package/dist/claude-history-worker.mjs +1 -1
  10. package/dist/{claudeHistoryWorker-B6KX_N9G.mjs → claudeHistoryWorker-Cst8OnLH.mjs} +1 -1
  11. package/dist/{claudeHistoryWorker-DZ1Ft4NK.mjs → claudeHistoryWorker-r4mV4Dxy.mjs} +2 -2
  12. package/dist/client/.vite/manifest.json +2143 -2131
  13. package/dist/client/assets/{2NI2N5EU-Ds9jiLPm.js → 2NI2N5EU-dXNVRqH0.js} +2 -2
  14. package/dist/client/assets/{4UO7MD6I-BWEQQJHY.js → 4UO7MD6I-BnTV2LIU.js} +2 -2
  15. package/dist/client/assets/{5B3SVYGG-lcm66GRf.js → 5B3SVYGG-BW_NJOn9.js} +2 -2
  16. package/dist/client/assets/{5GK6JWQ2-DegG64te.js → 5GK6JWQ2-zR4M88FU.js} +2 -2
  17. package/dist/client/assets/{5N7A7DKN-CDv2ioO3.js → 5N7A7DKN-DIzrmjXm.js} +2 -2
  18. package/dist/client/assets/{5OC2THR4-CaZVvwg8.js → 5OC2THR4-D9gz0spY.js} +2 -2
  19. package/dist/client/assets/{5S6HY5KT-B8WMtvrw.js → 5S6HY5KT-BFO1LsJz.js} +2 -2
  20. package/dist/client/assets/{6IMQ5BUJ-R-et-GtO.js → 6IMQ5BUJ-CflGSI2z.js} +2 -2
  21. package/dist/client/assets/{6OLKWJ4F-CdOZHr7D.js → 6OLKWJ4F-B_-tUtQE.js} +2 -2
  22. package/dist/client/assets/{74OO7NKP-DVS5qE0v.js → 74OO7NKP-CNFGk064.js} +2 -2
  23. package/dist/client/assets/{75O6YZUN-B6bJpGs2.js → 75O6YZUN-DSw7e3qz.js} +2 -2
  24. package/dist/client/assets/{77XECAW3-DDozcJnk.js → 77XECAW3-C1endahg.js} +2 -2
  25. package/dist/client/assets/{ABYRPUBD-BZd5-ucB.js → ABYRPUBD-DGyrlbqz.js} +2 -2
  26. package/dist/client/assets/AlertDialogRoot-CfwItD_i.js +2 -0
  27. package/dist/client/assets/{AnimatedHeight-CsOfc5H1.js → AnimatedHeight-DG3oq8Fl.js} +2 -2
  28. package/dist/client/assets/{AuthSurfaceShell--2lH1vql.js → AuthSurfaceShell-uHFuClfP.js} +2 -2
  29. package/dist/client/assets/{BB2UYUI2-DAb-WdIu.js → BB2UYUI2-DJtfqV3f.js} +2 -2
  30. package/dist/client/assets/{BUM34MOA-DMU6CGcz.js → BUM34MOA-B4MgXIYY.js} +2 -2
  31. package/dist/client/assets/{CEQABKGZ-BnDJUiDl.js → CEQABKGZ-CnWbDLSz.js} +2 -2
  32. package/dist/client/assets/{CXAC5362-QKBU6D2s.js → CXAC5362-DdZ6n5qP.js} +2 -2
  33. package/dist/client/assets/ChatGptUsageButton-Dg1SR7pz.js +2 -0
  34. package/dist/client/assets/ChatMarkdown-eJNo9q4b.js +49 -0
  35. package/dist/client/assets/CheckboxIndicator-BpGIx6Ze.js +2 -0
  36. package/dist/client/assets/{ClippedText-aNLi0IDp.js → ClippedText-Cny-j-4e.js} +2 -2
  37. package/dist/client/assets/CodexSetupSection.logic-C4KEUUA1.js +2 -0
  38. package/dist/client/assets/CollapsiblePanel-vHsKk5wM.js +2 -0
  39. package/dist/client/assets/ComboboxClear-DI8al7ca.js +2 -0
  40. package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-9alK0hYt.js} +2 -2
  41. package/dist/client/assets/{CommandBlock-Bg2O3rbF.js → CommandBlock-BOYakQHx.js} +2 -2
  42. package/dist/client/assets/CompositeRoot-OiiGu5cn.js +2 -0
  43. package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9vE8btn.js} +2 -2
  44. package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-DL0Hsk-v.js} +2 -2
  45. package/dist/client/assets/{DRLTVNUE-DvpJAT6K.js → DRLTVNUE-D99K7hWK.js} +2 -2
  46. package/dist/client/assets/{DYY6UVD2-DFSg5DAZ.js → DYY6UVD2-BF6iP9-o.js} +2 -2
  47. package/dist/client/assets/DevicePanel-BzIRsUjQ.js +2 -0
  48. package/dist/client/assets/DeviceSetup-DQqwNSXQ.js +2 -0
  49. package/dist/client/assets/DialogTitle-BNEjkHZl.js +2 -0
  50. package/dist/client/assets/{DiffCommentAnnotation-CAml763Q.js → DiffCommentAnnotation-DOn5F9Vx.js} +3 -3
  51. package/dist/client/assets/{DiffFileTree-2Y-Da6MW.js → DiffFileTree-C7d_tSjH.js} +2 -2
  52. package/dist/client/assets/DiffPanel-zzTYLQBt.js +2 -0
  53. package/dist/client/assets/{DiffWorkerPoolProvider-Czi5bOUV.js → DiffWorkerPoolProvider-CHaL1Ona.js} +3 -3
  54. package/dist/client/assets/{EmbeddedDesign-AHra-cLY.js → EmbeddedDesign-DZezJSS1.js} +8 -8
  55. package/dist/client/assets/{EnvironmentMachineIcon-BnMVjB89.js → EnvironmentMachineIcon-BrYDn6tR.js} +2 -2
  56. package/dist/client/assets/{ExpandableText-gKNgCxfU.js → ExpandableText-BsOIEd28.js} +2 -2
  57. package/dist/client/assets/{FNOVOB4O-D2IqnTWb.js → FNOVOB4O-B07Bu4_g.js} +2 -2
  58. package/dist/client/assets/{FieldControl-Bjdbc6Ii.js → FieldControl-Ua5R3Une.js} +2 -2
  59. package/dist/client/assets/{FileDiff-Di0hvnyJ.js → FileDiff-CAhD0qa4.js} +2 -2
  60. package/dist/client/assets/{FilePreviewPanel-2-RLs_YZ.js → FilePreviewPanel-Ptxxfl5h.js} +6 -6
  61. package/dist/client/assets/FoldedSettingsSection-C-4eZXtv.js +2 -0
  62. package/dist/client/assets/{HDGCDEEZ-AZF834xy.js → HDGCDEEZ-BiCUaNcl.js} +2 -2
  63. package/dist/client/assets/{HSJLKHB7-Dtz-7WMf.js → HSJLKHB7-MsC8mniI.js} +2 -2
  64. package/dist/client/assets/{Icons-BzIBDVKW.js → Icons-D8Idteuf.js} +2 -2
  65. package/dist/client/assets/Input-BtekXNnW.js +2 -0
  66. package/dist/client/assets/{IntervalSecondsField-Fdrpvkqj.js → IntervalSecondsField-Aqwzi0Sz.js} +2 -2
  67. package/dist/client/assets/JZOYTAAL-B8yh1QUr.js +1 -0
  68. package/dist/client/assets/{K3MD6TGW-BPz_yQfQ.js → K3MD6TGW-CkU_KXkd.js} +2 -2
  69. package/dist/client/assets/{K7RP3OMA-C-IhAYzY.js → K7RP3OMA-DLs66X2w.js} +2 -2
  70. package/dist/client/assets/{KeybindingsSettings.logic-DjD-8Wsr.js → KeybindingsSettings.logic-DNTed1xn.js} +2 -2
  71. package/dist/client/assets/{LHDIQX7Q-Dw7FK-yZ.js → LHDIQX7Q-BOSadp0O.js} +2 -2
  72. package/dist/client/assets/{LUXOKEGN-Cp4yLfcO.js → LUXOKEGN-qg2nPaOP.js} +2 -2
  73. package/dist/client/assets/{LinkMachineSelect-v3ZAAPFG.js → LinkMachineSelect-CQIJcmq4.js} +2 -2
  74. package/dist/client/assets/{MathTypeset-CAVYwtpt.js → MathTypeset-B_2pC76G.js} +2 -2
  75. package/dist/client/assets/ModelLiveLayer-BdDN1RwJ.js +3 -0
  76. package/dist/client/assets/{N3JZAHOW-sZve4CbV.js → N3JZAHOW-DkFZrX8t.js} +2 -2
  77. package/dist/client/assets/{NUIALGQ3-DMlKhtdq.js → NUIALGQ3-DF_hOTNF.js} +2 -2
  78. package/dist/client/assets/{NoProjectsHero-B0ChXuQG.js → NoProjectsHero-DIDw2XWy.js} +2 -2
  79. package/dist/client/assets/{O65XPQGZ-COhBlGA1.js → O65XPQGZ-DX7_CzKu.js} +2 -2
  80. package/dist/client/assets/{O7XIQ6OM-D-y75rjS.js → O7XIQ6OM-mHLqolvI.js} +2 -2
  81. package/dist/client/assets/{OFQON5FD-kw-f4mV4.js → OFQON5FD-Suig0WTF.js} +2 -2
  82. package/dist/client/assets/{P4ConnectAccountPages-BXM_FJyy.js → P4ConnectAccountPages-naPvNZLz.js} +2 -2
  83. package/dist/client/assets/{P4ConnectSidebarSignIn-D8uwPPR6.js → P4ConnectSidebarSignIn-D2rgfUAh.js} +2 -2
  84. package/dist/client/assets/{PJQHF43J-Dww1R-k6.js → PJQHF43J-7rnsehAx.js} +2 -2
  85. package/dist/client/assets/PanelLayoutControls-D6h4yyW-.js +216 -0
  86. package/dist/client/assets/{PierreEntryIcon-C-5f-jFb.js → PierreEntryIcon-0R4z7KQU.js} +2 -2
  87. package/dist/client/assets/PopoverHandle-BxV9_kh8.js +2 -0
  88. package/dist/client/assets/PreviewPanel-DCN5UudG.js +2 -0
  89. package/dist/client/assets/ProjectDefaultsSettings-BVdLNACE.js +2 -0
  90. package/dist/client/assets/{ProjectFavicon-CPvmNs3J.js → ProjectFavicon-DJmxMkvz.js} +3 -3
  91. package/dist/client/assets/{ProjectIconPickerDialog-blbck4gY.js → ProjectIconPickerDialog-3Bcbbvvc.js} +2 -2
  92. package/dist/client/assets/{ProjectMonogram-Cesz5yVS.js → ProjectMonogram-Bb9wZVNY.js} +2 -2
  93. package/dist/client/assets/{ProviderAuthTerminal-BXGE9cPY.js → ProviderAuthTerminal-mgY-tn0M.js} +2 -2
  94. package/dist/client/assets/ProviderModelPicker-D3VH0Z__.js +2 -0
  95. package/dist/client/assets/{ProviderSettingsForm-CRvI8mDe.js → ProviderSettingsForm-CGySH9bP.js} +2 -2
  96. package/dist/client/assets/PullRequestCodeTab-D-J3laup.js +6 -0
  97. package/dist/client/assets/{RHNBAITX-CY4FKVtu.js → RHNBAITX-Ddcb7a4G.js} +2 -2
  98. package/dist/client/assets/{ReadOnlySourcePreview-DK9ZCAf4.js → ReadOnlySourcePreview-CUrcvaQB.js} +2 -2
  99. package/dist/client/assets/{RedactedSensitiveText-DrIhPFXw.js → RedactedSensitiveText-DiLAhy4C.js} +2 -2
  100. package/dist/client/assets/RenderErrorBoundary-DNjP1Gq4.js +23 -0
  101. package/dist/client/assets/{RightPanelResizeHandle-DBCfKzRv.js → RightPanelResizeHandle-BKZPxtjZ.js} +2 -2
  102. package/dist/client/assets/{SLD4V6NK-Dtrbq5qR.js → SLD4V6NK-CAdpUQd9.js} +2 -2
  103. package/dist/client/assets/ScheduledTasksSettings-BIqva7uG.js +6 -0
  104. package/dist/client/assets/{ScopedSwitch-DQHfQgMZ.js → ScopedSwitch-CjWqxV6P.js} +2 -2
  105. package/dist/client/assets/{ScrollAreaCorner-B9Aiu69u.js → ScrollAreaCorner-BNGMax5h.js} +2 -2
  106. package/dist/client/assets/{SecretInput-CxJl9pux.js → SecretInput-F_2AS4sm.js} +2 -2
  107. package/dist/client/assets/SelectScrollUpArrow-r18qpNEu.js +2 -0
  108. package/dist/client/assets/{SelfImproveSettingsSection-yFj7aCio.js → SelfImproveSettingsSection-dyJbezur.js} +2 -2
  109. package/dist/client/assets/{SettingsPanels-H_7XUe5G.js → SettingsPanels-BwrWyM3f.js} +7 -7
  110. package/dist/client/assets/{SettingsPanels.logic-BYLv56aj.js → SettingsPanels.logic-DWRYwc9b.js} +2 -2
  111. package/dist/client/assets/{SettingsScopeNotice-pJqEfHRd.js → SettingsScopeNotice-DpC9Q9ae.js} +2 -2
  112. package/dist/client/assets/{SidebarStageBackdrop-DWShR_RZ.js → SidebarStageBackdrop-ByWEF0y2.js} +2 -2
  113. package/dist/client/assets/{T3PCR2KE-BFmO9IZ-.js → T3PCR2KE-BsP9x4U3.js} +2 -2
  114. package/dist/client/assets/{TKWO2OVW-DMeVANpK.js → TKWO2OVW-BONiqXri.js} +2 -2
  115. package/dist/client/assets/{TSHNXIZL-COvYTPCc.js → TSHNXIZL-CLTZIB-s.js} +2 -2
  116. package/dist/client/assets/{ThemeEditorPanel-BxOl9N6E.js → ThemeEditorPanel-C7o3GtWa.js} +3 -3
  117. package/dist/client/assets/{ThreadDetailsItemsMenu-BXQbo6bY.js → ThreadDetailsItemsMenu-Bq_XM62t.js} +40 -40
  118. package/dist/client/assets/ThreadTerminalDrawer-CD5oxZhC.js +5 -0
  119. package/dist/client/assets/TooltipProvider-DPt8xz_3.js +2 -0
  120. package/dist/client/assets/{UQJE5E4I-CajoppS3.js → UQJE5E4I-BS_wwVFT.js} +2 -2
  121. package/dist/client/assets/{USNYFO5S-BQLaJAkC.js → USNYFO5S-CpDVNtuT.js} +2 -2
  122. package/dist/client/assets/{Virtualizer-kAxtf9JI.js → Virtualizer-BWztABfX.js} +2 -2
  123. package/dist/client/assets/{WEVWDWVA-Bn1CMBLe.js → WEVWDWVA-4IVaqPOG.js} +2 -2
  124. package/dist/client/assets/{WorkspaceBreadcrumb-KdZMrP13.js → WorkspaceBreadcrumb-BHensDdi.js} +2 -2
  125. package/dist/client/assets/{WorkspacePageContainer-VqvvyrKx.js → WorkspacePageContainer-CCJOwHlv.js} +2 -2
  126. package/dist/client/assets/{WorkspacePageHeader-Ca7-ugiS.js → WorkspacePageHeader-C9Tpr_np.js} +2 -2
  127. package/dist/client/assets/{X5RFHQXM-CPBgn0uR.js → X5RFHQXM-DO1k5hPx.js} +2 -2
  128. package/dist/client/assets/{X62E3GBT-DEsBFWSE.js → X62E3GBT-DR5ebldd.js} +2 -2
  129. package/dist/client/assets/{XBNEOJTC-rIiejuIa.js → XBNEOJTC-D6Kx02Ci.js} +2 -2
  130. package/dist/client/assets/{YHV2MVVZ-FepTeOr1.js → YHV2MVVZ-B7xQdu1d.js} +2 -2
  131. package/dist/client/assets/{YURCZMG2-Co7j1onF.js → YURCZMG2-vpRi9ruy.js} +2 -2
  132. package/dist/client/assets/{YVG2LODB-CH8YtqJ9.js → YVG2LODB-BPr-N_Eh.js} +2 -2
  133. package/dist/client/assets/_chat-B7MuBHoN.js +47 -0
  134. package/dist/client/assets/{_chat.design-C593M39o.js → _chat.design-JY93KEj-.js} +2 -2
  135. package/dist/client/assets/{_chat.index-DZmhCx_Q.js → _chat.index-BLQil4HT.js} +2 -2
  136. package/dist/client/assets/{_chat.new-BLxqLetm.js → _chat.new-BUUjlaam.js} +3 -3
  137. package/dist/client/assets/_chat.pull-requests-hoMASTBm.js +2 -0
  138. package/dist/client/assets/{alert-BdISKl4u.js → alert-Eh-IusVP.js} +2 -2
  139. package/dist/client/assets/{alert-dialog-Broi1wym.js → alert-dialog-BxwvNOYD.js} +2 -2
  140. package/dist/client/assets/{assetUrls-DyJx-URx.js → assetUrls-Bk8CvVQ5.js} +2 -2
  141. package/dist/client/assets/assets-w0TTeveX.js +2 -0
  142. package/dist/client/assets/{browserHistoryStore-zdRsIuMc.js → browserHistoryStore-CQgs_U0x.js} +2 -2
  143. package/dist/client/assets/{browserLinkTarget-aye_Gpt4.js → browserLinkTarget-BD9wK52f.js} +2 -2
  144. package/dist/client/assets/{checkbox-ueGFMqVv.js → checkbox-CDoyvSyH.js} +2 -2
  145. package/dist/client/assets/{color-picker-CUoPp4AJ.js → color-picker-BOsv4n_B.js} +2 -2
  146. package/dist/client/assets/{combobox-BfOjf6Iu.js → combobox-BJsEk7ze.js} +2 -2
  147. package/dist/client/assets/{command-CeMH9lgx.js → command-Cg83G2rG.js} +2 -2
  148. package/dist/client/assets/{connect-CQUjsv6p.js → connect-C7ENaX3L.js} +2 -2
  149. package/dist/client/assets/connect-agent-BEYL9KOm.js +2 -0
  150. package/dist/client/assets/{design-BL2REeQ-.js → design-pZfTAgOJ.js} +2 -2
  151. package/dist/client/assets/{device-DUMKyegd.js → device-CG5GzxuX.js} +2 -2
  152. package/dist/client/assets/{dialog-BzESHWgr.js → dialog-wBelv1Ac.js} +2 -2
  153. package/dist/client/assets/diffPanelStore-C8bCQWTi.js +2 -0
  154. package/dist/client/assets/{diffRendering-BnN6RWwy.js → diffRendering-C_l9f0DJ.js} +2 -2
  155. package/dist/client/assets/{dist--Lo1A95S.js → dist-1X_vspyy.js} +3 -3
  156. package/dist/client/assets/{draft-input-BozMgkbl.js → draft-input-BhYlt4Pu.js} +2 -2
  157. package/dist/client/assets/{duoViewer-mOZwt5UN.js → duoViewer-C9zEhnho.js} +2 -2
  158. package/dist/client/assets/{dynamic-3CmgXeht.js → dynamic--1QgBotz.js} +3 -3
  159. package/dist/client/assets/{embeddedScripts-g3gqCUmg.js → embeddedScripts-B_jWJYkI.js} +2 -2
  160. package/dist/client/assets/{empty-CeYEMFdG.js → empty-CJnssipy.js} +2 -2
  161. package/dist/client/assets/entities-CRXY8xy3.js +2 -0
  162. package/dist/client/assets/{fileLinks-LQyYck3z.js → fileLinks-Bg40qEqI.js} +2 -2
  163. package/dist/client/assets/{fileTreeExpansion-CY-keZ2e.js → fileTreeExpansion-C_MZA2Fb.js} +2 -2
  164. package/dist/client/assets/fold-vertical-CN9ryhZz.js +2 -0
  165. package/dist/client/assets/{getDiffFileInput-ClUa7N40.js → getDiffFileInput-PLuWhYlb.js} +2 -2
  166. package/dist/client/assets/{htmlRender-CxBGTvqW.js → htmlRender-DNX1FsUO.js} +2 -2
  167. package/dist/client/assets/index-BeP8Inse.js +3 -0
  168. package/dist/client/assets/{input-K95B1E2P.js → input-Cd-93Wp0.js} +2 -2
  169. package/dist/client/assets/{input-group-BAbOiIZs.js → input-group-CsS-Psw7.js} +2 -2
  170. package/dist/client/assets/{kbd-D9Q8zN3_.js → kbd-DB5SHS11.js} +2 -2
  171. package/dist/client/assets/{keybindings-C427DPQo.js → keybindings-DBugaGH3.js} +2 -2
  172. package/dist/client/assets/{lazy-BDrl-IrZ.js → lazy-8c6T_8yh.js} +4 -4
  173. package/dist/client/assets/{lazyRouteComponent-Bi84pz13.js → lazyRouteComponent-DtOhACEQ.js} +2 -2
  174. package/dist/client/assets/{link-B57I0_wC.js → link-BrJlIcQX.js} +2 -2
  175. package/dist/client/assets/{linkedPrompt-zM8XlD0_.js → linkedPrompt-CN6Qis59.js} +2 -2
  176. package/dist/client/assets/main-CNyrs4J_.js +37 -0
  177. package/dist/client/assets/main-h6l_SQzg.css +2 -0
  178. package/dist/client/assets/mediaReference-CJpFszQ0.js +2 -0
  179. package/dist/client/assets/{mediaSource-BQkNpHYP.js → mediaSource-D0cInV6V.js} +2 -2
  180. package/dist/client/assets/{modelScene-DWYEc7-j.js → modelScene-BmBrNhLd.js} +2 -2
  181. package/dist/client/assets/number-field-CSK9SRbZ.js +2 -0
  182. package/dist/client/assets/{observeResize-nOwAB2yP.js → observeResize-CFw3_anS.js} +2 -2
  183. package/dist/client/assets/{onboarding-BpYTNtvC.js → onboarding-Eqww5SU9.js} +2 -2
  184. package/dist/client/assets/openFileInPreview-D0wySgTe.js +2 -0
  185. package/dist/client/assets/{p4ProjectFile-Dkwk3dWQ.js → p4ProjectFile-BBI5SxD4.js} +2 -2
  186. package/dist/client/assets/{pair-Bc34xPWk.js → pair-DQR36eTM.js} +2 -2
  187. package/dist/client/assets/{pendingSendStore-ettG1x40.js → pendingSendStore-Dxq1oBH6.js} +2 -2
  188. package/dist/client/assets/{phoneViewer-BCeyyPaZ.js → phoneViewer-DLo78qRr.js} +2 -2
  189. package/dist/client/assets/{pierre-icons-C2-xRx0J.js → pierre-icons-uaZzWTro.js} +2 -2
  190. package/dist/client/assets/{popover-CtPuvMeZ.js → popover-DU7x_UNP.js} +2 -2
  191. package/dist/client/assets/{preview-DIIM6Lws.js → preview-CiDRJw3K.js} +2 -2
  192. package/dist/client/assets/{preview-CS0uw3GP.js → preview-DpJtvz_q.js} +2 -2
  193. package/dist/client/assets/previewMiniPlayerStore-D98YBqjW.js +2 -0
  194. package/dist/client/assets/primary-B5Ds-X9y.js +2 -0
  195. package/dist/client/assets/primaryCloudLinkState-7otRI1yH.js +2 -0
  196. package/dist/client/assets/projectFilesQueryState-CgQDudyR.js +2 -0
  197. package/dist/client/assets/{projectScriptEditor-Bp7idsB3.js → projectScriptEditor-BvwaSAI1.js} +2 -2
  198. package/dist/client/assets/providerSkills-BzFbjrTC.js +2 -0
  199. package/dist/client/assets/{pullRequestDetail.logic-8vF2qB9V.js → pullRequestDetail.logic-D9w_E_Dv.js} +3 -3
  200. package/dist/client/assets/{pullRequestIcons-6_4tgVDN.js → pullRequestIcons-gBL3Yt9x.js} +2 -2
  201. package/dist/client/assets/{pullRequestReviewStore-C8_coQYO.js → pullRequestReviewStore-CDUFfLmu.js} +2 -2
  202. package/dist/client/assets/pullRequests-BZ7PzmTm.js +2 -0
  203. package/dist/client/assets/queries-CzRpIoRQ.js +2 -0
  204. package/dist/client/assets/query-B8d0w621.js +2 -0
  205. package/dist/client/assets/radio-group-XlBZKXvU.js +2 -0
  206. package/dist/client/assets/relay-BWVOLzv_.js +2 -0
  207. package/dist/client/assets/{renderScheduler-Cvu4oEGc.js → renderScheduler-B6SrQg1c.js} +2 -2
  208. package/dist/client/assets/{rightPanelStore-D-meSGn7.js → rightPanelStore-BuudmoUr.js} +2 -2
  209. package/dist/client/assets/runtime-DYDOkR3G.js +7 -0
  210. package/dist/client/assets/{runtimeModeConfig-MYD8WQl8.js → runtimeModeConfig-DyiI0NS9.js} +2 -2
  211. package/dist/client/assets/{scheduledTasksSettings.logic-DmlMHwKF.js → scheduledTasksSettings.logic-DK9Z9azP.js} +3 -3
  212. package/dist/client/assets/{scroll-area-D9QT2Odm.js → scroll-area-B1iVi_db.js} +2 -2
  213. package/dist/client/assets/{select-BtqP8nTL.js → select-Dn3MxyiK.js} +2 -2
  214. package/dist/client/assets/{selfImproveFindings-DZS7PCvJ.js → selfImproveFindings-D5ELz2sX.js} +2 -2
  215. package/dist/client/assets/server-DQkamj54.js +2 -0
  216. package/dist/client/assets/session-A0FOa5Fv.js +2 -0
  217. package/dist/client/assets/session-logic-21koHfxl.js +27 -0
  218. package/dist/client/assets/{settings-A-pqSt1Y.js → settings-RZUSGfch.js} +2 -2
  219. package/dist/client/assets/{settings.appearance-C_uChPSz.js → settings.appearance-C2NUZQFB.js} +2 -2
  220. package/dist/client/assets/settings.archived-BOhwFyi3.js +2 -0
  221. package/dist/client/assets/{settings.computer-use-Dg_7f0JL.js → settings.computer-use-BhT0XlhO.js} +2 -2
  222. package/dist/client/assets/settings.connections-CVIPNlOU.js +2 -0
  223. package/dist/client/assets/{settings.data-controls-SDdipjc2.js → settings.data-controls-GIrtB4_J.js} +2 -2
  224. package/dist/client/assets/{settings.decisions-CoyKjdc1.js → settings.decisions-BBnbf4E4.js} +2 -2
  225. package/dist/client/assets/{settings.designs-4eHPAt6y.js → settings.designs-BrpJ4wJk.js} +2 -2
  226. package/dist/client/assets/settings.diagnostics-H0YPr7JD.js +2 -0
  227. package/dist/client/assets/{settings.general-DAWqQIHm.js → settings.general-CuMxiE8w.js} +2 -2
  228. package/dist/client/assets/settings.integrations-bw-NYX6w.js +2 -0
  229. package/dist/client/assets/{settings.keybindings-B0oNRJrN.js → settings.keybindings-Mqx8YmX-.js} +2 -2
  230. package/dist/client/assets/{settings.open-source-licenses-BI8-fEG8.js → settings.open-source-licenses-DppmDqdO.js} +2 -2
  231. package/dist/client/assets/settings.plugins-PhsBK5Nz.js +5 -0
  232. package/dist/client/assets/settings.projects-DvjxFMyV.js +4 -0
  233. package/dist/client/assets/settings.providers-DZac28bF.js +3 -0
  234. package/dist/client/assets/{settings.scheduled-tasks-Bx6ZIK0R.js → settings.scheduled-tasks-_8iDYzJF.js} +2 -2
  235. package/dist/client/assets/{settings.secrets-Dt4ORQnt.js → settings.secrets-B5WZy_fN.js} +2 -2
  236. package/dist/client/assets/{settings.snap-shot-CytMd2pC.js → settings.snap-shot-BThcjeQt.js} +2 -2
  237. package/dist/client/assets/settings.source-control-Cj9K4HE8.js +2 -0
  238. package/dist/client/assets/{settings.storage-BfvQd358.js → settings.storage-D3QQPs1U.js} +2 -2
  239. package/dist/client/assets/settingsLayout-LNYGC372.js +3 -0
  240. package/dist/client/assets/{sidebar-DbrWNN9-.js → sidebar-CCcDCy-Q.js} +2 -2
  241. package/dist/client/assets/{sidebarProjectGrouping-CZnpDNTf.js → sidebarProjectGrouping-Bj_Qatcf.js} +2 -2
  242. package/dist/client/assets/{skeleton-DxuQc9Kk.js → skeleton-dlFZVmO8.js} +2 -2
  243. package/dist/client/assets/{sourceControl-BbrGhAuF.js → sourceControl-Tyc4OKDH.js} +2 -2
  244. package/dist/client/assets/sourceControlClients-ECBkjM0e.js +2 -0
  245. package/dist/client/assets/{spinner-DmRIQvmI.js → spinner-fU7Q2OR1.js} +2 -2
  246. package/dist/client/assets/src-B7vcPG0D.js +15 -0
  247. package/dist/client/assets/terminal-links-CPJORRle.js +2 -0
  248. package/dist/client/assets/terminalSessions-B00GvWIU.js +2 -0
  249. package/dist/client/assets/{textarea-C_3SxeEV.js → textarea-CEng2dlo.js} +2 -2
  250. package/dist/client/assets/{themePalette-DSR5tBE9.js → themePalette-CcasVi_y.js} +3 -3
  251. package/dist/client/assets/{threadCheckpoints-D0dMlqZE.js → threadCheckpoints-D7P5EX0m.js} +2 -2
  252. package/dist/client/assets/{toggle-Zti3zuzr.js → toggle-DN8nwGi8.js} +2 -2
  253. package/dist/client/assets/{toggle-group-D015gcqT.js → toggle-group-Dx-ruC5S.js} +2 -2
  254. package/dist/client/assets/{tooltip-CAzkzAoH.js → tooltip-Da633nbs.js} +2 -2
  255. package/dist/client/assets/uiStateStore-aIXF8Zlu.js +2 -0
  256. package/dist/client/assets/unfold-vertical-CldLe1hB.js +2 -0
  257. package/dist/client/assets/{usage-BJA7zQoS.js → usage-DXoXMoKb.js} +2 -2
  258. package/dist/client/assets/{usageAccess-D5FAb4jV.js → usageAccess-RRnEiTSy.js} +2 -2
  259. package/dist/client/assets/{usageFormat-Njxx7Q49.js → usageFormat-D95Lw1XX.js} +2 -2
  260. package/dist/client/assets/{usageShortcuts-DuJeedG7.js → usageShortcuts-3UXG3hMD.js} +2 -2
  261. package/dist/client/assets/{use-atom-command-DMW6SFOx.js → use-atom-command-BkSai4ZH.js} +2 -2
  262. package/dist/client/assets/{useAriaLabelledBy-E7KNTqMb.js → useAriaLabelledBy-rzE7PQnj.js} +2 -2
  263. package/dist/client/assets/useHandleNewThread-CT3UAzyB.js +2 -0
  264. package/dist/client/assets/{useLocation-hVHAnHTx.js → useLocation-D7ZCVKu2.js} +2 -2
  265. package/dist/client/assets/{useNavigate-B7EiSugn.js → useNavigate-C6_wm78C.js} +2 -2
  266. package/dist/client/assets/{useNavigateBack-BC3GGm7e.js → useNavigateBack-iqJmvild.js} +2 -2
  267. package/dist/client/assets/{useP4ConnectAuthPrompt-D3qxx30I.js → useP4ConnectAuthPrompt-CKTZ-MxU.js} +2 -2
  268. package/dist/client/assets/{useParams-C5b2x5BH.js → useParams-DND-Jy5h.js} +2 -2
  269. package/dist/client/assets/{usePermissionStatus-Zf48W2tu.js → usePermissionStatus-DFJ-2rdQ.js} +2 -2
  270. package/dist/client/assets/{usePopupViewport-Dtwu2x5j.js → usePopupViewport-EARvZG9w.js} +2 -2
  271. package/dist/client/assets/{usePullRequestActions-BtPaWuCg.js → usePullRequestActions-DRrQpPhD.js} +3 -3
  272. package/dist/client/assets/{useRegisterFieldControl-BMmbsxkx.js → useRegisterFieldControl-Byb-EJOb.js} +2 -2
  273. package/dist/client/assets/{useScopedModelAvailability-BIveWOlk.js → useScopedModelAvailability-tXU_0tMY.js} +2 -2
  274. package/dist/client/assets/useSettings-BOuYsEM0.js +3 -0
  275. package/dist/client/assets/utils-DsOiwDNN.js +24 -0
  276. package/dist/client/assets/vcsRefInvalidation-CnjZD1r1.js +2 -0
  277. package/dist/client/assets/welcome-BgxI7gmD.js +2 -0
  278. package/dist/client/index.html +1 -1
  279. package/dist/{mcpResponsePayloads-BBvPAlwj.mjs → mcpResponsePayloads-tqyeJD3c.mjs} +10 -9
  280. package/dist/{ProjectCloneTracker-DAE46hjz.mjs → preview-C_h8Tda3.mjs} +894 -438
  281. package/dist/{renderer-iWfzRWCX.mjs → renderer-BeTlHpQk.mjs} +2 -2
  282. package/dist/{runtime-CllDK9QU.mjs → runtime-BUfUqrrw.mjs} +3 -3
  283. package/dist/{runtimeLayer-CblMBDQ6.mjs → runtimeLayer-5R-ZfBsl.mjs} +3152 -2949
  284. package/dist/{runtimeLayer-D1H3yRj8.mjs → runtimeLayer-DurN_FAN.mjs} +1 -1
  285. package/dist/{server-vm1eH-y1.mjs → server-DuD96ZSr.mjs} +347 -228
  286. package/dist/{sha2-9FUhed4s.mjs → sha2-oCwRxj9g.mjs} +13 -7
  287. package/package.json +1 -1
  288. package/dist/AcpMcpStdioBridge-RQnwhGrw.mjs +0 -3
  289. package/dist/client/assets/AlertDialogRoot-D2Lzxp77.js +0 -2
  290. package/dist/client/assets/ChatGptUsageButton-CM16mB7z.js +0 -2
  291. package/dist/client/assets/ChatMarkdown-LYkpVHJO.js +0 -49
  292. package/dist/client/assets/CheckboxIndicator-CLFg8-A1.js +0 -2
  293. package/dist/client/assets/CodexSetupSection.logic-CNAX4_fV.js +0 -2
  294. package/dist/client/assets/CollapsiblePanel-BlUD5mJC.js +0 -2
  295. package/dist/client/assets/ComboboxClear-DKHwuDAL.js +0 -2
  296. package/dist/client/assets/CompositeRoot-_C3uLH2F.js +0 -2
  297. package/dist/client/assets/DevicePanel-Dvozgov3.js +0 -2
  298. package/dist/client/assets/DeviceSetup-O_9LLGD9.js +0 -2
  299. package/dist/client/assets/DialogTitle-C9j5Tmuy.js +0 -2
  300. package/dist/client/assets/DiffPanel-CDixqNzb.js +0 -2
  301. package/dist/client/assets/FoldedSettingsSection-CrJX4FnL.js +0 -2
  302. package/dist/client/assets/Input-BWhtnCC0.js +0 -2
  303. package/dist/client/assets/JZOYTAAL-BCdmxsmo.js +0 -1
  304. package/dist/client/assets/ModelLiveLayer-CxX5pYmA.js +0 -3
  305. package/dist/client/assets/PanelLayoutControls-CC5OYRRR.js +0 -216
  306. package/dist/client/assets/PopoverHandle-BwqnKm9Y.js +0 -2
  307. package/dist/client/assets/PreviewPanel-BvRNyyKQ.js +0 -2
  308. package/dist/client/assets/ProjectDefaultsSettings-rvN_67Gu.js +0 -2
  309. package/dist/client/assets/ProviderModelPicker-Cq3CogU6.js +0 -2
  310. package/dist/client/assets/PullRequestCodeTab-C5kr72DG.js +0 -6
  311. package/dist/client/assets/RenderErrorBoundary-DgYrYlQR.js +0 -23
  312. package/dist/client/assets/ScheduledTasksSettings-CvbQDrJp.js +0 -6
  313. package/dist/client/assets/SelectScrollUpArrow-Dj2om6Qx.js +0 -2
  314. package/dist/client/assets/ThreadTerminalDrawer-DcYWT4k2.js +0 -5
  315. package/dist/client/assets/TooltipProvider-BzOo4iyi.js +0 -2
  316. package/dist/client/assets/_chat-DoDgVLYz.js +0 -47
  317. package/dist/client/assets/_chat.pull-requests-0Ce1mGUC.js +0 -2
  318. package/dist/client/assets/assets-lJdcWn_Q.js +0 -2
  319. package/dist/client/assets/connect-agent-DsQQcex2.js +0 -2
  320. package/dist/client/assets/diffPanelStore-B-hQEy6C.js +0 -2
  321. package/dist/client/assets/entities-CpJdh0W5.js +0 -2
  322. package/dist/client/assets/fold-vertical-BscQ96iN.js +0 -2
  323. package/dist/client/assets/index-BWKkBtFt.js +0 -3
  324. package/dist/client/assets/main-C8b9a0ht.js +0 -37
  325. package/dist/client/assets/main-CCH0X0zL.css +0 -2
  326. package/dist/client/assets/mediaReference-BIsAfUoY.js +0 -2
  327. package/dist/client/assets/number-field-D6t0GpAB.js +0 -2
  328. package/dist/client/assets/openFileInPreview-DFpXOfx7.js +0 -2
  329. package/dist/client/assets/previewMiniPlayerStore-oJw0qrRM.js +0 -2
  330. package/dist/client/assets/primary-B0bbGdiR.js +0 -2
  331. package/dist/client/assets/primaryCloudLinkState-B6CxZwAR.js +0 -2
  332. package/dist/client/assets/projectFilesQueryState-DpLF9eJd.js +0 -2
  333. package/dist/client/assets/providerSkills-yqPKKW6i.js +0 -2
  334. package/dist/client/assets/pullRequests-u-PJpGXV.js +0 -2
  335. package/dist/client/assets/queries-DDAXRF4r.js +0 -2
  336. package/dist/client/assets/query-DpmTmXUV.js +0 -2
  337. package/dist/client/assets/radio-group-DSfZzUu8.js +0 -2
  338. package/dist/client/assets/relay-CnLeC-mg.js +0 -2
  339. package/dist/client/assets/runtime-DUPVFypn.js +0 -7
  340. package/dist/client/assets/server-BYnv0CK4.js +0 -2
  341. package/dist/client/assets/session-BryEqNW-.js +0 -2
  342. package/dist/client/assets/session-logic-DZfPxiBF.js +0 -26
  343. package/dist/client/assets/settings.archived-BtKfrhpi.js +0 -2
  344. package/dist/client/assets/settings.connections-CHawbHDz.js +0 -2
  345. package/dist/client/assets/settings.diagnostics-BFlcsuN0.js +0 -2
  346. package/dist/client/assets/settings.integrations-CpUf4-MX.js +0 -2
  347. package/dist/client/assets/settings.plugins-B6My9wD7.js +0 -5
  348. package/dist/client/assets/settings.projects-hrhEEIli.js +0 -4
  349. package/dist/client/assets/settings.providers-BKeGnq6G.js +0 -3
  350. package/dist/client/assets/settings.source-control-B6eUVvNg.js +0 -2
  351. package/dist/client/assets/settingsLayout-BijX6mlS.js +0 -3
  352. package/dist/client/assets/sourceControlClients-CG8qRQgm.js +0 -2
  353. package/dist/client/assets/src-BZzGU-vc.js +0 -15
  354. package/dist/client/assets/terminal-links-FD1wyGOp.js +0 -2
  355. package/dist/client/assets/terminalSessions-D1m7FXoa.js +0 -2
  356. package/dist/client/assets/uiStateStore-B0Z02qoV.js +0 -2
  357. package/dist/client/assets/unfold-vertical-DeuiNAAp.js +0 -2
  358. package/dist/client/assets/useHandleNewThread-Cmiu3y4G.js +0 -2
  359. package/dist/client/assets/useSettings-C6RmJr-q.js +0 -3
  360. package/dist/client/assets/utils-Cs97wR6T.js +0 -24
  361. package/dist/client/assets/vcsRefInvalidation-CAa5en8i.js +0 -2
  362. package/dist/client/assets/welcome-BRX7e-eN.js +0 -2
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{D as i,Eu as a,Jo as o,Js as s,Rd as c,Su as l,Wu as u,Zd as d,b as f,bf as p,es as m,mr as h,qs as g,tl as _,ul as v,vf as y,ws as b,wu as x}from"./utils-Cs97wR6T.js";import{sh as S}from"./src-BZzGU-vc.js";import{C,k as w}from"./entities-CpJdh0W5.js";import{a as T,c as E,o as D,s as O,t as k}from"./select-BtqP8nTL.js";import{t as A}from"./useNavigate-B7EiSugn.js";import{s as j}from"./relay-CnLeC-mg.js";import{n as M}from"./query-DpmTmXUV.js";import{u as N}from"./rightPanelStore-D-meSGn7.js";import{t as P}from"./ClippedText-aNLi0IDp.js";import{t as F}from"./env-BfPir1X4.js";import{t as I}from"./textarea-C_3SxeEV.js";import{t as ee}from"./toggle-Zti3zuzr.js";import{o as L}from"./sidebar-DbrWNN9-.js";import{a as R,c as z,n as B,o as V}from"./design-BL2REeQ-.js";import{D as H,n as U}from"./useHandleNewThread-Cmiu3y4G.js";import{mi as W}from"./main-C8b9a0ht.js";import{t as G}from"./pendingSendStore-ettG1x40.js";import{t as K}from"./WorkspacePageHeader-Ca7-ugiS.js";var q=n(),J=e(t(),1),Y=e(r(),1),X=[{label:`Landing page`,icon:c,ask:`a landing page`},{label:`Mobile app`,icon:y,ask:`a mobile app screen`},{label:`Web app`,icon:_,ask:`a web app screen`},{label:`Slides`,icon:d,ask:`a slide deck`},{label:`Dashboard`,icon:a,ask:`a dashboard`},{label:`Something else`,icon:p,ask:``}],Z=12;function Q(e,t){return[e?`Design ${e}.`:null,t.trim(),`Create it as a P4 Design document: read design_guide, then design_apply, validate, and render it for review.`].filter(Boolean).join(` `)}function te(e){let t=(0,q.c)(2),n;return t[0]===e?n=t[1]:(n=m(t=>e.map(e=>{let n=t(B({environmentId:e.environmentId,projectId:e.id})),r=S(b(n));return{project:e,entries:(r?.entries??[]).filter(ne),loading:n.waiting&&!r}})),t[0]=e,t[1]=n),o(n)}function ne(e){return!e.secondary}function re(){let e=(0,q.c)(4),t=A(),n=U(),r=w(),i;return e[0]!==n||e[1]!==t||e[2]!==r?(i=async(e,i)=>{let a=i===null?void 0:r.filter(t=>t.environmentId===e.environmentId&&t.projectId===e.id&&t.archivedAt===null&&t.deletedAt===null&&!t.worktreePath&&t.designs.some(e=>e.path===i)).toSorted(ie)[0],o=e=>{let t=N.getState();i===null?t.open(e,`design`):t.openFile(e,i),t.setMaximized(e,!0)};if(a){let e=s(a.environmentId,a.id);o(e),await t({to:`/$environmentId/$threadId`,params:j(e)});return}let c=await n(g(e.environmentId,e.id),{envMode:`local`,worktreePath:null});c&&o(s(e.environmentId,c.threadId))},e[0]=n,e[1]=t,e[2]=r,e[3]=i):i=e[3],i}function ie(e,t){return t.updatedAt.localeCompare(e.updatedAt)}function ae({projects:e}){let t=U(),[n,r]=(0,J.useState)(null),[a,o]=(0,J.useState)(``),[c,u]=(0,J.useState)(null),[d,p]=(0,J.useState)(!1),m=e=>`${e.environmentId}:${e.id}`,_=e.find(e=>m(e)===c)??e[0]??null,y=X.find(e=>e.label===n)?.ask??``,b=_!==null&&a.trim().length>0&&!d,x=async()=>{if(b&&_!==null){p(!0);try{let e=await t(g(_.environmentId,_.id),{envMode:`local`,worktreePath:null});if(!e)return;i.getState().setPrompt(e.draftId,Q(y,a));let n=s(_.environmentId,e.threadId);N.getState().open(n,`design`),N.getState().setMaximized(n,!0),G.getState().request(f(e.draftId))}finally{p(!1)}}};return(0,Y.jsxs)(`section`,{"aria-label":`Start a design`,className:`flex flex-col items-center gap-4`,children:[(0,Y.jsx)(`div`,{role:`group`,"aria-label":`What are you designing?`,className:`flex flex-wrap justify-center gap-2`,children:X.map(e=>(0,Y.jsxs)(ee,{variant:`outline`,pressed:n===e.label,onPressedChange:t=>r(t?e.label:null),children:[(0,Y.jsx)(e.icon,{"aria-hidden":!0}),e.label]},e.label))}),(0,Y.jsxs)(`form`,{className:`w-full max-w-3xl rounded-2xl border border-border bg-card p-3 shadow-sm focus-within:border-ring`,onSubmit:e=>{e.preventDefault(),x()},children:[(0,Y.jsx)(I,{unstyled:!0,"aria-label":`Describe a design`,placeholder:`Design anything…`,value:a,onChange:e=>o(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),x())},className:`w-full`}),(0,Y.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[e.length?(0,Y.jsxs)(k,{value:_?m(_):null,onValueChange:e=>e&&u(e),children:[(0,Y.jsxs)(O,{"aria-label":`Save in`,size:`sm`,className:`w-auto max-w-56`,children:[(0,Y.jsx)(l,{"aria-hidden":!0}),(0,Y.jsx)(E,{children:()=>(0,Y.jsx)(`span`,{className:`truncate`,children:_?.title??`Choose project`})})]}),(0,Y.jsx)(D,{children:e.map(e=>(0,Y.jsx)(T,{value:m(e),children:e.title},m(e)))})]}):null,(0,Y.jsx)(`span`,{className:`flex-1`}),(0,Y.jsx)(h,{type:`submit`,size:`icon-sm`,"aria-label":`Start design`,disabled:!b,children:(0,Y.jsx)(v,{"aria-hidden":!0})})]})]}),e.length===0?(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add a project to start designing.`}):null]})}function oe(e){let t=(0,q.c)(23),{recent:n,now:r,onOpen:i}=e,a;t[0]!==n.modifiedAt||t[1]!==n.path||t[2]!==n.project.environmentId||t[3]!==n.project.id?(a=R({environmentId:n.project.environmentId,projectId:n.project.id},n.path,n.modifiedAt),t[0]=n.modifiedAt,t[1]=n.path,t[2]=n.project.environmentId,t[3]=n.project.id,t[4]=a):a=t[4];let o=M(a),s=o.error?null:o.data?.dataUrl??null,c;t[5]!==r||t[6]!==n.modifiedAt?(c=V(n.modifiedAt,r),t[5]=r,t[6]=n.modifiedAt,t[7]=c):c=t[7];let l=c,d;t[8]===s?d=t[9]:(d=(0,Y.jsx)(`span`,{className:`flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted`,children:s?(0,Y.jsx)(`img`,{src:s,alt:``,loading:`lazy`,decoding:`async`,className:`size-full object-contain`}):(0,Y.jsx)(u,{"aria-hidden":!0,className:`size-6 text-muted-foreground`})}),t[8]=s,t[9]=d);let f;t[10]===n.path?f=t[11]:(f=z(n.path),t[10]=n.path,t[11]=f);let p;t[12]===f?p=t[13]:(p=(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium`,children:(0,Y.jsx)(P,{children:f})}),t[12]=f,t[13]=p);let m=l?`${n.project.title} · edited ${l}`:n.project.title,h;t[14]===m?h=t[15]:(h=(0,Y.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:(0,Y.jsx)(P,{children:m})}),t[14]=m,t[15]=h);let g;t[16]!==p||t[17]!==h?(g=(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5 border-t border-border px-3 py-2`,children:[p,h]}),t[16]=p,t[17]=h,t[18]=g):g=t[18];let _;return t[19]!==i||t[20]!==d||t[21]!==g?(_=(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{type:`button`,onClick:i,className:`group flex w-full cursor-pointer flex-col overflow-hidden rounded-xl border border-border bg-card text-left transition-colors hover:border-ring focus-visible:outline-2 focus-visible:outline-ring`,children:[d,g]})}),t[19]=i,t[20]=d,t[21]=g,t[22]=_):_=t[22],_}function $(){let e=(0,q.c)(44),t=C(),n=w(),r;e[0]!==t||e[1]!==n?(r=H(t,n,`updated_at`),e[0]=t,e[1]=n,e[2]=r):r=e[2];let i=r,a=te(i),o=re(),s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=Date.now(),e[3]=s):s=e[3];let c=s,u,d,f,p,m,g,_,v,y;if(e[4]!==a||e[5]!==o||e[6]!==i){let t=a.flatMap(ue).toSorted(le).slice(0,Z),n;e[16]===a?n=e[17]:(n=new Map(a.map(ce)),e[16]=a,e[17]=n),d=n,u=L,y=`h-dvh min-h-0 overflow-hidden overscroll-y-none`,_=`flex min-h-0 min-w-0 flex-1 flex-col bg-background`,e[18]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Y.jsx)(K,{electron:F,className:`border-b border-border`,children:(0,Y.jsx)(`span`,{className:`text-sm font-medium`,children:`P4 Design`})}),e[18]=v):v=e[18],g=`scrollbar-gutter-both min-h-0 flex-1 overflow-y-auto`,f=`mx-auto flex w-full max-w-5xl flex-col gap-12 px-6 py-12`,e[19]===i?p=e[20]:(p=(0,Y.jsx)(ae,{projects:i}),e[19]=i,e[20]=p),m=t.length?(0,Y.jsxs)(`section`,{"aria-labelledby":`design-recents`,className:`flex flex-col gap-3`,children:[(0,Y.jsx)(`h2`,{id:`design-recents`,className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Recents`}),(0,Y.jsx)(`ul`,{className:`grid grid-cols-[repeat(auto-fill,minmax(13rem,1fr))] gap-4`,children:t.map(e=>(0,Y.jsx)(oe,{recent:e,now:c,onOpen:()=>void o(e.project,e.path)},`${e.project.environmentId}:${e.project.id}:${e.path}`))})]}):null,e[4]=a,e[5]=o,e[6]=i,e[7]=u,e[8]=d,e[9]=f,e[10]=p,e[11]=m,e[12]=g,e[13]=_,e[14]=v,e[15]=y}else u=e[7],d=e[8],f=e[9],p=e[10],m=e[11],g=e[12],_=e[13],v=e[14],y=e[15];let b,S;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Y.jsx)(`h2`,{id:`design-projects`,className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Projects`}),b=(0,Y.jsx)(`span`,{className:`flex-1`}),e[21]=b,e[22]=S):(b=e[21],S=e[22]);let T;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[S,b,(0,Y.jsxs)(h,{size:`sm`,variant:`outline`,onClick:se,children:[(0,Y.jsx)(x,{"aria-hidden":!0}),`Add project`]})]}),e[23]=T):T=e[23];let E;e[24]!==d||e[25]!==o||e[26]!==i?(E=(0,Y.jsxs)(`section`,{"aria-labelledby":`design-projects`,className:`flex flex-col gap-3`,children:[T,i.length?(0,Y.jsx)(`ul`,{className:`overflow-hidden rounded-xl border border-border bg-card`,children:i.map(e=>{let t=d.get(`${e.environmentId}:${e.id}`)??0;return(0,Y.jsx)(`li`,{className:`border-t border-border first:border-t-0`,children:(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>void o(e,null),className:`flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,Y.jsx)(l,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted-foreground`}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.title}),(0,Y.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.workspaceRoot})]}),(0,Y.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[t,` `,t===1?`design`:`designs`]})]})},`${e.environmentId}:${e.id}`)})}):(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add a project, usually a repo, so agents can design with its code.`})]}),e[24]=d,e[25]=o,e[26]=i,e[27]=E):E=e[27];let D;e[28]!==E||e[29]!==f||e[30]!==p||e[31]!==m?(D=(0,Y.jsxs)(`div`,{className:f,children:[p,m,E]}),e[28]=E,e[29]=f,e[30]=p,e[31]=m,e[32]=D):D=e[32];let O;e[33]!==D||e[34]!==g?(O=(0,Y.jsx)(`main`,{className:g,children:D}),e[33]=D,e[34]=g,e[35]=O):O=e[35];let k;e[36]!==O||e[37]!==_||e[38]!==v?(k=(0,Y.jsxs)(`div`,{className:_,children:[v,O]}),e[36]=O,e[37]=_,e[38]=v,e[39]=k):k=e[39];let A;return e[40]!==u||e[41]!==k||e[42]!==y?(A=(0,Y.jsx)(u,{className:y,children:k}),e[40]=u,e[41]=k,e[42]=y,e[43]=A):A=e[43],A}function se(){return W({open:`add-project`})}function ce(e){let{project:t,entries:n}=e;return[`${t.environmentId}:${t.id}`,n.length]}function le(e,t){return t.modifiedAt.localeCompare(e.modifiedAt)}function ue(e){let{project:t,entries:n}=e;return n.flatMap(e=>e.modifiedAt?[{project:t,path:e.path,modifiedAt:e.modifiedAt,pageCount:e.pageCount??null}]:[])}var de=$;export{de as component};
2
- //# sourceMappingURL=_chat.design-C593M39o.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Au as i,D as a,Ds as o,Eu as s,Hd as c,Ju as l,Ou as u,Sf as d,Xs as f,Zo as p,Zs as m,b as h,il as g,mr as _,pl as v,rs as y,tf as b,wf as x}from"./utils-DsOiwDNN.js";import{lh as S}from"./src-B7vcPG0D.js";import{C,k as w}from"./entities-CRXY8xy3.js";import{a as T,c as E,o as D,s as O,t as k}from"./select-Dn3MxyiK.js";import{t as A}from"./useNavigate-C6_wm78C.js";import{s as j}from"./relay-BWVOLzv_.js";import{n as M}from"./query-B8d0w621.js";import{u as N}from"./rightPanelStore-BuudmoUr.js";import{t as P}from"./ClippedText-Cny-j-4e.js";import{t as F}from"./env-BfPir1X4.js";import{t as I}from"./textarea-CEng2dlo.js";import{t as ee}from"./toggle-DN8nwGi8.js";import{o as L}from"./sidebar-CCcDCy-Q.js";import{a as R,c as z,n as B,o as V}from"./design-pZfTAgOJ.js";import{k as H,n as U}from"./useHandleNewThread-CT3UAzyB.js";import{mi as W}from"./main-CNyrs4J_.js";import{t as G}from"./pendingSendStore-Dxq1oBH6.js";import{t as K}from"./WorkspacePageHeader-C9Tpr_np.js";var q=n(),J=e(t(),1),Y=e(r(),1),X=[{label:`Landing page`,icon:c,ask:`a landing page`},{label:`Mobile app`,icon:d,ask:`a mobile app screen`},{label:`Web app`,icon:g,ask:`a web app screen`},{label:`Slides`,icon:b,ask:`a slide deck`},{label:`Dashboard`,icon:i,ask:`a dashboard`},{label:`Something else`,icon:x,ask:``}],Z=12;function Q(e,t){return[e?`Design ${e}.`:null,t.trim(),`Create it as a P4 Design document: read design_guide, then design_apply, validate, and render it for review.`].filter(Boolean).join(` `)}function te(e){let t=(0,q.c)(2),n;return t[0]===e?n=t[1]:(n=y(t=>e.map(e=>{let n=t(B({environmentId:e.environmentId,projectId:e.id})),r=S(o(n));return{project:e,entries:(r?.entries??[]).filter(ne),loading:n.waiting&&!r}})),t[0]=e,t[1]=n),p(n)}function ne(e){return!e.secondary}function re(){let e=(0,q.c)(4),t=A(),n=U(),r=w(),i;return e[0]!==n||e[1]!==t||e[2]!==r?(i=async(e,i)=>{let a=i===null?void 0:r.filter(t=>t.environmentId===e.environmentId&&t.projectId===e.id&&t.archivedAt===null&&t.deletedAt===null&&!t.worktreePath&&t.designs.some(e=>e.path===i)).toSorted(ie)[0],o=e=>{let t=N.getState();i===null?t.open(e,`design`):t.openFile(e,i),t.setMaximized(e,!0)};if(a){let e=m(a.environmentId,a.id);o(e),await t({to:`/$environmentId/$threadId`,params:j(e)});return}let s=await n(f(e.environmentId,e.id),{envMode:`local`,worktreePath:null});s&&o(m(e.environmentId,s.threadId))},e[0]=n,e[1]=t,e[2]=r,e[3]=i):i=e[3],i}function ie(e,t){return t.updatedAt.localeCompare(e.updatedAt)}function ae({projects:e}){let t=U(),[n,r]=(0,J.useState)(null),[i,o]=(0,J.useState)(``),[c,l]=(0,J.useState)(null),[u,d]=(0,J.useState)(!1),p=e=>`${e.environmentId}:${e.id}`,g=e.find(e=>p(e)===c)??e[0]??null,y=X.find(e=>e.label===n)?.ask??``,b=g!==null&&i.trim().length>0&&!u,x=async()=>{if(b&&g!==null){d(!0);try{let e=await t(f(g.environmentId,g.id),{envMode:`local`,worktreePath:null});if(!e)return;a.getState().setPrompt(e.draftId,Q(y,i));let n=m(g.environmentId,e.threadId);N.getState().open(n,`design`),N.getState().setMaximized(n,!0),G.getState().request(h(e.draftId))}finally{d(!1)}}};return(0,Y.jsxs)(`section`,{"aria-label":`Start a design`,className:`flex flex-col items-center gap-4`,children:[(0,Y.jsx)(`div`,{role:`group`,"aria-label":`What are you designing?`,className:`flex flex-wrap justify-center gap-2`,children:X.map(e=>(0,Y.jsxs)(ee,{variant:`outline`,pressed:n===e.label,onPressedChange:t=>r(t?e.label:null),children:[(0,Y.jsx)(e.icon,{"aria-hidden":!0}),e.label]},e.label))}),(0,Y.jsxs)(`form`,{className:`w-full max-w-3xl rounded-2xl border border-border bg-card p-3 shadow-sm focus-within:border-ring`,onSubmit:e=>{e.preventDefault(),x()},children:[(0,Y.jsx)(I,{unstyled:!0,"aria-label":`Describe a design`,placeholder:`Design anything…`,value:i,onChange:e=>o(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),x())},className:`w-full`}),(0,Y.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[e.length?(0,Y.jsxs)(k,{value:g?p(g):null,onValueChange:e=>e&&l(e),children:[(0,Y.jsxs)(O,{"aria-label":`Save in`,size:`sm`,className:`w-auto max-w-56`,children:[(0,Y.jsx)(s,{"aria-hidden":!0}),(0,Y.jsx)(E,{children:()=>(0,Y.jsx)(`span`,{className:`truncate`,children:g?.title??`Choose project`})})]}),(0,Y.jsx)(D,{children:e.map(e=>(0,Y.jsx)(T,{value:p(e),children:e.title},p(e)))})]}):null,(0,Y.jsx)(`span`,{className:`flex-1`}),(0,Y.jsx)(_,{type:`submit`,size:`icon-sm`,"aria-label":`Start design`,disabled:!b,children:(0,Y.jsx)(v,{"aria-hidden":!0})})]})]}),e.length===0?(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add a project to start designing.`}):null]})}function oe(e){let t=(0,q.c)(23),{recent:n,now:r,onOpen:i}=e,a;t[0]!==n.modifiedAt||t[1]!==n.path||t[2]!==n.project.environmentId||t[3]!==n.project.id?(a=R({environmentId:n.project.environmentId,projectId:n.project.id},n.path,n.modifiedAt),t[0]=n.modifiedAt,t[1]=n.path,t[2]=n.project.environmentId,t[3]=n.project.id,t[4]=a):a=t[4];let o=M(a),s=o.error?null:o.data?.dataUrl??null,c;t[5]!==r||t[6]!==n.modifiedAt?(c=V(n.modifiedAt,r),t[5]=r,t[6]=n.modifiedAt,t[7]=c):c=t[7];let u=c,d;t[8]===s?d=t[9]:(d=(0,Y.jsx)(`span`,{className:`flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted`,children:s?(0,Y.jsx)(`img`,{src:s,alt:``,loading:`lazy`,decoding:`async`,className:`size-full object-contain`}):(0,Y.jsx)(l,{"aria-hidden":!0,className:`size-6 text-muted-foreground`})}),t[8]=s,t[9]=d);let f;t[10]===n.path?f=t[11]:(f=z(n.path),t[10]=n.path,t[11]=f);let p;t[12]===f?p=t[13]:(p=(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium`,children:(0,Y.jsx)(P,{children:f})}),t[12]=f,t[13]=p);let m=u?`${n.project.title} · edited ${u}`:n.project.title,h;t[14]===m?h=t[15]:(h=(0,Y.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:(0,Y.jsx)(P,{children:m})}),t[14]=m,t[15]=h);let g;t[16]!==p||t[17]!==h?(g=(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5 border-t border-border px-3 py-2`,children:[p,h]}),t[16]=p,t[17]=h,t[18]=g):g=t[18];let _;return t[19]!==i||t[20]!==d||t[21]!==g?(_=(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{type:`button`,onClick:i,className:`group flex w-full cursor-pointer flex-col overflow-hidden rounded-xl border border-border bg-card text-left transition-colors hover:border-ring focus-visible:outline-2 focus-visible:outline-ring`,children:[d,g]})}),t[19]=i,t[20]=d,t[21]=g,t[22]=_):_=t[22],_}function $(){let e=(0,q.c)(44),t=C(),n=w(),r;e[0]!==t||e[1]!==n?(r=H(t,n,`updated_at`),e[0]=t,e[1]=n,e[2]=r):r=e[2];let i=r,a=te(i),o=re(),c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=Date.now(),e[3]=c):c=e[3];let l=c,d,f,p,m,h,g,v,y,b;if(e[4]!==a||e[5]!==o||e[6]!==i){let t=a.flatMap(ue).toSorted(le).slice(0,Z),n;e[16]===a?n=e[17]:(n=new Map(a.map(ce)),e[16]=a,e[17]=n),f=n,d=L,b=`h-dvh min-h-0 overflow-hidden overscroll-y-none`,v=`flex min-h-0 min-w-0 flex-1 flex-col bg-background`,e[18]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Y.jsx)(K,{electron:F,className:`border-b border-border`,children:(0,Y.jsx)(`span`,{className:`text-sm font-medium`,children:`P4 Design`})}),e[18]=y):y=e[18],g=`scrollbar-gutter-both min-h-0 flex-1 overflow-y-auto`,p=`mx-auto flex w-full max-w-5xl flex-col gap-12 px-6 py-12`,e[19]===i?m=e[20]:(m=(0,Y.jsx)(ae,{projects:i}),e[19]=i,e[20]=m),h=t.length?(0,Y.jsxs)(`section`,{"aria-labelledby":`design-recents`,className:`flex flex-col gap-3`,children:[(0,Y.jsx)(`h2`,{id:`design-recents`,className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Recents`}),(0,Y.jsx)(`ul`,{className:`grid grid-cols-[repeat(auto-fill,minmax(13rem,1fr))] gap-4`,children:t.map(e=>(0,Y.jsx)(oe,{recent:e,now:l,onOpen:()=>void o(e.project,e.path)},`${e.project.environmentId}:${e.project.id}:${e.path}`))})]}):null,e[4]=a,e[5]=o,e[6]=i,e[7]=d,e[8]=f,e[9]=p,e[10]=m,e[11]=h,e[12]=g,e[13]=v,e[14]=y,e[15]=b}else d=e[7],f=e[8],p=e[9],m=e[10],h=e[11],g=e[12],v=e[13],y=e[14],b=e[15];let x,S;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Y.jsx)(`h2`,{id:`design-projects`,className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Projects`}),x=(0,Y.jsx)(`span`,{className:`flex-1`}),e[21]=x,e[22]=S):(x=e[21],S=e[22]);let T;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[S,x,(0,Y.jsxs)(_,{size:`sm`,variant:`outline`,onClick:se,children:[(0,Y.jsx)(u,{"aria-hidden":!0}),`Add project`]})]}),e[23]=T):T=e[23];let E;e[24]!==f||e[25]!==o||e[26]!==i?(E=(0,Y.jsxs)(`section`,{"aria-labelledby":`design-projects`,className:`flex flex-col gap-3`,children:[T,i.length?(0,Y.jsx)(`ul`,{className:`overflow-hidden rounded-xl border border-border bg-card`,children:i.map(e=>{let t=f.get(`${e.environmentId}:${e.id}`)??0;return(0,Y.jsx)(`li`,{className:`border-t border-border first:border-t-0`,children:(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>void o(e,null),className:`flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,Y.jsx)(s,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted-foreground`}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.title}),(0,Y.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.workspaceRoot})]}),(0,Y.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[t,` `,t===1?`design`:`designs`]})]})},`${e.environmentId}:${e.id}`)})}):(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add a project, usually a repo, so agents can design with its code.`})]}),e[24]=f,e[25]=o,e[26]=i,e[27]=E):E=e[27];let D;e[28]!==E||e[29]!==p||e[30]!==m||e[31]!==h?(D=(0,Y.jsxs)(`div`,{className:p,children:[m,h,E]}),e[28]=E,e[29]=p,e[30]=m,e[31]=h,e[32]=D):D=e[32];let O;e[33]!==D||e[34]!==g?(O=(0,Y.jsx)(`main`,{className:g,children:D}),e[33]=D,e[34]=g,e[35]=O):O=e[35];let k;e[36]!==O||e[37]!==v||e[38]!==y?(k=(0,Y.jsxs)(`div`,{className:v,children:[y,O]}),e[36]=O,e[37]=v,e[38]=y,e[39]=k):k=e[39];let A;return e[40]!==d||e[41]!==k||e[42]!==b?(A=(0,Y.jsx)(d,{className:b,children:k}),e[40]=d,e[41]=k,e[42]=b,e[43]=A):A=e[43],A}function se(){return W({open:`add-project`})}function ce(e){let{project:t,entries:n}=e;return[`${t.environmentId}:${t.id}`,n.length]}function le(e,t){return t.modifiedAt.localeCompare(e.modifiedAt)}function ue(e){let{project:t,entries:n}=e;return n.flatMap(e=>e.modifiedAt?[{project:t,path:e.path,modifiedAt:e.modifiedAt,pageCount:e.pageCount??null}]:[])}var de=$;export{de as component};
2
+ //# sourceMappingURL=_chat.design-JY93KEj-.js.map
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$u as i,Yd as a,mr as o,qs as s}from"./utils-Cs97wR6T.js";import{N as c,W as l,at as u}from"./runtime-DUPVFypn.js";import{C as d,g as f,k as p,l as m}from"./entities-CpJdh0W5.js";import{t as h}from"./link-B57I0_wC.js";import{a as g}from"./useParams-C5b2x5BH.js";import{D as _}from"./useSettings-C6RmJr-q.js";import{t as v}from"./env-BfPir1X4.js";import{o as y}from"./sidebar-DbrWNN9-.js";import{i as b,o as x,r as S,t as C}from"./empty-CeYEMFdG.js";import{D as w,n as T}from"./useHandleNewThread-Cmiu3y4G.js";import{Wo as E,a as D}from"./main-C8b9a0ht.js";import{t as O}from"./WorkspacePageHeader-Ca7-ugiS.js";import{t as k}from"./NoProjectsHero-B0ChXuQG.js";var A=n(),j=e(t()),M=e(r());function N(){let e=(0,A.c)(2),{authGateState:t}=D.useRouteContext(),{environments:n,isReady:r}=_();if(t.status===`hosted-static`){if(!r)return null;if(n.length===0){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,M.jsx)(z,{}),e[0]=t):t=e[0],t}}let i;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(P,{}),e[1]=i):i=e[1],i}function P(){let e=(0,A.c)(18),t=d(),n=p(),r=f(),i=T(),a=g(),o;e[0]===a.state.location.pathname?o=e[1]:(o=()=>a.state.location.pathname===`/`,e[0]=a.state.location.pathname,e[1]=o);let c=(0,j.useEffectEvent)(o),l=(0,j.useRef)(!1),u;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(u={failed:!1,retryRequest:0},e[2]=u):u=e[2];let[h,_]=(0,j.useState)(u),v;e[3]!==r||e[4]!==t||e[5]!==n?(v=r?w(t,n,`updated_at`)[0]??null:null,e[3]=r,e[4]=t,e[5]=n,e[6]=v):v=e[6];let y=v,b;e[7]!==i||e[8]!==c||e[9]!==y?(b=()=>{if(y===null||l.current||!c())return;let e=s(y.environmentId,y.id);m(e)!==null&&(l.current=!0,i(e,{replace:!0}).then(e=>{e===null&&(l.current=!1,_(L))}).catch(()=>{l.current=!1,_(I)}))},e[7]=i,e[8]=c,e[9]=y,e[10]=b):b=e[10];let x;if(e[11]!==i||e[12]!==y||e[13]!==h.retryRequest?(x=[i,y,h.retryRequest],e[11]=i,e[12]=y,e[13]=h.retryRequest,e[14]=x):x=e[14],(0,j.useEffect)(b,x),!r)return null;if(y!==null){let t;return e[15]===h.failed?t=e[16]:(t=h.failed?(0,M.jsx)(R,{onRetry:()=>{_(F)}}):null,e[15]=h.failed,e[16]=t),t}let S;return e[17]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,M.jsx)(k,{}),e[17]=S):S=e[17],S}function F(e){return{failed:!1,retryRequest:e.retryRequest+1}}function I(e){return{...e,failed:!0}}function L(e){return{...e,retryRequest:e.retryRequest+1}}function R(e){let t=(0,A.c)(6),{onRetry:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=v?(0,M.jsx)(O,{electron:!0}):null,t[0]=r):r=t[0];let i,a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(x,{children:`Couldn’t start a new thread`}),a=(0,M.jsx)(S,{children:`The project is still available. Try opening the draft again.`}),t[1]=i,t[2]=a):(i=t[1],a=t[2]);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,M.jsx)(E,{size:`md`}),t[3]=s):s=t[3];let c;return t[4]===n?c=t[5]:(c=(0,M.jsxs)(y,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:[r,(0,M.jsx)(C,{className:`flex-1`,children:(0,M.jsxs)(b,{className:`max-w-md`,children:[i,a,(0,M.jsx)(`div`,{className:`mt-5 flex justify-center`,children:(0,M.jsxs)(o,{size:`sm`,onClick:n,children:[s,`Try again`]})})]})})]}),t[4]=n,t[5]=c),c}function z(){let e=(0,A.c)(7),t=l(),n=u()?`The local environment is turned off. Connect a remote environment, or turn the local environment back on in Connections.`:t?`Enable P4 Connect on that machine, then open Connections here to sign in with the same account. You can also add the machine using a pairing link.`:`Open Connections and add that machine using its pairing link. This app must be able to reach it.`,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,M.jsx)(O,{electron:v,className:`border-b border-border`,children:(0,M.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,M.jsx)(`span`,{className:`text-sm font-medium text-foreground md:text-muted-foreground/60`,children:c})})}),e[0]=r):r=e[0];let s,d,f,p;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,M.jsx)(`div`,{className:`mx-auto mb-5 flex size-11 items-center justify-center rounded-xl border border-border/70 bg-background/70 text-muted-foreground`,children:(0,M.jsx)(i,{className:`size-5`})}),d=(0,M.jsx)(x,{children:`Connect to a computer running P4 Code`}),f=(0,M.jsx)(S,{children:`This app connects to P4 Code running on your computer or a server. Start the P4 Code desktop app or command-line server on that machine and keep it running.`}),p=(0,M.jsx)(S,{children:n}),e[1]=s,e[2]=d,e[3]=f,e[4]=p):(s=e[1],d=e[2],f=e[3],p=e[4]);let m;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,M.jsx)(h,{to:`/settings/connections`}),e[5]=m):m=e[5];let g;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,M.jsx)(y,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,M.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background`,children:[r,(0,M.jsx)(C,{className:`flex-1`,children:(0,M.jsx)(`div`,{className:`w-full max-w-xl rounded-3xl border border-border/55 bg-card/20 px-8 py-12 shadow-sm/5`,children:(0,M.jsxs)(b,{className:`max-w-none`,children:[s,d,f,p,(0,M.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,M.jsxs)(o,{render:m,size:`sm`,children:[(0,M.jsx)(a,{className:`size-4`}),`Open Connections`]})})]})})})]})}),e[6]=g):g=e[6],g}export{N as component};
2
- //# sourceMappingURL=_chat.index-DZmhCx_Q.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$d as i,Xs as a,mr as o,rd as s}from"./utils-DsOiwDNN.js";import{N as c,W as l,at as u}from"./runtime-DYDOkR3G.js";import{C as d,g as f,k as p,l as m}from"./entities-CRXY8xy3.js";import{t as h}from"./link-BrJlIcQX.js";import{a as g}from"./useParams-DND-Jy5h.js";import{D as _}from"./useSettings-BOuYsEM0.js";import{t as v}from"./env-BfPir1X4.js";import{o as y}from"./sidebar-CCcDCy-Q.js";import{i as b,o as x,r as S,t as C}from"./empty-CJnssipy.js";import{k as w,n as T}from"./useHandleNewThread-CT3UAzyB.js";import{Ho as E,a as D}from"./main-CNyrs4J_.js";import{t as O}from"./WorkspacePageHeader-C9Tpr_np.js";import{t as k}from"./NoProjectsHero-DIDw2XWy.js";var A=n(),j=e(t()),M=e(r());function N(){let e=(0,A.c)(2),{authGateState:t}=D.useRouteContext(),{environments:n,isReady:r}=_();if(t.status===`hosted-static`){if(!r)return null;if(n.length===0){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,M.jsx)(z,{}),e[0]=t):t=e[0],t}}let i;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(P,{}),e[1]=i):i=e[1],i}function P(){let e=(0,A.c)(18),t=d(),n=p(),r=f(),i=T(),o=g(),s;e[0]===o.state.location.pathname?s=e[1]:(s=()=>o.state.location.pathname===`/`,e[0]=o.state.location.pathname,e[1]=s);let c=(0,j.useEffectEvent)(s),l=(0,j.useRef)(!1),u;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(u={failed:!1,retryRequest:0},e[2]=u):u=e[2];let[h,_]=(0,j.useState)(u),v;e[3]!==r||e[4]!==t||e[5]!==n?(v=r?w(t,n,`updated_at`)[0]??null:null,e[3]=r,e[4]=t,e[5]=n,e[6]=v):v=e[6];let y=v,b;e[7]!==i||e[8]!==c||e[9]!==y?(b=()=>{if(y===null||l.current||!c())return;let e=a(y.environmentId,y.id);m(e)!==null&&(l.current=!0,i(e,{replace:!0}).then(e=>{e===null&&(l.current=!1,_(L))}).catch(()=>{l.current=!1,_(I)}))},e[7]=i,e[8]=c,e[9]=y,e[10]=b):b=e[10];let x;if(e[11]!==i||e[12]!==y||e[13]!==h.retryRequest?(x=[i,y,h.retryRequest],e[11]=i,e[12]=y,e[13]=h.retryRequest,e[14]=x):x=e[14],(0,j.useEffect)(b,x),!r)return null;if(y!==null){let t;return e[15]===h.failed?t=e[16]:(t=h.failed?(0,M.jsx)(R,{onRetry:()=>{_(F)}}):null,e[15]=h.failed,e[16]=t),t}let S;return e[17]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,M.jsx)(k,{}),e[17]=S):S=e[17],S}function F(e){return{failed:!1,retryRequest:e.retryRequest+1}}function I(e){return{...e,failed:!0}}function L(e){return{...e,retryRequest:e.retryRequest+1}}function R(e){let t=(0,A.c)(6),{onRetry:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=v?(0,M.jsx)(O,{electron:!0}):null,t[0]=r):r=t[0];let i,a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(x,{children:`Couldn’t start a new thread`}),a=(0,M.jsx)(S,{children:`The project is still available. Try opening the draft again.`}),t[1]=i,t[2]=a):(i=t[1],a=t[2]);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,M.jsx)(E,{size:`md`}),t[3]=s):s=t[3];let c;return t[4]===n?c=t[5]:(c=(0,M.jsxs)(y,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:[r,(0,M.jsx)(C,{className:`flex-1`,children:(0,M.jsxs)(b,{className:`max-w-md`,children:[i,a,(0,M.jsx)(`div`,{className:`mt-5 flex justify-center`,children:(0,M.jsxs)(o,{size:`sm`,onClick:n,children:[s,`Try again`]})})]})})]}),t[4]=n,t[5]=c),c}function z(){let e=(0,A.c)(7),t=l(),n=u()?`The local environment is turned off. Connect a remote environment, or turn the local environment back on in Connections.`:t?`Enable P4 Connect on that machine, then open Connections here to sign in with the same account. You can also add the machine using a pairing link.`:`Open Connections and add that machine using its pairing link. This app must be able to reach it.`,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,M.jsx)(O,{electron:v,className:`border-b border-border`,children:(0,M.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,M.jsx)(`span`,{className:`text-sm font-medium text-foreground md:text-muted-foreground/60`,children:c})})}),e[0]=r):r=e[0];let a,d,f,p;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,M.jsx)(`div`,{className:`mx-auto mb-5 flex size-11 items-center justify-center rounded-xl border border-border/70 bg-background/70 text-muted-foreground`,children:(0,M.jsx)(s,{className:`size-5`})}),d=(0,M.jsx)(x,{children:`Connect to a computer running P4 Code`}),f=(0,M.jsx)(S,{children:`This app connects to P4 Code running on your computer or a server. Start the P4 Code desktop app or command-line server on that machine and keep it running.`}),p=(0,M.jsx)(S,{children:n}),e[1]=a,e[2]=d,e[3]=f,e[4]=p):(a=e[1],d=e[2],f=e[3],p=e[4]);let m;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,M.jsx)(h,{to:`/settings/connections`}),e[5]=m):m=e[5];let g;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,M.jsx)(y,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,M.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background`,children:[r,(0,M.jsx)(C,{className:`flex-1`,children:(0,M.jsx)(`div`,{className:`w-full max-w-xl rounded-3xl border border-border/55 bg-card/20 px-8 py-12 shadow-sm/5`,children:(0,M.jsxs)(b,{className:`max-w-none`,children:[a,d,f,p,(0,M.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,M.jsxs)(o,{render:m,size:`sm`,children:[(0,M.jsx)(i,{className:`size-4`}),`Open Connections`]})})]})})})]})}),e[6]=g):g=e[6],g}export{N as component};
2
+ //# sourceMappingURL=_chat.index-BLQil4HT.js.map
@@ -1,4 +1,4 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{D as i,Jo as a,Js as o,Us as s,mr as c,o as l,qs as u}from"./utils-Cs97wR6T.js";import{ea as d}from"./src-BZzGU-vc.js";import{Dr as f,Hn as p,Sr as m,Un as h,zn as g}from"./runtime-DUPVFypn.js";import{C as ee,K as te,N as _,k as v}from"./entities-CpJdh0W5.js";import{t as y}from"./useNavigate-B7EiSugn.js";import{t as b}from"./useLocation-hVHAnHTx.js";import{a as x}from"./relay-CnLeC-mg.js";import{D as S,k as ne}from"./useSettings-C6RmJr-q.js";import{t as re}from"./use-atom-command-DMW6SFOx.js";import{t as ie}from"./toastHelpers-DxXYm50b.js";import{t as C}from"./env-BfPir1X4.js";import{o as w}from"./sidebar-DbrWNN9-.js";import{i as T,o as E,r as D,t as O}from"./empty-CeYEMFdG.js";import{t as ae}from"./sourceControl-BbrGhAuF.js";import{D as oe,n as se}from"./useHandleNewThread-Cmiu3y4G.js";import{Qn as k,Un as ce,er as A,ir as le}from"./main-C8b9a0ht.js";import{t as j}from"./WorkspacePageHeader-Ca7-ugiS.js";import{i as M}from"./usePullRequestActions-BtPaWuCg.js";import{n as N,t as ue}from"./linkedPrompt-zM8XlD0_.js";var P=n(),F=[`github.com`,`git.cafe`,`staging.git.cafe`];function de(e,t){let n=`${t.owner}/${t.name}`.toLowerCase(),r=new Set(F.map(e=>`${e}/${n}`));return e.find(e=>e.repositoryIdentity!=null&&r.has(d(e.repositoryIdentity).toLowerCase()))}function fe(e,t){let n=g({host:`github.com`,repository:`${t.owner}/${t.name}`,number:t.number}),r;for(let t of e)r!==void 0&&t.updatedAt<=r.updatedAt||h(p(t)).some(e=>g(e)===n)&&(r=t);return r}var I={claude:`claudeagent`};function pe(e,t){let n=I[t.provider]??t.provider,r=e.filter(e=>e.driver.toLowerCase()===n&&e.enabled&&e.availability!==`unavailable`),i=r.find(e=>e.status===`ready`)??r.find(e=>e.status===`warning`);if(i===void 0)return null;let a=t.model===null?null:s(i.driver,t.model,i.models),o=a??(i.models.find(e=>e.isDefault)??i.models[0])?.slug;return o===void 0?null:{selection:{instanceId:i.instanceId,model:o},exact:t.model===null||a!==null}}var L=e(t(),1),R=e(r(),1),z=new Set;function B(e){let t=(0,P.c)(62),{link:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:_e},t[0]=r):r=t[0];let s=b(r),d=y(),p=a(te),h=ee(),g=v(),{environments:C}=S(),w=ne(),T=se(),{scratchEnvironmentId:E,openScratchProject:D}=ce(),O;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(O={reportFailure:!1},t[1]=O):O=t[1];let k=re(ae.startProjectClone,O),j;t[2]===s?j=t[3]:(j=()=>z.has(s)?{status:`opened`}:{status:`opening`},t[2]=s,t[3]=j);let[M,N]=(0,L.useState)(j),F=(0,L.useRef)(!1),I;t[4]!==h||t[5]!==g?(I=()=>oe(h.filter(ge),g,`updated_at`),t[4]=h,t[5]=g,t[6]=I):I=t[6];let B=I,H;t[7]!==w||t[8]!==g?(H=()=>{let e;for(let t of g)(e===void 0||t.updatedAt>e.updatedAt)&&(e=t);return e?.environmentId??w},t[7]=w,t[8]=g,t[9]=H):H=t[9];let U=H,W;t[10]!==C||t[11]!==T||t[12]!==n?(W=async(e,t)=>{let r=await T(u(e.environmentId,e.id),{replace:!0}).catch(he);if(r===null){N({status:`failed`,message:`P4 Code could not open a new thread.`});return}N({status:`opened`});let a=[];if(n.kind===`new`&&n.provider!==null){let t=pe(C.find(t=>t.environmentId===e.environmentId)?.serverConfig?.providers??[],{provider:n.provider,model:n.model});t!==null&&i.getState().setModelSelection(r.draftId,t.selection,{explicit:!0,replaceOptions:!0}),t!==null&&t.exact||a.push(t===null?`The link asked for ${n.provider}, which is not set up here, so your default model is used.`:`The link asked for ${n.model}, which ${n.provider} does not offer here, so its default model is used.`)}let o=[n.prompt?.text,t].filter(Boolean).join(`
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{D as i,Ks as a,Xs as o,Zo as s,Zs as c,mr as l,o as u}from"./utils-DsOiwDNN.js";import{ta as d}from"./src-B7vcPG0D.js";import{Dr as f,Hn as p,Sr as m,Un as h,zn as g}from"./runtime-DYDOkR3G.js";import{C as ee,K as te,N as _,k as v}from"./entities-CRXY8xy3.js";import{t as y}from"./useNavigate-C6_wm78C.js";import{t as b}from"./useLocation-D7ZCVKu2.js";import{a as x}from"./relay-BWVOLzv_.js";import{D as S,k as ne}from"./useSettings-BOuYsEM0.js";import{t as re}from"./use-atom-command-BkSai4ZH.js";import{t as ie}from"./toastHelpers-DxXYm50b.js";import{t as C}from"./env-BfPir1X4.js";import{o as w}from"./sidebar-CCcDCy-Q.js";import{i as T,o as E,r as D,t as O}from"./empty-CJnssipy.js";import{t as ae}from"./sourceControl-Tyc4OKDH.js";import{k as oe,n as se}from"./useHandleNewThread-CT3UAzyB.js";import{Qn as k,Un as ce,er as A,ir as le}from"./main-CNyrs4J_.js";import{t as j}from"./WorkspacePageHeader-C9Tpr_np.js";import{i as M}from"./usePullRequestActions-DRrQpPhD.js";import{n as N,t as ue}from"./linkedPrompt-CN6Qis59.js";var P=n(),F=[`github.com`,`git.cafe`,`staging.git.cafe`];function de(e,t){let n=`${t.owner}/${t.name}`.toLowerCase(),r=new Set(F.map(e=>`${e}/${n}`));return e.find(e=>e.repositoryIdentity!=null&&r.has(d(e.repositoryIdentity).toLowerCase()))}function fe(e,t){let n=g({host:`github.com`,repository:`${t.owner}/${t.name}`,number:t.number}),r;for(let t of e)r!==void 0&&t.updatedAt<=r.updatedAt||h(p(t)).some(e=>g(e)===n)&&(r=t);return r}var I={claude:`claudeagent`};function pe(e,t){let n=I[t.provider]??t.provider,r=e.filter(e=>e.driver.toLowerCase()===n&&e.enabled&&e.availability!==`unavailable`),i=r.find(e=>e.status===`ready`)??r.find(e=>e.status===`warning`);if(i===void 0)return null;let o=t.model===null?null:a(i.driver,t.model,i.models),s=o??(i.models.find(e=>e.isDefault)??i.models[0])?.slug;return s===void 0?null:{selection:{instanceId:i.instanceId,model:s},exact:t.model===null||o!==null}}var L=e(t(),1),R=e(r(),1),z=new Set;function B(e){let t=(0,P.c)(62),{link:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:_e},t[0]=r):r=t[0];let a=b(r),d=y(),p=s(te),h=ee(),g=v(),{environments:C}=S(),w=ne(),T=se(),{scratchEnvironmentId:E,openScratchProject:D}=ce(),O;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(O={reportFailure:!1},t[1]=O):O=t[1];let k=re(ae.startProjectClone,O),j;t[2]===a?j=t[3]:(j=()=>z.has(a)?{status:`opened`}:{status:`opening`},t[2]=a,t[3]=j);let[M,N]=(0,L.useState)(j),F=(0,L.useRef)(!1),I;t[4]!==h||t[5]!==g?(I=()=>oe(h.filter(ge),g,`updated_at`),t[4]=h,t[5]=g,t[6]=I):I=t[6];let B=I,H;t[7]!==w||t[8]!==g?(H=()=>{let e;for(let t of g)(e===void 0||t.updatedAt>e.updatedAt)&&(e=t);return e?.environmentId??w},t[7]=w,t[8]=g,t[9]=H):H=t[9];let U=H,W;t[10]!==C||t[11]!==T||t[12]!==n?(W=async(e,t)=>{let r=await T(o(e.environmentId,e.id),{replace:!0}).catch(he);if(r===null){N({status:`failed`,message:`P4 Code could not open a new thread.`});return}N({status:`opened`});let a=[];if(n.kind===`new`&&n.provider!==null){let t=pe(C.find(t=>t.environmentId===e.environmentId)?.serverConfig?.providers??[],{provider:n.provider,model:n.model});t!==null&&i.getState().setModelSelection(r.draftId,t.selection,{explicit:!0,replaceOptions:!0}),t!==null&&t.exact||a.push(t===null?`The link asked for ${n.provider}, which is not set up here, so your default model is used.`:`The link asked for ${n.model}, which ${n.provider} does not offer here, so its default model is used.`)}let s=[n.prompt?.text,t].filter(Boolean).join(`
2
2
 
3
- `);o.length!==0&&ue(r.draftId,{text:o,hiddenCharacters:n.prompt?.hiddenCharacters??0},a)},t[10]=C,t[11]=T,t[12]=n,t[13]=W):W=t[13];let G=W,K;t[14]!==U||t[15]!==n||t[16]!==G||t[17]!==D||t[18]!==E?(K=async()=>{N({status:`opening`});let e=E(U())??E(null),t=e===null?null:await D(e);t===null?N({status:`failed`,message:`None of your machines can start a thread without a project right now.`}):await G(t,n.kind===`pull-request`?A(n.pullRequest):void 0)},t[14]=U,t[15]=n,t[16]=G,t[17]=D,t[18]=E,t[19]=K):K=t[19];let q=K,J;t[20]!==C||t[21]!==U||t[22]!==n||t[23]!==G||t[24]!==k?(J=async e=>{let t=U(),r=C.find(e=>e.environmentId===t),i=r?.serverConfig?.newProjectsRoot??null;if(t===null||i===null||r?.serverConfig?.environment.capabilities.projectCloneTracking!==!0){N({status:`failed`,message:`This machine cannot clone from a link. Update P4 Code on it, or clone the repository from the command palette.`});return}N({status:`opening`});let a=l(),o=await k({environmentId:t,input:{projectId:a,title:e.name,createdAt:new Date().toISOString(),remoteUrl:`https://github.com/${e.owner}/${e.name}.git`,destinationPath:le(i,e.name)}});if(o._tag===`Failure`){if(!m(o)){let e=f(o);x.add(ie({type:`error`,title:`Clone failed`,description:e instanceof Error?e.message:`An error occurred.`}))}N({status:`missing-repository`,repository:e});return}let s=await _(u(t,a),5e3).catch(me);s===null?N({status:`failed`,message:`The clone started, but its project did not appear.`}):n.kind===`pull-request`?N({status:`failed`,title:`Cloning ${e.owner}/${e.name}`,message:`Open this link again when the clone finishes.`}):await G(s)},t[20]=C,t[21]=U,t[22]=n,t[23]=G,t[24]=k,t[25]=J):J=t[25];let Y=J,X;t[26]!==n||t[27]!==s||t[28]!==d||t[29]!==G||t[30]!==q||t[31]!==B||t[32]!==g?(X=()=>{if(F.current)return;if(F.current=!0,z.add(s),n.kind===`pull-request`){let e=fe(g,n.pullRequest);if(e!==void 0){N({status:`opened`});let t=o(e.environmentId,e.id);n.prompt!==null&&ue(t,n.prompt),d({to:`/$environmentId/$threadId`,params:{environmentId:e.environmentId,threadId:e.id},replace:!0});return}}let e=n.kind===`new`?n.repository:n.pullRequest;if(e===null){q();return}let t=de(B(),e);t===void 0?N({status:`missing-repository`,repository:e}):n.kind===`pull-request`?N({status:`pull-request-checkout`,project:t}):G(t)},t[26]=n,t[27]=s,t[28]=d,t[29]=G,t[30]=q,t[31]=B,t[32]=g,t[33]=X):X=t[33];let Z=(0,L.useEffectEvent)(X),Q;t[34]!==p||t[35]!==Z||t[36]!==M.status?(Q=()=>{p&&M.status===`opening`&&Z()},t[34]=p,t[35]=Z,t[36]=M.status,t[37]=Q):Q=t[37];let $;switch(t[38]!==p||t[39]!==M.status?($=[p,M.status],t[38]=p,t[39]=M.status,t[40]=$):$=t[40],(0,L.useEffect)(Q,$),M.status){case`opening`:{let e;return t[41]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,R.jsx)(V,{title:`Opening the link...`}),t[41]=e):e=t[41],e}case`opened`:{let e;return t[42]===s?e=t[43]:(e=(0,R.jsx)(V,{title:`This link is open`,children:(0,R.jsx)(c,{size:`sm`,variant:`outline`,onClick:()=>{z.delete(s),F.current=!1,N({status:`opening`})},children:`Open it again`})}),t[42]=s,t[43]=e),e}case`failed`:{let e=M.title??`Could not open the link`,n;return t[44]!==M.message||t[45]!==e?(n=(0,R.jsx)(V,{title:e,description:M.message}),t[44]=M.message,t[45]=e,t[46]=n):n=t[46],n}case`missing-repository`:{let e=`${M.repository.owner}/${M.repository.name}`,n=`You don't have ${e}`,r;t[47]!==Y||t[48]!==M.repository?(r=()=>void Y(M.repository),t[47]=Y,t[48]=M.repository,t[49]=r):r=t[49];let i;t[50]!==e||t[51]!==r?(i=(0,R.jsxs)(c,{size:`sm`,onClick:r,children:[`Clone `,e]}),t[50]=e,t[51]=r,t[52]=i):i=t[52];let a;t[53]===q?a=t[54]:(a=(0,R.jsx)(c,{size:`sm`,variant:`outline`,onClick:()=>void q(),children:`Use without project`}),t[53]=q,t[54]=a);let o;return t[55]!==n||t[56]!==i||t[57]!==a?(o=(0,R.jsxs)(V,{title:n,description:`Clone it to work on it here, or start without a project.`,children:[i,a]}),t[55]=n,t[56]=i,t[57]=a,t[58]=o):o=t[58],o}case`pull-request-checkout`:{let e;return t[59]!==n||t[60]!==M.project?(e=n.kind===`pull-request`?(0,R.jsx)(ve,{link:n,project:M.project}):null,t[59]=n,t[60]=M.project,t[61]=e):e=t[61],e}}}function me(){return null}function he(){return null}function ge(e){return e.isScratch!==!0}function _e(e){return e.state.__TSR_key??``}function ve(e){let t=(0,P.c)(22),{link:n,project:r}=e,i=r.environmentId,a=r.id,o=r.workspaceRoot,s;t[0]===n.pullRequest?s=t[1]:(s=A(n.pullRequest),t[0]=n.pullRequest,t[1]=s);let l;t[2]!==r.id||t[3]!==r.workspaceRoot||t[4]!==s?(l={projectId:a,workspaceRoot:o,url:s},t[2]=r.id,t[3]=r.workspaceRoot,t[4]=s,t[5]=l):l=t[5];let u;t[6]!==r.environmentId||t[7]!==l?(u={environmentId:i,detail:l},t[6]=r.environmentId,t[7]=l,t[8]=u):u=t[8];let{handoff:d,startHandoff:f}=M(u),p=(0,L.useRef)(!1),m,h;t[9]===n.prompt?(m=t[10],h=t[11]):(m=()=>{p.current||n.prompt===null||(p.current=!0,N(n.prompt))},h=[n.prompt],t[9]=n.prompt,t[10]=m,t[11]=h),(0,L.useEffect)(m,h);let{owner:g,name:ee,number:te}=n.pullRequest,_=`Check out ${g}/${ee}#${te}?`,v=d!==null,y;t[12]!==n.prompt||t[13]!==f?(y=()=>void f(`prompt-link`,n.prompt===null?null:{prompt:n.prompt.text}),t[12]=n.prompt,t[13]=f,t[14]=y):y=t[14];let b=d===null?`Check out`:`Checking out...`,x;t[15]!==v||t[16]!==y||t[17]!==b?(x=(0,R.jsx)(c,{size:`sm`,disabled:v,onClick:y,children:b}),t[15]=v,t[16]=y,t[17]=b,t[18]=x):x=t[18];let S;return t[19]!==x||t[20]!==_?(S=(0,R.jsx)(V,{title:_,description:`This puts the pull request's code in a new worktree and runs your project's setup script on it.`,children:x}),t[19]=x,t[20]=_,t[21]=S):S=t[21],S}function V(e){let t=(0,P.c)(11),{title:n,description:r,children:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=C?(0,R.jsx)(j,{electron:!0}):null,t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,R.jsx)(E,{children:n}),t[1]=n,t[2]=o);let s;t[3]===r?s=t[4]:(s=r?(0,R.jsx)(D,{children:r}):null,t[3]=r,t[4]=s);let c;t[5]===i?c=t[6]:(c=i?(0,R.jsx)(`div`,{className:`mt-5 flex justify-center gap-2`,children:i}):null,t[5]=i,t[6]=c);let l;return t[7]!==o||t[8]!==s||t[9]!==c?(l=(0,R.jsxs)(w,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:[a,(0,R.jsx)(O,{className:`flex-1`,children:(0,R.jsxs)(T,{className:`max-w-md`,children:[o,s,c]})})]}),t[7]=o,t[8]=s,t[9]=c,t[10]=l):l=t[10],l}function H(){let e=(0,P.c)(9),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:U},e[0]=t):t=e[0];let n=b(t),r;e[1]===n?r=e[2]:(r=k(n),e[1]=n,e[2]=r);let i=r;if(!i.ok){let t;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,R.jsx)(E,{children:`Could not open the link`}),e[3]=t):t=e[3];let n;return e[4]===i.error?n=e[5]:(n=(0,R.jsx)(w,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,R.jsx)(O,{className:`flex-1`,children:(0,R.jsxs)(T,{className:`max-w-md`,children:[t,(0,R.jsx)(D,{children:i.error})]})})}),e[4]=i.error,e[5]=n),n}let a;return e[6]!==i.value||e[7]!==n?(a=(0,R.jsx)(B,{link:i.value},n),e[6]=i.value,e[7]=n,e[8]=a):a=e[8],a}function U(e){return e.searchStr}export{H as component};
4
- //# sourceMappingURL=_chat.new-BLxqLetm.js.map
3
+ `);s.length!==0&&ue(r.draftId,{text:s,hiddenCharacters:n.prompt?.hiddenCharacters??0},a)},t[10]=C,t[11]=T,t[12]=n,t[13]=W):W=t[13];let G=W,K;t[14]!==U||t[15]!==n||t[16]!==G||t[17]!==D||t[18]!==E?(K=async()=>{N({status:`opening`});let e=E(U())??E(null),t=e===null?null:await D(e);t===null?N({status:`failed`,message:`None of your machines can start a thread without a project right now.`}):await G(t,n.kind===`pull-request`?A(n.pullRequest):void 0)},t[14]=U,t[15]=n,t[16]=G,t[17]=D,t[18]=E,t[19]=K):K=t[19];let q=K,J;t[20]!==C||t[21]!==U||t[22]!==n||t[23]!==G||t[24]!==k?(J=async e=>{let t=U(),r=C.find(e=>e.environmentId===t),i=r?.serverConfig?.newProjectsRoot??null;if(t===null||i===null||r?.serverConfig?.environment.capabilities.projectCloneTracking!==!0){N({status:`failed`,message:`This machine cannot clone from a link. Update P4 Code on it, or clone the repository from the command palette.`});return}N({status:`opening`});let a=u(),s=await k({environmentId:t,input:{projectId:a,title:e.name,createdAt:new Date().toISOString(),remoteUrl:`https://github.com/${e.owner}/${e.name}.git`,destinationPath:le(i,e.name)}});if(s._tag===`Failure`){if(!m(s)){let e=f(s);x.add(ie({type:`error`,title:`Clone failed`,description:e instanceof Error?e.message:`An error occurred.`}))}N({status:`missing-repository`,repository:e});return}let c=await _(o(t,a),5e3).catch(me);c===null?N({status:`failed`,message:`The clone started, but its project did not appear.`}):n.kind===`pull-request`?N({status:`failed`,title:`Cloning ${e.owner}/${e.name}`,message:`Open this link again when the clone finishes.`}):await G(c)},t[20]=C,t[21]=U,t[22]=n,t[23]=G,t[24]=k,t[25]=J):J=t[25];let Y=J,X;t[26]!==n||t[27]!==a||t[28]!==d||t[29]!==G||t[30]!==q||t[31]!==B||t[32]!==g?(X=()=>{if(F.current)return;if(F.current=!0,z.add(a),n.kind===`pull-request`){let e=fe(g,n.pullRequest);if(e!==void 0){N({status:`opened`});let t=c(e.environmentId,e.id);n.prompt!==null&&ue(t,n.prompt),d({to:`/$environmentId/$threadId`,params:{environmentId:e.environmentId,threadId:e.id},replace:!0});return}}let e=n.kind===`new`?n.repository:n.pullRequest;if(e===null){q();return}let t=de(B(),e);t===void 0?N({status:`missing-repository`,repository:e}):n.kind===`pull-request`?N({status:`pull-request-checkout`,project:t}):G(t)},t[26]=n,t[27]=a,t[28]=d,t[29]=G,t[30]=q,t[31]=B,t[32]=g,t[33]=X):X=t[33];let Z=(0,L.useEffectEvent)(X),Q;t[34]!==p||t[35]!==Z||t[36]!==M.status?(Q=()=>{p&&M.status===`opening`&&Z()},t[34]=p,t[35]=Z,t[36]=M.status,t[37]=Q):Q=t[37];let $;switch(t[38]!==p||t[39]!==M.status?($=[p,M.status],t[38]=p,t[39]=M.status,t[40]=$):$=t[40],(0,L.useEffect)(Q,$),M.status){case`opening`:{let e;return t[41]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,R.jsx)(V,{title:`Opening the link...`}),t[41]=e):e=t[41],e}case`opened`:{let e;return t[42]===a?e=t[43]:(e=(0,R.jsx)(V,{title:`This link is open`,children:(0,R.jsx)(l,{size:`sm`,variant:`outline`,onClick:()=>{z.delete(a),F.current=!1,N({status:`opening`})},children:`Open it again`})}),t[42]=a,t[43]=e),e}case`failed`:{let e=M.title??`Could not open the link`,n;return t[44]!==M.message||t[45]!==e?(n=(0,R.jsx)(V,{title:e,description:M.message}),t[44]=M.message,t[45]=e,t[46]=n):n=t[46],n}case`missing-repository`:{let e=`${M.repository.owner}/${M.repository.name}`,n=`You don't have ${e}`,r;t[47]!==Y||t[48]!==M.repository?(r=()=>void Y(M.repository),t[47]=Y,t[48]=M.repository,t[49]=r):r=t[49];let i;t[50]!==e||t[51]!==r?(i=(0,R.jsxs)(l,{size:`sm`,onClick:r,children:[`Clone `,e]}),t[50]=e,t[51]=r,t[52]=i):i=t[52];let a;t[53]===q?a=t[54]:(a=(0,R.jsx)(l,{size:`sm`,variant:`outline`,onClick:()=>void q(),children:`Use without project`}),t[53]=q,t[54]=a);let o;return t[55]!==n||t[56]!==i||t[57]!==a?(o=(0,R.jsxs)(V,{title:n,description:`Clone it to work on it here, or start without a project.`,children:[i,a]}),t[55]=n,t[56]=i,t[57]=a,t[58]=o):o=t[58],o}case`pull-request-checkout`:{let e;return t[59]!==n||t[60]!==M.project?(e=n.kind===`pull-request`?(0,R.jsx)(ve,{link:n,project:M.project}):null,t[59]=n,t[60]=M.project,t[61]=e):e=t[61],e}}}function me(){return null}function he(){return null}function ge(e){return e.isScratch!==!0}function _e(e){return e.state.__TSR_key??``}function ve(e){let t=(0,P.c)(22),{link:n,project:r}=e,i=r.environmentId,a=r.id,o=r.workspaceRoot,s;t[0]===n.pullRequest?s=t[1]:(s=A(n.pullRequest),t[0]=n.pullRequest,t[1]=s);let c;t[2]!==r.id||t[3]!==r.workspaceRoot||t[4]!==s?(c={projectId:a,workspaceRoot:o,url:s},t[2]=r.id,t[3]=r.workspaceRoot,t[4]=s,t[5]=c):c=t[5];let u;t[6]!==r.environmentId||t[7]!==c?(u={environmentId:i,detail:c},t[6]=r.environmentId,t[7]=c,t[8]=u):u=t[8];let{handoff:d,startHandoff:f}=M(u),p=(0,L.useRef)(!1),m,h;t[9]===n.prompt?(m=t[10],h=t[11]):(m=()=>{p.current||n.prompt===null||(p.current=!0,N(n.prompt))},h=[n.prompt],t[9]=n.prompt,t[10]=m,t[11]=h),(0,L.useEffect)(m,h);let{owner:g,name:ee,number:te}=n.pullRequest,_=`Check out ${g}/${ee}#${te}?`,v=d!==null,y;t[12]!==n.prompt||t[13]!==f?(y=()=>void f(`prompt-link`,n.prompt===null?null:{prompt:n.prompt.text}),t[12]=n.prompt,t[13]=f,t[14]=y):y=t[14];let b=d===null?`Check out`:`Checking out...`,x;t[15]!==v||t[16]!==y||t[17]!==b?(x=(0,R.jsx)(l,{size:`sm`,disabled:v,onClick:y,children:b}),t[15]=v,t[16]=y,t[17]=b,t[18]=x):x=t[18];let S;return t[19]!==x||t[20]!==_?(S=(0,R.jsx)(V,{title:_,description:`This puts the pull request's code in a new worktree and runs your project's setup script on it.`,children:x}),t[19]=x,t[20]=_,t[21]=S):S=t[21],S}function V(e){let t=(0,P.c)(11),{title:n,description:r,children:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=C?(0,R.jsx)(j,{electron:!0}):null,t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,R.jsx)(E,{children:n}),t[1]=n,t[2]=o);let s;t[3]===r?s=t[4]:(s=r?(0,R.jsx)(D,{children:r}):null,t[3]=r,t[4]=s);let c;t[5]===i?c=t[6]:(c=i?(0,R.jsx)(`div`,{className:`mt-5 flex justify-center gap-2`,children:i}):null,t[5]=i,t[6]=c);let l;return t[7]!==o||t[8]!==s||t[9]!==c?(l=(0,R.jsxs)(w,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:[a,(0,R.jsx)(O,{className:`flex-1`,children:(0,R.jsxs)(T,{className:`max-w-md`,children:[o,s,c]})})]}),t[7]=o,t[8]=s,t[9]=c,t[10]=l):l=t[10],l}function H(){let e=(0,P.c)(9),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:U},e[0]=t):t=e[0];let n=b(t),r;e[1]===n?r=e[2]:(r=k(n),e[1]=n,e[2]=r);let i=r;if(!i.ok){let t;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,R.jsx)(E,{children:`Could not open the link`}),e[3]=t):t=e[3];let n;return e[4]===i.error?n=e[5]:(n=(0,R.jsx)(w,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,R.jsx)(O,{className:`flex-1`,children:(0,R.jsxs)(T,{className:`max-w-md`,children:[t,(0,R.jsx)(D,{children:i.error})]})})}),e[4]=i.error,e[5]=n),n}let a;return e[6]!==i.value||e[7]!==n?(a=(0,R.jsx)(B,{link:i.value},n),e[6]=i.value,e[7]=n,e[8]=a):a=e[8],a}function U(e){return e.searchStr}export{H as component};
4
+ //# sourceMappingURL=_chat.new-BUUjlaam.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$d as i,$n as a,Bl as o,Kl as s,Nf as c,Qn as l,Sn as u,Vl as d,Wd as f,Wl as p,Zd as m,Zn as h,Zo as g,ad as _,ar as v,dr as y,ed as b,ep as x,er as S,fr as C,ir as w,jl as T,lr as E,lu as D,mr as O,np as k,or as A,pf as j,rr as ee,sl as M,sr as N,t as te,tr as P,ur as F,uu as I,wu as ne}from"./utils-DsOiwDNN.js";import{V as L,kr as re}from"./src-B7vcPG0D.js";import{C as R,g as ie,k as z,v as B}from"./entities-CRXY8xy3.js";import{t as V}from"./spinner-fU7Q2OR1.js";import{t as ae}from"./useNavigate-C6_wm78C.js";import{t as oe}from"./useNavigateBack-iqJmvild.js";import{a as se,h as ce}from"./relay-BWVOLzv_.js";import{D as le,k as H,s as U,w as W}from"./useSettings-BOuYsEM0.js";import{s as ue}from"./server-DQkamj54.js";import{t as de}from"./use-atom-command-BkSai4ZH.js";import{l as fe,o as pe,r as me,s as he,t as ge,u as G}from"./rightPanelStore-BuudmoUr.js";import{r as _e}from"./queries-CzRpIoRQ.js";import{C as ve,S as ye,T as be,a as xe,b as Se,d as Ce,f as we,g as Te,h as K,l as Ee,m as De,n as Oe,o as ke,p as Ae,r as je,s as Me,t as Ne,u as Pe,v as Fe,w as Ie,x as Le}from"./PanelLayoutControls-D6h4yyW-.js";import{t as Re}from"./env-BfPir1X4.js";import{a as ze,n as Be,t as Ve}from"./tooltip-Da633nbs.js";import{o as He}from"./sidebar-CCcDCy-Q.js";import{i as Ue,n as We,o as Ge,r as Ke,t as qe}from"./empty-CJnssipy.js";import{_ as Je,y as Ye}from"./keybindings-DBugaGH3.js";import{a as Xe,f as q,u as Ze}from"./RenderErrorBoundary-DNjP1Gq4.js";import{n as Qe}from"./sourceControlClients-ECBkjM0e.js";import{n as $e}from"./pullRequestIcons-gBL3Yt9x.js";import{B as et,C as tt,D as nt,E as rt,F as it,H as at,I as ot,L as st,M as ct,N as lt,O as ut,P as dt,R as ft,S as pt,T as mt,U as ht,V as gt,W as _t,_ as vt,b as yt,d as bt,f as xt,g as St,h as Ct,j as wt,k as Tt,l as Et,m as Dt,o as Ot,p as kt,r as At,s as jt,v as Mt,w as Nt,x as Pt,y as Ft,z as It}from"./pullRequests-BZ7PzmTm.js";import{t as Lt}from"./ProjectFavicon-DJmxMkvz.js";import{n as Rt,r as zt,t as J}from"./input-group-CsS-Psw7.js";import{A as Bt,S as Vt,v as Y}from"./useHandleNewThread-CT3UAzyB.js";import{d as Ht,f as Ut,p as Wt}from"./p4ProjectFile-BBI5SxD4.js";import{i as Gt,n as Kt}from"./uiStateStore-aIXF8Zlu.js";import{r as qt}from"./EnvironmentMachineIcon-BrYDn6tR.js";import{r as Jt}from"./sidebarProjectGrouping-Bj_Qatcf.js";import{t as Yt}from"./WorkspacePageContainer-CCJOwHlv.js";import{Da as Xt,Gi as Zt,Ho as Qt,Ki as $t,Oa as en,On as tn,Pa as nn,di as rn,mi as an,n as on,nr as sn,pi as cn,t as ln,ui as un,wi as dn}from"./main-CNyrs4J_.js";import{t as fn}from"./WorkspacePageHeader-C9Tpr_np.js";import{n as pn}from"./usePullRequestActions-DRrQpPhD.js";import{n as mn,r as hn,t as X}from"./WorkspaceBreadcrumb-BHensDdi.js";var Z=n(),gn=class{props;static activators=[{eventName:`onPointerDown`,handler:({nativeEvent:e})=>e.isPrimary&&e.button===0}];autoScrollEnabled=!0;phase=`pending`;pointer;document;window;constructor(e){this.props=e,this.pointer=e.event,this.document=Zt(this.pointer.target),this.window=$t(this.pointer.target),this.document.addEventListener(`pointermove`,this.move,{passive:!1,capture:!0}),this.document.addEventListener(`pointerup`,this.end,{capture:!0}),this.document.addEventListener(`pointercancel`,this.pointerCancel,{capture:!0}),this.document.addEventListener(`keydown`,this.keydown,{capture:!0}),this.document.addEventListener(`visibilitychange`,this.visibilityChange),this.window.addEventListener(`blur`,this.cancel),this.window.addEventListener(`pagehide`,this.cancel),this.window.addEventListener(`resize`,this.cancel),this.document.addEventListener(`dragstart`,this.preventDefault),this.document.addEventListener(`contextmenu`,this.preventDefault),e.options.onAttach(this),e.onPending(e.active,{distance:e.options.distance},this.coordinates())}coordinates=()=>({x:this.pointer.clientX,y:this.pointer.clientY});preventDefault=e=>e.preventDefault();clearClickSuppression=()=>{this.document.removeEventListener(`click`,this.suppressClick,{capture:!0}),this.document.removeEventListener(`pointerdown`,this.clearClickSuppression,{capture:!0})};suppressClick=e=>{e.stopPropagation(),this.clearClickSuppression()};clearSelection=()=>this.document.getSelection()?.removeAllRanges();move=e=>{if(this.phase===`finished`||e.pointerId!==this.pointer.pointerId)return;let t={x:e.clientX,y:e.clientY};if(!(e.buttons&1))return this.phase===`dragging`&&this.props.options.onDrop?.(t),this.cancel();if(this.phase===`pending`){let t={x:e.clientX-this.pointer.clientX,y:e.clientY-this.pointer.clientY};if(Math.hypot(t.x,t.y)<=this.props.options.distance){this.props.onPending(this.props.active,{distance:this.props.options.distance},this.coordinates(),t);return}this.phase=`dragging`,this.document.addEventListener(`click`,this.suppressClick,{capture:!0}),this.document.addEventListener(`selectionchange`,this.clearSelection),this.clearSelection(),this.props.onStart(this.coordinates())}if(this.phase===`dragging`){if(e.cancelable&&e.preventDefault(),this.props.options.onMove?.(t)===!0)return;this.props.onMove(t)}};end=e=>{if(e.pointerId!==this.pointer.pointerId)return;let t=this.phase===`dragging`&&this.props.options.onDrop?.({x:e.clientX,y:e.clientY})===!0;this.finish(t)};pointerCancel=e=>{e.pointerId===this.pointer.pointerId&&this.cancel()};keydown=e=>{e.code===`Escape`&&this.cancel()};visibilityChange=()=>{this.document.hidden&&this.cancel()};cancel=()=>this.finish(!0);finish(e){if(this.phase===`finished`)return;let t=this.phase===`pending`;this.phase=`finished`,this.document.removeEventListener(`pointermove`,this.move,{capture:!0}),this.document.removeEventListener(`pointerup`,this.end,{capture:!0}),this.document.removeEventListener(`pointercancel`,this.pointerCancel,{capture:!0}),this.document.removeEventListener(`keydown`,this.keydown,{capture:!0}),this.document.removeEventListener(`visibilitychange`,this.visibilityChange),this.window.removeEventListener(`blur`,this.cancel),this.window.removeEventListener(`pagehide`,this.cancel),this.window.removeEventListener(`resize`,this.cancel),this.document.removeEventListener(`dragstart`,this.preventDefault),this.document.removeEventListener(`contextmenu`,this.preventDefault),this.document.removeEventListener(`selectionchange`,this.clearSelection),(!t||e)&&(this.document.addEventListener(`click`,this.suppressClick,{capture:!0}),this.document.addEventListener(`pointerdown`,this.clearClickSuppression,{capture:!0}));try{this.props.options.onFinish(!t)}finally{t&&this.props.onAbort(this.props.active),e?this.props.onCancel():this.props.onEnd()}}},Q=e(t(),1);function _n(e,t){let n=new Map;for(let t of e)n.set(t.title,(n.get(t.title)??0)+1);return e.map(e=>(n.get(e.title)??0)>1?{...e,title:`${e.title} · ${t(e)}`}:e)}function vn(e,t,n){let r=new Map;for(let t of e){let e=t.repositoryIdentity?.canonicalKey?.toLowerCase(),i=JSON.stringify([t.environmentId,e?[`repository`,e]:[`project`,t.id]]),a=t.id===n?.id&&t.environmentId===n.environmentId;(!r.has(i)||a)&&r.set(i,t)}return _n(_n(_n(_n([...r.values()],e=>t.get(e.environmentId)??e.environmentId),e=>e.workspaceRoot),e=>e.environmentId),e=>e.id).sort((e,t)=>e.title.localeCompare(t.title))}var $=e(r(),1);function yn(e){let t=(0,Z.c)(3),{option:n}=e,r;return t[0]!==n.Icon||t[1]!==n.project?(r=n.project?(0,$.jsx)(Lt,{project:n.project,className:`size-3.5`}):(0,$.jsx)(n.Icon,{"aria-hidden":!0,className:`size-3.5`}),t[0]=n.Icon,t[1]=n.project,t[2]=r):r=t[2],r}function bn(e,t){return e.filter(e=>e.kind===t.kind).length>1?t.host:tn(t.kind).providerName}function xn(e){let t=(0,Z.c)(14),{value:n,busy:r,onChange:i}=e,[a,o]=(0,Q.useState)(null),s;t[0]===r?s=t[1]:(s=(0,$.jsx)(Rt,{children:r?(0,$.jsx)(V,{"aria-hidden":!0}):(0,$.jsx)(j,{"aria-hidden":!0})}),t[0]=r,t[1]=s);let c=a??n,l;t[2]===n?l=t[3]:(l=()=>o(n),t[2]=n,t[3]=l);let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>o(null),t[4]=u):u=t[4];let d;t[5]===i?d=t[6]:(d=e=>{o(e.currentTarget.value),i(e.currentTarget.value)},t[5]=i,t[6]=d);let f;t[7]!==c||t[8]!==l||t[9]!==d?(f=(0,$.jsx)(zt,{type:`search`,value:c,onFocus:l,onBlur:u,onChange:d,placeholder:`Search pull requests, or label:bug`,"aria-label":`Search pull requests`}),t[7]=c,t[8]=l,t[9]=d,t[10]=f):f=t[10];let p;return t[11]!==s||t[12]!==f?(p=(0,$.jsxs)(J,{className:`min-w-0 flex-1 **:[input]:h-9 sm:**:[input]:h-8`,children:[s,f]}),t[11]=s,t[12]=f,t[13]=p):p=t[13],p}var Sn=`all`,Cn=``,wn=``,Tn=`all`,En=e=>JSON.stringify([e.environmentId,e.id]),Dn=[{value:Tn,label:`All`,Icon:b},{value:`only`,label:`Drafts only`,Icon:$e.draft},{value:`hide`,label:`Hide drafts`,Icon:I}],On=[{value:Tn,label:`All`,Icon:b},{value:`approved`,label:`Approved`,Icon:o},{value:`changes-requested`,label:`Changes requested`,Icon:s},{value:`review-required`,label:`Review required`,Icon:d},{value:`none`,label:`No reviews`,Icon:p}],kn=[{value:Tn,label:`All`,Icon:b},{value:`passing`,label:`Passing`,Icon:o},{value:`failing`,label:`Failing`,Icon:s}];function An(e){let t=(0,Z.c)(12),{label:n,value:r,options:i,onChange:a}=e,o;t[0]!==a||t[1]!==r?(o=e=>{e!==r&&a(e)},t[0]=a,t[1]=r,t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,$.jsx)(S,{children:n}),t[3]=n,t[4]=s);let c;t[5]===i?c=t[6]:(c=i.map(jn),t[5]=i,t[6]=c);let l;return t[7]!==o||t[8]!==s||t[9]!==c||t[10]!==r?(l=(0,$.jsxs)(w,{value:r,onValueChange:o,children:[s,c]}),t[7]=o,t[8]=s,t[9]=c,t[10]=r,t[11]=l):l=t[11],l}function jn(e){let t=(0,$.jsx)(v,{value:e.value,className:e.unavailable?`data-disabled:pointer-events-auto`:void 0,disabled:e.unavailable!==void 0,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(yn,{option:e}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.unavailable?(0,$.jsx)(`span`,{className:`shrink-0`,children:`· Unavailable`}):null,(0,$.jsx)(A,{})]})},e.value);return e.unavailable?(0,$.jsxs)(Ve,{children:[(0,$.jsx)(ze,{render:t}),(0,$.jsx)(Be,{side:`top`,children:e.unavailable})]},e.value):t}function Mn(e){let t=(0,Z.c)(21),{label:n,value:r,options:i,onChange:a}=e,o;t[0]!==i||t[1]!==r?(o=i.find(e=>e.value===r)??i[0],t[0]=i,t[1]=r,t[2]=o):o=t[2];let s=o;if(!s)return null;let c;t[3]===s?c=t[4]:(c=(0,$.jsx)(yn,{option:s}),t[3]=s,t[4]=c);let l;t[5]===n?l=t[6]:(l=(0,$.jsx)(`span`,{className:`flex-1`,children:n}),t[5]=n,t[6]=l);let u;t[7]===s.label?u=t[8]:(u=(0,$.jsx)(`span`,{className:`min-w-0 max-w-32 truncate text-xs text-muted-foreground`,children:s.label}),t[7]=s.label,t[8]=u);let d;t[9]!==c||t[10]!==l||t[11]!==u?(d=(0,$.jsxs)(y,{children:[c,l,u]}),t[9]=c,t[10]=l,t[11]=u,t[12]=d):d=t[12];let f;t[13]!==n||t[14]!==a||t[15]!==i||t[16]!==r?(f=(0,$.jsx)(F,{children:(0,$.jsx)(An,{label:n,value:r,options:i,onChange:a})}),t[13]=n,t[14]=a,t[15]=i,t[16]=r,t[17]=f):f=t[17];let p;return t[18]!==d||t[19]!==f?(p=(0,$.jsxs)(E,{children:[d,f]}),t[18]=d,t[19]=f,t[20]=p):p=t[20],p}function Nn(e){let t=(0,Z.c)(47),{value:n,options:r,onChange:i}=e,[a,o]=(0,Q.useState)(``),s,c,l,u,d,f,p,m,h,g;if(t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n){let e=a.trim().toLowerCase(),_;t[14]===n?_=t[15]:(_=n?.toLowerCase()??``,t[14]=n,t[15]=_);let S=_,C;t[16]===S?C=t[17]:(C=e=>e.actor.login.toLowerCase()===S,t[16]=S,t[17]=C);let T=r.find(C);g=[...T?[T]:[],...r.filter(t=>t!==T&&(e.length===0||t.actor.login.toLowerCase().includes(e)||t.actor.name?.toLowerCase().includes(e)))].slice(0,10);let D;t[18]!==S||t[19]!==i?(D=e=>e.toLowerCase()!==S&&i(e||void 0),t[18]=S,t[19]=i,t[20]=D):D=t[20];let O=D;l=E;let k,A;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(x,{"aria-hidden":!0,className:`size-3.5`}),A=(0,$.jsx)(`span`,{className:`flex-1`,children:`Author`}),t[21]=k,t[22]=A):(k=t[21],A=t[22]);let ee=n??`Anyone`;t[23]===ee?h=t[24]:(h=(0,$.jsxs)(y,{children:[k,A,(0,$.jsx)(`span`,{className:`min-w-0 max-w-32 truncate text-xs text-muted-foreground`,children:ee})]}),t[23]=ee,t[24]=h),c=F;let M;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(Rt,{children:(0,$.jsx)(j,{"aria-hidden":!0})}),t[25]=M):M=t[25];let N;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>o(e.currentTarget.value),t[26]=N):N=t[26],t[27]===a?m=t[28]:(m=(0,$.jsx)(`div`,{className:`p-1 pb-2`,children:(0,$.jsxs)(J,{children:[M,(0,$.jsx)(zt,{autoFocus:!0,size:`compact`,value:a,onChange:N,onKeyDown:Fn,placeholder:`Search authors`,"aria-label":`Search authors`})]})}),t[27]=a,t[28]=m),s=w,u=T?.actor.login??n??``,d=O,t[29]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(v,{value:``,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(b,{"aria-hidden":!0,className:`size-3.5`}),`Anyone`]})}),t[29]=f):f=t[29],p=g.map(Pn),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h,t[13]=g}else s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13];let _;t[30]===g.length?_=t[31]:(_=g.length===0?(0,$.jsx)(P,{disabled:!0,children:`No authors found`}):null,t[30]=g.length,t[31]=_);let S;t[32]!==s||t[33]!==u||t[34]!==d||t[35]!==f||t[36]!==p||t[37]!==_?(S=(0,$.jsxs)(s,{value:u,onValueChange:d,children:[f,p,_]}),t[32]=s,t[33]=u,t[34]=d,t[35]=f,t[36]=p,t[37]=_,t[38]=S):S=t[38];let C;t[39]!==c||t[40]!==m||t[41]!==S?(C=(0,$.jsxs)(c,{children:[m,S]}),t[39]=c,t[40]=m,t[41]=S,t[42]=C):C=t[42];let T;return t[43]!==l||t[44]!==h||t[45]!==C?(T=(0,$.jsxs)(l,{children:[h,C]}),t[43]=l,t[44]=h,t[45]=C,t[46]=T):T=t[46],T}function Pn(e){return(0,$.jsx)(v,{value:e.actor.login,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(Xe,{actor:e.actor}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.actor.login}),(0,$.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:[e.mergedCount,` merges loaded`]})]})},e.actor.login.toLowerCase())}function Fn(e){e.key!==`ArrowDown`&&e.key!==`Escape`&&e.stopPropagation()}function In(e){let t=(0,Z.c)(21),{value:n,options:r,onChange:i}=e,a;t[0]===n?a=t[1]:(a=new Set(n.map(Rn)),t[0]=n,t[1]=a);let o=a,s,u,d,f;if(t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==n){let e=[...n.filter(e=>!r.some(t=>t.name.toLowerCase()===e.toLowerCase())).map(Ln),...r];u=E;let a,p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(c,{"aria-hidden":!0,className:`size-3.5`}),p=(0,$.jsx)(`span`,{className:`flex-1`,children:`Labels`}),t[10]=a,t[11]=p):(a=t[10],p=t[11]);let m=n.length===0?`Any`:`${n.length} selected`;t[12]===m?f=t[13]:(f=(0,$.jsxs)(y,{children:[a,p,(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:m})]}),t[12]=m,t[13]=f),s=F,d=e.length===0?(0,$.jsx)(P,{disabled:!0,children:`No labels in this view`}):e.map(e=>{let t=e.name.toLowerCase(),r=o.has(t),a=ut(e.color);return(0,$.jsx)(l,{checked:r,onCheckedChange:t=>i(t?[...n,e.name]:n.filter(t=>t.toLowerCase()!==e.name.toLowerCase())),children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-2.5 shrink-0 rounded-full bg-muted-foreground`,...a?{style:{backgroundColor:a}}:{}}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:e.count})]})},t)}),t[2]=i,t[3]=r,t[4]=o,t[5]=n,t[6]=s,t[7]=u,t[8]=d,t[9]=f}else s=t[6],u=t[7],d=t[8],f=t[9];let p;t[14]!==s||t[15]!==d?(p=(0,$.jsx)(s,{children:d}),t[14]=s,t[15]=d,t[16]=p):p=t[16];let m;return t[17]!==u||t[18]!==f||t[19]!==p?(m=(0,$.jsxs)(u,{children:[f,p]}),t[17]=u,t[18]=f,t[19]=p,t[20]=m):m=t[20],m}function Ln(e){return{name:e,color:null,count:0}}function Rn(e){return e.toLowerCase()}function zn(e){let t=(0,Z.c)(107),{onOpenChange:n,state:r,stateOptions:i,onState:a,involvement:o,involvementOptions:s,onInvolvement:c,filters:l,onFilters:u,authorOptions:d,labelOptions:f,host:p,hostOptions:m,onHost:g,server:v,serverOptions:y,onServer:x,projects:S,projectId:w,projectEnvironmentId:T,unavailable:E,onProject:D}=e,k;t[0]===d?k=t[1]:(k=d===void 0?[]:d,t[0]=d,t[1]=k);let A=k,j;t[2]===f?j=t[3]:(j=f===void 0?[]:f,t[2]=f,t[3]=j);let M=j,te,P;t[4]!==l.author||t[5]!==l.checks||t[6]!==l.draft||t[7]!==l.labels||t[8]!==l.review||t[9]!==p||t[10]!==o||t[11]!==w||t[12]!==v||t[13]!==r?(te=(l.labels??[]).flatMap(Hn),P=[r!==`open`,o!==`all`,p,v,w,l.draft,l.review,l.checks,l.author,...te].filter(Boolean),t[4]=l.author,t[5]=l.checks,t[6]=l.draft,t[7]=l.labels,t[8]=l.review,t[9]=p,t[10]=o,t[11]=w,t[12]=v,t[13]=r,t[14]=te,t[15]=P):(te=t[14],P=t[15]);let F=P.length,I;t[16]!==l||t[17]!==u?(I=e=>u(Object.fromEntries(Object.entries({...l,...e}).filter(Vn))),t[16]=l,t[17]=u,t[18]=I):I=t[18];let L=I,re;t[19]===L?re=t[20]:(re=(e,t)=>L({[e]:t===Tn?void 0:t}),t[19]=L,t[20]=re);let R=re,ie;t[21]!==T||t[22]!==w?(ie=w===void 0||T===void 0?Sn:En({id:w,environmentId:T}),t[21]=T,t[22]=w,t[23]=ie):ie=t[23];let z=ie,B;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(B={value:Sn,label:`All projects`,Icon:b},t[24]=B):B=t[24];let V;if(t[25]!==S||t[26]!==E){let e;t[28]===E?e=t[29]:(e=(e,t)=>Number(E.has(En(e)))-Number(E.has(En(t))),t[28]=E,t[29]=e);let n;t[30]===E?n=t[31]:(n=e=>({value:En(e),label:e.title,Icon:ne,project:e,...E.has(En(e))?{unavailable:E.get(En(e))}:{}}),t[30]=E,t[31]=n),V=[B,...S.toSorted(e).map(n)],t[25]=S,t[26]=E,t[27]=V}else V=t[27];let ae=V,oe,se,ce;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsx)(O,{variant:`outline`}),se=(0,$.jsx)(_,{className:`size-4`}),ce=(0,$.jsx)(`span`,{children:`Filters`}),t[32]=oe,t[33]=se,t[34]=ce):(oe=t[32],se=t[33],ce=t[34]);let le;t[35]===F?le=t[36]:(le=F>0?(0,$.jsx)(`span`,{className:`rounded-full bg-muted px-1.5 text-xs text-muted-foreground tabular-nums`,children:F}):null,t[35]=F,t[36]=le);let H;t[37]===le?H=t[38]:(H=(0,$.jsxs)(C,{render:oe,children:[se,ce,le]}),t[37]=le,t[38]=H);let U;t[39]!==a||t[40]!==r||t[41]!==i?(U=(0,$.jsx)(Mn,{label:`State`,value:r,options:i,onChange:a}),t[39]=a,t[40]=r,t[41]=i,t[42]=U):U=t[42];let W;t[43]!==o||t[44]!==s||t[45]!==c?(W=(0,$.jsx)(Mn,{label:`Involvement`,value:o,options:s,onChange:c}),t[43]=o,t[44]=s,t[45]=c,t[46]=W):W=t[46];let ue;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,$.jsx)(N,{}),t[47]=ue):ue=t[47];let de;t[48]===L?de=t[49]:(de=e=>L({author:e}),t[48]=L,t[49]=de);let fe;t[50]!==A||t[51]!==l.author||t[52]!==de?(fe=(0,$.jsx)(Nn,{value:l.author,options:A,onChange:de}),t[50]=A,t[51]=l.author,t[52]=de,t[53]=fe):fe=t[53];let pe;t[54]===L?pe=t[55]:(pe=e=>L({labels:e.length===0?void 0:e.slice(0,10).map(Bn)}),t[54]=L,t[55]=pe);let me;t[56]!==M||t[57]!==te||t[58]!==pe?(me=(0,$.jsx)(In,{value:te,options:M,onChange:pe}),t[56]=M,t[57]=te,t[58]=pe,t[59]=me):me=t[59];let he=l.draft??Tn,ge;t[60]===R?ge=t[61]:(ge=e=>R(`draft`,e),t[60]=R,t[61]=ge);let G;t[62]!==he||t[63]!==ge?(G=(0,$.jsx)(Mn,{label:`Draft`,value:he,options:Dn,onChange:ge}),t[62]=he,t[63]=ge,t[64]=G):G=t[64];let _e=l.review??Tn,ve;t[65]===R?ve=t[66]:(ve=e=>R(`review`,e),t[65]=R,t[66]=ve);let ye;t[67]!==_e||t[68]!==ve?(ye=(0,$.jsx)(Mn,{label:`Review`,value:_e,options:On,onChange:ve}),t[67]=_e,t[68]=ve,t[69]=ye):ye=t[69];let be=l.checks??Tn,xe;t[70]===R?xe=t[71]:(xe=e=>R(`checks`,e),t[70]=R,t[71]=xe);let Se;t[72]!==be||t[73]!==xe?(Se=(0,$.jsx)(Mn,{label:`Checks`,value:be,options:kn,onChange:xe}),t[72]=be,t[73]=xe,t[74]=Se):Se=t[74];let Ce;t[75]!==p||t[76]!==m||t[77]!==g?(Ce=m.length>2?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(N,{}),(0,$.jsx)(Mn,{label:`Host`,value:p??Cn,options:m,onChange:e=>g(e===Cn?void 0:e)})]}):null,t[75]=p,t[76]=m,t[77]=g,t[78]=Ce):Ce=t[78];let we;t[79]!==x||t[80]!==v||t[81]!==y?(we=y.length>2?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(N,{}),(0,$.jsx)(Mn,{label:`Server`,value:v??wn,options:y,onChange:e=>x(e===wn?void 0:e)})]}):null,t[79]=x,t[80]=v,t[81]=y,t[82]=we):we=t[82];let Te;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,$.jsx)(N,{}),t[83]=Te):Te=t[83];let K;t[84]!==D||t[85]!==w||t[86]!==S?(K=e=>{let t=S.find(t=>En(t)===e);t?D(t.id,t.environmentId):w!==void 0&&D(void 0,void 0)},t[84]=D,t[85]=w,t[86]=S,t[87]=K):K=t[87];let Ee;t[88]!==ae||t[89]!==z||t[90]!==K?(Ee=(0,$.jsx)(Mn,{label:`Project`,value:z,options:ae,onChange:K}),t[88]=ae,t[89]=z,t[90]=K,t[91]=Ee):Ee=t[91];let De;t[92]!==U||t[93]!==W||t[94]!==fe||t[95]!==me||t[96]!==G||t[97]!==ye||t[98]!==Se||t[99]!==Ce||t[100]!==we||t[101]!==Ee?(De=(0,$.jsxs)(ee,{align:`end`,side:`bottom`,children:[U,W,ue,fe,me,G,ye,Se,Ce,we,Te,Ee]}),t[92]=U,t[93]=W,t[94]=fe,t[95]=me,t[96]=G,t[97]=ye,t[98]=Se,t[99]=Ce,t[100]=we,t[101]=Ee,t[102]=De):De=t[102];let Oe;return t[103]!==n||t[104]!==H||t[105]!==De?(Oe=(0,$.jsxs)(h,{onOpenChange:n,children:[H,De]}),t[103]=n,t[104]=H,t[105]=De,t[106]=Oe):Oe=t[106],Oe}function Bn(e){return[e]}function Vn(e){let[,t]=e;return t!==void 0}function Hn(e){return e}function Un(e){let t=(0,Z.c)(12),{joined:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`path`,{d:`M10 58h100`,className:`text-muted-foreground/30`,stroke:`currentColor`}),i=(0,$.jsx)(`circle`,{cx:`10`,cy:`58`,r:`5`,fill:`currentColor`,fillOpacity:.25}),a=(0,$.jsx)(`circle`,{cx:`110`,cy:`58`,r:`5`,fill:`currentColor`,fillOpacity:.25}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;t[3]===n?o=t[4]:(o=n?(0,$.jsx)(`path`,{d:`M30 58c0-18 8-26 24-26h12c16 0 24 8 24 26`}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`path`,{d:`M30 58c0-18 8-26 24-26h4`}),(0,$.jsx)(`path`,{d:`M90 58c0-18-8-26-24-26h-4`,strokeDasharray:`2 7`,className:`text-muted-foreground/50`})]}),t[3]=n,t[4]=o);let s=n?5:4,c=n?`currentColor`:`none`,l=n?void 0:`text-muted-foreground/45`,u;t[5]!==s||t[6]!==c||t[7]!==l?(u=(0,$.jsx)(`circle`,{cx:`60`,cy:`32`,r:s,fill:c,fillOpacity:.25,className:l}),t[5]=s,t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;return t[9]!==o||t[10]!==u?(d=(0,$.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 120 72`,className:`h-20 w-32 text-muted-foreground/60`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,children:[r,i,a,o,u]}),t[9]=o,t[10]=u,t[11]=d):d=t[11],d}function Wn(e){let t=(0,Z.c)(56),{query:n,filtered:r,searching:a,hasProjects:o,canLoadMore:s,loadingMore:c,refreshing:l,onClearQuery:u,onLoadMore:d,onRefresh:f}=e;if(!o){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Un,{joined:!1}),t[0]=e):e=t[0];let n;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(Ue,{children:[(0,$.jsx)(Ge,{children:`No projects in this workspace`}),(0,$.jsx)(Ke,{children:`Add a project, and the pull requests from its repository appear here.`})]}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(qe,{children:[e,n,(0,$.jsx)(We,{children:(0,$.jsxs)(O,{size:`sm`,onClick:Gn,children:[(0,$.jsx)(i,{className:`size-3.5`}),`Add project`]})})]}),t[2]=r):r=t[2],r}if(a){let e;t[3]===n?e=t[4]:(e=n.length>48?`${n.slice(0,48)}…`:n,t[3]=n,t[4]=e);let r=`Searching every host for “${e}”`,i;return t[5]===r?i=t[6]:(i=(0,$.jsx)(Fe,{rows:5,caption:r}),t[5]=r,t[6]=i),i}if(n.length>0){let e;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Un,{joined:!1}),t[7]=e):e=t[7];let r;t[8]===n?r=t[9]:(r=n.length>48?`${n.slice(0,48)}…`:n,t[8]=n,t[9]=r);let i;t[10]===r?i=t[11]:(i=(0,$.jsxs)(Ge,{children:[`Nothing matches “`,r,`”`]}),t[10]=r,t[11]=i);let a;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(Ke,{children:`The hosts were searched for it. Try fewer words, or search by number, author or branch.`}),t[12]=a):a=t[12];let o;t[13]===i?o=t[14]:(o=(0,$.jsxs)(Ue,{children:[i,a]}),t[13]=i,t[14]=o);let s;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(j,{className:`size-3.5`}),t[15]=s):s=t[15];let c;t[16]===u?c=t[17]:(c=(0,$.jsxs)(O,{size:`sm`,variant:`outline`,onClick:u,children:[s,`Clear search`]}),t[16]=u,t[17]=c);let d;t[18]===l?d=t[19]:(d=(0,$.jsx)(Qt,{size:`sm`,refreshing:l}),t[18]=l,t[19]=d);let p=l?`Checking...`:`Check again`,m;t[20]!==f||t[21]!==l||t[22]!==d||t[23]!==p?(m=(0,$.jsxs)(O,{size:`sm`,variant:`outline`,disabled:l,onClick:f,children:[d,p]}),t[20]=f,t[21]=l,t[22]=d,t[23]=p,t[24]=m):m=t[24];let h;t[25]!==m||t[26]!==c?(h=(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[c,m]}),t[25]=m,t[26]=c,t[27]=h):h=t[27];let g;return t[28]!==h||t[29]!==o?(g=(0,$.jsxs)(qe,{children:[e,o,h]}),t[28]=h,t[29]=o,t[30]=g):g=t[30],g}let p;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(Un,{joined:!1}),t[31]=p):p=t[31];let m=r?`Nothing under these filters`:`No pull requests`,h;t[32]===m?h=t[33]:(h=(0,$.jsx)(Ge,{children:m}),t[32]=m,t[33]=h);let g=r?`Widen the state, involvement or project filter to see more.`:`Pull requests from every project in this workspace appear here.`,_;t[34]===g?_=t[35]:(_=(0,$.jsx)(Ke,{children:g}),t[34]=g,t[35]=_);let v;t[36]!==h||t[37]!==_?(v=(0,$.jsxs)(Ue,{children:[h,_]}),t[36]=h,t[37]=_,t[38]=v):v=t[38];let y;t[39]!==s||t[40]!==c||t[41]!==d?(y=s?(0,$.jsx)(O,{size:`sm`,variant:`outline`,disabled:c,onClick:d,children:c?`Loading...`:`Load more pull requests`}):null,t[39]=s,t[40]=c,t[41]=d,t[42]=y):y=t[42];let b;t[43]===l?b=t[44]:(b=(0,$.jsx)(Qt,{size:`sm`,refreshing:l}),t[43]=l,t[44]=b);let x=l?`Checking...`:`Check again`,S;t[45]!==f||t[46]!==l||t[47]!==b||t[48]!==x?(S=(0,$.jsxs)(O,{size:`sm`,variant:`outline`,disabled:l,onClick:f,children:[b,x]}),t[45]=f,t[46]=l,t[47]=b,t[48]=x,t[49]=S):S=t[49];let C;t[50]!==S||t[51]!==y?(C=(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[y,S]}),t[50]=S,t[51]=y,t[52]=C):C=t[52];let w;return t[53]!==C||t[54]!==v?(w=(0,$.jsxs)(qe,{children:[p,v,C]}),t[53]=C,t[54]=v,t[55]=w):w=t[55],w}function Gn(){return an({open:`add-project`})}function Kn(e){let t=(0,Z.c)(22),{environmentId:n,reference:r,onSelect:i,stackNumber:a}=e,o=Ie(n,r);if(o.data!==null){let e=!!o.error,n;t[0]!==o.data.number||t[1]!==o.notice||t[2]!==e?(n=(0,$.jsx)(Le,{number:o.data.number,notice:o.notice,stale:e}),t[0]=o.data.number,t[1]=o.notice,t[2]=e,t[3]=n):n=t[3];let a;t[4]!==o.error||t[5]!==o.refresh?(a=o.error?(0,$.jsx)(P,{onClick:o.refresh,children:`Retry stack refresh`}):null,t[4]=o.error,t[5]=o.refresh,t[6]=a):a=t[6];let s;t[7]!==i||t[8]!==o.data||t[9]!==r?(s=(0,$.jsx)(ye,{stack:o.data,reference:r,onSelect:i}),t[7]=i,t[8]=o.data,t[9]=r,t[10]=s):s=t[10];let c;return t[11]!==n||t[12]!==a||t[13]!==s?(c=(0,$.jsxs)($.Fragment,{children:[n,a,s]}),t[11]=n,t[12]=a,t[13]=s,t[14]=c):c=t[14],c}let s;t[15]===a?s=t[16]:(s=(0,$.jsx)(Le,{number:a}),t[15]=a,t[16]=s);let c=o.error??(o.isPending?`Loading stack…`:`This pull request is no longer in a stack.`),l;t[17]===c?l=t[18]:(l=(0,$.jsx)(S,{children:c}),t[17]=c,t[18]=l);let u;return t[19]!==s||t[20]!==l?(u=(0,$.jsxs)($.Fragment,{children:[s,l]}),t[19]=s,t[20]=l,t[21]=u):u=t[21],u}function qn(e){let t=(0,Z.c)(25),{environmentId:n,reference:r,membership:i,onSelect:o}=e,[s,c]=(0,Q.useState)(!1),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(`span`,{role:`button`,tabIndex:0,className:`inline-flex shrink-0 cursor-pointer items-center gap-1 text-xs font-normal text-muted-foreground`}),t[0]=l):l=t[0];let u=`Stack ${i.number}, layer ${i.position} of ${i.size}`,d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)($e.stack,{"aria-hidden":!0,className:`size-3`}),t[1]=d):d=t[1];let f;t[2]!==i.position||t[3]!==i.size||t[4]!==u?(f=(0,$.jsx)(ze,{render:(0,$.jsxs)(C,{nativeButton:!1,render:l,"aria-label":u,onClick:Zn,onKeyDown:Xn,children:[d,i.position,`/`,i.size]})}),t[2]=i.position,t[3]=i.size,t[4]=u,t[5]=f):f=t[5];let p;t[6]!==i.number||t[7]!==i.position||t[8]!==i.size?(p=(0,$.jsxs)(Be,{children:[`View stack #`,i.number,`, layer `,i.position,` of `,i.size]}),t[6]=i.number,t[7]=i.position,t[8]=i.size,t[9]=p):p=t[9];let m;t[10]!==f||t[11]!==p?(m=(0,$.jsxs)(Ve,{children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12];let g;t[13]!==n||t[14]!==i.number||t[15]!==o||t[16]!==s||t[17]!==r?(g=s?(0,$.jsx)(Kn,{environmentId:n,reference:r,stackNumber:i.number,onSelect:e=>{c(!1),o(e)}}):null,t[13]=n,t[14]=i.number,t[15]=o,t[16]=s,t[17]=r,t[18]=g):g=t[18];let _;t[19]===g?_=t[20]:(_=(0,$.jsx)(ee,{align:`start`,onClick:Yn,onKeyDown:Jn,children:(0,$.jsx)(a,{children:g})}),t[19]=g,t[20]=_);let v;return t[21]!==s||t[22]!==m||t[23]!==_?(v=(0,$.jsxs)(h,{open:s,onOpenChange:c,children:[m,_]}),t[21]=s,t[22]=m,t[23]=_,t[24]=v):v=t[24],v}function Jn(e){return e.stopPropagation()}function Yn(e){return e.stopPropagation()}function Xn(e){return e.stopPropagation()}function Zn(e){return e.stopPropagation()}var Qn=[{overflow:`@xl/pr-row-meta:hidden`},{overflow:`@3xl/pr-row-meta:hidden`},{overflow:``}];function $n(e){let t=(0,Z.c)(4),{labels:n}=e;if(n.length===0)return null;let r;t[0]===n?r=t[1]:(r=Qn.map((e,t)=>{let r=n[t];if(!r)return null;let i=n.length-t-1;return(0,$.jsx)(Ze,{label:r,className:t===0?``:t===1?`hidden @xl/pr-row-meta:inline-flex`:`hidden @3xl/pr-row-meta:inline-flex`,children:i>0?(0,$.jsxs)(`span`,{className:te(`shrink-0`,e.overflow),children:[`+`,i]}):null},r.name)}),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,$.jsx)(`span`,{className:`flex min-w-0 items-center gap-1`,children:r}),t[2]=r,t[3]=i),i}var er=`px-3 py-2.5`;function tr(e){let t=(0,Z.c)(99),{entry:n,selected:r,showProjectTitle:i,showProvider:a,environmentLabel:o,matchedElsewhere:s,statsKey:c,statsRef:l,onSelect:u,speedMode:d,hostActions:f,onActed:p,closing:m,sweeping:h,onCloseSweepStart:g}=e,_=m!==void 0&&m,v=h!==void 0&&h,y;t[0]===n.provider?y=t[1]:(y=tn(n.provider),t[0]=n.provider,t[1]=y);let{Icon:b,providerName:x}=y,S=r?`bg-accent`:`hover:bg-accent/60`,C;t[2]===S?C=t[3]:(C=te(`flex items-center rounded-md [content-visibility:auto] [contain-intrinsic-block-size:56.5px]`,S),t[2]=S,t[3]=C);let w=r?`true`:void 0,T;t[4]!==n||t[5]!==u?(T=()=>u(n),t[4]=n,t[5]=u,t[6]=T):T=t[6];let E;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(E=te(xe,er,`min-w-0 flex-1 cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring`),t[7]=E):E=t[7];let D;t[8]!==n.baseBranch||t[9]!==n.isDraft||t[10]!==n.mergeability||t[11]!==n.state?(D=(0,$.jsx)(Ee,{state:n.state,isDraft:n.isDraft,mergeability:n.mergeability,baseBranch:n.baseBranch,className:`mt-0.75 self-start`}),t[8]=n.baseBranch,t[9]=n.isDraft,t[10]=n.mergeability,t[11]=n.state,t[12]=D):D=t[12];let O;t[13]!==n.provider||t[14]!==n.url?(O=e=>{e.preventDefault(),e.stopPropagation(),K({url:n.url,openLabel:De(Qe.get(n.provider)),position:{x:e.clientX,y:e.clientY}})},t[13]=n.provider,t[14]=n.url,t[15]=O):O=t[15];let k;t[16]!==n.number||t[17]!==O?(k=(0,$.jsxs)(`span`,{className:ke,onContextMenu:O,children:[`#`,n.number]}),t[16]=n.number,t[17]=O,t[18]=k):k=t[18];let A;t[19]!==n.checksState||t[20]!==n.environmentId||t[21]!==n.number||t[22]!==n.projectId||t[23]!==n.repository?(A=n.checksState===void 0?null:(0,$.jsx)(Ae,{checksState:n.checksState,environmentId:n.environmentId,reference:{projectId:n.projectId,repository:n.repository,number:n.number}}),t[19]=n.checksState,t[20]=n.environmentId,t[21]=n.number,t[22]=n.projectId,t[23]=n.repository,t[24]=A):A=t[24];let ee;t[25]===n.reviewDecision?ee=t[26]:(ee=n.reviewDecision===void 0?null:(0,$.jsx)(q,{decision:n.reviewDecision}),t[25]=n.reviewDecision,t[26]=ee);let M;t[27]!==A||t[28]!==ee?(M=(0,$.jsxs)($.Fragment,{children:[A,ee]}),t[27]=A,t[28]=ee,t[29]=M):M=t[29];let N;t[30]!==n.environmentId||t[31]!==n.host||t[32]!==n.number||t[33]!==n.projectId||t[34]!==n.repository||t[35]!==n.stack||t[36]!==u?(N=n.stack?(0,$.jsx)(qn,{environmentId:n.environmentId,reference:{projectId:n.projectId,host:n.host,repository:n.repository,number:n.number},membership:n.stack,onSelect:e=>u({...e,host:n.host,environmentId:n.environmentId})}):null,t[30]=n.environmentId,t[31]=n.host,t[32]=n.number,t[33]=n.projectId,t[34]=n.repository,t[35]=n.stack,t[36]=u,t[37]=N):N=t[37];let P;t[38]!==n.host||t[39]!==n.number||t[40]!==n.projectId||t[41]!==n.repository?(P={projectId:n.projectId,host:n.host,repository:n.repository,number:n.number},t[38]=n.host,t[39]=n.number,t[40]=n.projectId,t[41]=n.repository,t[42]=P):P=t[42];let F;t[43]!==n.additions||t[44]!==n.deletions||t[45]!==n.environmentId||t[46]!==P?(F=(0,$.jsx)(Se,{environmentId:n.environmentId,reference:P,additions:n.additions,deletions:n.deletions,className:`font-mono`}),t[43]=n.additions,t[44]=n.deletions,t[45]=n.environmentId,t[46]=P,t[47]=F):F=t[47];let I;t[48]!==N||t[49]!==F?(I=(0,$.jsxs)($.Fragment,{children:[N,F]}),t[48]=N,t[49]=F,t[50]=I):I=t[50];let ne;t[51]===s?ne=t[52]:(ne=s?(0,$.jsxs)(Ve,{children:[(0,$.jsxs)(ze,{render:(0,$.jsx)(`span`,{className:`flex min-w-6 items-center gap-1 overflow-hidden rounded-full border border-border/60 px-1 text-3xs`}),children:[(0,$.jsx)(`span`,{className:`sr-only`,children:`matched in the description`}),(0,$.jsx)(j,{"aria-hidden":!0,className:`size-3 shrink-0`}),(0,$.jsx)(`span`,{"aria-hidden":!0,className:`hidden truncate @xs/pr-row-meta:block`,children:`matched in the description`})]}),(0,$.jsx)(Be,{side:`top`,children:`Matched in the description`})]}):null,t[51]=s,t[52]=ne);let L;t[53]!==b||t[54]!==x||t[55]!==a?(L=a?(0,$.jsxs)(Ve,{children:[(0,$.jsx)(ze,{render:(0,$.jsx)(`span`,{className:`inline-flex shrink-0`}),children:(0,$.jsx)(b,{"aria-label":x,className:`size-3`})}),(0,$.jsx)(Be,{children:x})]}):null,t[53]=b,t[54]=x,t[55]=a,t[56]=L):L=t[56];let re;t[57]===n.author?re=t[58]:(re=(0,$.jsx)(Me,{actor:n.author,className:`min-w-3.5 max-w-40`,labelClassName:`sr-only @xs/pr-row-meta:not-sr-only @xs/pr-row-meta:truncate`}),t[57]=n.author,t[58]=re);let R;t[59]!==n.repository||t[60]!==i?(R=i?(0,$.jsx)(`span`,{className:`truncate`,children:n.repository}):null,t[59]=n.repository,t[60]=i,t[61]=R):R=t[61];let ie;t[62]===o?ie=t[63]:(ie=o?(0,$.jsx)(`span`,{className:`min-w-0 max-w-32 truncate`,children:o}):null,t[62]=o,t[63]=ie);let z;t[64]===n.labels?z=t[65]:(z=n.labels.length>0?(0,$.jsx)($n,{labels:n.labels}):null,t[64]=n.labels,t[65]=z);let B;t[66]!==ne||t[67]!==L||t[68]!==re||t[69]!==R||t[70]!==ie||t[71]!==z?(B=(0,$.jsxs)($.Fragment,{children:[ne,L,re,R,ie,z]}),t[66]=ne,t[67]=L,t[68]=re,t[69]=R,t[70]=ie,t[71]=z,t[72]=B):B=t[72];let V;t[73]!==n.title||t[74]!==n.updatedAt||t[75]!==k||t[76]!==M||t[77]!==I||t[78]!==B?(V=(0,$.jsx)(Pe,{number:k,title:n.title,signals:M,status:I,metaClassName:`@container/pr-row-meta`,meta:B,updatedAt:n.updatedAt}),t[73]=n.title,t[74]=n.updatedAt,t[75]=k,t[76]=M,t[77]=I,t[78]=B,t[79]=V):V=t[79];let ae;t[80]!==V||t[81]!==w||t[82]!==T||t[83]!==D?(ae=(0,$.jsxs)(`button`,{type:`button`,"aria-current":w,onClick:T,className:E,children:[D,V]}),t[80]=V,t[81]=w,t[82]=T,t[83]=D,t[84]=ae):ae=t[84];let oe;t[85]!==_||t[86]!==n||t[87]!==f||t[88]!==p||t[89]!==g||t[90]!==d||t[91]!==v?(oe=f.size>0?(0,$.jsx)(Ce,{entry:n,hostActions:f,visible:d,onActed:p,closing:_,sweeping:v,...g?{onCloseSweepStart:g}:{}}):null,t[85]=_,t[86]=n,t[87]=f,t[88]=p,t[89]=g,t[90]=d,t[91]=v,t[92]=oe):oe=t[92];let se;return t[93]!==c||t[94]!==l||t[95]!==ae||t[96]!==oe||t[97]!==C?(se=(0,$.jsxs)(`div`,{ref:l,"data-pull-request-stats-key":c,"data-pull-request-key":c,className:C,children:[ae,oe]}),t[93]=c,t[94]=l,t[95]=ae,t[96]=oe,t[97]=C,t[98]=se):se=t[98],se}var nr=(0,Q.memo)(tr);function rr(){let e=(0,Z.c)(15),t=R(),n=z(),r=B(),i=Gt(sr),a=U(or),o=U(Ut),s=W(),c=H(),l;e[0]!==i||e[1]!==t?(l=Y({items:t,preferredIds:i,getId:Ht,getPreferenceIds:ar}),e[0]=i,e[1]=t,e[2]=l):l=e[2];let u=l,d;if(e[3]!==s||e[4]!==o||e[5]!==u||e[6]!==c||e[7]!==t||e[8]!==a){let n=new Map(s.map(ir));d=Jt({projects:a===`manual`?u:t,groupScratchProjects:!0,settings:o,primaryEnvironmentId:c,resolveEnvironmentLabel:e=>n.get(e)??null}),e[3]=s,e[4]=o,e[5]=u,e[6]=c,e[7]=t,e[8]=a,e[9]=d}else d=e[9];let f=d,p;return e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==f?(p=Bt(f,n,a,r),e[10]=r,e[11]=a,e[12]=n,e[13]=f,e[14]=p):p=e[14],p}function ir(e){return[e.environmentId,e.label]}function ar(e){return[Ht(e),Kt(e.workspaceRoot)]}function or(e){return e.sidebarProjectSortOrder}function sr(e){return e.projectOrder}function cr(){return{terminalFocus:nn(),terminalOpen:!1,previewFocus:!1,previewOpen:!1,modelPickerOpen:!1,isWeb:!Re,isDesktop:Re}}var lr={authored:f,reviewRequested:D,others:k};function ur(e){let t=(0,Z.c)(11),{group:n}=e,r=lr[n.key]??b,i;t[0]===r?i=t[1]:(i=(0,$.jsx)(r,{"aria-hidden":!0,className:`size-3.5 shrink-0`}),t[0]=r,t[1]=i);let a;t[2]===n.label?a=t[3]:(a=(0,$.jsx)(`h2`,{className:`shrink-0`,children:n.label}),t[2]=n.label,t[3]=a);let o;t[4]===n.entries.length?o=t[5]:(o=(0,$.jsx)(`span`,{className:`shrink-0 tabular-nums text-muted-foreground/50`,children:n.entries.length}),t[4]=n.entries.length,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(u,{className:`min-w-2 flex-1`}),t[6]=s):s=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==o?(c=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pb-1 text-xs font-medium text-muted-foreground/70`,children:[i,a,o,s]}),t[7]=i,t[8]=a,t[9]=o,t[10]=c):c=t[10],c}var dr=[{value:`all`,label:`All`,Icon:b},{value:`reviewing`,label:`Reviewing`,Icon:D},{value:`authored`,label:`Authored`,Icon:f}],fr=[{value:`all`,label:`All`,Icon:b},{value:`open`,label:`Open`,Icon:$e.pullRequest},{value:`closed`,label:`Closed`,Icon:$e.closed},{value:`merged`,label:`Merged`,Icon:$e.merged}],pr=250,mr=10,hr=99,gr=500,_r={},vr=[],yr={},br={},xr=new Map,Sr=new Set,Cr=e=>me({...e,repository:e.repository.toLowerCase()});function wr(){oe();let e=dn(!0),t=e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey,n=ln.useSearch(),r=n.sort??`ready`,i=r===`ready`||r===`largest`||r===`smallest`?`eager`:`visible`,a=ae({from:ln.fullPath}),o=g(ue),{environments:s}=le(),c=(0,Q.useMemo)(()=>s.filter(e=>e.serverConfig?.environment.capabilities.pullRequests===!0).toSorted((e,t)=>e.environmentId.localeCompare(t.environmentId)),[s]),l=c.find(e=>e.environmentId===n.environmentId)?.environmentId??null,u=(0,Q.useMemo)(()=>new Set(s.map(e=>e.environmentId)),[s]),d=(0,Q.useMemo)(()=>c.filter(e=>l===null||e.environmentId===l).map(e=>e.environmentId),[c,l]),f=(0,Q.useMemo)(()=>rt(d),[d]),p=s.some(e=>e.serverConfig!==null),h=d.length>0,_=R(),v=ie(),y=(0,Q.useMemo)(()=>_.filter(e=>!e.isScratch&&d.includes(e.environmentId)),[_,d]),x=(0,Q.useMemo)(()=>new Map(s.map(e=>[e.environmentId,e.label])),[s]),S=(0,Q.useMemo)(()=>it(n.projectId,y,v),[y,v,n.projectId]),C=(0,Q.useMemo)(()=>Ct(y,l,S),[y,l,S]),w=(0,Q.useMemo)(()=>vn(y,x,C),[x,y,C]),T=n.selectedHost??n.host,E=(0,Q.useMemo)(()=>{let e=n.repository?.toLowerCase();if(e!==void 0)return y.find(t=>t.repositoryIdentity?.owner&&t.repositoryIdentity.name&&`${t.repositoryIdentity.owner}/${t.repositoryIdentity.name}`.toLowerCase()===e&&(T===void 0||re(t.repositoryIdentity,t.repositoryIdentity.provider)===T.toLowerCase()))?.id},[y,T,n.repository]),D=(0,Q.useMemo)(()=>it(n.selectedProjectId,y,v),[y,v,n.selectedProjectId])??E??S,k=st(n.selectedEnvironmentId,u,l),A=(0,Q.useMemo)(()=>Ct(y,k,D),[y,k,D]),j=c.length===0?null:ge,ee=sn(j),N=G(e=>fe(e.byThreadKey,j)),P=G(e=>he(e.byThreadKey,j)),F=P?.kind===`pull-request`?P:null,I=N.isOpen?F:null,{active:ne,durationMs:z}=Xt(),B=(0,Q.useMemo)(()=>({activeSurface:F,surfaces:N.surfaces}),[N.surfaces,F]),H=en(N.isOpen&&F!==null,B,ne,j?.threadId??null,z),U=H.present,W=H.value?.activeSurface??null,ye=H.value?.surfaces??[],xe=W?.environmentId??A?.environmentId??null,Se=(0,Q.useCallback)(e=>void a({search:t=>{let n={...t,...e};return{involvement:n.involvement??t.involvement,state:n.state??t.state,...n.sort&&n.sort!==`ready`?{sort:n.sort}:{},...n.repository?{repository:n.repository}:{},...n.number?{number:n.number}:{},...n.projectId?{projectId:n.projectId}:{},...n.environmentId?{environmentId:n.environmentId}:{},...n.host?{host:n.host}:{},...n.selectedHost?{selectedHost:n.selectedHost}:{},...n.selectedProjectId?{selectedProjectId:n.selectedProjectId}:{},...n.selectedEnvironmentId?{selectedEnvironmentId:n.selectedEnvironmentId}:{},...n.q?{q:n.q}:{},...n.draft?{draft:n.draft}:{},...n.review?{review:n.review}:{},...n.checks?{checks:n.checks}:{},...n.author?{author:n.author}:{},...n.labels&&n.labels.length>0?{labels:n.labels}:{}}},replace:!0}),[a]),Ce={repository:void 0,number:void 0,selectedProjectId:void 0,selectedEnvironmentId:void 0,selectedHost:void 0},K=e=>{let t=un({...n,...e,involvement:e.involvement??n.involvement,state:e.state??n.state});rn(t),Se(e)},Ee=(n.q??``).trim(),[De,ke]=(0,Q.useState)(!1),Ae=_e(Ee,pr),Me=Ee===Ae,Pe=(0,Q.useMemo)(()=>Pt(Ee),[Ee]),Ie=(0,Q.useMemo)(()=>Pt(Ae),[Ae]),Le=(0,Q.useMemo)(()=>({...n.draft?{draft:n.draft}:{},...n.review?{review:n.review}:{},...n.checks?{checks:n.checks}:{},...n.author?{author:n.author}:{},...n.labels?{labels:n.labels.map(e=>[e])}:{}}),[n.author,n.checks,n.draft,n.labels,n.review]),Re=Object.keys(Le).length>0,ze=(0,Q.useMemo)(()=>({...Le,...Ie.filters}),[Le,Ie.filters]),Be=Object.keys(ze).length>0,Ve=(0,Q.useMemo)(()=>({...Le,...Pe.filters}),[Le,Pe.filters]),Ue=Object.keys(Ve).length>0,We=(0,Q.useMemo)(()=>ot(d,y,C,S,v),[d,y,v,C,S]),Ge=(0,Q.useMemo)(()=>{let e=We.map(e=>({environmentId:e}));if(!v||S!==void 0)return e;let t=be(y,We,We[0]),n=new Map;for(let e of y)n.set(e.environmentId,(n.get(e.environmentId)??0)+1);return We.flatMap(e=>{let r=t.get(e);return r===void 0?[]:r.length===(n.get(e)??0)?[{environmentId:e}]:[{environmentId:e,projectIds:r}]})},[y,v,We,S]),Ke=(0,Q.useMemo)(()=>Ge.map(({environmentId:e,projectIds:t})=>`${e}#${t?.join(`+`)??`*`}`).join(`|`),[Ge]),qe=Et(Ge.map(({environmentId:e})=>e)).map(([e,t])=>`${e}:${t}`).join(`|`),Xe=`${f}:${Ke}:${n.state}:${n.involvement}:${S??``}:${n.host??``}:${n.draft??``}:${n.review??``}:${n.checks??``}:${n.author??``}:${n.labels?.join(`\0`)??``}`,q=`${Xe}:${Ae}`,Ze=(0,Q.useRef)({key:q,policy:i});Ze.current={key:q,policy:i};let[Qe,$e]=(0,Q.useState)({key:q,size:hr,cursors:null,regrown:[]}),ut=Qe.key===q?Qe.size:hr,Lt=Qe.key===q?Qe.cursors:null,Rt=Qe.key===q?Qe.regrown:[];(0,Q.useEffect)(()=>{$e({key:q,size:hr,cursors:null,regrown:[]})},[q]);let zt=(0,Q.useMemo)(()=>Ge.flatMap(({environmentId:e,projectIds:t})=>{let r=Lt?.[e];return Lt!==null&&r===void 0&&!Rt.includes(e)?[]:[{environmentId:e,input:{state:n.state,involvement:n.involvement,limit:ut,...S?{projectId:S}:{},...t?{projectIds:t}:{},...n.host?{host:n.host}:{},...Be?{filters:ze}:{},...Ie.text?{query:Ie.text}:{},...r===void 0?{}:{cursors:r}}}]}),[ze,Be,ut,Ge,S,n.host,n.involvement,n.state,Lt,Rt,Ie.text]),J=Ot(zt),Bt=(0,Q.useMemo)(()=>Ge.map(({environmentId:e,projectIds:t})=>({environmentId:e,input:{state:n.state,involvement:n.involvement,limit:hr,...S?{projectId:S}:{},...t?{projectIds:t}:{},...n.host?{host:n.host}:{},...Re?{filters:Le}:{}}})),[Re,Le,Ge,S,n.host,n.involvement,n.state]),Y=Ot(Bt),Ht=Y.data?.entries.length===0&&Y.data.errors.length===0&&!Y.isPending&&Y.error===null,Ut=(0,Q.useMemo)(()=>De?Ge.map(({environmentId:e,projectIds:t})=>({environmentId:e,input:{state:`all`,involvement:n.involvement,limit:hr,...S?{projectId:S}:{},...t?{projectIds:t}:{},...n.host?{host:n.host}:{}}})):vr,[Ge,De,S,n.host,n.involvement]),Wt=Ot(Ut),Gt=n.involvement===`all`&&Ee.length===0,Kt=(0,Q.useMemo)(()=>{if(!Gt||Y.data===null||Y.data.entries.length===0)return{authored:vr,reviewing:vr};let e=e=>Ge.map(({environmentId:t,projectIds:r})=>({environmentId:t,input:{state:n.state,involvement:e,limit:hr,...S?{projectId:S}:{},...r?{projectIds:r}:{},...n.host?{host:n.host}:{},...Re?{filters:Le}:{}}}));return{authored:e(`authored`),reviewing:e(`reviewing`)}},[Re,Le,Gt,Y.data,Ge,S,n.host,n.state]),Jt=Ot(Kt.authored),Yt=Ot(Kt.reviewing),Zt=de(At.invalidate,{reportFailure:!1}),[Qt,$t]=(0,Q.useState)(0),[nn,an]=(0,Q.useState)(!1),fn=(e=Ze.current,t)=>{Kn(!0,t);let n=ar.current,r=wt({requestedScope:e,currentScope:Ze.current,entriesByKey:ir.current,candidateKeys:n.key===e.key?n.values:new Set,statsByRow:lr.current});r!==null&&(Dr({key:e.key,batches:r}),Ir.refresh(r.filter(({environmentId:e})=>t===void 0||e===t).map(({environmentId:e,input:t})=>({environmentId:e,input:t}))))},mn=async()=>{let e=Ze.current;an(!0);try{await Promise.all(We.map(e=>Zt({environmentId:e,input:{}})))}finally{an(!1)}fn(e),$t(e=>e+1)},hn=nn||J.isPending,[X,Z]=(0,Q.useState)(null),[_n,yn]=(0,Q.useState)(null),[Sn,Cn]=(0,Q.useState)(()=>new Map),wn=(0,Q.useRef)(0),Tn=(e,t)=>{let n=++wn.current,r=Tt(e,t,new Date,n);return r===null?null:(Cn(t=>new Map(t).set(Nt(e),r)),n)},Dn=(e,t)=>{t!==null&&Cn(n=>{if(n.get(e)?.token!==t)return n;let r=new Map(n);return r.delete(e),r})},On=(0,Q.useRef)(new Map),kn=(0,Q.useRef)(()=>{});kn.current=({entry:e,action:t})=>{t!==`merge`&&Tn(e,t)};let An=(0,Q.useCallback)(e=>{kn.current(e)},[]),jn=(0,Q.useCallback)(e=>{kn.current({entry:e,action:`close`})},[]),{close:Mn,closingKeys:Nn}=pn(jn);(0,Q.useEffect)(()=>{f.length!==0&&Z(e=>{if(e!==null&&e.environmentKey===f)return e;let t=dt(typeof window>`u`?void 0:window.localStorage,f);return t===null?null:{environmentKey:f,scope:t.scope,query:``,data:t.data,...t.partitions===void 0?{}:{partitions:t.partitions}}})},[f]),(0,Q.useEffect)(()=>{if(!J.data||J.isPending)return;let e=J.data;Z(t=>{let n=Gt&&Ht?{authored:[],reviewing:[]}:Gt&&Jt.data!==null&&Yt.data!==null?{authored:Jt.data.entries,reviewing:Yt.data.entries}:t!==null&&t.environmentKey===f&&t.scope===Xe?t.partitions:void 0;if(f.length>0&&Ae.length===0){let t=_n?.key===q?_n.entries:e.entries;_t(typeof window>`u`?void 0:window.localStorage,f,{scope:Xe,data:{...e,entries:t,viewers:Y.data?.viewers??e.viewers,providers:Y.data?.providers??e.providers},...n===void 0?{}:{partitions:n}})}return{environmentKey:f,scope:Xe,query:Ae,data:{...e,entries:_n?.key===q?_n.entries:e.entries},...n===void 0?{}:{partitions:n}}})},[f,Xe,Ae,J.data,J.isPending,Ht,Gt,Jt.data,Yt.data,_n,q,Y.data]);let Pn=(0,Q.useMemo)(()=>{if(X===null||X.environmentKey!==f||X.scope===Xe)return null;let e=yt(X.data.entries,{state:n.state,projectId:S,host:n.host});return e.length===0?null:{...X.data,entries:e}},[f,X,Xe,S,n.host,n.state]),Fn=(Ae.length===0&&Lt===null&&ut===hr?Y.data:J.data)??(X?.scope===Xe&&X.query===Ae?X.data:null),In=(Ae.length===0?Y.data:void 0)??(X?.scope===Xe?X.data:null)??Pn,Ln=Fn??In,Rn=Fn===null&&In!==null,zn=J.isPending&&Ln!==null,Bn=J.isPending&&Ln===null;(0,Q.useEffect)(()=>{!Fn||J.isPending||J.error&&J.data===null||(yn(e=>{if(e===null||e.key!==q)return{key:q,entries:lt(Fn.entries,Ie.text)};if(Lt!==null){let t=new Set(e.entries.map(Nt)),n=Fn.entries.filter(e=>!t.has(Nt(e))),r=lt(n.toSorted(kt),Ie.text);return{key:q,entries:[...e.entries,...r]}}return{key:q,entries:It(e.entries,lt(Fn.entries,Ie.text),Nt)}}),Cn(e=>gt(e,Fn.entries,Nt,Date.now())))},[Fn,q,Lt,Ie.text,J.isPending,J.error,J.data]);let Vn=Fn?.nextCursors??{},Hn=(Fn?.truncatedEnvironments??[]).filter(e=>Vn[e]===void 0),Un=!Rn&&Object.keys(Vn).length>0,Gn=()=>{$e(Un?{key:q,size:Hn.length===0?ut:Math.min(ut+hr,gr),cursors:Vn,regrown:Hn}:{key:q,size:Math.min(ut+hr,gr),cursors:null,regrown:[]})},Kn=(e=!1,t)=>{let n=(e?[...Bt,...Ut,...Kt.authored,...Kt.reviewing]:[]).filter(({environmentId:e})=>t===void 0||e===t);if(Lt===null){J.refresh([...zt.filter(({environmentId:e})=>t===void 0||e===t),...n]);return}n.length>0&&J.refresh(n);let r=_n?.key===q?_n.entries.length:ut;$e({key:q,regrown:[],size:Math.min(Math.max(ut,Math.ceil(r/hr)*hr),gr),cursors:null})},qn=(0,Q.useRef)(``),Jn=(0,Q.useEffectEvent)(()=>{Lt!==null&&Kn()});(0,Q.useEffect)(()=>{qe.length!==0&&qn.current!==qe&&(qn.current=qe,Jn())},[qe]),ve(()=>{Kn(!0)},{enabled:h});let Yn=Y.data?.viewers??Ln?.viewers??_r,Xn=Y.data?.errors??Ln?.errors??[],Zn=(0,Q.useMemo)(()=>xt([...Wt.data?.entries??[],...Y.data?.entries??Ln?.entries??[]],n.state),[Y.data?.entries,Wt.data?.entries,Ln?.entries,n.state]),Qn=(0,Q.useMemo)(()=>new Set((Y.data?.providers??Ln?.providers??[]).flatMap(e=>e.searchesOnHost?[e.host]:[])),[Y.data?.providers,Ln?.providers]),$n=(0,Q.useMemo)(()=>{let e=_n?.key===q?_n.entries:Ln?.entries??[],t=Dt(e,Yn,n.involvement),r=Ue?t.filter(e=>vt(e,Ve,mt(e,Yn))):t;if(Pe.text.length===0)return r.toSorted(kt);let i=Me&&!Rn;return r.filter(e=>i&&Qn.has(e.host)||Mt(e,Pe.text))},[q,Ue,Ve,Ln,_n,Me,n.involvement,Qn,Rn,Pe.text,Yn]),er=(0,Q.useMemo)(()=>Object.fromEntries($n.map(e=>[me(e),{state:e.state,isDraft:e.isDraft}])),[$n]),tr=(0,Q.useRef)(null),rr=(0,Q.useMemo)(()=>{if(n.involvement!==`all`)return[{key:`others`,label:``,entries:$n}];if(Ht)return St($n,Yn);let e=X!==null&&X.environmentKey===f&&X.scope===Xe?X.partitions:void 0,t=e=>e===void 0||!Ue?e:e.filter(e=>vt(e,Ve,mt(e,Yn))),r=t(Gt?Jt.data?.entries??e?.authored:void 0),i=t(Gt?Yt.data?.entries??e?.reviewing:void 0);return r===void 0||i===void 0?St($n,Yn):pt($n,r,i)},[Ue,Ht,Ve,Jt.data?.entries,$n,f,X,Gt,Yt.data?.entries,Xe,n.involvement,Yn]),ir=(0,Q.useRef)(new Map);ir.current=new Map(rr.flatMap(e=>e.entries.map(e=>[Nt(e),e])));let ar=(0,Q.useRef)({key:q,values:new Set}),[or,sr]=(0,Q.useState)(()=>new Map),lr=(0,Q.useRef)(or);lr.current=or;let[wr,Dr]=(0,Q.useState)({key:q,batches:[]}),Or=wr.key===q?wr.batches:[],Ar=(0,Q.useMemo)(()=>Or.map(({environmentId:e,input:t})=>({environmentId:e,input:t})),[Or]),jr=(0,Q.useRef)(null),Mr=(0,Q.useRef)(new Set),Nr=(0,Q.useRef)(!0),Pr=(0,Q.useRef)(i);Pr.current=i;let Fr=(0,Q.useCallback)(e=>{if(e!==null&&typeof IntersectionObserver<`u`)return Mr.current.add(e),jr.current?.observe(e),()=>{Mr.current.delete(e),jr.current?.unobserve(e);let t=e.dataset.pullRequestStatsKey,n=ar.current;Pr.current===`visible`&&t!==void 0&&n.values.delete(t)&&!Nr.current&&Dr(e=>{if(e.key!==n.key)return e;let t=ft(e.batches,n.values);return t.length===e.batches.length?e:{key:e.key,batches:t}})}},[]);(0,Q.useEffect)(()=>{i===`eager`&&Dr(e=>{let t=e.key===q?e.batches:[],n=ct({entriesByKey:ir.current,candidateKeys:ar.current.values,policy:i,activeBatches:t,statsByRow:lr.current});return n.length===0&&e.key===q?e:{key:q,batches:[...t,...n]}})},[q,rr,i]),(0,Q.useEffect)(()=>{if(i!==`visible`||typeof IntersectionObserver>`u`)return;ar.current={key:q,values:new Set};let e=new IntersectionObserver(e=>{let t=ar.current;if(t.key!==q)return;let n=!1,r=new Set;for(let i of e){let e=i.target.dataset.pullRequestStatsKey;if(e===void 0)continue;let a=t.values.has(e);i.isIntersecting&&ir.current.has(e)?(t.values.add(e),a||r.add(e)):t.values.delete(e),n||=a!==t.values.has(e)}n&&Dr(e=>{let n=e.key===q?e.batches:[],a=Nr.current?n:ft(n,t.values),o=ct({entriesByKey:ir.current,candidateKeys:r,policy:i,activeBatches:n,statsByRow:lr.current});return o.length===0&&a.length===n.length?e:{key:q,batches:[...a,...o]}})},{root:tr.current,rootMargin:`480px`});jr.current=e;for(let t of Mr.current)e.observe(t);return()=>{e.disconnect(),jr.current===e&&(jr.current=null)}},[q,i]);let Ir=jt(Ar);Nr.current=Ir.isPending,(0,Q.useEffect)(()=>{if(i!==`visible`||Ir.isPending)return;let e=ar.current;Dr(t=>{if(t.key!==q||e.key!==q)return t;let n=ft(t.batches,e.values);return n.length===t.batches.length?t:{key:t.key,batches:n}})},[q,i,Ir.isPending]),(0,Q.useEffect)(()=>{let e=Ir.stats;e!==null&&sr(t=>Ft(t,e))},[Ir.stats]);let Lr=(0,Q.useMemo)(()=>{let e=rr.map(e=>{let t=bt(e.entries.map(e=>ht(e,or)),Sn,Nt,n.state);return{...e,entries:Ue&&Sn.size>0?t.filter(e=>!Sn.has(Nt(e))||vt(e,Ve,mt(e,Yn))):t}});return at(e,r,Pe.text,e=>e.additions+e.deletions>0||or.has(tt(e)),n.involvement)},[rr,Ue,Ve,Sn,n.involvement,n.state,r,or,Pe.text,Yn]),Rr=Lr.reduce((e,t)=>e+t.entries.length,0),[zr,Br]=(0,Q.useState)([]);(0,Q.useEffect)(()=>{Fn!==null&&Br(e=>n.host===void 0||e.length===0?Fn.providers:e)},[Fn,n.host]);let Vr=zr.length>1,Hr=(0,Q.useMemo)(()=>nt(zr),[zr]),[Ur,Wr]=(0,Q.useState)(()=>new Set),Gr=(0,Q.useRef)(null),Kr=(0,Q.useMemo)(()=>new Map(Lr.flatMap(e=>e.entries.map(t=>[Nt(t),{entry:t,groupKey:e.key}]))),[Lr]),qr=(0,Q.useRef)({displayGroups:Lr,closeSweepRows:Kr,closingKeys:Nn,closeBatch:Mn,hostActionsOf:Hr});qr.current={displayGroups:Lr,closeSweepRows:Kr,closingKeys:Nn,closeBatch:Mn,hostActionsOf:Hr},(0,Q.useEffect)(()=>()=>Gr.current?.cancel(),[q,n.q,r]),(0,Q.useEffect)(()=>{let e=e=>{e.key===`Escape`&&Gr.current!==null&&(e.preventDefault(),Gr.current.cancel())};return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)},[]);let Jr=(0,Q.useCallback)((e,t)=>{Gr.current?.cancel();let n=Nt(e),r=qr.current.displayGroups.find(e=>e.entries.some(e=>Nt(e)===n));if(!r||qr.current.closingKeys.has(n))return;let i=qr.current.displayGroups.flatMap(e=>e.entries.map(Nt)),a=e=>{let t=qr.current.closeSweepRows.get(e);return t?.groupKey===r.key&&t.entry.state===`open`&&qr.current.hostActionsOf(t.entry).has(`close`)&&!qr.current.closingKeys.has(e)&&!tr.current?.querySelector(`[data-pull-request-key="${CSS.escape(e)}"] [data-pull-request-action-pending="true"]`)},o=[],s=null,c=e=>{e!==s&&(s=e,o=Vt(i,n,e,a),Wr(new Set(o)))};Gr.current=new gn({active:n,event:t,options:{distance:6,onAttach:()=>{},onFinish:()=>{Gr.current=null,Wr(new Set)}},onPending:()=>{},onStart:()=>c(n),onMove:({y:e})=>{let t=tr.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.min(Math.max(e,n.top),n.bottom-1),i=null;for(let e of t.querySelectorAll(`[data-pull-request-key]`)){if(i!==null&&e.getBoundingClientRect().top>r)break;i=e.dataset.pullRequestKey??null}i!==null&&c(i)},onEnd:()=>{let e=o.filter(a).flatMap(e=>{let t=qr.current.closeSweepRows.get(e);return t?[t.entry]:[]});qr.current.closeBatch(e)},onCancel:()=>{},onAbort:()=>{}})},[]),Yr=(0,Q.useMemo)(()=>new Map(rr.flatMap(e=>e.entries.map(e=>[Cr(e),e]))),[rr]),Xr=(0,Q.useMemo)(()=>new Map(Lr.flatMap(e=>e.entries.map(e=>[Cr(e),e]))),[Lr]),Zr=(0,Q.useMemo)(()=>n.repository&&n.number&&A?{environmentId:A.environmentId,repository:n.repository,number:n.number,projectId:A.id,...T?{host:T}:{}}:null,[n.number,n.repository,A,T]),Qr=F!==null,[$r,ei]=(0,Q.useState)(!1),ti=N.isOpen&&$r;!N.isOpen&&$r&&ei(!1);let ni=()=>{N.isOpen&&ei(e=>!e)},ri=(0,Q.useCallback)(()=>ei(!0),[]);(0,Q.useEffect)(()=>{h&&j!==null&&Zr!==null&&G.getState().openPullRequest(j,Zr)},[Zr,h,j]);let ii=N.isOpen&&I!==null?{environmentId:I.environmentId,repository:I.repository,number:I.number,projectId:I.projectId,host:I.host??(A?.repositoryIdentity?re(A.repositoryIdentity,A.repositoryIdentity.provider):void 0)}:null,ai=e=>Se(e===null?Ce:{repository:e.repository,number:e.number,selectedProjectId:e.projectId,selectedHost:e.host,...e.environmentId===void 0?{}:{selectedEnvironmentId:e.environmentId}}),oi=()=>{j!==null&&(N.isOpen?(G.getState().close(j),Se(Ce)):F!==null&&(G.getState().show(j),ai(F)))},si=(0,Q.useMemo)(()=>{let e=new Map;for(let t of y){let n=t.repositoryIdentity?.provider;if(n===void 0)continue;let r=re(t.repositoryIdentity,n);e.has(r)||e.set(r,{host:r,kind:n})}return[...e.values()]},[y]),ci=(0,Q.useMemo)(()=>new Map(Xn.map(e=>[En({id:e.projectId,environmentId:e.environmentId}),e.message])),[Xn]),li=(0,Q.useCallback)(e=>{j!==null&&(G.getState().openPullRequest(j,e),Se({repository:e.repository,number:e.number,selectedProjectId:e.projectId,selectedEnvironmentId:e.environmentId,selectedHost:e.host}))},[j,Se]),ui=(0,$.jsx)(xn,{value:n.q??``,busy:Ee.length>0&&(!Me||Rn),onChange:e=>K({q:e||void 0})}),di=(0,$.jsx)(Ne,{showTerminalControl:!1,showThreadPanelControl:!1,terminalAvailable:!1,terminalOpen:!1,terminalShortcutLabel:null,threadPanelOpen:!1,threadPanelPresentation:`inline`,threadPanelShortcutLabel:null,onToggleThreadPanel:()=>void 0,rightPanelAvailable:Qr,rightPanelOpen:N.isOpen,rightPanelShortcutLabel:Ye(o,`rightPanel.toggle`),rightPanelUnavailableLabel:`Select a pull request first`,rightPanelTabCount:N.surfaces.length,onToggleTerminal:()=>void 0,onToggleRightPanel:oi}),fi=(0,$.jsxs)(`div`,{className:`absolute top-[var(--workspace-controls-top)] right-[var(--workspace-controls-right)] z-50 mr-px flex h-[var(--workspace-topbar-height)] items-center gap-1 [-webkit-app-region:no-drag]`,"data-workspace-titlebar-controls":!0,children:[N.isOpen?(0,$.jsx)(Oe,{maximized:ti,onToggle:ni}):null,di]}),pi=Rn&&J.isPending&&Rr===0&&Ee.length===0,mi=(0,$.jsxs)($.Fragment,{children:[p?h?Bn?(0,$.jsx)(Fe,{rows:7}):J.error&&Rr===0?(0,$.jsx)(Te,{error:J.error,refreshing:J.isPending,onRetry:()=>J.refresh()}):pi?(0,$.jsx)(Fe,{rows:7}):Rr===0?(0,$.jsx)(Wn,{hasProjects:!v||y.length>0,refreshing:hn,onRefresh:()=>void mn(),query:Ee,filtered:Re||n.state!==`open`||n.involvement!==`all`||S!==void 0||n.host!==void 0,searching:Ee.length>0&&(!Me||Rn),canLoadMore:Ln?.truncated===!0&&(Un||ut<gr),loadingMore:zn,onClearQuery:()=>K({q:void 0}),onLoadMore:Gn}):(0,$.jsx)(`div`,{className:te(`space-y-3`,Ur.size>0&&`**:pointer-events-none`),children:Lr.map(e=>(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[e.label?(0,$.jsx)(ur,{group:e}):null,e.entries.map(e=>{let n=Nt(e);return(0,$.jsx)(nr,{statsKey:n,statsRef:Fr,entry:e,showProjectTitle:!0,showProvider:Vr,...c.length>1&&x.get(e.environmentId)!==void 0?{environmentLabel:x.get(e.environmentId)}:{},matchedElsewhere:Pe.text.length>0&&et(e,Pe.text)<=mr,selected:ii?.environmentId===e.environmentId&&ii.repository===e.repository&&ii.host?.toLowerCase()===e.host.toLowerCase()&&ii.number===e.number,onSelect:li,speedMode:t,hostActions:Hr(e),onActed:An,closing:Nn.has(n),sweeping:Ur.has(n),onCloseSweepStart:Jr},n)})]},e.key))}):(0,$.jsx)(Te,{title:`Pull requests unavailable`,error:`Update your P4 Code servers to browse pull requests.`}):(0,$.jsx)(Fe,{rows:7}),J.error&&Rr>0?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg border border-warning/30 bg-warning-surface px-3 py-2 text-xs`,children:[(0,$.jsxs)(`span`,{children:[J.error,` Showing the last pull requests loaded.`]}),(0,$.jsx)(O,{size:`xs`,variant:`outline`,onClick:()=>J.refresh(),children:`Retry`})]}):null,Ln?.truncated&&$n.length>0?(0,$.jsx)(`div`,{className:`flex justify-center py-3 text-xs text-muted-foreground`,children:zn?(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(V,{"aria-hidden":!0,size:`sm`}),Lt===null?`Updating pull requests`:`Loading more`]}):Un||ut<gr?(0,$.jsx)(O,{size:`sm`,variant:`outline`,onClick:Gn,disabled:J.isPending||Rn,children:`Load more pull requests`}):(0,$.jsx)(`span`,{children:`Narrow your search to find more pull requests.`})}):null]}),hi=zr.length>0?zr:si,gi=[{value:``,label:`All`,Icon:m},...hi.map(e=>{let t=zr.find(t=>t.host===e.host);return{value:e.host,label:bn(hi,e),Icon:tn(e.kind).Icon,...t===void 0||t.configured?{}:{unavailable:t.detail??`This host could not be read.`}}})],_i=[{value:``,label:`All servers`,Icon:b},...c.map(e=>({value:e.environmentId,label:e.label,Icon:qt(L(e.serverConfig))}))],vi=(0,$.jsx)(Er,{label:`Sort pull requests`,triggerIcon:(0,$.jsx)(M,{"aria-hidden":!0,className:`size-4`}),triggerLabel:`Sort`,outlined:!0,value:r,options:on,onChange:e=>K({sort:e})}),yi=(0,$.jsx)(Tr,{onOpenChange:ke,state:n.state,stateOptions:fr,onState:e=>K({state:e}),involvement:n.involvement,involvementOptions:dr,onInvolvement:e=>K({involvement:e}),filters:Le,onFilters:e=>K({draft:e.draft,review:e.review,checks:e.checks,author:e.author,labels:e.labels?.flatMap(e=>e)}),authorOptions:Zn.authors,labelOptions:Zn.labels,host:n.host,hostOptions:gi,onHost:e=>K({host:e}),server:l??void 0,serverOptions:_i,onServer:e=>K({environmentId:e,projectId:void 0}),projects:w,projectId:S,projectEnvironmentId:C?.environmentId,unavailable:ci,onProject:(e,t)=>K(t===void 0?{projectId:e}:{projectId:e,environmentId:t})}),bi={refreshing:hn,onRefresh:()=>void mn(),searchValue:n.q??``,involvement:n.involvement,state:n.state,host:n.host,hostMenuOptions:gi,onInvolvement:e=>K({involvement:e}),onState:e=>K({state:e}),onHost:e=>K({host:e}),searchInput:ui,sortMenu:vi,filtersMenu:yi,rightPanelControl:h?(0,$.jsx)(`span`,{"aria-hidden":!0,className:te(`shrink-0`,N.isOpen?`-ml-3 w-0`:`w-7 sm:w-5`,ne&&`transition-[width,margin] ease-out`),style:ne?{transitionDuration:`${z}ms`}:void 0}):null,titlebarControls:h?U?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 left-full w-7 [-webkit-app-region:no-drag]`}):fi:null,rightPanelOpen:N.isOpen,maximizedAway:ti,listBody:mi,scrollRef:tr},xi=e=>{j!==null&&(G.getState().activateSurface(j,e.id),ai(e))},Si=e=>{if(j===null)return;G.getState().closeSurface(j,e.id);let t=pe(G.getState().byThreadKey,j);ai(t?.kind===`pull-request`?t:null)},Ci=e=>{j!==null&&(G.getState().closeOtherSurfaces(j,e.id),ai(e))},wi=e=>{if(j===null)return;G.getState().closeSurfacesToRight(j,e.id);let t=pe(G.getState().byThreadKey,j);ai(t?.kind===`pull-request`?t:null)},Ti=()=>{j!==null&&(G.getState().closeAllSurfaces(j),ai(null))},Ei=(0,Q.useEffectEvent)(e=>{if(!ee||(e.preventDefault(),e.stopPropagation(),e.repeat))return;let t=ee;ce(t,`pull request link`).then(e=>{e&&se.add({type:`success`,title:`PR link copied`,description:t})},e=>{se.add({type:`error`,title:`Failed to copy PR link`,description:e instanceof Error?e.message:`An error occurred.`})})}),Di=(0,Q.useEffectEvent)(e=>{I!==null&&(e.preventDefault(),e.stopPropagation(),e.repeat||Si(I))}),Oi=(0,Q.useEffectEvent)(e=>{Qr&&(e.preventDefault(),e.stopPropagation(),e.repeat||oi())}),ki=(0,Q.useEffectEvent)(e=>{N.isOpen&&(e.preventDefault(),e.stopPropagation(),e.repeat||ni())});return(0,Q.useEffect)(()=>{let e=e=>{if(e.defaultPrevented||cn())return;let t=Je(e,o,{context:cr()});t===`rightPanel.close`&&Di(e),t===`rightPanel.toggle`&&Oi(e),t===`rightPanel.toggleMaximized`&&ki(e),t===`thread.copyReference`&&Ei(e)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[o]),(0,$.jsx)(He,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,$.jsxs)(`div`,{className:`relative flex min-h-0 flex-1`,children:[h&&U?fi:null,(0,$.jsx)(kr,{...bi}),U&&W&&xe!==null?(0,$.jsx)(je,{mode:`inline`,open:N.isOpen,maximized:ti,keybindings:o,getShortcutContext:cr,widthStorageKey:`p4code:pull-request-panel-width`,defaultWidth:typeof window>`u`?640:Math.floor(window.innerWidth/2),surfaces:ye,environmentId:xe,activeSurfaceId:W.id,pendingSurfaceIds:Sr,previewSessions:yr,desktopByTabId:br,terminalLabelsById:xr,onActivate:e=>{e.kind===`pull-request`&&xi(e)},onCloseSurface:e=>{e.kind===`pull-request`&&Si(e)},onCloseOtherSurfaces:e=>{e.kind===`pull-request`&&Ci(e)},onCloseSurfacesToRight:e=>{e.kind===`pull-request`&&wi(e)},onCloseAllSurfaces:Ti,onMoveSurface:(e,t)=>{j!==null&&G.getState().moveSurface(j,e,t)},onCopyFilePath:()=>void 0,onAddBrowser:()=>void 0,onAddBrowserInProfile:()=>void 0,onAddTerminal:()=>void 0,onAddDiff:()=>void 0,onAddFiles:()=>void 0,onAddPullRequest:()=>void 0,onAddPullRequests:()=>void 0,onAddDevice:()=>void 0,browserAvailable:!1,terminalAvailable:!1,diffAvailable:!1,filesAvailable:!1,pullRequestAvailable:!1,pullRequestsAvailable:!1,deviceAvailable:!1,pullRequestStatusSeeds:er,children:(0,$.jsx)(we,{getShortcutContext:cr,shortcutsEnabled:I?.id===W.id,environmentId:xe,onGuideShown:ri,onSelectPullRequest:e=>{j!==null&&(G.getState().openPullRequest(j,{projectId:e.projectId,repository:e.repository,number:e.number,...e.host?{host:e.host}:{},environmentId:xe}),Se({repository:e.repository,number:e.number,selectedHost:e.host,selectedProjectId:e.projectId,selectedEnvironmentId:xe}))},reference:{projectId:W.projectId,repository:W.repository,number:W.number,...W.host?{host:W.host}:{}},listEntry:Xr.get(Cr(W))??null,refreshToken:Qt,onActed:(e,t=`done`)=>{let n=Yr.get(Cr(W));if(e!==void 0&&n!==void 0&&Tt(n,e,new Date,0)!==null){let r=Nt(n);t===`sent`&&e!==`merge`&&On.current.set(r,Tn(n,e)),t===`failed`&&e!==`merge`&&Dn(r,On.current.get(r)??null),t!==`sent`&&On.current.delete(r),t===`done`&&e===`merge`&&(Tn(n,e),fn(void 0,xe))}else t===`done`&&fn(void 0,xe)}},W.id)}):null]})})}function Tr(e){let t=(0,Z.c)(6),n=rr(),r;t[0]!==e.projects||t[1]!==n?(r=Wt(e.projects,n),t[0]=e.projects,t[1]=n,t[2]=r):r=t[2];let i=r,a;return t[3]!==i||t[4]!==e?(a=(0,$.jsx)(zn,{...e,projects:i}),t[3]=i,t[4]=e,t[5]=a):a=t[5],a}function Er(e){let t=(0,Z.c)(30),{label:n,triggerIcon:r,triggerLabel:i,outlined:a,iconOnly:o,value:s,options:c,onChange:l,className:u}=e,d=a!==void 0&&a,f=o!==void 0&&o,p;t[0]!==c||t[1]!==s?(p=c.find(e=>e.value===s)??c[0],t[0]=c,t[1]=s,t[2]=p):p=t[2];let m=p;if(!m)return null;let g=i||f?`${n}: ${m.label}`:n,_=f?`${n}: ${m.label}`:void 0,v;t[3]!==f||t[4]!==d?(v=d?(0,$.jsx)(O,{variant:`outline`,size:f?`icon`:`default`}):(0,$.jsx)(O,{variant:`ghost-muted`,size:`sm`}),t[3]=f,t[4]=d,t[5]=v):v=t[5];let y;t[6]===u?y=t[7]:(y=te(`min-w-0`,u),t[6]=u,t[7]=y);let b;t[8]!==m||t[9]!==f||t[10]!==r||t[11]!==i?(b=f?(0,$.jsx)(m.Icon,{"aria-hidden":!0,className:`size-4`}):i?(0,$.jsxs)($.Fragment,{children:[r,(0,$.jsx)(`span`,{children:i})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`truncate`,children:m.label}),(0,$.jsx)(T,{"aria-hidden":!0,className:`size-3 shrink-0 text-muted-foreground/70`})]}),t[8]=m,t[9]=f,t[10]=r,t[11]=i,t[12]=b):b=t[12];let x;t[13]!==g||t[14]!==_||t[15]!==v||t[16]!==y||t[17]!==b?(x=(0,$.jsx)(C,{"aria-label":g,title:_,render:v,className:y,children:b}),t[13]=g,t[14]=_,t[15]=v,t[16]=y,t[17]=b,t[18]=x):x=t[18];let S;t[19]===l?S=t[20]:(S=e=>l(e),t[19]=l,t[20]=S);let E;t[21]===c?E=t[22]:(E=c.map(Dr),t[21]=c,t[22]=E);let D;t[23]!==S||t[24]!==E||t[25]!==s?(D=(0,$.jsx)(ee,{align:`start`,side:`bottom`,children:(0,$.jsx)(w,{value:s,onValueChange:S,children:E})}),t[23]=S,t[24]=E,t[25]=s,t[26]=D):D=t[26];let k;return t[27]!==D||t[28]!==x?(k=(0,$.jsxs)(h,{children:[x,D]}),t[27]=D,t[28]=x,t[29]=k):k=t[29],k}function Dr(e){let t=(0,$.jsx)(v,{value:e.value,disabled:e.unavailable!==void 0,className:`data-disabled:pointer-events-auto`,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(yn,{option:e}),e.label]})},e.value);return e.unavailable===void 0?t:(0,$.jsxs)(Ve,{children:[(0,$.jsx)(ze,{render:t}),(0,$.jsx)(Be,{side:`right`,children:e.unavailable})]},e.value)}function Or(e){let t=(0,Z.c)(21),{searchInput:n,searchValue:r,open:i,onOpenChange:a,focusToken:o,onFocusWithin:s}=e,c=(0,Q.useRef)(null),l,u;t[0]===i?(l=t[1],u=t[2]):(l=()=>{i&&c.current?.querySelector(`input`)?.focus()},u=[i],t[0]=i,t[1]=l,t[2]=u),(0,Q.useEffect)(l,u);let d=(0,Q.useRef)(o),f,p;if(t[3]===o?(f=t[4],p=t[5]):(f=()=>{if(d.current===o)return;d.current=o;let e=c.current?.querySelector(`input`);e?.focus(),e?.select()},p=[o],t[3]=o,t[4]=f,t[5]=p),(0,Q.useEffect)(f,p),i||r.length>0){let e;t[6]===s?e=t[7]:(e=()=>s?.(!0),t[6]=s,t[7]=e);let i;t[8]!==s||t[9]!==a||t[10]!==r.length?(i=()=>{s?.(!1),r.length===0&&a(!1)},t[8]=s,t[9]=a,t[10]=r.length,t[11]=i):i=t[11];let o;return t[12]!==n||t[13]!==e||t[14]!==i?(o=(0,$.jsx)(`div`,{ref:c,className:`w-56 min-w-24 shrink`,onFocus:e,onBlur:i,children:n}),t[12]=n,t[13]=e,t[14]=i,t[15]=o):o=t[15],o}let m;t[16]===a?m=t[17]:(m=()=>a(!0),t[16]=a,t[17]=m);let h;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(j,{className:`size-4`}),t[18]=h):h=t[18];let g;return t[19]===m?g=t[20]:(g=(0,$.jsx)(O,{size:`icon-sm`,variant:`ghost`,"aria-label":`Search pull requests`,onClick:m,children:h}),t[19]=m,t[20]=g),g}function kr(e){let t=(0,Z.c)(69),{refreshing:n,onRefresh:r,searchValue:i,involvement:a,state:o,host:s,hostMenuOptions:c,onInvolvement:l,onState:u,onHost:d,searchInput:f,sortMenu:p,filtersMenu:h,rightPanelControl:g,titlebarControls:_,rightPanelOpen:v,maximizedAway:y,listBody:b,scrollRef:x}=e,S=(0,Q.useRef)(null),[C,w]=(0,Q.useState)(!1),T;t[0]===x?T=t[1]:(T=()=>{let e=S.current;if(!e)return;let t=new IntersectionObserver(e=>{let[t]=e;return w(t?!t.isIntersecting:!1)},{root:x.current});return t.observe(e),()=>t.disconnect()},t[0]=x,t[1]=T);let E;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[2]=E):E=t[2],(0,Q.useEffect)(T,E);let D=(0,Q.useRef)(!1),O=(0,Q.useRef)(null),[k,A]=(0,Q.useState)(!1),[j,ee]=(0,Q.useState)(0),M=k||i.length>0,N,P;t[3]===C?(N=t[4],P=t[5]):(N=()=>{let e=e=>{if(e.defaultPrevented||e.key.toLowerCase()!==`f`||!(e.metaKey||e.ctrlKey)||e.altKey||e.shiftKey)return;if(e.preventDefault(),C){A(!0),ee(Ar);return}let t=O.current?.querySelector(`input`);t?.focus(),t?.select()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},P=[C],t[3]=C,t[4]=N,t[5]=P),(0,Q.useEffect)(N,P);let F,I;t[6]===C?(F=t[7],I=t[8]):(F=()=>{if(C||(A(!1),!D.current))return;D.current=!1;let e=O.current?.querySelector(`input`);e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},I=[C],t[6]=C,t[7]=F,t[8]=I),(0,Q.useEffect)(F,I);let ne=y?`w-0 flex-none`:`flex-1`,L;t[9]===ne?L=t[10]:(L=te(`@container/pr-list flex min-h-0 min-w-0 flex-col overflow-x-hidden bg-background`,ne),t[9]=ne,t[10]=L);let re=!v,R;t[11]!==C||t[12]!==s||t[13]!==c||t[14]!==a||t[15]!==d||t[16]!==l||t[17]!==u||t[18]!==M||t[19]!==o?(R=C?(0,$.jsxs)(X,{ariaLabel:`Pull request scope`,className:`overflow-hidden`,children:[(0,$.jsx)(mn,{current:!0,className:te(M&&`sr-only`),children:(0,$.jsx)(`h1`,{className:`truncate`,children:`Pull Requests`})}),M?null:(0,$.jsx)(hn,{}),(0,$.jsxs)(mn,{className:`shrink gap-1.5`,children:[(0,$.jsx)(Er,{label:`Filter by state`,value:o,options:fr,onChange:u,className:`shrink-0`}),(0,$.jsx)(Er,{label:`Filter by involvement`,value:a,options:dr,onChange:l}),c.length>2?(0,$.jsx)(Er,{label:`Filter by host`,value:s??``,options:c,onChange:e=>d(e===``?void 0:e)}):null]})]}):(0,$.jsx)(X,{ariaLabel:`Pull requests breadcrumb`,children:(0,$.jsx)(mn,{current:!0,children:(0,$.jsx)(`h1`,{className:`truncate`,children:`Pull Requests`})})}),t[11]=C,t[12]=s,t[13]=c,t[14]=a,t[15]=d,t[16]=l,t[17]=u,t[18]=M,t[19]=o,t[20]=R):R=t[20];let ie;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`}),t[21]=ie):ie=t[21];let z;t[22]!==C||t[23]!==r||t[24]!==n||t[25]!==j||t[26]!==f||t[27]!==k||t[28]!==i?(z=C?(0,$.jsxs)(`div`,{className:`flex shrink items-center gap-1.5`,children:[(0,$.jsx)(Or,{searchInput:f,searchValue:i,open:k,onOpenChange:A,focusToken:j,onFocusWithin:e=>{D.current=e}}),(0,$.jsx)(jr,{compact:!0,refreshing:n,onRefresh:r})]}):null,t[22]=C,t[23]=r,t[24]=n,t[25]=j,t[26]=f,t[27]=k,t[28]=i,t[29]=z):z=t[29];let B;t[30]!==g||t[31]!==R||t[32]!==z||t[33]!==re||t[34]!==_?(B=(0,$.jsxs)(fn,{electron:Re,reserveNativeControls:re,className:`relative bg-background`,children:[_,R,ie,z,g]}),t[30]=g,t[31]=R,t[32]=z,t[33]=re,t[34]=_,t[35]=B):B=t[35];let V;t[36]===f?V=t[37]:(V=(0,$.jsx)(`div`,{className:`min-w-0 basis-full @lg/pr-list:basis-0 @lg/pr-list:flex-1`,children:f}),t[36]=f,t[37]=V);let ae=s!==void 0,oe;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsx)(m,{"aria-hidden":!0,className:`size-4`}),t[38]=oe):oe=t[38];let se=s??``,ce;t[39]===d?ce=t[40]:(ce=e=>d(e===``?void 0:e),t[39]=d,t[40]=ce);let le;t[41]!==c||t[42]!==ae||t[43]!==se||t[44]!==ce?(le=(0,$.jsx)(Er,{label:`Filter by provider`,outlined:!0,iconOnly:ae,triggerIcon:oe,triggerLabel:`All`,value:se,options:c,onChange:ce}),t[41]=c,t[42]=ae,t[43]=se,t[44]=ce,t[45]=le):le=t[45];let H;t[46]!==C||t[47]!==r||t[48]!==n?(H=C?null:(0,$.jsx)(jr,{refreshing:n,onRefresh:r}),t[46]=C,t[47]=r,t[48]=n,t[49]=H):H=t[49];let U;t[50]!==h||t[51]!==p||t[52]!==V||t[53]!==le||t[54]!==H?(U=(0,$.jsxs)(`div`,{ref:O,className:`flex flex-wrap items-center gap-2`,children:[V,p,h,le,H]}),t[50]=h,t[51]=p,t[52]=V,t[53]=le,t[54]=H,t[55]=U):U=t[55];let W;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsx)(`div`,{ref:S,"aria-hidden":!0,className:`-mt-3 h-px w-full`}),t[56]=W):W=t[56];let ue;t[57]===U?ue=t[58]:(ue=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[U,W]}),t[57]=U,t[58]=ue);let de;t[59]!==b||t[60]!==ue?(de=(0,$.jsxs)(Yt,{width:`expanded`,className:`min-h-full gap-4`,children:[ue,b]}),t[59]=b,t[60]=ue,t[61]=de):de=t[61];let fe;t[62]!==x||t[63]!==de?(fe=(0,$.jsx)(`div`,{ref:x,className:`topbar-scroll-fade scrollbar-gutter-both min-h-0 flex-1 overflow-y-auto`,children:de}),t[62]=x,t[63]=de,t[64]=fe):fe=t[64];let pe;return t[65]!==B||t[66]!==fe||t[67]!==L?(pe=(0,$.jsxs)(`div`,{className:L,children:[B,fe]}),t[65]=B,t[66]=fe,t[67]=L,t[68]=pe):pe=t[68],pe}function Ar(e){return e+1}function jr(e){let t=(0,Z.c)(8),{compact:n,refreshing:r,onRefresh:i}=e,a=n!==void 0&&n,o=a?`icon-sm`:`icon`,s=a?`ghost`:`outline`,c;t[0]===r?c=t[1]:(c=(0,$.jsx)(Qt,{size:`md`,refreshing:r}),t[0]=r,t[1]=c);let l;return t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==s||t[6]!==c?(l=(0,$.jsx)(O,{size:o,variant:s,"aria-label":`Refresh pull requests`,onClick:i,disabled:r,children:c}),t[2]=i,t[3]=r,t[4]=o,t[5]=s,t[6]=c,t[7]=l):l=t[7],l}export{wr as component};
2
+ //# sourceMappingURL=_chat.pull-requests-hoMASTBm.js.map
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./utils-Cs97wR6T.js";import{h as a}from"./useRender-BP5vR6yH.js";var o=n(),s=e(t(),1),c=e(r(),1),l=a(`relative rounded-xl border px-3.5 py-3 text-card-foreground text-sm`,{defaultVariants:{surface:`default`,variant:`default`},variants:{surface:{default:``,glass:`alert-glass`},variant:{default:`bg-transparent dark:bg-input/32 [&_svg]:text-muted-foreground`,sidebar:`rounded-lg border-sidebar-border bg-sidebar-control-surface px-2 py-1.5 text-[11px] leading-4 [&_[data-slot=alert-description]]:block [&_[data-slot=alert-description]]:text-sidebar-muted-foreground`,error:`border-error/32 bg-error-surface text-error-foreground [&_[data-slot=alert-description]]:text-error-foreground/80 [&_svg]:text-error`,info:`border-info/32 bg-info/4 [&_svg]:text-info`,success:`border-success/32 bg-success/4 [&_svg]:text-success`,warning:`border-warning/32 bg-warning-surface text-warning-foreground [&_[data-slot=alert-description]]:text-warning-foreground/80 [&_svg]:text-warning`}}});function u(e){let t=e.props[`data-slot`];if(t)return t;let n=e.type;switch(n.displayName??n.name){case`AlertAction`:return`alert-action`;case`AlertTitle`:return`alert-title`;case`AlertDescription`:return`alert-description`;default:return}}function d(e){let t=(0,o.c)(36),n,r,a,d,f,p;t[0]===e?(n=t[1],r=t[2],a=t[3],d=t[4],f=t[5],p=t[6]):({className:r,variant:p,surface:d,controlAlignment:f,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=d,t[5]=f,t[6]=p);let m=f===void 0?`center`:f,h,g,_;t[7]===n?(h=t[8],g=t[9],_=t[10]):(_=[],g=[],h=[],s.Children.forEach(n,e=>{if(!(0,s.isValidElement)(e)){g.push(e);return}let t=u(e);t===`alert-action`?h.push(e):t===`alert-title`||t===`alert-description`?g.push(e):_.push(e)}),t[7]=n,t[8]=h,t[9]=g,t[10]=_);let v;t[11]!==r||t[12]!==d||t[13]!==p?(v=i(l({surface:d,variant:p}),r),t[11]=r,t[12]=d,t[13]=p,t[14]=v):v=t[14];let y=p??`default`,b=m===`first-line`?`items-start`:`items-center`,x=m===`first-line`&&h.length>0&&`min-h-7 pt-1 sm:min-h-6 sm:pt-0.5`,S;t[15]!==b||t[16]!==x?(S=i(`flex gap-2`,b,x),t[15]=b,t[16]=x,t[17]=S):S=t[17];let C;t[18]!==m||t[19]!==_?(C=_.length>0&&(0,c.jsx)(`div`,{className:i(`flex shrink-0 items-center justify-center`,m===`first-line`?`h-lh w-4 [&>svg]:size-4`:`size-4 [&>svg]:size-full`),children:_}),t[18]=m,t[19]=_,t[20]=C):C=t[20];let w;t[21]===g?w=t[22]:(w=g.length>0&&(0,c.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:g}),t[21]=g,t[22]=w);let T;t[23]!==h||t[24]!==m?(T=h.length>0&&(0,c.jsx)(`div`,{className:i(`flex shrink-0 items-center`,m===`first-line`?`h-lh self-start`:`self-center`),children:h}),t[23]=h,t[24]=m,t[25]=T):T=t[25];let E;t[26]!==S||t[27]!==C||t[28]!==w||t[29]!==T?(E=(0,c.jsxs)(`div`,{className:S,children:[C,w,T]}),t[26]=S,t[27]=C,t[28]=w,t[29]=T,t[30]=E):E=t[30];let D;return t[31]!==a||t[32]!==E||t[33]!==v||t[34]!==y?(D=(0,c.jsx)(`div`,{className:v,"data-slot":`alert`,"data-variant":y,role:`alert`,...a,children:E}),t[31]=a,t[32]=E,t[33]=v,t[34]=y,t[35]=D):D=t[35],D}function f(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`font-medium`,n),t[3]=n,t[4]=a);let s;return t[5]!==r||t[6]!==a?(s=(0,c.jsx)(`div`,{className:a,"data-slot":`alert-title`,...r}),t[5]=r,t[6]=a,t[7]=s):s=t[7],s}function p(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex flex-col gap-2.5 text-muted-foreground`,n),t[3]=n,t[4]=a);let s;return t[5]!==r||t[6]!==a?(s=(0,c.jsx)(`div`,{className:a,"data-slot":`alert-description`,...r}),t[5]=r,t[6]=a,t[7]=s):s=t[7],s}function m(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex gap-1`,n),t[3]=n,t[4]=a);let s;return t[5]!==r||t[6]!==a?(s=(0,c.jsx)(`div`,{className:a,"data-slot":`alert-action`,...r}),t[5]=r,t[6]=a,t[7]=s):s=t[7],s}f.displayName=`AlertTitle`,p.displayName=`AlertDescription`,m.displayName=`AlertAction`;export{f as i,m as n,p as r,d as t};
2
- //# sourceMappingURL=alert-BdISKl4u.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./utils-DsOiwDNN.js";import{h as a}from"./useRender-BP5vR6yH.js";var o=n(),s=e(t(),1),c=e(r(),1),l=a(`relative rounded-xl border px-3.5 py-3 text-card-foreground text-sm`,{defaultVariants:{surface:`default`,variant:`default`},variants:{surface:{default:``,glass:`alert-glass`},variant:{default:`bg-transparent dark:bg-input/32 [&_svg]:text-muted-foreground`,sidebar:`rounded-lg border-sidebar-border bg-sidebar-control-surface px-2 py-1.5 text-[11px] leading-4 [&_[data-slot=alert-description]]:block [&_[data-slot=alert-description]]:text-sidebar-muted-foreground`,error:`border-error/32 bg-error-surface text-error-foreground [&_[data-slot=alert-description]]:text-error-foreground/80 [&_svg]:text-error`,info:`border-info/32 bg-info/4 [&_svg]:text-info`,success:`border-success/32 bg-success/4 [&_svg]:text-success`,warning:`border-warning/32 bg-warning-surface text-warning-foreground [&_[data-slot=alert-description]]:text-warning-foreground/80 [&_svg]:text-warning`}}});function u(e){let t=e.props[`data-slot`];if(t)return t;let n=e.type;switch(n.displayName??n.name){case`AlertAction`:return`alert-action`;case`AlertTitle`:return`alert-title`;case`AlertDescription`:return`alert-description`;default:return}}function d(e){let t=(0,o.c)(36),n,r,a,d,f,p;t[0]===e?(n=t[1],r=t[2],a=t[3],d=t[4],f=t[5],p=t[6]):({className:r,variant:p,surface:d,controlAlignment:f,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=d,t[5]=f,t[6]=p);let m=f===void 0?`center`:f,h,g,_;t[7]===n?(h=t[8],g=t[9],_=t[10]):(_=[],g=[],h=[],s.Children.forEach(n,e=>{if(!(0,s.isValidElement)(e)){g.push(e);return}let t=u(e);t===`alert-action`?h.push(e):t===`alert-title`||t===`alert-description`?g.push(e):_.push(e)}),t[7]=n,t[8]=h,t[9]=g,t[10]=_);let v;t[11]!==r||t[12]!==d||t[13]!==p?(v=i(l({surface:d,variant:p}),r),t[11]=r,t[12]=d,t[13]=p,t[14]=v):v=t[14];let y=p??`default`,b=m===`first-line`?`items-start`:`items-center`,x=m===`first-line`&&h.length>0&&`min-h-7 pt-1 sm:min-h-6 sm:pt-0.5`,S;t[15]!==b||t[16]!==x?(S=i(`flex gap-2`,b,x),t[15]=b,t[16]=x,t[17]=S):S=t[17];let C;t[18]!==m||t[19]!==_?(C=_.length>0&&(0,c.jsx)(`div`,{className:i(`flex shrink-0 items-center justify-center`,m===`first-line`?`h-lh w-4 [&>svg]:size-4`:`size-4 [&>svg]:size-full`),children:_}),t[18]=m,t[19]=_,t[20]=C):C=t[20];let w;t[21]===g?w=t[22]:(w=g.length>0&&(0,c.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:g}),t[21]=g,t[22]=w);let T;t[23]!==h||t[24]!==m?(T=h.length>0&&(0,c.jsx)(`div`,{className:i(`flex shrink-0 items-center`,m===`first-line`?`h-lh self-start`:`self-center`),children:h}),t[23]=h,t[24]=m,t[25]=T):T=t[25];let E;t[26]!==S||t[27]!==C||t[28]!==w||t[29]!==T?(E=(0,c.jsxs)(`div`,{className:S,children:[C,w,T]}),t[26]=S,t[27]=C,t[28]=w,t[29]=T,t[30]=E):E=t[30];let D;return t[31]!==a||t[32]!==E||t[33]!==v||t[34]!==y?(D=(0,c.jsx)(`div`,{className:v,"data-slot":`alert`,"data-variant":y,role:`alert`,...a,children:E}),t[31]=a,t[32]=E,t[33]=v,t[34]=y,t[35]=D):D=t[35],D}function f(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`font-medium`,n),t[3]=n,t[4]=a);let s;return t[5]!==r||t[6]!==a?(s=(0,c.jsx)(`div`,{className:a,"data-slot":`alert-title`,...r}),t[5]=r,t[6]=a,t[7]=s):s=t[7],s}function p(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex flex-col gap-2.5 text-muted-foreground`,n),t[3]=n,t[4]=a);let s;return t[5]!==r||t[6]!==a?(s=(0,c.jsx)(`div`,{className:a,"data-slot":`alert-description`,...r}),t[5]=r,t[6]=a,t[7]=s):s=t[7],s}function m(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex gap-1`,n),t[3]=n,t[4]=a);let s;return t[5]!==r||t[6]!==a?(s=(0,c.jsx)(`div`,{className:a,"data-slot":`alert-action`,...r}),t[5]=r,t[6]=a,t[7]=s):s=t[7],s}f.displayName=`AlertTitle`,p.displayName=`AlertDescription`,m.displayName=`AlertAction`;export{f as i,m as n,p as r,d as t};
2
+ //# sourceMappingURL=alert-Eh-IusVP.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-Cs97wR6T.js";import{c as i,l as a,n as o,o as s,s as c,t as l,u}from"./DialogTitle-C9j5Tmuy.js";import{f as d,u as f}from"./dialog-BzESHWgr.js";import{t as p}from"./AlertDialogRoot-D2Lzxp77.js";var m=t(),h=e(n(),1),g=p,_=s;function v(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(f,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(u,{forceRender:!0,className:a,"data-slot":`alert-dialog-backdrop`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function y(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center p-4`,n),t[3]=n,t[4]=a);let s;return t[5]!==i||t[6]!==a?(s=(0,h.jsx)(o,{className:a,"data-slot":`alert-dialog-viewport`,...i}),t[5]=i,t[6]=a,t[7]=s):s=t[7],s}function b(e){let t=(0,m.c)(20),n,i,a,o;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4]):({className:n,bottomStickOnMobile:o,portalContainer:i,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o);let s=o===void 0||o,l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,h.jsx)(v,{}),t[5]=l):l=t[5];let u=s&&`max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12`,f;t[6]===u?f=t[7]:(f=r(u),t[6]=u,t[7]=f);let p=s&&`max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4`,g;t[8]!==n||t[9]!==p?(g=r(d,`row-start-2 max-h-full max-w-lg text-popover-foreground`,p,n),t[8]=n,t[9]=p,t[10]=g):g=t[10];let b;t[11]!==a||t[12]!==g?(b=(0,h.jsx)(c,{className:g,"data-slot":`alert-dialog-popup`,...a}),t[11]=a,t[12]=g,t[13]=b):b=t[13];let x;t[14]!==f||t[15]!==b?(x=(0,h.jsx)(y,{className:f,children:b}),t[14]=f,t[15]=b,t[16]=x):x=t[16];let S;return t[17]!==i||t[18]!==x?(S=(0,h.jsxs)(_,{container:i,children:[l,x]}),t[17]=i,t[18]=x,t[19]=S):S=t[19],S}function x(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`flex min-h-0 flex-col gap-2 p-6 text-center max-sm:pb-4 sm:text-left`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(`div`,{className:a,"data-slot":`alert-dialog-header`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function S(e){let t=(0,m.c)(11),n,i,a;t[0]===e?(n=t[1],i=t[2],a=t[3]):({className:n,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a);let o=a===void 0?`default`:a,s=o==="default"&&`border-t bg-muted/72 py-4`,c=o===`bare`&&`pb-6`,l;t[4]!==n||t[5]!==s||t[6]!==c?(l=r(`flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]`,s,c,n),t[4]=n,t[5]=s,t[6]=c,t[7]=l):l=t[7];let u;return t[8]!==i||t[9]!==l?(u=(0,h.jsx)(`div`,{className:l,"data-slot":`alert-dialog-footer`,...i}),t[8]=i,t[9]=l,t[10]=u):u=t[10],u}function C(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`wrap-anywhere shrink-0 font-semibold text-xl leading-none`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(l,{className:a,"data-slot":`alert-dialog-title`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function w(e){let t=(0,m.c)(8),n,a;t[0]===e?(n=t[1],a=t[2]):({className:n,...a}=e,t[0]=e,t[1]=n,t[2]=a);let o;t[3]===n?o=t[4]:(o=r(`wrap-anywhere max-h-[min(24rem,60dvh)] min-h-0 overflow-y-auto overscroll-contain text-muted-foreground text-sm select-text`,n),t[3]=n,t[4]=o);let s;return t[5]!==a||t[6]!==o?(s=(0,h.jsx)(i,{className:o,"data-slot":`alert-dialog-description`,...a}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function T(e){let t=(0,m.c)(2),n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(a,{"data-slot":`alert-dialog-close`,...e}),t[0]=e,t[1]=n),n}export{x as a,S as i,T as n,b as o,w as r,C as s,g as t};
2
- //# sourceMappingURL=alert-dialog-Broi1wym.js.map
1
+ import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-DsOiwDNN.js";import{c as i,l as a,n as o,o as s,s as c,t as l,u}from"./DialogTitle-BNEjkHZl.js";import{f as d,u as f}from"./dialog-wBelv1Ac.js";import{t as p}from"./AlertDialogRoot-CfwItD_i.js";var m=t(),h=e(n(),1),g=p,_=s;function v(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(f,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(u,{forceRender:!0,className:a,"data-slot":`alert-dialog-backdrop`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function y(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center p-4`,n),t[3]=n,t[4]=a);let s;return t[5]!==i||t[6]!==a?(s=(0,h.jsx)(o,{className:a,"data-slot":`alert-dialog-viewport`,...i}),t[5]=i,t[6]=a,t[7]=s):s=t[7],s}function b(e){let t=(0,m.c)(20),n,i,a,o;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4]):({className:n,bottomStickOnMobile:o,portalContainer:i,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o);let s=o===void 0||o,l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,h.jsx)(v,{}),t[5]=l):l=t[5];let u=s&&`max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12`,f;t[6]===u?f=t[7]:(f=r(u),t[6]=u,t[7]=f);let p=s&&`max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4`,g;t[8]!==n||t[9]!==p?(g=r(d,`row-start-2 max-h-full max-w-lg text-popover-foreground`,p,n),t[8]=n,t[9]=p,t[10]=g):g=t[10];let b;t[11]!==a||t[12]!==g?(b=(0,h.jsx)(c,{className:g,"data-slot":`alert-dialog-popup`,...a}),t[11]=a,t[12]=g,t[13]=b):b=t[13];let x;t[14]!==f||t[15]!==b?(x=(0,h.jsx)(y,{className:f,children:b}),t[14]=f,t[15]=b,t[16]=x):x=t[16];let S;return t[17]!==i||t[18]!==x?(S=(0,h.jsxs)(_,{container:i,children:[l,x]}),t[17]=i,t[18]=x,t[19]=S):S=t[19],S}function x(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`flex min-h-0 flex-col gap-2 p-6 text-center max-sm:pb-4 sm:text-left`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(`div`,{className:a,"data-slot":`alert-dialog-header`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function S(e){let t=(0,m.c)(11),n,i,a;t[0]===e?(n=t[1],i=t[2],a=t[3]):({className:n,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a);let o=a===void 0?`default`:a,s=o==="default"&&`border-t bg-muted/72 py-4`,c=o===`bare`&&`pb-6`,l;t[4]!==n||t[5]!==s||t[6]!==c?(l=r(`flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]`,s,c,n),t[4]=n,t[5]=s,t[6]=c,t[7]=l):l=t[7];let u;return t[8]!==i||t[9]!==l?(u=(0,h.jsx)(`div`,{className:l,"data-slot":`alert-dialog-footer`,...i}),t[8]=i,t[9]=l,t[10]=u):u=t[10],u}function C(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`wrap-anywhere shrink-0 font-semibold text-xl leading-snug`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(l,{className:a,"data-slot":`alert-dialog-title`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function w(e){let t=(0,m.c)(8),n,a;t[0]===e?(n=t[1],a=t[2]):({className:n,...a}=e,t[0]=e,t[1]=n,t[2]=a);let o;t[3]===n?o=t[4]:(o=r(`wrap-anywhere max-h-[min(24rem,60dvh)] min-h-0 overflow-y-auto overscroll-contain text-muted-foreground text-sm select-text`,n),t[3]=n,t[4]=o);let s;return t[5]!==a||t[6]!==o?(s=(0,h.jsx)(i,{className:o,"data-slot":`alert-dialog-description`,...a}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function T(e){let t=(0,m.c)(2),n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(a,{"data-slot":`alert-dialog-close`,...e}),t[0]=e,t[1]=n),n}export{x as a,S as i,T as n,b as o,w as r,C as s,g as t};
2
+ //# sourceMappingURL=alert-dialog-BxwvNOYD.js.map
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{Jo as r,Yo as i,xs as a}from"./utils-Cs97wR6T.js";import{Dr as o,xr as s}from"./runtime-DUPVFypn.js";import{s as c}from"./vcsRefInvalidation-CAa5en8i.js";import{s as l}from"./session-BryEqNW-.js";import{c as u,l as d,o as f,t as p,u as m}from"./assets-lJdcWn_Q.js";var h=n(),g=e(t(),1);function _(e,t){let n=(0,h.c)(7),r=(0,g.useContext)(i),a=typeof t==`string`?t:t?.label,o=typeof t==`string`?!0:t?.reportFailure??!0,c=typeof t==`string`?!0:t?.reportDefect??!0,l=typeof t==`string`?!1:t?.refresh??!1,u;return n[0]!==a||n[1]!==e||n[2]!==l||n[3]!==r||n[4]!==c||n[5]!==o?(u=t=>{let n=e(t);return s(r,n,{label:a??n.label?.[0]??`atom query`,reportFailure:o,reportDefect:c,refresh:l})},n[0]=a,n[1]=e,n[2]=l,n[3]=r,n[4]=c,n[5]=o,n[6]=u):u=n[6],u}function v(e,t){let n=(0,h.c)(10),i=c(e),a;n[0]!==t||n[1]!==i?(a=d(t,i),n[0]=t,n[1]=i,n[2]=a):a=n[2];let o=a,s=l(e),m;n[3]!==o||n[4]!==e||n[5]!==t?(m=o!==null||e===null||t===null?f:p.createUrl({environmentId:e,input:{resource:t}}),n[3]=o,n[4]=e,n[5]=t,n[6]=m):m=n[6];let g=r(m);if(o!==null)return o;let _=s._tag===`Some`?s.value.httpBaseUrl:null,v;return n[7]!==g||n[8]!==_?(v=u(g,_),n[7]=g,n[8]=_,n[9]=v):v=n[9],v}function y(e,t){let n=(0,h.c)(6),r=l(e),i=r._tag===`Some`?r.value.httpBaseUrl:null,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1,refresh:!0},n[0]=a):a=n[0];let s=_(p.createUrl,a),c;return n[1]!==e||n[2]!==i||n[3]!==s||n[4]!==t?(c=async()=>{if(e===null||t===null||i===null)return null;let n=await s({environmentId:e,input:{resource:t}});if(n._tag===`Failure`)throw o(n);return m(i,n.value.relativeUrl)},n[1]=e,n[2]=i,n[3]=s,n[4]=t,n[5]=c):c=n[5],c}function b(e,t){let n=l(e),{canReadFiles:i}=c(e),o=(0,g.useMemo)(()=>i?t:t.filter(e=>e._tag!==`workspace-file`&&e._tag!==`media-file`&&e._tag!==`draft-workspace-file`),[i,t]),s=r(p.createUrls({environmentId:e,resources:o}));return(0,g.useMemo)(()=>{if(n._tag===`None`)return t.map(()=>null);let e=0;return t.map(t=>{if(!i&&(t._tag===`workspace-file`||t._tag===`media-file`||t._tag===`draft-workspace-file`))return null;let r=s[e++];return r&&a(r)?m(n.value.httpBaseUrl,r.value.relativeUrl):null})},[i,n,t,s])}export{_ as i,v as n,b as r,y as t};
2
- //# sourceMappingURL=assetUrls-DyJx-URx.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{Qo as r,Zo as i,ws as a}from"./utils-DsOiwDNN.js";import{Dr as o,xr as s}from"./runtime-DYDOkR3G.js";import{s as c}from"./vcsRefInvalidation-CnjZD1r1.js";import{s as l}from"./session-A0FOa5Fv.js";import{c as u,l as d,o as f,t as p,u as m}from"./assets-w0TTeveX.js";var h=n(),g=e(t(),1);function _(e,t){let n=(0,h.c)(7),i=(0,g.useContext)(r),a=typeof t==`string`?t:t?.label,o=typeof t==`string`?!0:t?.reportFailure??!0,c=typeof t==`string`?!0:t?.reportDefect??!0,l=typeof t==`string`?!1:t?.refresh??!1,u;return n[0]!==a||n[1]!==e||n[2]!==l||n[3]!==i||n[4]!==c||n[5]!==o?(u=t=>{let n=e(t);return s(i,n,{label:a??n.label?.[0]??`atom query`,reportFailure:o,reportDefect:c,refresh:l})},n[0]=a,n[1]=e,n[2]=l,n[3]=i,n[4]=c,n[5]=o,n[6]=u):u=n[6],u}function v(e,t){let n=(0,h.c)(10),r=c(e),a;n[0]!==t||n[1]!==r?(a=d(t,r),n[0]=t,n[1]=r,n[2]=a):a=n[2];let o=a,s=l(e),m;n[3]!==o||n[4]!==e||n[5]!==t?(m=o!==null||e===null||t===null?f:p.createUrl({environmentId:e,input:{resource:t}}),n[3]=o,n[4]=e,n[5]=t,n[6]=m):m=n[6];let g=i(m);if(o!==null)return o;let _=s._tag===`Some`?s.value.httpBaseUrl:null,v;return n[7]!==g||n[8]!==_?(v=u(g,_),n[7]=g,n[8]=_,n[9]=v):v=n[9],v}function y(e,t){let n=(0,h.c)(6),r=l(e),i=r._tag===`Some`?r.value.httpBaseUrl:null,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1,refresh:!0},n[0]=a):a=n[0];let s=_(p.createUrl,a),c;return n[1]!==e||n[2]!==i||n[3]!==s||n[4]!==t?(c=async()=>{if(e===null||t===null||i===null)return null;let n=await s({environmentId:e,input:{resource:t}});if(n._tag===`Failure`)throw o(n);return m(i,n.value.relativeUrl)},n[1]=e,n[2]=i,n[3]=s,n[4]=t,n[5]=c):c=n[5],c}function b(e,t){let n=l(e),{canReadFiles:r}=c(e),o=(0,g.useMemo)(()=>r?t:t.filter(e=>e._tag!==`workspace-file`&&e._tag!==`media-file`&&e._tag!==`draft-workspace-file`),[r,t]),s=i(p.createUrls({environmentId:e,resources:o}));return(0,g.useMemo)(()=>{if(n._tag===`None`)return t.map(()=>null);let e=0;return t.map(t=>{if(!r&&(t._tag===`workspace-file`||t._tag===`media-file`||t._tag===`draft-workspace-file`))return null;let i=s[e++];return i&&a(i)?m(n.value.httpBaseUrl,i.value.relativeUrl):null})},[r,n,t,s])}export{_ as i,v as n,b as r,y as t};
2
+ //# sourceMappingURL=assetUrls-Bk8CvVQ5.js.map
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Cs as t,Ds as n,Js as r,Qs as i,Zo as a,cs as o,es as s,fs as c,hs as l,is as u,rs as d}from"./utils-DsOiwDNN.js";import{Bs as f,Cd as p,Lc as m,Pu as h,Xs as g,Zm as _,ch as v,ec as y,hd as ee,lc as b,lh as x,mc as S,mh as te,n as ne,ns as re,vc as ie,y as ae,yc as C}from"./src-B7vcPG0D.js";import{Ar as w,Hr as T,Vr as E,a as D,h as O,hr as k,i as A,n as j,rr as M,t as N}from"./runtime-DYDOkR3G.js";import{m as P,n as F}from"./server-DQkamj54.js";import{t as I}from"./session-A0FOa5Fv.js";import{t as L}from"./env-BfPir1X4.js";import{t as R}from"./sourceControl-Tyc4OKDH.js";var z=18e5,oe=3e5,B=36e5,V=class extends ie()(`InvalidAssetCollectionKeyError`,{key:S,cause:y()}){get message(){return`Invalid asset collection atom key: ${JSON.stringify(this.key)}.`}},H=m(C([f,g(ae)]));function U(e){try{return H(JSON.parse(e))}catch(t){throw new V({key:e,cause:t})}}function W(e,t){try{return new URL(t,e).toString()}catch{return null}}var G=d(t(!1)).pipe(c(`asset-url:empty`)),K=`This connection cannot read host files. Pair again with a new link to view it.`;function q(e,t){return e===null||t.canReadFiles||e._tag!==`workspace-file`&&e._tag!==`media-file`&&e._tag!==`draft-workspace-file`?null:t.isPending?{_tag:`Loading`}:t.error===null?{_tag:`Failure`,reason:`missing-file-access`}:{_tag:`Failure`}}function J(e,t){if(e._tag===`Failure`)return{_tag:`Failure`};if(t===null||e._tag!==`Success`)return{_tag:`Loading`};let n=W(t,e.value.relativeUrl);return n===null?{_tag:`Failure`}:{_tag:`Success`,url:n,expiresAt:e.value.expiresAt,...e.value.sourcePath===void 0?{}:{sourcePath:e.value.sourcePath},...e.value.imageDimensions===void 0?{}:{imageDimensions:e.value.imageDimensions}}}function se(e,t){let n=new Map,r=(e,t)=>{let r=n.get(e);return r===void 0&&(r=re(6),n.set(e,r)),w(ne.assetsCreateUrl,t).pipe(r.withPermit)},i=h(`assets.createUrl`)(function*(e){let n=yield*T,i=yield*r(n.target.environmentId,e).pipe(p);if(_(i))return i.success;let a=i.failure,o=e.resource,s=t?(yield*l).get(t):null;if(!s||s.environmentId===n.target.environmentId||a._tag!==`AssetWorkspaceAssetNotFoundError`&&a._tag!==`AssetWorkspaceAssetInspectionError`&&a._tag!==`AssetWorkspaceContextNotFoundError`||o._tag!==`media-file`||!(o.path.startsWith(`/`)||M(o.path))||O(o.path.slice(o.path.lastIndexOf(`.`)))===null)return yield*a;let c=yield*(yield*E).run(s.environmentId,r(s.environmentId,e));return{...c,relativeUrl:new URL(c.relativeUrl,s.httpBaseUrl).href}}),a=k(e,{label:`environment-data:assets:create-url`,execute:i,staleTimeMs:oe,idleTtlMs:B,refreshIntervalMs:z,refreshTrigger:({input:e})=>e.resource._tag===`media-file`?t:void 0}),u=s(e=>{let[t,n]=U(e);return d(e=>n.map(n=>e(a({environmentId:t,input:{resource:n}})))).pipe(o(B),c(`environment-data:assets:create-urls:${e}`))});return{createUrl:a,createUrls:e=>u(JSON.stringify([e.environmentId,e.resources]))}}function ce(e){let t=m(C([f,S,b(S)])),r=e.projectClones,i=s(i=>{let[a,s,c]=t(JSON.parse(i)),l={_tag:`project-favicon`,cwd:s,...c?{path:c}:{}},f=e.createUrl({environmentId:a,input:{resource:l}}),p=r?f.pipe(u(d(e=>e(r(a)).find(e=>e.destinationPath===s)?.phase??null))):f,m=d(t=>{let n=t(p),r=t(e.preparedConnection(a)),i=J(n,te(r)?r.value.httpBaseUrl:null);return i._tag===`Success`?i.url:x(t.self())}).pipe(o(B)),h=e.imageCache;if(!h)return m;let g={environmentId:a,cwd:s,faviconPath:c},_=d(e=>{e(p);let t=e(m);return ee(e=>h.resolve(g,t,e))}).pipe(o(B));return d(e=>{let t=e(_);return D(e(m))?null:v(n(t),()=>h.peek(g))}).pipe(o(B))});return e=>i(A(e.environmentId,e.cwd,e.faviconPath))}var Y=e(),X=[],Z=d(null).pipe(c(`web-project-clone:empty`)),Q=s(e=>d(t=>{if(t(F).get(e)?.environment.capabilities.projectCloneTracking!==!0)return X;let r=t(R.projectClones({environmentId:e,input:{}}));return v(n(r),()=>X)}).pipe(c(`web-project-clones:${e}`))),le=s(e=>{let t=r(e);return d(e=>t===null?null:e(Q(t.environmentId)).find(e=>e.projectId===t.projectId)??null).pipe(c(`web-project-clone:${e}`))});function ue(e){let t=(0,Y.c)(2),n;return t[0]===e?n=t[1]:(n=e===null?Z:le(i(e)),t[0]=e,t[1]=n),a(n)}function de(e){let t=(0,Y.c)(2),n;return t[0]===e?n=t[1]:(n=Q(e),t[0]=e,t[1]=n),a(n)}var fe=d(e=>{if(!L)return null;let t=e(P);if(t===null)return null;let n=e(I.preparedConnectionValueAtom(t)),r=e(I.initialConfigValueAtom(t));return n._tag===`None`||r===null?null:{environmentId:t,httpBaseUrl:n.value.httpBaseUrl}}),$=se(N,fe),pe=ce({imageCache:j,createUrl:$.createUrl,preparedConnection:I.preparedConnectionValueAtom,projectClones:Q});export{ue as a,J as c,de as i,q as l,pe as n,G as o,Q as r,K as s,$ as t,W as u};
2
+ //# sourceMappingURL=assets-w0TTeveX.js.map
@@ -1,2 +1,2 @@
1
- import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{B as t,H as n,Jo as r,Po as i,R as a,U as o,W as s,Wo as c,Xs as l}from"./utils-Cs97wR6T.js";import{li as u,ui as d,vi as f}from"./src-BZzGU-vc.js";import{$r as p,Qr as m,_ as ee,ti as h}from"./runtime-DUPVFypn.js";import{i as g,y as te}from"./entities-CpJdh0W5.js";import{n as _,r as v,s as ne}from"./useSettings-C6RmJr-q.js";import{m as y}from"./server-BYnv0CK4.js";import{r as b}from"./session-BryEqNW-.js";import{t as x}from"./env-BfPir1X4.js";import{i as S,t as re}from"./preview-DIIM6Lws.js";var C=e();function ie(e){if(g(e)&&!(i()&&e!==c.get(y)))return`server`}function ae(e,t,n,r){return!r||!n||!i()||e===t?null:r.runtime===`server`?`desktop`:`server`}function oe(e){return i()||g(e)}function w(e){let t=(0,C.c)(2),n=te(e),r;return t[0]===n?r=t[1]:(r=i()||n,t[0]=n,t[1]=r),r}function T(e,t,n){return x&&n?.runtime===`server`&&!n.headless&&t!==null&&e===t}function E(e,t){let n=(0,C.c)(4),i=r(y),a;return n[0]!==e||n[1]!==t||n[2]!==i?(a=T(e,i,t),n[0]=e,n[1]=t,n[2]=i,n[3]=a):a=n[3],a}var se=e=>e._tag===`fill`?`fill`:`${e._tag}:${e.width}:${e.height}:${e._tag===`preset`?e.presetId:``}`,D=e=>Number.isFinite(e)&&e>0?e:1;function ce(e,t,n=1){if(e._tag!==`fill`)return e;let r=D(n);return t?{_tag:`freeform`,width:Math.max(1,Math.round(t.width/t.scale/r)),height:Math.max(1,Math.round(t.height/t.scale/r))}:{_tag:`freeform`,width:1280,height:800}}function O(e){return{width:Math.max(1,e.width-20),height:Math.max(1,e.height-38-10)}}function k(e,t,n=1){let r=Math.max(1,Math.round(e.width)),i=Math.max(1,Math.round(e.height));if(t._tag===`fill`)return{canvasWidth:r,canvasHeight:i,viewportX:0,viewportY:0,viewportWidth:r,viewportHeight:i,viewportScale:1,fillsPanel:!0};let a=D(n),o=t.width*a,s=t.height*a,c=Math.min(1,r/o,i/s),l=o*c,u=s*c;return{canvasWidth:r,canvasHeight:i,viewportX:Math.max(0,Math.round((r-l)/2)),viewportY:Math.max(0,Math.round((i-u)/2)),viewportWidth:l,viewportHeight:u,viewportScale:c,fillsPanel:!1}}function le(e,t,n=1){let r=k(O(e),t,n);return{...r,canvasWidth:Math.max(1,Math.round(e.width)),canvasHeight:Math.max(1,Math.round(e.height)),viewportX:r.viewportX+10,viewportY:r.viewportY+38}}var A=e=>Math.min(d,Math.max(240,e)),ue=e=>e!==void 0&&Number.isFinite(e)&&e>0;function j(e,t,n){if(n===`width`){let n=Math.ceil(Math.max(240,240*t)),r=Math.floor(Math.min(d,d*t,Math.sqrt(u*t))),i=Math.min(r,Math.max(n,Math.round(e))),a=Math.round(i/t);for(;i*a>8294400&&i>n;)--i,a=Math.round(i/t);return{width:i,height:a}}let r=Math.ceil(Math.max(240,240/t)),i=Math.floor(Math.min(d,d/t,Math.sqrt(u/t))),a=Math.min(i,Math.max(r,Math.round(e))),o=Math.round(a*t);for(;o*a>8294400&&a>r;)--a,o=Math.round(a*t);return{width:o,height:a}}function M(e,t,n=1,r=`southeast`,i){let a=D(n),o=r.includes(`east`)?t.x:r.includes(`west`)?-t.x:0,s=r.includes(`south`)?t.y:r.includes(`north`)?-t.y:0,c=e.width+o/a,l=e.height+s/a;if(ue(i)){let t=o!==0||r===`east`||r===`west`,n=s!==0||r===`north`||r===`south`,a=t&&!n?`width`:n&&!t?`height`:Math.abs(c-e.width)/e.width>=Math.abs(l-e.height)/e.height?`width`:`height`;return j(a===`width`?c:l,i,a)}let d=A(Math.round(c)),f=A(Math.round(l));return d*f<=8294400||(Math.abs(o)>=Math.abs(s)?d=Math.max(240,Math.floor(u/f)):f=Math.max(240,Math.floor(u/d))),{width:d,height:f}}var N=(e,t,n)=>{let r=(e<n?(n+e)/2:e)+t;return r<=n?r*2-n:r},P=(e,t,n)=>{if(e>n){let r=e-n;return t<=r?e-t:n-(t-r)*2}let r=(n-e)/2+t;return r>=0?n-r*2:n-r};function F(e,t,n,r=1,i=`southeast`,a){let o=D(r),s=e.width*o,c=e.height*o,l=i.includes(`east`)?N(s,t.x,n.width):i.includes(`west`)?P(s,t.x,n.width):s,u=i.includes(`south`)?N(c,t.y,n.height):i.includes(`north`)?P(c,t.y,n.height):c,d=l-s,f=u-c;return M(e,{x:i.includes(`west`)?-d:d,y:i.includes(`north`)?-f:f},o,i,a)}function I(e,t=1){let n=O(e),r=D(t);return M({width:n.width/r,height:n.height/r},{x:0,y:0})}var L=e=>{let t=f(e.browserProfiles);return{viewport:e.browserDefaultViewport,zoomFactor:e.browserDefaultZoomFactor,appearance:e.browserDefaultAppearance,autoShowFloatingPreview:e.browserAutoShowFloatingPreview,profiles:t,profileId:t.find(t=>t.id===e.browserDefaultProfileId&&t.kind!==`incognito`)?.id??`default`}};function R(){return L(v())}async function z(){return await _(),R()}function B(){return ne(L)}function V(e=R()){return{zoomFactor:e.zoomFactor,colorScheme:e.appearance}}function H(e=R()){return e.viewport}function U(e=R()){return e.profileId}var de={width:1024,height:768};function fe(e){let t=e.defaults??R();return t.viewport._tag===`fill`?{_tag:`freeform`,...e.panelRect?I(e.panelRect,e.zoomFactor):de}:t.viewport}var pe=e=>{let t=b(e);if(!t)throw Error(`Environment ${e} is not connected.`);return new URL(t.httpBaseUrl)},me=(e,t,n,r,i)=>{if(!p(n.hostname))throw Error(`This environment port needs the planned authenticated preview gateway; its server address is not directly private-network reachable.`);let a=t.protocol??`http`,o=t.path?.startsWith(`/`)?t.path:`/${t.path??``}`,s=n.hostname.replace(/^\[|\]$/g,``),c=m(s)?`localhost`:s.includes(`:`)?`[${s}]`:s,l=i?new URL(i):new URL(o,`${a}://${c}:${t.port}`);return i&&(l.hostname=c,l.port=String(t.port)),{requestedUrl:r??`${a}://localhost:${t.port}${o}`,resolvedUrl:l.toString(),resolutionKind:m(s)?`direct`:`direct-private-network`,environmentId:e}},he=e=>x&&(e._tag===`PrimaryConnectionTarget`||ee(e));function W(e,t){try{let n=S(t),r=new URL(n);if(!re(r.hostname))return n;let i=b(e)?.target;return i&&he(i)?n:me(e,{kind:`environment-port`,port:Number(r.port||(r.protocol===`https:`?443:80)),protocol:r.protocol===`https:`?`https`:`http`,path:`${r.pathname}${r.search}${r.hash}`},pe(e),t,r).resolvedUrl}catch{return t}}var ge=2048,_e=864e13;function G(e){return typeof e==`number`&&Number.isFinite(e)&&Math.abs(e)<=_e}function K(e){let t;try{t=new URL(S(e))}catch{return null}return t.username=t.password=``,t.href.length>ge?null:t.href}function q(e,t){let n=new URL(J(e,t));return n.pathname!==`/`&&n.pathname.endsWith(`/`)&&(n.pathname=n.pathname.slice(0,-1)),n.href}function J(e,t){let n=new URL(e),r=h(n.hostname),i=t&&h(t);return(m(r)||r===`0.0.0.0`||r===i)&&(n.hostname=`local`),n.href}function Y(e){let t=h(new URL(e).hostname);return m(t)||t===`0.0.0.0`}function ve(e,t,n,r){let i=J(t,r?.environmentHostname),a=e.find(e=>J(e.url,r?.environmentHostname)===i),o=e.filter(e=>J(e.url,r?.environmentHostname)!==i),s=r?.insertOrdered&&a&&a.lastVisitedAt>n?a.lastVisitedAt:n,c=a&&(Y(a.url)||!Y(t))?a.url:t,l=a?{...a,url:c,lastVisitedAt:s}:{url:t,lastVisitedAt:s};if(!r?.insertOrdered)return[l,...o].slice(0,50);let u=o.findIndex(e=>e.lastVisitedAt<l.lastVisitedAt);return(u===-1?[...o,l]:o.toSpliced(u,0,l)).slice(0,50)}function X(e){let t=Object.keys(e);if(t.length<=20)return e;let n=t.toSorted((t,n)=>(e[n]?.[0]?.lastVisitedAt??0)-(e[t]?.[0]?.lastVisitedAt??0)).slice(0,20);return Object.fromEntries(n.map(t=>[t,e[t]??[]]))}function Z(e){if(!e||typeof e!=`object`)return{byProjectKey:{}};let t=e.byProjectKey;if(!t||typeof t!=`object`||Array.isArray(t))return{byProjectKey:{}};let n={};for(let[e,r]of Object.entries(t)){if(!Array.isArray(r))continue;let t=new Set,i=r.flatMap(e=>{if(!e||typeof e!=`object`)return[];let{url:t,lastVisitedAt:n,title:r}=e;if(typeof t!=`string`)return[];let i=K(t);return!i||!G(n)?[]:[{url:i,lastVisitedAt:n,...typeof r==`string`&&r.length>0?{title:r.slice(0,512)}:{}}]}).toSorted((e,t)=>t.lastVisitedAt-e.lastVisitedAt).filter(e=>{let n=J(e.url);return!t.has(n)&&(t.add(n),!0)}).slice(0,50);i.length>0&&(n[e]=i)}return{byProjectKey:X(n)}}var ye=`p4code:browser-history:v1`,be=20;function Q(e,t,n){let r=e[t]??[],i={...e};i[t]=[...r,n].slice(-10);let a=Object.keys(i);if(a.length>be){let e=a[0];e!==void 0&&e!==t&&delete i[e]}return i}var $=s()(o((e,t)=>({byProjectKey:{},projectKeyByThreadKey:{},pendingVisitsByThreadKey:{},pendingTitlesByThreadKey:{},recordVisit:(t,n,r,i)=>{let a=K(n);a&&e(e=>({byProjectKey:X({...e.byProjectKey,[t]:ve(e.byProjectKey[t]??[],a,r,i)})}))},setTitleForUrl:(n,r,i,a)=>{let o=K(r),s=t(),c=s.byProjectKey[n],l=i.trim().slice(0,512);if(!o||!c||l.length===0)return;let u=q(o,a),d=c.findIndex(e=>q(e.url,a)===u);d!==-1&&c[d]?.title!==l&&e({byProjectKey:{...s.byProjectKey,[n]:c.map((e,t)=>t===d?{...e,title:l}:e)}})},removeUrl:(n,r)=>{let i=K(r),a=t(),o=a.byProjectKey[n];if(!i||!o)return;let s=o.filter(e=>e.url!==i);if(s.length!==o.length){if(s.length===0){let{[n]:t,...r}=a.byProjectKey;e({byProjectKey:r})}else e({byProjectKey:{...a.byProjectKey,[n]:s}})}},registerThreadProject:(n,r)=>{let i=l(n),a=t(),o=a.pendingVisitsByThreadKey[i],s=a.pendingTitlesByThreadKey[i];if(a.projectKeyByThreadKey[i]===r&&!o&&!s)return;let c={...a.pendingVisitsByThreadKey},u={...a.pendingTitlesByThreadKey};delete c[i],delete u[i],e({projectKeyByThreadKey:{...a.projectKeyByThreadKey,[i]:r},pendingVisitsByThreadKey:c,pendingTitlesByThreadKey:u});for(let e of o??[])t().recordVisit(r,e.url,e.at,{insertOrdered:!0,environmentHostname:e.environmentHostname});for(let e of s??[])t().setTitleForUrl(r,e.url,e.title,e.environmentHostname)}}),{name:ye,version:1,storage:n(()=>a(typeof window<`u`?window.localStorage:void 0)),partialize:e=>({byProjectKey:e.byProjectKey,projectKeyByThreadKey:e.projectKeyByThreadKey}),migrate:Z,merge:xe}));function xe(e,t){let n=Z(e);return{...t,...n,projectKeyByThreadKey:Se(e,n.byProjectKey),pendingVisitsByThreadKey:{},pendingTitlesByThreadKey:{}}}function Se(e,t){if(!e||typeof e!=`object`)return{};let n=e.projectKeyByThreadKey;return!n||typeof n!=`object`||Array.isArray(n)?{}:Object.fromEntries(Object.entries(n).filter(e=>typeof e[1]==`string`&&e[1]in t).slice(-100))}function Ce(e,t,n){let r=l(e),i=$.getState(),a=i.projectKeyByThreadKey[r],o=n??Date.now(),s=b(e.environmentId),c=s?new URL(s.httpBaseUrl).hostname:null;a?i.recordVisit(a,t,o,{environmentHostname:c}):$.setState({pendingVisitsByThreadKey:Q(i.pendingVisitsByThreadKey,r,{url:t,at:o,environmentHostname:c})})}function we(e,t,n,r){let i=l(e),a=$.getState(),o=a.projectKeyByThreadKey[i];o?a.setTitleForUrl(o,t,n,r):$.setState({pendingTitlesByThreadKey:Q(a.pendingTitlesByThreadKey,i,{url:t,title:n,environmentHostname:r})})}function Te(e,t){let n=$.getState(),r=n.projectKeyByThreadKey[l(e)];r&&n.removeUrl(r,t)}var Ee=[];function De(e,n){let r=(0,C.c)(3),i;return r[0]!==n||r[1]!==e?(i=t=>{let r=t.projectKeyByThreadKey[l(e)],i=r?t.byProjectKey[r]:void 0;return i&&i.length>0?i.slice(0,n):Ee},r[0]=n,r[1]=e,r[2]=i):i=r[2],$(t(i))}export{T as C,ie as S,E as T,le as _,De as a,ae as b,H as c,z as d,B as f,O as g,M as h,we as i,V as l,F as m,Ce as n,W as o,se as p,Te as r,U as s,G as t,fe as u,k as v,w,oe as x,ce as y};
2
- //# sourceMappingURL=browserHistoryStore-zdRsIuMc.js.map
1
+ import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{$s as t,B as n,H as r,Lo as i,R as a,U as o,W as s,Zo as c,qo as l}from"./utils-DsOiwDNN.js";import{di as u,ui as d,yi as f}from"./src-B7vcPG0D.js";import{$r as p,Qr as m,_ as ee,ti as h}from"./runtime-DYDOkR3G.js";import{i as g,y as te}from"./entities-CRXY8xy3.js";import{n as _,r as v,s as ne}from"./useSettings-BOuYsEM0.js";import{m as y}from"./server-DQkamj54.js";import{r as b}from"./session-A0FOa5Fv.js";import{t as x}from"./env-BfPir1X4.js";import{i as S,t as re}from"./preview-CiDRJw3K.js";var C=e();function ie(e){if(g(e)&&!(i()&&e!==l.get(y)))return`server`}function ae(e,t,n,r){return!r||!n||!i()||e===t?null:r.runtime===`server`?`desktop`:`server`}function oe(e){return i()||g(e)}function w(e){let t=(0,C.c)(2),n=te(e),r;return t[0]===n?r=t[1]:(r=i()||n,t[0]=n,t[1]=r),r}function T(e,t,n){return x&&n?.runtime===`server`&&!n.headless&&t!==null&&e===t}function E(e,t){let n=(0,C.c)(4),r=c(y),i;return n[0]!==e||n[1]!==t||n[2]!==r?(i=T(e,r,t),n[0]=e,n[1]=t,n[2]=r,n[3]=i):i=n[3],i}var se=e=>e._tag===`fill`?`fill`:`${e._tag}:${e.width}:${e.height}:${e._tag===`preset`?e.presetId:``}`,D=e=>Number.isFinite(e)&&e>0?e:1;function ce(e,t,n=1){if(e._tag!==`fill`)return e;let r=D(n);return t?{_tag:`freeform`,width:Math.max(1,Math.round(t.width/t.scale/r)),height:Math.max(1,Math.round(t.height/t.scale/r))}:{_tag:`freeform`,width:1280,height:800}}function O(e){return{width:Math.max(1,e.width-20),height:Math.max(1,e.height-38-10)}}function k(e,t,n=1){let r=Math.max(1,Math.round(e.width)),i=Math.max(1,Math.round(e.height));if(t._tag===`fill`)return{canvasWidth:r,canvasHeight:i,viewportX:0,viewportY:0,viewportWidth:r,viewportHeight:i,viewportScale:1,fillsPanel:!0};let a=D(n),o=t.width*a,s=t.height*a,c=Math.min(1,r/o,i/s),l=o*c,u=s*c;return{canvasWidth:r,canvasHeight:i,viewportX:Math.max(0,Math.round((r-l)/2)),viewportY:Math.max(0,Math.round((i-u)/2)),viewportWidth:l,viewportHeight:u,viewportScale:c,fillsPanel:!1}}function le(e,t,n=1){let r=k(O(e),t,n);return{...r,canvasWidth:Math.max(1,Math.round(e.width)),canvasHeight:Math.max(1,Math.round(e.height)),viewportX:r.viewportX+10,viewportY:r.viewportY+38}}var A=e=>Math.min(u,Math.max(240,e)),ue=e=>e!==void 0&&Number.isFinite(e)&&e>0;function j(e,t,n){if(n===`width`){let n=Math.ceil(Math.max(240,240*t)),r=Math.floor(Math.min(u,u*t,Math.sqrt(d*t))),i=Math.min(r,Math.max(n,Math.round(e))),a=Math.round(i/t);for(;i*a>8294400&&i>n;)--i,a=Math.round(i/t);return{width:i,height:a}}let r=Math.ceil(Math.max(240,240/t)),i=Math.floor(Math.min(u,u/t,Math.sqrt(d/t))),a=Math.min(i,Math.max(r,Math.round(e))),o=Math.round(a*t);for(;o*a>8294400&&a>r;)--a,o=Math.round(a*t);return{width:o,height:a}}function M(e,t,n=1,r=`southeast`,i){let a=D(n),o=r.includes(`east`)?t.x:r.includes(`west`)?-t.x:0,s=r.includes(`south`)?t.y:r.includes(`north`)?-t.y:0,c=e.width+o/a,l=e.height+s/a;if(ue(i)){let t=o!==0||r===`east`||r===`west`,n=s!==0||r===`north`||r===`south`,a=t&&!n?`width`:n&&!t?`height`:Math.abs(c-e.width)/e.width>=Math.abs(l-e.height)/e.height?`width`:`height`;return j(a===`width`?c:l,i,a)}let u=A(Math.round(c)),f=A(Math.round(l));return u*f<=8294400||(Math.abs(o)>=Math.abs(s)?u=Math.max(240,Math.floor(d/f)):f=Math.max(240,Math.floor(d/u))),{width:u,height:f}}var N=(e,t,n)=>{let r=(e<n?(n+e)/2:e)+t;return r<=n?r*2-n:r},P=(e,t,n)=>{if(e>n){let r=e-n;return t<=r?e-t:n-(t-r)*2}let r=(n-e)/2+t;return r>=0?n-r*2:n-r};function F(e,t,n,r=1,i=`southeast`,a){let o=D(r),s=e.width*o,c=e.height*o,l=i.includes(`east`)?N(s,t.x,n.width):i.includes(`west`)?P(s,t.x,n.width):s,u=i.includes(`south`)?N(c,t.y,n.height):i.includes(`north`)?P(c,t.y,n.height):c,d=l-s,f=u-c;return M(e,{x:i.includes(`west`)?-d:d,y:i.includes(`north`)?-f:f},o,i,a)}function I(e,t=1){let n=O(e),r=D(t);return M({width:n.width/r,height:n.height/r},{x:0,y:0})}var L=e=>{let t=f(e.browserProfiles);return{viewport:e.browserDefaultViewport,zoomFactor:e.browserDefaultZoomFactor,appearance:e.browserDefaultAppearance,autoShowFloatingPreview:e.browserAutoShowFloatingPreview,profiles:t,profileId:t.find(t=>t.id===e.browserDefaultProfileId&&t.kind!==`incognito`)?.id??`default`}};function R(){return L(v())}async function z(){return await _(),R()}function B(){return ne(L)}function V(e=R()){return{zoomFactor:e.zoomFactor,colorScheme:e.appearance}}function H(e=R()){return e.viewport}function U(e=R()){return e.profileId}var de={width:1024,height:768};function fe(e){let t=e.defaults??R();return t.viewport._tag===`fill`?{_tag:`freeform`,...e.panelRect?I(e.panelRect,e.zoomFactor):de}:t.viewport}var pe=e=>{let t=b(e);if(!t)throw Error(`Environment ${e} is not connected.`);return new URL(t.httpBaseUrl)},me=(e,t,n,r,i)=>{if(!p(n.hostname))throw Error(`This environment port needs the planned authenticated preview gateway; its server address is not directly private-network reachable.`);let a=t.protocol??`http`,o=t.path?.startsWith(`/`)?t.path:`/${t.path??``}`,s=n.hostname.replace(/^\[|\]$/g,``),c=m(s)?`localhost`:s.includes(`:`)?`[${s}]`:s,l=i?new URL(i):new URL(o,`${a}://${c}:${t.port}`);return i&&(l.hostname=c,l.port=String(t.port)),{requestedUrl:r??`${a}://localhost:${t.port}${o}`,resolvedUrl:l.toString(),resolutionKind:m(s)?`direct`:`direct-private-network`,environmentId:e}},he=e=>x&&(e._tag===`PrimaryConnectionTarget`||ee(e));function W(e,t){try{let n=S(t),r=new URL(n);if(!re(r.hostname))return n;let i=b(e)?.target;return i&&he(i)?n:me(e,{kind:`environment-port`,port:Number(r.port||(r.protocol===`https:`?443:80)),protocol:r.protocol===`https:`?`https`:`http`,path:`${r.pathname}${r.search}${r.hash}`},pe(e),t,r).resolvedUrl}catch{return t}}var ge=2048,_e=864e13;function G(e){return typeof e==`number`&&Number.isFinite(e)&&Math.abs(e)<=_e}function K(e){let t;try{t=new URL(S(e))}catch{return null}return t.username=t.password=``,t.href.length>ge?null:t.href}function q(e,t){let n=new URL(J(e,t));return n.pathname!==`/`&&n.pathname.endsWith(`/`)&&(n.pathname=n.pathname.slice(0,-1)),n.href}function J(e,t){let n=new URL(e),r=h(n.hostname),i=t&&h(t);return(m(r)||r===`0.0.0.0`||r===i)&&(n.hostname=`local`),n.href}function Y(e){let t=h(new URL(e).hostname);return m(t)||t===`0.0.0.0`}function ve(e,t,n,r){let i=J(t,r?.environmentHostname),a=e.find(e=>J(e.url,r?.environmentHostname)===i),o=e.filter(e=>J(e.url,r?.environmentHostname)!==i),s=r?.insertOrdered&&a&&a.lastVisitedAt>n?a.lastVisitedAt:n,c=a&&(Y(a.url)||!Y(t))?a.url:t,l=a?{...a,url:c,lastVisitedAt:s}:{url:t,lastVisitedAt:s};if(!r?.insertOrdered)return[l,...o].slice(0,50);let u=o.findIndex(e=>e.lastVisitedAt<l.lastVisitedAt);return(u===-1?[...o,l]:o.toSpliced(u,0,l)).slice(0,50)}function X(e){let t=Object.keys(e);if(t.length<=20)return e;let n=t.toSorted((t,n)=>(e[n]?.[0]?.lastVisitedAt??0)-(e[t]?.[0]?.lastVisitedAt??0)).slice(0,20);return Object.fromEntries(n.map(t=>[t,e[t]??[]]))}function Z(e){if(!e||typeof e!=`object`)return{byProjectKey:{}};let t=e.byProjectKey;if(!t||typeof t!=`object`||Array.isArray(t))return{byProjectKey:{}};let n={};for(let[e,r]of Object.entries(t)){if(!Array.isArray(r))continue;let t=new Set,i=r.flatMap(e=>{if(!e||typeof e!=`object`)return[];let{url:t,lastVisitedAt:n,title:r}=e;if(typeof t!=`string`)return[];let i=K(t);return!i||!G(n)?[]:[{url:i,lastVisitedAt:n,...typeof r==`string`&&r.length>0?{title:r.slice(0,512)}:{}}]}).toSorted((e,t)=>t.lastVisitedAt-e.lastVisitedAt).filter(e=>{let n=J(e.url);return!t.has(n)&&(t.add(n),!0)}).slice(0,50);i.length>0&&(n[e]=i)}return{byProjectKey:X(n)}}var ye=`p4code:browser-history:v1`,be=20;function Q(e,t,n){let r=e[t]??[],i={...e};i[t]=[...r,n].slice(-10);let a=Object.keys(i);if(a.length>be){let e=a[0];e!==void 0&&e!==t&&delete i[e]}return i}var $=s()(o((e,n)=>({byProjectKey:{},projectKeyByThreadKey:{},pendingVisitsByThreadKey:{},pendingTitlesByThreadKey:{},recordVisit:(t,n,r,i)=>{let a=K(n);a&&e(e=>({byProjectKey:X({...e.byProjectKey,[t]:ve(e.byProjectKey[t]??[],a,r,i)})}))},setTitleForUrl:(t,r,i,a)=>{let o=K(r),s=n(),c=s.byProjectKey[t],l=i.trim().slice(0,512);if(!o||!c||l.length===0)return;let u=q(o,a),d=c.findIndex(e=>q(e.url,a)===u);d!==-1&&c[d]?.title!==l&&e({byProjectKey:{...s.byProjectKey,[t]:c.map((e,t)=>t===d?{...e,title:l}:e)}})},removeUrl:(t,r)=>{let i=K(r),a=n(),o=a.byProjectKey[t];if(!i||!o)return;let s=o.filter(e=>e.url!==i);if(s.length!==o.length){if(s.length===0){let{[t]:n,...r}=a.byProjectKey;e({byProjectKey:r})}else e({byProjectKey:{...a.byProjectKey,[t]:s}})}},registerThreadProject:(r,i)=>{let a=t(r),o=n(),s=o.pendingVisitsByThreadKey[a],c=o.pendingTitlesByThreadKey[a];if(o.projectKeyByThreadKey[a]===i&&!s&&!c)return;let l={...o.pendingVisitsByThreadKey},u={...o.pendingTitlesByThreadKey};delete l[a],delete u[a],e({projectKeyByThreadKey:{...o.projectKeyByThreadKey,[a]:i},pendingVisitsByThreadKey:l,pendingTitlesByThreadKey:u});for(let e of s??[])n().recordVisit(i,e.url,e.at,{insertOrdered:!0,environmentHostname:e.environmentHostname});for(let e of c??[])n().setTitleForUrl(i,e.url,e.title,e.environmentHostname)}}),{name:ye,version:1,storage:r(()=>a(typeof window<`u`?window.localStorage:void 0)),partialize:e=>({byProjectKey:e.byProjectKey,projectKeyByThreadKey:e.projectKeyByThreadKey}),migrate:Z,merge:xe}));function xe(e,t){let n=Z(e);return{...t,...n,projectKeyByThreadKey:Se(e,n.byProjectKey),pendingVisitsByThreadKey:{},pendingTitlesByThreadKey:{}}}function Se(e,t){if(!e||typeof e!=`object`)return{};let n=e.projectKeyByThreadKey;return!n||typeof n!=`object`||Array.isArray(n)?{}:Object.fromEntries(Object.entries(n).filter(e=>typeof e[1]==`string`&&e[1]in t).slice(-100))}function Ce(e,n,r){let i=t(e),a=$.getState(),o=a.projectKeyByThreadKey[i],s=r??Date.now(),c=b(e.environmentId),l=c?new URL(c.httpBaseUrl).hostname:null;o?a.recordVisit(o,n,s,{environmentHostname:l}):$.setState({pendingVisitsByThreadKey:Q(a.pendingVisitsByThreadKey,i,{url:n,at:s,environmentHostname:l})})}function we(e,n,r,i){let a=t(e),o=$.getState(),s=o.projectKeyByThreadKey[a];s?o.setTitleForUrl(s,n,r,i):$.setState({pendingTitlesByThreadKey:Q(o.pendingTitlesByThreadKey,a,{url:n,title:r,environmentHostname:i})})}function Te(e,n){let r=$.getState(),i=r.projectKeyByThreadKey[t(e)];i&&r.removeUrl(i,n)}var Ee=[];function De(e,r){let i=(0,C.c)(3),a;return i[0]!==r||i[1]!==e?(a=n=>{let i=n.projectKeyByThreadKey[t(e)],a=i?n.byProjectKey[i]:void 0;return a&&a.length>0?a.slice(0,r):Ee},i[0]=r,i[1]=e,i[2]=a):a=i[2],$(n(a))}export{T as C,ie as S,E as T,le as _,De as a,ae as b,H as c,z as d,B as f,O as g,M as h,we as i,V as l,F as m,Ce as n,W as o,se as p,Te as r,U as s,G as t,fe as u,k as v,w,oe as x,ce as y};
2
+ //# sourceMappingURL=browserHistoryStore-CQgs_U0x.js.map
@@ -1,2 +1,2 @@
1
- import{n as e,r as t}from"./useSettings-C6RmJr-q.js";import{x as n}from"./browserHistoryStore-zdRsIuMc.js";function r(e){return e.event.metaKey||e.event.ctrlKey||e.preference!==`app`||!e.canOpenInApp||!i(e.url)?`system`:`app`}function i(e){try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}async function a(){return await e(),t().browserLinkTarget}function o(e){return e!=null&&n(e.environmentId)}export{r as i,i as n,a as r,o as t};
2
- //# sourceMappingURL=browserLinkTarget-aye_Gpt4.js.map
1
+ import{n as e,r as t}from"./useSettings-BOuYsEM0.js";import{x as n}from"./browserHistoryStore-CQgs_U0x.js";function r(e){return e.event.metaKey||e.event.ctrlKey||e.preference!==`app`||!e.canOpenInApp||!i(e.url)?`system`:`app`}function i(e){try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}async function a(){return await e(),t().browserLinkTarget}function o(e){return e!=null&&n(e.environmentId)}export{r as i,i as n,a as r,o as t};
2
+ //# sourceMappingURL=browserLinkTarget-BD9wK52f.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-Cs97wR6T.js";import{n as i,t as a}from"./CheckboxIndicator-CLFg8-A1.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(9),n,c;t[0]===e?(n=t[1],c=t[2]):({className:n,...c}=e,t[0]=e,t[1]=n,t[2]=c);let u;t[3]===n?u=t[4]:(u=r(`relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:outline-destructive/48 data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:focus-visible:aria-invalid:outline-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none`,n),t[3]=n,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,s.jsx)(a,{className:`-inset-px absolute flex items-center justify-center rounded-[.25rem] text-primary-foreground data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground in-[[data-slot=checkbox]:focus-visible]:inset-shadow-[0_0_0_3px_var(--background)] in-[[data-slot=checkbox]:focus-visible]:outline-2 in-[[data-slot=checkbox]:focus-visible]:outline-solid in-[[data-slot=checkbox]:focus-visible]:-outline-offset-2 in-[[data-slot=checkbox]:focus-visible]:outline-inherit`,"data-slot":`checkbox-indicator`,render:l}),t[5]=d):d=t[5];let f;return t[6]!==c||t[7]!==u?(f=(0,s.jsx)(i,{className:u,"data-slot":`checkbox`,...c,children:d}),t[6]=c,t[7]=u,t[8]=f):f=t[8],f}function l(e,t){return(0,s.jsx)(`span`,{...e,children:t.indeterminate?(0,s.jsx)(`svg`,{className:`size-3.5 text-current sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.jsx)(`path`,{d:`M5.252 12h13.496`})}):(0,s.jsx)(`svg`,{className:`size-3.5 text-current sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})})}export{c as t};
2
- //# sourceMappingURL=checkbox-ueGFMqVv.js.map
1
+ import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-DsOiwDNN.js";import{n as i,t as a}from"./CheckboxIndicator-BpGIx6Ze.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(9),n,c;t[0]===e?(n=t[1],c=t[2]):({className:n,...c}=e,t[0]=e,t[1]=n,t[2]=c);let u;t[3]===n?u=t[4]:(u=r(`relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:outline-destructive/48 data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:focus-visible:aria-invalid:outline-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none`,n),t[3]=n,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,s.jsx)(a,{className:`-inset-px absolute flex items-center justify-center rounded-[.25rem] text-primary-foreground data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground in-[[data-slot=checkbox]:focus-visible]:inset-shadow-[0_0_0_3px_var(--background)] in-[[data-slot=checkbox]:focus-visible]:outline-2 in-[[data-slot=checkbox]:focus-visible]:outline-solid in-[[data-slot=checkbox]:focus-visible]:-outline-offset-2 in-[[data-slot=checkbox]:focus-visible]:outline-inherit`,"data-slot":`checkbox-indicator`,render:l}),t[5]=d):d=t[5];let f;return t[6]!==c||t[7]!==u?(f=(0,s.jsx)(i,{className:u,"data-slot":`checkbox`,...c,children:d}),t[6]=c,t[7]=u,t[8]=f):f=t[8],f}function l(e,t){return(0,s.jsx)(`span`,{...e,children:t.indeterminate?(0,s.jsx)(`svg`,{className:`size-3.5 text-current sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.jsx)(`path`,{d:`M5.252 12h13.496`})}):(0,s.jsx)(`svg`,{className:`size-3.5 text-current sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})})}export{c as t};
2
+ //# sourceMappingURL=checkbox-CDoyvSyH.js.map
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./utils-Cs97wR6T.js";function a(e){let t=Number.parseInt(e.slice(1),16),n=(t>>16&255)/255,r=(t>>8&255)/255,i=(t&255)/255,a=Math.max(n,r,i),o=a-Math.min(n,r,i),s=0;return o!==0&&(s=a===n?(r-i)/o%6:a===r?(i-n)/o+2:(n-r)/o+4,s*=60,s<0&&(s+=360)),{h:s,s:a===0?0:o/a,v:a}}function o(e,t,n){let r=(e%360+360)%360,i=n*t,a=i*(1-Math.abs(r/60%2-1)),o=n-i,[s,c,l]=r<60?[i,a,0]:r<120?[a,i,0]:r<180?[0,i,a]:r<240?[0,a,i]:r<300?[a,0,i]:[i,0,a];return`#${[s,c,l].map(e=>Math.round((e+o)*255).toString(16).padStart(2,`0`)).join(``)}`}var s=n(),c=e(t(),1),l=e(r(),1);function u(e){return Math.min(1,Math.max(0,e))}function d(e,t,n){let r=(0,s.c)(9),[i,a]=(0,c.useState)(!1),o=(0,c.useRef)(null),l;r[0]===t?l=r[1]:(l=e=>{o.current===e.pointerId&&(o.current=null,a(!1),t?.())},r[0]=t,r[1]=l);let u=l,d=i?void 0:`left 80ms linear, top 80ms linear, background-color 80ms linear`,f;r[2]!==n?.current||r[3]!==u||r[4]!==e?(f={onPointerDown(t){o.current===null&&t.button===0&&(o.current=t.pointerId,(n?.current??t.currentTarget).focus({preventScroll:!0}),t.currentTarget.setPointerCapture(t.pointerId),a(!0),e(t))},onPointerMove(t){o.current===t.pointerId&&e(t)},onPointerUp:u,onPointerCancel:u,onLostPointerCapture:u},r[2]=n?.current,r[3]=u,r[4]=e,r[5]=f):f=r[5];let p;return r[6]!==d||r[7]!==f?(p={thumbTransition:d,handlers:f},r[6]=d,r[7]=f,r[8]=p):p=r[8],p}function f(e){let t=(0,s.c)(31),{label:n,value:r,onChange:a,onInteractionEnd:o,className:f,variant:p}=e,m=p===void 0?`inset`:p,h=(0,c.useId)(),g=(0,c.useRef)(null),_;t[0]!==a||t[1]!==r?(_=e=>{let t=e.currentTarget.getBoundingClientRect();t.width&&t.height&&a({...r,s:u((e.clientX-t.left)/t.width),v:1-u((e.clientY-t.top)/t.height)})},t[0]=a,t[1]=r,t[2]=_):_=t[2];let{handlers:v,thumbTransition:y}=d(_,o,g),b;t[3]!==a||t[4]!==r?(b=(e,t)=>{let n=e.shiftKey?.1:.02,i;bb18:switch(e.key){case`ArrowRight`:case`ArrowUp`:i=u(r[t]+n);break bb18;case`ArrowLeft`:case`ArrowDown`:i=u(r[t]-n);break bb18;case`Home`:i=0;break bb18;case`End`:i=1;break bb18;default:return}e.preventDefault(),a({...r,[t]:i})},t[3]=a,t[4]=r,t[5]=b):b=t[5];let x=b,S=`${n} saturation and brightness`,C=m===`edge`?`h-36 rounded-none`:`h-32 rounded-lg`,w;t[6]!==f||t[7]!==C?(w=i(`relative cursor-crosshair touch-none overflow-hidden bg-[linear-gradient(to_top,#000,transparent),linear-gradient(to_right,#fff,transparent)] has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-inset has-[:focus-visible]:ring-ring has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-popover`,C,f),t[6]=f,t[7]=C,t[8]=w):w=t[8];let T=`hsl(${r.h} 100% 50%)`,E;t[9]===T?E=t[10]:(E={backgroundColor:T},t[9]=T,t[10]=E);let D;t[11]===h?D=t[12]:(D=(0,l.jsx)(`span`,{id:h,className:`sr-only`,children:`Use arrow keys to adjust the focused value. Hold Shift for larger steps. Use Home and End for the minimum and maximum. Press Tab to move between saturation and brightness.`}),t[11]=h,t[12]=D);let O;t[13]!==x||t[14]!==h||t[15]!==n||t[16]!==a||t[17]!==r?(O=[[`s`,`Saturation`],[`v`,`Brightness`]].map(e=>{let[t,i]=e;return(0,l.jsxs)(`label`,{className:`contents`,children:[(0,l.jsx)(`input`,{ref:t===`s`?g:void 0,type:`range`,min:0,max:100,step:`any`,value:r[t]*100,"aria-label":`${n} ${i.toLowerCase()}`,"aria-describedby":h,"aria-valuetext":`${Math.round(r[t]*100)}%`,className:`peer sr-only`,onKeyDown:e=>x(e,t),onChange:e=>a({...r,[t]:e.currentTarget.valueAsNumber/100})}),(0,l.jsxs)(`span`,{"aria-hidden":!0,className:`pointer-events-none invisible absolute bottom-2 left-2 z-10 rounded bg-popover px-1.5 py-0.5 text-xs text-popover-foreground peer-focus-visible:visible`,children:[i,` `,Math.round(r[t]*100),`%`]})]},t)}),t[13]=x,t[14]=h,t[15]=n,t[16]=a,t[17]=r,t[18]=O):O=t[18];let k=`calc(${r.s} * (100% - 0.75rem) + 0.375rem)`,A=`calc(${1-r.v} * (100% - 0.75rem) + 0.375rem)`,j;t[19]!==k||t[20]!==A||t[21]!==y?(j=(0,l.jsx)(`span`,{className:`pointer-events-none absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.4)]`,style:{left:k,top:A,transition:y}}),t[19]=k,t[20]=A,t[21]=y,t[22]=j):j=t[22];let M;return t[23]!==v||t[24]!==O||t[25]!==j||t[26]!==S||t[27]!==w||t[28]!==E||t[29]!==D?(M=(0,l.jsxs)(`div`,{"aria-label":S,role:`group`,className:w,style:E,...v,children:[D,O,j]}),t[23]=v,t[24]=O,t[25]=j,t[26]=S,t[27]=w,t[28]=E,t[29]=D,t[30]=M):M=t[30],M}function p(e){let t=(0,s.c)(21),{label:n,value:r,onChange:a,onInteractionEnd:o,className:c}=e,f;t[0]===a?f=t[1]:(f=e=>{let t=e.currentTarget.getBoundingClientRect();t.width&&a(u((e.clientX-t.left)/t.width)*360)},t[0]=a,t[1]=f);let{handlers:p,thumbTransition:m}=d(f,o),h;t[2]!==a||t[3]!==r?(h=e=>{if(e.key===`Home`||e.key===`End`){e.preventDefault(),a(e.key===`Home`?0:360);return}if(![`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`].includes(e.key))return;e.preventDefault();let t=e.shiftKey?10:1,n=e.key===`ArrowRight`||e.key===`ArrowUp`?1:-1;a((r+n*t+360)%360)},t[2]=a,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===r?_=t[6]:(_=Math.round(r),t[5]=r,t[6]=_);let v;t[7]===c?v=t[8]:(v=i(`relative flex h-6 cursor-pointer touch-none items-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-popover`,c),t[7]=c,t[8]=v);let y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,l.jsx)(`span`,{"aria-hidden":!0,className:`h-2.5 w-full rounded-full bg-[linear-gradient(to_right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)] shadow-[inset_0_0_0_1px_rgb(0_0_0_/_12%)]`}),t[9]=y):y=t[9];let b=`calc(${r/360} * (100% - 1rem) + 0.5rem)`,x=`hsl(${r} 100% 50%)`,S;t[10]!==b||t[11]!==x||t[12]!==m?(S=(0,l.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.4)]`,style:{left:b,backgroundColor:x,transition:m}}),t[10]=b,t[11]=x,t[12]=m,t[13]=S):S=t[13];let C;return t[14]!==g||t[15]!==p||t[16]!==n||t[17]!==_||t[18]!==v||t[19]!==S?(C=(0,l.jsxs)(`div`,{"aria-label":n,"aria-valuemax":360,"aria-valuemin":0,"aria-valuenow":_,className:v,role:`slider`,tabIndex:0,onKeyDown:g,...p,children:[y,S]}),t[14]=g,t[15]=p,t[16]=n,t[17]=_,t[18]=v,t[19]=S,t[20]=C):C=t[20],C}export{o as i,f as n,a as r,p as t};
2
- //# sourceMappingURL=color-picker-CUoPp4AJ.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./utils-DsOiwDNN.js";function a(e){let t=Number.parseInt(e.slice(1),16),n=(t>>16&255)/255,r=(t>>8&255)/255,i=(t&255)/255,a=Math.max(n,r,i),o=a-Math.min(n,r,i),s=0;return o!==0&&(s=a===n?(r-i)/o%6:a===r?(i-n)/o+2:(n-r)/o+4,s*=60,s<0&&(s+=360)),{h:s,s:a===0?0:o/a,v:a}}function o(e,t,n){let r=(e%360+360)%360,i=n*t,a=i*(1-Math.abs(r/60%2-1)),o=n-i,[s,c,l]=r<60?[i,a,0]:r<120?[a,i,0]:r<180?[0,i,a]:r<240?[0,a,i]:r<300?[a,0,i]:[i,0,a];return`#${[s,c,l].map(e=>Math.round((e+o)*255).toString(16).padStart(2,`0`)).join(``)}`}var s=n(),c=e(t(),1),l=e(r(),1);function u(e){return Math.min(1,Math.max(0,e))}function d(e,t,n){let r=(0,s.c)(9),[i,a]=(0,c.useState)(!1),o=(0,c.useRef)(null),l;r[0]===t?l=r[1]:(l=e=>{o.current===e.pointerId&&(o.current=null,a(!1),t?.())},r[0]=t,r[1]=l);let u=l,d=i?void 0:`left 80ms linear, top 80ms linear, background-color 80ms linear`,f;r[2]!==n?.current||r[3]!==u||r[4]!==e?(f={onPointerDown(t){o.current===null&&t.button===0&&(o.current=t.pointerId,(n?.current??t.currentTarget).focus({preventScroll:!0}),t.currentTarget.setPointerCapture(t.pointerId),a(!0),e(t))},onPointerMove(t){o.current===t.pointerId&&e(t)},onPointerUp:u,onPointerCancel:u,onLostPointerCapture:u},r[2]=n?.current,r[3]=u,r[4]=e,r[5]=f):f=r[5];let p;return r[6]!==d||r[7]!==f?(p={thumbTransition:d,handlers:f},r[6]=d,r[7]=f,r[8]=p):p=r[8],p}function f(e){let t=(0,s.c)(31),{label:n,value:r,onChange:a,onInteractionEnd:o,className:f,variant:p}=e,m=p===void 0?`inset`:p,h=(0,c.useId)(),g=(0,c.useRef)(null),_;t[0]!==a||t[1]!==r?(_=e=>{let t=e.currentTarget.getBoundingClientRect();t.width&&t.height&&a({...r,s:u((e.clientX-t.left)/t.width),v:1-u((e.clientY-t.top)/t.height)})},t[0]=a,t[1]=r,t[2]=_):_=t[2];let{handlers:v,thumbTransition:y}=d(_,o,g),b;t[3]!==a||t[4]!==r?(b=(e,t)=>{let n=e.shiftKey?.1:.02,i;bb18:switch(e.key){case`ArrowRight`:case`ArrowUp`:i=u(r[t]+n);break bb18;case`ArrowLeft`:case`ArrowDown`:i=u(r[t]-n);break bb18;case`Home`:i=0;break bb18;case`End`:i=1;break bb18;default:return}e.preventDefault(),a({...r,[t]:i})},t[3]=a,t[4]=r,t[5]=b):b=t[5];let x=b,S=`${n} saturation and brightness`,C=m===`edge`?`h-36 rounded-none`:`h-32 rounded-lg`,w;t[6]!==f||t[7]!==C?(w=i(`relative cursor-crosshair touch-none overflow-hidden bg-[linear-gradient(to_top,#000,transparent),linear-gradient(to_right,#fff,transparent)] has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-inset has-[:focus-visible]:ring-ring has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-popover`,C,f),t[6]=f,t[7]=C,t[8]=w):w=t[8];let T=`hsl(${r.h} 100% 50%)`,E;t[9]===T?E=t[10]:(E={backgroundColor:T},t[9]=T,t[10]=E);let D;t[11]===h?D=t[12]:(D=(0,l.jsx)(`span`,{id:h,className:`sr-only`,children:`Use arrow keys to adjust the focused value. Hold Shift for larger steps. Use Home and End for the minimum and maximum. Press Tab to move between saturation and brightness.`}),t[11]=h,t[12]=D);let O;t[13]!==x||t[14]!==h||t[15]!==n||t[16]!==a||t[17]!==r?(O=[[`s`,`Saturation`],[`v`,`Brightness`]].map(e=>{let[t,i]=e;return(0,l.jsxs)(`label`,{className:`contents`,children:[(0,l.jsx)(`input`,{ref:t===`s`?g:void 0,type:`range`,min:0,max:100,step:`any`,value:r[t]*100,"aria-label":`${n} ${i.toLowerCase()}`,"aria-describedby":h,"aria-valuetext":`${Math.round(r[t]*100)}%`,className:`peer sr-only`,onKeyDown:e=>x(e,t),onChange:e=>a({...r,[t]:e.currentTarget.valueAsNumber/100})}),(0,l.jsxs)(`span`,{"aria-hidden":!0,className:`pointer-events-none invisible absolute bottom-2 left-2 z-10 rounded bg-popover px-1.5 py-0.5 text-xs text-popover-foreground peer-focus-visible:visible`,children:[i,` `,Math.round(r[t]*100),`%`]})]},t)}),t[13]=x,t[14]=h,t[15]=n,t[16]=a,t[17]=r,t[18]=O):O=t[18];let k=`calc(${r.s} * (100% - 0.75rem) + 0.375rem)`,A=`calc(${1-r.v} * (100% - 0.75rem) + 0.375rem)`,j;t[19]!==k||t[20]!==A||t[21]!==y?(j=(0,l.jsx)(`span`,{className:`pointer-events-none absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.4)]`,style:{left:k,top:A,transition:y}}),t[19]=k,t[20]=A,t[21]=y,t[22]=j):j=t[22];let M;return t[23]!==v||t[24]!==O||t[25]!==j||t[26]!==S||t[27]!==w||t[28]!==E||t[29]!==D?(M=(0,l.jsxs)(`div`,{"aria-label":S,role:`group`,className:w,style:E,...v,children:[D,O,j]}),t[23]=v,t[24]=O,t[25]=j,t[26]=S,t[27]=w,t[28]=E,t[29]=D,t[30]=M):M=t[30],M}function p(e){let t=(0,s.c)(21),{label:n,value:r,onChange:a,onInteractionEnd:o,className:c}=e,f;t[0]===a?f=t[1]:(f=e=>{let t=e.currentTarget.getBoundingClientRect();t.width&&a(u((e.clientX-t.left)/t.width)*360)},t[0]=a,t[1]=f);let{handlers:p,thumbTransition:m}=d(f,o),h;t[2]!==a||t[3]!==r?(h=e=>{if(e.key===`Home`||e.key===`End`){e.preventDefault(),a(e.key===`Home`?0:360);return}if(![`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`].includes(e.key))return;e.preventDefault();let t=e.shiftKey?10:1,n=e.key===`ArrowRight`||e.key===`ArrowUp`?1:-1;a((r+n*t+360)%360)},t[2]=a,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===r?_=t[6]:(_=Math.round(r),t[5]=r,t[6]=_);let v;t[7]===c?v=t[8]:(v=i(`relative flex h-6 cursor-pointer touch-none items-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-popover`,c),t[7]=c,t[8]=v);let y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,l.jsx)(`span`,{"aria-hidden":!0,className:`h-2.5 w-full rounded-full bg-[linear-gradient(to_right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)] shadow-[inset_0_0_0_1px_rgb(0_0_0_/_12%)]`}),t[9]=y):y=t[9];let b=`calc(${r/360} * (100% - 1rem) + 0.5rem)`,x=`hsl(${r} 100% 50%)`,S;t[10]!==b||t[11]!==x||t[12]!==m?(S=(0,l.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.4)]`,style:{left:b,backgroundColor:x,transition:m}}),t[10]=b,t[11]=x,t[12]=m,t[13]=S):S=t[13];let C;return t[14]!==g||t[15]!==p||t[16]!==n||t[17]!==_||t[18]!==v||t[19]!==S?(C=(0,l.jsxs)(`div`,{"aria-label":n,"aria-valuemax":360,"aria-valuemin":0,"aria-valuenow":_,className:v,role:`slider`,tabIndex:0,onKeyDown:g,...p,children:[y,S]}),t[14]=g,t[15]=p,t[16]=n,t[17]=_,t[18]=v,t[19]=S,t[20]=C):C=t[20],C}export{o as i,f as n,a as r,p as t};
2
+ //# sourceMappingURL=color-picker-BOsv4n_B.js.map
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Nl as i,lf as a,rp as o,t as s}from"./utils-Cs97wR6T.js";import{n as c}from"./useRender-BP5vR6yH.js";import{a as l,c as u,f as d,h as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x}from"./ComboboxClear-DKHwuDAL.js";import{t as S}from"./input-K95B1E2P.js";import{t as C}from"./scroll-area-D9QT2Odm.js";var w=e(t()),T=e(r());function E(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,T.jsx)(h,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var D=w.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=u();return c(`div`,e,{ref:[t,s],props:[{children:a,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),O=n(),k=w.createContext({chipsRef:null,multiple:!1});function A(e){let t=(0,O.c)(7),n=w.useRef(null),r=!!e.multiple,i;t[0]===r?i=t[1]:(i={chipsRef:n,multiple:r},t[0]=r,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o=(0,T.jsx)(E,{...e}),t[2]=e,t[3]=o);let s;return t[4]!==o||t[5]!==a?(s=(0,T.jsx)(k,{value:a,children:o}),t[4]=o,t[5]=a,t[6]=s):s=t[6],s}function j(e){let t=(0,O.c)(35),n,r,a,c,l,u,d;t[0]===e?(n=t[1],r=t[2],a=t[3],c=t[4],l=t[5],u=t[6],d=t[7]):({className:n,showTrigger:l,showClear:u,startAddon:c,size:a,unstyled:d,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=c,t[5]=l,t[6]=u,t[7]=d);let f=l===void 0||l,m=u!==void 0&&u,h=d!==void 0&&d,g=a??`default`,_;t[8]===c?_=t[9]:(_=c&&(0,T.jsx)(`div`,{"aria-hidden":`true`,className:`[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,"data-slot":`combobox-start-addon`,children:c}),t[8]=c,t[9]=_);let y=c&&`data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]`,b=g===`sm`?`has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5`:`has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7`,x;t[10]!==n||t[11]!==y||t[12]!==b?(x=s(y,b,n),t[10]=n,t[11]=y,t[12]=b,t[13]=x):x=t[13];let C=h&&`rounded-none bg-transparent text-sm`,w;t[14]===C?w=t[15]:(w=s(`has-disabled:opacity-100`,C),t[14]=C,t[15]=w);let E;t[16]!==g||t[17]!==w||t[18]!==h?(E=(0,T.jsx)(S,{className:w,nativeInput:!0,size:g,unstyled:h}),t[16]=g,t[17]=w,t[18]=h,t[19]=E):E=t[19];let D;t[20]!==r||t[21]!==E||t[22]!==x?(D=(0,T.jsx)(v,{className:x,"data-slot":`combobox-input`,render:E,...r}),t[20]=r,t[21]=E,t[22]=x,t[23]=D):D=t[23];let k;t[24]!==f||t[25]!==g?(k=f&&(0,T.jsx)(N,{className:s(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,g===`sm`?`end-0`:`end-0.5`),children:(0,T.jsx)(p,{"data-slot":`combobox-icon`,children:(0,T.jsx)(i,{})})}),t[24]=f,t[25]=g,t[26]=k):k=t[26];let A;t[27]!==m||t[28]!==g?(A=m&&(0,T.jsx)(z,{className:s(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,g===`sm`?`end-0`:`end-0.5`),children:(0,T.jsx)(o,{})}),t[27]=m,t[28]=g,t[29]=A):A=t[29];let j;return t[30]!==D||t[31]!==k||t[32]!==A||t[33]!==_?(j=(0,T.jsxs)(`div`,{className:`relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64`,children:[_,D,k,A]}),t[30]=D,t[31]=k,t[32]=A,t[33]=_,t[34]=j):j=t[34],j}function M(e){let t=(0,O.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,T.jsx)(a,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1.5 left-0 size-4 shrink-0 text-muted-foreground/55`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,T.jsx)(`div`,{className:`min-w-0 shrink-0 px-3 pt-2.5`,children:(0,T.jsxs)(`div`,{className:`relative -translate-y-px border-b border-border/70 pb-1.5 transition-colors focus-within:border-ring`,children:[n,(0,T.jsx)(j,{...e,className:`[&_input]:h-6.5 [&_input]:ps-5 [&_input]:font-sans [&_input]:leading-6.5`,showTrigger:!1,size:`sm`,unstyled:!0})]})}),t[1]=e,t[2]=r),r}function N(e){let t=(0,O.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a=(0,T.jsx)(d,{className:r,"data-slot":`combobox-trigger`,...i,children:n}),t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function P(e){let t=(0,O.c)(24),n,r,i,a,o,c,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],c=t[6],u=t[7],d=t[8]):({className:a,children:i,side:c,sideOffset:u,alignOffset:n,align:d,anchor:r,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=c,t[7]=u,t[8]=d);let f=c===void 0?`bottom`:c,p=u===void 0?4:u,m=d===void 0?`start`:d,{chipsRef:h,multiple:g}=w.use(k),v=r??(g?h:void 0),y;t[9]===a?y=t[10]:(y=s(`dropdown-glass relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-2xl shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] transition-[scale,opacity] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]`,a),t[9]=a,t[10]=y);let x;t[11]!==i||t[12]!==o?(x=(0,T.jsx)(l,{className:`flex min-w-0 max-h-[min(var(--available-height),23rem)] flex-1 flex-col overflow-hidden text-foreground`,"data-slot":`combobox-popup`,...o,children:i}),t[11]=i,t[12]=o,t[13]=x):x=t[13];let S;t[14]!==y||t[15]!==x?(S=(0,T.jsx)(`span`,{className:y,children:x}),t[14]=y,t[15]=x,t[16]=S):S=t[16];let C;return t[17]!==m||t[18]!==n||t[19]!==v||t[20]!==f||t[21]!==p||t[22]!==S?(C=(0,T.jsx)(b,{children:(0,T.jsx)(_,{align:m,alignOffset:n,anchor:v,className:`z-[130] select-none`,"data-slot":`combobox-positioner`,side:f,sideOffset:p,children:S})}),t[17]=m,t[18]=n,t[19]=v,t[20]=f,t[21]=p,t[22]=S,t[23]=C):C=t[23],C}function F(e){let t=(0,O.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,hideIndicator:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=s(`flex min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-pointer items-center rounded-xl px-2 py-1 text-base outline-none not-data-disabled:hover:bg-accent data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-selected:bg-accent data-selected:text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground [&[data-highlighted][data-selected]]:bg-accent [&[data-highlighted][data-selected]]:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[5]=r,t[6]=o);let c;t[7]===n?c=t[8]:(c=(0,T.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 [&_svg:not([class*='text-'])]:text-muted-foreground`,"data-slot":`combobox-item-content`,children:n}),t[7]=n,t[8]=c);let l;return t[9]!==i||t[10]!==o||t[11]!==c?(l=(0,T.jsx)(y,{className:o,"data-slot":`combobox-item`,...i,children:c}),t[9]=i,t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function I(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(g,{className:i,"data-slot":`combobox-empty`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function L(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(C,{scrollbarGutter:!0,scrollFade:!0,children:(0,T.jsx)(m,{className:i,"data-slot":`combobox-list`,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function R(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`size-full min-w-0 not-empty:px-1 not-empty:py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(m,{className:i,"data-slot":`combobox-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function z(e){let t=(0,O.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,T.jsx)(x,{className:n,"data-slot":`combobox-clear`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function B(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(D,{className:i,"data-slot":`combobox-status`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var V=f;export{R as a,B as c,E as d,L as i,N as l,I as n,P as o,F as r,M as s,A as t,V as u};
2
- //# sourceMappingURL=combobox-BfOjf6Iu.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Il as i,cp as a,pf as o,t as s}from"./utils-DsOiwDNN.js";import{n as c}from"./useRender-BP5vR6yH.js";import{a as l,c as u,f as d,h as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x}from"./ComboboxClear-DI8al7ca.js";import{t as S}from"./input-Cd-93Wp0.js";import{t as C}from"./scroll-area-B1iVi_db.js";var w=e(t()),T=e(r());function E(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,T.jsx)(h,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var D=w.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=u();return c(`div`,e,{ref:[t,s],props:[{children:a,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),O=n(),k=w.createContext({chipsRef:null,multiple:!1});function A(e){let t=(0,O.c)(7),n=w.useRef(null),r=!!e.multiple,i;t[0]===r?i=t[1]:(i={chipsRef:n,multiple:r},t[0]=r,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o=(0,T.jsx)(E,{...e}),t[2]=e,t[3]=o);let s;return t[4]!==o||t[5]!==a?(s=(0,T.jsx)(k,{value:a,children:o}),t[4]=o,t[5]=a,t[6]=s):s=t[6],s}function j(e){let t=(0,O.c)(35),n,r,o,c,l,u,d;t[0]===e?(n=t[1],r=t[2],o=t[3],c=t[4],l=t[5],u=t[6],d=t[7]):({className:n,showTrigger:l,showClear:u,startAddon:c,size:o,unstyled:d,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=c,t[5]=l,t[6]=u,t[7]=d);let f=l===void 0||l,m=u!==void 0&&u,h=d!==void 0&&d,g=o??`default`,_;t[8]===c?_=t[9]:(_=c&&(0,T.jsx)(`div`,{"aria-hidden":`true`,className:`[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,"data-slot":`combobox-start-addon`,children:c}),t[8]=c,t[9]=_);let y=c&&`data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]`,b=g===`sm`?`has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5`:`has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7`,x;t[10]!==n||t[11]!==y||t[12]!==b?(x=s(y,b,n),t[10]=n,t[11]=y,t[12]=b,t[13]=x):x=t[13];let C=h&&`rounded-none bg-transparent text-sm`,w;t[14]===C?w=t[15]:(w=s(`has-disabled:opacity-100`,C),t[14]=C,t[15]=w);let E;t[16]!==g||t[17]!==w||t[18]!==h?(E=(0,T.jsx)(S,{className:w,nativeInput:!0,size:g,unstyled:h}),t[16]=g,t[17]=w,t[18]=h,t[19]=E):E=t[19];let D;t[20]!==r||t[21]!==E||t[22]!==x?(D=(0,T.jsx)(v,{className:x,"data-slot":`combobox-input`,render:E,...r}),t[20]=r,t[21]=E,t[22]=x,t[23]=D):D=t[23];let k;t[24]!==f||t[25]!==g?(k=f&&(0,T.jsx)(N,{className:s(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,g===`sm`?`end-0`:`end-0.5`),children:(0,T.jsx)(p,{"data-slot":`combobox-icon`,children:(0,T.jsx)(i,{})})}),t[24]=f,t[25]=g,t[26]=k):k=t[26];let A;t[27]!==m||t[28]!==g?(A=m&&(0,T.jsx)(z,{className:s(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,g===`sm`?`end-0`:`end-0.5`),children:(0,T.jsx)(a,{})}),t[27]=m,t[28]=g,t[29]=A):A=t[29];let j;return t[30]!==D||t[31]!==k||t[32]!==A||t[33]!==_?(j=(0,T.jsxs)(`div`,{className:`relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64`,children:[_,D,k,A]}),t[30]=D,t[31]=k,t[32]=A,t[33]=_,t[34]=j):j=t[34],j}function M(e){let t=(0,O.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,T.jsx)(o,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1.5 left-0 size-4 shrink-0 text-muted-foreground/55`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,T.jsx)(`div`,{className:`min-w-0 shrink-0 px-3 pt-2.5`,children:(0,T.jsxs)(`div`,{className:`relative -translate-y-px border-b border-border/70 pb-1.5 transition-colors focus-within:border-ring`,children:[n,(0,T.jsx)(j,{...e,className:`[&_input]:h-6.5 [&_input]:ps-5 [&_input]:font-sans [&_input]:leading-6.5`,showTrigger:!1,size:`sm`,unstyled:!0})]})}),t[1]=e,t[2]=r),r}function N(e){let t=(0,O.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a=(0,T.jsx)(d,{className:r,"data-slot":`combobox-trigger`,...i,children:n}),t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function P(e){let t=(0,O.c)(24),n,r,i,a,o,c,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],c=t[6],u=t[7],d=t[8]):({className:a,children:i,side:c,sideOffset:u,alignOffset:n,align:d,anchor:r,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=c,t[7]=u,t[8]=d);let f=c===void 0?`bottom`:c,p=u===void 0?4:u,m=d===void 0?`start`:d,{chipsRef:h,multiple:g}=w.use(k),v=r??(g?h:void 0),y;t[9]===a?y=t[10]:(y=s(`dropdown-glass relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-2xl shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] transition-[scale,opacity] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]`,a),t[9]=a,t[10]=y);let x;t[11]!==i||t[12]!==o?(x=(0,T.jsx)(l,{className:`flex min-w-0 max-h-[min(var(--available-height),23rem)] flex-1 flex-col overflow-hidden text-foreground`,"data-slot":`combobox-popup`,...o,children:i}),t[11]=i,t[12]=o,t[13]=x):x=t[13];let S;t[14]!==y||t[15]!==x?(S=(0,T.jsx)(`span`,{className:y,children:x}),t[14]=y,t[15]=x,t[16]=S):S=t[16];let C;return t[17]!==m||t[18]!==n||t[19]!==v||t[20]!==f||t[21]!==p||t[22]!==S?(C=(0,T.jsx)(b,{children:(0,T.jsx)(_,{align:m,alignOffset:n,anchor:v,className:`z-[130] select-none`,"data-slot":`combobox-positioner`,side:f,sideOffset:p,children:S})}),t[17]=m,t[18]=n,t[19]=v,t[20]=f,t[21]=p,t[22]=S,t[23]=C):C=t[23],C}function F(e){let t=(0,O.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,hideIndicator:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=s(`flex min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-pointer items-center rounded-xl px-2 py-1 text-base outline-none not-data-disabled:hover:bg-accent data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-selected:bg-accent data-selected:text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground [&[data-highlighted][data-selected]]:bg-accent [&[data-highlighted][data-selected]]:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[5]=r,t[6]=o);let c;t[7]===n?c=t[8]:(c=(0,T.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 [&_svg:not([class*='text-'])]:text-muted-foreground`,"data-slot":`combobox-item-content`,children:n}),t[7]=n,t[8]=c);let l;return t[9]!==i||t[10]!==o||t[11]!==c?(l=(0,T.jsx)(y,{className:o,"data-slot":`combobox-item`,...i,children:c}),t[9]=i,t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function I(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(g,{className:i,"data-slot":`combobox-empty`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function L(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(C,{scrollbarGutter:!0,scrollFade:!0,children:(0,T.jsx)(m,{className:i,"data-slot":`combobox-list`,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function R(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`size-full min-w-0 not-empty:px-1 not-empty:py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(m,{className:i,"data-slot":`combobox-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function z(e){let t=(0,O.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,T.jsx)(x,{className:n,"data-slot":`combobox-clear`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function B(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(D,{className:i,"data-slot":`combobox-status`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var V=f;export{R as a,B as c,E as d,L as i,N as l,I as n,P as o,F as r,M as s,A as t,V as u};
2
+ //# sourceMappingURL=combobox-BJsEk7ze.js.map