decocms 4.371.4 → 4.372.0

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 (369) hide show
  1. package/dist/client/assets/{AlertCircle-DkoTBUue.js → AlertCircle-Ddrj7VUD.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DlexVvHr.js → AreaChart-0mAtLd45.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-eoxjWHed.js → ArrowLeft-BKbGYh2B.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-BbuAJZmx.js → ArrowRight-6hYTENh_.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CseIJyft.js → ArrowUp-Dhew3Evs.js} +1 -1
  6. package/dist/client/assets/{CartesianChart--SFPDO1V.js → CartesianChart-u2Ri6JFS.js} +1 -1
  7. package/dist/client/assets/{Check-BDjrzcrN.js → Check-Dnz3uW0f.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-CSZ4Kehv.js → CheckCircle-DQbrJHsr.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-DFWFq-ve.js → ChevronRight-DK_MoZ-7.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-C9J9C02y.js → ChevronSelectorVertical-B64gqtde.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-BrOu8rnp.js → ChevronUp-XOZg-HiO.js} +1 -1
  12. package/dist/client/assets/{Copy01-CCOGzU1d.js → Copy01-l6PfB431.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CuoUWRm0.js → CreditCard01-DQsLDZWx.js} +1 -1
  14. package/dist/client/assets/{Database01-CJba45_T.js → Database01-vUZciuwF.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-mYRVr9AH.js → DotsVertical-Dyzdr42E.js} +1 -1
  16. package/dist/client/assets/{Download01-Bd0rofRl.js → Download01-_eUxcgg1.js} +1 -1
  17. package/dist/client/assets/{ErrorBarContext-C0lyL2YC.js → ErrorBarContext-DFc19StE.js} +1 -1
  18. package/dist/client/assets/{Eye-74QOe9cC.js → Eye-B7hZLXRZ.js} +1 -1
  19. package/dist/client/assets/{File02-CmMbIRXN.js → File02-D1W0NjQG.js} +1 -1
  20. package/dist/client/assets/{GitBranch01-BKO8WN_h.js → GitBranch01-CRUhFeKk.js} +1 -1
  21. package/dist/client/assets/{Globe01-Ck7RTkU3.js → Globe01-D9zr3JIX.js} +1 -1
  22. package/dist/client/assets/{HardDrive-DU6J9iPu.js → HardDrive-7_ZjnLMv.js} +1 -1
  23. package/dist/client/assets/{Image01-DnYDSI2h.js → Image01-7_HSDHV3.js} +1 -1
  24. package/dist/client/assets/{Key01-BZd6Jwvq.js → Key01-ti2CpCiW.js} +1 -1
  25. package/dist/client/assets/{Line-G0r0o9gn.js → Line-D9piFifo.js} +1 -1
  26. package/dist/client/assets/{Link01-B52qN1xV.js → Link01-DYWtgbsz.js} +1 -1
  27. package/dist/client/assets/{LinkExternal01-BDgcOJqm.js → LinkExternal01--55N_6ts.js} +1 -1
  28. package/dist/client/assets/{MessageCircle01-CwQvoxPA.js → MessageCircle01-DELRsE6A.js} +1 -1
  29. package/dist/client/assets/{Monitor01-BcYUPleF.js → Monitor01-BoIweS2p.js} +1 -1
  30. package/dist/client/assets/{Package-C4SRuwMw.js → Package-CSgBbMFc.js} +1 -1
  31. package/dist/client/assets/{Palette-C9EL1sNC.js → Palette-CaHW8y9T.js} +1 -1
  32. package/dist/client/assets/{Play-CyyInR_v.js → Play-BolLrTAn.js} +1 -1
  33. package/dist/client/assets/{Plus-BEdGLMcS.js → Plus-C5azC59K.js} +1 -1
  34. package/dist/client/assets/{Printer-BgQcHd8s.js → Printer-Dn2De3ak.js} +1 -1
  35. package/dist/client/assets/{SearchLg-D8sOk12E.js → SearchLg-BZUR3n9c.js} +1 -1
  36. package/dist/client/assets/{SearchMd-CVv1yVth.js → SearchMd-Ms_xvSfF.js} +1 -1
  37. package/dist/client/assets/{Sector-CvQy_NRt.js → Sector-DHu8bCK4.js} +1 -1
  38. package/dist/client/assets/{Settings02-7e_CWXN4.js → Settings02-BLcAotUO.js} +1 -1
  39. package/dist/client/assets/{Share07-CWr7FJF7.js → Share07-BypmcbEF.js} +1 -1
  40. package/dist/client/assets/{Shield01-B8e5sZlX.js → Shield01-C_5dC1mR.js} +1 -1
  41. package/dist/client/assets/{Stars01-DtXaEO3a.js → Stars01-DTStBsXP.js} +1 -1
  42. package/dist/client/assets/{Sun-I1e-KcTY.js → Sun-CEaGM44s.js} +1 -1
  43. package/dist/client/assets/{SwitchHorizontal01-BRr1FvfD.js → SwitchHorizontal01-l3o5r_PJ.js} +1 -1
  44. package/dist/client/assets/{Tool01-dFp1h9Fm.js → Tool01-C0-Xqkxp.js} +1 -1
  45. package/dist/client/assets/{Tool02-DEN5a-af.js → Tool02-CE2Fqpba.js} +1 -1
  46. package/dist/client/assets/{Trash01-DGA8npEZ.js → Trash01-DPQmLNZV.js} +1 -1
  47. package/dist/client/assets/{TrendUp01-BK_K6NH_.js → TrendUp01-uTlAwt0S.js} +1 -1
  48. package/dist/client/assets/{Upload01-B3v_JBAz.js → Upload01-D-20AdeD.js} +1 -1
  49. package/dist/client/assets/{User01-Dbdndpwo.js → User01-BA1LEBvQ.js} +1 -1
  50. package/dist/client/assets/{UserSquare-DZNy5OUH.js → UserSquare-D-v_LgOa.js} +1 -1
  51. package/dist/client/assets/{Users01-AYbQCr7m.js → Users01-BpRvBK8_.js} +1 -1
  52. package/dist/client/assets/{Users03-CUK-7hPD.js → Users03-BaYGM99c.js} +1 -1
  53. package/dist/client/assets/{X-BH7q4C1t.js → X-Dh_K-VDi.js} +1 -1
  54. package/dist/client/assets/{XCircle-CFDcIdAJ.js → XCircle-BhDUy79p.js} +1 -1
  55. package/dist/client/assets/{XClose-2vlbdyhB.js → XClose-Bw0VS-dj.js} +1 -1
  56. package/dist/client/assets/{Zap-Df8_LH9g.js → Zap-TxetSnv7.js} +1 -1
  57. package/dist/client/assets/{ZoomOut-CvFdKFHJ.js → ZoomOut-CJKT31Kx.js} +1 -1
  58. package/dist/client/assets/{access-gate-Bz_XB_uN.js → access-gate-Dt6vr2zi.js} +1 -1
  59. package/dist/client/assets/{add-connection-dialog-CazdSHRl.js → add-connection-dialog-Bwzbw2rJ.js} +1 -1
  60. package/dist/client/assets/{agent-analytics-BUU5OHJ0.js → agent-analytics-OtUj5VAg.js} +1 -1
  61. package/dist/client/assets/agent-app-huXdhJP6.js +1 -0
  62. package/dist/client/assets/{agent-assets-koBUkOuF.js → agent-assets-Ds2YrU5Y.js} +1 -1
  63. package/dist/client/assets/{agent-automation-s5o8QjN7.js → agent-automation-BzHNBuT4.js} +1 -1
  64. package/dist/client/assets/{agent-automations-BEgeK_8a.js → agent-automations-BvUPSQUr.js} +1 -1
  65. package/dist/client/assets/{agent-connect-sources-Cw1ElYdi.js → agent-connect-sources-B2VHxv-N.js} +1 -1
  66. package/dist/client/assets/agent-deck-DGboeeyf.js +1 -0
  67. package/dist/client/assets/{agent-e2e-D0tGNaa-.js → agent-e2e-CCN3csfU.js} +1 -1
  68. package/dist/client/assets/{agent-experiments-CF1wr09V.js → agent-experiments-C1xtDG8f.js} +1 -1
  69. package/dist/client/assets/agent-file-B8pH22Ku.js +1 -0
  70. package/dist/client/assets/{agent-git-X9feic8X.js → agent-git-O5fnLyKj.js} +1 -1
  71. package/dist/client/assets/{agent-hosting-CiIEbvp9.js → agent-hosting-ClZ4R70M.js} +1 -1
  72. package/dist/client/assets/{agent-icon-CWoY8dlp.js → agent-icon-Cyx7Smko.js} +1 -1
  73. package/dist/client/assets/agent-library-file-D-88nLF8.js +1 -0
  74. package/dist/client/assets/{agent-monitor-dM1U0oHi.js → agent-monitor-B2s_I09z.js} +1 -1
  75. package/dist/client/assets/{agent-overview-b_OH54f9.js → agent-overview-CLGjxUwU.js} +1 -1
  76. package/dist/client/assets/agent-settings-BzADpWtq.js +1 -0
  77. package/dist/client/assets/{agent-site-editor-BBBwvkn-.js → agent-site-editor-DElX-Rtx.js} +1 -1
  78. package/dist/client/assets/agent-site-editor-code-CGdhTJXE.js +2 -0
  79. package/dist/client/assets/{agent-site-editor-content-6RAz4TG_.js → agent-site-editor-content-D8Swy0HF.js} +2 -2
  80. package/dist/client/assets/{agent-site-editor-preview-Dgz_F_iP.js → agent-site-editor-preview-BEkJn_qI.js} +3 -3
  81. package/dist/client/assets/agent-view-BZUeqD_l.js +1 -0
  82. package/dist/client/assets/{agent-view-guard-BwVsll67.js → agent-view-guard-Cc93o9kZ.js} +1 -1
  83. package/dist/client/assets/{agents-list-saY2e2oN.js → agents-list-D23HRLNK.js} +1 -1
  84. package/dist/client/assets/{ai-providers-nN3i3GvB.js → ai-providers-AQKJLPCp.js} +1 -1
  85. package/dist/client/assets/{alert-CHNmHigh.js → alert-Bb5psHaZ.js} +1 -1
  86. package/dist/client/assets/{alert-dialog-Cj4mq8qj.js → alert-dialog-DfGZ77rh.js} +1 -1
  87. package/dist/client/assets/{api-keys-DrOs-ajg.js → api-keys-7xk7B181.js} +1 -1
  88. package/dist/client/assets/api-keys-DfV1qFa5.js +1 -0
  89. package/dist/client/assets/app-editor-CK2-PFMD.js +1 -0
  90. package/dist/client/assets/{asset-utils-B6xmdxJ-.js → asset-utils-Dl8tpNxx.js} +1 -1
  91. package/dist/client/assets/{auth-DQLPrt1d.js → auth-5BCk_I76.js} +1 -1
  92. package/dist/client/assets/{auth-catchall-C1NwExr2.js → auth-catchall-BXX_QHt4.js} +1 -1
  93. package/dist/client/assets/{auth-entry-BFo2L_uA.js → auth-entry-BYY2pacz.js} +1 -1
  94. package/dist/client/assets/{auth-split-layout-CyH5oyMl.js → auth-split-layout-Bh_B_vjZ.js} +1 -1
  95. package/dist/client/assets/{authenticate-and-persist-oauth-DiSz7oRO.js → authenticate-and-persist-oauth-Bj_Y1vgm.js} +1 -1
  96. package/dist/client/assets/{automation-list-row-ToSx3G2V.js → automation-list-row-TgtbvSc5.js} +1 -1
  97. package/dist/client/assets/{automation-runs-D-Y_3Wp_.js → automation-runs-CVEQI8qU.js} +1 -1
  98. package/dist/client/assets/automations-CfjjbeEx.js +1 -0
  99. package/dist/client/assets/{autosend-DBLW1BiY.js → autosend-ClVEnX_S.js} +1 -1
  100. package/dist/client/assets/{avatar-CA5LIB-l.js → avatar-CR9KEb-s.js} +1 -1
  101. package/dist/client/assets/{badge-BHHKIdAQ.js → badge-DOT8HE5Z.js} +1 -1
  102. package/dist/client/assets/{block-document-CKFsXR2D.js → block-document-Boj9yYni.js} +1 -1
  103. package/dist/client/assets/{blocks-preview-workspace-context-DD1sbvCI.js → blocks-preview-workspace-context-Dh0KsAvE.js} +1 -1
  104. package/dist/client/assets/{breadcrumb-CtLbOAvM.js → breadcrumb-CVSmj3i3.js} +1 -1
  105. package/dist/client/assets/{buckets-n4oqlL53.js → buckets-B0FCB4zB.js} +1 -1
  106. package/dist/client/assets/{build-improve-prompt-doc-C0Pcb13i.js → build-improve-prompt-doc-C9jBTscU.js} +1 -1
  107. package/dist/client/assets/{bulk-category-panel-LlH8_RXq.js → bulk-category-panel-QprmcNHA.js} +1 -1
  108. package/dist/client/assets/{calendar-CuSfsKMP.js → calendar-SAWOBJxF.js} +1 -1
  109. package/dist/client/assets/{capability-load-error-nTuuTH9K.js → capability-load-error-D1mxtMyB.js} +1 -1
  110. package/dist/client/assets/{cards-D_qYJSBL.js → cards-DQPi8IW_.js} +1 -1
  111. package/dist/client/assets/category-editor-CG20ku6V.js +1 -0
  112. package/dist/client/assets/{chart-3a-OWzYT.js → chart-BGm-AILS.js} +1 -1
  113. package/dist/client/assets/{chat-context-Bu5sIHkQ.js → chat-context-H28jTcB6.js} +1 -1
  114. package/dist/client/assets/{chat-draft-CDnPwvf3.js → chat-draft-BTIUwp87.js} +1 -1
  115. package/dist/client/assets/{checkbox-KtkqQde0.js → checkbox-D_GODf3h.js} +1 -1
  116. package/dist/client/assets/{choose-editor-Dn1tw3t6.js → choose-editor-CqXPKhwg.js} +1 -1
  117. package/dist/client/assets/{cli-auth-success-Dk6ZAOHg.js → cli-auth-success-Nkuy_2dv.js} +1 -1
  118. package/dist/client/assets/{client-icons-BZbx9xet.js → client-icons-D55uOktL.js} +1 -1
  119. package/dist/client/assets/{collapsible--RUSBZp8.js → collapsible-CkoFdRnK.js} +1 -1
  120. package/dist/client/assets/{collection-detail-DeDEzfsH.js → collection-detail-7A7zRYv2.js} +1 -1
  121. package/dist/client/assets/{collection-display-button-CSCRl1NG.js → collection-display-button-B730w9Ah.js} +1 -1
  122. package/dist/client/assets/{collection-search-CYFbkY1e.js → collection-search-B2t2IaOK.js} +1 -1
  123. package/dist/client/assets/{collection-table-wrapper-B0GV6KfT.js → collection-table-wrapper-87GtYm7N.js} +1 -1
  124. package/dist/client/assets/{collection-tabs-Cub0gFzH.js → collection-tabs-DAqaNYVU.js} +1 -1
  125. package/dist/client/assets/{combobox-DKSSMn_F.js → combobox-CA5nnv9O.js} +1 -1
  126. package/dist/client/assets/{command-Aa0mYduw.js → command-CtFXOSiX.js} +1 -1
  127. package/dist/client/assets/{command-palette-store-AuoaPk0G.js → command-palette-store-BL5hnWnv.js} +1 -1
  128. package/dist/client/assets/{companion-mcps-section-Cm96EPtV.js → companion-mcps-section-DVYB246Y.js} +1 -1
  129. package/dist/client/assets/{connect-RwN6Lb1O.js → connect-F12K-hsA.js} +1 -1
  130. package/dist/client/assets/{connect-layout-BUZjF8sB.js → connect-layout-DCgHt0wb.js} +1 -1
  131. package/dist/client/assets/{connection-BYV9fPN2.js → connection-DhRpG43c.js} +1 -1
  132. package/dist/client/assets/{connection-card-Dr9bHZoV.js → connection-card-BCofIpgI.js} +1 -1
  133. package/dist/client/assets/{connection-detail-CIfYvjz9.js → connection-detail-CkBpJk50.js} +1 -1
  134. package/dist/client/assets/{connection-form-helpers-BXp-lVpJ.js → connection-form-helpers-C7Pc9F54.js} +1 -1
  135. package/dist/client/assets/{connections-CHaTlyIC.js → connections-BsBFmd4I.js} +1 -1
  136. package/dist/client/assets/{create-organization-dialog-yNI_6UTh.js → create-organization-dialog-CYwIBo_O.js} +1 -1
  137. package/dist/client/assets/{decofile-api-DEul9pGZ.js → decofile-api-Cdto5FQ3.js} +1 -1
  138. package/dist/client/assets/{decopilot-C-Fh2iwl.js → decopilot-BecreIFq.js} +1 -1
  139. package/dist/client/assets/{dialog-D57kq_tP.js → dialog-SKkzdrcZ.js} +1 -1
  140. package/dist/client/assets/{discover-D4y-o31j.js → discover-BWfGXdtB.js} +1 -1
  141. package/dist/client/assets/{domain-settings-Ch5rCYKa.js → domain-settings-ClqqVAOw.js} +1 -1
  142. package/dist/client/assets/{download-app-dialog-Dd6sw41_.js → download-app-dialog-DQE0snIy.js} +1 -1
  143. package/dist/client/assets/{drawer-DDadqt4q.js → drawer-BleKwXKQ.js} +1 -1
  144. package/dist/client/assets/{dropdown-menu-l7cu0teq.js → dropdown-menu-DRuEZVW9.js} +1 -1
  145. package/dist/client/assets/{editor-DhL1XnKC.js → editor-oZAad1yU.js} +1 -1
  146. package/dist/client/assets/{empty-state-Cad5zFK6.js → empty-state-Bi9IU32F.js} +1 -1
  147. package/dist/client/assets/{empty-state-CbrMvgMW.js → empty-state-CaG0BWIR.js} +1 -1
  148. package/dist/client/assets/{extract-connection-data-Dh_Eo1wZ.js → extract-connection-data-C8zB3-0T.js} +1 -1
  149. package/dist/client/assets/{feature-gate-OPGtzGpZ.js → feature-gate-UfjS24Ou.js} +1 -1
  150. package/dist/client/assets/{feature-paywall-DsAStIcU.js → feature-paywall-pQTqQ94T.js} +1 -1
  151. package/dist/client/assets/{file-explorer-DAxbvkJk.js → file-explorer-s0AeRobY.js} +1 -1
  152. package/dist/client/assets/{file-preview-CDdVdNDx.js → file-preview-Dzjub9Lu.js} +1 -1
  153. package/dist/client/assets/{file-share-button-DTqbvQ69.js → file-share-button-BqqM0Upa.js} +1 -1
  154. package/dist/client/assets/{file-type-icon-DwxUV7LB.js → file-type-icon-CMiynV8b.js} +1 -1
  155. package/dist/client/assets/{folder-icon-Xf_qPSHt.js → folder-icon-3FCd-eRP.js} +1 -1
  156. package/dist/client/assets/{form-x2RdyMbl.js → form-H9AoFazU.js} +1 -1
  157. package/dist/client/assets/{gateway-client-D1lNGMSB.js → gateway-client-BQS5H6XZ.js} +1 -1
  158. package/dist/client/assets/{general-qL4c5feU.js → general-st9zEmU7.js} +1 -1
  159. package/dist/client/assets/{github-icon-BO2ZIrI7.js → github-icon-TtZ8EUXE.js} +1 -1
  160. package/dist/client/assets/{home-CLq77ImN.js → home-DMdfBPme.js} +1 -1
  161. package/dist/client/assets/{hooks-ClWLwZb6.js → hooks-D5z7CgCt.js} +1 -1
  162. package/dist/client/assets/{hooks-BX3ndMg6.js → hooks-abtcLONn.js} +1 -1
  163. package/dist/client/assets/{index-D04wJiA7.js → index-BC68yJ9a.js} +1 -1
  164. package/dist/client/assets/{index-Br-oQZuQ.js → index-BQgXOHRB.js} +1 -1
  165. package/dist/client/assets/{index-C_tMl4q8.js → index-C-9h82SA.js} +1 -1
  166. package/dist/client/assets/{index-BCcWkCUf.js → index-C1pofvkl.js} +1 -1
  167. package/dist/client/assets/{index-DHMJogsX.js → index-C4m-Xj9t.js} +1 -1
  168. package/dist/client/assets/{index-BhSpAyPc.js → index-CHIEfkY6.js} +1 -1
  169. package/dist/client/assets/{index-CSGdKnA2.js → index-CZFOUXi8.js} +1 -1
  170. package/dist/client/assets/{index-dzbklFKC.js → index-CdCU_XIc.js} +1 -1
  171. package/dist/client/assets/{index-BYo7xjw_.js → index-Cjhl57C5.js} +4 -4
  172. package/dist/client/assets/{index-DqscriGX.js → index-Cm__CFgO.js} +1 -1
  173. package/dist/client/assets/{index-B4f3l0bW.js → index-CoJzC8_g.js} +1 -1
  174. package/dist/client/assets/{index-Ciq75byn.js → index-DAUnTbKR.js} +1 -1
  175. package/dist/client/assets/{index-DIk-Tdn7.js → index-Os5Hiv1r.js} +1 -1
  176. package/dist/client/assets/{index-redirect-CgpYz1_8.js → index-redirect-BGMUaELH.js} +1 -1
  177. package/dist/client/assets/{index-Da4w1ozj.js → index-soiZgi77.js} +1 -1
  178. package/dist/client/assets/{index-DMoDLIev.js → index-tw-L0pq4.js} +1 -1
  179. package/dist/client/assets/{infiniteQueryObserver-BegmJhfO.js → infiniteQueryObserver-CTAqrRzL.js} +1 -1
  180. package/dist/client/assets/{infra-billing-BcAZoLz6.js → infra-billing-D-R9Zdx8.js} +1 -1
  181. package/dist/client/assets/{input-B0Uinzv0.js → input-CImpk8th.js} +1 -1
  182. package/dist/client/assets/{input-Dzyq242f.js → input-DNp0K9zv.js} +1 -1
  183. package/dist/client/assets/{input-BWSDRY3j.js → input-DkPDVfFk.js} +1 -1
  184. package/dist/client/assets/{integration-icon-Jv69owhG.js → integration-icon-Dq1cJDX8.js} +1 -1
  185. package/dist/client/assets/{label-B9P1qvVv.js → label-Bk7iLZH7.js} +1 -1
  186. package/dist/client/assets/{last-preview-page-By8mKu-G.js → last-preview-page-BmfL1c7N.js} +1 -1
  187. package/dist/client/assets/{layout-BiLsgaKY.js → layout-Ci3akdxf.js} +1 -1
  188. package/dist/client/assets/{legacy-agents-deep-ARL8jf0f.js → legacy-agents-deep-CqdHGYTA.js} +1 -1
  189. package/dist/client/assets/{legacy-main-redirect-CU9SDsoJ.js → legacy-main-redirect-BqiddEXn.js} +1 -1
  190. package/dist/client/assets/{library-lIdeMZNG.js → library-BUfXzmmk.js} +1 -1
  191. package/dist/client/assets/{login-B-zmZILz.js → login-BUL2HRoD.js} +1 -1
  192. package/dist/client/assets/{markdown-BLbEs4th.js → markdown-Cqyyk371.js} +1 -1
  193. package/dist/client/assets/{mcp-app-renderer-BuE-fXND.js → mcp-app-renderer-zIU2-SQD.js} +1 -1
  194. package/dist/client/assets/{mcp-oauth-gEPmFmtm.js → mcp-oauth-qvcFIOHE.js} +1 -1
  195. package/dist/client/assets/{members-DPanptly.js → members-B2ASFRpM.js} +1 -1
  196. package/dist/client/assets/{message-templates-eLGXNsTs.js → message-templates-BvJNSKe2.js} +1 -1
  197. package/dist/client/assets/{mini-report-page-B9cbP96Z.js → mini-report-page-GL8Uh_Lo.js} +1 -1
  198. package/dist/client/assets/{mock-board-CuyyHaan.js → mock-board-D2--sNwu.js} +3 -3
  199. package/dist/client/assets/{monaco-editor-DL6feSNU.js → monaco-editor-Bg8UPXit.js} +1 -1
  200. package/dist/client/assets/{monitoring-stats-row-DqxN6GUk.js → monitoring-stats-row-C9igDEpY.js} +1 -1
  201. package/dist/client/assets/{multi-select-oKdD9DyQ.js → multi-select-B0yDI0nj.js} +1 -1
  202. package/dist/client/assets/{mustache-DJBjSsyb.js → mustache-CDAsLK2v.js} +1 -1
  203. package/dist/client/assets/{oauth-callback-BZYyT9aM.js → oauth-callback-D8Lk8lTx.js} +1 -1
  204. package/dist/client/assets/{oauth-callback-ai-provider-7PpM7Rdj.js → oauth-callback-ai-provider-P1E8_NRm.js} +1 -1
  205. package/dist/client/assets/{onboarding-YCDpp7Hz.js → onboarding-Df5HIECJ.js} +1 -1
  206. package/dist/client/assets/{optimistic-project-sidebar-views-Drp0GaY-.js → optimistic-project-sidebar-views-IR0sppyV.js} +1 -1
  207. package/dist/client/assets/{org-file-open-context-BFThBGhY.js → org-file-open-context-Dd47NmeH.js} +1 -1
  208. package/dist/client/assets/{organization-choice-BmTH1TFX.js → organization-choice-B_XEkc76.js} +1 -1
  209. package/dist/client/assets/{orgs-Bg15s_t6.js → orgs-BAOnfPU8.js} +1 -1
  210. package/dist/client/assets/{page-seo-form-2XHO2I5J.js → page-seo-form-DbL4-FYa.js} +1 -1
  211. package/dist/client/assets/{pair-CyjnQvo_.js → pair-BHYz9F-Z.js} +1 -1
  212. package/dist/client/assets/{plan-ladder-BxTjLX-u.js → plan-ladder-Cqfgwdfc.js} +1 -1
  213. package/dist/client/assets/{popover-ZSYA9qhq.js → popover-Bn0xXLy8.js} +1 -1
  214. package/dist/client/assets/{post-calendar-Dk7gydQI.js → post-calendar-6AuB-9GD.js} +1 -1
  215. package/dist/client/assets/{post-editor-EUWIRS7z.js → post-editor-D6gFXTiI.js} +1 -1
  216. package/dist/client/assets/{preview-content-DfENsiTd.js → preview-content-BJK2rc2w.js} +1 -1
  217. package/dist/client/assets/{preview-dialog-CZ7yktMz.js → preview-dialog-CdfWw2XK.js} +1 -1
  218. package/dist/client/assets/{primitives-Dc8nwNgw.js → primitives-CSJauIt5.js} +1 -1
  219. package/dist/client/assets/{profile-RjcjGxIC.js → profile-BUYSJtW_.js} +1 -1
  220. package/dist/client/assets/{project-app-view-vHys_Fc0.js → project-app-view-BAHsn_eP.js} +1 -1
  221. package/dist/client/assets/{project-feed-BQriF9RR.js → project-feed-La6-iUzD.js} +1 -1
  222. package/dist/client/assets/{project-icon-B44PuWmC.js → project-icon-CiuTzDLi.js} +1 -1
  223. package/dist/client/assets/project-reports-jZGDkYDU.js +1 -0
  224. package/dist/client/assets/project-tasks-BDg0EJtT.js +1 -0
  225. package/dist/client/assets/{prompts-DxKpvN4f.js → prompts-BAZWbRxz.js} +1 -1
  226. package/dist/client/assets/record-editor-C96ND1CU.js +1 -0
  227. package/dist/client/assets/{redirect-editor-QSnnvJNH.js → redirect-editor-9oPfVcJw.js} +1 -1
  228. package/dist/client/assets/{registry-layout-CS36QyR-.js → registry-layout-CrG4EYUR.js} +1 -1
  229. package/dist/client/assets/registry-rXZoWB8a.js +2 -0
  230. package/dist/client/assets/reports-C9YET_Fq.js +1 -0
  231. package/dist/client/assets/{reports-Caz12sYh.js → reports-DHS4fi6t.js} +1 -1
  232. package/dist/client/assets/{reports-onboarding-CpuoVkUT.js → reports-onboarding-BtdzeKZT.js} +1 -1
  233. package/dist/client/assets/{reports-tab-CTyrZeC2.js → reports-tab-B5bMQgk-.js} +2 -2
  234. package/dist/client/assets/{repositories-Css_5oB-.js → repositories-DbRCe9LF.js} +1 -1
  235. package/dist/client/assets/{repository-import-picker-BBGtjhUh.js → repository-import-picker-Bo_Cabzz.js} +1 -1
  236. package/dist/client/assets/{repository-picker-C-TSiXvU.js → repository-picker-CRqY_3jm.js} +1 -1
  237. package/dist/client/assets/{require-capability-BGOQRUEv.js → require-capability-CLz-loNQ.js} +1 -1
  238. package/dist/client/assets/{required-auth-layout-DfvknvbD.js → required-auth-layout-t1gcmOkS.js} +1 -1
  239. package/dist/client/assets/{reset-password-DqPNpLik.js → reset-password-C_PBrpSa.js} +1 -1
  240. package/dist/client/assets/{resizable-DtEfzvUR.js → resizable-CTEnH3yu.js} +1 -1
  241. package/dist/client/assets/{review-settings-DCvHN4QQ.js → review-settings-CIZvhdQE.js} +1 -1
  242. package/dist/client/assets/{rich-text-link-control-S-iuuCcb.js → rich-text-link-control-DdZo0zBm.js} +1 -1
  243. package/dist/client/assets/{roles-JesQ45E4.js → roles-D7Yxadr5.js} +1 -1
  244. package/dist/client/assets/{route-DxO9zGI3.js → route-BhbKY_6m.js} +1 -1
  245. package/dist/client/assets/{route-DYcLUzKq.js → route-DMLSQe3Y.js} +1 -1
  246. package/dist/client/assets/{route-BHp1yMIV.js → route-aV7nBxG9.js} +1 -1
  247. package/dist/client/assets/{runnable-block-editor-D2pnRUMc.js → runnable-block-editor-CNau3nKH.js} +1 -1
  248. package/dist/client/assets/{sandbox-lifecycle-context-BKxKj4xP.js → sandbox-lifecycle-context-Dhs5hLj1.js} +1 -1
  249. package/dist/client/assets/{schema-CGSQcL_x.js → schema-BTHH8GSh.js} +1 -1
  250. package/dist/client/assets/{scroll-area-DEsjJURz.js → scroll-area-YQLTU6PQ.js} +1 -1
  251. package/dist/client/assets/{search-input-Ckzw9Q8f.js → search-input-Cx2Izgwg.js} +1 -1
  252. package/dist/client/assets/{secrets-B-ypyy2r.js → secrets-B1YWh_ht.js} +1 -1
  253. package/dist/client/assets/{sections-editor-CH88tIrj.js → sections-editor-C4NhZuXp.js} +1 -1
  254. package/dist/client/assets/{select-KcyEErkL.js → select-C5Qbx8Kw.js} +1 -1
  255. package/dist/client/assets/{select-model-DMvqNufS.js → select-model-CIR4DebA.js} +1 -1
  256. package/dist/client/assets/{seo-editor-CAiJAVeJ.js → seo-editor-b4BYh3S0.js} +1 -1
  257. package/dist/client/assets/{settings-tab-BeEZ3rCK.js → settings-tab-wJidOo3Q.js} +1 -1
  258. package/dist/client/assets/{sheet-CuLnIbRo.js → sheet-DvqFDAlT.js} +1 -1
  259. package/dist/client/assets/{shell-layout-C6AQzwc3.js → shell-layout-knqcStSb.js} +1 -1
  260. package/dist/client/assets/{sidebar-BhJ_FDqo.js → sidebar-CPIvGktg.js} +1 -1
  261. package/dist/client/assets/{skill-preview-Cd79qVc9.js → skill-preview-Dr3uDA0q.js} +1 -1
  262. package/dist/client/assets/{skills-yKnfnfGJ.js → skills-B7mrIhFJ.js} +1 -1
  263. package/dist/client/assets/{sso-BUabXZ66.js → sso-JfSG6sY-.js} +1 -1
  264. package/dist/client/assets/{store-3eZAp6_n.js → store-CRU_7Bvk.js} +1 -1
  265. package/dist/client/assets/store-registry-Q0TOzx2-.js +2 -0
  266. package/dist/client/assets/{switch-C4XaykKw.js → switch-Cf30aXkY.js} +1 -1
  267. package/dist/client/assets/{synced-repos-DcnAsWA0.js → synced-repos-C5RH3GVW.js} +1 -1
  268. package/dist/client/assets/{table-CuChyRJ6.js → table-D6IMkB4T.js} +1 -1
  269. package/dist/client/assets/{tabs-CU7XBCqm.js → tabs-DSOAK--9.js} +1 -1
  270. package/dist/client/assets/{task-board-DyB0568a.js → task-board-DpuhnKzF.js} +1 -1
  271. package/dist/client/assets/{task-route-DadSSpKF.js → task-route-CPm3yGLT.js} +1 -1
  272. package/dist/client/assets/{task-status-BlXRiQX3.js → task-status-CesK2f9G.js} +1 -1
  273. package/dist/client/assets/{taskboard-analytics-DAdOZgEg.js → taskboard-analytics-DWWMZZdU.js} +1 -1
  274. package/dist/client/assets/{tasks-BfdiokBG.js → tasks-BGbHPX0w.js} +1 -1
  275. package/dist/client/assets/tasks-DTqkQgJb.js +1 -0
  276. package/dist/client/assets/{textarea-__p0yo6J.js → textarea-DXDx4Cy0.js} +1 -1
  277. package/dist/client/assets/{thread-intent-D1siGaGJ.js → thread-intent-Cdmdi4Qs.js} +1 -1
  278. package/dist/client/assets/{thread-route-CP3pE7Uw.js → thread-route-BMICHdvv.js} +1 -1
  279. package/dist/client/assets/{thread-route-DNm3Iu0z.js → thread-route-CnHTxNkK.js} +1 -1
  280. package/dist/client/assets/{thread-sheet-body-BXdoz1zb.js → thread-sheet-body-BGNoSu7i.js} +1 -1
  281. package/dist/client/assets/{toggle-group-DngX-VZh.js → toggle-group-Cj0z3PRY.js} +1 -1
  282. package/dist/client/assets/{toolbar-icon-button-CoaHzqzV.js → toolbar-icon-button-BehOLAeE.js} +1 -1
  283. package/dist/client/assets/{tooltip-DiUW72WF.js → tooltip-BDUrOxgN.js} +1 -1
  284. package/dist/client/assets/{track-BkvZQsBp.js → track-BJHbd99y.js} +1 -1
  285. package/dist/client/assets/{types-CVnCSrZu.js → types-DlfDRNRB.js} +1 -1
  286. package/dist/client/assets/{usage-stats-BXE2Nb57.js → usage-stats-nuoZXpxw.js} +1 -1
  287. package/dist/client/assets/{use-ai-providers-CTTRbTuh.js → use-ai-providers-QvFz5SFX.js} +1 -1
  288. package/dist/client/assets/{use-automations-DcNKFRtS.js → use-automations-jwtTHLHf.js} +1 -1
  289. package/dist/client/assets/{use-autosave-CoCLYAKc.js → use-autosave-D5Khb0ju.js} +1 -1
  290. package/dist/client/assets/{use-connect-companion-B81sEzsb.js → use-connect-companion-DDWKSdwn.js} +1 -1
  291. package/dist/client/assets/{use-connection-CM4EgQPU.js → use-connection-CpOBycNm.js} +1 -1
  292. package/dist/client/assets/{use-copy-C3r_mwJc.js → use-copy-M0GDas2Q.js} +1 -1
  293. package/dist/client/assets/{use-create-virtual-mcp-4OanjUDo.js → use-create-virtual-mcp-BFxHh87r.js} +1 -1
  294. package/dist/client/assets/{use-date-fns-locale-Bwn26aTV.js → use-date-fns-locale-BAJylOmL.js} +1 -1
  295. package/dist/client/assets/{use-debounced-autosave-CDIZf7vS.js → use-debounced-autosave-CAXyZd0j.js} +1 -1
  296. package/dist/client/assets/{use-debounced-value-Dt5Xp7np.js → use-debounced-value-CVkWNti9.js} +1 -1
  297. package/dist/client/assets/{use-deco-credits-BHIJCyKo.js → use-deco-credits-D4THYOkS.js} +1 -1
  298. package/dist/client/assets/{use-decopilot-events-B1TzFZ8t.js → use-decopilot-events-DlUI-60k.js} +1 -1
  299. package/dist/client/assets/{use-delete-connection-MEDuWXFM.js → use-delete-connection-BznnJgfw.js} +1 -1
  300. package/dist/client/assets/{use-deployment-admin-DhSh82eL.js → use-deployment-admin-Buoxj9IO.js} +1 -1
  301. package/dist/client/assets/{use-entitlements-Du1tEG7N.js → use-entitlements-BP7WwVM_.js} +1 -1
  302. package/dist/client/assets/{use-fast-preview-draft-url-JhDvVPsK.js → use-fast-preview-draft-url-Cu15Ye_n.js} +1 -1
  303. package/dist/client/assets/{use-file-configs-BlwCwjVB.js → use-file-configs-CyU7Mcil.js} +1 -1
  304. package/dist/client/assets/{use-infinite-scroll-C-upQcAM.js → use-infinite-scroll-AtjP0SZW.js} +1 -1
  305. package/dist/client/assets/{use-join-requests-B0KW0ohy.js → use-join-requests-aG0T3ECI.js} +1 -1
  306. package/dist/client/assets/{use-main-panel-tabs-A9lWrQg1.js → use-main-panel-tabs-IIO818_j.js} +1 -1
  307. package/dist/client/assets/{use-mcp-auth-status-DbP9ug3L.js → use-mcp-auth-status-bcJwzpw7.js} +1 -1
  308. package/dist/client/assets/{use-mcp-client-D-7BuLrC.js → use-mcp-client-Bf0VpOBw.js} +1 -1
  309. package/dist/client/assets/{use-mcp-prompts-OVUxMbpa.js → use-mcp-prompts-DxcgJEJ7.js} +1 -1
  310. package/dist/client/assets/{use-mcp-tools-Bka5B8hg.js → use-mcp-tools-DhZM9sTC.js} +1 -1
  311. package/dist/client/assets/{use-members-0fLORe9n.js → use-members-CsAzsmBA.js} +1 -1
  312. package/dist/client/assets/{use-mobile-C2LLCzmr.js → use-mobile-C5SrWG9H.js} +1 -1
  313. package/dist/client/assets/{use-navigate-to-agent-C_uFa92h.js → use-navigate-to-agent-DOYg6fyU.js} +1 -1
  314. package/dist/client/assets/{use-open-billing-url-CDGeF8Bu.js → use-open-billing-url-Cjz--xRu.js} +1 -1
  315. package/dist/client/assets/{use-org-auth-client-B9bt8Cd1.js → use-org-auth-client-C16MEGGe.js} +1 -1
  316. package/dist/client/assets/{use-org-fs-B-yTulsp.js → use-org-fs-BSDHmLev.js} +1 -1
  317. package/dist/client/assets/{use-org-notice-CKxbuoVc.js → use-org-notice-BALWnbFe.js} +1 -1
  318. package/dist/client/assets/{use-org-sso-DDMls_8S.js → use-org-sso-Dpa7KwXX.js} +1 -1
  319. package/dist/client/assets/{use-organization-roles-B8cSYq0q.js → use-organization-roles-Cog-K9KN.js} +1 -1
  320. package/dist/client/assets/{use-organization-settings-DmPwVQte.js → use-organization-settings-pqtCEzuj.js} +1 -1
  321. package/dist/client/assets/{use-panel-navigate-ambGkCyT.js → use-panel-navigate-bhAOxlzp.js} +1 -1
  322. package/dist/client/assets/{use-project-native-view-presence-BG-Guaa9.js → use-project-native-view-presence-DnirX6kM.js} +1 -1
  323. package/dist/client/assets/{use-project-scope-CQpPI5pW.js → use-project-scope-BfeOcOX-.js} +1 -1
  324. package/dist/client/assets/{use-registry-connections-Dwr4-IPF.js → use-registry-connections-BJotyFay.js} +1 -1
  325. package/dist/client/assets/{use-releases-B5rxjDuL.js → use-releases-CjPEhpWE.js} +1 -1
  326. package/dist/client/assets/{use-reports-diagnostic-DmNTAMUo.js → use-reports-diagnostic-R9_oa5XU.js} +1 -1
  327. package/dist/client/assets/{use-route-default-main-BGhZVnpH.js → use-route-default-main-DO9nAIOF.js} +1 -1
  328. package/dist/client/assets/{use-secrets-2K048iDI.js → use-secrets-Do9S2OuA.js} +1 -1
  329. package/dist/client/assets/{use-section-preview-base-DGf1SdCz.js → use-section-preview-base-DTsnvRL8.js} +1 -1
  330. package/dist/client/assets/{use-session-runtime-DRNcjNGp.js → use-session-runtime--RMOkDN5.js} +1 -1
  331. package/dist/client/assets/{use-tags-Dz0JHmit.js → use-tags-C-xYWG0d.js} +1 -1
  332. package/dist/client/assets/{use-task-board-analytics-BAbIvIck.js → use-task-board-analytics-DqKWhXe3.js} +1 -1
  333. package/dist/client/assets/{use-task-metadata-DFjC02ql.js → use-task-metadata-Bm567Cyu.js} +1 -1
  334. package/dist/client/assets/{use-thread-outputs-CNFVOo0z.js → use-thread-outputs-DA9fNv-d.js} +1 -1
  335. package/dist/client/assets/{use-view-mode-8Q0KLbhQ.js → use-view-mode-mEqX4oRI.js} +1 -1
  336. package/dist/client/assets/{use-virtual-mcp-BqJjq2ej.js → use-virtual-mcp-BvrPyGzX.js} +1 -1
  337. package/dist/client/assets/useInfiniteQuery-C-lwb5Ji.js +1 -0
  338. package/dist/client/assets/{useQueries-CA76Qw5x.js → useQueries-DqQ6INqi.js} +1 -1
  339. package/dist/client/assets/useSuspenseInfiniteQuery-CjJ_vWiS.js +1 -0
  340. package/dist/client/assets/{users-CxTXFPjN.js → users-BS3mOvNq.js} +1 -1
  341. package/dist/client/assets/{utils-Bsd7FiR5.js → utils-DAYUNxCI.js} +1 -1
  342. package/dist/client/assets/{variant-calendar-un_6bKKS.js → variant-calendar-D_T3c3MC.js} +1 -1
  343. package/dist/client/assets/{variant-matcher-override-DxweoUUC.js → variant-matcher-override-BSFlzIhP.js} +1 -1
  344. package/dist/client/assets/{view-mode-toggle-DYM-xxC9.js → view-mode-toggle-CzqFE_Lp.js} +1 -1
  345. package/dist/client/assets/{virtual-mcp-DuQ9gz9U.js → virtual-mcp-CG3JbZx8.js} +1 -1
  346. package/dist/client/index.html +1 -1
  347. package/dist/server/cli.js +152 -140
  348. package/dist/server/server.js +144 -132
  349. package/package.json +1 -1
  350. package/dist/client/assets/agent-app-CVC_Lvyo.js +0 -1
  351. package/dist/client/assets/agent-deck-7gpymxb7.js +0 -1
  352. package/dist/client/assets/agent-file-CSxJMcjv.js +0 -1
  353. package/dist/client/assets/agent-library-file-ISKmBGds.js +0 -1
  354. package/dist/client/assets/agent-settings-DWKPsWvq.js +0 -1
  355. package/dist/client/assets/agent-site-editor-code-Cafkyw0y.js +0 -2
  356. package/dist/client/assets/agent-view-DZGYQu75.js +0 -1
  357. package/dist/client/assets/api-keys-Cx887mfW.js +0 -1
  358. package/dist/client/assets/app-editor-FvLT9tg7.js +0 -1
  359. package/dist/client/assets/automations-stm8A17b.js +0 -1
  360. package/dist/client/assets/category-editor-m0T0M7LG.js +0 -1
  361. package/dist/client/assets/project-reports-BN2wnBRk.js +0 -1
  362. package/dist/client/assets/project-tasks-BiN2QJyD.js +0 -1
  363. package/dist/client/assets/record-editor-C0OpqhBn.js +0 -1
  364. package/dist/client/assets/registry-BNANrwsH.js +0 -2
  365. package/dist/client/assets/reports-ClRllm5D.js +0 -1
  366. package/dist/client/assets/store-registry-BSlzFQHg.js +0 -2
  367. package/dist/client/assets/tasks-CJSTXe38.js +0 -1
  368. package/dist/client/assets/useInfiniteQuery-BigrA6tZ.js +0 -1
  369. package/dist/client/assets/useSuspenseInfiniteQuery-OUbXRXpI.js +0 -1
@@ -1 +1 @@
1
- import{c as y,b as T,j as n,I as It,r as A,J as xs,M as E,l as z,B as Le,F as gs,R as we,U as Xe,o as F,X as Pt,a as Y,d as $e,v as Tt,t as re,Y as hs,Z as zt,_ as At,n as Ot,e as bs,K as Ee,w as js,$ as vs,m as st,a0 as ys,s as Ss,L as Rt,a1 as M,C as ce,D as nt,a2 as ks,a3 as jt,a4 as Ns,a5 as _s,a6 as ws,a7 as $s,a8 as Cs,f as Is,k as Ps,a9 as Ts,E as zs,u as As,O as Os}from"./index-BYo7xjw_.js";import{u as Ce,S as Rs,a as Ds,b as Ms,c as ae,d as L,e as se,f as Ye,g as Ls,h as Es}from"./sidebar-BhJ_FDqo.js";import{S as Fs,a as qs,b as Vs}from"./sheet-CuLnIbRo.js";import{u as ot}from"./use-mobile-C2LLCzmr.js";import{i as it,a as Bs}from"./Printer-BgQcHd8s.js";import{P as Ne}from"./index-CSGdKnA2.js";import{T as rt,I as Us}from"./toolbar-icon-button-CoaHzqzV.js";import{u as Hs,i as Dt}from"./use-org-notice-CKxbuoVc.js";import{u as Se,a as He,b as Mt}from"./use-project-scope-CQpPI5pW.js";import{u as Ks}from"./thread-route-DNm3Iu0z.js";import{L as Z}from"./anchors-yqDzZN4K.js";import{P as at,a as Ke,b as lt}from"./popover-ZSYA9qhq.js";import{D as Lt,a as Et,b as Ft,c as Ws}from"./drawer-DDadqt4q.js";import{A as Fe}from"./avatar-CA5LIB-l.js";import{T as ct,a as dt,b as Gs,c as ut}from"./tooltip-DiUW72WF.js";import{a as Qs}from"./Copy01-CCOGzU1d.js";import{n as Js}from"./Download01-Bd0rofRl.js";import{i as Xs}from"./Globe01-Ck7RTkU3.js";import{n as qt}from"./LinkExternal01-BDgcOJqm.js";import{g as Ze,e as Ys}from"./TrendUp01-BK_K6NH_.js";import{i as Vt}from"./Monitor01-BcYUPleF.js";import{n as Zs,a as en}from"./Sun-I1e-KcTY.js";import{a as Bt}from"./Settings02-7e_CWXN4.js";import{i as tn}from"./Shield01-B8e5sZlX.js";import{t as sn,a as nn,i as on,b as rn,c as Ut,s as mt,d as an,A as ln,n as Ht,e as Kt,f as cn,g as dn,h as un,j as mn,k as fn,l as pn,m as xn}from"./agent-icon-CWoY8dlp.js";import{b as et,t as gn}from"./Users03-CUK-7hPD.js";import{u as hn}from"./use-deployment-admin-DhSh82eL.js";import{u as bn}from"./use-is-desktop-app-BNujXJc_.js";import{i as jn,a as vt,D as vn}from"./download-app-dialog-Dd6sw41_.js";import{I as yn,u as Sn}from"./use-join-requests-B0KW0ohy.js";import{u as kn}from"./use-deco-credits-BHIJCyKo.js";import{u as Nn,a as Wt}from"./use-entitlements-Du1tEG7N.js";import{u as _n,P as wn}from"./plan-ladder-BxTjLX-u.js";import{u as $n}from"./use-organization-settings-DmPwVQte.js";import{S as Cn}from"./scroll-area-DEsjJURz.js";import{u as In}from"./useInfiniteQuery-BigrA6tZ.js";import{n as Pn}from"./hooks-ClWLwZb6.js";import{t as Gt,S as Tn,b as zn,p as An,a as On,i as Rn,c as Dn,d as Mn}from"./task-route-DadSSpKF.js";import{g as Ln}from"./get-initials-D-f_fDFw.js";import{a as En}from"./format-time-BtXRrtv4.js";import{i as qe}from"./Check-BDjrzcrN.js";import{i as Fn}from"./ChevronSelectorVertical-C9J9C02y.js";import{s as qn}from"./Plus-BEdGLMcS.js";import{C as yt,a as Me,b as Ve,c as Vn,d as Bn,e as Un}from"./command-Aa0mYduw.js";import{P as ft}from"./project-icon-B44PuWmC.js";import{C as Hn}from"./create-organization-dialog-yNI_6UTh.js";import{s as Kn}from"./XClose-2vlbdyhB.js";import{u as Wn}from"./use-virtual-mcp-BqJjq2ej.js";import{i as Gn}from"./Share07-CWr7FJF7.js";import{i as Qn}from"./ArrowLeft-eoxjWHed.js";import{e as Jn,r as Qt,u as Xn,s as Yn,p as Zn,P as eo}from"./use-project-native-view-presence-BG-Guaa9.js";import{u as Jt}from"./optimistic-project-sidebar-views-Drp0GaY-.js";import{u as pt}from"./use-navigate-to-agent-C_uFa92h.js";import{c as to}from"./SwitchHorizontal01-BRr1FvfD.js";import{a as so}from"./Image01-DnYDSI2h.js";import{u as no}from"./use-panel-navigate-ambGkCyT.js";import{t as oo}from"./ChevronUp-BrOu8rnp.js";import{i as io}from"./ChevronRight-DFWFq-ve.js";import{i as ro}from"./CreditCard01-CuoUWRm0.js";import{i as ao}from"./GitBranch01-BKO8WN_h.js";import{i as lo}from"./HardDrive-DU6J9iPu.js";import{i as co}from"./Key01-BZd6Jwvq.js";import{t as uo}from"./Stars01-DtXaEO3a.js";import{s as mo}from"./User01-Dbdndpwo.js";import{i as fo}from"./Zap-Df8_LH9g.js";import{p as po,q as xo}from"./question-004-sINsf4GQ.js";import{u as go}from"./use-decopilot-events-B1TzFZ8t.js";import"./X-BH7q4C1t.js";import"./github-repo-BknN0SVI.js";import"./index-C_tMl4q8.js";import"./AlertCircle-DkoTBUue.js";import"./Tool01-dFp1h9Fm.js";import"./ArrowUp-CseIJyft.js";import"./Tool02-DEN5a-af.js";import"./ArrowRight-BbuAJZmx.js";import"./ZoomOut-CvFdKFHJ.js";import"./CheckCircle-CSZ4Kehv.js";import"./DotsVertical-mYRVr9AH.js";import"./UserSquare-DZNy5OUH.js";import"./Database01-CJba45_T.js";import"./MessageCircle01-CwQvoxPA.js";import"./Eye-74QOe9cC.js";import"./File02-CmMbIRXN.js";import"./Link01-B52qN1xV.js";import"./Package-C4SRuwMw.js";import"./Palette-C9EL1sNC.js";import"./Play-CyyInR_v.js";import"./SearchLg-D8sOk12E.js";import"./SearchMd-CVv1yVth.js";import"./Trash01-DGA8npEZ.js";import"./Upload01-B3v_JBAz.js";import"./Users01-AYbQCr7m.js";import"./XCircle-CFDcIdAJ.js";import"./dialog-D57kq_tP.js";import"./form-x2RdyMbl.js";import"./label-B9P1qvVv.js";import"./select-KcyEErkL.js";import"./textarea-__p0yo6J.js";import"./use-org-auth-client-B9bt8Cd1.js";import"./use-organization-roles-B8cSYq0q.js";import"./use-ai-providers-CTTRbTuh.js";import"./schema-CGSQcL_x.js";import"./task-board-DyB0568a.js";import"./infiniteQueryObserver-BegmJhfO.js";import"./use-mcp-client-D-7BuLrC.js";import"./auth-DQLPrt1d.js";import"./backoff-8mStPHYB.js";import"./dropdown-menu-l7cu0teq.js";import"./github-icon-BO2ZIrI7.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-dzbklFKC.js";import"./alert-dialog-Cj4mq8qj.js";import"./input-B0Uinzv0.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-BlwCwjVB.js";import"./site-slug-uya6Wp4-.js";import"./thread-intent-D1siGaGJ.js";import"./slugify-CEUa2lfQ.js";function le(){const{state:t,isMobile:e}=Ce();return t==="collapsed"&&!e}function ho(t){const e=y.c(11),{onPointerDown:s,onDoubleClick:r}=t,o=T(),{isMobile:i}=Ce(),a=le();if(i||a)return null;let l;e[0]!==o?(l=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=l):l=e[1];let c;e[2]!==o?(c=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=c):c=e[3];let d,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(d={left:"var(--sidebar-width)"},u=n.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]=d,e[5]=u):(d=e[4],u=e[5]);let m;return e[6]!==r||e[7]!==s||e[8]!==l||e[9]!==c?(m=n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":l,title:c,onPointerDown:s,onDoubleClick:r,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:d,children:u}),e[6]=r,e[7]=s,e[8]=l,e[9]=c,e[10]=m):m=e[10],m}const xt=240,bo=400,jo="sidebar.width";function _e(t){return Math.max(xt,Math.min(bo,t))}function vo(){const t=y.c(11),[e,s]=It(jo,yo),r=A.useRef(null);let o;t[0]!==s||t[1]!==e?(o=u=>{u.preventDefault();const m=u.clientX,f=_e(e),p=r.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),g=p?Array.from(p.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of g)x.style.transition="none";const h=x=>{const j=_e(f+(x.clientX-m));p?.style.setProperty("--sidebar-width",`${j}px`)},b=x=>{const j=_e(f+(x.clientX-m));s(j);for(const v of g)v.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",b),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",b)},t[0]=s,t[1]=e,t[2]=o):o=t[2];const i=o;let a;t[3]!==s?(a=()=>{s(xt)},t[3]=s,t[4]=a):a=t[4];const l=a;let c;t[5]!==e?(c=_e(e),t[5]=e,t[6]=c):c=t[6];let d;return t[7]!==i||t[8]!==l||t[9]!==c?(d={width:c,wrapperRef:r,onStartResize:i,resetWidth:l},t[7]=i,t[8]=l,t[9]=c,t[10]=d):d=t[10],d}function yo(t){return typeof t=="number"?_e(t):xt}const Xt=A.createContext(null);function Yt(){const t=A.use(Xt);if(!t)throw new Error("Layout regions require a Layout");return t}function So({children:t,notice:e,expandedSidebar:s=!1}){const r=ot(),[o,i]=It(xs.sidebarOpen(),!0),a=vo();return n.jsx(Xt,{value:{isMobile:r,resize:a},children:n.jsx(Rs,{open:s||o,onOpenChange:i,children:n.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,n.jsx(Ds,{ref:a.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${a.width}px`,"--sidebar-width-icon":"3.125rem"},children:t})]})})})}function ko(t){const e=y.c(22),{children:s,renderMobile:r}=t,o=T(),{isMobile:i,resize:a}=Yt(),{openMobile:l,setOpenMobile:c}=Ce();if(!i){let h;e[0]!==a.onStartResize||e[1]!==a.resetWidth?(h=n.jsx(ho,{onPointerDown:a.onStartResize,onDoubleClick:a.resetWidth}),e[0]=a.onStartResize,e[1]=a.resetWidth,e[2]=h):h=e[2];let b;return e[3]!==s||e[4]!==h?(b=n.jsxs(n.Fragment,{children:[s,h]}),e[3]=s,e[4]=h,e[5]=b):b=e[5],b}let d;e[6]!==o?(d=o("layouts.shellControls.navigationTitle"),e[6]=o,e[7]=d):d=e[7];let u;e[8]!==d?(u=n.jsx(Fs,{className:"sr-only",children:d}),e[8]=d,e[9]=u):u=e[9];let m;e[10]!==c?(m=()=>c(!1),e[10]=c,e[11]=m):m=e[11];let f;e[12]!==r||e[13]!==m?(f=r({onClose:m}),e[12]=r,e[13]=m,e[14]=f):f=e[14];let p;e[15]!==u||e[16]!==f?(p=n.jsxs(qs,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[u,f]}),e[15]=u,e[16]=f,e[17]=p):p=e[17];let g;return e[18]!==l||e[19]!==c||e[20]!==p?(g=n.jsx(Vs,{open:l,onOpenChange:c,children:p}),e[18]=l,e[19]=c,e[20]=p,e[21]=g):g=e[21],g}function No(t){const e=y.c(10),{children:s}=t,r=T(),{isMobile:o}=Yt(),{toggleSidebar:i}=Ce();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"transparent",containerType:"inline-size"},e[0]=a):a=e[0];let l;e[1]!==o||e[2]!==r||e[3]!==i?(l=o&&n.jsxs(Ne.Topbar,{className:"px-1 bg-sidebar",children:[n.jsx(Ne.Topbar.Left,{className:"shrink-0",children:n.jsx(rt,{onClick:i,"aria-label":r("layouts.shellControls.toggleSidebar"),children:n.jsx(it,{size:16})})}),n.jsx(Ne.Topbar.Center,{className:"justify-start",children:n.jsx(Ne.Topbar.Center.Target,{})})]}),e[1]=o,e[2]=r,e[3]=i,e[4]=l):l=e[4];let c;e[5]!==s?(c=n.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s}),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==l||e[8]!==c?(d=n.jsx(Ms,{className:"flex flex-col min-h-0",style:a,children:n.jsxs(Ne,{variant:"plain",className:"bg-sidebar",children:[l,c]})}),e[7]=l,e[8]=c,e[9]=d):d=e[9],d}const Je=Object.assign(So,{Sidebar:ko,Content:No});function _o(){const t=y.c(19),{org:e}=E(),{data:s}=Hs(e.slug);if(!s)return null;const r=s.severity==="block",o=r?"border-destructive/25 bg-destructive/5 text-destructive":"border-warning/40 bg-warning/10 text-foreground";let i;t[0]!==o?(i=z("flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b px-4 py-2 text-sm",o),t[0]=o,t[1]=i):i=t[1];const a=r?void 0:"text-warning";let l;t[2]!==a?(l=z("size-4 shrink-0",a),t[2]=a,t[3]=l):l=t[3];let c;t[4]!==l?(c=n.jsx(gs,{className:l}),t[4]=l,t[5]=c):c=t[5];let d;t[6]!==s.title?(d=n.jsx("span",{className:"font-medium",children:s.title}),t[6]=s.title,t[7]=d):d=t[7];let u;t[8]!==s.message?(u=n.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:s.message}),t[8]=s.message,t[9]=u):u=t[9];let m;t[10]!==s.ctaLabel||t[11]!==s.ctaUrl?(m=s.ctaUrl&&s.ctaLabel?n.jsx(Le,{size:"sm",variant:"outline",asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,t[10]=s.ctaLabel,t[11]=s.ctaUrl,t[12]=m):m=t[12];let f;return t[13]!==i||t[14]!==c||t[15]!==d||t[16]!==u||t[17]!==m?(f=n.jsxs("div",{role:"alert",className:i,children:[c,d,u,m]}),t[13]=i,t[14]=c,t[15]=d,t[16]=u,t[17]=m,t[18]=f):f=t[18],f}function wo(){const t=y.c(4),{setScope:e}=Se(),s=Ks(),r=we();let o;return t[0]!==r||t[1]!==s||t[2]!==e?(o=()=>{const i=s!==void 0?"route_resolves_scope":Xe(r,null)?null:"route_needs_scope";F("scope_cleared",{relocated:i!==null,reason:i}),e(null)},t[0]=r,t[1]=s,t[2]=e,t[3]=o):o=t[3],o}function We(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings",shouldThrow:!1},t[0]=e):e=t[0],!!Pt(e)}const Be="size-4 shrink-0";function gt(t){const e=y.c(5),{children:s,className:r}=t;let o;e[0]!==r?(o=z("flex w-4 shrink-0 items-center justify-center",r),e[0]=r,e[1]=o):o=e[1];let i;return e[2]!==s||e[3]!==o?(i=n.jsx("span",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=i):i=e[4],i}function ye(t){const e=y.c(26),{item:s,onClose:r}=t;let o;e[0]!==s.className?(o=z("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",s.className),e[0]=s.className,e[1]=o):o=e[1];const i=o;if(s.href){const u=s.external?"_blank":void 0,m=s.external?"noopener noreferrer":void 0;let f;e[2]!==s.icon?(f=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[2]=s.icon,e[3]=f):f=e[3];let p;e[4]!==s.label?(p=n.jsx("span",{className:"flex-1",children:s.label}),e[4]=s.label,e[5]=p):p=e[5];let g;return e[6]!==i||e[7]!==s.href||e[8]!==r||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==p?(g=n.jsxs("a",{href:s.href,target:u,rel:m,className:i,onClick:r,children:[f,p]}),e[6]=i,e[7]=s.href,e[8]=r,e[9]=u,e[10]=m,e[11]=f,e[12]=p,e[13]=g):g=e[13],g}let a;e[14]!==s||e[15]!==r?(a=()=>{s.onClick?.(),r()},e[14]=s,e[15]=r,e[16]=a):a=e[16];let l;e[17]!==s.icon?(l=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[17]=s.icon,e[18]=l):l=e[18];let c;e[19]!==s.label?(c=n.jsx("span",{className:"flex-1",children:s.label}),e[19]=s.label,e[20]=c):c=e[20];let d;return e[21]!==i||e[22]!==a||e[23]!==l||e[24]!==c?(d=n.jsxs("button",{type:"button",onClick:a,className:i,children:[l,c]}),e[21]=i,e[22]=a,e[23]=l,e[24]=c,e[25]=d):d=e[25],d}function $o(){const t=y.c(4),e=T();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let r;return t[2]!==s?(r=n.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:s}),t[2]=s,t[3]=r):r=t[3],r}function St(t){const e=y.c(38),{user:s,userImage:r,isImpersonating:o,isMobile:i}=t,a=T(),l=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==l?(c=z("flex items-center gap-3 px-4",l),e[0]=l,e[1]=c):c=e[1];const d=s?.name??"U";let u;e[2]!==d||e[3]!==r?(u=n.jsx(Fe,{url:r,fallback:d,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=d,e[3]=r,e[4]=u):u=e[4];let m;e[5]!==a||e[6]!==s?.name?(m=s?.name??a("common.accountPopover.defaultUserName"),e[5]=a,e[6]=s?.name,e[7]=m):m=e[7];let f;e[8]!==m?(f=n.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=f):f=e[9];let p;e[10]!==o?(p=o&&n.jsx($o,{}),e[10]=o,e[11]=p):p=e[11];let g;e[12]!==f||e[13]!==p?(g=n.jsxs("div",{className:"flex items-center gap-2",children:[f,p]}),e[12]=f,e[13]=p,e[14]=g):g=e[14];const h=s?.email;let b;e[15]!==h?(b=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[15]=h,e[16]=b):b=e[16];let x;e[17]!==b||e[18]!==g?(x=n.jsxs("div",{className:"flex-1 min-w-0",children:[g,b]}),e[17]=b,e[18]=g,e[19]=x):x=e[19];let j;e[20]!==a||e[21]!==s?(j=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{re.success(a("common.accountPopover.userIdCopied"))})},e[20]=a,e[21]=s,e[22]=j):j=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Qs,{size:14}),e[23]=v):v=e[23];let S;e[24]!==j?(S=n.jsx(ct,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[24]=j,e[25]=S):S=e[25];let k;e[26]!==a?(k=a("common.accountPopover.copyUserId"),e[26]=a,e[27]=k):k=e[27];let N;e[28]!==k?(N=n.jsx(dt,{side:"right",children:n.jsx("p",{className:"text-xs",children:k})}),e[28]=k,e[29]=N):N=e[29];let _;e[30]!==S||e[31]!==N?(_=n.jsx(Gs,{delayDuration:300,children:n.jsxs(ut,{children:[S,N]})}),e[30]=S,e[31]=N,e[32]=_):_=e[32];let $;return e[33]!==x||e[34]!==_||e[35]!==c||e[36]!==u?($=n.jsxs("div",{className:c,children:[u,x,_]}),e[33]=x,e[34]=_,e[35]=c,e[36]=u,e[37]=$):$=e[37],$}function kt(t){const e=y.c(35),{themeOptions:s,preferences:r,setPreferences:o,isMobile:i}=t,a=T(),l=i?"size-8":"size-7",c=i?"px-3 py-3":"px-2 py-1.5";let d;e[0]!==c?(d=z("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=d):d=e[1];let u;if(e[2]!==l||e[3]!==r.theme||e[4]!==o||e[5]!==s){let k;e[7]!==l||e[8]!==r.theme||e[9]!==o?(k=N=>{const{value:_,icon:$,label:w}=N;return n.jsx("button",{type:"button","aria-label":w,onClick:()=>o(C=>({...C,theme:_})),className:z(l,"rounded-md flex items-center justify-center transition-colors",r.theme===_?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:$},_)},e[7]=l,e[8]=r.theme,e[9]=o,e[10]=k):k=e[10],u=s.map(k),e[2]=l,e[3]=r.theme,e[4]=o,e[5]=s,e[6]=u}else u=e[6];let m;e[11]!==u?(m=n.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=m):m=e[12];let f;e[13]!==r.enableSounds||e[14]!==a?(f=r.enableSounds?a("common.accountPopover.disableSounds"):a("common.accountPopover.enableSounds"),e[13]=r.enableSounds,e[14]=a,e[15]=f):f=e[15];let p;e[16]!==o?(p=()=>o(Co),e[16]=o,e[17]=p):p=e[17];const g=r.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let h;e[18]!==l||e[19]!==g?(h=z(l,"rounded-md flex items-center justify-center transition-colors",g),e[18]=l,e[19]=g,e[20]=h):h=e[20];let b;e[21]!==r.enableSounds?(b=r.enableSounds?n.jsx(nn,{size:14}):n.jsx(on,{size:14}),e[21]=r.enableSounds,e[22]=b):b=e[22];let x;e[23]!==f||e[24]!==p||e[25]!==h||e[26]!==b?(x=n.jsx("button",{type:"button","aria-label":f,onClick:p,className:h,children:b}),e[23]=f,e[24]=p,e[25]=h,e[26]=b,e[27]=x):x=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.371.4"]}),e[28]=j):j=e[28];let v;e[29]!==x?(v=n.jsxs("div",{className:"flex items-center gap-2",children:[x,j]}),e[29]=x,e[30]=v):v=e[30];let S;return e[31]!==v||e[32]!==d||e[33]!==m?(S=n.jsxs("div",{className:d,children:[m,v]}),e[31]=v,e[32]=d,e[33]=m,e[34]=S):S=e[34],S}function Co(t){return{...t,enableSounds:!t.enableSounds}}function Nt(t){const e=y.c(54),{user:s,userImage:r,menuItems:o,signOutItem:i,stopImpersonatingItem:a,isImpersonating:l,themeOptions:c,preferences:d,setPreferences:u,close:m,isMobile:f}=t;if(f){let S;e[0]!==l||e[1]!==s||e[2]!==r?(S=n.jsx(St,{user:s,userImage:r,isImpersonating:l,isMobile:!0}),e[0]=l,e[1]=s,e[2]=r,e[3]=S):S=e[3];let k;if(e[4]!==m||e[5]!==o){let P;e[7]!==m?(P=O=>n.jsx(ye,{item:O,onClose:m},O.key),e[7]=m,e[8]=P):P=e[8],k=o.map(P),e[4]=m,e[5]=o,e[6]=k}else k=e[6];let N;e[9]!==m||e[10]!==a?(N=a&&n.jsx(ye,{item:a,onClose:m}),e[9]=m,e[10]=a,e[11]=N):N=e[11];let _;e[12]!==m||e[13]!==i?(_=n.jsx(ye,{item:i,onClose:m}),e[12]=m,e[13]=i,e[14]=_):_=e[14];let $;e[15]!==k||e[16]!==N||e[17]!==_?($=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[k,N,_]})}),e[15]=k,e[16]=N,e[17]=_,e[18]=$):$=e[18];let w;e[19]!==d||e[20]!==u||e[21]!==c?(w=n.jsx(kt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!0}),e[19]=d,e[20]=u,e[21]=c,e[22]=w):w=e[22];let C;return e[23]!==S||e[24]!==$||e[25]!==w?(C=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[S,$,w]}),e[23]=S,e[24]=$,e[25]=w,e[26]=C):C=e[26],C}let p;e[27]!==l||e[28]!==s||e[29]!==r?(p=n.jsx(St,{user:s,userImage:r,isImpersonating:l,isMobile:!1}),e[27]=l,e[28]=s,e[29]=r,e[30]=p):p=e[30];let g;if(e[31]!==m||e[32]!==o){let S;e[34]!==m?(S=k=>n.jsx(ye,{item:k,onClose:m},k.key),e[34]=m,e[35]=S):S=e[35],g=o.map(S),e[31]=m,e[32]=o,e[33]=g}else g=e[33];let h;e[36]!==m||e[37]!==a?(h=a&&n.jsx(ye,{item:a,onClose:m}),e[36]=m,e[37]=a,e[38]=h):h=e[38];let b;e[39]!==m||e[40]!==i?(b=n.jsx(ye,{item:i,onClose:m}),e[39]=m,e[40]=i,e[41]=b):b=e[41];let x;e[42]!==g||e[43]!==h||e[44]!==b?(x=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[g,h,b]}),e[42]=g,e[43]=h,e[44]=b,e[45]=x):x=e[45];let j;e[46]!==d||e[47]!==u||e[48]!==c?(j=n.jsx(kt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!1}),e[46]=d,e[47]=u,e[48]=c,e[49]=j):j=e[49];let v;return e[50]!==p||e[51]!==x||e[52]!==j?(v=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[p,x,j]})}),e[50]=p,e[51]=x,e[52]=j,e[53]=v):v=e[53],v}function tt(){const t=y.c(107),e=T(),{data:s}=Y.useSession(),{org:r}=E(),o=$e();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const l=Pt(i)?.params.org,[c,d]=Tt(),u=ot(),{isAdmin:m}=hn(),f=bn(),[p,g]=A.useState(!1),[h,b]=A.useState(!1),x=s?.user,j=x?.image,v=!!s?.session?.impersonatedBy;let S;t[1]===Symbol.for("react.memo_cache_sentinel")?(S=()=>g(!1),t[1]=S):S=t[1];const k=S;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Bt,{size:16}),t[4]=_):_=t[4];let $;t[5]!==o||t[6]!==l?($=()=>{o({to:"/$org/settings/profile",params:{org:l??""}})},t[5]=o,t[6]=l,t[7]=$):$=t[7];let w;t[8]!==N||t[9]!==$?(w={key:"preferences",label:N,icon:_,onClick:$},t[8]=N,t[9]=$,t[10]=w):w=t[10];let C;t[11]!==r||t[12]!==o?(C=r?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(qt,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:r.slug}})}}]:[],t[11]=r,t[12]=o,t[13]=C):C=t[13];let P;t[14]!==f||t[15]!==e?(P=(jn()||vt())&&!f?[{key:"install-desktop-app",label:vt()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(Js,{size:16}),onClick:()=>b(!0)}]:[],t[14]=f,t[15]=e,t[16]=P):P=t[16];let O;t[17]!==e?(O=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=O):O=t[18];let ne;t[19]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(Bs,{size:16}),t[19]=ne):ne=t[19];let K;t[20]!==O?(K={key:"terms",label:O,icon:ne,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=O,t[21]=K):K=t[21];let W;t[22]!==e?(W=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=W):W=t[23];let oe;t[24]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(tn,{size:16}),t[24]=oe):oe=t[24];let q;t[25]!==W?(q={key:"privacy",label:W,icon:oe,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=W,t[26]=q):q=t[26];let G;t[27]!==e?(G=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=G):G=t[28];let V;t[29]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(hs,{className:"w-4 h-4"}),t[29]=V):V=t[29];let B;t[30]!==G?(B={key:"github",label:G,icon:V,href:"https://github.com/decocms/studio",external:!0},t[30]=G,t[31]=B):B=t[31];let Q;t[32]!==e?(Q=e("common.accountPopover.community"),t[32]=e,t[33]=Q):Q=t[33];let ee;t[34]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(et,{size:16}),t[34]=ee):ee=t[34];let J;t[35]!==Q?(J={key:"community",label:Q,icon:ee,href:"https://decocms.com/discord",external:!0},t[35]=Q,t[36]=J):J=t[36];let U;t[37]!==e?(U=e("common.accountPopover.homepage"),t[37]=e,t[38]=U):U=t[38];let me;t[39]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Xs,{size:16}),t[39]=me):me=t[39];let D;t[40]!==U?(D={key:"homepage",label:U,icon:me,href:"https://decocms.com",external:!0},t[40]=U,t[41]=D):D=t[41];let H;t[42]!==m||t[43]!==o||t[44]!==e?(H=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(sn,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=H):H=t[45];let ie;t[46]!==K||t[47]!==q||t[48]!==B||t[49]!==J||t[50]!==D||t[51]!==H||t[52]!==w||t[53]!==C||t[54]!==P?(ie=[w,...C,...P,K,q,B,J,D,...H],t[46]=K,t[47]=q,t[48]=B,t[49]=J,t[50]=D,t[51]=H,t[52]=w,t[53]=C,t[54]=P,t[55]=ie):ie=t[55];const ke=ie;let X;t[56]!==e?(X=e("common.accountPopover.signOut"),t[56]=e,t[57]=X):X=t[57];let te;t[58]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(Ze,{size:16}),t[58]=te):te=t[58];let I;t[59]!==X?(I={key:"logout",label:X,icon:te,onClick:Po},t[59]=X,t[60]=I):I=t[60];const R=I;let Ie;t[61]!==v||t[62]!==e?(Ie=v?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Ze,{size:16}),onClick:async()=>{const{error:bt}=await Y.admin.stopImpersonating();if(bt){re.error(bt.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=v,t[62]=e,t[63]=Ie):Ie=t[63];const Ge=Ie;let Pe;t[64]===Symbol.for("react.memo_cache_sentinel")?(Pe=n.jsx(Zs,{size:14}),t[64]=Pe):Pe=t[64];let fe;t[65]!==e?(fe=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=fe):fe=t[66];let pe;t[67]!==fe?(pe={value:"light",icon:Pe,label:fe},t[67]=fe,t[68]=pe):pe=t[68];let Te;t[69]===Symbol.for("react.memo_cache_sentinel")?(Te=n.jsx(en,{size:14}),t[69]=Te):Te=t[69];let xe;t[70]!==e?(xe=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=xe):xe=t[71];let ge;t[72]!==xe?(ge={value:"dark",icon:Te,label:xe},t[72]=xe,t[73]=ge):ge=t[73];let ze;t[74]===Symbol.for("react.memo_cache_sentinel")?(ze=n.jsx(Vt,{size:14}),t[74]=ze):ze=t[74];let he;t[75]!==e?(he=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=he):he=t[76];let be;t[77]!==he?(be={value:"system",icon:ze,label:he},t[77]=he,t[78]=be):be=t[78];let Ae;t[79]!==pe||t[80]!==ge||t[81]!==be?(Ae=[pe,ge,be],t[79]=pe,t[80]=ge,t[81]=be,t[82]=Ae):Ae=t[82];const Qe=Ae;let Oe;t[83]!==v||t[84]!==u||t[85]!==ke||t[86]!==c||t[87]!==d||t[88]!==R||t[89]!==Ge||t[90]!==Qe||t[91]!==x||t[92]!==j?(Oe={user:x,userImage:j,menuItems:ke,signOutItem:R,stopImpersonatingItem:Ge,isImpersonating:v,themeOptions:Qe,preferences:c,setPreferences:d,close:k,isMobile:u},t[83]=v,t[84]=u,t[85]=ke,t[86]=c,t[87]=d,t[88]=R,t[89]=Ge,t[90]=Qe,t[91]=x,t[92]=j,t[93]=Oe):Oe=t[93];const Re=Oe;let je;t[94]!==v||t[95]!==u||t[96]!==p||t[97]!==Re||t[98]!==e||t[99]!==x?.name||t[100]!==j?(je=u?n.jsxs(Lt,{open:p,onOpenChange:g,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>g(!0),className:z("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",v&&"border-2 border-dashed border-warning"),children:[n.jsx(Fe,{url:j,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Et,{className:"h-[80dvh] p-0",children:[n.jsx(Ft,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(Nt,{...Re})]})]}):n.jsxs(at,{open:p,onOpenChange:g,children:[n.jsx(Ke,{asChild:!0,children:n.jsxs(ae,{"data-tour":Z.account,tooltip:x?.name??e("common.accountPopover.defaultAccountLabel"),className:z("rounded-md",v&&"border-2 border-dashed border-warning"),children:[n.jsx(gt,{children:n.jsx(Fe,{url:j,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"size-[18px] shrink-0"})}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(lt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Io,children:n.jsx(Nt,{...Re})})]}),t[94]=v,t[95]=u,t[96]=p,t[97]=Re,t[98]=e,t[99]=x?.name,t[100]=j,t[101]=je):je=t[101];let ve;t[102]!==h?(ve=n.jsx(vn,{open:h,onOpenChange:b}),t[102]=h,t[103]=ve):ve=t[103];let De;return t[104]!==je||t[105]!==ve?(De=n.jsxs(n.Fragment,{children:[je,ve]}),t[104]=je,t[105]=ve,t[106]=De):De=t[106],De}function Io(t){return t.preventDefault()}function Po(){F("signed_out",{source:"account_popover"}),zt(),Y.signOut()}class To extends A.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function zo(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Ao(){const t=y.c(17),e=$e(),{org:s}=E(),{hasDecoKey:r,balanceDollars:o}=kn();if(!r)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let a;t[2]!==o?(a=z(o!=null&&zo(o)),t[2]=o,t[3]=a):a=t[3];let l;t[4]!==e||t[5]!==s.slug?(l=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[4]=e,t[5]=s.slug,t[6]=l):l=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(rn,{}),t[7]=c):c=t[7];let d;t[8]!==o?(d=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=d):d=t[9];let u;t[10]!==d?(u=n.jsx("span",{children:d}),t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==i||t[13]!==a||t[14]!==l||t[15]!==u?(m=n.jsx(L,{children:n.jsx(se,{children:n.jsxs(ae,{tooltip:i,className:a,onClick:l,children:[c,u]})})}),t[12]=i,t[13]=a,t[14]=l,t[15]=u,t[16]=m):m=t[16],m}const Oo={ok:"stroke-brand-purple",warn:"stroke-warning",exhausted:"stroke-destructive"},Ro={ok:"bg-brand-purple",warn:"bg-warning",exhausted:"bg-destructive"};function Do(){const t=y.c(40),e=T(),s=le(),r=$e(),{org:o}=E(),{data:i}=Wt();if(!i?.usage||!i.features.chat)return null;let a,l;if(t[0]!==i.usage.percent?(a=Math.round(i.usage.percent*100),l=Number.isFinite(a),t[0]=i.usage.percent,t[1]=a,t[2]=l):(a=t[1],l=t[2]),!l)return null;const c=Math.min(100,Math.max(0,a)),d=i.plan.name;let u;t[3]!==e?(u=e("settings.planUsage.aiUsage"),t[3]=e,t[4]=u):u=t[4];const m=`${d} · ${u} ${c}%`;let f;t[5]!==r||t[6]!==o.slug?(f=()=>r({to:"/$org/settings/ai-providers",params:{org:o.slug}}),t[5]=r,t[6]=o.slug,t[7]=f):f=t[7];const p=!s&&"-ml-px";let g;t[8]!==p?(g=z(p),t[8]=p,t[9]=g):g=t[9];let h;t[10]!==i.plan.id||t[11]!==i.usage.state||t[12]!==s||t[13]!==c?(h=s?n.jsx(Lo,{percent:c,state:i.usage.state}):n.jsx(Mo,{planId:i.plan.id}),t[10]=i.plan.id,t[11]=i.usage.state,t[12]=s,t[13]=c,t[14]=h):h=t[14];let b;t[15]!==g||t[16]!==h?(b=n.jsx(gt,{className:g,children:h}),t[15]=g,t[16]=h,t[17]=b):b=t[17];let x;t[18]!==i.plan.name?(x=n.jsx("span",{className:"truncate font-medium",children:i.plan.name}),t[18]=i.plan.name,t[19]=x):x=t[19];let j;t[20]!==c?(j=n.jsxs("span",{className:"tabular-nums text-xs text-muted-foreground",children:[c,"%"]}),t[20]=c,t[21]=j):j=t[21];let v;t[22]!==j||t[23]!==x?(v=n.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[x,j]}),t[22]=j,t[23]=x,t[24]=v):v=t[24];const S=Ro[i.usage.state];let k;t[25]!==S?(k=z("block h-full rounded-full",S),t[25]=S,t[26]=k):k=t[26];const N=`${c}%`;let _;t[27]!==N?(_={width:N},t[27]=N,t[28]=_):_=t[28];let $;t[29]!==k||t[30]!==_?($=n.jsx("span",{className:"block h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("span",{className:k,style:_})}),t[29]=k,t[30]=_,t[31]=$):$=t[31];let w;t[32]!==v||t[33]!==$?(w=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[v,$]}),t[32]=v,t[33]=$,t[34]=w):w=t[34];let C;return t[35]!==w||t[36]!==m||t[37]!==f||t[38]!==b?(C=n.jsx(L,{children:n.jsx(se,{children:n.jsxs(ae,{tooltip:m,className:"h-auto! rounded-lg border border-border bg-card px-2 py-2 [&_svg]:opacity-100!",onClick:f,children:[b,w]})})}),t[35]=w,t[36]=m,t[37]=f,t[38]=b,t[39]=C):C=t[39],C}function Mo(t){const e=y.c(6),{planId:s}=t,{data:r}=_n();let o;e[0]!==s||e[1]!==r?(o=r?.findIndex(l=>l.id===s)??-1,e[0]=s,e[1]=r,e[2]=o):o=e[2];const i=o;if(i<0){let l;return e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ut,{className:Be}),e[3]=l):l=e[3],l}let a;return e[4]!==i?(a=n.jsx(wn,{index:i,className:Be}),e[4]=i,e[5]=a):a=e[5],a}function Lo(t){const e=y.c(5),{percent:s,state:r}=t,o=2*Math.PI*8;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=z("-rotate-90",Be),e[0]=i):i=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",className:"stroke-muted"}),e[1]=a):a=e[1];const l=Oo[r],c=`${o*s/100} ${o}`;let d;return e[2]!==l||e[3]!==c?(d=n.jsxs("svg",{viewBox:"0 0 20 20",className:i,"aria-hidden":"true",children:[a,n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",strokeLinecap:"round",className:l,strokeDasharray:c})]}),e[2]=l,e[3]=c,e[4]=d):d=e[4],d}function Eo(){return Nn()?n.jsx(Do,{}):n.jsx(Ao,{})}function _t(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(To,{children:n.jsx(A.Suspense,{fallback:null,children:n.jsx(Eo,{})})}),t[0]=e):e=t[0],e}const Fo=6e4;function qo(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Vo(t,e){if(!t)return t;const s=e?new Set(e):null;let r=0;const o=t.pages.map(a=>{const l=a.notifications.filter(c=>s&&!s.has(c.id)?!0:(r++,!1));return{...a,notifications:l}}),i=s?Math.max(0,(t.pages[0]?.unreadCount??0)-r):0;return{...t,pages:o.map(a=>({...a,unreadCount:i}))}}function Bo(t,e){const s=y.c(4),{data:r}=Y.useSession(),o=r?.user?.id;let i;s[0]!==e||s[1]!==t||s[2]!==o?(i=a=>!t||!o?Ko:Pn.subscribe(t,c=>{try{if(JSON.parse(c.data).subject!==o)return}catch{return}e(),a()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=i):i=s[3],A.useSyncExternalStore(i,Ho,Uo)}function Uo(){return 0}function Ho(){return 0}function Ko(){}function Zt(){const t=y.c(37),{locator:e,org:s}=E(),r=At(),o=Ot();let i;t[0]!==e?(i=Ee.notifications(e),t[0]=e,t[1]=i):i=t[1];const a=i;let l;t[2]!==r?(l=$=>{const{pageParam:w}=$;return qo(r,w)},t[2]=r,t[3]=l):l=t[3];let c;t[4]!==a||t[5]!==l?(c={queryKey:a,queryFn:l,initialPageParam:void 0,getNextPageParam:Qo,refetchInterval:Fo},t[4]=a,t[5]=l,t[6]=c):c=t[6];const d=In(c);let u;t[7]!==o||t[8]!==a?(u=()=>o.invalidateQueries({queryKey:a,refetchType:"active"}),t[7]=o,t[8]=a,t[9]=u):u=t[9],Bo(s.slug,u);let m;t[10]!==r?(m=$=>r.call("NOTIFICATION_MARK_READ",$?{ids:$}:{}),t[10]=r,t[11]=m):m=t[11];let f,p;t[12]!==o||t[13]!==a?(f=async $=>{await o.cancelQueries({queryKey:a}),o.setQueryData(a,w=>Vo(w,$))},p=()=>o.invalidateQueries({queryKey:a}),t[12]=o,t[13]=a,t[14]=f,t[15]=p):(f=t[14],p=t[15]);let g;t[16]!==m||t[17]!==f||t[18]!==p?(g={mutationFn:m,onMutate:f,onSettled:p},t[16]=m,t[17]=f,t[18]=p,t[19]=g):g=t[19];const h=bs(g);let b;t[20]!==d.data?.pages?(b=d.data?.pages??[],t[20]=d.data?.pages,t[21]=b):b=t[21];const x=b;let j;t[22]!==x?(j=x.flatMap(Wo),t[22]=x,t[23]=j):j=t[23];const v=x[0]?.unreadCount??0;let S;t[24]!==d?(S=()=>{d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},t[24]=d,t[25]=S):S=t[25];let k,N;t[26]!==h?(k=()=>h.mutate(null),N=$=>h.mutate([$]),t[26]=h,t[27]=k,t[28]=N):(k=t[27],N=t[28]);let _;return t[29]!==d.hasNextPage||t[30]!==d.isFetchingNextPage||t[31]!==v||t[32]!==S||t[33]!==k||t[34]!==N||t[35]!==j?(_={updates:j,redDotCount:v,hasMore:d.hasNextPage,isFetchingMore:d.isFetchingNextPage,fetchMore:S,markAllRead:k,markRead:N},t[29]=d.hasNextPage,t[30]=d.isFetchingNextPage,t[31]=v,t[32]=S,t[33]=k,t[34]=N,t[35]=j,t[36]=_):_=t[36],_}function Wo(t){return t.notifications.map(Go)}function Go(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 Qo(t){return t.nextCursor??void 0}function Jo(t){switch(t){case"mentioned":case"review_requested":return"font-medium text-foreground";case"merge_failed":case"review_changes_requested":return"font-medium text-destructive";case"review_approved":return"font-medium text-success";default:return""}}function Xo(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 s=t.action;return String(s)}}}function Yo(t){const e=y.c(36),{update:s,orgSlug:r,onSelect:o}=t,i=T();let a;e[0]!==r||e[1]!==s.taskKeySeq?(a=Gt(r,s.taskKeySeq),e[0]=r,e[1]=s.taskKeySeq,e[2]=a):a=e[2];const l=a,c=!s.actorName;let d;e[3]!==c||e[4]!==s.actorImage||e[5]!==s.actorName?(d=n.jsx("span",{className:"mt-0.5 shrink-0",children:c?n.jsx(Tn,{size:24}):n.jsx(Fe,{url:s.actorImage??void 0,fallback:Ln(s.actorName??void 0),shape:"circle",size:"xs"})}),e[3]=c,e[4]=s.actorImage,e[5]=s.actorName,e[6]=d):d=e[6];let u;e[7]!==s.taskTitle?(u=n.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:s.taskTitle}),e[7]=s.taskTitle,e[8]=u):u=e[8];let m;e[9]!==s.occurredAt?(m=En(new Date(s.occurredAt)),e[9]=s.occurredAt,e[10]=m):m=e[10];let f;e[11]!==m?(f=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:m}),e[11]=m,e[12]=f):f=e[12];let p;e[13]!==u||e[14]!==f?(p=n.jsxs("div",{className:"flex items-baseline gap-2",children:[u,f]}),e[13]=u,e[14]=f,e[15]=p):p=e[15];let g;e[16]!==l?(g=l&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:l})," · "]}),e[16]=l,e[17]=g):g=e[17];let h;e[18]!==s.action?(h=z(Jo(s.action)),e[18]=s.action,e[19]=h):h=e[19];let b;e[20]!==i||e[21]!==s?(b=Xo(s,i),e[20]=i,e[21]=s,e[22]=b):b=e[22];let x;e[23]!==h||e[24]!==b?(x=n.jsx("span",{className:h,children:b}),e[23]=h,e[24]=b,e[25]=x):x=e[25];let j;e[26]!==x||e[27]!==g?(j=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[g,x]}),e[26]=x,e[27]=g,e[28]=j):j=e[28];let v;e[29]!==j||e[30]!==p?(v=n.jsxs("div",{className:"min-w-0 flex-1",children:[p,j]}),e[29]=j,e[30]=p,e[31]=v):v=e[31];let S;return e[32]!==o||e[33]!==v||e[34]!==d?(S=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-start gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[d,v]}),e[32]=o,e[33]=v,e[34]=d,e[35]=S):S=e[35],S}function Zo(t){const e=y.c(2),{onReach:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const i=new IntersectionObserver(a=>{a.some(ei)&&s()});return i.observe(o),()=>i.disconnect()}}),e[0]=s,e[1]=r):r=e[1],r}function ei(t){return t.isIntersecting}function ti(t){const e=y.c(23),{onClose:s}=t,r=T(),o=$e(),{org:i}=E(),{updates:a,markAllRead:l,markRead:c,hasMore:d,fetchMore:u}=Zt();let m;e[0]!==r?(m=r("sidebar.inbox.title"),e[0]=r,e[1]=m):m=e[1];let f;e[2]!==m?(f=n.jsx("h3",{className:"text-sm font-medium",children:m}),e[2]=m,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==r||e[6]!==a.length?(p=a.length>0&&n.jsx(Le,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:l,children:r("sidebar.inbox.markAllRead")}),e[4]=l,e[5]=r,e[6]=a.length,e[7]=p):p=e[7];let g;e[8]!==f||e[9]!==p?(g=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[f,p]}),e[8]=f,e[9]=p,e[10]=g):g=e[10];let h;e[11]!==u||e[12]!==d||e[13]!==c||e[14]!==o||e[15]!==s||e[16]!==i||e[17]!==r||e[18]!==a?(h=a.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(mt,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:r("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:r("sidebar.inbox.emptyBody")})]}):n.jsxs(Cn,{className:"min-h-0 flex-1",children:[a.map(x=>{const j=Gt(i.slug,x.taskKeySeq);return n.jsx(Yo,{update:x,orgSlug:i.slug,onSelect:()=>{c(x.id),s(),j&&o({to:"/$org/tasks/{-$taskKey}",params:{org:i.slug,taskKey:j}})}},x.id)}),d&&n.jsx(Zo,{onReach:u})]}),e[11]=u,e[12]=d,e[13]=c,e[14]=o,e[15]=s,e[16]=i,e[17]=r,e[18]=a,e[19]=h):h=e[19];let b;return e[20]!==g||e[21]!==h?(b=n.jsxs(n.Fragment,{children:[g,h]}),e[20]=g,e[21]=h,e[22]=b):b=e[22],b}function es(){const t=y.c(1),{redDotCount:e}=Zt();if(e===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function ts(t){const e=y.c(10),{open:s,onOpenChange:r,children:o}=t;let i;e[0]!==r||e[1]!==s?(i=s&&n.jsx(ti,{onClose:()=>r(!1)}),e[0]=r,e[1]=s,e[2]=i):i=e[2];let a;e[3]!==i?(a=n.jsx(lt,{side:"right",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:i}),e[3]=i,e[4]=a):a=e[4];let l;return e[5]!==o||e[6]!==r||e[7]!==s||e[8]!==a?(l=n.jsxs(at,{open:s,onOpenChange:r,children:[o,a]}),e[5]=o,e[6]=r,e[7]=s,e[8]=a,e[9]=l):l=e[9],l}function ss(){const t=y.c(9),e=T(),[s,r]=A.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let i,a;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(mt,{size:15}),a=n.jsx(es,{}),t[2]=i,t[3]=a):(i=t[2],a=t[3]);let l;t[4]!==o?(l=n.jsx(Ke,{asChild:!0,children:n.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:[i,a]})}),t[4]=o,t[5]=l):l=t[5];let c;return t[6]!==s||t[7]!==l?(c=n.jsx(ts,{open:s,onOpenChange:r,children:l}),t[6]=s,t[7]=l,t[8]=c):c=t[8],c}function si(){const t=y.c(15),e=T(),[s,r]=A.useState(!1),o=le();let i;t[0]!==o||t[1]!==e?(i=o?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=i):i=t[2];let a,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(mt,{}),l=n.jsx(es,{}),t[3]=a,t[4]=l):(a=t[3],l=t[4]);let c;t[5]!==e?(c=e("sidebar.inbox.title"),t[5]=e,t[6]=c):c=t[6];let d;t[7]!==c?(d=n.jsx("span",{className:"truncate",children:c}),t[7]=c,t[8]=d):d=t[8];let u;t[9]!==i||t[10]!==d?(u=n.jsx(Ke,{asChild:!0,children:n.jsxs(ae,{tooltip:i,className:"relative",children:[a,l,d]})}),t[9]=i,t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==s||t[13]!==u?(m=n.jsx(ts,{open:s,onOpenChange:r,children:u}),t[12]=s,t[13]=u,t[14]=m):m=t[14],m}function wt(){const t=y.c(10),e=T();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(gt,{children:n.jsx(an,{className:Be})}),t[2]=r):r=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let i;t[5]!==o?(i=n.jsx("span",{children:o}),t[5]=o,t[6]=i):i=t[6];let a;return t[7]!==s||t[8]!==i?(a=n.jsx(L,{className:"gap-0.5",children:n.jsx(se,{children:n.jsx(yn,{trigger:n.jsxs(ae,{tooltip:s,children:[r,i]})})})}),t[7]=s,t[8]=i,t[9]=a):a=t[9],a}function ni(){const t=y.c(13),e=le(),r=!$n();if(e){let c;t[0]!==r?(c=r&&n.jsx(_t,{}),t[0]=r,t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(wt,{}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{children:n.jsx(si,{})}),t[3]=u):u=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(L,{children:[u,n.jsx(se,{children:n.jsx(tt,{})})]}),t[4]=m):m=t[4];let f;return t[5]!==c?(f=n.jsxs(Ye,{className:"px-2 pb-3 gap-1",children:[c,d,m]}),t[5]=c,t[6]=f):f=t[6],f}let o;t[7]!==r?(o=r&&n.jsx(_t,{}),t[7]=r,t[8]=o):o=t[8];let i;t[9]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(wt,{}),t[9]=i):i=t[9];let a;t[10]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(L,{className:"gap-0.5",children:n.jsx(se,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(tt,{})}),n.jsx(ss,{})]})})}),t[10]=a):a=t[10];let l;return t[11]!==o?(l=n.jsxs(Ye,{className:"px-2 pb-3 gap-0.5",children:[o,i,a]}),t[11]=o,t[12]=l):l=t[12],l}function oi(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ye,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(L,{children:n.jsx(se,{children:n.jsx(tt,{})})})}),n.jsx(ss,{})]})}),t[0]=e):e=t[0],e}function ii(t){let e=0;for(let r=0;r<t.length;r++)e=t.charCodeAt(r)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function ht(t){const e=y.c(13),{org:s,size:r}=t,o=r===void 0?"sm":r,i=o==="xs"?"size-5":"size-6",a=o==="xs"?"text-[9px]":"text-xs";let l;e[0]!==i?(l=z(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:ii(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let d;e[5]!==s.logo||e[6]!==s.name||e[7]!==a?(d=s.logo?n.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:z("font-semibold leading-none",a),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=a,e[8]=d):d=e[8];let u;return e[9]!==l||e[10]!==c||e[11]!==d?(u=n.jsx("div",{className:l,style:c,children:d}),e[9]=l,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function ri({invitation:t,onChanged:e}){const s=T(),[r,o]=A.useState(!1),i=t.organizationName??s("header.orgSwitcher.unknownOrganization"),a=async()=>{o(!0);try{const d=await Y.organization.acceptInvitation({invitationId:t.id});if(d.error){re.error(d.error.message),o(!1);return}}catch{re.error(s("header.orgSwitcher.failedToAcceptInvitation")),o(!1);return}re.success(s("header.orgSwitcher.joined",{name:i})),js();let c;try{c=(await Y.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{o(!0);try{const c=await Y.organization.rejectInvitation({invitationId:t.id});if(c.error){re.error(c.error.message),o(!1);return}re.success(s("header.orgSwitcher.invitationDeclined")),o(!1),e()}catch{re.error(s("header.orgSwitcher.failedToDeclineInvitation")),o(!1)}};return n.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[n.jsx(ht,{org:{name:i},size:"sm"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"truncate text-sm font-medium",children:i}),n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[n.jsx(Le,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:a,disabled:r,children:s("header.orgSwitcher.accept")}),n.jsx(Le,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:r,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:n.jsx(Kn,{size:14})})]})]})}function ns(){const t=A.useContext(vs),{data:e,refetch:s}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>s?.()}}function ai(t){const e=y.c(13),s=t.trim(),{data:r}=Y.useSession(),o=r?.user?.id??"",i=s.length>0&&!!o,a=Ee.projectSearch(o,s);let l;e[0]!==s?(l=async x=>{const{signal:j}=x,v=await fetch(`/api/_me/projects/search?q=${encodeURIComponent(s)}`,{signal:j});if(!v.ok)throw new Error(`Project search failed: ${v.status}`);return await v.json()},e[0]=s,e[1]=l):l=e[1];let c;e[2]!==i||e[3]!==a||e[4]!==l?(c={queryKey:a,queryFn:l,enabled:i,placeholderData:ys,staleTime:3e4,retry:!1},e[2]=i,e[3]=a,e[4]=l,e[5]=c):c=e[5];const{data:d,isFetching:u,isPlaceholderData:m,isError:f}=st(c);let p;e[6]!==d?.items?(p=d?.items??[],e[6]=d?.items,e[7]=p):p=e[7];const g=i&&u,h=i&&m;let b;return e[8]!==f||e[9]!==p||e[10]!==g||e[11]!==h?(b={hits:p,isSearching:g,isStale:h,isError:f},e[8]=f,e[9]=p,e[10]=g,e[11]=h,e[12]=b):b=e[12],b}function $t(t){const e=y.c(15),{id:s,label:r,createLabel:o,onCreate:i}=t;let a;e[0]!==s||e[1]!==r?(a=n.jsx("span",{id:s,className:"truncate",children:r}),e[0]=s,e[1]=r,e[2]=a):a=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(qn,{size:14}),e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==i?(c=n.jsx(ct,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":o,className:"-my-1 shrink-0 cursor-pointer rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",onClick:i,children:l})}),e[4]=o,e[5]=i,e[6]=c):c=e[6];let d;e[7]!==o?(d=n.jsx(dt,{side:"right",children:o}),e[7]=o,e[8]=d):d=e[8];let u;e[9]!==c||e[10]!==d?(u=n.jsxs(ut,{children:[c,d]}),e[9]=c,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==a||e[13]!==u?(m=n.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[a,u]}),e[12]=a,e[13]=u,e[14]=m):m=e[14],m}const Ue="min-h-9 items-center",de={allProjects:"scope:__all__",project:t=>`scope:${t}`,org:t=>`org:${t}`,foreignProject:(t,e)=>`travel:${t}:${e}`};function li(t){const e=y.c(9),{active:s,rows:r}=t,o=T();let i,a,l;if(e[0]!==s||e[1]!==r||e[2]!==o){l=Symbol.for("react.early_return_sentinel");e:{const d=r.get(s);if(d?.kind!=="travel"){l=null;break e}i="border-t border-border px-3 py-2 text-xs text-warning",a=o("sidebar.picker.verbTravel",{name:d.label})}e[0]=s,e[1]=r,e[2]=o,e[3]=i,e[4]=a,e[5]=l}else i=e[3],a=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;return e[6]!==i||e[7]!==a?(c=n.jsx("div",{className:i,children:a}),e[6]=i,e[7]=a,e[8]=c):c=e[8],c}function ci(t){const e=y.c(25),{onClose:s,onCreateOrg:r,className:o}=t,i=T(),a=A.useId(),l=A.useId(),c=$e(),{org:d}=E(),{scopeId:u,projects:m,setScope:f}=Se(),{hasMore:p}=Wn(),[g,h]=A.useState(""),[b,x]=A.useState(de.allProjects),j=A.useDeferredValue(g);let v;e[0]!==j?(v=j.trim(),e[0]=j,e[1]=v):v=e[1];const S=v,k=S.length>0,{data:N}=Ss(),{invitations:_,refetch:$}=ns();let w;e[2]!==d.slug?(w=(I,R)=>I.slug===d.slug?-1:R.slug===d.slug?1:0,e[2]=d.slug,e[3]=w):w=e[3];const C=(N??[]).slice().sort(w),{hits:P,isSearching:O,isStale:ne,isError:K}=ai(k?S:""),W=k?C.filter(I=>{const R=S.toLowerCase();return I.name.toLowerCase().includes(R)||I.slug.toLowerCase().includes(R)}):[],oe=we();let q;e[4]!==oe?(q=oe.startsWith("/$org/settings"),e[4]=oe,e[5]=q):q=e[5];const G=q,V=new Map;let B;e[6]!==G||e[7]!==s||e[8]!==f?(B=I=>{F("scope_set",{scoped:I!==null,fromSettings:G}),f(I),s()},e[6]=G,e[7]=s,e[8]=f,e[9]=B):B=e[9];const Q=B;let ee;e[10]!==c||e[11]!==s?(ee=(I,R)=>{F("org_project_travel",{scoped:!!R}),c(R?{to:"/$org/projects/$agentId",params:{org:I,agentId:R}}:{to:"/$org/home",params:{org:I}}),s()},e[10]=c,e[11]=s,e[12]=ee):ee=e[12];const J=ee;let U;e[13]!==c||e[14]!==s||e[15]!==d.slug?(U=()=>{F("picker_new_project"),c({to:"/$org/home",params:{org:d.slug}}),s()},e[13]=c,e[14]=s,e[15]=d.slug,e[16]=U):U=e[16];const me=U;V.set(de.allProjects,{kind:"scope",label:i("sidebar.scope.allProjects")});let D;e[17]!==i?(D=i("sidebar.picker.searchPlaceholder"),e[17]=i,e[18]=D):D=e[18];let H;e[19]!==g||e[20]!==D?(H=n.jsx(Un,{value:g,onValueChange:h,placeholder:D}),e[19]=g,e[20]=D,e[21]=H):H=e[21];const ie=Vn,ke="max-h-none min-h-0 flex-1",X=k?n.jsxs(n.Fragment,{children:[K&&n.jsx(yt,{children:i("sidebar.picker.searchFailed")}),!K&&!O&&P.length===0&&W.length===0&&n.jsx(yt,{children:i("sidebar.picker.noMatches",{query:S})}),!K&&P.length>0&&n.jsx(Me,{heading:i("sidebar.picker.projectsHeading"),className:z(ne&&"opacity-50"),children:P.map(I=>n.jsx(di,{hit:I,currentOrgSlug:d.slug,scopeId:u,rows:V,onScope:Q,onTravel:J},`${I.orgSlug}:${I.id}`))}),W.length>0&&n.jsx(Me,{heading:i("sidebar.picker.orgsHeading"),children:W.map(I=>n.jsx(Ct,{candidate:I,currentOrgSlug:d.slug,rows:V,onTravel:J,onClose:s},I.id))})]}):n.jsxs(n.Fragment,{children:[n.jsx($t,{id:a,label:i("sidebar.picker.projectsHeading"),createLabel:i("sidebar.picker.newProject"),onCreate:me}),n.jsxs(Me,{"aria-labelledby":a,children:[n.jsxs(Ve,{value:de.allProjects,className:Ue,onSelect:()=>Q(null),children:[n.jsx("span",{className:"min-w-0 flex-1 truncate",children:i("sidebar.scope.allProjects")}),u===null&&n.jsx(qe,{size:14})]}),m.map(I=>{const R=de.project(I.id);return V.set(R,{kind:"scope",label:I.title}),n.jsxs(Ve,{value:R,className:Ue,onSelect:()=>Q(I.id),children:[n.jsx(ft,{icon:I.icon,name:I.title}),n.jsx("span",{className:"min-w-0 flex-1 truncate",children:I.title}),u===I.id&&n.jsx(qe,{size:14})]},I.id)}),p&&n.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:i("sidebar.picker.moreExist")})]}),n.jsx($t,{id:l,label:i("sidebar.picker.orgsHeading"),createLabel:i("sidebar.picker.newOrganization"),onCreate:r}),n.jsxs(Me,{"aria-labelledby":l,children:[_.map(I=>n.jsx(ri,{invitation:I,onChanged:$},I.id)),C.map(I=>n.jsx(Ct,{candidate:I,currentOrgSlug:d.slug,rows:V,onTravel:J,onClose:s},I.id))]})]});let te;return e[22]!==ie||e[23]!==X?(te=n.jsx(ie,{className:ke,children:X}),e[22]=ie,e[23]=X,e[24]=te):te=e[24],n.jsxs(Bn,{shouldFilter:!1,value:b,onValueChange:x,className:o,children:[H,te,n.jsx(li,{active:b,rows:V})]})}function Ct(t){const e=y.c(22),{candidate:s,currentOrgSlug:r,rows:o,onTravel:i,onClose:a}=t,l=s.slug===r;let c;e[0]!==s.name||e[1]!==s.slug||e[2]!==l||e[3]!==o?(c=de.org(s.slug),o.set(c,{kind:l?"scope":"travel",label:s.name}),e[0]=s.name,e[1]=s.slug,e[2]=l,e[3]=o,e[4]=c):c=e[4];let d;e[5]!==s.slug||e[6]!==l||e[7]!==a||e[8]!==i?(d=()=>l?a():i(s.slug),e[5]=s.slug,e[6]=l,e[7]=a,e[8]=i,e[9]=d):d=e[9];let u;e[10]!==s?(u=n.jsx(ht,{org:s,size:"xs"}),e[10]=s,e[11]=u):u=e[11];let m;e[12]!==s.name?(m=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e[12]=s.name,e[13]=m):m=e[13];let f;e[14]!==l?(f=l&&n.jsx(qe,{size:14}),e[14]=l,e[15]=f):f=e[15];let p;return e[16]!==d||e[17]!==u||e[18]!==m||e[19]!==f||e[20]!==c?(p=n.jsxs(Ve,{value:c,className:Ue,onSelect:d,children:[u,m,f]}),e[16]=d,e[17]=u,e[18]=m,e[19]=f,e[20]=c,e[21]=p):p=e[21],p}function di(t){const e=y.c(30),{hit:s,currentOrgSlug:r,scopeId:o,rows:i,onScope:a,onTravel:l}=t,c=s.orgSlug===r;let d;e[0]!==s.id||e[1]!==s.orgSlug||e[2]!==s.title||e[3]!==c||e[4]!==i?(d=c?de.project(s.id):de.foreignProject(s.orgSlug,s.id),i.set(d,{kind:c?"scope":"travel",label:s.title}),e[0]=s.id,e[1]=s.orgSlug,e[2]=s.title,e[3]=c,e[4]=i,e[5]=d):d=e[5];let u;e[6]!==s.id||e[7]!==s.orgSlug||e[8]!==c||e[9]!==a||e[10]!==l?(u=()=>c?a(s.id):l(s.orgSlug,s.id),e[6]=s.id,e[7]=s.orgSlug,e[8]=c,e[9]=a,e[10]=l,e[11]=u):u=e[11];let m;e[12]!==s.icon||e[13]!==s.title?(m=n.jsx(ft,{icon:s.icon,name:s.title}),e[12]=s.icon,e[13]=s.title,e[14]=m):m=e[14];let f;e[15]!==s.title?(f=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.title}),e[15]=s.title,e[16]=f):f=e[16];let p;e[17]!==s.orgName?(p=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.orgName}),e[17]=s.orgName,e[18]=p):p=e[18];let g;e[19]!==s.id||e[20]!==c||e[21]!==o?(g=c&&o===s.id&&n.jsx(qe,{size:14}),e[19]=s.id,e[20]=c,e[21]=o,e[22]=g):g=e[22];let h;return e[23]!==u||e[24]!==m||e[25]!==f||e[26]!==p||e[27]!==g||e[28]!==d?(h=n.jsxs(Ve,{value:d,className:Ue,onSelect:u,children:[m,f,p,g]}),e[23]=u,e[24]=m,e[25]=f,e[26]=p,e[27]=g,e[28]=d,e[29]=h):h=e[29],h}function os(t){const e=y.c(32),{collapsed:s,onNavigate:r}=t,o=s===void 0?!1:s,i=T(),{org:a}=E(),{project:l}=Se(),{invitations:c}=ns(),[d,u]=A.useState(!1),[m,f]=A.useState(!1),p=ot();let g;if(e[0]!==o||e[1]!==c.length||e[2]!==a||e[3]!==l||e[4]!==i){const $=l?i("sidebar.picker.projectInOrg",{project:l.title,org:a.name}):a.name;let w;e[6]!==a||e[7]!==l?(w=l?n.jsx(ln,{icon:l.icon,name:l.title,size:"xs",className:"shrink-0"}):n.jsx(ht,{org:a,size:"sm"}),e[6]=a,e[7]=l,e[8]=w):w=e[8];let C;e[9]!==c.length?(C=c.length>0&&n.jsx("span",{className:"absolute -right-1 -top-1 size-2.5 rounded-full bg-destructive ring-2 ring-background"}),e[9]=c.length,e[10]=C):C=e[10];let P;e[11]!==w||e[12]!==C?(P=n.jsxs("div",{className:"relative inline-flex shrink-0",children:[w,C]}),e[11]=w,e[12]=C,e[13]=P):P=e[13];const O=P;g=o?n.jsx(ae,{tooltip:$,"data-tour":Z.switcher,children:O}):n.jsxs("button",{type:"button","data-tour":Z.switcher,"aria-label":i("sidebar.picker.ariaLabel",{name:$}),className:z("flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pl-1 pr-1.5 text-left md:h-[34px] md:py-0","[transition:background-color_180ms_ease] hover:bg-sidebar-accent",Us),children:[O,n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l?l.title:a.name}),n.jsx(Fn,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=o,e[1]=c.length,e[2]=a,e[3]=l,e[4]=i,e[5]=g}else g=e[5];const h=g,b=p?"min-h-0 flex-1":"max-h-[min(560px,70dvh,var(--radix-popover-content-available-height,70dvh))]";let x;e[14]!==r?(x=()=>{u(!1),r?.()},e[14]=r,e[15]=x):x=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{u(!1),f(!0)},e[16]=j):j=e[16];let v;e[17]!==b||e[18]!==x?(v=n.jsx(ci,{onClose:x,onCreateOrg:j,className:b}),e[17]=b,e[18]=x,e[19]=v):v=e[19];const S=v;let k;e[20]!==o||e[21]!==S||e[22]!==p||e[23]!==d||e[24]!==i||e[25]!==h?(k=p?n.jsxs(Lt,{open:d,onOpenChange:u,direction:"bottom",children:[n.jsx(Ws,{asChild:!0,children:h}),n.jsxs(Et,{className:"flex max-h-[85dvh] flex-col p-0",children:[n.jsx(Ft,{className:"sr-only",children:i("sidebar.picker.title")}),S]})]}):n.jsxs(at,{open:d,onOpenChange:u,children:[n.jsx(Ke,{asChild:!0,children:h}),n.jsx(lt,{side:o?"right":"bottom",align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:S})]}),e[20]=o,e[21]=S,e[22]=p,e[23]=d,e[24]=i,e[25]=h,e[26]=k):k=e[26];let N;e[27]!==m?(N=n.jsx(Hn,{open:m,onOpenChange:f}),e[27]=m,e[28]=N):N=e[28];let _;return e[29]!==k||e[30]!==N?(_=n.jsxs(n.Fragment,{children:[k,N]}),e[29]=k,e[30]=N,e[31]=_):_=e[31],_}const is=16;function ui(){const t=y.c(7),e=le(),s=We();let r;t[0]!==e?(r=n.jsx(os,{collapsed:e}),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==s?(o=!s&&n.jsx(fi,{}),t[2]=s,t[3]=o):o=t[3];let i;return t[4]!==r||t[5]!==o?(i=n.jsxs(n.Fragment,{children:[r,o]}),t[4]=r,t[5]=o,t[6]=i):i=t[6],i}function mi(t){const e=y.c(12),{onClose:s}=t,r=T();let o;e[0]!==s?(o=n.jsx(os,{onNavigate:s}),e[0]=s,e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex-1"}),e[2]=i):i=e[2];let a;e[3]!==r?(a=r("sidebar.header.closeSidebar"),e[3]=r,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(it,{size:is}),e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==a?(c=n.jsx(rt,{onClick:s,"aria-label":a,children:l}),e[6]=s,e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==o||e[10]!==c?(d=n.jsxs(n.Fragment,{children:[o,i,c]}),e[9]=o,e[10]=c,e[11]=d):d=e[11],d}function fi(){const t=y.c(12),e=T(),s=le(),{toggleSidebar:r}=Ce();let o;t[0]!==e?(o=e("sidebar.header.toggleSidebar"),t[0]=e,t[1]=o):o=t[1];const i=o;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(it,{size:is}),t[2]=a):a=t[2];let l;t[3]!==i||t[4]!==r?(l=n.jsx(ct,{asChild:!0,children:n.jsx(rt,{"aria-label":i,onClick:r,className:"shrink-0 rounded-lg md:size-[34px] group-data-[state=collapsed]/sidebar:mx-auto",children:a})}),t[3]=i,t[4]=r,t[5]=l):l=t[5];const c=!s;let d;t[6]!==i||t[7]!==c?(d=n.jsx(dt,{side:"right",hidden:c,children:i}),t[6]=i,t[7]=c,t[8]=d):d=t[8];let u;return t[9]!==l||t[10]!==d?(u=n.jsxs(ut,{children:[l,d]}),t[9]=l,t[10]=d,t[11]=u):u=t[11],u}function ue(t){const e=y.c(33),{icon:s,label:r,isActive:o,link:i,onSelect:a,ariaLabel:l,className:c,dataTour:d,children:u,trailing:m}=t,f=o===void 0?!1:o,p=le(),g=l??r,h=p?g:void 0;let b;e[0]!==c||e[1]!==d||e[2]!==f||e[3]!==h?(b={isActive:f,tooltip:h,className:c,"data-tour":d},e[0]=c,e[1]=d,e[2]=f,e[3]=h,e[4]=b):b=e[4];const x=b;let j;e[5]!==m?(j=m&&n.jsx("span",{className:"order-last ml-auto flex shrink-0 items-center group-data-[state=collapsed]/sidebar:hidden",children:m}),e[5]=m,e[6]=j):j=e[6];let v;e[7]!==r?(v=n.jsx("span",{className:"truncate",children:r}),e[7]=r,e[8]=v):v=e[8];let S;e[9]!==s||e[10]!==j||e[11]!==v?(S=n.jsxs(n.Fragment,{children:[s,j,v]}),e[9]=s,e[10]=j,e[11]=v,e[12]=S):S=e[12];const k=S;if(i){const $=f?"page":void 0;let w;e[13]!==k||e[14]!==i||e[15]!==g||e[16]!==a||e[17]!==$?(w=n.jsx(Rt,{...i,"aria-label":g,"aria-current":$,onClick:a,children:k}),e[13]=k,e[14]=i,e[15]=g,e[16]=a,e[17]=$,e[18]=w):w=e[18];let C;e[19]!==x||e[20]!==w?(C=n.jsx(ae,{asChild:!0,...x,children:w}),e[19]=x,e[20]=w,e[21]=C):C=e[21];let P;return e[22]!==u||e[23]!==C?(P=n.jsxs(se,{children:[C,u]}),e[22]=u,e[23]=C,e[24]=P):P=e[24],P}let N;e[25]!==k||e[26]!==g||e[27]!==a||e[28]!==x?(N=n.jsx(ae,{...x,"aria-label":g,onClick:a,children:k}),e[25]=k,e[26]=g,e[27]=a,e[28]=x,e[29]=N):N=e[29];let _;return e[30]!==u||e[31]!==N?(_=n.jsxs(se,{children:[N,u]}),e[30]=u,e[31]=N,e[32]=_):_=e[32],_}function rs(t){const e=y.c(5),{label:s,link:r,onSelect:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Qn,{size:16}),e[0]=i):i=e[0];let a;return e[1]!==s||e[2]!==r||e[3]!==o?(a=n.jsx("div",{className:"-mx-2 border-b border-sidebar-border px-2 py-2",children:n.jsx(L,{className:"shrink-0",children:n.jsx(ue,{icon:i,label:s,className:"text-sidebar-foreground/70",link:r,onSelect:o})})}),e[1]=s,e[2]=r,e[3]=o,e[4]=a):a=e[4],a}function pi(t){return t==="board"?"kanban":t==="cdn"?"monitoring":Dt(t)?"cms":null}function as(){const t=y.c(2),{data:e}=Wt();let s;return t[0]!==e?(s=r=>{const o=pi(r);return!o||!e?!1:e.features[o]!==!0},t[0]=e,t[1]=s):s=t[1],s}const xi="settings",gi=["overview","reports","board","files"];function hi(t,e){return!t||!e?!1:!Mt(e.metadata)}function bi(t,e,s,r){if(!t||!e)return!0;const o=r!==void 0;return Jn(o?r:Qt(e.metadata),o?1:e.metadata?.sidebarViewsVersion).includes(s)}function ji(){const t=y.c(16),e=T(),{org:s}=E(),r=we(),o=He(),{project:i,repo:a}=Se(),l=Jt(i?.id);let c;t[0]!==i||t[1]!==o?(c=hi(o,i),t[0]=i,t[1]=o,t[2]=c):c=t[2];const d=c;let u;t[3]!==l||t[4]!==i||t[5]!==o?(u=p=>bi(o,i,p,l),t[3]=l,t[4]=i,t[5]=o,t[6]=u):u=t[6];const m=u;let f;if(t[7]!==m||t[8]!==d||t[9]!==r||t[10]!==s||t[11]!==i?.id||t[12]!==a||t[13]!==o||t[14]!==e){const p={overview:d||!m("overview")?null:{key:"overview",label:e("sidebar.navDestinations.home"),icon:n.jsx(cn,{size:16}),isActive:r===M.home||r===M.orgIndex||r===ce.root||r===`${ce.root}/`,trackAs:"overview",link:o?{to:ce.root,params:{org:s.slug,agentId:o}}:{to:M.home,params:{org:s.slug}}},reports:Xe(M.reports,o)&&!d&&m("reports")?{key:"reports",label:e("sidebar.navDestinations.reports"),icon:n.jsx(Kt,{size:16}),isActive:r===M.reports||r===ce.reports,trackAs:"reports",link:o?{to:ce.reports,params:{org:s.slug,agentId:o}}:{to:M.reports,params:{org:s.slug}}}:null,board:d||!m("board")?null:{key:"board",label:e("sidebar.navDestinations.tasks"),icon:n.jsx(Ht,{size:16}),isActive:r===M.tasks||r===ce.tasks,trackAs:"board",dataTour:Z.tasks,link:{to:o?ce.tasks:M.tasks,params:{org:s.slug,agentId:o??void 0,taskKey:void 0},search:g=>{const h=a??i?.id;return h?{...g,repo:h}:g}}},files:Xe(M.library,o)?{key:"files",label:e("sidebar.navDestinations.library"),icon:n.jsx(Gn,{size:16}),isActive:r===M.library,trackAs:"files",link:{to:M.library,params:{org:s.slug}}}:null};f=gi.map(g=>p[g]).filter(vi),t[7]=m,t[8]=d,t[9]=r,t[10]=s,t[11]=i?.id,t[12]=a,t[13]=o,t[14]=e,t[15]=f}else f=t[15];return f}function vi(t){return t!==null}function yi(t){const e=y.c(9),{onNavigate:s}=t,r=ji(),o=as();let i;if(e[0]!==r||e[1]!==o||e[2]!==s){let l;e[4]!==o||e[5]!==s?(l=c=>n.jsx(ue,{icon:c.icon,label:c.label,dataTour:c.dataTour,isActive:c.isActive,link:c.link,trailing:o(c.key)?n.jsx(nt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{F("nav_destination_clicked",{destination:c.trackAs}),s?.()}},c.key),e[4]=o,e[5]=s,e[6]=l):l=e[6],i=r.map(l),e[0]=r,e[1]=o,e[2]=s,e[3]=i}else i=e[3];let a;return e[7]!==i?(a=n.jsx(L,{className:"gap-1",children:i}),e[7]=i,e[8]=a):a=e[8],a}function Si(t){const e=y.c(18),{onNavigate:s}=t,r=T(),{org:o}=E(),i=He(),a=pt(),l=we(),c=ks();let d;e[0]!==c||e[1]!==l?(d=l.startsWith("/$org/settings")||l.startsWith(M.projects)&&c==="settings",e[0]=c,e[1]=l,e[2]=d):d=e[2];const u=d;let m;e[3]!==r?(m=r("sidebar.navDestinations.settings"),e[3]=r,e[4]=m):m=e[4];const f=m;let p;e[5]!==o||e[6]!==i?(p=i?void 0:{to:"/$org/settings",params:{org:o.slug}},e[5]=o,e[6]=i,e[7]=p):p=e[7];const g=p;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Bt,{size:16}),e[8]=h):h=e[8];let b;e[9]!==a||e[10]!==s||e[11]!==i?(b=()=>{F("nav_destination_clicked",{destination:xi,target:i?"project":"org"}),i&&a(i,{panel:"settings"}),s?.()},e[9]=a,e[10]=s,e[11]=i,e[12]=b):b=e[12];let x;return e[13]!==u||e[14]!==f||e[15]!==g||e[16]!==b?(x=n.jsx(L,{className:"gap-1",children:n.jsx(ue,{dataTour:Z.settings,icon:h,label:f,isActive:u,link:g,onSelect:b})}),e[13]=u,e[14]=f,e[15]=g,e[16]=b,e[17]=x):x=e[17],x}function ki(t,e){const s=new Set(e);return s.size===0?t:t.filter(r=>s.has(r.connectionId))}function Ni(t){const e=t.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(s=>!!s&&typeof s=="object"&&typeof s.connectionId=="string"&&typeof s.toolName=="string"):[]}function _i(t){const e=y.c(13),{onNavigate:s}=t,r=T(),{project:o}=Se(),i=pt(),a=we(),l=no(),c=Xn(o),d=as(),u=Jt(o?.id);if(!o)return null;let m;if(e[0]!==c.presence||e[1]!==u||e[2]!==o.metadata){const g=Mt(o.metadata),h=u??Qt(o.metadata);m=new Set(Yn(h,Zn(g,c.presence),u!==void 0?1:o.metadata.sidebarViewsVersion)),e[0]=c.presence,e[1]=u,e[2]=o.metadata,e[3]=m}else m=e[3];const f=m;let p;if(e[4]!==l||e[5]!==d||e[6]!==a||e[7]!==i||e[8]!==s||e[9]!==o||e[10]!==f||e[11]!==r){const g=[];f.has("site-editor")&&g.push({key:"site-editor",label:r("sidebar.projectNav.siteEditor"),icon:n.jsx(Vt,{size:16}),panel:"site-editor",isActive:Ci,dataTour:Z.siteEditor});const h={assets:{label:r("common.mainPanelTabs.assets"),icon:n.jsx(so,{size:16})},hosting:{label:r("common.mainPanelTabs.hosting"),icon:n.jsx(mn,{size:16})},e2e:{label:r("common.mainPanelTabs.e2e"),icon:n.jsx(Ys,{size:16})},analytics:{label:r("common.mainPanelTabs.analytics"),icon:n.jsx(Kt,{size:16})},cdn:{label:r("common.mainPanelTabs.cdn"),icon:n.jsx(un,{size:16})},experiments:{label:r("experiments.title"),icon:n.jsx(dn,{size:16})}};for(const x of eo){if(!f.has(x))continue;const j=h[x];g.push({key:x,label:j.label,icon:j.icon,panel:x,isActive:v=>v===x})}for(const x of ki(Ni(o),(o.connections??[]).map($i)))x.toolName!=="fetch_assets"&&g.push({key:`pinned:${x.connectionId}:${x.toolName}`,label:x.label||x.toolName,icon:x.icon?n.jsx("img",{src:x.icon,alt:"",className:"size-4 rounded-[3px]"}):n.jsx(to,{size:16}),panel:jt(x.connectionId,x.toolName),isActive:j=>j===jt(x.connectionId,x.toolName)});f.has("automations")&&g.push({key:"automations",label:r("sidebar.projectNav.automations"),icon:n.jsx(Ut,{size:16}),panel:"automations",isActive:wi,dataTour:Z.automations});const b=a.startsWith(M.projects);p=n.jsx(L,{className:"gap-1",children:g.map(x=>n.jsx(ue,{icon:x.icon,label:x.label,dataTour:x.dataTour,isActive:b&&x.isActive(l),trailing:d(x.panel)?n.jsx(nt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{F("project_nav_clicked",{surface:x.key}),i(o.id,{panel:x.panel}),s?.()}},x.key))}),e[4]=l,e[5]=d,e[6]=a,e[7]=i,e[8]=s,e[9]=o,e[10]=f,e[11]=r,e[12]=p}else p=e[12];return p}function wi(t){return t==="automations"||Ns(t)!==null}function $i(t){return t.connection_id}function Ci(t){return!!t&&Dt(t)}const Ii=3;function Pi(t,e){return t.status==="archived"||t.status==="done"?!1:e&&t.assigneeId===e?!0:Rn(t)||Dn(t)}function Ti(t,e,s){const r=new Map;for(const i of e){if(!Pi(i,s))continue;const a=An(i,t);for(const l of a){const c=r.get(l.id)??[];c.push({task:i,only:a.length===1}),r.set(l.id,c)}}const o=new Map;for(const[i,a]of r)a.sort((l,c)=>Number(c.only)-Number(l.only)||(c.task.updatedAt??"").localeCompare(l.task.updatedAt??"")),o.set(i,a.slice(0,Ii).map(l=>l.task));return o}function zi(t){const e=y.c(21),{task:s,orgSlug:r,isLast:o,onNavigate:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("span",{"aria-hidden":"true",className:"absolute top-0 left-4 h-1/2 w-3 rounded-bl-lg border-b border-l border-sidebar-border"}),e[0]=a):a=e[0];let l;e[1]!==o?(l=!o&&n.jsx("span",{"aria-hidden":"true",className:"absolute top-1/2 bottom-0 left-4 border-l border-sidebar-border"}),e[1]=o,e[2]=l):l=e[2];let c;e[3]!==r||e[4]!==s?(c=On(r,s),e[3]=r,e[4]=s,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==c?(d={org:r,taskKey:c},e[6]=r,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==i||e[10]!==s.status?(u=()=>{F("sidebar_attention_task_clicked",{status:s.status}),i?.()},e[9]=i,e[10]=s.status,e[11]=u):u=e[11];let m;e[12]!==s.title?(m=n.jsx("span",{className:"truncate",children:s.title}),e[12]=s.title,e[13]=m):m=e[13];let f;e[14]!==d||e[15]!==u||e[16]!==m?(f=n.jsx(Rt,{to:"/$org/tasks/{-$taskKey}",params:d,onClick:u,className:"flex h-8 items-center rounded-lg pr-2 pl-9 text-sm text-sidebar-foreground/70 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:m}),e[14]=d,e[15]=u,e[16]=m,e[17]=f):f=e[17];let p;return e[18]!==l||e[19]!==f?(p=n.jsxs("li",{className:"relative",children:[a,l,f]}),e[18]=l,e[19]=f,e[20]=p):p=e[20],p}function Ai(t){const e=y.c(35),{onNavigate:s}=t,r=T(),o=le(),{org:i,locator:a}=E(),l=At(),{projects:c}=Se(),d=He(),u=pt(),{data:m}=Y.useSession();let f;e[0]!==a||e[1]!==l?(f=Mn(a,l),e[0]=a,e[1]=l,e[2]=f):f=e[2];const p=!o&&!d;let g;e[3]!==f||e[4]!==p?(g={...f,enabled:p},e[3]=f,e[4]=p,e[5]=g):g=e[5];const{data:h}=st(g);if(d||c.length===0)return null;let b,x,j,v,S,k;if(e[6]!==o||e[7]!==h?.items||e[8]!==u||e[9]!==s||e[10]!==i||e[11]!==c||e[12]!==d||e[13]!==m?.user?.id||e[14]!==r){const $=Ti(zn(c),h?.items??[],m?.user?.id),w=o&&"pt-3";e[21]!==w?(v=z("flex flex-col gap-1",w),e[21]=w,e[22]=v):v=e[22],S=Z.projects,e[23]!==o||e[24]!==r?(k=!o&&n.jsx("p",{className:"px-2 pt-5 pb-0.5 text-xs font-medium text-muted-foreground/60",children:r("sidebar.projects.heading")}),e[23]=o,e[24]=r,e[25]=k):k=e[25],b=L,x="gap-1",j=c.map(C=>{const P=$.get(C.id)??[];return n.jsx(ue,{icon:n.jsx(ft,{icon:C.icon,name:C.title}),label:C.title,isActive:C.id===d,onSelect:()=>{F("sidebar_project_clicked"),u(C.id,{panel:_s(C.metadata?.ui?.layout)}),s?.()},children:!o&&P.length>0&&n.jsx("ul",{className:"flex flex-col",children:P.map((O,ne)=>n.jsx(zi,{task:O,orgSlug:i.slug,isLast:ne===P.length-1,onNavigate:s},O.id))})},C.id)}),e[6]=o,e[7]=h?.items,e[8]=u,e[9]=s,e[10]=i,e[11]=c,e[12]=d,e[13]=m?.user?.id,e[14]=r,e[15]=b,e[16]=x,e[17]=j,e[18]=v,e[19]=S,e[20]=k}else b=e[15],x=e[16],j=e[17],v=e[18],S=e[19],k=e[20];let N;e[26]!==b||e[27]!==x||e[28]!==j?(N=n.jsx(b,{className:x,children:j}),e[26]=b,e[27]=x,e[28]=j,e[29]=N):N=e[29];let _;return e[30]!==v||e[31]!==S||e[32]!==k||e[33]!==N?(_=n.jsxs("div",{className:v,"data-tour":S,children:[k,N]}),e[30]=v,e[31]=S,e[32]=k,e[33]=N,e[34]=_):_=e[34],_}function Oi(){const t=y.c(8),e=T(),{capabilities:s,isPrivileged:r,loading:o,error:i}=ws(),a=Sn().length,l=$s();let c;return t[0]!==s||t[1]!==i||t[2]!==r||t[3]!==a||t[4]!==o||t[5]!==e||t[6]!==l?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:n.jsx(mo,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:n.jsx(gn,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:e("settings.nav.billing"),icon:n.jsx(ro,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:n.jsx(qt,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:n.jsx(Ht,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"repositories",label:e("settings.nav.repositories"),icon:n.jsx(ao,{size:14}),to:"/$org/settings/repositories",requires:"file-configs:manage"},{key:"connections",label:e("settings.nav.connections"),icon:n.jsx(fn,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:n.jsx(et,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:n.jsx(fo,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:n.jsx(uo,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:n.jsx(pn,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:n.jsx(et,{size:14}),to:"/$org/settings/members",group:"members",badge:a}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:n.jsx(co,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:n.jsx(lo,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"store",label:e("settings.nav.store"),icon:n.jsx(xn,{size:14}),to:"/$org/settings/store",requires:"registry:manage"},{key:"sso",label:e("settings.nav.security"),icon:n.jsx(nt,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(u=>({...u,items:u.items.flatMap(m=>{if(m.group){const[f]=l[m.group];return f?[{...m,to:f.to}]:Cs(m.group)?[]:[m]}return o||i?[m]:m.privilegedOnly?r?[m]:[]:m.requires?r||s[m.requires]?[m]:[]:[m]})})).filter(Ri),t[0]=s,t[1]=i,t[2]=r,t[3]=a,t[4]=o,t[5]=e,t[6]=l,t[7]=c):c=t[7],c}function Ri(t){return t.items.length>0}function ls(){const t=y.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=Is(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={select:Di},t[1]=r):r=t[1];const o=Ps(r);let i;if(t[2]!==s||t[3]!==o){const c=d=>{const u=d.replace("$org",s);return o===u||o.startsWith(`${u}/`)};i=d=>[d.to,...d.group?Ts(d.group):[]].some(c),t[2]=s,t[3]=o,t[4]=i}else i=t[4];const a=i;let l;return t[5]!==a||t[6]!==s?(l={org:s,isActive:a},t[5]=a,t[6]=s,t[7]=l):l=t[7],l}function Di(t){return t.location.pathname}function Mi(){const t=y.c(9),{isActive:e}=ls();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0];const[r,o]=A.useState(s);let i;t[1]!==e||t[2]!==r?(i=u=>r[u.key]??(!u.collapsible||u.items.some(e)),t[1]=e,t[2]=r,t[3]=i):i=t[3];const a=i;let l;t[4]!==a?(l=u=>o(m=>({...m,[u.key]:!a(u)})),t[4]=a,t[5]=l):l=t[5];const c=l;let d;return t[6]!==a||t[7]!==c?(d={isOpen:a,toggle:c},t[6]=a,t[7]=c,t[8]=d):d=t[8],d}function Li(t){const e=y.c(21),{group:s,open:r,onToggle:o,className:i}=t;let a,l,c,d,u;if(e[0]!==i||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==o||e[4]!==r){u=Symbol.for("react.early_return_sentinel");e:{const g=z("text-xs font-medium text-muted-foreground/60 truncate",i);if(!s.collapsible){u=n.jsx("p",{className:g,children:s.label});break e}a="button",l=o,c=r,d=z("flex w-full items-center gap-1 rounded-md hover:text-muted-foreground",g)}e[0]=i,e[1]=s.collapsible,e[2]=s.label,e[3]=o,e[4]=r,e[5]=a,e[6]=l,e[7]=c,e[8]=d,e[9]=u}else a=e[5],l=e[6],c=e[7],d=e[8],u=e[9];if(u!==Symbol.for("react.early_return_sentinel"))return u;let m;e[10]!==r?(m=r?n.jsx(oo,{size:12}):n.jsx(io,{size:12}),e[10]=r,e[11]=m):m=e[11];let f;e[12]!==s.label?(f=n.jsx("span",{className:"truncate",children:s.label}),e[12]=s.label,e[13]=f):f=e[13];let p;return e[14]!==a||e[15]!==l||e[16]!==c||e[17]!==d||e[18]!==m||e[19]!==f?(p=n.jsxs("button",{type:a,onClick:l,"aria-expanded":c,className:d,children:[m,f]}),e[14]=a,e[15]=l,e[16]=c,e[17]=d,e[18]=m,e[19]=f,e[20]=p):p=e[20],p}function Ei(t){const e=y.c(5),{icon:s,badge:r}=t;let o;e[0]!==r?(o=r?n.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=r,e[1]=o):o=e[1];let i;return e[2]!==s||e[3]!==o?(i=n.jsxs("span",{className:"relative shrink-0",children:[s,o]}),e[2]=s,e[3]=o,e[4]=i):i=e[4],i}function cs(t){const e=y.c(22),{onNavigate:s}=t,r=T(),o=Oi(),{org:i,isActive:a}=ls(),{isOpen:l,toggle:c}=Mi();let d;if(e[0]!==o||e[1]!==a||e[2]!==l||e[3]!==s||e[4]!==i||e[5]!==c){let h;e[7]!==a||e[8]!==l||e[9]!==s||e[10]!==i||e[11]!==c?(h=(b,x)=>n.jsxs("div",{className:"flex flex-col",children:[b.label&&n.jsx(Li,{group:b,open:l(b),onToggle:()=>c(b),className:z("px-2 pt-1.5 pb-0.5",x>0&&"mt-3")}),l(b)&&n.jsx(L,{className:"gap-0.5",children:b.items.map(j=>n.jsx(ue,{icon:n.jsx(Ei,{icon:j.icon,badge:j.badge}),label:j.label,isActive:a(j),link:{to:j.to,params:{org:i}},className:"gap-2.5",onSelect:()=>{F("settings_nav_clicked",{section_key:j.key,group_key:b.key}),s?.()}},j.key))})]},b.key),e[7]=a,e[8]=l,e[9]=s,e[10]=i,e[11]=c,e[12]=h):h=e[12],d=o.map(h),e[0]=o,e[1]=a,e[2]=l,e[3]=s,e[4]=i,e[5]=c,e[6]=d}else d=e[6];let u;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[13]=u):u=e[13];let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("span",{className:"shrink-0",children:n.jsx(Ze,{size:14})}),e[14]=m):m=e[14];let f;e[15]!==r?(f=r("settings.nav.signOut"),e[15]=r,e[16]=f):f=e[16];let p;e[17]!==f?(p=n.jsxs("div",{className:"mt-auto flex flex-col",children:[u,n.jsx(L,{className:"gap-0.5",children:n.jsx(ue,{icon:m,label:f,className:"gap-2.5",onSelect:Fi})})]}),e[17]=f,e[18]=p):p=e[18];let g;return e[19]!==d||e[20]!==p?(g=n.jsxs(n.Fragment,{children:[d,p]}),e[19]=d,e[20]=p,e[21]=g):g=e[21],g}function Fi(){F("signed_out",{source:"settings_sidebar"}),zt(),Y.signOut()}function ds(t){const e=y.c(8),{onNavigate:s}=t,r=T(),{org:o}=E();let i;e[0]!==r?(i=r("settings.nav.backToHome"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==o.slug?(a={to:"/$org/home",params:{org:o.slug}},e[2]=o.slug,e[3]=a):a=e[3];let l;return e[4]!==s||e[5]!==i||e[6]!==a?(l=n.jsx(rs,{label:i,link:a,onSelect:s}),e[4]=s,e[5]=i,e[6]=a,e[7]=l):l=e[7],l}function us(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"px-4 pb-1",children:n.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.371.4"]})}),t[0]=e):e=t[0],e}const qi="pt-1.5";function ms(t){const e=y.c(15),{header:s,back:r,body:o,footer:i,sheet:a}=t;let l;e[0]!==s?(l=s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"flex h-12 shrink-0 flex-row items-center gap-2 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:py-2",children:s}),n.jsx("div",{className:"mt-1.5 h-px shrink-0 bg-sidebar-border"})]}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==r?(c=r&&n.jsx("div",{className:"shrink-0 px-2",children:r}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==o?(d=n.jsx(Ls,{className:"gap-0 overflow-y-auto px-2 pt-2 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:o}),e[4]=o,e[5]=d):d=e[5];let u;e[6]!==i||e[7]!==l||e[8]!==c||e[9]!==d?(u=n.jsxs(n.Fragment,{children:[l,c,d,i]}),e[6]=i,e[7]=l,e[8]=c,e[9]=d,e[10]=u):u=e[10];const m=u;if(a){let p;return e[11]!==m?(p=n.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":Z.nav,children:m}),e[11]=m,e[12]=p):p=e[12],p}let f;return e[13]!==m?(f=n.jsx(Es,{className:qi,"data-tour":Z.nav,children:m}),e[13]=m,e[14]=f):f=e[14],f}function fs(t){const e=y.c(8),{onNavigate:s}=t,r=T(),o=He(),i=wo();if(!o)return null;let a;e[0]!==r?(a=r("sidebar.scope.allProjects"),e[0]=r,e[1]=a):a=e[1];let l;e[2]!==i||e[3]!==s?(l=()=>{i(),s?.()},e[2]=i,e[3]=s,e[4]=l):l=e[4];let c;return e[5]!==a||e[6]!==l?(c=n.jsx(rs,{label:a,onSelect:l}),e[5]=a,e[6]=l,e[7]=c):c=e[7],c}function ps(t){const e=y.c(2),{onNavigate:s}=t;let r;return e[0]!==s?(r=n.jsx(zs,{children:n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx(yi,{onNavigate:s}),n.jsx(_i,{onNavigate:s}),n.jsx(Si,{onNavigate:s}),n.jsx(Ai,{onNavigate:s})]})}),e[0]=s,e[1]=r):r=e[1],r}function Vi(){const t=y.c(3),e=We();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(ui,{}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(ms,{header:s,back:e?n.jsx(ds,{}):n.jsx(fs,{}),body:e?n.jsx(cs,{}):n.jsx(ps,{}),footer:e?n.jsx(us,{}):n.jsx(ni,{})}),t[1]=e,t[2]=r):r=t[2],r}function Bi(t){const e=y.c(13),{onClose:s}=t,r=We();let o;e[0]!==s?(o=n.jsx(mi,{onClose:s}),e[0]=s,e[1]=o):o=e[1];let i,a;e[2]!==r||e[3]!==s?(i=r?n.jsx(ds,{onNavigate:s}):n.jsx(fs,{onNavigate:s}),a=r?n.jsx(cs,{onNavigate:s}):n.jsx(ps,{onNavigate:s}),e[2]=r,e[3]=s,e[4]=i,e[5]=a):(i=e[4],a=e[5]);let l;e[6]!==r?(l=r?n.jsx(us,{}):n.jsx(oi,{}),e[6]=r,e[7]=l):l=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==a||e[11]!==l?(c=n.jsx(ms,{sheet:!0,header:o,back:i,body:a,footer:l}),e[8]=o,e[9]=i,e[10]=a,e[11]=l,e[12]=c):c=e[12],c}const Ui=new Set(["completed","failed","requires_action"]);function Hi(t){const e=y.c(5),[s]=Tt();let r;e[0]!==s?(r=i=>{s.enableSounds&&Ui.has(i.data.status)&&po(xo.dataUri).catch(Ki)},e[0]=s,e[1]=r):r=e[1];let o;e[2]!==t||e[3]!==r?(o={orgSlug:t,onTaskStatus:r},e[2]=t,e[3]=r,e[4]=o):o=e[4],go(o)}function Ki(t){console.warn("[status-sounds] playback failed:",t)}const Wi=2e3,Gi=4e4;function Qi(t){return t==="success"||t==="updated"}function Ji(t){const e=y.c(15);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const r=As(s),o=Ot();let i;e[1]!==r.checkout?(i=Qi(r.checkout),e[1]=r.checkout,e[2]=i):i=e[2];const a=i,[l]=A.useState(Xi);let c;e[3]!==t?(c=Ee.checkoutReturnPoll(t),e[3]=t,e[4]=c):c=e[4];let d;e[5]!==l?(d=()=>Date.now()<l?Wi:!1,e[5]=l,e[6]=d):d=e[6];let u;e[7]!==t||e[8]!==o?(u=async()=>(await o.invalidateQueries({queryKey:Ee.aiPlanEntitlements(t)}),Date.now()),e[7]=t,e[8]=o,e[9]=u):u=e[9];let m;e[10]!==a||e[11]!==c||e[12]!==d||e[13]!==u?(m={queryKey:c,enabled:a,gcTime:0,staleTime:0,refetchInterval:d,queryFn:u},e[10]=a,e[11]=c,e[12]=d,e[13]=u,e[14]=m):m=e[14],st(m)}function Xi(){return Date.now()+Gi}function cl(){const t=y.c(5),e=We(),{org:s}=E();Hi(s.slug),Ji(s.id);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(_o,{}),t[0]=r):r=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Je.Sidebar,{renderMobile:Yi,children:n.jsx(Vi,{})}),t[1]=o):o=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Je.Content,{children:n.jsx(Os,{})}),t[2]=i):i=t[2];let a;return t[3]!==e?(a=n.jsxs(Je,{expandedSidebar:e,notice:r,children:[o,i]}),t[3]=e,t[4]=a):a=t[4],a}function Yi(t){const{onClose:e}=t;return n.jsx(Bi,{onClose:e})}export{cl as default};
1
+ import{c as y,b as T,j as n,I as It,r as A,J as xs,M as E,l as z,B as Le,F as gs,R as we,U as Xe,o as F,X as Pt,a as Y,d as $e,v as Tt,t as re,Y as hs,Z as zt,_ as At,n as Ot,e as bs,K as Ee,w as js,$ as vs,m as st,a0 as ys,s as Ss,L as Rt,a1 as M,C as ce,D as nt,a2 as ks,a3 as jt,a4 as Ns,a5 as _s,a6 as ws,a7 as $s,a8 as Cs,f as Is,k as Ps,a9 as Ts,E as zs,u as As,O as Os}from"./index-Cjhl57C5.js";import{u as Ce,S as Rs,a as Ds,b as Ms,c as ae,d as L,e as se,f as Ye,g as Ls,h as Es}from"./sidebar-CPIvGktg.js";import{S as Fs,a as qs,b as Vs}from"./sheet-DvqFDAlT.js";import{u as ot}from"./use-mobile-C5SrWG9H.js";import{i as it,a as Bs}from"./Printer-Dn2De3ak.js";import{P as Ne}from"./index-CZFOUXi8.js";import{T as rt,I as Us}from"./toolbar-icon-button-BehOLAeE.js";import{u as Hs,i as Dt}from"./use-org-notice-BALWnbFe.js";import{u as Se,a as He,b as Mt}from"./use-project-scope-BfeOcOX-.js";import{u as Ks}from"./thread-route-CnHTxNkK.js";import{L as Z}from"./anchors-yqDzZN4K.js";import{P as at,a as Ke,b as lt}from"./popover-Bn0xXLy8.js";import{D as Lt,a as Et,b as Ft,c as Ws}from"./drawer-BleKwXKQ.js";import{A as Fe}from"./avatar-CR9KEb-s.js";import{T as ct,a as dt,b as Gs,c as ut}from"./tooltip-BDUrOxgN.js";import{a as Qs}from"./Copy01-l6PfB431.js";import{n as Js}from"./Download01-_eUxcgg1.js";import{i as Xs}from"./Globe01-D9zr3JIX.js";import{n as qt}from"./LinkExternal01--55N_6ts.js";import{g as Ze,e as Ys}from"./TrendUp01-uTlAwt0S.js";import{i as Vt}from"./Monitor01-BoIweS2p.js";import{n as Zs,a as en}from"./Sun-CEaGM44s.js";import{a as Bt}from"./Settings02-BLcAotUO.js";import{i as tn}from"./Shield01-C_5dC1mR.js";import{t as sn,a as nn,i as on,b as rn,c as Ut,s as mt,d as an,A as ln,n as Ht,e as Kt,f as cn,g as dn,h as un,j as mn,k as fn,l as pn,m as xn}from"./agent-icon-Cyx7Smko.js";import{b as et,t as gn}from"./Users03-BaYGM99c.js";import{u as hn}from"./use-deployment-admin-Buoxj9IO.js";import{u as bn}from"./use-is-desktop-app-BNujXJc_.js";import{i as jn,a as vt,D as vn}from"./download-app-dialog-DQE0snIy.js";import{I as yn,u as Sn}from"./use-join-requests-aG0T3ECI.js";import{u as kn}from"./use-deco-credits-D4THYOkS.js";import{u as Nn,a as Wt}from"./use-entitlements-BP7WwVM_.js";import{u as _n,P as wn}from"./plan-ladder-Cqfgwdfc.js";import{u as $n}from"./use-organization-settings-pqtCEzuj.js";import{S as Cn}from"./scroll-area-YQLTU6PQ.js";import{u as In}from"./useInfiniteQuery-C-lwb5Ji.js";import{n as Pn}from"./hooks-D5z7CgCt.js";import{t as Gt,S as Tn,b as zn,p as An,a as On,i as Rn,c as Dn,d as Mn}from"./task-route-CPm3yGLT.js";import{g as Ln}from"./get-initials-D-f_fDFw.js";import{a as En}from"./format-time-BtXRrtv4.js";import{i as qe}from"./Check-Dnz3uW0f.js";import{i as Fn}from"./ChevronSelectorVertical-B64gqtde.js";import{s as qn}from"./Plus-C5azC59K.js";import{C as yt,a as Me,b as Ve,c as Vn,d as Bn,e as Un}from"./command-CtFXOSiX.js";import{P as ft}from"./project-icon-CiuTzDLi.js";import{C as Hn}from"./create-organization-dialog-CYwIBo_O.js";import{s as Kn}from"./XClose-Bw0VS-dj.js";import{u as Wn}from"./use-virtual-mcp-BvrPyGzX.js";import{i as Gn}from"./Share07-BypmcbEF.js";import{i as Qn}from"./ArrowLeft-BKbGYh2B.js";import{e as Jn,r as Qt,u as Xn,s as Yn,p as Zn,P as eo}from"./use-project-native-view-presence-DnirX6kM.js";import{u as Jt}from"./optimistic-project-sidebar-views-IR0sppyV.js";import{u as pt}from"./use-navigate-to-agent-DOYg6fyU.js";import{c as to}from"./SwitchHorizontal01-l3o5r_PJ.js";import{a as so}from"./Image01-7_HSDHV3.js";import{u as no}from"./use-panel-navigate-bhAOxlzp.js";import{t as oo}from"./ChevronUp-XOZg-HiO.js";import{i as io}from"./ChevronRight-DK_MoZ-7.js";import{i as ro}from"./CreditCard01-DQsLDZWx.js";import{i as ao}from"./GitBranch01-CRUhFeKk.js";import{i as lo}from"./HardDrive-7_ZjnLMv.js";import{i as co}from"./Key01-ti2CpCiW.js";import{t as uo}from"./Stars01-DTStBsXP.js";import{s as mo}from"./User01-BA1LEBvQ.js";import{i as fo}from"./Zap-TxetSnv7.js";import{p as po,q as xo}from"./question-004-sINsf4GQ.js";import{u as go}from"./use-decopilot-events-DlUI-60k.js";import"./X-Dh_K-VDi.js";import"./github-repo-BknN0SVI.js";import"./index-C-9h82SA.js";import"./AlertCircle-Ddrj7VUD.js";import"./Tool01-C0-Xqkxp.js";import"./ArrowUp-Dhew3Evs.js";import"./Tool02-CE2Fqpba.js";import"./ArrowRight-6hYTENh_.js";import"./ZoomOut-CJKT31Kx.js";import"./CheckCircle-DQbrJHsr.js";import"./DotsVertical-Dyzdr42E.js";import"./UserSquare-D-v_LgOa.js";import"./Database01-vUZciuwF.js";import"./MessageCircle01-DELRsE6A.js";import"./Eye-B7hZLXRZ.js";import"./File02-D1W0NjQG.js";import"./Link01-DYWtgbsz.js";import"./Package-CSgBbMFc.js";import"./Palette-CaHW8y9T.js";import"./Play-BolLrTAn.js";import"./SearchLg-BZUR3n9c.js";import"./SearchMd-Ms_xvSfF.js";import"./Trash01-DPQmLNZV.js";import"./Upload01-D-20AdeD.js";import"./Users01-BpRvBK8_.js";import"./XCircle-BhDUy79p.js";import"./dialog-SKkzdrcZ.js";import"./form-H9AoFazU.js";import"./label-Bk7iLZH7.js";import"./select-C5Qbx8Kw.js";import"./textarea-DXDx4Cy0.js";import"./use-org-auth-client-C16MEGGe.js";import"./use-organization-roles-Cog-K9KN.js";import"./use-ai-providers-QvFz5SFX.js";import"./schema-BTHH8GSh.js";import"./task-board-DpuhnKzF.js";import"./infiniteQueryObserver-CTAqrRzL.js";import"./use-mcp-client-Bf0VpOBw.js";import"./auth-5BCk_I76.js";import"./backoff-8mStPHYB.js";import"./dropdown-menu-DRuEZVW9.js";import"./github-icon-TtZ8EUXE.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-CdCU_XIc.js";import"./alert-dialog-DfGZ77rh.js";import"./input-CImpk8th.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-CyU7Mcil.js";import"./site-slug-uya6Wp4-.js";import"./thread-intent-Cdmdi4Qs.js";import"./slugify-CEUa2lfQ.js";function le(){const{state:t,isMobile:e}=Ce();return t==="collapsed"&&!e}function ho(t){const e=y.c(11),{onPointerDown:s,onDoubleClick:r}=t,o=T(),{isMobile:i}=Ce(),a=le();if(i||a)return null;let l;e[0]!==o?(l=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=l):l=e[1];let c;e[2]!==o?(c=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=c):c=e[3];let d,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(d={left:"var(--sidebar-width)"},u=n.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]=d,e[5]=u):(d=e[4],u=e[5]);let m;return e[6]!==r||e[7]!==s||e[8]!==l||e[9]!==c?(m=n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":l,title:c,onPointerDown:s,onDoubleClick:r,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:d,children:u}),e[6]=r,e[7]=s,e[8]=l,e[9]=c,e[10]=m):m=e[10],m}const xt=240,bo=400,jo="sidebar.width";function _e(t){return Math.max(xt,Math.min(bo,t))}function vo(){const t=y.c(11),[e,s]=It(jo,yo),r=A.useRef(null);let o;t[0]!==s||t[1]!==e?(o=u=>{u.preventDefault();const m=u.clientX,f=_e(e),p=r.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),g=p?Array.from(p.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of g)x.style.transition="none";const h=x=>{const j=_e(f+(x.clientX-m));p?.style.setProperty("--sidebar-width",`${j}px`)},b=x=>{const j=_e(f+(x.clientX-m));s(j);for(const v of g)v.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",b),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",b)},t[0]=s,t[1]=e,t[2]=o):o=t[2];const i=o;let a;t[3]!==s?(a=()=>{s(xt)},t[3]=s,t[4]=a):a=t[4];const l=a;let c;t[5]!==e?(c=_e(e),t[5]=e,t[6]=c):c=t[6];let d;return t[7]!==i||t[8]!==l||t[9]!==c?(d={width:c,wrapperRef:r,onStartResize:i,resetWidth:l},t[7]=i,t[8]=l,t[9]=c,t[10]=d):d=t[10],d}function yo(t){return typeof t=="number"?_e(t):xt}const Xt=A.createContext(null);function Yt(){const t=A.use(Xt);if(!t)throw new Error("Layout regions require a Layout");return t}function So({children:t,notice:e,expandedSidebar:s=!1}){const r=ot(),[o,i]=It(xs.sidebarOpen(),!0),a=vo();return n.jsx(Xt,{value:{isMobile:r,resize:a},children:n.jsx(Rs,{open:s||o,onOpenChange:i,children:n.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,n.jsx(Ds,{ref:a.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${a.width}px`,"--sidebar-width-icon":"3.125rem"},children:t})]})})})}function ko(t){const e=y.c(22),{children:s,renderMobile:r}=t,o=T(),{isMobile:i,resize:a}=Yt(),{openMobile:l,setOpenMobile:c}=Ce();if(!i){let h;e[0]!==a.onStartResize||e[1]!==a.resetWidth?(h=n.jsx(ho,{onPointerDown:a.onStartResize,onDoubleClick:a.resetWidth}),e[0]=a.onStartResize,e[1]=a.resetWidth,e[2]=h):h=e[2];let b;return e[3]!==s||e[4]!==h?(b=n.jsxs(n.Fragment,{children:[s,h]}),e[3]=s,e[4]=h,e[5]=b):b=e[5],b}let d;e[6]!==o?(d=o("layouts.shellControls.navigationTitle"),e[6]=o,e[7]=d):d=e[7];let u;e[8]!==d?(u=n.jsx(Fs,{className:"sr-only",children:d}),e[8]=d,e[9]=u):u=e[9];let m;e[10]!==c?(m=()=>c(!1),e[10]=c,e[11]=m):m=e[11];let f;e[12]!==r||e[13]!==m?(f=r({onClose:m}),e[12]=r,e[13]=m,e[14]=f):f=e[14];let p;e[15]!==u||e[16]!==f?(p=n.jsxs(qs,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[u,f]}),e[15]=u,e[16]=f,e[17]=p):p=e[17];let g;return e[18]!==l||e[19]!==c||e[20]!==p?(g=n.jsx(Vs,{open:l,onOpenChange:c,children:p}),e[18]=l,e[19]=c,e[20]=p,e[21]=g):g=e[21],g}function No(t){const e=y.c(10),{children:s}=t,r=T(),{isMobile:o}=Yt(),{toggleSidebar:i}=Ce();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"transparent",containerType:"inline-size"},e[0]=a):a=e[0];let l;e[1]!==o||e[2]!==r||e[3]!==i?(l=o&&n.jsxs(Ne.Topbar,{className:"px-1 bg-sidebar",children:[n.jsx(Ne.Topbar.Left,{className:"shrink-0",children:n.jsx(rt,{onClick:i,"aria-label":r("layouts.shellControls.toggleSidebar"),children:n.jsx(it,{size:16})})}),n.jsx(Ne.Topbar.Center,{className:"justify-start",children:n.jsx(Ne.Topbar.Center.Target,{})})]}),e[1]=o,e[2]=r,e[3]=i,e[4]=l):l=e[4];let c;e[5]!==s?(c=n.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s}),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==l||e[8]!==c?(d=n.jsx(Ms,{className:"flex flex-col min-h-0",style:a,children:n.jsxs(Ne,{variant:"plain",className:"bg-sidebar",children:[l,c]})}),e[7]=l,e[8]=c,e[9]=d):d=e[9],d}const Je=Object.assign(So,{Sidebar:ko,Content:No});function _o(){const t=y.c(19),{org:e}=E(),{data:s}=Hs(e.slug);if(!s)return null;const r=s.severity==="block",o=r?"border-destructive/25 bg-destructive/5 text-destructive":"border-warning/40 bg-warning/10 text-foreground";let i;t[0]!==o?(i=z("flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b px-4 py-2 text-sm",o),t[0]=o,t[1]=i):i=t[1];const a=r?void 0:"text-warning";let l;t[2]!==a?(l=z("size-4 shrink-0",a),t[2]=a,t[3]=l):l=t[3];let c;t[4]!==l?(c=n.jsx(gs,{className:l}),t[4]=l,t[5]=c):c=t[5];let d;t[6]!==s.title?(d=n.jsx("span",{className:"font-medium",children:s.title}),t[6]=s.title,t[7]=d):d=t[7];let u;t[8]!==s.message?(u=n.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:s.message}),t[8]=s.message,t[9]=u):u=t[9];let m;t[10]!==s.ctaLabel||t[11]!==s.ctaUrl?(m=s.ctaUrl&&s.ctaLabel?n.jsx(Le,{size:"sm",variant:"outline",asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,t[10]=s.ctaLabel,t[11]=s.ctaUrl,t[12]=m):m=t[12];let f;return t[13]!==i||t[14]!==c||t[15]!==d||t[16]!==u||t[17]!==m?(f=n.jsxs("div",{role:"alert",className:i,children:[c,d,u,m]}),t[13]=i,t[14]=c,t[15]=d,t[16]=u,t[17]=m,t[18]=f):f=t[18],f}function wo(){const t=y.c(4),{setScope:e}=Se(),s=Ks(),r=we();let o;return t[0]!==r||t[1]!==s||t[2]!==e?(o=()=>{const i=s!==void 0?"route_resolves_scope":Xe(r,null)?null:"route_needs_scope";F("scope_cleared",{relocated:i!==null,reason:i}),e(null)},t[0]=r,t[1]=s,t[2]=e,t[3]=o):o=t[3],o}function We(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings",shouldThrow:!1},t[0]=e):e=t[0],!!Pt(e)}const Be="size-4 shrink-0";function gt(t){const e=y.c(5),{children:s,className:r}=t;let o;e[0]!==r?(o=z("flex w-4 shrink-0 items-center justify-center",r),e[0]=r,e[1]=o):o=e[1];let i;return e[2]!==s||e[3]!==o?(i=n.jsx("span",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=i):i=e[4],i}function ye(t){const e=y.c(26),{item:s,onClose:r}=t;let o;e[0]!==s.className?(o=z("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",s.className),e[0]=s.className,e[1]=o):o=e[1];const i=o;if(s.href){const u=s.external?"_blank":void 0,m=s.external?"noopener noreferrer":void 0;let f;e[2]!==s.icon?(f=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[2]=s.icon,e[3]=f):f=e[3];let p;e[4]!==s.label?(p=n.jsx("span",{className:"flex-1",children:s.label}),e[4]=s.label,e[5]=p):p=e[5];let g;return e[6]!==i||e[7]!==s.href||e[8]!==r||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==p?(g=n.jsxs("a",{href:s.href,target:u,rel:m,className:i,onClick:r,children:[f,p]}),e[6]=i,e[7]=s.href,e[8]=r,e[9]=u,e[10]=m,e[11]=f,e[12]=p,e[13]=g):g=e[13],g}let a;e[14]!==s||e[15]!==r?(a=()=>{s.onClick?.(),r()},e[14]=s,e[15]=r,e[16]=a):a=e[16];let l;e[17]!==s.icon?(l=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[17]=s.icon,e[18]=l):l=e[18];let c;e[19]!==s.label?(c=n.jsx("span",{className:"flex-1",children:s.label}),e[19]=s.label,e[20]=c):c=e[20];let d;return e[21]!==i||e[22]!==a||e[23]!==l||e[24]!==c?(d=n.jsxs("button",{type:"button",onClick:a,className:i,children:[l,c]}),e[21]=i,e[22]=a,e[23]=l,e[24]=c,e[25]=d):d=e[25],d}function $o(){const t=y.c(4),e=T();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let r;return t[2]!==s?(r=n.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:s}),t[2]=s,t[3]=r):r=t[3],r}function St(t){const e=y.c(38),{user:s,userImage:r,isImpersonating:o,isMobile:i}=t,a=T(),l=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==l?(c=z("flex items-center gap-3 px-4",l),e[0]=l,e[1]=c):c=e[1];const d=s?.name??"U";let u;e[2]!==d||e[3]!==r?(u=n.jsx(Fe,{url:r,fallback:d,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=d,e[3]=r,e[4]=u):u=e[4];let m;e[5]!==a||e[6]!==s?.name?(m=s?.name??a("common.accountPopover.defaultUserName"),e[5]=a,e[6]=s?.name,e[7]=m):m=e[7];let f;e[8]!==m?(f=n.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=f):f=e[9];let p;e[10]!==o?(p=o&&n.jsx($o,{}),e[10]=o,e[11]=p):p=e[11];let g;e[12]!==f||e[13]!==p?(g=n.jsxs("div",{className:"flex items-center gap-2",children:[f,p]}),e[12]=f,e[13]=p,e[14]=g):g=e[14];const h=s?.email;let b;e[15]!==h?(b=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[15]=h,e[16]=b):b=e[16];let x;e[17]!==b||e[18]!==g?(x=n.jsxs("div",{className:"flex-1 min-w-0",children:[g,b]}),e[17]=b,e[18]=g,e[19]=x):x=e[19];let j;e[20]!==a||e[21]!==s?(j=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{re.success(a("common.accountPopover.userIdCopied"))})},e[20]=a,e[21]=s,e[22]=j):j=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Qs,{size:14}),e[23]=v):v=e[23];let S;e[24]!==j?(S=n.jsx(ct,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[24]=j,e[25]=S):S=e[25];let k;e[26]!==a?(k=a("common.accountPopover.copyUserId"),e[26]=a,e[27]=k):k=e[27];let N;e[28]!==k?(N=n.jsx(dt,{side:"right",children:n.jsx("p",{className:"text-xs",children:k})}),e[28]=k,e[29]=N):N=e[29];let _;e[30]!==S||e[31]!==N?(_=n.jsx(Gs,{delayDuration:300,children:n.jsxs(ut,{children:[S,N]})}),e[30]=S,e[31]=N,e[32]=_):_=e[32];let $;return e[33]!==x||e[34]!==_||e[35]!==c||e[36]!==u?($=n.jsxs("div",{className:c,children:[u,x,_]}),e[33]=x,e[34]=_,e[35]=c,e[36]=u,e[37]=$):$=e[37],$}function kt(t){const e=y.c(35),{themeOptions:s,preferences:r,setPreferences:o,isMobile:i}=t,a=T(),l=i?"size-8":"size-7",c=i?"px-3 py-3":"px-2 py-1.5";let d;e[0]!==c?(d=z("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=d):d=e[1];let u;if(e[2]!==l||e[3]!==r.theme||e[4]!==o||e[5]!==s){let k;e[7]!==l||e[8]!==r.theme||e[9]!==o?(k=N=>{const{value:_,icon:$,label:w}=N;return n.jsx("button",{type:"button","aria-label":w,onClick:()=>o(C=>({...C,theme:_})),className:z(l,"rounded-md flex items-center justify-center transition-colors",r.theme===_?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:$},_)},e[7]=l,e[8]=r.theme,e[9]=o,e[10]=k):k=e[10],u=s.map(k),e[2]=l,e[3]=r.theme,e[4]=o,e[5]=s,e[6]=u}else u=e[6];let m;e[11]!==u?(m=n.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=m):m=e[12];let f;e[13]!==r.enableSounds||e[14]!==a?(f=r.enableSounds?a("common.accountPopover.disableSounds"):a("common.accountPopover.enableSounds"),e[13]=r.enableSounds,e[14]=a,e[15]=f):f=e[15];let p;e[16]!==o?(p=()=>o(Co),e[16]=o,e[17]=p):p=e[17];const g=r.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let h;e[18]!==l||e[19]!==g?(h=z(l,"rounded-md flex items-center justify-center transition-colors",g),e[18]=l,e[19]=g,e[20]=h):h=e[20];let b;e[21]!==r.enableSounds?(b=r.enableSounds?n.jsx(nn,{size:14}):n.jsx(on,{size:14}),e[21]=r.enableSounds,e[22]=b):b=e[22];let x;e[23]!==f||e[24]!==p||e[25]!==h||e[26]!==b?(x=n.jsx("button",{type:"button","aria-label":f,onClick:p,className:h,children:b}),e[23]=f,e[24]=p,e[25]=h,e[26]=b,e[27]=x):x=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.372.0"]}),e[28]=j):j=e[28];let v;e[29]!==x?(v=n.jsxs("div",{className:"flex items-center gap-2",children:[x,j]}),e[29]=x,e[30]=v):v=e[30];let S;return e[31]!==v||e[32]!==d||e[33]!==m?(S=n.jsxs("div",{className:d,children:[m,v]}),e[31]=v,e[32]=d,e[33]=m,e[34]=S):S=e[34],S}function Co(t){return{...t,enableSounds:!t.enableSounds}}function Nt(t){const e=y.c(54),{user:s,userImage:r,menuItems:o,signOutItem:i,stopImpersonatingItem:a,isImpersonating:l,themeOptions:c,preferences:d,setPreferences:u,close:m,isMobile:f}=t;if(f){let S;e[0]!==l||e[1]!==s||e[2]!==r?(S=n.jsx(St,{user:s,userImage:r,isImpersonating:l,isMobile:!0}),e[0]=l,e[1]=s,e[2]=r,e[3]=S):S=e[3];let k;if(e[4]!==m||e[5]!==o){let P;e[7]!==m?(P=O=>n.jsx(ye,{item:O,onClose:m},O.key),e[7]=m,e[8]=P):P=e[8],k=o.map(P),e[4]=m,e[5]=o,e[6]=k}else k=e[6];let N;e[9]!==m||e[10]!==a?(N=a&&n.jsx(ye,{item:a,onClose:m}),e[9]=m,e[10]=a,e[11]=N):N=e[11];let _;e[12]!==m||e[13]!==i?(_=n.jsx(ye,{item:i,onClose:m}),e[12]=m,e[13]=i,e[14]=_):_=e[14];let $;e[15]!==k||e[16]!==N||e[17]!==_?($=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[k,N,_]})}),e[15]=k,e[16]=N,e[17]=_,e[18]=$):$=e[18];let w;e[19]!==d||e[20]!==u||e[21]!==c?(w=n.jsx(kt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!0}),e[19]=d,e[20]=u,e[21]=c,e[22]=w):w=e[22];let C;return e[23]!==S||e[24]!==$||e[25]!==w?(C=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[S,$,w]}),e[23]=S,e[24]=$,e[25]=w,e[26]=C):C=e[26],C}let p;e[27]!==l||e[28]!==s||e[29]!==r?(p=n.jsx(St,{user:s,userImage:r,isImpersonating:l,isMobile:!1}),e[27]=l,e[28]=s,e[29]=r,e[30]=p):p=e[30];let g;if(e[31]!==m||e[32]!==o){let S;e[34]!==m?(S=k=>n.jsx(ye,{item:k,onClose:m},k.key),e[34]=m,e[35]=S):S=e[35],g=o.map(S),e[31]=m,e[32]=o,e[33]=g}else g=e[33];let h;e[36]!==m||e[37]!==a?(h=a&&n.jsx(ye,{item:a,onClose:m}),e[36]=m,e[37]=a,e[38]=h):h=e[38];let b;e[39]!==m||e[40]!==i?(b=n.jsx(ye,{item:i,onClose:m}),e[39]=m,e[40]=i,e[41]=b):b=e[41];let x;e[42]!==g||e[43]!==h||e[44]!==b?(x=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[g,h,b]}),e[42]=g,e[43]=h,e[44]=b,e[45]=x):x=e[45];let j;e[46]!==d||e[47]!==u||e[48]!==c?(j=n.jsx(kt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!1}),e[46]=d,e[47]=u,e[48]=c,e[49]=j):j=e[49];let v;return e[50]!==p||e[51]!==x||e[52]!==j?(v=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[p,x,j]})}),e[50]=p,e[51]=x,e[52]=j,e[53]=v):v=e[53],v}function tt(){const t=y.c(107),e=T(),{data:s}=Y.useSession(),{org:r}=E(),o=$e();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const l=Pt(i)?.params.org,[c,d]=Tt(),u=ot(),{isAdmin:m}=hn(),f=bn(),[p,g]=A.useState(!1),[h,b]=A.useState(!1),x=s?.user,j=x?.image,v=!!s?.session?.impersonatedBy;let S;t[1]===Symbol.for("react.memo_cache_sentinel")?(S=()=>g(!1),t[1]=S):S=t[1];const k=S;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Bt,{size:16}),t[4]=_):_=t[4];let $;t[5]!==o||t[6]!==l?($=()=>{o({to:"/$org/settings/profile",params:{org:l??""}})},t[5]=o,t[6]=l,t[7]=$):$=t[7];let w;t[8]!==N||t[9]!==$?(w={key:"preferences",label:N,icon:_,onClick:$},t[8]=N,t[9]=$,t[10]=w):w=t[10];let C;t[11]!==r||t[12]!==o?(C=r?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(qt,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:r.slug}})}}]:[],t[11]=r,t[12]=o,t[13]=C):C=t[13];let P;t[14]!==f||t[15]!==e?(P=(jn()||vt())&&!f?[{key:"install-desktop-app",label:vt()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(Js,{size:16}),onClick:()=>b(!0)}]:[],t[14]=f,t[15]=e,t[16]=P):P=t[16];let O;t[17]!==e?(O=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=O):O=t[18];let ne;t[19]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(Bs,{size:16}),t[19]=ne):ne=t[19];let K;t[20]!==O?(K={key:"terms",label:O,icon:ne,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=O,t[21]=K):K=t[21];let W;t[22]!==e?(W=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=W):W=t[23];let oe;t[24]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(tn,{size:16}),t[24]=oe):oe=t[24];let q;t[25]!==W?(q={key:"privacy",label:W,icon:oe,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=W,t[26]=q):q=t[26];let G;t[27]!==e?(G=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=G):G=t[28];let V;t[29]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(hs,{className:"w-4 h-4"}),t[29]=V):V=t[29];let B;t[30]!==G?(B={key:"github",label:G,icon:V,href:"https://github.com/decocms/studio",external:!0},t[30]=G,t[31]=B):B=t[31];let Q;t[32]!==e?(Q=e("common.accountPopover.community"),t[32]=e,t[33]=Q):Q=t[33];let ee;t[34]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(et,{size:16}),t[34]=ee):ee=t[34];let J;t[35]!==Q?(J={key:"community",label:Q,icon:ee,href:"https://decocms.com/discord",external:!0},t[35]=Q,t[36]=J):J=t[36];let U;t[37]!==e?(U=e("common.accountPopover.homepage"),t[37]=e,t[38]=U):U=t[38];let me;t[39]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Xs,{size:16}),t[39]=me):me=t[39];let D;t[40]!==U?(D={key:"homepage",label:U,icon:me,href:"https://decocms.com",external:!0},t[40]=U,t[41]=D):D=t[41];let H;t[42]!==m||t[43]!==o||t[44]!==e?(H=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(sn,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=H):H=t[45];let ie;t[46]!==K||t[47]!==q||t[48]!==B||t[49]!==J||t[50]!==D||t[51]!==H||t[52]!==w||t[53]!==C||t[54]!==P?(ie=[w,...C,...P,K,q,B,J,D,...H],t[46]=K,t[47]=q,t[48]=B,t[49]=J,t[50]=D,t[51]=H,t[52]=w,t[53]=C,t[54]=P,t[55]=ie):ie=t[55];const ke=ie;let X;t[56]!==e?(X=e("common.accountPopover.signOut"),t[56]=e,t[57]=X):X=t[57];let te;t[58]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(Ze,{size:16}),t[58]=te):te=t[58];let I;t[59]!==X?(I={key:"logout",label:X,icon:te,onClick:Po},t[59]=X,t[60]=I):I=t[60];const R=I;let Ie;t[61]!==v||t[62]!==e?(Ie=v?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Ze,{size:16}),onClick:async()=>{const{error:bt}=await Y.admin.stopImpersonating();if(bt){re.error(bt.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=v,t[62]=e,t[63]=Ie):Ie=t[63];const Ge=Ie;let Pe;t[64]===Symbol.for("react.memo_cache_sentinel")?(Pe=n.jsx(Zs,{size:14}),t[64]=Pe):Pe=t[64];let fe;t[65]!==e?(fe=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=fe):fe=t[66];let pe;t[67]!==fe?(pe={value:"light",icon:Pe,label:fe},t[67]=fe,t[68]=pe):pe=t[68];let Te;t[69]===Symbol.for("react.memo_cache_sentinel")?(Te=n.jsx(en,{size:14}),t[69]=Te):Te=t[69];let xe;t[70]!==e?(xe=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=xe):xe=t[71];let ge;t[72]!==xe?(ge={value:"dark",icon:Te,label:xe},t[72]=xe,t[73]=ge):ge=t[73];let ze;t[74]===Symbol.for("react.memo_cache_sentinel")?(ze=n.jsx(Vt,{size:14}),t[74]=ze):ze=t[74];let he;t[75]!==e?(he=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=he):he=t[76];let be;t[77]!==he?(be={value:"system",icon:ze,label:he},t[77]=he,t[78]=be):be=t[78];let Ae;t[79]!==pe||t[80]!==ge||t[81]!==be?(Ae=[pe,ge,be],t[79]=pe,t[80]=ge,t[81]=be,t[82]=Ae):Ae=t[82];const Qe=Ae;let Oe;t[83]!==v||t[84]!==u||t[85]!==ke||t[86]!==c||t[87]!==d||t[88]!==R||t[89]!==Ge||t[90]!==Qe||t[91]!==x||t[92]!==j?(Oe={user:x,userImage:j,menuItems:ke,signOutItem:R,stopImpersonatingItem:Ge,isImpersonating:v,themeOptions:Qe,preferences:c,setPreferences:d,close:k,isMobile:u},t[83]=v,t[84]=u,t[85]=ke,t[86]=c,t[87]=d,t[88]=R,t[89]=Ge,t[90]=Qe,t[91]=x,t[92]=j,t[93]=Oe):Oe=t[93];const Re=Oe;let je;t[94]!==v||t[95]!==u||t[96]!==p||t[97]!==Re||t[98]!==e||t[99]!==x?.name||t[100]!==j?(je=u?n.jsxs(Lt,{open:p,onOpenChange:g,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>g(!0),className:z("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",v&&"border-2 border-dashed border-warning"),children:[n.jsx(Fe,{url:j,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Et,{className:"h-[80dvh] p-0",children:[n.jsx(Ft,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(Nt,{...Re})]})]}):n.jsxs(at,{open:p,onOpenChange:g,children:[n.jsx(Ke,{asChild:!0,children:n.jsxs(ae,{"data-tour":Z.account,tooltip:x?.name??e("common.accountPopover.defaultAccountLabel"),className:z("rounded-md",v&&"border-2 border-dashed border-warning"),children:[n.jsx(gt,{children:n.jsx(Fe,{url:j,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"size-[18px] shrink-0"})}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(lt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Io,children:n.jsx(Nt,{...Re})})]}),t[94]=v,t[95]=u,t[96]=p,t[97]=Re,t[98]=e,t[99]=x?.name,t[100]=j,t[101]=je):je=t[101];let ve;t[102]!==h?(ve=n.jsx(vn,{open:h,onOpenChange:b}),t[102]=h,t[103]=ve):ve=t[103];let De;return t[104]!==je||t[105]!==ve?(De=n.jsxs(n.Fragment,{children:[je,ve]}),t[104]=je,t[105]=ve,t[106]=De):De=t[106],De}function Io(t){return t.preventDefault()}function Po(){F("signed_out",{source:"account_popover"}),zt(),Y.signOut()}class To extends A.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function zo(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Ao(){const t=y.c(17),e=$e(),{org:s}=E(),{hasDecoKey:r,balanceDollars:o}=kn();if(!r)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let a;t[2]!==o?(a=z(o!=null&&zo(o)),t[2]=o,t[3]=a):a=t[3];let l;t[4]!==e||t[5]!==s.slug?(l=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[4]=e,t[5]=s.slug,t[6]=l):l=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(rn,{}),t[7]=c):c=t[7];let d;t[8]!==o?(d=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=d):d=t[9];let u;t[10]!==d?(u=n.jsx("span",{children:d}),t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==i||t[13]!==a||t[14]!==l||t[15]!==u?(m=n.jsx(L,{children:n.jsx(se,{children:n.jsxs(ae,{tooltip:i,className:a,onClick:l,children:[c,u]})})}),t[12]=i,t[13]=a,t[14]=l,t[15]=u,t[16]=m):m=t[16],m}const Oo={ok:"stroke-brand-purple",warn:"stroke-warning",exhausted:"stroke-destructive"},Ro={ok:"bg-brand-purple",warn:"bg-warning",exhausted:"bg-destructive"};function Do(){const t=y.c(40),e=T(),s=le(),r=$e(),{org:o}=E(),{data:i}=Wt();if(!i?.usage||!i.features.chat)return null;let a,l;if(t[0]!==i.usage.percent?(a=Math.round(i.usage.percent*100),l=Number.isFinite(a),t[0]=i.usage.percent,t[1]=a,t[2]=l):(a=t[1],l=t[2]),!l)return null;const c=Math.min(100,Math.max(0,a)),d=i.plan.name;let u;t[3]!==e?(u=e("settings.planUsage.aiUsage"),t[3]=e,t[4]=u):u=t[4];const m=`${d} · ${u} ${c}%`;let f;t[5]!==r||t[6]!==o.slug?(f=()=>r({to:"/$org/settings/ai-providers",params:{org:o.slug}}),t[5]=r,t[6]=o.slug,t[7]=f):f=t[7];const p=!s&&"-ml-px";let g;t[8]!==p?(g=z(p),t[8]=p,t[9]=g):g=t[9];let h;t[10]!==i.plan.id||t[11]!==i.usage.state||t[12]!==s||t[13]!==c?(h=s?n.jsx(Lo,{percent:c,state:i.usage.state}):n.jsx(Mo,{planId:i.plan.id}),t[10]=i.plan.id,t[11]=i.usage.state,t[12]=s,t[13]=c,t[14]=h):h=t[14];let b;t[15]!==g||t[16]!==h?(b=n.jsx(gt,{className:g,children:h}),t[15]=g,t[16]=h,t[17]=b):b=t[17];let x;t[18]!==i.plan.name?(x=n.jsx("span",{className:"truncate font-medium",children:i.plan.name}),t[18]=i.plan.name,t[19]=x):x=t[19];let j;t[20]!==c?(j=n.jsxs("span",{className:"tabular-nums text-xs text-muted-foreground",children:[c,"%"]}),t[20]=c,t[21]=j):j=t[21];let v;t[22]!==j||t[23]!==x?(v=n.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[x,j]}),t[22]=j,t[23]=x,t[24]=v):v=t[24];const S=Ro[i.usage.state];let k;t[25]!==S?(k=z("block h-full rounded-full",S),t[25]=S,t[26]=k):k=t[26];const N=`${c}%`;let _;t[27]!==N?(_={width:N},t[27]=N,t[28]=_):_=t[28];let $;t[29]!==k||t[30]!==_?($=n.jsx("span",{className:"block h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("span",{className:k,style:_})}),t[29]=k,t[30]=_,t[31]=$):$=t[31];let w;t[32]!==v||t[33]!==$?(w=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[v,$]}),t[32]=v,t[33]=$,t[34]=w):w=t[34];let C;return t[35]!==w||t[36]!==m||t[37]!==f||t[38]!==b?(C=n.jsx(L,{children:n.jsx(se,{children:n.jsxs(ae,{tooltip:m,className:"h-auto! rounded-lg border border-border bg-card px-2 py-2 [&_svg]:opacity-100!",onClick:f,children:[b,w]})})}),t[35]=w,t[36]=m,t[37]=f,t[38]=b,t[39]=C):C=t[39],C}function Mo(t){const e=y.c(6),{planId:s}=t,{data:r}=_n();let o;e[0]!==s||e[1]!==r?(o=r?.findIndex(l=>l.id===s)??-1,e[0]=s,e[1]=r,e[2]=o):o=e[2];const i=o;if(i<0){let l;return e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ut,{className:Be}),e[3]=l):l=e[3],l}let a;return e[4]!==i?(a=n.jsx(wn,{index:i,className:Be}),e[4]=i,e[5]=a):a=e[5],a}function Lo(t){const e=y.c(5),{percent:s,state:r}=t,o=2*Math.PI*8;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=z("-rotate-90",Be),e[0]=i):i=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",className:"stroke-muted"}),e[1]=a):a=e[1];const l=Oo[r],c=`${o*s/100} ${o}`;let d;return e[2]!==l||e[3]!==c?(d=n.jsxs("svg",{viewBox:"0 0 20 20",className:i,"aria-hidden":"true",children:[a,n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",strokeLinecap:"round",className:l,strokeDasharray:c})]}),e[2]=l,e[3]=c,e[4]=d):d=e[4],d}function Eo(){return Nn()?n.jsx(Do,{}):n.jsx(Ao,{})}function _t(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(To,{children:n.jsx(A.Suspense,{fallback:null,children:n.jsx(Eo,{})})}),t[0]=e):e=t[0],e}const Fo=6e4;function qo(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Vo(t,e){if(!t)return t;const s=e?new Set(e):null;let r=0;const o=t.pages.map(a=>{const l=a.notifications.filter(c=>s&&!s.has(c.id)?!0:(r++,!1));return{...a,notifications:l}}),i=s?Math.max(0,(t.pages[0]?.unreadCount??0)-r):0;return{...t,pages:o.map(a=>({...a,unreadCount:i}))}}function Bo(t,e){const s=y.c(4),{data:r}=Y.useSession(),o=r?.user?.id;let i;s[0]!==e||s[1]!==t||s[2]!==o?(i=a=>!t||!o?Ko:Pn.subscribe(t,c=>{try{if(JSON.parse(c.data).subject!==o)return}catch{return}e(),a()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=i):i=s[3],A.useSyncExternalStore(i,Ho,Uo)}function Uo(){return 0}function Ho(){return 0}function Ko(){}function Zt(){const t=y.c(37),{locator:e,org:s}=E(),r=At(),o=Ot();let i;t[0]!==e?(i=Ee.notifications(e),t[0]=e,t[1]=i):i=t[1];const a=i;let l;t[2]!==r?(l=$=>{const{pageParam:w}=$;return qo(r,w)},t[2]=r,t[3]=l):l=t[3];let c;t[4]!==a||t[5]!==l?(c={queryKey:a,queryFn:l,initialPageParam:void 0,getNextPageParam:Qo,refetchInterval:Fo},t[4]=a,t[5]=l,t[6]=c):c=t[6];const d=In(c);let u;t[7]!==o||t[8]!==a?(u=()=>o.invalidateQueries({queryKey:a,refetchType:"active"}),t[7]=o,t[8]=a,t[9]=u):u=t[9],Bo(s.slug,u);let m;t[10]!==r?(m=$=>r.call("NOTIFICATION_MARK_READ",$?{ids:$}:{}),t[10]=r,t[11]=m):m=t[11];let f,p;t[12]!==o||t[13]!==a?(f=async $=>{await o.cancelQueries({queryKey:a}),o.setQueryData(a,w=>Vo(w,$))},p=()=>o.invalidateQueries({queryKey:a}),t[12]=o,t[13]=a,t[14]=f,t[15]=p):(f=t[14],p=t[15]);let g;t[16]!==m||t[17]!==f||t[18]!==p?(g={mutationFn:m,onMutate:f,onSettled:p},t[16]=m,t[17]=f,t[18]=p,t[19]=g):g=t[19];const h=bs(g);let b;t[20]!==d.data?.pages?(b=d.data?.pages??[],t[20]=d.data?.pages,t[21]=b):b=t[21];const x=b;let j;t[22]!==x?(j=x.flatMap(Wo),t[22]=x,t[23]=j):j=t[23];const v=x[0]?.unreadCount??0;let S;t[24]!==d?(S=()=>{d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},t[24]=d,t[25]=S):S=t[25];let k,N;t[26]!==h?(k=()=>h.mutate(null),N=$=>h.mutate([$]),t[26]=h,t[27]=k,t[28]=N):(k=t[27],N=t[28]);let _;return t[29]!==d.hasNextPage||t[30]!==d.isFetchingNextPage||t[31]!==v||t[32]!==S||t[33]!==k||t[34]!==N||t[35]!==j?(_={updates:j,redDotCount:v,hasMore:d.hasNextPage,isFetchingMore:d.isFetchingNextPage,fetchMore:S,markAllRead:k,markRead:N},t[29]=d.hasNextPage,t[30]=d.isFetchingNextPage,t[31]=v,t[32]=S,t[33]=k,t[34]=N,t[35]=j,t[36]=_):_=t[36],_}function Wo(t){return t.notifications.map(Go)}function Go(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 Qo(t){return t.nextCursor??void 0}function Jo(t){switch(t){case"mentioned":case"review_requested":return"font-medium text-foreground";case"merge_failed":case"review_changes_requested":return"font-medium text-destructive";case"review_approved":return"font-medium text-success";default:return""}}function Xo(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 s=t.action;return String(s)}}}function Yo(t){const e=y.c(36),{update:s,orgSlug:r,onSelect:o}=t,i=T();let a;e[0]!==r||e[1]!==s.taskKeySeq?(a=Gt(r,s.taskKeySeq),e[0]=r,e[1]=s.taskKeySeq,e[2]=a):a=e[2];const l=a,c=!s.actorName;let d;e[3]!==c||e[4]!==s.actorImage||e[5]!==s.actorName?(d=n.jsx("span",{className:"mt-0.5 shrink-0",children:c?n.jsx(Tn,{size:24}):n.jsx(Fe,{url:s.actorImage??void 0,fallback:Ln(s.actorName??void 0),shape:"circle",size:"xs"})}),e[3]=c,e[4]=s.actorImage,e[5]=s.actorName,e[6]=d):d=e[6];let u;e[7]!==s.taskTitle?(u=n.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:s.taskTitle}),e[7]=s.taskTitle,e[8]=u):u=e[8];let m;e[9]!==s.occurredAt?(m=En(new Date(s.occurredAt)),e[9]=s.occurredAt,e[10]=m):m=e[10];let f;e[11]!==m?(f=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:m}),e[11]=m,e[12]=f):f=e[12];let p;e[13]!==u||e[14]!==f?(p=n.jsxs("div",{className:"flex items-baseline gap-2",children:[u,f]}),e[13]=u,e[14]=f,e[15]=p):p=e[15];let g;e[16]!==l?(g=l&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:l})," · "]}),e[16]=l,e[17]=g):g=e[17];let h;e[18]!==s.action?(h=z(Jo(s.action)),e[18]=s.action,e[19]=h):h=e[19];let b;e[20]!==i||e[21]!==s?(b=Xo(s,i),e[20]=i,e[21]=s,e[22]=b):b=e[22];let x;e[23]!==h||e[24]!==b?(x=n.jsx("span",{className:h,children:b}),e[23]=h,e[24]=b,e[25]=x):x=e[25];let j;e[26]!==x||e[27]!==g?(j=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[g,x]}),e[26]=x,e[27]=g,e[28]=j):j=e[28];let v;e[29]!==j||e[30]!==p?(v=n.jsxs("div",{className:"min-w-0 flex-1",children:[p,j]}),e[29]=j,e[30]=p,e[31]=v):v=e[31];let S;return e[32]!==o||e[33]!==v||e[34]!==d?(S=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-start gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[d,v]}),e[32]=o,e[33]=v,e[34]=d,e[35]=S):S=e[35],S}function Zo(t){const e=y.c(2),{onReach:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const i=new IntersectionObserver(a=>{a.some(ei)&&s()});return i.observe(o),()=>i.disconnect()}}),e[0]=s,e[1]=r):r=e[1],r}function ei(t){return t.isIntersecting}function ti(t){const e=y.c(23),{onClose:s}=t,r=T(),o=$e(),{org:i}=E(),{updates:a,markAllRead:l,markRead:c,hasMore:d,fetchMore:u}=Zt();let m;e[0]!==r?(m=r("sidebar.inbox.title"),e[0]=r,e[1]=m):m=e[1];let f;e[2]!==m?(f=n.jsx("h3",{className:"text-sm font-medium",children:m}),e[2]=m,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==r||e[6]!==a.length?(p=a.length>0&&n.jsx(Le,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:l,children:r("sidebar.inbox.markAllRead")}),e[4]=l,e[5]=r,e[6]=a.length,e[7]=p):p=e[7];let g;e[8]!==f||e[9]!==p?(g=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[f,p]}),e[8]=f,e[9]=p,e[10]=g):g=e[10];let h;e[11]!==u||e[12]!==d||e[13]!==c||e[14]!==o||e[15]!==s||e[16]!==i||e[17]!==r||e[18]!==a?(h=a.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(mt,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:r("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:r("sidebar.inbox.emptyBody")})]}):n.jsxs(Cn,{className:"min-h-0 flex-1",children:[a.map(x=>{const j=Gt(i.slug,x.taskKeySeq);return n.jsx(Yo,{update:x,orgSlug:i.slug,onSelect:()=>{c(x.id),s(),j&&o({to:"/$org/tasks/{-$taskKey}",params:{org:i.slug,taskKey:j}})}},x.id)}),d&&n.jsx(Zo,{onReach:u})]}),e[11]=u,e[12]=d,e[13]=c,e[14]=o,e[15]=s,e[16]=i,e[17]=r,e[18]=a,e[19]=h):h=e[19];let b;return e[20]!==g||e[21]!==h?(b=n.jsxs(n.Fragment,{children:[g,h]}),e[20]=g,e[21]=h,e[22]=b):b=e[22],b}function es(){const t=y.c(1),{redDotCount:e}=Zt();if(e===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function ts(t){const e=y.c(10),{open:s,onOpenChange:r,children:o}=t;let i;e[0]!==r||e[1]!==s?(i=s&&n.jsx(ti,{onClose:()=>r(!1)}),e[0]=r,e[1]=s,e[2]=i):i=e[2];let a;e[3]!==i?(a=n.jsx(lt,{side:"right",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:i}),e[3]=i,e[4]=a):a=e[4];let l;return e[5]!==o||e[6]!==r||e[7]!==s||e[8]!==a?(l=n.jsxs(at,{open:s,onOpenChange:r,children:[o,a]}),e[5]=o,e[6]=r,e[7]=s,e[8]=a,e[9]=l):l=e[9],l}function ss(){const t=y.c(9),e=T(),[s,r]=A.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let i,a;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(mt,{size:15}),a=n.jsx(es,{}),t[2]=i,t[3]=a):(i=t[2],a=t[3]);let l;t[4]!==o?(l=n.jsx(Ke,{asChild:!0,children:n.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:[i,a]})}),t[4]=o,t[5]=l):l=t[5];let c;return t[6]!==s||t[7]!==l?(c=n.jsx(ts,{open:s,onOpenChange:r,children:l}),t[6]=s,t[7]=l,t[8]=c):c=t[8],c}function si(){const t=y.c(15),e=T(),[s,r]=A.useState(!1),o=le();let i;t[0]!==o||t[1]!==e?(i=o?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=i):i=t[2];let a,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(mt,{}),l=n.jsx(es,{}),t[3]=a,t[4]=l):(a=t[3],l=t[4]);let c;t[5]!==e?(c=e("sidebar.inbox.title"),t[5]=e,t[6]=c):c=t[6];let d;t[7]!==c?(d=n.jsx("span",{className:"truncate",children:c}),t[7]=c,t[8]=d):d=t[8];let u;t[9]!==i||t[10]!==d?(u=n.jsx(Ke,{asChild:!0,children:n.jsxs(ae,{tooltip:i,className:"relative",children:[a,l,d]})}),t[9]=i,t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==s||t[13]!==u?(m=n.jsx(ts,{open:s,onOpenChange:r,children:u}),t[12]=s,t[13]=u,t[14]=m):m=t[14],m}function wt(){const t=y.c(10),e=T();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(gt,{children:n.jsx(an,{className:Be})}),t[2]=r):r=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let i;t[5]!==o?(i=n.jsx("span",{children:o}),t[5]=o,t[6]=i):i=t[6];let a;return t[7]!==s||t[8]!==i?(a=n.jsx(L,{className:"gap-0.5",children:n.jsx(se,{children:n.jsx(yn,{trigger:n.jsxs(ae,{tooltip:s,children:[r,i]})})})}),t[7]=s,t[8]=i,t[9]=a):a=t[9],a}function ni(){const t=y.c(13),e=le(),r=!$n();if(e){let c;t[0]!==r?(c=r&&n.jsx(_t,{}),t[0]=r,t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(wt,{}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{children:n.jsx(si,{})}),t[3]=u):u=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(L,{children:[u,n.jsx(se,{children:n.jsx(tt,{})})]}),t[4]=m):m=t[4];let f;return t[5]!==c?(f=n.jsxs(Ye,{className:"px-2 pb-3 gap-1",children:[c,d,m]}),t[5]=c,t[6]=f):f=t[6],f}let o;t[7]!==r?(o=r&&n.jsx(_t,{}),t[7]=r,t[8]=o):o=t[8];let i;t[9]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(wt,{}),t[9]=i):i=t[9];let a;t[10]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(L,{className:"gap-0.5",children:n.jsx(se,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(tt,{})}),n.jsx(ss,{})]})})}),t[10]=a):a=t[10];let l;return t[11]!==o?(l=n.jsxs(Ye,{className:"px-2 pb-3 gap-0.5",children:[o,i,a]}),t[11]=o,t[12]=l):l=t[12],l}function oi(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ye,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(L,{children:n.jsx(se,{children:n.jsx(tt,{})})})}),n.jsx(ss,{})]})}),t[0]=e):e=t[0],e}function ii(t){let e=0;for(let r=0;r<t.length;r++)e=t.charCodeAt(r)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function ht(t){const e=y.c(13),{org:s,size:r}=t,o=r===void 0?"sm":r,i=o==="xs"?"size-5":"size-6",a=o==="xs"?"text-[9px]":"text-xs";let l;e[0]!==i?(l=z(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:ii(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let d;e[5]!==s.logo||e[6]!==s.name||e[7]!==a?(d=s.logo?n.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:z("font-semibold leading-none",a),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=a,e[8]=d):d=e[8];let u;return e[9]!==l||e[10]!==c||e[11]!==d?(u=n.jsx("div",{className:l,style:c,children:d}),e[9]=l,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function ri({invitation:t,onChanged:e}){const s=T(),[r,o]=A.useState(!1),i=t.organizationName??s("header.orgSwitcher.unknownOrganization"),a=async()=>{o(!0);try{const d=await Y.organization.acceptInvitation({invitationId:t.id});if(d.error){re.error(d.error.message),o(!1);return}}catch{re.error(s("header.orgSwitcher.failedToAcceptInvitation")),o(!1);return}re.success(s("header.orgSwitcher.joined",{name:i})),js();let c;try{c=(await Y.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{o(!0);try{const c=await Y.organization.rejectInvitation({invitationId:t.id});if(c.error){re.error(c.error.message),o(!1);return}re.success(s("header.orgSwitcher.invitationDeclined")),o(!1),e()}catch{re.error(s("header.orgSwitcher.failedToDeclineInvitation")),o(!1)}};return n.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[n.jsx(ht,{org:{name:i},size:"sm"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"truncate text-sm font-medium",children:i}),n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[n.jsx(Le,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:a,disabled:r,children:s("header.orgSwitcher.accept")}),n.jsx(Le,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:r,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:n.jsx(Kn,{size:14})})]})]})}function ns(){const t=A.useContext(vs),{data:e,refetch:s}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>s?.()}}function ai(t){const e=y.c(13),s=t.trim(),{data:r}=Y.useSession(),o=r?.user?.id??"",i=s.length>0&&!!o,a=Ee.projectSearch(o,s);let l;e[0]!==s?(l=async x=>{const{signal:j}=x,v=await fetch(`/api/_me/projects/search?q=${encodeURIComponent(s)}`,{signal:j});if(!v.ok)throw new Error(`Project search failed: ${v.status}`);return await v.json()},e[0]=s,e[1]=l):l=e[1];let c;e[2]!==i||e[3]!==a||e[4]!==l?(c={queryKey:a,queryFn:l,enabled:i,placeholderData:ys,staleTime:3e4,retry:!1},e[2]=i,e[3]=a,e[4]=l,e[5]=c):c=e[5];const{data:d,isFetching:u,isPlaceholderData:m,isError:f}=st(c);let p;e[6]!==d?.items?(p=d?.items??[],e[6]=d?.items,e[7]=p):p=e[7];const g=i&&u,h=i&&m;let b;return e[8]!==f||e[9]!==p||e[10]!==g||e[11]!==h?(b={hits:p,isSearching:g,isStale:h,isError:f},e[8]=f,e[9]=p,e[10]=g,e[11]=h,e[12]=b):b=e[12],b}function $t(t){const e=y.c(15),{id:s,label:r,createLabel:o,onCreate:i}=t;let a;e[0]!==s||e[1]!==r?(a=n.jsx("span",{id:s,className:"truncate",children:r}),e[0]=s,e[1]=r,e[2]=a):a=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(qn,{size:14}),e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==i?(c=n.jsx(ct,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":o,className:"-my-1 shrink-0 cursor-pointer rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",onClick:i,children:l})}),e[4]=o,e[5]=i,e[6]=c):c=e[6];let d;e[7]!==o?(d=n.jsx(dt,{side:"right",children:o}),e[7]=o,e[8]=d):d=e[8];let u;e[9]!==c||e[10]!==d?(u=n.jsxs(ut,{children:[c,d]}),e[9]=c,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==a||e[13]!==u?(m=n.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[a,u]}),e[12]=a,e[13]=u,e[14]=m):m=e[14],m}const Ue="min-h-9 items-center",de={allProjects:"scope:__all__",project:t=>`scope:${t}`,org:t=>`org:${t}`,foreignProject:(t,e)=>`travel:${t}:${e}`};function li(t){const e=y.c(9),{active:s,rows:r}=t,o=T();let i,a,l;if(e[0]!==s||e[1]!==r||e[2]!==o){l=Symbol.for("react.early_return_sentinel");e:{const d=r.get(s);if(d?.kind!=="travel"){l=null;break e}i="border-t border-border px-3 py-2 text-xs text-warning",a=o("sidebar.picker.verbTravel",{name:d.label})}e[0]=s,e[1]=r,e[2]=o,e[3]=i,e[4]=a,e[5]=l}else i=e[3],a=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;return e[6]!==i||e[7]!==a?(c=n.jsx("div",{className:i,children:a}),e[6]=i,e[7]=a,e[8]=c):c=e[8],c}function ci(t){const e=y.c(25),{onClose:s,onCreateOrg:r,className:o}=t,i=T(),a=A.useId(),l=A.useId(),c=$e(),{org:d}=E(),{scopeId:u,projects:m,setScope:f}=Se(),{hasMore:p}=Wn(),[g,h]=A.useState(""),[b,x]=A.useState(de.allProjects),j=A.useDeferredValue(g);let v;e[0]!==j?(v=j.trim(),e[0]=j,e[1]=v):v=e[1];const S=v,k=S.length>0,{data:N}=Ss(),{invitations:_,refetch:$}=ns();let w;e[2]!==d.slug?(w=(I,R)=>I.slug===d.slug?-1:R.slug===d.slug?1:0,e[2]=d.slug,e[3]=w):w=e[3];const C=(N??[]).slice().sort(w),{hits:P,isSearching:O,isStale:ne,isError:K}=ai(k?S:""),W=k?C.filter(I=>{const R=S.toLowerCase();return I.name.toLowerCase().includes(R)||I.slug.toLowerCase().includes(R)}):[],oe=we();let q;e[4]!==oe?(q=oe.startsWith("/$org/settings"),e[4]=oe,e[5]=q):q=e[5];const G=q,V=new Map;let B;e[6]!==G||e[7]!==s||e[8]!==f?(B=I=>{F("scope_set",{scoped:I!==null,fromSettings:G}),f(I),s()},e[6]=G,e[7]=s,e[8]=f,e[9]=B):B=e[9];const Q=B;let ee;e[10]!==c||e[11]!==s?(ee=(I,R)=>{F("org_project_travel",{scoped:!!R}),c(R?{to:"/$org/projects/$agentId",params:{org:I,agentId:R}}:{to:"/$org/home",params:{org:I}}),s()},e[10]=c,e[11]=s,e[12]=ee):ee=e[12];const J=ee;let U;e[13]!==c||e[14]!==s||e[15]!==d.slug?(U=()=>{F("picker_new_project"),c({to:"/$org/home",params:{org:d.slug}}),s()},e[13]=c,e[14]=s,e[15]=d.slug,e[16]=U):U=e[16];const me=U;V.set(de.allProjects,{kind:"scope",label:i("sidebar.scope.allProjects")});let D;e[17]!==i?(D=i("sidebar.picker.searchPlaceholder"),e[17]=i,e[18]=D):D=e[18];let H;e[19]!==g||e[20]!==D?(H=n.jsx(Un,{value:g,onValueChange:h,placeholder:D}),e[19]=g,e[20]=D,e[21]=H):H=e[21];const ie=Vn,ke="max-h-none min-h-0 flex-1",X=k?n.jsxs(n.Fragment,{children:[K&&n.jsx(yt,{children:i("sidebar.picker.searchFailed")}),!K&&!O&&P.length===0&&W.length===0&&n.jsx(yt,{children:i("sidebar.picker.noMatches",{query:S})}),!K&&P.length>0&&n.jsx(Me,{heading:i("sidebar.picker.projectsHeading"),className:z(ne&&"opacity-50"),children:P.map(I=>n.jsx(di,{hit:I,currentOrgSlug:d.slug,scopeId:u,rows:V,onScope:Q,onTravel:J},`${I.orgSlug}:${I.id}`))}),W.length>0&&n.jsx(Me,{heading:i("sidebar.picker.orgsHeading"),children:W.map(I=>n.jsx(Ct,{candidate:I,currentOrgSlug:d.slug,rows:V,onTravel:J,onClose:s},I.id))})]}):n.jsxs(n.Fragment,{children:[n.jsx($t,{id:a,label:i("sidebar.picker.projectsHeading"),createLabel:i("sidebar.picker.newProject"),onCreate:me}),n.jsxs(Me,{"aria-labelledby":a,children:[n.jsxs(Ve,{value:de.allProjects,className:Ue,onSelect:()=>Q(null),children:[n.jsx("span",{className:"min-w-0 flex-1 truncate",children:i("sidebar.scope.allProjects")}),u===null&&n.jsx(qe,{size:14})]}),m.map(I=>{const R=de.project(I.id);return V.set(R,{kind:"scope",label:I.title}),n.jsxs(Ve,{value:R,className:Ue,onSelect:()=>Q(I.id),children:[n.jsx(ft,{icon:I.icon,name:I.title}),n.jsx("span",{className:"min-w-0 flex-1 truncate",children:I.title}),u===I.id&&n.jsx(qe,{size:14})]},I.id)}),p&&n.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:i("sidebar.picker.moreExist")})]}),n.jsx($t,{id:l,label:i("sidebar.picker.orgsHeading"),createLabel:i("sidebar.picker.newOrganization"),onCreate:r}),n.jsxs(Me,{"aria-labelledby":l,children:[_.map(I=>n.jsx(ri,{invitation:I,onChanged:$},I.id)),C.map(I=>n.jsx(Ct,{candidate:I,currentOrgSlug:d.slug,rows:V,onTravel:J,onClose:s},I.id))]})]});let te;return e[22]!==ie||e[23]!==X?(te=n.jsx(ie,{className:ke,children:X}),e[22]=ie,e[23]=X,e[24]=te):te=e[24],n.jsxs(Bn,{shouldFilter:!1,value:b,onValueChange:x,className:o,children:[H,te,n.jsx(li,{active:b,rows:V})]})}function Ct(t){const e=y.c(22),{candidate:s,currentOrgSlug:r,rows:o,onTravel:i,onClose:a}=t,l=s.slug===r;let c;e[0]!==s.name||e[1]!==s.slug||e[2]!==l||e[3]!==o?(c=de.org(s.slug),o.set(c,{kind:l?"scope":"travel",label:s.name}),e[0]=s.name,e[1]=s.slug,e[2]=l,e[3]=o,e[4]=c):c=e[4];let d;e[5]!==s.slug||e[6]!==l||e[7]!==a||e[8]!==i?(d=()=>l?a():i(s.slug),e[5]=s.slug,e[6]=l,e[7]=a,e[8]=i,e[9]=d):d=e[9];let u;e[10]!==s?(u=n.jsx(ht,{org:s,size:"xs"}),e[10]=s,e[11]=u):u=e[11];let m;e[12]!==s.name?(m=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e[12]=s.name,e[13]=m):m=e[13];let f;e[14]!==l?(f=l&&n.jsx(qe,{size:14}),e[14]=l,e[15]=f):f=e[15];let p;return e[16]!==d||e[17]!==u||e[18]!==m||e[19]!==f||e[20]!==c?(p=n.jsxs(Ve,{value:c,className:Ue,onSelect:d,children:[u,m,f]}),e[16]=d,e[17]=u,e[18]=m,e[19]=f,e[20]=c,e[21]=p):p=e[21],p}function di(t){const e=y.c(30),{hit:s,currentOrgSlug:r,scopeId:o,rows:i,onScope:a,onTravel:l}=t,c=s.orgSlug===r;let d;e[0]!==s.id||e[1]!==s.orgSlug||e[2]!==s.title||e[3]!==c||e[4]!==i?(d=c?de.project(s.id):de.foreignProject(s.orgSlug,s.id),i.set(d,{kind:c?"scope":"travel",label:s.title}),e[0]=s.id,e[1]=s.orgSlug,e[2]=s.title,e[3]=c,e[4]=i,e[5]=d):d=e[5];let u;e[6]!==s.id||e[7]!==s.orgSlug||e[8]!==c||e[9]!==a||e[10]!==l?(u=()=>c?a(s.id):l(s.orgSlug,s.id),e[6]=s.id,e[7]=s.orgSlug,e[8]=c,e[9]=a,e[10]=l,e[11]=u):u=e[11];let m;e[12]!==s.icon||e[13]!==s.title?(m=n.jsx(ft,{icon:s.icon,name:s.title}),e[12]=s.icon,e[13]=s.title,e[14]=m):m=e[14];let f;e[15]!==s.title?(f=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.title}),e[15]=s.title,e[16]=f):f=e[16];let p;e[17]!==s.orgName?(p=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.orgName}),e[17]=s.orgName,e[18]=p):p=e[18];let g;e[19]!==s.id||e[20]!==c||e[21]!==o?(g=c&&o===s.id&&n.jsx(qe,{size:14}),e[19]=s.id,e[20]=c,e[21]=o,e[22]=g):g=e[22];let h;return e[23]!==u||e[24]!==m||e[25]!==f||e[26]!==p||e[27]!==g||e[28]!==d?(h=n.jsxs(Ve,{value:d,className:Ue,onSelect:u,children:[m,f,p,g]}),e[23]=u,e[24]=m,e[25]=f,e[26]=p,e[27]=g,e[28]=d,e[29]=h):h=e[29],h}function os(t){const e=y.c(32),{collapsed:s,onNavigate:r}=t,o=s===void 0?!1:s,i=T(),{org:a}=E(),{project:l}=Se(),{invitations:c}=ns(),[d,u]=A.useState(!1),[m,f]=A.useState(!1),p=ot();let g;if(e[0]!==o||e[1]!==c.length||e[2]!==a||e[3]!==l||e[4]!==i){const $=l?i("sidebar.picker.projectInOrg",{project:l.title,org:a.name}):a.name;let w;e[6]!==a||e[7]!==l?(w=l?n.jsx(ln,{icon:l.icon,name:l.title,size:"xs",className:"shrink-0"}):n.jsx(ht,{org:a,size:"sm"}),e[6]=a,e[7]=l,e[8]=w):w=e[8];let C;e[9]!==c.length?(C=c.length>0&&n.jsx("span",{className:"absolute -right-1 -top-1 size-2.5 rounded-full bg-destructive ring-2 ring-background"}),e[9]=c.length,e[10]=C):C=e[10];let P;e[11]!==w||e[12]!==C?(P=n.jsxs("div",{className:"relative inline-flex shrink-0",children:[w,C]}),e[11]=w,e[12]=C,e[13]=P):P=e[13];const O=P;g=o?n.jsx(ae,{tooltip:$,"data-tour":Z.switcher,children:O}):n.jsxs("button",{type:"button","data-tour":Z.switcher,"aria-label":i("sidebar.picker.ariaLabel",{name:$}),className:z("flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pl-1 pr-1.5 text-left md:h-[34px] md:py-0","[transition:background-color_180ms_ease] hover:bg-sidebar-accent",Us),children:[O,n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l?l.title:a.name}),n.jsx(Fn,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=o,e[1]=c.length,e[2]=a,e[3]=l,e[4]=i,e[5]=g}else g=e[5];const h=g,b=p?"min-h-0 flex-1":"max-h-[min(560px,70dvh,var(--radix-popover-content-available-height,70dvh))]";let x;e[14]!==r?(x=()=>{u(!1),r?.()},e[14]=r,e[15]=x):x=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{u(!1),f(!0)},e[16]=j):j=e[16];let v;e[17]!==b||e[18]!==x?(v=n.jsx(ci,{onClose:x,onCreateOrg:j,className:b}),e[17]=b,e[18]=x,e[19]=v):v=e[19];const S=v;let k;e[20]!==o||e[21]!==S||e[22]!==p||e[23]!==d||e[24]!==i||e[25]!==h?(k=p?n.jsxs(Lt,{open:d,onOpenChange:u,direction:"bottom",children:[n.jsx(Ws,{asChild:!0,children:h}),n.jsxs(Et,{className:"flex max-h-[85dvh] flex-col p-0",children:[n.jsx(Ft,{className:"sr-only",children:i("sidebar.picker.title")}),S]})]}):n.jsxs(at,{open:d,onOpenChange:u,children:[n.jsx(Ke,{asChild:!0,children:h}),n.jsx(lt,{side:o?"right":"bottom",align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:S})]}),e[20]=o,e[21]=S,e[22]=p,e[23]=d,e[24]=i,e[25]=h,e[26]=k):k=e[26];let N;e[27]!==m?(N=n.jsx(Hn,{open:m,onOpenChange:f}),e[27]=m,e[28]=N):N=e[28];let _;return e[29]!==k||e[30]!==N?(_=n.jsxs(n.Fragment,{children:[k,N]}),e[29]=k,e[30]=N,e[31]=_):_=e[31],_}const is=16;function ui(){const t=y.c(7),e=le(),s=We();let r;t[0]!==e?(r=n.jsx(os,{collapsed:e}),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==s?(o=!s&&n.jsx(fi,{}),t[2]=s,t[3]=o):o=t[3];let i;return t[4]!==r||t[5]!==o?(i=n.jsxs(n.Fragment,{children:[r,o]}),t[4]=r,t[5]=o,t[6]=i):i=t[6],i}function mi(t){const e=y.c(12),{onClose:s}=t,r=T();let o;e[0]!==s?(o=n.jsx(os,{onNavigate:s}),e[0]=s,e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex-1"}),e[2]=i):i=e[2];let a;e[3]!==r?(a=r("sidebar.header.closeSidebar"),e[3]=r,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(it,{size:is}),e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==a?(c=n.jsx(rt,{onClick:s,"aria-label":a,children:l}),e[6]=s,e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==o||e[10]!==c?(d=n.jsxs(n.Fragment,{children:[o,i,c]}),e[9]=o,e[10]=c,e[11]=d):d=e[11],d}function fi(){const t=y.c(12),e=T(),s=le(),{toggleSidebar:r}=Ce();let o;t[0]!==e?(o=e("sidebar.header.toggleSidebar"),t[0]=e,t[1]=o):o=t[1];const i=o;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(it,{size:is}),t[2]=a):a=t[2];let l;t[3]!==i||t[4]!==r?(l=n.jsx(ct,{asChild:!0,children:n.jsx(rt,{"aria-label":i,onClick:r,className:"shrink-0 rounded-lg md:size-[34px] group-data-[state=collapsed]/sidebar:mx-auto",children:a})}),t[3]=i,t[4]=r,t[5]=l):l=t[5];const c=!s;let d;t[6]!==i||t[7]!==c?(d=n.jsx(dt,{side:"right",hidden:c,children:i}),t[6]=i,t[7]=c,t[8]=d):d=t[8];let u;return t[9]!==l||t[10]!==d?(u=n.jsxs(ut,{children:[l,d]}),t[9]=l,t[10]=d,t[11]=u):u=t[11],u}function ue(t){const e=y.c(33),{icon:s,label:r,isActive:o,link:i,onSelect:a,ariaLabel:l,className:c,dataTour:d,children:u,trailing:m}=t,f=o===void 0?!1:o,p=le(),g=l??r,h=p?g:void 0;let b;e[0]!==c||e[1]!==d||e[2]!==f||e[3]!==h?(b={isActive:f,tooltip:h,className:c,"data-tour":d},e[0]=c,e[1]=d,e[2]=f,e[3]=h,e[4]=b):b=e[4];const x=b;let j;e[5]!==m?(j=m&&n.jsx("span",{className:"order-last ml-auto flex shrink-0 items-center group-data-[state=collapsed]/sidebar:hidden",children:m}),e[5]=m,e[6]=j):j=e[6];let v;e[7]!==r?(v=n.jsx("span",{className:"truncate",children:r}),e[7]=r,e[8]=v):v=e[8];let S;e[9]!==s||e[10]!==j||e[11]!==v?(S=n.jsxs(n.Fragment,{children:[s,j,v]}),e[9]=s,e[10]=j,e[11]=v,e[12]=S):S=e[12];const k=S;if(i){const $=f?"page":void 0;let w;e[13]!==k||e[14]!==i||e[15]!==g||e[16]!==a||e[17]!==$?(w=n.jsx(Rt,{...i,"aria-label":g,"aria-current":$,onClick:a,children:k}),e[13]=k,e[14]=i,e[15]=g,e[16]=a,e[17]=$,e[18]=w):w=e[18];let C;e[19]!==x||e[20]!==w?(C=n.jsx(ae,{asChild:!0,...x,children:w}),e[19]=x,e[20]=w,e[21]=C):C=e[21];let P;return e[22]!==u||e[23]!==C?(P=n.jsxs(se,{children:[C,u]}),e[22]=u,e[23]=C,e[24]=P):P=e[24],P}let N;e[25]!==k||e[26]!==g||e[27]!==a||e[28]!==x?(N=n.jsx(ae,{...x,"aria-label":g,onClick:a,children:k}),e[25]=k,e[26]=g,e[27]=a,e[28]=x,e[29]=N):N=e[29];let _;return e[30]!==u||e[31]!==N?(_=n.jsxs(se,{children:[N,u]}),e[30]=u,e[31]=N,e[32]=_):_=e[32],_}function rs(t){const e=y.c(5),{label:s,link:r,onSelect:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Qn,{size:16}),e[0]=i):i=e[0];let a;return e[1]!==s||e[2]!==r||e[3]!==o?(a=n.jsx("div",{className:"-mx-2 border-b border-sidebar-border px-2 py-2",children:n.jsx(L,{className:"shrink-0",children:n.jsx(ue,{icon:i,label:s,className:"text-sidebar-foreground/70",link:r,onSelect:o})})}),e[1]=s,e[2]=r,e[3]=o,e[4]=a):a=e[4],a}function pi(t){return t==="board"?"kanban":t==="cdn"?"monitoring":Dt(t)?"cms":null}function as(){const t=y.c(2),{data:e}=Wt();let s;return t[0]!==e?(s=r=>{const o=pi(r);return!o||!e?!1:e.features[o]!==!0},t[0]=e,t[1]=s):s=t[1],s}const xi="settings",gi=["overview","reports","board","files"];function hi(t,e){return!t||!e?!1:!Mt(e.metadata)}function bi(t,e,s,r){if(!t||!e)return!0;const o=r!==void 0;return Jn(o?r:Qt(e.metadata),o?1:e.metadata?.sidebarViewsVersion).includes(s)}function ji(){const t=y.c(16),e=T(),{org:s}=E(),r=we(),o=He(),{project:i,repo:a}=Se(),l=Jt(i?.id);let c;t[0]!==i||t[1]!==o?(c=hi(o,i),t[0]=i,t[1]=o,t[2]=c):c=t[2];const d=c;let u;t[3]!==l||t[4]!==i||t[5]!==o?(u=p=>bi(o,i,p,l),t[3]=l,t[4]=i,t[5]=o,t[6]=u):u=t[6];const m=u;let f;if(t[7]!==m||t[8]!==d||t[9]!==r||t[10]!==s||t[11]!==i?.id||t[12]!==a||t[13]!==o||t[14]!==e){const p={overview:d||!m("overview")?null:{key:"overview",label:e("sidebar.navDestinations.home"),icon:n.jsx(cn,{size:16}),isActive:r===M.home||r===M.orgIndex||r===ce.root||r===`${ce.root}/`,trackAs:"overview",link:o?{to:ce.root,params:{org:s.slug,agentId:o}}:{to:M.home,params:{org:s.slug}}},reports:Xe(M.reports,o)&&!d&&m("reports")?{key:"reports",label:e("sidebar.navDestinations.reports"),icon:n.jsx(Kt,{size:16}),isActive:r===M.reports||r===ce.reports,trackAs:"reports",link:o?{to:ce.reports,params:{org:s.slug,agentId:o}}:{to:M.reports,params:{org:s.slug}}}:null,board:d||!m("board")?null:{key:"board",label:e("sidebar.navDestinations.tasks"),icon:n.jsx(Ht,{size:16}),isActive:r===M.tasks||r===ce.tasks,trackAs:"board",dataTour:Z.tasks,link:{to:o?ce.tasks:M.tasks,params:{org:s.slug,agentId:o??void 0,taskKey:void 0},search:g=>{const h=a??i?.id;return h?{...g,repo:h}:g}}},files:Xe(M.library,o)?{key:"files",label:e("sidebar.navDestinations.library"),icon:n.jsx(Gn,{size:16}),isActive:r===M.library,trackAs:"files",link:{to:M.library,params:{org:s.slug}}}:null};f=gi.map(g=>p[g]).filter(vi),t[7]=m,t[8]=d,t[9]=r,t[10]=s,t[11]=i?.id,t[12]=a,t[13]=o,t[14]=e,t[15]=f}else f=t[15];return f}function vi(t){return t!==null}function yi(t){const e=y.c(9),{onNavigate:s}=t,r=ji(),o=as();let i;if(e[0]!==r||e[1]!==o||e[2]!==s){let l;e[4]!==o||e[5]!==s?(l=c=>n.jsx(ue,{icon:c.icon,label:c.label,dataTour:c.dataTour,isActive:c.isActive,link:c.link,trailing:o(c.key)?n.jsx(nt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{F("nav_destination_clicked",{destination:c.trackAs}),s?.()}},c.key),e[4]=o,e[5]=s,e[6]=l):l=e[6],i=r.map(l),e[0]=r,e[1]=o,e[2]=s,e[3]=i}else i=e[3];let a;return e[7]!==i?(a=n.jsx(L,{className:"gap-1",children:i}),e[7]=i,e[8]=a):a=e[8],a}function Si(t){const e=y.c(18),{onNavigate:s}=t,r=T(),{org:o}=E(),i=He(),a=pt(),l=we(),c=ks();let d;e[0]!==c||e[1]!==l?(d=l.startsWith("/$org/settings")||l.startsWith(M.projects)&&c==="settings",e[0]=c,e[1]=l,e[2]=d):d=e[2];const u=d;let m;e[3]!==r?(m=r("sidebar.navDestinations.settings"),e[3]=r,e[4]=m):m=e[4];const f=m;let p;e[5]!==o||e[6]!==i?(p=i?void 0:{to:"/$org/settings",params:{org:o.slug}},e[5]=o,e[6]=i,e[7]=p):p=e[7];const g=p;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Bt,{size:16}),e[8]=h):h=e[8];let b;e[9]!==a||e[10]!==s||e[11]!==i?(b=()=>{F("nav_destination_clicked",{destination:xi,target:i?"project":"org"}),i&&a(i,{panel:"settings"}),s?.()},e[9]=a,e[10]=s,e[11]=i,e[12]=b):b=e[12];let x;return e[13]!==u||e[14]!==f||e[15]!==g||e[16]!==b?(x=n.jsx(L,{className:"gap-1",children:n.jsx(ue,{dataTour:Z.settings,icon:h,label:f,isActive:u,link:g,onSelect:b})}),e[13]=u,e[14]=f,e[15]=g,e[16]=b,e[17]=x):x=e[17],x}function ki(t,e){const s=new Set(e);return s.size===0?t:t.filter(r=>s.has(r.connectionId))}function Ni(t){const e=t.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(s=>!!s&&typeof s=="object"&&typeof s.connectionId=="string"&&typeof s.toolName=="string"):[]}function _i(t){const e=y.c(13),{onNavigate:s}=t,r=T(),{project:o}=Se(),i=pt(),a=we(),l=no(),c=Xn(o),d=as(),u=Jt(o?.id);if(!o)return null;let m;if(e[0]!==c.presence||e[1]!==u||e[2]!==o.metadata){const g=Mt(o.metadata),h=u??Qt(o.metadata);m=new Set(Yn(h,Zn(g,c.presence),u!==void 0?1:o.metadata.sidebarViewsVersion)),e[0]=c.presence,e[1]=u,e[2]=o.metadata,e[3]=m}else m=e[3];const f=m;let p;if(e[4]!==l||e[5]!==d||e[6]!==a||e[7]!==i||e[8]!==s||e[9]!==o||e[10]!==f||e[11]!==r){const g=[];f.has("site-editor")&&g.push({key:"site-editor",label:r("sidebar.projectNav.siteEditor"),icon:n.jsx(Vt,{size:16}),panel:"site-editor",isActive:Ci,dataTour:Z.siteEditor});const h={assets:{label:r("common.mainPanelTabs.assets"),icon:n.jsx(so,{size:16})},hosting:{label:r("common.mainPanelTabs.hosting"),icon:n.jsx(mn,{size:16})},e2e:{label:r("common.mainPanelTabs.e2e"),icon:n.jsx(Ys,{size:16})},analytics:{label:r("common.mainPanelTabs.analytics"),icon:n.jsx(Kt,{size:16})},cdn:{label:r("common.mainPanelTabs.cdn"),icon:n.jsx(un,{size:16})},experiments:{label:r("experiments.title"),icon:n.jsx(dn,{size:16})}};for(const x of eo){if(!f.has(x))continue;const j=h[x];g.push({key:x,label:j.label,icon:j.icon,panel:x,isActive:v=>v===x})}for(const x of ki(Ni(o),(o.connections??[]).map($i)))x.toolName!=="fetch_assets"&&g.push({key:`pinned:${x.connectionId}:${x.toolName}`,label:x.label||x.toolName,icon:x.icon?n.jsx("img",{src:x.icon,alt:"",className:"size-4 rounded-[3px]"}):n.jsx(to,{size:16}),panel:jt(x.connectionId,x.toolName),isActive:j=>j===jt(x.connectionId,x.toolName)});f.has("automations")&&g.push({key:"automations",label:r("sidebar.projectNav.automations"),icon:n.jsx(Ut,{size:16}),panel:"automations",isActive:wi,dataTour:Z.automations});const b=a.startsWith(M.projects);p=n.jsx(L,{className:"gap-1",children:g.map(x=>n.jsx(ue,{icon:x.icon,label:x.label,dataTour:x.dataTour,isActive:b&&x.isActive(l),trailing:d(x.panel)?n.jsx(nt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{F("project_nav_clicked",{surface:x.key}),i(o.id,{panel:x.panel}),s?.()}},x.key))}),e[4]=l,e[5]=d,e[6]=a,e[7]=i,e[8]=s,e[9]=o,e[10]=f,e[11]=r,e[12]=p}else p=e[12];return p}function wi(t){return t==="automations"||Ns(t)!==null}function $i(t){return t.connection_id}function Ci(t){return!!t&&Dt(t)}const Ii=3;function Pi(t,e){return t.status==="archived"||t.status==="done"?!1:e&&t.assigneeId===e?!0:Rn(t)||Dn(t)}function Ti(t,e,s){const r=new Map;for(const i of e){if(!Pi(i,s))continue;const a=An(i,t);for(const l of a){const c=r.get(l.id)??[];c.push({task:i,only:a.length===1}),r.set(l.id,c)}}const o=new Map;for(const[i,a]of r)a.sort((l,c)=>Number(c.only)-Number(l.only)||(c.task.updatedAt??"").localeCompare(l.task.updatedAt??"")),o.set(i,a.slice(0,Ii).map(l=>l.task));return o}function zi(t){const e=y.c(21),{task:s,orgSlug:r,isLast:o,onNavigate:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("span",{"aria-hidden":"true",className:"absolute top-0 left-4 h-1/2 w-3 rounded-bl-lg border-b border-l border-sidebar-border"}),e[0]=a):a=e[0];let l;e[1]!==o?(l=!o&&n.jsx("span",{"aria-hidden":"true",className:"absolute top-1/2 bottom-0 left-4 border-l border-sidebar-border"}),e[1]=o,e[2]=l):l=e[2];let c;e[3]!==r||e[4]!==s?(c=On(r,s),e[3]=r,e[4]=s,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==c?(d={org:r,taskKey:c},e[6]=r,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==i||e[10]!==s.status?(u=()=>{F("sidebar_attention_task_clicked",{status:s.status}),i?.()},e[9]=i,e[10]=s.status,e[11]=u):u=e[11];let m;e[12]!==s.title?(m=n.jsx("span",{className:"truncate",children:s.title}),e[12]=s.title,e[13]=m):m=e[13];let f;e[14]!==d||e[15]!==u||e[16]!==m?(f=n.jsx(Rt,{to:"/$org/tasks/{-$taskKey}",params:d,onClick:u,className:"flex h-8 items-center rounded-lg pr-2 pl-9 text-sm text-sidebar-foreground/70 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:m}),e[14]=d,e[15]=u,e[16]=m,e[17]=f):f=e[17];let p;return e[18]!==l||e[19]!==f?(p=n.jsxs("li",{className:"relative",children:[a,l,f]}),e[18]=l,e[19]=f,e[20]=p):p=e[20],p}function Ai(t){const e=y.c(35),{onNavigate:s}=t,r=T(),o=le(),{org:i,locator:a}=E(),l=At(),{projects:c}=Se(),d=He(),u=pt(),{data:m}=Y.useSession();let f;e[0]!==a||e[1]!==l?(f=Mn(a,l),e[0]=a,e[1]=l,e[2]=f):f=e[2];const p=!o&&!d;let g;e[3]!==f||e[4]!==p?(g={...f,enabled:p},e[3]=f,e[4]=p,e[5]=g):g=e[5];const{data:h}=st(g);if(d||c.length===0)return null;let b,x,j,v,S,k;if(e[6]!==o||e[7]!==h?.items||e[8]!==u||e[9]!==s||e[10]!==i||e[11]!==c||e[12]!==d||e[13]!==m?.user?.id||e[14]!==r){const $=Ti(zn(c),h?.items??[],m?.user?.id),w=o&&"pt-3";e[21]!==w?(v=z("flex flex-col gap-1",w),e[21]=w,e[22]=v):v=e[22],S=Z.projects,e[23]!==o||e[24]!==r?(k=!o&&n.jsx("p",{className:"px-2 pt-5 pb-0.5 text-xs font-medium text-muted-foreground/60",children:r("sidebar.projects.heading")}),e[23]=o,e[24]=r,e[25]=k):k=e[25],b=L,x="gap-1",j=c.map(C=>{const P=$.get(C.id)??[];return n.jsx(ue,{icon:n.jsx(ft,{icon:C.icon,name:C.title}),label:C.title,isActive:C.id===d,onSelect:()=>{F("sidebar_project_clicked"),u(C.id,{panel:_s(C.metadata?.ui?.layout)}),s?.()},children:!o&&P.length>0&&n.jsx("ul",{className:"flex flex-col",children:P.map((O,ne)=>n.jsx(zi,{task:O,orgSlug:i.slug,isLast:ne===P.length-1,onNavigate:s},O.id))})},C.id)}),e[6]=o,e[7]=h?.items,e[8]=u,e[9]=s,e[10]=i,e[11]=c,e[12]=d,e[13]=m?.user?.id,e[14]=r,e[15]=b,e[16]=x,e[17]=j,e[18]=v,e[19]=S,e[20]=k}else b=e[15],x=e[16],j=e[17],v=e[18],S=e[19],k=e[20];let N;e[26]!==b||e[27]!==x||e[28]!==j?(N=n.jsx(b,{className:x,children:j}),e[26]=b,e[27]=x,e[28]=j,e[29]=N):N=e[29];let _;return e[30]!==v||e[31]!==S||e[32]!==k||e[33]!==N?(_=n.jsxs("div",{className:v,"data-tour":S,children:[k,N]}),e[30]=v,e[31]=S,e[32]=k,e[33]=N,e[34]=_):_=e[34],_}function Oi(){const t=y.c(8),e=T(),{capabilities:s,isPrivileged:r,loading:o,error:i}=ws(),a=Sn().length,l=$s();let c;return t[0]!==s||t[1]!==i||t[2]!==r||t[3]!==a||t[4]!==o||t[5]!==e||t[6]!==l?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:n.jsx(mo,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:n.jsx(gn,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:e("settings.nav.billing"),icon:n.jsx(ro,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:n.jsx(qt,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:n.jsx(Ht,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"repositories",label:e("settings.nav.repositories"),icon:n.jsx(ao,{size:14}),to:"/$org/settings/repositories",requires:"file-configs:manage"},{key:"connections",label:e("settings.nav.connections"),icon:n.jsx(fn,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:n.jsx(et,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:n.jsx(fo,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:n.jsx(uo,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:n.jsx(pn,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:n.jsx(et,{size:14}),to:"/$org/settings/members",group:"members",badge:a}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:n.jsx(co,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:n.jsx(lo,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"store",label:e("settings.nav.store"),icon:n.jsx(xn,{size:14}),to:"/$org/settings/store",requires:"registry:manage"},{key:"sso",label:e("settings.nav.security"),icon:n.jsx(nt,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(u=>({...u,items:u.items.flatMap(m=>{if(m.group){const[f]=l[m.group];return f?[{...m,to:f.to}]:Cs(m.group)?[]:[m]}return o||i?[m]:m.privilegedOnly?r?[m]:[]:m.requires?r||s[m.requires]?[m]:[]:[m]})})).filter(Ri),t[0]=s,t[1]=i,t[2]=r,t[3]=a,t[4]=o,t[5]=e,t[6]=l,t[7]=c):c=t[7],c}function Ri(t){return t.items.length>0}function ls(){const t=y.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=Is(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={select:Di},t[1]=r):r=t[1];const o=Ps(r);let i;if(t[2]!==s||t[3]!==o){const c=d=>{const u=d.replace("$org",s);return o===u||o.startsWith(`${u}/`)};i=d=>[d.to,...d.group?Ts(d.group):[]].some(c),t[2]=s,t[3]=o,t[4]=i}else i=t[4];const a=i;let l;return t[5]!==a||t[6]!==s?(l={org:s,isActive:a},t[5]=a,t[6]=s,t[7]=l):l=t[7],l}function Di(t){return t.location.pathname}function Mi(){const t=y.c(9),{isActive:e}=ls();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0];const[r,o]=A.useState(s);let i;t[1]!==e||t[2]!==r?(i=u=>r[u.key]??(!u.collapsible||u.items.some(e)),t[1]=e,t[2]=r,t[3]=i):i=t[3];const a=i;let l;t[4]!==a?(l=u=>o(m=>({...m,[u.key]:!a(u)})),t[4]=a,t[5]=l):l=t[5];const c=l;let d;return t[6]!==a||t[7]!==c?(d={isOpen:a,toggle:c},t[6]=a,t[7]=c,t[8]=d):d=t[8],d}function Li(t){const e=y.c(21),{group:s,open:r,onToggle:o,className:i}=t;let a,l,c,d,u;if(e[0]!==i||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==o||e[4]!==r){u=Symbol.for("react.early_return_sentinel");e:{const g=z("text-xs font-medium text-muted-foreground/60 truncate",i);if(!s.collapsible){u=n.jsx("p",{className:g,children:s.label});break e}a="button",l=o,c=r,d=z("flex w-full items-center gap-1 rounded-md hover:text-muted-foreground",g)}e[0]=i,e[1]=s.collapsible,e[2]=s.label,e[3]=o,e[4]=r,e[5]=a,e[6]=l,e[7]=c,e[8]=d,e[9]=u}else a=e[5],l=e[6],c=e[7],d=e[8],u=e[9];if(u!==Symbol.for("react.early_return_sentinel"))return u;let m;e[10]!==r?(m=r?n.jsx(oo,{size:12}):n.jsx(io,{size:12}),e[10]=r,e[11]=m):m=e[11];let f;e[12]!==s.label?(f=n.jsx("span",{className:"truncate",children:s.label}),e[12]=s.label,e[13]=f):f=e[13];let p;return e[14]!==a||e[15]!==l||e[16]!==c||e[17]!==d||e[18]!==m||e[19]!==f?(p=n.jsxs("button",{type:a,onClick:l,"aria-expanded":c,className:d,children:[m,f]}),e[14]=a,e[15]=l,e[16]=c,e[17]=d,e[18]=m,e[19]=f,e[20]=p):p=e[20],p}function Ei(t){const e=y.c(5),{icon:s,badge:r}=t;let o;e[0]!==r?(o=r?n.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=r,e[1]=o):o=e[1];let i;return e[2]!==s||e[3]!==o?(i=n.jsxs("span",{className:"relative shrink-0",children:[s,o]}),e[2]=s,e[3]=o,e[4]=i):i=e[4],i}function cs(t){const e=y.c(22),{onNavigate:s}=t,r=T(),o=Oi(),{org:i,isActive:a}=ls(),{isOpen:l,toggle:c}=Mi();let d;if(e[0]!==o||e[1]!==a||e[2]!==l||e[3]!==s||e[4]!==i||e[5]!==c){let h;e[7]!==a||e[8]!==l||e[9]!==s||e[10]!==i||e[11]!==c?(h=(b,x)=>n.jsxs("div",{className:"flex flex-col",children:[b.label&&n.jsx(Li,{group:b,open:l(b),onToggle:()=>c(b),className:z("px-2 pt-1.5 pb-0.5",x>0&&"mt-3")}),l(b)&&n.jsx(L,{className:"gap-0.5",children:b.items.map(j=>n.jsx(ue,{icon:n.jsx(Ei,{icon:j.icon,badge:j.badge}),label:j.label,isActive:a(j),link:{to:j.to,params:{org:i}},className:"gap-2.5",onSelect:()=>{F("settings_nav_clicked",{section_key:j.key,group_key:b.key}),s?.()}},j.key))})]},b.key),e[7]=a,e[8]=l,e[9]=s,e[10]=i,e[11]=c,e[12]=h):h=e[12],d=o.map(h),e[0]=o,e[1]=a,e[2]=l,e[3]=s,e[4]=i,e[5]=c,e[6]=d}else d=e[6];let u;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[13]=u):u=e[13];let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("span",{className:"shrink-0",children:n.jsx(Ze,{size:14})}),e[14]=m):m=e[14];let f;e[15]!==r?(f=r("settings.nav.signOut"),e[15]=r,e[16]=f):f=e[16];let p;e[17]!==f?(p=n.jsxs("div",{className:"mt-auto flex flex-col",children:[u,n.jsx(L,{className:"gap-0.5",children:n.jsx(ue,{icon:m,label:f,className:"gap-2.5",onSelect:Fi})})]}),e[17]=f,e[18]=p):p=e[18];let g;return e[19]!==d||e[20]!==p?(g=n.jsxs(n.Fragment,{children:[d,p]}),e[19]=d,e[20]=p,e[21]=g):g=e[21],g}function Fi(){F("signed_out",{source:"settings_sidebar"}),zt(),Y.signOut()}function ds(t){const e=y.c(8),{onNavigate:s}=t,r=T(),{org:o}=E();let i;e[0]!==r?(i=r("settings.nav.backToHome"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==o.slug?(a={to:"/$org/home",params:{org:o.slug}},e[2]=o.slug,e[3]=a):a=e[3];let l;return e[4]!==s||e[5]!==i||e[6]!==a?(l=n.jsx(rs,{label:i,link:a,onSelect:s}),e[4]=s,e[5]=i,e[6]=a,e[7]=l):l=e[7],l}function us(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"px-4 pb-1",children:n.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.372.0"]})}),t[0]=e):e=t[0],e}const qi="pt-1.5";function ms(t){const e=y.c(15),{header:s,back:r,body:o,footer:i,sheet:a}=t;let l;e[0]!==s?(l=s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"flex h-12 shrink-0 flex-row items-center gap-2 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:py-2",children:s}),n.jsx("div",{className:"mt-1.5 h-px shrink-0 bg-sidebar-border"})]}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==r?(c=r&&n.jsx("div",{className:"shrink-0 px-2",children:r}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==o?(d=n.jsx(Ls,{className:"gap-0 overflow-y-auto px-2 pt-2 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:o}),e[4]=o,e[5]=d):d=e[5];let u;e[6]!==i||e[7]!==l||e[8]!==c||e[9]!==d?(u=n.jsxs(n.Fragment,{children:[l,c,d,i]}),e[6]=i,e[7]=l,e[8]=c,e[9]=d,e[10]=u):u=e[10];const m=u;if(a){let p;return e[11]!==m?(p=n.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":Z.nav,children:m}),e[11]=m,e[12]=p):p=e[12],p}let f;return e[13]!==m?(f=n.jsx(Es,{className:qi,"data-tour":Z.nav,children:m}),e[13]=m,e[14]=f):f=e[14],f}function fs(t){const e=y.c(8),{onNavigate:s}=t,r=T(),o=He(),i=wo();if(!o)return null;let a;e[0]!==r?(a=r("sidebar.scope.allProjects"),e[0]=r,e[1]=a):a=e[1];let l;e[2]!==i||e[3]!==s?(l=()=>{i(),s?.()},e[2]=i,e[3]=s,e[4]=l):l=e[4];let c;return e[5]!==a||e[6]!==l?(c=n.jsx(rs,{label:a,onSelect:l}),e[5]=a,e[6]=l,e[7]=c):c=e[7],c}function ps(t){const e=y.c(2),{onNavigate:s}=t;let r;return e[0]!==s?(r=n.jsx(zs,{children:n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx(yi,{onNavigate:s}),n.jsx(_i,{onNavigate:s}),n.jsx(Si,{onNavigate:s}),n.jsx(Ai,{onNavigate:s})]})}),e[0]=s,e[1]=r):r=e[1],r}function Vi(){const t=y.c(3),e=We();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(ui,{}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(ms,{header:s,back:e?n.jsx(ds,{}):n.jsx(fs,{}),body:e?n.jsx(cs,{}):n.jsx(ps,{}),footer:e?n.jsx(us,{}):n.jsx(ni,{})}),t[1]=e,t[2]=r):r=t[2],r}function Bi(t){const e=y.c(13),{onClose:s}=t,r=We();let o;e[0]!==s?(o=n.jsx(mi,{onClose:s}),e[0]=s,e[1]=o):o=e[1];let i,a;e[2]!==r||e[3]!==s?(i=r?n.jsx(ds,{onNavigate:s}):n.jsx(fs,{onNavigate:s}),a=r?n.jsx(cs,{onNavigate:s}):n.jsx(ps,{onNavigate:s}),e[2]=r,e[3]=s,e[4]=i,e[5]=a):(i=e[4],a=e[5]);let l;e[6]!==r?(l=r?n.jsx(us,{}):n.jsx(oi,{}),e[6]=r,e[7]=l):l=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==a||e[11]!==l?(c=n.jsx(ms,{sheet:!0,header:o,back:i,body:a,footer:l}),e[8]=o,e[9]=i,e[10]=a,e[11]=l,e[12]=c):c=e[12],c}const Ui=new Set(["completed","failed","requires_action"]);function Hi(t){const e=y.c(5),[s]=Tt();let r;e[0]!==s?(r=i=>{s.enableSounds&&Ui.has(i.data.status)&&po(xo.dataUri).catch(Ki)},e[0]=s,e[1]=r):r=e[1];let o;e[2]!==t||e[3]!==r?(o={orgSlug:t,onTaskStatus:r},e[2]=t,e[3]=r,e[4]=o):o=e[4],go(o)}function Ki(t){console.warn("[status-sounds] playback failed:",t)}const Wi=2e3,Gi=4e4;function Qi(t){return t==="success"||t==="updated"}function Ji(t){const e=y.c(15);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const r=As(s),o=Ot();let i;e[1]!==r.checkout?(i=Qi(r.checkout),e[1]=r.checkout,e[2]=i):i=e[2];const a=i,[l]=A.useState(Xi);let c;e[3]!==t?(c=Ee.checkoutReturnPoll(t),e[3]=t,e[4]=c):c=e[4];let d;e[5]!==l?(d=()=>Date.now()<l?Wi:!1,e[5]=l,e[6]=d):d=e[6];let u;e[7]!==t||e[8]!==o?(u=async()=>(await o.invalidateQueries({queryKey:Ee.aiPlanEntitlements(t)}),Date.now()),e[7]=t,e[8]=o,e[9]=u):u=e[9];let m;e[10]!==a||e[11]!==c||e[12]!==d||e[13]!==u?(m={queryKey:c,enabled:a,gcTime:0,staleTime:0,refetchInterval:d,queryFn:u},e[10]=a,e[11]=c,e[12]=d,e[13]=u,e[14]=m):m=e[14],st(m)}function Xi(){return Date.now()+Gi}function cl(){const t=y.c(5),e=We(),{org:s}=E();Hi(s.slug),Ji(s.id);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(_o,{}),t[0]=r):r=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Je.Sidebar,{renderMobile:Yi,children:n.jsx(Vi,{})}),t[1]=o):o=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Je.Content,{children:n.jsx(Os,{})}),t[2]=i):i=t[2];let a;return t[3]!==e?(a=n.jsxs(Je,{expandedSidebar:e,notice:r,children:[o,i]}),t[3]=e,t[4]=a):a=t[4],a}function Yi(t){const{onClose:e}=t;return n.jsx(Bi,{onClose:e})}export{cl as default};
@@ -1 +1 @@
1
- import{c as m,l as f,j as n,af as d,O as p}from"./index-BYo7xjw_.js";import{u}from"./use-mobile-C2LLCzmr.js";import{P as c}from"./index-CSGdKnA2.js";function b(){const e=m.c(8),r=u(),a=!r&&"p-1.5";let t;e[0]!==a?(t=f("flex-1 min-h-0",a),e[0]=a,e[1]=t):t=e[1];const o=r?"plain":"card";let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(c.Content,{children:n.jsx(d,{children:n.jsx(p,{})})}),e[2]=i):i=e[2];let s;e[3]!==o?(s=n.jsx(c,{"data-testid":"settings-panel",variant:o,children:i}),e[3]=o,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("div",{className:t,children:s}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}export{b as default};
1
+ import{c as m,l as f,j as n,af as d,O as p}from"./index-Cjhl57C5.js";import{u}from"./use-mobile-C5SrWG9H.js";import{P as c}from"./index-CZFOUXi8.js";function b(){const e=m.c(8),r=u(),a=!r&&"p-1.5";let t;e[0]!==a?(t=f("flex-1 min-h-0",a),e[0]=a,e[1]=t):t=e[1];const o=r?"plain":"card";let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(c.Content,{children:n.jsx(d,{children:n.jsx(p,{})})}),e[2]=i):i=e[2];let s;e[3]!==o?(s=n.jsx(c,{"data-testid":"settings-panel",variant:o,children:i}),e[3]=o,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("div",{className:t,children:s}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}export{b as default};