decocms 4.303.16 → 4.303.18

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 (229) hide show
  1. package/dist/client/assets/{AlertCircle-CKdv3f4h.js → AlertCircle-CQHLdRGZ.js} +1 -1
  2. package/dist/client/assets/{AreaChart-C1C3ym26.js → AreaChart-BKxFF8dx.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CV-VDh6p.js → ArrowLeft-CiGURYfW.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-D_hphPmc.js → ArrowUp-BYUc6rLi.js} +1 -1
  5. package/dist/client/assets/{Check-BEG1A0rH.js → Check-D2uR7VS6.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-CJkTipYr.js → CheckCircle-CAmi_hLt.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-D1mQRoOi.js → ChevronDown-8xCHcxO5.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-CrNGErRI.js → ChevronRight-CGhhUMqZ.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-47IGF4WS.js → ChevronSelectorVertical-cbyqr5lK.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-CN3-XqqS.js → ChevronUp-DsbjTZEU.js} +1 -1
  11. package/dist/client/assets/{Copy01-B9pPCX-t.js → Copy01-Ci-gY1Mf.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-Ba_6C0Xd.js → CreditCard01-BNcyZEcR.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-JNCUfOG7.js → DotsVertical-Dn5tfgWo.js} +1 -1
  14. package/dist/client/assets/{Download01-CSidbJXZ.js → Download01-DvsX90Og.js} +1 -1
  15. package/dist/client/assets/{Eye-BeaXyiGX.js → Eye-DlUCg5eK.js} +1 -1
  16. package/dist/client/assets/{FilterLines-BB0q0bZc.js → FilterLines-UPH8xWau.js} +1 -1
  17. package/dist/client/assets/{Globe01-Dna4VbYh.js → Globe01-DmgQnFDH.js} +1 -1
  18. package/dist/client/assets/{Globe04-b5_o_0di.js → Globe04-D0ajJFya.js} +1 -1
  19. package/dist/client/assets/{HardDrive-oJPiDTQx.js → HardDrive-BHuyK3fS.js} +1 -1
  20. package/dist/client/assets/{Key01-DhTkc4vy.js → Key01-5YRgt-NM.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-plLy_2xW.js → LinkExternal01-CCFX8C9r.js} +1 -1
  22. package/dist/client/assets/{LockUnlocked01-CQLK_gy8.js → LockUnlocked01-BPszj4SU.js} +1 -1
  23. package/dist/client/assets/{LogOut01-D76Xbk4q.js → LogOut01--XDLMXg4.js} +1 -1
  24. package/dist/client/assets/{Monitor01-BaQuxSA9.js → Monitor01-lA6KBTMH.js} +1 -1
  25. package/dist/client/assets/{Palette-DvThgJEN.js → Palette-C6GfWC5O.js} +1 -1
  26. package/dist/client/assets/{Play-BQUCuIZm.js → Play-w0QeyPJg.js} +1 -1
  27. package/dist/client/assets/{Plus-Cw6HFsdC.js → Plus-DJ1u9cvh.js} +1 -1
  28. package/dist/client/assets/{SearchLg-CsRkMwHO.js → SearchLg-ioZdvcNv.js} +1 -1
  29. package/dist/client/assets/{SearchMd-GT8f40A1.js → SearchMd-CSkF3NuW.js} +1 -1
  30. package/dist/client/assets/{Settings02-C6g58HY3.js → Settings02-C-VuMkOS.js} +1 -1
  31. package/dist/client/assets/{Share07-BU1ldF66.js → Share07-Bs7pdZjs.js} +1 -1
  32. package/dist/client/assets/{Shield01-zSYrJJaj.js → Shield01-hMr_AjYy.js} +1 -1
  33. package/dist/client/assets/{Stars01-CJrcxvBJ.js → Stars01-C2yF4VK7.js} +1 -1
  34. package/dist/client/assets/{Stars02-CHb8RlUq.js → Stars02-BWM8HAhO.js} +1 -1
  35. package/dist/client/assets/{Sun-V8qfBQ7f.js → Sun-38XX85KF.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-DGU1_RYn.js → SwitchHorizontal01-B3pukb_d.js} +1 -1
  37. package/dist/client/assets/{Tool01-C62iTfGA.js → Tool01-CXcsQpcs.js} +1 -1
  38. package/dist/client/assets/{Tool02-SsotT1cY.js → Tool02-CHOuYkmG.js} +1 -1
  39. package/dist/client/assets/{Trash01-CxsmMLHn.js → Trash01-B8L_kHj2.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-D26FUbcx.js → TrendUp01-BXUsJCPa.js} +1 -1
  41. package/dist/client/assets/{Upload01-zcdkcwz9.js → Upload01-D8nl8bCp.js} +1 -1
  42. package/dist/client/assets/{User01-tVDV8XVe.js → User01-UY13B65C.js} +1 -1
  43. package/dist/client/assets/{UserSquare-D7QUoR7o.js → UserSquare-DTydatTQ.js} +1 -1
  44. package/dist/client/assets/{Users01-B_sSZK0O.js → Users01-Cmd-sb0e.js} +1 -1
  45. package/dist/client/assets/{Users03-DX8xiuFC.js → Users03-B1L_e4Us.js} +1 -1
  46. package/dist/client/assets/{XCircle-QN111Vi_.js → XCircle-D0PGfwFN.js} +1 -1
  47. package/dist/client/assets/{XClose-DBTuJHcs.js → XClose-IrMEsBvE.js} +1 -1
  48. package/dist/client/assets/{YAxis-Cz90-W6P.js → YAxis-DekTFQwn.js} +1 -1
  49. package/dist/client/assets/{Zap-CyC8gTKI.js → Zap-BG8w2q-h.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-CAs4zfFG.js → ZapSquare-BSDBm0-3.js} +1 -1
  51. package/dist/client/assets/{access-gate-BiOsAIeN.js → access-gate-COnLvP6E.js} +1 -1
  52. package/dist/client/assets/{agent-icon-Dn68v12t.js → agent-icon-1Uy4JHGE.js} +1 -1
  53. package/dist/client/assets/{agents-list-BnyNVkkd.js → agents-list-DoEnXQ-2.js} +1 -1
  54. package/dist/client/assets/{ai-providers-CMVLu9pO.js → ai-providers-rpyGrddI.js} +1 -1
  55. package/dist/client/assets/{alert-DQRj0nM4.js → alert-4xqkNw5N.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-CKUZZYja.js → alert-dialog-CKals38I.js} +1 -1
  57. package/dist/client/assets/{api-keys-Ce-2cJxI.js → api-keys-CSVjq3Q5.js} +1 -1
  58. package/dist/client/assets/{app-editor-UtEA9I8w.js → app-editor-Cof9ScuM.js} +1 -1
  59. package/dist/client/assets/{auth-DM8irEiI.js → auth-CL7BB7R8.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-xa8TiAmb.js → auth-catchall-DofjeWMb.js} +1 -1
  61. package/dist/client/assets/{auth-entry-mALLQ-Mp.js → auth-entry-Dd9HwvEb.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-BEAO3y5G.js → auth-split-layout-D0B_GAnv.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-fjv7YlNf.js → authenticate-and-persist-oauth-DwF5HsDl.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-CDJIeMAf.js → automation-list-row-Bcc9lQX_.js} +1 -1
  65. package/dist/client/assets/{automation-runs-CTD0w3kq.js → automation-runs-DZqc6zdF.js} +42 -42
  66. package/dist/client/assets/{automations-BojPGFCC.js → automations-BxWeq4WH.js} +1 -1
  67. package/dist/client/assets/{avatar-CGKGG7HG.js → avatar-VZD77tJt.js} +1 -1
  68. package/dist/client/assets/{badge-SiDQexx0.js → badge-D2iqafj_.js} +1 -1
  69. package/dist/client/assets/{block-document-DZbSFv_B.js → block-document-Ckov2DVf.js} +1 -1
  70. package/dist/client/assets/{breadcrumb-WacFa5k9.js → breadcrumb-CIieoQwM.js} +1 -1
  71. package/dist/client/assets/{buckets-DwZ2vO_A.js → buckets-CicJa1ug.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-DxBPsfXI.js → bulk-category-panel-D_N1uk4U.js} +1 -1
  73. package/dist/client/assets/{capability-load-error-7RTm_Irm.js → capability-load-error-rdE1oxb8.js} +1 -1
  74. package/dist/client/assets/{cards-DZIuzrWY.js → cards-BGOKqQ27.js} +1 -1
  75. package/dist/client/assets/{category-editor-ClzOLtUR.js → category-editor-C7AwyH3G.js} +1 -1
  76. package/dist/client/assets/{chart-CMSleV0m.js → chart-CSNQ-UDK.js} +1 -1
  77. package/dist/client/assets/{chat-context-BfZmGAqv.js → chat-context-Dd07RQrC.js} +1 -1
  78. package/dist/client/assets/{checkbox-Dg8UDJUL.js → checkbox-DgLrlAzs.js} +1 -1
  79. package/dist/client/assets/{choose-editor-BJouc0Bx.js → choose-editor-CmmVPvRf.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-BZ_ewHLm.js → cli-auth-success-8ziDxHe9.js} +1 -1
  81. package/dist/client/assets/{collection-detail-DofBdTQ-.js → collection-detail-jRNLtArL.js} +1 -1
  82. package/dist/client/assets/{collection-display-button-D1fNFqD7.js → collection-display-button-DU2gf8zc.js} +1 -1
  83. package/dist/client/assets/{collection-search-6N6QVG8s.js → collection-search-DNi1PrKS.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-B2liTkel.js → collection-table-wrapper-B2zLvcrd.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-B0s5eS-I.js → collection-tabs-Dk9BdEwW.js} +1 -1
  86. package/dist/client/assets/{command-Kk617Kl9.js → command-DVD7kHdL.js} +1 -1
  87. package/dist/client/assets/{commerce-onboarding-D-ODKL7C.js → commerce-onboarding-CqX91RcC.js} +1 -1
  88. package/dist/client/assets/{config-CZgTi574.js → config-BrOhINT3.js} +1 -1
  89. package/dist/client/assets/{connect-BCPDDm6F.js → connect-DoPq4Kbx.js} +1 -1
  90. package/dist/client/assets/{connection-CsU-GGTO.js → connection-BYyfoihv.js} +1 -1
  91. package/dist/client/assets/{connection-card-QrsuH0rR.js → connection-card-DarWMyyd.js} +1 -1
  92. package/dist/client/assets/{connection-detail-D9Zwn_QA.js → connection-detail-B_ONdUoZ.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-BpSmqsBP.js → connection-form-helpers-CZpFHqZl.js} +1 -1
  94. package/dist/client/assets/{connections-DcwAkmkQ.js → connections-CH--XHxL.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-CGEuV4xB.js → decopilot-sse-pool-BgJs9Iz4.js} +1 -1
  96. package/dist/client/assets/{dialog-DZVVMfHO.js → dialog-BsgKtXcv.js} +1 -1
  97. package/dist/client/assets/{domain-settings-H5gh66g9.js → domain-settings-sv0tQbYA.js} +1 -1
  98. package/dist/client/assets/{drawer-CsKd9HAz.js → drawer-bVZuQnUm.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-D1_u2Fig.js → dropdown-menu-DaPMfZJL.js} +1 -1
  100. package/dist/client/assets/{empty-state-CpQRUlPI.js → empty-state-3yTa4zv_.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-cTPRe9S2.js → extract-connection-data-s0CjKUai.js} +1 -1
  102. package/dist/client/assets/{file-explorer-C3Sn5Z0J.js → file-explorer-DH5J7Z_F.js} +1 -1
  103. package/dist/client/assets/{file-type-icon-B5W6YKiA.js → file-type-icon-h-gu0AyD.js} +1 -1
  104. package/dist/client/assets/{form-D8_kn57p.js → form-Dx0MB3fU.js} +1 -1
  105. package/dist/client/assets/{general-Yzb2v5UP.js → general-BZI01Scd.js} +1 -1
  106. package/dist/client/assets/{github-repo-picker-BP5j5wmk.js → github-repo-picker-D0s7lCE_.js} +1 -1
  107. package/dist/client/assets/{hooks-BzZeO4F_.js → hooks-pRLjI1ki.js} +1 -1
  108. package/dist/client/assets/{index-BRrJwk4-.js → index-BJorKB1L.js} +1 -1
  109. package/dist/client/assets/{index-CJtLWP4F.js → index-BjuOrk3P.js} +1 -1
  110. package/dist/client/assets/{index-CCUJ329z.js → index-BoJxSoCi.js} +1 -1
  111. package/dist/client/assets/{index-D9xj6qHN.js → index-C78XfdDO.js} +1 -1
  112. package/dist/client/assets/{index-DdiqMcs0.js → index-D1fIy1Q8.js} +6 -6
  113. package/dist/client/assets/index-Dkh6BBaT.js +5 -0
  114. package/dist/client/assets/{index-C3xsbndM.js → index-Dt4xzxRh.js} +3 -3
  115. package/dist/client/assets/{index-BViOkUmk.js → index-KTd_KQqb.js} +1 -1
  116. package/dist/client/assets/{index-DU7O8R1o.js → index-dEWwUOGD.js} +1 -1
  117. package/dist/client/assets/{index-redirect-Cu1JyDWP.js → index-redirect-C1PAzwne.js} +1 -1
  118. package/dist/client/assets/{infra-billing-DJK5_pW7.js → infra-billing-r37CcZoi.js} +1 -1
  119. package/dist/client/assets/{input-FtAW_kW6.js → input-C0NkEUr-.js} +1 -1
  120. package/dist/client/assets/{integration-icon-DpcYrUKm.js → integration-icon-CAak33zg.js} +1 -1
  121. package/dist/client/assets/{invite-member-dialog-C5TTSEiT.js → invite-member-dialog-gbvc57jE.js} +1 -1
  122. package/dist/client/assets/{label-0CksFqZU.js → label-4acATUDo.js} +1 -1
  123. package/dist/client/assets/{layout-DYOEpYZV.js → layout--HaIvLG7.js} +1 -1
  124. package/dist/client/assets/{login-CGoOEG8C.js → login-D0lRZ_Hr.js} +1 -1
  125. package/dist/client/assets/{mcp-oauth-BMeL2kHk.js → mcp-oauth-CudkBTAh.js} +1 -1
  126. package/dist/client/assets/{members-Dvh06ht6.js → members-DnRCVydA.js} +1 -1
  127. package/dist/client/assets/{monaco-editor-DOwds2up.js → monaco-editor-CadZW_y5.js} +1 -1
  128. package/dist/client/assets/{monitoring-stats-row-Be6zyvU3.js → monitoring-stats-row-Bt4vwPU1.js} +1 -1
  129. package/dist/client/assets/{multi-select-yc5WsUI3.js → multi-select-B_nePBaY.js} +1 -1
  130. package/dist/client/assets/{oauth-callback-5GC9S7Hg.js → oauth-callback-DjJNm6Pn.js} +1 -1
  131. package/dist/client/assets/{oauth-callback-ai-provider-Ce3N9-pl.js → oauth-callback-ai-provider-ljmYtEt-.js} +1 -1
  132. package/dist/client/assets/{onboarding-CiGrYMaz.js → onboarding-Bg7YxpYA.js} +1 -1
  133. package/dist/client/assets/{org-layout-Dd0brQ4q.js → org-layout-BpIps4Lg.js} +1 -1
  134. package/dist/client/assets/{organization-choice-NvkHE_wg.js → organization-choice-D3n8YPEg.js} +1 -1
  135. package/dist/client/assets/{orgs-DALAgf0E.js → orgs-wYbbkOyM.js} +1 -1
  136. package/dist/client/assets/{page-seo-form-BQzyXYR7.js → page-seo-form-BpMssUHV.js} +1 -1
  137. package/dist/client/assets/{popover-CtdwykrD.js → popover-B6-Ys0fY.js} +1 -1
  138. package/dist/client/assets/{post-calendar-MOczGng1.js → post-calendar-a9KvcVDR.js} +1 -1
  139. package/dist/client/assets/{post-editor-ByxB7-Dv.js → post-editor-BgHSrH2_.js} +1 -1
  140. package/dist/client/assets/{primitives-CXSJjyf1.js → primitives-D9Vk7jJc.js} +1 -1
  141. package/dist/client/assets/{profile-DzuQJpzd.js → profile-HNCqBxDt.js} +1 -1
  142. package/dist/client/assets/{project-app-view-OihIVZEU.js → project-app-view-D2yTl_cB.js} +1 -1
  143. package/dist/client/assets/{prompts-Pz1Ny0zn.js → prompts-8e6dAjm8.js} +1 -1
  144. package/dist/client/assets/record-editor-DwcCSEx6.js +1 -0
  145. package/dist/client/assets/{redirect-editor-BbD9IKyY.js → redirect-editor-B78_e_4F.js} +1 -1
  146. package/dist/client/assets/registry-Cg4b_PCo.js +2 -0
  147. package/dist/client/assets/{registry-layout-Dr0T2h1w.js → registry-layout-qpWNJ_6s.js} +1 -1
  148. package/dist/client/assets/{reports-D4ichaxp.js → reports-C7o1BvM8.js} +1 -1
  149. package/dist/client/assets/{require-capability-CmNpgsrG.js → require-capability-BH6rnA7M.js} +1 -1
  150. package/dist/client/assets/{required-auth-layout-D3n70Err.js → required-auth-layout-DUIsRLzp.js} +1 -1
  151. package/dist/client/assets/{reset-password-BR7L12bH.js → reset-password-C3yPnnDs.js} +1 -1
  152. package/dist/client/assets/{review-settings-BOF5otY7.js → review-settings-B8wdqMgV.js} +1 -1
  153. package/dist/client/assets/{roles-CcEfuBxt.js → roles-C0LSaCSn.js} +1 -1
  154. package/dist/client/assets/{scroll-area-BY3efwKf.js → scroll-area-Bp3GVSr-.js} +1 -1
  155. package/dist/client/assets/{search-input-CLkkEnpN.js → search-input-DbOHtzd0.js} +1 -1
  156. package/dist/client/assets/{secrets-BWle4VfN.js → secrets-DYZFlgh4.js} +1 -1
  157. package/dist/client/assets/{sections-editor-CWuM02kE.js → sections-editor-Dv_66nGj.js} +1 -1
  158. package/dist/client/assets/{select-TSx3iRX7.js → select-4uUeWpPU.js} +1 -1
  159. package/dist/client/assets/{select-model-_CAx-BjA.js → select-model-TFKAmtgQ.js} +1 -1
  160. package/dist/client/assets/{self-tool-result-B4M6aMPA.js → self-tool-result-Dt4_R2Xj.js} +1 -1
  161. package/dist/client/assets/{seo-editor-D1TF2of4.js → seo-editor-DJi8uBUn.js} +1 -1
  162. package/dist/client/assets/{settings-layout-Dp_hJjU_.js → settings-layout-BdD_0kXU.js} +1 -1
  163. package/dist/client/assets/{shell-controls-Ma2sgNB5.js → shell-controls-Bl3Xz0EI.js} +1 -1
  164. package/dist/client/assets/{shell-layout-CaWvSYaz.js → shell-layout-97WWXRZC.js} +1 -1
  165. package/dist/client/assets/{spinner-BvC9n_Qf.js → spinner-D3iuVgRx.js} +1 -1
  166. package/dist/client/assets/{sso-BgEj2JMi.js → sso-D6MCOhpk.js} +1 -1
  167. package/dist/client/assets/{store-BJNiKRDu.js → store-B90A64xK.js} +1 -1
  168. package/dist/client/assets/store-registry-B0_hO73O.js +2 -0
  169. package/dist/client/assets/{super-agent-icon-KSAsZdCb.js → super-agent-icon-CtnmJgjL.js} +1 -1
  170. package/dist/client/assets/{switch-B152lyBB.js → switch-B9S-ReOo.js} +1 -1
  171. package/dist/client/assets/{synced-repos-CEgoDFGW.js → synced-repos-CUU8d6HM.js} +1 -1
  172. package/dist/client/assets/{table-CRBCn2ON.js → table-lkBea1Xl.js} +1 -1
  173. package/dist/client/assets/{tabs-Cwj8tqQR.js → tabs-D3ItZX7-.js} +1 -1
  174. package/dist/client/assets/{task-board-vArYGefl.js → task-board-RnD3TOhC.js} +1 -1
  175. package/dist/client/assets/{tasks-DzZh3PIQ.js → tasks-DLzC3Qg-.js} +1 -1
  176. package/dist/client/assets/{textarea-BdYSR0Og.js → textarea-CvTRHsZk.js} +1 -1
  177. package/dist/client/assets/{toggle-group-Dr2shg0R.js → toggle-group-BDLHVTfC.js} +1 -1
  178. package/dist/client/assets/{toolbar-ZRLazjDF.js → toolbar-C1nhAu84.js} +1 -1
  179. package/dist/client/assets/{track-CkTAqqHM.js → track-fnUcFwb2.js} +1 -1
  180. package/dist/client/assets/{types-anNNI1fm.js → types-CxWdrWNU.js} +1 -1
  181. package/dist/client/assets/{use-ai-providers-CJ7YSFZY.js → use-ai-providers-CWrLm1AD.js} +1 -1
  182. package/dist/client/assets/{use-api-keys-Db9iAQV1.js → use-api-keys-B3Q2krdM.js} +1 -1
  183. package/dist/client/assets/{use-automations-CcukxvrY.js → use-automations-BKaWtSiV.js} +1 -1
  184. package/dist/client/assets/{use-autosave-1XgM-lev.js → use-autosave-Cr2hXHtO.js} +1 -1
  185. package/dist/client/assets/{use-connection-D9bzLKWm.js → use-connection-BgNmeJig.js} +1 -1
  186. package/dist/client/assets/{use-copy-uyYW1je3.js → use-copy-D0SrfqIt.js} +1 -1
  187. package/dist/client/assets/{use-create-virtual-mcp-LVZ5uMuZ.js → use-create-virtual-mcp-C1KaJD_5.js} +1 -1
  188. package/dist/client/assets/{use-debounced-autosave-D0XFmfNj.js → use-debounced-autosave-B5VYl10E.js} +1 -1
  189. package/dist/client/assets/{use-debounced-value-Doa-vdNI.js → use-debounced-value-V53g41E7.js} +1 -1
  190. package/dist/client/assets/{use-decopilot-events-J_1Gp377.js → use-decopilot-events-C4VqK85Z.js} +1 -1
  191. package/dist/client/assets/{use-delete-connection-X4DF2Qk4.js → use-delete-connection-fErbpR5s.js} +1 -1
  192. package/dist/client/assets/{use-deployment-admin-DVonuFFu.js → use-deployment-admin-BFQ8HqrQ.js} +1 -1
  193. package/dist/client/assets/{use-destination-route-byPqPtTQ.js → use-destination-route-Bn3yIPW-.js} +1 -1
  194. package/dist/client/assets/{use-file-configs-bXzEPyon.js → use-file-configs-Dyw7-pny.js} +1 -1
  195. package/dist/client/assets/{use-infinite-scroll-Bqy2hu01.js → use-infinite-scroll-CRoLBkCZ.js} +1 -1
  196. package/dist/client/assets/{use-join-requests-CBb7bp6Y.js → use-join-requests-BmAEO_Kv.js} +1 -1
  197. package/dist/client/assets/{use-mcp-auth-status-CO7APFQr.js → use-mcp-auth-status-r8CXlFWH.js} +1 -1
  198. package/dist/client/assets/{use-mcp-client-DzkTl2as.js → use-mcp-client-DkdpleIo.js} +1 -1
  199. package/dist/client/assets/{use-mcp-tools-BiGiPzVA.js → use-mcp-tools-CDJH5neO.js} +1 -1
  200. package/dist/client/assets/{use-members-dk160zaS.js → use-members-CyywM31O.js} +1 -1
  201. package/dist/client/assets/{use-navigate-to-agent-DmAFRDzm.js → use-navigate-to-agent-BNbXqzhZ.js} +1 -1
  202. package/dist/client/assets/{use-org-auth-client-ChYCC9Bl.js → use-org-auth-client-DtWtVTSq.js} +1 -1
  203. package/dist/client/assets/{use-org-repo-syncs-CSaaMOVw.js → use-org-repo-syncs-B1sbs130.js} +1 -1
  204. package/dist/client/assets/{use-org-sso-BFFf3_ib.js → use-org-sso-E6PP4tUf.js} +1 -1
  205. package/dist/client/assets/{use-organization-roles-BY7ne4zM.js → use-organization-roles-CSeA_DI-.js} +1 -1
  206. package/dist/client/assets/{use-organization-settings-C8lEWrgS.js → use-organization-settings-Cru4OoJD.js} +1 -1
  207. package/dist/client/assets/{use-panel-navigate-D14UNy8l.js → use-panel-navigate-BPALkiCE.js} +1 -1
  208. package/dist/client/assets/{use-registry-connections-CcXG_gix.js → use-registry-connections-D1CcUTZK.js} +1 -1
  209. package/dist/client/assets/{use-secrets-BBz1YGlU.js → use-secrets-DomjJQTO.js} +1 -1
  210. package/dist/client/assets/{use-section-preview-base-DWVRbgLz.js → use-section-preview-base-CQNqY3eL.js} +1 -1
  211. package/dist/client/assets/{use-status-sounds-B_Qei-xV.js → use-status-sounds-Dgs4MBWr.js} +1 -1
  212. package/dist/client/assets/{use-tags-DrPy7fMS.js → use-tags-CdHLTGh0.js} +1 -1
  213. package/dist/client/assets/{use-view-mode-B5AbvTFy.js → use-view-mode-C6OwZrbQ.js} +1 -1
  214. package/dist/client/assets/{use-virtual-mcp-782cjHYM.js → use-virtual-mcp-Br7s7rsG.js} +1 -1
  215. package/dist/client/assets/useInfiniteQuery-CZrRveyC.js +1 -0
  216. package/dist/client/assets/useSuspenseInfiniteQuery-DmtmbD4_.js +1 -0
  217. package/dist/client/assets/{users-CTbtecYR.js → users-DqK9_jem.js} +1 -1
  218. package/dist/client/assets/{variant-calendar-D1WKll3D.js → variant-calendar-B-GEBLXu.js} +1 -1
  219. package/dist/client/assets/{view-mode-toggle-CG0zrg4Z.js → view-mode-toggle-DB2JMUp5.js} +1 -1
  220. package/dist/client/index.html +1 -1
  221. package/dist/server/cli.js +65 -65
  222. package/dist/server/server.js +61 -61
  223. package/package.json +1 -1
  224. package/dist/client/assets/index-B36tE83l.js +0 -5
  225. package/dist/client/assets/record-editor-ByIa5zT-.js +0 -1
  226. package/dist/client/assets/registry-Mh8qkvl5.js +0 -2
  227. package/dist/client/assets/store-registry-W73AViRi.js +0 -2
  228. package/dist/client/assets/useInfiniteQuery-DDxXbsR9.js +0 -1
  229. package/dist/client/assets/useSuspenseInfiniteQuery-bh_DJU0j.js +0 -1
@@ -1 +1 @@
1
- import{c as M,j as t,H as de,a as ye,p as me,r as H,aX as le,b as ee,k as Z,e as ge,t as te,ff as Ne,K as se,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-C3xsbndM.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-DZVVMfHO.js";import{C as Te}from"./collection-search-6N6QVG8s.js";import{u as _e}from"./use-debounced-value-Doa-vdNI.js";import{b as he,u as Ee}from"./use-connection-D9bzLKWm.js";import{u as ne}from"./use-mcp-client-DzkTl2as.js";import{W as Ae,S as pe}from"./constants-dLUUoWH7.js";import{a as be}from"./authenticate-and-persist-oauth-fjv7YlNf.js";import{i as ue}from"./ArrowLeft-CV-VDh6p.js";import{n as ze}from"./LinkExternal01-plLy_2xW.js";import{n as Le}from"./LockUnlocked01-CQLK_gy8.js";import{u as Ge}from"./use-mcp-tools-BiGiPzVA.js";import{e as Oe}from"./extract-connection-data-cTPRe9S2.js";import{c as Fe}from"./use-navigate-to-agent-DmAFRDzm.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function D(C){const e=M.c(4),{size:n,className:l}=C;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=x):x=e[0];let o;return e[1]!==l||e[2]!==n?(o=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:x}),e[1]=l,e[2]=n,e[3]=o):o=e[3],o}function $e(C,e){const n=M.c(12),{org:l}=de();let x;n[0]!==l.id?(x=Ae.REGISTRY(l.id),n[0]=l.id,n[1]=x):x=n[1];const o=x;let a;n[2]!==l.id||n[3]!==l.slug||n[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},n[2]=l.id,n[3]=l.slug,n[4]=o,n[5]=a):a=n[5];const r=ne(a);let s;n[6]!==C?(s={name:C},n[6]=C,n[7]=s):s=n[7];const u=e?.enabled??!0;let k;return n[8]!==r||n[9]!==s||n[10]!==u?(k={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:De},n[8]=r,n[9]=s,n[10]=u,n[11]=k):k=n[11],Ge(k)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:n}=ye.useSession(),l=he(),x=me(),[o,a]=H.useState("idle"),[r,s]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=$e(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&n?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!n?.user?.id||!e))try{a("installing"),s(null);const c=Oe(v,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:h}=await l.create.mutateAsync(c);a("authenticating");const y=await be({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:g=>l.update.mutateAsync({id:h,data:{connection_token:g}}).then(()=>{})});if(y.ran&&!y.ok){try{await l.delete.mutateAsync(h)}catch{}throw new Error(y.error&&y.error!=="no token received"?y.error:"No token received from GitHub")}le(x,e.id),k(c),a("ready")}catch(c){s(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),s(null),k(null),f.current=!1}return C.enabled&&P&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function mt(C){const e=M.c(27),{open:n,onOpenChange:l,title:x,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,s=ee();let u;e[0]!==r||e[1]!==s||e[2]!==x?(u=x??s(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=s,e[2]=x,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=s,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==n||e[16]!==v||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(qe,{open:n,onComplete:c,selectedInstallation:v,onSelectInstallation:P,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=n,e[16]=v,e[17]=c,e[18]=b):b=e[18];let h;e[19]!==f||e[20]!==d||e[21]!==b?(h=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=h):h=e[22];let y;return e[23]!==l||e[24]!==n||e[25]!==h?(y=t.jsx(Ie,{open:n,onOpenChange:l,children:h}),e[23]=l,e[24]=n,e[25]=h,e[26]=y):y=e[26],y}function qe({open:C,onComplete:e,selectedInstallation:n,onSelectInstallation:l,onImportComplete:x,mode:o="agent"}){const a=ee(),{org:r}=de(),s=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,c=ne({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=ne({connectionId:pe,orgId:r.id,orgSlug:r.slug}),h=async(i,j)=>{try{const I=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:j}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},y=(i,j)=>{Promise.all([h(j,"AGENTS.md"),h(j,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:T}}}}),le(s,r.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},g=ge({mutationFn:async i=>{if(!m||!n)throw new Error("No GitHub connection or installation");const j=n.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>b.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let T=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:j,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:i,connectionId:N,item:w.item}}catch(R){throw T&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:j,connectionId:N,item:I})=>{if(o==="connection"||!i||!I){if(le(s,r.id),Ne(s,r.id),x){x({virtualMcpId:null,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.addedRepo",{name:j.name})),e();return}if(s.setQueryData(se.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:I}),le(s,r.id),y(i,j),x){x({virtualMcpId:i,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.importedRepo",{name:j.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,j)=>{console.error("GitHub import failed:",i);const N=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(j.fork&&N.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:j.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>v(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?n?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:i=>g.mutate(i),isSaving:g.isPending}):t.jsx(Qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Qe(C){const e=M.c(124),{connectionId:n,orgId:l,orgSlug:x,onSelect:o,showBackButton:a,onBack:r}=C,s=ee();let u;e[0]!==l||e[1]!==x?(u={connectionId:pe,orgId:l,orgSlug:x},e[0]=l,e[1]=x,e[2]=u):u=e[2];const k=ne(u),v=me(),P=he();let f;e[3]!==n||e[4]!==l?(f=se.githubUserOrgs(l,n),e[3]=n,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==n||e[7]!==k?(d=()=>He(p=>k.callTool(p),n),e[6]=n,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==P||e[13]!==n||e[14]!==c||e[15]!==l||e[16]!==x||e[17]!==v?(b=async()=>{const p=await be({connectionId:n,orgId:l,orgSlug:x,persistFallback:E=>P.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ve)});if(p.ran&&!p.ok)throw new Error(p.error??"no token received");const S=new URL(`/api/${x}/mcp/${n}`,window.location.origin);await v.invalidateQueries({queryKey:se.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:se.mcpClientPrefix()}),await c.refetch()},e[12]=P,e[13]=n,e[14]=c,e[15]=l,e[16]=x,e[17]=v,e[18]=b):b=e[18];let h;e[19]!==s?(h=p=>{te.error(s("common.githubRepoPicker.failedReconnect",{error:p instanceof Error?p.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=h):h=e[20];let y;e[21]!==b||e[22]!==h?(y={mutationFn:b,onError:h},e[21]=b,e[22]=h,e[23]=y):y=e[23];const g=ge(y);if(c.isLoading){let p;return e[24]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=p):p=e[24],p}if(c.isError){let p;e[25]!==s?(p=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=p):p=e[26];let S;e[27]!==p?(S=t.jsx("p",{className:"text-sm text-destructive",children:p}),e[27]=p,e[28]=S):S=e[28];let E;e[29]!==s?(E=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==g?(z=()=>g.mutate(),e[33]=g,e[34]=z):z=e[34];const $=g.isPending;let L;e[35]!==g.isPending?(L=g.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=g.isPending,e[36]=L):L=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let O;e[39]!==g.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:$,children:[L,G]}),e[39]=g.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let p;e[48]!==r||e[49]!==a||e[50]!==s?(p=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=s,e[51]=p):p=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==s?(A=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let $;e[58]!==s?($=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=$):$=e[59];let L;e[60]!==$?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:$}),e[60]=$,e[61]=L):L=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==s?(U=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let q;e[71]!==c?(q=()=>{c.refetch()},e[71]=c,e[72]=q):q=e[72];const je=c.isFetching;let Q;e[73]!==c.isFetching?(Q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=Q):Q=e[74];let V;e[75]!==s?(V=s("common.githubRepoPicker.checkAgain"),e[75]=s,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==q||e[79]!==Q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[Q,V]}),e[77]=c.isFetching,e[78]=q,e[79]=Q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[85]=s,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==p?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[p,X]}),e[95]=X,e[96]=p,e[97]=oe):oe=e[97],oe}let j;e[98]!==r||e[99]!==a||e[100]!==s?(j=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=s,e[101]=j):j=e[101];let N;if(e[102]!==i.installations||e[103]!==o||e[104]!==s){let p;e[106]!==o||e[107]!==s?(p=S=>t.jsxs("button",{type:"button",onClick:()=>o(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=o,e[107]=s,e[108]=p):p=e[108],N=i.installations.map(p),e[102]=i.installations,e[103]=o,e[104]=s,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==s?(T=s("common.githubRepoPicker.accountNotListed"),e[111]=s,e[112]=T):T=e[112];let R;e[113]!==s?(R=s("common.githubRepoPicker.installGitHubApp"),e[113]=s,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==j?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[j,I,_]}),e[120]=I,e[121]=_,e[122]=j,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:n,orgId:l,orgSlug:x,installation:o,onSelectRepo:a,isSaving:r}=C,s=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=h):h=e[8];let y;e[9]!==n||e[10]!==P||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==x?(y=t.jsx(H.Suspense,{fallback:h,children:t.jsx(Je,{connectionId:n,orgId:l,orgSlug:x,installation:o,query:P,onSelectRepo:a,isSaving:r})}),e[9]=n,e[10]=P,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=x,e[16]=y):y=e[16];let g;e[17]!==b||e[18]!==y?(g=t.jsx("div",{className:b,children:y}),e[17]=b,e[18]=y,e[19]=g):g=e[19];let i;return e[20]!==m||e[21]!==g?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,g]}),e[20]=m,e[21]=g,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:n,orgId:l,orgSlug:x,installation:o,query:a,onSelectRepo:r,isSaving:s}=C,u=ee();let k;e[0]!==n||e[1]!==l||e[2]!==x?(k={connectionId:n,orgId:l,orgSlug:x},e[0]=n,e[1]=l,e[2]=x,e[3]=k):k=e[3];const v=ne(k),P=o.type==="User"?"user":"org",f=a?`${P}:${o.login} ${a} in:name fork:true`:`${P}:${o.login} fork:true`;let d;e[4]!==n||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=se.githubOrgRepos(l,n,o.login,a),e[4]=n,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async g=>{const{signal:i}=g,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let g;e[15]!==u?(g=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=g):g=e[16];let i;e[17]!==g?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[17]=g,e[18]=i):i=e[18];let j;e[19]!==a||e[20]!==u?(j=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=j):j=e[21];let N;return e[22]!==i||e[23]!==j?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,j]}),e[22]=i,e[23]=j,e[24]=N):N=e[24],N}let h;if(e[25]!==s||e[26]!==r||e[27]!==b||e[28]!==u){let g;e[30]!==s||e[31]!==r||e[32]!==u?(g=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=s,e[31]=r,e[32]=u,e[33]=g):g=e[33],h=b.map(g),e[25]=s,e[26]=r,e[27]=b,e[28]=u,e[29]=h}else h=e[29];let y;return e[34]!==h?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:h}),e[34]=h,e[35]=y):y=e[35],y}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:n,error:l,retry:x}=C,o=ee();if(n==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==o?(I=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==l||e[6]!==o?(R=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let p;e[15]!==x||e[16]!==F?(p=t.jsx("button",{type:"button",onClick:x,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=x,e[16]=F,e[17]=p):p=e[17];let S;return e[18]!==_||e[19]!==p?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,p]}),e[18]=_,e[19]=p,e[20]=S):S=e[20],S}const a=n==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==a||e[29]!==o?(v=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let h;e[40]!==b?(h=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=h):h=e[41];let y;e[42]!==h?(y=t.jsx("span",{className:h}),e[42]=h,e[43]=y):y=e[43];let g;e[44]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=g):g=e[44];let i;e[45]!==c||e[46]!==y?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,g]}),e[45]=c,e[46]=y,e[47]=i):i=e[47];let j;return e[48]!==i||e[49]!==f?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,i]}),e[48]=i,e[49]=f,e[50]=j):j=e[50],j}export{D as G,mt as a,Be as b,$e as u};
1
+ import{c as M,j as t,H as de,a as ye,p as me,r as H,aX as le,b as ee,k as Z,e as ge,t as te,ff as Ne,K as se,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-Dt4xzxRh.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-BsgKtXcv.js";import{C as Te}from"./collection-search-DNi1PrKS.js";import{u as _e}from"./use-debounced-value-V53g41E7.js";import{b as he,u as Ee}from"./use-connection-BgNmeJig.js";import{u as ne}from"./use-mcp-client-DkdpleIo.js";import{W as Ae,S as pe}from"./constants-dLUUoWH7.js";import{a as be}from"./authenticate-and-persist-oauth-DwF5HsDl.js";import{i as ue}from"./ArrowLeft-CiGURYfW.js";import{n as ze}from"./LinkExternal01-CCFX8C9r.js";import{n as Le}from"./LockUnlocked01-BPszj4SU.js";import{u as Ge}from"./use-mcp-tools-CDJH5neO.js";import{e as Oe}from"./extract-connection-data-s0CjKUai.js";import{c as Fe}from"./use-navigate-to-agent-BNbXqzhZ.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function D(C){const e=M.c(4),{size:n,className:l}=C;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=x):x=e[0];let o;return e[1]!==l||e[2]!==n?(o=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:x}),e[1]=l,e[2]=n,e[3]=o):o=e[3],o}function $e(C,e){const n=M.c(12),{org:l}=de();let x;n[0]!==l.id?(x=Ae.REGISTRY(l.id),n[0]=l.id,n[1]=x):x=n[1];const o=x;let a;n[2]!==l.id||n[3]!==l.slug||n[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},n[2]=l.id,n[3]=l.slug,n[4]=o,n[5]=a):a=n[5];const r=ne(a);let s;n[6]!==C?(s={name:C},n[6]=C,n[7]=s):s=n[7];const u=e?.enabled??!0;let k;return n[8]!==r||n[9]!==s||n[10]!==u?(k={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:De},n[8]=r,n[9]=s,n[10]=u,n[11]=k):k=n[11],Ge(k)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:n}=ye.useSession(),l=he(),x=me(),[o,a]=H.useState("idle"),[r,s]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=$e(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&n?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!n?.user?.id||!e))try{a("installing"),s(null);const c=Oe(v,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:h}=await l.create.mutateAsync(c);a("authenticating");const y=await be({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:g=>l.update.mutateAsync({id:h,data:{connection_token:g}}).then(()=>{})});if(y.ran&&!y.ok){try{await l.delete.mutateAsync(h)}catch{}throw new Error(y.error&&y.error!=="no token received"?y.error:"No token received from GitHub")}le(x,e.id),k(c),a("ready")}catch(c){s(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),s(null),k(null),f.current=!1}return C.enabled&&P&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function mt(C){const e=M.c(27),{open:n,onOpenChange:l,title:x,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,s=ee();let u;e[0]!==r||e[1]!==s||e[2]!==x?(u=x??s(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=s,e[2]=x,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=s,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==n||e[16]!==v||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(qe,{open:n,onComplete:c,selectedInstallation:v,onSelectInstallation:P,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=n,e[16]=v,e[17]=c,e[18]=b):b=e[18];let h;e[19]!==f||e[20]!==d||e[21]!==b?(h=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=h):h=e[22];let y;return e[23]!==l||e[24]!==n||e[25]!==h?(y=t.jsx(Ie,{open:n,onOpenChange:l,children:h}),e[23]=l,e[24]=n,e[25]=h,e[26]=y):y=e[26],y}function qe({open:C,onComplete:e,selectedInstallation:n,onSelectInstallation:l,onImportComplete:x,mode:o="agent"}){const a=ee(),{org:r}=de(),s=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,c=ne({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=ne({connectionId:pe,orgId:r.id,orgSlug:r.slug}),h=async(i,j)=>{try{const I=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:j}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},y=(i,j)=>{Promise.all([h(j,"AGENTS.md"),h(j,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:T}}}}),le(s,r.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},g=ge({mutationFn:async i=>{if(!m||!n)throw new Error("No GitHub connection or installation");const j=n.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>b.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let T=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:j,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:i,connectionId:N,item:w.item}}catch(R){throw T&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:j,connectionId:N,item:I})=>{if(o==="connection"||!i||!I){if(le(s,r.id),Ne(s,r.id),x){x({virtualMcpId:null,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.addedRepo",{name:j.name})),e();return}if(s.setQueryData(se.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:I}),le(s,r.id),y(i,j),x){x({virtualMcpId:i,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.importedRepo",{name:j.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,j)=>{console.error("GitHub import failed:",i);const N=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(j.fork&&N.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:j.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>v(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?n?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:i=>g.mutate(i),isSaving:g.isPending}):t.jsx(Qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Qe(C){const e=M.c(124),{connectionId:n,orgId:l,orgSlug:x,onSelect:o,showBackButton:a,onBack:r}=C,s=ee();let u;e[0]!==l||e[1]!==x?(u={connectionId:pe,orgId:l,orgSlug:x},e[0]=l,e[1]=x,e[2]=u):u=e[2];const k=ne(u),v=me(),P=he();let f;e[3]!==n||e[4]!==l?(f=se.githubUserOrgs(l,n),e[3]=n,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==n||e[7]!==k?(d=()=>He(p=>k.callTool(p),n),e[6]=n,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==P||e[13]!==n||e[14]!==c||e[15]!==l||e[16]!==x||e[17]!==v?(b=async()=>{const p=await be({connectionId:n,orgId:l,orgSlug:x,persistFallback:E=>P.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ve)});if(p.ran&&!p.ok)throw new Error(p.error??"no token received");const S=new URL(`/api/${x}/mcp/${n}`,window.location.origin);await v.invalidateQueries({queryKey:se.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:se.mcpClientPrefix()}),await c.refetch()},e[12]=P,e[13]=n,e[14]=c,e[15]=l,e[16]=x,e[17]=v,e[18]=b):b=e[18];let h;e[19]!==s?(h=p=>{te.error(s("common.githubRepoPicker.failedReconnect",{error:p instanceof Error?p.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=h):h=e[20];let y;e[21]!==b||e[22]!==h?(y={mutationFn:b,onError:h},e[21]=b,e[22]=h,e[23]=y):y=e[23];const g=ge(y);if(c.isLoading){let p;return e[24]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=p):p=e[24],p}if(c.isError){let p;e[25]!==s?(p=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=p):p=e[26];let S;e[27]!==p?(S=t.jsx("p",{className:"text-sm text-destructive",children:p}),e[27]=p,e[28]=S):S=e[28];let E;e[29]!==s?(E=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==g?(z=()=>g.mutate(),e[33]=g,e[34]=z):z=e[34];const $=g.isPending;let L;e[35]!==g.isPending?(L=g.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=g.isPending,e[36]=L):L=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let O;e[39]!==g.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:$,children:[L,G]}),e[39]=g.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let p;e[48]!==r||e[49]!==a||e[50]!==s?(p=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=s,e[51]=p):p=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==s?(A=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let $;e[58]!==s?($=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=$):$=e[59];let L;e[60]!==$?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:$}),e[60]=$,e[61]=L):L=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==s?(U=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let q;e[71]!==c?(q=()=>{c.refetch()},e[71]=c,e[72]=q):q=e[72];const je=c.isFetching;let Q;e[73]!==c.isFetching?(Q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=Q):Q=e[74];let V;e[75]!==s?(V=s("common.githubRepoPicker.checkAgain"),e[75]=s,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==q||e[79]!==Q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[Q,V]}),e[77]=c.isFetching,e[78]=q,e[79]=Q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[85]=s,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==p?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[p,X]}),e[95]=X,e[96]=p,e[97]=oe):oe=e[97],oe}let j;e[98]!==r||e[99]!==a||e[100]!==s?(j=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=s,e[101]=j):j=e[101];let N;if(e[102]!==i.installations||e[103]!==o||e[104]!==s){let p;e[106]!==o||e[107]!==s?(p=S=>t.jsxs("button",{type:"button",onClick:()=>o(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=o,e[107]=s,e[108]=p):p=e[108],N=i.installations.map(p),e[102]=i.installations,e[103]=o,e[104]=s,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==s?(T=s("common.githubRepoPicker.accountNotListed"),e[111]=s,e[112]=T):T=e[112];let R;e[113]!==s?(R=s("common.githubRepoPicker.installGitHubApp"),e[113]=s,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==j?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[j,I,_]}),e[120]=I,e[121]=_,e[122]=j,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:n,orgId:l,orgSlug:x,installation:o,onSelectRepo:a,isSaving:r}=C,s=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=h):h=e[8];let y;e[9]!==n||e[10]!==P||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==x?(y=t.jsx(H.Suspense,{fallback:h,children:t.jsx(Je,{connectionId:n,orgId:l,orgSlug:x,installation:o,query:P,onSelectRepo:a,isSaving:r})}),e[9]=n,e[10]=P,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=x,e[16]=y):y=e[16];let g;e[17]!==b||e[18]!==y?(g=t.jsx("div",{className:b,children:y}),e[17]=b,e[18]=y,e[19]=g):g=e[19];let i;return e[20]!==m||e[21]!==g?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,g]}),e[20]=m,e[21]=g,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:n,orgId:l,orgSlug:x,installation:o,query:a,onSelectRepo:r,isSaving:s}=C,u=ee();let k;e[0]!==n||e[1]!==l||e[2]!==x?(k={connectionId:n,orgId:l,orgSlug:x},e[0]=n,e[1]=l,e[2]=x,e[3]=k):k=e[3];const v=ne(k),P=o.type==="User"?"user":"org",f=a?`${P}:${o.login} ${a} in:name fork:true`:`${P}:${o.login} fork:true`;let d;e[4]!==n||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=se.githubOrgRepos(l,n,o.login,a),e[4]=n,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async g=>{const{signal:i}=g,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let g;e[15]!==u?(g=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=g):g=e[16];let i;e[17]!==g?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[17]=g,e[18]=i):i=e[18];let j;e[19]!==a||e[20]!==u?(j=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=j):j=e[21];let N;return e[22]!==i||e[23]!==j?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,j]}),e[22]=i,e[23]=j,e[24]=N):N=e[24],N}let h;if(e[25]!==s||e[26]!==r||e[27]!==b||e[28]!==u){let g;e[30]!==s||e[31]!==r||e[32]!==u?(g=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=s,e[31]=r,e[32]=u,e[33]=g):g=e[33],h=b.map(g),e[25]=s,e[26]=r,e[27]=b,e[28]=u,e[29]=h}else h=e[29];let y;return e[34]!==h?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:h}),e[34]=h,e[35]=y):y=e[35],y}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:n,error:l,retry:x}=C,o=ee();if(n==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==o?(I=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==l||e[6]!==o?(R=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let p;e[15]!==x||e[16]!==F?(p=t.jsx("button",{type:"button",onClick:x,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=x,e[16]=F,e[17]=p):p=e[17];let S;return e[18]!==_||e[19]!==p?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,p]}),e[18]=_,e[19]=p,e[20]=S):S=e[20],S}const a=n==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==a||e[29]!==o?(v=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let h;e[40]!==b?(h=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=h):h=e[41];let y;e[42]!==h?(y=t.jsx("span",{className:h}),e[42]=h,e[43]=y):y=e[43];let g;e[44]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=g):g=e[44];let i;e[45]!==c||e[46]!==y?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,g]}),e[45]=c,e[46]=y,e[47]=i):i=e[47];let j;return e[48]!==i||e[49]!==f?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,i]}),e[48]=i,e[49]=f,e[50]=j):j=e[50],j}export{D as G,mt as a,Be as b,$e as u};
@@ -1,4 +1,4 @@
1
- import{eR as It,eS as Et,ci as R,an as c,eT as de,cn as Je,eU as Tt,ch as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eV as I,ao as Ot,t as ge,r as W,c as Ee,H as Ct,j as Rt}from"./index-C3xsbndM.js";import{u as Nt}from"./use-mcp-client-DzkTl2as.js";import{S as xt}from"./constants-dLUUoWH7.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-CGEuV4xB.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
1
+ import{eR as It,eS as Et,ci as R,an as c,eT as de,cn as Je,eU as Tt,ch as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eV as I,ao as Ot,t as ge,r as W,c as Ee,H as Ct,j as Rt}from"./index-Dt4xzxRh.js";import{u as Nt}from"./use-mcp-client-DkdpleIo.js";import{S as xt}from"./constants-dLUUoWH7.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-BgJs9Iz4.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${Ye(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Qe)}},Ke="AI_TypeValidationError",et=`vercel.ai.error.${Ke}`,Ft=Symbol.for(et),ke,je,q=class ve extends(je=Z,ke=Ft,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:Ke,message:`${s}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,et)}static wrap({value:e,cause:a,context:r}){var s,n,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new $t({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Bt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Vt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Bt.test(t)===!1&&Vt.test(t)===!1?e:zt(e)}function zt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Jt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Wt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Gt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Yt(t,e){var a,r,s;const n={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(n.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function Ht(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function tt(t,e){return b(t.type._def,e)}var Xt=(t,e)=>b(t.innerType._def,e);function at(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>at(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Qt(t)}}var Qt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Kt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function ea(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ta(t){return{type:"string",enum:Array.from(t.values)}}var aa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ra(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(aa(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function sa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?oa(t):t}var na=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function oa(t){let e="";for(let a=0;a<t.length;a++)na.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r
@@ -1 +1 @@
1
- import{c as _,d as B,H as E,b as $,I as Pt,j as s,B as Ae,r as O,E as nt,J as Rt,z as zt,K as ot,e as Ee,q as L,M as U,R as it,U as Le,W as Ue,X as T,Y as F,n as M,Z as z,_ as P,$ as lt,a0 as Et,a1 as rt,a2 as Tt,a3 as at,a as me,a4 as Dt,x as ct,a5 as dt,t as mt,a6 as Ft,a7 as Lt,a8 as Ut,a9 as Bt,aa as Kt,ab as qt,ac as Wt,p as Ht,ad as Te,L as He,u as Gt,ae as Yt,O as Qt,af as Vt,ag as Xt,ah as Jt}from"./index-C3xsbndM.js";import{a as Zt,p as ze,s as es,b as ts,n as ss}from"./self-tool-result-B4M6aMPA.js";import{f as ns,b as os,e as is,g as ls}from"./dialog-DZVVMfHO.js";import{c as rs,C as as,a as cs,O as ft,A as ds,u as ms,t as ut,S as fs,b as us,d as ps,e as xs}from"./super-agent-icon-KSAsZdCb.js";import{u as hs}from"./use-mcp-client-DzkTl2as.js";import{C as bs,W as De,S as gs}from"./constants-dLUUoWH7.js";import{i as pt}from"./XCircle-QN111Vi_.js";import{u as js,a as vs}from"./use-organization-settings-C8lEWrgS.js";import{T as xt,a as ae}from"./toolbar-ZRLazjDF.js";import{P as ht,a as Be,b as bt}from"./popover-CtdwykrD.js";import{D as ys,a as Ss,b as _s}from"./drawer-CsKd9HAz.js";import{A as $e}from"./avatar-CGKGG7HG.js";import{a as Ns}from"./Copy01-B9pPCX-t.js";import{n as Cs}from"./Download01-CSidbJXZ.js";import{i as ks,a as ws,b as Is,c as $s,t as gt,d as As,e as Ms,A as Os}from"./agent-icon-Dn68v12t.js";import{i as Ps}from"./Globe01-Dna4VbYh.js";import{n as Rs}from"./LinkExternal01-plLy_2xW.js";import{i as Ge}from"./LogOut01-D76Xbk4q.js";import{i as zs}from"./Monitor01-BaQuxSA9.js";import{n as Es,a as Ts}from"./Sun-V8qfBQ7f.js";import{a as fe}from"./Settings02-C6g58HY3.js";import{i as Ds}from"./Shield01-zSYrJJaj.js";import{t as Fs}from"./UserSquare-D7QUoR7o.js";import{a as Ls}from"./Users03-DX8xiuFC.js";import{u as Us}from"./use-deployment-admin-DVonuFFu.js";import{u as Bs}from"./use-is-desktop-app-BNujXJc_.js";import{i as Ks,a as Ye,D as qs,u as Ws,b as Hs}from"./use-panel-navigate-D14UNy8l.js";import{a as Gs,n as Ys}from"./ZapSquare-CAs4zfFG.js";import{I as jt}from"./invite-member-dialog-C5TTSEiT.js";import{n as Ke}from"./Stars02-CHb8RlUq.js";import{S as Qs}from"./scroll-area-BY3efwKf.js";import{u as Vs}from"./useInfiniteQuery-DDxXbsR9.js";import{n as Xs}from"./decopilot-sse-pool-CGEuV4xB.js";import{i as Js}from"./ChevronRight-CrNGErRI.js";import{g as Zs}from"./get-initials-D-f_fDFw.js";import{a as en}from"./format-time-BnbuEtat.js";import{i as tn}from"./Share07-BU1ldF66.js";import{u as sn}from"./use-virtual-mcp-782cjHYM.js";import{u as nn,T as on}from"./hooks-BzZeO4F_.js";import{g as ln,a as rn,b as an,c as cn}from"./agent-capabilities-B52k7xCe.js";import{u as vt,D as R}from"./use-destination-route-byPqPtTQ.js";import{S as yt}from"./use-navigate-to-agent-DmAFRDzm.js";import{S as St,M as dn}from"./shell-controls-Ma2sgNB5.js";import{C as mn}from"./chat-context-BfZmGAqv.js";import"./alert-dialog-CKUZZYja.js";import"./form-D8_kn57p.js";import"./label-0CksFqZU.js";import"./input-FtAW_kW6.js";import"./spinner-BvC9n_Qf.js";import"./integration-icon-DpcYrUKm.js";import"./Tool02-SsotT1cY.js";import"./extract-connection-data-cTPRe9S2.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./CheckCircle-CJkTipYr.js";import"./Check-BEG1A0rH.js";import"./Eye-BeaXyiGX.js";import"./use-debounced-value-Doa-vdNI.js";import"./authenticate-and-persist-oauth-fjv7YlNf.js";import"./mcp-oauth-BMeL2kHk.js";import"./auth-DM8irEiI.js";import"./track-CkTAqqHM.js";import"./ChevronDown-D1mQRoOi.js";import"./Plus-Cw6HFsdC.js";import"./SearchMd-GT8f40A1.js";import"./XClose-DBTuJHcs.js";import"./github-repo-picker-BP5j5wmk.js";import"./collection-search-6N6QVG8s.js";import"./use-connection-D9bzLKWm.js";import"./ArrowLeft-CV-VDh6p.js";import"./LockUnlocked01-CQLK_gy8.js";import"./use-mcp-tools-BiGiPzVA.js";import"./shell-layout-CaWvSYaz.js";import"./SearchLg-CsRkMwHO.js";import"./FilterLines-BB0q0bZc.js";import"./Zap-CyC8gTKI.js";import"./required-auth-layout-D3n70Err.js";import"./use-org-sso-BFFf3_ib.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./connection-card-QrsuH0rR.js";import"./use-registry-connections-CcXG_gix.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-CITJ0kGN.js";import"./select-TSx3iRX7.js";import"./ChevronUp-CN3-XqqS.js";import"./textarea-BdYSR0Og.js";import"./connection-form-helpers-BpSmqsBP.js";import"./Trash01-CxsmMLHn.js";import"./collection-tabs-B0s5eS-I.js";import"./badge-SiDQexx0.js";import"./use-infinite-scroll-Bqy2hu01.js";import"./useSuspenseInfiniteQuery-bh_DJU0j.js";import"./use-ai-providers-CJ7YSFZY.js";import"./task-board-vArYGefl.js";import"./User01-tVDV8XVe.js";import"./AlertCircle-CKdv3f4h.js";import"./Tool01-C62iTfGA.js";import"./ArrowUp-D_hphPmc.js";import"./TrendUp01-D26FUbcx.js";import"./ChevronSelectorVertical-47IGF4WS.js";import"./DotsVertical-JNCUfOG7.js";import"./CreditCard01-Ba_6C0Xd.js";import"./Globe04-b5_o_0di.js";import"./SwitchHorizontal01-DGU1_RYn.js";import"./HardDrive-oJPiDTQx.js";import"./Key01-DhTkc4vy.js";import"./Palette-DvThgJEN.js";import"./Play-BQUCuIZm.js";import"./Stars01-CJrcxvBJ.js";import"./Upload01-zcdkcwz9.js";import"./Users01-B_sSZK0O.js";import"./use-org-auth-client-ChYCC9Bl.js";import"./use-organization-roles-BY7ne4zM.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-J_1Gp377.js";function fn(t){const e=_.c(21),{siteUrl:n}=t,i=B(),{org:o}=E(),l=$();let r;e[0]!==i||e[1]!==o?(r=()=>{localStorage.setItem(Pt.sidebarOpen(),JSON.stringify(!1)),i({...rs(o,De.COMMERCE_DISCOVERY(o.id)),search:{connection:De.COMMERCE_DISCOVERY(o.id),tool:bs,sidepanel:!1}})},e[0]=i,e[1]=o,e[2]=r):r=e[2];const a=r;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ns,{className:"bg-black/15 backdrop-blur-sm"}),e[3]=d):d=e[3];let c;e[4]!==l?(c=l("routes.commerceOnboarding.connectModal.dialogTitle"),e[4]=l,e[5]=c):c=e[5];let f;e[6]!==c?(f=s.jsx(os,{className:"sr-only",children:c}),e[6]=c,e[7]=f):f=e[7];let m;e[8]!==a||e[9]!==l?(m=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:l("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(Ae,{type:"button",size:"xl",className:"w-full",onClick:a,children:[l("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(pt,{size:18})]})]}),e[8]=a,e[9]=l,e[10]=m):m=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Zt,{}),e[11]=p):p=e[11];let u;e[12]!==a||e[13]!==n?(u=s.jsx(O.Suspense,{fallback:p,children:s.jsx(hn,{siteUrlFromUrl:n,onComplete:a})}),e[12]=a,e[13]=n,e[14]=u):u=e[14];let x;e[15]!==m||e[16]!==u?(x=s.jsx(nt,{fallback:m,children:u}),e[15]=m,e[16]=u,e[17]=x):x=e[17];let h;return e[18]!==f||e[19]!==x?(h=s.jsx(is,{open:!0,children:s.jsxs(ls,{children:[d,s.jsxs(Rt,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:xn,onPointerDownOutside:pn,onInteractOutside:un,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[f,x]})]})}),e[18]=f,e[19]=x,e[20]=h):h=e[20],h}function un(t){return t.preventDefault()}function pn(t){return t.preventDefault()}function xn(t){return t.preventDefault()}function hn({siteUrlFromUrl:t,onComplete:e}){const n=$(),{org:i}=E(),o=De.COMMERCE_DISCOVERY(i.id),l=hs({connectionId:gs,orgId:i.id,orgSlug:i.slug}),a=zt({queryKey:ot.commerceDiscoveryConnection(i.id,o),queryFn:async()=>{const v=await l.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return ze(v)},retry:!1}).data.item,d=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||d,f=es(c),[m,p]=O.useState(!0),[u,x]=O.useState(null),h=Ee({mutationFn:async v=>ze(await l.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),g=Ee({mutationFn:async v=>ze(await l.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),b=async()=>{x(null),L("commerce_onboarding_open_report_clicked",{domain:f??void 0,organization_id:i.id});const v=c?ss(c):null;if(v?.ok)try{let y=await g.mutateAsync(v.value);if(y.triggered||(L("commerce_onboarding_run_reclaim",{domain:f??void 0,organization_id:i.id,reason:y.reason??"not_upgraded"}),await h.mutateAsync(v.value),y=await g.mutateAsync(v.value)),!y.triggered){L("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:i.id,error:y.reason??"not_triggered"}),x(n("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(y){L("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:i.id,error:y instanceof Error?y.message:String(y)}),x(n("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},j=js("demo_mode"),S=m||j;return s.jsx(as,{siteHost:f,footer:s.jsxs(s.Fragment,{children:[u?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(cs,{ready:S,pending:g.isPending,label:g.isPending?n("routes.commerceOnboarding.connectModal.openingReport"):n("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{b()},children:s.jsx(pt,{size:18})})}),S?null:s.jsx(Ae,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:g.isPending,onClick:()=>{b()},children:n("routes.commerceOnboarding.connectModal.skip")})]})]}),children:s.jsx(ts,{org:i,cdConnectionId:o,siteUrl:c,onReadinessChange:p})})}function bn(t){const e=_.c(11),{onPointerDown:n,onDoubleClick:i}=t,o=$(),{state:l,isMobile:r}=U();if(r||l==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==o?(d=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=d):d=e[3];let c,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},f=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=f):(c=e[4],f=e[5]);let m;return e[6]!==i||e[7]!==n||e[8]!==a||e[9]!==d?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:n,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:f}),e[6]=i,e[7]=n,e[8]=a,e[9]=d,e[10]=m):m=e[10],m}const qe=240,gn=400,jn="sidebar.width";function de(t){return Math.max(qe,Math.min(gn,t))}function vn(){const t=_.c(11),[e,n]=it(jn,yn),i=O.useRef(null);let o;t[0]!==n||t[1]!==e?(o=f=>{f.preventDefault();const m=f.clientX,p=de(e),u=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=u?Array.from(u.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of x)b.style.transition="none";const h=b=>{const j=de(p+(b.clientX-m));u?.style.setProperty("--sidebar-width",`${j}px`)},g=b=>{const j=de(p+(b.clientX-m));n(j);for(const S of x)S.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",h),window.addEventListener("pointerup",g)},t[0]=n,t[1]=e,t[2]=o):o=t[2];const l=o;let r;t[3]!==n?(r=()=>{n(qe)},t[3]=n,t[4]=r):r=t[4];const a=r;let d;t[5]!==e?(d=de(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==l||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:i,onStartResize:l,resetWidth:a},t[7]=l,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function yn(t){return typeof t=="number"?de(t):qe}function _t(){return[]}function Nt(t){const e=_.c(3),{children:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=i):i=e[0];let o;return e[1]!==n?(o=s.jsxs(Le,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,s.jsx(Ue,{children:s.jsx(T,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function Ct(t){const e=_.c(18),{item:n}=t,{isMobile:i,setOpenMobile:o}=U();let l;e[0]!==i||e[1]!==n||e[2]!==o?(l=()=>{L("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:i}),n.onClick?.(),i&&o(!1)},e[0]=i,e[1]=n,e[2]=o,e[3]=l):l=e[3];const r=l,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=M(d),e[4]=d,e[5]=c):c=e[5];let f;e[6]!==n.label?(f=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=f):f=e[7];let m;e[8]!==r||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==f?(m=s.jsxs(z,{onClick:r,isActive:n.isActive,tooltip:n.label,children:[n.icon,f]}),e[8]=r,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=f,e[13]=m):m=e[13];let p;return e[14]!==n.key||e[15]!==c||e[16]!==m?(p=s.jsx(P,{className:c,children:m},a),e[14]=n.key,e[15]=c,e[16]=m,e[17]=p):p=e[17],p}function Sn(t){const e=_.c(12),{section:n}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(lt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,o=n.group.defaultExpanded;let l;e[2]!==n.group.items?(l=n.group.items.map(Nn),e[2]=n.group.items,e[3]=l):l=e[3];let r;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==l?(r=s.jsx(Nt,{label:i,defaultExpanded:o,children:l}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=l,e[7]=r):r=e[7],r}case"items":{let i;e[8]!==n.items?(i=n.items.map(_n),e[8]=n.items,e[9]=i):i=e[9];let o;return e[10]!==i?(o=s.jsx(Le,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ue,{children:s.jsx(T,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=o):o=e[11],o}case"custom":return n.content}}function _n(t){return s.jsx(Ct,{item:t},t.key)}function Nn(t){return s.jsx(Ct,{item:t},t.key)}function Cn(t){const e=_.c(17),{sections:n,footer:i,additionalContent:o,header:l,variant:r,contentClassName:a}=t,d=r===void 0?"sidebar":r;let c;e[0]!==l?(c=l&&s.jsx(Et,{className:"shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:l}),e[0]=l,e[1]=c):c=e[1];let f;e[2]!==a?(f=M("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=f):f=e[3];let m;e[4]!==n?(m=n.map(kn),e[4]=n,e[5]=m):m=e[5];let p;e[6]!==o?(p=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=p):p=e[7];let u;e[8]!==f||e[9]!==m||e[10]!==p?(u=s.jsxs(rt,{className:f,children:[m,p]}),e[8]=f,e[9]=m,e[10]=p,e[11]=u):u=e[11];let x;return e[12]!==i||e[13]!==c||e[14]!==u||e[15]!==d?(x=s.jsxs(Tt,{variant:d,children:[c,u,i]}),e[12]=i,e[13]=c,e[14]=u,e[15]=d,e[16]=x):x=e[16],x}function kn(t,e){return s.jsx(Sn,{section:t},e)}function kt(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Cn,{...t}),e[0]=t,e[1]=n):n=e[1],n}kt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(F,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Qe(t){const e=_.c(18),{item:n,onClose:i}=t,o=n.isActive&&"z-10";let l;e[0]!==o?(l=M(o),e[0]=o,e[1]=l):l=e[1];let r;e[2]!==n||e[3]!==i?(r=()=>{n.onClick?.(),i()},e[2]=n,e[3]=i,e[4]=r):r=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==r||e[12]!==a||e[13]!==d?(c=s.jsxs(z,{onClick:r,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=r,e[12]=a,e[13]=d,e[14]=c):c=e[14];let f;return e[15]!==l||e[16]!==c?(f=s.jsx(P,{className:l,children:c}),e[15]=l,e[16]=c,e[17]=f):f=e[17],f}function wn(t){const e=_.c(18),{section:n,onClose:i}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(lt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,l=n.group.defaultExpanded;let r;if(e[2]!==i||e[3]!==n.group.items){let d;e[5]!==i?(d=c=>s.jsx(Qe,{item:c,onClose:i},c.key),e[5]=i,e[6]=d):d=e[6],r=n.group.items.map(d),e[2]=i,e[3]=n.group.items,e[4]=r}else r=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==r?(a=s.jsx(Nt,{label:o,defaultExpanded:l,children:r}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=r,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==i||e[12]!==n.items){let r;e[14]!==i?(r=a=>s.jsx(Qe,{item:a,onClose:i},a.key),e[14]=i,e[15]=r):r=e[15],o=n.items.map(r),e[11]=i,e[12]=n.items,e[13]=o}else o=e[13];let l;return e[16]!==o?(l=s.jsx(Le,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ue,{children:s.jsx(T,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=l):l=e[17],l}case"custom":return n.content}}function In(t){const e=_.c(27),{sections:n,onClose:i,footer:o,additionalContent:l}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ft,{}),e[0]=r):r=e[0];let a;e[1]!==i?(a=s.jsx(ds,{onNavigate:i}),e[1]=i,e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1"}),e[3]=d):d=e[3];const c=$();let f;e[4]!==c?(f=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=f):f=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(at,{size:16}),e[6]=m):m=e[6];let p;e[7]!==i||e[8]!==f?(p=s.jsx(xt,{onClick:i,"aria-label":f,children:m}),e[7]=i,e[8]=f,e[9]=p):p=e[9];let u;e[10]!==a||e[11]!==p?(u=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,d,p]}),e[10]=a,e[11]=p,e[12]=u):u=e[12];let x;if(e[13]!==i||e[14]!==n){let j;e[16]!==i?(j=(S,v)=>s.jsx(wn,{section:S,onClose:i},v),e[16]=i,e[17]=j):j=e[17],x=n.map(j),e[13]=i,e[14]=n,e[15]=x}else x=e[15];let h;e[18]!==l?(h=l&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:l}),e[18]=l,e[19]=h):h=e[19];let g;e[20]!==h||e[21]!==x?(g=s.jsxs(rt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[x,h]}),e[20]=h,e[21]=x,e[22]=g):g=e[22];let b;return e[23]!==o||e[24]!==g||e[25]!==u?(b=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[u,g,o]}),e[23]=o,e[24]=g,e[25]=u,e[26]=b):b=e[26],b}function ce(t){const e=_.c(26),{item:n,onClose:i}=t;let o;e[0]!==n.className?(o=M("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",n.className),e[0]=n.className,e[1]=o):o=e[1];const l=o;if(n.href){const f=n.external?"_blank":void 0,m=n.external?"noopener noreferrer":void 0;let p;e[2]!==n.icon?(p=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=p):p=e[3];let u;e[4]!==n.label?(u=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=u):u=e[5];let x;return e[6]!==l||e[7]!==n.href||e[8]!==i||e[9]!==f||e[10]!==m||e[11]!==p||e[12]!==u?(x=s.jsxs("a",{href:n.href,target:f,rel:m,className:l,onClick:i,children:[p,u]}),e[6]=l,e[7]=n.href,e[8]=i,e[9]=f,e[10]=m,e[11]=p,e[12]=u,e[13]=x):x=e[13],x}let r;e[14]!==n||e[15]!==i?(r=()=>{n.onClick?.(),i()},e[14]=n,e[15]=i,e[16]=r):r=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let d;e[19]!==n.label?(d=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=d):d=e[20];let c;return e[21]!==l||e[22]!==r||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:r,className:l,children:[a,d]}),e[21]=l,e[22]=r,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function $n(){const t=_.c(4),e=$();let n;t[0]!==e?(n=e("common.accountPopover.impersonating"),t[0]=e,t[1]=n):n=t[1];let i;return t[2]!==n?(i=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:n}),t[2]=n,t[3]=i):i=t[3],i}function Ve(t){const e=_.c(38),{user:n,userImage:i,isImpersonating:o,isMobile:l}=t,r=$(),a=l?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=M("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=n?.name??"U";let f;e[2]!==c||e[3]!==i?(f=s.jsx($e,{url:i,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=i,e[4]=f):f=e[4];let m;e[5]!==r||e[6]!==n?.name?(m=n?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=n?.name,e[7]=m):m=e[7];let p;e[8]!==m?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=p):p=e[9];let u;e[10]!==o?(u=o&&s.jsx($n,{}),e[10]=o,e[11]=u):u=e[11];let x;e[12]!==p||e[13]!==u?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[p,u]}),e[12]=p,e[13]=u,e[14]=x):x=e[14];const h=n?.email;let g;e[15]!==h?(g=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[15]=h,e[16]=g):g=e[16];let b;e[17]!==g||e[18]!==x?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[x,g]}),e[17]=g,e[18]=x,e[19]=b):b=e[19];let j;e[20]!==r||e[21]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(()=>{mt.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=n,e[22]=j):j=e[22];let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ns,{size:14}),e[23]=S):S=e[23];let v;e[24]!==j?(v=s.jsx(Ut,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:S})}),e[24]=j,e[25]=v):v=e[25];let y;e[26]!==r?(y=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=y):y=e[27];let N;e[28]!==y?(N=s.jsx(Bt,{side:"right",children:s.jsx("p",{className:"text-xs",children:y})}),e[28]=y,e[29]=N):N=e[29];let k;e[30]!==v||e[31]!==N?(k=s.jsx(Kt,{delayDuration:300,children:s.jsxs(qt,{children:[v,N]})}),e[30]=v,e[31]=N,e[32]=k):k=e[32];let C;return e[33]!==b||e[34]!==k||e[35]!==d||e[36]!==f?(C=s.jsxs("div",{className:d,children:[f,b,k]}),e[33]=b,e[34]=k,e[35]=d,e[36]=f,e[37]=C):C=e[37],C}function Xe(t){const e=_.c(35),{themeOptions:n,preferences:i,setPreferences:o,isMobile:l}=t,r=$(),a=l?"size-8":"size-7",d=l?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=M("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let f;if(e[2]!==a||e[3]!==i.theme||e[4]!==o||e[5]!==n){let y;e[7]!==a||e[8]!==i.theme||e[9]!==o?(y=N=>{const{value:k,icon:C,label:w}=N;return s.jsx("button",{type:"button","aria-label":w,onClick:()=>o(I=>({...I,theme:k})),className:M(a,"rounded-md flex items-center justify-center transition-colors",i.theme===k?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:C},k)},e[7]=a,e[8]=i.theme,e[9]=o,e[10]=y):y=e[10],f=n.map(y),e[2]=a,e[3]=i.theme,e[4]=o,e[5]=n,e[6]=f}else f=e[6];let m;e[11]!==f?(m=s.jsx("div",{className:"flex items-center gap-0.5",children:f}),e[11]=f,e[12]=m):m=e[12];let p;e[13]!==i.enableSounds||e[14]!==r?(p=i.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=r,e[15]=p):p=e[15];let u;e[16]!==o?(u=()=>o(An),e[16]=o,e[17]=u):u=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let h;e[18]!==a||e[19]!==x?(h=M(a,"rounded-md flex items-center justify-center transition-colors",x),e[18]=a,e[19]=x,e[20]=h):h=e[20];let g;e[21]!==i.enableSounds?(g=i.enableSounds?s.jsx(ws,{size:14}):s.jsx(Is,{size:14}),e[21]=i.enableSounds,e[22]=g):g=e[22];let b;e[23]!==p||e[24]!==u||e[25]!==h||e[26]!==g?(b=s.jsx("button",{type:"button","aria-label":p,onClick:u,className:h,children:g}),e[23]=p,e[24]=u,e[25]=h,e[26]=g,e[27]=b):b=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.303.16"]}),e[28]=j):j=e[28];let S;e[29]!==b?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[b,j]}),e[29]=b,e[30]=S):S=e[30];let v;return e[31]!==S||e[32]!==c||e[33]!==m?(v=s.jsxs("div",{className:c,children:[m,S]}),e[31]=S,e[32]=c,e[33]=m,e[34]=v):v=e[34],v}function An(t){return{...t,enableSounds:!t.enableSounds}}function Je(t){const e=_.c(54),{user:n,userImage:i,menuItems:o,signOutItem:l,stopImpersonatingItem:r,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:f,close:m,isMobile:p}=t;if(p){let v;e[0]!==a||e[1]!==n||e[2]!==i?(v=s.jsx(Ve,{user:n,userImage:i,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=n,e[2]=i,e[3]=v):v=e[3];let y;if(e[4]!==m||e[5]!==o){let A;e[7]!==m?(A=D=>s.jsx(ce,{item:D,onClose:m},D.key),e[7]=m,e[8]=A):A=e[8],y=o.map(A),e[4]=m,e[5]=o,e[6]=y}else y=e[6];let N;e[9]!==m||e[10]!==r?(N=r&&s.jsx(ce,{item:r,onClose:m}),e[9]=m,e[10]=r,e[11]=N):N=e[11];let k;e[12]!==m||e[13]!==l?(k=s.jsx(ce,{item:l,onClose:m}),e[12]=m,e[13]=l,e[14]=k):k=e[14];let C;e[15]!==y||e[16]!==N||e[17]!==k?(C=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[y,N,k]})}),e[15]=y,e[16]=N,e[17]=k,e[18]=C):C=e[18];let w;e[19]!==c||e[20]!==f||e[21]!==d?(w=s.jsx(Xe,{themeOptions:d,preferences:c,setPreferences:f,isMobile:!0}),e[19]=c,e[20]=f,e[21]=d,e[22]=w):w=e[22];let I;return e[23]!==v||e[24]!==C||e[25]!==w?(I=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,C,w]}),e[23]=v,e[24]=C,e[25]=w,e[26]=I):I=e[26],I}let u;e[27]!==a||e[28]!==n||e[29]!==i?(u=s.jsx(Ve,{user:n,userImage:i,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=n,e[29]=i,e[30]=u):u=e[30];let x;if(e[31]!==m||e[32]!==o){let v;e[34]!==m?(v=y=>s.jsx(ce,{item:y,onClose:m},y.key),e[34]=m,e[35]=v):v=e[35],x=o.map(v),e[31]=m,e[32]=o,e[33]=x}else x=e[33];let h;e[36]!==m||e[37]!==r?(h=r&&s.jsx(ce,{item:r,onClose:m}),e[36]=m,e[37]=r,e[38]=h):h=e[38];let g;e[39]!==m||e[40]!==l?(g=s.jsx(ce,{item:l,onClose:m}),e[39]=m,e[40]=l,e[41]=g):g=e[41];let b;e[42]!==x||e[43]!==h||e[44]!==g?(b=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,h,g]}),e[42]=x,e[43]=h,e[44]=g,e[45]=b):b=e[45];let j;e[46]!==c||e[47]!==f||e[48]!==d?(j=s.jsx(Xe,{themeOptions:d,preferences:c,setPreferences:f,isMobile:!1}),e[46]=c,e[47]=f,e[48]=d,e[49]=j):j=e[49];let S;return e[50]!==u||e[51]!==b||e[52]!==j?(S=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[u,b,j]})}),e[50]=u,e[51]=b,e[52]=j,e[53]=S):S=e[53],S}function Fe(){const t=_.c(107),e=$(),{data:n}=me.useSession(),{org:i}=E(),o=B();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org",shouldThrow:!1},t[0]=l):l=t[0];const a=Dt(l)?.params.org,[d,c]=ct(),f=dt(),{isAdmin:m}=Us(),p=Bs(),[u,x]=O.useState(!1),[h,g]=O.useState(!1),b=n?.user,j=b?.image,S=!!n?.session?.impersonatedBy;let v;t[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>x(!1),t[1]=v):v=t[1];const y=v;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let k;t[4]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(fe,{size:16}),t[4]=k):k=t[4];let C;t[5]!==o||t[6]!==a?(C=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=C):C=t[7];let w;t[8]!==N||t[9]!==C?(w={key:"preferences",label:N,icon:k,onClick:C},t[8]=N,t[9]=C,t[10]=w):w=t[10];let I;t[11]!==i||t[12]!==o?(I=i?[{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(Rs,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=I):I=t[13];let A;t[14]!==p||t[15]!==e?(A=(Ks()||Ye())&&!p?[{key:"install-desktop-app",label:Ye()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:s.jsx(Cs,{size:16}),onClick:()=>g(!0)}]:[],t[14]=p,t[15]=e,t[16]=A):A=t[16];let D;t[17]!==e?(D=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=D):D=t[18];let ue;t[19]===Symbol.for("react.memo_cache_sentinel")?(ue=s.jsx(ks,{size:16}),t[19]=ue):ue=t[19];let K;t[20]!==D?(K={key:"terms",label:D,icon:ue,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=D,t[21]=K):K=t[21];let q;t[22]!==e?(q=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=q):q=t[23];let pe;t[24]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(Ds,{size:16}),t[24]=pe):pe=t[24];let W;t[25]!==q?(W={key:"privacy",label:q,icon:pe,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=q,t[26]=W):W=t[26];let H;t[27]!==e?(H=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=H):H=t[28];let xe;t[29]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(Ft,{className:"w-4 h-4"}),t[29]=xe):xe=t[29];let G;t[30]!==H?(G={key:"github",label:H,icon:xe,href:"https://github.com/decocms/studio",external:!0},t[30]=H,t[31]=G):G=t[31];let Y;t[32]!==e?(Y=e("common.accountPopover.community"),t[32]=e,t[33]=Y):Y=t[33];let he;t[34]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(Ls,{size:16}),t[34]=he):he=t[34];let Q;t[35]!==Y?(Q={key:"community",label:Y,icon:he,href:"https://decocms.com/discord",external:!0},t[35]=Y,t[36]=Q):Q=t[36];let V;t[37]!==e?(V=e("common.accountPopover.homepage"),t[37]=e,t[38]=V):V=t[38];let be;t[39]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Ps,{size:16}),t[39]=be):be=t[39];let X;t[40]!==V?(X={key:"homepage",label:V,icon:be,href:"https://decocms.com",external:!0},t[40]=V,t[41]=X):X=t[41];let J;t[42]!==m||t[43]!==o||t[44]!==e?(J=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(Fs,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=J):J=t[45];let ge;t[46]!==K||t[47]!==W||t[48]!==G||t[49]!==Q||t[50]!==X||t[51]!==J||t[52]!==w||t[53]!==I||t[54]!==A?(ge=[w,...I,...A,K,W,G,Q,X,...J],t[46]=K,t[47]=W,t[48]=G,t[49]=Q,t[50]=X,t[51]=J,t[52]=w,t[53]=I,t[54]=A,t[55]=ge):ge=t[55];const Me=ge;let Z;t[56]!==e?(Z=e("common.accountPopover.signOut"),t[56]=e,t[57]=Z):Z=t[57];let je;t[58]===Symbol.for("react.memo_cache_sentinel")?(je=s.jsx(Ge,{size:16}),t[58]=je):je=t[58];let ve;t[59]!==Z?(ve={key:"logout",label:Z,icon:je,onClick:On},t[59]=Z,t[60]=ve):ve=t[60];const Oe=ve;let ye;t[61]!==S||t[62]!==e?(ye=S?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(Ge,{size:16}),onClick:async()=>{const{error:We}=await me.admin.stopImpersonating();if(We){mt.error(We.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=S,t[62]=e,t[63]=ye):ye=t[63];const Pe=ye;let Se;t[64]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx(Es,{size:14}),t[64]=Se):Se=t[64];let ee;t[65]!==e?(ee=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=ee):ee=t[66];let te;t[67]!==ee?(te={value:"light",icon:Se,label:ee},t[67]=ee,t[68]=te):te=t[68];let _e;t[69]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(Ts,{size:14}),t[69]=_e):_e=t[69];let se;t[70]!==e?(se=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=se):se=t[71];let ne;t[72]!==se?(ne={value:"dark",icon:_e,label:se},t[72]=se,t[73]=ne):ne=t[73];let Ne;t[74]===Symbol.for("react.memo_cache_sentinel")?(Ne=s.jsx(zs,{size:14}),t[74]=Ne):Ne=t[74];let oe;t[75]!==e?(oe=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=oe):oe=t[76];let ie;t[77]!==oe?(ie={value:"system",icon:Ne,label:oe},t[77]=oe,t[78]=ie):ie=t[78];let Ce;t[79]!==te||t[80]!==ne||t[81]!==ie?(Ce=[te,ne,ie],t[79]=te,t[80]=ne,t[81]=ie,t[82]=Ce):Ce=t[82];const Re=Ce;let ke;t[83]!==S||t[84]!==f||t[85]!==Me||t[86]!==d||t[87]!==c||t[88]!==Oe||t[89]!==Pe||t[90]!==Re||t[91]!==b||t[92]!==j?(ke={user:b,userImage:j,menuItems:Me,signOutItem:Oe,stopImpersonatingItem:Pe,isImpersonating:S,themeOptions:Re,preferences:d,setPreferences:c,close:y,isMobile:f},t[83]=S,t[84]=f,t[85]=Me,t[86]=d,t[87]=c,t[88]=Oe,t[89]=Pe,t[90]=Re,t[91]=b,t[92]=j,t[93]=ke):ke=t[93];const we=ke;let le;t[94]!==S||t[95]!==f||t[96]!==u||t[97]!==we||t[98]!==e||t[99]!==b?.name||t[100]!==j?(le=f?s.jsxs(ys,{open:u,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:M("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",S&&"border-2 border-dashed border-warning"),children:[s.jsx($e,{url:j,fallback:b?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:b?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(Ss,{className:"h-[80dvh] p-0",children:[s.jsx(_s,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(Je,{...we})]})]}):s.jsxs(ht,{open:u,onOpenChange:x,children:[s.jsx(Be,{asChild:!0,children:s.jsxs(z,{tooltip:b?.name??e("common.accountPopover.defaultAccountLabel"),className:M("rounded-md",S&&"border-2 border-dashed border-warning"),children:[s.jsx($e,{url:j,fallback:b?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:b?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(bt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Mn,children:s.jsx(Je,{...we})})]}),t[94]=S,t[95]=f,t[96]=u,t[97]=we,t[98]=e,t[99]=b?.name,t[100]=j,t[101]=le):le=t[101];let re;t[102]!==h?(re=s.jsx(qs,{open:h,onOpenChange:g}),t[102]=h,t[103]=re):re=t[103];let Ie;return t[104]!==le||t[105]!==re?(Ie=s.jsxs(s.Fragment,{children:[le,re]}),t[104]=le,t[105]=re,t[106]=Ie):Ie=t[106],Ie}function Mn(t){return t.preventDefault()}function On(){L("signed_out",{source:"account_popover"}),Lt(),me.signOut()}class Pn extends O.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Rn(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function zn(){const t=_.c(17),e=B(),{org:n}=E(),{hasDecoKey:i,balanceDollars:o}=ms();if(!i)return null;let l;t[0]!==o?(l=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=l):l=t[1];let r;t[2]!==o?(r=M(o!=null&&Rn(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx($s,{}),t[7]=d):d=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let f;t[10]!==c?(f=s.jsx("span",{children:c}),t[10]=c,t[11]=f):f=t[11];let m;return t[12]!==l||t[13]!==r||t[14]!==a||t[15]!==f?(m=s.jsx(T,{children:s.jsx(P,{children:s.jsxs(z,{tooltip:l,className:r,onClick:a,children:[d,f]})})}),t[12]=l,t[13]=r,t[14]=a,t[15]=f,t[16]=m):m=t[16],m}function Ze(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Pn,{children:s.jsx(O.Suspense,{fallback:null,children:s.jsx(zn,{})})}),t[0]=e):e=t[0],e}const En=6e4;function Tn(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Dn(t,e){if(!t)return t;const n=e?new Set(e):null;let i=0;const o=t.pages.map(r=>{const a=r.notifications.filter(d=>n&&!n.has(d.id)?!0:(i++,!1));return{...r,notifications:a}}),l=n?Math.max(0,(t.pages[0]?.unreadCount??0)-i):0;return{...t,pages:o.map(r=>({...r,unreadCount:l}))}}function Fn(t,e){const n=_.c(4),{data:i}=me.useSession(),o=i?.user?.id;let l;n[0]!==e||n[1]!==t||n[2]!==o?(l=r=>!t||!o?Bn:Xs.subscribe(t,d=>{try{if(JSON.parse(d.data).subject!==o)return}catch{return}e(),r()},e),n[0]=e,n[1]=t,n[2]=o,n[3]=l):l=n[3],O.useSyncExternalStore(l,Un,Ln)}function Ln(){return 0}function Un(){return 0}function Bn(){}function wt(){const t=_.c(37),{locator:e,org:n}=E(),i=Wt(),o=Ht();let l;t[0]!==e?(l=ot.notifications(e),t[0]=e,t[1]=l):l=t[1];const r=l;let a;t[2]!==i?(a=C=>{const{pageParam:w}=C;return Tn(i,w)},t[2]=i,t[3]=a):a=t[3];let d;t[4]!==r||t[5]!==a?(d={queryKey:r,queryFn:a,initialPageParam:void 0,getNextPageParam:Wn,refetchInterval:En},t[4]=r,t[5]=a,t[6]=d):d=t[6];const c=Vs(d);let f;t[7]!==o||t[8]!==r?(f=()=>o.invalidateQueries({queryKey:r,refetchType:"active"}),t[7]=o,t[8]=r,t[9]=f):f=t[9],Fn(n.slug,f);let m;t[10]!==i?(m=C=>i.call("NOTIFICATION_MARK_READ",C?{ids:C}:{}),t[10]=i,t[11]=m):m=t[11];let p,u;t[12]!==o||t[13]!==r?(p=async C=>{await o.cancelQueries({queryKey:r}),o.setQueryData(r,w=>Dn(w,C))},u=()=>o.invalidateQueries({queryKey:r}),t[12]=o,t[13]=r,t[14]=p,t[15]=u):(p=t[14],u=t[15]);let x;t[16]!==m||t[17]!==p||t[18]!==u?(x={mutationFn:m,onMutate:p,onSettled:u},t[16]=m,t[17]=p,t[18]=u,t[19]=x):x=t[19];const h=Ee(x);let g;t[20]!==c.data?.pages?(g=c.data?.pages??[],t[20]=c.data?.pages,t[21]=g):g=t[21];const b=g;let j;t[22]!==b?(j=b.flatMap(Kn),t[22]=b,t[23]=j):j=t[23];const S=b[0]?.unreadCount??0;let v;t[24]!==c?(v=()=>{c.hasNextPage&&!c.isFetchingNextPage&&c.fetchNextPage()},t[24]=c,t[25]=v):v=t[25];let y,N;t[26]!==h?(y=()=>h.mutate(null),N=C=>h.mutate([C]),t[26]=h,t[27]=y,t[28]=N):(y=t[27],N=t[28]);let k;return t[29]!==c.hasNextPage||t[30]!==c.isFetchingNextPage||t[31]!==S||t[32]!==v||t[33]!==y||t[34]!==N||t[35]!==j?(k={updates:j,redDotCount:S,hasMore:c.hasNextPage,isFetchingMore:c.isFetchingNextPage,fetchMore:v,markAllRead:y,markRead:N},t[29]=c.hasNextPage,t[30]=c.isFetchingNextPage,t[31]=S,t[32]=v,t[33]=y,t[34]=N,t[35]=j,t[36]=k):k=t[36],k}function Kn(t){return t.notifications.map(qn)}function qn(t){return{id:t.id,taskBoardItemId:t.taskBoardItemId,taskTitle:t.taskTitle,taskKeySeq:t.taskKeySeq,action:t.type,actorName:t.actorName,actorImage:t.actorImage,occurredAt:t.createdAt}}function Wn(t){return t.nextCursor??void 0}function Hn(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");default:{const n=t.action;return String(n)}}}function Gn(t){const e=_.c(28),{update:n,orgSlug:i,onSelect:o}=t,l=$();let r;e[0]!==i||e[1]!==n.taskKeySeq?(r=ut(i,n.taskKeySeq),e[0]=i,e[1]=n.taskKeySeq,e[2]=r):r=e[2];const a=r,d=!n.actorName;let c;e[3]!==d||e[4]!==n.actorImage||e[5]!==n.actorName?(c=d?s.jsx(fs,{size:24,className:"shrink-0"}):s.jsx($e,{url:n.actorImage??void 0,fallback:Zs(n.actorName??void 0),shape:"circle",size:"xs",className:"shrink-0"}),e[3]=d,e[4]=n.actorImage,e[5]=n.actorName,e[6]=c):c=e[6];const f=a?`${a} · `:"";let m;e[7]!==f||e[8]!==n.taskTitle?(m=s.jsxs("p",{className:"truncate text-xs text-muted-foreground",children:[f,n.taskTitle]}),e[7]=f,e[8]=n.taskTitle,e[9]=m):m=e[9];let p;e[10]!==l||e[11]!==n?(p=Hn(n,l),e[10]=l,e[11]=n,e[12]=p):p=e[12];let u;e[13]!==p?(u=s.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:p}),e[13]=p,e[14]=u):u=e[14];let x;e[15]!==m||e[16]!==u?(x=s.jsxs("div",{className:"min-w-0 flex-1",children:[m,u]}),e[15]=m,e[16]=u,e[17]=x):x=e[17];let h;e[18]!==n.occurredAt?(h=en(new Date(n.occurredAt)),e[18]=n.occurredAt,e[19]=h):h=e[19];let g;e[20]!==h?(g=s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:h}),e[20]=h,e[21]=g):g=e[21];let b;e[22]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Js,{size:16,className:"shrink-0 text-muted-foreground"}),e[22]=b):b=e[22];let j;return e[23]!==o||e[24]!==c||e[25]!==x||e[26]!==g?(j=s.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-center gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[c,x,g,b]}),e[23]=o,e[24]=c,e[25]=x,e[26]=g,e[27]=j):j=e[27],j}function Yn(t){const e=_.c(2),{onReach:n}=t;let i;return e[0]!==n?(i=s.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const l=new IntersectionObserver(r=>{r.some(Qn)&&n()});return l.observe(o),()=>l.disconnect()}}),e[0]=n,e[1]=i):i=e[1],i}function Qn(t){return t.isIntersecting}function Vn(t){const e=_.c(23),{onClose:n}=t,i=$(),o=B(),{org:l}=E(),{updates:r,markAllRead:a,markRead:d,hasMore:c,fetchMore:f}=wt();let m;e[0]!==i?(m=i("sidebar.inbox.title"),e[0]=i,e[1]=m):m=e[1];let p;e[2]!==m?(p=s.jsx("h3",{className:"text-sm font-medium",children:m}),e[2]=m,e[3]=p):p=e[3];let u;e[4]!==a||e[5]!==i||e[6]!==r.length?(u=r.length>0&&s.jsx(Ae,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:a,children:i("sidebar.inbox.markAllRead")}),e[4]=a,e[5]=i,e[6]=r.length,e[7]=u):u=e[7];let x;e[8]!==p||e[9]!==u?(x=s.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[p,u]}),e[8]=p,e[9]=u,e[10]=x):x=e[10];let h;e[11]!==f||e[12]!==c||e[13]!==d||e[14]!==o||e[15]!==n||e[16]!==l||e[17]!==i||e[18]!==r?(h=r.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[s.jsx(Ke,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:i("sidebar.inbox.emptyTitle")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:i("sidebar.inbox.emptyBody")})]}):s.jsxs(Qs,{className:"min-h-0 flex-1",children:[r.map(b=>{const j=ut(l.slug,b.taskKeySeq);return s.jsx(Gn,{update:b,orgSlug:l.slug,onSelect:()=>{d(b.id),n(),j&&o({to:"/$org/tasks/{-$taskKey}",params:{org:l.slug,taskKey:j}})}},b.id)}),c&&s.jsx(Yn,{onReach:f})]}),e[11]=f,e[12]=c,e[13]=d,e[14]=o,e[15]=n,e[16]=l,e[17]=i,e[18]=r,e[19]=h):h=e[19];let g;return e[20]!==x||e[21]!==h?(g=s.jsxs(s.Fragment,{children:[x,h]}),e[20]=x,e[21]=h,e[22]=g):g=e[22],g}function It(){const t=_.c(1),{redDotCount:e}=wt();if(e===0)return null;let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=n):n=t[0],n}function $t(t){const e=_.c(11),{open:n,onOpenChange:i,side:o,children:l}=t;let r;e[0]!==i||e[1]!==n?(r=n&&s.jsx(Vn,{onClose:()=>i(!1)}),e[0]=i,e[1]=n,e[2]=r):r=e[2];let a;e[3]!==o||e[4]!==r?(a=s.jsx(bt,{side:o,align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(400px,calc(100vw-2rem))] flex-col p-0",children:r}),e[3]=o,e[4]=r,e[5]=a):a=e[5];let d;return e[6]!==l||e[7]!==i||e[8]!==n||e[9]!==a?(d=s.jsxs(ht,{open:n,onOpenChange:i,children:[l,a]}),e[6]=l,e[7]=i,e[8]=n,e[9]=a,e[10]=d):d=e[10],d}function At(){const t=_.c(9),e=$(),[n,i]=O.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let l,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ke,{size:15}),r=s.jsx(It,{}),t[2]=l,t[3]=r):(l=t[2],r=t[3]);let a;t[4]!==o?(a=s.jsx(Be,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[l,r]})}),t[4]=o,t[5]=a):a=t[5];let d;return t[6]!==n||t[7]!==a?(d=s.jsx($t,{open:n,onOpenChange:i,side:"top",children:a}),t[6]=n,t[7]=a,t[8]=d):d=t[8],d}function Xn(){const t=_.c(15),e=$(),[n,i]=O.useState(!1),{state:o}=U();let l;t[0]!==o||t[1]!==e?(l=o==="collapsed"?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=l):l=t[2];let r,a;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ke,{}),a=s.jsx(It,{}),t[3]=r,t[4]=a):(r=t[3],a=t[4]);let d;t[5]!==e?(d=e("sidebar.inbox.title"),t[5]=e,t[6]=d):d=t[6];let c;t[7]!==d?(c=s.jsx("span",{className:"truncate",children:d}),t[7]=d,t[8]=c):c=t[8];let f;t[9]!==l||t[10]!==c?(f=s.jsx(Be,{asChild:!0,children:s.jsxs(z,{tooltip:l,className:"relative",children:[r,a,c]})}),t[9]=l,t[10]=c,t[11]=f):f=t[11];let m;return t[12]!==n||t[13]!==f?(m=s.jsx($t,{open:n,onOpenChange:i,side:"right",children:f}),t[12]=n,t[13]=f,t[14]=m):m=t[14],m}function Jn(){const t=_.c(14),e=$(),n=B(),{org:i}=E();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==n||t[3]!==i.slug?(l=()=>n({to:"/$org/settings",params:{org:i.slug}}),t[2]=n,t[3]=i.slug,t[4]=l):l=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(fe,{}),t[5]=r):r=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let d;t[8]!==a?(d=s.jsx("span",{children:a}),t[8]=a,t[9]=d):d=t[9];let c;return t[10]!==o||t[11]!==l||t[12]!==d?(c=s.jsxs(z,{tooltip:o,onClick:l,children:[r,d]}),t[10]=o,t[11]=l,t[12]=d,t[13]=c):c=t[13],c}function Zn(){const t=_.c(9),e=$(),n=B(),{org:i}=E();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==n||t[3]!==i.slug?(l=()=>n({to:"/$org/settings",params:{org:i.slug}}),t[2]=n,t[3]=i.slug,t[4]=l):l=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(fe,{size:15}),t[5]=r):r=t[5];let a;return t[6]!==o||t[7]!==l?(a=s.jsx("button",{type:"button","aria-label":o,onClick:l,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:r}),t[6]=o,t[7]=l,t[8]=a):a=t[8],a}function et(){const t=_.c(29),e=$(),[n,i]=O.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(gt,{}),t[2]=l):l=t[2];let r;t[3]!==e?(r=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=r):r=t[4];let a;t[5]!==r?(a=s.jsx("span",{children:r}),t[5]=r,t[6]=a):a=t[6];let d;t[7]!==o||t[8]!==a?(d=s.jsx(P,{children:s.jsx(jt,{trigger:s.jsxs(z,{tooltip:o,children:[l,a]})})}),t[7]=o,t[8]=a,t[9]=d):d=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let f,m;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=()=>i(!0),m=s.jsx(Gs,{}),t[12]=f,t[13]=m):(f=t[12],m=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let u;t[16]!==p?(u=s.jsx("span",{children:p}),t[16]=p,t[17]=u):u=t[17];let x;t[18]!==c||t[19]!==u?(x=s.jsx(P,{children:s.jsxs(z,{tooltip:c,onClick:f,children:[m,u]})}),t[18]=c,t[19]=u,t[20]=x):x=t[20];let h;t[21]!==x||t[22]!==d?(h=s.jsxs(T,{className:"gap-0.5",children:[d,x]}),t[21]=x,t[22]=d,t[23]=h):h=t[23];let g;t[24]!==n?(g=s.jsx(us,{open:n,onOpenChange:i,mode:"browse"}),t[24]=n,t[25]=g):g=t[25];let b;return t[26]!==h||t[27]!==g?(b=s.jsxs(s.Fragment,{children:[h,g]}),t[26]=h,t[27]=g,t[28]=b):b=t[28],b}function tt(){const t=_.c(10),e=$();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=n):n=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(gt,{}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let l;t[5]!==o?(l=s.jsx("span",{children:o}),t[5]=o,t[6]=l):l=t[6];let r;return t[7]!==n||t[8]!==l?(r=s.jsx(T,{className:"gap-0.5",children:s.jsx(P,{children:s.jsx(jt,{trigger:s.jsxs(z,{tooltip:n,children:[i,l]})})})}),t[7]=n,t[8]=l,t[9]=r):r=t[9],r}function eo(){const t=_.c(18),{state:e}=U(),n=e==="collapsed",i=vs(),o=!i;if(n){let c;t[0]!==o?(c=o&&s.jsx(Ze,{}),t[0]=o,t[1]=c):c=t[1];let f;t[2]!==i?(f=i?s.jsx(tt,{}):s.jsx(et,{}),t[2]=i,t[3]=f):f=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(P,{children:s.jsx(Xn,{})}),t[4]=m):m=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(P,{children:s.jsx(Jn,{})}),t[5]=p):p=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs(T,{children:[m,p,s.jsx(P,{children:s.jsx(Fe,{})})]}),t[6]=u):u=t[6];let x;return t[7]!==c||t[8]!==f?(x=s.jsxs(Te,{className:"px-2 pb-3 gap-1",children:[c,f,u]}),t[7]=c,t[8]=f,t[9]=x):x=t[9],x}let l;t[10]!==o?(l=o&&s.jsx(Ze,{}),t[10]=o,t[11]=l):l=t[11];let r;t[12]!==i?(r=i?s.jsx(tt,{}):s.jsx(et,{}),t[12]=i,t[13]=r):r=t[13];let a;t[14]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(T,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Fe,{})}),s.jsx(At,{}),s.jsx(Zn,{})]})})}),t[14]=a):a=t[14];let d;return t[15]!==l||t[16]!==r?(d=s.jsxs(Te,{className:"px-2 pb-3 gap-0.5",children:[l,r,a]}),t[15]=l,t[16]=r,t[17]=d):d=t[17],d}function to(){const t=_.c(12),e=$(),n=B(),{org:i}=E(),{setOpenMobile:o}=U();let l,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(T,{children:s.jsx(P,{children:s.jsx(Fe,{})})})}),r=s.jsx(At,{}),t[0]=l,t[1]=r):(l=t[0],r=t[1]);let a;t[2]!==e?(a=e("sidebar.sidebarFooterMobile.settings"),t[2]=e,t[3]=a):a=t[3];let d;t[4]!==n||t[5]!==i.slug||t[6]!==o?(d=()=>{n({to:"/$org/settings",params:{org:i.slug}}),o(!1)},t[4]=n,t[5]=i.slug,t[6]=o,t[7]=d):d=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(fe,{className:"size-4"}),t[8]=c):c=t[8];let f;return t[9]!==a||t[10]!==d?(f=s.jsx(Te,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[l,r,s.jsx(xt,{"aria-label":a,onClick:d,children:c})]})}),t[9]=a,t[10]=d,t[11]=f):f=t[11],f}const so=5,no=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function oo(){const t=_.c(3),{state:e}=U();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:so}).map(ro)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(F,{className:"size-6 rounded-md"}),s.jsx(F,{className:"size-6 rounded-md"}),s.jsx(F,{className:"size-6 rounded-md"})]}),s.jsx(F,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:no.map(io)})]}),t[2]=i):i=t[2],i}function io(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(F,{className:"size-5 rounded-full shrink-0"}),s.jsx(F,{className:M("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(lo)})]},e)}function lo(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(F,{className:"h-3 flex-1 rounded-sm"})},e)}function ro(t,e){return s.jsx(F,{className:"size-10 rounded-lg mx-auto"},e)}function ao(t,e,n){let i=null;for(const o of t)o.virtual_mcp_id===e&&o.created_by===n&&(o.hidden||(!i||o.updated_at>i.updated_at)&&(i=o));return i}const Mt=[],co=()=>()=>{};function mo(){const t=_.c(8),e=$(),{org:n}=E(),i=vt(),o=fo;let l;if(t[0]!==i||t[1]!==n.slug||t[2]!==e){let r;t[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(As,{size:16}),t[4]=r):r=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ms,{size:16}),t[5]=a):a=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ys,{size:16}),t[6]=d):d=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(tn,{size:16}),t[7]=c):c=t[7],l=[o("overview",e("sidebar.navDestinations.home"),r,i===R.home||i===R.orgIndex,{to:R.home,params:{org:n.slug}}),o("reports",e("sidebar.navDestinations.reports"),a,i===R.reports,{to:R.reports,params:{org:n.slug}}),o("board",e("sidebar.navDestinations.tasks"),d,i===R.tasks,{to:R.tasks,params:{org:n.slug,taskKey:void 0}}),o("files",e("sidebar.navDestinations.library"),c,i===R.library,{to:R.library,params:{org:n.slug}})],t[0]=i,t[1]=n.slug,t[2]=e,t[3]=l}else l=t[3];return l}function fo(t,e,n,i,o){return{key:t,label:e,icon:n,isActive:i,trackAs:t,link:o}}function st(t){const e=_.c(11),{org:n}=E(),i=sn()??[],o=ln(i),l=vt(),r=Ws(),a=Hs(),{data:d}=me.useSession(),c=d?.user?.id,f=nn();let m;e[0]!==f?.threads.get?(m=f?.threads.get??po,e[0]=f?.threads.get,e[1]=m):m=e[1];let p;e[2]!==f?.threads.get?(p=f?.threads.get??uo,e[2]=f?.threads.get,e[3]=p):p=e[3];const u=O.useSyncExternalStore(f?.threads.subscribe??co,m,p);let x;return e[4]!==r||e[5]!==l||e[6]!==n||e[7]!==a||e[8]!==u||e[9]!==c?(x=h=>{const g=cn(h),b=l===R.agents&&r===h.id,j=b?a??void 0:ao(u,h.id,c)?.id??void 0,S={org:n.slug,project:h.id,panel:void 0};return{key:h.id,label:h.title||g?.name||"",icon:s.jsx(Os,{icon:h.icon,name:h.title,size:"2xs",className:"shrink-0"}),isActive:b,trackAs:"coding_agent",link:{to:R.agents,params:S,search:j?{thread:j}:{}},settingsLink:{to:R.agents,params:{...S,panel:"settings"},search:j?{thread:j}:{}}}},e[4]=r,e[5]=l,e[6]=n,e[7]=a,e[8]=u,e[9]=c,e[10]=x):x=e[10],i.filter(h=>t(h,o)).map(x)}function uo(){return Mt}function po(){return Mt}function xo(t){const e=_.c(14),{onNavigate:n}=t,i=$(),o=mo(),l=st(bo),r=st(ho),a=[...l,...r],[d]=ct(),{showProjectSettingsGear:c}=d,{state:f,isMobile:m}=U(),p=f==="collapsed"&&!m;let u;e[0]!==p||e[1]!==m||e[2]!==n||e[3]!==c||e[4]!==i?(u=y=>{const N=y.settingsLink&&c&&!p;return s.jsxs(P,{children:[s.jsx(z,{asChild:!0,isActive:y.isActive,tooltip:p?y.label:void 0,className:M(N&&"group-hover/menu-item:bg-sidebar-accent group-hover/menu-item:text-sidebar-accent-foreground"),children:s.jsxs(He,{...y.link,"aria-current":y.isActive?"page":void 0,onClick:()=>{L("nav_destination_clicked",{destination:y.trackAs}),n?.()},children:[y.icon,s.jsx("span",{className:M("truncate",N&&"pr-7"),children:y.label})]})}),N&&y.settingsLink&&s.jsx(Ae,{asChild:!0,variant:"ghost",size:"icon-sm",className:M("absolute right-1 top-1/2 -translate-y-1/2 text-sidebar-foreground/60 hover:text-sidebar-foreground/60",m?"opacity-100":"opacity-0 group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100"),children:s.jsx(He,{...y.settingsLink,"aria-label":i("sidebar.navDestinations.projectSettings",{name:y.label}),onClick:()=>{L("nav_destination_clicked",{destination:"coding_agent_settings"}),n?.()},children:s.jsx(fe,{})})})]},y.key)},e[0]=p,e[1]=m,e[2]=n,e[3]=c,e[4]=i,e[5]=u):u=e[5];const x=u,h=T,g="gap-1";let b;e[6]!==o||e[7]!==x?(b=o.map(x),e[6]=o,e[7]=x,e[8]=b):b=e[8];const j=a.length>0&&s.jsx("li",{"aria-hidden":!0,className:"h-2"}),S=a.map(x);let v;return e[9]!==h||e[10]!==b||e[11]!==j||e[12]!==S?(v=s.jsxs(h,{className:g,children:[b,j,S]}),e[9]=h,e[10]=b,e[11]=j,e[12]=S,e[13]=v):v=e[13],v}function ho(t,e){return an(t)&&!e.has(t.id)}function bo(t){return rn(t.metadata)}function go(t){const e=_.c(29);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:i}=n,o=$(),{org:l}=E(),{state:r,isMobile:a,toggleSidebar:d}=U(),c=r==="collapsed"&&!a;let f;e[2]!==i?(f=s.jsx(xo,{onNavigate:i}),e[2]=i,e[3]=f):f=e[3];const m=f;if(c){let u;e[4]!==l?(u=s.jsx(xs,{org:l,size:"sm"}),e[4]=l,e[5]=u):u=e[5];let x;e[6]!==l.name||e[7]!==u?(x=s.jsx(z,{tooltip:l.name,children:u}),e[6]=l.name,e[7]=u,e[8]=x):x=e[8];let h;e[9]!==l.slug||e[10]!==x?(h=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(ps,{orgParam:l.slug,side:"right",align:"start",trigger:x})}),e[9]=l.slug,e[10]=x,e[11]=h):h=e[11];let g;e[12]!==o?(g=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=g):g=e[13];let b;e[14]!==o?(b=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=b):b=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(at,{size:16}),e[16]=j):j=e[16];let S;e[17]!==g||e[18]!==b||e[19]!==d?(S=s.jsx(T,{className:"mt-2 gap-1.5",children:s.jsx(P,{children:s.jsx(z,{"aria-label":g,tooltip:b,onClick:d,children:j})})}),e[17]=g,e[18]=b,e[19]=d,e[20]=S):S=e[20];let v;e[21]!==m?(v=s.jsx("div",{className:"mt-1.5 min-h-0 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:m}),e[21]=m,e[22]=v):v=e[22];let y;return e[23]!==v||e[24]!==h||e[25]!==S?(y=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[h,S,v]}),e[23]=v,e[24]=h,e[25]=S,e[26]=y):y=e[26],y}let p;return e[27]!==m?(p=s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:m})}),e[27]=m,e[28]=p):p=e[28],p}function jo(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs(s.Fragment,{children:[s.jsx(ft,{showName:!0}),s.jsx(St,{className:"ml-auto md:size-[34px] rounded-lg"})]}),t[0]=e):e=t[0],e}function Ot(t){const e=_.c(3),{onNavigate:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(oo,{}),e[0]=i):i=e[0];let o;return e[1]!==n?(o=s.jsx(nt,{children:s.jsx(O.Suspense,{fallback:i,children:s.jsx(go,{onNavigate:n})})}),e[1]=n,e[2]=o):o=e[2],o}function vo(){const t=_.c(5),e=_t();let n,i,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(eo,{}),i=s.jsx(jo,{}),o=s.jsx(Ot,{}),t[0]=n,t[1]=i,t[2]=o):(n=t[0],i=t[1],o=t[2]);let l;return t[3]!==e?(l=s.jsx(yt,{children:s.jsx(kt,{sections:e,footer:n,header:i,additionalContent:o})}),t[3]=e,t[4]=l):l=t[4],l}function yo(t){const e=_.c(7),{onClose:n}=t,i=_t();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(to,{}),e[0]=o):o=e[0];let l;e[1]!==n?(l=s.jsx(Ot,{onNavigate:n}),e[1]=n,e[2]=l):l=e[2];let r;return e[3]!==n||e[4]!==i||e[5]!==l?(r=s.jsx(yt,{children:s.jsx(In,{sections:i,onClose:n,footer:o,additionalContent:l})}),e[3]=n,e[4]=i,e[5]=l,e[6]=r):r=e[6],r}const So="sidebar.open";function _o(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Jt,{}),t[0]=e):e=t[0],e}function zl(){const t=_.c(28),e=dt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{connect:i,siteUrl:o}=Gt(n),l=i==="1",[r,a]=it(So,!1),{width:d,wrapperRef:c,onStartResize:f,resetWidth:m}=vn(),p=e;let u;t[1]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ae.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[s.jsx(St,{}),s.jsx(ae.TogglesSlot,{}),s.jsx(ae.TabsSlot,{className:"shrink-0"}),s.jsx(ae.CenterSlot,{}),s.jsx(ae.RightSlot,{})]})}),t[1]=u):u=t[1];const x=u;let h;t[2]===Symbol.for("react.memo_cache_sentinel")?(h={background:"transparent",containerType:"inline-size"},t[2]=h):h=t[2];let g;t[3]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Yt,{className:"flex flex-col min-h-0",style:h,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(O.Suspense,{fallback:s.jsx(_o,{}),children:s.jsx(Qt,{})})})})}),t[3]=g):g=t[3];const b=g,j=p&&x,S=`${d}px`;let v;t[4]!==S?(v={"--sidebar-width":S,"--sidebar-width-icon":"3.125rem"},t[4]=S,t[5]=v):v=t[5];const y=v;let N;t[6]!==e||t[7]!==f||t[8]!==m?(N=!e&&s.jsxs(s.Fragment,{children:[s.jsx(vo,{}),s.jsx(bn,{onPointerDown:f,onDoubleClick:m})]}),t[6]=e,t[7]=f,t[8]=m,t[9]=N):N=t[9];let k;t[10]!==y||t[11]!==N||t[12]!==c?(k=s.jsxs(Vt,{ref:c,className:"flex-1 bg-sidebar relative min-h-0",style:y,children:[N,b]}),t[10]=y,t[11]=N,t[12]=c,t[13]=k):k=t[13];let C;t[14]!==e?(C=e&&s.jsx(dn,{renderSidebar:No}),t[14]=e,t[15]=C):C=t[15];let w;t[16]!==o||t[17]!==l?(w=l&&s.jsx(fn,{siteUrl:o}),t[16]=o,t[17]=l,t[18]=w):w=t[18];let I;t[19]!==C||t[20]!==w||t[21]!==j||t[22]!==k?(I=s.jsx(mn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[j,k,C,w]})}),t[19]=C,t[20]=w,t[21]=j,t[22]=k,t[23]=I):I=t[23];let A;return t[24]!==a||t[25]!==r||t[26]!==I?(A=s.jsx(on,{children:s.jsx(ae.Provider,{children:s.jsx(Xt,{open:r,onOpenChange:a,children:I})})}),t[24]=a,t[25]=r,t[26]=I,t[27]=A):A=t[27],A}function No(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(yo,{onClose:e})})})}export{zl as default};
1
+ import{c as _,d as B,H as E,b as $,I as Pt,j as s,B as Ae,r as O,E as nt,J as Rt,z as zt,K as ot,e as Ee,q as L,M as U,R as it,U as Le,W as Ue,X as T,Y as F,n as M,Z as z,_ as P,$ as lt,a0 as Et,a1 as rt,a2 as Tt,a3 as at,a as me,a4 as Dt,x as ct,a5 as dt,t as mt,a6 as Ft,a7 as Lt,a8 as Ut,a9 as Bt,aa as Kt,ab as qt,ac as Wt,p as Ht,ad as Te,L as He,u as Gt,ae as Yt,O as Qt,af as Vt,ag as Xt,ah as Jt}from"./index-Dt4xzxRh.js";import{a as Zt,p as ze,s as es,b as ts,n as ss}from"./self-tool-result-Dt4_R2Xj.js";import{f as ns,b as os,e as is,g as ls}from"./dialog-BsgKtXcv.js";import{c as rs,C as as,a as cs,O as ft,A as ds,u as ms,t as ut,S as fs,b as us,d as ps,e as xs}from"./super-agent-icon-CtnmJgjL.js";import{u as hs}from"./use-mcp-client-DkdpleIo.js";import{C as bs,W as De,S as gs}from"./constants-dLUUoWH7.js";import{i as pt}from"./XCircle-D0PGfwFN.js";import{u as js,a as vs}from"./use-organization-settings-Cru4OoJD.js";import{T as xt,a as ae}from"./toolbar-C1nhAu84.js";import{P as ht,a as Be,b as bt}from"./popover-B6-Ys0fY.js";import{D as ys,a as Ss,b as _s}from"./drawer-bVZuQnUm.js";import{A as $e}from"./avatar-VZD77tJt.js";import{a as Ns}from"./Copy01-Ci-gY1Mf.js";import{n as Cs}from"./Download01-DvsX90Og.js";import{i as ks,a as ws,b as Is,c as $s,t as gt,d as As,e as Ms,A as Os}from"./agent-icon-1Uy4JHGE.js";import{i as Ps}from"./Globe01-DmgQnFDH.js";import{n as Rs}from"./LinkExternal01-CCFX8C9r.js";import{i as Ge}from"./LogOut01--XDLMXg4.js";import{i as zs}from"./Monitor01-lA6KBTMH.js";import{n as Es,a as Ts}from"./Sun-38XX85KF.js";import{a as fe}from"./Settings02-C-VuMkOS.js";import{i as Ds}from"./Shield01-hMr_AjYy.js";import{t as Fs}from"./UserSquare-DTydatTQ.js";import{a as Ls}from"./Users03-B1L_e4Us.js";import{u as Us}from"./use-deployment-admin-BFQ8HqrQ.js";import{u as Bs}from"./use-is-desktop-app-BNujXJc_.js";import{i as Ks,a as Ye,D as qs,u as Ws,b as Hs}from"./use-panel-navigate-BPALkiCE.js";import{a as Gs,n as Ys}from"./ZapSquare-BSDBm0-3.js";import{I as jt}from"./invite-member-dialog-gbvc57jE.js";import{n as Ke}from"./Stars02-BWM8HAhO.js";import{S as Qs}from"./scroll-area-Bp3GVSr-.js";import{u as Vs}from"./useInfiniteQuery-CZrRveyC.js";import{n as Xs}from"./decopilot-sse-pool-BgJs9Iz4.js";import{i as Js}from"./ChevronRight-CGhhUMqZ.js";import{g as Zs}from"./get-initials-D-f_fDFw.js";import{a as en}from"./format-time-BnbuEtat.js";import{i as tn}from"./Share07-Bs7pdZjs.js";import{u as sn}from"./use-virtual-mcp-Br7s7rsG.js";import{u as nn,T as on}from"./hooks-pRLjI1ki.js";import{g as ln,a as rn,b as an,c as cn}from"./agent-capabilities-B52k7xCe.js";import{u as vt,D as R}from"./use-destination-route-Bn3yIPW-.js";import{S as yt}from"./use-navigate-to-agent-BNbXqzhZ.js";import{S as St,M as dn}from"./shell-controls-Bl3Xz0EI.js";import{C as mn}from"./chat-context-Dd07RQrC.js";import"./alert-dialog-CKals38I.js";import"./form-Dx0MB3fU.js";import"./label-4acATUDo.js";import"./input-C0NkEUr-.js";import"./spinner-D3iuVgRx.js";import"./integration-icon-CAak33zg.js";import"./Tool02-CHOuYkmG.js";import"./extract-connection-data-s0CjKUai.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./CheckCircle-CAmi_hLt.js";import"./Check-D2uR7VS6.js";import"./Eye-DlUCg5eK.js";import"./use-debounced-value-V53g41E7.js";import"./authenticate-and-persist-oauth-DwF5HsDl.js";import"./mcp-oauth-CudkBTAh.js";import"./auth-CL7BB7R8.js";import"./track-fnUcFwb2.js";import"./ChevronDown-8xCHcxO5.js";import"./Plus-DJ1u9cvh.js";import"./SearchMd-CSkF3NuW.js";import"./XClose-IrMEsBvE.js";import"./github-repo-picker-D0s7lCE_.js";import"./collection-search-DNi1PrKS.js";import"./use-connection-BgNmeJig.js";import"./ArrowLeft-CiGURYfW.js";import"./LockUnlocked01-BPszj4SU.js";import"./use-mcp-tools-CDJH5neO.js";import"./shell-layout-97WWXRZC.js";import"./SearchLg-ioZdvcNv.js";import"./FilterLines-UPH8xWau.js";import"./Zap-BG8w2q-h.js";import"./required-auth-layout-DUIsRLzp.js";import"./use-org-sso-E6PP4tUf.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./connection-card-DarWMyyd.js";import"./use-registry-connections-D1CcUTZK.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-CITJ0kGN.js";import"./select-4uUeWpPU.js";import"./ChevronUp-DsbjTZEU.js";import"./textarea-CvTRHsZk.js";import"./connection-form-helpers-CZpFHqZl.js";import"./Trash01-B8L_kHj2.js";import"./collection-tabs-Dk9BdEwW.js";import"./badge-D2iqafj_.js";import"./use-infinite-scroll-CRoLBkCZ.js";import"./useSuspenseInfiniteQuery-DmtmbD4_.js";import"./use-ai-providers-CWrLm1AD.js";import"./task-board-RnD3TOhC.js";import"./User01-UY13B65C.js";import"./AlertCircle-CQHLdRGZ.js";import"./Tool01-CXcsQpcs.js";import"./ArrowUp-BYUc6rLi.js";import"./TrendUp01-BXUsJCPa.js";import"./ChevronSelectorVertical-cbyqr5lK.js";import"./DotsVertical-Dn5tfgWo.js";import"./CreditCard01-BNcyZEcR.js";import"./Globe04-D0ajJFya.js";import"./SwitchHorizontal01-B3pukb_d.js";import"./HardDrive-BHuyK3fS.js";import"./Key01-5YRgt-NM.js";import"./Palette-C6GfWC5O.js";import"./Play-w0QeyPJg.js";import"./Stars01-C2yF4VK7.js";import"./Upload01-D8nl8bCp.js";import"./Users01-Cmd-sb0e.js";import"./use-org-auth-client-DtWtVTSq.js";import"./use-organization-roles-CSeA_DI-.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-C4VqK85Z.js";function fn(t){const e=_.c(21),{siteUrl:n}=t,i=B(),{org:o}=E(),l=$();let r;e[0]!==i||e[1]!==o?(r=()=>{localStorage.setItem(Pt.sidebarOpen(),JSON.stringify(!1)),i({...rs(o,De.COMMERCE_DISCOVERY(o.id)),search:{connection:De.COMMERCE_DISCOVERY(o.id),tool:bs,sidepanel:!1}})},e[0]=i,e[1]=o,e[2]=r):r=e[2];const a=r;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ns,{className:"bg-black/15 backdrop-blur-sm"}),e[3]=d):d=e[3];let c;e[4]!==l?(c=l("routes.commerceOnboarding.connectModal.dialogTitle"),e[4]=l,e[5]=c):c=e[5];let f;e[6]!==c?(f=s.jsx(os,{className:"sr-only",children:c}),e[6]=c,e[7]=f):f=e[7];let m;e[8]!==a||e[9]!==l?(m=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:l("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(Ae,{type:"button",size:"xl",className:"w-full",onClick:a,children:[l("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(pt,{size:18})]})]}),e[8]=a,e[9]=l,e[10]=m):m=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Zt,{}),e[11]=p):p=e[11];let u;e[12]!==a||e[13]!==n?(u=s.jsx(O.Suspense,{fallback:p,children:s.jsx(hn,{siteUrlFromUrl:n,onComplete:a})}),e[12]=a,e[13]=n,e[14]=u):u=e[14];let x;e[15]!==m||e[16]!==u?(x=s.jsx(nt,{fallback:m,children:u}),e[15]=m,e[16]=u,e[17]=x):x=e[17];let h;return e[18]!==f||e[19]!==x?(h=s.jsx(is,{open:!0,children:s.jsxs(ls,{children:[d,s.jsxs(Rt,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:xn,onPointerDownOutside:pn,onInteractOutside:un,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[f,x]})]})}),e[18]=f,e[19]=x,e[20]=h):h=e[20],h}function un(t){return t.preventDefault()}function pn(t){return t.preventDefault()}function xn(t){return t.preventDefault()}function hn({siteUrlFromUrl:t,onComplete:e}){const n=$(),{org:i}=E(),o=De.COMMERCE_DISCOVERY(i.id),l=hs({connectionId:gs,orgId:i.id,orgSlug:i.slug}),a=zt({queryKey:ot.commerceDiscoveryConnection(i.id,o),queryFn:async()=>{const v=await l.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return ze(v)},retry:!1}).data.item,d=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||d,f=es(c),[m,p]=O.useState(!0),[u,x]=O.useState(null),h=Ee({mutationFn:async v=>ze(await l.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),g=Ee({mutationFn:async v=>ze(await l.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),b=async()=>{x(null),L("commerce_onboarding_open_report_clicked",{domain:f??void 0,organization_id:i.id});const v=c?ss(c):null;if(v?.ok)try{let y=await g.mutateAsync(v.value);if(y.triggered||(L("commerce_onboarding_run_reclaim",{domain:f??void 0,organization_id:i.id,reason:y.reason??"not_upgraded"}),await h.mutateAsync(v.value),y=await g.mutateAsync(v.value)),!y.triggered){L("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:i.id,error:y.reason??"not_triggered"}),x(n("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(y){L("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:i.id,error:y instanceof Error?y.message:String(y)}),x(n("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},j=js("demo_mode"),S=m||j;return s.jsx(as,{siteHost:f,footer:s.jsxs(s.Fragment,{children:[u?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(cs,{ready:S,pending:g.isPending,label:g.isPending?n("routes.commerceOnboarding.connectModal.openingReport"):n("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{b()},children:s.jsx(pt,{size:18})})}),S?null:s.jsx(Ae,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:g.isPending,onClick:()=>{b()},children:n("routes.commerceOnboarding.connectModal.skip")})]})]}),children:s.jsx(ts,{org:i,cdConnectionId:o,siteUrl:c,onReadinessChange:p})})}function bn(t){const e=_.c(11),{onPointerDown:n,onDoubleClick:i}=t,o=$(),{state:l,isMobile:r}=U();if(r||l==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==o?(d=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=d):d=e[3];let c,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},f=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=f):(c=e[4],f=e[5]);let m;return e[6]!==i||e[7]!==n||e[8]!==a||e[9]!==d?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:n,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:f}),e[6]=i,e[7]=n,e[8]=a,e[9]=d,e[10]=m):m=e[10],m}const qe=240,gn=400,jn="sidebar.width";function de(t){return Math.max(qe,Math.min(gn,t))}function vn(){const t=_.c(11),[e,n]=it(jn,yn),i=O.useRef(null);let o;t[0]!==n||t[1]!==e?(o=f=>{f.preventDefault();const m=f.clientX,p=de(e),u=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=u?Array.from(u.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of x)b.style.transition="none";const h=b=>{const j=de(p+(b.clientX-m));u?.style.setProperty("--sidebar-width",`${j}px`)},g=b=>{const j=de(p+(b.clientX-m));n(j);for(const S of x)S.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",h),window.addEventListener("pointerup",g)},t[0]=n,t[1]=e,t[2]=o):o=t[2];const l=o;let r;t[3]!==n?(r=()=>{n(qe)},t[3]=n,t[4]=r):r=t[4];const a=r;let d;t[5]!==e?(d=de(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==l||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:i,onStartResize:l,resetWidth:a},t[7]=l,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function yn(t){return typeof t=="number"?de(t):qe}function _t(){return[]}function Nt(t){const e=_.c(3),{children:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=i):i=e[0];let o;return e[1]!==n?(o=s.jsxs(Le,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,s.jsx(Ue,{children:s.jsx(T,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function Ct(t){const e=_.c(18),{item:n}=t,{isMobile:i,setOpenMobile:o}=U();let l;e[0]!==i||e[1]!==n||e[2]!==o?(l=()=>{L("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:i}),n.onClick?.(),i&&o(!1)},e[0]=i,e[1]=n,e[2]=o,e[3]=l):l=e[3];const r=l,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=M(d),e[4]=d,e[5]=c):c=e[5];let f;e[6]!==n.label?(f=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=f):f=e[7];let m;e[8]!==r||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==f?(m=s.jsxs(z,{onClick:r,isActive:n.isActive,tooltip:n.label,children:[n.icon,f]}),e[8]=r,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=f,e[13]=m):m=e[13];let p;return e[14]!==n.key||e[15]!==c||e[16]!==m?(p=s.jsx(P,{className:c,children:m},a),e[14]=n.key,e[15]=c,e[16]=m,e[17]=p):p=e[17],p}function Sn(t){const e=_.c(12),{section:n}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(lt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,o=n.group.defaultExpanded;let l;e[2]!==n.group.items?(l=n.group.items.map(Nn),e[2]=n.group.items,e[3]=l):l=e[3];let r;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==l?(r=s.jsx(Nt,{label:i,defaultExpanded:o,children:l}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=l,e[7]=r):r=e[7],r}case"items":{let i;e[8]!==n.items?(i=n.items.map(_n),e[8]=n.items,e[9]=i):i=e[9];let o;return e[10]!==i?(o=s.jsx(Le,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ue,{children:s.jsx(T,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=o):o=e[11],o}case"custom":return n.content}}function _n(t){return s.jsx(Ct,{item:t},t.key)}function Nn(t){return s.jsx(Ct,{item:t},t.key)}function Cn(t){const e=_.c(17),{sections:n,footer:i,additionalContent:o,header:l,variant:r,contentClassName:a}=t,d=r===void 0?"sidebar":r;let c;e[0]!==l?(c=l&&s.jsx(Et,{className:"shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:l}),e[0]=l,e[1]=c):c=e[1];let f;e[2]!==a?(f=M("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=f):f=e[3];let m;e[4]!==n?(m=n.map(kn),e[4]=n,e[5]=m):m=e[5];let p;e[6]!==o?(p=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=p):p=e[7];let u;e[8]!==f||e[9]!==m||e[10]!==p?(u=s.jsxs(rt,{className:f,children:[m,p]}),e[8]=f,e[9]=m,e[10]=p,e[11]=u):u=e[11];let x;return e[12]!==i||e[13]!==c||e[14]!==u||e[15]!==d?(x=s.jsxs(Tt,{variant:d,children:[c,u,i]}),e[12]=i,e[13]=c,e[14]=u,e[15]=d,e[16]=x):x=e[16],x}function kn(t,e){return s.jsx(Sn,{section:t},e)}function kt(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Cn,{...t}),e[0]=t,e[1]=n):n=e[1],n}kt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(F,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Qe(t){const e=_.c(18),{item:n,onClose:i}=t,o=n.isActive&&"z-10";let l;e[0]!==o?(l=M(o),e[0]=o,e[1]=l):l=e[1];let r;e[2]!==n||e[3]!==i?(r=()=>{n.onClick?.(),i()},e[2]=n,e[3]=i,e[4]=r):r=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==r||e[12]!==a||e[13]!==d?(c=s.jsxs(z,{onClick:r,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=r,e[12]=a,e[13]=d,e[14]=c):c=e[14];let f;return e[15]!==l||e[16]!==c?(f=s.jsx(P,{className:l,children:c}),e[15]=l,e[16]=c,e[17]=f):f=e[17],f}function wn(t){const e=_.c(18),{section:n,onClose:i}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(lt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,l=n.group.defaultExpanded;let r;if(e[2]!==i||e[3]!==n.group.items){let d;e[5]!==i?(d=c=>s.jsx(Qe,{item:c,onClose:i},c.key),e[5]=i,e[6]=d):d=e[6],r=n.group.items.map(d),e[2]=i,e[3]=n.group.items,e[4]=r}else r=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==r?(a=s.jsx(Nt,{label:o,defaultExpanded:l,children:r}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=r,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==i||e[12]!==n.items){let r;e[14]!==i?(r=a=>s.jsx(Qe,{item:a,onClose:i},a.key),e[14]=i,e[15]=r):r=e[15],o=n.items.map(r),e[11]=i,e[12]=n.items,e[13]=o}else o=e[13];let l;return e[16]!==o?(l=s.jsx(Le,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ue,{children:s.jsx(T,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=l):l=e[17],l}case"custom":return n.content}}function In(t){const e=_.c(27),{sections:n,onClose:i,footer:o,additionalContent:l}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ft,{}),e[0]=r):r=e[0];let a;e[1]!==i?(a=s.jsx(ds,{onNavigate:i}),e[1]=i,e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1"}),e[3]=d):d=e[3];const c=$();let f;e[4]!==c?(f=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=f):f=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(at,{size:16}),e[6]=m):m=e[6];let p;e[7]!==i||e[8]!==f?(p=s.jsx(xt,{onClick:i,"aria-label":f,children:m}),e[7]=i,e[8]=f,e[9]=p):p=e[9];let u;e[10]!==a||e[11]!==p?(u=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,d,p]}),e[10]=a,e[11]=p,e[12]=u):u=e[12];let x;if(e[13]!==i||e[14]!==n){let j;e[16]!==i?(j=(S,v)=>s.jsx(wn,{section:S,onClose:i},v),e[16]=i,e[17]=j):j=e[17],x=n.map(j),e[13]=i,e[14]=n,e[15]=x}else x=e[15];let h;e[18]!==l?(h=l&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:l}),e[18]=l,e[19]=h):h=e[19];let g;e[20]!==h||e[21]!==x?(g=s.jsxs(rt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[x,h]}),e[20]=h,e[21]=x,e[22]=g):g=e[22];let b;return e[23]!==o||e[24]!==g||e[25]!==u?(b=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[u,g,o]}),e[23]=o,e[24]=g,e[25]=u,e[26]=b):b=e[26],b}function ce(t){const e=_.c(26),{item:n,onClose:i}=t;let o;e[0]!==n.className?(o=M("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",n.className),e[0]=n.className,e[1]=o):o=e[1];const l=o;if(n.href){const f=n.external?"_blank":void 0,m=n.external?"noopener noreferrer":void 0;let p;e[2]!==n.icon?(p=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=p):p=e[3];let u;e[4]!==n.label?(u=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=u):u=e[5];let x;return e[6]!==l||e[7]!==n.href||e[8]!==i||e[9]!==f||e[10]!==m||e[11]!==p||e[12]!==u?(x=s.jsxs("a",{href:n.href,target:f,rel:m,className:l,onClick:i,children:[p,u]}),e[6]=l,e[7]=n.href,e[8]=i,e[9]=f,e[10]=m,e[11]=p,e[12]=u,e[13]=x):x=e[13],x}let r;e[14]!==n||e[15]!==i?(r=()=>{n.onClick?.(),i()},e[14]=n,e[15]=i,e[16]=r):r=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let d;e[19]!==n.label?(d=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=d):d=e[20];let c;return e[21]!==l||e[22]!==r||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:r,className:l,children:[a,d]}),e[21]=l,e[22]=r,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function $n(){const t=_.c(4),e=$();let n;t[0]!==e?(n=e("common.accountPopover.impersonating"),t[0]=e,t[1]=n):n=t[1];let i;return t[2]!==n?(i=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:n}),t[2]=n,t[3]=i):i=t[3],i}function Ve(t){const e=_.c(38),{user:n,userImage:i,isImpersonating:o,isMobile:l}=t,r=$(),a=l?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=M("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=n?.name??"U";let f;e[2]!==c||e[3]!==i?(f=s.jsx($e,{url:i,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=i,e[4]=f):f=e[4];let m;e[5]!==r||e[6]!==n?.name?(m=n?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=n?.name,e[7]=m):m=e[7];let p;e[8]!==m?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=p):p=e[9];let u;e[10]!==o?(u=o&&s.jsx($n,{}),e[10]=o,e[11]=u):u=e[11];let x;e[12]!==p||e[13]!==u?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[p,u]}),e[12]=p,e[13]=u,e[14]=x):x=e[14];const h=n?.email;let g;e[15]!==h?(g=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[15]=h,e[16]=g):g=e[16];let b;e[17]!==g||e[18]!==x?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[x,g]}),e[17]=g,e[18]=x,e[19]=b):b=e[19];let j;e[20]!==r||e[21]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(()=>{mt.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=n,e[22]=j):j=e[22];let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ns,{size:14}),e[23]=S):S=e[23];let v;e[24]!==j?(v=s.jsx(Ut,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:S})}),e[24]=j,e[25]=v):v=e[25];let y;e[26]!==r?(y=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=y):y=e[27];let N;e[28]!==y?(N=s.jsx(Bt,{side:"right",children:s.jsx("p",{className:"text-xs",children:y})}),e[28]=y,e[29]=N):N=e[29];let k;e[30]!==v||e[31]!==N?(k=s.jsx(Kt,{delayDuration:300,children:s.jsxs(qt,{children:[v,N]})}),e[30]=v,e[31]=N,e[32]=k):k=e[32];let C;return e[33]!==b||e[34]!==k||e[35]!==d||e[36]!==f?(C=s.jsxs("div",{className:d,children:[f,b,k]}),e[33]=b,e[34]=k,e[35]=d,e[36]=f,e[37]=C):C=e[37],C}function Xe(t){const e=_.c(35),{themeOptions:n,preferences:i,setPreferences:o,isMobile:l}=t,r=$(),a=l?"size-8":"size-7",d=l?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=M("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let f;if(e[2]!==a||e[3]!==i.theme||e[4]!==o||e[5]!==n){let y;e[7]!==a||e[8]!==i.theme||e[9]!==o?(y=N=>{const{value:k,icon:C,label:w}=N;return s.jsx("button",{type:"button","aria-label":w,onClick:()=>o(I=>({...I,theme:k})),className:M(a,"rounded-md flex items-center justify-center transition-colors",i.theme===k?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:C},k)},e[7]=a,e[8]=i.theme,e[9]=o,e[10]=y):y=e[10],f=n.map(y),e[2]=a,e[3]=i.theme,e[4]=o,e[5]=n,e[6]=f}else f=e[6];let m;e[11]!==f?(m=s.jsx("div",{className:"flex items-center gap-0.5",children:f}),e[11]=f,e[12]=m):m=e[12];let p;e[13]!==i.enableSounds||e[14]!==r?(p=i.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=r,e[15]=p):p=e[15];let u;e[16]!==o?(u=()=>o(An),e[16]=o,e[17]=u):u=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let h;e[18]!==a||e[19]!==x?(h=M(a,"rounded-md flex items-center justify-center transition-colors",x),e[18]=a,e[19]=x,e[20]=h):h=e[20];let g;e[21]!==i.enableSounds?(g=i.enableSounds?s.jsx(ws,{size:14}):s.jsx(Is,{size:14}),e[21]=i.enableSounds,e[22]=g):g=e[22];let b;e[23]!==p||e[24]!==u||e[25]!==h||e[26]!==g?(b=s.jsx("button",{type:"button","aria-label":p,onClick:u,className:h,children:g}),e[23]=p,e[24]=u,e[25]=h,e[26]=g,e[27]=b):b=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.303.18"]}),e[28]=j):j=e[28];let S;e[29]!==b?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[b,j]}),e[29]=b,e[30]=S):S=e[30];let v;return e[31]!==S||e[32]!==c||e[33]!==m?(v=s.jsxs("div",{className:c,children:[m,S]}),e[31]=S,e[32]=c,e[33]=m,e[34]=v):v=e[34],v}function An(t){return{...t,enableSounds:!t.enableSounds}}function Je(t){const e=_.c(54),{user:n,userImage:i,menuItems:o,signOutItem:l,stopImpersonatingItem:r,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:f,close:m,isMobile:p}=t;if(p){let v;e[0]!==a||e[1]!==n||e[2]!==i?(v=s.jsx(Ve,{user:n,userImage:i,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=n,e[2]=i,e[3]=v):v=e[3];let y;if(e[4]!==m||e[5]!==o){let A;e[7]!==m?(A=D=>s.jsx(ce,{item:D,onClose:m},D.key),e[7]=m,e[8]=A):A=e[8],y=o.map(A),e[4]=m,e[5]=o,e[6]=y}else y=e[6];let N;e[9]!==m||e[10]!==r?(N=r&&s.jsx(ce,{item:r,onClose:m}),e[9]=m,e[10]=r,e[11]=N):N=e[11];let k;e[12]!==m||e[13]!==l?(k=s.jsx(ce,{item:l,onClose:m}),e[12]=m,e[13]=l,e[14]=k):k=e[14];let C;e[15]!==y||e[16]!==N||e[17]!==k?(C=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[y,N,k]})}),e[15]=y,e[16]=N,e[17]=k,e[18]=C):C=e[18];let w;e[19]!==c||e[20]!==f||e[21]!==d?(w=s.jsx(Xe,{themeOptions:d,preferences:c,setPreferences:f,isMobile:!0}),e[19]=c,e[20]=f,e[21]=d,e[22]=w):w=e[22];let I;return e[23]!==v||e[24]!==C||e[25]!==w?(I=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,C,w]}),e[23]=v,e[24]=C,e[25]=w,e[26]=I):I=e[26],I}let u;e[27]!==a||e[28]!==n||e[29]!==i?(u=s.jsx(Ve,{user:n,userImage:i,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=n,e[29]=i,e[30]=u):u=e[30];let x;if(e[31]!==m||e[32]!==o){let v;e[34]!==m?(v=y=>s.jsx(ce,{item:y,onClose:m},y.key),e[34]=m,e[35]=v):v=e[35],x=o.map(v),e[31]=m,e[32]=o,e[33]=x}else x=e[33];let h;e[36]!==m||e[37]!==r?(h=r&&s.jsx(ce,{item:r,onClose:m}),e[36]=m,e[37]=r,e[38]=h):h=e[38];let g;e[39]!==m||e[40]!==l?(g=s.jsx(ce,{item:l,onClose:m}),e[39]=m,e[40]=l,e[41]=g):g=e[41];let b;e[42]!==x||e[43]!==h||e[44]!==g?(b=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,h,g]}),e[42]=x,e[43]=h,e[44]=g,e[45]=b):b=e[45];let j;e[46]!==c||e[47]!==f||e[48]!==d?(j=s.jsx(Xe,{themeOptions:d,preferences:c,setPreferences:f,isMobile:!1}),e[46]=c,e[47]=f,e[48]=d,e[49]=j):j=e[49];let S;return e[50]!==u||e[51]!==b||e[52]!==j?(S=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[u,b,j]})}),e[50]=u,e[51]=b,e[52]=j,e[53]=S):S=e[53],S}function Fe(){const t=_.c(107),e=$(),{data:n}=me.useSession(),{org:i}=E(),o=B();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org",shouldThrow:!1},t[0]=l):l=t[0];const a=Dt(l)?.params.org,[d,c]=ct(),f=dt(),{isAdmin:m}=Us(),p=Bs(),[u,x]=O.useState(!1),[h,g]=O.useState(!1),b=n?.user,j=b?.image,S=!!n?.session?.impersonatedBy;let v;t[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>x(!1),t[1]=v):v=t[1];const y=v;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let k;t[4]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(fe,{size:16}),t[4]=k):k=t[4];let C;t[5]!==o||t[6]!==a?(C=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=C):C=t[7];let w;t[8]!==N||t[9]!==C?(w={key:"preferences",label:N,icon:k,onClick:C},t[8]=N,t[9]=C,t[10]=w):w=t[10];let I;t[11]!==i||t[12]!==o?(I=i?[{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(Rs,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=I):I=t[13];let A;t[14]!==p||t[15]!==e?(A=(Ks()||Ye())&&!p?[{key:"install-desktop-app",label:Ye()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:s.jsx(Cs,{size:16}),onClick:()=>g(!0)}]:[],t[14]=p,t[15]=e,t[16]=A):A=t[16];let D;t[17]!==e?(D=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=D):D=t[18];let ue;t[19]===Symbol.for("react.memo_cache_sentinel")?(ue=s.jsx(ks,{size:16}),t[19]=ue):ue=t[19];let K;t[20]!==D?(K={key:"terms",label:D,icon:ue,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=D,t[21]=K):K=t[21];let q;t[22]!==e?(q=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=q):q=t[23];let pe;t[24]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(Ds,{size:16}),t[24]=pe):pe=t[24];let W;t[25]!==q?(W={key:"privacy",label:q,icon:pe,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=q,t[26]=W):W=t[26];let H;t[27]!==e?(H=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=H):H=t[28];let xe;t[29]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(Ft,{className:"w-4 h-4"}),t[29]=xe):xe=t[29];let G;t[30]!==H?(G={key:"github",label:H,icon:xe,href:"https://github.com/decocms/studio",external:!0},t[30]=H,t[31]=G):G=t[31];let Y;t[32]!==e?(Y=e("common.accountPopover.community"),t[32]=e,t[33]=Y):Y=t[33];let he;t[34]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(Ls,{size:16}),t[34]=he):he=t[34];let Q;t[35]!==Y?(Q={key:"community",label:Y,icon:he,href:"https://decocms.com/discord",external:!0},t[35]=Y,t[36]=Q):Q=t[36];let V;t[37]!==e?(V=e("common.accountPopover.homepage"),t[37]=e,t[38]=V):V=t[38];let be;t[39]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Ps,{size:16}),t[39]=be):be=t[39];let X;t[40]!==V?(X={key:"homepage",label:V,icon:be,href:"https://decocms.com",external:!0},t[40]=V,t[41]=X):X=t[41];let J;t[42]!==m||t[43]!==o||t[44]!==e?(J=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(Fs,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=J):J=t[45];let ge;t[46]!==K||t[47]!==W||t[48]!==G||t[49]!==Q||t[50]!==X||t[51]!==J||t[52]!==w||t[53]!==I||t[54]!==A?(ge=[w,...I,...A,K,W,G,Q,X,...J],t[46]=K,t[47]=W,t[48]=G,t[49]=Q,t[50]=X,t[51]=J,t[52]=w,t[53]=I,t[54]=A,t[55]=ge):ge=t[55];const Me=ge;let Z;t[56]!==e?(Z=e("common.accountPopover.signOut"),t[56]=e,t[57]=Z):Z=t[57];let je;t[58]===Symbol.for("react.memo_cache_sentinel")?(je=s.jsx(Ge,{size:16}),t[58]=je):je=t[58];let ve;t[59]!==Z?(ve={key:"logout",label:Z,icon:je,onClick:On},t[59]=Z,t[60]=ve):ve=t[60];const Oe=ve;let ye;t[61]!==S||t[62]!==e?(ye=S?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(Ge,{size:16}),onClick:async()=>{const{error:We}=await me.admin.stopImpersonating();if(We){mt.error(We.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=S,t[62]=e,t[63]=ye):ye=t[63];const Pe=ye;let Se;t[64]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx(Es,{size:14}),t[64]=Se):Se=t[64];let ee;t[65]!==e?(ee=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=ee):ee=t[66];let te;t[67]!==ee?(te={value:"light",icon:Se,label:ee},t[67]=ee,t[68]=te):te=t[68];let _e;t[69]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(Ts,{size:14}),t[69]=_e):_e=t[69];let se;t[70]!==e?(se=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=se):se=t[71];let ne;t[72]!==se?(ne={value:"dark",icon:_e,label:se},t[72]=se,t[73]=ne):ne=t[73];let Ne;t[74]===Symbol.for("react.memo_cache_sentinel")?(Ne=s.jsx(zs,{size:14}),t[74]=Ne):Ne=t[74];let oe;t[75]!==e?(oe=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=oe):oe=t[76];let ie;t[77]!==oe?(ie={value:"system",icon:Ne,label:oe},t[77]=oe,t[78]=ie):ie=t[78];let Ce;t[79]!==te||t[80]!==ne||t[81]!==ie?(Ce=[te,ne,ie],t[79]=te,t[80]=ne,t[81]=ie,t[82]=Ce):Ce=t[82];const Re=Ce;let ke;t[83]!==S||t[84]!==f||t[85]!==Me||t[86]!==d||t[87]!==c||t[88]!==Oe||t[89]!==Pe||t[90]!==Re||t[91]!==b||t[92]!==j?(ke={user:b,userImage:j,menuItems:Me,signOutItem:Oe,stopImpersonatingItem:Pe,isImpersonating:S,themeOptions:Re,preferences:d,setPreferences:c,close:y,isMobile:f},t[83]=S,t[84]=f,t[85]=Me,t[86]=d,t[87]=c,t[88]=Oe,t[89]=Pe,t[90]=Re,t[91]=b,t[92]=j,t[93]=ke):ke=t[93];const we=ke;let le;t[94]!==S||t[95]!==f||t[96]!==u||t[97]!==we||t[98]!==e||t[99]!==b?.name||t[100]!==j?(le=f?s.jsxs(ys,{open:u,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:M("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",S&&"border-2 border-dashed border-warning"),children:[s.jsx($e,{url:j,fallback:b?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:b?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(Ss,{className:"h-[80dvh] p-0",children:[s.jsx(_s,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(Je,{...we})]})]}):s.jsxs(ht,{open:u,onOpenChange:x,children:[s.jsx(Be,{asChild:!0,children:s.jsxs(z,{tooltip:b?.name??e("common.accountPopover.defaultAccountLabel"),className:M("rounded-md",S&&"border-2 border-dashed border-warning"),children:[s.jsx($e,{url:j,fallback:b?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:b?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(bt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Mn,children:s.jsx(Je,{...we})})]}),t[94]=S,t[95]=f,t[96]=u,t[97]=we,t[98]=e,t[99]=b?.name,t[100]=j,t[101]=le):le=t[101];let re;t[102]!==h?(re=s.jsx(qs,{open:h,onOpenChange:g}),t[102]=h,t[103]=re):re=t[103];let Ie;return t[104]!==le||t[105]!==re?(Ie=s.jsxs(s.Fragment,{children:[le,re]}),t[104]=le,t[105]=re,t[106]=Ie):Ie=t[106],Ie}function Mn(t){return t.preventDefault()}function On(){L("signed_out",{source:"account_popover"}),Lt(),me.signOut()}class Pn extends O.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Rn(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function zn(){const t=_.c(17),e=B(),{org:n}=E(),{hasDecoKey:i,balanceDollars:o}=ms();if(!i)return null;let l;t[0]!==o?(l=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=l):l=t[1];let r;t[2]!==o?(r=M(o!=null&&Rn(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx($s,{}),t[7]=d):d=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let f;t[10]!==c?(f=s.jsx("span",{children:c}),t[10]=c,t[11]=f):f=t[11];let m;return t[12]!==l||t[13]!==r||t[14]!==a||t[15]!==f?(m=s.jsx(T,{children:s.jsx(P,{children:s.jsxs(z,{tooltip:l,className:r,onClick:a,children:[d,f]})})}),t[12]=l,t[13]=r,t[14]=a,t[15]=f,t[16]=m):m=t[16],m}function Ze(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Pn,{children:s.jsx(O.Suspense,{fallback:null,children:s.jsx(zn,{})})}),t[0]=e):e=t[0],e}const En=6e4;function Tn(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Dn(t,e){if(!t)return t;const n=e?new Set(e):null;let i=0;const o=t.pages.map(r=>{const a=r.notifications.filter(d=>n&&!n.has(d.id)?!0:(i++,!1));return{...r,notifications:a}}),l=n?Math.max(0,(t.pages[0]?.unreadCount??0)-i):0;return{...t,pages:o.map(r=>({...r,unreadCount:l}))}}function Fn(t,e){const n=_.c(4),{data:i}=me.useSession(),o=i?.user?.id;let l;n[0]!==e||n[1]!==t||n[2]!==o?(l=r=>!t||!o?Bn:Xs.subscribe(t,d=>{try{if(JSON.parse(d.data).subject!==o)return}catch{return}e(),r()},e),n[0]=e,n[1]=t,n[2]=o,n[3]=l):l=n[3],O.useSyncExternalStore(l,Un,Ln)}function Ln(){return 0}function Un(){return 0}function Bn(){}function wt(){const t=_.c(37),{locator:e,org:n}=E(),i=Wt(),o=Ht();let l;t[0]!==e?(l=ot.notifications(e),t[0]=e,t[1]=l):l=t[1];const r=l;let a;t[2]!==i?(a=C=>{const{pageParam:w}=C;return Tn(i,w)},t[2]=i,t[3]=a):a=t[3];let d;t[4]!==r||t[5]!==a?(d={queryKey:r,queryFn:a,initialPageParam:void 0,getNextPageParam:Wn,refetchInterval:En},t[4]=r,t[5]=a,t[6]=d):d=t[6];const c=Vs(d);let f;t[7]!==o||t[8]!==r?(f=()=>o.invalidateQueries({queryKey:r,refetchType:"active"}),t[7]=o,t[8]=r,t[9]=f):f=t[9],Fn(n.slug,f);let m;t[10]!==i?(m=C=>i.call("NOTIFICATION_MARK_READ",C?{ids:C}:{}),t[10]=i,t[11]=m):m=t[11];let p,u;t[12]!==o||t[13]!==r?(p=async C=>{await o.cancelQueries({queryKey:r}),o.setQueryData(r,w=>Dn(w,C))},u=()=>o.invalidateQueries({queryKey:r}),t[12]=o,t[13]=r,t[14]=p,t[15]=u):(p=t[14],u=t[15]);let x;t[16]!==m||t[17]!==p||t[18]!==u?(x={mutationFn:m,onMutate:p,onSettled:u},t[16]=m,t[17]=p,t[18]=u,t[19]=x):x=t[19];const h=Ee(x);let g;t[20]!==c.data?.pages?(g=c.data?.pages??[],t[20]=c.data?.pages,t[21]=g):g=t[21];const b=g;let j;t[22]!==b?(j=b.flatMap(Kn),t[22]=b,t[23]=j):j=t[23];const S=b[0]?.unreadCount??0;let v;t[24]!==c?(v=()=>{c.hasNextPage&&!c.isFetchingNextPage&&c.fetchNextPage()},t[24]=c,t[25]=v):v=t[25];let y,N;t[26]!==h?(y=()=>h.mutate(null),N=C=>h.mutate([C]),t[26]=h,t[27]=y,t[28]=N):(y=t[27],N=t[28]);let k;return t[29]!==c.hasNextPage||t[30]!==c.isFetchingNextPage||t[31]!==S||t[32]!==v||t[33]!==y||t[34]!==N||t[35]!==j?(k={updates:j,redDotCount:S,hasMore:c.hasNextPage,isFetchingMore:c.isFetchingNextPage,fetchMore:v,markAllRead:y,markRead:N},t[29]=c.hasNextPage,t[30]=c.isFetchingNextPage,t[31]=S,t[32]=v,t[33]=y,t[34]=N,t[35]=j,t[36]=k):k=t[36],k}function Kn(t){return t.notifications.map(qn)}function qn(t){return{id:t.id,taskBoardItemId:t.taskBoardItemId,taskTitle:t.taskTitle,taskKeySeq:t.taskKeySeq,action:t.type,actorName:t.actorName,actorImage:t.actorImage,occurredAt:t.createdAt}}function Wn(t){return t.nextCursor??void 0}function Hn(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");default:{const n=t.action;return String(n)}}}function Gn(t){const e=_.c(28),{update:n,orgSlug:i,onSelect:o}=t,l=$();let r;e[0]!==i||e[1]!==n.taskKeySeq?(r=ut(i,n.taskKeySeq),e[0]=i,e[1]=n.taskKeySeq,e[2]=r):r=e[2];const a=r,d=!n.actorName;let c;e[3]!==d||e[4]!==n.actorImage||e[5]!==n.actorName?(c=d?s.jsx(fs,{size:24,className:"shrink-0"}):s.jsx($e,{url:n.actorImage??void 0,fallback:Zs(n.actorName??void 0),shape:"circle",size:"xs",className:"shrink-0"}),e[3]=d,e[4]=n.actorImage,e[5]=n.actorName,e[6]=c):c=e[6];const f=a?`${a} · `:"";let m;e[7]!==f||e[8]!==n.taskTitle?(m=s.jsxs("p",{className:"truncate text-xs text-muted-foreground",children:[f,n.taskTitle]}),e[7]=f,e[8]=n.taskTitle,e[9]=m):m=e[9];let p;e[10]!==l||e[11]!==n?(p=Hn(n,l),e[10]=l,e[11]=n,e[12]=p):p=e[12];let u;e[13]!==p?(u=s.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:p}),e[13]=p,e[14]=u):u=e[14];let x;e[15]!==m||e[16]!==u?(x=s.jsxs("div",{className:"min-w-0 flex-1",children:[m,u]}),e[15]=m,e[16]=u,e[17]=x):x=e[17];let h;e[18]!==n.occurredAt?(h=en(new Date(n.occurredAt)),e[18]=n.occurredAt,e[19]=h):h=e[19];let g;e[20]!==h?(g=s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:h}),e[20]=h,e[21]=g):g=e[21];let b;e[22]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Js,{size:16,className:"shrink-0 text-muted-foreground"}),e[22]=b):b=e[22];let j;return e[23]!==o||e[24]!==c||e[25]!==x||e[26]!==g?(j=s.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-center gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[c,x,g,b]}),e[23]=o,e[24]=c,e[25]=x,e[26]=g,e[27]=j):j=e[27],j}function Yn(t){const e=_.c(2),{onReach:n}=t;let i;return e[0]!==n?(i=s.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const l=new IntersectionObserver(r=>{r.some(Qn)&&n()});return l.observe(o),()=>l.disconnect()}}),e[0]=n,e[1]=i):i=e[1],i}function Qn(t){return t.isIntersecting}function Vn(t){const e=_.c(23),{onClose:n}=t,i=$(),o=B(),{org:l}=E(),{updates:r,markAllRead:a,markRead:d,hasMore:c,fetchMore:f}=wt();let m;e[0]!==i?(m=i("sidebar.inbox.title"),e[0]=i,e[1]=m):m=e[1];let p;e[2]!==m?(p=s.jsx("h3",{className:"text-sm font-medium",children:m}),e[2]=m,e[3]=p):p=e[3];let u;e[4]!==a||e[5]!==i||e[6]!==r.length?(u=r.length>0&&s.jsx(Ae,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:a,children:i("sidebar.inbox.markAllRead")}),e[4]=a,e[5]=i,e[6]=r.length,e[7]=u):u=e[7];let x;e[8]!==p||e[9]!==u?(x=s.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[p,u]}),e[8]=p,e[9]=u,e[10]=x):x=e[10];let h;e[11]!==f||e[12]!==c||e[13]!==d||e[14]!==o||e[15]!==n||e[16]!==l||e[17]!==i||e[18]!==r?(h=r.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[s.jsx(Ke,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:i("sidebar.inbox.emptyTitle")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:i("sidebar.inbox.emptyBody")})]}):s.jsxs(Qs,{className:"min-h-0 flex-1",children:[r.map(b=>{const j=ut(l.slug,b.taskKeySeq);return s.jsx(Gn,{update:b,orgSlug:l.slug,onSelect:()=>{d(b.id),n(),j&&o({to:"/$org/tasks/{-$taskKey}",params:{org:l.slug,taskKey:j}})}},b.id)}),c&&s.jsx(Yn,{onReach:f})]}),e[11]=f,e[12]=c,e[13]=d,e[14]=o,e[15]=n,e[16]=l,e[17]=i,e[18]=r,e[19]=h):h=e[19];let g;return e[20]!==x||e[21]!==h?(g=s.jsxs(s.Fragment,{children:[x,h]}),e[20]=x,e[21]=h,e[22]=g):g=e[22],g}function It(){const t=_.c(1),{redDotCount:e}=wt();if(e===0)return null;let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=n):n=t[0],n}function $t(t){const e=_.c(11),{open:n,onOpenChange:i,side:o,children:l}=t;let r;e[0]!==i||e[1]!==n?(r=n&&s.jsx(Vn,{onClose:()=>i(!1)}),e[0]=i,e[1]=n,e[2]=r):r=e[2];let a;e[3]!==o||e[4]!==r?(a=s.jsx(bt,{side:o,align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(400px,calc(100vw-2rem))] flex-col p-0",children:r}),e[3]=o,e[4]=r,e[5]=a):a=e[5];let d;return e[6]!==l||e[7]!==i||e[8]!==n||e[9]!==a?(d=s.jsxs(ht,{open:n,onOpenChange:i,children:[l,a]}),e[6]=l,e[7]=i,e[8]=n,e[9]=a,e[10]=d):d=e[10],d}function At(){const t=_.c(9),e=$(),[n,i]=O.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let l,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ke,{size:15}),r=s.jsx(It,{}),t[2]=l,t[3]=r):(l=t[2],r=t[3]);let a;t[4]!==o?(a=s.jsx(Be,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[l,r]})}),t[4]=o,t[5]=a):a=t[5];let d;return t[6]!==n||t[7]!==a?(d=s.jsx($t,{open:n,onOpenChange:i,side:"top",children:a}),t[6]=n,t[7]=a,t[8]=d):d=t[8],d}function Xn(){const t=_.c(15),e=$(),[n,i]=O.useState(!1),{state:o}=U();let l;t[0]!==o||t[1]!==e?(l=o==="collapsed"?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=l):l=t[2];let r,a;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ke,{}),a=s.jsx(It,{}),t[3]=r,t[4]=a):(r=t[3],a=t[4]);let d;t[5]!==e?(d=e("sidebar.inbox.title"),t[5]=e,t[6]=d):d=t[6];let c;t[7]!==d?(c=s.jsx("span",{className:"truncate",children:d}),t[7]=d,t[8]=c):c=t[8];let f;t[9]!==l||t[10]!==c?(f=s.jsx(Be,{asChild:!0,children:s.jsxs(z,{tooltip:l,className:"relative",children:[r,a,c]})}),t[9]=l,t[10]=c,t[11]=f):f=t[11];let m;return t[12]!==n||t[13]!==f?(m=s.jsx($t,{open:n,onOpenChange:i,side:"right",children:f}),t[12]=n,t[13]=f,t[14]=m):m=t[14],m}function Jn(){const t=_.c(14),e=$(),n=B(),{org:i}=E();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==n||t[3]!==i.slug?(l=()=>n({to:"/$org/settings",params:{org:i.slug}}),t[2]=n,t[3]=i.slug,t[4]=l):l=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(fe,{}),t[5]=r):r=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let d;t[8]!==a?(d=s.jsx("span",{children:a}),t[8]=a,t[9]=d):d=t[9];let c;return t[10]!==o||t[11]!==l||t[12]!==d?(c=s.jsxs(z,{tooltip:o,onClick:l,children:[r,d]}),t[10]=o,t[11]=l,t[12]=d,t[13]=c):c=t[13],c}function Zn(){const t=_.c(9),e=$(),n=B(),{org:i}=E();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==n||t[3]!==i.slug?(l=()=>n({to:"/$org/settings",params:{org:i.slug}}),t[2]=n,t[3]=i.slug,t[4]=l):l=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(fe,{size:15}),t[5]=r):r=t[5];let a;return t[6]!==o||t[7]!==l?(a=s.jsx("button",{type:"button","aria-label":o,onClick:l,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:r}),t[6]=o,t[7]=l,t[8]=a):a=t[8],a}function et(){const t=_.c(29),e=$(),[n,i]=O.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(gt,{}),t[2]=l):l=t[2];let r;t[3]!==e?(r=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=r):r=t[4];let a;t[5]!==r?(a=s.jsx("span",{children:r}),t[5]=r,t[6]=a):a=t[6];let d;t[7]!==o||t[8]!==a?(d=s.jsx(P,{children:s.jsx(jt,{trigger:s.jsxs(z,{tooltip:o,children:[l,a]})})}),t[7]=o,t[8]=a,t[9]=d):d=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let f,m;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=()=>i(!0),m=s.jsx(Gs,{}),t[12]=f,t[13]=m):(f=t[12],m=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let u;t[16]!==p?(u=s.jsx("span",{children:p}),t[16]=p,t[17]=u):u=t[17];let x;t[18]!==c||t[19]!==u?(x=s.jsx(P,{children:s.jsxs(z,{tooltip:c,onClick:f,children:[m,u]})}),t[18]=c,t[19]=u,t[20]=x):x=t[20];let h;t[21]!==x||t[22]!==d?(h=s.jsxs(T,{className:"gap-0.5",children:[d,x]}),t[21]=x,t[22]=d,t[23]=h):h=t[23];let g;t[24]!==n?(g=s.jsx(us,{open:n,onOpenChange:i,mode:"browse"}),t[24]=n,t[25]=g):g=t[25];let b;return t[26]!==h||t[27]!==g?(b=s.jsxs(s.Fragment,{children:[h,g]}),t[26]=h,t[27]=g,t[28]=b):b=t[28],b}function tt(){const t=_.c(10),e=$();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=n):n=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(gt,{}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let l;t[5]!==o?(l=s.jsx("span",{children:o}),t[5]=o,t[6]=l):l=t[6];let r;return t[7]!==n||t[8]!==l?(r=s.jsx(T,{className:"gap-0.5",children:s.jsx(P,{children:s.jsx(jt,{trigger:s.jsxs(z,{tooltip:n,children:[i,l]})})})}),t[7]=n,t[8]=l,t[9]=r):r=t[9],r}function eo(){const t=_.c(18),{state:e}=U(),n=e==="collapsed",i=vs(),o=!i;if(n){let c;t[0]!==o?(c=o&&s.jsx(Ze,{}),t[0]=o,t[1]=c):c=t[1];let f;t[2]!==i?(f=i?s.jsx(tt,{}):s.jsx(et,{}),t[2]=i,t[3]=f):f=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(P,{children:s.jsx(Xn,{})}),t[4]=m):m=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(P,{children:s.jsx(Jn,{})}),t[5]=p):p=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs(T,{children:[m,p,s.jsx(P,{children:s.jsx(Fe,{})})]}),t[6]=u):u=t[6];let x;return t[7]!==c||t[8]!==f?(x=s.jsxs(Te,{className:"px-2 pb-3 gap-1",children:[c,f,u]}),t[7]=c,t[8]=f,t[9]=x):x=t[9],x}let l;t[10]!==o?(l=o&&s.jsx(Ze,{}),t[10]=o,t[11]=l):l=t[11];let r;t[12]!==i?(r=i?s.jsx(tt,{}):s.jsx(et,{}),t[12]=i,t[13]=r):r=t[13];let a;t[14]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(T,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Fe,{})}),s.jsx(At,{}),s.jsx(Zn,{})]})})}),t[14]=a):a=t[14];let d;return t[15]!==l||t[16]!==r?(d=s.jsxs(Te,{className:"px-2 pb-3 gap-0.5",children:[l,r,a]}),t[15]=l,t[16]=r,t[17]=d):d=t[17],d}function to(){const t=_.c(12),e=$(),n=B(),{org:i}=E(),{setOpenMobile:o}=U();let l,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(T,{children:s.jsx(P,{children:s.jsx(Fe,{})})})}),r=s.jsx(At,{}),t[0]=l,t[1]=r):(l=t[0],r=t[1]);let a;t[2]!==e?(a=e("sidebar.sidebarFooterMobile.settings"),t[2]=e,t[3]=a):a=t[3];let d;t[4]!==n||t[5]!==i.slug||t[6]!==o?(d=()=>{n({to:"/$org/settings",params:{org:i.slug}}),o(!1)},t[4]=n,t[5]=i.slug,t[6]=o,t[7]=d):d=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(fe,{className:"size-4"}),t[8]=c):c=t[8];let f;return t[9]!==a||t[10]!==d?(f=s.jsx(Te,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[l,r,s.jsx(xt,{"aria-label":a,onClick:d,children:c})]})}),t[9]=a,t[10]=d,t[11]=f):f=t[11],f}const so=5,no=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function oo(){const t=_.c(3),{state:e}=U();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:so}).map(ro)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(F,{className:"size-6 rounded-md"}),s.jsx(F,{className:"size-6 rounded-md"}),s.jsx(F,{className:"size-6 rounded-md"})]}),s.jsx(F,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:no.map(io)})]}),t[2]=i):i=t[2],i}function io(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(F,{className:"size-5 rounded-full shrink-0"}),s.jsx(F,{className:M("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(lo)})]},e)}function lo(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(F,{className:"h-3 flex-1 rounded-sm"})},e)}function ro(t,e){return s.jsx(F,{className:"size-10 rounded-lg mx-auto"},e)}function ao(t,e,n){let i=null;for(const o of t)o.virtual_mcp_id===e&&o.created_by===n&&(o.hidden||(!i||o.updated_at>i.updated_at)&&(i=o));return i}const Mt=[],co=()=>()=>{};function mo(){const t=_.c(8),e=$(),{org:n}=E(),i=vt(),o=fo;let l;if(t[0]!==i||t[1]!==n.slug||t[2]!==e){let r;t[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(As,{size:16}),t[4]=r):r=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ms,{size:16}),t[5]=a):a=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ys,{size:16}),t[6]=d):d=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(tn,{size:16}),t[7]=c):c=t[7],l=[o("overview",e("sidebar.navDestinations.home"),r,i===R.home||i===R.orgIndex,{to:R.home,params:{org:n.slug}}),o("reports",e("sidebar.navDestinations.reports"),a,i===R.reports,{to:R.reports,params:{org:n.slug}}),o("board",e("sidebar.navDestinations.tasks"),d,i===R.tasks,{to:R.tasks,params:{org:n.slug,taskKey:void 0}}),o("files",e("sidebar.navDestinations.library"),c,i===R.library,{to:R.library,params:{org:n.slug}})],t[0]=i,t[1]=n.slug,t[2]=e,t[3]=l}else l=t[3];return l}function fo(t,e,n,i,o){return{key:t,label:e,icon:n,isActive:i,trackAs:t,link:o}}function st(t){const e=_.c(11),{org:n}=E(),i=sn()??[],o=ln(i),l=vt(),r=Ws(),a=Hs(),{data:d}=me.useSession(),c=d?.user?.id,f=nn();let m;e[0]!==f?.threads.get?(m=f?.threads.get??po,e[0]=f?.threads.get,e[1]=m):m=e[1];let p;e[2]!==f?.threads.get?(p=f?.threads.get??uo,e[2]=f?.threads.get,e[3]=p):p=e[3];const u=O.useSyncExternalStore(f?.threads.subscribe??co,m,p);let x;return e[4]!==r||e[5]!==l||e[6]!==n||e[7]!==a||e[8]!==u||e[9]!==c?(x=h=>{const g=cn(h),b=l===R.agents&&r===h.id,j=b?a??void 0:ao(u,h.id,c)?.id??void 0,S={org:n.slug,project:h.id,panel:void 0};return{key:h.id,label:h.title||g?.name||"",icon:s.jsx(Os,{icon:h.icon,name:h.title,size:"2xs",className:"shrink-0"}),isActive:b,trackAs:"coding_agent",link:{to:R.agents,params:S,search:j?{thread:j}:{}},settingsLink:{to:R.agents,params:{...S,panel:"settings"},search:j?{thread:j}:{}}}},e[4]=r,e[5]=l,e[6]=n,e[7]=a,e[8]=u,e[9]=c,e[10]=x):x=e[10],i.filter(h=>t(h,o)).map(x)}function uo(){return Mt}function po(){return Mt}function xo(t){const e=_.c(14),{onNavigate:n}=t,i=$(),o=mo(),l=st(bo),r=st(ho),a=[...l,...r],[d]=ct(),{showProjectSettingsGear:c}=d,{state:f,isMobile:m}=U(),p=f==="collapsed"&&!m;let u;e[0]!==p||e[1]!==m||e[2]!==n||e[3]!==c||e[4]!==i?(u=y=>{const N=y.settingsLink&&c&&!p;return s.jsxs(P,{children:[s.jsx(z,{asChild:!0,isActive:y.isActive,tooltip:p?y.label:void 0,className:M(N&&"group-hover/menu-item:bg-sidebar-accent group-hover/menu-item:text-sidebar-accent-foreground"),children:s.jsxs(He,{...y.link,"aria-current":y.isActive?"page":void 0,onClick:()=>{L("nav_destination_clicked",{destination:y.trackAs}),n?.()},children:[y.icon,s.jsx("span",{className:M("truncate",N&&"pr-7"),children:y.label})]})}),N&&y.settingsLink&&s.jsx(Ae,{asChild:!0,variant:"ghost",size:"icon-sm",className:M("absolute right-1 top-1/2 -translate-y-1/2 text-sidebar-foreground/60 hover:text-sidebar-foreground/60",m?"opacity-100":"opacity-0 group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100"),children:s.jsx(He,{...y.settingsLink,"aria-label":i("sidebar.navDestinations.projectSettings",{name:y.label}),onClick:()=>{L("nav_destination_clicked",{destination:"coding_agent_settings"}),n?.()},children:s.jsx(fe,{})})})]},y.key)},e[0]=p,e[1]=m,e[2]=n,e[3]=c,e[4]=i,e[5]=u):u=e[5];const x=u,h=T,g="gap-1";let b;e[6]!==o||e[7]!==x?(b=o.map(x),e[6]=o,e[7]=x,e[8]=b):b=e[8];const j=a.length>0&&s.jsx("li",{"aria-hidden":!0,className:"h-2"}),S=a.map(x);let v;return e[9]!==h||e[10]!==b||e[11]!==j||e[12]!==S?(v=s.jsxs(h,{className:g,children:[b,j,S]}),e[9]=h,e[10]=b,e[11]=j,e[12]=S,e[13]=v):v=e[13],v}function ho(t,e){return an(t)&&!e.has(t.id)}function bo(t){return rn(t.metadata)}function go(t){const e=_.c(29);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:i}=n,o=$(),{org:l}=E(),{state:r,isMobile:a,toggleSidebar:d}=U(),c=r==="collapsed"&&!a;let f;e[2]!==i?(f=s.jsx(xo,{onNavigate:i}),e[2]=i,e[3]=f):f=e[3];const m=f;if(c){let u;e[4]!==l?(u=s.jsx(xs,{org:l,size:"sm"}),e[4]=l,e[5]=u):u=e[5];let x;e[6]!==l.name||e[7]!==u?(x=s.jsx(z,{tooltip:l.name,children:u}),e[6]=l.name,e[7]=u,e[8]=x):x=e[8];let h;e[9]!==l.slug||e[10]!==x?(h=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(ps,{orgParam:l.slug,side:"right",align:"start",trigger:x})}),e[9]=l.slug,e[10]=x,e[11]=h):h=e[11];let g;e[12]!==o?(g=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=g):g=e[13];let b;e[14]!==o?(b=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=b):b=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(at,{size:16}),e[16]=j):j=e[16];let S;e[17]!==g||e[18]!==b||e[19]!==d?(S=s.jsx(T,{className:"mt-2 gap-1.5",children:s.jsx(P,{children:s.jsx(z,{"aria-label":g,tooltip:b,onClick:d,children:j})})}),e[17]=g,e[18]=b,e[19]=d,e[20]=S):S=e[20];let v;e[21]!==m?(v=s.jsx("div",{className:"mt-1.5 min-h-0 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:m}),e[21]=m,e[22]=v):v=e[22];let y;return e[23]!==v||e[24]!==h||e[25]!==S?(y=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[h,S,v]}),e[23]=v,e[24]=h,e[25]=S,e[26]=y):y=e[26],y}let p;return e[27]!==m?(p=s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:m})}),e[27]=m,e[28]=p):p=e[28],p}function jo(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs(s.Fragment,{children:[s.jsx(ft,{showName:!0}),s.jsx(St,{className:"ml-auto md:size-[34px] rounded-lg"})]}),t[0]=e):e=t[0],e}function Ot(t){const e=_.c(3),{onNavigate:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(oo,{}),e[0]=i):i=e[0];let o;return e[1]!==n?(o=s.jsx(nt,{children:s.jsx(O.Suspense,{fallback:i,children:s.jsx(go,{onNavigate:n})})}),e[1]=n,e[2]=o):o=e[2],o}function vo(){const t=_.c(5),e=_t();let n,i,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(eo,{}),i=s.jsx(jo,{}),o=s.jsx(Ot,{}),t[0]=n,t[1]=i,t[2]=o):(n=t[0],i=t[1],o=t[2]);let l;return t[3]!==e?(l=s.jsx(yt,{children:s.jsx(kt,{sections:e,footer:n,header:i,additionalContent:o})}),t[3]=e,t[4]=l):l=t[4],l}function yo(t){const e=_.c(7),{onClose:n}=t,i=_t();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(to,{}),e[0]=o):o=e[0];let l;e[1]!==n?(l=s.jsx(Ot,{onNavigate:n}),e[1]=n,e[2]=l):l=e[2];let r;return e[3]!==n||e[4]!==i||e[5]!==l?(r=s.jsx(yt,{children:s.jsx(In,{sections:i,onClose:n,footer:o,additionalContent:l})}),e[3]=n,e[4]=i,e[5]=l,e[6]=r):r=e[6],r}const So="sidebar.open";function _o(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Jt,{}),t[0]=e):e=t[0],e}function zl(){const t=_.c(28),e=dt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{connect:i,siteUrl:o}=Gt(n),l=i==="1",[r,a]=it(So,!1),{width:d,wrapperRef:c,onStartResize:f,resetWidth:m}=vn(),p=e;let u;t[1]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ae.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[s.jsx(St,{}),s.jsx(ae.TogglesSlot,{}),s.jsx(ae.TabsSlot,{className:"shrink-0"}),s.jsx(ae.CenterSlot,{}),s.jsx(ae.RightSlot,{})]})}),t[1]=u):u=t[1];const x=u;let h;t[2]===Symbol.for("react.memo_cache_sentinel")?(h={background:"transparent",containerType:"inline-size"},t[2]=h):h=t[2];let g;t[3]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Yt,{className:"flex flex-col min-h-0",style:h,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(O.Suspense,{fallback:s.jsx(_o,{}),children:s.jsx(Qt,{})})})})}),t[3]=g):g=t[3];const b=g,j=p&&x,S=`${d}px`;let v;t[4]!==S?(v={"--sidebar-width":S,"--sidebar-width-icon":"3.125rem"},t[4]=S,t[5]=v):v=t[5];const y=v;let N;t[6]!==e||t[7]!==f||t[8]!==m?(N=!e&&s.jsxs(s.Fragment,{children:[s.jsx(vo,{}),s.jsx(bn,{onPointerDown:f,onDoubleClick:m})]}),t[6]=e,t[7]=f,t[8]=m,t[9]=N):N=t[9];let k;t[10]!==y||t[11]!==N||t[12]!==c?(k=s.jsxs(Vt,{ref:c,className:"flex-1 bg-sidebar relative min-h-0",style:y,children:[N,b]}),t[10]=y,t[11]=N,t[12]=c,t[13]=k):k=t[13];let C;t[14]!==e?(C=e&&s.jsx(dn,{renderSidebar:No}),t[14]=e,t[15]=C):C=t[15];let w;t[16]!==o||t[17]!==l?(w=l&&s.jsx(fn,{siteUrl:o}),t[16]=o,t[17]=l,t[18]=w):w=t[18];let I;t[19]!==C||t[20]!==w||t[21]!==j||t[22]!==k?(I=s.jsx(mn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[j,k,C,w]})}),t[19]=C,t[20]=w,t[21]=j,t[22]=k,t[23]=I):I=t[23];let A;return t[24]!==a||t[25]!==r||t[26]!==I?(A=s.jsx(on,{children:s.jsx(ae.Provider,{children:s.jsx(Xt,{open:r,onOpenChange:a,children:I})})}),t[24]=a,t[25]=r,t[26]=I,t[27]=A):A=t[27],A}function No(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(yo,{onClose:e})})})}export{zl as default};
@@ -1 +1 @@
1
- import{r as s,bw as O,bu as B,j as d,dB as q,br as x,bv as E,dz as K,bx as C,dA as w,cL as T,bt as _,cG as U,cF as V}from"./index-C3xsbndM.js";var I="Radio",[z,P]=_(I),[H,W]=z(I),k=s.forwardRef((t,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(H,{scope:o,checked:e,disabled:a,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":S(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:C(t.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(A,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var G="RadioIndicator",g=s.forwardRef((t,c)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(G,o);return d.jsx(T,{present:n||r.checked,children:d.jsx(x.span,{"data-state":S(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});g.displayName=G;var X="RadioBubbleInput",A=s.forwardRef(({__scopeRadio:t,control:c,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=E(a,r),f=U(o),R=V(c);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});A.displayName=X;function S(t){return t?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[J]=_(y,[w,P]),j=w(),N=P(),[Q,Z]=J(y),D=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=O(R),[b,h]=B({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:b,onValueChange:h,children:d.jsx(q,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",F=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{Y.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:d.jsx(k,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});F.displayName=M;var $="RadioGroupIndicator",L=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return d.jsx(g,{...e,...n,ref:c})});L.displayName=$;var oe=D,re=F,te=L;export{re as I,oe as R,te as a};
1
+ import{r as s,bw as O,bu as B,j as d,dB as q,br as x,bv as E,dz as K,bx as C,dA as w,cL as T,bt as _,cG as U,cF as V}from"./index-Dt4xzxRh.js";var I="Radio",[z,P]=_(I),[H,W]=z(I),k=s.forwardRef((t,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(H,{scope:o,checked:e,disabled:a,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":S(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:C(t.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(A,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var G="RadioIndicator",g=s.forwardRef((t,c)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(G,o);return d.jsx(T,{present:n||r.checked,children:d.jsx(x.span,{"data-state":S(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});g.displayName=G;var X="RadioBubbleInput",A=s.forwardRef(({__scopeRadio:t,control:c,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=E(a,r),f=U(o),R=V(c);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});A.displayName=X;function S(t){return t?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[J]=_(y,[w,P]),j=w(),N=P(),[Q,Z]=J(y),D=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=O(R),[b,h]=B({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:b,onValueChange:h,children:d.jsx(q,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",F=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{Y.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:d.jsx(k,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});F.displayName=M;var $="RadioGroupIndicator",L=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return d.jsx(g,{...e,...n,ref:c})});L.displayName=$;var oe=D,re=F,te=L;export{re as I,oe as R,te as a};
@@ -1 +1 @@
1
- import{cw as _}from"./index-C3xsbndM.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const M=_(g);export{M as R,g as r};
1
+ import{cw as _}from"./index-Dt4xzxRh.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const M=_(g);export{M as R,g as r};
@@ -1 +1 @@
1
- import{c as T,H as S,u as b,j as h,ah as E,N as A}from"./index-C3xsbndM.js";import{u as P}from"./use-virtual-mcp-782cjHYM.js";import{D as u}from"./use-destination-route-byPqPtTQ.js";import{f as v}from"./use-organization-settings-C8lEWrgS.js";import"./use-mcp-client-DzkTl2as.js";import"./constants-dLUUoWH7.js";import"./auth-DM8irEiI.js";import"./task-board-vArYGefl.js";const _={board:u.tasks,files:u.library,reports:u.reports,overview:u.home};function M(e){return!!e&&e in _}function U(){const e=T.c(34),{org:o}=S(),{mainAgentId:x,isPending:I}=v(),N=P();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={strict:!1},e[0]=f):f=e[0];const{connect:l,siteUrl:i,main:n,task:j,sidepanel:a}=b(f);if(I){let t;return e[1]===Symbol.for("react.memo_cache_sentinel")?(t=h.jsx(E,{}),e[1]=t):t=e[1],t}if(M(n)){const t=_[n];let s;e[2]!==o.slug?(s={org:o.slug},e[2]=o.slug,e[3]=s):s=e[3];let r;e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==j?(r={connect:l,siteUrl:i,task:j,sidepanel:a},e[4]=l,e[5]=a,e[6]=i,e[7]=j,e[8]=r):r=e[8];let d;return e[9]!==t||e[10]!==s||e[11]!==r?(d=h.jsx(A,{to:t,params:s,search:r,replace:!0}),e[9]=t,e[10]=s,e[11]=r,e[12]=d):d=e[12],d}const g=x!=null&&(N??[]).some(t=>t.id===x)?x:null;if(g){let t;e[13]!==o.slug||e[14]!==g?(t={org:o.slug,project:g,panel:void 0},e[13]=o.slug,e[14]=g,e[15]=t):t=e[15];let s;e[16]!==l||e[17]!==n||e[18]!==a||e[19]!==i?(s={connect:l,siteUrl:i,sidepanel:a,main:n},e[16]=l,e[17]=n,e[18]=a,e[19]=i,e[20]=s):s=e[20];let r;return e[21]!==t||e[22]!==s?(r=h.jsx(A,{to:u.agents,params:t,search:s,replace:!0}),e[21]=t,e[22]=s,e[23]=r):r=e[23],r}let c;e[24]!==o.slug?(c={org:o.slug},e[24]=o.slug,e[25]=c):c=e[25];let m;e[26]!==l||e[27]!==n||e[28]!==a||e[29]!==i?(m={connect:l,siteUrl:i,sidepanel:a,main:n},e[26]=l,e[27]=n,e[28]=a,e[29]=i,e[30]=m):m=e[30];let p;return e[31]!==c||e[32]!==m?(p=h.jsx(A,{to:u.home,params:c,search:m,replace:!0}),e[31]=c,e[32]=m,e[33]=p):p=e[33],p}export{U as default};
1
+ import{c as T,H as S,u as b,j as h,ah as E,N as A}from"./index-Dt4xzxRh.js";import{u as P}from"./use-virtual-mcp-Br7s7rsG.js";import{D as u}from"./use-destination-route-Bn3yIPW-.js";import{f as v}from"./use-organization-settings-Cru4OoJD.js";import"./use-mcp-client-DkdpleIo.js";import"./constants-dLUUoWH7.js";import"./auth-CL7BB7R8.js";import"./task-board-RnD3TOhC.js";const _={board:u.tasks,files:u.library,reports:u.reports,overview:u.home};function M(e){return!!e&&e in _}function U(){const e=T.c(34),{org:o}=S(),{mainAgentId:x,isPending:I}=v(),N=P();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={strict:!1},e[0]=f):f=e[0];const{connect:l,siteUrl:i,main:n,task:j,sidepanel:a}=b(f);if(I){let t;return e[1]===Symbol.for("react.memo_cache_sentinel")?(t=h.jsx(E,{}),e[1]=t):t=e[1],t}if(M(n)){const t=_[n];let s;e[2]!==o.slug?(s={org:o.slug},e[2]=o.slug,e[3]=s):s=e[3];let r;e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==j?(r={connect:l,siteUrl:i,task:j,sidepanel:a},e[4]=l,e[5]=a,e[6]=i,e[7]=j,e[8]=r):r=e[8];let d;return e[9]!==t||e[10]!==s||e[11]!==r?(d=h.jsx(A,{to:t,params:s,search:r,replace:!0}),e[9]=t,e[10]=s,e[11]=r,e[12]=d):d=e[12],d}const g=x!=null&&(N??[]).some(t=>t.id===x)?x:null;if(g){let t;e[13]!==o.slug||e[14]!==g?(t={org:o.slug,project:g,panel:void 0},e[13]=o.slug,e[14]=g,e[15]=t):t=e[15];let s;e[16]!==l||e[17]!==n||e[18]!==a||e[19]!==i?(s={connect:l,siteUrl:i,sidepanel:a,main:n},e[16]=l,e[17]=n,e[18]=a,e[19]=i,e[20]=s):s=e[20];let r;return e[21]!==t||e[22]!==s?(r=h.jsx(A,{to:u.agents,params:t,search:s,replace:!0}),e[21]=t,e[22]=s,e[23]=r):r=e[23],r}let c;e[24]!==o.slug?(c={org:o.slug},e[24]=o.slug,e[25]=c):c=e[25];let m;e[26]!==l||e[27]!==n||e[28]!==a||e[29]!==i?(m={connect:l,siteUrl:i,sidepanel:a,main:n},e[26]=l,e[27]=n,e[28]=a,e[29]=i,e[30]=m):m=e[30];let p;return e[31]!==c||e[32]!==m?(p=h.jsx(A,{to:u.home,params:c,search:m,replace:!0}),e[31]=c,e[32]=m,e[33]=p):p=e[33],p}export{U as default};