decocms 3.95.3 → 3.96.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 (221) hide show
  1. package/dist/client/assets/{AlertCircle-B2rGiQLW.js → AlertCircle-BrEgqy4C.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-DYz-mNwT.js → ArrowUpRight-dqkJVgXk.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-cLxWQcst.js → CheckCircle-BELFHeJ_.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-DajKJ50G.js → ChevronDown-C02eYJK7.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-CB4idmP8.js → ChevronLeft-CqiM2rGp.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-DwQZMwjZ.js → ChevronRight-Rak0sf1y.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-DFVBw1Q0.js → ChevronUp-C2_z85hK.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-DXVlN6Ej.js → DotsVertical-CrLTZ_rJ.js} +1 -1
  9. package/dist/client/assets/{Eye-XlApkfqq.js → Eye-KdT6fAXQ.js} +1 -1
  10. package/dist/client/assets/{FilterLines-yICREcB1.js → FilterLines-D9Fk5xgd.js} +1 -1
  11. package/dist/client/assets/{Globe01-BsZz_aM-.js → Globe01-DD2vvH9Y.js} +1 -1
  12. package/dist/client/assets/{Globe04-2qahfQsK.js → Globe04-Cp0kDyls.js} +1 -1
  13. package/dist/client/assets/{HardDrive-BOnuPdqR.js → HardDrive-CRLy3F5c.js} +1 -1
  14. package/dist/client/assets/{Key01-EWZLh6Dg.js → Key01-kiND7qp1.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-B0kudz4E.js → LayoutLeft-BGayXB6j.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-B40yAEYp.js → LinkExternal01-CoTqsvA6.js} +1 -1
  17. package/dist/client/assets/{Monitor01-CEDnJUQX.js → Monitor01-DRh9jiNA.js} +1 -1
  18. package/dist/client/assets/{Palette-DcfG5x3C.js → Palette-BQAv-HiM.js} +1 -1
  19. package/dist/client/assets/{Play-BqHmN8yQ.js → Play-Ctj-JyMN.js} +1 -1
  20. package/dist/client/assets/{Plus-FHaDaCOZ.js → Plus-DQMsWKXp.js} +1 -1
  21. package/dist/client/assets/{SearchMd-CtVQE5jm.js → SearchMd-CTdZTSxj.js} +1 -1
  22. package/dist/client/assets/{Settings02-C2eeV5U-.js → Settings02-DZoKzWEv.js} +1 -1
  23. package/dist/client/assets/{Shield01-CVbeDgIl.js → Shield01-fOlgiTmp.js} +1 -1
  24. package/dist/client/assets/{Star01-DNr09MAY.js → Star01-CZqCpyvl.js} +1 -1
  25. package/dist/client/assets/{Stars01-DUYEhBcS.js → Stars01-Ae1PiOCP.js} +1 -1
  26. package/dist/client/assets/{Stars02-nM_Vn7Vv.js → Stars02-CEcEV2x1.js} +1 -1
  27. package/dist/client/assets/{Sun-BmtS6iHG.js → Sun-BlaoOCgr.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-BTdkOtmC.js → SwitchHorizontal01-ClsPCmf-.js} +1 -1
  29. package/dist/client/assets/{Tool01-DdMkISER.js → Tool01-BFKHYBxu.js} +1 -1
  30. package/dist/client/assets/{Trash01-DK9RS17_.js → Trash01-AyXF9MEf.js} +1 -1
  31. package/dist/client/assets/{Upload01-cLKObBlS.js → Upload01-DCmxXheu.js} +1 -1
  32. package/dist/client/assets/{User01-CWKoITic.js → User01-BO7S3TIr.js} +1 -1
  33. package/dist/client/assets/{Users01-BCyCe1vl.js → Users01-DfacWtOx.js} +1 -1
  34. package/dist/client/assets/{Users03-FbNBHUKo.js → Users03-CqKlqVoH.js} +1 -1
  35. package/dist/client/assets/{X-B5LAnKcO.js → X-MB-OWrnU.js} +1 -1
  36. package/dist/client/assets/{XCircle-CJScj78U.js → XCircle-DcrNWY52.js} +1 -1
  37. package/dist/client/assets/{XClose-BDmZVvYt.js → XClose-C0Njrlhp.js} +1 -1
  38. package/dist/client/assets/{Zap-S88eHWD4.js → Zap-BeSLks75.js} +1 -1
  39. package/dist/client/assets/{ZapSquare-CwCpnU0T.js → ZapSquare-CpJG9Oj7.js} +1 -1
  40. package/dist/client/assets/{ZoomOut-CiTyIS5u.js → ZoomOut-C7eIvwp9.js} +1 -1
  41. package/dist/client/assets/{access-gate-ZKnrNl-k.js → access-gate-BTwMUx8s.js} +1 -1
  42. package/dist/client/assets/{add-section-modal-BENIooAl.js → add-section-modal-j_jXpJBA.js} +1 -1
  43. package/dist/client/assets/{agent-icon-CpgVmlKA.js → agent-icon-DcWi6oQf.js} +1 -1
  44. package/dist/client/assets/{agents-list-B6yzYfWy.js → agents-list-D0AfDGuT.js} +1 -1
  45. package/dist/client/assets/{ai-providers-DVlFDhhC.js → ai-providers-BuVR6Fq-.js} +1 -1
  46. package/dist/client/assets/{alert-Dtc0cxh7.js → alert-RMwHcRZt.js} +1 -1
  47. package/dist/client/assets/{alert-dialog-F25p9Qd4.js → alert-dialog-DhnepmPL.js} +3 -3
  48. package/dist/client/assets/{app-editor-BuvCOPjS.js → app-editor-0tpnZ9z8.js} +1 -1
  49. package/dist/client/assets/{auth-b_6YQ5M-.js → auth-MTgCv3B6.js} +1 -1
  50. package/dist/client/assets/{auth-catchall-B1-hfgkP.js → auth-catchall-CVuOJ40y.js} +1 -1
  51. package/dist/client/assets/{auth-entry-BTBVj0g8.js → auth-entry-DNo7lJtC.js} +1 -1
  52. package/dist/client/assets/{auth-split-layout-BgGqHUJx.js → auth-split-layout-BkcesqQu.js} +1 -1
  53. package/dist/client/assets/{authenticate-and-persist-oauth-KmxgbBFx.js → authenticate-and-persist-oauth-xA4lKCG1.js} +1 -1
  54. package/dist/client/assets/{automation-list-row-kN98yjTo.js → automation-list-row-lXLMGjAl.js} +1 -1
  55. package/dist/client/assets/{automation-runs-BtxudtXE.js → automation-runs-BNqiryvr.js} +1 -1
  56. package/dist/client/assets/automations-Dh_fnqca.js +1 -0
  57. package/dist/client/assets/{avatar-D--lTQS0.js → avatar-Bmaq3oui.js} +1 -1
  58. package/dist/client/assets/{badge-BMv5o_K8.js → badge-DgW_sNSd.js} +1 -1
  59. package/dist/client/assets/{block-document-EE_G8dwY.js → block-document-4RcwatC8.js} +1 -1
  60. package/dist/client/assets/{brand-context-DhNrXwwF.js → brand-context-D457Ff4i.js} +1 -1
  61. package/dist/client/assets/{buckets-CKUmU8cF.js → buckets-BLZkDBf0.js} +1 -1
  62. package/dist/client/assets/{capability-load-error-yDY4tChx.js → capability-load-error-DqYgq0OP.js} +1 -1
  63. package/dist/client/assets/{card-DKEaJmjc.js → card-CdB8pO82.js} +1 -1
  64. package/dist/client/assets/{category-editor-DEU1yROu.js → category-editor-DyYEMWv7.js} +1 -1
  65. package/dist/client/assets/{chat-context-D3ExOe2Y.js → chat-context-r3NULPrq.js} +5 -5
  66. package/dist/client/assets/{checkbox-BNJLgZxx.js → checkbox-D8lwJ8xg.js} +1 -1
  67. package/dist/client/assets/{cli-auth-success-Bgd-7Amv.js → cli-auth-success-D4W1hh6D.js} +1 -1
  68. package/dist/client/assets/{collection-detail-BebXxPRt.js → collection-detail-DZE_RwOf.js} +1 -1
  69. package/dist/client/assets/{collection-display-button-o0ZRKN00.js → collection-display-button-ZIEr6UdN.js} +1 -1
  70. package/dist/client/assets/{collection-search-D2ns8QJ2.js → collection-search-COO4vS-f.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-DGHCcD9t.js → collection-tabs-pohcUS35.js} +1 -1
  72. package/dist/client/assets/{command-BxU9CB6T.js → command-BEOutwEN.js} +1 -1
  73. package/dist/client/assets/commerce-onboarding-vmBc36Wn.js +1 -0
  74. package/dist/client/assets/{connect-desktop-dialog-B3nMoofq.js → connect-desktop-dialog-D1W6pIZ9.js} +1 -1
  75. package/dist/client/assets/{connection-card-D7NkQFKT.js → connection-card-DvFBQwK2.js} +1 -1
  76. package/dist/client/assets/{connection-detail-8h-8Pe2H.js → connection-detail-BiatZeVg.js} +1 -1
  77. package/dist/client/assets/{connection-form-helpers-DDvLA1rL.js → connection-form-helpers-DRUXP-X_.js} +1 -1
  78. package/dist/client/assets/{connections-sRvBRapv.js → connections-BgPPdK1V.js} +1 -1
  79. package/dist/client/assets/{context-menu-Cv2jDAnH.js → context-menu-CCN5BrKr.js} +1 -1
  80. package/dist/client/assets/{decopilot-B_42o1Ie.js → decopilot-CxPeW6hk.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-B7XaA24C.js → decopilot-sse-pool-BnDSFddS.js} +1 -1
  82. package/dist/client/assets/{dialog-BzVd1N_n.js → dialog-DdTE3CAC.js} +1 -1
  83. package/dist/client/assets/{domain-settings-CGOuE-F4.js → domain-settings-BjzJ5uyt.js} +1 -1
  84. package/dist/client/assets/{drawer-BU5LE1S-.js → drawer-DwwZCC3K.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-Cu02JhqK.js → dropdown-menu-DKzuZbGW.js} +1 -1
  86. package/dist/client/assets/{empty-state-CycaKPME.js → empty-state-rYwga-lm.js} +1 -1
  87. package/dist/client/assets/{extract-connection-data-Yinpm7Wp.js → extract-connection-data-B4owvROB.js} +1 -1
  88. package/dist/client/assets/{file-explorer-BmS8vCxm.js → file-explorer-BtKyCE-H.js} +1 -1
  89. package/dist/client/assets/{file-type-icon-BgIATQF6.js → file-type-icon-wUDm0Suu.js} +1 -1
  90. package/dist/client/assets/{files-D2hBuVbg.js → files-CtXlrxsm.js} +1 -1
  91. package/dist/client/assets/{form-O3jmDZ8D.js → form-DbBK-5wv.js} +1 -1
  92. package/dist/client/assets/{general-C7_l1b86.js → general-DF27snE9.js} +1 -1
  93. package/dist/client/assets/{github-repo-picker-pUxjtHSB.js → github-repo-picker-D-tUatSG.js} +1 -1
  94. package/dist/client/assets/{hooks-CNaD44fD.js → hooks-INfKdXVO.js} +5 -5
  95. package/dist/client/assets/{import-from-deco-dialog-Dtdwv7Ix.js → import-from-deco-dialog-le5qLPLs.js} +1 -1
  96. package/dist/client/assets/{index-g9kd8YLC.js → index-B2UoUa7-.js} +5 -5
  97. package/dist/client/assets/{index-i4yKOslE.js → index-BQKrhCqr.js} +26 -26
  98. package/dist/client/assets/{index-D4uJ-4rf.js → index-BTgWpT9v.js} +1 -1
  99. package/dist/client/assets/{index-VgUmzAVY.js → index-CUyflRk0.js} +1 -1
  100. package/dist/client/assets/{index-BvFbU3H7.js → index-Cn6fC_Ac.js} +1 -1
  101. package/dist/client/assets/{index-C-fgfOOa.js → index-D1r046zx.js} +1 -1
  102. package/dist/client/assets/{index-Dz6axdna.js → index-D8Uvg14I.js} +2 -2
  103. package/dist/client/assets/{index-Dfdfr_wO.js → index-DRm-BOiP.js} +1 -1
  104. package/dist/client/assets/{index-D0-4shy1.js → index-DX1mGsi2.js} +1 -1
  105. package/dist/client/assets/{index-BlQHqLEe.js → index-D_cJIjMW.js} +1 -1
  106. package/dist/client/assets/{index-Dk_a1p_f.js → index-Dnl2BpV5.js} +1 -1
  107. package/dist/client/assets/{index-BN_hzDkU.js → index-EsOpLcz-.js} +1 -1
  108. package/dist/client/assets/{index-DTyFHoVS.js → index-ZWwLrXbl.js} +1 -1
  109. package/dist/client/assets/index-cLiT1dYJ.js +1 -0
  110. package/dist/client/assets/{index-redirect-zjPjZ7DB.js → index-redirect-_nLhO8q2.js} +1 -1
  111. package/dist/client/assets/{input-DYWiBUd4.js → input-cOCMYrBp.js} +1 -1
  112. package/dist/client/assets/{integration-icon-DZfYl8h3.js → integration-icon-BDOKXt2t.js} +1 -1
  113. package/dist/client/assets/{label-C5DnCEJJ.js → label-BI0j7uY8.js} +1 -1
  114. package/dist/client/assets/{login-ZdxBhxLk.js → login-Tnea6rjC.js} +1 -1
  115. package/dist/client/assets/{mcp-oauth-Cn6Swd6f.js → mcp-oauth-CZJDhaE3.js} +1 -1
  116. package/dist/client/assets/{members-d7WS2vVJ.js → members-ELCKwmM1.js} +2 -2
  117. package/dist/client/assets/{monaco-editor-DdEcYsFE.js → monaco-editor-DZJR8nuD.js} +1 -1
  118. package/dist/client/assets/{monitoring-stats-row-C_007qlV.js → monitoring-stats-row-DVW1uxUq.js} +1 -1
  119. package/dist/client/assets/{oauth-callback-BYQv6ZU1.js → oauth-callback-BY0UQ4hx.js} +1 -1
  120. package/dist/client/assets/{oauth-callback-ai-provider-CVH53bYc.js → oauth-callback-ai-provider-CdAJ6XTe.js} +1 -1
  121. package/dist/client/assets/{onboarding-BzFsfWa7.js → onboarding-DHGJq1nj.js} +1 -1
  122. package/dist/client/assets/{org-install-8vVjx4xt.js → org-install-D0cgxy0P.js} +1 -1
  123. package/dist/client/assets/{org-layout-B4M0_2fh.js → org-layout-CqQb7V03.js} +1 -1
  124. package/dist/client/assets/{organization-choice-DSrJjFv2.js → organization-choice-CcykvGTC.js} +1 -1
  125. package/dist/client/assets/{page-seo-form-DOcO58Bb.js → page-seo-form-B61j3DLN.js} +1 -1
  126. package/dist/client/assets/page-seo-sheet-BKFroR3I.js +1 -0
  127. package/dist/client/assets/popover-BFI2s-K5.js +1 -0
  128. package/dist/client/assets/{post-editor-C7Z6Li9d.js → post-editor-Cx7_h-UZ.js} +1 -1
  129. package/dist/client/assets/{preview-dialog-DVVKqkqH.js → preview-dialog-CfSpAFWk.js} +1 -1
  130. package/dist/client/assets/{primitives-BBY7iXPz.js → primitives-ceFrDMZ8.js} +1 -1
  131. package/dist/client/assets/{profile-BNQWuWuJ.js → profile-CQj8hLnx.js} +1 -1
  132. package/dist/client/assets/project-app-view-DjTqKb4e.js +1 -0
  133. package/dist/client/assets/record-editor-DGroyIl1.js +1 -0
  134. package/dist/client/assets/registry-CeujA3jc.js +2 -0
  135. package/dist/client/assets/{registry-layout-WUDoPZno.js → registry-layout-DNGdaDCg.js} +1 -1
  136. package/dist/client/assets/{require-capability-DBSpClLq.js → require-capability-Dv8CdaOQ.js} +1 -1
  137. package/dist/client/assets/{required-auth-layout-DBSHkTvE.js → required-auth-layout-BI2vgegn.js} +1 -1
  138. package/dist/client/assets/{reset-password-C3CAd88p.js → reset-password-B1MVnY7V.js} +1 -1
  139. package/dist/client/assets/{roles-D-oc3H0Q.js → roles-D8h9UhMY.js} +1 -1
  140. package/dist/client/assets/{save-status-DiiQFyNz.js → save-status-C6pdsybd.js} +1 -1
  141. package/dist/client/assets/{scroll-area-BJwafxli.js → scroll-area--KGkDlfc.js} +20 -20
  142. package/dist/client/assets/{search-input-BXoNPqlW.js → search-input-ClOkWtT1.js} +1 -1
  143. package/dist/client/assets/{secrets-CBSRFkkP.js → secrets-CJZKcITI.js} +1 -1
  144. package/dist/client/assets/{sections-editor-CVrcpUD7.js → sections-editor-D6nPxPBw.js} +1 -1
  145. package/dist/client/assets/select-BpWT9NxB.js +1 -0
  146. package/dist/client/assets/{select-model-C5-GKj9v.js → select-model-BUbOpgp-.js} +1 -1
  147. package/dist/client/assets/{seo-editor-DhKev2vA.js → seo-editor-DeAuhtw-.js} +1 -1
  148. package/dist/client/assets/{settings-layout-C_UkjADM.js → settings-layout-Drs_RBsy.js} +1 -1
  149. package/dist/client/assets/{settings-section-4OTvULu2.js → settings-section-D0PQML5z.js} +1 -1
  150. package/dist/client/assets/{sheet-kBH5wWuh.js → sheet-Bh_kypR-.js} +1 -1
  151. package/dist/client/assets/{shell-controls-DO88OaHx.js → shell-controls-Nmxnzdo8.js} +1 -1
  152. package/dist/client/assets/{shell-layout-C9QfcYwS.js → shell-layout-D9BdE-pr.js} +1 -1
  153. package/dist/client/assets/{shell-route-loading-BGNAbcrB.js → shell-route-loading-BPSGiR4a.js} +1 -1
  154. package/dist/client/assets/{sidebar-CUYXItjm.js → sidebar-DPZoMbeP.js} +1 -1
  155. package/dist/client/assets/{skeleton-CDZIM9IX.js → skeleton-Ce4pjv8y.js} +1 -1
  156. package/dist/client/assets/{sortable.esm-D-2-mhpi.js → sortable.esm-BJQ3_vpH.js} +1 -1
  157. package/dist/client/assets/{sso-DyaVCCbh.js → sso-Cvmi628s.js} +1 -1
  158. package/dist/client/assets/{store-Ctd5X7Cj.js → store-DjSGMocW.js} +1 -1
  159. package/dist/client/assets/store-registry-BP6MDxTR.js +2 -0
  160. package/dist/client/assets/{studio-tools-BIon8cDY.js → studio-tools-prp9Lpwk.js} +1 -1
  161. package/dist/client/assets/{switch-Cfy-9sgc.js → switch-DldSyEsh.js} +1 -1
  162. package/dist/client/assets/{table-B9Ser0hN.js → table-CNvgb9Mo.js} +1 -1
  163. package/dist/client/assets/{tabs-DBW6pdRK.js → tabs-DZdnCzIX.js} +1 -1
  164. package/dist/client/assets/{task-status-BEL_tB4l.js → task-status-DbhcaMw-.js} +1 -1
  165. package/dist/client/assets/{textarea-DZCmuZgN.js → textarea-7wQk0SdM.js} +1 -1
  166. package/dist/client/assets/{toggle-group-BAuAoo_h.js → toggle-group-CnVWeylZ.js} +1 -1
  167. package/dist/client/assets/{toolbar-C3iNf-7g.js → toolbar-D2dJyxUi.js} +1 -1
  168. package/dist/client/assets/tooltip-BcZ7kxok.js +1 -0
  169. package/dist/client/assets/{types-_9kCqfLO.js → types-CfcfJn-e.js} +3 -3
  170. package/dist/client/assets/{use-ai-providers-CYpO6V5w.js → use-ai-providers-CYjRxPY4.js} +1 -1
  171. package/dist/client/assets/{use-automations-CCFTv539.js → use-automations-BKHbHQVe.js} +1 -1
  172. package/dist/client/assets/{use-capability-CdTgUecU.js → use-capability-_zd_sWix.js} +1 -1
  173. package/dist/client/assets/{use-clock-tick-o7ys6RNk.js → use-clock-tick-Dxhf7J79.js} +1 -1
  174. package/dist/client/assets/{use-collections-DXvOdsjP.js → use-collections-CVtzAI_4.js} +1 -1
  175. package/dist/client/assets/use-connection-BcgeGs-R.js +1 -0
  176. package/dist/client/assets/{use-copy-BGh_3bgs.js → use-copy-D7-bM3_U.js} +1 -1
  177. package/dist/client/assets/{use-create-virtual-mcp-JuYxDLVO.js → use-create-virtual-mcp-sEOK3OGz.js} +1 -1
  178. package/dist/client/assets/{use-debounced-autosave-xqhSnikO.js → use-debounced-autosave-Dw5z0WsS.js} +1 -1
  179. package/dist/client/assets/{use-delete-connection-DhRatED-.js → use-delete-connection-BA5LApPZ.js} +1 -1
  180. package/dist/client/assets/{use-file-configs-C4r9SONA.js → use-file-configs-BLlYdTvj.js} +1 -1
  181. package/dist/client/assets/{use-infinite-scroll-MldU11Y_.js → use-infinite-scroll-B3z1ggE3.js} +1 -1
  182. package/dist/client/assets/{use-join-requests-CcFOr0Kc.js → use-join-requests-DXZefKlG.js} +1 -1
  183. package/dist/client/assets/{use-mcp-client-Cf5O31zc.js → use-mcp-client-Ctg4zbCn.js} +2 -2
  184. package/dist/client/assets/{use-mcp-prompts-0LKFoXra.js → use-mcp-prompts-Dv9w7cJn.js} +1 -1
  185. package/dist/client/assets/{use-mcp-tools-BpKUIA5V.js → use-mcp-tools-CxaQCmvQ.js} +1 -1
  186. package/dist/client/assets/{use-members-Cleyn3sD.js → use-members-BdpapftV.js} +1 -1
  187. package/dist/client/assets/{use-mobile-kRXKzOd9.js → use-mobile-XBBKLnBG.js} +1 -1
  188. package/dist/client/assets/use-navigate-to-agent-wLnAUTat.js +1 -0
  189. package/dist/client/assets/use-org-auth-client-N6OssZ7e.js +1 -0
  190. package/dist/client/assets/{use-org-sso-rHZ6AeZh.js → use-org-sso-BtCKgCqJ.js} +1 -1
  191. package/dist/client/assets/{use-organization-roles-DDTawLMo.js → use-organization-roles-DIOhz7Qp.js} +1 -1
  192. package/dist/client/assets/{use-organization-settings-DR6y14Ln.js → use-organization-settings-CSB6B7Jr.js} +1 -1
  193. package/dist/client/assets/{use-registry-connections-B75n3CLT.js → use-registry-connections-D71Qe36n.js} +1 -1
  194. package/dist/client/assets/{use-secrets-D9jHoh1C.js → use-secrets-OpYJ3uj0.js} +1 -1
  195. package/dist/client/assets/{use-status-sounds-DRNyv2My.js → use-status-sounds-Bi6GrV2F.js} +1 -1
  196. package/dist/client/assets/{use-view-mode-BWd0QgE9.js → use-view-mode-Di33Xh4J.js} +1 -1
  197. package/dist/client/assets/{use-virtual-mcp-BrKgTMoD.js → use-virtual-mcp-BUu5xf_e.js} +1 -1
  198. package/dist/client/assets/useInfiniteQuery-5pwPVyhJ.js +1 -0
  199. package/dist/client/assets/useSuspenseInfiniteQuery-MlMUD9_u.js +1 -0
  200. package/dist/client/assets/{useSuspenseQueries-DTyz6kxM.js → useSuspenseQueries-DuY6292-.js} +1 -1
  201. package/dist/client/assets/{variant-calendar-VLF4t49m.js → variant-calendar-BfW4hbwz.js} +1 -1
  202. package/dist/client/assets/{view-mode-toggle-BSFLVh95.js → view-mode-toggle-DHDWPLEi.js} +1 -1
  203. package/dist/client/index.html +1 -1
  204. package/dist/server/cli.js +1 -1
  205. package/package.json +1 -1
  206. package/dist/client/assets/automations-DqIZRT7Z.js +0 -1
  207. package/dist/client/assets/commerce-onboarding-DZ_9ItcO.js +0 -1
  208. package/dist/client/assets/index-BXTj7zt6.js +0 -1
  209. package/dist/client/assets/page-seo-sheet-D5ReG0ZJ.js +0 -1
  210. package/dist/client/assets/popover-Cqn28LcZ.js +0 -1
  211. package/dist/client/assets/project-app-view-D-yuZq0b.js +0 -1
  212. package/dist/client/assets/record-editor-3o9ZHekL.js +0 -1
  213. package/dist/client/assets/registry-ClFi1QyC.js +0 -2
  214. package/dist/client/assets/select-BURfxZgH.js +0 -1
  215. package/dist/client/assets/store-registry-Ct-rpPhS.js +0 -2
  216. package/dist/client/assets/tooltip-CXJRsrjZ.js +0 -1
  217. package/dist/client/assets/use-connection-DIyKq7Ja.js +0 -1
  218. package/dist/client/assets/use-navigate-to-agent-D5T4j8BI.js +0 -1
  219. package/dist/client/assets/use-org-auth-client-DbFVvoh8.js +0 -1
  220. package/dist/client/assets/useInfiniteQuery-D6UIz-QI.js +0 -1
  221. package/dist/client/assets/useSuspenseInfiniteQuery-BR1ud50u.js +0 -1
@@ -1 +0,0 @@
1
- import{c as N,j as s,z as ls,r as z,l as Q,i as Bs,y as te,C as pe,a as Ie,D as Us,K as as,k as cs,b as Ge,e as qs,u as Jn,F as Zn,R as er,G as tr,o as sr,s as nr,n as rr,p as or,d as ir,B as ft,H as lr,I as ar,t as Oe,J as cr,M as dr,v as ur,m as mr,w as fr,P as pr,T as xr,U as hr,V as Pe,W as Ws,X as gr,Y as Ks,Z as br,_ as jr,$ as vr,a0 as yr,a1 as Sr,a2 as _r,a3 as Nr,a4 as Cr,E as Vs,O as wr}from"./index-i4yKOslE.js";import{u as Ve,S as he,a as Te,b as Lt,c as Ht,d as De,e as Ys,f as Xs,g as kr,h as Ir,i as ts,j as Tr,k as $r,l as Ar}from"./sidebar-CUYXItjm.js";import{u as ds}from"./use-mobile-kRXKzOd9.js";import{u as zr,S as vs,M as Or}from"./shell-controls-DO88OaHx.js";import{a as Pr,b as Dr,c as Mr}from"./ZoomOut-CiTyIS5u.js";import{T as ge,a as ce}from"./toolbar-C3iNf-7g.js";import{a as Me,b as Re,T as Ee,c as ys}from"./tooltip-CXJRsrjZ.js";import{S as we}from"./skeleton-CDZIM9IX.js";import{P as Bt,a as pt,b as Ut}from"./popover-Cqn28LcZ.js";import{D as Qs,a as Js,b as Zs}from"./drawer-BU5LE1S-.js";import{i as en}from"./SearchMd-CtVQE5jm.js";import{s as Rr}from"./Star01-DNr09MAY.js";import{s as ke}from"./Plus-FHaDaCOZ.js";import{i as Er,a as Fr}from"./use-mcp-client-Cf5O31zc.js";import{u as tn,a as vt,b as Gr}from"./use-virtual-mcp-BrKgTMoD.js";import{u as Lr}from"./use-create-virtual-mcp-JuYxDLVO.js";import{I as Hr,u as Br,W as Ur,H as qr,S as Wr}from"./import-from-deco-dialog-Dtdwv7Ix.js";import{A as Fe,a as Ss,b as _s,c as sn,d as Kr,e as Vr,i as Yr,f as Xr}from"./agent-icon-CpgVmlKA.js";import{G as Qr,a as Jr}from"./github-repo-picker-pUxjtHSB.js";import{u as nn,a as Zr,b as rn,T as eo}from"./hooks-CNaD44fD.js";import{r as to,u as so,R as no,a as ro,b as on}from"./shell-layout-C9QfcYwS.js";import{u as oo,g as ln,a as io,b as lo,s as ao,c as co,r as uo,d as mo,e as fo,f as po,p as xo,T as an,h as ho,i as go,j as bo,k as jo,l as vo,m as yo,n as So,o as _o,q as No,S as Ns,t as cn}from"./use-navigate-to-agent-D5T4j8BI.js";import{g as Co,u as dn,A as un,a as wo,b as ko,c as Cs,K as Io,P as To,s as $o,S as Ao,v as zo,D as Oo,d as Po,e as Do,C as Mo,f as Ro}from"./sortable.esm-D-2-mhpi.js";import{i as Eo}from"./LayoutLeft-B0kudz4E.js";import{i as mn}from"./Monitor01-CEDnJUQX.js";import{u as Fo,v as Go,C as Lo}from"./connect-desktop-dialog-B3nMoofq.js";import{A as ss}from"./avatar-D--lTQS0.js";import{i as us}from"./ChevronUp-DFVBw1Q0.js";import{a as ws}from"./Eye-XlApkfqq.js";import{n as Ho,i as Bo}from"./Globe01-BsZz_aM-.js";import{i as Uo,a as fn}from"./ZapSquare-CwCpnU0T.js";import{n as qo,a as Wo}from"./Sun-BmtS6iHG.js";import{a as yt,b as Ko,i as Vo}from"./Settings02-C2eeV5U-.js";import{i as Yo}from"./Shield01-CVbeDgIl.js";import{a as Xo}from"./Users03-FbNBHUKo.js";import{s as ms}from"./XClose-BDmZVvYt.js";import{A as Qo,a as Jo,b as Zo,c as ei,d as ti,e as si,f as ni}from"./alert-dialog-F25p9Qd4.js";import{F as ri,a as oi,b as ii,c as li,d as ai,f as ci,e as di}from"./form-O3jmDZ8D.js";import{I as ui}from"./input-DYWiBUd4.js";import{S as mi,C as fi}from"./chat-context-D3ExOe2Y.js";import"./index-DTyFHoVS.js";import{n as fs}from"./Stars02-nM_Vn7Vv.js";import{u as pi,a as xi}from"./use-join-requests-CcFOr0Kc.js";import{i as ps}from"./ChevronRight-DwQZMwjZ.js";import{i as hi}from"./FilterLines-yICREcB1.js";import{t as gi}from"./Users01-BCyCe1vl.js";import{S as ks,a as pn,b as Is,c as Ts,d as $s}from"./select-BURfxZgH.js";import{c as bi,d as ji,e as vi,b as yi,a as Si}from"./dialog-BzVd1N_n.js";import{C as _i,a as Ni,b as Ci,c as wi,d as ki}from"./command-BxU9CB6T.js";import{u as xn}from"./studio-tools-BIon8cDY.js";import{i as hn}from"./Zap-S88eHWD4.js";import{u as Ii}from"./use-org-auth-client-DbFVvoh8.js";import{C as Ot,a as As,b as gn,c as bn,d as jn}from"./context-menu-Cv2jDAnH.js";import{g as Ti,S as $i}from"./task-status-BEL_tB4l.js";import{u as Ai,f as zi}from"./use-clock-tick-o7ys6RNk.js";import{t as vn}from"./ChevronDown-DajKJ50G.js";import{S as Oi}from"./shell-route-loading-BGNAbcrB.js";import"./sheet-kBH5wWuh.js";import"./X-B5LAnKcO.js";import"./ChevronLeft-CB4idmP8.js";import"./auth-b_6YQ5M-.js";import"./use-collections-DXvOdsjP.js";import"./use-connection-DIyKq7Ja.js";import"./collection-search-D2ns8QJ2.js";import"./AlertCircle-B2rGiQLW.js";import"./Tool01-DdMkISER.js";import"./SwitchHorizontal01-BTdkOtmC.js";import"./XCircle-CJScj78U.js";import"./ArrowUpRight-DYz-mNwT.js";import"./CheckCircle-cLxWQcst.js";import"./DotsVertical-DXVlN6Ej.js";import"./Globe04-2qahfQsK.js";import"./HardDrive-BOnuPdqR.js";import"./Key01-EWZLh6Dg.js";import"./LinkExternal01-B40yAEYp.js";import"./Palette-DcfG5x3C.js";import"./Play-BqHmN8yQ.js";import"./Stars01-DUYEhBcS.js";import"./Trash01-DK9RS17_.js";import"./Upload01-cLKObBlS.js";import"./User01-CWKoITic.js";import"./checkbox-BNJLgZxx.js";import"./authenticate-and-persist-oauth-KmxgbBFx.js";import"./mcp-oauth-Cn6Swd6f.js";import"./use-mcp-tools-BpKUIA5V.js";import"./extract-connection-data-Yinpm7Wp.js";import"./decopilot-sse-pool-B7XaA24C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-DBSHkTvE.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-DR6y14Ln.js";import"./use-org-sso-rHZ6AeZh.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-D7NkQFKT.js";import"./use-registry-connections-B75n3CLT.js";import"./useInfiniteQuery-D6UIz-QI.js";import"./use-infinite-scroll-MldU11Y_.js";import"./card-DKEaJmjc.js";import"./integration-icon-DZfYl8h3.js";import"./collection-tabs-DGHCcD9t.js";import"./badge-BMv5o_K8.js";import"./textarea-DZCmuZgN.js";import"./connection-form-helpers-DDvLA1rL.js";import"./useSuspenseInfiniteQuery-BR1ud50u.js";import"./use-ai-providers-CYpO6V5w.js";import"./label-C5DnCEJJ.js";import"./use-capability-CdTgUecU.js";import"./index-D4uJ-4rf.js";import"./differenceInSeconds-NQ4PDo0z.js";function Pi(t){const e=N.c(5),{onPointerDown:n,onDoubleClick:r}=t,{state:o,isMobile:i}=Ve();if(i||o==="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 c;return e[2]!==r||e[3]!==n?(c=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:r,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]=r,e[3]=n,e[4]=c):c=e[4],c}const xs=240,Di=400,Mi="sidebar.width";function jt(t){return Math.max(xs,Math.min(Di,t))}function Ri(){const t=N.c(11),[e,n]=ls(Mi,Ei),r=z.useRef(null);let o;t[0]!==n||t[1]!==e?(o=u=>{u.preventDefault();const m=u.clientX,f=jt(e),h=r.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),p=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of p)b.style.transition="none";const x=b=>{const j=jt(f+(b.clientX-m));h?.style.setProperty("--sidebar-width",`${j}px`)},g=b=>{const j=jt(f+(b.clientX-m));n(j);for(const y of p)y.style.transition="";window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",x),window.addEventListener("pointerup",g)},t[0]=n,t[1]=e,t[2]=o):o=t[2];const i=o;let l;t[3]!==n?(l=()=>{n(xs)},t[3]=n,t[4]=l):l=t[4];const a=l;let c;t[5]!==e?(c=jt(e),t[5]=e,t[6]=c):c=t[6];let d;return t[7]!==i||t[8]!==a||t[9]!==c?(d={width:c,wrapperRef:r,onStartResize:i,resetWidth:a},t[7]=i,t[8]=a,t[9]=c,t[10]=d):d=t[10],d}function Ei(t){return typeof t=="number"?jt(t):xs}function Fi(t){const e=N.c(21),{value:n,onChange:r,placeholder:o,onKeyDown:i,className:l,isSearching:a,disabled:c}=t,d=o===void 0?"Search...":o;let u;e[0]!==l?(u=Q("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=u):u=e[1];const m=c?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==m?(f=Q("flex items-center gap-2.5 h-12 px-4",m),e[2]=m,e[3]=f):f=e[3];let h;e[4]!==a?(h=a?s.jsx(Bs,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(en,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=h):h=e[5];let p;e[6]!==r?(p=j=>r(j.target.value),e[6]=r,e[7]=p):p=e[7];let x;e[8]!==c||e[9]!==i||e[10]!==d||e[11]!==p||e[12]!==n?(x=s.jsx("input",{type:"text",value:n,onChange:p,onKeyDown:i,placeholder:d,disabled:c,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=c,e[9]=i,e[10]=d,e[11]=p,e[12]=n,e[13]=x):x=e[13];let g;e[14]!==f||e[15]!==h||e[16]!==x?(g=s.jsxs("label",{className:f,children:[h,x]}),e[14]=f,e[15]=h,e[16]=x,e[17]=g):g=e[17];let b;return e[18]!==u||e[19]!==g?(b=s.jsx("div",{className:u,children:g}),e[18]=u,e[19]=g,e[20]=b):b=e[20],b}const Gi="Select an existing agent";function Li(t){const e=N.c(5),{children:n}=t;let r;e[0]!==n?(r=s.jsx(Me,{asChild:!0,children:n}),e[0]=n,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Re,{side:"right",sideOffset:8,children:Gi}),e[2]=o):o=e[2];let i;return e[3]!==r?(i=s.jsxs(Ee,{defaultOpen:!0,delayDuration:0,children:[r,o]}),e[3]=r,e[4]=i):i=e[4],i}function Hi(){const t=N.c(5),{enableDecoImport:e}=Us(),{data:n}=Ie.useSession();let r;t[0]!==n?.user?.email?(r=as.decoProfile(n?.user?.email),t[0]=n?.user?.email,t[1]=r):r=t[1];const o=!!e&&!!n?.user?.email;let i;t[2]!==r||t[3]!==o?(i={queryKey:r,queryFn:Bi,enabled:o,staleTime:3e5},t[2]=r,t[3]=o,t[4]=i):i=t[4];const{data:l}=cs(i);return l?.isDecoUser??!1}async function Bi(){const t=await fetch("/api/deco-sites/profile");return t.ok?t.json():{isDecoUser:!1}}function Ui(t){const e=Ge(),{create:n}=nn(),{locator:r}=pe(),o=qs({strict:!1}),i=Jn({strict:!1});return async l=>{const a=crypto.randomUUID(),c=l===i.virtualmcpid?to(t,r,o.taskId??""):null;try{await n({id:a,virtual_mcp_id:l,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:l}})}}function qi(t){const e=N.c(9),{agent:n,onClick:r}=t;let o;e[0]!==n.icon||e[1]!==n.title?(o=s.jsx(Fe,{icon:n.icon,name:n.title,size:"md",className:"transition-transform group-hover:scale-105"}),e[0]=n.icon,e[1]=n.title,e[2]=o):o=e[2];let i;e[3]!==n.title?(i=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground line-clamp-2 w-full",children:n.title}),e[3]=n.title,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==o||e[7]!==i?(l=s.jsxs("button",{type:"button",onClick:r,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[o,i]}),e[5]=r,e[6]=o,e[7]=i,e[8]=l):l=e[8],l}function Wi(t){const e=N.c(65),{onClose:n,onOpenImportDeco:r,onOpenGithubImport:o}=t,[i,l]=z.useState(""),a=tn(),c=a??[],{org:d}=pe(),{data:u}=Ie.useSession(),m=u?.user?.id??"anon",f=ln(a),h=io();let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={navigateOnCreate:!0},e[0]=p):p=e[0];const{createVirtualMCP:x,isCreating:g}=Lr(p),{createFromTemplate:b,isCreating:j}=Br(),y=Hi(),v=Ui(d.slug),_=Co(a),w=i.toLowerCase(),S=c.filter(Ki).filter(Z=>!_.has(Z.id)).filter(Z=>!i||Z.title.toLowerCase().includes(w)),I=Z=>{lo({orgId:d.id,userId:m},Z.id,f),h(),n(),l(""),v(Z.id)},T="flex flex-col max-h-[min(640px,80dvh)]";let $;e[1]!==i?($=s.jsx(Fi,{value:i,onChange:l,placeholder:"Search agents..."}),e[1]=i,e[2]=$):$=e[2];const O="overflow-y-auto flex-1 min-h-0 px-3 pb-3";let A;e[3]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("div",{className:"px-1 pt-3 pb-2",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Agents"})}),e[3]=A):A=e[3];const C="grid grid-cols-3 gap-1";let M;e[4]!==x||e[5]!==n?(M=async()=>{te("agent_create_new_clicked",{source:"browse_popover"}),await x(),n()},e[4]=x,e[5]=n,e[6]=M):M=e[6];let K,U;e[7]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(ke,{size:16,className:"text-muted-foreground"})}),U=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Create new"}),e[7]=K,e[8]=U):(K=e[7],U=e[8]);let E;e[9]!==g||e[10]!==M?(E=s.jsxs("button",{type:"button",disabled:g,onClick:M,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[K,U]}),e[9]=g,e[10]=M,e[11]=E):E=e[11];let L;e[12]!==b||e[13]!==n?(L=async()=>{te("agent_create_clicked",{source:"browse_popover",method:"website"}),await b(Ur),n()},e[12]=b,e[13]=n,e[14]=L):L=e[14];let R,H;e[15]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(Rr,{className:"size-5 text-muted-foreground"})}),H=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Start Website"}),e[15]=R,e[16]=H):(R=e[15],H=e[16]);let P;e[17]!==j||e[18]!==L?(P=s.jsxs("button",{type:"button",disabled:j,onClick:L,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[R,H]}),e[17]=j,e[18]=L,e[19]=P):P=e[19];let G;e[20]!==b||e[21]!==n?(G=async()=>{te("agent_create_clicked",{source:"browse_popover",method:"hydrogen"}),await b(qr),n()},e[20]=b,e[21]=n,e[22]=G):G=e[22];let D,B;e[23]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx("img",{src:Wr,alt:"",className:"size-5 object-contain"})}),B=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Shopify Headless Store"}),e[23]=D,e[24]=B):(D=e[23],B=e[24]);let F;e[25]!==j||e[26]!==G?(F=s.jsxs("button",{type:"button",disabled:j,onClick:G,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[D,B]}),e[25]=j,e[26]=G,e[27]=F):F=e[27];let Y;e[28]!==n||e[29]!==o?(Y=()=>{te("agent_import_clicked",{source:"github"}),o(),n()},e[28]=n,e[29]=o,e[30]=Y):Y=e[30];let ee,V;e[31]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(Jr,{className:"size-5 text-muted-foreground"})}),V=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Import GitHub"}),e[31]=ee,e[32]=V):(ee=e[31],V=e[32]);let J;e[33]!==Y?(J=s.jsxs("button",{type:"button",onClick:Y,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[ee,V]}),e[33]=Y,e[34]=J):J=e[34];let X;e[35]!==y||e[36]!==n||e[37]!==r?(X=y&&s.jsxs("button",{type:"button",onClick:()=>{te("agent_import_clicked",{source:"deco"}),r(),n()},className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"",className:"size-5 object-contain"})}),s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Import deco.cx"})]}),e[35]=y,e[36]=n,e[37]=r,e[38]=X):X=e[38];const W=S.map(Z=>s.jsx(qi,{agent:Z,onClick:()=>I(Z)},Z.id));let re;e[39]!==E||e[40]!==P||e[41]!==F||e[42]!==J||e[43]!==X||e[44]!==W?(re=s.jsxs("div",{className:C,children:[E,P,F,J,X,W]}),e[39]=E,e[40]=P,e[41]=F,e[42]=J,e[43]=X,e[44]=W,e[45]=re):re=e[45];let ie;e[46]!==g||e[47]!==i||e[48]!==S.length?(ie=S.length===0&&!g&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:i?"No agents found":"No agents yet"}),e[46]=g,e[47]=i,e[48]=S.length,e[49]=ie):ie=e[49];let ue;e[50]!==re||e[51]!==ie||e[52]!==A?(ue=s.jsxs("div",{className:O,children:[A,re,ie]}),e[50]=re,e[51]=ie,e[52]=A,e[53]=ue):ue=e[53];let ne;e[54]!==d.slug?(ne={org:d.slug},e[54]=d.slug,e[55]=ne):ne=e[55];let oe;e[56]!==n?(oe=()=>n(),e[56]=n,e[57]=oe):oe=e[57];let le;e[58]!==ne||e[59]!==oe?(le=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Zn,{to:"/$org/settings/agents",params:ne,onClick:oe,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[58]=ne,e[59]=oe,e[60]=le):le=e[60];let xe;return e[61]!==ue||e[62]!==$||e[63]!==le?(xe=s.jsxs("div",{className:T,children:[$,ue,le]}),e[61]=ue,e[62]=$,e[63]=le,e[64]=xe):xe=e[64],xe}function Ki(t){return!Er(t.id)}function yn(t){const e=N.c(26);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:r}=n,o=r===void 0?!1:r,[i,l]=z.useState(!1),[a,c]=z.useState(!1),[d,u]=z.useState(!1),m=ds(),{setOpenMobile:f}=Ve(),h=oo(),p=h?"border border-border":void 0;let x;e[2]!==h?(x=T=>h?s.jsx(Li,{children:T}):T,e[2]=h,e[3]=x):x=e[3];const g=x;let b;e[4]!==m||e[5]!==f?(b=()=>{l(!1),m&&f(!1)},e[4]=m,e[5]=f,e[6]=b):b=e[6];const j=b;let y;e[7]!==j||e[8]!==i?(y=i&&s.jsx(z.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(we,{className:"h-4 w-24"})}),children:s.jsx(Wi,{onClose:j,onOpenImportDeco:()=>c(!0),onOpenGithubImport:()=>{u(!0),j()}})}),e[7]=j,e[8]=i,e[9]=y):y=e[9];const v=y;let _;e[10]!==o||e[11]!==p||e[12]!==h||e[13]!==m||e[14]!==i||e[15]!==v||e[16]!==g?(_=m?s.jsxs(s.Fragment,{children:[o?g(s.jsx(ge,{"aria-label":"Browse agents",className:Q(p),onClick:()=>{te("agent_browser_opened",{surface:"mobile_drawer"}),l(!0)},children:s.jsx(ke,{className:"size-4"})})):s.jsx(he,{children:g(s.jsxs(Te,{tooltip:h?void 0:"Browse agents",className:Q(p),onClick:()=>{te("agent_browser_opened",{surface:"mobile_drawer"}),l(!0)},children:[s.jsx(ke,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(Qs,{open:i,onOpenChange:l,direction:"bottom",children:s.jsxs(Js,{className:"max-h-[85dvh] p-0",children:[s.jsx(Zs,{className:"sr-only",children:"Browse agents"}),v]})})]}):s.jsxs(Bt,{open:i,onOpenChange:T=>{T&&!i&&te("agent_browser_opened",{surface:"desktop_popover"}),l(T)},children:[o?g(s.jsx(pt,{asChild:!0,children:s.jsx(ge,{"aria-label":"Browse agents",className:Q(p),children:s.jsx(ke,{className:"size-4"})})})):s.jsx(he,{children:g(s.jsx(pt,{asChild:!0,children:s.jsxs(Te,{tooltip:h?void 0:"Browse agents",className:Q(p),children:[s.jsx(ke,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Ut,{className:"w-[380px] p-0 overflow-hidden",side:"right",align:"start",children:v})]}),e[10]=o,e[11]=p,e[12]=h,e[13]=m,e[14]=i,e[15]=v,e[16]=g,e[17]=_):_=e[17];let w;e[18]!==a?(w=s.jsx(Hr,{open:a,onOpenChange:c}),e[18]=a,e[19]=w):w=e[19];let S;e[20]!==d?(S=s.jsx(Qr,{open:d,onOpenChange:u}),e[20]=d,e[21]=S):S=e[21];let I;return e[22]!==_||e[23]!==w||e[24]!==S?(I=s.jsxs(s.Fragment,{children:[_,w,S]}),e[22]=_,e[23]=w,e[24]=S,e[25]=I):I=e[25],I}function Sn(){const t=N.c(24),{org:e}=pe(),n=Ge(),o=zr().location.pathname,i=e.slug,{state:l,isMobile:a}=Ve(),c=!a&&l==="collapsed";let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Pr,{className:"size-4!"}),t[0]=d):d=t[0];const u=o===`/${i}`||o===`/${i}/`;let m;t[1]!==n||t[2]!==i?(m=()=>{n({to:"/$org",params:{org:i}})},t[1]=n,t[2]=i,t[3]=m):m=t[3];let f;t[4]!==u||t[5]!==m?(f={key:"home",label:"Home",icon:d,isActive:u,onClick:m},t[4]=u,t[5]=m,t[6]=f):f=t[6];const h=f;let p;t[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Dr,{className:"size-4!"}),t[7]=p):p=t[7];let x;t[8]!==o||t[9]!==i?(x=o.startsWith(`/${i}/files`),t[8]=o,t[9]=i,t[10]=x):x=t[10];let g;t[11]!==n||t[12]!==i?(g=()=>{n({to:"/$org/files",params:{org:i}})},t[11]=n,t[12]=i,t[13]=g):g=t[13];let b;t[14]!==x||t[15]!==g?(b={key:"files",label:"Library",icon:p,isActive:x,onClick:g},t[14]=x,t[15]=g,t[16]=b):b=t[16];const j=b;let y;t[17]!==j||t[18]!==h?(y={type:"items",items:[h,j]},t[17]=j,t[18]=h,t[19]=y):y=t[19];let v;if(t[20]!==c||t[21]!==y){if(v=[y],c){let _;t[23]===Symbol.for("react.memo_cache_sentinel")?(_={type:"custom",key:"new-task",content:s.jsx(Lt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ht,{children:s.jsx(De,{className:"gap-1.5",children:s.jsx(yn,{})})})})},t[23]=_):_=t[23],v.push(_)}t[20]=c,t[21]=y,t[22]=v}else v=t[22];return v}function Rt(t){const e=N.c(12);let n,r,o,i;e[0]!==t?({className:n,orientation:o,decorative:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i):(n=e[1],r=e[2],o=e[3],i=e[4]);const l=o===void 0?"horizontal":o,a=i===void 0?!0:i;let c;e[5]!==n?(c=Q("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),e[5]=n,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==l||e[9]!==r||e[10]!==c?(d=s.jsx(er,{"data-slot":"separator-root",decorative:a,orientation:l,className:c,...r}),e[7]=a,e[8]=l,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}function _n(t){const e=N.c(3),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=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]=r):r=e[0];let o;return e[1]!==n?(o=s.jsxs(Lt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[r,s.jsx(Ht,{children:s.jsx(De,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function Nn(t){const e=N.c(18),{item:n}=t,{isMobile:r,setOpenMobile:o}=Ve();let i;e[0]!==r||e[1]!==n||e[2]!==o?(i=()=>{te("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:r}),n.onClick?.(),r&&o(!1)},e[0]=r,e[1]=n,e[2]=o,e[3]=i):i=e[3];const l=i,a=n.key,c=n.isActive&&"z-10";let d;e[4]!==c?(d=Q(c),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==n.label?(u=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=u):u=e[7];let m;e[8]!==l||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==u?(m=s.jsxs(Te,{onClick:l,isActive:n.isActive,tooltip:n.label,children:[n.icon,u]}),e[8]=l,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=u,e[13]=m):m=e[13];let f;return e[14]!==n.key||e[15]!==d||e[16]!==m?(f=s.jsx(he,{className:d,children:m},a),e[14]=n.key,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function Vi(t){const e=N.c(12),{section:n}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ys,{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 i;e[2]!==n.group.items?(i=n.group.items.map(Xi),e[2]=n.group.items,e[3]=i):i=e[3];let l;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(l=s.jsx(_n,{label:r,defaultExpanded:o,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=l):l=e[7],l}case"items":{let r;e[8]!==n.items?(r=n.items.map(Yi),e[8]=n.items,e[9]=r):r=e[9];let o;return e[10]!==r?(o=s.jsx(Lt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ht,{children:s.jsx(De,{className:"gap-1.5",children:r})})}),e[10]=r,e[11]=o):o=e[11],o}case"custom":return n.content}}function Yi(t){return s.jsx(Nn,{item:t},t.key)}function Xi(t){return s.jsx(Nn,{item:t},t.key)}function Qi(t){const e=N.c(14),{sections:n,footer:r,additionalContent:o,variant:i,contentClassName:l}=t,a=i===void 0?"sidebar":i;let c;e[0]!==l?(c=Q("flex flex-col flex-1 px-2 py-2 gap-0.5",l),e[0]=l,e[1]=c):c=e[1];let d;e[2]!==n?(d=n.map(Ji),e[2]=n,e[3]=d):d=e[3];let u;e[4]!==o?(u=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[4]=o,e[5]=u):u=e[5];let m;e[6]!==c||e[7]!==d||e[8]!==u?(m=s.jsxs(Xs,{className:c,children:[d,u]}),e[6]=c,e[7]=d,e[8]=u,e[9]=m):m=e[9];let f;return e[10]!==r||e[11]!==m||e[12]!==a?(f=s.jsxs(kr,{variant:a,children:[m,r]}),e[10]=r,e[11]=m,e[12]=a,e[13]=f):f=e[13],f}function Ji(t,e){return s.jsx(Vi,{section:t},e)}function Cn(t){const e=N.c(2);let n;return e[0]!==t?(n=s.jsx(Qi,{...t}),e[0]=t,e[1]=n):n=e[1],n}Cn.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(we,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function ns(){const t=N.c(22),e=Fo(),[n,r]=z.useState(!1);let o;if(t[0]!==e.capabilities||t[1]!==e.hostname||t[2]!==e.machineId||t[3]!==e.online){const x=Go(e.capabilities);o=e.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:e.hostname??e.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:x.length>0?`Available: ${x.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),t[0]=e.capabilities,t[1]=e.hostname,t[2]=e.machineId,t[3]=e.online,t[4]=o}else o=t[4];const i=o;let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=()=>r(!0),t[5]=l):l=t[5];const a=e.online?"Desktop linked":"Connect your desktop";let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(mn,{size:16}),t[6]=c):c=t[6];let d;t[7]!==e.online?(d=e.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),t[7]=e.online,t[8]=d):d=t[8];let u;t[9]!==a||t[10]!==d?(u=s.jsx(Me,{asChild:!0,children:s.jsxs(ge,{onClick:l,"aria-label":a,children:[c,d]})}),t[9]=a,t[10]=d,t[11]=u):u=t[11];let m;t[12]!==i?(m=s.jsx(Re,{side:"bottom",children:i}),t[12]=i,t[13]=m):m=t[13];let f;t[14]!==u||t[15]!==m?(f=s.jsxs(Ee,{children:[u,m]}),t[14]=u,t[15]=m,t[16]=f):f=t[16];let h;t[17]!==n?(h=s.jsx(Lo,{open:n,onOpenChange:r}),t[17]=n,t[18]=h):h=t[18];let p;return t[19]!==f||t[20]!==h?(p=s.jsxs(s.Fragment,{children:[f,h]}),t[19]=f,t[20]=h,t[21]=p):p=t[21],p}function Zi(t){const e=N.c(17),{onToggle:n,className:r}=t,i=Us().logo??tr,l=typeof i=="string"?i:i.light,a=typeof i=="string"?i:i.dark;let c;e[0]!==r?(c=Q("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",r),e[0]=r,e[1]=c):c=e[1];let d;e[2]!==l?(d=s.jsx("img",{src:l,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=l,e[3]=d):d=e[3];let u;e[4]!==a?(u=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=u):u=e[5];let m;e[6]!==d||e[7]!==u?(m=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[d,u]})}),e[6]=d,e[7]=u,e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Eo,{size:16}),e[9]=f):f=e[9];let h;e[10]!==n?(h=s.jsx(ge,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=h):h=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ns,{}),e[12]=p):p=e[12];let x;return e[13]!==c||e[14]!==m||e[15]!==h?(x=s.jsxs(Ir,{className:c,children:[m,h,p]}),e[13]=c,e[14]=m,e[15]=h,e[16]=x):x=e[16],x}function zs(t){const e=N.c(18),{item:n,onClose:r}=t,o=n.isActive&&"z-10";let i;e[0]!==o?(i=Q(o),e[0]=o,e[1]=i):i=e[1];let l;e[2]!==n||e[3]!==r?(l=()=>{n.onClick?.(),r()},e[2]=n,e[3]=r,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 c;e[7]!==n.label?(c=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=c):c=e[8];let d;e[9]!==n.isActive||e[10]!==n.label||e[11]!==l||e[12]!==a||e[13]!==c?(d=s.jsxs(Te,{onClick:l,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,c]}),e[9]=n.isActive,e[10]=n.label,e[11]=l,e[12]=a,e[13]=c,e[14]=d):d=e[14];let u;return e[15]!==i||e[16]!==d?(u=s.jsx(he,{className:i,children:d}),e[15]=i,e[16]=d,e[17]=u):u=e[17],u}function el(t){const e=N.c(18),{section:n,onClose:r}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ys,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,i=n.group.defaultExpanded;let l;if(e[2]!==r||e[3]!==n.group.items){let c;e[5]!==r?(c=d=>s.jsx(zs,{item:d,onClose:r},d.key),e[5]=r,e[6]=c):c=e[6],l=n.group.items.map(c),e[2]=r,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(_n,{label:o,defaultExpanded:i,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 o;if(e[11]!==r||e[12]!==n.items){let l;e[14]!==r?(l=a=>s.jsx(zs,{item:a,onClose:r},a.key),e[14]=r,e[15]=l):l=e[15],o=n.items.map(l),e[11]=r,e[12]=n.items,e[13]=o}else o=e[13];let i;return e[16]!==o?(i=s.jsx(Lt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ht,{children:s.jsx(De,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=i):i=e[17],i}case"custom":return n.content}}function tl(t){const e=N.c(17),{sections:n,onClose:r,footer:o,additionalContent:i}=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]!==r?(a=s.jsx(z.Suspense,{fallback:l,children:s.jsx(Zi,{onToggle:r})}),e[1]=r,e[2]=a):a=e[2];let c;if(e[3]!==r||e[4]!==n){let f;e[6]!==r?(f=(h,p)=>s.jsx(el,{section:h,onClose:r},p),e[6]=r,e[7]=f):f=e[7],c=n.map(f),e[3]=r,e[4]=n,e[5]=c}else c=e[5];let d;e[8]!==i?(d=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[8]=i,e[9]=d):d=e[9];let u;e[10]!==c||e[11]!==d?(u=s.jsxs(Xs,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[c,d]}),e[10]=c,e[11]=d,e[12]=u):u=e[12];let m;return e[13]!==o||e[14]!==a||e[15]!==u?(m=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,u,o]}),e[13]=o,e[14]=a,e[15]=u,e[16]=m):m=e[16],m}function wn(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const sl=sr({name:nr().min(2,"Organization name is required")});function nl(t){const e=N.c(41),{open:n,onOpenChange:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={resolver:rr(sl),defaultValues:{name:""}},e[0]=o):o=e[0];const i=or(o);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={mutationFn:ol,onSuccess:rl},e[1]=l):l=e[1];const a=ir(l),c=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(Zo,{children:[s.jsx(ei,{children:"Create a new organization"}),s.jsx(ti,{children:"Set up a new organization to collaborate with others."})]}),e[2]=d):d=e[2];let u;if(e[3]!==a||e[4]!==i){let S;e[6]!==a?(S=I=>a.mutateAsync(I),e[6]=a,e[7]=S):S=e[7],u=i.handleSubmit(S),e[3]=a,e[4]=i,e[5]=u}else u=e[5];let m;e[8]!==i.formState.isSubmitting?(m=S=>{const{field:I}=S;return s.jsxs(ii,{children:[s.jsx(li,{children:"Organization Name"}),s.jsx(ai,{children:s.jsx(ui,{...I,placeholder:"Acme Inc.",disabled:i.formState.isSubmitting})}),s.jsx(ci,{children:"The name of your company or organization"}),I.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:"","/",wn(I.value)]})]}),s.jsx(di,{})]})},e[8]=i.formState.isSubmitting,e[9]=m):m=e[9];let f;e[10]!==i.control||e[11]!==m?(f=s.jsx(ri,{control:i.control,name:"name",render:m}),e[10]=i.control,e[11]=m,e[12]=f):f=e[12];let h;e[13]!==c?(h=c&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:c}),e[13]=c,e[14]=h):h=e[14];let p;e[15]!==a||e[16]!==i?(p=()=>{a.reset(),i.reset()},e[15]=a,e[16]=i,e[17]=p):p=e[17];let x;e[18]!==i.formState.isSubmitting||e[19]!==p?(x=s.jsx(Qo,{disabled:i.formState.isSubmitting,onClick:p,children:"Cancel"}),e[18]=i.formState.isSubmitting,e[19]=p,e[20]=x):x=e[20];const g=!i.formState.isValid||i.formState.isSubmitting;let b;e[21]!==i.formState.isSubmitting?(b=i.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(mi,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=i.formState.isSubmitting,e[22]=b):b=e[22];let j;e[23]!==g||e[24]!==b?(j=s.jsx(ft,{type:"submit",variant:"default",disabled:g,children:b}),e[23]=g,e[24]=b,e[25]=j):j=e[25];let y;e[26]!==j||e[27]!==x?(y=s.jsxs(si,{children:[x,j]}),e[26]=j,e[27]=x,e[28]=y):y=e[28];let v;e[29]!==y||e[30]!==u||e[31]!==f||e[32]!==h?(v=s.jsxs("form",{className:"space-y-6",onSubmit:u,autoComplete:"off",children:[f,h,y]}),e[29]=y,e[30]=u,e[31]=f,e[32]=h,e[33]=v):v=e[33];let _;e[34]!==i||e[35]!==v?(_=s.jsxs(Jo,{children:[d,s.jsx(oi,{...i,children:v})]}),e[34]=i,e[35]=v,e[36]=_):_=e[36];let w;return e[37]!==r||e[38]!==n||e[39]!==_?(w=s.jsx(ni,{open:n,onOpenChange:r,children:_}),e[37]=r,e[38]=n,e[39]=_,e[40]=w):w=e[40],w}function rl(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function ol(t){const e=wn(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await Ie.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const r=n?.data?.slug??e;if(!r)throw new Error("Failed to create organization");return{orgSlug:r}}function rs(t){let e=0;for(let r=0;r<t.length;r++)e=t.charCodeAt(r)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function il(t){const e=N.c(13),{org:n,size:r}=t,o=r===void 0?"sm":r,i=o==="xs"?"size-5":"size-6",l=o==="xs"?"text-[9px]":"text-xs";let a;e[0]!==i?(a=Q(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=a):a=e[1];let c;e[2]!==n.logo||e[3]!==n.name?(c=n.logo?void 0:rs(n.name),e[2]=n.logo,e[3]=n.name,e[4]=c):c=e[4];let d;e[5]!==n.logo||e[6]!==n.name||e[7]!==l?(d=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:Q("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]=d):d=e[8];let u;return e[9]!==a||e[10]!==c||e[11]!==d?(u=s.jsx("div",{className:a,style:c,children:d}),e[9]=a,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function Pt(t){const e=N.c(22),{item:n,onClose:r}=t;if(n.href){const c=n.external?"_blank":void 0,d=n.external?"noopener noreferrer":void 0;let u;e[0]!==n.icon?(u=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[0]=n.icon,e[1]=u):u=e[1];let m;e[2]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[2]=n.label,e[3]=m):m=e[3];let f;return e[4]!==n.href||e[5]!==r||e[6]!==c||e[7]!==d||e[8]!==u||e[9]!==m?(f=s.jsxs("a",{href:n.href,target:c,rel:d,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:r,children:[u,m]}),e[4]=n.href,e[5]=r,e[6]=c,e[7]=d,e[8]=u,e[9]=m,e[10]=f):f=e[10],f}let o;e[11]!==n||e[12]!==r?(o=()=>{n.onClick?.(),r()},e[11]=n,e[12]=r,e[13]=o):o=e[13];let i;e[14]!==n.icon?(i=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[14]=n.icon,e[15]=i):i=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]!==o||e[19]!==i||e[20]!==l?(a=s.jsxs("button",{type:"button",onClick:o,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:[i,l]}),e[18]=o,e[19]=i,e[20]=l,e[21]=a):a=e[21],a}function Os(t){const e=N.c(31),{orgParam:n,onSelectOrg:r,onCreateOrg:o}=t,{data:i}=ur();let l;e[0]!==n?(l=(C,M)=>C.slug===n?-1:M.slug===n?1:C.name.localeCompare(M.name),e[0]=n,e[1]=l):l=e[1];const a=[...i??[]].sort(l),[c,d]=z.useState(!1),[u,m]=z.useState(""),f=u.toLowerCase(),h=f?a.filter(C=>C.name.toLowerCase().includes(f)||C.slug.toLowerCase().includes(f)):a;let p;e[2]!==c?(p=function(){c&&m(""),d(ll)},e[2]=c,e[3]=p):p=e[3];const x=p;let g;e[4]!==u||e[5]!==c||e[6]!==x?(g=c?s.jsx("input",{autoFocus:!0,type:"text",value:u,onChange:C=>m(C.target.value),onKeyDown:C=>C.key==="Escape"&&x(),placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}):s.jsx("span",{className:"text-sm font-medium text-muted-foreground/60",children:"Your Organizations"}),e[4]=u,e[5]=c,e[6]=x,e[7]=g):g=e[7];let b;e[8]!==c?(b=c?s.jsx(ms,{size:16}):s.jsx(en,{size:16}),e[8]=c,e[9]=b):b=e[9];let j;e[10]!==b||e[11]!==x?(j=s.jsx("button",{type:"button",onClick:x,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:b}),e[10]=b,e[11]=x,e[12]=j):j=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ke,{size:16}),e[13]=y):y=e[13];let v;e[14]!==o?(v=s.jsx("button",{type:"button",onClick:o,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:y}),e[14]=o,e[15]=v):v=e[15];let _;e[16]!==j||e[17]!==v?(_=s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[j,v]}),e[16]=j,e[17]=v,e[18]=_):_=e[18];let w;e[19]!==g||e[20]!==_?(w=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[g,_]}),e[19]=g,e[20]=_,e[21]=w):w=e[21];const S="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1",I=h.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:u?`No organizations match "${u}"`:"No organizations available"});let T;e[22]!==r||e[23]!==n?(T=C=>s.jsxs("button",{type:"button",onClick:()=>r(C.slug),className:Q("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",C.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(il,{org:C,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:C.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:C.slug})]}),C.slug===n&&s.jsx(us,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},C.id),e[22]=r,e[23]=n,e[24]=T):T=e[24];const $=h.map(T);let O;e[25]!==I||e[26]!==$?(O=s.jsxs("div",{className:S,children:[I,$]}),e[25]=I,e[26]=$,e[27]=O):O=e[27];let A;return e[28]!==O||e[29]!==w?(A=s.jsxs(s.Fragment,{children:[w,O]}),e[28]=O,e[29]=w,e[30]=A):A=e[30],A}function ll(t){return!t}function Ps(t){const e=N.c(142),{user:n,userImage:r,menuItems:o,signOutItem:i,themeOptions:l,preferences:a,setPreferences:c,orgParam:d,onSelectOrg:u,onCreateOrg:m,close:f,isMobile:h,open:p}=t;if(h){const X=n?.name??"U";let W;e[0]!==X||e[1]!==r?(W=s.jsx(ss,{url:r,fallback:X,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=X,e[1]=r,e[2]=W):W=e[2];const re=n?.name??"User";let ie;e[3]!==re?(ie=s.jsx("p",{className:"text-sm font-medium truncate",children:re}),e[3]=re,e[4]=ie):ie=e[4];const ue=n?.email;let ne;e[5]!==ue?(ne=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:ue}),e[5]=ue,e[6]=ne):ne=e[6];let oe;e[7]!==ie||e[8]!==ne?(oe=s.jsxs("div",{className:"flex-1 min-w-0",children:[ie,ne]}),e[7]=ie,e[8]=ne,e[9]=oe):oe=e[9];let le;e[10]!==n?(le=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(ul)},e[10]=n,e[11]=le):le=e[11];let xe;e[12]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(ws,{size:14}),e[12]=xe):xe=e[12];let Z;e[13]!==le?(Z=s.jsx(Me,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:le,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:xe})}),e[13]=le,e[14]=Z):Z=e[14];let $e;e[15]===Symbol.for("react.memo_cache_sentinel")?($e=s.jsx(Re,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=$e):$e=e[15];let me;e[16]!==Z?(me=s.jsx(ys,{delayDuration:300,children:s.jsxs(Ee,{children:[Z,$e]})}),e[16]=Z,e[17]=me):me=e[17];let be;e[18]!==me||e[19]!==W||e[20]!==oe?(be=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[W,oe,me]}),e[18]=me,e[19]=W,e[20]=oe,e[21]=be):be=e[21];const je=String(p);let Ae;e[22]!==m||e[23]!==u||e[24]!==d||e[25]!==je?(Ae=s.jsx("div",{className:"border-b border-border pb-2",children:s.jsx(Os,{orgParam:d,onSelectOrg:u,onCreateOrg:m},je)}),e[22]=m,e[23]=u,e[24]=d,e[25]=je,e[26]=Ae):Ae=e[26];let ve;if(e[27]!==f||e[28]!==o){let ae;e[30]!==f?(ae=ze=>s.jsx(Pt,{item:ze,onClose:f},ze.key),e[30]=f,e[31]=ae):ae=e[31],ve=o.map(ae),e[27]=f,e[28]=o,e[29]=ve}else ve=e[29];let Le;e[32]!==f||e[33]!==i?(Le=s.jsx(Pt,{item:i,onClose:f}),e[32]=f,e[33]=i,e[34]=Le):Le=e[34];let _e;e[35]!==ve||e[36]!==Le?(_e=s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[ve,Le]}),e[35]=ve,e[36]=Le,e[37]=_e):_e=e[37];let ye;e[38]!==Ae||e[39]!==_e?(ye=s.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[Ae,_e]}),e[38]=Ae,e[39]=_e,e[40]=ye):ye=e[40];let He;if(e[41]!==a.theme||e[42]!==c||e[43]!==l){let ae;e[45]!==a.theme||e[46]!==c?(ae=ze=>{const{value:Ce,icon:gt,label:Xe}=ze;return s.jsx("button",{type:"button","aria-label":Xe,onClick:()=>c(bt=>({...bt,theme:Ce})),className:Q("size-8 rounded-md flex items-center justify-center transition-colors",a.theme===Ce?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:gt},Ce)},e[45]=a.theme,e[46]=c,e[47]=ae):ae=e[47],He=l.map(ae),e[41]=a.theme,e[42]=c,e[43]=l,e[44]=He}else He=e[44];let Be;e[48]!==He?(Be=s.jsx("div",{className:"flex items-center gap-0.5",children:He}),e[48]=He,e[49]=Be):Be=e[49];const xt=a.enableSounds?"Disable sounds":"Enable sounds";let Ue;e[50]!==c?(Ue=()=>c(dl),e[50]=c,e[51]=Ue):Ue=e[51];const Ye=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let de;e[52]!==Ye?(de=Q("size-8 rounded-md flex items-center justify-center transition-colors",Ye),e[52]=Ye,e[53]=de):de=e[53];let qe;e[54]!==a.enableSounds?(qe=a.enableSounds?s.jsx(Ss,{size:14}):s.jsx(_s,{size:14}),e[54]=a.enableSounds,e[55]=qe):qe=e[55];let We;e[56]!==xt||e[57]!==Ue||e[58]!==de||e[59]!==qe?(We=s.jsx("button",{type:"button","aria-label":xt,onClick:Ue,className:de,children:qe}),e[56]=xt,e[57]=Ue,e[58]=de,e[59]=qe,e[60]=We):We=e[60];let ht;e[61]===Symbol.for("react.memo_cache_sentinel")?(ht=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","3.95.3"]}),e[61]=ht):ht=e[61];let Ke;e[62]!==We?(Ke=s.jsxs("div",{className:"flex items-center gap-2",children:[We,ht]}),e[62]=We,e[63]=Ke):Ke=e[63];let Ne;e[64]!==Be||e[65]!==Ke?(Ne=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[Be,Ke]}),e[64]=Be,e[65]=Ke,e[66]=Ne):Ne=e[66];let Se;return e[67]!==be||e[68]!==ye||e[69]!==Ne?(Se=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[be,ye,Ne]}),e[67]=be,e[68]=ye,e[69]=Ne,e[70]=Se):Se=e[70],Se}const x=n?.name??"U";let g;e[71]!==x||e[72]!==r?(g=s.jsx(ss,{url:r,fallback:x,shape:"circle",size:"sm",className:"shrink-0"}),e[71]=x,e[72]=r,e[73]=g):g=e[73];const b=n?.name??"User";let j;e[74]!==b?(j=s.jsx("p",{className:"text-sm font-medium truncate",children:b}),e[74]=b,e[75]=j):j=e[75];const y=n?.email;let v;e[76]!==y?(v=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y}),e[76]=y,e[77]=v):v=e[77];let _;e[78]!==j||e[79]!==v?(_=s.jsxs("div",{className:"flex-1 min-w-0",children:[j,v]}),e[78]=j,e[79]=v,e[80]=_):_=e[80];let w;e[81]!==n?(w=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(cl)},e[81]=n,e[82]=w):w=e[82];let S;e[83]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ws,{size:14}),e[83]=S):S=e[83];let I;e[84]!==w?(I=s.jsx(Me,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:w,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:S})}),e[84]=w,e[85]=I):I=e[85];let T;e[86]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(Re,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[86]=T):T=e[86];let $;e[87]!==I?($=s.jsx(ys,{delayDuration:300,children:s.jsxs(Ee,{children:[I,T]})}),e[87]=I,e[88]=$):$=e[88];let O;e[89]!==$||e[90]!==g||e[91]!==_?(O=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[g,_,$]}),e[89]=$,e[90]=g,e[91]=_,e[92]=O):O=e[92];let A;if(e[93]!==f||e[94]!==o){let X;e[96]!==f?(X=W=>s.jsx(Pt,{item:W,onClose:f},W.key),e[96]=f,e[97]=X):X=e[97],A=o.map(X),e[93]=f,e[94]=o,e[95]=A}else A=e[95];let C;e[98]!==f||e[99]!==i?(C=s.jsx(Pt,{item:i,onClose:f}),e[98]=f,e[99]=i,e[100]=C):C=e[100];let M;e[101]!==A||e[102]!==C?(M=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[A,C]}),e[101]=A,e[102]=C,e[103]=M):M=e[103];let K;if(e[104]!==a.theme||e[105]!==c||e[106]!==l){let X;e[108]!==a.theme||e[109]!==c?(X=W=>{const{value:re,icon:ie,label:ue}=W;return s.jsx("button",{type:"button","aria-label":ue,onClick:()=>c(ne=>({...ne,theme:re})),className:Q("size-7 rounded-md flex items-center justify-center transition-colors",a.theme===re?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:ie},re)},e[108]=a.theme,e[109]=c,e[110]=X):X=e[110],K=l.map(X),e[104]=a.theme,e[105]=c,e[106]=l,e[107]=K}else K=e[107];let U;e[111]!==K?(U=s.jsx("div",{className:"flex items-center gap-0.5",children:K}),e[111]=K,e[112]=U):U=e[112];const E=a.enableSounds?"Disable sounds":"Enable sounds";let L;e[113]!==c?(L=()=>c(al),e[113]=c,e[114]=L):L=e[114];const R=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let H;e[115]!==R?(H=Q("size-7 rounded-md flex items-center justify-center transition-colors",R),e[115]=R,e[116]=H):H=e[116];let P;e[117]!==a.enableSounds?(P=a.enableSounds?s.jsx(Ss,{size:14}):s.jsx(_s,{size:14}),e[117]=a.enableSounds,e[118]=P):P=e[118];let G;e[119]!==E||e[120]!==L||e[121]!==H||e[122]!==P?(G=s.jsx("button",{type:"button","aria-label":E,onClick:L,className:H,children:P}),e[119]=E,e[120]=L,e[121]=H,e[122]=P,e[123]=G):G=e[123];let D;e[124]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","3.95.3"]}),e[124]=D):D=e[124];let B;e[125]!==G?(B=s.jsxs("div",{className:"flex items-center gap-2",children:[G,D]}),e[125]=G,e[126]=B):B=e[126];let F;e[127]!==U||e[128]!==B?(F=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[U,B]}),e[127]=U,e[128]=B,e[129]=F):F=e[129];let Y;e[130]!==O||e[131]!==M||e[132]!==F?(Y=s.jsxs("div",{className:"w-60 shrink-0 flex flex-col border-r border-border bg-sidebar/75",children:[O,M,F]}),e[130]=O,e[131]=M,e[132]=F,e[133]=Y):Y=e[133];const ee=String(p);let V;e[134]!==m||e[135]!==u||e[136]!==d||e[137]!==ee?(V=s.jsx("div",{className:"flex-1 flex flex-col min-w-0 min-h-0 overflow-hidden",children:s.jsx(Os,{orgParam:d,onSelectOrg:u,onCreateOrg:m},ee)}),e[134]=m,e[135]=u,e[136]=d,e[137]=ee,e[138]=V):V=e[138];let J;return e[139]!==Y||e[140]!==V?(J=s.jsxs("div",{className:"flex min-h-[380px] w-full overflow-hidden",children:[Y,V]}),e[139]=Y,e[140]=V,e[141]=J):J=e[141],J}function al(t){return{...t,enableSounds:!t.enableSounds}}function cl(){Oe.success("User ID copied")}function dl(t){return{...t,enableSounds:!t.enableSounds}}function ul(){Oe.success("User ID copied")}function os(){const t=N.c(44),{data:e}=Ie.useSession(),{org:n}=pe(),r=Ge();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org",shouldThrow:!1},t[0]=o):o=t[0];const l=lr(o)?.params.org,[a,c]=ar(),d=ds(),[u,m]=z.useState(!1),[f,h]=z.useState(!1),p=e?.user,x=p?.image;let g;t[1]!==r?(g=Y=>{m(!1),r({to:"/$org",params:{org:Y}})},t[1]=r,t[2]=g):g=t[2];const b=g;let j;t[3]===Symbol.for("react.memo_cache_sentinel")?(j=()=>m(!1),t[3]=j):j=t[3];const y=j;let v;t[4]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(yt,{size:16}),t[4]=v):v=t[4];let _;t[5]!==r||t[6]!==l?(_={key:"preferences",label:"Preferences",icon:v,onClick:()=>{r({to:"/$org/settings/profile",params:{org:l??""}})}},t[5]=r,t[6]=l,t[7]=_):_=t[7];let w;t[8]!==n||t[9]!==r?(w=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Ho,{size:16}),onClick:()=>{r({to:"/$org/install",params:{org:n.slug}})}}]:[],t[8]=n,t[9]=r,t[10]=w):w=t[10];let S;t[11]===Symbol.for("react.memo_cache_sentinel")?(S={key:"terms",label:"Terms of Use",icon:s.jsx(Mr,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[11]=S):S=t[11];let I;t[12]===Symbol.for("react.memo_cache_sentinel")?(I={key:"privacy",label:"Privacy Policy",icon:s.jsx(Yo,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[12]=I):I=t[12];let T;t[13]===Symbol.for("react.memo_cache_sentinel")?(T={key:"github",label:"decocms/studio",icon:s.jsx(cr,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[13]=T):T=t[13];let $;t[14]===Symbol.for("react.memo_cache_sentinel")?($={key:"community",label:"Community",icon:s.jsx(Xo,{size:16}),href:"https://decocms.com/discord",external:!0},t[14]=$):$=t[14];let O;t[15]===Symbol.for("react.memo_cache_sentinel")?(O={key:"homepage",label:"Homepage",icon:s.jsx(Bo,{size:16}),href:"https://decocms.com",external:!0},t[15]=O):O=t[15];let A;t[16]!==_||t[17]!==w?(A=[_,...w,S,I,T,$,O],t[16]=_,t[17]=w,t[18]=A):A=t[18];const C=A;let M;t[19]===Symbol.for("react.memo_cache_sentinel")?(M={key:"logout",label:"Sign out",icon:s.jsx(Uo,{size:16}),onClick:fl},t[19]=M):M=t[19];const K=M;let U;t[20]===Symbol.for("react.memo_cache_sentinel")?(U={value:"light",icon:s.jsx(qo,{size:14}),label:"Light theme"},t[20]=U):U=t[20];let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E={value:"dark",icon:s.jsx(Wo,{size:14}),label:"Dark theme"},t[21]=E):E=t[21];let L;t[22]===Symbol.for("react.memo_cache_sentinel")?(L=[U,E,{value:"system",icon:s.jsx(mn,{size:14}),label:"System theme"}],t[22]=L):L=t[22];const R=L;let H;t[23]===Symbol.for("react.memo_cache_sentinel")?(H=()=>{m(!1),h(!0)},t[23]=H):H=t[23];let P;t[24]!==b||t[25]!==d||t[26]!==C||t[27]!==u||t[28]!==l||t[29]!==a||t[30]!==c||t[31]!==p||t[32]!==x?(P={user:p,userImage:x,menuItems:C,signOutItem:K,themeOptions:R,preferences:a,setPreferences:c,orgParam:l,onSelectOrg:b,onCreateOrg:H,close:y,isMobile:d,open:u},t[24]=b,t[25]=d,t[26]=C,t[27]=u,t[28]=l,t[29]=a,t[30]=c,t[31]=p,t[32]=x,t[33]=P):P=t[33];const G=P;let D;t[34]!==n||t[35]!==d||t[36]!==u||t[37]!==G?(D=d?s.jsxs(Qs,{open:u,onOpenChange:m,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>m(!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("div",{className:"shrink-0 size-5 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:n?.logo?void 0:rs(n?.name??""),children:n?.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"font-semibold leading-none text-[8px]",children:(n?.name??"?").slice(0,2).toUpperCase()})}),s.jsx("span",{className:"truncate",children:n?.name??"Account"})]}),s.jsxs(Js,{className:"h-[80dvh] p-0",children:[s.jsx(Zs,{className:"sr-only",children:"Account"}),s.jsx(Ps,{...G})]})]}):s.jsxs(Bt,{open:u,onOpenChange:m,children:[s.jsx(pt,{asChild:!0,children:s.jsxs(Te,{tooltip:n?.name??"Account",className:"rounded-md",children:[s.jsx("div",{className:"shrink-0 size-6 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:n?.logo?void 0:rs(n?.name??""),children:n?.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"font-semibold leading-none text-[9px]",children:(n?.name??"?").slice(0,2).toUpperCase()})}),s.jsx("span",{className:"truncate",children:n?.name??"Account"})]})}),s.jsx(Ut,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[520px] p-0 flex max-h-[520px]",onCloseAutoFocus:ml,children:s.jsx(Ps,{...G})})]}),t[34]=n,t[35]=d,t[36]=u,t[37]=G,t[38]=D):D=t[38];let B;t[39]!==f?(B=s.jsx(nl,{open:f,onOpenChange:h}),t[39]=f,t[40]=B):B=t[40];let F;return t[41]!==D||t[42]!==B?(F=s.jsxs(s.Fragment,{children:[D,B]}),t[41]=D,t[42]=B,t[43]=F):F=t[43],F}function ml(t){return t.preventDefault()}function fl(){te("signed_out",{source:"account_popover"}),dr(),Ie.signOut()}function pl({invitation:t}){const[e,n]=z.useState(!1),[r,o]=z.useState(!1),i=mr(),l=async()=>{n(!0);try{const d=await Ie.organization.acceptInvitation({invitationId:t.id});if(d.error){Oe.error(d.error.message),n(!1);return}}catch{Oe.error("Failed to accept invitation"),n(!1);return}Oe.success("Invitation accepted!"),fr();let c;try{c=(await Ie.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},a=async()=>{o(!0);try{const c=await Ie.organization.rejectInvitation({invitationId:t.id});c.error?(Oe.error(c.error.message),o(!1)):(Oe.success("Invitation declined"),i.invalidateQueries())}catch{Oe.error("Failed to decline invitation"),o(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(ft,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:l,disabled:e||r,"aria-label":"Accept invitation",children:s.jsx(us,{size:14})}),s.jsx(ft,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||r,"aria-label":"Decline invitation",children:s.jsx(ms,{size:14})})]})]})}function xl(t){const e=N.c(29),{request:n}=t,{approve:r,deny:o}=pi(),i=r.isPending||o.isPending,l=n.user?.name??n.user?.email??n.userId,a=n.user?.image??void 0;let c;e[0]!==l?(c=l.charAt(0).toUpperCase(),e[0]=l,e[1]=c):c=e[1];let d;e[2]!==a||e[3]!==c?(d=s.jsx(ss,{url:a,fallback:c,shape:"circle",size:"sm"}),e[2]=a,e[3]=c,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Requested to join"}),e[5]=u):u=e[5];let m;e[6]!==l?(m=s.jsxs("div",{className:"flex-1 min-w-0",children:[u,s.jsx("p",{className:"text-sm font-medium truncate",children:l})]}),e[6]=l,e[7]=m):m=e[7];let f;e[8]!==r||e[9]!==n.id?(f=()=>r.mutate(n.id),e[8]=r,e[9]=n.id,e[10]=f):f=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(us,{size:14}),e[11]=h):h=e[11];let p;e[12]!==i||e[13]!==f?(p=s.jsx(ft,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:f,disabled:i,"aria-label":"Approve join request",children:h}),e[12]=i,e[13]=f,e[14]=p):p=e[14];let x;e[15]!==o||e[16]!==n.id?(x=()=>o.mutate(n.id),e[15]=o,e[16]=n.id,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ms,{size:14}),e[18]=g):g=e[18];let b;e[19]!==i||e[20]!==x?(b=s.jsx(ft,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:x,disabled:i,"aria-label":"Deny join request",children:g}),e[19]=i,e[20]=x,e[21]=b):b=e[21];let j;e[22]!==b||e[23]!==p?(j=s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[p,b]}),e[22]=b,e[23]=p,e[24]=j):j=e[24];let y;return e[25]!==j||e[26]!==d||e[27]!==m?(y=s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[d,m,j]}),e[25]=j,e[26]=d,e[27]=m,e[28]=y):y=e[28],y}function hl(t){const e=N.c(14),{release:n,isSeen:r,onSelect:o}=t;let i;e[0]!==r?(i=!r&&s.jsx("span",{"aria-label":"New release",className:"absolute left-2 top-1/2 -translate-y-1/2 size-1.5 rounded-full bg-primary"}),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==n.eyebrow?(l=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[2]=n.eyebrow,e[3]=l):l=e[3];let a;e[4]!==n.title?(a=s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[4]=n.title,e[5]=a):a=e[5];let c;e[6]!==l||e[7]!==a?(c=s.jsxs("div",{className:"flex-1 min-w-0",children:[l,a]}),e[6]=l,e[7]=a,e[8]=c):c=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ps,{size:16,className:"text-muted-foreground shrink-0"}),e[9]=d):d=e[9];let u;return e[10]!==o||e[11]!==i||e[12]!==c?(u=s.jsxs("button",{type:"button",onClick:o,className:"relative w-full flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors text-left",children:[i,c,d]}),e[10]=o,e[11]=i,e[12]=c,e[13]=u):u=e[13],u}function gl(){const t=z.useContext(pr),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(r=>r.status==="pending"&&new Date(r.expiresAt)>new Date)}function kn(){const t=N.c(11),{isSeen:e,markSeen:n,unseenCount:r}=so(),o=gl(),i=xi();let l;if(t[0]!==e||t[1]!==o||t[2]!==i){const d=[...i].sort(Sl).map(yl),u=[...o].sort(vl).map(jl);let m;t[4]!==e?(m=h=>({type:"release",release:h,isSeen:e(h.id)}),t[4]=e,t[5]=m):m=t[5];const f=[...no].sort(bl).map(m);l=[...d,...u,...f],t[0]=e,t[1]=o,t[2]=i,t[3]=l}else l=t[3];const a=r+o.length+i.length;let c;return t[6]!==n||t[7]!==o||t[8]!==l||t[9]!==a?(c={items:l,pendingInvitations:o,redDotCount:a,markReleaseSeen:n},t[6]=n,t[7]=o,t[8]=l,t[9]=a,t[10]=c):c=t[10],c}function bl(t,e){return new Date(e.date).getTime()-new Date(t.date).getTime()}function jl(t){return{type:"invitation",invitation:t}}function vl(t,e){return new Date(t.expiresAt).getTime()-new Date(e.expiresAt).getTime()}function yl(t){return{type:"join-request",request:t}}function Sl(t,e){return new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()}class In extends z.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 Tn(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function _l(){const t=N.c(17),e=Ge(),{org:n}=pe(),{hasDecoKey:r,balanceDollars:o}=dn();if(!r)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let l;t[2]!==o?(l=Q(o!=null&&Tn(o)),t[2]=o,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 c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(sn,{}),t[7]=c):c=t[7];let d;t[8]!==o?(d=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=d):d=t[9];let u;t[10]!==d?(u=s.jsx("span",{children:d}),t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==i||t[13]!==l||t[14]!==a||t[15]!==u?(m=s.jsx(De,{children:s.jsx(he,{children:s.jsxs(Te,{tooltip:i,className:l,onClick:a,children:[c,u]})})}),t[12]=i,t[13]=l,t[14]=a,t[15]=u,t[16]=m):m=t[16],m}function Nl(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(In,{children:s.jsx(z.Suspense,{fallback:null,children:s.jsx(_l,{})})}),t[0]=e):e=t[0],e}function Cl(){const t=N.c(17),e=Ge(),{org:n}=pe(),{hasDecoKey:r,balanceDollars:o}=dn();if(!r)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];const l=i;let a;t[2]!==e||t[3]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[2]=e,t[3]=n.slug,t[4]=a):a=t[4];let c;t[5]!==o?(c=Q(o!=null&&Tn(o)),t[5]=o,t[6]=c):c=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(sn,{className:"size-4"}),t[7]=d):d=t[7];let u;t[8]!==a||t[9]!==c||t[10]!==l?(u=s.jsx(Me,{asChild:!0,children:s.jsx(ge,{"aria-label":l,onClick:a,className:c,children:d})}),t[8]=a,t[9]=c,t[10]=l,t[11]=u):u=t[11];let m;t[12]!==l?(m=s.jsx(Re,{side:"top",children:l}),t[12]=l,t[13]=m):m=t[13];let f;return t[14]!==u||t[15]!==m?(f=s.jsxs(Ee,{delayDuration:300,children:[u,m]}),t[14]=u,t[15]=m,t[16]=f):f=t[16],f}function wl(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(In,{children:s.jsx(z.Suspense,{fallback:null,children:s.jsx(Cl,{})})}),t[0]=e):e=t[0],e}function $n(t){const e=N.c(15),{children:n}=t,{items:r,markReleaseSeen:o}=kn(),[i,l]=z.useState(null);let a;if(e[0]!==r||e[1]!==i){let x;e[3]!==i?(x=g=>g.type==="release"&&g.release.id===i,e[3]=i,e[4]=x):x=e[4],a=r.find(x),e[0]=r,e[1]=i,e[2]=a}else a=e[2];const c=a,d=c?.type==="release"?c.release:null;let u;e[5]!==o?(u=x=>{l(x),o(x)},e[5]=o,e[6]=u):u=e[6];const m=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=x=>{x||l(null)},e[7]=f):f=e[7];let h;e[8]!==m||e[9]!==r||e[10]!==d?(h=s.jsx(Ut,{side:"right",align:"start",sideOffset:16,collisionPadding:16,className:"w-[min(400px,calc(100vw-2rem))] p-0 h-[min(650px,calc(100dvh-4rem))] flex flex-col",children:d?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 border-b border-border shrink-0",children:[s.jsx(ft,{size:"icon",variant:"ghost","aria-label":"Back to inbox",className:"size-7 text-muted-foreground",onClick:()=>l(null),children:s.jsx(Ko,{size:16})}),s.jsx("h3",{className:"text-sm font-medium truncate",children:d.title})]}),s.jsx("div",{className:"overflow-y-auto flex-1 p-5",children:s.jsx(ro,{release:d})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),r.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(fs,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Nothing here yet"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Invitations, join requests, and release updates will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:r.map(x=>x.type==="join-request"?s.jsx(xl,{request:x.request},`req-${x.request.id}`):x.type==="invitation"?s.jsx(pl,{invitation:x.invitation},`inv-${x.invitation.id}`):s.jsx(hl,{release:x.release,isSeen:x.isSeen,onSelect:()=>m(x.release.id)},`rel-${x.release.id}`))})]})}),e[8]=m,e[9]=r,e[10]=d,e[11]=h):h=e[11];let p;return e[12]!==n||e[13]!==h?(p=s.jsxs(Bt,{onOpenChange:f,children:[n,h]}),e[12]=n,e[13]=h,e[14]=p):p=e[14],p}function An(){const{redDotCount:t}=kn();return t>0}function kl(){const t=N.c(6),e=An();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(fs,{}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=r):r=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("span",{children:"Inbox"}),t[3]=o):o=t[3];let i;return t[4]!==r?(i=s.jsx($n,{children:s.jsx(pt,{asChild:!0,children:s.jsxs(Te,{tooltip:"Inbox",className:"relative",children:[n,r,o]})})}),t[4]=r,t[5]=i):i=t[5],i}function Il(){const t=N.c(8),e=An();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(fs,{className:"size-4"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e&&s.jsx("span",{className:"absolute top-0.5 right-0.5 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=r):r=t[2];let o;t[3]!==r?(o=s.jsx(pt,{asChild:!0,children:s.jsx(Me,{asChild:!0,children:s.jsxs(ge,{"aria-label":"Inbox",children:[n,r]})})}),t[3]=r,t[4]=o):o=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Re,{side:"top",children:"Inbox"}),t[5]=i):i=t[5];let l;return t[6]!==o?(l=s.jsx($n,{children:s.jsxs(Ee,{delayDuration:300,children:[o,i]})}),t[6]=o,t[7]=l):l=t[7],l}function Tl(){const t=N.c(3),[e,n]=z.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(Te,{tooltip:"Connections",onClick:()=>{te("connections_dialog_opened",{source:"sidebar_footer",mode:"browse"}),n(!0)},children:[s.jsx(fn,{}),s.jsx("span",{children:"Connections"})]}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=s.jsxs(s.Fragment,{children:[r,s.jsx(un,{mode:"browse",open:e,onOpenChange:n,defaultTab:"all"})]}),t[1]=e,t[2]=o):o=t[2],o}function $l(){const t=N.c(3),[e,n]=z.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(Ee,{delayDuration:300,children:[s.jsx(Me,{asChild:!0,children:s.jsx(ge,{"aria-label":"Connections",onClick:()=>{te("connections_dialog_opened",{source:"sidebar_footer",mode:"browse"}),n(!0)},children:s.jsx(fn,{className:"size-4"})})}),s.jsx(Re,{side:"top",children:"Connections"})]}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=s.jsxs(s.Fragment,{children:[r,s.jsx(un,{mode:"browse",open:e,onOpenChange:n,defaultTab:"all"})]}),t[1]=e,t[2]=o):o=t[2],o}function Al(){const t=N.c(7),e=Ge(),{org:n}=pe();let r;t[0]!==e||t[1]!==n.slug?(r=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=r):r=t[2];let o,i;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(yt,{}),i=s.jsx("span",{children:"Settings"}),t[3]=o,t[4]=i):(o=t[3],i=t[4]);let l;return t[5]!==r?(l=s.jsxs(Te,{tooltip:"Settings",onClick:r,children:[o,i]}),t[5]=r,t[6]=l):l=t[6],l}function zl(){const t=N.c(9),e=Ge(),{org:n}=pe();let r;t[0]!==e||t[1]!==n.slug?(r=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=r):r=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(yt,{className:"size-4"}),t[3]=o):o=t[3];let i;t[4]!==r?(i=s.jsx(Me,{asChild:!0,children:s.jsx(ge,{"aria-label":"Settings",onClick:r,children:o})}),t[4]=r,t[5]=i):i=t[5];let l;t[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Re,{side:"top",children:"Settings"}),t[6]=l):l=t[6];let a;return t[7]!==i?(a=s.jsxs(Ee,{delayDuration:300,children:[i,l]}),t[7]=i,t[8]=a):a=t[8],a}function Ol(){const t=N.c(6),{state:e}=Ve();if(e==="collapsed"){let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Nl,{}),t[0]=o):o=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(he,{children:s.jsx(Tl,{})}),t[1]=i):i=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(he,{children:s.jsx(kl,{})}),t[2]=l):l=t[2];let a;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(he,{children:s.jsx(Al,{})}),t[3]=a):a=t[3];let c;return t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(ts,{className:"px-2 pb-3 gap-1",children:[o,s.jsxs(De,{children:[i,l,a,s.jsx(he,{children:s.jsx(os,{})})]})]}),t[4]=c):c=t[4],c}let r;return t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ts,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(De,{children:s.jsx(he,{children:s.jsx(os,{})})})}),s.jsx(zl,{}),s.jsx(Il,{}),s.jsx($l,{}),s.jsx(wl,{})]})}),t[5]=r):r=t[5],r}function Pl(){const t=N.c(8),e=Ge(),{org:n}=pe(),{setOpenMobile:r}=Ve();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(De,{children:s.jsx(he,{children:s.jsx(os,{})})})}),t[0]=o):o=t[0];let i;t[1]!==e||t[2]!==n.slug||t[3]!==r?(i=()=>{e({to:"/$org/settings",params:{org:n.slug}}),r(!1)},t[1]=e,t[2]=n.slug,t[3]=r,t[4]=i):i=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(yt,{className:"size-4"}),t[5]=l):l=t[5];let a;return t[6]!==i?(a=s.jsx(ts,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[o,s.jsx(ge,{"aria-label":"Settings",onClick:i,children:l})]})}),t[6]=i,t[7]=a):a=t[7],a}function Dl(t){const e=N.c(8),{virtualMcpId:n,size:r,showAutomationBadge:o}=t,i=r===void 0?"sm":r;let l;e[0]!==i||e[1]!==n?(l=n?s.jsx(Ml,{virtualMcpId:n,size:i}):s.jsx(Fe,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=l):l=e[2];let a;e[3]!==o?(a=o&&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(hn,{size:10,className:"text-white"})}),e[3]=o,e[4]=a):a=e[4];let c;return e[5]!==l||e[6]!==a?(c=s.jsxs("div",{className:"relative shrink-0",children:[l,a]}),e[5]=l,e[6]=a,e[7]=c):c=e[7],c}function Ml(t){const e=N.c(6),{virtualMcpId:n,size:r}=t,o=vt(n);if(!o){let a;return e[0]!==r?(a=s.jsx(Fe,{icon:null,name:"?",size:r}),e[0]=r,e[1]=a):a=e[1],a}const i=o.icon??null;let l;return e[2]!==o.title||e[3]!==r||e[4]!==i?(l=s.jsx(Fe,{icon:i,name:o.title,size:r}),e[2]=o.title,e[3]=r,e[4]=i,e[5]=l):l=e[5],l}function Rl(t){const e=N.c(36),{open:n,onOpenChange:r}=t,[o,i]=z.useState(""),{org:l}=pe(),{setTaskId:a}=on(),c=xn();let d,u,m;e[0]!==l.id||e[1]!==o?(m=o.trim(),u=cs,d=as.globalSearch(l.id,m),e[0]=l.id,e[1]=o,e[2]=d,e[3]=u,e[4]=m):(d=e[2],u=e[3],m=e[4]);const f=n&&m.length>0;let h;e[5]!==c||e[6]!==m?(h=async()=>await c.call("GLOBAL_SEARCH",{query:m,limit:20}),e[5]=c,e[6]=m,e[7]=h):h=e[7];let p;e[8]!==d||e[9]!==f||e[10]!==h?(p={queryKey:d,enabled:f,queryFn:h,staleTime:1e4},e[8]=d,e[9]=f,e[10]=h,e[11]=p):p=e[11];const{data:x,isFetching:g}=u(p);let b;e[12]!==x?.items?(b=x?.items??[],e[12]=x?.items,e[13]=b):b=e[13];const j=b;let y;e[14]!==r?(y=C=>{C||i(""),r(C)},e[14]=r,e[15]=y):y=e[15];const v=y;let _;e[16]!==v||e[17]!==a?(_=C=>{v(!1),a(C.id,C.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=_):_=e[18];const w=_;let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsxs(bi,{className:"sr-only",children:[s.jsx(ji,{children:"Search"}),s.jsx(vi,{children:"Search across your organization's resources."})]}),e[19]=S):S=e[19];let I;e[20]!==o?(I=s.jsx(Ci,{value:o,onValueChange:i,placeholder:"Search..."}),e[20]=o,e[21]=I):I=e[21];let T;e[22]!==w||e[23]!==g||e[24]!==j||e[25]!==m?(T=m?g&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(_i,{children:"No results."}):j.map(C=>C.type==="thread"?s.jsxs(Ni,{value:`thread:${C.id}:${C.title}`,onSelect:()=>w(C),className:"gap-2.5",children:[s.jsx(Dl,{virtualMcpId:C.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:C.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(C.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${C.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=w,e[23]=g,e[24]=j,e[25]=m,e[26]=T):T=e[26];let $;e[27]!==T?($=s.jsx(wi,{children:T}),e[27]=T,e[28]=$):$=e[28];let O;e[29]!==I||e[30]!==$?(O=s.jsxs(yi,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[S,s.jsxs(ki,{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:[I,$]})]}),e[29]=I,e[30]=$,e[31]=O):O=e[31];let A;return e[32]!==v||e[33]!==n||e[34]!==O?(A=s.jsx(Si,{open:n,onOpenChange:v,children:O}),e[32]=v,e[33]=n,e[34]=O,e[35]=A):A=e[35],A}function El(t){return t==="owner"||t==="admin"}function Fl(){const t=N.c(11),{locator:e}=pe(),n=Ii(),{data:r}=Ie.useSession(),o=r?.user?.id;let i;t[0]!==e?(i=as.members(e),t[0]=e,t[1]=i):i=t[1];let l;t[2]!==n?(l=()=>n.organization.listMembers(),t[2]=n,t[3]=l):l=t[3];const a=!!o;let c;t[4]!==i||t[5]!==l||t[6]!==a?(c={queryKey:i,queryFn:l,enabled:a,staleTime:6e4},t[4]=i,t[5]=l,t[6]=a,t[7]=c):c=t[7];const{data:d}=cs(c);let u;if(t[8]!==d?.data?.members||t[9]!==o){const f=(d?.data?.members??[]).find(h=>h.userId===o)?.role;u=El(f??void 0),t[8]=d?.data?.members,t[9]=o,t[10]=u}else u=t[10];return u}var Zt,qt="HoverCard",[zn]=gr(qt,[Ws]),Wt=Ws(),[Gl,Kt]=zn(qt),On=t=>{const{__scopeHoverCard:e,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:l=700,closeDelay:a=300}=t,c=Wt(e),d=z.useRef(0),u=z.useRef(0),m=z.useRef(!1),f=z.useRef(!1),[h,p]=_r({prop:r,defaultProp:o??!1,onChange:i,caller:qt}),x=z.useCallback(()=>{clearTimeout(u.current),d.current=window.setTimeout(()=>p(!0),l)},[l,p]),g=z.useCallback(()=>{clearTimeout(d.current),!m.current&&!f.current&&(u.current=window.setTimeout(()=>p(!1),a))},[a,p]),b=z.useCallback(()=>p(!1),[p]);return z.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(u.current)},[]),s.jsx(Gl,{scope:e,open:h,onOpenChange:p,onOpen:x,onClose:g,onDismiss:b,hasSelectionRef:m,isPointerDownOnContentRef:f,children:s.jsx(Nr,{...c,children:n})})};On.displayName=qt;var Pn="HoverCardTrigger",Dn=z.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,o=Kt(Pn,n),i=Wt(n);return s.jsx(xr,{asChild:!0,...i,children:s.jsx(hr.a,{"data-state":o.open?"open":"closed",...r,ref:e,onPointerEnter:Pe(t.onPointerEnter,Ft(o.onOpen)),onPointerLeave:Pe(t.onPointerLeave,Ft(o.onClose)),onFocus:Pe(t.onFocus,o.onOpen),onBlur:Pe(t.onBlur,o.onClose),onTouchStart:Pe(t.onTouchStart,l=>l.preventDefault())})})});Dn.displayName=Pn;var hs="HoverCardPortal",[Ll,Hl]=zn(hs,{forceMount:void 0}),Mn=t=>{const{__scopeHoverCard:e,forceMount:n,children:r,container:o}=t,i=Kt(hs,e);return s.jsx(Ll,{scope:e,forceMount:n,children:s.jsx(Ks,{present:n||i.open,children:s.jsx(Sr,{asChild:!0,container:o,children:r})})})};Mn.displayName=hs;var Et="HoverCardContent",Rn=z.forwardRef((t,e)=>{const n=Hl(Et,t.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=t,i=Kt(Et,t.__scopeHoverCard);return s.jsx(Ks,{present:r||i.open,children:s.jsx(Bl,{"data-state":i.open?"open":"closed",...o,onPointerEnter:Pe(t.onPointerEnter,Ft(i.onOpen)),onPointerLeave:Pe(t.onPointerLeave,Ft(i.onClose)),ref:e})})});Rn.displayName=Et;var Bl=z.forwardRef((t,e)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,...a}=t,c=Kt(Et,n),d=Wt(n),u=z.useRef(null),m=br(e,u),[f,h]=z.useState(!1);return z.useEffect(()=>{if(f){const p=document.body;return Zt=p.style.userSelect||p.style.webkitUserSelect,p.style.userSelect="none",p.style.webkitUserSelect="none",()=>{p.style.userSelect=Zt,p.style.webkitUserSelect=Zt}}},[f]),z.useEffect(()=>{if(u.current){const p=()=>{h(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",p),()=>{document.removeEventListener("pointerup",p),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),z.useEffect(()=>{u.current&&Wl(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),s.jsx(jr,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Pe(i,p=>{p.preventDefault()}),onDismiss:c.onDismiss,children:s.jsx(vr,{...d,...a,onPointerDown:Pe(a.onPointerDown,p=>{p.currentTarget.contains(p.target)&&h(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:m,style:{...a.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Ul="HoverCardArrow",ql=z.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,o=Wt(n);return s.jsx(yr,{...o,...r,ref:e})});ql.displayName=Ul;function Ft(t){return e=>e.pointerType==="touch"?void 0:t()}function Wl(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)e.push(n.currentNode);return e}var Kl=On,Vl=Dn,Yl=Mn,Xl=Rn;function Ql(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Kl,{"data-slot":"hover-card",...n}),e[2]=n,e[3]=r):r=e[3],r}function Jl(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Vl,{"data-slot":"hover-card-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function Zl(t){const e=N.c(12);let n,r,o,i;e[0]!==t?({className:n,align:o,sideOffset:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i):(n=e[1],r=e[2],o=e[3],i=e[4]);const l=o===void 0?"center":o,a=i===void 0?4:i;let c;e[5]!==n?(c=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",n),e[5]=n,e[6]=c):c=e[6];let d;return e[7]!==l||e[8]!==r||e[9]!==a||e[10]!==c?(d=s.jsx(Yl,{"data-slot":"hover-card-portal",children:s.jsx(Xl,{"data-slot":"hover-card-content",align:l,sideOffset:a,className:c,...r})}),e[7]=l,e[8]=r,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}function En(t){const e=N.c(26),{virtualMcpId:n,isOrgPinned:r,canManageOrgPin:o,onNewTaskInGroup:i,onShowSettings:l,onToggleOrgPin:a,onHideGroup:c}=t;let d;e[0]!==i||e[1]!==n?(d=()=>i(n),e[0]=i,e[1]=n,e[2]=d):d=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ke,{size:14,className:"mr-2"}),e[3]=u):u=e[3];let m;e[4]!==d?(m=s.jsxs(Ot,{onSelect:d,children:[u,"New task"]}),e[4]=d,e[5]=m):m=e[5];let f;e[6]!==l||e[7]!==n?(f=()=>l(n),e[6]=l,e[7]=n,e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(yt,{size:14,className:"mr-2"}),e[9]=h):h=e[9];let p;e[10]!==f?(p=s.jsxs(Ot,{onSelect:f,children:[h,"Settings"]}),e[10]=f,e[11]=p):p=e[11];let x;e[12]!==o||e[13]!==r||e[14]!==a||e[15]!==n?(x=o&&s.jsxs(s.Fragment,{children:[s.jsx(As,{}),s.jsxs(Ot,{onSelect:()=>a(n,!r),children:[s.jsx(Kr,{size:14,className:"mr-2"}),r?"Unpin for all members":"Pin for all members"]})]}),e[12]=o,e[13]=r,e[14]=a,e[15]=n,e[16]=x):x=e[16];let g;e[17]!==r||e[18]!==c||e[19]!==n?(g=!r&&s.jsxs(s.Fragment,{children:[s.jsx(As,{}),s.jsxs(Ot,{onSelect:()=>c(n),children:[s.jsx(Vo,{size:14,className:"mr-2"}),"Hide"]})]}),e[17]=r,e[18]=c,e[19]=n,e[20]=g):g=e[20];let b;return e[21]!==m||e[22]!==p||e[23]!==x||e[24]!==g?(b=s.jsxs(s.Fragment,{children:[m,p,x,g]}),e[21]=m,e[22]=p,e[23]=x,e[24]=g,e[25]=b):b=e[25],b}function ea(t){return t==="ephemeral"||t.startsWith("thread:")}function Vt(t){const e=N.c(46),{task:n,isActive:r,onClick:o,onArchive:i,showAutomationBadge:l,showAgentIcon:a,hideStatusIdle:c,indented:d}=t,u=Ti(n.status),m=u.icon,f=n.metadata?.kind==="tool_call_run",h=vt(f?void 0:n.virtual_mcp_id);let p;e[0]!==h?(p=wo(h),e[0]=h,e[1]=p):p=e[1];const x=p;Ai(6e4);const g=l||!!n.trigger_id,b=n.id,j="button",y=0;let v;e[2]!==o?(v=B=>{B.target===B.currentTarget&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),o())},e[2]=o,e[3]=v):v=e[3];const _=d?"-ml-4 pl-6":"pl-2",w=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let S;e[4]!==_||e[5]!==w?(S=Q("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",_,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",w),e[4]=_,e[5]=w,e[6]=S):S=e[6];let I;e[7]!==f||e[8]!==a||e[9]!==h?.icon||e[10]!==h?.title?(I=a&&!f&&s.jsx(Fe,{icon:h?.icon??null,name:h?.title??"?",size:"2xs"}),e[7]=f,e[8]=a,e[9]=h?.icon,e[10]=h?.title,e[11]=I):I=e[11];let T;e[12]!==g?(T=g&&s.jsx(hn,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=g,e[13]=T):T=e[13];const $=n.title||"Untitled task";let O;e[14]!==$?(O=s.jsx("div",{className:"text-sm text-foreground truncate",children:$}),e[14]=$,e[15]=O):O=e[15];let A;e[16]!==T||e[17]!==O?(A=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[T,O]}),e[16]=T,e[17]=O,e[18]=A):A=e[18];let C;e[19]!==x||e[20]!==r||e[21]!==n.branch||e[22]!==n.updated_at?(C=n.updated_at&&s.jsxs("div",{className:Q("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!ea(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):x?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[x.owner,"/",x.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:zi(new Date(n.updated_at))})]}),e[19]=x,e[20]=r,e[21]=n.branch,e[22]=n.updated_at,e[23]=C):C=e[23];let M;e[24]!==A||e[25]!==C?(M=s.jsxs("div",{className:"flex-1 min-w-0",children:[A,C]}),e[24]=A,e[25]=C,e[26]=M):M=e[26];const K="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",U=!c&&s.jsx("span",{className:"[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity group-hover/row:opacity-0","aria-label":u.label,children:s.jsx(m,{size:14,className:Q(u.iconClassName,n.status==="in_progress"&&"animate-spin")})});let E;e[27]!==i?(E=B=>{B.stopPropagation(),i()},e[27]=i,e[28]=E):E=e[28];let L;e[29]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Cr,{size:14}),e[29]=L):L=e[29];let R;e[30]!==E?(R=s.jsx(Me,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:E,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:L})}),e[30]=E,e[31]=R):R=e[31];let H;e[32]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Re,{side:"right",children:"Archive"}),e[32]=H):H=e[32];let P;e[33]!==R?(P=s.jsxs(Ee,{children:[R,H]}),e[33]=R,e[34]=P):P=e[34];let G;e[35]!==U||e[36]!==P?(G=s.jsxs("div",{className:K,children:[U,P]}),e[35]=U,e[36]=P,e[37]=G):G=e[37];let D;return e[38]!==o||e[39]!==M||e[40]!==G||e[41]!==v||e[42]!==S||e[43]!==I||e[44]!==n.id?(D=s.jsxs("div",{"data-task-id":b,role:j,tabIndex:y,onClick:o,onKeyDown:v,className:S,children:[I,M,G]}),e[38]=o,e[39]=M,e[40]=G,e[41]=v,e[42]=S,e[43]=I,e[44]=n.id,e[45]=D):D=e[45],D}function gs(t){const e=N.c(12),{onClick:n,isFetching:r,indented:o}=t,i=o?"-ml-4 pl-6 pr-2":"px-2";let l;e[0]!==i?(l=Q("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",i,"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]=i,e[1]=l):l=e[1];let a;e[2]!==r?(a=r&&s.jsx(Bs,{size:14,className:"animate-spin"}),e[2]=r,e[3]=a):a=e[3];const c=r?"Loading…":"Show more";let d;e[4]!==c?(d=s.jsx("span",{children:c}),e[4]=c,e[5]=d):d=e[5];let u;return e[6]!==r||e[7]!==n||e[8]!==l||e[9]!==a||e[10]!==d?(u=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:r,className:l,children:[a,d]}),e[6]=r,e[7]=n,e[8]=l,e[9]=a,e[10]=d,e[11]=u):u=e[11],u}function ta(t,e,n,r){return[t,e,n,r.type,r.member,r.currentUserId??""].join("|")}function sa(t){return t.member==="mine"&&!t.currentUserId}const Fn=4;let Mt=0;const is=[];function na(){for(;Mt<Fn&&is.length>0;){const t=is.shift();t&&t()}}function Gn(t){return new Promise((e,n)=>{const r=()=>{Mt++,t().then(e,n).finally(()=>{Mt--,na()})};Mt<Fn?r():is.push(r)})}const Yt=10;function Ds(t,e,n,r,o){const i={hidden:!1};t==="agent"&&(i.virtual_mcp_id=e),r.member==="mine"&&r.currentUserId&&(i.created_by=r.currentUserId),r.type==="automation"&&(i.has_trigger=!0),r.type==="manual"&&(i.has_trigger=!1);const l={where:i,limit:o,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return t==="status"&&(l.status=e),l}function ra(t,e,n,r){let o=0;for(const i of t)bs(i,e,n,r)&&o++;return o}function es(t,e,n,r){return ra(t,e,n,r)}function oa(t,e,n){const r=new Map;for(const o of t){const i=o.virtual_mcp_id;i&&bs(o,e,i,n)&&r.set(i,(r.get(i)??0)+1)}return r}function ia(t,e){return!!(t>=Yt||t===0&&e)}function Ms(t,e){return t<e}function la(t,e){return e===!1?!1:e===!0?!0:t}function bs(t,e,n,r){return!(t.hidden||e==="agent"&&t.virtual_mcp_id!==n||e==="status"&&(t.status??"completed")!==n||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Gt=new Map,Dt=new Map;function aa(t,e){return e?t>=Yt?!0:null:!1}function Rs(t){return Gt.get(t)}function ca(t,e){Gt.set(t,e)}function da(t,e,n){const r=Gt.get(t);if(r!==void 0){n(r);return}let o=Dt.get(t);o||(o=Gn(e).then(i=>(Gt.set(t,i),Dt.delete(t),i)).catch(()=>(Dt.delete(t),Promise.reject(new Error("group probe failed")))),Dt.set(t,o)),o.then(n,()=>n(!1))}function Es(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Yt,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function ua(t,e,n,r,o){let i=0;for(const l of t)e.has(l.id)||bs(l,n,r,o)&&i++;return i}function js(t,e,n,r){const o=N.c(8),{org:i}=pe(),l=ta(i.id,t,e,n);let a;o[0]!==n?(a=sa(n),o[0]=n,o[1]=a):a=o[1];const c=a,[d,u]=z.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});d.identity!==l&&u({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const m=Zr(),{threads:f,hasMore:h}=rn(),p=r??es(f,t,e,n),x=ia(p,h),g=aa(p,h),b=xn();if(d.identity===l&&d.serverHasMore===null){const S=g??Rs(l);S!==void 0&&u({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:d.probeSubscribedIdentity,serverHasMore:S})}!c&&d.identity===l&&d.serverHasMore===null&&g===null&&Rs(l)===void 0&&d.probeSubscribedIdentity!==l&&(u(S=>S.identity===l?{...S,isProbing:!0,probeSubscribedIdentity:l}:S),da(l,async()=>{const S=Ds(t,e,0,n,1),I=await b.call("COLLECTION_THREADS_LIST",S),{totalCount:T}=Es(I),$=es(m.threads.get(),t,e,n);return T===void 0?!1:Ms($,T)},S=>{u(I=>I.identity!==l?I:{...I,isProbing:!1,serverHasMore:S})}));const y=async function(){if(d.isFetching||d.isProbing||c)return;const I=l;u(T=>T.identity===I?{...T,isFetching:!0}:T);try{const T=es(f,t,e,n),$=Ds(t,e,T,n,Yt),O=await Gn(()=>b.call("COLLECTION_THREADS_LIST",$)),{items:A,hasMore:C,totalCount:M}=Es(O),K=new Set(f.map(ma)),U=ua(A,K,t,e,n),E=T;m.mergeThreads(A),u(L=>{if(L.identity!==I)return L;let R;return M!==void 0?R=Ms(E+U,M):R=A.length===0||U===0?!1:C,ca(I,R),{...L,isFetching:!1,serverHasMore:R}})}catch(T){const $=T,O=$ instanceof Error?$.message:String($);Oe.error(`Could not load more tasks: ${O}`),u(A=>A.identity===I?{...A,isFetching:!1}:A)}},v=d.isFetching||d.isProbing,_=!c&&!v&&la(x,d.serverHasMore);let w;return o[2]!==v||o[3]!==y||o[4]!==_||o[5]!==d.isProbing||o[6]!==d.serverHasMore?(w={hasMore:_,isFetching:v,isProbing:d.isProbing,serverHasMore:d.serverHasMore,loadMore:y},o[2]=v,o[3]=y,o[4]=_,o[5]=d.isProbing,o[6]=d.serverHasMore,o[7]=w):w=o[7],w}function ma(t){return t.id}function Ln(t){const e=N.c(61),{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,onSelectTask:l,onArchiveTask:a,onNewTaskInGroup:c,onShowSettings:d,onHideGroup:u,isOrgPinned:m,canManageOrgPin:f,onToggleOrgPin:h,sortable:p,groupVisibleCount:x}=t,g=m===void 0?!1:m,b=f===void 0?!1:f,j=vt(n),y=r[0];let v;e[0]!==y||e[1]!==c||e[2]!==l||e[3]!==n?(v=()=>{y?l(y):c(n)},e[0]=y,e[1]=c,e[2]=l,e[3]=n,e[4]=v):v=e[4];const _=v,w=p?.isDragging?!1:void 0;let S;e[5]!==p?.isDragging||e[6]!==n?(S=X=>{p?.isDragging||X&&te("sidebar_group_hover_popover_opened",{virtual_mcp_id:n})},e[5]=p?.isDragging,e[6]=n,e[7]=S):S=e[7];const I=!!(y&&o&&y.id===o),T=p?"Drag to reorder":void 0;let $;e[8]!==p?($=p?{...p.attributes,...p.listeners}:{},e[8]=p,e[9]=$):$=e[9];const O=p&&"cursor-pointer active:cursor-grabbing touch-none",A=p?.isDragging&&"cursor-grabbing";let C;e[10]!==A||e[11]!==O?(C=Q("group-data-[state=collapsed]/sidebar:!size-10 group-data-[state=collapsed]/sidebar:!max-w-none group-data-[state=collapsed]/sidebar:!overflow-visible group-data-[state=collapsed]/sidebar:[&_svg]:opacity-100",O,A),e[10]=A,e[11]=O,e[12]=C):C=e[12];const M=j?.icon??null,K=j?.title??"?";let U;e[13]!==M||e[14]!==K?(U=s.jsx(Fe,{icon:M,name:K,size:"sm+",className:"rounded-lg"}),e[13]=M,e[14]=K,e[15]=U):U=e[15];let E;e[16]!==_||e[17]!==C||e[18]!==U||e[19]!==I||e[20]!==T||e[21]!==$?(E=s.jsx(he,{children:s.jsx(gn,{asChild:!0,children:s.jsx(Jl,{asChild:!0,children:s.jsx(Te,{onClick:_,isActive:I,title:T,...$,className:C,children:U})})})}),e[16]=_,e[17]=C,e[18]=U,e[19]=I,e[20]=T,e[21]=$,e[22]=E):E=e[22];const L=h??fa;let R;e[23]!==b||e[24]!==g||e[25]!==u||e[26]!==c||e[27]!==d||e[28]!==L||e[29]!==n?(R=s.jsx(bn,{className:"w-56",children:s.jsx(En,{virtualMcpId:n,isOrgPinned:g,canManageOrgPin:b,onNewTaskInGroup:c,onShowSettings:d,onToggleOrgPin:L,onHideGroup:u})}),e[23]=b,e[24]=g,e[25]=u,e[26]=c,e[27]=d,e[28]=L,e[29]=n,e[30]=R):R=e[30];let H;e[31]!==E||e[32]!==R?(H=s.jsxs(jn,{children:[E,R]}),e[31]=E,e[32]=R,e[33]=H):H=e[33];const P=j?.title??"Agent";let G;e[34]!==P?(G=s.jsx("span",{className:"truncate",children:P}),e[34]=P,e[35]=G):G=e[35];let D;e[36]!==c||e[37]!==n?(D=()=>c(n),e[36]=c,e[37]=n,e[38]=D):D=e[38];let B;e[39]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ke,{size:14}),e[39]=B):B=e[39];let F;e[40]!==D?(F=s.jsx("button",{type:"button","aria-label":"New task in this agent",onClick:D,className:"flex size-6 items-center justify-center rounded-md hover:bg-accent text-muted-foreground hover:text-foreground",children:B}),e[40]=D,e[41]=F):F=e[41];let Y;e[42]!==G||e[43]!==F?(Y=s.jsxs("div",{className:"flex items-center justify-between px-1 pb-1 text-xs font-medium",children:[G,F]}),e[42]=G,e[43]=F,e[44]=Y):Y=e[44];let ee;e[45]!==o||e[46]!==i||e[47]!==x||e[48]!==a||e[49]!==l||e[50]!==r||e[51]!==n?(ee=s.jsx(pa,{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,groupVisibleCount:x,onSelectTask:l,onArchiveTask:a}),e[45]=o,e[46]=i,e[47]=x,e[48]=a,e[49]=l,e[50]=r,e[51]=n,e[52]=ee):ee=e[52];let V;e[53]!==Y||e[54]!==ee?(V=s.jsxs(Zl,{side:"right",align:"start",sideOffset:8,className:"w-72 p-2",children:[Y,ee]}),e[53]=Y,e[54]=ee,e[55]=V):V=e[55];let J;return e[56]!==H||e[57]!==V||e[58]!==w||e[59]!==S?(J=s.jsxs(Ql,{open:w,openDelay:120,closeDelay:150,onOpenChange:S,children:[H,V]}),e[56]=H,e[57]=V,e[58]=w,e[59]=S,e[60]=J):J=e[60],J}function fa(){}function pa(t){const e=N.c(6),{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,groupVisibleCount:l,onSelectTask:a,onArchiveTask:c}=t,d=js("agent",n,i,l);let u;return e[0]!==o||e[1]!==c||e[2]!==a||e[3]!==d||e[4]!==r?(u=s.jsx("div",{className:"flex flex-col gap-0.5 max-h-[60vh] overflow-y-auto",children:r.length===0&&!d.hasMore&&!d.isFetching?s.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:"No tasks yet"}):s.jsxs(s.Fragment,{children:[r.map(m=>s.jsx(Vt,{task:m,isActive:o===m.id,onClick:()=>a(m),onArchive:()=>c(m),showAutomationBadge:!!m.trigger_id},m.id)),(d.hasMore||d.isFetching)&&s.jsx(gs,{onClick:()=>{d.loadMore()},isFetching:d.isFetching})]})}),e[0]=o,e[1]=c,e[2]=a,e[3]=d,e[4]=r,e[5]=u):u=e[5],u}function xa(t,e,n,r,o,i,l){const a=N.c(18),c=l===void 0?"expanded":l;let d;a[0]===Symbol.for("react.memo_cache_sentinel")?(d={activationConstraint:{distance:8}},a[0]=d):d=a[0];let u;a[1]===Symbol.for("react.memo_cache_sentinel")?(u={coordinateGetter:$o},a[1]=u):u=a[1];const m=ko(Cs(To,d),Cs(Io,u));let f;a[2]!==r||a[3]!==o||a[4]!==e||a[5]!==t?(f=ao(t,e,r,o),a[2]=r,a[3]=o,a[4]=e,a[5]=t,a[6]=f):f=a[6];const h=f;let p;a[7]!==i||a[8]!==n||a[9]!==o||a[10]!==e||a[11]!==h||a[12]!==c?(p=b=>{const{active:j,over:y}=b;if(!y||j.id===y.id)return;const v=String(j.id),_=String(y.id);if(!co(v,_,o))return;const w=uo(h,v,_),S=mo(e,n,o,w);e==="org"?fo(n.orgId,S):po(n,S),te("sidebar_group_reordered",{virtual_mcp_id:v,over_virtual_mcp_id:_,surface:c,section:e}),i()},a[7]=i,a[8]=n,a[9]=o,a[10]=e,a[11]=h,a[12]=c,a[13]=p):p=a[13];const x=p;let g;return a[14]!==x||a[15]!==m||a[16]!==h?(g={sensors:m,sortableIds:h,handleDragEnd:x},a[14]=x,a[15]=m,a[16]=h,a[17]=g):g=a[17],g}function ha(t){const e=N.c(2),{collapsed:n}=t;if(n===void 0?!1:n){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"mx-auto my-1 h-px w-6 shrink-0 bg-border"}),e[0]=i):i=e[0],i}let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"my-1.5 h-px w-full shrink-0 bg-border"}),e[1]=o):o=e[1],o}function ga(t){const e=N.c(12),{id:n,children:r}=t;let o;e[0]!==n?(o={id:n},e[0]=n,e[1]=o):o=e[1];const{attributes:i,listeners:l,setNodeRef:a,transform:c,transition:d,isDragging:u}=Do(o);let m;if(e[2]!==i||e[3]!==r||e[4]!==u||e[5]!==l||e[6]!==a||e[7]!==c||e[8]!==d){const h={transform:Mo.Transform.toString(c),transition:d,zIndex:u?100:void 0};m=r({setNodeRef:a,style:h,isDragging:u,attributes:i,listeners:l}),e[2]=i,e[3]=r,e[4]=u,e[5]=l,e[6]=a,e[7]=c,e[8]=d,e[9]=m}else m=e[9];let f;return e[10]!==m?(f=s.jsx(s.Fragment,{children:m}),e[10]=m,e[11]=f):f=e[11],f}function Fs(t){const e=N.c(18),{section:n,groups:r,orderScope:o,decopilotId:i,orgPinnedIds:l,onReorder:a,surface:c,renderGroup:d,renderSortable:u,renderFixed:m}=t,{sensors:f,sortableIds:h,handleDragEnd:p}=xa(r,n,o,i,l,a,c);if(r.length===0)return null;const x=h;let g;if(e[0]!==r||e[1]!==m||e[2]!==d||e[3]!==u||e[4]!==h){let y;e[6]!==m||e[7]!==d||e[8]!==u||e[9]!==h?(y=v=>{const _=d(v);return h.includes(v.virtualMcpId)?s.jsx(ga,{id:v.virtualMcpId,children:w=>{const{setNodeRef:S,style:I,isDragging:T,attributes:$,listeners:O}=w;return s.jsx("div",{ref:S,style:I,className:Q(T&&"opacity-50"),children:u(_,{attributes:$,listeners:O,isDragging:T})})}},v.virtualMcpId):s.jsx("div",{children:m(_)},v.virtualMcpId)},e[6]=m,e[7]=d,e[8]=u,e[9]=h,e[10]=y):y=e[10],g=r.map(y),e[0]=r,e[1]=m,e[2]=d,e[3]=u,e[4]=h,e[5]=g}else g=e[5];let b;e[11]!==x||e[12]!==g?(b=s.jsx(Ao,{items:x,strategy:zo,children:g}),e[11]=x,e[12]=g,e[13]=b):b=e[13];let j;return e[14]!==p||e[15]!==f||e[16]!==b?(j=s.jsx(Oo,{sensors:f,collisionDetection:Po,onDragEnd:p,children:b}),e[14]=p,e[15]=f,e[16]=b,e[17]=j):j=e[17],j}function Hn(t){const e=N.c(23),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:a,collapsedSeparator:c,renderGroup:d,renderSortable:u,renderFixed:m}=t;let f;if(e[0]!==c||e[1]!==o||e[2]!==n||e[3]!==l||e[4]!==r||e[5]!==i||e[6]!==m||e[7]!==d||e[8]!==u||e[9]!==a){const{decopilot:h,orgPinned:p,user:x,toolCallRuns:g}=xo(n,o,i),b=p.length>0&&x.length>0;let j;e[11]!==o||e[12]!==l||e[13]!==r||e[14]!==i||e[15]!==m||e[16]!==d||e[17]!==u||e[18]!==a?(j={orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:a,renderGroup:d,renderSortable:u,renderFixed:m},e[11]=o,e[12]=l,e[13]=r,e[14]=i,e[15]=m,e[16]=d,e[17]=u,e[18]=a,e[19]=j):j=e[19];const y=j;let v;e[20]!==c||e[21]!==b?(v=b&&s.jsx(ha,{collapsed:c}),e[20]=c,e[21]=b,e[22]=v):v=e[22],f=s.jsxs(s.Fragment,{children:[h&&m(d(h)),s.jsx(Fs,{section:"org",groups:p,...y}),v,s.jsx(Fs,{section:"user",groups:x,...y}),g&&m(d(g))]}),e[0]=c,e[1]=o,e[2]=n,e[3]=l,e[4]=r,e[5]=i,e[6]=m,e[7]=d,e[8]=u,e[9]=a,e[10]=f}else f=e[10];return f}function ba(t){const e=N.c(7),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,renderGroup:a}=t;let c;return e[0]!==o||e[1]!==n||e[2]!==l||e[3]!==r||e[4]!==i||e[5]!==a?(c=s.jsx(Hn,{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:"collapsed_rail",collapsedSeparator:!0,renderGroup:a,renderFixed:va,renderSortable:ja}),e[0]=o,e[1]=n,e[2]=l,e[3]=r,e[4]=i,e[5]=a,e[6]=c):c=e[6],c}function ja(t,e){return s.jsx(Ln,{...t,sortable:{attributes:e.attributes,listeners:e.listeners,isDragging:e.isDragging}},t.virtualMcpId)}function va(t){return s.jsx(Ln,{...t},t.virtualMcpId)}const ya="sidebar.group.expanded.";function Bn(t,e){const n=N.c(3),[r,o]=ls(`${ya}${t}`,e);let i;return n[0]!==r||n[1]!==o?(i=[r,o],n[0]=r,n[1]=o,n[2]=i):i=n[2],i}function Un(t){const e=N.c(70),{virtualMcpId:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,onNewTaskInGroup:a,onShowSettings:c,onHideGroup:d,isOrgPinned:u,canManageOrgPin:m,onToggleOrgPin:f,filters:h,groupVisibleCount:p,devPartnerId:x,devGroupVisibleCount:g,sortable:b}=t,j=u===void 0?!1:u,y=m===void 0?!1:m,v=x===void 0?null:x,[_,w]=Bn(n,!1),S=n===an,I=b?.isDragging??!1;let T;e[0]!==v||e[1]!==r?(T=v?r.filter(W=>W.virtual_mcp_id===v):[],e[0]=v,e[1]=r,e[2]=T):T=e[2];const $=T;let O;e[3]!==v||e[4]!==r?(O=v?r.filter(W=>W.virtual_mcp_id!==v):r,e[3]=v,e[4]=r,e[5]=O):O=e[5];const A=O,C=!!v&&($.length>0||(g??0)>0);let M;e[6]!==_||e[7]!==w?(M=function(){w(!_)},e[6]=_,e[7]=w,e[8]=M):M=e[8];const K=M;let U;e[9]!==S||e[10]!==b?(U=b&&!S?{...b.attributes,...b.listeners}:{},e[9]=S,e[10]=b,e[11]=U):U=e[11];let E;e[12]!==K?(E=W=>{W.target===W.currentTarget&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),K())},e[12]=K,e[13]=E):E=e[13];const L=b&&!S&&"touch-none active:cursor-grabbing",R=I&&"shadow-md bg-accent/40 cursor-grabbing";let H;e[14]!==R||e[15]!==L?(H=Q("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",L,R),e[14]=R,e[15]=L,e[16]=H):H=e[16];let P;e[17]!==S||e[18]!==n?(P=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(_a,{virtualMcpId:n,isToolCallRuns:S})}),e[17]=S,e[18]=n,e[19]=P):P=e[19];let G;e[20]!==_?(G=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:_?s.jsx(vn,{size:14}):s.jsx(ps,{size:14})}),e[20]=_,e[21]=G):G=e[21];let D;e[22]!==P||e[23]!==G?(D=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[P,G]}),e[22]=P,e[23]=G,e[24]=D):D=e[24];let B;e[25]!==S||e[26]!==n?(B=s.jsx("span",{className:"flex-1 truncate",children:s.jsx(Ca,{virtualMcpId:n,isToolCallRuns:S})}),e[25]=S,e[26]=n,e[27]=B):B=e[27];let F;e[28]!==S||e[29]!==a||e[30]!==n?(F=!S&&s.jsx("button",{type:"button","aria-label":"New task in this agent",onClick:W=>{W.stopPropagation(),a(n)},className:"opacity-0 group-hover/group:opacity-100 focus-visible:opacity-100 transition-opacity flex size-7 items-center justify-center rounded-md hover:bg-accent text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(ke,{size:14})}),e[28]=S,e[29]=a,e[30]=n,e[31]=F):F=e[31];let Y;e[32]!==_||e[33]!==K||e[34]!==H||e[35]!==D||e[36]!==B||e[37]!==F||e[38]!==U||e[39]!==E?(Y=s.jsxs("div",{...U,role:"button",tabIndex:0,"aria-expanded":_,onClick:K,onKeyDown:E,className:H,children:[D,B,F]}),e[32]=_,e[33]=K,e[34]=H,e[35]=D,e[36]=B,e[37]=F,e[38]=U,e[39]=E,e[40]=Y):Y=e[40];const ee=Y;let V;e[41]!==y||e[42]!==ee||e[43]!==j||e[44]!==S||e[45]!==d||e[46]!==a||e[47]!==c||e[48]!==f||e[49]!==n?(V=S?ee:s.jsxs(jn,{children:[s.jsx(gn,{asChild:!0,children:ee}),s.jsx(bn,{className:"w-56",children:s.jsx(En,{virtualMcpId:n,isOrgPinned:j,canManageOrgPin:y,onNewTaskInGroup:a,onShowSettings:c,onToggleOrgPin:f??Sa,onHideGroup:d})})]}),e[41]=y,e[42]=ee,e[43]=j,e[44]=S,e[45]=d,e[46]=a,e[47]=c,e[48]=f,e[49]=n,e[50]=V):V=e[50];let J;e[51]!==o||e[52]!==g||e[53]!==v||e[54]!==$||e[55]!==_||e[56]!==h||e[57]!==p||e[58]!==S||e[59]!==A||e[60]!==l||e[61]!==a||e[62]!==i||e[63]!==C||e[64]!==r||e[65]!==n?(J=_&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:S?r.map(W=>s.jsx(Vt,{task:W,isActive:o===W.id,onClick:()=>i(W),onArchive:()=>l(W),showAutomationBadge:!!W.trigger_id,indented:!0},W.id)):s.jsxs(s.Fragment,{children:[s.jsx(Gs,{virtualMcpId:n,threads:A,activeTaskId:o,onSelectTask:i,onArchiveTask:l,onNewTaskInGroup:a,filters:h,groupVisibleCount:p}),C&&v&&s.jsxs("div",{className:"flex flex-col gap-0.5 mt-1.5",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-2 pb-0.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/80",children:[s.jsx(Vr,{size:11}),"Develop"]}),s.jsx(Gs,{virtualMcpId:v,threads:$,activeTaskId:o,onSelectTask:i,onArchiveTask:l,onNewTaskInGroup:a,filters:h,groupVisibleCount:g})]})]})}),e[51]=o,e[52]=g,e[53]=v,e[54]=$,e[55]=_,e[56]=h,e[57]=p,e[58]=S,e[59]=A,e[60]=l,e[61]=a,e[62]=i,e[63]=C,e[64]=r,e[65]=n,e[66]=J):J=e[66];let X;return e[67]!==V||e[68]!==J?(X=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[V,J]}),e[67]=V,e[68]=J,e[69]=X):X=e[69],X}function Sa(){}function _a(t){const e=N.c(3),{virtualMcpId:n,isToolCallRuns:r}=t;if(r){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Fe,{icon:null,name:"⚙",size:"2xs"}),e[0]=i):i=e[0],i}let o;return e[1]!==n?(o=s.jsx(Na,{virtualMcpId:n}),e[1]=n,e[2]=o):o=e[2],o}function Na(t){const e=N.c(4),{virtualMcpId:n}=t,r=vt(n);if(!r){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Fe,{icon:null,name:"?",size:"2xs"}),e[0]=l):l=e[0],l}const o=r.icon??null;let i;return e[1]!==r.title||e[2]!==o?(i=s.jsx(Fe,{icon:o,name:r.title,size:"2xs"}),e[1]=r.title,e[2]=o,e[3]=i):i=e[3],i}function Ca(t){const e=N.c(3),{virtualMcpId:n,isToolCallRuns:r}=t;if(r){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(s.Fragment,{children:"Automation runs"}),e[0]=i):i=e[0],i}let o;return e[1]!==n?(o=s.jsx(wa,{virtualMcpId:n}),e[1]=n,e[2]=o):o=e[2],o}function wa(t){const e=N.c(2),{virtualMcpId:n}=t,o=vt(n)?.title??"Agent";let i;return e[0]!==o?(i=s.jsx(s.Fragment,{children:o}),e[0]=o,e[1]=i):i=e[1],i}function Gs(t){const e=N.c(10),{virtualMcpId:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,onNewTaskInGroup:a,filters:c,groupVisibleCount:d}=t,u=js("agent",n,c,d),{isFetching:m,isProbing:f,loadMore:h,serverHasMore:p}=u,[x,g]=z.useState(!1);!x&&r.length===0&&p===!0&&!m&&!f&&(g(!0),queueMicrotask(()=>{h()}));const{hasMore:b}=u;let j;return e[0]!==o||e[1]!==b||e[2]!==m||e[3]!==h||e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==r||e[8]!==n?(j=s.jsx(s.Fragment,{children:r.length===0?s.jsxs("button",{type:"button",onClick:()=>a(n),className:"flex items-center gap-2 -ml-4 pl-6 pr-2 py-1.5 rounded-md cursor-pointer text-sm text-muted-foreground hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[s.jsx(ke,{size:14}),s.jsx("span",{children:"New thread"})]}):s.jsxs(s.Fragment,{children:[r.map(y=>s.jsx(Vt,{task:y,isActive:o===y.id,onClick:()=>i(y),onArchive:()=>l(y),showAutomationBadge:!!y.trigger_id,indented:!0},y.id)),(b||m)&&s.jsx(gs,{onClick:()=>{h()},isFetching:m,indented:!0})]})}),e[0]=o,e[1]=b,e[2]=m,e[3]=h,e[4]=l,e[5]=a,e[6]=i,e[7]=r,e[8]=n,e[9]=j):j=e[9],j}function ka(t){const e=N.c(16),{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a}=t,{isFetching:c,isProbing:d,loadMore:u,hasMore:m,serverHasMore:f}=js("status",n,a),[h,p]=z.useState(!1);!h&&r.length===0&&f===!0&&!c&&!d&&(p(!0),queueMicrotask(()=>{u()}));let x;if(e[0]!==o||e[1]!==l||e[2]!==i||e[3]!==r){let j;e[5]!==o||e[6]!==l||e[7]!==i?(j=y=>s.jsx(Vt,{task:y,isActive:o===y.id,onClick:()=>i(y),onArchive:()=>l(y),showAutomationBadge:!!y.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},y.id),e[5]=o,e[6]=l,e[7]=i,e[8]=j):j=e[8],x=r.map(j),e[0]=o,e[1]=l,e[2]=i,e[3]=r,e[4]=x}else x=e[4];let g;e[9]!==m||e[10]!==c||e[11]!==u?(g=(m||c)&&s.jsx(gs,{onClick:()=>{u()},isFetching:c,indented:!0}),e[9]=m,e[10]=c,e[11]=u,e[12]=g):g=e[12];let b;return e[13]!==x||e[14]!==g?(b=s.jsxs(s.Fragment,{children:[x,g]}),e[13]=x,e[14]=g,e[15]=b):b=e[15],b}function Ia(t){const e=N.c(35),{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a}=t,c=$i[n],d=c.icon,[u,m]=Bn(`status-${n}`,!1);let f;e[0]!==u||e[1]!==m?(f=function(){m(!u)},e[0]=u,e[1]=m,e[2]=f):f=e[2];const h=f;let p;e[3]!==h?(p=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),h())},e[3]=h,e[4]=p):p=e[4];let x;e[5]!==d||e[6]!==c.iconClassName?(x=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(d,{size:12,className:c.iconClassName})}),e[5]=d,e[6]=c.iconClassName,e[7]=x):x=e[7];let g;e[8]!==u?(g=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(vn,{size:14}):s.jsx(ps,{size:14})}),e[8]=u,e[9]=g):g=e[9];let b;e[10]!==x||e[11]!==g?(b=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[x,g]}),e[10]=x,e[11]=g,e[12]=b):b=e[12];let j;e[13]!==c.label?(j=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=j):j=e[14];let y;e[15]!==r.length?(y=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:r.length})}),e[15]=r.length,e[16]=y):y=e[16];let v;e[17]!==u||e[18]!==h||e[19]!==p||e[20]!==b||e[21]!==j||e[22]!==y?(v=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:h,onKeyDown:p,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:[b,j,y]}),e[17]=u,e[18]=h,e[19]=p,e[20]=b,e[21]=j,e[22]=y,e[23]=v):v=e[23];let _;e[24]!==o||e[25]!==u||e[26]!==a||e[27]!==l||e[28]!==i||e[29]!==n||e[30]!==r?(_=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(ka,{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a})}),e[24]=o,e[25]=u,e[26]=a,e[27]=l,e[28]=i,e[29]=n,e[30]=r,e[31]=_):_=e[31];let w;return e[32]!==v||e[33]!==_?(w=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[v,_]}),e[32]=v,e[33]=_,e[34]=w):w=e[34],w}function Ta(t){const e=N.c(7),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,renderGroup:a}=t;let c;return e[0]!==o||e[1]!==n||e[2]!==l||e[3]!==r||e[4]!==i||e[5]!==a?(c=s.jsx(Hn,{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:"expanded",renderGroup:a,renderFixed:Aa,renderSortable:$a}),e[0]=o,e[1]=n,e[2]=l,e[3]=r,e[4]=i,e[5]=a,e[6]=c):c=e[6],c}function $a(t,e){return s.jsx(Un,{...t,sortable:e},t.virtualMcpId)}function Aa(t){return s.jsx(Un,{...t},t.virtualMcpId)}function za(t,e,n,r){return[t.orgId,t.userId,r,n.slice().sort().join(","),e.map(o=>o.virtualMcpId).sort().join(",")].join("|")}function Oa(t,e,n,r,o){const i=N.c(5),l=za(t,e,r,o),[a,c]=z.useState("");a!==l&&(ho(t,e,n,r),c(l));let d;return i[0]!==n||i[1]!==r||i[2]!==t||i[3]!==e?(d=go(t,e,n,r),i[0]=n,i[1]=r,i[2]=t,i[3]=e,i[4]=d):d=i[4],d}const qn={all:"All tasks",manual:"Chats",automation:"Automation"},Wn={all:"All members",mine:"Mine only"},Ls={agent:"Agent",status:"Status"};function Kn(t){const e=N.c(98);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:r}=n,{data:o}=Ie.useSession(),i=o?.user?.id,l=i??"anon",{org:a}=pe(),c=Fr(a.id).id,d=tn(),{liveToDev:u,devToLive:m}=Ro(d),f=ln(d),h=Fl(),p=Gr();let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x={},e[2]=x):x=e[2];const[g,b]=z.useState(x),j=new Set(f),y={},v=[];let _;e[3]!==g?(_=Object.entries(g),e[3]=g,e[4]=_):_=e[4];for(const[k,q]of _)j.has(k)!==q?y[k]=q:v.push(k);v.length>0&&b(k=>{const q={...k};for(const se of v)delete q[se];return q});const w=new Set(f);for(const[k,q]of Object.entries(y))q?w.add(k):w.delete(k);const S=[...w],I=new Set(S),{threads:T}=rn(),$=T.filter(Ha),{hide:O}=nn(),A=Ge(),{setTaskId:C,createNewTask:M}=on();let K;e[5]===Symbol.for("react.memo_cache_sentinel")?(K={strict:!1},e[5]=K):K=e[5];const E=qs(K).taskId??null;let L;e[6]!==r?(L=()=>{r?.()},e[6]=r,e[7]=L):L=e[7];const R=L,H=[...$].sort(La),[P,G]=z.useState("all"),[D,B]=z.useState("mine"),[F,Y]=z.useState("agent"),[ee,V]=z.useState(!1),[J,X]=z.useState(!1),[W,re]=z.useState(0),ie=bo(),ue=W+ie;let ne;e[8]!==a.id||e[9]!==l?(ne={orgId:a.id,userId:l},e[8]=a.id,e[9]=l,e[10]=ne):ne=e[10];const oe=ne,le={type:P,member:D,currentUserId:i??null},xe=oa(H,"agent",le),Z=Oa(oe,jo(vo(H,c),m),c,S,ue);let $e;e[11]!==i||e[12]!==D?($e=k=>D==="mine"&&i?k.filter(q=>q.created_by===i):k,e[11]=i,e[12]=D,e[13]=$e):$e=e[13];const me=$e;let be;e[14]!==P?(be=k=>P==="automation"?k.filter(Ga):P==="manual"?k.filter(Fa):k,e[14]=P,e[15]=be):be=e[15];const je=be,Ae=k=>{const q=k.id===E;if(O(k.id),!q)return;const se=H.find(fe=>fe.id!==k.id&&fe.virtual_mcp_id===k.virtual_mcp_id&&fe.created_by===i);R(),se?C(se.id,se.virtual_mcp_id):A({to:"/$org",params:{org:a.slug}})};let ve;e[16]!==R||e[17]!==M?(ve=k=>{te("sidebar_group_new_clicked",{virtual_mcp_id:k}),R(),M(k)},e[16]=R,e[17]=M,e[18]=ve):ve=e[18];const Le=ve,_e=yo();let ye;e[19]!==R||e[20]!==_e?(ye=k=>{te("sidebar_group_settings_clicked",{virtual_mcp_id:k}),R(),_e(k,{search:{main:"instructions"}})},e[19]=R,e[20]=_e,e[21]=ye):ye=e[21];const He=ye,Be=k=>{if(I.has(k))return;te("sidebar_group_hide_clicked",{virtual_mcp_id:k});const q=Z.find(se=>se.virtualMcpId===k);if(q)for(const se of q.threads)O(se.id);_o(oe,k,S),re(Ea)},xt=async(k,q)=>{if(h&&y[k]===void 0){te("sidebar_group_org_pin_toggled",{virtual_mcp_id:k,pinned:q}),b(se=>({...se,[k]:q}));try{await p.update.mutateAsync({id:k,data:{pinned:q}})}catch{No(oe,k,!q),b(se=>{const fe={...se};return delete fe[k],fe})}}},Ue=k=>{const q=k===c||k===an;return{isOrgPinned:q||I.has(k),canManageOrgPin:q?!1:h,onToggleOrgPin:q?void 0:xt}},Ye=k=>{const q=je(me(k.threads)),se=u.get(k.virtualMcpId)??null;return{virtualMcpId:k.virtualMcpId,threads:q,devPartnerId:se,devGroupVisibleCount:se?xe.get(se)??0:0,activeTaskId:E,filters:le,groupVisibleCount:xe.get(k.virtualMcpId)??0,onSelectTask:fe=>{R(),C(fe.id,fe.virtual_mcp_id)},onArchiveTask:Ae,onNewTaskInGroup:Le,onShowSettings:He,onHideGroup:Be,...Ue(k.virtualMcpId)}},de=P!=="all"||D!=="mine",{state:qe,isMobile:We}=Ve();if(qe==="collapsed"&&!We){let k;if(e[22]!==de||e[23]!==Z||e[24]!==me||e[25]!==je){let mt;e[27]!==de||e[28]!==me||e[29]!==je?(mt=Xn=>{const Qn=je(me(Xn.threads));return!(de&&Qn.length===0)},e[27]=de,e[28]=me,e[29]=je,e[30]=mt):mt=e[30],k=Z.filter(mt),e[22]=de,e[23]=Z,e[24]=me,e[25]=je,e[26]=k}else k=e[26];const q=k,se=F==="agent"&&Z.length===0;let fe;e[31]!==se?(fe=s.jsx(Ns,{value:se}),e[31]=se,e[32]=fe):fe=e[32];let zt;return e[33]===Symbol.for("react.memo_cache_sentinel")?(zt=()=>re(Ra),e[33]=zt):zt=e[33],s.jsxs(s.Fragment,{children:[fe,s.jsx(De,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:s.jsx(ba,{groups:q,orderScope:oe,decopilotId:c,orgPinnedIds:S,onReorder:zt,renderGroup:mt=>Ye(mt)})})]})}const Ke="flex flex-col h-full min-h-0",Ne=F==="agent"&&Z.length===0;let Se;e[34]!==Ne?(Se=s.jsx(Ns,{value:Ne}),e[34]=Ne,e[35]=Se):Se=e[35];let ae;e[36]!==V?(ae=()=>{te("tasks_panel_search_opened"),X(!0),V(!0)},e[36]=V,e[37]=ae):ae=e[37];let ze;e[38]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsx(Yr,{size:16}),e[38]=ze):ze=e[38];let Ce;e[39]!==ae?(Ce=s.jsx(ge,{"aria-label":"Search threads",onClick:ae,children:ze}),e[39]=ae,e[40]=Ce):Ce=e[40];const gt=Ls[F==="agent"?"status":"agent"];let Xe;e[41]!==gt?(Xe=gt.toLowerCase(),e[41]=gt,e[42]=Xe):Xe=e[42];const bt=`Group by ${Xe}`,Xt=Ls[F];let St;e[43]!==Xt?(St=Xt.toLowerCase(),e[43]=Xt,e[44]=St):St=e[44];const Qt=`Grouped by ${St}`;let Qe,Je;e[45]!==F?(Qe=()=>{const k=F==="agent"?"status":"agent";te("tasks_panel_group_by_changed",{to_value:k}),Y(k)},Je=F==="agent"?s.jsx(gi,{size:16}):s.jsx(Xr,{size:16}),e[45]=F,e[46]=Qe,e[47]=Je):(Qe=e[46],Je=e[47]);let Ze;e[48]!==bt||e[49]!==Qt||e[50]!==Qe||e[51]!==Je?(Ze=s.jsx(ge,{"aria-label":bt,title:Qt,onClick:Qe,children:Je}),e[48]=bt,e[49]=Qt,e[50]=Qe,e[51]=Je,e[52]=Ze):Ze=e[52];let _t;e[53]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(hi,{size:16}),e[53]=_t):_t=e[53];let et;e[54]!==de?(et=de&&s.jsx("span",{className:"absolute top-0.5 right-0.5 size-2 rounded-full bg-red-500 ring-1 ring-sidebar pointer-events-none"}),e[54]=de,e[55]=et):et=e[55];let tt;e[56]!==et?(tt=s.jsx(pt,{asChild:!0,children:s.jsxs(ge,{"aria-label":"Filter tasks",children:[_t,et]})}),e[56]=et,e[57]=tt):tt=e[57];let st;e[58]!==D?(st=k=>{const q=k;q!==D&&te("tasks_panel_member_filter_changed",{to_value:q}),B(q)},e[58]=D,e[59]=st):st=e[59];let Nt;e[60]===Symbol.for("react.memo_cache_sentinel")?(Nt=s.jsx(Is,{size:"sm",className:"w-full",children:s.jsx(Ts,{})}),e[60]=Nt):Nt=e[60];let Ct;e[61]===Symbol.for("react.memo_cache_sentinel")?(Ct=Object.keys(Wn),e[61]=Ct):Ct=e[61];let wt;e[62]===Symbol.for("react.memo_cache_sentinel")?(wt=s.jsx(ks,{children:Ct.map(Ma)}),e[62]=wt):wt=e[62];let nt;e[63]!==D||e[64]!==st?(nt=s.jsx(Hs,{label:"Members",children:s.jsxs($s,{value:D,onValueChange:st,children:[Nt,wt]})}),e[63]=D,e[64]=st,e[65]=nt):nt=e[65];let rt;e[66]!==P?(rt=k=>{const q=k;q!==P&&te("tasks_panel_filter_changed",{to_value:q}),G(q)},e[66]=P,e[67]=rt):rt=e[67];let kt;e[68]===Symbol.for("react.memo_cache_sentinel")?(kt=s.jsx(Is,{size:"sm",className:"w-full",children:s.jsx(Ts,{})}),e[68]=kt):kt=e[68];let It;e[69]===Symbol.for("react.memo_cache_sentinel")?(It=Object.keys(qn),e[69]=It):It=e[69];let Tt;e[70]===Symbol.for("react.memo_cache_sentinel")?(Tt=s.jsx(ks,{children:It.map(Da)}),e[70]=Tt):Tt=e[70];let ot;e[71]!==rt||e[72]!==P?(ot=s.jsx(Hs,{label:"Type",children:s.jsxs($s,{value:P,onValueChange:rt,children:[kt,Tt]})}),e[71]=rt,e[72]=P,e[73]=ot):ot=e[73];let it;e[74]!==nt||e[75]!==ot?(it=s.jsx(Ut,{align:"start",sideOffset:8,collisionPadding:16,className:"w-72 p-3",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[nt,ot]})}),e[74]=nt,e[75]=ot,e[76]=it):it=e[76];let lt;e[77]!==tt||e[78]!==it?(lt=s.jsxs(Bt,{children:[tt,it]}),e[77]=tt,e[78]=it,e[79]=lt):lt=e[79];let at;e[80]!==Ce||e[81]!==Ze||e[82]!==lt?(at=s.jsxs("div",{className:"flex items-center gap-0.5",children:[Ce,Ze,lt]}),e[80]=Ce,e[81]=Ze,e[82]=lt,e[83]=at):at=e[83];let $t;e[84]===Symbol.for("react.memo_cache_sentinel")?($t=s.jsx(yn,{compact:!0}),e[84]=$t):$t=e[84];let ct;e[85]!==at?(ct=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[at,$t]}),e[85]=at,e[86]=ct):ct=e[86];const Yn="flex-1 min-h-0 overflow-y-auto overscroll-contain flex flex-col gap-0.5 -mr-2 pr-2",Jt=F==="status"?s.jsx(s.Fragment,{children:So(je(me(H))).map(k=>s.jsx(Ia,{status:k.status,threads:k.threads,activeTaskId:E,onSelectTask:q=>{R(),C(q.id,q.virtual_mcp_id)},onArchiveTask:Ae,filters:le},k.status))}):s.jsx(Ta,{groups:Z,orderScope:oe,decopilotId:c,orgPinnedIds:S,onReorder:()=>re(Pa),renderGroup:k=>({...Ye(k)})});let dt;e[87]!==Jt?(dt=s.jsx("div",{className:Yn,children:Jt}),e[87]=Jt,e[88]=dt):dt=e[88];let ut;e[89]!==J||e[90]!==ee||e[91]!==V?(ut=J&&s.jsx(Rl,{open:ee,onOpenChange:V}),e[89]=J,e[90]=ee,e[91]=V,e[92]=ut):ut=e[92];let At;return e[93]!==Se||e[94]!==ct||e[95]!==dt||e[96]!==ut?(At=s.jsxs("div",{className:Ke,children:[Se,ct,dt,ut]}),e[93]=Se,e[94]=ct,e[95]=dt,e[96]=ut,e[97]=At):At=e[97],At}function Pa(t){return t+1}function Da(t){return s.jsx(pn,{value:t,children:qn[t]},t)}function Ma(t){return s.jsx(pn,{value:t,children:Wn[t]},t)}function Ra(t){return t+1}function Ea(t){return t+1}function Fa(t){return!t.trigger_id}function Ga(t){return!!t.trigger_id}function La(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Ha(t){return!t.hidden}function Hs(t){const e=N.c(7),{label:n,children:r}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let i;e[2]!==r?(i=s.jsx("div",{className:"w-36 shrink-0",children:r}),e[2]=r,e[3]=i):i=e[3];let l;return e[4]!==o||e[5]!==i?(l=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,i]}),e[4]=o,e[5]=i,e[6]=l):l=e[6],l}const Ba=5,Ua=[{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 Vn(){const t=N.c(3),{state:e}=Ve();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:Ba}).map(Ka)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(we,{className:"size-6 rounded-md"}),s.jsx(we,{className:"size-6 rounded-md"}),s.jsx(we,{className:"size-6 rounded-md"})]}),s.jsx(we,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=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:Ua.map(qa)})]}),t[2]=r):r=t[2],r}function qa(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(we,{className:"size-5 rounded-full shrink-0"}),s.jsx(we,{className:Q("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(Wa)})]},e)}function Wa(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(we,{className:"h-3 flex-1 rounded-sm"})},e)}function Ka(t,e){return s.jsx(we,{className:"size-10 rounded-lg mx-auto"},e)}function Va(){const t=N.c(4),e=Sn();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ol,{}),t[0]=n):n=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Vs,{children:s.jsxs(z.Suspense,{fallback:s.jsxs(s.Fragment,{children:[s.jsx(Rt,{className:"mb-2"}),s.jsx(Vn,{})]}),children:[s.jsx(Rt,{className:"mb-2"}),s.jsx(Kn,{})]})}),t[1]=r):r=t[1];let o;return t[2]!==e?(o=s.jsx(cn,{children:s.jsx(Cn,{sections:e,footer:n,additionalContent:r})}),t[2]=e,t[3]=o):o=t[3],o}function Ya(t){const e=N.c(9),{onClose:n}=t,r=Sn();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Pl,{}),e[0]=o):o=e[0];let i,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(s.Fragment,{children:[s.jsx(Rt,{className:"mb-2"}),s.jsx(Vn,{})]}),l=s.jsx(Rt,{className:"mb-2"}),e[1]=i,e[2]=l):(i=e[1],l=e[2]);let a;e[3]!==n?(a=s.jsx(Vs,{children:s.jsxs(z.Suspense,{fallback:i,children:[l,s.jsx(Kn,{onNavigate:n})]})}),e[3]=n,e[4]=a):a=e[4];let c;return e[5]!==n||e[6]!==r||e[7]!==a?(c=s.jsx(cn,{children:s.jsx(tl,{sections:r,onClose:n,footer:o,additionalContent:a})}),e[5]=n,e[6]=r,e[7]=a,e[8]=c):c=e[8],c}const Xa="sidebar.open";function Qa(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Oi,{}),t[0]=e):e=t[0],e}function tu(){const t=N.c(24),e=ds(),[n,r]=ls(Xa,!1),{width:o,wrapperRef:i,onStartResize:l,resetWidth:a}=Ri();let c;t[0]!==e?(c=e?s.jsxs(ce.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_auto] items-center gap-2",children:[s.jsx(ce.LogoLink,{}),s.jsx(vs,{}),s.jsx(ns,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(ce.TogglesSlot,{}),s.jsx(ce.TabsSlot,{className:"min-w-0 justify-self-end"})]}),s.jsx(ce.CenterSlot,{}),s.jsx(ce.RightSlot,{})]}):s.jsxs(ce.Header,{children:[s.jsxs(ce.LeftColumn,{children:[s.jsx(ce.LogoLink,{}),s.jsx(vs,{}),s.jsx("span",{className:"hidden md:contents",children:s.jsx(ce.Nav,{})}),s.jsx(ce.TogglesSlot,{}),s.jsx(ns,{})]}),s.jsx(ce.CenterSlot,{}),s.jsxs(ce.RightColumn,{children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:s.jsx(ce.TabsSlot,{})}),s.jsx(ce.RightSlot,{})]})]}),t[0]=e,t[1]=c):c=t[1];const d=`${o}px`;let u;t[2]!==d?(u={"--sidebar-width":d,"--sidebar-width-icon":"3.5rem"},t[2]=d,t[3]=u):u=t[3];const m=u;let f;t[4]!==e||t[5]!==l||t[6]!==a?(f=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Va,{}),s.jsx(Pi,{onPointerDown:l,onDoubleClick:a})]}),t[4]=e,t[5]=l,t[6]=a,t[7]=f):f=t[7];let h;t[8]===Symbol.for("react.memo_cache_sentinel")?(h={background:"transparent",containerType:"inline-size"},t[8]=h):h=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Tr,{className:"flex flex-col",style:h,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(z.Suspense,{fallback:s.jsx(Qa,{}),children:s.jsx(wr,{})})})})}),t[9]=p):p=t[9];let x;t[10]!==m||t[11]!==f||t[12]!==i?(x=s.jsxs($r,{ref:i,className:"flex-1 bg-sidebar relative min-h-0",style:m,children:[f,p]}),t[10]=m,t[11]=f,t[12]=i,t[13]=x):x=t[13];let g;t[14]!==e?(g=e&&s.jsx(Or,{renderSidebar:Ja}),t[14]=e,t[15]=g):g=t[15];let b;t[16]!==c||t[17]!==x||t[18]!==g?(b=s.jsx(fi,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[c,x,g]})}),t[16]=c,t[17]=x,t[18]=g,t[19]=b):b=t[19];let j;return t[20]!==r||t[21]!==n||t[22]!==b?(j=s.jsx(eo,{children:s.jsx(ce.Provider,{children:s.jsx(Ar,{open:n,onOpenChange:r,children:b})})}),t[20]=r,t[21]=n,t[22]=b,t[23]=j):j=t[23],j}function Ja(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(Ya,{onClose:e})})})}export{tu as default};
@@ -1 +0,0 @@
1
- import{c as it,r as E,j as e,i as rt}from"./index-i4yKOslE.js";import{S as mt,b as pt,c as st,d as at}from"./sheet-kBH5wWuh.js";import{S as nt}from"./scroll-area-BJwafxli.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-DOcO58Bb.js";import{p as xt}from"./index-g9kd8YLC.js";import"./X-B5LAnKcO.js";import"./agent-icon-CpgVmlKA.js";import"./AlertCircle-B2rGiQLW.js";import"./Tool01-DdMkISER.js";import"./SwitchHorizontal01-BTdkOtmC.js";import"./Settings02-C2eeV5U-.js";import"./XCircle-CJScj78U.js";import"./ArrowUpRight-DYz-mNwT.js";import"./ZapSquare-CwCpnU0T.js";import"./Users03-FbNBHUKo.js";import"./CheckCircle-cLxWQcst.js";import"./ChevronUp-DFVBw1Q0.js";import"./ChevronDown-DajKJ50G.js";import"./ChevronLeft-CB4idmP8.js";import"./ChevronRight-DwQZMwjZ.js";import"./DotsVertical-DXVlN6Ej.js";import"./Stars02-nM_Vn7Vv.js";import"./Eye-XlApkfqq.js";import"./ZoomOut-CiTyIS5u.js";import"./Globe01-BsZz_aM-.js";import"./FilterLines-yICREcB1.js";import"./Star01-DNr09MAY.js";import"./Globe04-2qahfQsK.js";import"./HardDrive-BOnuPdqR.js";import"./Key01-EWZLh6Dg.js";import"./LayoutLeft-B0kudz4E.js";import"./LinkExternal01-B40yAEYp.js";import"./Monitor01-CEDnJUQX.js";import"./Sun-BmtS6iHG.js";import"./Palette-DcfG5x3C.js";import"./Play-BqHmN8yQ.js";import"./Plus-FHaDaCOZ.js";import"./SearchMd-CtVQE5jm.js";import"./Shield01-CVbeDgIl.js";import"./Stars01-DUYEhBcS.js";import"./Trash01-DK9RS17_.js";import"./Upload01-cLKObBlS.js";import"./User01-CWKoITic.js";import"./Users01-BCyCe1vl.js";import"./XClose-BDmZVvYt.js";import"./Zap-S88eHWD4.js";import"./use-clock-tick-o7ys6RNk.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BGh_3bgs.js";import"./tooltip-CXJRsrjZ.js";import"./file-type-icon-BgIATQF6.js";import"./dialog-BzVd1N_n.js";import"./use-mobile-kRXKzOd9.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-_9kCqfLO.js";import"./use-mcp-client-Cf5O31zc.js";import"./auth-b_6YQ5M-.js";import"./chat-context-D3ExOe2Y.js";import"./hooks-CNaD44fD.js";import"./decopilot-sse-pool-B7XaA24C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-BrKgTMoD.js";import"./use-collections-DXvOdsjP.js";import"./use-ai-providers-CYpO6V5w.js";import"./studio-tools-BIon8cDY.js";import"./use-organization-settings-DR6y14Ln.js";import"./shell-layout-C9QfcYwS.js";import"./avatar-D--lTQS0.js";import"./required-auth-layout-DBSHkTvE.js";import"./use-org-sso-rHZ6AeZh.js";import"./integration-icon-DZfYl8h3.js";import"./use-navigate-to-agent-D5T4j8BI.js";import"./use-connection-DIyKq7Ja.js";import"./use-mcp-prompts-0LKFoXra.js";import"./form-O3jmDZ8D.js";import"./label-C5DnCEJJ.js";import"./input-DYWiBUd4.js";import"./select-BURfxZgH.js";import"./switch-Cfy-9sgc.js";import"./index-Dz6axdna.js";import"./drawer-BU5LE1S-.js";import"./collection-search-D2ns8QJ2.js";import"./tabs-DBW6pdRK.js";import"./toggle-group-BAuAoo_h.js";import"./sortable.esm-D-2-mhpi.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-D7NkQFKT.js";import"./use-registry-connections-B75n3CLT.js";import"./useInfiniteQuery-D6UIz-QI.js";import"./use-infinite-scroll-MldU11Y_.js";import"./extract-connection-data-Yinpm7Wp.js";import"./card-DKEaJmjc.js";import"./collection-tabs-DGHCcD9t.js";import"./badge-BMv5o_K8.js";import"./textarea-DZCmuZgN.js";import"./connection-form-helpers-DDvLA1rL.js";import"./authenticate-and-persist-oauth-KmxgbBFx.js";import"./mcp-oauth-Cn6Swd6f.js";import"./useSuspenseInfiniteQuery-BR1ud50u.js";import"./connect-desktop-dialog-B3nMoofq.js";import"./decopilot-B_42o1Ie.js";import"./checkbox-BNJLgZxx.js";import"./skeleton-CDZIM9IX.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-4OTvULu2.js";import"./popover-Cqn28LcZ.js";import"./command-BxU9CB6T.js";import"./index-D4uJ-4rf.js";import"./dropdown-menu-Cu02JhqK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DRNyv2My.js";import"./empty-state-CycaKPME.js";import"./toolbar-C3iNf-7g.js";import"./preview-dialog-DVVKqkqH.js";import"./index-BlQHqLEe.js";import"./use-mcp-tools-BpKUIA5V.js";import"./use-capability-CdTgUecU.js";import"./shell-route-loading-BGNAbcrB.js";import"./index-Dk_a1p_f.js";import"./alert-dialog-F25p9Qd4.js";import"./use-debounced-autosave-xqhSnikO.js";import"./index-VgUmzAVY.js";import"./sidebar-CUYXItjm.js";import"./search-input-BXoNPqlW.js";import"./github-repo-picker-pUxjtHSB.js";import"./use-secrets-D9jHoh1C.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-BSFLVh95.js";import"./automation-runs-BtxudtXE.js";import"./table-B9Ser0hN.js";import"./use-members-Cleyn3sD.js";import"./use-org-auth-client-DbFVvoh8.js";import"./task-status-BEL_tB4l.js";import"./use-automations-CCFTv539.js";import"./use-file-configs-C4r9SONA.js";import"./monaco-editor-DdEcYsFE.js";import"./select-model-C5-GKj9v.js";import"./automation-list-row-kN98yjTo.js";function oi(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]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.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 M=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 V=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 z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,B=m.kind==="site"&&o&&n,H=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 $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,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]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):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:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=B,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 b;return t[42]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{oi as SeoSheet};
@@ -1 +0,0 @@
1
- import{r as i,a2 as $,j as c,a3 as z,aj as L,Z as O,U as _,V as g,T as j,Y as w,a1 as G,W as E,dy as H,dz as K,X as U,dA as V,dB as W,dC as Z,_ as B,$ as X,a0 as Y,c as R,l as q}from"./index-i4yKOslE.js";var C="Popover",[b]=U(C,[E]),P=E(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(z,{...p,children:c.jsx(J,{scope:e,contentId:L(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Q=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});Q.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(y,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(j,{asChild:!0,...s,children:p})});S.displayName=y;var A="PopoverPortal",[ee,oe]=b(A,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(A,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=A;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(X,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(Y,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
@@ -1 +0,0 @@
1
- import{c as $,C as H,j as A}from"./index-i4yKOslE.js";import{l as L,g as E,s as y}from"./scroll-area-BJwafxli.js";import{p as O,u as k}from"./use-mcp-client-Cf5O31zc.js";import{b as q,c as B}from"./use-mcp-tools-BpKUIA5V.js";import{u as Y}from"./index-g9kd8YLC.js";import{c as G}from"./content-blocks-o63cs2vh.js";import{g as K,M as V,a as w}from"./types-_9kCqfLO.js";import{u as z,b as F}from"./chat-context-D3ExOe2Y.js";import{b as J}from"./shell-layout-C9QfcYwS.js";import"./agent-icon-CpgVmlKA.js";import"./AlertCircle-B2rGiQLW.js";import"./Tool01-DdMkISER.js";import"./SwitchHorizontal01-BTdkOtmC.js";import"./Settings02-C2eeV5U-.js";import"./XCircle-CJScj78U.js";import"./ArrowUpRight-DYz-mNwT.js";import"./ZapSquare-CwCpnU0T.js";import"./Users03-FbNBHUKo.js";import"./CheckCircle-cLxWQcst.js";import"./ChevronUp-DFVBw1Q0.js";import"./ChevronDown-DajKJ50G.js";import"./ChevronLeft-CB4idmP8.js";import"./ChevronRight-DwQZMwjZ.js";import"./DotsVertical-DXVlN6Ej.js";import"./Stars02-nM_Vn7Vv.js";import"./Eye-XlApkfqq.js";import"./ZoomOut-CiTyIS5u.js";import"./Globe01-BsZz_aM-.js";import"./FilterLines-yICREcB1.js";import"./Star01-DNr09MAY.js";import"./Globe04-2qahfQsK.js";import"./HardDrive-BOnuPdqR.js";import"./Key01-EWZLh6Dg.js";import"./LayoutLeft-B0kudz4E.js";import"./LinkExternal01-B40yAEYp.js";import"./Monitor01-CEDnJUQX.js";import"./Sun-BmtS6iHG.js";import"./Palette-DcfG5x3C.js";import"./Play-BqHmN8yQ.js";import"./Plus-FHaDaCOZ.js";import"./SearchMd-CtVQE5jm.js";import"./Shield01-CVbeDgIl.js";import"./Stars01-DUYEhBcS.js";import"./Trash01-DK9RS17_.js";import"./Upload01-cLKObBlS.js";import"./User01-CWKoITic.js";import"./Users01-BCyCe1vl.js";import"./XClose-BDmZVvYt.js";import"./X-B5LAnKcO.js";import"./Zap-S88eHWD4.js";import"./use-clock-tick-o7ys6RNk.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BGh_3bgs.js";import"./tooltip-CXJRsrjZ.js";import"./file-type-icon-BgIATQF6.js";import"./dialog-BzVd1N_n.js";import"./use-mobile-kRXKzOd9.js";import"./tab-id-BptcWVWa.js";import"./hooks-CNaD44fD.js";import"./decopilot-sse-pool-B7XaA24C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-BIon8cDY.js";import"./sheet-kBH5wWuh.js";import"./integration-icon-DZfYl8h3.js";import"./use-virtual-mcp-BrKgTMoD.js";import"./use-collections-DXvOdsjP.js";import"./use-navigate-to-agent-D5T4j8BI.js";import"./use-connection-DIyKq7Ja.js";import"./use-mcp-prompts-0LKFoXra.js";import"./form-O3jmDZ8D.js";import"./label-C5DnCEJJ.js";import"./input-DYWiBUd4.js";import"./select-BURfxZgH.js";import"./auth-b_6YQ5M-.js";import"./index-Dz6axdna.js";import"./drawer-BU5LE1S-.js";import"./collection-search-D2ns8QJ2.js";import"./tabs-DBW6pdRK.js";import"./toggle-group-BAuAoo_h.js";import"./sortable.esm-D-2-mhpi.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-D7NkQFKT.js";import"./use-registry-connections-B75n3CLT.js";import"./use-organization-settings-DR6y14Ln.js";import"./useInfiniteQuery-D6UIz-QI.js";import"./use-infinite-scroll-MldU11Y_.js";import"./extract-connection-data-Yinpm7Wp.js";import"./card-DKEaJmjc.js";import"./collection-tabs-DGHCcD9t.js";import"./badge-BMv5o_K8.js";import"./textarea-DZCmuZgN.js";import"./connection-form-helpers-DDvLA1rL.js";import"./authenticate-and-persist-oauth-KmxgbBFx.js";import"./mcp-oauth-Cn6Swd6f.js";import"./useSuspenseInfiniteQuery-BR1ud50u.js";import"./use-ai-providers-CYpO6V5w.js";import"./connect-desktop-dialog-B3nMoofq.js";import"./decopilot-B_42o1Ie.js";import"./checkbox-BNJLgZxx.js";import"./skeleton-CDZIM9IX.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-D--lTQS0.js";import"./settings-section-4OTvULu2.js";import"./popover-Cqn28LcZ.js";import"./command-BxU9CB6T.js";import"./index-D4uJ-4rf.js";import"./dropdown-menu-Cu02JhqK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DRNyv2My.js";import"./empty-state-CycaKPME.js";import"./toolbar-C3iNf-7g.js";import"./preview-dialog-DVVKqkqH.js";import"./index-BlQHqLEe.js";import"./use-capability-CdTgUecU.js";import"./shell-route-loading-BGNAbcrB.js";import"./index-Dk_a1p_f.js";import"./alert-dialog-F25p9Qd4.js";import"./switch-Cfy-9sgc.js";import"./use-debounced-autosave-xqhSnikO.js";import"./index-VgUmzAVY.js";import"./sidebar-CUYXItjm.js";import"./search-input-BXoNPqlW.js";import"./github-repo-picker-pUxjtHSB.js";import"./use-secrets-D9jHoh1C.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-BSFLVh95.js";import"./automation-runs-BtxudtXE.js";import"./table-B9Ser0hN.js";import"./use-members-Cleyn3sD.js";import"./use-org-auth-client-DbFVvoh8.js";import"./task-status-BEL_tB4l.js";import"./use-automations-CCFTv539.js";import"./use-file-configs-C4r9SONA.js";import"./monaco-editor-DdEcYsFE.js";import"./select-model-C5-GKj9v.js";import"./automation-list-row-kN98yjTo.js";import"./required-auth-layout-DBSHkTvE.js";import"./use-org-sso-rHZ6AeZh.js";const Q={};function W(S){const t=$.c(37),{client:r,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:C}=z(),{setAppContext:u,clearAppContext:n}=F(),{setChatOpen:f,openTab:g}=J(),e=`${p}:${o.name}`;let a;t[0]!==g?(a=I=>I==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==r||t[3]!==o.name||t[4]!==s?(c={client:r,toolName:o.name,toolArguments:s},t[2]=r,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 I=E(o._meta);x=y(o.name,I),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const b=N;let _;t[15]!==C||t[16]!==f?(_=I=>{const D=G(I.content);D.content.length>0&&(f(!0),C({tiptapDoc:D}))},t[15]=C,t[16]=f,t[17]=_):_=t[17];const j=_;let P;t[18]!==b?(P={tool:b},t[18]=b,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==e?(T=I=>u(e,I),t[20]=u,t[21]=e,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==e?(R=()=>n(e),t[23]=n,t[24]=e,t[25]=R):R=t[25];let v;return t[26]!==r||t[27]!==j||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:r,onMessage:j,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=r,t[27]=j,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 be(S){const t=$.c(24),{connectionId:r,toolName:h,args:o}=S,{org:p}=H(),l=Y();let M;t[0]!==r||t[1]!==l?(M=O(r)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=r,t[1]=l,t[2]=M):M=t[2];const C=M;let u;t[3]!==r||t[4]!==C||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:r,orgId:p.id,orgSlug:p.slug,mcpUrl:C},t[3]=r,t[4]=C,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=k(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let e,a,m;t[10]!==h||t[11]!==g.tools?(e=L(decodeURIComponent(h)),m=g.tools.find(i=>i.name===e)??g.tools.find(i=>{const x=E(i._meta);if(!x)return!1;if(y(i.name,x)===e)return!0;const d=y(e,x);return d!==e&&i.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=e,t[13]=a,t[14]=m):(e=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let i;return t[15]!==e?(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 "',e,'" not found or has no UI']})}),t[15]=e,t[16]=i):i=t[16],i}let c;return t[17]!==o||t[18]!==n||t[19]!==r||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:r,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=r,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{be as AppViewContent};
@@ -1 +0,0 @@
1
- import{c as F,j as r}from"./index-i4yKOslE.js";import{I as T}from"./input-DYWiBUd4.js";import{L as C}from"./label-C5DnCEJJ.js";import{T as L}from"./textarea-DZCmuZgN.js";import{as as A,at as R,au as D,av as J}from"./index-g9kd8YLC.js";import{u as K,s as P}from"./primitives-BBY7iXPz.js";import{S as M}from"./save-status-DiiQFyNz.js";import"./index-Dz6axdna.js";import"./chat-context-D3ExOe2Y.js";import"./hooks-CNaD44fD.js";import"./use-mcp-client-Cf5O31zc.js";import"./auth-b_6YQ5M-.js";import"./decopilot-sse-pool-B7XaA24C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-BrKgTMoD.js";import"./use-collections-DXvOdsjP.js";import"./use-ai-providers-CYpO6V5w.js";import"./studio-tools-BIon8cDY.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-DR6y14Ln.js";import"./scroll-area-BJwafxli.js";import"./agent-icon-CpgVmlKA.js";import"./AlertCircle-B2rGiQLW.js";import"./Tool01-DdMkISER.js";import"./SwitchHorizontal01-BTdkOtmC.js";import"./Settings02-C2eeV5U-.js";import"./XCircle-CJScj78U.js";import"./ArrowUpRight-DYz-mNwT.js";import"./ZapSquare-CwCpnU0T.js";import"./Users03-FbNBHUKo.js";import"./CheckCircle-cLxWQcst.js";import"./ChevronUp-DFVBw1Q0.js";import"./ChevronDown-DajKJ50G.js";import"./ChevronLeft-CB4idmP8.js";import"./ChevronRight-DwQZMwjZ.js";import"./DotsVertical-DXVlN6Ej.js";import"./Stars02-nM_Vn7Vv.js";import"./Eye-XlApkfqq.js";import"./ZoomOut-CiTyIS5u.js";import"./Globe01-BsZz_aM-.js";import"./FilterLines-yICREcB1.js";import"./Star01-DNr09MAY.js";import"./Globe04-2qahfQsK.js";import"./HardDrive-BOnuPdqR.js";import"./Key01-EWZLh6Dg.js";import"./LayoutLeft-B0kudz4E.js";import"./LinkExternal01-B40yAEYp.js";import"./Monitor01-CEDnJUQX.js";import"./Sun-BmtS6iHG.js";import"./Palette-DcfG5x3C.js";import"./Play-BqHmN8yQ.js";import"./Plus-FHaDaCOZ.js";import"./SearchMd-CtVQE5jm.js";import"./Shield01-CVbeDgIl.js";import"./Stars01-DUYEhBcS.js";import"./Trash01-DK9RS17_.js";import"./Upload01-cLKObBlS.js";import"./User01-CWKoITic.js";import"./Users01-BCyCe1vl.js";import"./XClose-BDmZVvYt.js";import"./X-B5LAnKcO.js";import"./Zap-S88eHWD4.js";import"./use-clock-tick-o7ys6RNk.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BGh_3bgs.js";import"./tooltip-CXJRsrjZ.js";import"./file-type-icon-BgIATQF6.js";import"./dialog-BzVd1N_n.js";import"./use-mobile-kRXKzOd9.js";import"./content-blocks-o63cs2vh.js";import"./types-_9kCqfLO.js";import"./shell-layout-C9QfcYwS.js";import"./avatar-D--lTQS0.js";import"./required-auth-layout-DBSHkTvE.js";import"./use-org-sso-rHZ6AeZh.js";import"./sheet-kBH5wWuh.js";import"./integration-icon-DZfYl8h3.js";import"./use-navigate-to-agent-D5T4j8BI.js";import"./use-connection-DIyKq7Ja.js";import"./use-mcp-prompts-0LKFoXra.js";import"./form-O3jmDZ8D.js";import"./select-BURfxZgH.js";import"./drawer-BU5LE1S-.js";import"./collection-search-D2ns8QJ2.js";import"./tabs-DBW6pdRK.js";import"./toggle-group-BAuAoo_h.js";import"./sortable.esm-D-2-mhpi.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-D7NkQFKT.js";import"./use-registry-connections-B75n3CLT.js";import"./useInfiniteQuery-D6UIz-QI.js";import"./use-infinite-scroll-MldU11Y_.js";import"./extract-connection-data-Yinpm7Wp.js";import"./card-DKEaJmjc.js";import"./collection-tabs-DGHCcD9t.js";import"./badge-BMv5o_K8.js";import"./connection-form-helpers-DDvLA1rL.js";import"./authenticate-and-persist-oauth-KmxgbBFx.js";import"./mcp-oauth-Cn6Swd6f.js";import"./useSuspenseInfiniteQuery-BR1ud50u.js";import"./connect-desktop-dialog-B3nMoofq.js";import"./decopilot-B_42o1Ie.js";import"./checkbox-BNJLgZxx.js";import"./skeleton-CDZIM9IX.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-4OTvULu2.js";import"./popover-Cqn28LcZ.js";import"./command-BxU9CB6T.js";import"./index-D4uJ-4rf.js";import"./dropdown-menu-Cu02JhqK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DRNyv2My.js";import"./empty-state-CycaKPME.js";import"./toolbar-C3iNf-7g.js";import"./preview-dialog-DVVKqkqH.js";import"./index-BlQHqLEe.js";import"./use-mcp-tools-BpKUIA5V.js";import"./use-capability-CdTgUecU.js";import"./shell-route-loading-BGNAbcrB.js";import"./index-Dk_a1p_f.js";import"./alert-dialog-F25p9Qd4.js";import"./switch-Cfy-9sgc.js";import"./use-debounced-autosave-xqhSnikO.js";import"./index-VgUmzAVY.js";import"./sidebar-CUYXItjm.js";import"./search-input-BXoNPqlW.js";import"./github-repo-picker-pUxjtHSB.js";import"./use-secrets-D9jHoh1C.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-BSFLVh95.js";import"./automation-runs-BtxudtXE.js";import"./table-B9Ser0hN.js";import"./use-members-Cleyn3sD.js";import"./use-org-auth-client-DbFVvoh8.js";import"./task-status-BEL_tB4l.js";import"./use-automations-CCFTv539.js";import"./use-file-configs-C4r9SONA.js";import"./monaco-editor-DdEcYsFE.js";import"./select-model-C5-GKj9v.js";import"./automation-list-row-kN98yjTo.js";const $={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"}]},q={authors:"Author"};function fr(S){const t=F.c(34),{orgSlug:v,virtualMcpId:j,branch:f,kind:p,blockKey:g,block:w}=S;let y;t[0]!==f||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:f},t[0]=f,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==w||t[5]!==p?(d=R(w,p),t[4]=w,t[5]=p,t[6]=d):d=t[6];const B=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:D(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=K(B,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=q[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(M,{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=$[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(J,{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{fr as RecordEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-WUDoPZno.js","assets/index-i4yKOslE.js","assets/index-pwFXMo3X.css","assets/XCircle-CJScj78U.js","assets/CheckCircle-cLxWQcst.js","assets/Settings02-C2eeV5U-.js","assets/use-mcp-client-Cf5O31zc.js","assets/auth-b_6YQ5M-.js","assets/useInfiniteQuery-D6UIz-QI.js","assets/use-infinite-scroll-MldU11Y_.js","assets/studio-tools-BIon8cDY.js","assets/badge-BMv5o_K8.js","assets/input-DYWiBUd4.js","assets/dropdown-menu-Cu02JhqK.js","assets/ChevronUp-DFVBw1Q0.js","assets/ChevronRight-DwQZMwjZ.js","assets/DotsVertical-DXVlN6Ej.js","assets/table-B9Ser0hN.js","assets/toggle-group-BAuAoo_h.js","assets/use-view-mode-BWd0QgE9.js","assets/use-mobile-kRXKzOd9.js","assets/FilterLines-yICREcB1.js","assets/Globe01-BsZz_aM-.js","assets/SearchMd-CtVQE5jm.js","assets/dialog-BzVd1N_n.js","assets/X-B5LAnKcO.js","assets/AlertCircle-B2rGiQLW.js","assets/Upload01-cLKObBlS.js","assets/alert-dialog-F25p9Qd4.js","assets/card-DKEaJmjc.js","assets/Trash01-DK9RS17_.js","assets/label-C5DnCEJJ.js","assets/select-BURfxZgH.js","assets/tooltip-CXJRsrjZ.js","assets/ChevronDown-DajKJ50G.js","assets/switch-Cfy-9sgc.js","assets/textarea-DZCmuZgN.js","assets/checkbox-BNJLgZxx.js","assets/Eye-XlApkfqq.js","assets/LinkExternal01-B40yAEYp.js","assets/use-copy-BGh_3bgs.js","assets/Key01-EWZLh6Dg.js","assets/Plus-FHaDaCOZ.js","assets/mcp-oauth-Cn6Swd6f.js","assets/Play-BqHmN8yQ.js"])))=>i.map(i=>d[i]);
2
- import{c as s,j as e,r as i,i as a,al as o}from"./index-i4yKOslE.js";import{R as l}from"./require-capability-DBSpClLq.js";import"./use-capability-CdTgUecU.js";import"./access-gate-ZKnrNl-k.js";import"./capability-load-error-yDY4tChx.js";const m=i.lazy(()=>o(()=>import("./registry-layout-WUDoPZno.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])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(l,{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(m,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1 +0,0 @@
1
- import{r as c,ai as nt,a2 as Pe,j as d,a3 as rt,aj as be,Z as k,T as st,U as j,V as _,bO as $,a1 as lt,aP as Ne,W as Ee,ah as at,bJ as it,bQ as ct,dy as dt,dB as ut,dz as pt,dC as ft,_ as mt,X as ht,dA as vt,$ as gt,a0 as xt,c as ee,l as oe}from"./index-i4yKOslE.js";import{V as St}from"./tooltip-CXJRsrjZ.js";import{i as wt,n as Ct}from"./ChevronUp-DFVBw1Q0.js";import{t as Re}from"./ChevronDown-DajKJ50G.js";function _e(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=at(J),[ne]=ht(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,_t]=ne(J),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=r,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=nt(u),[N,O]=Pe({prop:o,defaultProp:n??!1,onChange:i,caller:J}),[F,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:be(),value:F,onValueChange:q,open:N,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:F,onChange:E=>q(E.target.value),disabled:b,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:_(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:_(n.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:_(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:i,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var Nt="SelectIcon",ke=c.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Nt;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=c.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const i=o;return i?Ne.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),i):null}return d.jsx(He,{...r,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=vt("SelectContent.RemoveScroll"),He=c.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(Q,t),[x,U]=c.useState(null),[M,re]=c.useState(null),N=k(e,f=>U(f)),[O,F]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=c.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(F(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:_(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,N=>h(N)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const N=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,P=F.left-I,X=N.left-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-F.right-I,X=window.innerWidth-N.right-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=N.top+N.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(N=>{N&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...i}=r,s=pe(t);return d.jsx(gt,{...s,...i,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Ue=c.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:_(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),U=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:i,...s}=r,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),v=c.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:_(s.onFocus,()=>w(!0)),onBlur:_(s.onBlur,()=>w(!1)),onClick:_(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:_(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:_(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:_(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:_(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...i}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=_t(le,t),[h,g]=c.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ne.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=c.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:_(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(n.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=c.useRef(null),i=k(o,n),s=it(e);return c.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ft;function et(r){return r===""||r===void 0}function tt(r){const e=ct(r),t=c.useRef(""),o=c.useRef(0),n=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,i]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?r.indexOf(t):-1;let s=Wt(r,Math.max(i,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function co(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(13);let t,o,n,i;e[0]!==r?({className:o,size:i,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(r){const e=ee.c(25);let t,o,n,i,s;e[0]!==r?({className:o,children:t,position:i,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i,e[5]=s):(t=e[1],o=e[2],n=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(r){const e=ee.c(16);let t,o,n,i;e[0]!==r?({className:o,children:t,hideCheck:i,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Ct,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{fo as S,mo as a,po as b,uo as c,co as d,_e as e};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-WUDoPZno.js","assets/index-i4yKOslE.js","assets/index-pwFXMo3X.css","assets/XCircle-CJScj78U.js","assets/CheckCircle-cLxWQcst.js","assets/Settings02-C2eeV5U-.js","assets/use-mcp-client-Cf5O31zc.js","assets/auth-b_6YQ5M-.js","assets/useInfiniteQuery-D6UIz-QI.js","assets/use-infinite-scroll-MldU11Y_.js","assets/studio-tools-BIon8cDY.js","assets/badge-BMv5o_K8.js","assets/input-DYWiBUd4.js","assets/dropdown-menu-Cu02JhqK.js","assets/ChevronUp-DFVBw1Q0.js","assets/ChevronRight-DwQZMwjZ.js","assets/DotsVertical-DXVlN6Ej.js","assets/table-B9Ser0hN.js","assets/toggle-group-BAuAoo_h.js","assets/use-view-mode-BWd0QgE9.js","assets/use-mobile-kRXKzOd9.js","assets/FilterLines-yICREcB1.js","assets/Globe01-BsZz_aM-.js","assets/SearchMd-CtVQE5jm.js","assets/dialog-BzVd1N_n.js","assets/X-B5LAnKcO.js","assets/AlertCircle-B2rGiQLW.js","assets/Upload01-cLKObBlS.js","assets/alert-dialog-F25p9Qd4.js","assets/card-DKEaJmjc.js","assets/Trash01-DK9RS17_.js","assets/label-C5DnCEJJ.js","assets/select-BURfxZgH.js","assets/tooltip-CXJRsrjZ.js","assets/ChevronDown-DajKJ50G.js","assets/switch-Cfy-9sgc.js","assets/textarea-DZCmuZgN.js","assets/checkbox-BNJLgZxx.js","assets/Eye-XlApkfqq.js","assets/LinkExternal01-B40yAEYp.js","assets/use-copy-BGh_3bgs.js","assets/Key01-EWZLh6Dg.js","assets/Plus-FHaDaCOZ.js","assets/mcp-oauth-Cn6Swd6f.js","assets/Play-BqHmN8yQ.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,al as f}from"./index-i4yKOslE.js";import{R as u}from"./require-capability-DBSpClLq.js";import"./use-capability-CdTgUecU.js";import"./access-gate-ZKnrNl-k.js";import"./capability-load-error-yDY4tChx.js";const g=l.lazy(()=>f(()=>import("./registry-layout-WUDoPZno.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])));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{r as a,j as c,U as S,aj as Z,a2 as J,a3 as Q,Z as H,T as ee,V as C,Y as $,a1 as te,W as G,_ as oe,$ as re,X as ne,dx as se,a0 as ae,c as j,l as ie}from"./index-i4yKOslE.js";var le=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ce="VisuallyHidden",V=a.forwardRef((o,e)=>c.jsx(S.span,{...o,ref:e,style:{...le,...o.style}}));V.displayName=ce;var ue=V,[O]=ne("Tooltip",[G]),D=G(),z="TooltipProvider",de=700,L="tooltip.open",[pe,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=de,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsx(pe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[fe,_]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,i=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),x=Z(),f=a.useRef(0),h=l??i.disableHoverableContent,T=d??i.delayDuration,g=a.useRef(!1),[y,m]=J({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),s?.(M)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,m(!0)},[m]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,m(!1)},[m]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,m(!0),f.current=0},T)},[T,m]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(Q,{...p,children:c.jsx(fe,{scope:e,contentId:x,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():E()},[i.isOpenDelayedRef,I,E]),onTriggerLeave:a.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};Y.displayName=R;var A="TooltipTrigger",U=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=k(A,t),l=D(t),d=a.useRef(null),i=H(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(ee,{asChild:!0,...l,children:c.jsx(S.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});U.displayName=A;var N="TooltipPortal",[ve,xe]=O(N,{forceMount:void 0}),B=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return c.jsx(ve,{scope:e,forceMount:t,children:c.jsx($,{present:t||s.open,children:c.jsx(te,{asChild:!0,container:n,children:r})})})};B.displayName=N;var b="TooltipContent",W=a.forwardRef((o,e)=>{const t=xe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx($,{present:r||l.open,children:l.disableHoverableContent?c.jsx(X,{side:n,...s,ref:e}):c.jsx(he,{side:n,...s,ref:e})})}),he=a.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=H(e,n),[l,d]=a.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((h,T)=>{const g=h.currentTarget,y={x:h.clientX,y:h.clientY},m=ye(y,g.getBoundingClientRect()),w=Ce(y,m),E=be(T.getBoundingClientRect()),P=Ee([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&u){const h=g=>f(g,u),T=g=>f(g,i);return i.addEventListener("pointerleave",h),u.addEventListener("pointerleave",T),()=>{i.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",T)}}},[i,u,f,x]),a.useEffect(()=>{if(l){const h=T=>{const g=T.target,y={x:T.clientX,y:T.clientY},m=i?.contains(g)||u?.contains(g),w=!we(y,l);m?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,u,l,p,x]),c.jsx(X,{...o,ref:s})}),[ge,Te]=O(R,{isInside:!1}),me=se("TooltipContent"),X=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,i=_(b,t),p=D(t),{onClose:u}=i;return a.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,u]),c.jsx(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(re,{"data-state":i.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(me,{children:r}),c.jsx(ge,{scope:t,isInside:!0,children:c.jsx(ue,{id:i.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var q="TooltipArrow",K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return Te(q,t).isInside?null:c.jsx(ae,{...n,...r,ref:e})});K.displayName=q;function ye(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ce(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function be(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function we(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],i=e[l],p=d.x,u=d.y,v=i.x,x=i.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ee(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Pe(e)}function Pe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Re=F,_e=Y,je=U,Oe=B,De=W,Le=K;function Ae(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Re,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ne(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ae,{children:c.jsx(_e,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Ie(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(je,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Oe,{children:c.jsxs(De,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Ne as T,le as V,Ie as a,Me as b,Ae as c};
@@ -1 +0,0 @@
1
- import{c as f,C}from"./index-i4yKOslE.js";import{a as N,b as O,u as S}from"./use-collections-DXvOdsjP.js";import{S as I,u as m}from"./use-mcp-client-Cf5O31zc.js";function E(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const p=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:I,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const A=m(a);return O(u.id,"CONNECTIONS",A,p)}function _(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:I,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=m(n);return S(i.id,"CONNECTIONS",t,l)}function x(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:I,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=m(i);return N(o.id,"CONNECTIONS",n)}export{_ as a,x as b,E as u};
@@ -1 +0,0 @@
1
- import{L as v,r as f,c as C,j,b as D,C as M,a as N}from"./index-i4yKOslE.js";import{u as F}from"./use-virtual-mcp-BrKgTMoD.js";const h="__tool_call_runs__",R=["requires_action","in_progress","failed","expired","completed"];function tt(t){const e=new Map(R.map(r=>[r,[]]));for(const r of t){const n=r.status??"completed";(e.get(n)??e.get("completed")).push(r)}return R.map(r=>({status:r,threads:e.get(r)}))}function et(t,e){const r=new Map;for(const a of t){if(a.id.startsWith("thrd_welcome_"))continue;const u=a.virtual_mcp_id??h,d=r.get(u);d?(d.threads.push(a),(a.updated_at??"")>d.latestUpdatedAt&&(d.latestUpdatedAt=a.updated_at??"")):r.set(u,{virtualMcpId:u,threads:[a],latestUpdatedAt:a.updated_at??""})}const n=e!==null?r.get(e):void 0;n&&e&&r.delete(e);const s=r.get(h);s&&r.delete(h);const o=[...r.values()].sort((a,u)=>u.latestUpdatedAt.localeCompare(a.latestUpdatedAt)),i=[];return e&&i.push(n??{virtualMcpId:e,threads:[],latestUpdatedAt:""}),i.push(...o),s&&s.threads.length>0&&i.push(s),i}function rt(t,e){if(e.size===0)return t;const r=[],n=new Map;for(const s of t){const o=e.get(s.virtualMcpId);if(o){const a=n.get(o);if(a)a.threads=[...a.threads,...s.threads],s.latestUpdatedAt>a.latestUpdatedAt&&(a.latestUpdatedAt=s.latestUpdatedAt);else{const u={virtualMcpId:o,threads:[...s.threads],latestUpdatedAt:s.latestUpdatedAt};n.set(o,u),r.push(u)}continue}const i=n.get(s.virtualMcpId);if(i)i.threads=[...s.threads,...i.threads],s.latestUpdatedAt>i.latestUpdatedAt&&(i.latestUpdatedAt=s.latestUpdatedAt);else{const a={...s,threads:[...s.threads]};n.set(s.virtualMcpId,a),r.push(a)}}return r}const x=new Map,I=new Map;function P(t){return`${t.orgId}:${t.userId}`}function E(t){return`sidebar.group-order.${t}`}function O(t){try{const e=localStorage.getItem(t),r=e?JSON.parse(e):[];return Array.isArray(r)?r.filter(n=>typeof n=="string"):[]}catch{return[]}}function T(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function L(t){const e=P(t),r=x.get(e);if(r)return r;const n=v.sidebarGroupOrder(t.orgId,t.userId);let s=!1;try{s=localStorage.getItem(n)!==null}catch{}let o=O(n);if(!s&&o.length===0&&t.userId!=="anon"){const i=O(E(t.orgId));i.length>0&&(o=i)}return x.set(e,o),o}function p(t,e){const r=new Set(e);return L(t).filter(n=>!r.has(n))}function g(t,e){x.set(P(t),e),T(v.sidebarGroupOrder(t.orgId,t.userId),e)}function m(t){const e=I.get(t);if(e)return e;const r=O(v.sidebarOrgPinnedOrder(t));return I.set(t,r),r}function S(t,e){I.set(t,e),T(v.sidebarOrgPinnedOrder(t),e)}function nt(t,e){g(t,e)}function st(t,e){S(t,e)}function k(t,e){return t===e||t===h}function w(t,e){return e.includes(t)}function q(t,e){return t.map(r=>r.virtualMcpId).filter(r=>!k(r,e))}function ot(t,e,r,n){const s=new Set(n);return q(t,r).filter(o=>e==="org"?s.has(o):!s.has(o))}function B(t,e){const r=new Set(t),n=e.filter(s=>!r.has(s));return n.length===0?t:[...t,...n]}function at(t,e,r){const n=new Set(r),s=[],o=[];let i,a;for(const u of t){const d=u.virtualMcpId;if(e&&d===e){i=u;continue}if(d===h){a=u;continue}if(n.has(d)){s.push(u);continue}o.push(u)}return{decopilot:i,orgPinned:s,user:o,toolCallRuns:a}}function $(t,e,r,n=[],s=[]){const o=r?t.find(c=>c.virtualMcpId===r):void 0,i=t.find(c=>c.virtualMcpId===h),a=new Set(n),u=n.filter(c=>!k(c,r)),d=B(s,u),l=e.filter(c=>!a.has(c)),b=new Map(t.map(c=>[c.virtualMcpId,c])),A=c=>{const G=b.get(c);return G||{virtualMcpId:c,threads:[],latestUpdatedAt:""}},_=d.filter(c=>a.has(c)).map(A),K=l.map(A),U=[];return o&&U.push(o),U.push(..._,...K),i&&U.push(i),{groups:U,userOrder:l,orgOrder:_.map(c=>c.virtualMcpId)}}function J(t,e){const r=new Set(e);m(t.orgId).length===0&&e.length>0&&S(t.orgId,[...e]);const s=v.sidebarGroupOrder(t.orgId,t.userId);if(O(s).length>0)return;const o=O(E(t.orgId));if(o.length===0)return;const i=o.filter(a=>!r.has(a));g(t,i)}function Y(t,e){const r=new Set(e),n=L(t),s=n.filter(o=>!r.has(o));s.length!==n.length&&g(t,s)}function it(t,e,r,n=[]){J(t,n),Y(t,n);const s=p(t,n),o=m(t.orgId),{userOrder:i,orgOrder:a}=$(e,s,r,n,o);(i.length!==s.length||i.some((u,d)=>u!==s[d]))&&g(t,i),(a.length!==o.length||a.some((u,d)=>u!==o[d]))&&S(t.orgId,a)}function ut(t,e,r,n=[]){const s=p(t,n),o=m(t.orgId);return $(e,s,r,n,o).groups}function dt(t,e,r){if(r){const o=p(t,[e]).filter(a=>a!==e);g(t,o);const i=m(t.orgId);i.includes(e)||S(t.orgId,[...i,e]);return}const n=m(t.orgId).filter(o=>o!==e);S(t.orgId,n);const s=p(t,[]);s.includes(e)||g(t,[...s,e])}function z(t,e,r=[]){if(r.includes(e))return;const n=p(t,r);n.includes(e)||g(t,[e,...n])}function ct(t,e,r=[]){const n=p(t,r),s=n.filter(o=>o!==e);s.length!==n.length&&g(t,s)}function lt(t,e,r){const n=t.indexOf(e),s=t.indexOf(r);if(n===-1||s===-1||n===s)return t;const o=[...t],[i]=o.splice(n,1);return i===void 0?t:(o.splice(s,0,i),o)}function ft(t,e,r,n){if(t==="org")return n;const s=p(e,r),o=new Set(n),i=s.filter(a=>!o.has(a));return[...n,...i]}function gt(t,e,r){const n=w(t,r),s=w(e,r);return n===s}const y=f.createContext(null);function pt(t){const e=C.c(7),{children:r}=t,[n,s]=f.useState(!1),[o,i]=f.useState(0);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>i(W),e[0]=a):a=e[0];const u=a;let d;e[1]!==n||e[2]!==o?(d={empty:n,setEmpty:s,orderRevision:o,bumpOrderRevision:u},e[1]=n,e[2]=o,e[3]=d):d=e[3];let l;return e[4]!==r||e[5]!==d?(l=j.jsx(y.Provider,{value:d,children:r}),e[4]=r,e[5]=d,e[6]=l):l=e[6],l}function W(t){return t+1}function ht(){return f.useContext(y)?.empty??!1}function Ot(){return f.useContext(y)?.orderRevision??0}function H(){return f.useContext(y)?.bumpOrderRevision??Q}function Q(){}function mt(t){const{value:e}=t,r=f.useContext(y),[n,s]=f.useState(null);return r&&n!==e&&(r.setEmpty(e),s(e)),null}function X(t){return(t??[]).filter(e=>!!e.pinned).map(e=>e.id)}function St(){const t=C.c(9),e=D(),{org:r}=M(),n=F(),{data:s}=N.useSession(),o=s?.user?.id??"anon";let i;t[0]!==n?(i=X(n),t[0]=n,t[1]=i):i=t[1];const a=i,u=H();let d;return t[2]!==u||t[3]!==e||t[4]!==r.id||t[5]!==r.slug||t[6]!==a||t[7]!==o?(d=(l,b)=>{z({orgId:r.id,userId:o},l,a),u();const A=crypto.randomUUID();e({to:"/$org/$taskId",params:{org:r.slug,taskId:A},search:{...b?.search??{},virtualmcpid:l}})},t[2]=u,t[3]=e,t[4]=r.id,t[5]=r.slug,t[6]=a,t[7]=o,t[8]=d):d=t[8],d}export{mt as S,h as T,H as a,z as b,gt as c,ft as d,st as e,nt as f,X as g,it as h,ut as i,Ot as j,rt as k,et as l,St as m,tt as n,ct as o,at as p,dt as q,lt as r,ot as s,pt as t,ht as u};
@@ -1 +0,0 @@
1
- import{c as x,C,a as i}from"./index-i4yKOslE.js";function q(){const e=x.c(32),{org:O}=C(),o=O.id;let z;e[0]!==o?(z=R=>(f=>i.organization[R]({...f??{},organizationId:o})),e[0]=o,e[1]=z):z=e[1];const t=z;let M;e[2]!==o?(M=R=>(f=>{const y={...f??{}},h=y.query??{};return y.query={...h,organizationId:o},i.organization[R](y)}),e[2]=o,e[3]=M):M=e[3];const n=M;let a,r;e[4]!==n?(a=n("listMembers"),r=n("listRoles"),e[4]=n,e[5]=a,e[6]=r):(a=e[5],r=e[6]);let l,s,c,g,u,m,d,v,b;e[7]!==t?(g=t("inviteMember"),u=t("removeMember"),m=t("updateMemberRole"),d=t("addMember"),v=t("createRole"),b=t("updateRole"),l=t("deleteRole"),s=t("cancelInvitation"),c=t("update"),e[7]=t,e[8]=l,e[9]=s,e[10]=c,e[11]=g,e[12]=u,e[13]=m,e[14]=d,e[15]=v,e[16]=b):(l=e[8],s=e[9],c=e[10],g=e[11],u=e[12],m=e[13],d=e[14],v=e[15],b=e[16]);let p;e[17]!==n?(p=n("getActiveMember"),e[17]=n,e[18]=p):p=e[18];let I;return e[19]!==l||e[20]!==s||e[21]!==c||e[22]!==p||e[23]!==a||e[24]!==r||e[25]!==g||e[26]!==u||e[27]!==m||e[28]!==d||e[29]!==v||e[30]!==b?(I={organization:{listMembers:a,listRoles:r,inviteMember:g,removeMember:u,updateMemberRole:m,addMember:d,createRole:v,updateRole:b,deleteRole:l,cancelInvitation:s,update:c,getActiveMember:p,acceptInvitation:i.organization.acceptInvitation,rejectInvitation:i.organization.rejectInvitation,getInvitation:i.organization.getInvitation,list:i.organization.list,create:i.organization.create,getFullOrganization:i.organization.getFullOrganization}},e[19]=l,e[20]=s,e[21]=c,e[22]=p,e[23]=a,e[24]=r,e[25]=g,e[26]=u,e[27]=m,e[28]=d,e[29]=v,e[30]=b,e[31]=I):I=e[31],I}export{q as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-MldU11Y_.js";import{cI as i}from"./index-i4yKOslE.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-MldU11Y_.js";import{cI as u,aB as n}from"./index-i4yKOslE.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};