decocms 4.31.0 → 4.32.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 (234) hide show
  1. package/dist/client/assets/{AlertCircle-DDN3VPgH.js → AlertCircle-Db_5w_pO.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-BABdYIhs.js → ArrowUpRight-B2VxdxbH.js} +1 -1
  3. package/dist/client/assets/{Check-D9pD98TC.js → Check-VVh423TU.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-eA_D0se8.js → CheckCircle-auAoHYRc.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-CEttVXzH.js → ChevronDown-mDFyCzyV.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-CBhPLqlW.js → ChevronRight-Ceh-WF7H.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-DB19PJr3.js → ChevronUp-D03XJ0vS.js} +1 -1
  8. package/dist/client/assets/{Circle-C_Uwaadc.js → Circle-DNMct17O.js} +1 -1
  9. package/dist/client/assets/{Copy01-BqSpo14R.js → Copy01-CuSfBG1R.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-CZx_5q44.js → DotsVertical-Cr4sUrn_.js} +1 -1
  11. package/dist/client/assets/{Eye-2veooEq8.js → Eye-aR-oC6dj.js} +1 -1
  12. package/dist/client/assets/{FilterLines-Bhsdw1Jp.js → FilterLines-Cr2IL8ug.js} +1 -1
  13. package/dist/client/assets/{Globe01-iaaiJTp8.js → Globe01-DkdmhUM8.js} +1 -1
  14. package/dist/client/assets/{Globe04-Pp6spg9P.js → Globe04-TuZvt3ov.js} +1 -1
  15. package/dist/client/assets/{HardDrive-Bc5tB9pN.js → HardDrive-CrxPr3va.js} +1 -1
  16. package/dist/client/assets/{Key01-gZ5RTwBh.js → Key01-CfvrTjDF.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-BSrZgTU6.js → LayoutLeft-Cog6SqwZ.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-DkCU3S9w.js → LinkExternal01-BYpL3ACE.js} +1 -1
  19. package/dist/client/assets/{List-CNqrF6eE.js → List-D5svP-6k.js} +1 -1
  20. package/dist/client/assets/{Loading02-J8un_7vB.js → Loading02-D2Hh17zb.js} +1 -1
  21. package/dist/client/assets/{Monitor01-CgzOVFpb.js → Monitor01-cNkbuWdj.js} +1 -1
  22. package/dist/client/assets/{Palette-BAAsFrJa.js → Palette-Dz_ldMx7.js} +1 -1
  23. package/dist/client/assets/{Play-B5Yd6Z0i.js → Play-CVarwVeR.js} +1 -1
  24. package/dist/client/assets/{Plus-Cn5an5hF.js → Plus-DNCXili3.js} +1 -1
  25. package/dist/client/assets/{SearchLg-lz9lYchG.js → SearchLg-DvsDitCO.js} +1 -1
  26. package/dist/client/assets/{SearchMd-BELaZlqe.js → SearchMd-87dvi4KF.js} +1 -1
  27. package/dist/client/assets/{Settings02-C66CP-6J.js → Settings02-D7asukv0.js} +1 -1
  28. package/dist/client/assets/{Shield01-JdRvk1Dm.js → Shield01-BT2HQXan.js} +1 -1
  29. package/dist/client/assets/{Star01-CI0kjjiv.js → Star01-B90wIaBV.js} +1 -1
  30. package/dist/client/assets/{Stars01-Bu7Nhnx4.js → Stars01-D1lDEQh2.js} +1 -1
  31. package/dist/client/assets/{Stars02-BgcXdOF8.js → Stars02-LnA0-zz4.js} +1 -1
  32. package/dist/client/assets/{Sun-CWVJFGYw.js → Sun-DLqplG3r.js} +1 -1
  33. package/dist/client/assets/{SwitchHorizontal01-BR_j_D1S.js → SwitchHorizontal01-C9ua90Hw.js} +1 -1
  34. package/dist/client/assets/{Tool01-BAkx1ZdU.js → Tool01-dGPltLKJ.js} +1 -1
  35. package/dist/client/assets/{Trash01-CVVInA2O.js → Trash01-BJe3gUZc.js} +1 -1
  36. package/dist/client/assets/{Upload01-ByUZD5Uy.js → Upload01-DIYVb8n9.js} +1 -1
  37. package/dist/client/assets/{User01-7q5NgTw9.js → User01-DcNAHFa-.js} +1 -1
  38. package/dist/client/assets/{Users01-BX9kMyjx.js → Users01-q9IKnEsX.js} +1 -1
  39. package/dist/client/assets/{Users03-B6ET39UJ.js → Users03-BMw5o14D.js} +1 -1
  40. package/dist/client/assets/{X-BH6rGAp7.js → X-CYIGv8wX.js} +1 -1
  41. package/dist/client/assets/{XCircle-C44kYn0r.js → XCircle-29rFa-09.js} +1 -1
  42. package/dist/client/assets/{XClose-DjOcr3WE.js → XClose-DT64mUwh.js} +1 -1
  43. package/dist/client/assets/{Zap-kOKl7dUI.js → Zap-Br_Hg1wB.js} +1 -1
  44. package/dist/client/assets/{ZapSquare-ddNKzQhO.js → ZapSquare-0BsdXZY9.js} +1 -1
  45. package/dist/client/assets/{ZoomOut-DJV4-7Wr.js → ZoomOut-Dqj1q_yU.js} +1 -1
  46. package/dist/client/assets/{access-gate-CowGDaFA.js → access-gate-033kBvzX.js} +1 -1
  47. package/dist/client/assets/{add-section-modal-zsBozNm7.js → add-section-modal-DRg-YhLT.js} +1 -1
  48. package/dist/client/assets/{agent-capabilities-jSKruONI.js → agent-capabilities-CRvnIg9m.js} +1 -1
  49. package/dist/client/assets/{agent-icon-DMnz6o4Z.js → agent-icon-EdtPDJXM.js} +1 -1
  50. package/dist/client/assets/{agents-list-B9y6dbW5.js → agents-list-COIOrWTd.js} +1 -1
  51. package/dist/client/assets/{ai-providers-vr0VjD3P.js → ai-providers--C84J8bO.js} +1 -1
  52. package/dist/client/assets/{alert-BDbpZ2FA.js → alert-BG1upMQ5.js} +1 -1
  53. package/dist/client/assets/{alert-dialog-Bp9SnoCg.js → alert-dialog-BbHr6pLd.js} +1 -1
  54. package/dist/client/assets/app-editor-DFt6eACm.js +1 -0
  55. package/dist/client/assets/{auth-Di_P-iCF.js → auth-BEQgA40y.js} +1 -1
  56. package/dist/client/assets/{auth-catchall-BRasVk3i.js → auth-catchall-CfZrCH1R.js} +1 -1
  57. package/dist/client/assets/{auth-entry-BINExPhp.js → auth-entry-Cr25LD_X.js} +1 -1
  58. package/dist/client/assets/{auth-split-layout-D7ralijw.js → auth-split-layout-DSPfwaoV.js} +1 -1
  59. package/dist/client/assets/{authenticate-and-persist-oauth-BFF6bv-w.js → authenticate-and-persist-oauth-nkmQY5vG.js} +1 -1
  60. package/dist/client/assets/{automation-list-row-Bu1WzUZ2.js → automation-list-row-xAynmOqb.js} +1 -1
  61. package/dist/client/assets/{automation-runs-x80BWaX2.js → automation-runs-D98OdVC5.js} +1 -1
  62. package/dist/client/assets/{automations-DzmU3FWb.js → automations-DVf2_2C_.js} +1 -1
  63. package/dist/client/assets/{autosend-LAVMz_8m.js → autosend-REHFoRRR.js} +1 -1
  64. package/dist/client/assets/{avatar-jxHzinps.js → avatar-B2d04wRu.js} +1 -1
  65. package/dist/client/assets/{badge-DWJF1rj3.js → badge-DiKw8RbW.js} +1 -1
  66. package/dist/client/assets/{block-document-zR9sT0LV.js → block-document-CPFtVEpa.js} +1 -1
  67. package/dist/client/assets/{brand-context-CYi6YD9v.js → brand-context-DHN-dSvf.js} +1 -1
  68. package/dist/client/assets/{breadcrumb-CID4x2nt.js → breadcrumb-CC9Gfd5p.js} +1 -1
  69. package/dist/client/assets/{buckets-D6nMzOmj.js → buckets-CKM582z_.js} +1 -1
  70. package/dist/client/assets/{bulk-category-panel-CEKcOqhA.js → bulk-category-panel-B4j7bMVg.js} +1 -1
  71. package/dist/client/assets/{calendar-Chv9-zN_.js → calendar-Dh7ySVQi.js} +1 -1
  72. package/dist/client/assets/{capability-load-error-NwvZgiL0.js → capability-load-error-Dg3eOVDS.js} +1 -1
  73. package/dist/client/assets/{card-CBmF5m-m.js → card-D5CauofV.js} +1 -1
  74. package/dist/client/assets/category-editor-SUwhv1rI.js +1 -0
  75. package/dist/client/assets/{chat-context-ISwsXKv9.js → chat-context-BsRUICZs.js} +1 -1
  76. package/dist/client/assets/{checkbox-DBlqT1WL.js → checkbox-DhHH_mmR.js} +1 -1
  77. package/dist/client/assets/{cli-auth-success-DfURWM00.js → cli-auth-success-NNi-TvQO.js} +1 -1
  78. package/dist/client/assets/collection-detail-L5hLAtjn.js +1 -0
  79. package/dist/client/assets/{collection-display-button-CUzx5aOk.js → collection-display-button-D5THp447.js} +1 -1
  80. package/dist/client/assets/{collection-search-DfEE2GsK.js → collection-search-BgFXdSC0.js} +1 -1
  81. package/dist/client/assets/{collection-table-wrapper-J7LDDNaQ.js → collection-table-wrapper-328T8nSg.js} +1 -1
  82. package/dist/client/assets/{collection-tabs-CrxdsgPv.js → collection-tabs-Cxl16cFM.js} +1 -1
  83. package/dist/client/assets/{command-B6K8iBEi.js → command-Cx8bKs7m.js} +1 -1
  84. package/dist/client/assets/{commerce-onboarding-DVM5ZiJ9.js → commerce-onboarding-DmVh_p0A.js} +1 -1
  85. package/dist/client/assets/config-ByOdiANb.js +1 -0
  86. package/dist/client/assets/{connect-desktop-dialog-C5gWxTfZ.js → connect-desktop-dialog-BWEylyh-.js} +1 -1
  87. package/dist/client/assets/{connection-card-CZxKCMQN.js → connection-card-CmLZ3i0M.js} +1 -1
  88. package/dist/client/assets/{connection-detail-BMQJ5Wiz.js → connection-detail-tk24zTUu.js} +1 -1
  89. package/dist/client/assets/{connection-form-helpers-EFv1AB2t.js → connection-form-helpers-C1s-KSGU.js} +1 -1
  90. package/dist/client/assets/{connections-CDjH9JlJ.js → connections-qp5myPzL.js} +1 -1
  91. package/dist/client/assets/{decopilot-sse-pool-CuiGv1QM.js → decopilot-sse-pool-CiyJzTNT.js} +1 -1
  92. package/dist/client/assets/{dialog-BQdZemDY.js → dialog-BFPr54WG.js} +1 -1
  93. package/dist/client/assets/{domain-settings-WYiwjkZ2.js → domain-settings-DHynySRj.js} +1 -1
  94. package/dist/client/assets/{drawer-CGC9vUmu.js → drawer-DcfPm_vi.js} +1 -1
  95. package/dist/client/assets/{dropdown-menu-p-OE20Zw.js → dropdown-menu-BlfYJTRx.js} +1 -1
  96. package/dist/client/assets/{empty-state-Ccota3IC.js → empty-state-CeXPb2VU.js} +1 -1
  97. package/dist/client/assets/{extract-connection-data-CdJ1S70n.js → extract-connection-data-5BWVDciX.js} +1 -1
  98. package/dist/client/assets/file-explorer-CwWWlUiZ.js +2 -0
  99. package/dist/client/assets/{file-type-icon-DqiLifA7.js → file-type-icon-D2xX1xnm.js} +1 -1
  100. package/dist/client/assets/{files-Bah_SCfU.js → files-Bzd-uxW7.js} +1 -1
  101. package/dist/client/assets/{form-DfINtBPW.js → form-Trt6kqr0.js} +1 -1
  102. package/dist/client/assets/{general-DmA99jX8.js → general-C_FzX3UD.js} +1 -1
  103. package/dist/client/assets/github-repo-picker-CTMAbHxR.js +1 -0
  104. package/dist/client/assets/{hooks-D2FVCNXX.js → hooks-BSiz_AKB.js} +1 -1
  105. package/dist/client/assets/{index-Bcenb0s5.js → index-35Tak7qk.js} +1 -1
  106. package/dist/client/assets/{index-CCgql0MU.js → index-BMxNGICG.js} +1 -1
  107. package/dist/client/assets/{index-l6j2xqWS.js → index-C8Vaq4GI.js} +1 -1
  108. package/dist/client/assets/{index-BahpiC2M.js → index-CLj_5r89.js} +18 -18
  109. package/dist/client/assets/{index-DPa2Fjxz.js → index-CPelPFhM.js} +1 -1
  110. package/dist/client/assets/{index-Ba398iyy.js → index-CfigvylE.js} +1 -1
  111. package/dist/client/assets/{index-CbL4CdsD.js → index-CqLJnBFj.js} +1 -1
  112. package/dist/client/assets/{index-CLnnofn-.js → index-CsAnNpRc.js} +1 -1
  113. package/dist/client/assets/index-Cwk7SIrW.js +1 -0
  114. package/dist/client/assets/{index-tBxjvT4Q.js → index-DtEv5T2k.js} +1 -1
  115. package/dist/client/assets/{index-C0bkN5At.js → index-GJfKnZn_.js} +1 -1
  116. package/dist/client/assets/index-dPmP2Tp4.css +1 -0
  117. package/dist/client/assets/index-g8i--Kvx.js +1 -0
  118. package/dist/client/assets/index-gz1tAOXr.js +519 -0
  119. package/dist/client/assets/{index-redirect-D0g34ndU.js → index-redirect-DDeVol4f.js} +1 -1
  120. package/dist/client/assets/{index-khEoYm7s.js → index-uAuiYVKB.js} +1 -1
  121. package/dist/client/assets/{input-DCvWYNIA.js → input-BdpM0TEL.js} +1 -1
  122. package/dist/client/assets/{integration-icon-BnLYSlPi.js → integration-icon-Bf1Nt7-n.js} +1 -1
  123. package/dist/client/assets/{invite-member-dialog-C9EZLVmA.js → invite-member-dialog-BPpBeslC.js} +1 -1
  124. package/dist/client/assets/{label-B9OlPCFU.js → label-DjarSga4.js} +1 -1
  125. package/dist/client/assets/{login-DBQzDD9i.js → login-DoEfLmln.js} +1 -1
  126. package/dist/client/assets/{mcp-oauth-D6cRXUdj.js → mcp-oauth-DWePFULn.js} +1 -1
  127. package/dist/client/assets/{members-o2e_prd5.js → members-B3B7IloN.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-uei6eymP.js → monaco-editor-D4hwKq5W.js} +1 -1
  129. package/dist/client/assets/{monitoring-stats-row-C_bnkbSi.js → monitoring-stats-row-B7f4HN3G.js} +1 -1
  130. package/dist/client/assets/{oauth-callback-C1JCb0s-.js → oauth-callback-BoH2P_bn.js} +1 -1
  131. package/dist/client/assets/{oauth-callback-ai-provider-D401bSS4.js → oauth-callback-ai-provider-CuMMS3lP.js} +1 -1
  132. package/dist/client/assets/{onboarding-B4W2rpI5.js → onboarding-wUH-DGeU.js} +1 -1
  133. package/dist/client/assets/{org-install-BpJQvOCj.js → org-install-DXT9J0I8.js} +1 -1
  134. package/dist/client/assets/{org-layout-DrOqQxU3.js → org-layout-BrLrP4eq.js} +1 -1
  135. package/dist/client/assets/{organization-choice-v8VQ90gJ.js → organization-choice-C6lztIt3.js} +1 -1
  136. package/dist/client/assets/{page-seo-form-BbHa2hSM.js → page-seo-form-DQA0wg3R.js} +1 -1
  137. package/dist/client/assets/page-seo-sheet-DurRfIZb.js +1 -0
  138. package/dist/client/assets/{popover-BLU6o9-K.js → popover-CKlhZKOG.js} +1 -1
  139. package/dist/client/assets/post-editor--rN0Vw5m.js +1 -0
  140. package/dist/client/assets/{primitives-Bl_VoSyu.js → primitives-CAgzIvjA.js} +1 -1
  141. package/dist/client/assets/{profile-BMYDl9Kt.js → profile-CY7AQM7b.js} +1 -1
  142. package/dist/client/assets/project-app-view-CHytmdja.js +1 -0
  143. package/dist/client/assets/record-editor-CNuCZ1ZI.js +1 -0
  144. package/dist/client/assets/registry-BZBmEaE-.js +2 -0
  145. package/dist/client/assets/{registry-layout-CvG6sX0m.js → registry-layout-D25VdidL.js} +1 -1
  146. package/dist/client/assets/{require-capability-CKJDNzAw.js → require-capability-CYDVRBkW.js} +1 -1
  147. package/dist/client/assets/{required-auth-layout-D3BZEQrv.js → required-auth-layout-DGQr874S.js} +1 -1
  148. package/dist/client/assets/{reset-password-BFuPgFz_.js → reset-password-Ci3XAz4n.js} +1 -1
  149. package/dist/client/assets/{roles-4ANLB4UB.js → roles-oTvdi6Hw.js} +1 -1
  150. package/dist/client/assets/{search-input-CTSKqHHp.js → search-input-DJ05ViVl.js} +1 -1
  151. package/dist/client/assets/{secrets-BCo67r-R.js → secrets-HOer9kv3.js} +1 -1
  152. package/dist/client/assets/{sections-editor-DPcDwqoS.js → sections-editor-5ju1cxyx.js} +2 -2
  153. package/dist/client/assets/{select-Bvp0qEbr.js → select-CeXH3gjW.js} +1 -1
  154. package/dist/client/assets/{select-model-DVM5M8H6.js → select-model-DYpThBVD.js} +1 -1
  155. package/dist/client/assets/seo-editor-BIKFI9Fl.js +1 -0
  156. package/dist/client/assets/{settings-layout-QuIh1KuT.js → settings-layout-kdDgoGQC.js} +1 -1
  157. package/dist/client/assets/{settings-section-B2ndiHlo.js → settings-section-CyBwf4qC.js} +1 -1
  158. package/dist/client/assets/{shell-controls-Z5l-bd1U.js → shell-controls-CD6bdY9w.js} +1 -1
  159. package/dist/client/assets/{shell-layout-C6qLFIpM.js → shell-layout-IYwmwgpp.js} +1 -1
  160. package/dist/client/assets/{sidebar-ChHxgM9m.js → sidebar-B_c4VYke.js} +1 -1
  161. package/dist/client/assets/{skeleton-v_XZSYYc.js → skeleton-Dl1AhqdL.js} +1 -1
  162. package/dist/client/assets/{sso-BGRu6zvV.js → sso-1rsjb8hb.js} +1 -1
  163. package/dist/client/assets/{store-CAKjNWnW.js → store-BHrgdJmn.js} +1 -1
  164. package/dist/client/assets/store-registry-B0GhK-Yr.js +2 -0
  165. package/dist/client/assets/{studio-tools-CWpmP6KM.js → studio-tools-F5G0urN7.js} +1 -1
  166. package/dist/client/assets/{switch-yI9gdvWp.js → switch-B9wSH4oe.js} +1 -1
  167. package/dist/client/assets/{tab-id-yjGvxWDL.js → tab-id-DznSzCvK.js} +1 -1
  168. package/dist/client/assets/{table-YAS6wtBG.js → table-C2Aqsz0m.js} +1 -1
  169. package/dist/client/assets/{tabs-Dt4ufEhX.js → tabs-W14caGou.js} +1 -1
  170. package/dist/client/assets/{textarea-DCN5TwaT.js → textarea-ConjZ7fN.js} +1 -1
  171. package/dist/client/assets/{toggle-group-CnMNmD9w.js → toggle-group-CYFywiUW.js} +1 -1
  172. package/dist/client/assets/{toolbar-Bw9zu9WL.js → toolbar-DR2I0_KA.js} +1 -1
  173. package/dist/client/assets/{toolbar-icon-button-D-LZYEgI.js → toolbar-icon-button-Cf6OwFTU.js} +1 -1
  174. package/dist/client/assets/{tools-list-D9OxMY8P.js → tools-list-DL49NRaT.js} +1 -1
  175. package/dist/client/assets/{tooltip-s6_x3f9a.js → tooltip-C51X6QKO.js} +1 -1
  176. package/dist/client/assets/{types-uVqvyouI.js → types-C0d4Ohpx.js} +1 -1
  177. package/dist/client/assets/{use-ai-providers-B2zGkuJg.js → use-ai-providers-BqQDQsEQ.js} +1 -1
  178. package/dist/client/assets/{use-automations-B6grDoMr.js → use-automations-tqGwPES0.js} +1 -1
  179. package/dist/client/assets/{use-capability-B-obK3ST.js → use-capability-CqEMs0z_.js} +1 -1
  180. package/dist/client/assets/{use-clock-tick-zj_1xbt5.js → use-clock-tick-Bz8Z9860.js} +1 -1
  181. package/dist/client/assets/{use-collections-Dd1RRH7k.js → use-collections-Y12o4qWE.js} +1 -1
  182. package/dist/client/assets/{use-connection-C-rUOOpn.js → use-connection-D5Vs5qOp.js} +1 -1
  183. package/dist/client/assets/{use-copy-CsNZH-9d.js → use-copy-Dc9VZjfD.js} +1 -1
  184. package/dist/client/assets/use-create-virtual-mcp-fbAeF2Sf.js +1 -0
  185. package/dist/client/assets/{use-debounced-autosave-Cp27TV8M.js → use-debounced-autosave-BPwP00mx.js} +1 -1
  186. package/dist/client/assets/{use-debounced-value-96swwTPW.js → use-debounced-value-DfUpwXh9.js} +1 -1
  187. package/dist/client/assets/{use-decopilot-events-CWlF2oHq.js → use-decopilot-events-C70DCxcq.js} +1 -1
  188. package/dist/client/assets/{use-delete-connection-CzdQPkHs.js → use-delete-connection-BBFdYZGQ.js} +1 -1
  189. package/dist/client/assets/{use-file-configs-DvpZmtIS.js → use-file-configs-DGZxsbJi.js} +1 -1
  190. package/dist/client/assets/{use-infinite-scroll-DxHNeSQt.js → use-infinite-scroll-BU44dmI-.js} +1 -1
  191. package/dist/client/assets/{use-join-requests-Dmnq5J5S.js → use-join-requests-DyX59dkl.js} +1 -1
  192. package/dist/client/assets/{use-mcp-client-B6zu078q.js → use-mcp-client-3hG4jk-y.js} +1 -1
  193. package/dist/client/assets/{use-mcp-prompts-DV4jud7n.js → use-mcp-prompts-K_jp9fAb.js} +1 -1
  194. package/dist/client/assets/{use-mcp-tools-Doyc2jlq.js → use-mcp-tools-DkI8MzuJ.js} +1 -1
  195. package/dist/client/assets/{use-members-XIoSlR3f.js → use-members-CcCdz_hQ.js} +1 -1
  196. package/dist/client/assets/{use-mobile-BXNoK8fo.js → use-mobile-BJ6No951.js} +1 -1
  197. package/dist/client/assets/use-navigate-to-agent-CZiiGkPG.js +1 -0
  198. package/dist/client/assets/{use-org-auth-client-CIP8sPzJ.js → use-org-auth-client-B7yAA88H.js} +1 -1
  199. package/dist/client/assets/{use-org-sso-CgrmSiGq.js → use-org-sso-DcXTIOxB.js} +1 -1
  200. package/dist/client/assets/{use-organization-roles-B67g_vGt.js → use-organization-roles-C6Eyg5qk.js} +1 -1
  201. package/dist/client/assets/{use-organization-settings-BLQXB5iH.js → use-organization-settings-BzhOQtxD.js} +1 -1
  202. package/dist/client/assets/{use-registry-connections-6rDSDO_p.js → use-registry-connections-DnT_Dh3O.js} +1 -1
  203. package/dist/client/assets/{use-secrets-OrnCuWHl.js → use-secrets-BBj5PT7D.js} +1 -1
  204. package/dist/client/assets/{use-status-sounds-B8zqs89p.js → use-status-sounds-B0huGKlG.js} +1 -1
  205. package/dist/client/assets/{use-view-mode-DTiLjVq5.js → use-view-mode-BL1OAyYV.js} +1 -1
  206. package/dist/client/assets/{use-virtual-mcp-Yg3Ni3JK.js → use-virtual-mcp-D3UxifiP.js} +1 -1
  207. package/dist/client/assets/useInfiniteQuery-8DjDwhQn.js +1 -0
  208. package/dist/client/assets/useSuspenseInfiniteQuery-BYjapKbe.js +1 -0
  209. package/dist/client/assets/{variant-calendar-BTQM7z3g.js → variant-calendar-Dx_VP5De.js} +1 -1
  210. package/dist/client/assets/{view-mode-toggle-B7w106-1.js → view-mode-toggle-DFM8ec78.js} +1 -1
  211. package/dist/client/index.html +2 -2
  212. package/dist/server/cli.js +1 -1
  213. package/dist/server/server.js +1 -1
  214. package/package.json +1 -1
  215. package/dist/client/assets/app-editor-BSFhGDxE.js +0 -1
  216. package/dist/client/assets/category-editor-D6BSL4oe.js +0 -1
  217. package/dist/client/assets/collection-detail-CNqIpkN1.js +0 -1
  218. package/dist/client/assets/file-explorer-BOc6SGhJ.js +0 -2
  219. package/dist/client/assets/github-repo-picker-DwvAhon6.js +0 -1
  220. package/dist/client/assets/index-BYSbf1og.css +0 -1
  221. package/dist/client/assets/index-BvtQ5hoD.js +0 -519
  222. package/dist/client/assets/index-DY0If5q0.js +0 -1
  223. package/dist/client/assets/index-Du1UcWzl.js +0 -1
  224. package/dist/client/assets/page-seo-sheet-ie-UStog.js +0 -1
  225. package/dist/client/assets/post-editor-BMz2I1ZM.js +0 -1
  226. package/dist/client/assets/project-app-view-ZWbZ9H90.js +0 -1
  227. package/dist/client/assets/record-editor-Dvckn3c6.js +0 -1
  228. package/dist/client/assets/registry-OZ9XyjaI.js +0 -2
  229. package/dist/client/assets/seo-editor-DR7IbWtS.js +0 -1
  230. package/dist/client/assets/store-registry-E_hI4lyR.js +0 -2
  231. package/dist/client/assets/use-create-virtual-mcp-Bb67U94y.js +0 -1
  232. package/dist/client/assets/use-navigate-to-agent-DMVkXcE5.js +0 -1
  233. package/dist/client/assets/useInfiniteQuery-CsANrC6N.js +0 -1
  234. package/dist/client/assets/useSuspenseInfiniteQuery-dATP5Fxl.js +0 -1
@@ -1 +0,0 @@
1
- import{c as E,Z as at,k as ht,p as Nt,d as Ze,K as ot,r as A,j as s,l as L,B as et,i as jt}from"./index-BahpiC2M.js";import{g as $e}from"./get-initials-D-f_fDFw.js";import{A as Be}from"./avatar-jxHzinps.js";import{B as vt}from"./badge-DWJF1rj3.js";import{i as yt,b as tt,s as Dt,n as Ct}from"./Loading02-J8un_7vB.js";import{i as St}from"./List-CNqrF6eE.js";import{s as wt}from"./Plus-Cn5an5hF.js";import{s as nt}from"./User01-7q5NgTw9.js";import{u as rt}from"./use-members-XIoSlR3f.js";import{u as it}from"./studio-tools-CWpmP6KM.js";import{f as ct}from"./format-time-Cy7tTmZp.js";import{i as It}from"./AlertCircle-DDN3VPgH.js";import{i as Tt}from"./CheckCircle-eA_D0se8.js";import{i as kt}from"./Circle-C_Uwaadc.js";import{s as _t}from"./Eye-2veooEq8.js";import{d as zt,e as At,a as Et}from"./dialog-BQdZemDY.js";import{b as Je,D as Ve,c as Ee,a as We}from"./dropdown-menu-p-OE20Zw.js";import{a as Ot,b as $t,P as Bt}from"./popover-BLU6o9-K.js";import{C as Mt}from"./calendar-Chv9-zN_.js";import{t as Oe}from"./ChevronDown-CEttVXzH.js";import{s as Lt}from"./Trash01-CVVInA2O.js";import{i as Pt}from"./X-BH6rGAp7.js";import"./use-org-auth-client-CIP8sPzJ.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Check-D9pD98TC.js";import"./ChevronRight-CBhPLqlW.js";function Rt(){const t=E.c(13),{locator:e}=at(),l=it();let o;t[0]!==e?(o=ot.taskBoardItems(e),t[0]=e,t[1]=o):o=t[1];let a;t[2]!==l?(a=async()=>(await l.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=l,t[3]=a):a=t[3];let r;t[4]!==o||t[5]!==a?(r={queryKey:o,queryFn:a},t[4]=o,t[5]=a,t[6]=r):r=t[6];const d=ht(r);let n;t[7]!==d.data?(n=d.data??[],t[7]=d.data,t[8]=n):n=t[8];let i;return t[9]!==d.error||t[10]!==d.isLoading||t[11]!==n?(i={items:n,isLoading:d.isLoading,error:d.error},t[9]=d.error,t[10]=d.isLoading,t[11]=n,t[12]=i):i=t[12],i}function Ft(){const t=E.c(30),{locator:e}=at(),l=it(),o=Nt();let a;t[0]!==e?(a=ot.taskBoardItems(e),t[0]=e,t[1]=a):a=t[1];const r=a;let d;t[2]!==o||t[3]!==r?(d=()=>o.invalidateQueries({queryKey:r}),t[2]=o,t[3]=r,t[4]=d):d=t[4];const n=d;let i;t[5]!==l?(i=D=>l.call("TASK_BOARD_ITEM_CREATE",D),t[5]=l,t[6]=i):i=t[6];let c;t[7]!==n||t[8]!==i?(c={mutationFn:i,onSuccess:n},t[7]=n,t[8]=i,t[9]=c):c=t[9];const m=Ze(c);let x;t[10]!==l?(x=D=>l.call("TASK_BOARD_ITEM_UPDATE",D),t[10]=l,t[11]=x):x=t[11];let g,p;t[12]!==o||t[13]!==r?(g=async D=>{await o.cancelQueries({queryKey:r});const w=o.getQueryData(r);return o.setQueryData(r,h=>h?.map(v=>v.id===D.id?{...v,...D}:v)),{previous:w}},p=(D,w,h)=>{h?.previous&&o.setQueryData(r,h.previous)},t[12]=o,t[13]=r,t[14]=g,t[15]=p):(g=t[14],p=t[15]);let u;t[16]!==n||t[17]!==x||t[18]!==g||t[19]!==p?(u={mutationFn:x,onMutate:g,onError:p,onSettled:n},t[16]=n,t[17]=x,t[18]=g,t[19]=p,t[20]=u):u=t[20];const N=Ze(u);let y;t[21]!==l?(y=D=>l.call("TASK_BOARD_ITEM_DELETE",{id:D}),t[21]=l,t[22]=y):y=t[22];let C;t[23]!==n||t[24]!==y?(C={mutationFn:y,onSuccess:n},t[23]=n,t[24]=y,t[25]=C):C=t[25];const b=Ze(C);let j;return t[26]!==m||t[27]!==b||t[28]!==N?(j={create:m,update:N,remove:b},t[26]=m,t[27]=b,t[28]=N,t[29]=j):j=t[29],j}const dt=["triage","todo","in_progress","in_review","done"],Q={triage:{label:"Triage",icon:It,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:kt,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:yt,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:_t,iconClassName:"text-amber-500"},done:{label:"Done",icon:Tt,iconClassName:"text-green-600"}},Kt=["low","medium","high","urgent"],ye={low:{label:"Low",badgeClassName:"bg-muted text-muted-foreground",flagClassName:"text-muted-foreground"},medium:{label:"Medium",badgeClassName:"bg-blue-500/10 text-blue-600",flagClassName:"text-blue-500"},high:{label:"High",badgeClassName:"bg-orange-500/10 text-orange-600",flagClassName:"text-orange-500"},urgent:{label:"Urgent",badgeClassName:"bg-red-500/10 text-red-600",flagClassName:"text-red-500"}};function Ut(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function st(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Qt=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function qt(t){const e=E.c(133),{open:l,onClose:o,item:a,onSubmit:r,onDelete:d,isSaving:n}=t,{data:i}=rt(),c=i?.data?.members??[],[m,x]=A.useState(a?.title??""),[g,p]=A.useState(a?.description??""),[u,N]=A.useState(a?.status??"triage"),[y,C]=A.useState(a?.priority??"medium"),[b,j]=A.useState(a?.assigneeId??null),D=a?.dueDate;let w;e[0]!==D?(w=st(D),e[0]=D,e[1]=w):w=e[1];const[h,v]=A.useState(w),[k,I]=A.useState(!1);let _;e[2]!==a?.assigneeId||e[3]!==a?.description||e[4]!==a?.dueDate||e[5]!==a?.priority||e[6]!==a?.status||e[7]!==a?.title||e[8]!==j||e[9]!==p||e[10]!==v?(_=()=>{x(a?.title??""),p(a?.description??""),N(a?.status??"triage"),C(a?.priority??"medium"),j(a?.assigneeId??null),v(st(a?.dueDate))},e[2]=a?.assigneeId,e[3]=a?.description,e[4]=a?.dueDate,e[5]=a?.priority,e[6]=a?.status,e[7]=a?.title,e[8]=j,e[9]=p,e[10]=v,e[11]=_):_=e[11];const O=_;let z;e[12]!==o||e[13]!==O?(z=()=>{o(),O()},e[12]=o,e[13]=O,e[14]=z):z=e[14];const $=z;let P;e[15]!==b||e[16]!==g||e[17]!==h||e[18]!==r||e[19]!==y||e[20]!==u||e[21]!==m?(P=()=>{const f=m.trim();f&&r({title:f,description:g.trim()||null,status:u,priority:y,assigneeId:b,dueDate:h?Ut(h):null})},e[15]=b,e[16]=g,e[17]=h,e[18]=r,e[19]=y,e[20]=u,e[21]=m,e[22]=P):P=e[22];const R=P;let F;e[23]!==b?(F=f=>f.userId===b,e[23]=b,e[24]=F):F=e[24];const K=c.find(F),B=At;let T;e[25]!==$?(T=f=>!f&&$(),e[25]=$,e[26]=T):T=e[26];const M=zt,q="flex h-[85vh] max-h-[720px] flex-col gap-0 overflow-hidden p-0 sm:max-w-[820px]",S="hidden",De=a?"Edit task":"New task";let Y;e[27]!==De?(Y=s.jsx(Et,{className:"sr-only",children:De}),e[27]=De,e[28]=Y):Y=e[28];const ut="flex min-h-0 flex-1 flex-col overflow-y-auto",ft="flex flex-col gap-4 border-b border-border px-6 pt-6 pb-5";let Ce;e[29]===Symbol.for("react.memo_cache_sentinel")?(Ce=f=>x(f.target.value),e[29]=Ce):Ce=e[29];let G;e[30]!==m?(G=s.jsx("input",{value:m,onChange:Ce,placeholder:"Task title",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-semibold text-foreground outline-none placeholder:text-muted-foreground/70"}),e[30]=m,e[31]=G):G=e[31];const xt="flex flex-wrap items-center gap-2",Me=Q[u].icon,Le=Q[u];let Se;e[32]!==Me||e[33]!==Le.iconClassName?(Se=s.jsx(Me,{size:13,className:Le.iconClassName}),e[32]=Me,e[33]=Le.iconClassName,e[34]=Se):Se=e[34];const Pe=Se,Re=Q[u];let we;e[35]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Oe,{size:12,className:"text-muted-foreground"}),e[35]=we):we=e[35];let H;e[36]!==Pe||e[37]!==Re.label?(H=s.jsx(Je,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[Pe,Re.label,we]})}),e[36]=Pe,e[37]=Re.label,e[38]=H):H=e[38];let Ie;e[39]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(Ve,{align:"start",className:"w-44",children:dt.map(f=>{const U=Q[f].icon;return s.jsxs(Ee,{onSelect:()=>N(f),className:"gap-2",children:[s.jsx(U,{size:13,className:Q[f].iconClassName}),Q[f].label]},f)})}),e[39]=Ie):Ie=e[39];let Z;e[40]!==H?(Z=s.jsxs(We,{children:[H,Ie]}),e[40]=H,e[41]=Z):Z=e[41];const Fe=ye[y];let J;e[42]!==Fe.badgeClassName?(J=L("size-2 rounded-full",Fe.badgeClassName),e[42]=Fe.badgeClassName,e[43]=J):J=e[43];let V;e[44]!==J?(V=s.jsx("span",{className:J}),e[44]=J,e[45]=V):V=e[45];const Ke=ye[y];let Te;e[46]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(Oe,{size:12,className:"text-muted-foreground"}),e[46]=Te):Te=e[46];let W;e[47]!==V||e[48]!==Ke.label?(W=s.jsx(Je,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[V,Ke.label,Te]})}),e[47]=V,e[48]=Ke.label,e[49]=W):W=e[49];let ke;e[50]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsx(Ve,{align:"start",className:"w-40",children:Kt.map(f=>s.jsx(Ee,{onSelect:()=>C(f),children:ye[f].label},f))}),e[50]=ke):ke=e[50];let X;e[51]!==W?(X=s.jsxs(We,{children:[W,ke]}),e[51]=W,e[52]=X):X=e[52];const Ue=We,Qe=Je,gt=!0,pt="button",bt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",qe=K?s.jsx(Be,{url:K.user?.image??void 0,fallback:$e(K.user?.name),shape:"circle",size:"2xs"}):s.jsx(nt,{size:13,className:"text-muted-foreground"}),Ye=K?.user?.name??"Unassigned";let _e;e[53]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(Oe,{size:12,className:"text-muted-foreground"}),e[53]=_e):_e=e[53];let ee;e[54]!==qe||e[55]!==Ye?(ee=s.jsxs("button",{type:pt,className:bt,children:[qe,Ye,_e]}),e[54]=qe,e[55]=Ye,e[56]=ee):ee=e[56];let te;e[57]!==Qe||e[58]!==ee?(te=s.jsx(Qe,{asChild:gt,children:ee}),e[57]=Qe,e[58]=ee,e[59]=te):te=e[59];let se;e[60]!==j?(se=s.jsx(Ee,{onSelect:()=>j(null),children:"Unassigned"}),e[60]=j,e[61]=se):se=e[61];let le;if(e[62]!==c||e[63]!==j){let f;e[65]!==j?(f=U=>s.jsxs(Ee,{onSelect:()=>j(U.userId),className:"gap-2",children:[s.jsx(Be,{url:U.user?.image??void 0,fallback:$e(U.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:U.user?.name??U.userId})]},U.userId),e[65]=j,e[66]=f):f=e[66],le=c.map(f),e[62]=c,e[63]=j,e[64]=le}else le=e[64];let ae;e[67]!==se||e[68]!==le?(ae=s.jsxs(Ve,{align:"start",className:"w-56",children:[se,le]}),e[67]=se,e[68]=le,e[69]=ae):ae=e[69];let oe;e[70]!==Ue||e[71]!==te||e[72]!==ae?(oe=s.jsxs(Ue,{children:[te,ae]}),e[70]=Ue,e[71]=te,e[72]=ae,e[73]=oe):oe=e[73];let ze;e[74]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsx(tt,{size:13,className:"text-muted-foreground"}),e[74]=ze):ze=e[74];let ne;e[75]!==h?(ne=h?Qt.format(h):"Due date",e[75]=h,e[76]=ne):ne=e[76];let re;e[77]!==h||e[78]!==v?(re=h?s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-0.5 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:f=>{f.stopPropagation(),v(null)},onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),v(null))},children:s.jsx(Pt,{size:12})}):s.jsx(Oe,{size:12,className:"text-muted-foreground"}),e[77]=h,e[78]=v,e[79]=re):re=e[79];let ie;e[80]!==ne||e[81]!==re?(ie=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[ze,ne,re]})}),e[80]=ne,e[81]=re,e[82]=ie):ie=e[82];const Ge=h??void 0;let ce;e[83]!==v||e[84]!==I?(ce=f=>{v(f??null),f&&I(!1)},e[83]=v,e[84]=I,e[85]=ce):ce=e[85];let de;e[86]!==Ge||e[87]!==ce?(de=s.jsx($t,{className:"w-auto p-0",align:"start",children:s.jsx(Mt,{mode:"single",selected:Ge,onSelect:ce,initialFocus:!0})}),e[86]=Ge,e[87]=ce,e[88]=de):de=e[88];let me;e[89]!==k||e[90]!==I||e[91]!==ie||e[92]!==de?(me=s.jsxs(Bt,{open:k,onOpenChange:I,children:[ie,de]}),e[89]=k,e[90]=I,e[91]=ie,e[92]=de,e[93]=me):me=e[93];let ue;e[94]!==Z||e[95]!==X||e[96]!==oe||e[97]!==me?(ue=s.jsxs("div",{className:xt,children:[Z,X,oe,me]}),e[94]=Z,e[95]=X,e[96]=oe,e[97]=me,e[98]=ue):ue=e[98];let fe;e[99]!==G||e[100]!==ue?(fe=s.jsxs("div",{className:ft,children:[G,ue]}),e[99]=G,e[100]=ue,e[101]=fe):fe=e[101];let xe;e[102]!==p?(xe=f=>p(f.target.value),e[102]=p,e[103]=xe):xe=e[103];let ge;e[104]!==g||e[105]!==xe?(ge=s.jsx("div",{className:"flex flex-1 flex-col px-6 py-5",children:s.jsx("textarea",{value:g,onChange:xe,placeholder:"Add a description…",className:"min-h-[320px] w-full flex-1 resize-none border-0 bg-transparent text-sm leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/70"})}),e[104]=g,e[105]=xe,e[106]=ge):ge=e[106];let pe;e[107]!==fe||e[108]!==ge?(pe=s.jsxs("div",{className:ut,children:[fe,ge]}),e[107]=fe,e[108]=ge,e[109]=pe):pe=e[109];let be;e[110]!==a||e[111]!==d?(be=a&&d&&s.jsx(et,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"text-muted-foreground hover:text-destructive",onClick:d,children:s.jsx(Lt,{size:14})}),e[110]=a,e[111]=d,e[112]=be):be=e[112];let he;e[113]!==n||e[114]!==m?(he=!m.trim()||n,e[113]=n,e[114]=m,e[115]=he):he=e[115];const He=a?"Save":"Create task";let Ne;e[116]!==R||e[117]!==he||e[118]!==He?(Ne=s.jsx(et,{size:"sm",className:"ml-auto",disabled:he,onClick:R,children:He}),e[116]=R,e[117]=he,e[118]=He,e[119]=Ne):Ne=e[119];let je;e[120]!==be||e[121]!==Ne?(je=s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-6 py-3",children:[be,Ne]}),e[120]=be,e[121]=Ne,e[122]=je):je=e[122];let ve;e[123]!==M||e[124]!==Y||e[125]!==pe||e[126]!==je?(ve=s.jsxs(M,{className:q,closeButtonClassName:S,children:[Y,pe,je]}),e[123]=M,e[124]=Y,e[125]=pe,e[126]=je,e[127]=ve):ve=e[127];let Ae;return e[128]!==B||e[129]!==l||e[130]!==ve||e[131]!==T?(Ae=s.jsx(B,{open:l,onOpenChange:T,children:ve}),e[128]=B,e[129]=l,e[130]=ve,e[131]=T,e[132]=Ae):Ae=e[132],Ae}function Ss(){const t=E.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(Ht,{})})})}),t[0]=e):e=t[0],e}const Yt=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function mt(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:Yt.format(e),overdue:l}}function Gt(t){const e=E.c(8),{iso:l}=t;let o;e[0]!==l?(o=mt(l),e[0]=l,e[1]=o):o=e[1];const{label:a,overdue:r}=o,d=r?"bg-red-500/10 text-red-600":"bg-muted text-muted-foreground";let n;e[2]!==d?(n=L("inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px]",d),e[2]=d,e[3]=n):n=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(tt,{size:10}),e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==n?(c=s.jsxs("span",{className:n,children:[i,a]}),e[5]=a,e[6]=n,e[7]=c):c=e[7],c}function Ht(){const t=E.c(45),{items:e,isLoading:l}=Rt(),o=Ft(),{data:a}=rt();let r;if(t[0]!==a?.data?.members){const S=a?.data?.members??[];r=new Map(S.map(Zt)),t[0]=a?.data?.members,t[1]=r}else r=t[1];const d=r,[n,i]=A.useState("board"),[c,m]=A.useState(!1),[x,g]=A.useState(null);let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{g(null),m(!0)},t[2]=p):p=t[2];const u=p;let N;t[3]===Symbol.for("react.memo_cache_sentinel")?(N=S=>{g(S),m(!0)},t[3]=N):N=t[3];const y=N;if(l&&e.length===0){let S;return t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(jt,{size:20,className:"animate-spin text-muted-foreground"})}),t[4]=S):S=t[4],S}const C=n==="board"?"max-w-[1400px]":"max-w-[900px]";let b;t[5]!==C?(b=L("mx-auto flex w-full flex-col gap-6 px-10 pt-10 pb-16",C),t[5]=C,t[6]=b):b=t[6];let j;t[7]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Board"}),t[7]=j):j=t[7];let D;t[8]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsxs(et,{size:"sm",onClick:u,children:[s.jsx(wt,{size:16}),"New task"]}),t[8]=D):D=t[8];const w=n==="list";let h;t[9]===Symbol.for("react.memo_cache_sentinel")?(h=()=>i("list"),t[9]=h):h=t[9];let v;t[10]!==w?(v=s.jsx(lt,{active:w,onClick:h,icon:St,label:"List"}),t[10]=w,t[11]=v):v=t[11];const k=n==="board";let I;t[12]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i("board"),t[12]=I):I=t[12];let _;t[13]!==k?(_=s.jsx(lt,{active:k,onClick:I,icon:Ct,label:"Board"}),t[13]=k,t[14]=_):_=t[14];let O;t[15]!==_||t[16]!==v?(O=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[D,s.jsxs("div",{className:"ml-auto inline-flex rounded-lg bg-muted p-0.5",children:[v,_]})]}),t[15]=_,t[16]=v,t[17]=O):O=t[17];let z;t[18]!==o.update||t[19]!==e||t[20]!==n||t[21]!==d?(z=e.length===0?s.jsx("div",{className:"rounded-xl border border-border bg-card px-4 py-12 text-center text-sm text-muted-foreground",children:"No tasks yet. Start one with New task."}):n==="board"?s.jsx(Jt,{items:e,memberByUserId:d,onOpen:y,onMove:(S,De)=>o.update.mutate({id:S,status:De})}):s.jsx("div",{className:"flex flex-col gap-2",children:e.map(S=>s.jsx(Wt,{item:S,assignee:S.assigneeId?d.get(S.assigneeId):void 0,onOpen:()=>y(S)},S.id))}),t[18]=o.update,t[19]=e,t[20]=n,t[21]=d,t[22]=z):z=t[22];let $;t[23]!==O||t[24]!==z||t[25]!==b?($=s.jsxs("div",{className:b,children:[j,O,z]}),t[23]=O,t[24]=z,t[25]=b,t[26]=$):$=t[26];const P=c?x?.id??"new":"closed";let R;t[27]===Symbol.for("react.memo_cache_sentinel")?(R=()=>m(!1),t[27]=R):R=t[27];const F=x??void 0,K=o.create.isPending||o.update.isPending;let B;t[28]!==o.create||t[29]!==o.update||t[30]!==x?(B=S=>{x?o.update.mutate({id:x.id,...S}):o.create.mutate(S),m(!1)},t[28]=o.create,t[29]=o.update,t[30]=x,t[31]=B):B=t[31];let T;t[32]!==o.remove||t[33]!==x?(T=x?()=>{o.remove.mutate(x.id),m(!1)}:void 0,t[32]=o.remove,t[33]=x,t[34]=T):T=t[34];let M;t[35]!==c||t[36]!==P||t[37]!==F||t[38]!==K||t[39]!==B||t[40]!==T?(M=s.jsx(qt,{open:c,onClose:R,item:F,isSaving:K,onSubmit:B,onDelete:T},P),t[35]=c,t[36]=P,t[37]=F,t[38]=K,t[39]=B,t[40]=T,t[41]=M):M=t[41];let q;return t[42]!==$||t[43]!==M?(q=s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[$,M]}),t[42]=$,t[43]=M,t[44]=q):q=t[44],q}function Zt(t){return[t.userId,t]}function lt(t){const e=E.c(11),{active:l,onClick:o,icon:a,label:r}=t,d=`${r} view`,n=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let i;e[0]!==n?(i=L("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",n),e[0]=n,e[1]=i):i=e[1];let c;e[2]!==a?(c=s.jsx(a,{size:14}),e[2]=a,e[3]=c):c=e[3];let m;return e[4]!==l||e[5]!==r||e[6]!==o||e[7]!==d||e[8]!==i||e[9]!==c?(m=s.jsxs("button",{type:"button",onClick:o,"aria-label":d,"aria-pressed":l,className:i,children:[c,r]}),e[4]=l,e[5]=r,e[6]=o,e[7]=d,e[8]=i,e[9]=c,e[10]=m):m=e[10],m}function Jt(t){const e=E.c(8),{items:l,memberByUserId:o,onOpen:a,onMove:r}=t,[d,n]=A.useState(null);let i;e[0]!==l||e[1]!==o||e[2]!==r||e[3]!==a||e[4]!==d?(i=dt.map(m=>{const x=l.filter(u=>u.status===m),g=Q[m],p=g.icon;return s.jsxs("div",{onDragOver:u=>{u.preventDefault(),n(m)},onDragLeave:u=>{u.currentTarget.contains(u.relatedTarget)||n(null)},onDrop:u=>{u.preventDefault();const N=u.dataTransfer.getData("text/plain");N&&r(N,m),n(null)},className:L("flex flex-col rounded-xl p-1 transition-colors",d===m&&"bg-muted/50"),children:[s.jsxs("div",{className:"flex items-center gap-2 p-2",children:[s.jsx(p,{size:14,className:L("shrink-0",g.iconClassName)}),s.jsx("span",{className:"text-xs text-foreground",children:g.label}),s.jsx("span",{className:"text-[11px] text-muted-foreground",children:x.length})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2",children:x.map(u=>s.jsx(Vt,{item:u,assignee:u.assigneeId?o.get(u.assigneeId):void 0,onOpen:()=>a(u)},u.id))})]},m)}),e[0]=l,e[1]=o,e[2]=r,e[3]=a,e[4]=d,e[5]=i):i=e[5];let c;return e[6]!==i?(c=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-5",children:i}),e[6]=i,e[7]=c):c=e[7],c}function Vt(t){const e=E.c(38),{item:l,assignee:o,onOpen:a}=t,r=ye[l.priority];let d;e[0]!==l.dueDate?(d=l.dueDate?mt(l.dueDate):null,e[0]=l.dueDate,e[1]=d):d=e[1];const n=d;let i;e[2]!==l.id?(i=I=>{I.dataTransfer.setData("text/plain",l.id),I.dataTransfer.effectAllowed="move"},e[2]=l.id,e[3]=i):i=e[3];let c;e[4]!==l.title?(c=s.jsx("span",{className:"min-w-0 truncate text-[13px] font-medium leading-snug text-foreground",children:l.title}),e[4]=l.title,e[5]=c):c=e[5];let m;e[6]!==o?(m=o?s.jsx(Be,{url:o.user?.image??void 0,fallback:$e(o.user?.name),shape:"circle",size:"2xs"}):s.jsx(nt,{size:13,className:"text-muted-foreground/60"}),e[6]=o,e[7]=m):m=e[7];const x=o?.user?.name;let g;e[8]!==m||e[9]!==x?(g=s.jsx(Xe,{icon:m,value:x}),e[8]=m,e[9]=x,e[10]=g):g=e[10];const p=n?.overdue?"text-red-500":"text-muted-foreground/60";let u;e[11]!==p?(u=L(p),e[11]=p,e[12]=u):u=e[12];let N;e[13]!==u?(N=s.jsx(tt,{size:13,className:u}),e[13]=u,e[14]=N):N=e[14];const y=n?.label,C=n?.overdue?"text-red-600":void 0;let b;e[15]!==y||e[16]!==C||e[17]!==N?(b=s.jsx(Xe,{icon:N,value:y,valueClassName:C}),e[15]=y,e[16]=C,e[17]=N,e[18]=b):b=e[18];let j;e[19]!==r.flagClassName?(j=s.jsx(Dt,{size:13,className:r.flagClassName}),e[19]=r.flagClassName,e[20]=j):j=e[20];let D;e[21]!==r.label||e[22]!==j?(D=s.jsx(Xe,{icon:j,value:r.label}),e[21]=r.label,e[22]=j,e[23]=D):D=e[23];let w;e[24]!==b||e[25]!==D||e[26]!==g?(w=s.jsxs("div",{className:"flex flex-col gap-1.5 text-[12px] text-muted-foreground",children:[g,b,D]}),e[24]=b,e[25]=D,e[26]=g,e[27]=w):w=e[27];let h;e[28]!==l.createdAt?(h=ct(new Date(l.createdAt)),e[28]=l.createdAt,e[29]=h):h=e[29];let v;e[30]!==h?(v=s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:h}),e[30]=h,e[31]=v):v=e[31];let k;return e[32]!==a||e[33]!==w||e[34]!==v||e[35]!==i||e[36]!==c?(k=s.jsxs("button",{type:"button",draggable:!0,onDragStart:i,onClick:a,className:"flex cursor-grab flex-col gap-2.5 rounded-[10px] border border-border bg-card px-3.5 py-3 text-left transition-colors hover:border-ring/40 active:cursor-grabbing",children:[c,w,v]}),e[32]=a,e[33]=w,e[34]=v,e[35]=i,e[36]=c,e[37]=k):k=e[37],k}function Xe(t){const e=E.c(10),{icon:l,value:o,valueClassName:a}=t;let r;e[0]!==l?(r=s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:l}),e[0]=l,e[1]=r):r=e[1];const d=o?a:"text-muted-foreground/50";let n;e[2]!==d?(n=L("min-w-0 truncate",d),e[2]=d,e[3]=n):n=e[3];const i=o??"—";let c;e[4]!==n||e[5]!==i?(c=s.jsx("span",{className:n,children:i}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let m;return e[7]!==r||e[8]!==c?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[r,c]}),e[7]=r,e[8]=c,e[9]=m):m=e[9],m}function Wt(t){const e=E.c(28),{item:l,assignee:o,onOpen:a}=t,r=Q[l.status],d=r.icon;let n;e[0]!==r.iconClassName?(n=L("shrink-0",r.iconClassName),e[0]=r.iconClassName,e[1]=n):n=e[1];let i;e[2]!==d||e[3]!==n?(i=s.jsx(d,{size:15,className:n}),e[2]=d,e[3]=n,e[4]=i):i=e[4];let c;e[5]!==l.title?(c=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=c):c=e[6];const m=ye[l.priority];let x;e[7]!==m.badgeClassName?(x=L("shrink-0 text-[10px]",m.badgeClassName),e[7]=m.badgeClassName,e[8]=x):x=e[8];const g=ye[l.priority];let p;e[9]!==x||e[10]!==g.label?(p=s.jsx(vt,{className:x,children:g.label}),e[9]=x,e[10]=g.label,e[11]=p):p=e[11];let u;e[12]!==l.dueDate?(u=l.dueDate&&s.jsx(Gt,{iso:l.dueDate}),e[12]=l.dueDate,e[13]=u):u=e[13];let N;e[14]!==o?(N=o&&s.jsx(Be,{url:o.user?.image??void 0,fallback:$e(o.user?.name),shape:"circle",size:"2xs"}),e[14]=o,e[15]=N):N=e[15];let y;e[16]!==l.createdAt?(y=ct(new Date(l.createdAt)),e[16]=l.createdAt,e[17]=y):y=e[17];let C;e[18]!==y?(C=s.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground/70",children:y}),e[18]=y,e[19]=C):C=e[19];let b;return e[20]!==a||e[21]!==C||e[22]!==i||e[23]!==c||e[24]!==p||e[25]!==u||e[26]!==N?(b=s.jsxs("button",{type:"button",onClick:a,className:"flex items-center gap-3 rounded-xl border border-border bg-card px-4 py-3 text-left transition-colors hover:border-ring/40",children:[i,c,p,u,N,C]}),e[20]=a,e[21]=C,e[22]=i,e[23]=c,e[24]=p,e[25]=u,e[26]=N,e[27]=b):b=e[27],b}export{Ss as default};
@@ -1 +0,0 @@
1
- import{c as $,j as s,Y as He,r as L,Z as se,b as le,l as B,M as me,_ as Ns,$ as ws,a as ge,a0 as Cs,a1 as ks,t as te,a2 as As,a3 as Is,p as $s,u as Ue,a4 as vt,K as zs,k as Ts,a5 as Ms,i as Gt,e as at,P as Wt,G as Os,H as Ps,I as Ds,J as Es,d as Fs,B as Ze,a6 as Rs,T as Ls,U as Bs,a7 as Hs,X as Us,a8 as Gs}from"./index-BahpiC2M.js";import{u as be,S as ct,a as dt,b as ue,c as J,d as q,e as qt,f as Kt,g as Ws,h as qs,i as et,j as Ks,k as Vs,l as Xs}from"./sidebar-ChHxgM9m.js";import{u as mt}from"./use-mobile-BXNoK8fo.js";import{n as Qs}from"./Loading02-J8un_7vB.js";import{u as Ys}from"./use-organization-settings-BLQXB5iH.js";import{S as oe}from"./skeleton-v_XZSYYc.js";import{i as Vt}from"./LayoutLeft-BSrZgTU6.js";import{T as ve}from"./toolbar-icon-button-D-LZYEgI.js";import{P as Ge,a as ze,b as We}from"./popover-BLU6o9-K.js";import{D as Xt,a as Qt,b as Yt}from"./drawer-CGC9vUmu.js";import{A as Re}from"./avatar-jxHzinps.js";import{a as fe,b as he,c as tt,T as pe}from"./tooltip-s6_x3f9a.js";import{a as yt}from"./Copy01-BqSpo14R.js";import{n as Js,i as Zs}from"./Globe01-iaaiJTp8.js";import{i as en}from"./ZoomOut-DJV4-7Wr.js";import{i as tn,a as sn}from"./ZapSquare-ddNKzQhO.js";import{i as st}from"./Monitor01-CgzOVFpb.js";import{n as nn,a as rn}from"./Sun-CWVJFGYw.js";import{a as ut}from"./Settings02-C66CP-6J.js";import{i as on}from"./Shield01-JdRvk1Dm.js";import{a as ln}from"./Users03-B6ET39UJ.js";import{a as St,b as _t,c as an,d as cn,A as ye,e as Nt,i as dn,s as mn,f as un}from"./agent-icon-DMnz6o4Z.js";import"./index-C0bkN5At.js";import{D as fn,a as hn,b as pn,c as wt,d as xn}from"./dropdown-menu-p-OE20Zw.js";import{i as ft}from"./Check-D9pD98TC.js";import{s as $e}from"./Plus-Cn5an5hF.js";import{u as gn}from"./use-connection-C-rUOOpn.js";import{u as Jt}from"./use-mcp-client-B6zu078q.js";import{u as ht,a as qe}from"./use-virtual-mcp-Yg3Ni3JK.js";import{i as Zt,S as es,a as Le,b as bn}from"./constants-B72Xmt_K.js";import{G as jn,g as nt,i as vn,a as it}from"./github-repo-picker-DwvAhon6.js";import{u as yn,S as ts,a as Sn,g as _n,b as Nn,c as wn}from"./use-navigate-to-agent-DMVkXcE5.js";import{I as Cn}from"./invite-member-dialog-C9EZLVmA.js";import{u as kn,A as An,g as In,a as $n}from"./agent-capabilities-jSKruONI.js";import{u as zn,v as Tn,C as Ct}from"./connect-desktop-dialog-C5gWxTfZ.js";import{i as Mn}from"./FilterLines-Bhsdw1Jp.js";import{T as On,a as Pn}from"./toggle-group-CnMNmD9w.js";import{u as Dn,a as pt,b as ss,T as En}from"./hooks-D2FVCNXX.js";import{u as xt,r as Fn}from"./shell-layout-C6qLFIpM.js";import{c as Rn,a as Ln,b as Bn,d as Hn,e as Un}from"./dialog-BQdZemDY.js";import{C as Gn,a as Wn,b as qn,c as Kn,d as Vn}from"./command-B6K8iBEi.js";import{u as ns}from"./studio-tools-CWpmP6KM.js";import{i as is}from"./Zap-kOKl7dUI.js";import{S as rs,M as Xn}from"./shell-controls-Z5l-bd1U.js";import{n as Qn}from"./Stars02-BgcXdOF8.js";import{g as Yn,u as Jn,S as Zn}from"./use-clock-tick-zj_1xbt5.js";import{f as ei}from"./format-time-Cy7tTmZp.js";import{t as gt}from"./ChevronDown-CEttVXzH.js";import{i as ti}from"./ChevronRight-CBhPLqlW.js";import{S as si,C as ni}from"./chat-context-ISwsXKv9.js";import{B as kt,a as ii,b as ri}from"./breadcrumb-CID4x2nt.js";import{i as os}from"./SearchMd-BELaZlqe.js";import{s as oi}from"./XClose-DjOcr3WE.js";import{A as li,a as ai,b as ci,c as di,d as mi,e as ui,f as fi}from"./alert-dialog-Bp9SnoCg.js";import{F as hi,a as pi,b as xi,c as gi,d as bi,f as ji,e as vi}from"./form-DfINtBPW.js";import{I as yi}from"./input-DCvWYNIA.js";import{f as Si}from"./reusable-new-chat-qqWu133U.js";import{T as ee}from"./toolbar-Bw9zu9WL.js";import"./X-BH6rGAp7.js";import"./User01-7q5NgTw9.js";import"./AlertCircle-DDN3VPgH.js";import"./Tool01-BAkx1ZdU.js";import"./SwitchHorizontal01-BR_j_D1S.js";import"./XCircle-C44kYn0r.js";import"./ArrowUpRight-BABdYIhs.js";import"./CheckCircle-eA_D0se8.js";import"./ChevronUp-DB19PJr3.js";import"./Circle-C_Uwaadc.js";import"./DotsVertical-CZx_5q44.js";import"./Eye-2veooEq8.js";import"./Star01-CI0kjjiv.js";import"./Globe04-Pp6spg9P.js";import"./HardDrive-Bc5tB9pN.js";import"./Key01-gZ5RTwBh.js";import"./LinkExternal01-DkCU3S9w.js";import"./List-CNqrF6eE.js";import"./Palette-BAAsFrJa.js";import"./Play-B5Yd6Z0i.js";import"./SearchLg-lz9lYchG.js";import"./Stars01-Bu7Nhnx4.js";import"./Trash01-CVVInA2O.js";import"./Upload01-ByUZD5Uy.js";import"./Users01-BX9kMyjx.js";import"./use-collections-Dd1RRH7k.js";import"./auth-Di_P-iCF.js";import"./checkbox-DBlqT1WL.js";import"./collection-search-DfEE2GsK.js";import"./use-debounced-value-96swwTPW.js";import"./authenticate-and-persist-oauth-BFF6bv-w.js";import"./mcp-oauth-D6cRXUdj.js";import"./use-mcp-tools-Doyc2jlq.js";import"./extract-connection-data-CdJ1S70n.js";import"./github-installations-DzN1UQ4x.js";import"./select-Bvp0qEbr.js";import"./textarea-DCN5TwaT.js";import"./use-org-auth-client-CIP8sPzJ.js";import"./use-organization-roles-B67g_vGt.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CZxKCMQN.js";import"./use-registry-connections-6rDSDO_p.js";import"./useInfiniteQuery-CsANrC6N.js";import"./use-infinite-scroll-DxHNeSQt.js";import"./card-CBmF5m-m.js";import"./integration-icon-BnLYSlPi.js";import"./collection-tabs-CrxdsgPv.js";import"./badge-DWJF1rj3.js";import"./connection-form-helpers-EFv1AB2t.js";import"./useSuspenseInfiniteQuery-dATP5Fxl.js";import"./use-ai-providers-B2zGkuJg.js";import"./decopilot-sse-pool-CuiGv1QM.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-D3BZEQrv.js";import"./autosend-LAVMz_8m.js";import"./tab-id-yjGvxWDL.js";import"./use-org-sso-CgrmSiGq.js";import"./index-DPa2Fjxz.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-CWlF2oHq.js";import"./label-B9OlPCFU.js";function _i(t){const e=$.c(5),{onPointerDown:n,onDoubleClick:i}=t,{state:r,isMobile:o}=be();if(o||r==="collapsed")return null;let l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={left:"var(--sidebar-width)"},a=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[0]=l,e[1]=a):(l=e[0],a=e[1]);let d;return e[2]!==i||e[3]!==n?(d=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:l,children:a}),e[2]=i,e[3]=n,e[4]=d):d=e[4],d}const bt=240,Ni=400,wi="sidebar.width";function Te(t){return Math.max(bt,Math.min(Ni,t))}function Ci(){const t=$.c(11),[e,n]=He(wi,ki),i=L.useRef(null);let r;t[0]!==n||t[1]!==e?(r=m=>{m.preventDefault();const u=m.clientX,f=Te(e),g=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=g?Array.from(g.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const h of x)h.style.transition="none";const b=h=>{const j=Te(f+(h.clientX-u));g?.style.setProperty("--sidebar-width",`${j}px`)},p=h=>{const j=Te(f+(h.clientX-u));n(j);for(const y of x)y.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",p),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",p)},t[0]=n,t[1]=e,t[2]=r):r=t[2];const o=r;let l;t[3]!==n?(l=()=>{n(bt)},t[3]=n,t[4]=l):l=t[4];const a=l;let d;t[5]!==e?(d=Te(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==o||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:i,onStartResize:o,resetWidth:a},t[7]=o,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function ki(t){return typeof t=="number"?Te(t):bt}function ls(){const t=$.c(8),{org:e}=se(),n=le(),i=Ys();let r;if(t[0]!==n||t[1]!==e||t[2]!==i){if(r=[],i){let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Qs,{className:"size-4!"}),t[4]=o):o=t[4];let l;t[5]!==n||t[6]!==e?(l={type:"items",items:[{key:"board",label:"Board",icon:o,onClick:()=>n({to:"/$org/board",params:{org:e.slug}})}]},t[5]=n,t[6]=e,t[7]=l):l=t[7],r.push(l)}t[0]=n,t[1]=e,t[2]=i,t[3]=r}else r=t[3];return r}function as(t){const e=$.c(3),{children:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=i):i=e[0];let r;return e[1]!==n?(r=s.jsxs(ct,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,s.jsx(dt,{children:s.jsx(ue,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=r):r=e[2],r}function cs(t){const e=$.c(18),{item:n}=t,{isMobile:i,setOpenMobile:r}=be();let o;e[0]!==i||e[1]!==n||e[2]!==r?(o=()=>{me("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:i}),n.onClick?.(),i&&r(!1)},e[0]=i,e[1]=n,e[2]=r,e[3]=o):o=e[3];const l=o,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=B(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==n.label?(m=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=m):m=e[7];let u;e[8]!==l||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==m?(u=s.jsxs(J,{onClick:l,isActive:n.isActive,tooltip:n.label,children:[n.icon,m]}),e[8]=l,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=m,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(q,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function Ai(t){const e=$.c(12),{section:n}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(qt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,r=n.group.defaultExpanded;let o;e[2]!==n.group.items?(o=n.group.items.map($i),e[2]=n.group.items,e[3]=o):o=e[3];let l;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==o?(l=s.jsx(as,{label:i,defaultExpanded:r,children:o}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=o,e[7]=l):l=e[7],l}case"items":{let i;e[8]!==n.items?(i=n.items.map(Ii),e[8]=n.items,e[9]=i):i=e[9];let r;return e[10]!==i?(r=s.jsx(ct,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(dt,{children:s.jsx(ue,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=r):r=e[11],r}case"custom":return n.content}}function Ii(t){return s.jsx(cs,{item:t},t.key)}function $i(t){return s.jsx(cs,{item:t},t.key)}function zi(t){const e=$.c(14),{sections:n,footer:i,additionalContent:r,variant:o,contentClassName:l}=t,a=o===void 0?"sidebar":o;let d;e[0]!==l?(d=B("flex flex-col flex-1 px-2 pb-2 gap-0.5",l),e[0]=l,e[1]=d):d=e[1];let c;e[2]!==n?(c=n.map(Ti),e[2]=n,e[3]=c):c=e[3];let m;e[4]!==r?(m=r&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:r}),e[4]=r,e[5]=m):m=e[5];let u;e[6]!==d||e[7]!==c||e[8]!==m?(u=s.jsxs(Kt,{className:d,children:[c,m]}),e[6]=d,e[7]=c,e[8]=m,e[9]=u):u=e[9];let f;return e[10]!==i||e[11]!==u||e[12]!==a?(f=s.jsxs(Ws,{variant:a,children:[u,i]}),e[10]=i,e[11]=u,e[12]=a,e[13]=f):f=e[13],f}function Ti(t,e){return s.jsx(Ai,{section:t},e)}function ds(t){const e=$.c(2);let n;return e[0]!==t?(n=s.jsx(zi,{...t}),e[0]=t,e[1]=n):n=e[1],n}ds.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(oe,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Mi(t){const e=$.c(16),{onToggle:n,className:i}=t,o=Ns().logo??ws,l=typeof o=="string"?o:o.light,a=typeof o=="string"?o:o.dark;let d;e[0]!==i?(d=B("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",i),e[0]=i,e[1]=d):d=e[1];let c;e[2]!==l?(c=s.jsx("img",{src:l,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=l,e[3]=c):c=e[3];let m;e[4]!==a?(m=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=m):m=e[5];let u;e[6]!==c||e[7]!==m?(u=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,m]})}),e[6]=c,e[7]=m,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Vt,{size:16}),e[9]=f):f=e[9];let g;e[10]!==n?(g=s.jsx(ve,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=g):g=e[11];let x;return e[12]!==d||e[13]!==u||e[14]!==g?(x=s.jsxs(qs,{className:d,children:[u,g]}),e[12]=d,e[13]=u,e[14]=g,e[15]=x):x=e[15],x}function At(t){const e=$.c(18),{item:n,onClose:i}=t,r=n.isActive&&"z-10";let o;e[0]!==r?(o=B(r),e[0]=r,e[1]=o):o=e[1];let l;e[2]!==n||e[3]!==i?(l=()=>{n.onClick?.(),i()},e[2]=n,e[3]=i,e[4]=l):l=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==l||e[12]!==a||e[13]!==d?(c=s.jsxs(J,{onClick:l,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=l,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==o||e[16]!==c?(m=s.jsx(q,{className:o,children:c}),e[15]=o,e[16]=c,e[17]=m):m=e[17],m}function Oi(t){const e=$.c(18),{section:n,onClose:i}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(qt,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,o=n.group.defaultExpanded;let l;if(e[2]!==i||e[3]!==n.group.items){let d;e[5]!==i?(d=c=>s.jsx(At,{item:c,onClose:i},c.key),e[5]=i,e[6]=d):d=e[6],l=n.group.items.map(d),e[2]=i,e[3]=n.group.items,e[4]=l}else l=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==l?(a=s.jsx(as,{label:r,defaultExpanded:o,children:l}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=l,e[10]=a):a=e[10],a}case"items":{let r;if(e[11]!==i||e[12]!==n.items){let l;e[14]!==i?(l=a=>s.jsx(At,{item:a,onClose:i},a.key),e[14]=i,e[15]=l):l=e[15],r=n.items.map(l),e[11]=i,e[12]=n.items,e[13]=r}else r=e[13];let o;return e[16]!==r?(o=s.jsx(ct,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(dt,{children:s.jsx(ue,{className:"gap-1.5",children:r})})}),e[16]=r,e[17]=o):o=e[17],o}case"custom":return n.content}}function Pi(t){const e=$.c(17),{sections:n,onClose:i,footer:r,additionalContent:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=l):l=e[0];let a;e[1]!==i?(a=s.jsx(L.Suspense,{fallback:l,children:s.jsx(Mi,{onToggle:i})}),e[1]=i,e[2]=a):a=e[2];let d;if(e[3]!==i||e[4]!==n){let f;e[6]!==i?(f=(g,x)=>s.jsx(Oi,{section:g,onClose:i},x),e[6]=i,e[7]=f):f=e[7],d=n.map(f),e[3]=i,e[4]=n,e[5]=d}else d=e[5];let c;e[8]!==o?(c=o&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:o}),e[8]=o,e[9]=c):c=e[9];let m;e[10]!==d||e[11]!==c?(m=s.jsxs(Kt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[d,c]}),e[10]=d,e[11]=c,e[12]=m):m=e[12];let u;return e[13]!==r||e[14]!==a||e[15]!==m?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,m,r]}),e[13]=r,e[14]=a,e[15]=m,e[16]=u):u=e[16],u}function De(t){const e=$.c(22),{item:n,onClose:i}=t;if(n.href){const d=n.external?"_blank":void 0,c=n.external?"noopener noreferrer":void 0;let m;e[0]!==n.icon?(m=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[0]=n.icon,e[1]=m):m=e[1];let u;e[2]!==n.label?(u=s.jsx("span",{className:"flex-1",children:n.label}),e[2]=n.label,e[3]=u):u=e[3];let f;return e[4]!==n.href||e[5]!==i||e[6]!==d||e[7]!==c||e[8]!==m||e[9]!==u?(f=s.jsxs("a",{href:n.href,target:d,rel:c,className:"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",onClick:i,children:[m,u]}),e[4]=n.href,e[5]=i,e[6]=d,e[7]=c,e[8]=m,e[9]=u,e[10]=f):f=e[10],f}let r;e[11]!==n||e[12]!==i?(r=()=>{n.onClick?.(),i()},e[11]=n,e[12]=i,e[13]=r):r=e[13];let o;e[14]!==n.icon?(o=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[14]=n.icon,e[15]=o):o=e[15];let l;e[16]!==n.label?(l=s.jsx("span",{className:"flex-1",children:n.label}),e[16]=n.label,e[17]=l):l=e[17];let a;return e[18]!==r||e[19]!==o||e[20]!==l?(a=s.jsxs("button",{type:"button",onClick:r,className:"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",children:[o,l]}),e[18]=r,e[19]=o,e[20]=l,e[21]=a):a=e[21],a}function It(t){const e=$.c(126),{user:n,userImage:i,menuItems:r,signOutItem:o,themeOptions:l,preferences:a,setPreferences:d,close:c,isMobile:m}=t;if(m){const F=n?.name??"U";let R;e[0]!==F||e[1]!==i?(R=s.jsx(Re,{url:i,fallback:F,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=F,e[1]=i,e[2]=R):R=e[2];const Y=n?.name??"User";let K;e[3]!==Y?(K=s.jsx("p",{className:"text-sm font-medium truncate",children:Y}),e[3]=Y,e[4]=K):K=e[4];const ne=n?.email;let V;e[5]!==ne?(V=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:ne}),e[5]=ne,e[6]=V):V=e[6];let ie;e[7]!==K||e[8]!==V?(ie=s.jsxs("div",{className:"flex-1 min-w-0",children:[K,V]}),e[7]=K,e[8]=V,e[9]=ie):ie=e[9];let re;e[10]!==n?(re=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Ri)},e[10]=n,e[11]=re):re=e[11];let ae;e[12]===Symbol.for("react.memo_cache_sentinel")?(ae=s.jsx(yt,{size:14}),e[12]=ae):ae=e[12];let xe;e[13]!==re?(xe=s.jsx(fe,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:re,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:ae})}),e[13]=re,e[14]=xe):xe=e[14];let je;e[15]===Symbol.for("react.memo_cache_sentinel")?(je=s.jsx(he,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=je):je=e[15];let T;e[16]!==xe?(T=s.jsx(tt,{delayDuration:300,children:s.jsxs(pe,{children:[xe,je]})}),e[16]=xe,e[17]=T):T=e[17];let U;e[18]!==T||e[19]!==R||e[20]!==ie?(U=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[R,ie,T]}),e[18]=T,e[19]=R,e[20]=ie,e[21]=U):U=e[21];let X;if(e[22]!==c||e[23]!==r){let de;e[25]!==c?(de=Pe=>s.jsx(De,{item:Pe,onClose:c},Pe.key),e[25]=c,e[26]=de):de=e[26],X=r.map(de),e[22]=c,e[23]=r,e[24]=X}else X=e[24];let W;e[27]!==c||e[28]!==o?(W=s.jsx(De,{item:o,onClose:c}),e[27]=c,e[28]=o,e[29]=W):W=e[29];let ce;e[30]!==X||e[31]!==W?(ce=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[X,W]})}),e[30]=X,e[31]=W,e[32]=ce):ce=e[32];let Se;if(e[33]!==a.theme||e[34]!==d||e[35]!==l){let de;e[37]!==a.theme||e[38]!==d?(de=Pe=>{const{value:Qe,icon:ys,label:Ss}=Pe;return s.jsx("button",{type:"button","aria-label":Ss,onClick:()=>d(_s=>({..._s,theme:Qe})),className:B("size-8 rounded-md flex items-center justify-center transition-colors",a.theme===Qe?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:ys},Qe)},e[37]=a.theme,e[38]=d,e[39]=de):de=e[39],Se=l.map(de),e[33]=a.theme,e[34]=d,e[35]=l,e[36]=Se}else Se=e[36];let _e;e[40]!==Se?(_e=s.jsx("div",{className:"flex items-center gap-0.5",children:Se}),e[40]=Se,e[41]=_e):_e=e[41];const Ve=a.enableSounds?"Disable sounds":"Enable sounds";let Ne;e[42]!==d?(Ne=()=>d(Fi),e[42]=d,e[43]=Ne):Ne=e[43];const Xe=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let we;e[44]!==Xe?(we=B("size-8 rounded-md flex items-center justify-center transition-colors",Xe),e[44]=Xe,e[45]=we):we=e[45];let Ce;e[46]!==a.enableSounds?(Ce=a.enableSounds?s.jsx(St,{size:14}):s.jsx(_t,{size:14}),e[46]=a.enableSounds,e[47]=Ce):Ce=e[47];let ke;e[48]!==Ve||e[49]!==Ne||e[50]!==we||e[51]!==Ce?(ke=s.jsx("button",{type:"button","aria-label":Ve,onClick:Ne,className:we,children:Ce}),e[48]=Ve,e[49]=Ne,e[50]=we,e[51]=Ce,e[52]=ke):ke=e[52];let Me;e[53]===Symbol.for("react.memo_cache_sentinel")?(Me=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.31.0"]}),e[53]=Me):Me=e[53];let Ae;e[54]!==ke?(Ae=s.jsxs("div",{className:"flex items-center gap-2",children:[ke,Me]}),e[54]=ke,e[55]=Ae):Ae=e[55];let Ie;e[56]!==_e||e[57]!==Ae?(Ie=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[_e,Ae]}),e[56]=_e,e[57]=Ae,e[58]=Ie):Ie=e[58];let Oe;return e[59]!==U||e[60]!==ce||e[61]!==Ie?(Oe=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[U,ce,Ie]}),e[59]=U,e[60]=ce,e[61]=Ie,e[62]=Oe):Oe=e[62],Oe}const u=n?.name??"U";let f;e[63]!==u||e[64]!==i?(f=s.jsx(Re,{url:i,fallback:u,shape:"circle",size:"sm",className:"shrink-0"}),e[63]=u,e[64]=i,e[65]=f):f=e[65];const g=n?.name??"User";let x;e[66]!==g?(x=s.jsx("p",{className:"text-sm font-medium truncate",children:g}),e[66]=g,e[67]=x):x=e[67];const b=n?.email;let p;e[68]!==b?(p=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[68]=b,e[69]=p):p=e[69];let h;e[70]!==x||e[71]!==p?(h=s.jsxs("div",{className:"flex-1 min-w-0",children:[x,p]}),e[70]=x,e[71]=p,e[72]=h):h=e[72];let j;e[73]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Ei)},e[73]=n,e[74]=j):j=e[74];let y;e[75]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(yt,{size:14}),e[75]=y):y=e[75];let v;e[76]!==j?(v=s.jsx(fe,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:y})}),e[76]=j,e[77]=v):v=e[77];let w;e[78]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(he,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[78]=w):w=e[78];let N;e[79]!==v?(N=s.jsx(tt,{delayDuration:300,children:s.jsxs(pe,{children:[v,w]})}),e[79]=v,e[80]=N):N=e[80];let _;e[81]!==N||e[82]!==f||e[83]!==h?(_=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[f,h,N]}),e[81]=N,e[82]=f,e[83]=h,e[84]=_):_=e[84];let S;if(e[85]!==c||e[86]!==r){let F;e[88]!==c?(F=R=>s.jsx(De,{item:R,onClose:c},R.key),e[88]=c,e[89]=F):F=e[89],S=r.map(F),e[85]=c,e[86]=r,e[87]=S}else S=e[87];let C;e[90]!==c||e[91]!==o?(C=s.jsx(De,{item:o,onClose:c}),e[90]=c,e[91]=o,e[92]=C):C=e[92];let A;e[93]!==S||e[94]!==C?(A=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[S,C]}),e[93]=S,e[94]=C,e[95]=A):A=e[95];let I;if(e[96]!==a.theme||e[97]!==d||e[98]!==l){let F;e[100]!==a.theme||e[101]!==d?(F=R=>{const{value:Y,icon:K,label:ne}=R;return s.jsx("button",{type:"button","aria-label":ne,onClick:()=>d(V=>({...V,theme:Y})),className:B("size-7 rounded-md flex items-center justify-center transition-colors",a.theme===Y?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:K},Y)},e[100]=a.theme,e[101]=d,e[102]=F):F=e[102],I=l.map(F),e[96]=a.theme,e[97]=d,e[98]=l,e[99]=I}else I=e[99];let k;e[103]!==I?(k=s.jsx("div",{className:"flex items-center gap-0.5",children:I}),e[103]=I,e[104]=k):k=e[104];const z=a.enableSounds?"Disable sounds":"Enable sounds";let E;e[105]!==d?(E=()=>d(Di),e[105]=d,e[106]=E):E=e[106];const H=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let O;e[107]!==H?(O=B("size-7 rounded-md flex items-center justify-center transition-colors",H),e[107]=H,e[108]=O):O=e[108];let D;e[109]!==a.enableSounds?(D=a.enableSounds?s.jsx(St,{size:14}):s.jsx(_t,{size:14}),e[109]=a.enableSounds,e[110]=D):D=e[110];let M;e[111]!==z||e[112]!==E||e[113]!==O||e[114]!==D?(M=s.jsx("button",{type:"button","aria-label":z,onClick:E,className:O,children:D}),e[111]=z,e[112]=E,e[113]=O,e[114]=D,e[115]=M):M=e[115];let P;e[116]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.31.0"]}),e[116]=P):P=e[116];let G;e[117]!==M?(G=s.jsxs("div",{className:"flex items-center gap-2",children:[M,P]}),e[117]=M,e[118]=G):G=e[118];let Q;e[119]!==k||e[120]!==G?(Q=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[k,G]}),e[119]=k,e[120]=G,e[121]=Q):Q=e[121];let Z;return e[122]!==_||e[123]!==A||e[124]!==Q?(Z=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[_,A,Q]})}),e[122]=_,e[123]=A,e[124]=Q,e[125]=Z):Z=e[125],Z}function Di(t){return{...t,enableSounds:!t.enableSounds}}function Ei(){te.success("User ID copied")}function Fi(t){return{...t,enableSounds:!t.enableSounds}}function Ri(){te.success("User ID copied")}function rt(){const t=$.c(34),{data:e}=ge.useSession(),{org:n}=se(),i=le();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const l=Cs(r)?.params.org,[a,d]=ks(),c=mt(),[m,u]=L.useState(!1),f=e?.user,g=f?.image;let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x=()=>u(!1),t[1]=x):x=t[1];const b=x;let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ut,{size:16}),t[2]=p):p=t[2];let h;t[3]!==i||t[4]!==l?(h={key:"preferences",label:"Preferences",icon:p,onClick:()=>{i({to:"/$org/settings/profile",params:{org:l??""}})}},t[3]=i,t[4]=l,t[5]=h):h=t[5];let j;t[6]!==n||t[7]!==i?(j=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Js,{size:16}),onClick:()=>{i({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=i,t[8]=j):j=t[8];let y;t[9]===Symbol.for("react.memo_cache_sentinel")?(y={key:"terms",label:"Terms of Use",icon:s.jsx(en,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=y):y=t[9];let v;t[10]===Symbol.for("react.memo_cache_sentinel")?(v={key:"privacy",label:"Privacy Policy",icon:s.jsx(on,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=v):v=t[10];let w;t[11]===Symbol.for("react.memo_cache_sentinel")?(w={key:"github",label:"decocms/studio",icon:s.jsx(As,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=w):w=t[11];let N;t[12]===Symbol.for("react.memo_cache_sentinel")?(N={key:"community",label:"Community",icon:s.jsx(ln,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=N):N=t[12];let _;t[13]===Symbol.for("react.memo_cache_sentinel")?(_={key:"homepage",label:"Homepage",icon:s.jsx(Zs,{size:16}),href:"https://decocms.com",external:!0},t[13]=_):_=t[13];let S;t[14]!==h||t[15]!==j?(S=[h,...j,y,v,w,N,_],t[14]=h,t[15]=j,t[16]=S):S=t[16];const C=S;let A;t[17]===Symbol.for("react.memo_cache_sentinel")?(A={key:"logout",label:"Sign out",icon:s.jsx(tn,{size:16}),onClick:Bi},t[17]=A):A=t[17];const I=A;let k;t[18]===Symbol.for("react.memo_cache_sentinel")?(k={value:"light",icon:s.jsx(nn,{size:14}),label:"Light theme"},t[18]=k):k=t[18];let z;t[19]===Symbol.for("react.memo_cache_sentinel")?(z={value:"dark",icon:s.jsx(rn,{size:14}),label:"Dark theme"},t[19]=z):z=t[19];let E;t[20]===Symbol.for("react.memo_cache_sentinel")?(E=[k,z,{value:"system",icon:s.jsx(st,{size:14}),label:"System theme"}],t[20]=E):E=t[20];const H=E;let O;t[21]!==c||t[22]!==C||t[23]!==a||t[24]!==d||t[25]!==f||t[26]!==g?(O={user:f,userImage:g,menuItems:C,signOutItem:I,themeOptions:H,preferences:a,setPreferences:d,close:b,isMobile:c},t[21]=c,t[22]=C,t[23]=a,t[24]=d,t[25]=f,t[26]=g,t[27]=O):O=t[27];const D=O;let M;return t[28]!==c||t[29]!==m||t[30]!==D||t[31]!==f?.name||t[32]!==g?(M=s.jsx(s.Fragment,{children:c?s.jsxs(Xt,{open:m,onOpenChange:u,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>u(!0),className:"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",children:[s.jsx(Re,{url:g,fallback:f?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]}),s.jsxs(Qt,{className:"h-[80dvh] p-0",children:[s.jsx(Yt,{className:"sr-only",children:"Account"}),s.jsx(It,{...D})]})]}):s.jsxs(Ge,{open:m,onOpenChange:u,children:[s.jsx(ze,{asChild:!0,children:s.jsxs(J,{tooltip:f?.name??"Account",className:"rounded-md",children:[s.jsx(Re,{url:g,fallback:f?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]})}),s.jsx(We,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Li,children:s.jsx(It,{...D})})]})}),t[28]=c,t[29]=m,t[30]=D,t[31]=f?.name,t[32]=g,t[33]=M):M=t[33],M}function Li(t){return t.preventDefault()}function Bi(){me("signed_out",{source:"account_popover"}),Is(),ge.signOut()}const $t=["requires_action","in_progress","failed","expired","completed"];function Hi(t){const e=new Map($t.map(n=>[n,[]]));for(const n of t){const i=n.status??"completed";(e.get(i)??e.get("completed")).push(n)}return $t.map(n=>({status:n,threads:e.get(n)}))}function ms(t){const e=$.c(4),{onClick:n}=t;let i,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(it,{}),r=s.jsx("span",{children:"Add repo"}),e[0]=i,e[1]=r):(i=e[0],r=e[1]);let o;return e[2]!==n?(o=s.jsxs(J,{tooltip:"Add repo",onClick:n,children:[i,r]}),e[2]=n,e[3]=o):o=e[3],o}function Ui(t){const e=$.c(41),{onAddNew:n}=t,{org:i}=se(),r=$s(),o=le(),l=yn();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const c=Ue(a).virtualmcpid??null;let m;e[1]!==c?(m=!!c&&!Zt(c),e[1]=c,e[2]=m):m=e[2];const u=m;let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f={slug:"mcp-github"},e[3]=f):f=e[3];const x=gn(f).filter(Wi),b=ht(),h=qe(u?c:null)?.metadata?.githubRepo?.connectionId??null;let j;e[4]!==i.id||e[5]!==i.slug?(j={connectionId:es,orgId:i.id,orgSlug:i.slug},e[4]=i.id,e[5]=i.slug,e[6]=j):j=e[6];const y=Jt(j);if(x.length===0){let F;return e[7]!==n?(F=s.jsx(ms,{onClick:n}),e[7]=n,e[8]=F):F=e[8],F}let v;e[9]!==c||e[10]!==o||e[11]!==i.id||e[12]!==r||e[13]!==y?(v=async(F,R)=>{await y.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:c,data:{metadata:{githubRepo:F}}}}),vt(r,i.id),te.success(`Previewing ${R}`),o({to:".",search:Gi,replace:!0})},e[9]=c,e[10]=o,e[11]=i.id,e[12]=r,e[13]=y,e[14]=v):v=e[14];const w=v;let N;e[15]!==b||e[16]!==l||e[17]!==i.id||e[18]!==r||e[19]!==y?(N=async(F,R,Y)=>{const K=b.find(ie=>{const re=ie.metadata?.githubRepo;return re?.owner?.toLowerCase()===F.owner.toLowerCase()&&re?.name?.toLowerCase()===F.name.toLowerCase()});if(K){l(K.id,{search:{main:"preview"}});return}const V=(await y.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:F.name,description:`Imported from ${Y}`,status:"active",pinned:!1,icon:null,connections:[{connection_id:R}],metadata:{githubRepo:F,instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}}}}})).structuredContent?.item?.id;if(vt(r,i.id),!V)throw new Error("Failed to create the repo agent");te.success(`Created ${Y}`),l(V,{search:{main:"preview"}})},e[15]=b,e[16]=l,e[17]=i.id,e[18]=r,e[19]=y,e[20]=N):N=e[20];const _=N;let S;e[21]!==w||e[22]!==u||e[23]!==_?(S=async F=>{const R=nt(F);if(!R)return;const Y=`${R.owner}/${R.repo}`,K={owner:R.owner,name:R.repo,url:`https://github.com/${R.owner}/${R.repo}`,installationId:R.installationId,connectionId:F.id};try{u?await w(K,Y):await _(K,F.id,Y)}catch(ne){const V=ne;te.error("Failed to set preview repo: "+(V instanceof Error?V.message:"Unknown error"))}},e[21]=w,e[22]=u,e[23]=_,e[24]=S):S=e[24];const C=S,A=hn;let I;e[25]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(pn,{asChild:!0,children:s.jsxs(J,{tooltip:"Add repo",children:[s.jsx(it,{}),s.jsx("span",{children:"Add repo"})]})}),e[25]=I):I=e[25];const k=fn,z="start",E="right",H="w-56";let O;e[26]!==h||e[27]!==C?(O=F=>{const R=nt(F);return R?s.jsxs(wt,{onSelect:()=>C(F),children:[s.jsx(it,{className:"size-4 text-muted-foreground"}),s.jsxs("span",{className:"flex-1 truncate",children:[R.owner,"/",R.repo]}),F.id===h&&s.jsx(ft,{className:"size-4"})]},F.id):null},e[26]=h,e[27]=C,e[28]=O):O=e[28];const D=x.map(O);let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(xn,{}),e[29]=M):M=e[29];let P;e[30]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx($e,{className:"size-4"}),e[30]=P):P=e[30];let G;e[31]!==n?(G=s.jsxs(wt,{onSelect:n,children:[P,"Add new repo…"]}),e[31]=n,e[32]=G):G=e[32];let Q;e[33]!==k||e[34]!==D||e[35]!==G?(Q=s.jsxs(k,{align:z,side:E,className:H,children:[D,M,G]}),e[33]=k,e[34]=D,e[35]=G,e[36]=Q):Q=e[36];let Z;return e[37]!==A||e[38]!==Q||e[39]!==I?(Z=s.jsxs(A,{children:[I,Q]}),e[37]=A,e[38]=Q,e[39]=I,e[40]=Z):Z=e[40],Z}function Gi(t){return{...t,main:"preview"}}function Wi(t){return nt(t)!==null&&vn(t)}function qi(){const t=$.c(4),[e,n]=L.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ms,{onClick:()=>n(!0)}),t[0]=i):i=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(L.Suspense,{fallback:i,children:s.jsx(Ui,{onAddNew:()=>n(!0)})}),t[1]=r):r=t[1];let o;return t[2]!==e?(o=s.jsxs(s.Fragment,{children:[r,s.jsx(jn,{open:e,onOpenChange:n,mode:"connection"})]}),t[2]=e,t[3]=o):o=t[3],o}function ot(t){const e=$.c(43),{variant:n}=t===void 0?{}:t,i=n===void 0?"icon":n,r=zn(),[o,l]=L.useState(!1);let a,d;if(e[0]!==r.capabilities||e[1]!==r.hostname||e[2]!==r.machineId||e[3]!==r.online){const y=Tn(r.capabilities);a=r.online?"Desktop linked":"Connect desktop",d=r.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:r.hostname??r.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:y.length>0?`Available: ${y.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=r.capabilities,e[1]=r.hostname,e[2]=r.machineId,e[3]=r.online,e[4]=a,e[5]=d}else a=e[4],d=e[5];const c=d;if(i==="full"){let y,v;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>l(!0),v=s.jsx(st,{}),e[6]=y,e[7]=v):(y=e[6],v=e[7]);let w;e[8]!==a?(w=s.jsx("span",{children:a}),e[8]=a,e[9]=w):w=e[9];let N;e[10]!==r.online?(N=r.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[10]=r.online,e[11]=N):N=e[11];let _;e[12]!==a||e[13]!==w||e[14]!==N?(_=s.jsx(fe,{asChild:!0,children:s.jsxs(J,{tooltip:a,onClick:y,children:[v,w,N]})}),e[12]=a,e[13]=w,e[14]=N,e[15]=_):_=e[15];let S;e[16]!==c?(S=s.jsx(he,{side:"right",children:c}),e[16]=c,e[17]=S):S=e[17];let C;e[18]!==_||e[19]!==S?(C=s.jsxs(pe,{children:[_,S]}),e[18]=_,e[19]=S,e[20]=C):C=e[20];let A;e[21]!==o?(A=s.jsx(Ct,{open:o,onOpenChange:l}),e[21]=o,e[22]=A):A=e[22];let I;return e[23]!==A||e[24]!==C?(I=s.jsxs(s.Fragment,{children:[C,A]}),e[23]=A,e[24]=C,e[25]=I):I=e[25],I}let m;e[26]===Symbol.for("react.memo_cache_sentinel")?(m=()=>l(!0),e[26]=m):m=e[26];const u=r.online?"Desktop linked":"Connect your desktop";let f;e[27]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(st,{size:16}),e[27]=f):f=e[27];let g;e[28]!==r.online?(g=r.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[28]=r.online,e[29]=g):g=e[29];let x;e[30]!==u||e[31]!==g?(x=s.jsx(fe,{asChild:!0,children:s.jsxs(ve,{onClick:m,"aria-label":u,children:[f,g]})}),e[30]=u,e[31]=g,e[32]=x):x=e[32];let b;e[33]!==c?(b=s.jsx(he,{side:"bottom",children:c}),e[33]=c,e[34]=b):b=e[34];let p;e[35]!==x||e[36]!==b?(p=s.jsxs(pe,{children:[x,b]}),e[35]=x,e[36]=b,e[37]=p):p=e[37];let h;e[38]!==o?(h=s.jsx(Ct,{open:o,onOpenChange:l}),e[38]=o,e[39]=h):h=e[39];let j;return e[40]!==h||e[41]!==p?(j=s.jsxs(s.Fragment,{children:[p,h]}),e[40]=h,e[41]=p,e[42]=j):j=e[42],j}class Ki extends L.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Vi(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Xi(){const t=$.c(17),e=le(),{org:n}=se(),{hasDecoKey:i,balanceDollars:r}=kn();if(!i)return null;let o;t[0]!==r?(o=r!=null?`Credits: $${r.toFixed(2)}`:"Credits",t[0]=r,t[1]=o):o=t[1];let l;t[2]!==r?(l=B(r!=null&&Vi(r)),t[2]=r,t[3]=l):l=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(an,{}),t[7]=d):d=t[7];let c;t[8]!==r?(c=r!=null?`$${r.toFixed(2)}`:"Credits",t[8]=r,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let u;return t[12]!==o||t[13]!==l||t[14]!==a||t[15]!==m?(u=s.jsx(ue,{children:s.jsx(q,{children:s.jsxs(J,{tooltip:o,className:l,onClick:a,children:[d,m]})})}),t[12]=o,t[13]=l,t[14]=a,t[15]=m,t[16]=u):u=t[16],u}function zt(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ki,{children:s.jsx(L.Suspense,{fallback:null,children:s.jsx(Xi,{})})}),t[0]=e):e=t[0],e}function Tt(){const t=$.c(7),e=le(),{org:n}=se();let i;t[0]!==e||t[1]!==n.slug?(i=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=i):i=t[2];let r,o;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ut,{}),o=s.jsx("span",{children:"Settings"}),t[3]=r,t[4]=o):(r=t[3],o=t[4]);let l;return t[5]!==i?(l=s.jsxs(J,{tooltip:"Settings",onClick:i,children:[r,o]}),t[5]=i,t[6]=l):l=t[6],l}function Mt(){const t=$.c(5),[e,n]=L.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(q,{children:s.jsx(Cn,{trigger:s.jsxs(J,{tooltip:"Invite members",children:[s.jsx(cn,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=i):i=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(q,{children:s.jsx(qi,{})}),t[1]=r):r=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(ue,{className:"gap-0.5",children:[i,r,s.jsx(q,{children:s.jsxs(J,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(sn,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[2]=o):o=t[2];let l;return t[3]!==e?(l=s.jsxs(s.Fragment,{children:[o,s.jsx(An,{open:e,onOpenChange:n,mode:"browse"})]}),t[3]=e,t[4]=l):l=t[4],l}function Qi(){const t=$.c(10),{state:e}=be();if(e==="collapsed"){let d,c;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Mt,{}),c=s.jsx(zt,{}),t[0]=d,t[1]=c):(d=t[0],c=t[1]);let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(q,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(ot,{})})}),t[2]=m):m=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(q,{children:s.jsx(Tt,{})}),t[3]=u):u=t[3];let f;return t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs(et,{className:"px-2 pb-3 gap-1",children:[d,c,s.jsxs(ue,{children:[m,u,s.jsx(q,{children:s.jsx(rt,{})})]})]}),t[4]=f):f=t[4],f}let i,r;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Mt,{}),r=s.jsx(zt,{}),t[5]=i,t[6]=r):(i=t[5],r=t[6]);let o;t[7]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(q,{children:s.jsx(ot,{variant:"full"})}),t[7]=o):o=t[7];let l;t[8]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(q,{children:s.jsx(Tt,{})}),t[8]=l):l=t[8];let a;return t[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(et,{className:"px-2 pb-3 gap-0.5",children:[i,r,s.jsxs(ue,{className:"gap-0.5",children:[o,l,s.jsx(q,{children:s.jsx(rt,{})})]})]}),t[9]=a):a=t[9],a}function Yi(){const t=$.c(8),e=le(),{org:n}=se(),{setOpenMobile:i}=be();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ue,{children:s.jsx(q,{children:s.jsx(rt,{})})})}),t[0]=r):r=t[0];let o;t[1]!==e||t[2]!==n.slug||t[3]!==i?(o=()=>{e({to:"/$org/settings",params:{org:n.slug}}),i(!1)},t[1]=e,t[2]=n.slug,t[3]=i,t[4]=o):o=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ut,{className:"size-4"}),t[5]=l):l=t[5];let a;return t[6]!==o?(a=s.jsx(et,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[r,s.jsx(ve,{"aria-label":"Settings",onClick:o,children:l})]})}),t[6]=o,t[7]=a):a=t[7],a}function Ot(t){const e=$.c(15),{className:n,wrapperClassName:i,children:r}=t,[o,l]=L.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=h=>{h&&l(h.scrollHeight>h.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=h=>{const j=h.currentTarget;l(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const m=c;let u;e[2]!==i?(u=B("relative",i),e[2]=i,e[3]=u):u=e[3];let f;e[4]!==r||e[5]!==n?(f=s.jsx("div",{ref:d,onScroll:m,className:n,children:r}),e[4]=r,e[5]=n,e[6]=f):f=e[6];const g=o?"opacity-100":"opacity-0";let x;e[7]!==g?(x=B("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",g),e[7]=g,e[8]=x):x=e[8];let b;e[9]!==x?(b=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=b):b=e[10];let p;return e[11]!==u||e[12]!==f||e[13]!==b?(p=s.jsxs("div",{className:u,children:[f,b]}),e[11]=u,e[12]=f,e[13]=b,e[14]=p):p=e[14],p}function Ji(t){const e=$.c(8),{virtualMcpId:n,size:i,showAutomationBadge:r}=t,o=i===void 0?"sm":i;let l;e[0]!==o||e[1]!==n?(l=n?s.jsx(Zi,{virtualMcpId:n,size:o}):s.jsx(ye,{icon:null,name:"?",size:o}),e[0]=o,e[1]=n,e[2]=l):l=e[2];let a;e[3]!==r?(a=r&&s.jsx("span",{"aria-label":"Automation-triggered",className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(is,{size:10,className:"text-white"})}),e[3]=r,e[4]=a):a=e[4];let d;return e[5]!==l||e[6]!==a?(d=s.jsxs("div",{className:"relative shrink-0",children:[l,a]}),e[5]=l,e[6]=a,e[7]=d):d=e[7],d}function Zi(t){const e=$.c(6),{virtualMcpId:n,size:i}=t,r=qe(n);if(!r){let a;return e[0]!==i?(a=s.jsx(ye,{icon:null,name:"?",size:i}),e[0]=i,e[1]=a):a=e[1],a}const o=r.icon??null;let l;return e[2]!==r.title||e[3]!==i||e[4]!==o?(l=s.jsx(ye,{icon:o,name:r.title,size:i}),e[2]=r.title,e[3]=i,e[4]=o,e[5]=l):l=e[5],l}function Pt(t){const e=$.c(36),{open:n,onOpenChange:i}=t,[r,o]=L.useState(""),{org:l}=se(),{setTaskId:a}=xt(),d=ns();let c,m,u;e[0]!==l.id||e[1]!==r?(u=r.trim(),m=Ts,c=zs.globalSearch(l.id,u),e[0]=l.id,e[1]=r,e[2]=c,e[3]=m,e[4]=u):(c=e[2],m=e[3],u=e[4]);const f=n&&u.length>0;let g;e[5]!==d||e[6]!==u?(g=async()=>await d.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=d,e[6]=u,e[7]=g):g=e[7];let x;e[8]!==c||e[9]!==f||e[10]!==g?(x={queryKey:c,enabled:f,queryFn:g,staleTime:1e4},e[8]=c,e[9]=f,e[10]=g,e[11]=x):x=e[11];const{data:b,isFetching:p}=m(x);let h;e[12]!==b?.items?(h=b?.items??[],e[12]=b?.items,e[13]=h):h=e[13];const j=h;let y;e[14]!==i?(y=z=>{z||o(""),i(z)},e[14]=i,e[15]=y):y=e[15];const v=y;let w;e[16]!==v||e[17]!==a?(w=z=>{v(!1),a(z.id,z.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=w):w=e[18];const N=w;let _;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(Rn,{className:"sr-only",children:[s.jsx(Ln,{children:"Search"}),s.jsx(Bn,{children:"Search across your organization's resources."})]}),e[19]=_):_=e[19];let S;e[20]!==r?(S=s.jsx(qn,{value:r,onValueChange:o,placeholder:"Search..."}),e[20]=r,e[21]=S):S=e[21];let C;e[22]!==N||e[23]!==p||e[24]!==j||e[25]!==u?(C=u?p&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(Gn,{children:"No results."}):j.map(z=>z.type==="thread"?s.jsxs(Wn,{value:`thread:${z.id}:${z.title}`,onSelect:()=>N(z),className:"gap-2.5",children:[s.jsx(Ji,{virtualMcpId:z.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:z.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(z.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${z.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=N,e[23]=p,e[24]=j,e[25]=u,e[26]=C):C=e[26];let A;e[27]!==C?(A=s.jsx(Kn,{children:C}),e[27]=C,e[28]=A):A=e[28];let I;e[29]!==S||e[30]!==A?(I=s.jsxs(Hn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[_,s.jsxs(Vn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[S,A]})]}),e[29]=S,e[30]=A,e[31]=I):I=e[31];let k;return e[32]!==v||e[33]!==n||e[34]!==I?(k=s.jsx(Un,{open:n,onOpenChange:v,children:I}),e[32]=v,e[33]=n,e[34]=I,e[35]=k):k=e[35],k}function er(t){return t==="ephemeral"||t.startsWith("thread:")}function us(t){const e=$.c(40),{task:n,isActive:i,onClick:r,onArchive:o,showAutomationBadge:l,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,m=Yn(n.status),u=m.icon,f=n.metadata?.kind==="tool_call_run",g=qe(f?void 0:n.virtual_mcp_id);let x;e[0]!==g?(x=In(g),e[0]=g,e[1]=x):x=e[1];const b=x;Jn(6e4);const p=l||!!n.trigger_id,h=n.id,j="button",y=0;let v;e[2]!==r?(v=G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),r())},e[2]=r,e[3]=v):v=e[3];const w=c?"-ml-4 pl-6":"pl-2",N=i?"bg-accent text-accent-foreground":"hover:bg-accent/60";let _;e[4]!==w||e[5]!==N?(_=B("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",N),e[4]=w,e[5]=N,e[6]=_):_=e[6];let S;e[7]!==f||e[8]!==a||e[9]!==g?.icon||e[10]!==g?.title?(S=a&&!f&&s.jsx(ye,{icon:g?.icon??null,name:g?.title??"?",size:"2xs"}),e[7]=f,e[8]=a,e[9]=g?.icon,e[10]=g?.title,e[11]=S):S=e[11];let C;e[12]!==p?(C=p&&s.jsx(is,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=p,e[13]=C):C=e[13];const A=n.title||"Untitled task";let I;e[14]!==A?(I=s.jsx("div",{className:"text-sm text-foreground truncate",children:A}),e[14]=A,e[15]=I):I=e[15];let k;e[16]!==C||e[17]!==I?(k=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[C,I]}),e[16]=C,e[17]=I,e[18]=k):k=e[18];let z;e[19]!==b||e[20]!==i||e[21]!==n.branch||e[22]!==n.updated_at?(z=n.updated_at&&s.jsxs("div",{className:B("flex items-center gap-1 text-[11px] min-w-0",i?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!er(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):b?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[b.owner,"/",b.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:ei(new Date(n.updated_at))})]}),e[19]=b,e[20]=i,e[21]=n.branch,e[22]=n.updated_at,e[23]=z):z=e[23];let E;e[24]!==k||e[25]!==z?(E=s.jsxs("div",{className:"flex-1 min-w-0",children:[k,z]}),e[24]=k,e[25]=z,e[26]=E):E=e[26];const H="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",O=!d&&s.jsx("span",{className:B("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",o&&"group-hover/row:opacity-0"),"aria-label":m.label,children:s.jsx(u,{size:14,className:B(m.iconClassName,n.status==="in_progress"&&"animate-spin")})});let D;e[27]!==o?(D=o&&s.jsxs(pe,{children:[s.jsx(fe,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:G=>{G.stopPropagation(),o()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(Ms,{size:14})})}),s.jsx(he,{side:"right",children:"Archive"})]}),e[27]=o,e[28]=D):D=e[28];let M;e[29]!==O||e[30]!==D?(M=s.jsxs("div",{className:H,children:[O,D]}),e[29]=O,e[30]=D,e[31]=M):M=e[31];let P;return e[32]!==r||e[33]!==E||e[34]!==M||e[35]!==v||e[36]!==_||e[37]!==S||e[38]!==n.id?(P=s.jsxs("div",{"data-task-id":h,role:j,tabIndex:y,onClick:r,onKeyDown:v,className:_,children:[S,E,M]}),e[32]=r,e[33]=E,e[34]=M,e[35]=v,e[36]=_,e[37]=S,e[38]=n.id,e[39]=P):P=e[39],P}const tr="sidebar.group.expanded.";function sr(t,e){const n=$.c(3),[i,r]=He(`${tr}${t}`,e);let o;return n[0]!==i||n[1]!==r?(o=[i,r],n[0]=i,n[1]=r,n[2]=o):o=n[2],o}function fs(t){const e=$.c(12),{onClick:n,isFetching:i,indented:r}=t,o=r?"-ml-4 pl-6 pr-2":"px-2";let l;e[0]!==o?(l=B("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",o,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[0]=o,e[1]=l):l=e[1];let a;e[2]!==i?(a=i&&s.jsx(Gt,{size:14,className:"animate-spin"}),e[2]=i,e[3]=a):a=e[3];const d=i?"Loading…":"Show more";let c;e[4]!==d?(c=s.jsx("span",{children:d}),e[4]=d,e[5]=c):c=e[5];let m;return e[6]!==i||e[7]!==n||e[8]!==l||e[9]!==a||e[10]!==c?(m=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:i,className:l,children:[a,c]}),e[6]=i,e[7]=n,e[8]=l,e[9]=a,e[10]=c,e[11]=m):m=e[11],m}function nr(t,e,n,i){return[t,e,n,i.type,i.member,i.currentUserId??""].join("|")}function ir(t){return t.member==="mine"&&!t.currentUserId}const hs=4;let Fe=0;const lt=[];function rr(){for(;Fe<hs&&lt.length>0;){const t=lt.shift();t&&t()}}function ps(t){return new Promise((e,n)=>{const i=()=>{Fe++,t().then(e,n).finally(()=>{Fe--,rr()})};Fe<hs?i():lt.push(i)})}const Ke=10;function Dt(t,e,n,i,r){const o={hidden:!1};i.member==="mine"&&i.currentUserId&&(o.created_by=i.currentUserId),i.type==="automation"&&(o.has_trigger=!0),i.type==="manual"&&(o.has_trigger=!1);const l={where:o,limit:r,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function or(t,e,n,i){let r=0;for(const o of t)xs(o,e,n,i)&&r++;return r}function Ye(t,e,n,i){return or(t,e,n,i)}function lr(t,e){return!!(t>=Ke||t===0&&e)}function Et(t,e){return t<e}function ar(t,e){return e===!1?!1:e===!0?!0:t}function xs(t,e,n,i){return!(t.hidden||(t.status??"completed")!==n||i.member==="mine"&&i.currentUserId&&t.created_by!==i.currentUserId||i.type==="automation"&&!t.trigger_id||i.type==="manual"&&t.trigger_id)}const Be=new Map,Ee=new Map;function cr(t,e){return e?t>=Ke?!0:null:!1}function Ft(t){return Be.get(t)}function dr(t,e){Be.set(t,e)}function mr(t,e,n){const i=Be.get(t);if(i!==void 0){n(i);return}let r=Ee.get(t);r||(r=ps(e).then(o=>(Be.set(t,o),Ee.delete(t),o)).catch(()=>(Ee.delete(t),Promise.reject(new Error("group probe failed")))),Ee.set(t,r)),r.then(n,()=>n(!1))}function Rt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ke,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function ur(t,e,n,i,r){let o=0;for(const l of t)e.has(l.id)||xs(l,n,i,r)&&o++;return o}function fr(t,e,n,i){const r=$.c(8),{org:o}=se(),l=nr(o.id,t,e,n);let a;r[0]!==n?(a=ir(n),r[0]=n,r[1]=a):a=r[1];const d=a,[c,m]=L.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==l&&m({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const u=Dn(),{threads:f,hasMore:g}=pt(),x=Ye(f,t,e,n),b=lr(x,g),p=cr(x,g),h=ns();if(c.identity===l&&c.serverHasMore===null){const _=p??Ft(l);_!==void 0&&m({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:_})}!d&&c.identity===l&&c.serverHasMore===null&&p===null&&Ft(l)===void 0&&c.probeSubscribedIdentity!==l&&(m(_=>_.identity===l?{..._,isProbing:!0,probeSubscribedIdentity:l}:_),mr(l,async()=>{const _=Dt(t,e,0,n,1),S=await h.call("COLLECTION_THREADS_LIST",_),{totalCount:C}=Rt(S),A=Ye(u.threads.get(),t,e,n);return C===void 0?!1:Et(A,C)},_=>{m(S=>S.identity!==l?S:{...S,isProbing:!1,serverHasMore:_})}));const y=async function(){if(c.isFetching||c.isProbing||d)return;const S=l;m(C=>C.identity===S?{...C,isFetching:!0}:C);try{const C=Ye(f,t,e,n),A=Dt(t,e,C,n,Ke),I=await ps(()=>h.call("COLLECTION_THREADS_LIST",A)),{items:k,hasMore:z,totalCount:E}=Rt(I),H=new Set(f.map(hr)),O=ur(k,H,t,e,n),D=C;u.mergeThreads(k),m(M=>{if(M.identity!==S)return M;let P;return E!==void 0?P=Et(D+O,E):P=k.length===0||O===0?!1:z,dr(S,P),{...M,isFetching:!1,serverHasMore:P}})}catch(C){const A=C,I=A instanceof Error?A.message:String(A);te.error(`Could not load more tasks: ${I}`),m(k=>k.identity===S?{...k,isFetching:!1}:k)}},v=c.isFetching||c.isProbing,w=!d&&!v&&ar(b,c.serverHasMore);let N;return r[2]!==v||r[3]!==y||r[4]!==w||r[5]!==c.isProbing||r[6]!==c.serverHasMore?(N={hasMore:w,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},r[2]=v,r[3]=y,r[4]=w,r[5]=c.isProbing,r[6]=c.serverHasMore,r[7]=N):N=r[7],N}function hr(t){return t.id}function pr(t){const e=$.c(20),{status:n,threads:i,activeTaskId:r,onSelectTask:o,onArchiveTask:l,canArchive:a,filters:d}=t,{isFetching:c,isProbing:m,loadMore:u,hasMore:f,serverHasMore:g}=fr("status",n,d),[x,b]=L.useState(!1);!x&&i.length===0&&g===!0&&!c&&!m&&(b(!0),queueMicrotask(()=>{u()}));let p;if(e[0]!==r||e[1]!==a||e[2]!==d||e[3]!==l||e[4]!==o||e[5]!==i){let y;e[7]!==r||e[8]!==a||e[9]!==d||e[10]!==l||e[11]!==o?(y=v=>s.jsx(us,{task:v,isActive:r===v.id,onClick:()=>o(v),onArchive:a&&v.created_by===d.currentUserId?()=>l(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=r,e[8]=a,e[9]=d,e[10]=l,e[11]=o,e[12]=y):y=e[12],p=i.map(y),e[0]=r,e[1]=a,e[2]=d,e[3]=l,e[4]=o,e[5]=i,e[6]=p}else p=e[6];let h;e[13]!==f||e[14]!==c||e[15]!==u?(h=(f||c)&&s.jsx(fs,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=u,e[16]=h):h=e[16];let j;return e[17]!==p||e[18]!==h?(j=s.jsxs(s.Fragment,{children:[p,h]}),e[17]=p,e[18]=h,e[19]=j):j=e[19],j}function xr(t){const e=$.c(36),{status:n,threads:i,activeTaskId:r,onSelectTask:o,onArchiveTask:l,canArchive:a,filters:d}=t,c=Zn[n],m=c.icon,[u,f]=sr(`status-${n}`,!1);let g;e[0]!==u||e[1]!==f?(g=function(){f(!u)},e[0]=u,e[1]=f,e[2]=g):g=e[2];const x=g;let b;e[3]!==x?(b=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),x())},e[3]=x,e[4]=b):b=e[4];let p;e[5]!==m||e[6]!==c.iconClassName?(p=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(m,{size:12,className:c.iconClassName})}),e[5]=m,e[6]=c.iconClassName,e[7]=p):p=e[7];let h;e[8]!==u?(h=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:u?s.jsx(gt,{size:14}):s.jsx(ti,{size:14})}),e[8]=u,e[9]=h):h=e[9];let j;e[10]!==p||e[11]!==h?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[p,h]}),e[10]=p,e[11]=h,e[12]=j):j=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let v;e[15]!==i.length?(v=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:i.length})}),e[15]=i.length,e[16]=v):v=e[16];let w;e[17]!==u||e[18]!==x||e[19]!==b||e[20]!==j||e[21]!==y||e[22]!==v?(w=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:x,onKeyDown:b,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[j,y,v]}),e[17]=u,e[18]=x,e[19]=b,e[20]=j,e[21]=y,e[22]=v,e[23]=w):w=e[23];let N;e[24]!==r||e[25]!==a||e[26]!==u||e[27]!==d||e[28]!==l||e[29]!==o||e[30]!==n||e[31]!==i?(N=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(pr,{status:n,threads:i,activeTaskId:r,onSelectTask:o,onArchiveTask:l,canArchive:a,filters:d})}),e[24]=r,e[25]=a,e[26]=u,e[27]=d,e[28]=l,e[29]=o,e[30]=n,e[31]=i,e[32]=N):N=e[32];let _;return e[33]!==w||e[34]!==N?(_=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[w,N]}),e[33]=w,e[34]=N,e[35]=_):_=e[35],_}function Lt(t){const e=$.c(38),{threads:n,groupBy:i,activeTaskId:r,onSelectTask:o,onArchiveTask:l,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:u}=t;if(n.length===0&&!d&&!c){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Qn,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];const h=u?"No threads match your filters":"No threads yet";let j;return e[1]!==h?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[p,s.jsx("p",{className:"text-sm",children:h})]}),e[1]=h,e[2]=j):j=e[2],j}const f=n.length>1||d;if(i==="status"){let p;if(e[3]!==r||e[4]!==f||e[5]!==a||e[6]!==l||e[7]!==o||e[8]!==n){let j;e[10]!==r||e[11]!==f||e[12]!==a||e[13]!==l||e[14]!==o?(j=y=>s.jsx(xr,{status:y.status,threads:y.threads,activeTaskId:r,onSelectTask:o,onArchiveTask:l,canArchive:f,filters:a},y.status),e[10]=r,e[11]=f,e[12]=a,e[13]=l,e[14]=o,e[15]=j):j=e[15],p=Hi(n).map(j),e[3]=r,e[4]=f,e[5]=a,e[6]=l,e[7]=o,e[8]=n,e[9]=p}else p=e[9];let h;return e[16]!==p?(h=s.jsx(s.Fragment,{children:p}),e[16]=p,e[17]=h):h=e[17],h}let g;if(e[18]!==r||e[19]!==f||e[20]!==a||e[21]!==l||e[22]!==o||e[23]!==n){let p;e[25]!==r||e[26]!==f||e[27]!==a||e[28]!==l||e[29]!==o?(p=h=>s.jsx(us,{task:h,isActive:r===h.id,onClick:()=>o(h),onArchive:f&&h.created_by===a.currentUserId?()=>l(h):void 0,showAutomationBadge:!!h.trigger_id,showAgentIcon:!0},h.id),e[25]=r,e[26]=f,e[27]=a,e[28]=l,e[29]=o,e[30]=p):p=e[30],g=n.map(p),e[18]=r,e[19]=f,e[20]=a,e[21]=l,e[22]=o,e[23]=n,e[24]=g}else g=e[24];let x;e[31]!==d||e[32]!==c||e[33]!==m?(x=(d||c)&&s.jsx(fs,{onClick:m,isFetching:c}),e[31]=d,e[32]=c,e[33]=m,e[34]=x):x=e[34];let b;return e[35]!==g||e[36]!==x?(b=s.jsxs(s.Fragment,{children:[g,x]}),e[35]=g,e[36]=x,e[37]=b):b=e[37],b}function Bt(t){const e=$.c(17),{label:n,onClick:i,active:r,children:o}=t,[l,a]=L.useState(!1);let d,c,m,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),u=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=u):(d=e[0],c=e[1],m=e[2],u=e[3]);const f=r&&"bg-sidebar-accent text-foreground";let g;e[4]!==f?(g=B(f),e[4]=f,e[5]=g):g=e[5];let x;e[6]!==o||e[7]!==n||e[8]!==i||e[9]!==g?(x=s.jsx(fe,{asChild:!0,children:s.jsx(ve,{"aria-label":n,onClick:i,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:u,className:g,children:o})}),e[6]=o,e[7]=n,e[8]=i,e[9]=g,e[10]=x):x=e[10];let b;e[11]!==n?(b=s.jsx(he,{side:"bottom",children:n}),e[11]=n,e[12]=b):b=e[12];let p;return e[13]!==l||e[14]!==x||e[15]!==b?(p=s.jsxs(pe,{open:l,children:[x,b]}),e[13]=l,e[14]=x,e[15]=b,e[16]=p):p=e[16],p}function Je(t){const e=$.c(13),{label:n,value:i,onChange:r,options:o}=t;let l;e[0]!==n?(l=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=l):l=e[1];let a;e[2]!==r?(a=u=>u&&r(u),e[2]=r,e[3]=a):a=e[3];let d;e[4]!==o?(d=o.map(gr),e[4]=o,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==i?(c=s.jsx(Pn,{type:"single",size:"sm",value:i,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=i,e[9]=c):c=e[9];let m;return e[10]!==l||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,c]}),e[10]=l,e[11]=c,e[12]=m):m=e[12],m}function gr(t){return s.jsxs(On,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function gs({onNavigate:t}={}){const{data:e}=ge.useSession(),n=e?.user?.id,{org:i}=se(),r=Jt({connectionId:es,orgId:i.id,orgSlug:i.slug}),o=Le(i.id).id,l=ht(),{threads:a,hasMore:d,isFetchingMore:c,fetchNextPage:m}=pt(),u=a.filter(T=>!T.hidden),{hide:f}=ss(),g=le(),{setTaskId:x,createNewTask:b}=xt(),p=at({strict:!1}),h=Ue({strict:!1}),j=p.taskId??null,y=h.virtualmcpid??a.find(T=>T.id===j)?.virtual_mcp_id??null,v=()=>{t?.()},w=[...u].sort((T,U)=>(U.updated_at??"").localeCompare(T.updated_at??"")),[N,_]=L.useState("all"),[S,C]=L.useState("flat"),[A,I]=He("sidebar-threads-scope-all",!1),[k,z]=L.useState(!1),[E,H]=L.useState(!1),O={type:N,member:"mine",currentUserId:n??null},D=T=>n?T.filter(U=>U.created_by===n):[],M=T=>N==="automation"?T.filter(U=>!!U.trigger_id):N==="manual"?T.filter(U=>!U.trigger_id):T,P=D(w),G=M(P),Q=M(w),Z=A?Q:G,F=T=>{if(n&&T.created_by&&T.created_by!==n)return;const U=T.id===j;if(f(T.id),!U)return;const X=P.find(W=>W.id!==T.id&&W.virtual_mcp_id===T.virtual_mcp_id);v(),X?x(X.id,X.virtual_mcp_id):g({to:"/$org",params:{org:i.slug}})},R=T=>{v(),x(T.id,T.virtual_mcp_id)},Y=async T=>{try{const U=await r.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((U.structuredContent??U).items?.length??0)===0}catch{return!1}},K=async()=>{const T=y??o;me("sidebar_new_thread_clicked",{virtual_mcp_id:T});const U=P.find(X=>X.virtual_mcp_id===T&&X.title==="New chat");if(U&&await Y(U.id)){v(),x(U.id,T);return}v(),b(T)},{state:ne,isMobile:V,toggleSidebar:ie}=be();if(ne==="collapsed"&&!V){const T=Le(i.id),U=new Map((l??[]).map(W=>[W.id,W])),X=W=>(W?U.get(W):void 0)??(W===o?T:void 0);return s.jsxs(ue,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(q,{children:s.jsx(J,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:ie,children:s.jsx(Vt,{size:16})})}),s.jsx(q,{children:s.jsx(J,{tooltip:"New thread",onClick:()=>{K()},children:s.jsx(Nt,{size:16})})}),Z.map(W=>{const ce=X(W.virtual_mcp_id);return s.jsx(q,{children:s.jsx(J,{tooltip:W.title||"New chat",isActive:W.id===j,onClick:()=>R(W),children:s.jsx(ye,{icon:ce?.icon??null,name:ce?.title??"Agent",size:"2xs"})})},W.id)})]})}const ae=S!=="flat"||N!=="all"||A===!0,xe=s.jsxs(Ge,{children:[s.jsxs(pe,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(ze,{asChild:!0,children:s.jsxs(ve,{"aria-label":"Filter threads",active:ae,children:[s.jsx(Mn,{size:16}),ae&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(he,{side:"bottom",children:"Filter threads"})]}),s.jsxs(We,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(Je,{label:"View",value:S,onChange:T=>{me("tasks_panel_group_by_changed",{to_value:T}),C(T)},options:[{value:"flat",label:"List",icon:s.jsx(mn,{size:13})},{value:"status",label:"Status",icon:s.jsx(un,{size:13})}]}),s.jsx(Je,{label:"Type",value:N,onChange:T=>{me("tasks_panel_filter_changed",{to_value:T}),_(T)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(Je,{label:"Scope",value:A?"team":"mine",onChange:T=>I(T==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),je=T=>s.jsx(tt,{delayDuration:300,children:s.jsxs("div",{className:B("shrink-0 px-1 flex items-center justify-between",T?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(rs,{}),xe]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Bt,{label:"Search threads",onClick:()=>{me("tasks_panel_search_opened"),H(!0),z(!0)},children:s.jsx(dn,{size:16})}),s.jsx(Bt,{label:"New thread",onClick:()=>{K()},children:s.jsx(Nt,{size:16})})]})]})});return V?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[je(!0),s.jsx(Ot,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(Lt,{threads:Z,groupBy:S,activeTaskId:j,onSelectTask:R,onArchiveTask:F,filters:O,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:ae})}),E&&s.jsx(Pt,{open:k,onOpenChange:z})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[je(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(Ot,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Lt,{threads:Z,groupBy:S,activeTaskId:j,onSelectTask:R,onArchiveTask:F,filters:O,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:ae})})}),E&&s.jsx(Pt,{open:k,onOpenChange:z})]})}const br=5,jr=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function bs(){const t=$.c(3),{state:e}=be();if(e==="collapsed"){let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:br}).map(Sr)}),t[0]=r):r=t[0],r}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(oe,{className:"size-6 rounded-md"}),s.jsx(oe,{className:"size-6 rounded-md"}),s.jsx(oe,{className:"size-6 rounded-md"})]}),s.jsx(oe,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:jr.map(vr)})]}),t[2]=i):i=t[2],i}function vr(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(oe,{className:"size-5 rounded-full shrink-0"}),s.jsx(oe,{className:B("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(yr)})]},e)}function yr(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(oe,{className:"h-3 flex-1 rounded-sm"})},e)}function Sr(t,e){return s.jsx(oe,{className:"size-10 rounded-lg mx-auto"},e)}function _r(){const t=$.c(4),e=ls();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Qi,{}),t[0]=n):n=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Wt,{children:s.jsx(L.Suspense,{fallback:s.jsx(bs,{}),children:s.jsx(gs,{})})}),t[1]=i):i=t[1];let r;return t[2]!==e?(r=s.jsx(ts,{children:s.jsx(ds,{sections:e,footer:n,additionalContent:i})}),t[2]=e,t[3]=r):r=t[3],r}function Nr(t){const e=$.c(8),{onClose:n}=t,i=ls();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Yi,{}),e[0]=r):r=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(bs,{}),e[1]=o):o=e[1];let l;e[2]!==n?(l=s.jsx(Wt,{children:s.jsx(L.Suspense,{fallback:o,children:s.jsx(gs,{onNavigate:n})})}),e[2]=n,e[3]=l):l=e[3];let a;return e[4]!==n||e[5]!==i||e[6]!==l?(a=s.jsx(ts,{children:s.jsx(Pi,{sections:i,onClose:n,footer:r,additionalContent:l})}),e[4]=n,e[5]=i,e[6]=l,e[7]=a):a=e[7],a}function js(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const wr=Os({name:Ps().min(2,"Organization name is required")});function Cr(t){const e=$.c(41),{open:n,onOpenChange:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={resolver:Ds(wr),defaultValues:{name:""}},e[0]=r):r=e[0];const o=Es(r);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={mutationFn:Ar,onSuccess:kr},e[1]=l):l=e[1];const a=Fs(l),d=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(ci,{children:[s.jsx(di,{children:"Create a new organization"}),s.jsx(mi,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let m;if(e[3]!==a||e[4]!==o){let _;e[6]!==a?(_=S=>a.mutateAsync(S),e[6]=a,e[7]=_):_=e[7],m=o.handleSubmit(_),e[3]=a,e[4]=o,e[5]=m}else m=e[5];let u;e[8]!==o.formState.isSubmitting?(u=_=>{const{field:S}=_;return s.jsxs(xi,{children:[s.jsx(gi,{children:"Organization Name"}),s.jsx(bi,{children:s.jsx(yi,{...S,placeholder:"Acme Inc.",disabled:o.formState.isSubmitting})}),s.jsx(ji,{children:"The name of your company or organization"}),S.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",js(S.value)]})]}),s.jsx(vi,{})]})},e[8]=o.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==o.control||e[11]!==u?(f=s.jsx(hi,{control:o.control,name:"name",render:u}),e[10]=o.control,e[11]=u,e[12]=f):f=e[12];let g;e[13]!==d?(g=d&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:d}),e[13]=d,e[14]=g):g=e[14];let x;e[15]!==a||e[16]!==o?(x=()=>{a.reset(),o.reset()},e[15]=a,e[16]=o,e[17]=x):x=e[17];let b;e[18]!==o.formState.isSubmitting||e[19]!==x?(b=s.jsx(li,{disabled:o.formState.isSubmitting,onClick:x,children:"Cancel"}),e[18]=o.formState.isSubmitting,e[19]=x,e[20]=b):b=e[20];const p=!o.formState.isValid||o.formState.isSubmitting;let h;e[21]!==o.formState.isSubmitting?(h=o.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(si,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=o.formState.isSubmitting,e[22]=h):h=e[22];let j;e[23]!==p||e[24]!==h?(j=s.jsx(Ze,{type:"submit",variant:"default",disabled:p,children:h}),e[23]=p,e[24]=h,e[25]=j):j=e[25];let y;e[26]!==j||e[27]!==b?(y=s.jsxs(ui,{children:[b,j]}),e[26]=j,e[27]=b,e[28]=y):y=e[28];let v;e[29]!==y||e[30]!==m||e[31]!==f||e[32]!==g?(v=s.jsxs("form",{className:"space-y-6",onSubmit:m,autoComplete:"off",children:[f,g,y]}),e[29]=y,e[30]=m,e[31]=f,e[32]=g,e[33]=v):v=e[33];let w;e[34]!==o||e[35]!==v?(w=s.jsxs(ai,{children:[c,s.jsx(pi,{...o,children:v})]}),e[34]=o,e[35]=v,e[36]=w):w=e[36];let N;return e[37]!==i||e[38]!==n||e[39]!==w?(N=s.jsx(fi,{open:n,onOpenChange:i,children:w}),e[37]=i,e[38]=n,e[39]=w,e[40]=N):N=e[40],N}function kr(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function Ar(t){const e=js(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await ge.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const i=n?.data?.slug??e;if(!i)throw new Error("Failed to create organization");return{orgSlug:i}}function vs(){const t=L.useContext(Rs),{data:e,refetch:n}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(r=>r.status==="pending"&&new Date(r.expiresAt)>new Date),refetch:()=>n?.()}}function Ir(t){let e=0;for(let i=0;i<t.length;i++)e=t.charCodeAt(i)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function jt(t){const e=$.c(13),{org:n,size:i}=t,r=i===void 0?"sm":i,o=r==="xs"?"size-5":"size-6",l=r==="xs"?"text-[9px]":"text-xs";let a;e[0]!==o?(a=B(o,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==n.logo||e[3]!==n.name?(d=n.logo?void 0:Ir(n.name),e[2]=n.logo,e[3]=n.name,e[4]=d):d=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==l?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:B("font-semibold leading-none",l),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=l,e[8]=c):c=e[8];let m;return e[9]!==a||e[10]!==d||e[11]!==c?(m=s.jsx("div",{className:a,style:d,children:c}),e[9]=a,e[10]=d,e[11]=c,e[12]=m):m=e[12],m}function $r({invitation:t,onChanged:e}){const[n,i]=L.useState(!1),r=t.organizationName??"Unknown organization",o=async()=>{i(!0);try{const d=await ge.organization.acceptInvitation({invitationId:t.id});if(d.error){te.error(d.error.message),i(!1);return}}catch{te.error("Failed to accept invitation"),i(!1);return}te.success(`Joined ${r}`),Bs();let a;try{a=(await ge.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=a?`/${a}`:"/"},l=async()=>{i(!0);try{const a=await ge.organization.rejectInvitation({invitationId:t.id});if(a.error){te.error(a.error.message),i(!1);return}te.success("Invitation declined"),i(!1),e()}catch{te.error("Failed to decline invitation"),i(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[s.jsx(jt,{org:{name:r},size:"sm"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"truncate text-sm font-medium",children:r}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:"Invited to join"})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[s.jsx(Ze,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:o,disabled:n,children:"Accept"}),s.jsx(Ze,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:n,"aria-label":`Decline invitation to ${r}`,children:s.jsx(oi,{size:14})})]})]})}function zr(t){const e=$.c(29),{orgParam:n,onSelectOrg:i,onCreateOrg:r}=t,{data:o}=Ls(),{invitations:l,refetch:a}=vs();let d;e[0]!==n?(d=(k,z)=>k.slug===n?-1:z.slug===n?1:k.name.localeCompare(z.name),e[0]=n,e[1]=d):d=e[1];const c=[...o??[]].sort(d),[m,u]=L.useState(""),f=m.toLowerCase(),g=f?c.filter(k=>k.name.toLowerCase().includes(f)||k.slug.toLowerCase().includes(f)):c;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(os,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=k=>u(k.target.value),e[3]=b):b=e[3];let p;e[4]!==m?(p=k=>k.key==="Escape"&&m&&u(""),e[4]=m,e[5]=p):p=e[5];let h;e[6]!==m||e[7]!==p?(h=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:m,onChange:b,onKeyDown:p,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=m,e[7]=p,e[8]=h):h=e[8];let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx($e,{size:16}),e[9]=j):j=e[9];let y;e[10]!==r?(y=s.jsx("button",{type:"button",onClick:r,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:j}),e[10]=r,e[11]=y):y=e[11];let v;e[12]!==h||e[13]!==y?(v=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,h,y]}),e[12]=h,e[13]=y,e[14]=v):v=e[14];const w="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let N;e[15]!==l||e[16]!==m||e[17]!==a?(N=!m&&l.map(k=>s.jsx($r,{invitation:k,onChanged:a},k.id)),e[15]=l,e[16]=m,e[17]=a,e[18]=N):N=e[18];const _=g.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:m?`No organizations match "${m}"`:"No organizations available"});let S;e[19]!==i||e[20]!==n?(S=k=>s.jsxs("button",{type:"button",onClick:()=>i(k.slug),className:B("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",k.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(jt,{org:k,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:k.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.slug})]}),k.slug===n&&s.jsx(ft,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},k.id),e[19]=i,e[20]=n,e[21]=S):S=e[21];const C=g.map(S);let A;e[22]!==N||e[23]!==_||e[24]!==C?(A=s.jsxs("div",{className:w,children:[N,_,C]}),e[22]=N,e[23]=_,e[24]=C,e[25]=A):A=e[25];let I;return e[26]!==A||e[27]!==v?(I=s.jsxs(s.Fragment,{children:[v,A]}),e[26]=A,e[27]=v,e[28]=I):I=e[28],I}function Tr(t){const e=$.c(22),{trigger:n,orgParam:i,align:r,side:o}=t,l=r===void 0?"start":r,a=o===void 0?"bottom":o,d=le(),[c,m]=L.useState(!1),[u,f]=L.useState(!1);let g;e[0]!==n?(g=s.jsx(ze,{asChild:!0,children:n}),e[0]=n,e[1]=g):g=e[1];const x=String(c);let b;e[2]!==d?(b=N=>{m(!1),d({to:"/$org",params:{org:N}})},e[2]=d,e[3]=b):b=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{m(!1),f(!0)},e[4]=p):p=e[4];let h;e[5]!==i||e[6]!==x||e[7]!==b?(h=s.jsx(zr,{orgParam:i,onSelectOrg:b,onCreateOrg:p},x),e[5]=i,e[6]=x,e[7]=b,e[8]=h):h=e[8];let j;e[9]!==l||e[10]!==a||e[11]!==h?(j=s.jsx(We,{side:a,align:l,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:Or,onCloseAutoFocus:Mr,children:h}),e[9]=l,e[10]=a,e[11]=h,e[12]=j):j=e[12];let y;e[13]!==c||e[14]!==g||e[15]!==j?(y=s.jsxs(Ge,{open:c,onOpenChange:m,children:[g,j]}),e[13]=c,e[14]=g,e[15]=j,e[16]=y):y=e[16];let v;e[17]!==u?(v=s.jsx(Cr,{open:u,onOpenChange:f}),e[17]=u,e[18]=v):v=e[18];let w;return e[19]!==v||e[20]!==y?(w=s.jsxs(s.Fragment,{children:[y,v]}),e[19]=v,e[20]=y,e[21]=w):w=e[21],w}function Mr(t){return t.preventDefault()}function Or(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Pr(t){const e=$.c(21),{value:n,onChange:i,placeholder:r,onKeyDown:o,className:l,isSearching:a,disabled:d}=t,c=r===void 0?"Search...":r;let m;e[0]!==l?(m=B("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=m):m=e[1];const u=d?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=B("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let g;e[4]!==a?(g=a?s.jsx(Gt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(os,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=g):g=e[5];let x;e[6]!==i?(x=j=>i(j.target.value),e[6]=i,e[7]=x):x=e[7];let b;e[8]!==d||e[9]!==o||e[10]!==c||e[11]!==x||e[12]!==n?(b=s.jsx("input",{type:"text",value:n,onChange:x,onKeyDown:o,placeholder:c,disabled:d,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=d,e[9]=o,e[10]=c,e[11]=x,e[12]=n,e[13]=b):b=e[13];let p;e[14]!==f||e[15]!==g||e[16]!==b?(p=s.jsxs("label",{className:f,children:[g,b]}),e[14]=f,e[15]=g,e[16]=b,e[17]=p):p=e[17];let h;return e[18]!==m||e[19]!==p?(h=s.jsx("div",{className:m,children:p}),e[18]=m,e[19]=p,e[20]=h):h=e[20],h}const Dr="Select an existing agent";function Er(t){const e=$.c(5),{children:n}=t;let i;e[0]!==n?(i=s.jsx(fe,{asChild:!0,children:n}),e[0]=n,e[1]=i):i=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(he,{side:"right",sideOffset:8,children:Dr}),e[2]=r):r=e[2];let o;return e[3]!==i?(o=s.jsxs(pe,{defaultOpen:!0,delayDuration:0,children:[i,r]}),e[3]=i,e[4]=o):o=e[4],o}function Fr(t){const e=le(),{create:n}=ss(),{locator:i}=se(),r=at({strict:!1}),o=Ue({strict:!1});return async l=>{const a=crypto.randomUUID(),d=l===o.virtualmcpid?Fn(t,i,r.taskId??""):null;try{await n({id:a,virtual_mcp_id:l,...d?{branch:d}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:l}})}}function Ht(t){const e=$.c(20),{agent:n,selected:i,onClick:r}=t,o=i?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let l;e[0]!==o?(l=B("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",o),e[0]=o,e[1]=l):l=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ye,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let d;e[5]!==n.title?(d=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=d):d=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let m;e[9]!==d||e[10]!==c?(m=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,c]}),e[9]=d,e[10]=c,e[11]=m):m=e[11];let u;e[12]!==i?(u=i&&s.jsx(ft,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=i,e[13]=u):u=e[13];let f;return e[14]!==r||e[15]!==l||e[16]!==a||e[17]!==m||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:r,className:l,children:[a,m,u]}),e[14]=r,e[15]=l,e[16]=a,e[17]=m,e[18]=u,e[19]=f):f=e[19],f}function Rr(t){const e=$.c(24),{onClose:n,onSelectAgent:i,selectedAgentId:r}=t,[o,l]=L.useState(""),a=ht(),d=a??[],{org:c}=se(),{data:m}=ge.useSession(),u=m?.user?.id??"anon",f=_n(a),g=Nn(),x=Fr(c.slug),b=$n(a),p=o.toLowerCase(),h=d.filter(Br).filter(P=>!b.has(P.id)).filter(Lr).filter(P=>!o||P.title.toLowerCase().includes(p)),j=Le(c.id),y=!o||j.title.toLowerCase().includes(p),v=!!(i&&y);let w;e[0]!==n||e[1]!==i?(w=()=>{i?.(null),n(),l("")},e[0]=n,e[1]=i,e[2]=w):w=e[2];const N=w,_=P=>{if(i){i(P.id),n(),l("");return}wn({orgId:c.id,userId:u},P.id,f),g(),n(),l(""),x(P.id)},S="flex flex-col max-h-[min(640px,80dvh)]";let C;e[3]!==o?(C=s.jsx(Pr,{value:o,onChange:l,placeholder:"Search agents..."}),e[3]=o,e[4]=C):C=e[4];const A="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-1",I=i&&y&&j&&s.jsx(Ht,{agent:j,selected:!r||r===j.id,onClick:N}),k=h.map(P=>s.jsx(Ht,{agent:P,selected:i?r===P.id:void 0,onClick:()=>_(P)},P.id));let z;e[5]!==v||e[6]!==o||e[7]!==h.length?(z=h.length===0&&!v&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:o?"No agents found":"No agents yet"}),e[5]=v,e[6]=o,e[7]=h.length,e[8]=z):z=e[8];let E;e[9]!==I||e[10]!==k||e[11]!==z?(E=s.jsxs("div",{className:A,children:[I,k,z]}),e[9]=I,e[10]=k,e[11]=z,e[12]=E):E=e[12];let H;e[13]!==c.slug?(H={org:c.slug},e[13]=c.slug,e[14]=H):H=e[14];let O;e[15]!==n?(O=()=>n(),e[15]=n,e[16]=O):O=e[16];let D;e[17]!==O||e[18]!==H?(D=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Hs,{to:"/$org/settings/agents",params:H,onClick:O,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[17]=O,e[18]=H,e[19]=D):D=e[19];let M;return e[20]!==D||e[21]!==C||e[22]!==E?(M=s.jsxs("div",{className:S,children:[C,E,D]}),e[20]=D,e[21]=C,e[22]=E,e[23]=M):M=e[23],M}function Lr(t){return!bn(t.id)}function Br(t){return!Zt(t.id)}function Hr(t){const e=$.c(23);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:i,trigger:r,onSelectAgent:o,selectedAgentId:l,side:a,align:d}=n,c=i===void 0?!1:i,m=a===void 0?"right":a,u=d===void 0?"start":d,[f,g]=L.useState(!1),x=mt(),{setOpenMobile:b}=be(),p=Sn(),h=p?"border border-border":void 0;let j;e[2]!==p?(j=C=>p?s.jsx(Er,{children:C}):C,e[2]=p,e[3]=j):j=e[3];const y=j;let v;e[4]!==x||e[5]!==b?(v=()=>{g(!1),x&&b(!1)},e[4]=x,e[5]=b,e[6]=v):v=e[6];const w=v;let N;e[7]!==w||e[8]!==o||e[9]!==f||e[10]!==l?(N=f&&s.jsx(L.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(oe,{className:"h-4 w-24"})}),children:s.jsx(Rr,{onClose:w,onSelectAgent:o,selectedAgentId:l})}),e[7]=w,e[8]=o,e[9]=f,e[10]=l,e[11]=N):N=e[11];const _=N;let S;return e[12]!==u||e[13]!==c||e[14]!==h||e[15]!==p||e[16]!==x||e[17]!==f||e[18]!==_||e[19]!==m||e[20]!==r||e[21]!==y?(S=s.jsx(s.Fragment,{children:x?s.jsxs(s.Fragment,{children:[r?s.jsx("button",{type:"button",onClick:()=>g(!0),className:"contents",children:r}):c?y(s.jsx(ve,{"aria-label":"Browse agents",className:B(h),onClick:()=>{me("agent_browser_opened",{surface:"mobile_drawer"}),g(!0)},children:s.jsx($e,{className:"size-4"})})):s.jsx(q,{children:y(s.jsxs(J,{tooltip:p?void 0:"Browse agents",className:B(h),onClick:()=>{me("agent_browser_opened",{surface:"mobile_drawer"}),g(!0)},children:[s.jsx($e,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(Xt,{open:f,onOpenChange:g,direction:"bottom",children:s.jsxs(Qt,{className:"max-h-[85dvh] p-0",children:[s.jsx(Yt,{className:"sr-only",children:"Browse agents"}),_]})})]}):s.jsxs(Ge,{open:f,onOpenChange:C=>{C&&!f&&me("agent_browser_opened",{surface:"desktop_popover"}),g(C)},children:[r?s.jsx(ze,{asChild:!0,children:r}):c?y(s.jsx(ze,{asChild:!0,children:s.jsx(ve,{"aria-label":"Browse agents",className:B(h),children:s.jsx($e,{className:"size-4"})})})):s.jsx(q,{children:y(s.jsx(ze,{asChild:!0,children:s.jsxs(J,{tooltip:p?void 0:"Browse agents",className:B(h),children:[s.jsx($e,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(We,{className:"w-[380px] p-0 overflow-hidden",side:m,align:u,children:_})]})}),e[12]=u,e[13]=c,e[14]=h,e[15]=p,e[16]=x,e[17]=f,e[18]=_,e[19]=m,e[20]=r,e[21]=y,e[22]=S):S=e[22],S}const Ur="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md px-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Gr(t){const e=$.c(19),{agentId:n,fallback:i,onOpenHome:r,onPick:o}=t,l=qe(n)??i??null,a=l?.title??"Super Agent",d=`Open ${a} home`,c=l?.icon??null;let m;e[0]!==c||e[1]!==a?(m=s.jsx(ye,{icon:c,name:a,size:"xs"}),e[0]=c,e[1]=a,e[2]=m):m=e[2];let u;e[3]!==r||e[4]!==d||e[5]!==m?(u=s.jsx("button",{type:"button",onClick:r,"aria-label":d,className:"wco-no-drag flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:m}),e[3]=r,e[4]=d,e[5]=m,e[6]=u):u=e[6];let f;e[7]!==a?(f=s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:a}),e[7]=a,e[8]=f):f=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(gt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=g):g=e[9];let x;e[10]!==f?(x=s.jsxs("button",{type:"button",className:Ur,children:[f,g]}),e[10]=f,e[11]=x):x=e[11];let b;e[12]!==n||e[13]!==o||e[14]!==x?(b=s.jsx(Hr,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:o,trigger:x}),e[12]=n,e[13]=o,e[14]=x,e[15]=b):b=e[15];let p;return e[16]!==u||e[17]!==b?(p=s.jsxs("div",{className:"flex items-center gap-1",children:[u,b]}),e[16]=u,e[17]=b,e[18]=p):p=e[18],p}function Ut(){const t=$.c(43),{org:e}=se(),{state:n,isMobile:i}=be(),r=le();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const l=at(o);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const d=Ue(a),{threads:c}=pt(),{setTaskId:m,createNewTask:u}=xt(),f=vs().invitations.length>0,g=n==="collapsed"||i;let x;t[2]!==e.id?(x=Le(e.id),t[2]=e.id,t[3]=x):x=t[3];const b=x,p=b.id,h=l.taskId?d.virtualmcpid??p:p;let j;t[4]!==u||t[5]!==p||t[6]!==r||t[7]!==e.slug||t[8]!==m||t[9]!==c?(j=M=>{if(!M||M===p){r({to:"/$org",params:{org:e.slug}});return}const P=Si(c,M);P?m(P.id,M):u(M)},t[4]=u,t[5]=p,t[6]=r,t[7]=e.slug,t[8]=m,t[9]=c,t[10]=j):j=t[10];const y=j,v=f?`${e.name} — switch organization (pending invitation)`:`${e.name} — switch organization`;let w;t[11]!==e?(w=s.jsx(jt,{org:e,size:"sm"}),t[11]=e,t[12]=w):w=t[12];let N;t[13]!==f||t[14]!==g?(N=f&&s.jsx("span",{className:B("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",g?"-top-1":"top-1/2 -translate-y-1/2")}),t[13]=f,t[14]=g,t[15]=N):N=t[15];let _;t[16]!==w||t[17]!==N?(_=s.jsxs("span",{className:"relative inline-flex",children:[w,N]}),t[16]=w,t[17]=N,t[18]=_):_=t[18];let S;t[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(gt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[19]=S):S=t[19];let C;t[20]!==v||t[21]!==_?(C=s.jsx(fe,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":v,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-md pl-3 pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[_,S]})}),t[20]=v,t[21]=_,t[22]=C):C=t[22];let A;t[23]!==e.slug||t[24]!==C?(A=s.jsx(Tr,{orgParam:e.slug,trigger:C}),t[23]=e.slug,t[24]=C,t[25]=A):A=t[25];let I;t[26]!==e.name?(I=s.jsx(he,{side:"bottom",children:e.name}),t[26]=e.name,t[27]=I):I=t[27];let k;t[28]!==A||t[29]!==I?(k=s.jsx(kt,{children:s.jsxs(pe,{children:[A,I]})}),t[28]=A,t[29]=I,t[30]=k):k=t[30];let z;t[31]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),t[31]=z):z=t[31];const E=h===p?b:void 0;let H;t[32]!==h||t[33]!==y?(H=()=>y(h),t[32]=h,t[33]=y,t[34]=H):H=t[34];let O;t[35]!==h||t[36]!==y||t[37]!==E||t[38]!==H?(O=s.jsx(kt,{children:s.jsx(L.Suspense,{fallback:z,children:s.jsx(Gr,{agentId:h,fallback:E,onOpenHome:H,onPick:y})})}),t[35]=h,t[36]=y,t[37]=E,t[38]=H,t[39]=O):O=t[39];let D;return t[40]!==k||t[41]!==O?(D=s.jsx(ii,{className:"wco-no-drag",children:s.jsxs(ri,{className:"flex-nowrap gap-1.5 sm:gap-1.5",children:[k,O]})}),t[40]=k,t[41]=O,t[42]=D):D=t[42],D}const Wr="sidebar.open";function qr(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Gs,{}),t[0]=e):e=t[0],e}function la(){const t=$.c(24),e=mt(),[n,i]=He(Wr,!1),{width:r,wrapperRef:o,onStartResize:l,resetWidth:a}=Ci();let d;t[0]!==e?(d=e?s.jsxs(ee.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto] items-center gap-2",children:[s.jsx(rs,{}),s.jsx(Ut,{}),s.jsx(ot,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(ee.TogglesSlot,{}),s.jsx(ee.TabsSlot,{className:"min-w-0 justify-self-end"})]}),s.jsx(ee.CenterSlot,{}),s.jsx(ee.RightSlot,{})]}):s.jsxs(ee.Header,{children:[s.jsxs(ee.LeftColumn,{children:[s.jsx(Ut,{}),s.jsx(ee.TogglesSlot,{})]}),s.jsx(ee.CenterSlot,{}),s.jsxs(ee.RightColumn,{children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end items-center gap-0.5",children:s.jsx(ee.TabsSlot,{})}),s.jsx(ee.RightSlot,{})]})]}),t[0]=e,t[1]=d):d=t[1];const c=`${r}px`;let m;t[2]!==c?(m={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},t[2]=c,t[3]=m):m=t[3];const u=m;let f;t[4]!==e||t[5]!==l||t[6]!==a?(f=!e&&s.jsxs(s.Fragment,{children:[s.jsx(_r,{}),s.jsx(_i,{onPointerDown:l,onDoubleClick:a})]}),t[4]=e,t[5]=l,t[6]=a,t[7]=f):f=t[7];let g;t[8]===Symbol.for("react.memo_cache_sentinel")?(g={background:"transparent",containerType:"inline-size"},t[8]=g):g=t[8];let x;t[9]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ks,{className:"flex flex-col",style:g,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(L.Suspense,{fallback:s.jsx(qr,{}),children:s.jsx(Us,{})})})})}),t[9]=x):x=t[9];let b;t[10]!==u||t[11]!==f||t[12]!==o?(b=s.jsxs(Vs,{ref:o,className:"flex-1 bg-sidebar relative min-h-0",style:u,children:[f,x]}),t[10]=u,t[11]=f,t[12]=o,t[13]=b):b=t[13];let p;t[14]!==e?(p=e&&s.jsx(Xn,{renderSidebar:Kr}),t[14]=e,t[15]=p):p=t[15];let h;t[16]!==d||t[17]!==b||t[18]!==p?(h=s.jsx(ni,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[d,b,p]})}),t[16]=d,t[17]=b,t[18]=p,t[19]=h):h=t[19];let j;return t[20]!==i||t[21]!==n||t[22]!==h?(j=s.jsx(En,{children:s.jsx(ee.Provider,{children:s.jsx(Xs,{open:n,onOpenChange:i,children:h})})}),t[20]=i,t[21]=n,t[22]=h,t[23]=j):j=t[23],j}function Kr(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Nr,{onClose:e})})})}export{la as default};
@@ -1 +0,0 @@
1
- import{c as it,r as b,j as e,i as rt}from"./index-BahpiC2M.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-ChHxgM9m.js";import{A as nt}from"./automation-runs-x80BWaX2.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-BbHa2hSM.js";import{F as xt}from"./index-BvtQ5hoD.js";import"./LayoutLeft-BSrZgTU6.js";import"./use-mobile-BXNoK8fo.js";import"./X-BH6rGAp7.js";import"./tooltip-s6_x3f9a.js";import"./select-Bvp0qEbr.js";import"./Check-D9pD98TC.js";import"./ChevronDown-CEttVXzH.js";import"./ChevronUp-DB19PJr3.js";import"./useInfiniteQuery-CsANrC6N.js";import"./use-infinite-scroll-DxHNeSQt.js";import"./use-connection-C-rUOOpn.js";import"./use-collections-Dd1RRH7k.js";import"./use-mcp-client-B6zu078q.js";import"./constants-B72Xmt_K.js";import"./auth-Di_P-iCF.js";import"./use-virtual-mcp-Yg3Ni3JK.js";import"./card-CBmF5m-m.js";import"./table-YAS6wtBG.js";import"./empty-state-Ccota3IC.js";import"./use-members-XIoSlR3f.js";import"./use-org-auth-client-CIP8sPzJ.js";import"./use-clock-tick-zj_1xbt5.js";import"./AlertCircle-DDN3VPgH.js";import"./CheckCircle-eA_D0se8.js";import"./Circle-C_Uwaadc.js";import"./agent-icon-DMnz6o4Z.js";import"./Tool01-BAkx1ZdU.js";import"./SwitchHorizontal01-BR_j_D1S.js";import"./Settings02-C66CP-6J.js";import"./XCircle-C44kYn0r.js";import"./ArrowUpRight-BABdYIhs.js";import"./ZapSquare-ddNKzQhO.js";import"./Users03-B6ET39UJ.js";import"./Loading02-J8un_7vB.js";import"./ChevronRight-CBhPLqlW.js";import"./Stars02-BgcXdOF8.js";import"./Copy01-BqSpo14R.js";import"./ZoomOut-DJV4-7Wr.js";import"./DotsVertical-CZx_5q44.js";import"./Globe01-iaaiJTp8.js";import"./Eye-2veooEq8.js";import"./FilterLines-Bhsdw1Jp.js";import"./Star01-CI0kjjiv.js";import"./Globe04-Pp6spg9P.js";import"./HardDrive-Bc5tB9pN.js";import"./Key01-gZ5RTwBh.js";import"./LinkExternal01-DkCU3S9w.js";import"./List-CNqrF6eE.js";import"./Monitor01-CgzOVFpb.js";import"./Sun-CWVJFGYw.js";import"./Palette-BAAsFrJa.js";import"./Play-B5Yd6Z0i.js";import"./Plus-Cn5an5hF.js";import"./SearchLg-lz9lYchG.js";import"./SearchMd-BELaZlqe.js";import"./Shield01-JdRvk1Dm.js";import"./Stars01-Bu7Nhnx4.js";import"./Trash01-CVVInA2O.js";import"./Upload01-ByUZD5Uy.js";import"./User01-7q5NgTw9.js";import"./Users01-BX9kMyjx.js";import"./XClose-DjOcr3WE.js";import"./Zap-kOKl7dUI.js";import"./use-automations-B6grDoMr.js";import"./studio-tools-CWpmP6KM.js";import"./useSuspenseInfiniteQuery-dATP5Fxl.js";import"./badge-DWJF1rj3.js";import"./checkbox-DBlqT1WL.js";import"./command-B6K8iBEi.js";import"./index-DPa2Fjxz.js";import"./dialog-BQdZemDY.js";import"./popover-BLU6o9-K.js";import"./avatar-jxHzinps.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CsNZH-9d.js";import"./file-type-icon-DqiLifA7.js";import"./tab-id-yjGvxWDL.js";import"./monaco-editor-uei6eymP.js";import"./index-Ba398iyy.js";import"./chat-context-ISwsXKv9.js";import"./autosend-LAVMz_8m.js";import"./hooks-D2FVCNXX.js";import"./decopilot-sse-pool-CuiGv1QM.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-B2zGkuJg.js";import"./use-decopilot-events-CWlF2oHq.js";import"./use-organization-settings-BLQXB5iH.js";import"./types-uVqvyouI.js";import"./shell-layout-C6qLFIpM.js";import"./alert-dialog-Bp9SnoCg.js";import"./required-auth-layout-D3BZEQrv.js";import"./use-org-sso-CgrmSiGq.js";import"./integration-icon-BnLYSlPi.js";import"./use-navigate-to-agent-DMVkXcE5.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-DV4jud7n.js";import"./form-DfINtBPW.js";import"./label-B9OlPCFU.js";import"./input-DCvWYNIA.js";import"./switch-yI9gdvWp.js";import"./drawer-CGC9vUmu.js";import"./collection-search-DfEE2GsK.js";import"./tabs-Dt4ufEhX.js";import"./toggle-group-CnMNmD9w.js";import"./agent-capabilities-jSKruONI.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CZxKCMQN.js";import"./use-registry-connections-6rDSDO_p.js";import"./extract-connection-data-CdJ1S70n.js";import"./collection-tabs-CrxdsgPv.js";import"./textarea-DCN5TwaT.js";import"./connection-form-helpers-EFv1AB2t.js";import"./authenticate-and-persist-oauth-BFF6bv-w.js";import"./mcp-oauth-D6cRXUdj.js";import"./connect-desktop-dialog-C5gWxTfZ.js";import"./select-model-DVM5M8H6.js";import"./skeleton-v_XZSYYc.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B2ndiHlo.js";import"./dropdown-menu-p-OE20Zw.js";import"./index-CLnnofn-.js";import"./toolbar-Bw9zu9WL.js";import"./use-debounced-value-96swwTPW.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B8zqs89p.js";import"./use-mcp-tools-Doyc2jlq.js";import"./use-capability-B-obK3ST.js";import"./tools-list-D9OxMY8P.js";import"./use-debounced-autosave-Cp27TV8M.js";import"./index-CCgql0MU.js";import"./search-input-CTSKqHHp.js";import"./github-repo-picker-DwvAhon6.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-OrnCuWHl.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-D-LZYEgI.js";import"./calendar-Chv9-zN_.js";import"./use-file-configs-DvpZmtIS.js";import"./automation-list-row-Bu1WzUZ2.js";function si(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=b.useState(k),[tt,i]=b.useState(null),[J,g]=b.useState(void 0),[x,y]=b.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const A=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const M=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const V=F,q=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,z=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==q?(l=e.jsx(mt,{className:"text-sm font-semibold",children:q}),t[13]=q,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==A||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==M||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==z||t[37]!==_?(S=!o||!T&&!z?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:A,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:M})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=A,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=M,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=z,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let E;return t[42]!==V||t[43]!==N||t[44]!==f?(E=e.jsx(at,{open:N,onOpenChange:V,children:f}),t[42]=V,t[43]=N,t[44]=f,t[45]=E):E=t[45],E}function yt(u){return u+1}function wt(u){return u+1}export{si as SeoSheet};
@@ -1 +0,0 @@
1
- import{c as J,j as t,B as Z}from"./index-BahpiC2M.js";import{n as ee}from"./LinkExternal01-DkCU3S9w.js";import{aG as te,t as oe}from"./agent-icon-DMnz6o4Z.js";import{I as q}from"./input-DCvWYNIA.js";import{L as H}from"./label-B9OlPCFU.js";import{a1 as ie}from"./automation-runs-x80BWaX2.js";import{b as Q,c as se,T as W,a as le}from"./tabs-Dt4ufEhX.js";import{T as re}from"./textarea-DCN5TwaT.js";import{aH as ae,aI as me,aG as pe,aJ as ne,aK as ce,aL as de,aM as fe}from"./index-BvtQ5hoD.js";import{b as ue,a as xe,B as he}from"./block-document-zR9sT0LV.js";import{u as ge,s as F,E as ve,R as ye,A as je}from"./primitives-Bl_VoSyu.js";import"./AlertCircle-DDN3VPgH.js";import"./Tool01-BAkx1ZdU.js";import"./SwitchHorizontal01-BR_j_D1S.js";import"./Settings02-C66CP-6J.js";import"./XCircle-C44kYn0r.js";import"./ArrowUpRight-BABdYIhs.js";import"./ZapSquare-ddNKzQhO.js";import"./Users03-B6ET39UJ.js";import"./Loading02-J8un_7vB.js";import"./CheckCircle-eA_D0se8.js";import"./Check-D9pD98TC.js";import"./ChevronDown-CEttVXzH.js";import"./ChevronRight-CBhPLqlW.js";import"./ChevronUp-DB19PJr3.js";import"./Circle-C_Uwaadc.js";import"./Stars02-BgcXdOF8.js";import"./Copy01-BqSpo14R.js";import"./ZoomOut-DJV4-7Wr.js";import"./DotsVertical-CZx_5q44.js";import"./Globe01-iaaiJTp8.js";import"./Eye-2veooEq8.js";import"./FilterLines-Bhsdw1Jp.js";import"./Star01-CI0kjjiv.js";import"./Globe04-Pp6spg9P.js";import"./HardDrive-Bc5tB9pN.js";import"./Key01-gZ5RTwBh.js";import"./LayoutLeft-BSrZgTU6.js";import"./List-CNqrF6eE.js";import"./Monitor01-CgzOVFpb.js";import"./Sun-CWVJFGYw.js";import"./Palette-BAAsFrJa.js";import"./Play-B5Yd6Z0i.js";import"./Plus-Cn5an5hF.js";import"./SearchLg-lz9lYchG.js";import"./SearchMd-BELaZlqe.js";import"./Shield01-JdRvk1Dm.js";import"./Stars01-Bu7Nhnx4.js";import"./Trash01-CVVInA2O.js";import"./Upload01-ByUZD5Uy.js";import"./User01-7q5NgTw9.js";import"./Users01-BX9kMyjx.js";import"./XClose-DjOcr3WE.js";import"./X-BH6rGAp7.js";import"./Zap-kOKl7dUI.js";import"./select-Bvp0qEbr.js";import"./tooltip-s6_x3f9a.js";import"./useInfiniteQuery-CsANrC6N.js";import"./use-infinite-scroll-DxHNeSQt.js";import"./use-connection-C-rUOOpn.js";import"./use-collections-Dd1RRH7k.js";import"./use-mcp-client-B6zu078q.js";import"./constants-B72Xmt_K.js";import"./auth-Di_P-iCF.js";import"./use-virtual-mcp-Yg3Ni3JK.js";import"./card-CBmF5m-m.js";import"./sidebar-ChHxgM9m.js";import"./use-mobile-BXNoK8fo.js";import"./table-YAS6wtBG.js";import"./empty-state-Ccota3IC.js";import"./use-members-XIoSlR3f.js";import"./use-org-auth-client-CIP8sPzJ.js";import"./use-clock-tick-zj_1xbt5.js";import"./use-automations-B6grDoMr.js";import"./studio-tools-CWpmP6KM.js";import"./useSuspenseInfiniteQuery-dATP5Fxl.js";import"./badge-DWJF1rj3.js";import"./checkbox-DBlqT1WL.js";import"./command-B6K8iBEi.js";import"./index-DPa2Fjxz.js";import"./dialog-BQdZemDY.js";import"./popover-BLU6o9-K.js";import"./avatar-jxHzinps.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CsNZH-9d.js";import"./file-type-icon-DqiLifA7.js";import"./tab-id-yjGvxWDL.js";import"./monaco-editor-uei6eymP.js";import"./index-Ba398iyy.js";import"./chat-context-ISwsXKv9.js";import"./autosend-LAVMz_8m.js";import"./hooks-D2FVCNXX.js";import"./decopilot-sse-pool-CuiGv1QM.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-B2zGkuJg.js";import"./use-decopilot-events-CWlF2oHq.js";import"./use-organization-settings-BLQXB5iH.js";import"./types-uVqvyouI.js";import"./shell-layout-C6qLFIpM.js";import"./alert-dialog-Bp9SnoCg.js";import"./required-auth-layout-D3BZEQrv.js";import"./use-org-sso-CgrmSiGq.js";import"./integration-icon-BnLYSlPi.js";import"./use-navigate-to-agent-DMVkXcE5.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-DV4jud7n.js";import"./form-DfINtBPW.js";import"./drawer-CGC9vUmu.js";import"./collection-search-DfEE2GsK.js";import"./toggle-group-CnMNmD9w.js";import"./agent-capabilities-jSKruONI.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CZxKCMQN.js";import"./use-registry-connections-6rDSDO_p.js";import"./extract-connection-data-CdJ1S70n.js";import"./collection-tabs-CrxdsgPv.js";import"./connection-form-helpers-EFv1AB2t.js";import"./authenticate-and-persist-oauth-BFF6bv-w.js";import"./mcp-oauth-D6cRXUdj.js";import"./connect-desktop-dialog-C5gWxTfZ.js";import"./select-model-DVM5M8H6.js";import"./skeleton-v_XZSYYc.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B2ndiHlo.js";import"./dropdown-menu-p-OE20Zw.js";import"./index-CLnnofn-.js";import"./toolbar-Bw9zu9WL.js";import"./use-debounced-value-96swwTPW.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B8zqs89p.js";import"./use-mcp-tools-Doyc2jlq.js";import"./use-capability-B-obK3ST.js";import"./tools-list-D9OxMY8P.js";import"./switch-yI9gdvWp.js";import"./use-debounced-autosave-Cp27TV8M.js";import"./index-CCgql0MU.js";import"./search-input-CTSKqHHp.js";import"./github-repo-picker-DwvAhon6.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-OrnCuWHl.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-D-LZYEgI.js";import"./calendar-Chv9-zN_.js";import"./use-file-configs-DvpZmtIS.js";import"./automation-list-row-Bu1WzUZ2.js";function be(A){return Array.isArray(A)?A.map(e=>({key:F(e?.key),value:F(e?.value)})):[]}function ni(A){const e=J.c(66),{orgSlug:i,virtualMcpId:d,branch:o,blockKey:l,block:p,decofile:m,meta:u,previewBaseUrl:x}=A;let y;e[0]!==o||e[1]!==i||e[2]!==d?(y={orgSlug:i,virtualMcpId:d,branch:o},e[0]=o,e[1]=i,e[2]=d,e[3]=y):y=e[3];const s=ae(y);let n;e[4]!==p?(n=me(p,"posts"),e[4]=p,e[5]=n):n=e[5];const j=n;let b;e[6]!==l||e[7]!==s?(b=T=>{s.mutate({blockKey:l,data:ne(l,"posts",T)})},e[6]=l,e[7]=s,e[8]=b):b=e[8];const[r,_]=ge(j,b);let C;e[9]!==r||e[10]!==_?(C=(T,Y)=>_({...r,[T]:Y}),e[9]=r,e[10]=_,e[11]=C):C=e[11];const h=C;let S;e[12]!==m||e[13]!==r||e[14]!==x?(S=ue({decofile:m,post:r,previewBaseUrl:x}),e[12]=m,e[13]=r,e[14]=x,e[15]=S):S=e[15];const f=S;let a;e[16]!==r.title?(a=F(r.title)||"Untitled post",e[16]=r.title,e[17]=a):a=e[17];let c;e[18]!==a?(c=t.jsx("span",{className:"truncate text-sm font-medium",children:a}),e[18]=a,e[19]=c):c=e[19];let g;e[20]!==s.isError||e[21]!==s.isPending?(g=t.jsx(pe,{isPending:s.isPending,isError:s.isError}),e[20]=s.isError,e[21]=s.isPending,e[22]=g):g=e[22];const k=!f,P=f?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let N;e[23]!==f?(N=()=>{f&&window.open(f,"_blank","noopener,noreferrer")},e[23]=f,e[24]=N):N=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ee,{size:14}),e[25]=B):B=e[25];let w;e[26]!==P||e[27]!==N||e[28]!==k?(w=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:k,title:P,onClick:N,children:[B,"See preview"]}),e[26]=P,e[27]=N,e[28]=k,e[29]=w):w=e[29];let E;e[30]!==w||e[31]!==g?(E=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[g,w]}),e[30]=w,e[31]=g,e[32]=E):E=e[32];let v;e[33]!==E||e[34]!==c?(v=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,E]}),e[33]=E,e[34]=c,e[35]=v):v=e[35];let L;e[36]!==r.title?(L=F(r.title),e[36]=r.title,e[37]=L):L=e[37];let R;e[38]!==h?(R=T=>h("title",T),e[38]=h,e[39]=R):R=e[39];let I;e[40]!==L||e[41]!==R?(I=t.jsx(ve,{value:L,onChange:R,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=L,e[41]=R,e[42]=I):I=e[42];let G;e[43]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=G):G=e[43];let K;e[44]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(se,{children:[G,t.jsxs(Q,{value:"settings",children:[t.jsx(oe,{}),"Settings"]})]}),e[44]=K):K=e[44];let U;e[45]!==r.sections?(U=xe(r.sections),e[45]=r.sections,e[46]=U):U=e[46];let $;e[47]!==h?($=T=>h("sections",T),e[47]=h,e[48]=$):$=e[48];let M;e[49]!==u||e[50]!==U||e[51]!==$?(M=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(he,{value:U,onChange:$,meta:u,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=u,e[50]=U,e[51]=$,e[52]=M):M=e[52];let D;e[53]!==m||e[54]!==r||e[55]!==h?(D=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ce,{post:r,decofile:m,onChange:h})})}),e[53]=m,e[54]=r,e[55]=h,e[56]=D):D=e[56];let V;e[57]!==M||e[58]!==D?(V=t.jsxs(le,{defaultValue:"content",className:"mt-6 gap-4",children:[K,M,D]}),e[57]=M,e[58]=D,e[59]=V):V=e[59];let z;e[60]!==I||e[61]!==V?(z=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[I,V]})}),e[60]=I,e[61]=V,e[62]=z):z=e[62];let O;return e[63]!==v||e[64]!==z?(O=t.jsxs("div",{className:"flex h-full flex-col",children:[v,z]}),e[63]=v,e[64]=z,e[65]=O):O=e[65],O}function Ce(A){const e=J.c(59),{post:i,decofile:d,onChange:o}=A;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(H,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=l):l=e[0];let p;e[1]!==i.excerpt?(p=F(i.excerpt),e[1]=i.excerpt,e[2]=p):p=e[2];let m;e[3]!==o?(m=v=>o("excerpt",v.target.value),e[3]=o,e[4]=m):m=e[4];let u;e[5]!==p||e[6]!==m?(u=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx(re,{id:"post-excerpt",value:p,onChange:m,rows:2})]}),e[5]=p,e[6]=m,e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(H,{htmlFor:"post-slug",children:"Slug"}),e[8]=x):x=e[8];let y;e[9]!==i.slug?(y=F(i.slug),e[9]=i.slug,e[10]=y):y=e[10];let s;e[11]!==o?(s=v=>o("slug",v.target.value),e[11]=o,e[12]=s):s=e[12];let n;e[13]!==y||e[14]!==s?(n=t.jsxs("div",{className:"space-y-2",children:[x,t.jsx(q,{id:"post-slug",value:y,onChange:s,placeholder:"my-post",className:"h-10"})]}),e[13]=y,e[14]=s,e[15]=n):n=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j={type:"string",format:"date",title:"Date"},e[16]=j):j=e[16];let b;e[17]!==i.date?(b=F(i.date),e[17]=i.date,e[18]=b):b=e[18];let r;e[19]!==o?(r=v=>o("date",v),e[19]=o,e[20]=r):r=e[20];let _;e[21]!==b||e[22]!==r?(_=t.jsx(fe,{schema:j,value:b,onChange:r,path:"post-date",label:"Date"}),e[21]=b,e[22]=r,e[23]=_):_=e[23];let C;e[24]!==_||e[25]!==n?(C=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n,_]}),e[24]=_,e[25]=n,e[26]=C):C=e[26];let h;e[27]===Symbol.for("react.memo_cache_sentinel")?(h={type:"string",format:"image-uri",title:"Cover image"},e[27]=h):h=e[27];let S;e[28]!==o?(S=v=>o("image",v),e[28]=o,e[29]=S):S=e[29];let f;e[30]!==i.image||e[31]!==S?(f=t.jsx(ce,{schema:h,value:i.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=i.image,e[31]=S,e[32]=f):f=e[32];let a;e[33]===Symbol.for("react.memo_cache_sentinel")?(a=["email"],e[33]=a):a=e[33];let c;e[34]!==o?(c=v=>o("authors",v),e[34]=o,e[35]=c):c=e[35];let g;e[36]!==d||e[37]!==i.authors||e[38]!==c?(g=t.jsx(X,{label:"Authors",decofile:d,kind:"authors",valueField:"email",extraFields:a,selected:i.authors,onChange:c}),e[36]=d,e[37]=i.authors,e[38]=c,e[39]=g):g=e[39];let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=["slug"],e[40]=k):k=e[40];let P;e[41]!==o?(P=v=>o("categories",v),e[41]=o,e[42]=P):P=e[42];let N;e[43]!==d||e[44]!==i.categories||e[45]!==P?(N=t.jsx(X,{label:"Categories",decofile:d,kind:"categories",valueField:"slug",extraFields:k,selected:i.categories,onChange:P}),e[43]=d,e[44]=i.categories,e[45]=P,e[46]=N):N=e[46];let B;e[47]!==o?(B=v=>o("extraProps",v),e[47]=o,e[48]=B):B=e[48];let w;e[49]!==i.extraProps||e[50]!==B?(w=t.jsx(ke,{value:i.extraProps,onChange:B}),e[49]=i.extraProps,e[50]=B,e[51]=w):w=e[51];let E;return e[52]!==C||e[53]!==f||e[54]!==g||e[55]!==N||e[56]!==w||e[57]!==u?(E=t.jsxs("div",{className:"space-y-5",children:[u,C,f,g,N,w]}),e[52]=C,e[53]=f,e[54]=g,e[55]=N,e[56]=w,e[57]=u,e[58]=E):E=e[58],E}function ke(A){const e=J.c(15),{value:i,onChange:d}=A;let o,l,p,m;if(e[0]!==d||e[1]!==i){o=be(i);const y=(s,n)=>d(o.map((j,b)=>b===s?{...j,...n}:j));l="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(H,{children:"Extra props"}),e[6]=p):p=e[6],m=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((s,n)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(q,{value:s.key,onChange:j=>y(n,{key:j.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(q,{value:s.value,onChange:j=>y(n,{value:j.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>d(o.filter((j,b)=>b!==n))})]},n))}),e[0]=d,e[1]=i,e[2]=o,e[3]=l,e[4]=p,e[5]=m}else o=e[2],l=e[3],p=e[4],m=e[5];let u;e[7]!==o||e[8]!==d?(u=t.jsx(je,{label:"Add prop",onClick:()=>d([...o,{key:"",value:""}])}),e[7]=o,e[8]=d,e[9]=u):u=e[9];let x;return e[10]!==l||e[11]!==p||e[12]!==m||e[13]!==u?(x=t.jsxs("div",{className:l,children:[p,m,u]}),e[10]=l,e[11]=p,e[12]=m,e[13]=u,e[14]=x):x=e[14],x}function X(A){const e=J.c(31),{label:i,decofile:d,kind:o,valueField:l,extraFields:p,selected:m,onChange:u}=A;let x,y,s;if(e[0]!==d||e[1]!==o||e[2]!==l){x=de(d,o);let f;e[6]!==l?(f=(c,g)=>F(c[l])||g,e[6]=l,e[7]=f):f=e[7],s=f;let a;e[8]!==s?(a=c=>{const{key:g,payload:k}=c;return{value:s(k,g),label:F(k.name)||s(k,g)}},e[8]=s,e[9]=a):a=e[9],y=x.map(a),e[0]=d,e[1]=o,e[2]=l,e[3]=x,e[4]=y,e[5]=s}else x=e[3],y=e[4],s=e[5];const n=y;let j;if(e[10]!==m||e[11]!==l){const f=Array.isArray(m)?m:[];let a;e[13]!==l?(a=c=>F(c[l]),e[13]=l,e[14]=a):a=e[14],j=f.map(a).filter(Boolean),e[10]=m,e[11]=l,e[12]=j}else j=e[12];const b=j;let r;e[15]!==p||e[16]!==u||e[17]!==x||e[18]!==l||e[19]!==s?(r=f=>{u(f.map(a=>{const c=x.find(k=>{const{key:P,payload:N}=k;return s(N,P)===a});if(!c)return{name:a,[l]:a};const g={name:F(c.payload.name)};for(const k of p)g[k]=c.payload[k]??a;return g}))},e[15]=p,e[16]=u,e[17]=x,e[18]=l,e[19]=s,e[20]=r):r=e[20];const _=r;let C;e[21]!==i?(C=t.jsx(H,{children:i}),e[21]=i,e[22]=C):C=e[22];let h;e[23]!==b||e[24]!==_||e[25]!==i||e[26]!==n?(h=n.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",i.toLowerCase()," yet — create some in the"," ",i.toLowerCase()," collection."]}):t.jsx(ie,{options:n,defaultValue:b,onValueChange:_,placeholder:`Select ${i.toLowerCase()}`,maxCount:4}),e[23]=b,e[24]=_,e[25]=i,e[26]=n,e[27]=h):h=e[27];let S;return e[28]!==C||e[29]!==h?(S=t.jsxs("div",{className:"space-y-2",children:[C,h]}),e[28]=C,e[29]=h,e[30]=S):S=e[30],S}export{ni as PostEditor};
@@ -1 +0,0 @@
1
- import{c as $,Z as H,j as A}from"./index-BahpiC2M.js";import{a as L,g as E,s as b}from"./automation-runs-x80BWaX2.js";import{u as O}from"./use-mcp-client-B6zu078q.js";import{p as k}from"./constants-B72Xmt_K.js";import{b as q,c as B}from"./use-mcp-tools-Doyc2jlq.js";import{u as Y}from"./index-BvtQ5hoD.js";import{c as G}from"./monaco-editor-uei6eymP.js";import{g as K,M as V,a as w}from"./types-uVqvyouI.js";import{a as Z,u as z}from"./chat-context-ISwsXKv9.js";import{u as F}from"./shell-layout-C6qLFIpM.js";import"./select-Bvp0qEbr.js";import"./tooltip-s6_x3f9a.js";import"./Check-D9pD98TC.js";import"./ChevronDown-CEttVXzH.js";import"./ChevronUp-DB19PJr3.js";import"./useInfiniteQuery-CsANrC6N.js";import"./use-infinite-scroll-DxHNeSQt.js";import"./use-connection-C-rUOOpn.js";import"./use-collections-Dd1RRH7k.js";import"./use-virtual-mcp-Yg3Ni3JK.js";import"./card-CBmF5m-m.js";import"./sidebar-ChHxgM9m.js";import"./LayoutLeft-BSrZgTU6.js";import"./use-mobile-BXNoK8fo.js";import"./X-BH6rGAp7.js";import"./table-YAS6wtBG.js";import"./empty-state-Ccota3IC.js";import"./use-members-XIoSlR3f.js";import"./use-org-auth-client-CIP8sPzJ.js";import"./use-clock-tick-zj_1xbt5.js";import"./AlertCircle-DDN3VPgH.js";import"./CheckCircle-eA_D0se8.js";import"./Circle-C_Uwaadc.js";import"./agent-icon-DMnz6o4Z.js";import"./Tool01-BAkx1ZdU.js";import"./SwitchHorizontal01-BR_j_D1S.js";import"./Settings02-C66CP-6J.js";import"./XCircle-C44kYn0r.js";import"./ArrowUpRight-BABdYIhs.js";import"./ZapSquare-ddNKzQhO.js";import"./Users03-B6ET39UJ.js";import"./Loading02-J8un_7vB.js";import"./ChevronRight-CBhPLqlW.js";import"./Stars02-BgcXdOF8.js";import"./Copy01-BqSpo14R.js";import"./ZoomOut-DJV4-7Wr.js";import"./DotsVertical-CZx_5q44.js";import"./Globe01-iaaiJTp8.js";import"./Eye-2veooEq8.js";import"./FilterLines-Bhsdw1Jp.js";import"./Star01-CI0kjjiv.js";import"./Globe04-Pp6spg9P.js";import"./HardDrive-Bc5tB9pN.js";import"./Key01-gZ5RTwBh.js";import"./LinkExternal01-DkCU3S9w.js";import"./List-CNqrF6eE.js";import"./Monitor01-CgzOVFpb.js";import"./Sun-CWVJFGYw.js";import"./Palette-BAAsFrJa.js";import"./Play-B5Yd6Z0i.js";import"./Plus-Cn5an5hF.js";import"./SearchLg-lz9lYchG.js";import"./SearchMd-BELaZlqe.js";import"./Shield01-JdRvk1Dm.js";import"./Stars01-Bu7Nhnx4.js";import"./Trash01-CVVInA2O.js";import"./Upload01-ByUZD5Uy.js";import"./User01-7q5NgTw9.js";import"./Users01-BX9kMyjx.js";import"./XClose-DjOcr3WE.js";import"./Zap-kOKl7dUI.js";import"./use-automations-B6grDoMr.js";import"./studio-tools-CWpmP6KM.js";import"./useSuspenseInfiniteQuery-dATP5Fxl.js";import"./badge-DWJF1rj3.js";import"./checkbox-DBlqT1WL.js";import"./command-B6K8iBEi.js";import"./index-DPa2Fjxz.js";import"./dialog-BQdZemDY.js";import"./popover-BLU6o9-K.js";import"./avatar-jxHzinps.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CsNZH-9d.js";import"./file-type-icon-DqiLifA7.js";import"./tab-id-yjGvxWDL.js";import"./hooks-D2FVCNXX.js";import"./decopilot-sse-pool-CuiGv1QM.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./integration-icon-BnLYSlPi.js";import"./use-navigate-to-agent-DMVkXcE5.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-DV4jud7n.js";import"./form-DfINtBPW.js";import"./label-B9OlPCFU.js";import"./input-DCvWYNIA.js";import"./auth-Di_P-iCF.js";import"./drawer-CGC9vUmu.js";import"./collection-search-DfEE2GsK.js";import"./autosend-LAVMz_8m.js";import"./tabs-Dt4ufEhX.js";import"./toggle-group-CnMNmD9w.js";import"./agent-capabilities-jSKruONI.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CZxKCMQN.js";import"./use-registry-connections-6rDSDO_p.js";import"./use-organization-settings-BLQXB5iH.js";import"./extract-connection-data-CdJ1S70n.js";import"./collection-tabs-CrxdsgPv.js";import"./textarea-DCN5TwaT.js";import"./connection-form-helpers-EFv1AB2t.js";import"./authenticate-and-persist-oauth-BFF6bv-w.js";import"./mcp-oauth-D6cRXUdj.js";import"./use-ai-providers-B2zGkuJg.js";import"./connect-desktop-dialog-C5gWxTfZ.js";import"./select-model-DVM5M8H6.js";import"./skeleton-v_XZSYYc.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B2ndiHlo.js";import"./dropdown-menu-p-OE20Zw.js";import"./index-CLnnofn-.js";import"./alert-dialog-Bp9SnoCg.js";import"./toolbar-Bw9zu9WL.js";import"./use-debounced-value-96swwTPW.js";import"./index-Ba398iyy.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B8zqs89p.js";import"./use-decopilot-events-CWlF2oHq.js";import"./use-capability-B-obK3ST.js";import"./tools-list-D9OxMY8P.js";import"./switch-yI9gdvWp.js";import"./use-debounced-autosave-Cp27TV8M.js";import"./index-CCgql0MU.js";import"./search-input-CTSKqHHp.js";import"./github-repo-picker-DwvAhon6.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-OrnCuWHl.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-D-LZYEgI.js";import"./calendar-Chv9-zN_.js";import"./use-file-configs-DvpZmtIS.js";import"./automation-list-row-Bu1WzUZ2.js";import"./required-auth-layout-D3BZEQrv.js";import"./use-org-sso-CgrmSiGq.js";const J={};function Q(S){const t=$.c(37),{client:e,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:I}=Z(),{setAppContext:d,clearAppContext:n}=z(),{setChatOpen:f,openTab:g}=F(),r=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??J;let c;t[2]!==e||t[3]!==o.name||t[4]!==s?(c={client:e,toolName:o.name,toolArguments:s},t[2]=e,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:i}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=b(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let u;t[9]!==o.inputSchema?(u=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=u):u=t[10];let N;t[11]!==U||t[12]!==u||t[13]!==o?(N={...o,name:U,inputSchema:u},t[11]=U,t[12]=u,t[13]=o,t[14]=N):N=t[14];const j=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=G(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const y=_;let P;t[18]!==j?(P={tool:j},t[18]=j,t[19]=P):P=t[19];let T;t[20]!==d||t[21]!==r?(T=C=>d(r,C),t[20]=d,t[21]=r,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==r?(R=()=>n(r),t[23]=n,t[24]=r,t[25]=R):R=t[25];let v;return t[26]!==e||t[27]!==y||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==i?(v=A.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:i,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:e,onMessage:y,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=e,t[27]=y,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=i,t[36]=v):v=t[36],v}function Er(S){const t=$.c(24),{connectionId:e,toolName:h,args:o}=S,{org:p}=H(),l=Y();let M;t[0]!==e||t[1]!==l?(M=k(e)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=e,t[1]=l,t[2]=M):M=t[2];const I=M;let d;t[3]!==e||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(d={connectionId:e,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=e,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=d):d=t[7];const n=O(d);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let r,a,m;t[10]!==h||t[11]!==g.tools?(r=L(decodeURIComponent(h)),m=g.tools.find(i=>i.name===r)??g.tools.find(i=>{const x=E(i._meta);if(!x)return!1;if(b(i.name,x)===r)return!0;const u=b(r,x);return u!==r&&i.name===u}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=r,t[13]=a,t[14]=m):(r=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let i;return t[15]!==r?(i=A.jsx("div",{className:"flex items-center justify-center h-full w-full",children:A.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[15]=r,t[16]=i):i=t[16],i}let c;return t[17]!==o||t[18]!==n||t[19]!==e||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(Q,{client:n,resourceURI:s,tool:m,connectionId:e,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=e,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{Er as AppViewContent};
@@ -1 +0,0 @@
1
- import{c as S,j as r}from"./index-BahpiC2M.js";import{I as T}from"./input-DCvWYNIA.js";import{L as C}from"./label-B9OlPCFU.js";import{T as L}from"./textarea-DCN5TwaT.js";import{aH as A,aI as R,aG as J,aJ as K,aK as D}from"./index-BvtQ5hoD.js";import{u as G,s as P}from"./primitives-Bl_VoSyu.js";import"./SwitchHorizontal01-BR_j_D1S.js";import"./chat-context-ISwsXKv9.js";import"./autosend-LAVMz_8m.js";import"./hooks-D2FVCNXX.js";import"./use-mcp-client-B6zu078q.js";import"./constants-B72Xmt_K.js";import"./auth-Di_P-iCF.js";import"./decopilot-sse-pool-CuiGv1QM.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-Yg3Ni3JK.js";import"./use-collections-Dd1RRH7k.js";import"./use-ai-providers-B2zGkuJg.js";import"./studio-tools-CWpmP6KM.js";import"./use-decopilot-events-CWlF2oHq.js";import"./tab-id-yjGvxWDL.js";import"./use-organization-settings-BLQXB5iH.js";import"./automation-runs-x80BWaX2.js";import"./select-Bvp0qEbr.js";import"./tooltip-s6_x3f9a.js";import"./Check-D9pD98TC.js";import"./ChevronDown-CEttVXzH.js";import"./ChevronUp-DB19PJr3.js";import"./useInfiniteQuery-CsANrC6N.js";import"./use-infinite-scroll-DxHNeSQt.js";import"./use-connection-C-rUOOpn.js";import"./card-CBmF5m-m.js";import"./sidebar-ChHxgM9m.js";import"./LayoutLeft-BSrZgTU6.js";import"./use-mobile-BXNoK8fo.js";import"./X-BH6rGAp7.js";import"./table-YAS6wtBG.js";import"./empty-state-Ccota3IC.js";import"./use-members-XIoSlR3f.js";import"./use-org-auth-client-CIP8sPzJ.js";import"./use-clock-tick-zj_1xbt5.js";import"./AlertCircle-DDN3VPgH.js";import"./CheckCircle-eA_D0se8.js";import"./Circle-C_Uwaadc.js";import"./agent-icon-DMnz6o4Z.js";import"./Tool01-BAkx1ZdU.js";import"./Settings02-C66CP-6J.js";import"./XCircle-C44kYn0r.js";import"./ArrowUpRight-BABdYIhs.js";import"./ZapSquare-ddNKzQhO.js";import"./Users03-B6ET39UJ.js";import"./Loading02-J8un_7vB.js";import"./ChevronRight-CBhPLqlW.js";import"./Stars02-BgcXdOF8.js";import"./Copy01-BqSpo14R.js";import"./ZoomOut-DJV4-7Wr.js";import"./DotsVertical-CZx_5q44.js";import"./Globe01-iaaiJTp8.js";import"./Eye-2veooEq8.js";import"./FilterLines-Bhsdw1Jp.js";import"./Star01-CI0kjjiv.js";import"./Globe04-Pp6spg9P.js";import"./HardDrive-Bc5tB9pN.js";import"./Key01-gZ5RTwBh.js";import"./LinkExternal01-DkCU3S9w.js";import"./List-CNqrF6eE.js";import"./Monitor01-CgzOVFpb.js";import"./Sun-CWVJFGYw.js";import"./Palette-BAAsFrJa.js";import"./Play-B5Yd6Z0i.js";import"./Plus-Cn5an5hF.js";import"./SearchLg-lz9lYchG.js";import"./SearchMd-BELaZlqe.js";import"./Shield01-JdRvk1Dm.js";import"./Stars01-Bu7Nhnx4.js";import"./Trash01-CVVInA2O.js";import"./Upload01-ByUZD5Uy.js";import"./User01-7q5NgTw9.js";import"./Users01-BX9kMyjx.js";import"./XClose-DjOcr3WE.js";import"./Zap-kOKl7dUI.js";import"./use-automations-B6grDoMr.js";import"./useSuspenseInfiniteQuery-dATP5Fxl.js";import"./badge-DWJF1rj3.js";import"./checkbox-DBlqT1WL.js";import"./command-B6K8iBEi.js";import"./index-DPa2Fjxz.js";import"./dialog-BQdZemDY.js";import"./popover-BLU6o9-K.js";import"./avatar-jxHzinps.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CsNZH-9d.js";import"./file-type-icon-DqiLifA7.js";import"./monaco-editor-uei6eymP.js";import"./index-Ba398iyy.js";import"./types-uVqvyouI.js";import"./shell-layout-C6qLFIpM.js";import"./alert-dialog-Bp9SnoCg.js";import"./required-auth-layout-D3BZEQrv.js";import"./use-org-sso-CgrmSiGq.js";import"./integration-icon-BnLYSlPi.js";import"./use-navigate-to-agent-DMVkXcE5.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-DV4jud7n.js";import"./form-DfINtBPW.js";import"./drawer-CGC9vUmu.js";import"./collection-search-DfEE2GsK.js";import"./tabs-Dt4ufEhX.js";import"./toggle-group-CnMNmD9w.js";import"./agent-capabilities-jSKruONI.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CZxKCMQN.js";import"./use-registry-connections-6rDSDO_p.js";import"./extract-connection-data-CdJ1S70n.js";import"./collection-tabs-CrxdsgPv.js";import"./connection-form-helpers-EFv1AB2t.js";import"./authenticate-and-persist-oauth-BFF6bv-w.js";import"./mcp-oauth-D6cRXUdj.js";import"./connect-desktop-dialog-C5gWxTfZ.js";import"./select-model-DVM5M8H6.js";import"./skeleton-v_XZSYYc.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B2ndiHlo.js";import"./dropdown-menu-p-OE20Zw.js";import"./index-CLnnofn-.js";import"./toolbar-Bw9zu9WL.js";import"./use-debounced-value-96swwTPW.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B8zqs89p.js";import"./use-mcp-tools-Doyc2jlq.js";import"./use-capability-B-obK3ST.js";import"./tools-list-D9OxMY8P.js";import"./switch-yI9gdvWp.js";import"./use-debounced-autosave-Cp27TV8M.js";import"./index-CCgql0MU.js";import"./search-input-CTSKqHHp.js";import"./github-repo-picker-DwvAhon6.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-OrnCuWHl.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-D-LZYEgI.js";import"./calendar-Chv9-zN_.js";import"./use-file-configs-DvpZmtIS.js";import"./automation-list-row-Bu1WzUZ2.js";const H={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},M={authors:"Author"};function Pr(B){const t=S.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=B;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const F=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:K(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=G(F,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=M[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(J,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=H[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(D,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{Pr as RecordEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-CvG6sX0m.js","assets/index-BahpiC2M.js","assets/index-BYSbf1og.css","assets/XCircle-C44kYn0r.js","assets/CheckCircle-eA_D0se8.js","assets/Settings02-C66CP-6J.js","assets/use-mcp-client-B6zu078q.js","assets/constants-B72Xmt_K.js","assets/auth-Di_P-iCF.js","assets/useInfiniteQuery-CsANrC6N.js","assets/use-infinite-scroll-DxHNeSQt.js","assets/studio-tools-CWpmP6KM.js","assets/badge-DWJF1rj3.js","assets/input-DCvWYNIA.js","assets/dropdown-menu-p-OE20Zw.js","assets/Check-D9pD98TC.js","assets/ChevronRight-CBhPLqlW.js","assets/Circle-C_Uwaadc.js","assets/table-YAS6wtBG.js","assets/toggle-group-CnMNmD9w.js","assets/use-view-mode-DTiLjVq5.js","assets/use-mobile-BXNoK8fo.js","assets/DotsVertical-CZx_5q44.js","assets/FilterLines-Bhsdw1Jp.js","assets/Globe01-iaaiJTp8.js","assets/SearchMd-BELaZlqe.js","assets/dialog-BQdZemDY.js","assets/X-BH6rGAp7.js","assets/AlertCircle-DDN3VPgH.js","assets/Upload01-ByUZD5Uy.js","assets/alert-dialog-Bp9SnoCg.js","assets/card-CBmF5m-m.js","assets/Trash01-CVVInA2O.js","assets/label-B9OlPCFU.js","assets/select-Bvp0qEbr.js","assets/tooltip-s6_x3f9a.js","assets/ChevronDown-CEttVXzH.js","assets/ChevronUp-DB19PJr3.js","assets/switch-yI9gdvWp.js","assets/textarea-DCN5TwaT.js","assets/checkbox-DBlqT1WL.js","assets/Eye-2veooEq8.js","assets/LinkExternal01-DkCU3S9w.js","assets/use-copy-CsNZH-9d.js","assets/Copy01-BqSpo14R.js","assets/Key01-gZ5RTwBh.js","assets/Plus-Cn5an5hF.js","assets/mcp-oauth-D6cRXUdj.js","assets/Play-B5Yd6Z0i.js"])))=>i.map(i=>d[i]);
2
- import{c as s,j as e,r as i,i as a,aU as o}from"./index-BahpiC2M.js";import{R as m}from"./require-capability-CKJDNzAw.js";import"./use-capability-B-obK3ST.js";import"./access-gate-CowGDaFA.js";import"./capability-load-error-NwvZgiL0.js";const n=i.lazy(()=>o(()=>import("./registry-layout-CvG6sX0m.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1 +0,0 @@
1
- import{c as F,j as t,r as Q,B as je,i as be}from"./index-BahpiC2M.js";import{i as Se}from"./ChevronRight-CBhPLqlW.js";import{U as fe}from"./agent-icon-DMnz6o4Z.js";import{A as ue}from"./automation-runs-x80BWaX2.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Fe,f as Te,P as Re,S as Ee}from"./page-seo-form-BbHa2hSM.js";import{c as xe,F as ze}from"./index-BvtQ5hoD.js";import{a as ge}from"./Tool01-BAkx1ZdU.js";import"./AlertCircle-DDN3VPgH.js";import"./SwitchHorizontal01-BR_j_D1S.js";import"./Settings02-C66CP-6J.js";import"./XCircle-C44kYn0r.js";import"./ArrowUpRight-BABdYIhs.js";import"./ZapSquare-ddNKzQhO.js";import"./Users03-B6ET39UJ.js";import"./Loading02-J8un_7vB.js";import"./CheckCircle-eA_D0se8.js";import"./Check-D9pD98TC.js";import"./ChevronDown-CEttVXzH.js";import"./ChevronUp-DB19PJr3.js";import"./Circle-C_Uwaadc.js";import"./Stars02-BgcXdOF8.js";import"./Copy01-BqSpo14R.js";import"./ZoomOut-DJV4-7Wr.js";import"./DotsVertical-CZx_5q44.js";import"./Globe01-iaaiJTp8.js";import"./Eye-2veooEq8.js";import"./FilterLines-Bhsdw1Jp.js";import"./Star01-CI0kjjiv.js";import"./Globe04-Pp6spg9P.js";import"./HardDrive-Bc5tB9pN.js";import"./Key01-gZ5RTwBh.js";import"./LayoutLeft-BSrZgTU6.js";import"./LinkExternal01-DkCU3S9w.js";import"./List-CNqrF6eE.js";import"./Monitor01-CgzOVFpb.js";import"./Sun-CWVJFGYw.js";import"./Palette-BAAsFrJa.js";import"./Play-B5Yd6Z0i.js";import"./Plus-Cn5an5hF.js";import"./SearchLg-lz9lYchG.js";import"./SearchMd-BELaZlqe.js";import"./Shield01-JdRvk1Dm.js";import"./Stars01-Bu7Nhnx4.js";import"./Trash01-CVVInA2O.js";import"./Upload01-ByUZD5Uy.js";import"./User01-7q5NgTw9.js";import"./Users01-BX9kMyjx.js";import"./XClose-DjOcr3WE.js";import"./X-BH6rGAp7.js";import"./Zap-kOKl7dUI.js";import"./select-Bvp0qEbr.js";import"./tooltip-s6_x3f9a.js";import"./useInfiniteQuery-CsANrC6N.js";import"./use-infinite-scroll-DxHNeSQt.js";import"./use-connection-C-rUOOpn.js";import"./use-collections-Dd1RRH7k.js";import"./use-mcp-client-B6zu078q.js";import"./constants-B72Xmt_K.js";import"./auth-Di_P-iCF.js";import"./use-virtual-mcp-Yg3Ni3JK.js";import"./card-CBmF5m-m.js";import"./sidebar-ChHxgM9m.js";import"./use-mobile-BXNoK8fo.js";import"./table-YAS6wtBG.js";import"./empty-state-Ccota3IC.js";import"./use-members-XIoSlR3f.js";import"./use-org-auth-client-CIP8sPzJ.js";import"./use-clock-tick-zj_1xbt5.js";import"./use-automations-B6grDoMr.js";import"./studio-tools-CWpmP6KM.js";import"./useSuspenseInfiniteQuery-dATP5Fxl.js";import"./badge-DWJF1rj3.js";import"./checkbox-DBlqT1WL.js";import"./command-B6K8iBEi.js";import"./index-DPa2Fjxz.js";import"./dialog-BQdZemDY.js";import"./popover-BLU6o9-K.js";import"./avatar-jxHzinps.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CsNZH-9d.js";import"./file-type-icon-DqiLifA7.js";import"./tab-id-yjGvxWDL.js";import"./monaco-editor-uei6eymP.js";import"./index-Ba398iyy.js";import"./chat-context-ISwsXKv9.js";import"./autosend-LAVMz_8m.js";import"./hooks-D2FVCNXX.js";import"./decopilot-sse-pool-CuiGv1QM.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-B2zGkuJg.js";import"./use-decopilot-events-CWlF2oHq.js";import"./use-organization-settings-BLQXB5iH.js";import"./types-uVqvyouI.js";import"./shell-layout-C6qLFIpM.js";import"./alert-dialog-Bp9SnoCg.js";import"./required-auth-layout-D3BZEQrv.js";import"./use-org-sso-CgrmSiGq.js";import"./integration-icon-BnLYSlPi.js";import"./use-navigate-to-agent-DMVkXcE5.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-DV4jud7n.js";import"./form-DfINtBPW.js";import"./label-B9OlPCFU.js";import"./input-DCvWYNIA.js";import"./switch-yI9gdvWp.js";import"./drawer-CGC9vUmu.js";import"./collection-search-DfEE2GsK.js";import"./tabs-Dt4ufEhX.js";import"./toggle-group-CnMNmD9w.js";import"./agent-capabilities-jSKruONI.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CZxKCMQN.js";import"./use-registry-connections-6rDSDO_p.js";import"./extract-connection-data-CdJ1S70n.js";import"./collection-tabs-CrxdsgPv.js";import"./textarea-DCN5TwaT.js";import"./connection-form-helpers-EFv1AB2t.js";import"./authenticate-and-persist-oauth-BFF6bv-w.js";import"./mcp-oauth-D6cRXUdj.js";import"./connect-desktop-dialog-C5gWxTfZ.js";import"./select-model-DVM5M8H6.js";import"./skeleton-v_XZSYYc.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B2ndiHlo.js";import"./dropdown-menu-p-OE20Zw.js";import"./index-CLnnofn-.js";import"./toolbar-Bw9zu9WL.js";import"./use-debounced-value-96swwTPW.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B8zqs89p.js";import"./use-mcp-tools-Doyc2jlq.js";import"./use-capability-B-obK3ST.js";import"./tools-list-D9OxMY8P.js";import"./use-debounced-autosave-Cp27TV8M.js";import"./index-CCgql0MU.js";import"./search-input-CTSKqHHp.js";import"./github-repo-picker-DwvAhon6.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-OrnCuWHl.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-D-LZYEgI.js";import"./calendar-Chv9-zN_.js";import"./use-file-configs-DvpZmtIS.js";import"./automation-list-row-Bu1WzUZ2.js";function B(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=B(n.title),i=B(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:B(n.description),image:B(n.image),favicon:B(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=F.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=F.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let b;return e[23]!==u||e[24]!==y||e[25]!==g?(b=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=b):b=e[26],b}function De(n){const e=F.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=F.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=F.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const b=i.description??ee;let _;e[17]!==y||e[18]!==b?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:b}),e[17]=y,e[18]=b,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let S;e[24]!==i.image?(S=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=S):S=e[25];let k;e[26]!==N||e[27]!==S||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,S]}),e[26]=N,e[27]=S,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Ue(n){const e=F.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Be(n){const e=F.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Ue,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function Ei(n){const e=F.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,b]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),b(Me));const{persistSeo:S,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,U=_!==void 0?_:ve,ye=K?_e(U)??void 0:void 0,w=j??ye??g??{},T=c?we(w,c):null,z=T&&(!K||Ce(U))?ze(T,s):null;let M;e[0]!==s?(M=Fe(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Te(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==S||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),S(de)},e[8]=S,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==b?(H=()=>b(Ke),e[14]=b,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(Se,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(be,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==T||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==U||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==S||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==R?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:U,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:T,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),S(E)},onClearForm:le,onBumpFormKey:re})]}):z&&T&&t.jsx(Ee,{schema:z,resolveType:T,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Be,{seo:ie,url:ne,path:P})})})]}),e[38]=T,e[39]=re,e[40]=le,e[41]=oe,e[42]=U,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=S,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=R,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{Ei as SeoEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-CvG6sX0m.js","assets/index-BahpiC2M.js","assets/index-BYSbf1og.css","assets/XCircle-C44kYn0r.js","assets/CheckCircle-eA_D0se8.js","assets/Settings02-C66CP-6J.js","assets/use-mcp-client-B6zu078q.js","assets/constants-B72Xmt_K.js","assets/auth-Di_P-iCF.js","assets/useInfiniteQuery-CsANrC6N.js","assets/use-infinite-scroll-DxHNeSQt.js","assets/studio-tools-CWpmP6KM.js","assets/badge-DWJF1rj3.js","assets/input-DCvWYNIA.js","assets/dropdown-menu-p-OE20Zw.js","assets/Check-D9pD98TC.js","assets/ChevronRight-CBhPLqlW.js","assets/Circle-C_Uwaadc.js","assets/table-YAS6wtBG.js","assets/toggle-group-CnMNmD9w.js","assets/use-view-mode-DTiLjVq5.js","assets/use-mobile-BXNoK8fo.js","assets/DotsVertical-CZx_5q44.js","assets/FilterLines-Bhsdw1Jp.js","assets/Globe01-iaaiJTp8.js","assets/SearchMd-BELaZlqe.js","assets/dialog-BQdZemDY.js","assets/X-BH6rGAp7.js","assets/AlertCircle-DDN3VPgH.js","assets/Upload01-ByUZD5Uy.js","assets/alert-dialog-Bp9SnoCg.js","assets/card-CBmF5m-m.js","assets/Trash01-CVVInA2O.js","assets/label-B9OlPCFU.js","assets/select-Bvp0qEbr.js","assets/tooltip-s6_x3f9a.js","assets/ChevronDown-CEttVXzH.js","assets/ChevronUp-DB19PJr3.js","assets/switch-yI9gdvWp.js","assets/textarea-DCN5TwaT.js","assets/checkbox-DBlqT1WL.js","assets/Eye-2veooEq8.js","assets/LinkExternal01-DkCU3S9w.js","assets/use-copy-CsNZH-9d.js","assets/Copy01-BqSpo14R.js","assets/Key01-gZ5RTwBh.js","assets/Plus-Cn5an5hF.js","assets/mcp-oauth-D6cRXUdj.js","assets/Play-B5Yd6Z0i.js"])))=>i.map(i=>d[i]);
2
- import{c as m,b as n,e as c,j as t,i as p,r as l,aU as f}from"./index-BahpiC2M.js";import{R as u}from"./require-capability-CKJDNzAw.js";import"./use-capability-B-obK3ST.js";import"./access-gate-CowGDaFA.js";import"./capability-load-error-NwvZgiL0.js";const g=l.lazy(()=>f(()=>import("./registry-layout-CvG6sX0m.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +0,0 @@
1
- import{c as g}from"./index-BahpiC2M.js";import{b as f}from"./use-virtual-mcp-Yg3Ni3JK.js";import{u as p}from"./use-navigate-to-agent-DMVkXcE5.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:l}=d,c=l===void 0?!1:l,t=f(),r=p();let s;e[2]!==t.create||e[3]!==c||e[4]!==r?(s=async()=>{const u=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&r(u.id,{search:{main:"instructions"}}),{id:u.id,virtualMcp:u}},e[2]=t.create,e[3]=c,e[4]=r,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};
@@ -1 +0,0 @@
1
- import{V as y,r as d,c as b,j as A,b as C,Z as E,a as $}from"./index-BahpiC2M.js";import{u as _}from"./use-virtual-mcp-Yg3Ni3JK.js";import{c as P}from"./hooks-D2FVCNXX.js";import{f as w}from"./reusable-new-chat-qqWu133U.js";const h=new Map;function I(e){return`${e.orgId}:${e.userId}`}function G(e){return`sidebar.group-order.${e}`}function O(e){try{const t=localStorage.getItem(e),r=t?JSON.parse(t):[];return Array.isArray(r)?r.filter(n=>typeof n=="string"):[]}catch{return[]}}function N(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function U(e){const t=I(e),r=h.get(t);if(r)return r;const n=y.sidebarGroupOrder(e.orgId,e.userId);let c=!1;try{c=localStorage.getItem(n)!==null}catch{}let o=O(n);if(!c&&o.length===0&&e.userId!=="anon"){const a=O(G(e.orgId));a.length>0&&(o=a)}return h.set(t,o),o}function T(e,t){const r=new Set(t);return U(e).filter(n=>!r.has(n))}function j(e,t){h.set(I(e),t),N(y.sidebarGroupOrder(e.orgId,e.userId),t)}function K(e,t,r=[]){if(r.includes(t))return;const n=T(e,r);n.includes(t)||j(e,[t,...n])}const S=d.createContext(null);function F(e){const t=b.c(7),{children:r}=e,[n,c]=d.useState(!1),[o,a]=d.useState(0);let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=()=>a(k),t[0]=u):u=t[0];const l=u;let s;t[1]!==n||t[2]!==o?(s={empty:n,setEmpty:c,orderRevision:o,bumpOrderRevision:l},t[1]=n,t[2]=o,t[3]=s):s=t[3];let i;return t[4]!==r||t[5]!==s?(i=A.jsx(S.Provider,{value:s,children:r}),t[4]=r,t[5]=s,t[6]=i):i=t[6],i}function k(e){return e+1}function Q(){return d.useContext(S)?.empty??!1}function D(){return d.useContext(S)?.bumpOrderRevision??J}function J(){}const v=[],L=()=>()=>{};function V(e){return(e??[]).filter(t=>!!t.pinned).map(t=>t.id)}function W(){const e=b.c(14),t=C(),{org:r}=E(),n=_(),{data:c}=$.useSession(),o=c?.user?.id??"anon";let a;e[0]!==n?(a=V(n),e[0]=n,e[1]=a):a=e[1];const u=a,l=D(),s=P();let i;e[2]!==s?.threads.get?(i=s?.threads.get??H,e[2]=s?.threads.get,e[3]=i):i=e[3];let f;e[4]!==s?.threads.get?(f=s?.threads.get??B,e[4]=s?.threads.get,e[5]=f):f=e[5];const m=d.useSyncExternalStore(s?.threads.subscribe??L,i,f);let g;return e[6]!==l||e[7]!==t||e[8]!==r.id||e[9]!==r.slug||e[10]!==u||e[11]!==o||e[12]!==m?(g=(p,x)=>{K({orgId:r.id,userId:o},p,u),l();const R=w(m,p)?.id??crypto.randomUUID();t({to:"/$org/$taskId",params:{org:r.slug,taskId:R},search:{...x?.search??{},virtualmcpid:p}})},e[6]=l,e[7]=t,e[8]=r.id,e[9]=r.slug,e[10]=u,e[11]=o,e[12]=m,e[13]=g):g=e[13],g}function B(){return v}function H(){return v}export{F as S,Q as a,D as b,K as c,V as g,W as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-DxHNeSQt.js";import{cy as i}from"./index-BahpiC2M.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./use-infinite-scroll-DxHNeSQt.js";import{cy as u,F as n}from"./index-BahpiC2M.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};